diff --git a/.nojekyll b/.nojekyll deleted file mode 100644 index e69de29..0000000 diff --git a/assets/index-C1AW_XPJ.css b/assets/index-C1AW_XPJ.css new file mode 100644 index 0000000..d8791bc --- /dev/null +++ b/assets/index-C1AW_XPJ.css @@ -0,0 +1 @@ +@charset "UTF-8";.App{text-align:center;padding:0;background-color:#8d8787;color:#fff;min-height:100vh;font-size:17px}.orientation-warning{display:flex;justify-content:center;align-items:center;position:fixed;top:0;left:0;width:100%;height:100%;background-color:#000c;color:#fff;font-size:1.5rem;text-align:center;z-index:1000}section{margin:0;width:100vw;position:relative;overflow:hidden;display:flex;justify-content:center;align-items:center;min-height:100vh;background:#8d8787}section .text{position:relative;font-size:12vw;text-align:center;color:#fff;-webkit-box-reflect:below -.46em linear-gradient(transparent,rgba(0,0,0,.2666666667))}section .text span{position:relative;display:inline-block}.hide{display:none}.button-highlight{background-color:#f5f5f5;color:#444;padding:10px 20px;font-size:1em;border:none;border-radius:5px;cursor:pointer;outline:none;animation:blink-shadow 1s infinite;transition:all .3s ease}.button-highlight:hover{transform:scale(1.05)}@media (max-width: 991px){.button-highlight{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:900;background-color:#f5f5f5e6;box-shadow:0 2px 10px #0003}.button-highlight:hover{transform:translate(-50%,-50%) scale(1.05)}.navbar.mobile.expanded~.App .button-highlight{transform:translate(calc(-50% + 100px),-50%)}.navbar.mobile.expanded~.App .button-highlight:hover{transform:translate(calc(-50% + 100px),-50%) scale(1.05)}}@media (max-width: 576px){.button-highlight{font-size:.9em;padding:8px 16px}}@keyframes blink-shadow{0%,to{box-shadow:0 0 10px 2px #fffc}50%{box-shadow:0 0 20px 4px #444}}.battlefield{display:flex;justify-content:center;align-items:flex-start;gap:40px;padding-top:60px;overflow:hidden;position:relative}.card-container{display:flex;flex-direction:column;align-items:center;text-align:center;width:100%;max-width:550px;margin:0 auto}.card-header{font-size:.85em;position:absolute;background-color:#444;color:#fff;padding:0 5px;border-radius:0 0 10px 10px;width:50%;left:50%;transform:translate(-50%) translateY(-50%);top:10px;text-align:center;font-weight:700}.card-header h2{margin:.2em 1em}.card-spieler,.card-computer{position:relative;width:100%;max-width:550px;height:auto;aspect-ratio:.75;border-radius:1em;overflow:hidden;transition:transform .6s}.card-spieler img,.card-computer img{width:100%;height:auto;border-radius:5px;margin-bottom:5px}.card-flip{width:100%;height:100%;position:relative;transform-style:preserve-3d;transition:transform .6s;perspective:1000px}.card-front,.card-back{position:absolute;width:100%;height:100%;border-radius:1em;backface-visibility:hidden;box-sizing:border-box}.card-front{width:100%;height:100%;padding:20px;border-radius:1em;box-shadow:0 8px 16px #0000004d;background:linear-gradient(to bottom,#f5f5f5 95%,#444 5%);border:.8em solid #444444;position:absolute;backface-visibility:hidden;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between}.card-back{transform:rotateY(180deg);display:flex;align-items:center;justify-content:center}.card-back img{width:100%;height:auto;border-radius:1em}.card-properties{list-style:none;padding:0;margin:0;width:100%}.card-properties li{display:flex;justify-content:space-between;align-items:center;margin:10px 0;width:100%;color:#fff}.property-label{flex:1;text-align:left;font-weight:700}.property-value{flex:.5;text-align:center;font-weight:700}.property-label,.property-value{transition:color .3s,background-color .3s}body:not(.computer-turn) .player-card .property-label:hover,body:not(.computer-turn) .player-card .property-value:hover{background-color:#444;color:#fff}body:not(.computer-turn) .player-card .property-label:focus,body:not(.computer-turn) .player-card .property-value:focus{outline:none}.rating-scale{flex:1;height:10px;background-color:#eee;border-radius:5px;overflow:hidden;min-width:100px;display:flex;justify-content:flex-end}.rating-scale .rating-bar{width:100%;height:100%;transition:width .3s}.card-description{width:calc(100% + 40px);margin:0 -20px;color:#fff;font-size:17px;line-height:1.5;background-color:#444;box-sizing:border-box;text-align:left;padding:10px 20px}.card-properties-list{list-style:none;padding:0;margin:0;width:100%}.card-properties-list li{display:flex;justify-content:space-between;align-items:center;margin:10px 0;width:100%;color:#b2aeae}.description-button{width:calc(100% + 40px);margin:0 -20px;padding:10px 20px;background-color:#444;color:#fff;border:none;cursor:pointer;font-size:17px;transition:background-color .3s}.description-button:hover{background-color:#5e5e5e}.description-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:#000000b3;display:flex;justify-content:center;align-items:center;z-index:1000;padding:20px}.description-popup{background-color:#8d8787;border-radius:1em;padding:20px;max-width:500px;width:90%;max-height:80vh;overflow-y:auto;position:relative;box-shadow:0 8px 16px #0000004d}.description-popup h3{color:#fff;margin-top:0;margin-bottom:15px;font-size:1.2em}.description-popup p{color:#fff;line-height:1.5;margin:0 0 20px}.close-button{background-color:#444;color:#fff;border:none;padding:8px 16px;border-radius:4px;cursor:pointer;transition:background-color .3s}.close-button:hover{background-color:#5e5e5e}@media (max-width: 1200px){.card-container{max-width:500px}.card-description{font-size:.95em}.card-properties-list li{margin:8px 0}.card-header{font-size:.9em}}@media (max-width: 991px){.battlefield{padding-top:0;height:100vh}.card-container{max-width:450px;font-size:.6em}.card-spieler,.card-computer{width:60%}.card-description{font-size:.6em}.card-properties-list li{font-size:.85em;margin:6px 0}.card-header{top:5px;font-size:.8em}ƒ .rating-scale{height:8px}.card-front{padding:15px;border:.6em solid #444444}.description-button{margin:0 -20px;padding:5px 0;font-size:1em}}@media (max-width: 800px){.card-container{font-size:.5em}.card-spieler,.card-computer{width:50%}.card-description{font-size:.75em}.card-properties-list li{font-size:.75em;margin:5px 0}.card-header{font-size:.7em}.rating-scale{height:6px}.card-front{padding:12px;border:.5em solid #444444}.property-label,.property-value{pointer-events:none}}@media (max-width: 700px){.card-container{max-width:350px;font-size:.4em}.card-spieler,.card-computer{width:40%}.card-description{font-size:.65em}.card-properties-list li{font-size:.65em;margin:4px 0}.card-header{font-size:.6em}.rating-scale{height:5px}.card-front{padding:8px;border:.4em solid #444444}.description-button{font-size:.8em;padding:6px 12px}.description-popup{width:95%;padding:10px}.description-popup h3{font-size:.9em;margin-bottom:10px}.description-popup p{font-size:.8em}}.navbar-overlay{display:none;position:fixed;top:0;left:0;right:0;bottom:0;background:#00000080;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);z-index:999;opacity:0;transition:opacity .3s ease}.navbar{position:fixed;top:0;width:100%;display:flex;justify-content:space-between;padding:10px 20px;background-color:transparent;z-index:1000;transition:all .3s ease}.navbar .navbar-left{display:flex;gap:10px;margin-top:0}.navbar .navbar-right{display:flex;gap:10px;position:absolute;right:100px}.navbar .navbar-button{margin:10px 5px 0 0;color:#444;border:none;padding:5px 10px;border-radius:5px;cursor:pointer;transition:background-color .3s;z-index:100}.navbar .navbar-button:hover{background-color:#666161;color:#fff}.navbar .navbar-toggle{display:none;background:none;border:none;color:#fff;font-size:1.5rem;cursor:pointer;padding:5px;margin:0;position:fixed;left:50%;transform:translate(-50%);top:50px;z-index:1001}@media (max-width: 991px){.navbar.mobile{width:60px;height:100vh;flex-direction:column;background-color:transparent;padding:20px 10px;align-items:center;left:50%;transform:translate(-50%)}.navbar.mobile .navbar-toggle{display:block}.navbar.mobile .navbar-left,.navbar.mobile .navbar-right{flex-direction:column;align-items:center;opacity:0;visibility:hidden;transition:all .3s ease;margin-top:100px}.navbar.mobile .navbar-right{position:static;margin-top:10px}.navbar.mobile.expanded{width:80%;background-color:transparent}.navbar.mobile.expanded .navbar-left,.navbar.mobile.expanded .navbar-right{opacity:1;visibility:visible}.navbar.mobile.expanded+.navbar-overlay{display:block;opacity:1}.navbar.mobile.expanded .navbar-button{width:80%;text-align:center;margin:5px 0}}.winner-message{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background-color:#000c;color:#fff;padding:20px;border-radius:10px;box-shadow:0 4px 8px #0003;z-index:2000;text-align:center;font-size:2em;font-family:Comic Sans MS,Comic Sans,cursive;pointer-events:none}.end-animation-container{display:flex;justify-content:center;align-items:center;height:100vh;width:100vw;position:fixed;top:0;left:0;background-color:#000c;z-index:1000}.end-animation-content{text-align:center;color:#fff;padding:20px;border-radius:10px;background-color:#333;animation:fadeIn 1s ease-in-out;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.end-animation-message{font-size:2rem;margin-bottom:20px}.end-animation-button{padding:10px 20px;font-size:1rem;color:#fff;background-color:#666161;border:none;border-radius:5px;cursor:pointer;transition:background-color .3s ease;z-index:1001}.end-animation-button:hover{background-color:#b2aeae;color:#1e1e1e}.endAnimBody{display:flex;justify-content:center;align-items:center;height:100vh;width:100vw;position:fixed;top:0;left:0;background-color:#000c;z-index:1000}.endAnimBody h2{color:#fff;font-size:3rem;text-align:center;margin:0;padding:20px;background-color:#00000080;border-radius:10px}.popup-overlay{position:fixed;top:0;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:start;padding-top:5vh;background-color:#000c;z-index:101}.popup-content{background-color:#8d8787;padding:30px;border-radius:5px;box-shadow:0 4px 6px #0000001a;width:90%;max-width:1200px;max-height:90vh;overflow-y:auto;color:#fff}@media (max-width: 991px){.popup-content{width:95%;padding:20px}}.about-me{color:#fff;margin-top:20px}.about-me h2{font-size:2em;margin-bottom:1em}.about-me p{font-size:1.1em;line-height:1.6;margin-bottom:1.5em}.about-me a{color:#fff;text-decoration:none;display:inline-flex;align-items:center;gap:10px;padding:5px 10px;border-radius:5px;transition:background-color .3s}.about-me a:hover{background-color:#ffffff1a}.schliesen-button{margin-top:2em;margin-bottom:1em;display:flex;justify-content:center}.schliesen-button .button{background-color:#666161;color:#fff;border:none;padding:12px 30px;border-radius:5px;cursor:pointer;transition:background-color .3s;font-size:1.1em}.schliesen-button .button:hover{background-color:#b2aeae;color:#444}.last-round-details{text-align:center;margin:20px auto;padding:10px;color:#fff;transition:all .3s ease;width:100%;max-width:300px}.last-round-details h3{margin-bottom:10px;font-size:1.2em}.last-round-details p{margin:5px 0;font-size:1em}@media (max-width: 991px){.last-round-details{position:fixed;left:50%;transform:translate(-50%);bottom:20px;background-color:transparent;border-radius:10px;padding:15px;z-index:900}.navbar.expanded~.last-round-details{bottom:30px}.last-round-details h3{font-size:1.1em}.last-round-details p{font-size:.9em}}@media (max-width: 576px){.last-round-details{max-width:250px;padding:10px}.last-round-details h3{font-size:1em}.last-round-details p{font-size:.8em}} diff --git a/assets/index-CoVrCI06.js b/assets/index-CoVrCI06.js new file mode 100644 index 0000000..7093902 --- /dev/null +++ b/assets/index-CoVrCI06.js @@ -0,0 +1,49 @@ +function ky(e,t){for(var n=0;nr[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)}})();var Nr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ey(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var uh={exports:{}},Xs={},ch={exports:{}},B={};/** + * @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 wi=Symbol.for("react.element"),Ly=Symbol.for("react.portal"),Oy=Symbol.for("react.fragment"),Ry=Symbol.for("react.strict_mode"),Ay=Symbol.for("react.profiler"),My=Symbol.for("react.provider"),Dy=Symbol.for("react.context"),Ny=Symbol.for("react.forward_ref"),jy=Symbol.for("react.suspense"),Vy=Symbol.for("react.memo"),Iy=Symbol.for("react.lazy"),lc=Symbol.iterator;function Fy(e){return e===null||typeof e!="object"?null:(e=lc&&e[lc]||e["@@iterator"],typeof e=="function"?e:null)}var fh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},dh=Object.assign,hh={};function fr(e,t,n){this.props=e,this.context=t,this.refs=hh,this.updater=n||fh}fr.prototype.isReactComponent={};fr.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")};fr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ph(){}ph.prototype=fr.prototype;function Al(e,t,n){this.props=e,this.context=t,this.refs=hh,this.updater=n||fh}var Ml=Al.prototype=new ph;Ml.constructor=Al;dh(Ml,fr.prototype);Ml.isPureReactComponent=!0;var uc=Array.isArray,mh=Object.prototype.hasOwnProperty,Dl={current:null},gh={key:!0,ref:!0,__self:!0,__source:!0};function yh(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)mh.call(t,r)&&!gh.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1>>1,Z=k[$];if(0>>1;$i(on,N))hti(Oi,on)?(k[$]=Oi,k[ht]=N,$=ht):(k[$]=on,k[ke]=N,$=ke);else if(hti(Oi,N))k[$]=Oi,k[ht]=N,$=ht;else break e}}return D}function i(k,D){var N=k.sortIndex-D.sortIndex;return N!==0?N:k.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var a=[],u=[],c=1,f=null,d=3,m=!1,y=!1,v=!1,S=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(k){for(var D=n(u);D!==null;){if(D.callback===null)r(u);else if(D.startTime<=k)r(u),D.sortIndex=D.expirationTime,t(a,D);else break;D=n(u)}}function w(k){if(v=!1,p(k),!y)if(n(a)!==null)y=!0,O(P);else{var D=n(u);D!==null&&F(w,D.startTime-k)}}function P(k,D){y=!1,v&&(v=!1,g(T),T=-1),m=!0;var N=d;try{for(p(D),f=n(a);f!==null&&(!(f.expirationTime>D)||k&&!I());){var $=f.callback;if(typeof $=="function"){f.callback=null,d=f.priorityLevel;var Z=$(f.expirationTime<=D);D=e.unstable_now(),typeof Z=="function"?f.callback=Z:f===n(a)&&r(a),p(D)}else r(a);f=n(a)}if(f!==null)var J=!0;else{var ke=n(u);ke!==null&&F(w,ke.startTime-D),J=!1}return J}finally{f=null,d=N,m=!1}}var C=!1,R=null,T=-1,V=5,M=-1;function I(){return!(e.unstable_now()-Mk||125$?(k.sortIndex=N,t(u,k),n(a)===null&&k===n(u)&&(v?(g(T),T=-1):v=!0,F(w,N-$))):(k.sortIndex=Z,t(a,k),y||m||(y=!0,O(P))),k},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(k){var D=d;return function(){var N=d;d=D;try{return k.apply(this,arguments)}finally{d=N}}}})(Ph);Sh.exports=Ph;var Qy=Sh.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 Yy=L,be=Qy;function A(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ma=Object.prototype.hasOwnProperty,Xy=/^[: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]*$/,fc={},dc={};function qy(e){return ma.call(dc,e)?!0:ma.call(fc,e)?!1:Xy.test(e)?dc[e]=!0:(fc[e]=!0,!1)}function Zy(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 Jy(e,t,n,r){if(t===null||typeof t>"u"||Zy(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 Re(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var ge={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ge[e]=new Re(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ge[t]=new Re(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ge[e]=new Re(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ge[e]=new Re(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ge[e]=new Re(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ge[e]=new Re(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ge[e]=new Re(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ge[e]=new Re(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ge[e]=new Re(e,5,!1,e.toLowerCase(),null,!1,!1)});var jl=/[\-:]([a-z])/g;function Vl(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(jl,Vl);ge[t]=new Re(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(jl,Vl);ge[t]=new Re(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(jl,Vl);ge[t]=new Re(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ge[e]=new Re(e,1,!1,e.toLowerCase(),null,!1,!1)});ge.xlinkHref=new Re("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ge[e]=new Re(e,1,!1,e.toLowerCase(),null,!0,!0)});function Il(e,t,n,r){var i=ge.hasOwnProperty(t)?ge[t]:null;(i!==null?i.type!==0:r||!(2l||i[o]!==s[l]){var a=` +`+i[o].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=o&&0<=l);break}}}finally{Oo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Lr(e):""}function e0(e){switch(e.tag){case 5:return Lr(e.type);case 16:return Lr("Lazy");case 13:return Lr("Suspense");case 19:return Lr("SuspenseList");case 0:case 2:case 15:return e=Ro(e.type,!1),e;case 11:return e=Ro(e.type.render,!1),e;case 1:return e=Ro(e.type,!0),e;default:return""}}function wa(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 Dn:return"Fragment";case Mn:return"Portal";case ga:return"Profiler";case Fl:return"StrictMode";case ya:return"Suspense";case va:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case kh:return(e.displayName||"Context")+".Consumer";case Th:return(e._context.displayName||"Context")+".Provider";case bl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _l:return t=e.displayName||null,t!==null?t:wa(e.type)||"Memo";case It:t=e._payload,e=e._init;try{return wa(e(t))}catch{}}return null}function t0(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 wa(t);case 8:return t===Fl?"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 Xt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Lh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function n0(e){var t=Lh(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 Mi(e){e._valueTracker||(e._valueTracker=n0(e))}function Oh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Lh(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function hs(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 xa(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=Xt(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 Rh(e,t){t=t.checked,t!=null&&Il(e,"checked",t,!1)}function Sa(e,t){Rh(e,t);var n=Xt(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")?Pa(e,t.type,n):t.hasOwnProperty("defaultValue")&&Pa(e,t.type,Xt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function mc(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 Pa(e,t,n){(t!=="number"||hs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Or=Array.isArray;function Qn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Di.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Xr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var jr={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},r0=["Webkit","ms","Moz","O"];Object.keys(jr).forEach(function(e){r0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),jr[t]=jr[e]})});function Nh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||jr.hasOwnProperty(e)&&jr[e]?(""+t).trim():t+"px"}function jh(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Nh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var i0=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 ka(e,t){if(t){if(i0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(A(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(A(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(A(61))}if(t.style!=null&&typeof t.style!="object")throw Error(A(62))}}function Ea(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 La=null;function Bl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Oa=null,Yn=null,Xn=null;function vc(e){if(e=Pi(e)){if(typeof Oa!="function")throw Error(A(280));var t=e.stateNode;t&&(t=to(t),Oa(e.stateNode,e.type,t))}}function Vh(e){Yn?Xn?Xn.push(e):Xn=[e]:Yn=e}function Ih(){if(Yn){var e=Yn,t=Xn;if(Xn=Yn=null,vc(e),t)for(e=0;e>>=0,e===0?32:31-(m0(e)/g0|0)|0}var Ni=64,ji=4194304;function Rr(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 ys(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 l=o&~i;l!==0?r=Rr(l):(s&=o,s!==0&&(r=Rr(s)))}else o=n&~i,o!==0?r=Rr(o):s!==0&&(r=Rr(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;0n;n++)t.push(e);return t}function xi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-tt(t),e[t]=n}function x0(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=Ir),Lc=" ",Oc=!1;function np(e,t){switch(e){case"keyup":return Q0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Nn=!1;function X0(e,t){switch(e){case"compositionend":return rp(t);case"keypress":return t.which!==32?null:(Oc=!0,Lc);case"textInput":return e=t.data,e===Lc&&Oc?null:e;default:return null}}function q0(e,t){if(Nn)return e==="compositionend"||!Ql&&np(e,t)?(e=ep(),ts=Wl=Bt=null,Nn=!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)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=Dc(n)}}function ap(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ap(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function lp(){for(var e=window,t=hs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=hs(e.document)}return t}function Yl(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 ov(e){var t=lp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ap(n.ownerDocument.documentElement,n)){if(r!==null&&Yl(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=Nc(n,s);var o=Nc(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=document.documentMode,jn=null,ja=null,br=null,Va=!1;function jc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Va||jn==null||jn!==hs(r)||(r=jn,"selectionStart"in r&&Yl(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}),br&&ni(br,r)||(br=r,r=xs(ja,"onSelect"),0Fn||(e.current=za[Fn],za[Fn]=null,Fn--)}function G(e,t){Fn++,za[Fn]=e.current,e.current=t}var qt={},Ce=tn(qt),De=tn(!1),xn=qt;function nr(e,t){var n=e.type.contextTypes;if(!n)return qt;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 Ne(e){return e=e.childContextTypes,e!=null}function Ps(){Y(De),Y(Ce)}function zc(e,t,n){if(Ce.current!==qt)throw Error(A(168));G(Ce,t),G(De,n)}function yp(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(A(108,t0(e)||"Unknown",i));return re({},n,r)}function Cs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qt,xn=Ce.current,G(Ce,e),G(De,De.current),!0}function $c(e,t,n){var r=e.stateNode;if(!r)throw Error(A(169));n?(e=yp(e,t,xn),r.__reactInternalMemoizedMergedChildContext=e,Y(De),Y(Ce),G(Ce,e)):Y(De),G(De,n)}var mt=null,no=!1,Uo=!1;function vp(e){mt===null?mt=[e]:mt.push(e)}function vv(e){no=!0,vp(e)}function nn(){if(!Uo&&mt!==null){Uo=!0;var e=0,t=H;try{var n=mt;for(H=1;e>=o,i-=o,gt=1<<32-tt(t)+i|n<T?(V=R,R=null):V=R.sibling;var M=d(g,R,p[T],w);if(M===null){R===null&&(R=V);break}e&&R&&M.alternate===null&&t(g,R),h=s(M,h,T),C===null?P=M:C.sibling=M,C=M,R=V}if(T===p.length)return n(g,R),X&&ln(g,T),P;if(R===null){for(;TT?(V=R,R=null):V=R.sibling;var I=d(g,R,M.value,w);if(I===null){R===null&&(R=V);break}e&&R&&I.alternate===null&&t(g,R),h=s(I,h,T),C===null?P=I:C.sibling=I,C=I,R=V}if(M.done)return n(g,R),X&&ln(g,T),P;if(R===null){for(;!M.done;T++,M=p.next())M=f(g,M.value,w),M!==null&&(h=s(M,h,T),C===null?P=M:C.sibling=M,C=M);return X&&ln(g,T),P}for(R=r(g,R);!M.done;T++,M=p.next())M=m(R,g,T,M.value,w),M!==null&&(e&&M.alternate!==null&&R.delete(M.key===null?T:M.key),h=s(M,h,T),C===null?P=M:C.sibling=M,C=M);return e&&R.forEach(function(K){return t(g,K)}),X&&ln(g,T),P}function S(g,h,p,w){if(typeof p=="object"&&p!==null&&p.type===Dn&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Ai:e:{for(var P=p.key,C=h;C!==null;){if(C.key===P){if(P=p.type,P===Dn){if(C.tag===7){n(g,C.sibling),h=i(C,p.props.children),h.return=g,g=h;break e}}else if(C.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===It&&Wc(P)===C.type){n(g,C.sibling),h=i(C,p.props),h.ref=xr(g,C,p),h.return=g,g=h;break e}n(g,C);break}else t(g,C);C=C.sibling}p.type===Dn?(h=yn(p.props.children,g.mode,w,p.key),h.return=g,g=h):(w=us(p.type,p.key,p.props,null,g.mode,w),w.ref=xr(g,h,p),w.return=g,g=w)}return o(g);case Mn:e:{for(C=p.key;h!==null;){if(h.key===C)if(h.tag===4&&h.stateNode.containerInfo===p.containerInfo&&h.stateNode.implementation===p.implementation){n(g,h.sibling),h=i(h,p.children||[]),h.return=g,g=h;break e}else{n(g,h);break}else t(g,h);h=h.sibling}h=qo(p,g.mode,w),h.return=g,g=h}return o(g);case It:return C=p._init,S(g,h,C(p._payload),w)}if(Or(p))return y(g,h,p,w);if(mr(p))return v(g,h,p,w);zi(g,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,h!==null&&h.tag===6?(n(g,h.sibling),h=i(h,p),h.return=g,g=h):(n(g,h),h=Xo(p,g.mode,w),h.return=g,g=h),o(g)):n(g,h)}return S}var ir=Pp(!0),Cp=Pp(!1),Es=tn(null),Ls=null,Bn=null,Jl=null;function eu(){Jl=Bn=Ls=null}function tu(e){var t=Es.current;Y(Es),e._currentValue=t}function Ha(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Zn(e,t){Ls=e,Jl=Bn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Me=!0),e.firstContext=null)}function Qe(e){var t=e._currentValue;if(Jl!==e)if(e={context:e,memoizedValue:t,next:null},Bn===null){if(Ls===null)throw Error(A(308));Bn=e,Ls.dependencies={lanes:0,firstContext:e}}else Bn=Bn.next=e;return t}var hn=null;function nu(e){hn===null?hn=[e]:hn.push(e)}function Tp(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,nu(t)):(n.next=i.next,i.next=n),t.interleaved=n,Rt(e,r)}function Rt(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 Ft=!1;function ru(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function kp(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 wt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Kt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,z&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Rt(e,n)}return i=r.interleaved,i===null?(t.next=t,nu(r)):(t.next=i.next,i.next=t),r.interleaved=t,Rt(e,n)}function rs(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,$l(e,n)}}function Kc(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 Os(e,t,n,r){var i=e.updateQueue;Ft=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,u=a.next;a.next=null,o===null?s=u:o.next=u,o=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==o&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(s!==null){var f=i.baseState;o=0,c=u=a=null,l=s;do{var d=l.lane,m=l.eventTime;if((r&d)===d){c!==null&&(c=c.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,v=l;switch(d=t,m=n,v.tag){case 1:if(y=v.payload,typeof y=="function"){f=y.call(m,f,d);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=v.payload,d=typeof y=="function"?y.call(m,f,d):y,d==null)break e;f=re({},f,d);break e;case 2:Ft=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[l]:d.push(l))}else m={eventTime:m,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=m,a=f):c=c.next=m,o|=d;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;d=l,l=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(c===null&&(a=f),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,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);Cn|=o,e.lanes=o,e.memoizedState=f}}function Gc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Wo.transition;Wo.transition={};try{e(!1),t()}finally{H=n,Wo.transition=r}}function $p(){return Ye().memoizedState}function Pv(e,t,n){var r=Qt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Up(e))Hp(t,n);else if(n=Tp(e,t,n,r),n!==null){var i=Le();nt(n,e,r,i),Wp(n,t,r)}}function Cv(e,t,n){var r=Qt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Up(e))Hp(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,l=s(o,n);if(i.hasEagerState=!0,i.eagerState=l,rt(l,o)){var a=t.interleaved;a===null?(i.next=i,nu(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=Tp(e,t,i,r),n!==null&&(i=Le(),nt(n,e,r,i),Wp(n,t,r))}}function Up(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function Hp(e,t){_r=As=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Wp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$l(e,n)}}var Ms={readContext:Qe,useCallback:ye,useContext:ye,useEffect:ye,useImperativeHandle:ye,useInsertionEffect:ye,useLayoutEffect:ye,useMemo:ye,useReducer:ye,useRef:ye,useState:ye,useDebugValue:ye,useDeferredValue:ye,useTransition:ye,useMutableSource:ye,useSyncExternalStore:ye,useId:ye,unstable_isNewReconciler:!1},Tv={readContext:Qe,useCallback:function(e,t){return st().memoizedState=[e,t===void 0?null:t],e},useContext:Qe,useEffect:Yc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ss(4194308,4,Fp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){return ss(4,2,e,t)},useMemo:function(e,t){var n=st();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=st();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=Pv.bind(null,ne,e),[r.memoizedState,e]},useRef:function(e){var t=st();return e={current:e},t.memoizedState=e},useState:Qc,useDebugValue:fu,useDeferredValue:function(e){return st().memoizedState=e},useTransition:function(){var e=Qc(!1),t=e[0];return e=Sv.bind(null,e[1]),st().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ne,i=st();if(X){if(n===void 0)throw Error(A(407));n=n()}else{if(n=t(),de===null)throw Error(A(349));Pn&30||Rp(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Yc(Mp.bind(null,r,s,e),[e]),r.flags|=2048,ci(9,Ap.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=st(),t=de.identifierPrefix;if(X){var n=yt,r=gt;n=(r&~(1<<32-tt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=li++,0<\/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[ot]=t,e[si]=r,tm(e,t,!1,!1),t.stateNode=e;e:{switch(o=Ea(n,r),n){case"dialog":Q("cancel",e),Q("close",e),i=r;break;case"iframe":case"object":case"embed":Q("load",e),i=r;break;case"video":case"audio":for(i=0;iar&&(t.flags|=128,r=!0,Sr(s,!1),t.lanes=4194304)}else{if(!r)if(e=Rs(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Sr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!X)return ve(t),null}else 2*oe()-s.renderingStartTime>ar&&n!==1073741824&&(t.flags|=128,r=!0,Sr(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=oe(),t.sibling=null,n=ee.current,G(ee,r?n&1|2:n&1),t):(ve(t),null);case 22:case 23:return yu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ve&1073741824&&(ve(t),t.subtreeFlags&6&&(t.flags|=8192)):ve(t),null;case 24:return null;case 25:return null}throw Error(A(156,t.tag))}function Dv(e,t){switch(ql(t),t.tag){case 1:return Ne(t.type)&&Ps(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return sr(),Y(De),Y(Ce),ou(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return su(t),null;case 13:if(Y(ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(A(340));rr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(ee),null;case 4:return sr(),null;case 10:return tu(t.type._context),null;case 22:case 23:return yu(),null;case 24:return null;default:return null}}var Ui=!1,xe=!1,Nv=typeof WeakSet=="function"?WeakSet:Set,j=null;function zn(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 Ja(e,t,n){try{n()}catch(r){ie(e,t,r)}}var af=!1;function jv(e,t){if(Ia=vs,e=lp(),Yl(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,l=-1,a=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(l=o+i),f!==s||r!==0&&f.nodeType!==3||(a=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(m=f.firstChild)!==null;)d=f,f=m;for(;;){if(f===e)break t;if(d===n&&++u===i&&(l=o),d===s&&++c===r&&(a=o),(m=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=m}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Fa={focusedElem:e,selectionRange:n},vs=!1,j=t;j!==null;)if(t=j,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,j=e;else for(;j!==null;){t=j;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var v=y.memoizedProps,S=y.memoizedState,g=t.stateNode,h=g.getSnapshotBeforeUpdate(t.elementType===t.type?v:qe(t.type,v),S);g.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(A(163))}}catch(w){ie(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,j=e;break}j=t.return}return y=af,af=!1,y}function Br(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&&Ja(t,n,s)}i=i.next}while(i!==r)}}function so(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 el(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 im(e){var t=e.alternate;t!==null&&(e.alternate=null,im(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ot],delete t[si],delete t[Ba],delete t[gv],delete t[yv])),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 sm(e){return e.tag===5||e.tag===3||e.tag===4}function lf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||sm(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 tl(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=Ss));else if(r!==4&&(e=e.child,e!==null))for(tl(e,t,n),e=e.sibling;e!==null;)tl(e,t,n),e=e.sibling}function nl(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(nl(e,t,n),e=e.sibling;e!==null;)nl(e,t,n),e=e.sibling}var he=null,Ze=!1;function jt(e,t,n){for(n=n.child;n!==null;)om(e,t,n),n=n.sibling}function om(e,t,n){if(ct&&typeof ct.onCommitFiberUnmount=="function")try{ct.onCommitFiberUnmount(qs,n)}catch{}switch(n.tag){case 5:xe||zn(n,t);case 6:var r=he,i=Ze;he=null,jt(e,t,n),he=r,Ze=i,he!==null&&(Ze?(e=he,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):he.removeChild(n.stateNode));break;case 18:he!==null&&(Ze?(e=he,n=n.stateNode,e.nodeType===8?$o(e.parentNode,n):e.nodeType===1&&$o(e,n),ei(e)):$o(he,n.stateNode));break;case 4:r=he,i=Ze,he=n.stateNode.containerInfo,Ze=!0,jt(e,t,n),he=r,Ze=i;break;case 0:case 11:case 14:case 15:if(!xe&&(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)&&Ja(n,t,o),i=i.next}while(i!==r)}jt(e,t,n);break;case 1:if(!xe&&(zn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ie(n,t,l)}jt(e,t,n);break;case 21:jt(e,t,n);break;case 22:n.mode&1?(xe=(r=xe)||n.memoizedState!==null,jt(e,t,n),xe=r):jt(e,t,n);break;default:jt(e,t,n)}}function uf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Nv),t.forEach(function(r){var i=Uv.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Xe(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~s}if(r=i,r=oe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Iv(r/1960))-r,10e?16:e,zt===null)var r=!1;else{if(e=zt,zt=null,js=0,z&6)throw Error(A(331));var i=z;for(z|=4,j=e.current;j!==null;){var s=j,o=s.child;if(j.flags&16){var l=s.deletions;if(l!==null){for(var a=0;aoe()-mu?gn(e,0):pu|=n),je(e,t)}function pm(e,t){t===0&&(e.mode&1?(t=ji,ji<<=1,!(ji&130023424)&&(ji=4194304)):t=1);var n=Le();e=Rt(e,t),e!==null&&(xi(e,t,n),je(e,n))}function $v(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),pm(e,n)}function Uv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(A(314))}r!==null&&r.delete(t),pm(e,n)}var mm;mm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||De.current)Me=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Me=!1,Av(e,t,n);Me=!!(e.flags&131072)}else Me=!1,X&&t.flags&1048576&&wp(t,ks,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;os(e,t),e=t.pendingProps;var i=nr(t,Ce.current);Zn(t,n),i=lu(null,t,r,e,i,n);var s=uu();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,Ne(r)?(s=!0,Cs(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ru(t),i.updater=io,t.stateNode=i,i._reactInternals=t,Ka(t,r,e,n),t=Ya(null,t,r,!0,s,n)):(t.tag=0,X&&s&&Xl(t),Ee(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(os(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Wv(r),e=qe(r,e),i){case 0:t=Qa(null,t,r,e,n);break e;case 1:t=rf(null,t,r,e,n);break e;case 11:t=tf(null,t,r,e,n);break e;case 14:t=nf(null,t,r,qe(r.type,e),n);break e}throw Error(A(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qe(r,i),Qa(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qe(r,i),rf(e,t,r,i,n);case 3:e:{if(Zp(t),e===null)throw Error(A(387));r=t.pendingProps,s=t.memoizedState,i=s.element,kp(e,t),Os(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=or(Error(A(423)),t),t=sf(e,t,r,n,i);break e}else if(r!==i){i=or(Error(A(424)),t),t=sf(e,t,r,n,i);break e}else for(Ie=Wt(t.stateNode.containerInfo.firstChild),Fe=t,X=!0,Je=null,n=Cp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(rr(),r===i){t=At(e,t,n);break e}Ee(e,t,r,n)}t=t.child}return t;case 5:return Ep(t),e===null&&Ua(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,ba(r,i)?o=null:s!==null&&ba(r,s)&&(t.flags|=32),qp(e,t),Ee(e,t,o,n),t.child;case 6:return e===null&&Ua(t),null;case 13:return Jp(e,t,n);case 4:return iu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ir(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:qe(r,i),tf(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,G(Es,r._currentValue),r._currentValue=o,s!==null)if(rt(s.value,o)){if(s.children===i.children&&!De.current){t=At(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(s.tag===1){a=wt(-1,n&-n),a.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Ha(s.return,n,t),l.lanes|=n;break}a=a.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(A(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Ha(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,Zn(t,n),i=Qe(i),r=r(i),t.flags|=1,Ee(e,t,r,n),t.child;case 14:return r=t.type,i=qe(r,t.pendingProps),i=qe(r.type,i),nf(e,t,r,i,n);case 15:return Yp(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qe(r,i),os(e,t),t.tag=1,Ne(r)?(e=!0,Cs(t)):e=!1,Zn(t,n),Kp(t,r,i),Ka(t,r,i,n),Ya(null,t,r,!0,e,n);case 19:return em(e,t,n);case 22:return Xp(e,t,n)}throw Error(A(156,t.tag))};function gm(e,t){return Uh(e,t)}function Hv(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 Ke(e,t,n,r){return new Hv(e,t,n,r)}function wu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wv(e){if(typeof e=="function")return wu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===bl)return 11;if(e===_l)return 14}return 2}function Yt(e,t){var n=e.alternate;return n===null?(n=Ke(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 us(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")wu(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Dn:return yn(n.children,i,s,t);case Fl:o=8,i|=8;break;case ga:return e=Ke(12,n,t,i|2),e.elementType=ga,e.lanes=s,e;case ya:return e=Ke(13,n,t,i),e.elementType=ya,e.lanes=s,e;case va:return e=Ke(19,n,t,i),e.elementType=va,e.lanes=s,e;case Eh:return ao(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Th:o=10;break e;case kh:o=9;break e;case bl:o=11;break e;case _l:o=14;break e;case It:o=16,r=null;break e}throw Error(A(130,e==null?e:typeof e,""))}return t=Ke(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function yn(e,t,n,r){return e=Ke(7,e,r,t),e.lanes=n,e}function ao(e,t,n,r){return e=Ke(22,e,r,t),e.elementType=Eh,e.lanes=n,e.stateNode={isHidden:!1},e}function Xo(e,t,n){return e=Ke(6,e,null,t),e.lanes=n,e}function qo(e,t,n){return t=Ke(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Kv(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=Mo(0),this.expirationTimes=Mo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mo(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function xu(e,t,n,r,i,s,o,l,a){return e=new Kv(e,t,n,l,a),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Ke(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ru(s),e}function Gv(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(xm)}catch(e){console.error(e)}}xm(),xh.exports=Be;var Zv=xh.exports,Sm,yf=Zv;Sm=yf.createRoot,yf.hydrateRoot;const Jv=(...e)=>{console!=null&&console.warn&&(vn(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e))},vf={},al=(...e)=>{vn(e[0])&&vf[e[0]]||(vn(e[0])&&(vf[e[0]]=new Date),Jv(...e))},Pm=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},wf=(e,t,n)=>{e.loadNamespaces(t,Pm(e,n))},xf=(e,t,n,r)=>{vn(n)&&(n=[n]),n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,Pm(e,r))},e1=(e,t,n={})=>!t.languages||!t.languages.length?(al("i18n.languages were undefined or empty",t.languages),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,i)=>{var s;if(((s=n.bindI18n)==null?void 0:s.indexOf("languageChanging"))>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,e))return!1}}),vn=e=>typeof e=="string",t1=e=>typeof e=="object"&&e!==null,n1=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,r1={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},i1=e=>r1[e],s1=e=>e.replace(n1,i1);let ll={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:s1};const o1=(e={})=>{ll={...ll,...e}},a1=()=>ll;let Cm;const l1=e=>{Cm=e},u1=()=>Cm,c1={type:"3rdParty",init(e){o1(e.options.react),l1(e)}},f1=L.createContext();class d1{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{var r;(r=this.usedNamespaces)[n]??(r[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const h1=(e,t)=>{const n=L.useRef();return L.useEffect(()=>{n.current=e},[e,t]),n.current},Tm=(e,t,n,r)=>e.getFixedT(t,n,r),p1=(e,t,n,r)=>L.useCallback(Tm(e,t,n,r),[e,t,n,r]),Nt=(e,t={})=>{var w,P,C,R;const{i18n:n}=t,{i18n:r,defaultNS:i}=L.useContext(f1)||{},s=n||r||u1();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new d1),!s){al("You will need to pass in an i18next instance by using initReactI18next");const T=(M,I)=>vn(I)?I:t1(I)&&vn(I.defaultValue)?I.defaultValue:Array.isArray(M)?M[M.length-1]:M,V=[T,{},!1];return V.t=T,V.i18n={},V.ready=!1,V}(w=s.options.react)!=null&&w.wait&&al("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...a1(),...s.options.react,...t},{useSuspense:l,keyPrefix:a}=o;let u=i||((P=s.options)==null?void 0:P.defaultNS);u=vn(u)?[u]:u||["translation"],(R=(C=s.reportNamespaces).addUsedNamespaces)==null||R.call(C,u);const c=(s.isInitialized||s.initializedStoreOnce)&&u.every(T=>e1(T,s,o)),f=p1(s,t.lng||null,o.nsMode==="fallback"?u:u[0],a),d=()=>f,m=()=>Tm(s,t.lng||null,o.nsMode==="fallback"?u:u[0],a),[y,v]=L.useState(d);let S=u.join();t.lng&&(S=`${t.lng}${S}`);const g=h1(S),h=L.useRef(!0);L.useEffect(()=>{const{bindI18n:T,bindI18nStore:V}=o;h.current=!0,!c&&!l&&(t.lng?xf(s,t.lng,u,()=>{h.current&&v(m)}):wf(s,u,()=>{h.current&&v(m)})),c&&g&&g!==S&&h.current&&v(m);const M=()=>{h.current&&v(m)};return T&&(s==null||s.on(T,M)),V&&(s==null||s.store.on(V,M)),()=>{h.current=!1,s&&(T==null||T.split(" ").forEach(I=>s.off(I,M))),V&&s&&V.split(" ").forEach(I=>s.store.off(I,M))}},[s,S]),L.useEffect(()=>{h.current&&c&&v(d)},[s,a,c]);const p=[y,s,c];if(p.t=y,p.i18n=s,p.ready=c,c||!c&&!l)return p;throw new Promise(T=>{t.lng?xf(s,t.lng,u,()=>T()):wf(s,u,()=>T())})};function m1(){const[e,t]=L.useState(window.innerHeight>window.innerWidth);return L.useEffect(()=>{const n=()=>{t(window.innerHeight>window.innerWidth)};return window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[]),e}const Fs=[{id:1,name:"Bitcoin",image:"1.png",eigenschaften:{eigenschaft1:2009,eigenschaft2:5,eigenschaft3:3,eigenschaft4:5,eigenschaft5:5}},{id:2,name:"Ether",image:"2.png",eigenschaften:{eigenschaft1:2015,eigenschaft2:2,eigenschaft3:2,eigenschaft4:5,eigenschaft5:5}},{id:3,name:"Euro",image:"3.png",eigenschaften:{eigenschaft1:2002,eigenschaft2:1,eigenschaft3:2,eigenschaft4:4,eigenschaft5:4}},{id:4,name:"Monero",image:"4.png",eigenschaften:{eigenschaft1:2014,eigenschaft2:2,eigenschaft3:2,eigenschaft4:5,eigenschaft5:5}},{id:5,name:"Gold",image:"5.png",eigenschaften:{eigenschaft1:-6e3,eigenschaft2:4,eigenschaft3:5,eigenschaft4:3,eigenschaft5:3}},{id:6,name:"Silber",image:"6.png",eigenschaften:{eigenschaft1:-5e3,eigenschaft2:3,eigenschaft3:4,eigenschaft4:3,eigenschaft5:3}},{id:7,name:"Kupfer",image:"7.png",eigenschaften:{eigenschaft1:-8e3,eigenschaft2:2,eigenschaft3:4,eigenschaft4:3,eigenschaft5:2}},{id:8,name:"Dollar",image:"8.png",eigenschaften:{eigenschaft1:1785,eigenschaft2:1,eigenschaft3:3,eigenschaft4:4,eigenschaft5:4}},{id:9,name:"Yen",image:"9.png",eigenschaften:{eigenschaft1:1870,eigenschaft2:1,eigenschaft3:3,eigenschaft4:4,eigenschaft5:4}},{id:10,name:"Wampum",image:"10.png",eigenschaften:{eigenschaft1:1700,eigenschaft2:2,eigenschaft3:1,eigenschaft4:2,eigenschaft5:2}},{id:11,name:"Tabak",image:"11.png",eigenschaften:{eigenschaft1:1619,eigenschaft2:2,eigenschaft3:1,eigenschaft4:3,eigenschaft5:2}},{id:12,name:"Zähne",image:"12.png",eigenschaften:{eigenschaft1:-1e4,eigenschaft2:2,eigenschaft3:2,eigenschaft4:2,eigenschaft5:2}},{id:13,name:"Salz",image:"13.png",eigenschaften:{eigenschaft1:-1e4,eigenschaft2:2,eigenschaft3:2,eigenschaft4:3,eigenschaft5:2}},{id:14,name:"Renminbi",image:"14.png",eigenschaften:{eigenschaft1:1948,eigenschaft2:1,eigenschaft3:2,eigenschaft4:4,eigenschaft5:4}},{id:15,name:"Reichsmark",image:"15.png",eigenschaften:{eigenschaft1:1924,eigenschaft2:1,eigenschaft3:1,eigenschaft4:3,eigenschaft5:3}},{id:16,name:"Rai-Steine",image:"16.png",eigenschaften:{eigenschaft1:1200,eigenschaft2:3,eigenschaft3:2,eigenschaft4:1,eigenschaft5:1}},{id:17,name:"Pfund",image:"17.png",eigenschaften:{eigenschaft1:800,eigenschaft2:1,eigenschaft3:4,eigenschaft4:4,eigenschaft5:4}},{id:18,name:"Schmuck",image:"18.png",eigenschaften:{eigenschaft1:-2e3,eigenschaft2:4,eigenschaft3:4,eigenschaft4:2,eigenschaft5:3}},{id:19,name:"Getreide",image:"19.png",eigenschaften:{eigenschaft1:-3e3,eigenschaft2:2,eigenschaft3:1,eigenschaft4:3,eigenschaft5:2}},{id:20,name:"Perlen",image:"20.png",eigenschaften:{eigenschaft1:-2500,eigenschaft2:2,eigenschaft3:2,eigenschaft4:2,eigenschaft5:2}},{id:21,name:"Florin",image:"21.png",eigenschaften:{eigenschaft1:1252,eigenschaft2:4,eigenschaft3:5,eigenschaft4:3,eigenschaft5:3}},{id:22,name:"Denar",image:"22.png",eigenschaften:{eigenschaft1:-200,eigenschaft2:2,eigenschaft3:1,eigenschaft4:2,eigenschaft5:3}},{id:23,name:"Vieh",image:"23.png",eigenschaften:{eigenschaft1:-1e4,eigenschaft2:2,eigenschaft3:1,eigenschaft4:1,eigenschaft5:2}},{id:24,name:"Muscheln",image:"24.png",eigenschaften:{eigenschaft1:-2e3,eigenschaft2:2,eigenschaft3:1,eigenschaft4:2,eigenschaft5:2}},{id:25,name:"Kakao",image:"25.png",eigenschaften:{eigenschaft1:-3e3,eigenschaft2:2,eigenschaft3:1,eigenschaft4:3,eigenschaft5:2}},{id:26,name:"Aggry-Perlen",image:"26.png",eigenschaften:{eigenschaft1:2e3,eigenschaft2:3,eigenschaft3:2,eigenschaft4:2,eigenschaft5:2}}];function g1(e){for(let t=e.length-1;t>0;t--){const n=Math.floor(Math.random()*(t+1));[e[t],e[n]]=[e[n],e[t]]}return e}const y1=()=>{const e=g1([...Fs]),t=Math.floor(e.length/2),n=e.slice(0,t),r=e.slice(t);return{playerCards:n,computerCards:r}},v1=()=>{const[e,t]=L.useState([]),[n,r]=L.useState([]),[i,s]=L.useState(!1);return L.useEffect(()=>{const{playerCards:o,computerCards:l}=y1();t(o),r(l),s(!0)},[]),{playerCards:e,computerCards:n,gameInitialized:i,setPlayerCards:t,setComputerCards:r,setGameInitialized:s}};function w1(e,t,n,r,i,s,o){const l=t.eigenschaften[e],a=n.eigenschaften[e];let u;o.includes(e)?u=la;let c,f=[...r],d=[...i],m=[...s];return u?(c="Player",f=[...r.slice(1),t,n,...s],d=i.slice(1),m=[]):!u&&l!==a?(c="Computer",d=[...i.slice(1),n,t,...s],f=r.slice(1),m=[]):(c="Tie",m=[...s,t,n],f=r.slice(1),d=i.slice(1)),{winner:c,playerValue:l,computerValue:a,updatedPlayerCards:f,updatedComputerCards:d,updatedDrawPile:m}}const x1=e=>{let t=-1/0,n="eigenschaft1";return["eigenschaft2","eigenschaft3","eigenschaft4","eigenschaft5"].every(i=>e.eigenschaften[i]<4)?"eigenschaft1":(["eigenschaft2","eigenschaft3","eigenschaft4","eigenschaft5"].forEach(i=>{e.eigenschaften[i]>t&&(t=e.eigenschaften[i],n=i)}),n)},S1=["eigenschaft1"],P1=(e,t,n,r)=>{const[i,s]=L.useState([]),[o,l]=L.useState(null),[a,u]=L.useState(null),[c,f]=L.useState(null),[d,m]=L.useState(!1),[y,v]=L.useState(!1),[S,g]=L.useState(!0),[h,p]=L.useState(null),[w,P]=L.useState(!1),[C,R]=L.useState({selectedProperty:null,playerValue:null,computerValue:null});L.useEffect(()=>{e.length>0&&t.length>0&&(l(e[0]),u(t[0]))},[e,t]),L.useEffect(()=>{(e.length>0||t.length>0)&&!y&&(e.length===0?(v(!0),f("Computer")):t.length===0&&(v(!0),f("Player")))},[e,t,y]),L.useEffect(()=>{if(c){P(!0);const M=setTimeout(()=>{P(!1)},5e3);return()=>clearTimeout(M)}},[c]);const T=M=>{!o||!a||(g(!1),m(!1),setTimeout(()=>{const I=w1(M,o,a,e,t,i,S1);R({selectedProperty:M,playerValue:I.playerValue,computerValue:I.computerValue}),I.winner==="Player"?(f("Player"),p("left"),P(!0),setTimeout(()=>{n(I.updatedPlayerCards),r(I.updatedComputerCards),s(I.updatedDrawPile),g(!0),m(!1),p(null),P(!1)},2e3)):I.winner==="Computer"?(f("Computer"),p("right"),P(!0),setTimeout(()=>{r(I.updatedComputerCards),n(I.updatedPlayerCards),s(I.updatedDrawPile),g(!0),p(null),m(!0),P(!1)},2e3)):(f("Tie"),p("up"),P(!0),setTimeout(()=>{s(I.updatedDrawPile),n(I.updatedPlayerCards),r(I.updatedComputerCards),g(!0),p(null),P(!1),d&&m(!0)},2e3))},3e3))};return{drawPile:i,currentPlayerCard:o,currentComputerCard:a,winner:c,isComputerTurn:d,gameOver:y,isComputerCardFlipped:S,animationDirection:h,showWinnerMessage:w,lastRoundDetails:C,handlePropertySelect:T,handleComputerTurn:()=>{if(a){const M=x1(a);T(M)}}}};function C1(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}function di(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const ul=e=>Array.isArray(e);function km(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Tu(e,t,n,r){if(typeof t=="function"){const[i,s]=Sf(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=Sf(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function ho(e,t,n){const r=e.getProps();return Tu(r,t,n!==void 0?n:r.custom,e)}const ku=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Eu=["initial",...ku],Ti=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],rn=new Set(Ti),xt=e=>e*1e3,St=e=>e/1e3,T1={type:"spring",stiffness:500,damping:25,restSpeed:10},k1=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),E1={type:"keyframes",duration:.8},L1={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},O1=(e,{keyframes:t})=>t.length>2?E1:rn.has(e)?e.startsWith("scale")?k1(t[1]):T1:L1;function R1({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:l,from:a,elapsed:u,...c}){return!!Object.keys(c).length}function Lu(e,t){return e[t]||e.default||e}const A1={skipAnimations:!1,useManualTiming:!1},M1=e=>e!==null;function po(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(M1),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const Pe=e=>e;function D1(e){let t=new Set,n=new Set,r=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function l(u){s.has(u)&&(a.schedule(u),e()),u(o)}const a={schedule:(u,c=!1,f=!1)=>{const m=f&&r?t:n;return c&&s.add(u),m.has(u)||m.add(u),u},cancel:u=>{n.delete(u),s.delete(u)},process:u=>{if(o=u,r){i=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(l),r=!1,i&&(i=!1,a.process(u))}};return a}const Ki=["read","resolveKeyframes","update","preRender","render","postRender"],N1=40;function Em(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Ki.reduce((g,h)=>(g[h]=D1(s),g),{}),{read:l,resolveKeyframes:a,update:u,preRender:c,render:f,postRender:d}=o,m=()=>{const g=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(g-i.timestamp,N1),1),i.timestamp=g,i.isProcessing=!0,l.process(i),a.process(i),u.process(i),c.process(i),f.process(i),d.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))},y=()=>{n=!0,r=!0,i.isProcessing||e(m)};return{schedule:Ki.reduce((g,h)=>{const p=o[h];return g[h]=(w,P=!1,C=!1)=>(n||y(),p.schedule(w,P,C)),g},{}),cancel:g=>{for(let h=0;h/^0[^.\s]+$/u.test(e);function j1(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Lm(e):!0}let cl=Pe;const Om=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Rm=e=>t=>typeof t=="string"&&t.startsWith(e),Am=Rm("--"),V1=Rm("var(--"),Ou=e=>V1(e)?I1.test(e.split("/*")[0].trim()):!1,I1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,F1=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function b1(e){const t=F1.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Mm(e,t,n=1){const[r,i]=b1(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return Om(o)?parseFloat(o):o}return Ou(i)?Mm(i,t,n+1):i}const Zt=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Ur={...pr,transform:e=>Zt(0,1,e)},Gi={...pr,default:1},Hr=e=>Math.round(e*1e5)/1e5,Ru=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,_1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,B1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function ki(e){return typeof e=="string"}function z1(e){return e==null}const Ei=e=>({test:t=>ki(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Vt=Ei("deg"),dt=Ei("%"),_=Ei("px"),$1=Ei("vh"),U1=Ei("vw"),Pf={...dt,parse:e=>dt.parse(e)/100,transform:e=>dt.transform(e*100)},H1=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Cf=e=>e===pr||e===_,Tf=(e,t)=>parseFloat(e.split(", ")[t]),kf=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return Tf(i[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?Tf(s[1],e):0}},W1=new Set(["x","y","z"]),K1=Ti.filter(e=>!W1.has(e));function G1(e){const t=[];return K1.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const lr={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:kf(4,13),y:kf(5,14)};lr.translateX=lr.x;lr.translateY=lr.y;const Dm=e=>t=>t.test(e),Q1={test:e=>e==="auto",parse:e=>e},Nm=[pr,_,dt,Vt,U1,$1,Q1],Ef=e=>Nm.find(Dm(e)),wn=new Set;let fl=!1,dl=!1;function jm(){if(dl){const e=Array.from(wn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=G1(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var l;(l=r.getValue(s))===null||l===void 0||l.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}dl=!1,fl=!1,wn.forEach(e=>e.complete()),wn.clear()}function Vm(){wn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(dl=!0)})}function Y1(){Vm(),jm()}class Au{constructor(t,n,r,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(wn.add(this),fl||(fl=!0,U.read(Vm),U.resolveKeyframes(jm))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let s=0;sn=>!!(ki(n)&&B1.test(n)&&n.startsWith(e)||t&&!z1(n)&&Object.prototype.hasOwnProperty.call(n,t)),Im=(e,t,n)=>r=>{if(!ki(r))return r;const[i,s,o,l]=r.match(Ru);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},X1=e=>Zt(0,255,e),Jo={...pr,transform:e=>Math.round(X1(e))},mn={test:Mu("rgb","red"),parse:Im("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Jo.transform(e)+", "+Jo.transform(t)+", "+Jo.transform(n)+", "+Hr(Ur.transform(r))+")"};function q1(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 hl={test:Mu("#"),parse:q1,transform:mn.transform},Un={test:Mu("hsl","hue"),parse:Im("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+dt.transform(Hr(t))+", "+dt.transform(Hr(n))+", "+Hr(Ur.transform(r))+")"},we={test:e=>mn.test(e)||hl.test(e)||Un.test(e),parse:e=>mn.test(e)?mn.parse(e):Un.test(e)?Un.parse(e):hl.parse(e),transform:e=>ki(e)?e:e.hasOwnProperty("red")?mn.transform(e):Un.transform(e)};function Z1(e){var t,n;return isNaN(e)&&ki(e)&&(((t=e.match(Ru))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(_1))===null||n===void 0?void 0:n.length)||0)>0}const Fm="number",bm="color",J1="var",ew="var(",Lf="${}",tw=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function pi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const l=t.replace(tw,a=>(we.test(a)?(r.color.push(s),i.push(bm),n.push(we.parse(a))):a.startsWith(ew)?(r.var.push(s),i.push(J1),n.push(a)):(r.number.push(s),i.push(Fm),n.push(parseFloat(a))),++s,Lf)).split(Lf);return{values:n,split:l,indexes:r,types:i}}function _m(e){return pi(e).values}function Bm(e){const{split:t,types:n}=pi(e),r=t.length;return i=>{let s="";for(let o=0;otypeof e=="number"?0:e;function rw(e){const t=_m(e);return Bm(e)(t.map(nw))}const Jt={test:Z1,parse:_m,createTransformer:Bm,getAnimatableNone:rw},iw=new Set(["brightness","contrast","saturate","opacity"]);function sw(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Ru)||[];if(!r)return e;const i=n.replace(r,"");let s=iw.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const ow=/\b([a-z-]*)\(.*?\)/gu,pl={...Jt,getAnimatableNone:e=>{const t=e.match(ow);return t?t.map(sw).join(" "):e}},Of={...pr,transform:Math.round},Du={borderWidth:_,borderTopWidth:_,borderRightWidth:_,borderBottomWidth:_,borderLeftWidth:_,borderRadius:_,radius:_,borderTopLeftRadius:_,borderTopRightRadius:_,borderBottomRightRadius:_,borderBottomLeftRadius:_,width:_,maxWidth:_,height:_,maxHeight:_,size:_,top:_,right:_,bottom:_,left:_,padding:_,paddingTop:_,paddingRight:_,paddingBottom:_,paddingLeft:_,margin:_,marginTop:_,marginRight:_,marginBottom:_,marginLeft:_,rotate:Vt,rotateX:Vt,rotateY:Vt,rotateZ:Vt,scale:Gi,scaleX:Gi,scaleY:Gi,scaleZ:Gi,skew:Vt,skewX:Vt,skewY:Vt,distance:_,translateX:_,translateY:_,translateZ:_,x:_,y:_,z:_,perspective:_,transformPerspective:_,opacity:Ur,originX:Pf,originY:Pf,originZ:_,zIndex:Of,backgroundPositionX:_,backgroundPositionY:_,fillOpacity:Ur,strokeOpacity:Ur,numOctaves:Of},aw={...Du,color:we,backgroundColor:we,outlineColor:we,fill:we,stroke:we,borderColor:we,borderTopColor:we,borderRightColor:we,borderBottomColor:we,borderLeftColor:we,filter:pl,WebkitFilter:pl},Nu=e=>aw[e];function zm(e,t){let n=Nu(e);return n!==pl&&(n=Jt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const lw=new Set(["auto","none","0"]);function uw(e,t,n){let r=0,i;for(;r{n.getValue(a).set(u)}),this.resolveNoneKeyframes()}}function Um(e){let t;return()=>(t===void 0&&(t=e()),t)}let cs;function cw(){cs=void 0}const Pt={now:()=>(cs===void 0&&Pt.set(pe.isProcessing||A1.useManualTiming?pe.timestamp:performance.now()),cs),set:e=>{cs=e,queueMicrotask(cw)}},Rf=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Jt.test(e)||e==="0")&&!e.startsWith("url("));function fw(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nhw?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Y1(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Pt.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:l,onUpdate:a,isGenerator:u}=this.options;if(!u&&!dw(t,r,i,s))if(o)this.options.duration=0;else{a==null||a(po(t,this.options,n)),l==null||l(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function Wm(e,t){return t?e*(1e3/t):0}const pw=5;function Km(e,t,n){const r=Math.max(t-pw,0);return Wm(n-e(r),t-r)}const ea=.001,mw=.01,gw=10,yw=.05,vw=1;function ww({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,s,o=1-t;o=Zt(yw,vw,o),e=Zt(mw,gw,St(e)),o<1?(i=u=>{const c=u*o,f=c*e,d=c-n,m=ml(u,o),y=Math.exp(-f);return ea-d/m*y},s=u=>{const f=u*o*e,d=f*n+n,m=Math.pow(o,2)*Math.pow(u,2)*e,y=Math.exp(-f),v=ml(Math.pow(u,2),o);return(-i(u)+ea>0?-1:1)*((d-m)*y)/v}):(i=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-ea+c*f},s=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const l=5/e,a=Sw(i,s,l);if(e=xt(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(a,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const xw=12;function Sw(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function Tw(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Af(e,Cw)&&Af(e,Pw)){const n=ww(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function Gm({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],s=e[e.length-1],o={done:!1,value:i},{stiffness:l,damping:a,mass:u,duration:c,velocity:f,isResolvedFromDuration:d}=Tw({...r,velocity:-St(r.velocity||0)}),m=f||0,y=a/(2*Math.sqrt(l*u)),v=s-i,S=St(Math.sqrt(l/u)),g=Math.abs(v)<5;n||(n=g?.01:2),t||(t=g?.005:.5);let h;if(y<1){const p=ml(S,y);h=w=>{const P=Math.exp(-y*S*w);return s-P*((m+y*S*v)/p*Math.sin(p*w)+v*Math.cos(p*w))}}else if(y===1)h=p=>s-Math.exp(-S*p)*(v+(m+S*v)*p);else{const p=S*Math.sqrt(y*y-1);h=w=>{const P=Math.exp(-y*S*w),C=Math.min(p*w,300);return s-P*((m+y*S*v)*Math.sinh(C)+p*v*Math.cosh(C))/p}}return{calculatedDuration:d&&c||null,next:p=>{const w=h(p);if(d)o.done=p>=c;else{let P=0;y<1&&(P=p===0?xt(m):Km(h,p,w));const C=Math.abs(P)<=n,R=Math.abs(s-w)<=t;o.done=C&&R}return o.value=o.done?s:w,o}}}function Mf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:l,max:a,restDelta:u=.5,restSpeed:c}){const f=e[0],d={done:!1,value:f},m=T=>l!==void 0&&Ta,y=T=>l===void 0?a:a===void 0||Math.abs(l-T)-v*Math.exp(-T/r),p=T=>g+h(T),w=T=>{const V=h(T),M=p(T);d.done=Math.abs(V)<=u,d.value=d.done?g:M};let P,C;const R=T=>{m(d.value)&&(P=T,C=Gm({keyframes:[d.value,y(d.value)],velocity:Km(p,T,d.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return R(0),{calculatedDuration:null,next:T=>{let V=!1;return!C&&P===void 0&&(V=!0,w(T),R(T)),P!==void 0&&T>=P?C.next(T-P):(!V&&w(T),d)}}}const Qm=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,kw=1e-7,Ew=12;function Lw(e,t,n,r,i){let s,o,l=0;do o=t+(n-t)/2,s=Qm(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>kw&&++lLw(s,0,1,e,n);return s=>s===0||s===1?s:Qm(i(s),t,r)}const Ow=Li(.42,0,1,1),Rw=Li(0,0,.58,1),Ym=Li(.42,0,.58,1),Aw=e=>Array.isArray(e)&&typeof e[0]!="number",Xm=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,qm=e=>t=>1-e(1-t),ju=e=>1-Math.sin(Math.acos(e)),Zm=qm(ju),Mw=Xm(ju),Jm=Li(.33,1.53,.69,.99),Vu=qm(Jm),Dw=Xm(Vu),Nw=e=>(e*=2)<1?.5*Vu(e):.5*(2-Math.pow(2,-10*(e-1))),Df={linear:Pe,easeIn:Ow,easeInOut:Ym,easeOut:Rw,circIn:ju,circInOut:Mw,circOut:Zm,backIn:Vu,backInOut:Dw,backOut:Jm,anticipate:Nw},Nf=e=>{if(Array.isArray(e)){cl(e.length===4);const[t,n,r,i]=e;return Li(t,n,r,i)}else if(typeof e=="string")return cl(Df[e]!==void 0),Df[e];return e},jw=(e,t)=>n=>t(e(n)),Ct=(...e)=>e.reduce(jw),mi=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},te=(e,t,n)=>e+(t-e)*n;function ta(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 Vw({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 l=n<.5?n*(1+t):n+t-n*t,a=2*n-l;i=ta(a,l,e+1/3),s=ta(a,l,e),o=ta(a,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function bs(e,t){return n=>n>0?t:e}const na=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Iw=[hl,mn,Un],Fw=e=>Iw.find(t=>t.test(e));function jf(e){const t=Fw(e);if(!t)return!1;let n=t.parse(e);return t===Un&&(n=Vw(n)),n}const Vf=(e,t)=>{const n=jf(e),r=jf(t);if(!n||!r)return bs(e,t);const i={...n};return s=>(i.red=na(n.red,r.red,s),i.green=na(n.green,r.green,s),i.blue=na(n.blue,r.blue,s),i.alpha=te(n.alpha,r.alpha,s),mn.transform(i))},gl=new Set(["none","hidden"]);function bw(e,t){return gl.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function _w(e,t){return n=>te(e,t,n)}function Iu(e){return typeof e=="number"?_w:typeof e=="string"?Ou(e)?bs:we.test(e)?Vf:$w:Array.isArray(e)?eg:typeof e=="object"?we.test(e)?Vf:Bw:bs}function eg(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Iu(s)(s,t[o]));return s=>{for(let o=0;o{for(const s in r)n[s]=r[s](i);return n}}function zw(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let s=0;s{const n=Jt.createTransformer(t),r=pi(e),i=pi(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?gl.has(e)&&!i.values.length||gl.has(t)&&!r.values.length?bw(e,t):Ct(eg(zw(r,i),i.values),n):bs(e,t)};function tg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?te(e,t,n):Iu(e)(e,t)}function Uw(e,t,n){const r=[],i=n||tg,s=e.length-1;for(let o=0;ot[0];if(s===2&&e[0]===e[1])return()=>t[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=Uw(t,r,i),l=o.length,a=u=>{let c=0;if(l>1)for(;ca(Zt(e[0],e[s-1],u)):a}function Ww(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 Kw(e){const t=[0];return Ww(t,e.length-1),t}function Gw(e,t){return e.map(n=>n*t)}function Qw(e,t){return e.map(()=>t||Ym).splice(0,e.length-1)}function _s({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Aw(r)?r.map(Nf):Nf(r),s={done:!1,value:t[0]},o=Gw(n&&n.length===t.length?n:Kw(t),e),l=Hw(o,t,{ease:Array.isArray(i)?i:Qw(t,i)});return{calculatedDuration:e,next:a=>(s.value=l(a),s.done=a>=e,s)}}const If=2e4;function Yw(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=If?1/0:t}const Xw=e=>{const t=({timestamp:n})=>e(n);return{start:()=>U.update(t,!0),stop:()=>Mt(t),now:()=>pe.isProcessing?pe.timestamp:Pt.now()}},qw={decay:Mf,inertia:Mf,tween:_s,keyframes:_s,spring:Gm},Zw=e=>e/100;class Fu extends Hm{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||Au,l=(a,u)=>this.onKeyframesResolved(a,u);this.resolver=new o(s,l,n,r,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,l=qw[n]||_s;let a,u;l!==_s&&typeof t[0]!="number"&&(a=Ct(Zw,tg(t[0],t[1])),t=[0,100]);const c=l({...this.options,keyframes:t});s==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=Yw(c));const{calculatedDuration:f}=c,d=f+i,m=d*(r+1)-i;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:a,calculatedDuration:f,resolvedDuration:d,totalDuration:m}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:T}=this.options;return{done:!0,value:T[T.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:l,keyframes:a,calculatedDuration:u,totalDuration:c,resolvedDuration:f}=r;if(this.startTime===null)return s.next(0);const{delay:d,repeat:m,repeatType:y,repeatDelay:v,onUpdate:S}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-d*(this.speed>=0?1:-1),h=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let p=this.currentTime,w=s;if(m){const T=Math.min(this.currentTime,c)/f;let V=Math.floor(T),M=T%1;!M&&T>=1&&(M=1),M===1&&V--,V=Math.min(V,m+1),!!(V%2)&&(y==="reverse"?(M=1-M,v&&(M-=v/f)):y==="mirror"&&(w=o)),p=Zt(0,1,M)*f}const P=h?{done:!1,value:a[0]}:w.next(p);l&&(P.value=l(P.value));let{done:C}=P;!h&&u!==null&&(C=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return R&&i!==void 0&&(P.value=po(a,this.options,i)),S&&S(P.value),R&&this.finish(),P}get duration(){const{resolved:t}=this;return t?St(t.calculatedDuration):0}get time(){return St(this.currentTime)}set time(t){t=xt(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=St(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Xw,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const ng=new Set(["opacity","clipPath","filter","transform"]),rg=e=>Array.isArray(e)&&typeof e[0]=="number";function ig(e){return!!(!e||typeof e=="string"&&e in bu||rg(e)||Array.isArray(e)&&e.every(ig))}const Mr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,bu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Mr([0,.65,.55,1]),circOut:Mr([.55,0,1,.45]),backIn:Mr([.31,.01,.66,-.59]),backOut:Mr([.33,1.53,.69,.99])};function Jw(e){return sg(e)||bu.easeOut}function sg(e){if(e)return rg(e)?Mr(e):Array.isArray(e)?e.map(Jw):bu[e]}function ex(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:l,times:a}={}){const u={[t]:n};a&&(u.offset=a);const c=sg(l);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const tx=Um(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Bs=10,nx=2e4;function rx(e){return e.type==="spring"||!ig(e.ease)}function ix(e,t){const n=new Fu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&sthis.onKeyframesResolved(o,l),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:s,ease:o,type:l,motionValue:a,name:u,startTime:c}=this.options;if(!(!((r=a.owner)===null||r===void 0)&&r.current))return!1;if(rx(this.options)){const{onComplete:d,onUpdate:m,motionValue:y,element:v,...S}=this.options,g=ix(t,S);t=g.keyframes,t.length===1&&(t[1]=t[0]),i=g.duration,s=g.times,o=g.ease,l="keyframes"}const f=ex(a.owner.current,u,t,{...this.options,duration:i,times:s,ease:o});return f.startTime=c??this.calcStartTime(),this.pendingTimeline?(f.timeline=this.pendingTimeline,this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:d}=this.options;a.set(po(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:i,times:s,type:l,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return St(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return St(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=xt(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Pe;const{animation:r}=n;r.timeline=t,r.onfinish=null}return Pe}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:s,ease:o,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:f,element:d,...m}=this.options,y=new Fu({...m,keyframes:r,duration:i,type:s,ease:o,times:l,isGenerator:!0}),v=xt(this.time);u.setWithVelocity(y.sample(v-Bs).value,y.sample(v).value,Bs)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:o,type:l}=t;return tx()&&r&&ng.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&s!=="mirror"&&o!==0&&l!=="inertia"}}function sx(e,t){let n;const r=()=>{const{currentTime:i}=t,o=(i===null?0:i.value)/100;n!==o&&e(o),n=o};return U.update(r,!0),()=>Mt(r)}const ox=Um(()=>window.ScrollTimeline!==void 0);class ax{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r{if(ox()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),sx(i=>{r.time=r.duration*i},t)});return()=>{n.forEach((r,i)=>{r&&r(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const _u=(e,t,n,r={},i,s,o)=>l=>{const a=Lu(r,e)||{},u=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-xt(u);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:m=>{t.set(m),a.onUpdate&&a.onUpdate(m)},onComplete:()=>{l(),a.onComplete&&a.onComplete(),o&&o()},onStop:o,name:e,motionValue:t,element:s?void 0:i};R1(a)||(f={...f,...O1(e,f)}),f.duration&&(f.duration=xt(f.duration)),f.repeatDelay&&(f.repeatDelay=xt(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let d=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(d=!0)),d&&!s&&t.get()!==void 0){const m=po(f.keyframes,a);if(m!==void 0)return U.update(()=>{f.onUpdate(m),f.onComplete()}),new ax([])}return!s&&Ff.supports(f)?new Ff(f):new Fu(f)},lx=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),ux=e=>ul(e)?e[e.length-1]||0:e;function mo(e,t){e.indexOf(t)===-1&&e.push(t)}function go(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Bu{constructor(){this.subscriptions=[]}add(t){return mo(this.subscriptions,t),()=>go(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!isNaN(parseFloat(e));class og{constructor(t,n={}){this.version="11.5.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=Pt.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Pt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=cx(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Bu);const r=this.events[t].add(n);return t==="change"?()=>{r(),U.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Pt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>bf)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,bf);return Wm(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function gi(e,t){return new og(e,t)}function fx(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,gi(n))}function dx(e,t){const n=ho(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const l=ux(s[o]);fx(e,o,l)}}const yo=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),hx="framerAppearId",ag="data-"+yo(hx);function lg(e){return e.props[ag]}function ug(e){if(rn.has(e))return"transform";if(ng.has(e))return yo(e)}class px extends og{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=ug(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let i=!1;return()=>{if(i)return;i=!0;const s=this.counts.get(n)-1;this.counts.set(n,s),s===0&&(go(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}const Se=e=>!!(e&&e.getVelocity);function mx(e){return!!(Se(e)&&e.add)}function yl(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");if(!r&&!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&(r=new px("auto"),e.addValue("willChange",r)),mx(r))return r.add(t)}function gx({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function cg(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var s;let{transition:o=e.getDefaultTransition(),transitionEnd:l,...a}=t;r&&(o=r);const u=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const f in a){const d=e.getValue(f,(s=e.latestValues[f])!==null&&s!==void 0?s:null),m=a[f];if(m===void 0||c&&gx(c,f))continue;const y={delay:n,...Lu(o||{},f)};let v=!1;if(window.MotionHandoffAnimation){const g=lg(e);if(g){const h=window.MotionHandoffAnimation(g,f,U);h!==null&&(y.startTime=h,v=!0)}}d.start(_u(f,d,m,e.shouldReduceMotion&&rn.has(f)?{type:!1}:y,e,v,yl(e,f)));const S=d.animation;S&&u.push(S)}return l&&Promise.all(u).then(()=>{U.update(()=>{l&&dx(e,l)})}),u}function vl(e,t,n={}){var r;const i=ho(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(cg(e,i,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:d}=s;return yx(e,t,c+u,f,d,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[u,c]=a==="beforeChildren"?[o,l]:[l,o];return u().then(()=>c())}else return Promise.all([o(),l(n.delay)])}function yx(e,t,n=0,r=0,i=1,s){const o=[],l=(e.variantChildren.size-1)*r,a=i===1?(u=0)=>u*r:(u=0)=>l-u*r;return Array.from(e.variantChildren).sort(vx).forEach((u,c)=>{u.notify("AnimationStart",t),o.push(vl(u,t,{...s,delay:n+a(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function vx(e,t){return e.sortNodePosition(t)}function wx(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"?ho(e,t,n.custom):t;r=Promise.all(cg(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const xx=[...ku].reverse(),Sx=ku.length;function Px(e){return t=>Promise.all(t.map(({animation:n,options:r})=>wx(e,n,r)))}function Cx(e){let t=Px(e),n=_f(),r=!0;const i=a=>(u,c)=>{var f;const d=ho(e,c,a==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(d){const{transition:m,transitionEnd:y,...v}=d;u={...u,...v,...y}}return u};function s(a){t=a(e)}function o(a){const u=e.getProps(),c=e.getVariantContext(!0)||{},f=[],d=new Set;let m={},y=1/0;for(let S=0;Sy&&w,V=!1;const M=Array.isArray(p)?p:[p];let I=M.reduce(i(g),{});P===!1&&(I={});const{prevResolvedValues:K={}}=h,q={...K,...I},le=x=>{T=!0,d.has(x)&&(V=!0,d.delete(x)),h.needsAnimating[x]=!0;const O=e.getValue(x);O&&(O.liveStyle=!1)};for(const x in q){const O=I[x],F=K[x];if(m.hasOwnProperty(x))continue;let k=!1;ul(O)&&ul(F)?k=!km(O,F):k=O!==F,k?O!=null?le(x):d.add(x):O!==void 0&&d.has(x)?le(x):h.protectedKeys[x]=!0}h.prevProp=p,h.prevResolvedValues=I,h.isActive&&(m={...m,...I}),r&&e.blockInitialAnimation&&(T=!1),T&&(!C||V)&&f.push(...M.map(x=>({animation:x,options:{type:g}})))}if(d.size){const S={};d.forEach(g=>{const h=e.getBaseTarget(g),p=e.getValue(g);p&&(p.liveStyle=!0),S[g]=h??null}),f.push({animation:S})}let v=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(f):Promise.resolve()}function l(a,u){var c;if(n[a].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(d=>{var m;return(m=d.animationState)===null||m===void 0?void 0:m.setActive(a,u)}),n[a].isActive=u;const f=o(a);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:o,setActive:l,setAnimateFunction:s,getState:()=>n,reset:()=>{n=_f(),r=!0}}}function Tx(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!km(t,e):!1}function an(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _f(){return{animate:an(!0),whileInView:an(),whileHover:an(),whileTap:an(),whileDrag:an(),whileFocus:an(),exit:an()}}class sn{constructor(t){this.isMounted=!1,this.node=t}update(){}}class kx extends sn{constructor(t){super(t),t.animationState||(t.animationState=Cx(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();di(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let Ex=0;class Lx extends sn{constructor(){super(...arguments),this.id=Ex++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const Ox={animation:{Feature:kx},exit:{Feature:Lx}},fg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function vo(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const Rx=e=>t=>fg(t)&&e(t,vo(t));function vt(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Tt(e,t,n,r){return vt(e,t,Rx(n),r)}const Bf=(e,t)=>Math.abs(e-t);function Ax(e,t){const n=Bf(e.x,t.x),r=Bf(e.y,t.y);return Math.sqrt(n**2+r**2)}class dg{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=ia(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,m=Ax(f.offset,{x:0,y:0})>=3;if(!d&&!m)return;const{point:y}=f,{timestamp:v}=pe;this.history.push({...y,timestamp:v});const{onStart:S,onMove:g}=this.handlers;d||(S&&S(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=ra(d,this.transformPagePoint),U.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:m,onSessionEnd:y,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=ia(f.type==="pointercancel"?this.lastMoveEventInfo:ra(d,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,S),y&&y(f,S)},!fg(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=vo(t),l=ra(o,this.transformPagePoint),{point:a}=l,{timestamp:u}=pe;this.history=[{...a,timestamp:u}];const{onSessionStart:c}=n;c&&c(t,ia(l,this.history)),this.removeListeners=Ct(Tt(this.contextWindow,"pointermove",this.handlePointerMove),Tt(this.contextWindow,"pointerup",this.handlePointerUp),Tt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Mt(this.updatePoint)}}function ra(e,t){return t?{point:t(e.point)}:e}function zf(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ia({point:e},t){return{point:e,delta:zf(e,hg(t)),offset:zf(e,Mx(t)),velocity:Dx(t,.1)}}function Mx(e){return e[0]}function hg(e){return e[e.length-1]}function Dx(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=hg(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>xt(t)));)n--;if(!r)return{x:0,y:0};const s=St(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 pg(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const $f=pg("dragHorizontal"),Uf=pg("dragVertical");function mg(e){let t=!1;if(e==="y")t=Uf();else if(e==="x")t=$f();else{const n=$f(),r=Uf();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function gg(){const e=mg(!0);return e?(e(),!1):!0}function Hn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const yg=1e-4,Nx=1-yg,jx=1+yg,vg=.01,Vx=0-vg,Ix=0+vg;function _e(e){return e.max-e.min}function Fx(e,t,n){return Math.abs(e-t)<=n}function Hf(e,t,n,r=.5){e.origin=r,e.originPoint=te(t.min,t.max,e.origin),e.scale=_e(n)/_e(t),e.translate=te(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Nx&&e.scale<=jx||isNaN(e.scale))&&(e.scale=1),(e.translate>=Vx&&e.translate<=Ix||isNaN(e.translate))&&(e.translate=0)}function Wr(e,t,n,r){Hf(e.x,t.x,n.x,r?r.originX:void 0),Hf(e.y,t.y,n.y,r?r.originY:void 0)}function Wf(e,t,n){e.min=n.min+t.min,e.max=e.min+_e(t)}function bx(e,t,n){Wf(e.x,t.x,n.x),Wf(e.y,t.y,n.y)}function Kf(e,t,n){e.min=t.min-n.min,e.max=e.min+_e(t)}function Kr(e,t,n){Kf(e.x,t.x,n.x),Kf(e.y,t.y,n.y)}function _x(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?te(n,e,r.max):Math.min(e,n)),e}function Gf(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 Bx(e,{top:t,left:n,bottom:r,right:i}){return{x:Gf(e.x,n,i),y:Gf(e.y,t,r)}}function Qf(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=mi(t.min,t.max-r,e.min):r>i&&(n=mi(e.min,e.max-i,t.min)),Zt(0,1,n)}function Ux(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 wl=.35;function Hx(e=wl){return e===!1?e=0:e===!0&&(e=wl),{x:Yf(e,"left","right"),y:Yf(e,"top","bottom")}}function Yf(e,t,n){return{min:Xf(e,t),max:Xf(e,n)}}function Xf(e,t){return typeof e=="number"?e:e[t]||0}const qf=()=>({translate:0,scale:1,origin:0,originPoint:0}),Wn=()=>({x:qf(),y:qf()}),Zf=()=>({min:0,max:0}),se=()=>({x:Zf(),y:Zf()});function Ue(e){return[e("x"),e("y")]}function wg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Wx({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Kx(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 sa(e){return e===void 0||e===1}function xl({scale:e,scaleX:t,scaleY:n}){return!sa(e)||!sa(t)||!sa(n)}function cn(e){return xl(e)||xg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function xg(e){return Jf(e.x)||Jf(e.y)}function Jf(e){return e&&e!=="0%"}function zs(e,t,n){const r=e-n,i=t*r;return n+i}function ed(e,t,n,r,i){return i!==void 0&&(e=zs(e,i,r)),zs(e,n,r)+t}function Sl(e,t=0,n=1,r,i){e.min=ed(e.min,t,n,r,i),e.max=ed(e.max,t,n,r,i)}function Sg(e,{x:t,y:n}){Sl(e.x,t.translate,t.scale,t.originPoint),Sl(e.y,n.translate,n.scale,n.originPoint)}const td=.999999999999,nd=1.0000000000001;function Gx(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let l=0;ltd&&(t.x=1),t.ytd&&(t.y=1)}function Kn(e,t){e.min=e.min+t,e.max=e.max+t}function rd(e,t,n,r,i=.5){const s=te(e.min,e.max,i);Sl(e,t,n,s,r)}function Gn(e,t){rd(e.x,t.x,t.scaleX,t.scale,t.originX),rd(e.y,t.y,t.scaleY,t.scale,t.originY)}function Pg(e,t){return wg(Kx(e.getBoundingClientRect(),t))}function Qx(e,t,n){const r=Pg(e,n),{scroll:i}=t;return i&&(Kn(r.x,i.offset.x),Kn(r.y,i.offset.y)),r}const Cg=({current:e})=>e?e.ownerDocument.defaultView:null,Yx=new WeakMap;class Xx{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=se(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(vo(c,"page").point)},s=(c,f)=>{var d;const{drag:m,dragPropagation:y,onDragStart:v}=this.getProps();if(m&&!y&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=mg(m),!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),Ue(g=>{let h=this.getAxisMotionValue(g).get()||0;if(dt.test(h)){const{projection:p}=this.visualElement;if(p&&p.layout){const w=p.layout.layoutBox[g];w&&(h=_e(w)*(parseFloat(h)/100))}}this.originPoint[g]=h}),v&&U.postRender(()=>v(c,f)),(d=this.removeWillChange)===null||d===void 0||d.call(this),this.removeWillChange=yl(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},o=(c,f)=>{const{dragPropagation:d,dragDirectionLock:m,onDirectionLock:y,onDrag:v}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:S}=f;if(m&&this.currentDirection===null){this.currentDirection=qx(S),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,S),this.updateAxis("y",f.point,S),this.visualElement.render(),v&&v(c,f)},l=(c,f)=>this.stop(c,f),a=()=>Ue(c=>{var f;return this.getAnimationState(c)==="paused"&&((f=this.getAxisMotionValue(c).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new dg(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:l,resumeAnimation:a},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Cg(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&&U.postRender(()=>o(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||!Qi(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=_x(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&&Hn(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Bx(i.layoutBox,n):this.constraints=!1,this.elastic=Hx(r),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Ue(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Ux(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Hn(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=Qx(r,i.root,this.visualElement.getTransformPagePoint());let o=zx(i.layout.layoutBox,s);if(n){const l=n(Wx(o));this.hasMutatedConstraints=!!l,l&&(o=wg(l))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),a=this.constraints||{},u=Ue(c=>{if(!Qi(c,n,this.currentDirection))return;let f=a&&a[c]||{};o&&(f={min:0,max:0});const d=i?200:1e6,m=i?40:1e7,y={type:"inertia",velocity:r?t[c]:0,bounceStiffness:d,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(c,y)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(_u(t,r,0,n,this.visualElement,!1,yl(this.visualElement,t)))}stopAnimation(){Ue(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ue(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){Ue(n=>{const{drag:r}=this.getProps();if(!Qi(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:l}=i.layout.layoutBox[n];s.set(t[n]-te(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Hn(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ue(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const a=l.get();i[o]=$x({min:a,max:a},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(),Ue(o=>{if(!Qi(o,t,null))return;const l=this.getAxisMotionValue(o),{min:a,max:u}=this.constraints[o];l.set(te(a,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;Yx.set(this.visualElement,this);const t=this.visualElement.current,n=Tt(t,"pointerdown",a=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(a)}),r=()=>{const{dragConstraints:a}=this.getProps();Hn(a)&&a.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),U.read(r);const o=vt(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:a,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ue(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=a[c].translate,f.set(f.get()+a[c].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=wl,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:l}}}function Qi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function qx(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Zx extends sn{constructor(t){super(t),this.removeGroupControls=Pe,this.removeListeners=Pe,this.controls=new Xx(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Pe}unmount(){this.removeGroupControls(),this.removeListeners()}}const id=e=>(t,n)=>{e&&U.postRender(()=>e(t,n))};class Jx extends sn{constructor(){super(...arguments),this.removePointerDownListener=Pe}onPointerDown(t){this.session=new dg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Cg(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:id(t),onStart:id(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&U.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Tt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const wo=L.createContext(null);function eS(){const e=L.useContext(wo);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=L.useId();L.useEffect(()=>r(i),[]);const s=L.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,s]:[!0]}const zu=L.createContext({}),Tg=L.createContext({}),fs={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function sd(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Cr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(_.test(e))e=parseFloat(e);else return e;const n=sd(e,t.target.x),r=sd(e,t.target.y);return`${n}% ${r}%`}},tS={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Jt.parse(e);if(i.length>5)return r;const s=Jt.createTransformer(e),o=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,a=n.y.scale*t.y;i[0+o]/=l,i[1+o]/=a;const u=te(l,a,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}},$s={};function nS(e){Object.assign($s,e)}const{schedule:$u,cancel:DC}=Em(queueMicrotask,!1);class rS extends L.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;nS(iS),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()})),fs.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()||U.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),$u.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function kg(e){const[t,n]=eS(),r=L.useContext(zu);return E.jsx(rS,{...e,layoutGroup:r,switchLayoutGroup:L.useContext(Tg),isPresent:t,safeToRemove:n})}const iS={borderRadius:{...Cr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Cr,borderTopRightRadius:Cr,borderBottomLeftRadius:Cr,borderBottomRightRadius:Cr,boxShadow:tS},Eg=["TopLeft","TopRight","BottomLeft","BottomRight"],sS=Eg.length,od=e=>typeof e=="string"?parseFloat(e):e,ad=e=>typeof e=="number"||_.test(e);function oS(e,t,n,r,i,s){i?(e.opacity=te(0,n.opacity!==void 0?n.opacity:1,aS(r)),e.opacityExit=te(t.opacity!==void 0?t.opacity:1,0,lS(r))):s&&(e.opacity=te(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;ort?1:n(mi(e,t,r))}function ud(e,t){e.min=t.min,e.max=t.max}function $e(e,t){ud(e.x,t.x),ud(e.y,t.y)}function cd(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function fd(e,t,n,r,i){return e-=t,e=zs(e,1/n,r),i!==void 0&&(e=zs(e,1/i,r)),e}function uS(e,t=0,n=1,r=.5,i,s=e,o=e){if(dt.test(t)&&(t=parseFloat(t),t=te(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=te(s.min,s.max,r);e===s&&(l-=t),e.min=fd(e.min,t,n,l,i),e.max=fd(e.max,t,n,l,i)}function dd(e,t,[n,r,i],s,o){uS(e,t[n],t[r],t[i],t.scale,s,o)}const cS=["x","scaleX","originX"],fS=["y","scaleY","originY"];function hd(e,t,n,r){dd(e.x,t,cS,n?n.x:void 0,r?r.x:void 0),dd(e.y,t,fS,n?n.y:void 0,r?r.y:void 0)}function pd(e){return e.translate===0&&e.scale===1}function Og(e){return pd(e.x)&&pd(e.y)}function md(e,t){return e.min===t.min&&e.max===t.max}function dS(e,t){return md(e.x,t.x)&&md(e.y,t.y)}function gd(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Rg(e,t){return gd(e.x,t.x)&&gd(e.y,t.y)}function yd(e){return _e(e.x)/_e(e.y)}function vd(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class hS{constructor(){this.members=[]}add(t){mo(this.members,t),t.scheduleRender()}remove(t){if(go(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 pS(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:f,rotateY:d,skewX:m,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),m&&(r+=`skewX(${m}deg) `),y&&(r+=`skewY(${y}deg) `)}const l=e.x.scale*t.x,a=e.y.scale*t.y;return(l!==1||a!==1)&&(r+=`scale(${l}, ${a})`),r||"none"}const mS=(e,t)=>e.depth-t.depth;class gS{constructor(){this.children=[],this.isDirty=!1}add(t){mo(this.children,t),this.isDirty=!0}remove(t){go(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(mS),this.isDirty=!1,this.children.forEach(t)}}function ds(e){const t=Se(e)?e.get():e;return lx(t)?t.toValue():t}function yS(e,t){const n=Pt.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Mt(r),e(s-t))};return U.read(r,!0),()=>Mt(r)}function vS(e){return e instanceof SVGElement&&e.tagName!=="svg"}function wS(e,t,n){const r=Se(e)?e:gi(e);return r.start(_u("",r,t,n)),r.animation}const fn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Dr=typeof window<"u"&&window.MotionDebug!==void 0,oa=["","X","Y","Z"],xS={visibility:"hidden"},wd=1e3;let SS=0;function aa(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ag(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=lg(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",U,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ag(r)}function Mg({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},l=t==null?void 0:t()){this.id=SS++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Dr&&(fn.totalNodes=fn.resolvedTargetDeltas=fn.recalculatedProjection=0),this.nodes.forEach(TS),this.nodes.forEach(RS),this.nodes.forEach(AS),this.nodes.forEach(kS),Dr&&window.MotionDebug.record(fn)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let a=0;athis.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=yS(d,250),fs.hasAnimatedSinceResize&&(fs.hasAnimatedSinceResize=!1,this.nodes.forEach(Sd))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:m,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||VS,{onLayoutAnimationStart:S,onLayoutAnimationComplete:g}=c.getProps(),h=!this.targetLayout||!Rg(this.targetLayout,y)||m,p=!d&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||p||d&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,p);const w={...Lu(v,"layout"),onPlay:S,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else d||Sd(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}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,Mt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(MS),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ag(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c{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 a=0;a{const P=w/1e3;Pd(f.x,o.x,P),Pd(f.y,o.y,P),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Kr(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),NS(this.relativeTarget,this.relativeTargetOrigin,d,P),p&&dS(this.relativeTarget,p)&&(this.isProjectionDirty=!1),p||(p=se()),$e(p,this.relativeTarget)),v&&(this.animationValues=c,oS(c,u,this.latestValues,P,h,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},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&&(Mt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=U.update(()=>{fs.hasAnimatedSinceResize=!0,this.currentAnimation=wS(0,wd,{...o,onUpdate:l=>{this.mixTargetDelta(l),o.onUpdate&&o.onUpdate(l)},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(wd),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:a,layout:u,latestValues:c}=o;if(!(!l||!a||!u)){if(this!==o&&this.layout&&u&&Dg(this.options.animationType,this.layout.layoutBox,u.layoutBox)){a=this.target||se();const f=_e(this.layout.layoutBox.x);a.x.min=o.target.x.min,a.x.max=a.x.min+f;const d=_e(this.layout.layoutBox.y);a.y.min=o.target.y.min,a.y.max=a.y.min+d}$e(l,a),Gn(l,c),Wr(this.projectionDeltaWithTransform,this.layoutCorrected,l,c)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new hS),this.sharedNodes.get(o).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:l}=this.options;return l?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:l}=this.options;return l?(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:l,preserveFollowOpacity:a}={}){const u=this.getStack();u&&u.promote(this,a),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:a}=o;if((a.z||a.rotate||a.rotateX||a.rotateY||a.rotateZ||a.skewX||a.skewY)&&(l=!0),!l)return;const u={};a.z&&aa("z",o,u,this.animationValues);for(let c=0;c{var l;return(l=o.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(xd),this.root.sharedNodes.clear()}}}function PS(e){e.updateLayout()}function CS(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"?Ue(f=>{const d=o?n.measuredBox[f]:n.layoutBox[f],m=_e(d);d.min=r[f].min,d.max=d.min+m}):Dg(s,n.layoutBox,r)&&Ue(f=>{const d=o?n.measuredBox[f]:n.layoutBox[f],m=_e(r[f]);d.max=d.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+m)});const l=Wn();Wr(l,r,n.layoutBox);const a=Wn();o?Wr(a,e.applyTransform(i,!0),n.measuredBox):Wr(a,r,n.layoutBox);const u=!Og(l);let c=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:m}=f;if(d&&m){const y=se();Kr(y,n.layoutBox,d.layoutBox);const v=se();Kr(v,r,m.layoutBox),Rg(y,v)||(c=!0),f.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=y,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:a,layoutDelta:l,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function TS(e){Dr&&fn.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 kS(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ES(e){e.clearSnapshot()}function xd(e){e.clearMeasurements()}function LS(e){e.isLayoutDirty=!1}function OS(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Sd(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function RS(e){e.resolveTargetDelta()}function AS(e){e.calcProjection()}function MS(e){e.resetSkewAndRotation()}function DS(e){e.removeLeadSnapshot()}function Pd(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 Cd(e,t,n,r){e.min=te(t.min,n.min,r),e.max=te(t.max,n.max,r)}function NS(e,t,n,r){Cd(e.x,t.x,n.x,r),Cd(e.y,t.y,n.y,r)}function jS(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const VS={duration:.45,ease:[.4,0,.1,1]},Td=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),kd=Td("applewebkit/")&&!Td("chrome/")?Math.round:Pe;function Ed(e){e.min=kd(e.min),e.max=kd(e.max)}function IS(e){Ed(e.x),Ed(e.y)}function Dg(e,t,n){return e==="position"||e==="preserve-aspect"&&!Fx(yd(t),yd(n),.2)}function FS(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const bS=Mg({attachResizeListener:(e,t)=>vt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),la={current:void 0},Ng=Mg({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!la.current){const e=new bS({});e.mount(window),e.setOptions({layoutScroll:!0}),la.current=e}return la.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),_S={pan:{Feature:Jx},drag:{Feature:Zx,ProjectionNode:Ng,MeasureLayout:kg}};function Ld(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(s,o)=>{if(s.pointerType==="touch"||gg())return;const l=e.getProps();e.animationState&&l.whileHover&&e.animationState.setActive("whileHover",t);const a=l[r];a&&U.postRender(()=>a(s,o))};return Tt(e.current,n,i,{passive:!e.getProps()[r]})}class BS extends sn{mount(){this.unmount=Ct(Ld(this.node,!0),Ld(this.node,!1))}unmount(){}}class zS extends sn{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=Ct(vt(this.node.current,"focus",()=>this.onFocus()),vt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const jg=(e,t)=>t?e===t?!0:jg(e,t.parentElement):!1;function ua(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,vo(n))}class $S extends sn{constructor(){super(...arguments),this.removeStartListeners=Pe,this.removeEndListeners=Pe,this.removeAccessibleListeners=Pe,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),s=Tt(window,"pointerup",(l,a)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c,globalTapTarget:f}=this.node.getProps(),d=!f&&!jg(this.node.current,l.target)?c:u;d&&U.update(()=>d(l,a))},{passive:!(r.onTap||r.onPointerUp)}),o=Tt(window,"pointercancel",(l,a)=>this.cancelPress(l,a),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Ct(s,o),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const o=l=>{l.key!=="Enter"||!this.checkPressEnd()||ua("up",(a,u)=>{const{onTap:c}=this.node.getProps();c&&U.postRender(()=>c(a,u))})};this.removeEndListeners(),this.removeEndListeners=vt(this.node.current,"keyup",o),ua("down",(l,a)=>{this.startPress(l,a)})},n=vt(this.node.current,"keydown",t),r=()=>{this.isPressing&&ua("cancel",(s,o)=>this.cancelPress(s,o))},i=vt(this.node.current,"blur",r);this.removeAccessibleListeners=Ct(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&&U.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!gg()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&U.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Tt(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=vt(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Ct(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Pl=new WeakMap,ca=new WeakMap,US=e=>{const t=Pl.get(e.target);t&&t(e)},HS=e=>{e.forEach(US)};function WS({root:e,...t}){const n=e||document;ca.has(n)||ca.set(n,{});const r=ca.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(HS,{root:e,...t})),r[i]}function KS(e,t,n){const r=WS(t);return Pl.set(e,n),r.observe(e),()=>{Pl.delete(e),r.unobserve(e)}}const GS={some:0,all:1};class QS extends sn{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:GS[i]},l=a=>{const{isIntersecting:u}=a;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),d=u?c:f;d&&d(a)};return KS(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(YS(t,n))&&this.startObserver()}unmount(){}}function YS({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const XS={inView:{Feature:QS},tap:{Feature:$S},focus:{Feature:zS},hover:{Feature:BS}},qS={layout:{ProjectionNode:Ng,MeasureLayout:kg}},Uu=L.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),xo=L.createContext({}),Hu=typeof window<"u",Vg=Hu?L.useLayoutEffect:L.useEffect,Ig=L.createContext({strict:!1});let Od=!1;function ZS(e,t,n,r,i){var s;const{visualElement:o}=L.useContext(xo),l=L.useContext(Ig),a=L.useContext(wo),u=L.useContext(Uu).reducedMotion,c=L.useRef();r=r||l.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:u}));const f=c.current,d=L.useContext(Tg);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&e2(c.current,n,i,d),L.useInsertionEffect(()=>{f&&f.update(n,a)});const m=n[ag],y=L.useRef(!!m&&!window.MotionHandoffIsComplete&&((s=window.MotionHasOptimisedAnimation)===null||s===void 0?void 0:s.call(window,m)));return Vg(()=>{f&&(f.updateFeatures(),$u.render(f.render),y.current&&f.animationState&&f.animationState.animateChanges())}),L.useEffect(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current=!1,Od||(Od=!0,queueMicrotask(JS)))}),f}function JS(){window.MotionHandoffIsComplete=!0}function e2(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:l,layoutScroll:a,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Fg(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||l&&Hn(l),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:a,layoutRoot:u})}function Fg(e){if(e)return e.options.allowProjection!==!1?e.projection:Fg(e.parent)}function t2(e,t,n){return L.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Hn(n)&&(n.current=r))},[t])}function So(e){return di(e.animate)||Eu.some(t=>hi(e[t]))}function bg(e){return!!(So(e)||e.variants)}function n2(e,t){if(So(e)){const{initial:n,animate:r}=e;return{initial:n===!1||hi(n)?n:void 0,animate:hi(r)?r:void 0}}return e.inherit!==!1?t:{}}function r2(e){const{initial:t,animate:n}=n2(e,L.useContext(xo));return L.useMemo(()=>({initial:t,animate:n}),[Rd(t),Rd(n)])}function Rd(e){return Array.isArray(e)?e.join(" "):e}const Ad={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"]},ur={};for(const e in Ad)ur[e]={isEnabled:t=>Ad[e].some(n=>!!t[n])};function i2(e){for(const t in e)ur[t]={...ur[t],...e[t]}}const s2=Symbol.for("motionComponentSymbol");function o2({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&i2(e);function s(l,a){let u;const c={...L.useContext(Uu),...l,layoutId:a2(l)},{isStatic:f}=c,d=r2(l),m=r(l,f);if(!f&&Hu){l2();const y=u2(c);u=y.MeasureLayout,d.visualElement=ZS(i,m,c,t,y.ProjectionNode)}return E.jsxs(xo.Provider,{value:d,children:[u&&d.visualElement?E.jsx(u,{visualElement:d.visualElement,...c}):null,n(i,l,t2(m,d.visualElement,a),m,f,d.visualElement)]})}const o=L.forwardRef(s);return o[s2]=i,o}function a2({layoutId:e}){const t=L.useContext(zu).id;return t&&e!==void 0?t+"-"+e:e}function l2(e,t){L.useContext(Ig).strict}function u2(e){const{drag:t,layout:n}=ur;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const c2=["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 Wu(e){return typeof e!="string"||e.includes("-")?!1:!!(c2.indexOf(e)>-1||/[A-Z]/u.test(e))}function _g(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 Bg=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 zg(e,t,n,r){_g(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Bg.has(i)?i:yo(i),t.attrs[i])}function $g(e,{layout:t,layoutId:n}){return rn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!$s[e]||e==="opacity")}function Ku(e,t,n){var r;const{style:i}=e,s={};for(const o in i)(Se(i[o])||t.style&&Se(t.style[o])||$g(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[o]=i[o]);return n&&i&&typeof i.willChange=="string"&&(n.applyWillChange=!1),s}function Ug(e,t,n){const r=Ku(e,t,n);for(const i in e)if(Se(e[i])||Se(t[i])){const s=Ti.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}function Gu(e){const t=L.useRef(null);return t.current===null&&(t.current=e()),t.current}function f2({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},i,s,o,l){const a={latestValues:h2(i,s,o,l?!1:e,t),renderState:n()};return r&&(a.mount=u=>r(i,u,a)),a}const Hg=e=>(t,n)=>{const r=L.useContext(xo),i=L.useContext(wo),s=()=>f2(e,t,r,i,n);return n?s():Gu(s)};function d2(e,t){const n=ug(t);n&&mo(e,n)}function Md(e,t,n){const r=Array.isArray(t)?t:[t];for(let i=0;i{for(const h in S){let p=S[h];if(Array.isArray(p)){const w=y?p.length-1:0;p=p[w]}p!==null&&(o[h]=p)}for(const h in g)o[h]=g[h]}),a&&(f&&c!==!1&&!di(f)&&Md(e,f,S=>{for(const g in S)d2(l,g)}),l.length&&(o.willChange=l.join(","))),o}const Qu=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Wg=()=>({...Qu(),attrs:{}}),Kg=(e,t)=>t&&typeof e=="number"?t.transform(e):e,p2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},m2=Ti.length;function g2(e,t,n){let r="",i=!0;for(let s=0;stypeof e=="string"&&e.toLowerCase()==="svg",S2={useVisualState:Hg({scrapeMotionValuesFromProps:Ug,createRenderState:Wg,onMount:(e,t,{renderState:n,latestValues:r})=>{U.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),U.render(()=>{Xu(n,r,qu(t.tagName),e.transformTemplate),zg(t,n)})}})},P2={useVisualState:Hg({applyWillChange:!0,scrapeMotionValuesFromProps:Ku,createRenderState:Qu})};function Gg(e,t,n){for(const r in t)!Se(t[r])&&!$g(r,n)&&(e[r]=t[r])}function C2({transformTemplate:e},t){return L.useMemo(()=>{const n=Qu();return Yu(n,t,e),Object.assign({},n.vars,n.style)},[t])}function T2(e,t){const n=e.style||{},r={};return Gg(r,n,e),Object.assign(r,C2(e,t)),r}function k2(e,t){const n={},r=T2(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const E2=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Us(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||E2.has(e)}let Qg=e=>!Us(e);function L2(e){e&&(Qg=t=>t.startsWith("on")?!Us(t):e(t))}try{L2(require("@emotion/is-prop-valid").default)}catch{}function O2(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Qg(i)||n===!0&&Us(i)||!t&&!Us(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function R2(e,t,n,r){const i=L.useMemo(()=>{const s=Wg();return Xu(s,t,qu(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Gg(s,e.style,e),i.style={...s,...i.style}}return i}function A2(e=!1){return(n,r,i,{latestValues:s},o)=>{const a=(Wu(n)?R2:k2)(r,s,o,n),u=O2(r,typeof n=="string",e),c=n!==L.Fragment?{...u,...a,ref:i}:{},{children:f}=r,d=L.useMemo(()=>Se(f)?f.get():f,[f]);return L.createElement(n,{...c,children:d})}}function M2(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Wu(r)?S2:P2,preloadedFeatures:e,useRender:A2(i),createVisualElement:t,Component:r};return o2(o)}}const Cl={current:null},Yg={current:!1};function D2(){if(Yg.current=!0,!!Hu)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Cl.current=e.matches;e.addListener(t),t()}else Cl.current=!1}function N2(e,t,n){for(const r in t){const i=t[r],s=n[r];if(Se(i))e.addValue(r,i);else if(Se(s))e.addValue(r,gi(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,gi(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Nd=new WeakMap,j2=[...Nm,we,Jt],V2=e=>j2.find(Dm(e)),jd=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],I2=Eu.length;class F2{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},l={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Au,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,U.render(this.render,!1,!0))};const{latestValues:a,renderState:u}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=l,this.blockInitialAnimation=!!s,this.isControllingVariants=So(n),this.isVariantNode=bg(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const m=f[d];a[d]!==void 0&&Se(m)&&m.set(a[d],!1)}}mount(t){this.current=t,Nd.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)),Yg.current||D2(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Cl.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Nd.delete(this.current),this.projection&&this.projection.unmount(),Mt(this.notifyUpdate),Mt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=rn.has(t),i=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&U.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ur){const n=ur[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):se()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=gi(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(Om(i)||Lm(i))?i=parseFloat(i):!V2(i)&&Jt.test(n)&&(i=zm(t,n)),this.setBaseTarget(t,Se(i)?i.get():i)),Se(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=Tu(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[t])}if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Se(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 Bu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Xg extends F2{constructor(){super(...arguments),this.KeyframeResolver=$m}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]}}function b2(e){return window.getComputedStyle(e)}class _2 extends Xg{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=_g}readValueFromInstance(t,n){if(rn.has(n)){const r=Nu(n);return r&&r.default||0}else{const r=b2(t),i=(Am(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Pg(t,n)}build(t,n,r){Yu(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Ku(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Se(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class B2 extends Xg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=se}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(rn.has(n)){const r=Nu(n);return r&&r.default||0}return n=Bg.has(n)?n:yo(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Ug(t,n,r)}build(t,n,r){Xu(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){zg(t,n,r,i)}mount(t){this.isSVGTag=qu(t.tagName),super.mount(t)}}const z2=(e,t)=>Wu(e)?new B2(t):new _2(t,{allowProjection:e!==L.Fragment}),$2=M2({...Ox,...XS,..._S,...qS},z2),er=C1($2);class U2 extends L.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function H2({children:e,isPresent:t}){const n=L.useId(),r=L.useRef(null),i=L.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=L.useContext(Uu);return L.useInsertionEffect(()=>{const{width:o,height:l,top:a,left:u}=i.current;if(t||!r.current||!o||!l)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return s&&(c.nonce=s),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${o}px !important; + height: ${l}px !important; + top: ${a}px !important; + left: ${u}px !important; + } + `),()=>{document.head.removeChild(c)}},[t]),E.jsx(U2,{isPresent:t,childRef:r,sizeRef:i,children:L.cloneElement(e,{ref:r})})}const W2=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o})=>{const l=Gu(K2),a=L.useId(),u=L.useMemo(()=>({id:a,initial:t,isPresent:n,custom:i,onExitComplete:c=>{l.set(c,!0);for(const f of l.values())if(!f)return;r&&r()},register:c=>(l.set(c,!1),()=>l.delete(c))}),s?[Math.random()]:[n]);return L.useMemo(()=>{l.forEach((c,f)=>l.set(f,!1))},[n]),L.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=E.jsx(H2,{isPresent:n,children:e})),E.jsx(wo.Provider,{value:u,children:e})};function K2(){return new Map}const Yi=e=>e.key||"";function Vd(e){const t=[];return L.Children.forEach(e,n=>{L.isValidElement(n)&&t.push(n)}),t}const G2=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:s=!0,mode:o="sync"})=>{const l=L.useMemo(()=>Vd(e),[e]),a=l.map(Yi),u=L.useRef(!0),c=L.useRef(l),f=Gu(()=>new Map),[d,m]=L.useState(l),[y,v]=L.useState(l);Vg(()=>{u.current=!1,c.current=l;for(let h=0;h{const p=Yi(h),w=l===y||a.includes(p),P=()=>{if(f.has(p))f.set(p,!0);else return;let C=!0;f.forEach(R=>{R||(C=!1)}),C&&(g==null||g(),v(c.current),i&&i())};return E.jsx(W2,{isPresent:w,initial:!u.current||r?void 0:!1,custom:w?void 0:n,presenceAffectsLayout:s,mode:o,onExitComplete:w?void 0:P,children:h},p)})})},qg=({cardId:e,onSelectProperty:t,isComputer:n,isFlipped:r,className:i})=>{const{t:s}=Nt(),[o,l]=L.useState(!1),a=e.toString(),u=Fs.find(m=>m.id===e);if(!u)return E.jsx("div",{children:"Karte nicht gefunden!"});const c=`/cardBattle/assets/images/${u.image}`,f={hidden:{rotateY:180},visible:{rotateY:0}},d=m=>{const y=s(`eigenschaften.${m}`),v=u.eigenschaften[m];return E.jsxs("li",{onClick:()=>!n&&t&&t(m),style:{cursor:n?"default":"pointer",color:"black",margin:"10px 0"},children:[E.jsx("span",{className:"property-label",children:y}),E.jsx("span",{className:"property-value",children:v}),m!=="eigenschaft1"&&E.jsx("div",{className:"rating-scale",children:E.jsx("div",{className:"rating-bar",style:{width:`${v/5*100}%`,backgroundColor:m==="eigenschaft2"?"#E09594":m==="eigenschaft3"?"#92B4DE":m==="eigenschaft4"?"#76C9B4":"#E0C3B0"}})})]},m)};return E.jsxs(E.Fragment,{children:[E.jsxs(er.div,{className:`card-flip ${i}`,initial:r?"hidden":"visible",animate:r?"hidden":"visible",variants:f,transition:{duration:.1},style:{transformStyle:"preserve-3d",perspective:"1000px"},children:[E.jsxs("div",{className:"card card-front",children:[E.jsx("div",{className:"card-header",children:E.jsx("h2",{children:a?s(`cards.${a}.name`):"Name nicht verfügbar"})}),E.jsx("img",{src:c,alt:a?s(`cards.${a}.name`):"",className:"card-image"}),E.jsxs("ul",{className:"card-properties-list",children:[d("eigenschaft1"),d("eigenschaft2"),d("eigenschaft3"),d("eigenschaft4"),d("eigenschaft5")]}),E.jsx("button",{className:"description-button",onClick:()=>l(!0),children:s("showDescription")})]}),E.jsx("div",{className:"card-back",children:E.jsx("img",{src:"/cardBattle/assets/images/backSite.png",alt:"Card Back"})})]}),E.jsx(G2,{children:o&&E.jsx(er.div,{className:"description-overlay",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>l(!1),children:E.jsxs(er.div,{className:"description-popup",initial:{y:50,opacity:0},animate:{y:0,opacity:1},exit:{y:50,opacity:0},onClick:m=>m.stopPropagation(),children:[E.jsx("h3",{children:a?s(`cards.${a}.name`):"Name nicht verfügbar"}),E.jsx("p",{children:a?s(`cards.${a}.textinfo`):"Beschreibung nicht verfügbar"}),E.jsx("button",{className:"close-button",onClick:()=>l(!1),children:s("close")})]})})})]})};function Zg(e){switch(e){case"left":return{x:"-3000%",opacity:0};case"right":return{x:"3000%",opacity:0};case"up":return{y:"-3000%",opacity:0};default:return{}}}const Q2=({playerCards:e,currentPlayerCard:t,animationDirection:n,isComputerTurn:r,handlePropertySelect:i})=>{const{t:s}=Nt();return E.jsxs("div",{className:"card-container",children:[E.jsxs("h2",{children:[s("player")," (",e.length,")"]}),t?E.jsx(er.div,{className:"card-spieler",initial:{opacity:0},animate:n?Zg(n):{x:0,opacity:[0,0,1]},transition:{duration:n?2:.1,opacity:{delay:n?2:0,duration:3}},children:E.jsx(qg,{cardId:t.id,onSelectProperty:r?void 0:i,className:"player-card"})}):E.jsx("p",{children:s("noMoreCards")})]})},Y2=({computerCards:e,currentComputerCard:t,isComputerCardFlipped:n,animationDirection:r})=>{const{t:i}=Nt();return E.jsxs("div",{className:"card-container",children:[E.jsxs("h2",{children:[i("computer")," (",e.length,")"]}),t?E.jsx(er.div,{className:"card-computer",initial:{opacity:0},animate:r?Zg(r):{x:0,opacity:[0,0,1]},transition:{duration:r?2:.1,opacity:{delay:r?2:0,duration:3}},children:E.jsx(qg,{cardId:t.id,isComputer:!0,isFlipped:n})}):E.jsx("p",{children:i("noMoreCards")})]})},X2=({winner:e,showWinnerMessage:t,selectedProperty:n,playerValue:r,computerValue:i})=>{const{t:s}=Nt();if(!t)return null;const o=s(e==="Player"?"player":"computer"),l=s(e==="Player"?"computer":"player");return E.jsxs(er.div,{className:"winner-message",initial:{opacity:0},animate:{opacity:1},transition:{duration:.5},children:[E.jsx("h3",{children:e==="Tie"?s("tieMessage"):s("winMessage",{winner:o,loser:l})}),n&&E.jsxs("p",{children:[s(`eigenschaften.${n}`),": ",r," vs ",i]})]})};var Jg={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},Zu={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},q2=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],Hs={CSS:{},springs:{}};function at(e,t,n){return Math.min(Math.max(e,t),n)}function Gr(e,t){return e.indexOf(t)>-1}function fa(e,t){return e.apply(null,t)}var b={arr:function(e){return Array.isArray(e)},obj:function(e){return Gr(Object.prototype.toString.call(e),"Object")},pth:function(e){return b.obj(e)&&e.hasOwnProperty("totalLength")},svg:function(e){return e instanceof SVGElement},inp:function(e){return e instanceof HTMLInputElement},dom:function(e){return e.nodeType||b.svg(e)},str:function(e){return typeof e=="string"},fnc:function(e){return typeof e=="function"},und:function(e){return typeof e>"u"},nil:function(e){return b.und(e)||e===null},hex:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)},rgb:function(e){return/^rgb/.test(e)},hsl:function(e){return/^hsl/.test(e)},col:function(e){return b.hex(e)||b.rgb(e)||b.hsl(e)},key:function(e){return!Jg.hasOwnProperty(e)&&!Zu.hasOwnProperty(e)&&e!=="targets"&&e!=="keyframes"}};function ey(e){var t=/\(([^)]+)\)/.exec(e);return t?t[1].split(",").map(function(n){return parseFloat(n)}):[]}function ty(e,t){var n=ey(e),r=at(b.und(n[0])?1:n[0],.1,100),i=at(b.und(n[1])?100:n[1],.1,100),s=at(b.und(n[2])?10:n[2],.1,100),o=at(b.und(n[3])?0:n[3],.1,100),l=Math.sqrt(i/r),a=s/(2*Math.sqrt(i*r)),u=a<1?l*Math.sqrt(1-a*a):0,c=1,f=a<1?(a*l+-o)/u:-o+l;function d(y){var v=t?t*y/1e3:y;return a<1?v=Math.exp(-v*a*l)*(c*Math.cos(u*v)+f*Math.sin(u*v)):v=(c+f*v)*Math.exp(-v*l),y===0||y===1?y:1-v}function m(){var y=Hs.springs[e];if(y)return y;for(var v=1/6,S=0,g=0;;)if(S+=v,d(S)===1){if(g++,g>=16)break}else g=0;var h=S*v*1e3;return Hs.springs[e]=h,h}return t?d:m}function Z2(e){return e===void 0&&(e=10),function(t){return Math.ceil(at(t,1e-6,1)*e)*(1/e)}}var J2=function(){var e=11,t=1/(e-1);function n(c,f){return 1-3*f+3*c}function r(c,f){return 3*f-6*c}function i(c){return 3*c}function s(c,f,d){return((n(f,d)*c+r(f,d))*c+i(f))*c}function o(c,f,d){return 3*n(f,d)*c*c+2*r(f,d)*c+i(f)}function l(c,f,d,m,y){var v,S,g=0;do S=f+(d-f)/2,v=s(S,m,y)-c,v>0?d=S:f=S;while(Math.abs(v)>1e-7&&++g<10);return S}function a(c,f,d,m){for(var y=0;y<4;++y){var v=o(f,d,m);if(v===0)return f;var S=s(f,d,m)-c;f-=S/v}return f}function u(c,f,d,m){if(!(0<=c&&c<=1&&0<=d&&d<=1))return;var y=new Float32Array(e);if(c!==f||d!==m)for(var v=0;v=.001?a(g,C,c,d):R===0?C:l(g,h,h+t,c,d)}return function(g){return c===f&&d===m||g===0||g===1?g:s(S(g),f,m)}}return u}(),ny=function(){var e={linear:function(){return function(r){return r}}},t={Sine:function(){return function(r){return 1-Math.cos(r*Math.PI/2)}},Expo:function(){return function(r){return r?Math.pow(2,10*r-10):0}},Circ:function(){return function(r){return 1-Math.sqrt(1-r*r)}},Back:function(){return function(r){return r*r*(3*r-2)}},Bounce:function(){return function(r){for(var i,s=4;r<((i=Math.pow(2,--s))-1)/11;);return 1/Math.pow(4,3-s)-7.5625*Math.pow((i*3-2)/22-r,2)}},Elastic:function(r,i){r===void 0&&(r=1),i===void 0&&(i=.5);var s=at(r,1,10),o=at(i,.1,2);return function(l){return l===0||l===1?l:-s*Math.pow(2,10*(l-1))*Math.sin((l-1-o/(Math.PI*2)*Math.asin(1/s))*(Math.PI*2)/o)}}},n=["Quad","Cubic","Quart","Quint"];return n.forEach(function(r,i){t[r]=function(){return function(s){return Math.pow(s,i+2)}}}),Object.keys(t).forEach(function(r){var i=t[r];e["easeIn"+r]=i,e["easeOut"+r]=function(s,o){return function(l){return 1-i(s,o)(1-l)}},e["easeInOut"+r]=function(s,o){return function(l){return l<.5?i(s,o)(l*2)/2:1-i(s,o)(l*-2+2)/2}},e["easeOutIn"+r]=function(s,o){return function(l){return l<.5?(1-i(s,o)(1-l*2))/2:(i(s,o)(l*2-1)+1)/2}}}),e}();function Ju(e,t){if(b.fnc(e))return e;var n=e.split("(")[0],r=ny[n],i=ey(e);switch(n){case"spring":return ty(e,t);case"cubicBezier":return fa(J2,i);case"steps":return fa(Z2,i);default:return fa(r,i)}}function ry(e){try{var t=document.querySelectorAll(e);return t}catch{return}}function Po(e,t){for(var n=e.length,r=arguments.length>=2?arguments[1]:void 0,i=[],s=0;s1&&(y-=1),y<1/6?d+(m-d)*6*y:y<1/2?m:y<2/3?d+(m-d)*(2/3-y)*6:d}var l,a,u;if(r==0)l=a=u=i;else{var c=i<.5?i*(1+r):i+r-i*r,f=2*i-c;l=o(f,c,n+1/3),a=o(f,c,n),u=o(f,c,n-1/3)}return"rgba("+l*255+","+a*255+","+u*255+","+s+")"}function rP(e){if(b.rgb(e))return eP(e);if(b.hex(e))return tP(e);if(b.hsl(e))return nP(e)}function kt(e){var t=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(e);if(t)return t[1]}function iP(e){if(Gr(e,"translate")||e==="perspective")return"px";if(Gr(e,"rotate")||Gr(e,"skew"))return"deg"}function kl(e,t){return b.fnc(e)?e(t.target,t.id,t.total):e}function lt(e,t){return e.getAttribute(t)}function nc(e,t,n){var r=kt(t);if(ec([n,"deg","rad","turn"],r))return t;var i=Hs.CSS[t+n];if(!b.und(i))return i;var s=100,o=document.createElement(e.tagName),l=e.parentNode&&e.parentNode!==document?e.parentNode:document.body;l.appendChild(o),o.style.position="absolute",o.style.width=s+n;var a=s/o.offsetWidth;l.removeChild(o);var u=a*parseFloat(t);return Hs.CSS[t+n]=u,u}function iy(e,t,n){if(t in e.style){var r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=e.style[t]||getComputedStyle(e).getPropertyValue(r)||"0";return n?nc(e,i,n):i}}function rc(e,t){if(b.dom(e)&&!b.inp(e)&&(!b.nil(lt(e,t))||b.svg(e)&&e[t]))return"attribute";if(b.dom(e)&&ec(q2,t))return"transform";if(b.dom(e)&&t!=="transform"&&iy(e,t))return"css";if(e[t]!=null)return"object"}function sy(e){if(b.dom(e)){for(var t=e.style.transform||"",n=/(\w+)\(([^)]*)\)/g,r=new Map,i;i=n.exec(t);)r.set(i[1],i[2]);return r}}function sP(e,t,n,r){var i=Gr(t,"scale")?1:0+iP(t),s=sy(e).get(t)||i;return n&&(n.transforms.list.set(t,s),n.transforms.last=t),r?nc(e,s,r):s}function ic(e,t,n,r){switch(rc(e,t)){case"transform":return sP(e,t,r,n);case"css":return iy(e,t,n);case"attribute":return lt(e,t);default:return e[t]||0}}function sc(e,t){var n=/^(\*=|\+=|-=)/.exec(e);if(!n)return e;var r=kt(e)||0,i=parseFloat(t),s=parseFloat(e.replace(n[0],""));switch(n[0][0]){case"+":return i+s+r;case"-":return i-s+r;case"*":return i*s+r}}function oy(e,t){if(b.col(e))return rP(e);if(/\s/g.test(e))return e;var n=kt(e),r=n?e.substr(0,e.length-n.length):e;return t?r+t:r}function oc(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function oP(e){return Math.PI*2*lt(e,"r")}function aP(e){return lt(e,"width")*2+lt(e,"height")*2}function lP(e){return oc({x:lt(e,"x1"),y:lt(e,"y1")},{x:lt(e,"x2"),y:lt(e,"y2")})}function ay(e){for(var t=e.points,n=0,r,i=0;i0&&(n+=oc(r,s)),r=s}return n}function uP(e){var t=e.points;return ay(e)+oc(t.getItem(t.numberOfItems-1),t.getItem(0))}function ly(e){if(e.getTotalLength)return e.getTotalLength();switch(e.tagName.toLowerCase()){case"circle":return oP(e);case"rect":return aP(e);case"line":return lP(e);case"polyline":return ay(e);case"polygon":return uP(e)}}function cP(e){var t=ly(e);return e.setAttribute("stroke-dasharray",t),t}function fP(e){for(var t=e.parentNode;b.svg(t)&&b.svg(t.parentNode);)t=t.parentNode;return t}function uy(e,t){var n=t||{},r=n.el||fP(e),i=r.getBoundingClientRect(),s=lt(r,"viewBox"),o=i.width,l=i.height,a=n.viewBox||(s?s.split(" "):[0,0,o,l]);return{el:r,viewBox:a,x:a[0]/1,y:a[1]/1,w:o,h:l,vW:a[2],vH:a[3]}}function dP(e,t){var n=b.str(e)?ry(e)[0]:e,r=t||100;return function(i){return{property:i,el:n,svg:uy(n),totalLength:ly(n)*(r/100)}}}function hP(e,t,n){function r(c){c===void 0&&(c=0);var f=t+c>=1?t+c:0;return e.el.getPointAtLength(f)}var i=uy(e.el,e.svg),s=r(),o=r(-1),l=r(1),a=n?1:i.w/i.vW,u=n?1:i.h/i.vH;switch(e.property){case"x":return(s.x-i.x)*a;case"y":return(s.y-i.y)*u;case"angle":return Math.atan2(l.y-o.y,l.x-o.x)*180/Math.PI}}function Fd(e,t){var n=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,r=oy(b.pth(e)?e.totalLength:e,t)+"";return{original:r,numbers:r.match(n)?r.match(n).map(Number):[0],strings:b.str(e)||t?r.split(n):[]}}function ac(e){var t=e?Co(b.arr(e)?e.map(Id):Id(e)):[];return Po(t,function(n,r,i){return i.indexOf(n)===r})}function cy(e){var t=ac(e);return t.map(function(n,r){return{target:n,id:r,total:t.length,transforms:{list:sy(n)}}})}function pP(e,t){var n=tc(t);if(/^spring/.test(n.easing)&&(n.duration=ty(n.easing)),b.arr(e)){var r=e.length,i=r===2&&!b.obj(e[0]);i?e={value:e}:b.fnc(t.duration)||(n.duration=t.duration/r)}var s=b.arr(e)?e:[e];return s.map(function(o,l){var a=b.obj(o)&&!b.pth(o)?o:{value:o};return b.und(a.delay)&&(a.delay=l?0:t.delay),b.und(a.endDelay)&&(a.endDelay=l===s.length-1?t.endDelay:0),a}).map(function(o){return To(o,n)})}function mP(e){for(var t=Po(Co(e.map(function(s){return Object.keys(s)})),function(s){return b.key(s)}).reduce(function(s,o){return s.indexOf(o)<0&&s.push(o),s},[]),n={},r=function(s){var o=t[s];n[o]=e.map(function(l){var a={};for(var u in l)b.key(u)?u==o&&(a.value=l[u]):a[u]=l[u];return a})},i=0;i0&&(e=requestAnimationFrame(n))}function n(i){for(var s=et.length,o=0;o0?requestAnimationFrame(n):void 0}function r(){W.suspendWhenDocumentHidden&&(_d()?e=cancelAnimationFrame(e):(et.forEach(function(i){return i._onDocumentVisibility()}),py()))}return typeof document<"u"&&document.addEventListener("visibilitychange",r),t}();function _d(){return!!document&&document.hidden}function W(e){e===void 0&&(e={});var t=0,n=0,r=0,i,s=0,o=null;function l(h){var p=window.Promise&&new Promise(function(w){return o=w});return h.finished=p,p}var a=SP(e);l(a);function u(){var h=a.direction;h!=="alternate"&&(a.direction=h!=="normal"?"normal":"reverse"),a.reversed=!a.reversed,i.forEach(function(p){return p.reversed=a.reversed})}function c(h){return a.reversed?a.duration-h:h}function f(){t=0,n=c(a.currentTime)*(1/W.speed)}function d(h,p){p&&p.seek(h-p.timelineOffset)}function m(h){if(a.reversePlayback)for(var w=s;w--;)d(h,i[w]);else for(var p=0;p2||(D=Math.round(D*le)/le)),x.push(D)}var Z=q.length;if(!Z)F=x[0];else{F=q[0];for(var J=0;J0&&(a.began=!0,v("begin")),!a.loopBegan&&a.currentTime>0&&(a.loopBegan=!0,v("loopBegin")),C<=w&&a.currentTime!==0&&y(0),(C>=P&&a.currentTime!==p||!p)&&y(p),C>w&&C=p&&(n=0,S(),a.remaining?(t=r,v("loopComplete"),a.loopBegan=!1,a.direction==="alternate"&&u()):(a.paused=!0,a.completed||(a.completed=!0,v("loopComplete"),v("complete"),!a.passThrough&&"Promise"in window&&(o(),l(a)))))}return a.reset=function(){var h=a.direction;a.passThrough=!1,a.currentTime=0,a.progress=0,a.paused=!0,a.began=!1,a.loopBegan=!1,a.changeBegan=!1,a.completed=!1,a.changeCompleted=!1,a.reversePlayback=!1,a.reversed=h==="reverse",a.remaining=a.loop,i=a.children,s=i.length;for(var p=s;p--;)a.children[p].reset();(a.reversed&&a.loop!==!0||h==="alternate"&&a.loop===1)&&a.remaining++,y(a.reversed?a.duration:0)},a._onDocumentVisibility=f,a.set=function(h,p){return dy(h,p),a},a.tick=function(h){r=h,t||(t=r),g((r+(n-t))*W.speed)},a.seek=function(h){g(c(h))},a.pause=function(){a.paused=!0,f()},a.play=function(){a.paused&&(a.completed&&a.reset(),a.paused=!1,et.push(a),f(),py())},a.reverse=function(){u(),a.completed=!a.reversed,f()},a.restart=function(){a.reset(),a.play()},a.remove=function(h){var p=ac(h);my(p,a)},a.reset(),a.autoplay&&a.play(),a}function Bd(e,t){for(var n=t.length;n--;)ec(e,t[n].animatable.target)&&t.splice(n,1)}function my(e,t){var n=t.animations,r=t.children;Bd(e,n);for(var i=r.length;i--;){var s=r[i],o=s.animations;Bd(e,o),!o.length&&!s.children.length&&r.splice(i,1)}!n.length&&!r.length&&t.pause()}function PP(e){for(var t=ac(e),n=et.length;n--;){var r=et[n];my(t,r)}}function CP(e,t){t===void 0&&(t={});var n=t.direction||"normal",r=t.easing?Ju(t.easing):null,i=t.grid,s=t.axis,o=t.from||0,l=o==="first",a=o==="center",u=o==="last",c=b.arr(e),f=parseFloat(c?e[0]:e),d=c?parseFloat(e[1]):0,m=kt(c?e[1]:e)||0,y=t.start||0+(c?f:0),v=[],S=0;return function(g,h,p){if(l&&(o=0),a&&(o=(p-1)/2),u&&(o=p-1),!v.length){for(var w=0;w-1&&et.splice(i,1);function o(d){d.passThrough=!0}for(var l=0;l{const[t,n]=L.useState(!1),{t:r}=Nt();L.useEffect(()=>{W.timeline({complete:()=>{n(!0),e&&e()}}).add({targets:".text span",translateX:[1e3,0],scale:[1,1],opacity:[0,1],easing:"easeOutExpo",duration:2500,delay:W.stagger(100)}).add({targets:".text span",translateX:[0,500],scale:[1,50],opacity:[1,0],easing:"easeOutExpo",duration:1500,delay:W.stagger(100)})},[e]);const i=r("title").split("").map((s,o)=>E.jsxs("span",{style:{display:"inline-block"},children:[s===" "?" ":s," "]},o));return E.jsx("div",{className:"welcome-animation",style:{display:t?"none":"block"},children:E.jsx("section",{children:E.jsx("h2",{className:"text",children:i})})})},EP=({src:e,playing:t})=>{const n=L.useRef(null);return L.useEffect(()=>(n.current?n.current.src=e:n.current=new Audio(e),()=>{n.current&&(n.current.pause(),n.current.removeAttribute("src"),n.current.load())}),[e]),L.useEffect(()=>{var r,i;t?(r=n.current)==null||r.play().catch(s=>console.error("Error playing audio:",s)):(i=n.current)==null||i.pause()},[t]),null},LP=({playerWon:e})=>{const t=L.useRef(null),n=e?"You Win!":"You Lose!",r="#fff",i=e?"#4CAF50":"#e80202";return L.useEffect(()=>{const s=t.current,o=e?"block-green":"block-red";for(let a=0;a<25;a++){const u=document.createElement("div");u.classList.add("block",o);const c=a%Fs.length,f=Fs[c],d=`/cardBattle/assets/images/${f.image}`,m=f.name,y=document.createElement("img");y.src=d,y.style.width="100%",y.style.height="auto";const v=document.createElement("p");v.textContent=m,v.style.color="#fff",v.style.textAlign="center",u.appendChild(y),u.appendChild(v),s&&s.appendChild(u)}const l=()=>{W({targets:s.querySelectorAll(".block"),translateX:()=>W.random(-700,700),translateY:()=>W.random(-700,700),scale:()=>W.random(.5,5),easing:"easeInOutQuad",duration:3e3,complete:l})};l()},[e]),E.jsx("div",{className:"end-animation-container",ref:t,style:{background:i},children:E.jsxs("div",{className:"end-animation-content",children:[E.jsxs("h2",{className:"end-animation-message",style:{color:r},children:[E.jsxs("span",{children:["Money Wars",E.jsx("br",{})]}),n]}),E.jsx("button",{className:"end-animation-button",onClick:()=>window.location.reload(),children:"Play Again"})]})})},OP=({className:e})=>{const{i18n:t}=Nt(),n=r=>{t.changeLanguage(r)};return E.jsxs("div",{children:[E.jsx("button",{className:e,onClick:()=>n("de"),children:"Deutsch"}),E.jsx("button",{className:e,onClick:()=>n("en"),children:"English"})]})},RP=({className:e})=>{const[t,n]=L.useState(!1),{t:r}=Nt(),i=()=>{n(!t)},s=o=>{navigator.clipboard.writeText(o).then(()=>{alert("Copied to clipboard")})};return E.jsxs(E.Fragment,{children:[E.jsx("button",{className:e,onClick:i,children:"Info"}),t&&E.jsx("div",{className:"popup-overlay",children:E.jsxs("div",{className:"popup-content",children:[E.jsxs("div",{className:"about-me",children:[E.jsx("h2",{children:r("info.aboutMe")}),E.jsx("p",{children:r("info.description")}),E.jsxs("p",{children:[r("info.customizeMessage"),E.jsx("div",{children:E.jsxs("a",{href:r("info.githubLink"),target:"_blank",rel:"noopener noreferrer",children:[E.jsx("svg",{height:"32","aria-hidden":"true",viewBox:"0 0 24 24",version:"1.1",width:"32","data-view-component":"true",className:"octicon octicon-mark-github v-align-middle color-fg-default",style:{width:"20px",marginRight:"10px"},children:E.jsx("path",{d:"M12.5.75C6.146.75 1 5.896 1 12.25c0 5.089 3.292 9.387 7.863 10.91.575.101.79-.244.79-.546 0-.273-.014-1.178-.014-2.142-2.889.532-3.636-.704-3.866-1.35-.13-.331-.69-1.352-1.18-1.625-.402-.216-.977-.748-.014-.762.906-.014 1.553.834 1.769 1.179 1.035 1.74 2.688 1.25 3.349.948.1-.747.402-1.25.733-1.538-2.559-.287-5.232-1.279-5.232-5.678 0-1.25.445-2.285 1.178-3.09-.115-.288-.517-1.467.115-3.048 0 0 .963-.302 3.163 1.179.92-.259 1.897-.388 2.875-.388.977 0 1.955.13 2.875.388 2.2-1.495 3.162-1.179 3.162-1.179.633 1.581.23 2.76.115 3.048.733.805 1.179 1.825 1.179 3.09 0 4.413-2.688 5.39-5.247 5.678.417.36.776 1.05.776 2.128 0 1.538-.014 2.774-.014 3.162 0 .302.216.662.79.547C20.709 21.637 24 17.324 24 12.25 24 5.896 18.854.75 12.5.75Z"})}),r("info.github")]})})]}),E.jsxs("p",{children:[E.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{marginRight:"10px"},children:E.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.7502 1.5C13.3359 1.5 13.0002 1.83579 13.0002 2.25C13.0002 2.44257 13.0717 2.61663 13.191 2.74981C13.2963 2.86751 13.4367 2.95067 13.5937 2.98382C13.6435 2.99433 13.6958 3 13.7502 3C14.1644 3 14.5002 2.66421 14.5002 2.25C14.5002 1.83579 14.1644 1.5 13.7502 1.5ZM11.5002 2.25C11.5002 1.00736 12.5075 0 13.7502 0C14.7298 0 15.5632 0.626106 15.8721 1.5H17.2502C17.6644 1.5 18.0002 1.83579 18.0002 2.25C18.0002 2.66421 17.6644 3 17.2502 3H15.8721C15.7646 3.30433 15.5934 3.5786 15.3746 3.80685C15.8823 4.15684 16.2746 4.56859 16.5559 5.03129C17.0977 5.92273 17.1689 6.90747 16.9843 7.79359C16.803 8.66356 16.4559 9.21659 16.076 9.55603C16.0407 9.58759 16.0055 9.61689 15.9707 9.64408C15.9901 9.86441 15.987 10.0911 15.961 10.3234C15.8963 11.095 15.7248 11.9737 14.9635 12.7682C14.447 13.3072 13.7758 13.6448 13.2782 13.8437C13.0474 13.936 12.8402 14.0039 12.6813 14.0508C12.5887 14.2176 12.4689 14.451 12.3551 14.7243C12.1564 15.2017 11.999 15.7473 12.0002 16.2484C12.0011 16.664 12.1111 17.3476 12.2365 17.9768C12.2743 18.1665 12.3122 18.3447 12.3464 18.5001H13.2502C13.6644 18.5001 14.0002 18.8359 14.0002 19.2501C14.0002 19.6643 13.6644 20.0001 13.2502 20.0001H9.50017C9.15558 20.0001 8.85533 19.7653 8.77228 19.4308L9.50017 19.2501C8.77228 19.4308 8.77228 19.4308 8.77228 19.4308L8.77052 19.4237L8.76601 19.4053L8.74947 19.337C8.73534 19.2781 8.71532 19.1935 8.69136 19.0891C8.64351 18.8806 8.5796 18.5917 8.51548 18.2701C8.39148 17.6482 8.25146 16.8318 8.25017 16.2518C8.24854 15.5227 8.455 14.8065 8.6849 14.2341C8.16639 14.1203 7.6883 13.9364 7.28499 13.7003C6.8511 13.4462 6.41419 13.0729 6.17829 12.5938H2.75029C2.4353 12.5938 2.15363 12.3969 2.04556 12.1011C1.93749 11.8052 2.0258 11.4733 2.26663 11.2703L3.18599 10.4953C2.80831 10.4564 2.51374 10.1372 2.51374 9.74926C2.51374 8.4257 3.50881 7.51335 4.62109 6.95581C5.76228 6.38377 7.24656 6.05918 8.72722 5.97699C10.2102 5.89468 11.7615 6.05149 13.0442 6.50251C13.9451 6.81927 14.793 7.31253 15.3456 8.03745C15.4073 7.89899 15.4675 7.71949 15.5158 7.48766C15.6401 6.89125 15.5786 6.31137 15.2741 5.81039C14.9722 5.31375 14.3741 4.8005 13.2451 4.44292C12.7831 4.33682 12.3768 4.0893 12.0732 3.75019C11.7174 3.35262 11.5002 2.82579 11.5002 2.25ZM10.8948 14.3362C10.6852 14.3506 10.4759 14.3595 10.2686 14.3634C10.0228 14.8666 9.74868 15.5834 9.75016 16.2484C9.75109 16.664 9.86108 17.3476 9.98652 17.9768C10.0243 18.1665 10.0622 18.3447 10.0964 18.5001H10.8124C10.7969 18.4258 10.7812 18.349 10.7655 18.2701C10.6415 17.6482 10.5015 16.8318 10.5002 16.2518C10.4986 15.5522 10.6874 14.8745 10.8948 14.3362Z",fill:"#CA36B9"})}),r("info.nostr"),": ",r("info.nostrPubKey"),E.jsx("button",{onClick:()=>s(r("info.nostrPubKey")),style:{marginLeft:"10px"},children:"Copy"})]})]}),E.jsx("div",{children:E.jsx("lightning-widget",{name:r("info.widgetName"),"button-text":r("info.widgetButtonText"),to:"aldobarazutti@getalby.com",labels:"☕,🍺,🍕",amounts:"2500,5000,25000",accent:"#444444"})}),E.jsx("div",{className:"schliesen-button",children:E.jsx("button",{className:"button",onClick:i,children:r("info.closeButton")})})]})})]})},AP=({isPlaying:e,toggleMusic:t,className:n})=>E.jsx("button",{className:n,onClick:t,children:e?"Pause Music":"Play Music"}),MP=({isPlaying:e,toggleMusic:t})=>{const[n,r]=L.useState(!1),[i,s]=L.useState(!1);L.useEffect(()=>{const l=()=>{s(window.innerWidth<=991)};return l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)},[]);const o=()=>{r(!n),document.body.style.overflow=n?"":"hidden"};return E.jsxs(E.Fragment,{children:[E.jsxs("nav",{className:`navbar ${i?"mobile":""} ${n?"expanded":""}`,children:[i&&E.jsx("button",{className:"navbar-toggle",onClick:o,"aria-label":"Toggle navigation",children:n?"✕":"☰"}),E.jsxs("div",{className:"navbar-left",children:[E.jsx(OP,{className:"navbar-button"}),E.jsx(AP,{className:"navbar-button",isPlaying:e,toggleMusic:t}),E.jsx(RP,{className:"navbar-button"})]})]}),E.jsx("div",{className:"navbar-overlay",onClick:()=>n&&o(),"aria-hidden":"true"})]})},DP=({selectedProperty:e,playerValue:t,computerValue:n})=>{const{t:r}=Nt();return e?E.jsxs("div",{className:"last-round-details",children:[E.jsx("h3",{children:r("lastRound")}),E.jsxs("p",{children:[r(`eigenschaften.${e}`),E.jsx("br",{}),r("player"),": ",t,E.jsx("br",{}),r("computer"),": ",n]})]}):null};function NP(){const{t:e}=Nt(),t=m1(),[n,r]=L.useState(!1),[i,s]=L.useState(!1),o="https://walpurga03.github.io/cardBattle/audio/clip.mp3",{playerCards:l,computerCards:a,setPlayerCards:u,setComputerCards:c}=v1(),{drawPile:f,currentPlayerCard:d,currentComputerCard:m,winner:y,isComputerTurn:v,gameOver:S,isComputerCardFlipped:g,animationDirection:h,showWinnerMessage:p,lastRoundDetails:w,handlePropertySelect:P,handleComputerTurn:C}=P1(l,a,u,c);return L.useEffect(()=>{v?document.body.classList.add("computer-turn"):document.body.classList.remove("computer-turn")},[v]),n?t?E.jsx("div",{className:"orientation-warning",children:e("orientationWarning")}):S?E.jsxs("div",{className:"App",children:[E.jsx(LP,{playerWon:y==="Player"})," "]}):E.jsxs("div",{className:"App",children:[E.jsx(MP,{isPlaying:i,toggleMusic:()=>s(!i)}),E.jsx(EP,{src:o,playing:i})," ",E.jsxs("div",{className:"battlefield",children:[E.jsx(Q2,{playerCards:l,currentPlayerCard:d,animationDirection:h,isComputerTurn:v,handlePropertySelect:P}),E.jsx(Y2,{computerCards:a,currentComputerCard:m,isComputerCardFlipped:g,animationDirection:h})]}),E.jsx(X2,{winner:y,showWinnerMessage:p,selectedProperty:w.selectedProperty,playerValue:w.playerValue,computerValue:w.computerValue}),v&&E.jsx("button",{onClick:C,className:"button-highlight","aria-label":e("computerTurnButton",{computer:e("computer")}),children:e("computerTurnButton",{computer:e("computer")})}),w.selectedProperty&&E.jsx(DP,{selectedProperty:w.selectedProperty,playerValue:w.playerValue,computerValue:w.computerValue}),f.length>0&&E.jsx("div",{className:"draw-pile",children:E.jsx("h3",{children:e("drawPile",{count:f.length})})})]}):E.jsx(kP,{onAnimationEnd:()=>r(!0)})}const jP={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Ws{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||jP,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{let[l,a]=o;for(let u=0;u{let[l,a]=o;for(let u=0;u{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},zd=e=>e==null?"":""+e,VP=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},IP=/###/g,$d=e=>e&&e.indexOf("###")>-1?e.replace(IP,"."):e,Ud=e=>!e||typeof e=="string",Qr=(e,t,n)=>{const r=typeof t!="string"?t:t.split(".");let i=0;for(;i{const{obj:r,k:i}=Qr(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let s=t[t.length-1],o=t.slice(0,t.length-1),l=Qr(e,o,Object);for(;l.obj===void 0&&o.length;)s=`${o[o.length-1]}.${s}`,o=o.slice(0,o.length-1),l=Qr(e,o,Object),l&&l.obj&&typeof l.obj[`${l.k}.${s}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${s}`]=n},FP=(e,t,n,r)=>{const{obj:i,k:s}=Qr(e,t,Object);i[s]=i[s]||[],i[s].push(n)},Ks=(e,t)=>{const{obj:n,k:r}=Qr(e,t);if(n)return n[r]},bP=(e,t,n)=>{const r=Ks(e,n);return r!==void 0?r:Ks(t,n)},gy=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):gy(e[r],t[r],n):e[r]=t[r]);return e},Rn=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var _P={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const BP=e=>typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>_P[t]):e;class zP{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const $P=[" ",",","?","!",";"],UP=new zP(20),HP=(e,t,n)=>{t=t||"",n=n||"";const r=$P.filter(o=>t.indexOf(o)<0&&n.indexOf(o)<0);if(r.length===0)return!0;const i=UP.getRegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let s=!i.test(e);if(!s){const o=e.indexOf(n);o>0&&!i.test(e.substring(0,o))&&(s=!0)}return s},El=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let s=0;s-1&&ae&&e.indexOf("_")>0?e.replace("_","-"):e;class Wd extends ko{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.indexOf(".")>-1?l=t.split("."):(l=[t,n],r&&(Array.isArray(r)?l.push(...r):typeof r=="string"&&s?l.push(...r.split(s)):l.push(r)));const a=Ks(this.data,l);return!a&&!n&&!r&&t.indexOf(".")>-1&&(t=l[0],n=l[1],r=l.slice(2).join(".")),a||!o||typeof r!="string"?a:El(this.data&&this.data[t]&&this.data[t][n],r,s)}addResource(t,n,r,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let l=[t,n];r&&(l=l.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(l=t.split("."),i=n,n=l[1]),this.addNamespaces(n),Hd(this.data,l,i),s.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in r)(typeof r[s]=="string"||Array.isArray(r[s]))&&this.addResource(t,n,s,r[s],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[t,n];t.indexOf(".")>-1&&(l=t.split("."),i=r,r=n,n=l[1]),this.addNamespaces(n);let a=Ks(this.data,l)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?gy(a,r,s):a={...a,...r},Hd(this.data,l,a),o.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var yy={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(s=>{this.processors[s]&&(t=this.processors[s].process(t,n,r,i))}),t}};const Kd={};class Qs extends ko{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),VP(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ut.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let s=n.ns||this.options.defaultNS||[];const o=r&&t.indexOf(r)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!HP(t,r,i);if(o&&!l){const a=t.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:t,namespaces:s};const u=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(u[0])>-1)&&(s=u.shift()),t=u.join(i)}return typeof s=="string"&&(s=[s]),{key:t,namespaces:s}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(t[t.length-1],n),a=l[l.length-1],u=n.lng||this.language,c=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const w=n.nsSeparator||this.options.nsSeparator;return i?{res:`${a}${w}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:a,usedParams:this.getUsedParamsDetails(n)}:`${a}${w}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:a,usedParams:this.getUsedParamsDetails(n)}:o}const f=this.resolve(t,n);let d=f&&f.res;const m=f&&f.usedKey||o,y=f&&f.exactUsedKey||o,v=Object.prototype.toString.apply(d),S=["[object Number]","[object Function]","[object RegExp]"],g=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,h=!this.i18nFormat||this.i18nFormat.handleAsObject;if(h&&d&&(typeof d!="string"&&typeof d!="boolean"&&typeof d!="number")&&S.indexOf(v)<0&&!(typeof g=="string"&&Array.isArray(d))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,d,{...n,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(f.res=w,f.usedParams=this.getUsedParamsDetails(n),f):w}if(s){const w=Array.isArray(d),P=w?[]:{},C=w?y:m;for(const R in d)if(Object.prototype.hasOwnProperty.call(d,R)){const T=`${C}${s}${R}`;P[R]=this.translate(T,{...n,joinArrays:!1,ns:l}),P[R]===T&&(P[R]=d[R])}d=P}}else if(h&&typeof g=="string"&&Array.isArray(d))d=d.join(g),d&&(d=this.extendTranslation(d,t,n,r));else{let w=!1,P=!1;const C=n.count!==void 0&&typeof n.count!="string",R=Qs.hasDefaultValue(n),T=C?this.pluralResolver.getSuffix(u,n.count,n):"",V=n.ordinal&&C?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",M=C&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),I=M&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${T}`]||n[`defaultValue${V}`]||n.defaultValue;!this.isValidLookup(d)&&R&&(w=!0,d=I),this.isValidLookup(d)||(P=!0,d=o);const q=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&P?void 0:d,le=R&&I!==d&&this.options.updateMissing;if(P||w||le){if(this.logger.log(le?"updateKey":"missingKey",u,a,o,le?I:d),s){const k=this.resolve(o,{...n,keySeparator:!1});k&&k.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let x=[];const O=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&O&&O[0])for(let k=0;k{const $=R&&N!==d?N:q;this.options.missingKeyHandler?this.options.missingKeyHandler(k,a,D,$,le,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(k,a,D,$,le,n),this.emit("missingKey",k,a,D,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?x.forEach(k=>{const D=this.pluralResolver.getSuffixes(k,n);M&&n[`defaultValue${this.options.pluralSeparator}zero`]&&D.indexOf(`${this.options.pluralSeparator}zero`)<0&&D.push(`${this.options.pluralSeparator}zero`),D.forEach(N=>{F([k],o+N,n[`defaultValue${N}`]||I)})}):F(x,o,I))}d=this.extendTranslation(d,t,n,f,r),P&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${a}:${o}`),(P||w)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${a}:${o}`:o,w?d:void 0):d=this.options.parseMissingKeyHandler(d))}return i?(f.res=d,f.usedParams=this.getUsedParamsDetails(n),f):d}extendTranslation(t,n,r,i,s){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const d=t.match(this.interpolator.nestingRegexp);c=d&&d.length}let f=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language||i.usedLng,r),u){const d=t.match(this.interpolator.nestingRegexp),m=d&&d.length;c1&&arguments[1]!==void 0?arguments[1]:{},r,i,s,o,l;return typeof t=="string"&&(t=[t]),t.forEach(a=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(a,n),c=u.key;i=c;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const d=n.count!==void 0&&typeof n.count!="string",m=d&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),y=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",v=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(S=>{this.isValidLookup(r)||(l=S,!Kd[`${v[0]}-${S}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(Kd[`${v[0]}-${S}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(g=>{if(this.isValidLookup(r))return;o=g;const h=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(h,c,g,S,n);else{let w;d&&(w=this.pluralResolver.getSuffix(g,n.count,n));const P=`${this.options.pluralSeparator}zero`,C=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(h.push(c+w),n.ordinal&&w.indexOf(C)===0&&h.push(c+w.replace(C,this.options.pluralSeparator)),m&&h.push(c+P)),y){const R=`${c}${this.options.contextSeparator}${n.context}`;h.push(R),d&&(h.push(R+w),n.ordinal&&w.indexOf(C)===0&&h.push(R+w.replace(C,this.options.pluralSeparator)),m&&h.push(R+P))}}let p;for(;p=h.pop();)this.isValidLookup(r)||(s=p,r=this.getResource(g,S,p,n))}))})}),{res:r,usedKey:i,exactUsedKey:s,usedLng:o,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const s of n)delete i[s]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const da=e=>e.charAt(0).toUpperCase()+e.slice(1);class Gd{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ut.create("languageUtils")}getScriptPartFromCode(t){if(t=Gs(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Gs(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=da(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=da(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=da(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],s=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):typeof t=="string"&&s(this.formatLanguageCode(t)),r.forEach(o=>{i.indexOf(o)<0&&s(this.formatLanguageCode(o))}),i}}let WP=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],KP={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const GP=["v1","v2","v3"],QP=["v4"],Qd={zero:0,one:1,two:2,few:3,many:4,other:5},YP=()=>{const e={};return WP.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:KP[t.fc]}})}),e};class XP{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=ut.create("pluralResolver"),(!this.options.compatibilityJSON||QP.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=YP(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const r=Gs(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:r,type:i});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];const o=new Intl.PluralRules(r,{type:i});return this.pluralRulesCache[s]=o,o}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,s)=>Qd[i]-Qd[s]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const s=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?s():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!GP.includes(this.options.compatibilityJSON)}}const Yd=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=bP(e,t,n);return!s&&i&&typeof n=="string"&&(s=El(e,n,r),s===void 0&&(s=El(t,n,r))),s},ha=e=>e.replace(/\$/g,"$$$$");class qP{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ut.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:s,prefixEscaped:o,suffix:l,suffixEscaped:a,formatSeparator:u,unescapeSuffix:c,unescapePrefix:f,nestingPrefix:d,nestingPrefixEscaped:m,nestingSuffix:y,nestingSuffixEscaped:v,nestingOptionsSeparator:S,maxReplaces:g,alwaysFormat:h}=t.interpolation;this.escape=n!==void 0?n:BP,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?Rn(s):o||"{{",this.suffix=l?Rn(l):a||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?Rn(d):m||Rn("$t("),this.nestingSuffix=y?Rn(y):v||Rn(")"),this.nestingOptionsSeparator=S||",",this.maxReplaces=g||1e3,this.alwaysFormat=h!==void 0?h:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let s,o,l;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=m=>{if(m.indexOf(this.formatSeparator)<0){const g=Yd(n,a,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(g,void 0,r,{...i,...n,interpolationkey:m}):g}const y=m.split(this.formatSeparator),v=y.shift().trim(),S=y.join(this.formatSeparator).trim();return this.format(Yd(n,a,v,this.options.keySeparator,this.options.ignoreJSONStructure),S,r,{...i,...n,interpolationkey:v})};this.resetRegExp();const c=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>ha(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?ha(this.escape(m)):ha(m)}].forEach(m=>{for(l=0;s=m.regex.exec(t);){const y=s[1].trim();if(o=u(y),o===void 0)if(typeof c=="function"){const S=c(t,s,i);o=typeof S=="string"?S:""}else if(i&&Object.prototype.hasOwnProperty.call(i,y))o="";else if(f){o=s[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${t}`),o="";else typeof o!="string"&&!this.useRawValueToEscape&&(o=zd(o));const v=m.safeValue(o);if(t=t.replace(s[0],v),f?(m.regex.lastIndex+=o.length,m.regex.lastIndex-=s[0].length):m.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,o;const l=(a,u)=>{const c=this.nestingOptionsSeparator;if(a.indexOf(c)<0)return a;const f=a.split(new RegExp(`${c}[ ]*{`));let d=`{${f[1]}`;a=f[0],d=this.interpolate(d,o);const m=d.match(/'/g),y=d.match(/"/g);(m&&m.length%2===0&&!y||y.length%2!==0)&&(d=d.replace(/'/g,'"'));try{o=JSON.parse(d),u&&(o={...u,...o})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${a}`,v),`${a}${c}${d}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,a};for(;i=this.nestingRegexp.exec(t);){let a=[];o={...r},o=o.replace&&typeof o.replace!="string"?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(f=>f.trim());i[1]=c.shift(),a=c,u=!0}if(s=n(l.call(this,i[1].trim(),o),o),s&&i[0]===t&&typeof s!="string")return s;typeof s!="string"&&(s=zd(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),s=""),u&&(s=a.reduce((c,f)=>this.format(c,f,r.lng,{...r,interpolationkey:i[1].trim()}),s.trim())),t=t.replace(i[0],s),this.regexp.lastIndex=0}return t}}const ZP=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(o=>{if(o){const[l,...a]=o.split(":"),u=a.join(":").trim().replace(/^'+|'+$/g,""),c=l.trim();n[c]||(n[c]=u),u==="false"&&(n[c]=!1),u==="true"&&(n[c]=!0),isNaN(u)||(n[c]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},An=e=>{const t={};return(n,r,i)=>{let s=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(s={...s,[i.interpolationkey]:void 0});const o=r+JSON.stringify(s);let l=t[o];return l||(l=e(Gs(r),i),t[o]=l),l(n)}};class JP{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ut.create("formatter"),this.options=t,this.formats={number:An((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return s=>i.format(s)}),currency:An((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return s=>i.format(s)}),datetime:An((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return s=>i.format(s)}),relativetime:An((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return s=>i.format(s,r.range||"day")}),list:An((n,r)=>{const i=new Intl.ListFormat(n,{...r});return s=>i.format(s)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=An(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=n.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(l=>l.indexOf(")")>-1)){const l=s.findIndex(a=>a.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,l)].join(this.formatSeparator)}return s.reduce((l,a)=>{const{formatName:u,formatOptions:c}=ZP(a);if(this.formats[u]){let f=l;try{const d=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},m=d.locale||d.lng||i.locale||i.lng||r;f=this.formats[u](l,m,{...c,...i,...d})}catch(d){this.logger.warn(d)}return f}else this.logger.warn(`there was no format function for ${u}`);return l},t)}}const eC=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class tC extends ko{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=ut.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const s={},o={},l={},a={};return t.forEach(u=>{let c=!0;n.forEach(f=>{const d=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?o[d]===void 0&&(o[d]=!0):(this.state[d]=1,c=!1,o[d]===void 0&&(o[d]=!0),s[d]===void 0&&(s[d]=!0),a[f]===void 0&&(a[f]=!0)))}),c||(l[u]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(a)}}loaded(t,n,r){const i=t.split("|"),s=i[0],o=i[1];n&&this.emit("failedLoading",s,o,n),!n&&r&&this.store.addResourceBundle(s,o,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const l={};this.queue.forEach(a=>{FP(a.loaded,[s],o),eC(a,t),n&&a.errors.push(n),a.pendingCount===0&&!a.done&&(Object.keys(a.loaded).forEach(u=>{l[u]||(l[u]={});const c=a.loaded[u];c.length&&c.forEach(f=>{l[u][f]===void 0&&(l[u][f]=!0)})}),a.done=!0,a.errors.length?a.callback(a.errors):a.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(a=>!a.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:s,callback:o});return}this.readingCalls++;const l=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&c&&i{this.read.call(this,t,n,r,i+1,s*2,o)},s);return}o(u,c)},a=this.backend[r].bind(this.backend);if(a.length===2){try{const u=a(t,n);u&&typeof u.then=="function"?u.then(c=>l(null,c)).catch(l):l(null,u)}catch(u){l(u)}return}return a(t,n,l)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const s=this.queueLoad(t,n,r,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(o=>{this.loadOne(o)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],s=r[1];this.read(i,s,"read",void 0,void 0,(o,l)=>{o&&this.logger.warn(`${n}loading namespace ${s} for language ${i} failed`,o),!o&&l&&this.logger.log(`${n}loaded namespace ${s} for language ${i}`,l),this.loaded(t,o,l)})}saveMissing(t,n,r,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const a={...o,isUpdate:s},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(t,n,r,i,a):c=u(t,n,r,i),c&&typeof c.then=="function"?c.then(f=>l(null,f)).catch(l):l(null,c)}catch(c){l(c)}else u(t,n,r,i,l,a)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const Xd=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),qd=e=>(typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Xi=()=>{},nC=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class yi extends ko{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=qd(t),this.services={},this.logger=ut,this.modules={external:[]},nC(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=Xd();this.options={...i,...this.options,...qd(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const s=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?ut.init(s(this.modules.logger),this.options):ut.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=JP);const f=new Gd(this.options);this.store=new Wd(this.options.resources,this.options);const d=this.services;d.logger=ut,d.resourceStore=this.store,d.languageUtils=f,d.pluralResolver=new XP(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(d.formatter=s(c),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new qP(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new tC(s(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(m){for(var y=arguments.length,v=new Array(y>1?y-1:0),S=1;S1?y-1:0),S=1;S{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Xi),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});const a=Tr(),u=()=>{const c=(f,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(d),r(f,d)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),a}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xi;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const s=[],o=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(u=>{u!=="cimode"&&s.indexOf(u)<0&&s.push(u)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(a=>o(a)),this.options.preload&&this.options.preload.forEach(l=>o(l)),this.services.backendConnector.load(s,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(l)})}else r(null)}reloadResources(t,n,r){const i=Tr();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Xi),this.services.backendConnector.reload(t,n,s=>{i.resolve(),r(s)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&yy.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=Tr();this.emit("languageChanging",t);const s=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},o=(a,u)=>{u?(s(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(a,function(){return r.t(...arguments)})},l=a=>{!t&&!a&&this.services.languageDetector&&(a=[]);const u=typeof a=="string"?a:this.services.languageUtils.getBestMatchFromCodes(a);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{o(c,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(t),i}getFixedT(t,n,r){var i=this;const s=function(o,l){let a;if(typeof l!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),f=2;f`${a.keyPrefix}${d}${y}`):m=a.keyPrefix?`${a.keyPrefix}${d}${o}`:o,i.t(m,a)};return typeof t=="string"?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(l,a)=>{const u=this.services.backendConnector.state[`${l}|${a}`];return u===-1||u===0||u===2};if(n.precheck){const l=n.precheck(this,o);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,t)&&(!i||o(s,t)))}loadNamespaces(t,n){const r=Tr();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Tr();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],s=t.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return s.length?(this.options.preload=i.concat(s),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new Gd(Xd());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new yi(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xi;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},s=new yi(i);return(t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(l=>{s[l]=this[l]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},r&&(s.store=new Wd(this.store.data,i),s.services.resourceStore=s.store),s.translator=new Qs(s.services,i),s.translator.on("*",function(l){for(var a=arguments.length,u=new Array(a>1?a-1:0),c=1;c"u"?"undefined":Ll(XMLHttpRequest))==="object"}function rC(e){return!!e&&typeof e.then=="function"}function iC(e){return rC(e)?e:Promise.resolve(e)}function sC(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ol={exports:{}},qi={exports:{}},Zd;function oC(){return Zd||(Zd=1,function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Nr<"u"&&Nr,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(o){var l=typeof s<"u"&&s||typeof self<"u"&&self||typeof l<"u"&&l,a={searchParams:"URLSearchParams"in l,iterable:"Symbol"in l&&"iterator"in Symbol,blob:"FileReader"in l&&"Blob"in l&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in l,arrayBuffer:"ArrayBuffer"in l};function u(x){return x&&DataView.prototype.isPrototypeOf(x)}if(a.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(x){return x&&c.indexOf(Object.prototype.toString.call(x))>-1};function d(x){if(typeof x!="string"&&(x=String(x)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(x)||x==="")throw new TypeError('Invalid character in header field name: "'+x+'"');return x.toLowerCase()}function m(x){return typeof x!="string"&&(x=String(x)),x}function y(x){var O={next:function(){var F=x.shift();return{done:F===void 0,value:F}}};return a.iterable&&(O[Symbol.iterator]=function(){return O}),O}function v(x){this.map={},x instanceof v?x.forEach(function(O,F){this.append(F,O)},this):Array.isArray(x)?x.forEach(function(O){this.append(O[0],O[1])},this):x&&Object.getOwnPropertyNames(x).forEach(function(O){this.append(O,x[O])},this)}v.prototype.append=function(x,O){x=d(x),O=m(O);var F=this.map[x];this.map[x]=F?F+", "+O:O},v.prototype.delete=function(x){delete this.map[d(x)]},v.prototype.get=function(x){return x=d(x),this.has(x)?this.map[x]:null},v.prototype.has=function(x){return this.map.hasOwnProperty(d(x))},v.prototype.set=function(x,O){this.map[d(x)]=m(O)},v.prototype.forEach=function(x,O){for(var F in this.map)this.map.hasOwnProperty(F)&&x.call(O,this.map[F],F,this)},v.prototype.keys=function(){var x=[];return this.forEach(function(O,F){x.push(F)}),y(x)},v.prototype.values=function(){var x=[];return this.forEach(function(O){x.push(O)}),y(x)},v.prototype.entries=function(){var x=[];return this.forEach(function(O,F){x.push([F,O])}),y(x)},a.iterable&&(v.prototype[Symbol.iterator]=v.prototype.entries);function S(x){if(x.bodyUsed)return Promise.reject(new TypeError("Already read"));x.bodyUsed=!0}function g(x){return new Promise(function(O,F){x.onload=function(){O(x.result)},x.onerror=function(){F(x.error)}})}function h(x){var O=new FileReader,F=g(O);return O.readAsArrayBuffer(x),F}function p(x){var O=new FileReader,F=g(O);return O.readAsText(x),F}function w(x){for(var O=new Uint8Array(x),F=new Array(O.length),k=0;k-1?O:x}function V(x,O){if(!(this instanceof V))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');O=O||{};var F=O.body;if(x instanceof V){if(x.bodyUsed)throw new TypeError("Already read");this.url=x.url,this.credentials=x.credentials,O.headers||(this.headers=new v(x.headers)),this.method=x.method,this.mode=x.mode,this.signal=x.signal,!F&&x._bodyInit!=null&&(F=x._bodyInit,x.bodyUsed=!0)}else this.url=String(x);if(this.credentials=O.credentials||this.credentials||"same-origin",(O.headers||!this.headers)&&(this.headers=new v(O.headers)),this.method=T(O.method||this.method||"GET"),this.mode=O.mode||this.mode||null,this.signal=O.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&F)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(F),(this.method==="GET"||this.method==="HEAD")&&(O.cache==="no-store"||O.cache==="no-cache")){var k=/([?&])_=[^&]*/;if(k.test(this.url))this.url=this.url.replace(k,"$1_="+new Date().getTime());else{var D=/\?/;this.url+=(D.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}V.prototype.clone=function(){return new V(this,{body:this._bodyInit})};function M(x){var O=new FormData;return x.trim().split("&").forEach(function(F){if(F){var k=F.split("="),D=k.shift().replace(/\+/g," "),N=k.join("=").replace(/\+/g," ");O.append(decodeURIComponent(D),decodeURIComponent(N))}}),O}function I(x){var O=new v,F=x.replace(/\r?\n[\t ]+/g," ");return F.split("\r").map(function(k){return k.indexOf(` +`)===0?k.substr(1,k.length):k}).forEach(function(k){var D=k.split(":"),N=D.shift().trim();if(N){var $=D.join(":").trim();O.append(N,$)}}),O}C.call(V.prototype);function K(x,O){if(!(this instanceof K))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');O||(O={}),this.type="default",this.status=O.status===void 0?200:O.status,this.ok=this.status>=200&&this.status<300,this.statusText=O.statusText===void 0?"":""+O.statusText,this.headers=new v(O.headers),this.url=O.url||"",this._initBody(x)}C.call(K.prototype),K.prototype.clone=function(){return new K(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new v(this.headers),url:this.url})},K.error=function(){var x=new K(null,{status:0,statusText:""});return x.type="error",x};var q=[301,302,303,307,308];K.redirect=function(x,O){if(q.indexOf(O)===-1)throw new RangeError("Invalid status code");return new K(null,{status:O,headers:{location:x}})},o.DOMException=l.DOMException;try{new o.DOMException}catch{o.DOMException=function(O,F){this.message=O,this.name=F;var k=Error(O);this.stack=k.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function le(x,O){return new Promise(function(F,k){var D=new V(x,O);if(D.signal&&D.signal.aborted)return k(new o.DOMException("Aborted","AbortError"));var N=new XMLHttpRequest;function $(){N.abort()}N.onload=function(){var J={status:N.status,statusText:N.statusText,headers:I(N.getAllResponseHeaders()||"")};J.url="responseURL"in N?N.responseURL:J.headers.get("X-Request-URL");var ke="response"in N?N.response:N.responseText;setTimeout(function(){F(new K(ke,J))},0)},N.onerror=function(){setTimeout(function(){k(new TypeError("Network request failed"))},0)},N.ontimeout=function(){setTimeout(function(){k(new TypeError("Network request failed"))},0)},N.onabort=function(){setTimeout(function(){k(new o.DOMException("Aborted","AbortError"))},0)};function Z(J){try{return J===""&&l.location.href?l.location.href:J}catch{return J}}N.open(D.method,Z(D.url),!0),D.credentials==="include"?N.withCredentials=!0:D.credentials==="omit"&&(N.withCredentials=!1),"responseType"in N&&(a.blob?N.responseType="blob":a.arrayBuffer&&D.headers.get("Content-Type")&&D.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(N.responseType="arraybuffer")),O&&typeof O.headers=="object"&&!(O.headers instanceof v)?Object.getOwnPropertyNames(O.headers).forEach(function(J){N.setRequestHeader(J,m(O.headers[J]))}):D.headers.forEach(function(J,ke){N.setRequestHeader(ke,J)}),D.signal&&(D.signal.addEventListener("abort",$),N.onreadystatechange=function(){N.readyState===4&&D.signal.removeEventListener("abort",$)}),N.send(typeof D._bodyInit>"u"?null:D._bodyInit)})}return le.polyfill=!0,l.fetch||(l.fetch=le,l.Headers=v,l.Request=V,l.Response=K),o.Headers=v,o.Request=V,o.Response=K,o.fetch=le,o})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=n.fetch?n:r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(qi,qi.exports)),qi.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof Nr<"u"&&Nr.fetch?n=Nr.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof sC<"u"&&typeof window>"u"){var r=n||oC();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(Ol,Ol.exports);var wy=Ol.exports;const xy=Ey(wy),Jd=ky({__proto__:null,default:xy},[wy]);function eh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function th(e){for(var t=1;t"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(s["Content-Type"]="application/json");var o=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,l=th({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:s},rh?{}:o),a=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{nh(n,l,i,a)}catch(u){if(!o||Object.keys(o).length===0||!u.message||u.message.indexOf("not implemented")<0)return i(u);try{Object.keys(o).forEach(function(c){delete l[c]}),nh(n,l,i,a),rh=!0}catch(c){i(c)}}},fC=function(t,n,r,i){r&&kn(r)==="object"&&(r=Rl("",r).slice(1)),t.queryStringParams&&(n=Rl(n,t.queryStringParams));try{var s;vi?s=new vi:s=new Ys("MSXML2.XMLHTTP.3.0"),s.open(r?"POST":"GET",n,1),t.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!t.withCredentials,r&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var o=t.customHeaders;if(o=typeof o=="function"?o():o,o)for(var l in o)s.setRequestHeader(l,o[l]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(r)}catch(a){console&&console.log(a)}},dC=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},Et&&n.indexOf("file:")!==0)return cC(t,n,r,i);if(vy()||typeof ActiveXObject=="function")return fC(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function cr(e){"@babel/helpers - typeof";return cr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cr(e)}function ih(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pa(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};hC(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return mC(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=pa(pa(pa({},yC()),this.options||{}),i),this.allOptions=s,this.services&&this.options.reloadInterval){var o=setInterval(function(){return r.reload()},this.options.reloadInterval);cr(o)==="object"&&typeof o.unref=="function"&&o.unref()}}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,s,o){var l=this,a=this.options.loadPath;typeof this.options.loadPath=="function"&&(a=this.options.loadPath(n,i)),a=iC(a),a.then(function(u){if(!u)return o(null,{});var c=l.services.interpolator.interpolate(u,{lng:n.join("+"),ns:i.join("+")});l.loadUrl(c,o,r,s)})}},{key:"loadUrl",value:function(n,r,i,s){var o=this,l=typeof i=="string"?[i]:i,a=typeof s=="string"?[s]:s,u=this.options.parseLoadPayload(l,a);this.options.request(this.options,n,u,function(c,f){if(f&&(f.status>=500&&f.status<600||!f.status))return r("failed loading "+n+"; status code: "+f.status,!0);if(f&&f.status>=400&&f.status<500)return r("failed loading "+n+"; status code: "+f.status,!1);if(!f&&c&&c.message&&c.message.toLowerCase().indexOf("failed")>-1&&(c.message.indexOf("fetch")>-1||c.message.toLowerCase().indexOf("network")>-1))return r("failed loading "+n+": "+c.message,!0);if(c)return r(c,!1);var d,m;try{typeof f.data=="string"?d=o.options.parse(f.data,i,s):d=f.data}catch{m="failed parsing "+n+" to json"}if(m)return r(m,!1);r(null,d)})}},{key:"create",value:function(n,r,i,s,o){var l=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var a=this.options.parsePayload(r,i,s),u=0,c=[],f=[];n.forEach(function(d){var m=l.options.addPath;typeof l.options.addPath=="function"&&(m=l.options.addPath(d,r));var y=l.services.interpolator.interpolate(m,{lng:d,ns:r});l.options.request(l.options,y,a,function(v,S){u+=1,c.push(v),f.push(S),u===n.length&&typeof o=="function"&&o(c,f)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,s=r.languageUtils,o=r.logger,l=i.language;if(!(l&&l.toLowerCase()==="cimode")){var a=[],u=function(f){var d=s.toResolveHierarchy(f);d.forEach(function(m){a.indexOf(m)<0&&a.push(m)})};u(l),this.allOptions.preload&&this.allOptions.preload.forEach(function(c){return u(c)}),a.forEach(function(c){n.allOptions.ns.forEach(function(f){i.read(c,f,"read",null,null,function(d,m){d&&o.warn("loading namespace ".concat(f," for language ").concat(c," failed"),d),!d&&m&&o.log("loaded namespace ".concat(f," for language ").concat(c),m),i.loaded("".concat(c,"|").concat(f),d,m)})})})}}}])}();Cy.type="backend";const{slice:vC,forEach:wC}=[];function xC(e){return wC.call(vC.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const sh=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,SC=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const i=encodeURIComponent(t);let s=`${e}=${i}`;if(r.maxAge>0){const o=r.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(o)}`}if(r.domain){if(!sh.test(r.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${r.domain}`}if(r.path){if(!sh.test(r.path))throw new TypeError("option path is invalid");s+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},oh={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=SC(e,encodeURIComponent(t),i)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const o=i.substring(1).split("&");for(let l=0;l0&&o[l].substring(0,a)===t&&(n=o[l].substring(a+1))}}return n}};let kr=null;const ah=()=>{if(kr!==null)return kr;try{kr=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{kr=!1}return kr};var TC={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&ah())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&ah()&&window.localStorage.setItem(n,e)}};let Er=null;const lh=()=>{if(Er!==null)return Er;try{Er=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Er=!1}return Er};var kC={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&lh())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&lh()&&window.sessionStorage.setItem(n,e)}},EC={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let s=0;s0?t:void 0}},LC={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},OC={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(i=n[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},RC={name:"subdomain",lookup(e){var i,s;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((s=(i=window.location)==null?void 0:i.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function AC(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class Ty{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=xC(n,this.options||{},AC()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(PC),this.addDetector(CC),this.addDetector(TC),this.addDetector(kC),this.addDetector(EC),this.addDetector(LC),this.addDetector(OC),this.addDetector(RC)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}Ty.type="languageDetector";Te.use(Cy).use(Ty).use(c1).init({fallbackLng:"en",debug:!0,backend:{loadPath:"/cardBattle/locales/{{lng}}/cardText.json"},interpolation:{escapeValue:!1}});const MC=()=>(L.useEffect(()=>{const e=document.createElement("script");e.src="https://embed.twentyuno.net/js/app.js",e.async=!0,document.body.appendChild(e)},[]),E.jsx(L.StrictMode,{children:E.jsx(NP,{})}));Sm(document.getElementById("root")).render(E.jsx(MC,{})); diff --git a/assets/index-UgWu_BCV.css b/assets/index-UgWu_BCV.css deleted file mode 100644 index 5cdd5de..0000000 --- a/assets/index-UgWu_BCV.css +++ /dev/null @@ -1 +0,0 @@ -@charset "UTF-8";.App{text-align:center;padding:0;background-color:#8d8787;color:#fff;min-height:100vh;font-size:17px}.orientation-warning{display:flex;justify-content:center;align-items:center;position:fixed;top:0;left:0;width:100%;height:100%;background-color:#000c;color:#fff;font-size:1.5rem;text-align:center;z-index:1000}@keyframes blink-shadow{0%,to{box-shadow:0 0 10px 2px #fffc}50%{box-shadow:0 0 20px 4px #444}}section{margin:0;width:100vw;position:relative;overflow:hidden;display:flex;justify-content:center;align-items:center;min-height:100vh;background:#8d8787}section .text{position:relative;font-size:12vw;text-align:center;color:#fff;-webkit-box-reflect:below -.46em linear-gradient(transparent,rgba(0,0,0,.2666666667))}section .text span{position:relative;display:inline-block}.hide{display:none}.button-highlight{background-color:#f5f5f5;color:#444;padding:10px 20px;font-size:1em;border:none;border-radius:5px;cursor:pointer;outline:none;animation:blink-shadow 1s infinite;transition:transform .3s}.button-highlight:hover{transform:scale(1.05)}.battlefield{display:flex;justify-content:center;align-items:flex-start;gap:40px;padding-top:60px;overflow:hidden;position:relative}.card-container{display:flex;flex-direction:column;align-items:center;text-align:center;width:100%;max-width:550px;margin:0 auto}.card-header{font-size:.85em;position:absolute;background-color:#444;color:#fff;padding:0 5px;border-radius:0 0 10px 10px;width:50%;left:50%;transform:translate(-50%) translateY(-50%);top:10px;text-align:center;font-weight:700}.card-header h2{margin:.2em 1em}.card-spieler,.card-computer{position:relative;width:100%;max-width:550px;height:auto;aspect-ratio:.75;border-radius:1em;overflow:hidden;transition:transform .6s}.card-spieler img,.card-computer img{width:100%;height:auto;border-radius:5px;margin-bottom:5px}.card-flip{width:100%;height:100%;position:relative;transform-style:preserve-3d;transition:transform .6s;perspective:1000px}.card-front,.card-back{position:absolute;width:100%;height:100%;border-radius:1em;backface-visibility:hidden;box-sizing:border-box}.card-front{width:100%;height:100%;padding:20px;border-radius:1em;box-shadow:0 8px 16px #0000004d;background:linear-gradient(to bottom,#f5f5f5 95%,#444 5%);border:.8em solid #444444;position:absolute;backface-visibility:hidden;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between}.card-back{transform:rotateY(180deg);display:flex;align-items:center;justify-content:center}.card-back img{width:100%;height:auto;border-radius:1em}.card-properties{list-style:none;padding:0;margin:0;width:100%}.card-properties li{display:flex;justify-content:space-between;align-items:center;margin:10px 0;width:100%;color:#fff}.property-label{flex:1;text-align:left;font-weight:700}.property-value{flex:.5;text-align:center;font-weight:700}.property-label,.property-value{transition:color .3s,background-color .3s}body:not(.computer-turn) .player-card .property-label:hover,body:not(.computer-turn) .player-card .property-value:hover{background-color:#444;color:#fff}body:not(.computer-turn) .player-card .property-label:focus,body:not(.computer-turn) .player-card .property-value:focus{outline:none}.rating-scale{flex:1;height:10px;background-color:#eee;border-radius:5px;overflow:hidden;min-width:100px;display:flex;justify-content:flex-end}.rating-scale .rating-bar{width:100%;height:100%;transition:width .3s}.card-description{width:calc(100% + 40px);margin:0 -20px;color:#fff;font-size:17px;line-height:1.5;background-color:#444;box-sizing:border-box;text-align:left;padding:10px 20px}.card-properties-list{list-style:none;padding:0;margin:0;width:100%}.card-properties-list li{display:flex;justify-content:space-between;align-items:center;margin:10px 0;width:100%;color:#b2aeae}.description-button{width:calc(100% + 40px);margin:0 -20px;padding:10px 20px;background-color:#444;color:#fff;border:none;cursor:pointer;font-size:17px;transition:background-color .3s}.description-button:hover{background-color:#5e5e5e}.description-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:#000000b3;display:flex;justify-content:center;align-items:center;z-index:1000;padding:20px}.description-popup{background-color:#8d8787;border-radius:1em;padding:20px;max-width:500px;width:90%;max-height:80vh;overflow-y:auto;position:relative;box-shadow:0 8px 16px #0000004d}.description-popup h3{color:#fff;margin-top:0;margin-bottom:15px;font-size:1.2em}.description-popup p{color:#fff;line-height:1.5;margin:0 0 20px}.close-button{background-color:#444;color:#fff;border:none;padding:8px 16px;border-radius:4px;cursor:pointer;transition:background-color .3s}.close-button:hover{background-color:#5e5e5e}@media (max-width: 1200px){.card-container{max-width:500px}.card-description{font-size:.95em}.card-properties-list li{margin:8px 0}.card-header{font-size:.9em}}@media (max-width: 991px){.battlefield{padding-top:0}.card-container{max-width:450px;font-size:.7em}.card-spieler,.card-computer{width:60%}.card-description{font-size:.85em}.card-properties-list li{font-size:.85em;margin:6px 0}.card-header{font-size:.8em}ƒ .rating-scale{height:8px}.card-front{padding:15px;border:.6em solid #444444}}@media (max-width: 767px){.card-container{max-width:400px}.card-description{font-size:.75em}.card-properties-list li{font-size:.75em;margin:5px 0}.card-header{font-size:.7em}.rating-scale{height:6px}.card-front{padding:12px;border:.5em solid #444444}.property-label,.property-value{pointer-events:none}}@media (max-width: 575px){.card-container{max-width:350px}.card-description{font-size:.65em}.card-properties-list li{font-size:.65em;margin:4px 0}.card-header{font-size:.6em}.rating-scale{height:5px}.card-front{padding:8px;border:.4em solid #444444}.description-button{font-size:.8em;padding:6px 12px}.description-popup{width:95%;padding:10px}.description-popup h3{font-size:.9em;margin-bottom:10px}.description-popup p{font-size:.8em}}.navbar-overlay{display:none;position:fixed;top:0;left:0;right:0;bottom:0;background:#00000080;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);z-index:999;opacity:0;transition:opacity .3s ease}.navbar{position:fixed;top:0;width:100%;display:flex;justify-content:space-between;padding:10px 20px;background-color:transparent;z-index:1000;transition:all .3s ease}.navbar .navbar-left{display:flex;gap:10px;margin-top:0}.navbar .navbar-right{display:flex;gap:10px;position:absolute;right:100px}.navbar .navbar-button{margin:10px 5px 0 0;color:#444;border:none;padding:5px 10px;border-radius:5px;cursor:pointer;transition:background-color .3s;z-index:100}.navbar .navbar-button:hover{background-color:#666161;color:#fff}.navbar .navbar-toggle{display:none;background:none;border:none;color:#fff;font-size:1.5rem;cursor:pointer;padding:5px;margin:0;position:fixed;left:50%;transform:translate(-50%);top:50px;z-index:1001}@media (max-width: 991px){.navbar.mobile{width:60px;height:100vh;flex-direction:column;background-color:transparent;padding:20px 10px;align-items:center;left:50%;transform:translate(-50%)}.navbar.mobile .navbar-toggle{display:block}.navbar.mobile .navbar-left,.navbar.mobile .navbar-right{flex-direction:column;align-items:center;opacity:0;visibility:hidden;transition:all .3s ease;margin-top:100px}.navbar.mobile .navbar-right{position:static;margin-top:10px}.navbar.mobile.expanded{width:80%;background-color:transparent}.navbar.mobile.expanded .navbar-left,.navbar.mobile.expanded .navbar-right{opacity:1;visibility:visible}.navbar.mobile.expanded+.navbar-overlay{display:block;opacity:1}.navbar.mobile.expanded .navbar-button{width:80%;text-align:center;margin:5px 0}}.winner-message{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background-color:#000c;color:#fff;padding:20px;border-radius:10px;box-shadow:0 4px 8px #0003;z-index:2000;text-align:center;font-size:2em;font-family:Comic Sans MS,Comic Sans,cursive;pointer-events:none}.end-animation-container{display:flex;justify-content:center;align-items:center;height:100vh;width:100vw;position:fixed;top:0;left:0;background-color:#000c;z-index:1000}.end-animation-content{text-align:center;color:#fff;padding:20px;border-radius:10px;background-color:#333;animation:fadeIn 1s ease-in-out;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.end-animation-message{font-size:2rem;margin-bottom:20px}.end-animation-button{padding:10px 20px;font-size:1rem;color:#fff;background-color:#666161;border:none;border-radius:5px;cursor:pointer;transition:background-color .3s ease;z-index:1001}.end-animation-button:hover{background-color:#b2aeae;color:#1e1e1e}.endAnimBody{display:flex;justify-content:center;align-items:center;height:100vh;width:100vw;position:fixed;top:0;left:0;background-color:#000c;z-index:1000}.endAnimBody h2{color:#fff;font-size:3rem;text-align:center;margin:0;padding:20px;background-color:#00000080;border-radius:10px}.popup-overlay{position:fixed;top:0;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:start;padding-top:5vh;background-color:#000c;z-index:101}.popup-content{background-color:#8d8787;padding:30px;border-radius:5px;box-shadow:0 4px 6px #0000001a;width:90%;max-width:1200px;max-height:90vh;overflow-y:auto;color:#fff}@media (max-width: 991px){.popup-content{width:95%;padding:20px}}.about-me{color:#fff;margin-top:20px}.about-me h2{font-size:2em;margin-bottom:1em}.about-me p{font-size:1.1em;line-height:1.6;margin-bottom:1.5em}.about-me a{color:#fff;text-decoration:none;display:inline-flex;align-items:center;gap:10px;padding:5px 10px;border-radius:5px;transition:background-color .3s}.about-me a:hover{background-color:#ffffff1a}.schliesen-button{margin-top:2em;margin-bottom:1em;display:flex;justify-content:center}.schliesen-button .button{background-color:#666161;color:#fff;border:none;padding:12px 30px;border-radius:5px;cursor:pointer;transition:background-color .3s;font-size:1.1em}.schliesen-button .button:hover{background-color:#b2aeae;color:#444} diff --git a/assets/index-wxm9Wg_J.js b/assets/index-wxm9Wg_J.js deleted file mode 100644 index f0df04a..0000000 --- a/assets/index-wxm9Wg_J.js +++ /dev/null @@ -1,49 +0,0 @@ -function Ry(e,t){for(var n=0;nr[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)}})();var jr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function My(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dh={exports:{}},Xs={},hh={exports:{}},B={};/** - * @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 wi=Symbol.for("react.element"),Dy=Symbol.for("react.portal"),Ny=Symbol.for("react.fragment"),jy=Symbol.for("react.strict_mode"),Vy=Symbol.for("react.profiler"),Iy=Symbol.for("react.provider"),Fy=Symbol.for("react.context"),by=Symbol.for("react.forward_ref"),_y=Symbol.for("react.suspense"),By=Symbol.for("react.memo"),zy=Symbol.for("react.lazy"),fc=Symbol.iterator;function $y(e){return e===null||typeof e!="object"?null:(e=fc&&e[fc]||e["@@iterator"],typeof e=="function"?e:null)}var ph={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},mh=Object.assign,gh={};function dr(e,t,n){this.props=e,this.context=t,this.refs=gh,this.updater=n||ph}dr.prototype.isReactComponent={};dr.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")};dr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function yh(){}yh.prototype=dr.prototype;function Ol(e,t,n){this.props=e,this.context=t,this.refs=gh,this.updater=n||ph}var Rl=Ol.prototype=new yh;Rl.constructor=Ol;mh(Rl,dr.prototype);Rl.isPureReactComponent=!0;var dc=Array.isArray,vh=Object.prototype.hasOwnProperty,Ml={current:null},wh={key:!0,ref:!0,__self:!0,__source:!0};function xh(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)vh.call(t,r)&&!wh.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1>>1,Z=T[$];if(0>>1;$i(on,N))pti(Li,on)?(T[$]=Li,T[pt]=N,$=pt):(T[$]=on,T[ke]=N,$=ke);else if(pti(Li,N))T[$]=Li,T[pt]=N,$=pt;else break e}}return D}function i(T,D){var N=T.sortIndex-D.sortIndex;return N!==0?N:T.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var a=[],u=[],c=1,d=null,f=3,m=!1,v=!1,y=!1,x=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(T){for(var D=n(u);D!==null;){if(D.callback===null)r(u);else if(D.startTime<=T)r(u),D.sortIndex=D.expirationTime,t(a,D);else break;D=n(u)}}function w(T){if(y=!1,p(T),!v)if(n(a)!==null)v=!0,O(P);else{var D=n(u);D!==null&&j(w,D.startTime-T)}}function P(T,D){v=!1,y&&(y=!1,g(k),k=-1),m=!0;var N=f;try{for(p(D),d=n(a);d!==null&&(!(d.expirationTime>D)||T&&!F());){var $=d.callback;if(typeof $=="function"){d.callback=null,f=d.priorityLevel;var Z=$(d.expirationTime<=D);D=e.unstable_now(),typeof Z=="function"?d.callback=Z:d===n(a)&&r(a),p(D)}else r(a);d=n(a)}if(d!==null)var J=!0;else{var ke=n(u);ke!==null&&j(w,ke.startTime-D),J=!1}return J}finally{d=null,f=N,m=!1}}var C=!1,A=null,k=-1,I=5,M=-1;function F(){return!(e.unstable_now()-MT||125$?(T.sortIndex=N,t(u,T),n(a)===null&&T===n(u)&&(y?(g(k),k=-1):y=!0,j(w,N-$))):(T.sortIndex=Z,t(a,T),v||m||(v=!0,O(P))),T},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(T){var D=f;return function(){var N=f;f=D;try{return T.apply(this,arguments)}finally{f=N}}}})(kh);Th.exports=kh;var Jy=Th.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 e0=L,be=Jy;function R(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ha=Object.prototype.hasOwnProperty,t0=/^[: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]*$/,pc={},mc={};function n0(e){return ha.call(mc,e)?!0:ha.call(pc,e)?!1:t0.test(e)?mc[e]=!0:(pc[e]=!0,!1)}function r0(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 i0(e,t,n,r){if(t===null||typeof t>"u"||r0(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 Oe(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var ge={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ge[e]=new Oe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ge[t]=new Oe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ge[e]=new Oe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ge[e]=new Oe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ge[e]=new Oe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ge[e]=new Oe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ge[e]=new Oe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ge[e]=new Oe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ge[e]=new Oe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Nl=/[\-:]([a-z])/g;function jl(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(Nl,jl);ge[t]=new Oe(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(Nl,jl);ge[t]=new Oe(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(Nl,jl);ge[t]=new Oe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ge[e]=new Oe(e,1,!1,e.toLowerCase(),null,!1,!1)});ge.xlinkHref=new Oe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ge[e]=new Oe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Vl(e,t,n,r){var i=ge.hasOwnProperty(t)?ge[t]:null;(i!==null?i.type!==0:r||!(2l||i[o]!==s[l]){var a=` -`+i[o].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=o&&0<=l);break}}}finally{Eo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ar(e):""}function s0(e){switch(e.tag){case 5:return Ar(e.type);case 16:return Ar("Lazy");case 13:return Ar("Suspense");case 19:return Ar("SuspenseList");case 0:case 2:case 15:return e=Lo(e.type,!1),e;case 11:return e=Lo(e.type.render,!1),e;case 1:return e=Lo(e.type,!0),e;default:return""}}function ya(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 Dn:return"Fragment";case Mn:return"Portal";case pa:return"Profiler";case Il:return"StrictMode";case ma:return"Suspense";case ga:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ah:return(e.displayName||"Context")+".Consumer";case Lh:return(e._context.displayName||"Context")+".Provider";case Fl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case bl:return t=e.displayName||null,t!==null?t:ya(e.type)||"Memo";case jt:t=e._payload,e=e._init;try{return ya(e(t))}catch{}}return null}function o0(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 ya(t);case 8:return t===Il?"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 Qt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Rh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function a0(e){var t=Rh(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 Ri(e){e._valueTracker||(e._valueTracker=a0(e))}function Mh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Rh(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ds(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 va(e,t){var n=t.checked;return re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function yc(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Qt(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 Dh(e,t){t=t.checked,t!=null&&Vl(e,"checked",t,!1)}function wa(e,t){Dh(e,t);var n=Qt(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")?xa(e,t.type,n):t.hasOwnProperty("defaultValue")&&xa(e,t.type,Qt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function vc(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 xa(e,t,n){(t!=="number"||ds(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Or=Array.isArray;function Qn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Mi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Xr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Vr={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},l0=["Webkit","ms","Moz","O"];Object.keys(Vr).forEach(function(e){l0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Vr[t]=Vr[e]})});function Ih(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Vr.hasOwnProperty(e)&&Vr[e]?(""+t).trim():t+"px"}function Fh(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 u0=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 Ca(e,t){if(t){if(u0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function Ta(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 ka=null;function _l(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ea=null,Yn=null,Xn=null;function Sc(e){if(e=Pi(e)){if(typeof Ea!="function")throw Error(R(280));var t=e.stateNode;t&&(t=to(t),Ea(e.stateNode,e.type,t))}}function bh(e){Yn?Xn?Xn.push(e):Xn=[e]:Yn=e}function _h(){if(Yn){var e=Yn,t=Xn;if(Xn=Yn=null,Sc(e),t)for(e=0;e>>=0,e===0?32:31-(x0(e)/S0|0)|0}var Di=64,Ni=4194304;function Rr(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 gs(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 l=o&~i;l!==0?r=Rr(l):(s&=o,s!==0&&(r=Rr(s)))}else o=n&~i,o!==0?r=Rr(o):s!==0&&(r=Rr(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;0n;n++)t.push(e);return t}function xi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-tt(t),e[t]=n}function k0(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=Fr),Rc=" ",Mc=!1;function sp(e,t){switch(e){case"keyup":return J0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function op(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Nn=!1;function tv(e,t){switch(e){case"compositionend":return op(t);case"keypress":return t.which!==32?null:(Mc=!0,Rc);case"textInput":return e=t.data,e===Rc&&Mc?null:e;default:return null}}function nv(e,t){if(Nn)return e==="compositionend"||!Gl&&sp(e,t)?(e=rp(),es=Hl=bt=null,Nn=!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)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=Vc(n)}}function cp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?cp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function fp(){for(var e=window,t=ds();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ds(e.document)}return t}function Ql(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 fv(e){var t=fp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&cp(n.ownerDocument.documentElement,n)){if(r!==null&&Ql(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=Ic(n,s);var o=Ic(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=document.documentMode,jn=null,Da=null,_r=null,Na=!1;function Fc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Na||jn==null||jn!==ds(r)||(r=jn,"selectionStart"in r&&Ql(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}),_r&&ni(_r,r)||(_r=r,r=ws(Da,"onSelect"),0Fn||(e.current=_a[Fn],_a[Fn]=null,Fn--)}function G(e,t){Fn++,_a[Fn]=e.current,e.current=t}var Yt={},Ce=en(Yt),De=en(!1),xn=Yt;function nr(e,t){var n=e.type.contextTypes;if(!n)return Yt;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 Ne(e){return e=e.childContextTypes,e!=null}function Ss(){Y(De),Y(Ce)}function Hc(e,t,n){if(Ce.current!==Yt)throw Error(R(168));G(Ce,t),G(De,n)}function xp(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(R(108,o0(e)||"Unknown",i));return re({},n,r)}function Ps(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Yt,xn=Ce.current,G(Ce,e),G(De,De.current),!0}function Wc(e,t,n){var r=e.stateNode;if(!r)throw Error(R(169));n?(e=xp(e,t,xn),r.__reactInternalMemoizedMergedChildContext=e,Y(De),Y(Ce),G(Ce,e)):Y(De),G(De,n)}var gt=null,no=!1,zo=!1;function Sp(e){gt===null?gt=[e]:gt.push(e)}function Cv(e){no=!0,Sp(e)}function tn(){if(!zo&>!==null){zo=!0;var e=0,t=U;try{var n=gt;for(U=1;e>=o,i-=o,yt=1<<32-tt(t)+i|n<k?(I=A,A=null):I=A.sibling;var M=f(g,A,p[k],w);if(M===null){A===null&&(A=I);break}e&&A&&M.alternate===null&&t(g,A),h=s(M,h,k),C===null?P=M:C.sibling=M,C=M,A=I}if(k===p.length)return n(g,A),X&&ln(g,k),P;if(A===null){for(;kk?(I=A,A=null):I=A.sibling;var F=f(g,A,M.value,w);if(F===null){A===null&&(A=I);break}e&&A&&F.alternate===null&&t(g,A),h=s(F,h,k),C===null?P=F:C.sibling=F,C=F,A=I}if(M.done)return n(g,A),X&&ln(g,k),P;if(A===null){for(;!M.done;k++,M=p.next())M=d(g,M.value,w),M!==null&&(h=s(M,h,k),C===null?P=M:C.sibling=M,C=M);return X&&ln(g,k),P}for(A=r(g,A);!M.done;k++,M=p.next())M=m(A,g,k,M.value,w),M!==null&&(e&&M.alternate!==null&&A.delete(M.key===null?k:M.key),h=s(M,h,k),C===null?P=M:C.sibling=M,C=M);return e&&A.forEach(function(K){return t(g,K)}),X&&ln(g,k),P}function x(g,h,p,w){if(typeof p=="object"&&p!==null&&p.type===Dn&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Oi:e:{for(var P=p.key,C=h;C!==null;){if(C.key===P){if(P=p.type,P===Dn){if(C.tag===7){n(g,C.sibling),h=i(C,p.props.children),h.return=g,g=h;break e}}else if(C.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===jt&&Qc(P)===C.type){n(g,C.sibling),h=i(C,p.props),h.ref=Sr(g,C,p),h.return=g,g=h;break e}n(g,C);break}else t(g,C);C=C.sibling}p.type===Dn?(h=yn(p.props.children,g.mode,w,p.key),h.return=g,g=h):(w=ls(p.type,p.key,p.props,null,g.mode,w),w.ref=Sr(g,h,p),w.return=g,g=w)}return o(g);case Mn:e:{for(C=p.key;h!==null;){if(h.key===C)if(h.tag===4&&h.stateNode.containerInfo===p.containerInfo&&h.stateNode.implementation===p.implementation){n(g,h.sibling),h=i(h,p.children||[]),h.return=g,g=h;break e}else{n(g,h);break}else t(g,h);h=h.sibling}h=Yo(p,g.mode,w),h.return=g,g=h}return o(g);case jt:return C=p._init,x(g,h,C(p._payload),w)}if(Or(p))return v(g,h,p,w);if(gr(p))return y(g,h,p,w);Bi(g,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,h!==null&&h.tag===6?(n(g,h.sibling),h=i(h,p),h.return=g,g=h):(n(g,h),h=Qo(p,g.mode,w),h.return=g,g=h),o(g)):n(g,h)}return x}var ir=kp(!0),Ep=kp(!1),ks=en(null),Es=null,Bn=null,Zl=null;function Jl(){Zl=Bn=Es=null}function eu(e){var t=ks.current;Y(ks),e._currentValue=t}function $a(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Zn(e,t){Es=e,Zl=Bn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Me=!0),e.firstContext=null)}function Qe(e){var t=e._currentValue;if(Zl!==e)if(e={context:e,memoizedValue:t,next:null},Bn===null){if(Es===null)throw Error(R(308));Bn=e,Es.dependencies={lanes:0,firstContext:e}}else Bn=Bn.next=e;return t}var hn=null;function tu(e){hn===null?hn=[e]:hn.push(e)}function Lp(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,tu(t)):(n.next=i.next,i.next=n),t.interleaved=n,Ot(e,r)}function Ot(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 Vt=!1;function nu(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 xt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ht(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,z&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Ot(e,n)}return i=r.interleaved,i===null?(t.next=t,tu(r)):(t.next=i.next,i.next=t),r.interleaved=t,Ot(e,n)}function ns(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,zl(e,n)}}function Yc(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 Ls(e,t,n,r){var i=e.updateQueue;Vt=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,u=a.next;a.next=null,o===null?s=u:o.next=u,o=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==o&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(s!==null){var d=i.baseState;o=0,c=u=a=null,l=s;do{var f=l.lane,m=l.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var v=e,y=l;switch(f=t,m=n,y.tag){case 1:if(v=y.payload,typeof v=="function"){d=v.call(m,d,f);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=y.payload,f=typeof v=="function"?v.call(m,d,f):v,f==null)break e;d=re({},d,f);break e;case 2:Vt=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[l]:f.push(l))}else m={eventTime:m,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=m,a=d):c=c.next=m,o|=f;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;f=l,l=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(a=d),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,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);Cn|=o,e.lanes=o,e.memoizedState=d}}function Xc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Uo.transition;Uo.transition={};try{e(!1),t()}finally{U=n,Uo.transition=r}}function Wp(){return Ye().memoizedState}function Lv(e,t,n){var r=Kt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Kp(e))Gp(t,n);else if(n=Lp(e,t,n,r),n!==null){var i=Le();nt(n,e,r,i),Qp(n,t,r)}}function Av(e,t,n){var r=Kt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Kp(e))Gp(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,l=s(o,n);if(i.hasEagerState=!0,i.eagerState=l,rt(l,o)){var a=t.interleaved;a===null?(i.next=i,tu(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=Lp(e,t,i,r),n!==null&&(i=Le(),nt(n,e,r,i),Qp(n,t,r))}}function Kp(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function Gp(e,t){Br=Os=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Qp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zl(e,n)}}var Rs={readContext:Qe,useCallback:ye,useContext:ye,useEffect:ye,useImperativeHandle:ye,useInsertionEffect:ye,useLayoutEffect:ye,useMemo:ye,useReducer:ye,useRef:ye,useState:ye,useDebugValue:ye,useDeferredValue:ye,useTransition:ye,useMutableSource:ye,useSyncExternalStore:ye,useId:ye,unstable_isNewReconciler:!1},Ov={readContext:Qe,useCallback:function(e,t){return st().memoizedState=[e,t===void 0?null:t],e},useContext:Qe,useEffect:Zc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,is(4194308,4,Bp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return is(4194308,4,e,t)},useInsertionEffect:function(e,t){return is(4,2,e,t)},useMemo:function(e,t){var n=st();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=st();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=Lv.bind(null,ne,e),[r.memoizedState,e]},useRef:function(e){var t=st();return e={current:e},t.memoizedState=e},useState:qc,useDebugValue:cu,useDeferredValue:function(e){return st().memoizedState=e},useTransition:function(){var e=qc(!1),t=e[0];return e=Ev.bind(null,e[1]),st().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ne,i=st();if(X){if(n===void 0)throw Error(R(407));n=n()}else{if(n=t(),de===null)throw Error(R(349));Pn&30||Dp(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Zc(jp.bind(null,r,s,e),[e]),r.flags|=2048,ci(9,Np.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=st(),t=de.identifierPrefix;if(X){var n=vt,r=yt;n=(r&~(1<<32-tt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=li++,0<\/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[ot]=t,e[si]=r,im(e,t,!1,!1),t.stateNode=e;e:{switch(o=Ta(n,r),n){case"dialog":Q("cancel",e),Q("close",e),i=r;break;case"iframe":case"object":case"embed":Q("load",e),i=r;break;case"video":case"audio":for(i=0;iar&&(t.flags|=128,r=!0,Pr(s,!1),t.lanes=4194304)}else{if(!r)if(e=As(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Pr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!X)return ve(t),null}else 2*oe()-s.renderingStartTime>ar&&n!==1073741824&&(t.flags|=128,r=!0,Pr(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=oe(),t.sibling=null,n=ee.current,G(ee,r?n&1|2:n&1),t):(ve(t),null);case 22:case 23:return gu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ve&1073741824&&(ve(t),t.subtreeFlags&6&&(t.flags|=8192)):ve(t),null;case 24:return null;case 25:return null}throw Error(R(156,t.tag))}function Fv(e,t){switch(Xl(t),t.tag){case 1:return Ne(t.type)&&Ss(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return sr(),Y(De),Y(Ce),su(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return iu(t),null;case 13:if(Y(ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));rr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(ee),null;case 4:return sr(),null;case 10:return eu(t.type._context),null;case 22:case 23:return gu(),null;case 24:return null;default:return null}}var $i=!1,xe=!1,bv=typeof WeakSet=="function"?WeakSet:Set,V=null;function zn(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 qa(e,t,n){try{n()}catch(r){ie(e,t,r)}}var cf=!1;function _v(e,t){if(ja=ys,e=fp(),Ql(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,l=-1,a=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var m;d!==n||i!==0&&d.nodeType!==3||(l=o+i),d!==s||r!==0&&d.nodeType!==3||(a=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(m=d.firstChild)!==null;)f=d,d=m;for(;;){if(d===e)break t;if(f===n&&++u===i&&(l=o),f===s&&++c===r&&(a=o),(m=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=m}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Va={focusedElem:e,selectionRange:n},ys=!1,V=t;V!==null;)if(t=V,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,V=e;else for(;V!==null;){t=V;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,x=v.memoizedState,g=t.stateNode,h=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:qe(t.type,y),x);g.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(R(163))}}catch(w){ie(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,V=e;break}V=t.return}return v=cf,cf=!1,v}function zr(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&&qa(t,n,s)}i=i.next}while(i!==r)}}function so(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Za(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function am(e){var t=e.alternate;t!==null&&(e.alternate=null,am(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ot],delete t[si],delete t[ba],delete t[Sv],delete t[Pv])),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 lm(e){return e.tag===5||e.tag===3||e.tag===4}function ff(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||lm(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 Ja(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=xs));else if(r!==4&&(e=e.child,e!==null))for(Ja(e,t,n),e=e.sibling;e!==null;)Ja(e,t,n),e=e.sibling}function el(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(el(e,t,n),e=e.sibling;e!==null;)el(e,t,n),e=e.sibling}var he=null,Ze=!1;function Dt(e,t,n){for(n=n.child;n!==null;)um(e,t,n),n=n.sibling}function um(e,t,n){if(ct&&typeof ct.onCommitFiberUnmount=="function")try{ct.onCommitFiberUnmount(qs,n)}catch{}switch(n.tag){case 5:xe||zn(n,t);case 6:var r=he,i=Ze;he=null,Dt(e,t,n),he=r,Ze=i,he!==null&&(Ze?(e=he,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):he.removeChild(n.stateNode));break;case 18:he!==null&&(Ze?(e=he,n=n.stateNode,e.nodeType===8?Bo(e.parentNode,n):e.nodeType===1&&Bo(e,n),ei(e)):Bo(he,n.stateNode));break;case 4:r=he,i=Ze,he=n.stateNode.containerInfo,Ze=!0,Dt(e,t,n),he=r,Ze=i;break;case 0:case 11:case 14:case 15:if(!xe&&(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)&&qa(n,t,o),i=i.next}while(i!==r)}Dt(e,t,n);break;case 1:if(!xe&&(zn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ie(n,t,l)}Dt(e,t,n);break;case 21:Dt(e,t,n);break;case 22:n.mode&1?(xe=(r=xe)||n.memoizedState!==null,Dt(e,t,n),xe=r):Dt(e,t,n);break;default:Dt(e,t,n)}}function df(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new bv),t.forEach(function(r){var i=Qv.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Xe(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~s}if(r=i,r=oe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*zv(r/1960))-r,10e?16:e,_t===null)var r=!1;else{if(e=_t,_t=null,Ns=0,z&6)throw Error(R(331));var i=z;for(z|=4,V=e.current;V!==null;){var s=V,o=s.child;if(V.flags&16){var l=s.deletions;if(l!==null){for(var a=0;aoe()-pu?gn(e,0):hu|=n),je(e,t)}function ym(e,t){t===0&&(e.mode&1?(t=Ni,Ni<<=1,!(Ni&130023424)&&(Ni=4194304)):t=1);var n=Le();e=Ot(e,t),e!==null&&(xi(e,t,n),je(e,n))}function Gv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ym(e,n)}function Qv(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(R(314))}r!==null&&r.delete(t),ym(e,n)}var vm;vm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||De.current)Me=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Me=!1,Vv(e,t,n);Me=!!(e.flags&131072)}else Me=!1,X&&t.flags&1048576&&Pp(t,Ts,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ss(e,t),e=t.pendingProps;var i=nr(t,Ce.current);Zn(t,n),i=au(null,t,r,e,i,n);var s=lu();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,Ne(r)?(s=!0,Ps(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,nu(t),i.updater=io,t.stateNode=i,i._reactInternals=t,Ha(t,r,e,n),t=Ga(null,t,r,!0,s,n)):(t.tag=0,X&&s&&Yl(t),Ee(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ss(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Xv(r),e=qe(r,e),i){case 0:t=Ka(null,t,r,e,n);break e;case 1:t=af(null,t,r,e,n);break e;case 11:t=sf(null,t,r,e,n);break e;case 14:t=of(null,t,r,qe(r.type,e),n);break e}throw Error(R(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qe(r,i),Ka(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qe(r,i),af(e,t,r,i,n);case 3:e:{if(tm(t),e===null)throw Error(R(387));r=t.pendingProps,s=t.memoizedState,i=s.element,Ap(e,t),Ls(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=or(Error(R(423)),t),t=lf(e,t,r,n,i);break e}else if(r!==i){i=or(Error(R(424)),t),t=lf(e,t,r,n,i);break e}else for(Ie=Ut(t.stateNode.containerInfo.firstChild),Fe=t,X=!0,Je=null,n=Ep(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(rr(),r===i){t=Rt(e,t,n);break e}Ee(e,t,r,n)}t=t.child}return t;case 5:return Op(t),e===null&&za(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,Ia(r,i)?o=null:s!==null&&Ia(r,s)&&(t.flags|=32),em(e,t),Ee(e,t,o,n),t.child;case 6:return e===null&&za(t),null;case 13:return nm(e,t,n);case 4:return ru(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ir(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:qe(r,i),sf(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,G(ks,r._currentValue),r._currentValue=o,s!==null)if(rt(s.value,o)){if(s.children===i.children&&!De.current){t=Rt(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(s.tag===1){a=xt(-1,n&-n),a.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),$a(s.return,n,t),l.lanes|=n;break}a=a.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(R(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),$a(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,Zn(t,n),i=Qe(i),r=r(i),t.flags|=1,Ee(e,t,r,n),t.child;case 14:return r=t.type,i=qe(r,t.pendingProps),i=qe(r.type,i),of(e,t,r,i,n);case 15:return Zp(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qe(r,i),ss(e,t),t.tag=1,Ne(r)?(e=!0,Ps(t)):e=!1,Zn(t,n),Yp(t,r,i),Ha(t,r,i,n),Ga(null,t,r,!0,e,n);case 19:return rm(e,t,n);case 22:return Jp(e,t,n)}throw Error(R(156,t.tag))};function wm(e,t){return Kh(e,t)}function Yv(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 Ke(e,t,n,r){return new Yv(e,t,n,r)}function vu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Xv(e){if(typeof e=="function")return vu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Fl)return 11;if(e===bl)return 14}return 2}function Gt(e,t){var n=e.alternate;return n===null?(n=Ke(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 ls(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 Dn:return yn(n.children,i,s,t);case Il:o=8,i|=8;break;case pa:return e=Ke(12,n,t,i|2),e.elementType=pa,e.lanes=s,e;case ma:return e=Ke(13,n,t,i),e.elementType=ma,e.lanes=s,e;case ga:return e=Ke(19,n,t,i),e.elementType=ga,e.lanes=s,e;case Oh:return ao(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Lh:o=10;break e;case Ah:o=9;break e;case Fl:o=11;break e;case bl:o=14;break e;case jt:o=16,r=null;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=Ke(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function yn(e,t,n,r){return e=Ke(7,e,r,t),e.lanes=n,e}function ao(e,t,n,r){return e=Ke(22,e,r,t),e.elementType=Oh,e.lanes=n,e.stateNode={isHidden:!1},e}function Qo(e,t,n){return e=Ke(6,e,null,t),e.lanes=n,e}function Yo(e,t,n){return t=Ke(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function qv(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=Oo(0),this.expirationTimes=Oo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oo(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function wu(e,t,n,r,i,s,o,l,a){return e=new qv(e,t,n,l,a),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Ke(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},nu(s),e}function Zv(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Cm)}catch(e){console.error(e)}}Cm(),Ch.exports=Be;var r1=Ch.exports,Tm,xf=r1;Tm=xf.createRoot,xf.hydrateRoot;const i1=(...e)=>{console!=null&&console.warn&&(vn(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e))},Sf={},sl=(...e)=>{vn(e[0])&&Sf[e[0]]||(vn(e[0])&&(Sf[e[0]]=new Date),i1(...e))},km=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Pf=(e,t,n)=>{e.loadNamespaces(t,km(e,n))},Cf=(e,t,n,r)=>{vn(n)&&(n=[n]),n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,km(e,r))},s1=(e,t,n={})=>!t.languages||!t.languages.length?(sl("i18n.languages were undefined or empty",t.languages),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,i)=>{var s;if(((s=n.bindI18n)==null?void 0:s.indexOf("languageChanging"))>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,e))return!1}}),vn=e=>typeof e=="string",o1=e=>typeof e=="object"&&e!==null,a1=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,l1={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},u1=e=>l1[e],c1=e=>e.replace(a1,u1);let ol={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:c1};const f1=(e={})=>{ol={...ol,...e}},d1=()=>ol;let Em;const h1=e=>{Em=e},p1=()=>Em,m1={type:"3rdParty",init(e){f1(e.options.react),h1(e)}},g1=L.createContext();class y1{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const v1=(e,t)=>{const n=L.useRef();return L.useEffect(()=>{n.current=e},[e,t]),n.current},Lm=(e,t,n,r)=>e.getFixedT(t,n,r),w1=(e,t,n,r)=>L.useCallback(Lm(e,t,n,r),[e,t,n,r]),nn=(e,t={})=>{var w,P,C,A;const{i18n:n}=t,{i18n:r,defaultNS:i}=L.useContext(g1)||{},s=n||r||p1();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new y1),!s){sl("You will need to pass in an i18next instance by using initReactI18next");const k=(M,F)=>vn(F)?F:o1(F)&&vn(F.defaultValue)?F.defaultValue:Array.isArray(M)?M[M.length-1]:M,I=[k,{},!1];return I.t=k,I.i18n={},I.ready=!1,I}(w=s.options.react)!=null&&w.wait&&sl("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...d1(),...s.options.react,...t},{useSuspense:l,keyPrefix:a}=o;let u=i||((P=s.options)==null?void 0:P.defaultNS);u=vn(u)?[u]:u||["translation"],(A=(C=s.reportNamespaces).addUsedNamespaces)==null||A.call(C,u);const c=(s.isInitialized||s.initializedStoreOnce)&&u.every(k=>s1(k,s,o)),d=w1(s,t.lng||null,o.nsMode==="fallback"?u:u[0],a),f=()=>d,m=()=>Lm(s,t.lng||null,o.nsMode==="fallback"?u:u[0],a),[v,y]=L.useState(f);let x=u.join();t.lng&&(x=`${t.lng}${x}`);const g=v1(x),h=L.useRef(!0);L.useEffect(()=>{const{bindI18n:k,bindI18nStore:I}=o;h.current=!0,!c&&!l&&(t.lng?Cf(s,t.lng,u,()=>{h.current&&y(m)}):Pf(s,u,()=>{h.current&&y(m)})),c&&g&&g!==x&&h.current&&y(m);const M=()=>{h.current&&y(m)};return k&&(s==null||s.on(k,M)),I&&(s==null||s.store.on(I,M)),()=>{h.current=!1,s&&(k==null||k.split(" ").forEach(F=>s.off(F,M))),I&&s&&I.split(" ").forEach(F=>s.store.off(F,M))}},[s,x]),L.useEffect(()=>{h.current&&c&&y(f)},[s,a,c]);const p=[v,s,c];if(p.t=v,p.i18n=s,p.ready=c,c||!c&&!l)return p;throw new Promise(k=>{t.lng?Cf(s,t.lng,u,()=>k()):Pf(s,u,()=>k())})};function x1(){const[e,t]=L.useState(window.innerHeight>window.innerWidth);return L.useEffect(()=>{const n=()=>{t(window.innerHeight>window.innerWidth)};return window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[]),e}const Is=[{id:1,name:"Bitcoin",image:"1.png",eigenschaften:{eigenschaft1:2009,eigenschaft2:5,eigenschaft3:3,eigenschaft4:5,eigenschaft5:5}},{id:2,name:"Ether",image:"2.png",eigenschaften:{eigenschaft1:2015,eigenschaft2:2,eigenschaft3:2,eigenschaft4:5,eigenschaft5:5}},{id:3,name:"Euro",image:"3.png",eigenschaften:{eigenschaft1:2002,eigenschaft2:1,eigenschaft3:2,eigenschaft4:4,eigenschaft5:4}},{id:4,name:"Monero",image:"4.png",eigenschaften:{eigenschaft1:2014,eigenschaft2:2,eigenschaft3:2,eigenschaft4:5,eigenschaft5:5}},{id:5,name:"Gold",image:"5.png",eigenschaften:{eigenschaft1:-6e3,eigenschaft2:4,eigenschaft3:5,eigenschaft4:3,eigenschaft5:3}},{id:6,name:"Silber",image:"6.png",eigenschaften:{eigenschaft1:-5e3,eigenschaft2:3,eigenschaft3:4,eigenschaft4:3,eigenschaft5:3}},{id:7,name:"Kupfer",image:"7.png",eigenschaften:{eigenschaft1:-8e3,eigenschaft2:2,eigenschaft3:4,eigenschaft4:3,eigenschaft5:2}},{id:8,name:"Dollar",image:"8.png",eigenschaften:{eigenschaft1:1785,eigenschaft2:1,eigenschaft3:3,eigenschaft4:4,eigenschaft5:4}},{id:9,name:"Yen",image:"9.png",eigenschaften:{eigenschaft1:1870,eigenschaft2:1,eigenschaft3:3,eigenschaft4:4,eigenschaft5:4}},{id:10,name:"Wampum",image:"10.png",eigenschaften:{eigenschaft1:1700,eigenschaft2:2,eigenschaft3:1,eigenschaft4:2,eigenschaft5:2}},{id:11,name:"Tabak",image:"11.png",eigenschaften:{eigenschaft1:1619,eigenschaft2:2,eigenschaft3:1,eigenschaft4:3,eigenschaft5:2}},{id:12,name:"Zähne",image:"12.png",eigenschaften:{eigenschaft1:-1e4,eigenschaft2:2,eigenschaft3:2,eigenschaft4:2,eigenschaft5:2}},{id:13,name:"Salz",image:"13.png",eigenschaften:{eigenschaft1:-1e4,eigenschaft2:2,eigenschaft3:2,eigenschaft4:3,eigenschaft5:2}},{id:14,name:"Renminbi",image:"14.png",eigenschaften:{eigenschaft1:1948,eigenschaft2:1,eigenschaft3:2,eigenschaft4:4,eigenschaft5:4}},{id:15,name:"Reichsmark",image:"15.png",eigenschaften:{eigenschaft1:1924,eigenschaft2:1,eigenschaft3:1,eigenschaft4:3,eigenschaft5:3}},{id:16,name:"Rai-Steine",image:"16.png",eigenschaften:{eigenschaft1:1200,eigenschaft2:3,eigenschaft3:2,eigenschaft4:1,eigenschaft5:1}},{id:17,name:"Pfund",image:"17.png",eigenschaften:{eigenschaft1:800,eigenschaft2:1,eigenschaft3:4,eigenschaft4:4,eigenschaft5:4}},{id:18,name:"Schmuck",image:"18.png",eigenschaften:{eigenschaft1:-2e3,eigenschaft2:4,eigenschaft3:4,eigenschaft4:2,eigenschaft5:3}},{id:19,name:"Getreide",image:"19.png",eigenschaften:{eigenschaft1:-3e3,eigenschaft2:2,eigenschaft3:1,eigenschaft4:3,eigenschaft5:2}},{id:20,name:"Perlen",image:"20.png",eigenschaften:{eigenschaft1:-2500,eigenschaft2:2,eigenschaft3:2,eigenschaft4:2,eigenschaft5:2}},{id:21,name:"Florin",image:"21.png",eigenschaften:{eigenschaft1:1252,eigenschaft2:4,eigenschaft3:5,eigenschaft4:3,eigenschaft5:3}},{id:22,name:"Denar",image:"22.png",eigenschaften:{eigenschaft1:-200,eigenschaft2:2,eigenschaft3:1,eigenschaft4:2,eigenschaft5:3}},{id:23,name:"Vieh",image:"23.png",eigenschaften:{eigenschaft1:-1e4,eigenschaft2:2,eigenschaft3:1,eigenschaft4:1,eigenschaft5:2}},{id:24,name:"Muscheln",image:"24.png",eigenschaften:{eigenschaft1:-2e3,eigenschaft2:2,eigenschaft3:1,eigenschaft4:2,eigenschaft5:2}},{id:25,name:"Kakao",image:"25.png",eigenschaften:{eigenschaft1:-3e3,eigenschaft2:2,eigenschaft3:1,eigenschaft4:3,eigenschaft5:2}},{id:26,name:"Aggry-Perlen",image:"26.png",eigenschaften:{eigenschaft1:2e3,eigenschaft2:3,eigenschaft3:2,eigenschaft4:2,eigenschaft5:2}}];function S1(e){for(let t=e.length-1;t>0;t--){const n=Math.floor(Math.random()*(t+1));[e[t],e[n]]=[e[n],e[t]]}return e}const P1=()=>{const e=S1([...Is]),t=Math.floor(e.length/2),n=e.slice(0,t),r=e.slice(t);return{playerCards:n,computerCards:r}},C1=()=>{const[e,t]=L.useState([]),[n,r]=L.useState([]),[i,s]=L.useState(!1);return L.useEffect(()=>{const{playerCards:o,computerCards:l}=P1();t(o),r(l),s(!0)},[]),{playerCards:e,computerCards:n,gameInitialized:i,setPlayerCards:t,setComputerCards:r,setGameInitialized:s}};function T1(e,t,n,r,i,s,o){const l=t.eigenschaften[e],a=n.eigenschaften[e];let u;o.includes(e)?u=la;let c,d=[...r],f=[...i],m=[...s];return u?(c="Player",d=[...r.slice(1),t,n,...s],f=i.slice(1),m=[]):!u&&l!==a?(c="Computer",f=[...i.slice(1),n,t,...s],d=r.slice(1),m=[]):(c="Tie",m=[...s,t,n],d=r.slice(1),f=i.slice(1)),{winner:c,playerValue:l,computerValue:a,updatedPlayerCards:d,updatedComputerCards:f,updatedDrawPile:m}}const k1=e=>{let t=-1/0,n="eigenschaft1";return["eigenschaft2","eigenschaft3","eigenschaft4","eigenschaft5"].every(i=>e.eigenschaften[i]<4)?"eigenschaft1":(["eigenschaft2","eigenschaft3","eigenschaft4","eigenschaft5"].forEach(i=>{e.eigenschaften[i]>t&&(t=e.eigenschaften[i],n=i)}),n)},E1=["eigenschaft1"],L1=(e,t,n,r)=>{const[i,s]=L.useState([]),[o,l]=L.useState(null),[a,u]=L.useState(null),[c,d]=L.useState(null),[f,m]=L.useState(!1),[v,y]=L.useState(!1),[x,g]=L.useState(!0),[h,p]=L.useState(null),[w,P]=L.useState(!1),[C,A]=L.useState({selectedProperty:null,playerValue:null,computerValue:null});L.useEffect(()=>{e.length>0&&t.length>0&&(l(e[0]),u(t[0]))},[e,t]),L.useEffect(()=>{(e.length>0||t.length>0)&&!v&&(e.length===0?(y(!0),d("Computer")):t.length===0&&(y(!0),d("Player")))},[e,t,v]),L.useEffect(()=>{if(c){P(!0);const M=setTimeout(()=>{P(!1)},5e3);return()=>clearTimeout(M)}},[c]);const k=M=>{!o||!a||(g(!1),m(!1),setTimeout(()=>{const F=T1(M,o,a,e,t,i,E1);A({selectedProperty:M,playerValue:F.playerValue,computerValue:F.computerValue}),F.winner==="Player"?(d("Player"),p("left"),P(!0),setTimeout(()=>{n(F.updatedPlayerCards),r(F.updatedComputerCards),s(F.updatedDrawPile),g(!0),m(!1),p(null),P(!1)},2e3)):F.winner==="Computer"?(d("Computer"),p("right"),P(!0),setTimeout(()=>{r(F.updatedComputerCards),n(F.updatedPlayerCards),s(F.updatedDrawPile),g(!0),p(null),m(!0),P(!1)},2e3)):(d("Tie"),p("up"),P(!0),setTimeout(()=>{s(F.updatedDrawPile),n(F.updatedPlayerCards),r(F.updatedComputerCards),g(!0),p(null),P(!1),f&&m(!0)},2e3))},3e3))};return{drawPile:i,currentPlayerCard:o,currentComputerCard:a,winner:c,isComputerTurn:f,gameOver:v,isComputerCardFlipped:x,animationDirection:h,showWinnerMessage:w,lastRoundDetails:C,handlePropertySelect:k,handleComputerTurn:()=>{if(a){const M=k1(a);k(M)}}}};function A1(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}function di(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const al=e=>Array.isArray(e);function Am(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Cu(e,t,n,r){if(typeof t=="function"){const[i,s]=Tf(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=Tf(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function ho(e,t,n){const r=e.getProps();return Cu(r,t,n!==void 0?n:r.custom,e)}const Tu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ku=["initial",...Tu],Ti=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],rn=new Set(Ti),St=e=>e*1e3,Pt=e=>e/1e3,O1={type:"spring",stiffness:500,damping:25,restSpeed:10},R1=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),M1={type:"keyframes",duration:.8},D1={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},N1=(e,{keyframes:t})=>t.length>2?M1:rn.has(e)?e.startsWith("scale")?R1(t[1]):O1:D1;function Eu(e,t){return e?e[t]||e.default||e:void 0}const j1={skipAnimations:!1,useManualTiming:!1},V1=e=>e!==null;function po(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(V1),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const Pe=e=>e;function I1(e){let t=new Set,n=new Set,r=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function l(u){s.has(u)&&(a.schedule(u),e()),u(o)}const a={schedule:(u,c=!1,d=!1)=>{const m=d&&r?t:n;return c&&s.add(u),m.has(u)||m.add(u),u},cancel:u=>{n.delete(u),s.delete(u)},process:u=>{if(o=u,r){i=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(l),r=!1,i&&(i=!1,a.process(u))}};return a}const Wi=["read","resolveKeyframes","update","preRender","render","postRender"],F1=40;function Om(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Wi.reduce((g,h)=>(g[h]=I1(s),g),{}),{read:l,resolveKeyframes:a,update:u,preRender:c,render:d,postRender:f}=o,m=()=>{const g=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(g-i.timestamp,F1),1),i.timestamp=g,i.isProcessing=!0,l.process(i),a.process(i),u.process(i),c.process(i),d.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))},v=()=>{n=!0,r=!0,i.isProcessing||e(m)};return{schedule:Wi.reduce((g,h)=>{const p=o[h];return g[h]=(w,P=!1,C=!1)=>(n||v(),p.schedule(w,P,C)),g},{}),cancel:g=>{for(let h=0;h(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,b1=1e-7,_1=12;function B1(e,t,n,r,i){let s,o,l=0;do o=t+(n-t)/2,s=Rm(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>b1&&++l<_1);return o}function ki(e,t,n,r){if(e===t&&n===r)return Pe;const i=s=>B1(s,0,1,e,n);return s=>s===0||s===1?s:Rm(i(s),t,r)}const Mm=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Dm=e=>t=>1-e(1-t),Nm=ki(.33,1.53,.69,.99),Lu=Dm(Nm),jm=Mm(Lu),Vm=e=>(e*=2)<1?.5*Lu(e):.5*(2-Math.pow(2,-10*(e-1))),Au=e=>1-Math.sin(Math.acos(e)),Im=Dm(Au),Fm=Mm(Au),bm=e=>/^0[^.\s]+$/u.test(e);function z1(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||bm(e):!0}let ll=Pe;const _m=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Bm=e=>t=>typeof t=="string"&&t.startsWith(e),zm=Bm("--"),$1=Bm("var(--"),Ou=e=>$1(e)?U1.test(e.split("/*")[0].trim()):!1,U1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,H1=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function W1(e){const t=H1.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function $m(e,t,n=1){const[r,i]=W1(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return _m(o)?parseFloat(o):o}return Ou(i)?$m(i,t,n+1):i}const qt=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},pi={...mr,transform:e=>qt(0,1,e)},Ki={...mr,default:1},Ei=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Nt=Ei("deg"),dt=Ei("%"),_=Ei("px"),K1=Ei("vh"),G1=Ei("vw"),kf={...dt,parse:e=>dt.parse(e)/100,transform:e=>dt.transform(e*100)},Q1=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Ef=e=>e===mr||e===_,Lf=(e,t)=>parseFloat(e.split(", ")[t]),Af=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return Lf(i[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?Lf(s[1],e):0}},Y1=new Set(["x","y","z"]),X1=Ti.filter(e=>!Y1.has(e));function q1(e){const t=[];return X1.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const lr={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:Af(4,13),y:Af(5,14)};lr.translateX=lr.x;lr.translateY=lr.y;const Um=e=>t=>t.test(e),Z1={test:e=>e==="auto",parse:e=>e},Hm=[mr,_,dt,Nt,G1,K1,Z1],Of=e=>Hm.find(Um(e)),wn=new Set;let ul=!1,cl=!1;function Wm(){if(cl){const e=Array.from(wn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=q1(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var l;(l=r.getValue(s))===null||l===void 0||l.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}cl=!1,ul=!1,wn.forEach(e=>e.complete()),wn.clear()}function Km(){wn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(cl=!0)})}function J1(){Km(),Wm()}class Ru{constructor(t,n,r,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(wn.add(this),ul||(ul=!0,H.read(Km),H.resolveKeyframes(Wm))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let s=0;sMath.round(e*1e5)/1e5,Mu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ew(e){return e==null}const tw=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Du=(e,t)=>n=>!!(typeof n=="string"&&tw.test(n)&&n.startsWith(e)||t&&!ew(n)&&Object.prototype.hasOwnProperty.call(n,t)),Gm=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,l]=r.match(Mu);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},nw=e=>qt(0,255,e),qo={...mr,transform:e=>Math.round(nw(e))},mn={test:Du("rgb","red"),parse:Gm("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+qo.transform(e)+", "+qo.transform(t)+", "+qo.transform(n)+", "+Hr(pi.transform(r))+")"};function rw(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 fl={test:Du("#"),parse:rw,transform:mn.transform},Un={test:Du("hsl","hue"),parse:Gm("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+dt.transform(Hr(t))+", "+dt.transform(Hr(n))+", "+Hr(pi.transform(r))+")"},we={test:e=>mn.test(e)||fl.test(e)||Un.test(e),parse:e=>mn.test(e)?mn.parse(e):Un.test(e)?Un.parse(e):fl.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?mn.transform(e):Un.transform(e)},iw=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function sw(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Mu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(iw))===null||n===void 0?void 0:n.length)||0)>0}const Qm="number",Ym="color",ow="var",aw="var(",Rf="${}",lw=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function mi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const l=t.replace(lw,a=>(we.test(a)?(r.color.push(s),i.push(Ym),n.push(we.parse(a))):a.startsWith(aw)?(r.var.push(s),i.push(ow),n.push(a)):(r.number.push(s),i.push(Qm),n.push(parseFloat(a))),++s,Rf)).split(Rf);return{values:n,split:l,indexes:r,types:i}}function Xm(e){return mi(e).values}function qm(e){const{split:t,types:n}=mi(e),r=t.length;return i=>{let s="";for(let o=0;otypeof e=="number"?0:e;function cw(e){const t=Xm(e);return qm(e)(t.map(uw))}const Zt={test:sw,parse:Xm,createTransformer:qm,getAnimatableNone:cw},fw=new Set(["brightness","contrast","saturate","opacity"]);function dw(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Mu)||[];if(!r)return e;const i=n.replace(r,"");let s=fw.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const hw=/\b([a-z-]*)\(.*?\)/gu,dl={...Zt,getAnimatableNone:e=>{const t=e.match(hw);return t?t.map(dw).join(" "):e}},pw={borderWidth:_,borderTopWidth:_,borderRightWidth:_,borderBottomWidth:_,borderLeftWidth:_,borderRadius:_,radius:_,borderTopLeftRadius:_,borderTopRightRadius:_,borderBottomRightRadius:_,borderBottomLeftRadius:_,width:_,maxWidth:_,height:_,maxHeight:_,top:_,right:_,bottom:_,left:_,padding:_,paddingTop:_,paddingRight:_,paddingBottom:_,paddingLeft:_,margin:_,marginTop:_,marginRight:_,marginBottom:_,marginLeft:_,backgroundPositionX:_,backgroundPositionY:_},mw={rotate:Nt,rotateX:Nt,rotateY:Nt,rotateZ:Nt,scale:Ki,scaleX:Ki,scaleY:Ki,scaleZ:Ki,skew:Nt,skewX:Nt,skewY:Nt,distance:_,translateX:_,translateY:_,translateZ:_,x:_,y:_,z:_,perspective:_,transformPerspective:_,opacity:pi,originX:kf,originY:kf,originZ:_},Mf={...mr,transform:Math.round},Nu={...pw,...mw,zIndex:Mf,size:_,fillOpacity:pi,strokeOpacity:pi,numOctaves:Mf},gw={...Nu,color:we,backgroundColor:we,outlineColor:we,fill:we,stroke:we,borderColor:we,borderTopColor:we,borderRightColor:we,borderBottomColor:we,borderLeftColor:we,filter:dl,WebkitFilter:dl},ju=e=>gw[e];function Zm(e,t){let n=ju(e);return n!==dl&&(n=Zt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const yw=new Set(["auto","none","0"]);function vw(e,t,n){let r=0,i;for(;r{n.getValue(a).set(u)}),this.resolveNoneKeyframes()}}function Vu(e){return typeof e=="function"}let us;function ww(){us=void 0}const ht={now:()=>(us===void 0&&ht.set(pe.isProcessing||j1.useManualTiming?pe.timestamp:performance.now()),us),set:e=>{us=e,queueMicrotask(ww)}},Df=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Zt.test(e)||e==="0")&&!e.startsWith("url("));function xw(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nPw?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&J1(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=ht.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:l,onUpdate:a,isGenerator:u}=this.options;if(!u&&!Sw(t,r,i,s))if(o)this.options.duration=0;else{a==null||a(po(t,this.options,n)),l==null||l(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function tg(e,t){return t?e*(1e3/t):0}const Cw=5;function ng(e,t,n){const r=Math.max(t-Cw,0);return tg(n-e(r),t-r)}const Zo=.001,Tw=.01,kw=10,Ew=.05,Lw=1;function Aw({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,s,o=1-t;o=qt(Ew,Lw,o),e=qt(Tw,kw,Pt(e)),o<1?(i=u=>{const c=u*o,d=c*e,f=c-n,m=hl(u,o),v=Math.exp(-d);return Zo-f/m*v},s=u=>{const d=u*o*e,f=d*n+n,m=Math.pow(o,2)*Math.pow(u,2)*e,v=Math.exp(-d),y=hl(Math.pow(u,2),o);return(-i(u)+Zo>0?-1:1)*((f-m)*v)/y}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-Zo+c*d},s=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const l=5/e,a=Rw(i,s,l);if(e=St(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(a,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const Ow=12;function Rw(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function Nw(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Nf(e,Dw)&&Nf(e,Mw)){const n=Aw(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function rg({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],s=e[e.length-1],o={done:!1,value:i},{stiffness:l,damping:a,mass:u,duration:c,velocity:d,isResolvedFromDuration:f}=Nw({...r,velocity:-Pt(r.velocity||0)}),m=d||0,v=a/(2*Math.sqrt(l*u)),y=s-i,x=Pt(Math.sqrt(l/u)),g=Math.abs(y)<5;n||(n=g?.01:2),t||(t=g?.005:.5);let h;if(v<1){const p=hl(x,v);h=w=>{const P=Math.exp(-v*x*w);return s-P*((m+v*x*y)/p*Math.sin(p*w)+y*Math.cos(p*w))}}else if(v===1)h=p=>s-Math.exp(-x*p)*(y+(m+x*y)*p);else{const p=x*Math.sqrt(v*v-1);h=w=>{const P=Math.exp(-v*x*w),C=Math.min(p*w,300);return s-P*((m+v*x*y)*Math.sinh(C)+p*y*Math.cosh(C))/p}}return{calculatedDuration:f&&c||null,next:p=>{const w=h(p);if(f)o.done=p>=c;else{let P=0;v<1&&(P=p===0?St(m):ng(h,p,w));const C=Math.abs(P)<=n,A=Math.abs(s-w)<=t;o.done=C&&A}return o.value=o.done?s:w,o}}}function jf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:l,max:a,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},m=k=>l!==void 0&&ka,v=k=>l===void 0?a:a===void 0||Math.abs(l-k)-y*Math.exp(-k/r),p=k=>g+h(k),w=k=>{const I=h(k),M=p(k);f.done=Math.abs(I)<=u,f.value=f.done?g:M};let P,C;const A=k=>{m(f.value)&&(P=k,C=rg({keyframes:[f.value,v(f.value)],velocity:ng(p,k,f.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return A(0),{calculatedDuration:null,next:k=>{let I=!1;return!C&&P===void 0&&(I=!0,w(k),A(k)),P!==void 0&&k>=P?C.next(k-P):(!I&&w(k),f)}}}const jw=ki(.42,0,1,1),Vw=ki(0,0,.58,1),ig=ki(.42,0,.58,1),Iw=e=>Array.isArray(e)&&typeof e[0]!="number",Iu=e=>Array.isArray(e)&&typeof e[0]=="number",Vf={linear:Pe,easeIn:jw,easeInOut:ig,easeOut:Vw,circIn:Au,circInOut:Fm,circOut:Im,backIn:Lu,backInOut:jm,backOut:Nm,anticipate:Vm},If=e=>{if(Iu(e)){ll(e.length===4);const[t,n,r,i]=e;return ki(t,n,r,i)}else if(typeof e=="string")return ll(Vf[e]!==void 0),Vf[e];return e},Fw=(e,t)=>n=>t(e(n)),Ct=(...e)=>e.reduce(Fw),ur=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},te=(e,t,n)=>e+(t-e)*n;function Jo(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 bw({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 l=n<.5?n*(1+t):n+t-n*t,a=2*n-l;i=Jo(a,l,e+1/3),s=Jo(a,l,e),o=Jo(a,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Fs(e,t){return n=>n>0?t:e}const ea=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},_w=[fl,mn,Un],Bw=e=>_w.find(t=>t.test(e));function Ff(e){const t=Bw(e);if(!t)return!1;let n=t.parse(e);return t===Un&&(n=bw(n)),n}const bf=(e,t)=>{const n=Ff(e),r=Ff(t);if(!n||!r)return Fs(e,t);const i={...n};return s=>(i.red=ea(n.red,r.red,s),i.green=ea(n.green,r.green,s),i.blue=ea(n.blue,r.blue,s),i.alpha=te(n.alpha,r.alpha,s),mn.transform(i))},pl=new Set(["none","hidden"]);function zw(e,t){return pl.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function $w(e,t){return n=>te(e,t,n)}function Fu(e){return typeof e=="number"?$w:typeof e=="string"?Ou(e)?Fs:we.test(e)?bf:Ww:Array.isArray(e)?sg:typeof e=="object"?we.test(e)?bf:Uw:Fs}function sg(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Fu(s)(s,t[o]));return s=>{for(let o=0;o{for(const s in r)n[s]=r[s](i);return n}}function Hw(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let s=0;s{const n=Zt.createTransformer(t),r=mi(e),i=mi(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?pl.has(e)&&!i.values.length||pl.has(t)&&!r.values.length?zw(e,t):Ct(sg(Hw(r,i),i.values),n):Fs(e,t)};function og(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?te(e,t,n):Fu(e)(e,t)}function Kw(e,t,n){const r=[],i=n||og,s=e.length-1;for(let o=0;ot[0];if(s===2&&e[0]===e[1])return()=>t[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=Kw(t,r,i),l=o.length,a=u=>{let c=0;if(l>1)for(;ca(qt(e[0],e[s-1],u)):a}function Qw(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ur(0,t,r);e.push(te(n,1,i))}}function Yw(e){const t=[0];return Qw(t,e.length-1),t}function Xw(e,t){return e.map(n=>n*t)}function qw(e,t){return e.map(()=>t||ig).splice(0,e.length-1)}function bs({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Iw(r)?r.map(If):If(r),s={done:!1,value:t[0]},o=Xw(n&&n.length===t.length?n:Yw(t),e),l=Gw(o,t,{ease:Array.isArray(i)?i:qw(t,i)});return{calculatedDuration:e,next:a=>(s.value=l(a),s.done=a>=e,s)}}const _f=2e4;function Zw(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<_f;)t+=n,r=e.next(t);return t>=_f?1/0:t}const Jw=e=>{const t=({timestamp:n})=>e(n);return{start:()=>H.update(t,!0),stop:()=>Xt(t),now:()=>pe.isProcessing?pe.timestamp:ht.now()}},ex={decay:jf,inertia:jf,tween:bs,keyframes:bs,spring:rg},tx=e=>e/100;class bu extends eg{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||Ru,l=(a,u)=>this.onKeyframesResolved(a,u);this.resolver=new o(s,l,n,r,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,l=Vu(n)?n:ex[n]||bs;let a,u;l!==bs&&typeof t[0]!="number"&&(a=Ct(tx,og(t[0],t[1])),t=[0,100]);const c=l({...this.options,keyframes:t});s==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=Zw(c));const{calculatedDuration:d}=c,f=d+i,m=f*(r+1)-i;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:a,calculatedDuration:d,resolvedDuration:f,totalDuration:m}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:k}=this.options;return{done:!0,value:k[k.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:l,keyframes:a,calculatedDuration:u,totalDuration:c,resolvedDuration:d}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:m,repeatType:v,repeatDelay:y,onUpdate:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-f*(this.speed>=0?1:-1),h=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let p=this.currentTime,w=s;if(m){const k=Math.min(this.currentTime,c)/d;let I=Math.floor(k),M=k%1;!M&&k>=1&&(M=1),M===1&&I--,I=Math.min(I,m+1),!!(I%2)&&(v==="reverse"?(M=1-M,y&&(M-=y/d)):v==="mirror"&&(w=o)),p=qt(0,1,M)*d}const P=h?{done:!1,value:a[0]}:w.next(p);l&&(P.value=l(P.value));let{done:C}=P;!h&&u!==null&&(C=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return A&&i!==void 0&&(P.value=po(a,this.options,i)),x&&x(P.value),A&&this.finish(),P}get duration(){const{resolved:t}=this;return t?Pt(t.calculatedDuration):0}get time(){return Pt(this.currentTime)}set time(t){t=St(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Pt(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Jw,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const ag=new Set(["opacity","clipPath","filter","transform"]),nx=10,rx=(e,t)=>{let n="";const r=Math.max(Math.round(t/nx),2);for(let i=0;i(t===void 0&&(t=e()),t)}const ix={linearEasing:void 0};function sx(e,t){const n=_u(e);return()=>{var r;return(r=ix[t])!==null&&r!==void 0?r:n()}}const _s=sx(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function lg(e){return!!(typeof e=="function"&&_s()||!e||typeof e=="string"&&(e in ml||_s())||Iu(e)||Array.isArray(e)&&e.every(lg))}const Dr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ml={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Dr([0,.65,.55,1]),circOut:Dr([.55,0,1,.45]),backIn:Dr([.31,.01,.66,-.59]),backOut:Dr([.33,1.53,.69,.99])};function ug(e,t){if(e)return typeof e=="function"&&_s()?rx(e,t):Iu(e)?Dr(e):Array.isArray(e)?e.map(n=>ug(n,t)||ml.easeOut):ml[e]}function ox(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:l,times:a}={}){const u={[t]:n};a&&(u.offset=a);const c=ug(l,i);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}function Bf(e,t){e.timeline=t,e.onfinish=null}const ax=_u(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Bs=10,lx=2e4;function ux(e){return Vu(e.type)||e.type==="spring"||!lg(e.ease)}function cx(e,t){const n=new bu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&sthis.onKeyframesResolved(o,l),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:s,ease:o,type:l,motionValue:a,name:u,startTime:c}=this.options;if(!(!((r=a.owner)===null||r===void 0)&&r.current))return!1;if(typeof o=="string"&&_s()&&fx(o)&&(o=cg[o]),ux(this.options)){const{onComplete:f,onUpdate:m,motionValue:v,element:y,...x}=this.options,g=cx(t,x);t=g.keyframes,t.length===1&&(t[1]=t[0]),i=g.duration,s=g.times,o=g.ease,l="keyframes"}const d=ox(a.owner.current,u,t,{...this.options,duration:i,times:s,ease:o});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(Bf(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;a.set(po(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:i,times:s,type:l,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Pt(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Pt(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=St(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Pe;const{animation:r}=n;Bf(r,t)}return Pe}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:s,ease:o,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:d,element:f,...m}=this.options,v=new bu({...m,keyframes:r,duration:i,type:s,ease:o,times:l,isGenerator:!0}),y=St(this.time);u.setWithVelocity(v.sample(y-Bs).value,v.sample(y).value,Bs)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:o,type:l}=t;return ax()&&r&&ag.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&s!=="mirror"&&o!==0&&l!=="inertia"}}const dx=_u(()=>window.ScrollTimeline!==void 0);class hx{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;rdx()&&i.attachTimeline?i.attachTimeline(t):n(i));return()=>{r.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function px({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:l,from:a,elapsed:u,...c}){return!!Object.keys(c).length}const Bu=(e,t,n,r={},i,s)=>o=>{const l=Eu(r,e)||{},a=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-St(a);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:f=>{t.set(f),l.onUpdate&&l.onUpdate(f)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:s?void 0:i};px(l)||(c={...c,...N1(e,c)}),c.duration&&(c.duration=St(c.duration)),c.repeatDelay&&(c.repeatDelay=St(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(d=!0)),d&&!s&&t.get()!==void 0){const f=po(c.keyframes,l);if(f!==void 0)return H.update(()=>{c.onUpdate(f),c.onComplete()}),new hx([])}return!s&&zf.supports(c)?new zf(c):new bu(c)},mx=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),gx=e=>al(e)?e[e.length-1]||0:e;function zu(e,t){e.indexOf(t)===-1&&e.push(t)}function $u(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Uu{constructor(){this.subscriptions=[]}add(t){return zu(this.subscriptions,t),()=>$u(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!isNaN(parseFloat(e));class vx{constructor(t,n={}){this.version="11.11.8",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=ht.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ht.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=yx(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Uu);const r=this.events[t].add(n);return t==="change"?()=>{r(),H.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ht.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>$f)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,$f);return tg(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function gi(e,t){return new vx(e,t)}function wx(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,gi(n))}function xx(e,t){const n=ho(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const l=gx(s[o]);wx(e,o,l)}}const mo=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Sx="framerAppearId",fg="data-"+mo(Sx);function dg(e){return e.props[fg]}const Se=e=>!!(e&&e.getVelocity);function Px(e){return!!(Se(e)&&e.add)}function hg(e){if(rn.has(e))return"transform";if(ag.has(e))return mo(e)}function gl(e,t){var n;if(!e.applyWillChange)return;const r=e.getValue("willChange");if(Px(r))return r.add(t);!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&hg(t)&&e.setStaticValue("willChange","transform")}function Cx({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function pg(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var s;let{transition:o=e.getDefaultTransition(),transitionEnd:l,...a}=t;r&&(o=r);const u=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const d in a){const f=e.getValue(d,(s=e.latestValues[d])!==null&&s!==void 0?s:null),m=a[d];if(m===void 0||c&&Cx(c,d))continue;const v={delay:n,...Eu(o||{},d)};let y=!1;if(window.MotionHandoffAnimation){const g=dg(e);if(g){const h=window.MotionHandoffAnimation(g,d,H);h!==null&&(v.startTime=h,y=!0)}}gl(e,d),f.start(Bu(d,f,m,e.shouldReduceMotion&&rn.has(d)?{type:!1}:v,e,y));const x=f.animation;x&&u.push(x)}return l&&Promise.all(u).then(()=>{H.update(()=>{l&&xx(e,l)})}),u}function yl(e,t,n={}){var r;const i=ho(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(pg(e,i,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=s;return Tx(e,t,c+u,d,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[u,c]=a==="beforeChildren"?[o,l]:[l,o];return u().then(()=>c())}else return Promise.all([o(),l(n.delay)])}function Tx(e,t,n=0,r=0,i=1,s){const o=[],l=(e.variantChildren.size-1)*r,a=i===1?(u=0)=>u*r:(u=0)=>l-u*r;return Array.from(e.variantChildren).sort(kx).forEach((u,c)=>{u.notify("AnimationStart",t),o.push(yl(u,t,{...s,delay:n+a(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function kx(e,t){return e.sortNodePosition(t)}function Ex(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>yl(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=yl(e,t,n);else{const i=typeof t=="function"?ho(e,t,n.custom):t;r=Promise.all(pg(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Lx=ku.length;function mg(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?mg(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:r})=>Ex(e,n,r)))}function Mx(e){let t=Rx(e),n=Uf(),r=!0;const i=a=>(u,c)=>{var d;const f=ho(e,c,a==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:m,transitionEnd:v,...y}=f;u={...u,...y,...v}}return u};function s(a){t=a(e)}function o(a){const{props:u}=e,c=mg(e.parent)||{},d=[],f=new Set;let m={},v=1/0;for(let x=0;xv&&w,I=!1;const M=Array.isArray(p)?p:[p];let F=M.reduce(i(g),{});P===!1&&(F={});const{prevResolvedValues:K={}}=h,q={...K,...F},le=j=>{k=!0,f.has(j)&&(I=!0,f.delete(j)),h.needsAnimating[j]=!0;const T=e.getValue(j);T&&(T.liveStyle=!1)};for(const j in q){const T=F[j],D=K[j];if(m.hasOwnProperty(j))continue;let N=!1;al(T)&&al(D)?N=!Am(T,D):N=T!==D,N?T!=null?le(j):f.add(j):T!==void 0&&f.has(j)?le(j):h.protectedKeys[j]=!0}h.prevProp=p,h.prevResolvedValues=F,h.isActive&&(m={...m,...F}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(C&&A)||I)&&d.push(...M.map(j=>({animation:j,options:{type:g}})))}if(f.size){const x={};f.forEach(g=>{const h=e.getBaseTarget(g),p=e.getValue(g);p&&(p.liveStyle=!0),x[g]=h??null}),d.push({animation:x})}let y=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(d):Promise.resolve()}function l(a,u){var c;if(n[a].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(f=>{var m;return(m=f.animationState)===null||m===void 0?void 0:m.setActive(a,u)}),n[a].isActive=u;const d=o(a);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:l,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Uf(),r=!0}}}function Dx(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Am(t,e):!1}function an(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Uf(){return{animate:an(!0),whileInView:an(),whileHover:an(),whileTap:an(),whileDrag:an(),whileFocus:an(),exit:an()}}class sn{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Nx extends sn{constructor(t){super(t),t.animationState||(t.animationState=Mx(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();di(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let jx=0;class Vx extends sn{constructor(){super(...arguments),this.id=jx++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const Ix={animation:{Feature:Nx},exit:{Feature:Vx}},gg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function go(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const Fx=e=>t=>gg(t)&&e(t,go(t));function wt(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Tt(e,t,n,r){return wt(e,t,Fx(n),r)}const Hf=(e,t)=>Math.abs(e-t);function bx(e,t){const n=Hf(e.x,t.x),r=Hf(e.y,t.y);return Math.sqrt(n**2+r**2)}class yg{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 d=na(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,m=bx(d.offset,{x:0,y:0})>=3;if(!f&&!m)return;const{point:v}=d,{timestamp:y}=pe;this.history.push({...v,timestamp:y});const{onStart:x,onMove:g}=this.handlers;f||(x&&x(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=ta(f,this.transformPagePoint),H.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:m,onSessionEnd:v,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=na(d.type==="pointercancel"?this.lastMoveEventInfo:ta(f,this.transformPagePoint),this.history);this.startEvent&&m&&m(d,x),v&&v(d,x)},!gg(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=go(t),l=ta(o,this.transformPagePoint),{point:a}=l,{timestamp:u}=pe;this.history=[{...a,timestamp:u}];const{onSessionStart:c}=n;c&&c(t,na(l,this.history)),this.removeListeners=Ct(Tt(this.contextWindow,"pointermove",this.handlePointerMove),Tt(this.contextWindow,"pointerup",this.handlePointerUp),Tt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Xt(this.updatePoint)}}function ta(e,t){return t?{point:t(e.point)}:e}function Wf(e,t){return{x:e.x-t.x,y:e.y-t.y}}function na({point:e},t){return{point:e,delta:Wf(e,vg(t)),offset:Wf(e,_x(t)),velocity:Bx(t,.1)}}function _x(e){return e[0]}function vg(e){return e[e.length-1]}function Bx(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=vg(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>St(t)));)n--;if(!r)return{x:0,y:0};const s=Pt(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 wg(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Kf=wg("dragHorizontal"),Gf=wg("dragVertical");function xg(e){let t=!1;if(e==="y")t=Gf();else if(e==="x")t=Kf();else{const n=Kf(),r=Gf();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Sg(){const e=xg(!0);return e?(e(),!1):!0}function Hn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const Pg=1e-4,zx=1-Pg,$x=1+Pg,Cg=.01,Ux=0-Cg,Hx=0+Cg;function _e(e){return e.max-e.min}function Wx(e,t,n){return Math.abs(e-t)<=n}function Qf(e,t,n,r=.5){e.origin=r,e.originPoint=te(t.min,t.max,e.origin),e.scale=_e(n)/_e(t),e.translate=te(n.min,n.max,e.origin)-e.originPoint,(e.scale>=zx&&e.scale<=$x||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ux&&e.translate<=Hx||isNaN(e.translate))&&(e.translate=0)}function Wr(e,t,n,r){Qf(e.x,t.x,n.x,r?r.originX:void 0),Qf(e.y,t.y,n.y,r?r.originY:void 0)}function Yf(e,t,n){e.min=n.min+t.min,e.max=e.min+_e(t)}function Kx(e,t,n){Yf(e.x,t.x,n.x),Yf(e.y,t.y,n.y)}function Xf(e,t,n){e.min=t.min-n.min,e.max=e.min+_e(t)}function Kr(e,t,n){Xf(e.x,t.x,n.x),Xf(e.y,t.y,n.y)}function Gx(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?te(n,e,r.max):Math.min(e,n)),e}function qf(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 Qx(e,{top:t,left:n,bottom:r,right:i}){return{x:qf(e.x,n,i),y:qf(e.y,t,r)}}function Zf(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=ur(t.min,t.max-r,e.min):r>i&&(n=ur(e.min,e.max-i,t.min)),qt(0,1,n)}function qx(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 vl=.35;function Zx(e=vl){return e===!1?e=0:e===!0&&(e=vl),{x:Jf(e,"left","right"),y:Jf(e,"top","bottom")}}function Jf(e,t,n){return{min:ed(e,t),max:ed(e,n)}}function ed(e,t){return typeof e=="number"?e:e[t]||0}const td=()=>({translate:0,scale:1,origin:0,originPoint:0}),Wn=()=>({x:td(),y:td()}),nd=()=>({min:0,max:0}),se=()=>({x:nd(),y:nd()});function Ue(e){return[e("x"),e("y")]}function Tg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Jx({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function eS(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 ra(e){return e===void 0||e===1}function wl({scale:e,scaleX:t,scaleY:n}){return!ra(e)||!ra(t)||!ra(n)}function cn(e){return wl(e)||kg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function kg(e){return rd(e.x)||rd(e.y)}function rd(e){return e&&e!=="0%"}function zs(e,t,n){const r=e-n,i=t*r;return n+i}function id(e,t,n,r,i){return i!==void 0&&(e=zs(e,i,r)),zs(e,n,r)+t}function xl(e,t=0,n=1,r,i){e.min=id(e.min,t,n,r,i),e.max=id(e.max,t,n,r,i)}function Eg(e,{x:t,y:n}){xl(e.x,t.translate,t.scale,t.originPoint),xl(e.y,n.translate,n.scale,n.originPoint)}const sd=.999999999999,od=1.0000000000001;function tS(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let l=0;lsd&&(t.x=1),t.ysd&&(t.y=1)}function Kn(e,t){e.min=e.min+t,e.max=e.max+t}function ad(e,t,n,r,i=.5){const s=te(e.min,e.max,i);xl(e,t,n,s,r)}function Gn(e,t){ad(e.x,t.x,t.scaleX,t.scale,t.originX),ad(e.y,t.y,t.scaleY,t.scale,t.originY)}function Lg(e,t){return Tg(eS(e.getBoundingClientRect(),t))}function nS(e,t,n){const r=Lg(e,n),{scroll:i}=t;return i&&(Kn(r.x,i.offset.x),Kn(r.y,i.offset.y)),r}const Ag=({current:e})=>e?e.ownerDocument.defaultView:null,rS=new WeakMap;class iS{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=se(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(go(c,"page").point)},s=(c,d)=>{const{drag:f,dragPropagation:m,onDragStart:v}=this.getProps();if(f&&!m&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=xg(f),!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),Ue(x=>{let g=this.getAxisMotionValue(x).get()||0;if(dt.test(g)){const{projection:h}=this.visualElement;if(h&&h.layout){const p=h.layout.layoutBox[x];p&&(g=_e(p)*(parseFloat(g)/100))}}this.originPoint[x]=g}),v&&H.postRender(()=>v(c,d)),gl(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},o=(c,d)=>{const{dragPropagation:f,dragDirectionLock:m,onDirectionLock:v,onDrag:y}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:x}=d;if(m&&this.currentDirection===null){this.currentDirection=sS(x),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",d.point,x),this.updateAxis("y",d.point,x),this.visualElement.render(),y&&y(c,d)},l=(c,d)=>this.stop(c,d),a=()=>Ue(c=>{var d;return this.getAnimationState(c)==="paused"&&((d=this.getAxisMotionValue(c).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new yg(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:l,resumeAnimation:a},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Ag(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&&H.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Gi(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=Gx(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&&Hn(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Qx(i.layoutBox,n):this.constraints=!1,this.elastic=Zx(r),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Ue(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=qx(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Hn(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=nS(r,i.root,this.visualElement.getTransformPagePoint());let o=Yx(i.layout.layoutBox,s);if(n){const l=n(Jx(o));this.hasMutatedConstraints=!!l,l&&(o=Tg(l))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),a=this.constraints||{},u=Ue(c=>{if(!Gi(c,n,this.currentDirection))return;let d=a&&a[c]||{};o&&(d={min:0,max:0});const f=i?200:1e6,m=i?40:1e7,v={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(c,v)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return gl(this.visualElement,t),r.start(Bu(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ue(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ue(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){Ue(n=>{const{drag:r}=this.getProps();if(!Gi(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:l}=i.layout.layoutBox[n];s.set(t[n]-te(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Hn(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ue(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const a=l.get();i[o]=Xx({min:a,max:a},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(),Ue(o=>{if(!Gi(o,t,null))return;const l=this.getAxisMotionValue(o),{min:a,max:u}=this.constraints[o];l.set(te(a,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;rS.set(this.visualElement,this);const t=this.visualElement.current,n=Tt(t,"pointerdown",a=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(a)}),r=()=>{const{dragConstraints:a}=this.getProps();Hn(a)&&a.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),H.read(r);const o=wt(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:a,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ue(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=a[c].translate,d.set(d.get()+a[c].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=vl,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:l}}}function Gi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function sS(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class oS extends sn{constructor(t){super(t),this.removeGroupControls=Pe,this.removeListeners=Pe,this.controls=new iS(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Pe}unmount(){this.removeGroupControls(),this.removeListeners()}}const ld=e=>(t,n)=>{e&&H.postRender(()=>e(t,n))};class aS extends sn{constructor(){super(...arguments),this.removePointerDownListener=Pe}onPointerDown(t){this.session=new yg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ag(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:ld(t),onStart:ld(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&H.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Tt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const yo=L.createContext(null);function lS(){const e=L.useContext(yo);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=L.useId();L.useEffect(()=>r(i),[]);const s=L.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,s]:[!0]}const Hu=L.createContext({}),Og=L.createContext({}),cs={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ud(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Tr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(_.test(e))e=parseFloat(e);else return e;const n=ud(e,t.target.x),r=ud(e,t.target.y);return`${n}% ${r}%`}},uS={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Zt.parse(e);if(i.length>5)return r;const s=Zt.createTransformer(e),o=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,a=n.y.scale*t.y;i[0+o]/=l,i[1+o]/=a;const u=te(l,a,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}},$s={};function cS(e){Object.assign($s,e)}const{schedule:Wu,cancel:IC}=Om(queueMicrotask,!1);class fS extends L.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;cS(dS),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()})),cs.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()||H.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Wu.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Rg(e){const[t,n]=lS(),r=L.useContext(Hu);return E.jsx(fS,{...e,layoutGroup:r,switchLayoutGroup:L.useContext(Og),isPresent:t,safeToRemove:n})}const dS={borderRadius:{...Tr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Tr,borderTopRightRadius:Tr,borderBottomLeftRadius:Tr,borderBottomRightRadius:Tr,boxShadow:uS},Mg=["TopLeft","TopRight","BottomLeft","BottomRight"],hS=Mg.length,cd=e=>typeof e=="string"?parseFloat(e):e,fd=e=>typeof e=="number"||_.test(e);function pS(e,t,n,r,i,s){i?(e.opacity=te(0,n.opacity!==void 0?n.opacity:1,mS(r)),e.opacityExit=te(t.opacity!==void 0?t.opacity:1,0,gS(r))):s&&(e.opacity=te(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;ort?1:n(ur(e,t,r))}function hd(e,t){e.min=t.min,e.max=t.max}function $e(e,t){hd(e.x,t.x),hd(e.y,t.y)}function pd(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function md(e,t,n,r,i){return e-=t,e=zs(e,1/n,r),i!==void 0&&(e=zs(e,1/i,r)),e}function yS(e,t=0,n=1,r=.5,i,s=e,o=e){if(dt.test(t)&&(t=parseFloat(t),t=te(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=te(s.min,s.max,r);e===s&&(l-=t),e.min=md(e.min,t,n,l,i),e.max=md(e.max,t,n,l,i)}function gd(e,t,[n,r,i],s,o){yS(e,t[n],t[r],t[i],t.scale,s,o)}const vS=["x","scaleX","originX"],wS=["y","scaleY","originY"];function yd(e,t,n,r){gd(e.x,t,vS,n?n.x:void 0,r?r.x:void 0),gd(e.y,t,wS,n?n.y:void 0,r?r.y:void 0)}function vd(e){return e.translate===0&&e.scale===1}function Ng(e){return vd(e.x)&&vd(e.y)}function wd(e,t){return e.min===t.min&&e.max===t.max}function xS(e,t){return wd(e.x,t.x)&&wd(e.y,t.y)}function xd(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function jg(e,t){return xd(e.x,t.x)&&xd(e.y,t.y)}function Sd(e){return _e(e.x)/_e(e.y)}function Pd(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class SS{constructor(){this.members=[]}add(t){zu(this.members,t),t.scheduleRender()}remove(t){if($u(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 PS(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:m,skewY:v}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),m&&(r+=`skewX(${m}deg) `),v&&(r+=`skewY(${v}deg) `)}const l=e.x.scale*t.x,a=e.y.scale*t.y;return(l!==1||a!==1)&&(r+=`scale(${l}, ${a})`),r||"none"}const CS=(e,t)=>e.depth-t.depth;class TS{constructor(){this.children=[],this.isDirty=!1}add(t){zu(this.children,t),this.isDirty=!0}remove(t){$u(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(CS),this.isDirty=!1,this.children.forEach(t)}}function fs(e){const t=Se(e)?e.get():e;return mx(t)?t.toValue():t}function kS(e,t){const n=ht.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Xt(r),e(s-t))};return H.read(r,!0),()=>Xt(r)}function ES(e){return e instanceof SVGElement&&e.tagName!=="svg"}function LS(e,t,n){const r=Se(e)?e:gi(e);return r.start(Bu("",r,t,n)),r.animation}const fn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Nr=typeof window<"u"&&window.MotionDebug!==void 0,ia=["","X","Y","Z"],AS={visibility:"hidden"},Cd=1e3;let OS=0;function sa(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Vg(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=dg(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",H,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Vg(r)}function Ig({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},l=t==null?void 0:t()){this.id=OS++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Nr&&(fn.totalNodes=fn.resolvedTargetDeltas=fn.recalculatedProjection=0),this.nodes.forEach(DS),this.nodes.forEach(FS),this.nodes.forEach(bS),this.nodes.forEach(NS),Nr&&window.MotionDebug.record(fn)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let a=0;athis.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=kS(f,250),cs.hasAnimatedSinceResize&&(cs.hasAnimatedSinceResize=!1,this.nodes.forEach(kd))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:m,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||c.getDefaultTransition()||US,{onLayoutAnimationStart:x,onLayoutAnimationComplete:g}=c.getProps(),h=!this.targetLayout||!jg(this.targetLayout,v)||m,p=!f&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||p||f&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,p);const w={...Eu(y,"layout"),onPlay:x,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else f||kd(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Xt(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(_S),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Vg(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c{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 a=0;a{const P=w/1e3;Ed(d.x,o.x,P),Ed(d.y,o.y,P),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Kr(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),zS(this.relativeTarget,this.relativeTargetOrigin,f,P),p&&xS(this.relativeTarget,p)&&(this.isProjectionDirty=!1),p||(p=se()),$e(p,this.relativeTarget)),y&&(this.animationValues=c,pS(c,u,this.latestValues,P,h,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},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&&(Xt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=H.update(()=>{cs.hasAnimatedSinceResize=!0,this.currentAnimation=LS(0,Cd,{...o,onUpdate:l=>{this.mixTargetDelta(l),o.onUpdate&&o.onUpdate(l)},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(Cd),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:a,layout:u,latestValues:c}=o;if(!(!l||!a||!u)){if(this!==o&&this.layout&&u&&Fg(this.options.animationType,this.layout.layoutBox,u.layoutBox)){a=this.target||se();const d=_e(this.layout.layoutBox.x);a.x.min=o.target.x.min,a.x.max=a.x.min+d;const f=_e(this.layout.layoutBox.y);a.y.min=o.target.y.min,a.y.max=a.y.min+f}$e(l,a),Gn(l,c),Wr(this.projectionDeltaWithTransform,this.layoutCorrected,l,c)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new SS),this.sharedNodes.get(o).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:l}=this.options;return l?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:l}=this.options;return l?(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:l,preserveFollowOpacity:a}={}){const u=this.getStack();u&&u.promote(this,a),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:a}=o;if((a.z||a.rotate||a.rotateX||a.rotateY||a.rotateZ||a.skewX||a.skewY)&&(l=!0),!l)return;const u={};a.z&&sa("z",o,u,this.animationValues);for(let c=0;c{var l;return(l=o.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(Td),this.root.sharedNodes.clear()}}}function RS(e){e.updateLayout()}function MS(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"?Ue(d=>{const f=o?n.measuredBox[d]:n.layoutBox[d],m=_e(f);f.min=r[d].min,f.max=f.min+m}):Fg(s,n.layoutBox,r)&&Ue(d=>{const f=o?n.measuredBox[d]:n.layoutBox[d],m=_e(r[d]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+m)});const l=Wn();Wr(l,r,n.layoutBox);const a=Wn();o?Wr(a,e.applyTransform(i,!0),n.measuredBox):Wr(a,r,n.layoutBox);const u=!Ng(l);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:m}=d;if(f&&m){const v=se();Kr(v,n.layoutBox,f.layoutBox);const y=se();Kr(y,r,m.layoutBox),jg(v,y)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=v,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:a,layoutDelta:l,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function DS(e){Nr&&fn.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 NS(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function jS(e){e.clearSnapshot()}function Td(e){e.clearMeasurements()}function VS(e){e.isLayoutDirty=!1}function IS(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function kd(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function FS(e){e.resolveTargetDelta()}function bS(e){e.calcProjection()}function _S(e){e.resetSkewAndRotation()}function BS(e){e.removeLeadSnapshot()}function Ed(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 Ld(e,t,n,r){e.min=te(t.min,n.min,r),e.max=te(t.max,n.max,r)}function zS(e,t,n,r){Ld(e.x,t.x,n.x,r),Ld(e.y,t.y,n.y,r)}function $S(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const US={duration:.45,ease:[.4,0,.1,1]},Ad=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Od=Ad("applewebkit/")&&!Ad("chrome/")?Math.round:Pe;function Rd(e){e.min=Od(e.min),e.max=Od(e.max)}function HS(e){Rd(e.x),Rd(e.y)}function Fg(e,t,n){return e==="position"||e==="preserve-aspect"&&!Wx(Sd(t),Sd(n),.2)}function WS(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const KS=Ig({attachResizeListener:(e,t)=>wt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),oa={current:void 0},bg=Ig({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!oa.current){const e=new KS({});e.mount(window),e.setOptions({layoutScroll:!0}),oa.current=e}return oa.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),GS={pan:{Feature:aS},drag:{Feature:oS,ProjectionNode:bg,MeasureLayout:Rg}};function Md(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(s,o)=>{if(s.pointerType==="touch"||Sg())return;const l=e.getProps();e.animationState&&l.whileHover&&e.animationState.setActive("whileHover",t);const a=l[r];a&&H.postRender(()=>a(s,o))};return Tt(e.current,n,i,{passive:!e.getProps()[r]})}class QS extends sn{mount(){this.unmount=Ct(Md(this.node,!0),Md(this.node,!1))}unmount(){}}class YS extends sn{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=Ct(wt(this.node.current,"focus",()=>this.onFocus()),wt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const _g=(e,t)=>t?e===t?!0:_g(e,t.parentElement):!1;function aa(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,go(n))}class XS extends sn{constructor(){super(...arguments),this.removeStartListeners=Pe,this.removeEndListeners=Pe,this.removeAccessibleListeners=Pe,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),s=Tt(window,"pointerup",(l,a)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c,globalTapTarget:d}=this.node.getProps(),f=!d&&!_g(this.node.current,l.target)?c:u;f&&H.update(()=>f(l,a))},{passive:!(r.onTap||r.onPointerUp)}),o=Tt(window,"pointercancel",(l,a)=>this.cancelPress(l,a),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Ct(s,o),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const o=l=>{l.key!=="Enter"||!this.checkPressEnd()||aa("up",(a,u)=>{const{onTap:c}=this.node.getProps();c&&H.postRender(()=>c(a,u))})};this.removeEndListeners(),this.removeEndListeners=wt(this.node.current,"keyup",o),aa("down",(l,a)=>{this.startPress(l,a)})},n=wt(this.node.current,"keydown",t),r=()=>{this.isPressing&&aa("cancel",(s,o)=>this.cancelPress(s,o))},i=wt(this.node.current,"blur",r);this.removeAccessibleListeners=Ct(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&&H.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Sg()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&H.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Tt(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=wt(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Ct(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Sl=new WeakMap,la=new WeakMap,qS=e=>{const t=Sl.get(e.target);t&&t(e)},ZS=e=>{e.forEach(qS)};function JS({root:e,...t}){const n=e||document;la.has(n)||la.set(n,{});const r=la.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(ZS,{root:e,...t})),r[i]}function e2(e,t,n){const r=JS(t);return Sl.set(e,n),r.observe(e),()=>{Sl.delete(e),r.unobserve(e)}}const t2={some:0,all:1};class n2 extends sn{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:t2[i]},l=a=>{const{isIntersecting:u}=a;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(a)};return e2(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(r2(t,n))&&this.startObserver()}unmount(){}}function r2({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const i2={inView:{Feature:n2},tap:{Feature:XS},focus:{Feature:YS},hover:{Feature:QS}},s2={layout:{ProjectionNode:bg,MeasureLayout:Rg}},Ku=L.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),vo=L.createContext({}),Gu=typeof window<"u",Bg=Gu?L.useLayoutEffect:L.useEffect,zg=L.createContext({strict:!1});function o2(e,t,n,r,i){var s,o;const{visualElement:l}=L.useContext(vo),a=L.useContext(zg),u=L.useContext(yo),c=L.useContext(Ku).reducedMotion,d=L.useRef();r=r||a.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:l,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));const f=d.current,m=L.useContext(Og);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&a2(d.current,n,i,m),L.useInsertionEffect(()=>{f&&f.update(n,u)});const v=n[fg],y=L.useRef(!!v&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,v))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,v)));return Bg(()=>{f&&(window.MotionIsMounted=!0,f.updateFeatures(),Wu.render(f.render),y.current&&f.animationState&&f.animationState.animateChanges())}),L.useEffect(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)===null||x===void 0||x.call(window,v)}),y.current=!1))}),f}function a2(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:l,layoutScroll:a,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:$g(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||l&&Hn(l),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:a,layoutRoot:u})}function $g(e){if(e)return e.options.allowProjection!==!1?e.projection:$g(e.parent)}function l2(e,t,n){return L.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Hn(n)&&(n.current=r))},[t])}function wo(e){return di(e.animate)||ku.some(t=>hi(e[t]))}function Ug(e){return!!(wo(e)||e.variants)}function u2(e,t){if(wo(e)){const{initial:n,animate:r}=e;return{initial:n===!1||hi(n)?n:void 0,animate:hi(r)?r:void 0}}return e.inherit!==!1?t:{}}function c2(e){const{initial:t,animate:n}=u2(e,L.useContext(vo));return L.useMemo(()=>({initial:t,animate:n}),[Dd(t),Dd(n)])}function Dd(e){return Array.isArray(e)?e.join(" "):e}const Nd={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"]},cr={};for(const e in Nd)cr[e]={isEnabled:t=>Nd[e].some(n=>!!t[n])};function f2(e){for(const t in e)cr[t]={...cr[t],...e[t]}}const d2=Symbol.for("motionComponentSymbol");function h2({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&f2(e);function s(l,a){let u;const c={...L.useContext(Ku),...l,layoutId:p2(l)},{isStatic:d}=c,f=c2(l),m=r(l,d);if(!d&&Gu){m2();const v=g2(c);u=v.MeasureLayout,f.visualElement=o2(i,m,c,t,v.ProjectionNode)}return E.jsxs(vo.Provider,{value:f,children:[u&&f.visualElement?E.jsx(u,{visualElement:f.visualElement,...c}):null,n(i,l,l2(m,f.visualElement,a),m,d,f.visualElement)]})}const o=L.forwardRef(s);return o[d2]=i,o}function p2({layoutId:e}){const t=L.useContext(Hu).id;return t&&e!==void 0?t+"-"+e:e}function m2(e,t){L.useContext(zg).strict}function g2(e){const{drag:t,layout:n}=cr;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const y2=["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:!!(y2.indexOf(e)>-1||/[A-Z]/u.test(e))}function Hg(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 Wg=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 Kg(e,t,n,r){Hg(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Wg.has(i)?i:mo(i),t.attrs[i])}function Gg(e,{layout:t,layoutId:n}){return rn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!$s[e]||e==="opacity")}function Yu(e,t,n){var r;const{style:i}=e,s={};for(const o in i)(Se(i[o])||t.style&&Se(t.style[o])||Gg(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[o]=i[o]);return n&&i&&typeof i.willChange=="string"&&(n.applyWillChange=!1),s}function Qg(e,t,n){const r=Yu(e,t,n);for(const i in e)if(Se(e[i])||Se(t[i])){const s=Ti.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}function Xu(e){const t=L.useRef(null);return t.current===null&&(t.current=e()),t.current}function v2({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},i,s,o,l){const a={latestValues:w2(i,s,o,l?!1:e,t),renderState:n()};return r&&(a.mount=u=>r(i,u,a)),a}const Yg=e=>(t,n)=>{const r=L.useContext(vo),i=L.useContext(yo),s=()=>v2(e,t,r,i,n);return n?s():Xu(s)};function jd(e,t,n){const r=Array.isArray(t)?t:[t];for(let i=0;i{for(const g in y){let h=y[g];if(Array.isArray(h)){const p=m?h.length-1:0;h=h[p]}h!==null&&(o[g]=h)}for(const g in x)o[g]=x[g]}),l&&c&&u!==!1&&!di(c)&&jd(e,c,y=>{for(const x in y)if(hg(x)){o.willChange="transform";return}}),o}const qu=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Xg=()=>({...qu(),attrs:{}}),qg=(e,t)=>t&&typeof e=="number"?t.transform(e):e,x2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},S2=Ti.length;function P2(e,t,n){let r="",i=!0;for(let s=0;stypeof e=="string"&&e.toLowerCase()==="svg",L2={useVisualState:Yg({scrapeMotionValuesFromProps:Qg,createRenderState:Xg,onMount:(e,t,{renderState:n,latestValues:r})=>{H.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),H.render(()=>{Ju(n,r,ec(t.tagName),e.transformTemplate),Kg(t,n)})}})},A2={useVisualState:Yg({applyWillChange:!0,scrapeMotionValuesFromProps:Yu,createRenderState:qu})};function Zg(e,t,n){for(const r in t)!Se(t[r])&&!Gg(r,n)&&(e[r]=t[r])}function O2({transformTemplate:e},t){return L.useMemo(()=>{const n=qu();return Zu(n,t,e),Object.assign({},n.vars,n.style)},[t])}function R2(e,t){const n=e.style||{},r={};return Zg(r,n,e),Object.assign(r,O2(e,t)),r}function M2(e,t){const n={},r=R2(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const D2=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Us(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||D2.has(e)}let Jg=e=>!Us(e);function N2(e){e&&(Jg=t=>t.startsWith("on")?!Us(t):e(t))}try{N2(require("@emotion/is-prop-valid").default)}catch{}function j2(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Jg(i)||n===!0&&Us(i)||!t&&!Us(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function V2(e,t,n,r){const i=L.useMemo(()=>{const s=Xg();return Ju(s,t,ec(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Zg(s,e.style,e),i.style={...s,...i.style}}return i}function I2(e=!1){return(n,r,i,{latestValues:s},o)=>{const a=(Qu(n)?V2:M2)(r,s,o,n),u=j2(r,typeof n=="string",e),c=n!==L.Fragment?{...u,...a,ref:i}:{},{children:d}=r,f=L.useMemo(()=>Se(d)?d.get():d,[d]);return L.createElement(n,{...c,children:f})}}function F2(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Qu(r)?L2:A2,preloadedFeatures:e,useRender:I2(i),createVisualElement:t,Component:r};return h2(o)}}const Pl={current:null},ey={current:!1};function b2(){if(ey.current=!0,!!Gu)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Pl.current=e.matches;e.addListener(t),t()}else Pl.current=!1}function _2(e,t,n){for(const r in t){const i=t[r],s=n[r];if(Se(i))e.addValue(r,i);else if(Se(s))e.addValue(r,gi(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,gi(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Id=new WeakMap,B2=[...Hm,we,Zt],z2=e=>B2.find(Um(e)),Fd=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class $2{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},l={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ru,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=ht.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),ey.current||b2(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Pl.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Id.delete(this.current),this.projection&&this.projection.unmount(),Xt(this.notifyUpdate),Xt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=rn.has(t),i=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&H.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in cr){const n=cr[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):se()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=gi(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(_m(i)||bm(i))?i=parseFloat(i):!z2(i)&&Zt.test(n)&&(i=Zm(t,n)),this.setBaseTarget(t,Se(i)?i.get():i)),Se(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=Cu(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[t])}if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Se(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 Uu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class ty extends $2{constructor(){super(...arguments),this.KeyframeResolver=Jm}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]}}function U2(e){return window.getComputedStyle(e)}class H2 extends ty{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Hg}readValueFromInstance(t,n){if(rn.has(n)){const r=ju(n);return r&&r.default||0}else{const r=U2(t),i=(zm(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Lg(t,n)}build(t,n,r){Zu(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Yu(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Se(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class W2 extends ty{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=se}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(rn.has(n)){const r=ju(n);return r&&r.default||0}return n=Wg.has(n)?n:mo(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Qg(t,n,r)}build(t,n,r){Ju(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){Kg(t,n,r,i)}mount(t){this.isSVGTag=ec(t.tagName),super.mount(t)}}const K2=(e,t)=>Qu(e)?new W2(t):new H2(t,{allowProjection:e!==L.Fragment}),G2=F2({...Ix,...i2,...GS,...s2},K2),er=A1(G2);class Q2 extends L.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Y2({children:e,isPresent:t}){const n=L.useId(),r=L.useRef(null),i=L.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=L.useContext(Ku);return L.useInsertionEffect(()=>{const{width:o,height:l,top:a,left:u}=i.current;if(t||!r.current||!o||!l)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return s&&(c.nonce=s),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` - [data-motion-pop-id="${n}"] { - position: absolute !important; - width: ${o}px !important; - height: ${l}px !important; - top: ${a}px !important; - left: ${u}px !important; - } - `),()=>{document.head.removeChild(c)}},[t]),E.jsx(Q2,{isPresent:t,childRef:r,sizeRef:i,children:L.cloneElement(e,{ref:r})})}const X2=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o})=>{const l=Xu(q2),a=L.useId(),u=L.useCallback(d=>{l.set(d,!0);for(const f of l.values())if(!f)return;r&&r()},[l,r]),c=L.useMemo(()=>({id:a,initial:t,isPresent:n,custom:i,onExitComplete:u,register:d=>(l.set(d,!1),()=>l.delete(d))}),s?[Math.random(),u]:[n,u]);return L.useMemo(()=>{l.forEach((d,f)=>l.set(f,!1))},[n]),L.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=E.jsx(Y2,{isPresent:n,children:e})),E.jsx(yo.Provider,{value:c,children:e})};function q2(){return new Map}const Qi=e=>e.key||"";function bd(e){const t=[];return L.Children.forEach(e,n=>{L.isValidElement(n)&&t.push(n)}),t}const Z2=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:s=!0,mode:o="sync"})=>{const l=L.useMemo(()=>bd(e),[e]),a=l.map(Qi),u=L.useRef(!0),c=L.useRef(l),d=Xu(()=>new Map),[f,m]=L.useState(l),[v,y]=L.useState(l);Bg(()=>{u.current=!1,c.current=l;for(let h=0;h{const p=Qi(h),w=l===v||a.includes(p),P=()=>{if(d.has(p))d.set(p,!0);else return;let C=!0;d.forEach(A=>{A||(C=!1)}),C&&(g==null||g(),y(c.current),i&&i())};return E.jsx(X2,{isPresent:w,initial:!u.current||r?void 0:!1,custom:w?void 0:n,presenceAffectsLayout:s,mode:o,onExitComplete:w?void 0:P,children:h},p)})})},ny=({cardId:e,onSelectProperty:t,isComputer:n,isFlipped:r,className:i})=>{const{t:s}=nn(),[o,l]=L.useState(!1),a=e.toString(),u=Is.find(m=>m.id===e);if(!u)return E.jsx("div",{children:"Karte nicht gefunden!"});const c=`/cardBattle/assets/images/${u.image}`,d={hidden:{rotateY:180},visible:{rotateY:0}},f=m=>{const v=s(`eigenschaften.${m}`),y=u.eigenschaften[m];return E.jsxs("li",{onClick:()=>!n&&t&&t(m),style:{cursor:n?"default":"pointer",color:"black",margin:"10px 0"},children:[E.jsx("span",{className:"property-label",children:v}),E.jsx("span",{className:"property-value",children:y}),m!=="eigenschaft1"&&E.jsx("div",{className:"rating-scale",children:E.jsx("div",{className:"rating-bar",style:{width:`${y/5*100}%`,backgroundColor:m==="eigenschaft2"?"#E09594":m==="eigenschaft3"?"#92B4DE":m==="eigenschaft4"?"#76C9B4":"#E0C3B0"}})})]},m)};return E.jsxs(E.Fragment,{children:[E.jsxs(er.div,{className:`card-flip ${i}`,initial:r?"hidden":"visible",animate:r?"hidden":"visible",variants:d,transition:{duration:.1},style:{transformStyle:"preserve-3d",perspective:"1000px"},children:[E.jsxs("div",{className:"card card-front",children:[E.jsx("div",{className:"card-header",children:E.jsx("h2",{children:a?s(`cards.${a}.name`):"Name nicht verfügbar"})}),E.jsx("img",{src:c,alt:a?s(`cards.${a}.name`):"",className:"card-image"}),E.jsxs("ul",{className:"card-properties-list",children:[f("eigenschaft1"),f("eigenschaft2"),f("eigenschaft3"),f("eigenschaft4"),f("eigenschaft5")]}),E.jsx("button",{className:"description-button",onClick:()=>l(!0),children:s("showDescription")})]}),E.jsx("div",{className:"card-back",children:E.jsx("img",{src:"/cardBattle/assets/images/backSite.png",alt:"Card Back"})})]}),E.jsx(Z2,{children:o&&E.jsx(er.div,{className:"description-overlay",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>l(!1),children:E.jsxs(er.div,{className:"description-popup",initial:{y:50,opacity:0},animate:{y:0,opacity:1},exit:{y:50,opacity:0},onClick:m=>m.stopPropagation(),children:[E.jsx("h3",{children:a?s(`cards.${a}.name`):"Name nicht verfügbar"}),E.jsx("p",{children:a?s(`cards.${a}.textinfo`):"Beschreibung nicht verfügbar"}),E.jsx("button",{className:"close-button",onClick:()=>l(!1),children:s("close")})]})})})]})};function ry(e){switch(e){case"left":return{x:"-3000%",opacity:0};case"right":return{x:"3000%",opacity:0};case"up":return{y:"-3000%",opacity:0};default:return{}}}const J2=({playerCards:e,currentPlayerCard:t,animationDirection:n,isComputerTurn:r,handlePropertySelect:i})=>{const{t:s}=nn();return E.jsxs("div",{className:"card-container",children:[E.jsxs("h2",{children:[s("player")," (",e.length,")"]}),t?E.jsx(er.div,{className:"card-spieler",initial:{opacity:0},animate:n?ry(n):{x:0,opacity:[0,0,1]},transition:{duration:n?2:.1,opacity:{delay:n?2:0,duration:3}},children:E.jsx(ny,{cardId:t.id,onSelectProperty:r?void 0:i,className:"player-card"})}):E.jsx("p",{children:s("noMoreCards")})]})},eP=({computerCards:e,currentComputerCard:t,isComputerCardFlipped:n,animationDirection:r})=>{const{t:i}=nn();return E.jsxs("div",{className:"card-container",children:[E.jsxs("h2",{children:[i("computer")," (",e.length,")"]}),t?E.jsx(er.div,{className:"card-computer",initial:{opacity:0},animate:r?ry(r):{x:0,opacity:[0,0,1]},transition:{duration:r?2:.1,opacity:{delay:r?2:0,duration:3}},children:E.jsx(ny,{cardId:t.id,isComputer:!0,isFlipped:n})}):E.jsx("p",{children:i("noMoreCards")})]})},tP=({winner:e,showWinnerMessage:t,selectedProperty:n,playerValue:r,computerValue:i})=>{const{t:s}=nn();if(!t)return null;const o=s(e==="Player"?"player":"computer"),l=s(e==="Player"?"computer":"player");return E.jsxs(er.div,{className:"winner-message",initial:{opacity:0},animate:{opacity:1},transition:{duration:.5},children:[E.jsx("h3",{children:e==="Tie"?s("tieMessage"):s("winMessage",{winner:o,loser:l})}),n&&E.jsxs("p",{children:[s(`eigenschaften.${n}`),": ",r," vs ",i]})]})};var iy={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},tc={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},nP=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],Hs={CSS:{},springs:{}};function at(e,t,n){return Math.min(Math.max(e,t),n)}function Gr(e,t){return e.indexOf(t)>-1}function ua(e,t){return e.apply(null,t)}var b={arr:function(e){return Array.isArray(e)},obj:function(e){return Gr(Object.prototype.toString.call(e),"Object")},pth:function(e){return b.obj(e)&&e.hasOwnProperty("totalLength")},svg:function(e){return e instanceof SVGElement},inp:function(e){return e instanceof HTMLInputElement},dom:function(e){return e.nodeType||b.svg(e)},str:function(e){return typeof e=="string"},fnc:function(e){return typeof e=="function"},und:function(e){return typeof e>"u"},nil:function(e){return b.und(e)||e===null},hex:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)},rgb:function(e){return/^rgb/.test(e)},hsl:function(e){return/^hsl/.test(e)},col:function(e){return b.hex(e)||b.rgb(e)||b.hsl(e)},key:function(e){return!iy.hasOwnProperty(e)&&!tc.hasOwnProperty(e)&&e!=="targets"&&e!=="keyframes"}};function sy(e){var t=/\(([^)]+)\)/.exec(e);return t?t[1].split(",").map(function(n){return parseFloat(n)}):[]}function oy(e,t){var n=sy(e),r=at(b.und(n[0])?1:n[0],.1,100),i=at(b.und(n[1])?100:n[1],.1,100),s=at(b.und(n[2])?10:n[2],.1,100),o=at(b.und(n[3])?0:n[3],.1,100),l=Math.sqrt(i/r),a=s/(2*Math.sqrt(i*r)),u=a<1?l*Math.sqrt(1-a*a):0,c=1,d=a<1?(a*l+-o)/u:-o+l;function f(v){var y=t?t*v/1e3:v;return a<1?y=Math.exp(-y*a*l)*(c*Math.cos(u*y)+d*Math.sin(u*y)):y=(c+d*y)*Math.exp(-y*l),v===0||v===1?v:1-y}function m(){var v=Hs.springs[e];if(v)return v;for(var y=1/6,x=0,g=0;;)if(x+=y,f(x)===1){if(g++,g>=16)break}else g=0;var h=x*y*1e3;return Hs.springs[e]=h,h}return t?f:m}function rP(e){return e===void 0&&(e=10),function(t){return Math.ceil(at(t,1e-6,1)*e)*(1/e)}}var iP=function(){var e=11,t=1/(e-1);function n(c,d){return 1-3*d+3*c}function r(c,d){return 3*d-6*c}function i(c){return 3*c}function s(c,d,f){return((n(d,f)*c+r(d,f))*c+i(d))*c}function o(c,d,f){return 3*n(d,f)*c*c+2*r(d,f)*c+i(d)}function l(c,d,f,m,v){var y,x,g=0;do x=d+(f-d)/2,y=s(x,m,v)-c,y>0?f=x:d=x;while(Math.abs(y)>1e-7&&++g<10);return x}function a(c,d,f,m){for(var v=0;v<4;++v){var y=o(d,f,m);if(y===0)return d;var x=s(d,f,m)-c;d-=x/y}return d}function u(c,d,f,m){if(!(0<=c&&c<=1&&0<=f&&f<=1))return;var v=new Float32Array(e);if(c!==d||f!==m)for(var y=0;y=.001?a(g,C,c,f):A===0?C:l(g,h,h+t,c,f)}return function(g){return c===d&&f===m||g===0||g===1?g:s(x(g),d,m)}}return u}(),ay=function(){var e={linear:function(){return function(r){return r}}},t={Sine:function(){return function(r){return 1-Math.cos(r*Math.PI/2)}},Expo:function(){return function(r){return r?Math.pow(2,10*r-10):0}},Circ:function(){return function(r){return 1-Math.sqrt(1-r*r)}},Back:function(){return function(r){return r*r*(3*r-2)}},Bounce:function(){return function(r){for(var i,s=4;r<((i=Math.pow(2,--s))-1)/11;);return 1/Math.pow(4,3-s)-7.5625*Math.pow((i*3-2)/22-r,2)}},Elastic:function(r,i){r===void 0&&(r=1),i===void 0&&(i=.5);var s=at(r,1,10),o=at(i,.1,2);return function(l){return l===0||l===1?l:-s*Math.pow(2,10*(l-1))*Math.sin((l-1-o/(Math.PI*2)*Math.asin(1/s))*(Math.PI*2)/o)}}},n=["Quad","Cubic","Quart","Quint"];return n.forEach(function(r,i){t[r]=function(){return function(s){return Math.pow(s,i+2)}}}),Object.keys(t).forEach(function(r){var i=t[r];e["easeIn"+r]=i,e["easeOut"+r]=function(s,o){return function(l){return 1-i(s,o)(1-l)}},e["easeInOut"+r]=function(s,o){return function(l){return l<.5?i(s,o)(l*2)/2:1-i(s,o)(l*-2+2)/2}},e["easeOutIn"+r]=function(s,o){return function(l){return l<.5?(1-i(s,o)(1-l*2))/2:(i(s,o)(l*2-1)+1)/2}}}),e}();function nc(e,t){if(b.fnc(e))return e;var n=e.split("(")[0],r=ay[n],i=sy(e);switch(n){case"spring":return oy(e,t);case"cubicBezier":return ua(iP,i);case"steps":return ua(rP,i);default:return ua(r,i)}}function ly(e){try{var t=document.querySelectorAll(e);return t}catch{return}}function xo(e,t){for(var n=e.length,r=arguments.length>=2?arguments[1]:void 0,i=[],s=0;s1&&(v-=1),v<1/6?f+(m-f)*6*v:v<1/2?m:v<2/3?f+(m-f)*(2/3-v)*6:f}var l,a,u;if(r==0)l=a=u=i;else{var c=i<.5?i*(1+r):i+r-i*r,d=2*i-c;l=o(d,c,n+1/3),a=o(d,c,n),u=o(d,c,n-1/3)}return"rgba("+l*255+","+a*255+","+u*255+","+s+")"}function lP(e){if(b.rgb(e))return sP(e);if(b.hex(e))return oP(e);if(b.hsl(e))return aP(e)}function kt(e){var t=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(e);if(t)return t[1]}function uP(e){if(Gr(e,"translate")||e==="perspective")return"px";if(Gr(e,"rotate")||Gr(e,"skew"))return"deg"}function Tl(e,t){return b.fnc(e)?e(t.target,t.id,t.total):e}function lt(e,t){return e.getAttribute(t)}function sc(e,t,n){var r=kt(t);if(rc([n,"deg","rad","turn"],r))return t;var i=Hs.CSS[t+n];if(!b.und(i))return i;var s=100,o=document.createElement(e.tagName),l=e.parentNode&&e.parentNode!==document?e.parentNode:document.body;l.appendChild(o),o.style.position="absolute",o.style.width=s+n;var a=s/o.offsetWidth;l.removeChild(o);var u=a*parseFloat(t);return Hs.CSS[t+n]=u,u}function uy(e,t,n){if(t in e.style){var r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=e.style[t]||getComputedStyle(e).getPropertyValue(r)||"0";return n?sc(e,i,n):i}}function oc(e,t){if(b.dom(e)&&!b.inp(e)&&(!b.nil(lt(e,t))||b.svg(e)&&e[t]))return"attribute";if(b.dom(e)&&rc(nP,t))return"transform";if(b.dom(e)&&t!=="transform"&&uy(e,t))return"css";if(e[t]!=null)return"object"}function cy(e){if(b.dom(e)){for(var t=e.style.transform||"",n=/(\w+)\(([^)]*)\)/g,r=new Map,i;i=n.exec(t);)r.set(i[1],i[2]);return r}}function cP(e,t,n,r){var i=Gr(t,"scale")?1:0+uP(t),s=cy(e).get(t)||i;return n&&(n.transforms.list.set(t,s),n.transforms.last=t),r?sc(e,s,r):s}function ac(e,t,n,r){switch(oc(e,t)){case"transform":return cP(e,t,r,n);case"css":return uy(e,t,n);case"attribute":return lt(e,t);default:return e[t]||0}}function lc(e,t){var n=/^(\*=|\+=|-=)/.exec(e);if(!n)return e;var r=kt(e)||0,i=parseFloat(t),s=parseFloat(e.replace(n[0],""));switch(n[0][0]){case"+":return i+s+r;case"-":return i-s+r;case"*":return i*s+r}}function fy(e,t){if(b.col(e))return lP(e);if(/\s/g.test(e))return e;var n=kt(e),r=n?e.substr(0,e.length-n.length):e;return t?r+t:r}function uc(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function fP(e){return Math.PI*2*lt(e,"r")}function dP(e){return lt(e,"width")*2+lt(e,"height")*2}function hP(e){return uc({x:lt(e,"x1"),y:lt(e,"y1")},{x:lt(e,"x2"),y:lt(e,"y2")})}function dy(e){for(var t=e.points,n=0,r,i=0;i0&&(n+=uc(r,s)),r=s}return n}function pP(e){var t=e.points;return dy(e)+uc(t.getItem(t.numberOfItems-1),t.getItem(0))}function hy(e){if(e.getTotalLength)return e.getTotalLength();switch(e.tagName.toLowerCase()){case"circle":return fP(e);case"rect":return dP(e);case"line":return hP(e);case"polyline":return dy(e);case"polygon":return pP(e)}}function mP(e){var t=hy(e);return e.setAttribute("stroke-dasharray",t),t}function gP(e){for(var t=e.parentNode;b.svg(t)&&b.svg(t.parentNode);)t=t.parentNode;return t}function py(e,t){var n=t||{},r=n.el||gP(e),i=r.getBoundingClientRect(),s=lt(r,"viewBox"),o=i.width,l=i.height,a=n.viewBox||(s?s.split(" "):[0,0,o,l]);return{el:r,viewBox:a,x:a[0]/1,y:a[1]/1,w:o,h:l,vW:a[2],vH:a[3]}}function yP(e,t){var n=b.str(e)?ly(e)[0]:e,r=t||100;return function(i){return{property:i,el:n,svg:py(n),totalLength:hy(n)*(r/100)}}}function vP(e,t,n){function r(c){c===void 0&&(c=0);var d=t+c>=1?t+c:0;return e.el.getPointAtLength(d)}var i=py(e.el,e.svg),s=r(),o=r(-1),l=r(1),a=n?1:i.w/i.vW,u=n?1:i.h/i.vH;switch(e.property){case"x":return(s.x-i.x)*a;case"y":return(s.y-i.y)*u;case"angle":return Math.atan2(l.y-o.y,l.x-o.x)*180/Math.PI}}function Bd(e,t){var n=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,r=fy(b.pth(e)?e.totalLength:e,t)+"";return{original:r,numbers:r.match(n)?r.match(n).map(Number):[0],strings:b.str(e)||t?r.split(n):[]}}function cc(e){var t=e?So(b.arr(e)?e.map(_d):_d(e)):[];return xo(t,function(n,r,i){return i.indexOf(n)===r})}function my(e){var t=cc(e);return t.map(function(n,r){return{target:n,id:r,total:t.length,transforms:{list:cy(n)}}})}function wP(e,t){var n=ic(t);if(/^spring/.test(n.easing)&&(n.duration=oy(n.easing)),b.arr(e)){var r=e.length,i=r===2&&!b.obj(e[0]);i?e={value:e}:b.fnc(t.duration)||(n.duration=t.duration/r)}var s=b.arr(e)?e:[e];return s.map(function(o,l){var a=b.obj(o)&&!b.pth(o)?o:{value:o};return b.und(a.delay)&&(a.delay=l?0:t.delay),b.und(a.endDelay)&&(a.endDelay=l===s.length-1?t.endDelay:0),a}).map(function(o){return Po(o,n)})}function xP(e){for(var t=xo(So(e.map(function(s){return Object.keys(s)})),function(s){return b.key(s)}).reduce(function(s,o){return s.indexOf(o)<0&&s.push(o),s},[]),n={},r=function(s){var o=t[s];n[o]=e.map(function(l){var a={};for(var u in l)b.key(u)?u==o&&(a.value=l[u]):a[u]=l[u];return a})},i=0;i0&&(e=requestAnimationFrame(n))}function n(i){for(var s=et.length,o=0;o0?requestAnimationFrame(n):void 0}function r(){W.suspendWhenDocumentHidden&&($d()?e=cancelAnimationFrame(e):(et.forEach(function(i){return i._onDocumentVisibility()}),wy()))}return typeof document<"u"&&document.addEventListener("visibilitychange",r),t}();function $d(){return!!document&&document.hidden}function W(e){e===void 0&&(e={});var t=0,n=0,r=0,i,s=0,o=null;function l(h){var p=window.Promise&&new Promise(function(w){return o=w});return h.finished=p,p}var a=EP(e);l(a);function u(){var h=a.direction;h!=="alternate"&&(a.direction=h!=="normal"?"normal":"reverse"),a.reversed=!a.reversed,i.forEach(function(p){return p.reversed=a.reversed})}function c(h){return a.reversed?a.duration-h:h}function d(){t=0,n=c(a.currentTime)*(1/W.speed)}function f(h,p){p&&p.seek(h-p.timelineOffset)}function m(h){if(a.reversePlayback)for(var w=s;w--;)f(h,i[w]);else for(var p=0;p2||(D=Math.round(D*le)/le)),S.push(D)}var Z=q.length;if(!Z)j=S[0];else{j=q[0];for(var J=0;J0&&(a.began=!0,y("begin")),!a.loopBegan&&a.currentTime>0&&(a.loopBegan=!0,y("loopBegin")),C<=w&&a.currentTime!==0&&v(0),(C>=P&&a.currentTime!==p||!p)&&v(p),C>w&&C=p&&(n=0,x(),a.remaining?(t=r,y("loopComplete"),a.loopBegan=!1,a.direction==="alternate"&&u()):(a.paused=!0,a.completed||(a.completed=!0,y("loopComplete"),y("complete"),!a.passThrough&&"Promise"in window&&(o(),l(a)))))}return a.reset=function(){var h=a.direction;a.passThrough=!1,a.currentTime=0,a.progress=0,a.paused=!0,a.began=!1,a.loopBegan=!1,a.changeBegan=!1,a.completed=!1,a.changeCompleted=!1,a.reversePlayback=!1,a.reversed=h==="reverse",a.remaining=a.loop,i=a.children,s=i.length;for(var p=s;p--;)a.children[p].reset();(a.reversed&&a.loop!==!0||h==="alternate"&&a.loop===1)&&a.remaining++,v(a.reversed?a.duration:0)},a._onDocumentVisibility=d,a.set=function(h,p){return yy(h,p),a},a.tick=function(h){r=h,t||(t=r),g((r+(n-t))*W.speed)},a.seek=function(h){g(c(h))},a.pause=function(){a.paused=!0,d()},a.play=function(){a.paused&&(a.completed&&a.reset(),a.paused=!1,et.push(a),d(),wy())},a.reverse=function(){u(),a.completed=!a.reversed,d()},a.restart=function(){a.reset(),a.play()},a.remove=function(h){var p=cc(h);xy(p,a)},a.reset(),a.autoplay&&a.play(),a}function Ud(e,t){for(var n=t.length;n--;)rc(e,t[n].animatable.target)&&t.splice(n,1)}function xy(e,t){var n=t.animations,r=t.children;Ud(e,n);for(var i=r.length;i--;){var s=r[i],o=s.animations;Ud(e,o),!o.length&&!s.children.length&&r.splice(i,1)}!n.length&&!r.length&&t.pause()}function LP(e){for(var t=cc(e),n=et.length;n--;){var r=et[n];xy(t,r)}}function AP(e,t){t===void 0&&(t={});var n=t.direction||"normal",r=t.easing?nc(t.easing):null,i=t.grid,s=t.axis,o=t.from||0,l=o==="first",a=o==="center",u=o==="last",c=b.arr(e),d=parseFloat(c?e[0]:e),f=c?parseFloat(e[1]):0,m=kt(c?e[1]:e)||0,v=t.start||0+(c?d:0),y=[],x=0;return function(g,h,p){if(l&&(o=0),a&&(o=(p-1)/2),u&&(o=p-1),!y.length){for(var w=0;w-1&&et.splice(i,1);function o(f){f.passThrough=!0}for(var l=0;l{const[t,n]=L.useState(!1),{t:r}=nn();L.useEffect(()=>{W.timeline({complete:()=>{n(!0),e&&e()}}).add({targets:".text span",translateX:[1e3,0],scale:[1,1],opacity:[0,1],easing:"easeOutExpo",duration:2500,delay:W.stagger(100)}).add({targets:".text span",translateX:[0,500],scale:[1,50],opacity:[1,0],easing:"easeOutExpo",duration:1500,delay:W.stagger(100)})},[e]);const i=r("title").split("").map((s,o)=>E.jsxs("span",{style:{display:"inline-block"},children:[s===" "?" ":s," "]},o));return E.jsx("div",{className:"welcome-animation",style:{display:t?"none":"block"},children:E.jsx("section",{children:E.jsx("h2",{className:"text",children:i})})})},MP=({src:e,playing:t})=>{const n=L.useRef(null);return L.useEffect(()=>(n.current?n.current.src=e:n.current=new Audio(e),()=>{n.current&&(n.current.pause(),n.current.removeAttribute("src"),n.current.load())}),[e]),L.useEffect(()=>{var r,i;t?(r=n.current)==null||r.play().catch(s=>console.error("Error playing audio:",s)):(i=n.current)==null||i.pause()},[t]),null},DP=({playerWon:e})=>{const t=L.useRef(null),n=e?"You Win!":"You Lose!",r="#fff",i=e?"#4CAF50":"#e80202";return L.useEffect(()=>{const s=t.current,o=e?"block-green":"block-red";for(let a=0;a<25;a++){const u=document.createElement("div");u.classList.add("block",o);const c=a%Is.length,d=Is[c],f=`/cardBattle/assets/images/${d.image}`,m=d.name,v=document.createElement("img");v.src=f,v.style.width="100%",v.style.height="auto";const y=document.createElement("p");y.textContent=m,y.style.color="#fff",y.style.textAlign="center",u.appendChild(v),u.appendChild(y),s&&s.appendChild(u)}const l=()=>{W({targets:s.querySelectorAll(".block"),translateX:()=>W.random(-700,700),translateY:()=>W.random(-700,700),scale:()=>W.random(.5,5),easing:"easeInOutQuad",duration:3e3,complete:l})};l()},[e]),E.jsx("div",{className:"end-animation-container",ref:t,style:{background:i},children:E.jsxs("div",{className:"end-animation-content",children:[E.jsxs("h2",{className:"end-animation-message",style:{color:r},children:[E.jsxs("span",{children:["Money Wars",E.jsx("br",{})]}),n]}),E.jsx("button",{className:"end-animation-button",onClick:()=>window.location.reload(),children:"Play Again"})]})})},NP=({className:e})=>{const{i18n:t}=nn(),n=r=>{t.changeLanguage(r)};return E.jsxs("div",{children:[E.jsx("button",{className:e,onClick:()=>n("de"),children:"Deutsch"}),E.jsx("button",{className:e,onClick:()=>n("en"),children:"English"})]})},jP=({className:e})=>{const[t,n]=L.useState(!1),{t:r}=nn(),i=()=>{n(!t)},s=o=>{navigator.clipboard.writeText(o).then(()=>{alert("Copied to clipboard")})};return E.jsxs(E.Fragment,{children:[E.jsx("button",{className:e,onClick:i,children:"Info"}),t&&E.jsx("div",{className:"popup-overlay",children:E.jsxs("div",{className:"popup-content",children:[E.jsxs("div",{className:"about-me",children:[E.jsx("h2",{children:r("info.aboutMe")}),E.jsx("p",{children:r("info.description")}),E.jsxs("p",{children:[r("info.customizeMessage"),E.jsx("div",{children:E.jsxs("a",{href:r("info.githubLink"),target:"_blank",rel:"noopener noreferrer",children:[E.jsx("svg",{height:"32","aria-hidden":"true",viewBox:"0 0 24 24",version:"1.1",width:"32","data-view-component":"true",className:"octicon octicon-mark-github v-align-middle color-fg-default",style:{width:"20px",marginRight:"10px"},children:E.jsx("path",{d:"M12.5.75C6.146.75 1 5.896 1 12.25c0 5.089 3.292 9.387 7.863 10.91.575.101.79-.244.79-.546 0-.273-.014-1.178-.014-2.142-2.889.532-3.636-.704-3.866-1.35-.13-.331-.69-1.352-1.18-1.625-.402-.216-.977-.748-.014-.762.906-.014 1.553.834 1.769 1.179 1.035 1.74 2.688 1.25 3.349.948.1-.747.402-1.25.733-1.538-2.559-.287-5.232-1.279-5.232-5.678 0-1.25.445-2.285 1.178-3.09-.115-.288-.517-1.467.115-3.048 0 0 .963-.302 3.163 1.179.92-.259 1.897-.388 2.875-.388.977 0 1.955.13 2.875.388 2.2-1.495 3.162-1.179 3.162-1.179.633 1.581.23 2.76.115 3.048.733.805 1.179 1.825 1.179 3.09 0 4.413-2.688 5.39-5.247 5.678.417.36.776 1.05.776 2.128 0 1.538-.014 2.774-.014 3.162 0 .302.216.662.79.547C20.709 21.637 24 17.324 24 12.25 24 5.896 18.854.75 12.5.75Z"})}),r("info.github")]})})]}),E.jsxs("p",{children:[E.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{marginRight:"10px"},children:E.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.7502 1.5C13.3359 1.5 13.0002 1.83579 13.0002 2.25C13.0002 2.44257 13.0717 2.61663 13.191 2.74981C13.2963 2.86751 13.4367 2.95067 13.5937 2.98382C13.6435 2.99433 13.6958 3 13.7502 3C14.1644 3 14.5002 2.66421 14.5002 2.25C14.5002 1.83579 14.1644 1.5 13.7502 1.5ZM11.5002 2.25C11.5002 1.00736 12.5075 0 13.7502 0C14.7298 0 15.5632 0.626106 15.8721 1.5H17.2502C17.6644 1.5 18.0002 1.83579 18.0002 2.25C18.0002 2.66421 17.6644 3 17.2502 3H15.8721C15.7646 3.30433 15.5934 3.5786 15.3746 3.80685C15.8823 4.15684 16.2746 4.56859 16.5559 5.03129C17.0977 5.92273 17.1689 6.90747 16.9843 7.79359C16.803 8.66356 16.4559 9.21659 16.076 9.55603C16.0407 9.58759 16.0055 9.61689 15.9707 9.64408C15.9901 9.86441 15.987 10.0911 15.961 10.3234C15.8963 11.095 15.7248 11.9737 14.9635 12.7682C14.447 13.3072 13.7758 13.6448 13.2782 13.8437C13.0474 13.936 12.8402 14.0039 12.6813 14.0508C12.5887 14.2176 12.4689 14.451 12.3551 14.7243C12.1564 15.2017 11.999 15.7473 12.0002 16.2484C12.0011 16.664 12.1111 17.3476 12.2365 17.9768C12.2743 18.1665 12.3122 18.3447 12.3464 18.5001H13.2502C13.6644 18.5001 14.0002 18.8359 14.0002 19.2501C14.0002 19.6643 13.6644 20.0001 13.2502 20.0001H9.50017C9.15558 20.0001 8.85533 19.7653 8.77228 19.4308L9.50017 19.2501C8.77228 19.4308 8.77228 19.4308 8.77228 19.4308L8.77052 19.4237L8.76601 19.4053L8.74947 19.337C8.73534 19.2781 8.71532 19.1935 8.69136 19.0891C8.64351 18.8806 8.5796 18.5917 8.51548 18.2701C8.39148 17.6482 8.25146 16.8318 8.25017 16.2518C8.24854 15.5227 8.455 14.8065 8.6849 14.2341C8.16639 14.1203 7.6883 13.9364 7.28499 13.7003C6.8511 13.4462 6.41419 13.0729 6.17829 12.5938H2.75029C2.4353 12.5938 2.15363 12.3969 2.04556 12.1011C1.93749 11.8052 2.0258 11.4733 2.26663 11.2703L3.18599 10.4953C2.80831 10.4564 2.51374 10.1372 2.51374 9.74926C2.51374 8.4257 3.50881 7.51335 4.62109 6.95581C5.76228 6.38377 7.24656 6.05918 8.72722 5.97699C10.2102 5.89468 11.7615 6.05149 13.0442 6.50251C13.9451 6.81927 14.793 7.31253 15.3456 8.03745C15.4073 7.89899 15.4675 7.71949 15.5158 7.48766C15.6401 6.89125 15.5786 6.31137 15.2741 5.81039C14.9722 5.31375 14.3741 4.8005 13.2451 4.44292C12.7831 4.33682 12.3768 4.0893 12.0732 3.75019C11.7174 3.35262 11.5002 2.82579 11.5002 2.25ZM10.8948 14.3362C10.6852 14.3506 10.4759 14.3595 10.2686 14.3634C10.0228 14.8666 9.74868 15.5834 9.75016 16.2484C9.75109 16.664 9.86108 17.3476 9.98652 17.9768C10.0243 18.1665 10.0622 18.3447 10.0964 18.5001H10.8124C10.7969 18.4258 10.7812 18.349 10.7655 18.2701C10.6415 17.6482 10.5015 16.8318 10.5002 16.2518C10.4986 15.5522 10.6874 14.8745 10.8948 14.3362Z",fill:"#CA36B9"})}),r("info.nostr"),": ",r("info.nostrPubKey"),E.jsx("button",{onClick:()=>s(r("info.nostrPubKey")),style:{marginLeft:"10px"},children:"Copy"})]})]}),E.jsx("div",{children:E.jsx("lightning-widget",{name:r("info.widgetName"),"button-text":r("info.widgetButtonText"),to:"aldobarazutti@getalby.com",labels:"☕,🍺,🍕",amounts:"2500,5000,25000",accent:"#444444"})}),E.jsx("div",{className:"schliesen-button",children:E.jsx("button",{className:"button",onClick:i,children:r("info.closeButton")})})]})})]})},VP=({isPlaying:e,toggleMusic:t,className:n})=>E.jsx("button",{className:n,onClick:t,children:e?"Pause Music":"Play Music"}),IP=({isPlaying:e,toggleMusic:t})=>{const[n,r]=L.useState(!1),[i,s]=L.useState(!1);L.useEffect(()=>{const l=()=>{s(window.innerWidth<=991)};return l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)},[]);const o=()=>{r(!n),document.body.style.overflow=n?"":"hidden"};return E.jsxs(E.Fragment,{children:[E.jsxs("nav",{className:`navbar ${i?"mobile":""} ${n?"expanded":""}`,children:[i&&E.jsx("button",{className:"navbar-toggle",onClick:o,"aria-label":"Toggle navigation",children:n?"✕":"☰"}),E.jsxs("div",{className:"navbar-left",children:[E.jsx(NP,{className:"navbar-button"}),E.jsx(VP,{className:"navbar-button",isPlaying:e,toggleMusic:t}),E.jsx(jP,{className:"navbar-button"})]})]}),E.jsx("div",{className:"navbar-overlay",onClick:()=>n&&o(),"aria-hidden":"true"})]})};function FP(){const{t:e}=nn(),t=x1(),[n,r]=L.useState(!1),[i,s]=L.useState(!1),o="https://walpurga03.github.io/cardBattle/audio/clip.mp3",{playerCards:l,computerCards:a,setPlayerCards:u,setComputerCards:c}=C1(),{drawPile:d,currentPlayerCard:f,currentComputerCard:m,winner:v,isComputerTurn:y,gameOver:x,isComputerCardFlipped:g,animationDirection:h,showWinnerMessage:p,lastRoundDetails:w,handlePropertySelect:P,handleComputerTurn:C}=L1(l,a,u,c);return L.useEffect(()=>{y?document.body.classList.add("computer-turn"):document.body.classList.remove("computer-turn")},[y]),n?t?E.jsx("div",{className:"orientation-warning",children:e("orientationWarning")}):x?E.jsxs("div",{className:"App",children:[E.jsx(DP,{playerWon:v==="Player"})," "]}):E.jsxs("div",{className:"App",children:[E.jsx(IP,{isPlaying:i,toggleMusic:()=>s(!i)}),E.jsx(MP,{src:o,playing:i})," ",E.jsxs("div",{className:"battlefield",children:[E.jsx(J2,{playerCards:l,currentPlayerCard:f,animationDirection:h,isComputerTurn:y,handlePropertySelect:P}),E.jsx(eP,{computerCards:a,currentComputerCard:m,isComputerCardFlipped:g,animationDirection:h})]}),E.jsx(tP,{winner:v,showWinnerMessage:p,selectedProperty:w.selectedProperty,playerValue:w.playerValue,computerValue:w.computerValue}),y&&E.jsx("button",{onClick:C,className:"button-highlight",style:{marginTop:"20px"},children:e("computerTurnButton",{computer:e("computer")})}),w.selectedProperty&&E.jsxs("div",{className:"last-round-details",children:[E.jsx("h3",{children:e("lastRound")}),E.jsxs("p",{children:[w.selectedProperty&&e(`eigenschaften.${w.selectedProperty}`),E.jsx("br",{}),e("player"),": ",w.playerValue,E.jsx("br",{}),e("computer"),": ",w.computerValue]})]}),d.length>0&&E.jsx("div",{className:"draw-pile",children:E.jsx("h3",{children:e("drawPile",{count:d.length})})})]}):E.jsx(RP,{onAnimationEnd:()=>r(!0)})}const bP={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Ws{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||bP,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{let[l,a]=o;for(let u=0;u{let[l,a]=o;for(let u=0;u{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},Hd=e=>e==null?"":""+e,_P=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},BP=/###/g,Wd=e=>e&&e.indexOf("###")>-1?e.replace(BP,"."):e,Kd=e=>!e||typeof e=="string",Qr=(e,t,n)=>{const r=typeof t!="string"?t:t.split(".");let i=0;for(;i{const{obj:r,k:i}=Qr(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let s=t[t.length-1],o=t.slice(0,t.length-1),l=Qr(e,o,Object);for(;l.obj===void 0&&o.length;)s=`${o[o.length-1]}.${s}`,o=o.slice(0,o.length-1),l=Qr(e,o,Object),l&&l.obj&&typeof l.obj[`${l.k}.${s}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${s}`]=n},zP=(e,t,n,r)=>{const{obj:i,k:s}=Qr(e,t,Object);i[s]=i[s]||[],i[s].push(n)},Ks=(e,t)=>{const{obj:n,k:r}=Qr(e,t);if(n)return n[r]},$P=(e,t,n)=>{const r=Ks(e,n);return r!==void 0?r:Ks(t,n)},Sy=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):Sy(e[r],t[r],n):e[r]=t[r]);return e},On=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var UP={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const HP=e=>typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>UP[t]):e;class WP{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const KP=[" ",",","?","!",";"],GP=new WP(20),QP=(e,t,n)=>{t=t||"",n=n||"";const r=KP.filter(o=>t.indexOf(o)<0&&n.indexOf(o)<0);if(r.length===0)return!0;const i=GP.getRegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let s=!i.test(e);if(!s){const o=e.indexOf(n);o>0&&!i.test(e.substring(0,o))&&(s=!0)}return s},kl=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let s=0;s-1&&ae&&e.replace("_","-");class Qd extends Co{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.indexOf(".")>-1?l=t.split("."):(l=[t,n],r&&(Array.isArray(r)?l.push(...r):typeof r=="string"&&s?l.push(...r.split(s)):l.push(r)));const a=Ks(this.data,l);return!a&&!n&&!r&&t.indexOf(".")>-1&&(t=l[0],n=l[1],r=l.slice(2).join(".")),a||!o||typeof r!="string"?a:kl(this.data&&this.data[t]&&this.data[t][n],r,s)}addResource(t,n,r,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let l=[t,n];r&&(l=l.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(l=t.split("."),i=n,n=l[1]),this.addNamespaces(n),Gd(this.data,l,i),s.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in r)(typeof r[s]=="string"||Array.isArray(r[s]))&&this.addResource(t,n,s,r[s],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[t,n];t.indexOf(".")>-1&&(l=t.split("."),i=r,r=n,n=l[1]),this.addNamespaces(n);let a=Ks(this.data,l)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?Sy(a,r,s):a={...a,...r},Gd(this.data,l,a),o.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var Py={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(s=>{this.processors[s]&&(t=this.processors[s].process(t,n,r,i))}),t}};const Yd={};class Qs extends Co{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),_P(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ut.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let s=n.ns||this.options.defaultNS||[];const o=r&&t.indexOf(r)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!QP(t,r,i);if(o&&!l){const a=t.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:t,namespaces:s};const u=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(u[0])>-1)&&(s=u.shift()),t=u.join(i)}return typeof s=="string"&&(s=[s]),{key:t,namespaces:s}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(t[t.length-1],n),a=l[l.length-1],u=n.lng||this.language,c=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const w=n.nsSeparator||this.options.nsSeparator;return i?{res:`${a}${w}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:a,usedParams:this.getUsedParamsDetails(n)}:`${a}${w}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:a,usedParams:this.getUsedParamsDetails(n)}:o}const d=this.resolve(t,n);let f=d&&d.res;const m=d&&d.usedKey||o,v=d&&d.exactUsedKey||o,y=Object.prototype.toString.apply(f),x=["[object Number]","[object Function]","[object RegExp]"],g=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,h=!this.i18nFormat||this.i18nFormat.handleAsObject;if(h&&f&&(typeof f!="string"&&typeof f!="boolean"&&typeof f!="number")&&x.indexOf(y)<0&&!(typeof g=="string"&&Array.isArray(f))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,f,{...n,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(d.res=w,d.usedParams=this.getUsedParamsDetails(n),d):w}if(s){const w=Array.isArray(f),P=w?[]:{},C=w?v:m;for(const A in f)if(Object.prototype.hasOwnProperty.call(f,A)){const k=`${C}${s}${A}`;P[A]=this.translate(k,{...n,joinArrays:!1,ns:l}),P[A]===k&&(P[A]=f[A])}f=P}}else if(h&&typeof g=="string"&&Array.isArray(f))f=f.join(g),f&&(f=this.extendTranslation(f,t,n,r));else{let w=!1,P=!1;const C=n.count!==void 0&&typeof n.count!="string",A=Qs.hasDefaultValue(n),k=C?this.pluralResolver.getSuffix(u,n.count,n):"",I=n.ordinal&&C?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",M=C&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),F=M&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${k}`]||n[`defaultValue${I}`]||n.defaultValue;!this.isValidLookup(f)&&A&&(w=!0,f=F),this.isValidLookup(f)||(P=!0,f=o);const q=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&P?void 0:f,le=A&&F!==f&&this.options.updateMissing;if(P||w||le){if(this.logger.log(le?"updateKey":"missingKey",u,a,o,le?F:f),s){const T=this.resolve(o,{...n,keySeparator:!1});T&&T.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let S=[];const O=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&O&&O[0])for(let T=0;T{const $=A&&N!==f?N:q;this.options.missingKeyHandler?this.options.missingKeyHandler(T,a,D,$,le,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(T,a,D,$,le,n),this.emit("missingKey",T,a,D,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?S.forEach(T=>{const D=this.pluralResolver.getSuffixes(T,n);M&&n[`defaultValue${this.options.pluralSeparator}zero`]&&D.indexOf(`${this.options.pluralSeparator}zero`)<0&&D.push(`${this.options.pluralSeparator}zero`),D.forEach(N=>{j([T],o+N,n[`defaultValue${N}`]||F)})}):j(S,o,F))}f=this.extendTranslation(f,t,n,d,r),P&&f===o&&this.options.appendNamespaceToMissingKey&&(f=`${a}:${o}`),(P||w)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${a}:${o}`:o,w?f:void 0):f=this.options.parseMissingKeyHandler(f))}return i?(d.res=f,d.usedParams=this.getUsedParamsDetails(n),d):f}extendTranslation(t,n,r,i,s){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const f=t.match(this.interpolator.nestingRegexp);c=f&&f.length}let d=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),t=this.interpolator.interpolate(t,d,r.lng||this.language||i.usedLng,r),u){const f=t.match(this.interpolator.nestingRegexp),m=f&&f.length;c1&&arguments[1]!==void 0?arguments[1]:{},r,i,s,o,l;return typeof t=="string"&&(t=[t]),t.forEach(a=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(a,n),c=u.key;i=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&typeof n.count!="string",m=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),v=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",y=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(x=>{this.isValidLookup(r)||(l=x,!Yd[`${y[0]}-${x}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(Yd[`${y[0]}-${x}`]=!0,this.logger.warn(`key "${i}" for languages "${y.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),y.forEach(g=>{if(this.isValidLookup(r))return;o=g;const h=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(h,c,g,x,n);else{let w;f&&(w=this.pluralResolver.getSuffix(g,n.count,n));const P=`${this.options.pluralSeparator}zero`,C=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(h.push(c+w),n.ordinal&&w.indexOf(C)===0&&h.push(c+w.replace(C,this.options.pluralSeparator)),m&&h.push(c+P)),v){const A=`${c}${this.options.contextSeparator}${n.context}`;h.push(A),f&&(h.push(A+w),n.ordinal&&w.indexOf(C)===0&&h.push(A+w.replace(C,this.options.pluralSeparator)),m&&h.push(A+P))}}let p;for(;p=h.pop();)this.isValidLookup(r)||(s=p,r=this.getResource(g,x,p,n))}))})}),{res:r,usedKey:i,exactUsedKey:s,usedLng:o,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const s of n)delete i[s]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const ca=e=>e.charAt(0).toUpperCase()+e.slice(1);class Xd{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ut.create("languageUtils")}getScriptPartFromCode(t){if(t=Gs(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Gs(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(t)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=ca(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=ca(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=ca(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],s=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):typeof t=="string"&&s(this.formatLanguageCode(t)),r.forEach(o=>{i.indexOf(o)<0&&s(this.formatLanguageCode(o))}),i}}let YP=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],XP={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const qP=["v1","v2","v3"],ZP=["v4"],qd={zero:0,one:1,two:2,few:3,many:4,other:5},JP=()=>{const e={};return YP.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:XP[t.fc]}})}),e};class eC{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=ut.create("pluralResolver"),(!this.options.compatibilityJSON||ZP.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=JP(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const r=Gs(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:r,type:i});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];const o=new Intl.PluralRules(r,{type:i});return this.pluralRulesCache[s]=o,o}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,s)=>qd[i]-qd[s]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const s=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?s():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!qP.includes(this.options.compatibilityJSON)}}const Zd=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=$P(e,t,n);return!s&&i&&typeof n=="string"&&(s=kl(e,n,r),s===void 0&&(s=kl(t,n,r))),s},fa=e=>e.replace(/\$/g,"$$$$");class tC{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ut.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:s,prefixEscaped:o,suffix:l,suffixEscaped:a,formatSeparator:u,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:m,nestingSuffix:v,nestingSuffixEscaped:y,nestingOptionsSeparator:x,maxReplaces:g,alwaysFormat:h}=t.interpolation;this.escape=n!==void 0?n:HP,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?On(s):o||"{{",this.suffix=l?On(l):a||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=f?On(f):m||On("$t("),this.nestingSuffix=v?On(v):y||On(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=g||1e3,this.alwaysFormat=h!==void 0?h:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let s,o,l;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=m=>{if(m.indexOf(this.formatSeparator)<0){const g=Zd(n,a,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(g,void 0,r,{...i,...n,interpolationkey:m}):g}const v=m.split(this.formatSeparator),y=v.shift().trim(),x=v.join(this.formatSeparator).trim();return this.format(Zd(n,a,y,this.options.keySeparator,this.options.ignoreJSONStructure),x,r,{...i,...n,interpolationkey:y})};this.resetRegExp();const c=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>fa(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?fa(this.escape(m)):fa(m)}].forEach(m=>{for(l=0;s=m.regex.exec(t);){const v=s[1].trim();if(o=u(v),o===void 0)if(typeof c=="function"){const x=c(t,s,i);o=typeof x=="string"?x:""}else if(i&&Object.prototype.hasOwnProperty.call(i,v))o="";else if(d){o=s[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${t}`),o="";else typeof o!="string"&&!this.useRawValueToEscape&&(o=Hd(o));const y=m.safeValue(o);if(t=t.replace(s[0],y),d?(m.regex.lastIndex+=o.length,m.regex.lastIndex-=s[0].length):m.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,o;const l=(a,u)=>{const c=this.nestingOptionsSeparator;if(a.indexOf(c)<0)return a;const d=a.split(new RegExp(`${c}[ ]*{`));let f=`{${d[1]}`;a=d[0],f=this.interpolate(f,o);const m=f.match(/'/g),v=f.match(/"/g);(m&&m.length%2===0&&!v||v.length%2!==0)&&(f=f.replace(/'/g,'"'));try{o=JSON.parse(f),u&&(o={...u,...o})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${a}`,y),`${a}${c}${f}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,a};for(;i=this.nestingRegexp.exec(t);){let a=[];o={...r},o=o.replace&&typeof o.replace!="string"?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(d=>d.trim());i[1]=c.shift(),a=c,u=!0}if(s=n(l.call(this,i[1].trim(),o),o),s&&i[0]===t&&typeof s!="string")return s;typeof s!="string"&&(s=Hd(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),s=""),u&&(s=a.reduce((c,d)=>this.format(c,d,r.lng,{...r,interpolationkey:i[1].trim()}),s.trim())),t=t.replace(i[0],s),this.regexp.lastIndex=0}return t}}const nC=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(o=>{if(o){const[l,...a]=o.split(":"),u=a.join(":").trim().replace(/^'+|'+$/g,""),c=l.trim();n[c]||(n[c]=u),u==="false"&&(n[c]=!1),u==="true"&&(n[c]=!0),isNaN(u)||(n[c]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},Rn=e=>{const t={};return(n,r,i)=>{let s=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(s={...s,[i.interpolationkey]:void 0});const o=r+JSON.stringify(s);let l=t[o];return l||(l=e(Gs(r),i),t[o]=l),l(n)}};class rC{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ut.create("formatter"),this.options=t,this.formats={number:Rn((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return s=>i.format(s)}),currency:Rn((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return s=>i.format(s)}),datetime:Rn((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return s=>i.format(s)}),relativetime:Rn((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return s=>i.format(s,r.range||"day")}),list:Rn((n,r)=>{const i=new Intl.ListFormat(n,{...r});return s=>i.format(s)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Rn(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=n.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(l=>l.indexOf(")")>-1)){const l=s.findIndex(a=>a.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,l)].join(this.formatSeparator)}return s.reduce((l,a)=>{const{formatName:u,formatOptions:c}=nC(a);if(this.formats[u]){let d=l;try{const f=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},m=f.locale||f.lng||i.locale||i.lng||r;d=this.formats[u](l,m,{...c,...i,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${u}`);return l},t)}}const iC=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class sC extends Co{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=ut.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const s={},o={},l={},a={};return t.forEach(u=>{let c=!0;n.forEach(d=>{const f=`${u}|${d}`;!r.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?o[f]===void 0&&(o[f]=!0):(this.state[f]=1,c=!1,o[f]===void 0&&(o[f]=!0),s[f]===void 0&&(s[f]=!0),a[d]===void 0&&(a[d]=!0)))}),c||(l[u]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(a)}}loaded(t,n,r){const i=t.split("|"),s=i[0],o=i[1];n&&this.emit("failedLoading",s,o,n),!n&&r&&this.store.addResourceBundle(s,o,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const l={};this.queue.forEach(a=>{zP(a.loaded,[s],o),iC(a,t),n&&a.errors.push(n),a.pendingCount===0&&!a.done&&(Object.keys(a.loaded).forEach(u=>{l[u]||(l[u]={});const c=a.loaded[u];c.length&&c.forEach(d=>{l[u][d]===void 0&&(l[u][d]=!0)})}),a.done=!0,a.errors.length?a.callback(a.errors):a.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(a=>!a.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:s,callback:o});return}this.readingCalls++;const l=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&i{this.read.call(this,t,n,r,i+1,s*2,o)},s);return}o(u,c)},a=this.backend[r].bind(this.backend);if(a.length===2){try{const u=a(t,n);u&&typeof u.then=="function"?u.then(c=>l(null,c)).catch(l):l(null,u)}catch(u){l(u)}return}return a(t,n,l)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const s=this.queueLoad(t,n,r,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(o=>{this.loadOne(o)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],s=r[1];this.read(i,s,"read",void 0,void 0,(o,l)=>{o&&this.logger.warn(`${n}loading namespace ${s} for language ${i} failed`,o),!o&&l&&this.logger.log(`${n}loaded namespace ${s} for language ${i}`,l),this.loaded(t,o,l)})}saveMissing(t,n,r,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const a={...o,isUpdate:s},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(t,n,r,i,a):c=u(t,n,r,i),c&&typeof c.then=="function"?c.then(d=>l(null,d)).catch(l):l(null,c)}catch(c){l(c)}else u(t,n,r,i,l,a)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const Jd=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),eh=e=>(typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Yi=()=>{},oC=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class yi extends Co{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=eh(t),this.services={},this.logger=ut,this.modules={external:[]},oC(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=Jd();this.options={...i,...this.options,...eh(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const s=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?ut.init(s(this.modules.logger),this.options):ut.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=rC);const d=new Xd(this.options);this.store=new Qd(this.options.resources,this.options);const f=this.services;f.logger=ut,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new eC(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=s(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new tC(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new sC(s(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(m){for(var v=arguments.length,y=new Array(v>1?v-1:0),x=1;x1?v-1:0),x=1;x{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Yi),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});const a=kr(),u=()=>{const c=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(f),r(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),a}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Yi;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const s=[],o=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(u=>{u!=="cimode"&&s.indexOf(u)<0&&s.push(u)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(a=>o(a)),this.options.preload&&this.options.preload.forEach(l=>o(l)),this.services.backendConnector.load(s,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(l)})}else r(null)}reloadResources(t,n,r){const i=kr();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Yi),this.services.backendConnector.reload(t,n,s=>{i.resolve(),r(s)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Py.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=kr();this.emit("languageChanging",t);const s=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},o=(a,u)=>{u?(s(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(a,function(){return r.t(...arguments)})},l=a=>{!t&&!a&&this.services.languageDetector&&(a=[]);const u=typeof a=="string"?a:this.services.languageUtils.getBestMatchFromCodes(a);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{o(c,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(t),i}getFixedT(t,n,r){var i=this;const s=function(o,l){let a;if(typeof l!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d`${a.keyPrefix}${f}${v}`):m=a.keyPrefix?`${a.keyPrefix}${f}${o}`:o,i.t(m,a)};return typeof t=="string"?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(l,a)=>{const u=this.services.backendConnector.state[`${l}|${a}`];return u===-1||u===0||u===2};if(n.precheck){const l=n.precheck(this,o);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,t)&&(!i||o(s,t)))}loadNamespaces(t,n){const r=kr();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=kr();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],s=t.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return s.length?(this.options.preload=i.concat(s),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new Xd(Jd());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new yi(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Yi;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},s=new yi(i);return(t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(l=>{s[l]=this[l]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},r&&(s.store=new Qd(this.store.data,i),s.services.resourceStore=s.store),s.translator=new Qs(s.services,i),s.translator.on("*",function(l){for(var a=arguments.length,u=new Array(a>1?a-1:0),c=1;c"u"?"undefined":El(XMLHttpRequest))==="object"}function aC(e){return!!e&&typeof e.then=="function"}function lC(e){return aC(e)?e:Promise.resolve(e)}function uC(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ll={exports:{}},Xi={exports:{}},th;function cC(){return th||(th=1,function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof jr<"u"&&jr,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(o){var l=typeof s<"u"&&s||typeof self<"u"&&self||typeof l<"u"&&l,a={searchParams:"URLSearchParams"in l,iterable:"Symbol"in l&&"iterator"in Symbol,blob:"FileReader"in l&&"Blob"in l&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in l,arrayBuffer:"ArrayBuffer"in l};function u(S){return S&&DataView.prototype.isPrototypeOf(S)}if(a.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(S){return S&&c.indexOf(Object.prototype.toString.call(S))>-1};function f(S){if(typeof S!="string"&&(S=String(S)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(S)||S==="")throw new TypeError('Invalid character in header field name: "'+S+'"');return S.toLowerCase()}function m(S){return typeof S!="string"&&(S=String(S)),S}function v(S){var O={next:function(){var j=S.shift();return{done:j===void 0,value:j}}};return a.iterable&&(O[Symbol.iterator]=function(){return O}),O}function y(S){this.map={},S instanceof y?S.forEach(function(O,j){this.append(j,O)},this):Array.isArray(S)?S.forEach(function(O){this.append(O[0],O[1])},this):S&&Object.getOwnPropertyNames(S).forEach(function(O){this.append(O,S[O])},this)}y.prototype.append=function(S,O){S=f(S),O=m(O);var j=this.map[S];this.map[S]=j?j+", "+O:O},y.prototype.delete=function(S){delete this.map[f(S)]},y.prototype.get=function(S){return S=f(S),this.has(S)?this.map[S]:null},y.prototype.has=function(S){return this.map.hasOwnProperty(f(S))},y.prototype.set=function(S,O){this.map[f(S)]=m(O)},y.prototype.forEach=function(S,O){for(var j in this.map)this.map.hasOwnProperty(j)&&S.call(O,this.map[j],j,this)},y.prototype.keys=function(){var S=[];return this.forEach(function(O,j){S.push(j)}),v(S)},y.prototype.values=function(){var S=[];return this.forEach(function(O){S.push(O)}),v(S)},y.prototype.entries=function(){var S=[];return this.forEach(function(O,j){S.push([j,O])}),v(S)},a.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function x(S){if(S.bodyUsed)return Promise.reject(new TypeError("Already read"));S.bodyUsed=!0}function g(S){return new Promise(function(O,j){S.onload=function(){O(S.result)},S.onerror=function(){j(S.error)}})}function h(S){var O=new FileReader,j=g(O);return O.readAsArrayBuffer(S),j}function p(S){var O=new FileReader,j=g(O);return O.readAsText(S),j}function w(S){for(var O=new Uint8Array(S),j=new Array(O.length),T=0;T-1?O:S}function I(S,O){if(!(this instanceof I))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');O=O||{};var j=O.body;if(S instanceof I){if(S.bodyUsed)throw new TypeError("Already read");this.url=S.url,this.credentials=S.credentials,O.headers||(this.headers=new y(S.headers)),this.method=S.method,this.mode=S.mode,this.signal=S.signal,!j&&S._bodyInit!=null&&(j=S._bodyInit,S.bodyUsed=!0)}else this.url=String(S);if(this.credentials=O.credentials||this.credentials||"same-origin",(O.headers||!this.headers)&&(this.headers=new y(O.headers)),this.method=k(O.method||this.method||"GET"),this.mode=O.mode||this.mode||null,this.signal=O.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&j)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(j),(this.method==="GET"||this.method==="HEAD")&&(O.cache==="no-store"||O.cache==="no-cache")){var T=/([?&])_=[^&]*/;if(T.test(this.url))this.url=this.url.replace(T,"$1_="+new Date().getTime());else{var D=/\?/;this.url+=(D.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}I.prototype.clone=function(){return new I(this,{body:this._bodyInit})};function M(S){var O=new FormData;return S.trim().split("&").forEach(function(j){if(j){var T=j.split("="),D=T.shift().replace(/\+/g," "),N=T.join("=").replace(/\+/g," ");O.append(decodeURIComponent(D),decodeURIComponent(N))}}),O}function F(S){var O=new y,j=S.replace(/\r?\n[\t ]+/g," ");return j.split("\r").map(function(T){return T.indexOf(` -`)===0?T.substr(1,T.length):T}).forEach(function(T){var D=T.split(":"),N=D.shift().trim();if(N){var $=D.join(":").trim();O.append(N,$)}}),O}C.call(I.prototype);function K(S,O){if(!(this instanceof K))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');O||(O={}),this.type="default",this.status=O.status===void 0?200:O.status,this.ok=this.status>=200&&this.status<300,this.statusText=O.statusText===void 0?"":""+O.statusText,this.headers=new y(O.headers),this.url=O.url||"",this._initBody(S)}C.call(K.prototype),K.prototype.clone=function(){return new K(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},K.error=function(){var S=new K(null,{status:0,statusText:""});return S.type="error",S};var q=[301,302,303,307,308];K.redirect=function(S,O){if(q.indexOf(O)===-1)throw new RangeError("Invalid status code");return new K(null,{status:O,headers:{location:S}})},o.DOMException=l.DOMException;try{new o.DOMException}catch{o.DOMException=function(O,j){this.message=O,this.name=j;var T=Error(O);this.stack=T.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function le(S,O){return new Promise(function(j,T){var D=new I(S,O);if(D.signal&&D.signal.aborted)return T(new o.DOMException("Aborted","AbortError"));var N=new XMLHttpRequest;function $(){N.abort()}N.onload=function(){var J={status:N.status,statusText:N.statusText,headers:F(N.getAllResponseHeaders()||"")};J.url="responseURL"in N?N.responseURL:J.headers.get("X-Request-URL");var ke="response"in N?N.response:N.responseText;setTimeout(function(){j(new K(ke,J))},0)},N.onerror=function(){setTimeout(function(){T(new TypeError("Network request failed"))},0)},N.ontimeout=function(){setTimeout(function(){T(new TypeError("Network request failed"))},0)},N.onabort=function(){setTimeout(function(){T(new o.DOMException("Aborted","AbortError"))},0)};function Z(J){try{return J===""&&l.location.href?l.location.href:J}catch{return J}}N.open(D.method,Z(D.url),!0),D.credentials==="include"?N.withCredentials=!0:D.credentials==="omit"&&(N.withCredentials=!1),"responseType"in N&&(a.blob?N.responseType="blob":a.arrayBuffer&&D.headers.get("Content-Type")&&D.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(N.responseType="arraybuffer")),O&&typeof O.headers=="object"&&!(O.headers instanceof y)?Object.getOwnPropertyNames(O.headers).forEach(function(J){N.setRequestHeader(J,m(O.headers[J]))}):D.headers.forEach(function(J,ke){N.setRequestHeader(ke,J)}),D.signal&&(D.signal.addEventListener("abort",$),N.onreadystatechange=function(){N.readyState===4&&D.signal.removeEventListener("abort",$)}),N.send(typeof D._bodyInit>"u"?null:D._bodyInit)})}return le.polyfill=!0,l.fetch||(l.fetch=le,l.Headers=y,l.Request=I,l.Response=K),o.Headers=y,o.Request=I,o.Response=K,o.fetch=le,o})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=n.fetch?n:r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(Xi,Xi.exports)),Xi.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof jr<"u"&&jr.fetch?n=jr.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof uC<"u"&&typeof window>"u"){var r=n||cC();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(Ll,Ll.exports);var Ty=Ll.exports;const ky=My(Ty),nh=Ry({__proto__:null,default:ky},[Ty]);function rh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ih(e){for(var t=1;t"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(s["Content-Type"]="application/json");var o=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,l=ih({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:s},oh?{}:o),a=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{sh(n,l,i,a)}catch(u){if(!o||Object.keys(o).length===0||!u.message||u.message.indexOf("not implemented")<0)return i(u);try{Object.keys(o).forEach(function(c){delete l[c]}),sh(n,l,i,a),oh=!0}catch(c){i(c)}}},mC=function(t,n,r,i){r&&kn(r)==="object"&&(r=Al("",r).slice(1)),t.queryStringParams&&(n=Al(n,t.queryStringParams));try{var s;vi?s=new vi:s=new Ys("MSXML2.XMLHTTP.3.0"),s.open(r?"POST":"GET",n,1),t.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!t.withCredentials,r&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var o=t.customHeaders;if(o=typeof o=="function"?o():o,o)for(var l in o)s.setRequestHeader(l,o[l]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(r)}catch(a){console&&console.log(a)}},gC=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},Et&&n.indexOf("file:")!==0)return pC(t,n,r,i);if(Cy()||typeof ActiveXObject=="function")return mC(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function fr(e){"@babel/helpers - typeof";return fr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fr(e)}function ah(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function da(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};yC(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return wC(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=da(da(da({},SC()),this.options||{}),i),this.allOptions=s,this.services&&this.options.reloadInterval){var o=setInterval(function(){return r.reload()},this.options.reloadInterval);fr(o)==="object"&&typeof o.unref=="function"&&o.unref()}}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,s,o){var l=this,a=this.options.loadPath;typeof this.options.loadPath=="function"&&(a=this.options.loadPath(n,i)),a=lC(a),a.then(function(u){if(!u)return o(null,{});var c=l.services.interpolator.interpolate(u,{lng:n.join("+"),ns:i.join("+")});l.loadUrl(c,o,r,s)})}},{key:"loadUrl",value:function(n,r,i,s){var o=this,l=typeof i=="string"?[i]:i,a=typeof s=="string"?[s]:s,u=this.options.parseLoadPayload(l,a);this.options.request(this.options,n,u,function(c,d){if(d&&(d.status>=500&&d.status<600||!d.status))return r("failed loading "+n+"; status code: "+d.status,!0);if(d&&d.status>=400&&d.status<500)return r("failed loading "+n+"; status code: "+d.status,!1);if(!d&&c&&c.message){var f=c.message.toLowerCase(),m=["failed","fetch","network","load"].find(function(x){return f.indexOf(x)>-1});if(m)return r("failed loading "+n+": "+c.message,!0)}if(c)return r(c,!1);var v,y;try{typeof d.data=="string"?v=o.options.parse(d.data,i,s):v=d.data}catch{y="failed parsing "+n+" to json"}if(y)return r(y,!1);r(null,v)})}},{key:"create",value:function(n,r,i,s,o){var l=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var a=this.options.parsePayload(r,i,s),u=0,c=[],d=[];n.forEach(function(f){var m=l.options.addPath;typeof l.options.addPath=="function"&&(m=l.options.addPath(f,r));var v=l.services.interpolator.interpolate(m,{lng:f,ns:r});l.options.request(l.options,v,a,function(y,x){u+=1,c.push(y),d.push(x),u===n.length&&typeof o=="function"&&o(c,d)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,s=r.languageUtils,o=r.logger,l=i.language;if(!(l&&l.toLowerCase()==="cimode")){var a=[],u=function(d){var f=s.toResolveHierarchy(d);f.forEach(function(m){a.indexOf(m)<0&&a.push(m)})};u(l),this.allOptions.preload&&this.allOptions.preload.forEach(function(c){return u(c)}),a.forEach(function(c){n.allOptions.ns.forEach(function(d){i.read(c,d,"read",null,null,function(f,m){f&&o.warn("loading namespace ".concat(d," for language ").concat(c," failed"),f),!f&&m&&o.log("loaded namespace ".concat(d," for language ").concat(c),m),i.loaded("".concat(c,"|").concat(d),f,m)})})})}}}])}();Ay.type="backend";const{slice:PC,forEach:CC}=[];function TC(e){return CC.call(PC.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const lh=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,kC=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const i=encodeURIComponent(t);let s=`${e}=${i}`;if(r.maxAge>0){const o=r.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(o)}`}if(r.domain){if(!lh.test(r.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${r.domain}`}if(r.path){if(!lh.test(r.path))throw new TypeError("option path is invalid");s+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},uh={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=kC(e,encodeURIComponent(t),i)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const o=i.substring(1).split("&");for(let l=0;l0&&o[l].substring(0,a)===t&&(n=o[l].substring(a+1))}}return n}};let Er=null;const ch=()=>{if(Er!==null)return Er;try{Er=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Er=!1}return Er};var AC={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&ch())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&ch()&&window.localStorage.setItem(n,e)}};let Lr=null;const fh=()=>{if(Lr!==null)return Lr;try{Lr=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Lr=!1}return Lr};var OC={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&fh())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&fh()&&window.sessionStorage.setItem(n,e)}},RC={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let s=0;s0?t:void 0}},MC={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},DC={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(i=n[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},NC={name:"subdomain",lookup(e){var i,s;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((s=(i=window.location)==null?void 0:i.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function jC(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class Oy{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=TC(n,this.options||{},jC()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(EC),this.addDetector(LC),this.addDetector(AC),this.addDetector(OC),this.addDetector(RC),this.addDetector(MC),this.addDetector(DC),this.addDetector(NC)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}Oy.type="languageDetector";Te.use(Ay).use(Oy).use(m1).init({fallbackLng:"en",debug:!0,backend:{loadPath:"/cardBattle/locales/{{lng}}/cardText.json"},interpolation:{escapeValue:!1}});const VC=()=>(L.useEffect(()=>{const e=document.createElement("script");e.src="https://embed.twentyuno.net/js/app.js",e.async=!0,document.body.appendChild(e)},[]),E.jsx(L.StrictMode,{children:E.jsx(FP,{})}));Tm(document.getElementById("root")).render(E.jsx(VC,{})); diff --git a/index.html b/index.html index 80c0254..ad45115 100644 --- a/index.html +++ b/index.html @@ -5,8 +5,8 @@ Card Battle - - + +