HifiPlanet-Website/hifi/assets/index-DCz9ru6D.js
Maaxxs fa862d936a Rename the "Elite R" package tier to "Elite"
Client wants the tier called just "Elite". Only the admin checkbox list
(PACKAGE_TIERS) carries tier names; public card theming is price-rank
based, so nothing else changes. An already-created "Elite R" package
would show up under "Weitere Pakete (alte Namen)" in the editor and can
be deleted and recreated as Elite there.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 07:03:27 +02:00

78 lines
604 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{r as g,R as _b,D as Db,P as Lb,U as Bb,M as Ad,a as Md,C as zb,S as Ib,b as Rb,E as Fb,i as Vb,c as Ob}from"./lucide-icons-CnpfS6R8.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();var Gf={exports:{}},Wi={};/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ub=g,Wb=Symbol.for("react.element"),Hb=Symbol.for("react.fragment"),$b=Object.prototype.hasOwnProperty,Gb=Ub.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Kb={key:!0,ref:!0,__self:!0,__source:!0};function Kf(e,t,n){var r,s={},i=null,l=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)$b.call(t,r)&&!Kb.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:Wb,type:e,key:i,ref:l,props:s,_owner:Gb.current}}Wi.Fragment=Hb;Wi.jsx=Kf;Wi.jsxs=Kf;Gf.exports=Wi;var a=Gf.exports,wo={},qf={exports:{}},Ye={},Yf={exports:{}},Xf={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(_,L){var F=_.length;_.push(L);e:for(;0<F;){var V=F-1>>>1,$=_[V];if(0<s($,L))_[V]=L,_[F]=$,F=V;else break e}}function n(_){return _.length===0?null:_[0]}function r(_){if(_.length===0)return null;var L=_[0],F=_.pop();if(F!==L){_[0]=F;e:for(var V=0,$=_.length,Je=$>>>1;V<Je;){var ut=2*(V+1)-1,Ur=_[ut],Dt=ut+1,Gn=_[Dt];if(0>s(Ur,F))Dt<$&&0>s(Gn,Ur)?(_[V]=Gn,_[Dt]=F,V=Dt):(_[V]=Ur,_[ut]=F,V=ut);else if(Dt<$&&0>s(Gn,F))_[V]=Gn,_[Dt]=F,V=Dt;else break e}}return L}function s(_,L){var F=_.sortIndex-L.sortIndex;return F!==0?F:_.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,o=l.now();e.unstable_now=function(){return l.now()-o}}var u=[],c=[],d=1,h=null,m=3,f=!1,b=!1,y=!1,k=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(_){for(var L=n(c);L!==null;){if(L.callback===null)r(c);else if(L.startTime<=_)r(c),L.sortIndex=L.expirationTime,t(u,L);else break;L=n(c)}}function w(_){if(y=!1,v(_),!b)if(n(u)!==null)b=!0,R(j);else{var L=n(c);L!==null&&X(w,L.startTime-_)}}function j(_,L){b=!1,y&&(y=!1,x(N),N=-1),f=!0;var F=m;try{for(v(L),h=n(u);h!==null&&(!(h.expirationTime>L)||_&&!T());){var V=h.callback;if(typeof V=="function"){h.callback=null,m=h.priorityLevel;var $=V(h.expirationTime<=L);L=e.unstable_now(),typeof $=="function"?h.callback=$:h===n(u)&&r(u),v(L)}else r(u);h=n(u)}if(h!==null)var Je=!0;else{var ut=n(c);ut!==null&&X(w,ut.startTime-L),Je=!1}return Je}finally{h=null,m=F,f=!1}}var P=!1,C=null,N=-1,S=5,E=-1;function T(){return!(e.unstable_now()-E<S)}function I(){if(C!==null){var _=e.unstable_now();E=_;var L=!0;try{L=C(!0,_)}finally{L?U():(P=!1,C=null)}}else P=!1}var U;if(typeof p=="function")U=function(){p(I)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,J=Y.port2;Y.port1.onmessage=I,U=function(){J.postMessage(null)}}else U=function(){k(I,0)};function R(_){C=_,P||(P=!0,U())}function X(_,L){N=k(function(){_(e.unstable_now())},L)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(_){_.callback=null},e.unstable_continueExecution=function(){b||f||(b=!0,R(j))},e.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):S=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(_){switch(m){case 1:case 2:case 3:var L=3;break;default:L=m}var F=m;m=L;try{return _()}finally{m=F}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,L){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var F=m;m=_;try{return L()}finally{m=F}},e.unstable_scheduleCallback=function(_,L,F){var V=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?V+F:V):F=V,_){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=F+$,_={id:d++,callback:L,priorityLevel:_,startTime:F,expirationTime:$,sortIndex:-1},F>V?(_.sortIndex=F,t(c,_),n(u)===null&&_===n(c)&&(y?(x(N),N=-1):y=!0,X(w,F-V))):(_.sortIndex=$,t(u,_),b||f||(b=!0,R(j))),_},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(_){var L=m;return function(){var F=m;m=L;try{return _.apply(this,arguments)}finally{m=F}}}})(Xf);Yf.exports=Xf;var qb=Yf.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 Yb=g,qe=qb;function D(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Zf=new Set,Ns={};function Wn(e,t){br(e,t),br(e+"Capture",t)}function br(e,t){for(Ns[e]=t,e=0;e<t.length;e++)Zf.add(t[e])}var Ot=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jo=Object.prototype.hasOwnProperty,Xb=/^[: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]*$/,_d={},Dd={};function Zb(e){return jo.call(Dd,e)?!0:jo.call(_d,e)?!1:Xb.test(e)?Dd[e]=!0:(_d[e]=!0,!1)}function Qb(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 Jb(e,t,n,r){if(t===null||typeof t>"u"||Qb(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 De(e,t,n,r,s,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var je={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){je[e]=new De(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];je[t]=new De(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){je[e]=new De(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){je[e]=new De(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){je[e]=new De(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){je[e]=new De(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){je[e]=new De(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){je[e]=new De(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){je[e]=new De(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ju=/[\-:]([a-z])/g;function ec(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(Ju,ec);je[t]=new De(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(Ju,ec);je[t]=new De(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(Ju,ec);je[t]=new De(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){je[e]=new De(e,1,!1,e.toLowerCase(),null,!1,!1)});je.xlinkHref=new De("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){je[e]=new De(e,1,!1,e.toLowerCase(),null,!0,!0)});function tc(e,t,n,r){var s=je.hasOwnProperty(t)?je[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Jb(t,n,s,r)&&(n=null),r||s===null?Zb(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var $t=Yb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ha=Symbol.for("react.element"),Xn=Symbol.for("react.portal"),Zn=Symbol.for("react.fragment"),nc=Symbol.for("react.strict_mode"),No=Symbol.for("react.profiler"),Qf=Symbol.for("react.provider"),Jf=Symbol.for("react.context"),rc=Symbol.for("react.forward_ref"),So=Symbol.for("react.suspense"),Co=Symbol.for("react.suspense_list"),sc=Symbol.for("react.memo"),Xt=Symbol.for("react.lazy"),ep=Symbol.for("react.offscreen"),Ld=Symbol.iterator;function $r(e){return e===null||typeof e!="object"?null:(e=Ld&&e[Ld]||e["@@iterator"],typeof e=="function"?e:null)}var le=Object.assign,wl;function ns(e){if(wl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);wl=t&&t[1]||""}return`
`+wl+e}var jl=!1;function Nl(e,t){if(!e||jl)return"";jl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(`
`),i=r.stack.split(`
`),l=s.length-1,o=i.length-1;1<=l&&0<=o&&s[l]!==i[o];)o--;for(;1<=l&&0<=o;l--,o--)if(s[l]!==i[o]){if(l!==1||o!==1)do if(l--,o--,0>o||s[l]!==i[o]){var u=`
`+s[l].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=l&&0<=o);break}}}finally{jl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ns(e):""}function ev(e){switch(e.tag){case 5:return ns(e.type);case 16:return ns("Lazy");case 13:return ns("Suspense");case 19:return ns("SuspenseList");case 0:case 2:case 15:return e=Nl(e.type,!1),e;case 11:return e=Nl(e.type.render,!1),e;case 1:return e=Nl(e.type,!0),e;default:return""}}function Po(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 Zn:return"Fragment";case Xn:return"Portal";case No:return"Profiler";case nc:return"StrictMode";case So:return"Suspense";case Co:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Jf:return(e.displayName||"Context")+".Consumer";case Qf:return(e._context.displayName||"Context")+".Provider";case rc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case sc:return t=e.displayName||null,t!==null?t:Po(e.type)||"Memo";case Xt:t=e._payload,e=e._init;try{return Po(e(t))}catch{}}return null}function tv(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 Po(t);case 8:return t===nc?"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 gn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function tp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function nv(e){var t=tp(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ma(e){e._valueTracker||(e._valueTracker=nv(e))}function np(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=tp(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function si(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 Eo(e,t){var n=t.checked;return le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Bd(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=gn(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 rp(e,t){t=t.checked,t!=null&&tc(e,"checked",t,!1)}function To(e,t){rp(e,t);var n=gn(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")?Ao(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ao(e,t.type,gn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function zd(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 Ao(e,t,n){(t!=="number"||si(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var rs=Array.isArray;function hr(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+gn(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Mo(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(D(91));return le({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Id(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(D(92));if(rs(n)){if(1<n.length)throw Error(D(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:gn(n)}}function sp(e,t){var n=gn(t.value),r=gn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Rd(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function ap(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function _o(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?ap(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var fa,ip=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(fa=fa||document.createElement("div"),fa.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=fa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ss(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var os={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},rv=["Webkit","ms","Moz","O"];Object.keys(os).forEach(function(e){rv.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),os[t]=os[e]})});function lp(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||os.hasOwnProperty(e)&&os[e]?(""+t).trim():t+"px"}function op(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=lp(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var sv=le({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 Do(e,t){if(t){if(sv[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(D(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(D(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(D(61))}if(t.style!=null&&typeof t.style!="object")throw Error(D(62))}}function Lo(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 Bo=null;function ac(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zo=null,mr=null,fr=null;function Fd(e){if(e=Qs(e)){if(typeof zo!="function")throw Error(D(280));var t=e.stateNode;t&&(t=qi(t),zo(e.stateNode,e.type,t))}}function up(e){mr?fr?fr.push(e):fr=[e]:mr=e}function cp(){if(mr){var e=mr,t=fr;if(fr=mr=null,Fd(e),t)for(e=0;e<t.length;e++)Fd(t[e])}}function dp(e,t){return e(t)}function hp(){}var Sl=!1;function mp(e,t,n){if(Sl)return e(t,n);Sl=!0;try{return dp(e,t,n)}finally{Sl=!1,(mr!==null||fr!==null)&&(hp(),cp())}}function Cs(e,t){var n=e.stateNode;if(n===null)return null;var r=qi(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(D(231,t,typeof n));return n}var Io=!1;if(Ot)try{var Gr={};Object.defineProperty(Gr,"passive",{get:function(){Io=!0}}),window.addEventListener("test",Gr,Gr),window.removeEventListener("test",Gr,Gr)}catch{Io=!1}function av(e,t,n,r,s,i,l,o,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var us=!1,ai=null,ii=!1,Ro=null,iv={onError:function(e){us=!0,ai=e}};function lv(e,t,n,r,s,i,l,o,u){us=!1,ai=null,av.apply(iv,arguments)}function ov(e,t,n,r,s,i,l,o,u){if(lv.apply(this,arguments),us){if(us){var c=ai;us=!1,ai=null}else throw Error(D(198));ii||(ii=!0,Ro=c)}}function Hn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function fp(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Vd(e){if(Hn(e)!==e)throw Error(D(188))}function uv(e){var t=e.alternate;if(!t){if(t=Hn(e),t===null)throw Error(D(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return Vd(s),e;if(i===r)return Vd(s),t;i=i.sibling}throw Error(D(188))}if(n.return!==r.return)n=s,r=i;else{for(var l=!1,o=s.child;o;){if(o===n){l=!0,n=s,r=i;break}if(o===r){l=!0,r=s,n=i;break}o=o.sibling}if(!l){for(o=i.child;o;){if(o===n){l=!0,n=i,r=s;break}if(o===r){l=!0,r=i,n=s;break}o=o.sibling}if(!l)throw Error(D(189))}}if(n.alternate!==r)throw Error(D(190))}if(n.tag!==3)throw Error(D(188));return n.stateNode.current===n?e:t}function pp(e){return e=uv(e),e!==null?gp(e):null}function gp(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=gp(e);if(t!==null)return t;e=e.sibling}return null}var xp=qe.unstable_scheduleCallback,Od=qe.unstable_cancelCallback,cv=qe.unstable_shouldYield,dv=qe.unstable_requestPaint,ce=qe.unstable_now,hv=qe.unstable_getCurrentPriorityLevel,ic=qe.unstable_ImmediatePriority,bp=qe.unstable_UserBlockingPriority,li=qe.unstable_NormalPriority,mv=qe.unstable_LowPriority,vp=qe.unstable_IdlePriority,Hi=null,Pt=null;function fv(e){if(Pt&&typeof Pt.onCommitFiberRoot=="function")try{Pt.onCommitFiberRoot(Hi,e,void 0,(e.current.flags&128)===128)}catch{}}var xt=Math.clz32?Math.clz32:xv,pv=Math.log,gv=Math.LN2;function xv(e){return e>>>=0,e===0?32:31-(pv(e)/gv|0)|0}var pa=64,ga=4194304;function ss(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 oi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var o=l&~s;o!==0?r=ss(o):(i&=l,i!==0&&(r=ss(i)))}else l=n&~s,l!==0?r=ss(l):i!==0&&(r=ss(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-xt(t),s=1<<n,r|=e[n],t&=~s;return r}function bv(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function vv(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var l=31-xt(i),o=1<<l,u=s[l];u===-1?(!(o&n)||o&r)&&(s[l]=bv(o,t)):u<=t&&(e.expiredLanes|=o),i&=~o}}function Fo(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function yp(){var e=pa;return pa<<=1,!(pa&4194240)&&(pa=64),e}function Cl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Xs(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-xt(t),e[t]=n}function yv(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-xt(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function lc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-xt(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var Z=0;function kp(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var wp,oc,jp,Np,Sp,Vo=!1,xa=[],ln=null,on=null,un=null,Ps=new Map,Es=new Map,Jt=[],kv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ud(e,t){switch(e){case"focusin":case"focusout":ln=null;break;case"dragenter":case"dragleave":on=null;break;case"mouseover":case"mouseout":un=null;break;case"pointerover":case"pointerout":Ps.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Es.delete(t.pointerId)}}function Kr(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=Qs(t),t!==null&&oc(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function wv(e,t,n,r,s){switch(t){case"focusin":return ln=Kr(ln,e,t,n,r,s),!0;case"dragenter":return on=Kr(on,e,t,n,r,s),!0;case"mouseover":return un=Kr(un,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return Ps.set(i,Kr(Ps.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Es.set(i,Kr(Es.get(i)||null,e,t,n,r,s)),!0}return!1}function Cp(e){var t=Tn(e.target);if(t!==null){var n=Hn(t);if(n!==null){if(t=n.tag,t===13){if(t=fp(n),t!==null){e.blockedOn=t,Sp(e.priority,function(){jp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Fa(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Oo(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Bo=r,n.target.dispatchEvent(r),Bo=null}else return t=Qs(n),t!==null&&oc(t),e.blockedOn=n,!1;t.shift()}return!0}function Wd(e,t,n){Fa(e)&&n.delete(t)}function jv(){Vo=!1,ln!==null&&Fa(ln)&&(ln=null),on!==null&&Fa(on)&&(on=null),un!==null&&Fa(un)&&(un=null),Ps.forEach(Wd),Es.forEach(Wd)}function qr(e,t){e.blockedOn===t&&(e.blockedOn=null,Vo||(Vo=!0,qe.unstable_scheduleCallback(qe.unstable_NormalPriority,jv)))}function Ts(e){function t(s){return qr(s,e)}if(0<xa.length){qr(xa[0],e);for(var n=1;n<xa.length;n++){var r=xa[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ln!==null&&qr(ln,e),on!==null&&qr(on,e),un!==null&&qr(un,e),Ps.forEach(t),Es.forEach(t),n=0;n<Jt.length;n++)r=Jt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Jt.length&&(n=Jt[0],n.blockedOn===null);)Cp(n),n.blockedOn===null&&Jt.shift()}var pr=$t.ReactCurrentBatchConfig,ui=!0;function Nv(e,t,n,r){var s=Z,i=pr.transition;pr.transition=null;try{Z=1,uc(e,t,n,r)}finally{Z=s,pr.transition=i}}function Sv(e,t,n,r){var s=Z,i=pr.transition;pr.transition=null;try{Z=4,uc(e,t,n,r)}finally{Z=s,pr.transition=i}}function uc(e,t,n,r){if(ui){var s=Oo(e,t,n,r);if(s===null)zl(e,t,r,ci,n),Ud(e,r);else if(wv(s,e,t,n,r))r.stopPropagation();else if(Ud(e,r),t&4&&-1<kv.indexOf(e)){for(;s!==null;){var i=Qs(s);if(i!==null&&wp(i),i=Oo(e,t,n,r),i===null&&zl(e,t,r,ci,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else zl(e,t,r,null,n)}}var ci=null;function Oo(e,t,n,r){if(ci=null,e=ac(r),e=Tn(e),e!==null)if(t=Hn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=fp(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ci=e,null}function Pp(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(hv()){case ic:return 1;case bp:return 4;case li:case mv:return 16;case vp:return 536870912;default:return 16}default:return 16}}var tn=null,cc=null,Va=null;function Ep(){if(Va)return Va;var e,t=cc,n=t.length,r,s="value"in tn?tn.value:tn.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===s[i-r];r++);return Va=s.slice(e,1<r?1-r:void 0)}function Oa(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ba(){return!0}function Hd(){return!1}function Xe(e){function t(n,r,s,i,l){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=l,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ba:Hd,this.isPropagationStopped=Hd,this}return le(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ba)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ba)},persist:function(){},isPersistent:ba}),t}var Dr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dc=Xe(Dr),Zs=le({},Dr,{view:0,detail:0}),Cv=Xe(Zs),Pl,El,Yr,$i=le({},Zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Yr&&(Yr&&e.type==="mousemove"?(Pl=e.screenX-Yr.screenX,El=e.screenY-Yr.screenY):El=Pl=0,Yr=e),Pl)},movementY:function(e){return"movementY"in e?e.movementY:El}}),$d=Xe($i),Pv=le({},$i,{dataTransfer:0}),Ev=Xe(Pv),Tv=le({},Zs,{relatedTarget:0}),Tl=Xe(Tv),Av=le({},Dr,{animationName:0,elapsedTime:0,pseudoElement:0}),Mv=Xe(Av),_v=le({},Dr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Dv=Xe(_v),Lv=le({},Dr,{data:0}),Gd=Xe(Lv),Bv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zv={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Iv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Rv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Iv[e])?!!t[e]:!1}function hc(){return Rv}var Fv=le({},Zs,{key:function(e){if(e.key){var t=Bv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Oa(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?zv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hc,charCode:function(e){return e.type==="keypress"?Oa(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Oa(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Vv=Xe(Fv),Ov=le({},$i,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kd=Xe(Ov),Uv=le({},Zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hc}),Wv=Xe(Uv),Hv=le({},Dr,{propertyName:0,elapsedTime:0,pseudoElement:0}),$v=Xe(Hv),Gv=le({},$i,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Kv=Xe(Gv),qv=[9,13,27,32],mc=Ot&&"CompositionEvent"in window,cs=null;Ot&&"documentMode"in document&&(cs=document.documentMode);var Yv=Ot&&"TextEvent"in window&&!cs,Tp=Ot&&(!mc||cs&&8<cs&&11>=cs),qd=" ",Yd=!1;function Ap(e,t){switch(e){case"keyup":return qv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Qn=!1;function Xv(e,t){switch(e){case"compositionend":return Mp(t);case"keypress":return t.which!==32?null:(Yd=!0,qd);case"textInput":return e=t.data,e===qd&&Yd?null:e;default:return null}}function Zv(e,t){if(Qn)return e==="compositionend"||!mc&&Ap(e,t)?(e=Ep(),Va=cc=tn=null,Qn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Tp&&t.locale!=="ko"?null:t.data;default:return null}}var Qv={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Xd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Qv[e.type]:t==="textarea"}function _p(e,t,n,r){up(r),t=di(t,"onChange"),0<t.length&&(n=new dc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ds=null,As=null;function Jv(e){Wp(e,0)}function Gi(e){var t=tr(e);if(np(t))return e}function ey(e,t){if(e==="change")return t}var Dp=!1;if(Ot){var Al;if(Ot){var Ml="oninput"in document;if(!Ml){var Zd=document.createElement("div");Zd.setAttribute("oninput","return;"),Ml=typeof Zd.oninput=="function"}Al=Ml}else Al=!1;Dp=Al&&(!document.documentMode||9<document.documentMode)}function Qd(){ds&&(ds.detachEvent("onpropertychange",Lp),As=ds=null)}function Lp(e){if(e.propertyName==="value"&&Gi(As)){var t=[];_p(t,As,e,ac(e)),mp(Jv,t)}}function ty(e,t,n){e==="focusin"?(Qd(),ds=t,As=n,ds.attachEvent("onpropertychange",Lp)):e==="focusout"&&Qd()}function ny(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Gi(As)}function ry(e,t){if(e==="click")return Gi(t)}function sy(e,t){if(e==="input"||e==="change")return Gi(t)}function ay(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yt=typeof Object.is=="function"?Object.is:ay;function Ms(e,t){if(yt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!jo.call(t,s)||!yt(e[s],t[s]))return!1}return!0}function Jd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function eh(e,t){var n=Jd(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Jd(n)}}function Bp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Bp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zp(){for(var e=window,t=si();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=si(e.document)}return t}function fc(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 iy(e){var t=zp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Bp(n.ownerDocument.documentElement,n)){if(r!==null&&fc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=eh(n,i);var l=eh(n,r);s&&l&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var ly=Ot&&"documentMode"in document&&11>=document.documentMode,Jn=null,Uo=null,hs=null,Wo=!1;function th(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Wo||Jn==null||Jn!==si(r)||(r=Jn,"selectionStart"in r&&fc(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}),hs&&Ms(hs,r)||(hs=r,r=di(Uo,"onSelect"),0<r.length&&(t=new dc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Jn)))}function va(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var er={animationend:va("Animation","AnimationEnd"),animationiteration:va("Animation","AnimationIteration"),animationstart:va("Animation","AnimationStart"),transitionend:va("Transition","TransitionEnd")},_l={},Ip={};Ot&&(Ip=document.createElement("div").style,"AnimationEvent"in window||(delete er.animationend.animation,delete er.animationiteration.animation,delete er.animationstart.animation),"TransitionEvent"in window||delete er.transitionend.transition);function Ki(e){if(_l[e])return _l[e];if(!er[e])return e;var t=er[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ip)return _l[e]=t[n];return e}var Rp=Ki("animationend"),Fp=Ki("animationiteration"),Vp=Ki("animationstart"),Op=Ki("transitionend"),Up=new Map,nh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function yn(e,t){Up.set(e,t),Wn(t,[e])}for(var Dl=0;Dl<nh.length;Dl++){var Ll=nh[Dl],oy=Ll.toLowerCase(),uy=Ll[0].toUpperCase()+Ll.slice(1);yn(oy,"on"+uy)}yn(Rp,"onAnimationEnd");yn(Fp,"onAnimationIteration");yn(Vp,"onAnimationStart");yn("dblclick","onDoubleClick");yn("focusin","onFocus");yn("focusout","onBlur");yn(Op,"onTransitionEnd");br("onMouseEnter",["mouseout","mouseover"]);br("onMouseLeave",["mouseout","mouseover"]);br("onPointerEnter",["pointerout","pointerover"]);br("onPointerLeave",["pointerout","pointerover"]);Wn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Wn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Wn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Wn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Wn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Wn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var as="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),cy=new Set("cancel close invalid load scroll toggle".split(" ").concat(as));function rh(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,ov(r,t,void 0,e),e.currentTarget=null}function Wp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var l=r.length-1;0<=l;l--){var o=r[l],u=o.instance,c=o.currentTarget;if(o=o.listener,u!==i&&s.isPropagationStopped())break e;rh(s,o,c),i=u}else for(l=0;l<r.length;l++){if(o=r[l],u=o.instance,c=o.currentTarget,o=o.listener,u!==i&&s.isPropagationStopped())break e;rh(s,o,c),i=u}}}if(ii)throw e=Ro,ii=!1,Ro=null,e}function te(e,t){var n=t[qo];n===void 0&&(n=t[qo]=new Set);var r=e+"__bubble";n.has(r)||(Hp(t,e,2,!1),n.add(r))}function Bl(e,t,n){var r=0;t&&(r|=4),Hp(n,e,r,t)}var ya="_reactListening"+Math.random().toString(36).slice(2);function _s(e){if(!e[ya]){e[ya]=!0,Zf.forEach(function(n){n!=="selectionchange"&&(cy.has(n)||Bl(n,!1,e),Bl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ya]||(t[ya]=!0,Bl("selectionchange",!1,t))}}function Hp(e,t,n,r){switch(Pp(t)){case 1:var s=Nv;break;case 4:s=Sv;break;default:s=uc}n=s.bind(null,t,n,e),s=void 0,!Io||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function zl(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var o=r.stateNode.containerInfo;if(o===s||o.nodeType===8&&o.parentNode===s)break;if(l===4)for(l=r.return;l!==null;){var u=l.tag;if((u===3||u===4)&&(u=l.stateNode.containerInfo,u===s||u.nodeType===8&&u.parentNode===s))return;l=l.return}for(;o!==null;){if(l=Tn(o),l===null)return;if(u=l.tag,u===5||u===6){r=i=l;continue e}o=o.parentNode}}r=r.return}mp(function(){var c=i,d=ac(n),h=[];e:{var m=Up.get(e);if(m!==void 0){var f=dc,b=e;switch(e){case"keypress":if(Oa(n)===0)break e;case"keydown":case"keyup":f=Vv;break;case"focusin":b="focus",f=Tl;break;case"focusout":b="blur",f=Tl;break;case"beforeblur":case"afterblur":f=Tl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=$d;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=Ev;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=Wv;break;case Rp:case Fp:case Vp:f=Mv;break;case Op:f=$v;break;case"scroll":f=Cv;break;case"wheel":f=Kv;break;case"copy":case"cut":case"paste":f=Dv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=Kd}var y=(t&4)!==0,k=!y&&e==="scroll",x=y?m!==null?m+"Capture":null:m;y=[];for(var p=c,v;p!==null;){v=p;var w=v.stateNode;if(v.tag===5&&w!==null&&(v=w,x!==null&&(w=Cs(p,x),w!=null&&y.push(Ds(p,w,v)))),k)break;p=p.return}0<y.length&&(m=new f(m,b,null,n,d),h.push({event:m,listeners:y}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",m&&n!==Bo&&(b=n.relatedTarget||n.fromElement)&&(Tn(b)||b[Ut]))break e;if((f||m)&&(m=d.window===d?d:(m=d.ownerDocument)?m.defaultView||m.parentWindow:window,f?(b=n.relatedTarget||n.toElement,f=c,b=b?Tn(b):null,b!==null&&(k=Hn(b),b!==k||b.tag!==5&&b.tag!==6)&&(b=null)):(f=null,b=c),f!==b)){if(y=$d,w="onMouseLeave",x="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(y=Kd,w="onPointerLeave",x="onPointerEnter",p="pointer"),k=f==null?m:tr(f),v=b==null?m:tr(b),m=new y(w,p+"leave",f,n,d),m.target=k,m.relatedTarget=v,w=null,Tn(d)===c&&(y=new y(x,p+"enter",b,n,d),y.target=v,y.relatedTarget=k,w=y),k=w,f&&b)t:{for(y=f,x=b,p=0,v=y;v;v=Kn(v))p++;for(v=0,w=x;w;w=Kn(w))v++;for(;0<p-v;)y=Kn(y),p--;for(;0<v-p;)x=Kn(x),v--;for(;p--;){if(y===x||x!==null&&y===x.alternate)break t;y=Kn(y),x=Kn(x)}y=null}else y=null;f!==null&&sh(h,m,f,y,!1),b!==null&&k!==null&&sh(h,k,b,y,!0)}}e:{if(m=c?tr(c):window,f=m.nodeName&&m.nodeName.toLowerCase(),f==="select"||f==="input"&&m.type==="file")var j=ey;else if(Xd(m))if(Dp)j=sy;else{j=ny;var P=ty}else(f=m.nodeName)&&f.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(j=ry);if(j&&(j=j(e,c))){_p(h,j,n,d);break e}P&&P(e,m,c),e==="focusout"&&(P=m._wrapperState)&&P.controlled&&m.type==="number"&&Ao(m,"number",m.value)}switch(P=c?tr(c):window,e){case"focusin":(Xd(P)||P.contentEditable==="true")&&(Jn=P,Uo=c,hs=null);break;case"focusout":hs=Uo=Jn=null;break;case"mousedown":Wo=!0;break;case"contextmenu":case"mouseup":case"dragend":Wo=!1,th(h,n,d);break;case"selectionchange":if(ly)break;case"keydown":case"keyup":th(h,n,d)}var C;if(mc)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else Qn?Ap(e,n)&&(N="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(Tp&&n.locale!=="ko"&&(Qn||N!=="onCompositionStart"?N==="onCompositionEnd"&&Qn&&(C=Ep()):(tn=d,cc="value"in tn?tn.value:tn.textContent,Qn=!0)),P=di(c,N),0<P.length&&(N=new Gd(N,e,null,n,d),h.push({event:N,listeners:P}),C?N.data=C:(C=Mp(n),C!==null&&(N.data=C)))),(C=Yv?Xv(e,n):Zv(e,n))&&(c=di(c,"onBeforeInput"),0<c.length&&(d=new Gd("onBeforeInput","beforeinput",null,n,d),h.push({event:d,listeners:c}),d.data=C))}Wp(h,t)})}function Ds(e,t,n){return{instance:e,listener:t,currentTarget:n}}function di(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Cs(e,n),i!=null&&r.unshift(Ds(e,i,s)),i=Cs(e,t),i!=null&&r.push(Ds(e,i,s))),e=e.return}return r}function Kn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function sh(e,t,n,r,s){for(var i=t._reactName,l=[];n!==null&&n!==r;){var o=n,u=o.alternate,c=o.stateNode;if(u!==null&&u===r)break;o.tag===5&&c!==null&&(o=c,s?(u=Cs(n,i),u!=null&&l.unshift(Ds(n,u,o))):s||(u=Cs(n,i),u!=null&&l.push(Ds(n,u,o)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var dy=/\r\n?/g,hy=/\u0000|\uFFFD/g;function ah(e){return(typeof e=="string"?e:""+e).replace(dy,`
`).replace(hy,"")}function ka(e,t,n){if(t=ah(t),ah(e)!==t&&n)throw Error(D(425))}function hi(){}var Ho=null,$o=null;function Go(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ko=typeof setTimeout=="function"?setTimeout:void 0,my=typeof clearTimeout=="function"?clearTimeout:void 0,ih=typeof Promise=="function"?Promise:void 0,fy=typeof queueMicrotask=="function"?queueMicrotask:typeof ih<"u"?function(e){return ih.resolve(null).then(e).catch(py)}:Ko;function py(e){setTimeout(function(){throw e})}function Il(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Ts(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Ts(t)}function cn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function lh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Lr=Math.random().toString(36).slice(2),Ct="__reactFiber$"+Lr,Ls="__reactProps$"+Lr,Ut="__reactContainer$"+Lr,qo="__reactEvents$"+Lr,gy="__reactListeners$"+Lr,xy="__reactHandles$"+Lr;function Tn(e){var t=e[Ct];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ut]||n[Ct]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=lh(e);e!==null;){if(n=e[Ct])return n;e=lh(e)}return t}e=n,n=e.parentNode}return null}function Qs(e){return e=e[Ct]||e[Ut],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function tr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(D(33))}function qi(e){return e[Ls]||null}var Yo=[],nr=-1;function kn(e){return{current:e}}function ne(e){0>nr||(e.current=Yo[nr],Yo[nr]=null,nr--)}function ee(e,t){nr++,Yo[nr]=e.current,e.current=t}var xn={},Ee=kn(xn),Fe=kn(!1),Rn=xn;function vr(e,t){var n=e.type.contextTypes;if(!n)return xn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Ve(e){return e=e.childContextTypes,e!=null}function mi(){ne(Fe),ne(Ee)}function oh(e,t,n){if(Ee.current!==xn)throw Error(D(168));ee(Ee,t),ee(Fe,n)}function $p(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(D(108,tv(e)||"Unknown",s));return le({},n,r)}function fi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||xn,Rn=Ee.current,ee(Ee,e),ee(Fe,Fe.current),!0}function uh(e,t,n){var r=e.stateNode;if(!r)throw Error(D(169));n?(e=$p(e,t,Rn),r.__reactInternalMemoizedMergedChildContext=e,ne(Fe),ne(Ee),ee(Ee,e)):ne(Fe),ee(Fe,n)}var zt=null,Yi=!1,Rl=!1;function Gp(e){zt===null?zt=[e]:zt.push(e)}function by(e){Yi=!0,Gp(e)}function wn(){if(!Rl&&zt!==null){Rl=!0;var e=0,t=Z;try{var n=zt;for(Z=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}zt=null,Yi=!1}catch(s){throw zt!==null&&(zt=zt.slice(e+1)),xp(ic,wn),s}finally{Z=t,Rl=!1}}return null}var rr=[],sr=0,pi=null,gi=0,et=[],tt=0,Fn=null,It=1,Rt="";function Cn(e,t){rr[sr++]=gi,rr[sr++]=pi,pi=e,gi=t}function Kp(e,t,n){et[tt++]=It,et[tt++]=Rt,et[tt++]=Fn,Fn=e;var r=It;e=Rt;var s=32-xt(r)-1;r&=~(1<<s),n+=1;var i=32-xt(t)+s;if(30<i){var l=s-s%5;i=(r&(1<<l)-1).toString(32),r>>=l,s-=l,It=1<<32-xt(t)+s|n<<s|r,Rt=i+e}else It=1<<i|n<<s|r,Rt=e}function pc(e){e.return!==null&&(Cn(e,1),Kp(e,1,0))}function gc(e){for(;e===pi;)pi=rr[--sr],rr[sr]=null,gi=rr[--sr],rr[sr]=null;for(;e===Fn;)Fn=et[--tt],et[tt]=null,Rt=et[--tt],et[tt]=null,It=et[--tt],et[tt]=null}var Ge=null,$e=null,re=!1,pt=null;function qp(e,t){var n=nt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function ch(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ge=e,$e=cn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ge=e,$e=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Fn!==null?{id:It,overflow:Rt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=nt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ge=e,$e=null,!0):!1;default:return!1}}function Xo(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Zo(e){if(re){var t=$e;if(t){var n=t;if(!ch(e,t)){if(Xo(e))throw Error(D(418));t=cn(n.nextSibling);var r=Ge;t&&ch(e,t)?qp(r,n):(e.flags=e.flags&-4097|2,re=!1,Ge=e)}}else{if(Xo(e))throw Error(D(418));e.flags=e.flags&-4097|2,re=!1,Ge=e}}}function dh(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ge=e}function wa(e){if(e!==Ge)return!1;if(!re)return dh(e),re=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Go(e.type,e.memoizedProps)),t&&(t=$e)){if(Xo(e))throw Yp(),Error(D(418));for(;t;)qp(e,t),t=cn(t.nextSibling)}if(dh(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(D(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){$e=cn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}$e=null}}else $e=Ge?cn(e.stateNode.nextSibling):null;return!0}function Yp(){for(var e=$e;e;)e=cn(e.nextSibling)}function yr(){$e=Ge=null,re=!1}function xc(e){pt===null?pt=[e]:pt.push(e)}var vy=$t.ReactCurrentBatchConfig;function Xr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(D(309));var r=n.stateNode}if(!r)throw Error(D(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(l){var o=s.refs;l===null?delete o[i]:o[i]=l},t._stringRef=i,t)}if(typeof e!="string")throw Error(D(284));if(!n._owner)throw Error(D(290,e))}return e}function ja(e,t){throw e=Object.prototype.toString.call(t),Error(D(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function hh(e){var t=e._init;return t(e._payload)}function Xp(e){function t(x,p){if(e){var v=x.deletions;v===null?(x.deletions=[p],x.flags|=16):v.push(p)}}function n(x,p){if(!e)return null;for(;p!==null;)t(x,p),p=p.sibling;return null}function r(x,p){for(x=new Map;p!==null;)p.key!==null?x.set(p.key,p):x.set(p.index,p),p=p.sibling;return x}function s(x,p){return x=fn(x,p),x.index=0,x.sibling=null,x}function i(x,p,v){return x.index=v,e?(v=x.alternate,v!==null?(v=v.index,v<p?(x.flags|=2,p):v):(x.flags|=2,p)):(x.flags|=1048576,p)}function l(x){return e&&x.alternate===null&&(x.flags|=2),x}function o(x,p,v,w){return p===null||p.tag!==6?(p=$l(v,x.mode,w),p.return=x,p):(p=s(p,v),p.return=x,p)}function u(x,p,v,w){var j=v.type;return j===Zn?d(x,p,v.props.children,w,v.key):p!==null&&(p.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Xt&&hh(j)===p.type)?(w=s(p,v.props),w.ref=Xr(x,p,v),w.return=x,w):(w=qa(v.type,v.key,v.props,null,x.mode,w),w.ref=Xr(x,p,v),w.return=x,w)}function c(x,p,v,w){return p===null||p.tag!==4||p.stateNode.containerInfo!==v.containerInfo||p.stateNode.implementation!==v.implementation?(p=Gl(v,x.mode,w),p.return=x,p):(p=s(p,v.children||[]),p.return=x,p)}function d(x,p,v,w,j){return p===null||p.tag!==7?(p=Bn(v,x.mode,w,j),p.return=x,p):(p=s(p,v),p.return=x,p)}function h(x,p,v){if(typeof p=="string"&&p!==""||typeof p=="number")return p=$l(""+p,x.mode,v),p.return=x,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case ha:return v=qa(p.type,p.key,p.props,null,x.mode,v),v.ref=Xr(x,null,p),v.return=x,v;case Xn:return p=Gl(p,x.mode,v),p.return=x,p;case Xt:var w=p._init;return h(x,w(p._payload),v)}if(rs(p)||$r(p))return p=Bn(p,x.mode,v,null),p.return=x,p;ja(x,p)}return null}function m(x,p,v,w){var j=p!==null?p.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return j!==null?null:o(x,p,""+v,w);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case ha:return v.key===j?u(x,p,v,w):null;case Xn:return v.key===j?c(x,p,v,w):null;case Xt:return j=v._init,m(x,p,j(v._payload),w)}if(rs(v)||$r(v))return j!==null?null:d(x,p,v,w,null);ja(x,v)}return null}function f(x,p,v,w,j){if(typeof w=="string"&&w!==""||typeof w=="number")return x=x.get(v)||null,o(p,x,""+w,j);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case ha:return x=x.get(w.key===null?v:w.key)||null,u(p,x,w,j);case Xn:return x=x.get(w.key===null?v:w.key)||null,c(p,x,w,j);case Xt:var P=w._init;return f(x,p,v,P(w._payload),j)}if(rs(w)||$r(w))return x=x.get(v)||null,d(p,x,w,j,null);ja(p,w)}return null}function b(x,p,v,w){for(var j=null,P=null,C=p,N=p=0,S=null;C!==null&&N<v.length;N++){C.index>N?(S=C,C=null):S=C.sibling;var E=m(x,C,v[N],w);if(E===null){C===null&&(C=S);break}e&&C&&E.alternate===null&&t(x,C),p=i(E,p,N),P===null?j=E:P.sibling=E,P=E,C=S}if(N===v.length)return n(x,C),re&&Cn(x,N),j;if(C===null){for(;N<v.length;N++)C=h(x,v[N],w),C!==null&&(p=i(C,p,N),P===null?j=C:P.sibling=C,P=C);return re&&Cn(x,N),j}for(C=r(x,C);N<v.length;N++)S=f(C,x,N,v[N],w),S!==null&&(e&&S.alternate!==null&&C.delete(S.key===null?N:S.key),p=i(S,p,N),P===null?j=S:P.sibling=S,P=S);return e&&C.forEach(function(T){return t(x,T)}),re&&Cn(x,N),j}function y(x,p,v,w){var j=$r(v);if(typeof j!="function")throw Error(D(150));if(v=j.call(v),v==null)throw Error(D(151));for(var P=j=null,C=p,N=p=0,S=null,E=v.next();C!==null&&!E.done;N++,E=v.next()){C.index>N?(S=C,C=null):S=C.sibling;var T=m(x,C,E.value,w);if(T===null){C===null&&(C=S);break}e&&C&&T.alternate===null&&t(x,C),p=i(T,p,N),P===null?j=T:P.sibling=T,P=T,C=S}if(E.done)return n(x,C),re&&Cn(x,N),j;if(C===null){for(;!E.done;N++,E=v.next())E=h(x,E.value,w),E!==null&&(p=i(E,p,N),P===null?j=E:P.sibling=E,P=E);return re&&Cn(x,N),j}for(C=r(x,C);!E.done;N++,E=v.next())E=f(C,x,N,E.value,w),E!==null&&(e&&E.alternate!==null&&C.delete(E.key===null?N:E.key),p=i(E,p,N),P===null?j=E:P.sibling=E,P=E);return e&&C.forEach(function(I){return t(x,I)}),re&&Cn(x,N),j}function k(x,p,v,w){if(typeof v=="object"&&v!==null&&v.type===Zn&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case ha:e:{for(var j=v.key,P=p;P!==null;){if(P.key===j){if(j=v.type,j===Zn){if(P.tag===7){n(x,P.sibling),p=s(P,v.props.children),p.return=x,x=p;break e}}else if(P.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Xt&&hh(j)===P.type){n(x,P.sibling),p=s(P,v.props),p.ref=Xr(x,P,v),p.return=x,x=p;break e}n(x,P);break}else t(x,P);P=P.sibling}v.type===Zn?(p=Bn(v.props.children,x.mode,w,v.key),p.return=x,x=p):(w=qa(v.type,v.key,v.props,null,x.mode,w),w.ref=Xr(x,p,v),w.return=x,x=w)}return l(x);case Xn:e:{for(P=v.key;p!==null;){if(p.key===P)if(p.tag===4&&p.stateNode.containerInfo===v.containerInfo&&p.stateNode.implementation===v.implementation){n(x,p.sibling),p=s(p,v.children||[]),p.return=x,x=p;break e}else{n(x,p);break}else t(x,p);p=p.sibling}p=Gl(v,x.mode,w),p.return=x,x=p}return l(x);case Xt:return P=v._init,k(x,p,P(v._payload),w)}if(rs(v))return b(x,p,v,w);if($r(v))return y(x,p,v,w);ja(x,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,p!==null&&p.tag===6?(n(x,p.sibling),p=s(p,v),p.return=x,x=p):(n(x,p),p=$l(v,x.mode,w),p.return=x,x=p),l(x)):n(x,p)}return k}var kr=Xp(!0),Zp=Xp(!1),xi=kn(null),bi=null,ar=null,bc=null;function vc(){bc=ar=bi=null}function yc(e){var t=xi.current;ne(xi),e._currentValue=t}function Qo(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 gr(e,t){bi=e,bc=ar=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ie=!0),e.firstContext=null)}function at(e){var t=e._currentValue;if(bc!==e)if(e={context:e,memoizedValue:t,next:null},ar===null){if(bi===null)throw Error(D(308));ar=e,bi.dependencies={lanes:0,firstContext:e}}else ar=ar.next=e;return t}var An=null;function kc(e){An===null?An=[e]:An.push(e)}function Qp(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,kc(t)):(n.next=s.next,s.next=n),t.interleaved=n,Wt(e,r)}function Wt(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 Zt=!1;function wc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Jp(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 Vt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function dn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,q&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Wt(e,n)}return s=r.interleaved,s===null?(t.next=t,kc(r)):(t.next=s.next,s.next=t),r.interleaved=t,Wt(e,n)}function Ua(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,lc(e,n)}}function mh(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=l:i=i.next=l,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function vi(e,t,n,r){var s=e.updateQueue;Zt=!1;var i=s.firstBaseUpdate,l=s.lastBaseUpdate,o=s.shared.pending;if(o!==null){s.shared.pending=null;var u=o,c=u.next;u.next=null,l===null?i=c:l.next=c,l=u;var d=e.alternate;d!==null&&(d=d.updateQueue,o=d.lastBaseUpdate,o!==l&&(o===null?d.firstBaseUpdate=c:o.next=c,d.lastBaseUpdate=u))}if(i!==null){var h=s.baseState;l=0,d=c=u=null,o=i;do{var m=o.lane,f=o.eventTime;if((r&m)===m){d!==null&&(d=d.next={eventTime:f,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var b=e,y=o;switch(m=t,f=n,y.tag){case 1:if(b=y.payload,typeof b=="function"){h=b.call(f,h,m);break e}h=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=y.payload,m=typeof b=="function"?b.call(f,h,m):b,m==null)break e;h=le({},h,m);break e;case 2:Zt=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,m=s.effects,m===null?s.effects=[o]:m.push(o))}else f={eventTime:f,lane:m,tag:o.tag,payload:o.payload,callback:o.callback,next:null},d===null?(c=d=f,u=h):d=d.next=f,l|=m;if(o=o.next,o===null){if(o=s.shared.pending,o===null)break;m=o,o=m.next,m.next=null,s.lastBaseUpdate=m,s.shared.pending=null}}while(!0);if(d===null&&(u=h),s.baseState=u,s.firstBaseUpdate=c,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do l|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);On|=l,e.lanes=l,e.memoizedState=h}}function fh(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(D(191,s));s.call(r)}}}var Js={},Et=kn(Js),Bs=kn(Js),zs=kn(Js);function Mn(e){if(e===Js)throw Error(D(174));return e}function jc(e,t){switch(ee(zs,t),ee(Bs,e),ee(Et,Js),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:_o(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=_o(t,e)}ne(Et),ee(Et,t)}function wr(){ne(Et),ne(Bs),ne(zs)}function e0(e){Mn(zs.current);var t=Mn(Et.current),n=_o(t,e.type);t!==n&&(ee(Bs,e),ee(Et,n))}function Nc(e){Bs.current===e&&(ne(Et),ne(Bs))}var se=kn(0);function yi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Fl=[];function Sc(){for(var e=0;e<Fl.length;e++)Fl[e]._workInProgressVersionPrimary=null;Fl.length=0}var Wa=$t.ReactCurrentDispatcher,Vl=$t.ReactCurrentBatchConfig,Vn=0,ae=null,fe=null,be=null,ki=!1,ms=!1,Is=0,yy=0;function Se(){throw Error(D(321))}function Cc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yt(e[n],t[n]))return!1;return!0}function Pc(e,t,n,r,s,i){if(Vn=i,ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Wa.current=e===null||e.memoizedState===null?Ny:Sy,e=n(r,s),ms){i=0;do{if(ms=!1,Is=0,25<=i)throw Error(D(301));i+=1,be=fe=null,t.updateQueue=null,Wa.current=Cy,e=n(r,s)}while(ms)}if(Wa.current=wi,t=fe!==null&&fe.next!==null,Vn=0,be=fe=ae=null,ki=!1,t)throw Error(D(300));return e}function Ec(){var e=Is!==0;return Is=0,e}function jt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return be===null?ae.memoizedState=be=e:be=be.next=e,be}function it(){if(fe===null){var e=ae.alternate;e=e!==null?e.memoizedState:null}else e=fe.next;var t=be===null?ae.memoizedState:be.next;if(t!==null)be=t,fe=e;else{if(e===null)throw Error(D(310));fe=e,e={memoizedState:fe.memoizedState,baseState:fe.baseState,baseQueue:fe.baseQueue,queue:fe.queue,next:null},be===null?ae.memoizedState=be=e:be=be.next=e}return be}function Rs(e,t){return typeof t=="function"?t(e):t}function Ol(e){var t=it(),n=t.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=e;var r=fe,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var l=s.next;s.next=i.next,i.next=l}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var o=l=null,u=null,c=i;do{var d=c.lane;if((Vn&d)===d)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var h={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(o=u=h,l=r):u=u.next=h,ae.lanes|=d,On|=d}c=c.next}while(c!==null&&c!==i);u===null?l=r:u.next=o,yt(r,t.memoizedState)||(Ie=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,ae.lanes|=i,On|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ul(e){var t=it(),n=t.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var l=s=s.next;do i=e(i,l.action),l=l.next;while(l!==s);yt(i,t.memoizedState)||(Ie=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function t0(){}function n0(e,t){var n=ae,r=it(),s=t(),i=!yt(r.memoizedState,s);if(i&&(r.memoizedState=s,Ie=!0),r=r.queue,Tc(a0.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||be!==null&&be.memoizedState.tag&1){if(n.flags|=2048,Fs(9,s0.bind(null,n,r,s,t),void 0,null),ve===null)throw Error(D(349));Vn&30||r0(n,t,s)}return s}function r0(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ae.updateQueue,t===null?(t={lastEffect:null,stores:null},ae.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function s0(e,t,n,r){t.value=n,t.getSnapshot=r,i0(t)&&l0(e)}function a0(e,t,n){return n(function(){i0(t)&&l0(e)})}function i0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!yt(e,n)}catch{return!0}}function l0(e){var t=Wt(e,1);t!==null&&bt(t,e,1,-1)}function ph(e){var t=jt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Rs,lastRenderedState:e},t.queue=e,e=e.dispatch=jy.bind(null,ae,e),[t.memoizedState,e]}function Fs(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ae.updateQueue,t===null?(t={lastEffect:null,stores:null},ae.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function o0(){return it().memoizedState}function Ha(e,t,n,r){var s=jt();ae.flags|=e,s.memoizedState=Fs(1|t,n,void 0,r===void 0?null:r)}function Xi(e,t,n,r){var s=it();r=r===void 0?null:r;var i=void 0;if(fe!==null){var l=fe.memoizedState;if(i=l.destroy,r!==null&&Cc(r,l.deps)){s.memoizedState=Fs(t,n,i,r);return}}ae.flags|=e,s.memoizedState=Fs(1|t,n,i,r)}function gh(e,t){return Ha(8390656,8,e,t)}function Tc(e,t){return Xi(2048,8,e,t)}function u0(e,t){return Xi(4,2,e,t)}function c0(e,t){return Xi(4,4,e,t)}function d0(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function h0(e,t,n){return n=n!=null?n.concat([e]):null,Xi(4,4,d0.bind(null,t,e),n)}function Ac(){}function m0(e,t){var n=it();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Cc(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function f0(e,t){var n=it();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Cc(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function p0(e,t,n){return Vn&21?(yt(n,t)||(n=yp(),ae.lanes|=n,On|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ie=!0),e.memoizedState=n)}function ky(e,t){var n=Z;Z=n!==0&&4>n?n:4,e(!0);var r=Vl.transition;Vl.transition={};try{e(!1),t()}finally{Z=n,Vl.transition=r}}function g0(){return it().memoizedState}function wy(e,t,n){var r=mn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},x0(e))b0(t,n);else if(n=Qp(e,t,n,r),n!==null){var s=_e();bt(n,e,r,s),v0(n,t,r)}}function jy(e,t,n){var r=mn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(x0(e))b0(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,o=i(l,n);if(s.hasEagerState=!0,s.eagerState=o,yt(o,l)){var u=t.interleaved;u===null?(s.next=s,kc(t)):(s.next=u.next,u.next=s),t.interleaved=s;return}}catch{}finally{}n=Qp(e,t,s,r),n!==null&&(s=_e(),bt(n,e,r,s),v0(n,t,r))}}function x0(e){var t=e.alternate;return e===ae||t!==null&&t===ae}function b0(e,t){ms=ki=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function v0(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lc(e,n)}}var wi={readContext:at,useCallback:Se,useContext:Se,useEffect:Se,useImperativeHandle:Se,useInsertionEffect:Se,useLayoutEffect:Se,useMemo:Se,useReducer:Se,useRef:Se,useState:Se,useDebugValue:Se,useDeferredValue:Se,useTransition:Se,useMutableSource:Se,useSyncExternalStore:Se,useId:Se,unstable_isNewReconciler:!1},Ny={readContext:at,useCallback:function(e,t){return jt().memoizedState=[e,t===void 0?null:t],e},useContext:at,useEffect:gh,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ha(4194308,4,d0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ha(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ha(4,2,e,t)},useMemo:function(e,t){var n=jt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=jt();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=wy.bind(null,ae,e),[r.memoizedState,e]},useRef:function(e){var t=jt();return e={current:e},t.memoizedState=e},useState:ph,useDebugValue:Ac,useDeferredValue:function(e){return jt().memoizedState=e},useTransition:function(){var e=ph(!1),t=e[0];return e=ky.bind(null,e[1]),jt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ae,s=jt();if(re){if(n===void 0)throw Error(D(407));n=n()}else{if(n=t(),ve===null)throw Error(D(349));Vn&30||r0(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,gh(a0.bind(null,r,i,e),[e]),r.flags|=2048,Fs(9,s0.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=jt(),t=ve.identifierPrefix;if(re){var n=Rt,r=It;n=(r&~(1<<32-xt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Is++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=yy++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Sy={readContext:at,useCallback:m0,useContext:at,useEffect:Tc,useImperativeHandle:h0,useInsertionEffect:u0,useLayoutEffect:c0,useMemo:f0,useReducer:Ol,useRef:o0,useState:function(){return Ol(Rs)},useDebugValue:Ac,useDeferredValue:function(e){var t=it();return p0(t,fe.memoizedState,e)},useTransition:function(){var e=Ol(Rs)[0],t=it().memoizedState;return[e,t]},useMutableSource:t0,useSyncExternalStore:n0,useId:g0,unstable_isNewReconciler:!1},Cy={readContext:at,useCallback:m0,useContext:at,useEffect:Tc,useImperativeHandle:h0,useInsertionEffect:u0,useLayoutEffect:c0,useMemo:f0,useReducer:Ul,useRef:o0,useState:function(){return Ul(Rs)},useDebugValue:Ac,useDeferredValue:function(e){var t=it();return fe===null?t.memoizedState=e:p0(t,fe.memoizedState,e)},useTransition:function(){var e=Ul(Rs)[0],t=it().memoizedState;return[e,t]},useMutableSource:t0,useSyncExternalStore:n0,useId:g0,unstable_isNewReconciler:!1};function mt(e,t){if(e&&e.defaultProps){t=le({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Jo(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:le({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Zi={isMounted:function(e){return(e=e._reactInternals)?Hn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=_e(),s=mn(e),i=Vt(r,s);i.payload=t,n!=null&&(i.callback=n),t=dn(e,i,s),t!==null&&(bt(t,e,s,r),Ua(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=_e(),s=mn(e),i=Vt(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=dn(e,i,s),t!==null&&(bt(t,e,s,r),Ua(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=_e(),r=mn(e),s=Vt(n,r);s.tag=2,t!=null&&(s.callback=t),t=dn(e,s,r),t!==null&&(bt(t,e,r,n),Ua(t,e,r))}};function xh(e,t,n,r,s,i,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,l):t.prototype&&t.prototype.isPureReactComponent?!Ms(n,r)||!Ms(s,i):!0}function y0(e,t,n){var r=!1,s=xn,i=t.contextType;return typeof i=="object"&&i!==null?i=at(i):(s=Ve(t)?Rn:Ee.current,r=t.contextTypes,i=(r=r!=null)?vr(e,s):xn),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Zi,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function bh(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Zi.enqueueReplaceState(t,t.state,null)}function eu(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},wc(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=at(i):(i=Ve(t)?Rn:Ee.current,s.context=vr(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Jo(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Zi.enqueueReplaceState(s,s.state,null),vi(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function jr(e,t){try{var n="",r=t;do n+=ev(r),r=r.return;while(r);var s=n}catch(i){s=`
Error generating stack: `+i.message+`
`+i.stack}return{value:e,source:t,stack:s,digest:null}}function Wl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function tu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Py=typeof WeakMap=="function"?WeakMap:Map;function k0(e,t,n){n=Vt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ni||(Ni=!0,du=r),tu(e,t)},n}function w0(e,t,n){n=Vt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){tu(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){tu(e,t),typeof r!="function"&&(hn===null?hn=new Set([this]):hn.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function vh(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Py;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=Oy.bind(null,e,t,n),t.then(e,e))}function yh(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function kh(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Vt(-1,1),t.tag=2,dn(n,t,1))),n.lanes|=1),e)}var Ey=$t.ReactCurrentOwner,Ie=!1;function Te(e,t,n,r){t.child=e===null?Zp(t,null,n,r):kr(t,e.child,n,r)}function wh(e,t,n,r,s){n=n.render;var i=t.ref;return gr(t,s),r=Pc(e,t,n,r,i,s),n=Ec(),e!==null&&!Ie?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ht(e,t,s)):(re&&n&&pc(t),t.flags|=1,Te(e,t,r,s),t.child)}function jh(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!Rc(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,j0(e,t,i,r,s)):(e=qa(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var l=i.memoizedProps;if(n=n.compare,n=n!==null?n:Ms,n(l,r)&&e.ref===t.ref)return Ht(e,t,s)}return t.flags|=1,e=fn(i,r),e.ref=t.ref,e.return=t,t.child=e}function j0(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Ms(i,r)&&e.ref===t.ref)if(Ie=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Ie=!0);else return t.lanes=e.lanes,Ht(e,t,s)}return nu(e,t,n,r,s)}function N0(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ee(lr,He),He|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ee(lr,He),He|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ee(lr,He),He|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ee(lr,He),He|=r;return Te(e,t,s,n),t.child}function S0(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function nu(e,t,n,r,s){var i=Ve(n)?Rn:Ee.current;return i=vr(t,i),gr(t,s),n=Pc(e,t,n,r,i,s),r=Ec(),e!==null&&!Ie?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ht(e,t,s)):(re&&r&&pc(t),t.flags|=1,Te(e,t,n,s),t.child)}function Nh(e,t,n,r,s){if(Ve(n)){var i=!0;fi(t)}else i=!1;if(gr(t,s),t.stateNode===null)$a(e,t),y0(t,n,r),eu(t,n,r,s),r=!0;else if(e===null){var l=t.stateNode,o=t.memoizedProps;l.props=o;var u=l.context,c=n.contextType;typeof c=="object"&&c!==null?c=at(c):(c=Ve(n)?Rn:Ee.current,c=vr(t,c));var d=n.getDerivedStateFromProps,h=typeof d=="function"||typeof l.getSnapshotBeforeUpdate=="function";h||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(o!==r||u!==c)&&bh(t,l,r,c),Zt=!1;var m=t.memoizedState;l.state=m,vi(t,r,l,s),u=t.memoizedState,o!==r||m!==u||Fe.current||Zt?(typeof d=="function"&&(Jo(t,n,d,r),u=t.memoizedState),(o=Zt||xh(t,n,o,r,m,u,c))?(h||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),l.props=r,l.state=u,l.context=c,r=o):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,Jp(e,t),o=t.memoizedProps,c=t.type===t.elementType?o:mt(t.type,o),l.props=c,h=t.pendingProps,m=l.context,u=n.contextType,typeof u=="object"&&u!==null?u=at(u):(u=Ve(n)?Rn:Ee.current,u=vr(t,u));var f=n.getDerivedStateFromProps;(d=typeof f=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(o!==h||m!==u)&&bh(t,l,r,u),Zt=!1,m=t.memoizedState,l.state=m,vi(t,r,l,s);var b=t.memoizedState;o!==h||m!==b||Fe.current||Zt?(typeof f=="function"&&(Jo(t,n,f,r),b=t.memoizedState),(c=Zt||xh(t,n,c,r,m,b,u)||!1)?(d||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,b,u),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,b,u)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||o===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=b),l.props=r,l.state=b,l.context=u,r=c):(typeof l.componentDidUpdate!="function"||o===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return ru(e,t,n,r,i,s)}function ru(e,t,n,r,s,i){S0(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return s&&uh(t,n,!1),Ht(e,t,i);r=t.stateNode,Ey.current=t;var o=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=kr(t,e.child,null,i),t.child=kr(t,null,o,i)):Te(e,t,o,i),t.memoizedState=r.state,s&&uh(t,n,!0),t.child}function C0(e){var t=e.stateNode;t.pendingContext?oh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&oh(e,t.context,!1),jc(e,t.containerInfo)}function Sh(e,t,n,r,s){return yr(),xc(s),t.flags|=256,Te(e,t,n,r),t.child}var su={dehydrated:null,treeContext:null,retryLane:0};function au(e){return{baseLanes:e,cachePool:null,transitions:null}}function P0(e,t,n){var r=t.pendingProps,s=se.current,i=!1,l=(t.flags&128)!==0,o;if((o=l)||(o=e!==null&&e.memoizedState===null?!1:(s&2)!==0),o?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),ee(se,s&1),e===null)return Zo(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=r.children,e=r.fallback,i?(r=t.mode,i=t.child,l={mode:"hidden",children:l},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=l):i=el(l,r,0,null),e=Bn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=au(n),t.memoizedState=su,e):Mc(t,l));if(s=e.memoizedState,s!==null&&(o=s.dehydrated,o!==null))return Ty(e,t,l,r,o,s,n);if(i){i=r.fallback,l=t.mode,s=e.child,o=s.sibling;var u={mode:"hidden",children:r.children};return!(l&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=fn(s,u),r.subtreeFlags=s.subtreeFlags&14680064),o!==null?i=fn(o,i):(i=Bn(i,l,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,l=e.child.memoizedState,l=l===null?au(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},i.memoizedState=l,i.childLanes=e.childLanes&~n,t.memoizedState=su,r}return i=e.child,e=i.sibling,r=fn(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Mc(e,t){return t=el({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Na(e,t,n,r){return r!==null&&xc(r),kr(t,e.child,null,n),e=Mc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ty(e,t,n,r,s,i,l){if(n)return t.flags&256?(t.flags&=-257,r=Wl(Error(D(422))),Na(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=el({mode:"visible",children:r.children},s,0,null),i=Bn(i,s,l,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&kr(t,e.child,null,l),t.child.memoizedState=au(l),t.memoizedState=su,i);if(!(t.mode&1))return Na(e,t,l,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var o=r.dgst;return r=o,i=Error(D(419)),r=Wl(i,r,void 0),Na(e,t,l,r)}if(o=(l&e.childLanes)!==0,Ie||o){if(r=ve,r!==null){switch(l&-l){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|l)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Wt(e,s),bt(r,e,s,-1))}return Ic(),r=Wl(Error(D(421))),Na(e,t,l,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=Uy.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,$e=cn(s.nextSibling),Ge=t,re=!0,pt=null,e!==null&&(et[tt++]=It,et[tt++]=Rt,et[tt++]=Fn,It=e.id,Rt=e.overflow,Fn=t),t=Mc(t,r.children),t.flags|=4096,t)}function Ch(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Qo(e.return,t,n)}function Hl(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function E0(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(Te(e,t,r.children,n),r=se.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ch(e,n,t);else if(e.tag===19)Ch(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ee(se,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&yi(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Hl(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&yi(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Hl(t,!0,n,null,i);break;case"together":Hl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function $a(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ht(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),On|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(D(153));if(t.child!==null){for(e=t.child,n=fn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ay(e,t,n){switch(t.tag){case 3:C0(t),yr();break;case 5:e0(t);break;case 1:Ve(t.type)&&fi(t);break;case 4:jc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;ee(xi,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ee(se,se.current&1),t.flags|=128,null):n&t.child.childLanes?P0(e,t,n):(ee(se,se.current&1),e=Ht(e,t,n),e!==null?e.sibling:null);ee(se,se.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return E0(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ee(se,se.current),r)break;return null;case 22:case 23:return t.lanes=0,N0(e,t,n)}return Ht(e,t,n)}var T0,iu,A0,M0;T0=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};iu=function(){};A0=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Mn(Et.current);var i=null;switch(n){case"input":s=Eo(e,s),r=Eo(e,r),i=[];break;case"select":s=le({},s,{value:void 0}),r=le({},r,{value:void 0}),i=[];break;case"textarea":s=Mo(e,s),r=Mo(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=hi)}Do(n,r);var l;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var o=s[c];for(l in o)o.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Ns.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var u=r[c];if(o=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&u!==o&&(u!=null||o!=null))if(c==="style")if(o){for(l in o)!o.hasOwnProperty(l)||u&&u.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in u)u.hasOwnProperty(l)&&o[l]!==u[l]&&(n||(n={}),n[l]=u[l])}else n||(i||(i=[]),i.push(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,o=o?o.__html:void 0,u!=null&&o!==u&&(i=i||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(i=i||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Ns.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&te("scroll",e),i||o===u||(i=[])):(i=i||[]).push(c,u))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};M0=function(e,t,n,r){n!==r&&(t.flags|=4)};function Zr(e,t){if(!re)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ce(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function My(e,t,n){var r=t.pendingProps;switch(gc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ce(t),null;case 1:return Ve(t.type)&&mi(),Ce(t),null;case 3:return r=t.stateNode,wr(),ne(Fe),ne(Ee),Sc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(wa(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,pt!==null&&(fu(pt),pt=null))),iu(e,t),Ce(t),null;case 5:Nc(t);var s=Mn(zs.current);if(n=t.type,e!==null&&t.stateNode!=null)A0(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(D(166));return Ce(t),null}if(e=Mn(Et.current),wa(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Ct]=t,r[Ls]=i,e=(t.mode&1)!==0,n){case"dialog":te("cancel",r),te("close",r);break;case"iframe":case"object":case"embed":te("load",r);break;case"video":case"audio":for(s=0;s<as.length;s++)te(as[s],r);break;case"source":te("error",r);break;case"img":case"image":case"link":te("error",r),te("load",r);break;case"details":te("toggle",r);break;case"input":Bd(r,i),te("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},te("invalid",r);break;case"textarea":Id(r,i),te("invalid",r)}Do(n,i),s=null;for(var l in i)if(i.hasOwnProperty(l)){var o=i[l];l==="children"?typeof o=="string"?r.textContent!==o&&(i.suppressHydrationWarning!==!0&&ka(r.textContent,o,e),s=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(i.suppressHydrationWarning!==!0&&ka(r.textContent,o,e),s=["children",""+o]):Ns.hasOwnProperty(l)&&o!=null&&l==="onScroll"&&te("scroll",r)}switch(n){case"input":ma(r),zd(r,i,!0);break;case"textarea":ma(r),Rd(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=hi)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=ap(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=l.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[Ct]=t,e[Ls]=r,T0(e,t,!1,!1),t.stateNode=e;e:{switch(l=Lo(n,r),n){case"dialog":te("cancel",e),te("close",e),s=r;break;case"iframe":case"object":case"embed":te("load",e),s=r;break;case"video":case"audio":for(s=0;s<as.length;s++)te(as[s],e);s=r;break;case"source":te("error",e),s=r;break;case"img":case"image":case"link":te("error",e),te("load",e),s=r;break;case"details":te("toggle",e),s=r;break;case"input":Bd(e,r),s=Eo(e,r),te("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=le({},r,{value:void 0}),te("invalid",e);break;case"textarea":Id(e,r),s=Mo(e,r),te("invalid",e);break;default:s=r}Do(n,s),o=s;for(i in o)if(o.hasOwnProperty(i)){var u=o[i];i==="style"?op(e,u):i==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&ip(e,u)):i==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&Ss(e,u):typeof u=="number"&&Ss(e,""+u):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ns.hasOwnProperty(i)?u!=null&&i==="onScroll"&&te("scroll",e):u!=null&&tc(e,i,u,l))}switch(n){case"input":ma(e),zd(e,r,!1);break;case"textarea":ma(e),Rd(e);break;case"option":r.value!=null&&e.setAttribute("value",""+gn(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?hr(e,!!r.multiple,i,!1):r.defaultValue!=null&&hr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=hi)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ce(t),null;case 6:if(e&&t.stateNode!=null)M0(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(D(166));if(n=Mn(zs.current),Mn(Et.current),wa(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ct]=t,(i=r.nodeValue!==n)&&(e=Ge,e!==null))switch(e.tag){case 3:ka(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ka(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ct]=t,t.stateNode=r}return Ce(t),null;case 13:if(ne(se),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(re&&$e!==null&&t.mode&1&&!(t.flags&128))Yp(),yr(),t.flags|=98560,i=!1;else if(i=wa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(D(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(D(317));i[Ct]=t}else yr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ce(t),i=!1}else pt!==null&&(fu(pt),pt=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||se.current&1?pe===0&&(pe=3):Ic())),t.updateQueue!==null&&(t.flags|=4),Ce(t),null);case 4:return wr(),iu(e,t),e===null&&_s(t.stateNode.containerInfo),Ce(t),null;case 10:return yc(t.type._context),Ce(t),null;case 17:return Ve(t.type)&&mi(),Ce(t),null;case 19:if(ne(se),i=t.memoizedState,i===null)return Ce(t),null;if(r=(t.flags&128)!==0,l=i.rendering,l===null)if(r)Zr(i,!1);else{if(pe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=yi(e),l!==null){for(t.flags|=128,Zr(i,!1),r=l.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,l=i.alternate,l===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=l.childLanes,i.lanes=l.lanes,i.child=l.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=l.memoizedProps,i.memoizedState=l.memoizedState,i.updateQueue=l.updateQueue,i.type=l.type,e=l.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ee(se,se.current&1|2),t.child}e=e.sibling}i.tail!==null&&ce()>Nr&&(t.flags|=128,r=!0,Zr(i,!1),t.lanes=4194304)}else{if(!r)if(e=yi(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Zr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!re)return Ce(t),null}else 2*ce()-i.renderingStartTime>Nr&&n!==1073741824&&(t.flags|=128,r=!0,Zr(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ce(),t.sibling=null,n=se.current,ee(se,r?n&1|2:n&1),t):(Ce(t),null);case 22:case 23:return zc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?He&1073741824&&(Ce(t),t.subtreeFlags&6&&(t.flags|=8192)):Ce(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function _y(e,t){switch(gc(t),t.tag){case 1:return Ve(t.type)&&mi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wr(),ne(Fe),ne(Ee),Sc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Nc(t),null;case 13:if(ne(se),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));yr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ne(se),null;case 4:return wr(),null;case 10:return yc(t.type._context),null;case 22:case 23:return zc(),null;case 24:return null;default:return null}}var Sa=!1,Pe=!1,Dy=typeof WeakSet=="function"?WeakSet:Set,B=null;function ir(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ue(e,t,r)}else n.current=null}function lu(e,t,n){try{n()}catch(r){ue(e,t,r)}}var Ph=!1;function Ly(e,t){if(Ho=ui,e=zp(),fc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,o=-1,u=-1,c=0,d=0,h=e,m=null;t:for(;;){for(var f;h!==n||s!==0&&h.nodeType!==3||(o=l+s),h!==i||r!==0&&h.nodeType!==3||(u=l+r),h.nodeType===3&&(l+=h.nodeValue.length),(f=h.firstChild)!==null;)m=h,h=f;for(;;){if(h===e)break t;if(m===n&&++c===s&&(o=l),m===i&&++d===r&&(u=l),(f=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=f}n=o===-1||u===-1?null:{start:o,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for($o={focusedElem:e,selectionRange:n},ui=!1,B=t;B!==null;)if(t=B,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,B=e;else for(;B!==null;){t=B;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var y=b.memoizedProps,k=b.memoizedState,x=t.stateNode,p=x.getSnapshotBeforeUpdate(t.elementType===t.type?y:mt(t.type,y),k);x.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(w){ue(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,B=e;break}B=t.return}return b=Ph,Ph=!1,b}function fs(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&lu(t,n,i)}s=s.next}while(s!==r)}}function Qi(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 ou(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 _0(e){var t=e.alternate;t!==null&&(e.alternate=null,_0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ct],delete t[Ls],delete t[qo],delete t[gy],delete t[xy])),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 D0(e){return e.tag===5||e.tag===3||e.tag===4}function Eh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||D0(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 uu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=hi));else if(r!==4&&(e=e.child,e!==null))for(uu(e,t,n),e=e.sibling;e!==null;)uu(e,t,n),e=e.sibling}function cu(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(cu(e,t,n),e=e.sibling;e!==null;)cu(e,t,n),e=e.sibling}var ke=null,ft=!1;function qt(e,t,n){for(n=n.child;n!==null;)L0(e,t,n),n=n.sibling}function L0(e,t,n){if(Pt&&typeof Pt.onCommitFiberUnmount=="function")try{Pt.onCommitFiberUnmount(Hi,n)}catch{}switch(n.tag){case 5:Pe||ir(n,t);case 6:var r=ke,s=ft;ke=null,qt(e,t,n),ke=r,ft=s,ke!==null&&(ft?(e=ke,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ke.removeChild(n.stateNode));break;case 18:ke!==null&&(ft?(e=ke,n=n.stateNode,e.nodeType===8?Il(e.parentNode,n):e.nodeType===1&&Il(e,n),Ts(e)):Il(ke,n.stateNode));break;case 4:r=ke,s=ft,ke=n.stateNode.containerInfo,ft=!0,qt(e,t,n),ke=r,ft=s;break;case 0:case 11:case 14:case 15:if(!Pe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&lu(n,t,l),s=s.next}while(s!==r)}qt(e,t,n);break;case 1:if(!Pe&&(ir(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){ue(n,t,o)}qt(e,t,n);break;case 21:qt(e,t,n);break;case 22:n.mode&1?(Pe=(r=Pe)||n.memoizedState!==null,qt(e,t,n),Pe=r):qt(e,t,n);break;default:qt(e,t,n)}}function Th(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Dy),t.forEach(function(r){var s=Wy.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function ct(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,l=t,o=l;e:for(;o!==null;){switch(o.tag){case 5:ke=o.stateNode,ft=!1;break e;case 3:ke=o.stateNode.containerInfo,ft=!0;break e;case 4:ke=o.stateNode.containerInfo,ft=!0;break e}o=o.return}if(ke===null)throw Error(D(160));L0(i,l,s),ke=null,ft=!1;var u=s.alternate;u!==null&&(u.return=null),s.return=null}catch(c){ue(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)B0(t,e),t=t.sibling}function B0(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ct(t,e),wt(e),r&4){try{fs(3,e,e.return),Qi(3,e)}catch(y){ue(e,e.return,y)}try{fs(5,e,e.return)}catch(y){ue(e,e.return,y)}}break;case 1:ct(t,e),wt(e),r&512&&n!==null&&ir(n,n.return);break;case 5:if(ct(t,e),wt(e),r&512&&n!==null&&ir(n,n.return),e.flags&32){var s=e.stateNode;try{Ss(s,"")}catch(y){ue(e,e.return,y)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,l=n!==null?n.memoizedProps:i,o=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{o==="input"&&i.type==="radio"&&i.name!=null&&rp(s,i),Lo(o,l);var c=Lo(o,i);for(l=0;l<u.length;l+=2){var d=u[l],h=u[l+1];d==="style"?op(s,h):d==="dangerouslySetInnerHTML"?ip(s,h):d==="children"?Ss(s,h):tc(s,d,h,c)}switch(o){case"input":To(s,i);break;case"textarea":sp(s,i);break;case"select":var m=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?hr(s,!!i.multiple,f,!1):m!==!!i.multiple&&(i.defaultValue!=null?hr(s,!!i.multiple,i.defaultValue,!0):hr(s,!!i.multiple,i.multiple?[]:"",!1))}s[Ls]=i}catch(y){ue(e,e.return,y)}}break;case 6:if(ct(t,e),wt(e),r&4){if(e.stateNode===null)throw Error(D(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(y){ue(e,e.return,y)}}break;case 3:if(ct(t,e),wt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ts(t.containerInfo)}catch(y){ue(e,e.return,y)}break;case 4:ct(t,e),wt(e);break;case 13:ct(t,e),wt(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Lc=ce())),r&4&&Th(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Pe=(c=Pe)||d,ct(t,e),Pe=c):ct(t,e),wt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(B=e,d=e.child;d!==null;){for(h=B=d;B!==null;){switch(m=B,f=m.child,m.tag){case 0:case 11:case 14:case 15:fs(4,m,m.return);break;case 1:ir(m,m.return);var b=m.stateNode;if(typeof b.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,b.props=t.memoizedProps,b.state=t.memoizedState,b.componentWillUnmount()}catch(y){ue(r,n,y)}}break;case 5:ir(m,m.return);break;case 22:if(m.memoizedState!==null){Mh(h);continue}}f!==null?(f.return=m,B=f):Mh(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(o=h.stateNode,u=h.memoizedProps.style,l=u!=null&&u.hasOwnProperty("display")?u.display:null,o.style.display=lp("display",l))}catch(y){ue(e,e.return,y)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(y){ue(e,e.return,y)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:ct(t,e),wt(e),r&4&&Th(e);break;case 21:break;default:ct(t,e),wt(e)}}function wt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(D0(n)){var r=n;break e}n=n.return}throw Error(D(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Ss(s,""),r.flags&=-33);var i=Eh(e);cu(e,i,s);break;case 3:case 4:var l=r.stateNode.containerInfo,o=Eh(e);uu(e,o,l);break;default:throw Error(D(161))}}catch(u){ue(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function By(e,t,n){B=e,z0(e)}function z0(e,t,n){for(var r=(e.mode&1)!==0;B!==null;){var s=B,i=s.child;if(s.tag===22&&r){var l=s.memoizedState!==null||Sa;if(!l){var o=s.alternate,u=o!==null&&o.memoizedState!==null||Pe;o=Sa;var c=Pe;if(Sa=l,(Pe=u)&&!c)for(B=s;B!==null;)l=B,u=l.child,l.tag===22&&l.memoizedState!==null?_h(s):u!==null?(u.return=l,B=u):_h(s);for(;i!==null;)B=i,z0(i),i=i.sibling;B=s,Sa=o,Pe=c}Ah(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,B=i):Ah(e)}}function Ah(e){for(;B!==null;){var t=B;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Pe||Qi(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Pe)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:mt(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&fh(t,i,r);break;case 3:var l=t.updateQueue;if(l!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}fh(t,l,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&Ts(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(D(163))}Pe||t.flags&512&&ou(t)}catch(m){ue(t,t.return,m)}}if(t===e){B=null;break}if(n=t.sibling,n!==null){n.return=t.return,B=n;break}B=t.return}}function Mh(e){for(;B!==null;){var t=B;if(t===e){B=null;break}var n=t.sibling;if(n!==null){n.return=t.return,B=n;break}B=t.return}}function _h(e){for(;B!==null;){var t=B;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Qi(4,t)}catch(u){ue(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(u){ue(t,s,u)}}var i=t.return;try{ou(t)}catch(u){ue(t,i,u)}break;case 5:var l=t.return;try{ou(t)}catch(u){ue(t,l,u)}}}catch(u){ue(t,t.return,u)}if(t===e){B=null;break}var o=t.sibling;if(o!==null){o.return=t.return,B=o;break}B=t.return}}var zy=Math.ceil,ji=$t.ReactCurrentDispatcher,_c=$t.ReactCurrentOwner,st=$t.ReactCurrentBatchConfig,q=0,ve=null,he=null,we=0,He=0,lr=kn(0),pe=0,Vs=null,On=0,Ji=0,Dc=0,ps=null,ze=null,Lc=0,Nr=1/0,Bt=null,Ni=!1,du=null,hn=null,Ca=!1,nn=null,Si=0,gs=0,hu=null,Ga=-1,Ka=0;function _e(){return q&6?ce():Ga!==-1?Ga:Ga=ce()}function mn(e){return e.mode&1?q&2&&we!==0?we&-we:vy.transition!==null?(Ka===0&&(Ka=yp()),Ka):(e=Z,e!==0||(e=window.event,e=e===void 0?16:Pp(e.type)),e):1}function bt(e,t,n,r){if(50<gs)throw gs=0,hu=null,Error(D(185));Xs(e,n,r),(!(q&2)||e!==ve)&&(e===ve&&(!(q&2)&&(Ji|=n),pe===4&&en(e,we)),Oe(e,r),n===1&&q===0&&!(t.mode&1)&&(Nr=ce()+500,Yi&&wn()))}function Oe(e,t){var n=e.callbackNode;vv(e,t);var r=oi(e,e===ve?we:0);if(r===0)n!==null&&Od(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Od(n),t===1)e.tag===0?by(Dh.bind(null,e)):Gp(Dh.bind(null,e)),fy(function(){!(q&6)&&wn()}),n=null;else{switch(kp(r)){case 1:n=ic;break;case 4:n=bp;break;case 16:n=li;break;case 536870912:n=vp;break;default:n=li}n=H0(n,I0.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function I0(e,t){if(Ga=-1,Ka=0,q&6)throw Error(D(327));var n=e.callbackNode;if(xr()&&e.callbackNode!==n)return null;var r=oi(e,e===ve?we:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ci(e,r);else{t=r;var s=q;q|=2;var i=F0();(ve!==e||we!==t)&&(Bt=null,Nr=ce()+500,Ln(e,t));do try{Fy();break}catch(o){R0(e,o)}while(!0);vc(),ji.current=i,q=s,he!==null?t=0:(ve=null,we=0,t=pe)}if(t!==0){if(t===2&&(s=Fo(e),s!==0&&(r=s,t=mu(e,s))),t===1)throw n=Vs,Ln(e,0),en(e,r),Oe(e,ce()),n;if(t===6)en(e,r);else{if(s=e.current.alternate,!(r&30)&&!Iy(s)&&(t=Ci(e,r),t===2&&(i=Fo(e),i!==0&&(r=i,t=mu(e,i))),t===1))throw n=Vs,Ln(e,0),en(e,r),Oe(e,ce()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(D(345));case 2:Pn(e,ze,Bt);break;case 3:if(en(e,r),(r&130023424)===r&&(t=Lc+500-ce(),10<t)){if(oi(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){_e(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Ko(Pn.bind(null,e,ze,Bt),t);break}Pn(e,ze,Bt);break;case 4:if(en(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var l=31-xt(r);i=1<<l,l=t[l],l>s&&(s=l),r&=~i}if(r=s,r=ce()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*zy(r/1960))-r,10<r){e.timeoutHandle=Ko(Pn.bind(null,e,ze,Bt),r);break}Pn(e,ze,Bt);break;case 5:Pn(e,ze,Bt);break;default:throw Error(D(329))}}}return Oe(e,ce()),e.callbackNode===n?I0.bind(null,e):null}function mu(e,t){var n=ps;return e.current.memoizedState.isDehydrated&&(Ln(e,t).flags|=256),e=Ci(e,t),e!==2&&(t=ze,ze=n,t!==null&&fu(t)),e}function fu(e){ze===null?ze=e:ze.push.apply(ze,e)}function Iy(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!yt(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function en(e,t){for(t&=~Dc,t&=~Ji,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-xt(t),r=1<<n;e[n]=-1,t&=~r}}function Dh(e){if(q&6)throw Error(D(327));xr();var t=oi(e,0);if(!(t&1))return Oe(e,ce()),null;var n=Ci(e,t);if(e.tag!==0&&n===2){var r=Fo(e);r!==0&&(t=r,n=mu(e,r))}if(n===1)throw n=Vs,Ln(e,0),en(e,t),Oe(e,ce()),n;if(n===6)throw Error(D(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Pn(e,ze,Bt),Oe(e,ce()),null}function Bc(e,t){var n=q;q|=1;try{return e(t)}finally{q=n,q===0&&(Nr=ce()+500,Yi&&wn())}}function Un(e){nn!==null&&nn.tag===0&&!(q&6)&&xr();var t=q;q|=1;var n=st.transition,r=Z;try{if(st.transition=null,Z=1,e)return e()}finally{Z=r,st.transition=n,q=t,!(q&6)&&wn()}}function zc(){He=lr.current,ne(lr)}function Ln(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,my(n)),he!==null)for(n=he.return;n!==null;){var r=n;switch(gc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&mi();break;case 3:wr(),ne(Fe),ne(Ee),Sc();break;case 5:Nc(r);break;case 4:wr();break;case 13:ne(se);break;case 19:ne(se);break;case 10:yc(r.type._context);break;case 22:case 23:zc()}n=n.return}if(ve=e,he=e=fn(e.current,null),we=He=t,pe=0,Vs=null,Dc=Ji=On=0,ze=ps=null,An!==null){for(t=0;t<An.length;t++)if(n=An[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var l=i.next;i.next=s,r.next=l}n.pending=r}An=null}return e}function R0(e,t){do{var n=he;try{if(vc(),Wa.current=wi,ki){for(var r=ae.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}ki=!1}if(Vn=0,be=fe=ae=null,ms=!1,Is=0,_c.current=null,n===null||n.return===null){pe=1,Vs=t,he=null;break}e:{var i=e,l=n.return,o=n,u=t;if(t=we,o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,d=o,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var m=d.alternate;m?(d.updateQueue=m.updateQueue,d.memoizedState=m.memoizedState,d.lanes=m.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=yh(l);if(f!==null){f.flags&=-257,kh(f,l,o,i,t),f.mode&1&&vh(i,c,t),t=f,u=c;var b=t.updateQueue;if(b===null){var y=new Set;y.add(u),t.updateQueue=y}else b.add(u);break e}else{if(!(t&1)){vh(i,c,t),Ic();break e}u=Error(D(426))}}else if(re&&o.mode&1){var k=yh(l);if(k!==null){!(k.flags&65536)&&(k.flags|=256),kh(k,l,o,i,t),xc(jr(u,o));break e}}i=u=jr(u,o),pe!==4&&(pe=2),ps===null?ps=[i]:ps.push(i),i=l;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var x=k0(i,u,t);mh(i,x);break e;case 1:o=u;var p=i.type,v=i.stateNode;if(!(i.flags&128)&&(typeof p.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(hn===null||!hn.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t;var w=w0(i,o,t);mh(i,w);break e}}i=i.return}while(i!==null)}O0(n)}catch(j){t=j,he===n&&n!==null&&(he=n=n.return);continue}break}while(!0)}function F0(){var e=ji.current;return ji.current=wi,e===null?wi:e}function Ic(){(pe===0||pe===3||pe===2)&&(pe=4),ve===null||!(On&268435455)&&!(Ji&268435455)||en(ve,we)}function Ci(e,t){var n=q;q|=2;var r=F0();(ve!==e||we!==t)&&(Bt=null,Ln(e,t));do try{Ry();break}catch(s){R0(e,s)}while(!0);if(vc(),q=n,ji.current=r,he!==null)throw Error(D(261));return ve=null,we=0,pe}function Ry(){for(;he!==null;)V0(he)}function Fy(){for(;he!==null&&!cv();)V0(he)}function V0(e){var t=W0(e.alternate,e,He);e.memoizedProps=e.pendingProps,t===null?O0(e):he=t,_c.current=null}function O0(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=_y(n,t),n!==null){n.flags&=32767,he=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{pe=6,he=null;return}}else if(n=My(n,t,He),n!==null){he=n;return}if(t=t.sibling,t!==null){he=t;return}he=t=e}while(t!==null);pe===0&&(pe=5)}function Pn(e,t,n){var r=Z,s=st.transition;try{st.transition=null,Z=1,Vy(e,t,n,r)}finally{st.transition=s,Z=r}return null}function Vy(e,t,n,r){do xr();while(nn!==null);if(q&6)throw Error(D(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(D(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(yv(e,i),e===ve&&(he=ve=null,we=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ca||(Ca=!0,H0(li,function(){return xr(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=st.transition,st.transition=null;var l=Z;Z=1;var o=q;q|=4,_c.current=null,Ly(e,n),B0(n,e),iy($o),ui=!!Ho,$o=Ho=null,e.current=n,By(n),dv(),q=o,Z=l,st.transition=i}else e.current=n;if(Ca&&(Ca=!1,nn=e,Si=s),i=e.pendingLanes,i===0&&(hn=null),fv(n.stateNode),Oe(e,ce()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Ni)throw Ni=!1,e=du,du=null,e;return Si&1&&e.tag!==0&&xr(),i=e.pendingLanes,i&1?e===hu?gs++:(gs=0,hu=e):gs=0,wn(),null}function xr(){if(nn!==null){var e=kp(Si),t=st.transition,n=Z;try{if(st.transition=null,Z=16>e?16:e,nn===null)var r=!1;else{if(e=nn,nn=null,Si=0,q&6)throw Error(D(331));var s=q;for(q|=4,B=e.current;B!==null;){var i=B,l=i.child;if(B.flags&16){var o=i.deletions;if(o!==null){for(var u=0;u<o.length;u++){var c=o[u];for(B=c;B!==null;){var d=B;switch(d.tag){case 0:case 11:case 15:fs(8,d,i)}var h=d.child;if(h!==null)h.return=d,B=h;else for(;B!==null;){d=B;var m=d.sibling,f=d.return;if(_0(d),d===c){B=null;break}if(m!==null){m.return=f,B=m;break}B=f}}}var b=i.alternate;if(b!==null){var y=b.child;if(y!==null){b.child=null;do{var k=y.sibling;y.sibling=null,y=k}while(y!==null)}}B=i}}if(i.subtreeFlags&2064&&l!==null)l.return=i,B=l;else e:for(;B!==null;){if(i=B,i.flags&2048)switch(i.tag){case 0:case 11:case 15:fs(9,i,i.return)}var x=i.sibling;if(x!==null){x.return=i.return,B=x;break e}B=i.return}}var p=e.current;for(B=p;B!==null;){l=B;var v=l.child;if(l.subtreeFlags&2064&&v!==null)v.return=l,B=v;else e:for(l=p;B!==null;){if(o=B,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:Qi(9,o)}}catch(j){ue(o,o.return,j)}if(o===l){B=null;break e}var w=o.sibling;if(w!==null){w.return=o.return,B=w;break e}B=o.return}}if(q=s,wn(),Pt&&typeof Pt.onPostCommitFiberRoot=="function")try{Pt.onPostCommitFiberRoot(Hi,e)}catch{}r=!0}return r}finally{Z=n,st.transition=t}}return!1}function Lh(e,t,n){t=jr(n,t),t=k0(e,t,1),e=dn(e,t,1),t=_e(),e!==null&&(Xs(e,1,t),Oe(e,t))}function ue(e,t,n){if(e.tag===3)Lh(e,e,n);else for(;t!==null;){if(t.tag===3){Lh(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(hn===null||!hn.has(r))){e=jr(n,e),e=w0(t,e,1),t=dn(t,e,1),e=_e(),t!==null&&(Xs(t,1,e),Oe(t,e));break}}t=t.return}}function Oy(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=_e(),e.pingedLanes|=e.suspendedLanes&n,ve===e&&(we&n)===n&&(pe===4||pe===3&&(we&130023424)===we&&500>ce()-Lc?Ln(e,0):Dc|=n),Oe(e,t)}function U0(e,t){t===0&&(e.mode&1?(t=ga,ga<<=1,!(ga&130023424)&&(ga=4194304)):t=1);var n=_e();e=Wt(e,t),e!==null&&(Xs(e,t,n),Oe(e,n))}function Uy(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),U0(e,n)}function Wy(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(D(314))}r!==null&&r.delete(t),U0(e,n)}var W0;W0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Fe.current)Ie=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ie=!1,Ay(e,t,n);Ie=!!(e.flags&131072)}else Ie=!1,re&&t.flags&1048576&&Kp(t,gi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;$a(e,t),e=t.pendingProps;var s=vr(t,Ee.current);gr(t,n),s=Pc(null,t,r,e,s,n);var i=Ec();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ve(r)?(i=!0,fi(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,wc(t),s.updater=Zi,t.stateNode=s,s._reactInternals=t,eu(t,r,e,n),t=ru(null,t,r,!0,i,n)):(t.tag=0,re&&i&&pc(t),Te(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch($a(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=$y(r),e=mt(r,e),s){case 0:t=nu(null,t,r,e,n);break e;case 1:t=Nh(null,t,r,e,n);break e;case 11:t=wh(null,t,r,e,n);break e;case 14:t=jh(null,t,r,mt(r.type,e),n);break e}throw Error(D(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:mt(r,s),nu(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:mt(r,s),Nh(e,t,r,s,n);case 3:e:{if(C0(t),e===null)throw Error(D(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Jp(e,t),vi(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=jr(Error(D(423)),t),t=Sh(e,t,r,n,s);break e}else if(r!==s){s=jr(Error(D(424)),t),t=Sh(e,t,r,n,s);break e}else for($e=cn(t.stateNode.containerInfo.firstChild),Ge=t,re=!0,pt=null,n=Zp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(yr(),r===s){t=Ht(e,t,n);break e}Te(e,t,r,n)}t=t.child}return t;case 5:return e0(t),e===null&&Zo(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,l=s.children,Go(r,s)?l=null:i!==null&&Go(r,i)&&(t.flags|=32),S0(e,t),Te(e,t,l,n),t.child;case 6:return e===null&&Zo(t),null;case 13:return P0(e,t,n);case 4:return jc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=kr(t,null,r,n):Te(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:mt(r,s),wh(e,t,r,s,n);case 7:return Te(e,t,t.pendingProps,n),t.child;case 8:return Te(e,t,t.pendingProps.children,n),t.child;case 12:return Te(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,l=s.value,ee(xi,r._currentValue),r._currentValue=l,i!==null)if(yt(i.value,l)){if(i.children===s.children&&!Fe.current){t=Ht(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var o=i.dependencies;if(o!==null){l=i.child;for(var u=o.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=Vt(-1,n&-n),u.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),Qo(i.return,n,t),o.lanes|=n;break}u=u.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(D(341));l.lanes|=n,o=l.alternate,o!==null&&(o.lanes|=n),Qo(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}Te(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,gr(t,n),s=at(s),r=r(s),t.flags|=1,Te(e,t,r,n),t.child;case 14:return r=t.type,s=mt(r,t.pendingProps),s=mt(r.type,s),jh(e,t,r,s,n);case 15:return j0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:mt(r,s),$a(e,t),t.tag=1,Ve(r)?(e=!0,fi(t)):e=!1,gr(t,n),y0(t,r,s),eu(t,r,s,n),ru(null,t,r,!0,e,n);case 19:return E0(e,t,n);case 22:return N0(e,t,n)}throw Error(D(156,t.tag))};function H0(e,t){return xp(e,t)}function Hy(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 nt(e,t,n,r){return new Hy(e,t,n,r)}function Rc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $y(e){if(typeof e=="function")return Rc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===rc)return 11;if(e===sc)return 14}return 2}function fn(e,t){var n=e.alternate;return n===null?(n=nt(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 qa(e,t,n,r,s,i){var l=2;if(r=e,typeof e=="function")Rc(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Zn:return Bn(n.children,s,i,t);case nc:l=8,s|=8;break;case No:return e=nt(12,n,t,s|2),e.elementType=No,e.lanes=i,e;case So:return e=nt(13,n,t,s),e.elementType=So,e.lanes=i,e;case Co:return e=nt(19,n,t,s),e.elementType=Co,e.lanes=i,e;case ep:return el(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Qf:l=10;break e;case Jf:l=9;break e;case rc:l=11;break e;case sc:l=14;break e;case Xt:l=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=nt(l,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function Bn(e,t,n,r){return e=nt(7,e,r,t),e.lanes=n,e}function el(e,t,n,r){return e=nt(22,e,r,t),e.elementType=ep,e.lanes=n,e.stateNode={isHidden:!1},e}function $l(e,t,n){return e=nt(6,e,null,t),e.lanes=n,e}function Gl(e,t,n){return t=nt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Gy(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Cl(0),this.expirationTimes=Cl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cl(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Fc(e,t,n,r,s,i,l,o,u){return e=new Gy(e,t,n,o,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=nt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},wc(i),e}function Ky(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Xn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function $0(e){if(!e)return xn;e=e._reactInternals;e:{if(Hn(e)!==e||e.tag!==1)throw Error(D(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ve(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(D(171))}if(e.tag===1){var n=e.type;if(Ve(n))return $p(e,n,t)}return t}function G0(e,t,n,r,s,i,l,o,u){return e=Fc(n,r,!0,e,s,i,l,o,u),e.context=$0(null),n=e.current,r=_e(),s=mn(n),i=Vt(r,s),i.callback=t??null,dn(n,i,s),e.current.lanes=s,Xs(e,s,r),Oe(e,r),e}function tl(e,t,n,r){var s=t.current,i=_e(),l=mn(s);return n=$0(n),t.context===null?t.context=n:t.pendingContext=n,t=Vt(i,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=dn(s,t,l),e!==null&&(bt(e,s,l,i),Ua(e,s,l)),l}function Pi(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Bh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Vc(e,t){Bh(e,t),(e=e.alternate)&&Bh(e,t)}function qy(){return null}var K0=typeof reportError=="function"?reportError:function(e){console.error(e)};function Oc(e){this._internalRoot=e}nl.prototype.render=Oc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(D(409));tl(e,t,null,null)};nl.prototype.unmount=Oc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Un(function(){tl(null,e,null,null)}),t[Ut]=null}};function nl(e){this._internalRoot=e}nl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Np();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Jt.length&&t!==0&&t<Jt[n].priority;n++);Jt.splice(n,0,e),n===0&&Cp(e)}};function Uc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function rl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function zh(){}function Yy(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var c=Pi(l);i.call(c)}}var l=G0(t,r,e,0,null,!1,!1,"",zh);return e._reactRootContainer=l,e[Ut]=l.current,_s(e.nodeType===8?e.parentNode:e),Un(),l}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var o=r;r=function(){var c=Pi(u);o.call(c)}}var u=Fc(e,0,!1,null,null,!1,!1,"",zh);return e._reactRootContainer=u,e[Ut]=u.current,_s(e.nodeType===8?e.parentNode:e),Un(function(){tl(t,u,n,r)}),u}function sl(e,t,n,r,s){var i=n._reactRootContainer;if(i){var l=i;if(typeof s=="function"){var o=s;s=function(){var u=Pi(l);o.call(u)}}tl(t,l,e,s)}else l=Yy(n,t,e,s,r);return Pi(l)}wp=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ss(t.pendingLanes);n!==0&&(lc(t,n|1),Oe(t,ce()),!(q&6)&&(Nr=ce()+500,wn()))}break;case 13:Un(function(){var r=Wt(e,1);if(r!==null){var s=_e();bt(r,e,1,s)}}),Vc(e,1)}};oc=function(e){if(e.tag===13){var t=Wt(e,134217728);if(t!==null){var n=_e();bt(t,e,134217728,n)}Vc(e,134217728)}};jp=function(e){if(e.tag===13){var t=mn(e),n=Wt(e,t);if(n!==null){var r=_e();bt(n,e,t,r)}Vc(e,t)}};Np=function(){return Z};Sp=function(e,t){var n=Z;try{return Z=e,t()}finally{Z=n}};zo=function(e,t,n){switch(t){case"input":if(To(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=qi(r);if(!s)throw Error(D(90));np(r),To(r,s)}}}break;case"textarea":sp(e,n);break;case"select":t=n.value,t!=null&&hr(e,!!n.multiple,t,!1)}};dp=Bc;hp=Un;var Xy={usingClientEntryPoint:!1,Events:[Qs,tr,qi,up,cp,Bc]},Qr={findFiberByHostInstance:Tn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Zy={bundleType:Qr.bundleType,version:Qr.version,rendererPackageName:Qr.rendererPackageName,rendererConfig:Qr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:$t.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=pp(e),e===null?null:e.stateNode},findFiberByHostInstance:Qr.findFiberByHostInstance||qy,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pa.isDisabled&&Pa.supportsFiber)try{Hi=Pa.inject(Zy),Pt=Pa}catch{}}Ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xy;Ye.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Uc(t))throw Error(D(200));return Ky(e,t,null,n)};Ye.createRoot=function(e,t){if(!Uc(e))throw Error(D(299));var n=!1,r="",s=K0;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Fc(e,1,!1,null,null,n,!1,r,s),e[Ut]=t.current,_s(e.nodeType===8?e.parentNode:e),new Oc(t)};Ye.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(D(188)):(e=Object.keys(e).join(","),Error(D(268,e)));return e=pp(t),e=e===null?null:e.stateNode,e};Ye.flushSync=function(e){return Un(e)};Ye.hydrate=function(e,t,n){if(!rl(t))throw Error(D(200));return sl(null,e,t,!0,n)};Ye.hydrateRoot=function(e,t,n){if(!Uc(e))throw Error(D(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",l=K0;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),t=G0(t,null,e,1,n??null,s,!1,i,l),e[Ut]=t.current,_s(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new nl(t)};Ye.render=function(e,t,n){if(!rl(t))throw Error(D(200));return sl(null,e,t,!1,n)};Ye.unmountComponentAtNode=function(e){if(!rl(e))throw Error(D(40));return e._reactRootContainer?(Un(function(){sl(null,null,e,!1,function(){e._reactRootContainer=null,e[Ut]=null})}),!0):!1};Ye.unstable_batchedUpdates=Bc;Ye.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!rl(n))throw Error(D(200));if(e==null||e._reactInternals===void 0)throw Error(D(38));return sl(e,t,n,!1,r)};Ye.version="18.3.1-next-f1338f8080-20240426";function q0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(q0)}catch(e){console.error(e)}}q0(),qf.exports=Ye;var Wc=qf.exports,Ih=Wc;wo.createRoot=Ih.createRoot,wo.hydrateRoot=Ih.hydrateRoot;/**
* @remix-run/router v1.23.3
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Os(){return Os=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Os.apply(null,arguments)}var rn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(rn||(rn={}));const Rh="popstate";function Qy(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:l,hash:o}=r.location;return pu("",{pathname:i,search:l,hash:o},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Ei(s)}return ek(t,n,null,e)}function ie(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Hc(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Jy(){return Math.random().toString(36).substr(2,8)}function Fh(e,t){return{usr:e.state,key:e.key,idx:t}}function pu(e,t,n,r){return n===void 0&&(n=null),Os({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Br(t):t,{state:n,key:t&&t.key||r||Jy()})}function Ei(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Br(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function ek(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,l=s.history,o=rn.Pop,u=null,c=d();c==null&&(c=0,l.replaceState(Os({},l.state,{idx:c}),""));function d(){return(l.state||{idx:null}).idx}function h(){o=rn.Pop;let k=d(),x=k==null?null:k-c;c=k,u&&u({action:o,location:y.location,delta:x})}function m(k,x){o=rn.Push;let p=pu(y.location,k,x);c=d()+1;let v=Fh(p,c),w=y.createHref(p);try{l.pushState(v,"",w)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;s.location.assign(w)}i&&u&&u({action:o,location:y.location,delta:1})}function f(k,x){o=rn.Replace;let p=pu(y.location,k,x);c=d();let v=Fh(p,c),w=y.createHref(p);l.replaceState(v,"",w),i&&u&&u({action:o,location:y.location,delta:0})}function b(k){let x=s.location.origin!=="null"?s.location.origin:s.location.href,p=typeof k=="string"?k:Ei(k);return p=p.replace(/ $/,"%20"),ie(x,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,x)}let y={get action(){return o},get location(){return e(s,l)},listen(k){if(u)throw new Error("A history only accepts one active listener");return s.addEventListener(Rh,h),u=k,()=>{s.removeEventListener(Rh,h),u=null}},createHref(k){return t(s,k)},createURL:b,encodeLocation(k){let x=b(k);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:m,replace:f,go(k){return l.go(k)}};return y}var Vh;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Vh||(Vh={}));function tk(e,t,n){return n===void 0&&(n="/"),nk(e,t,n)}function nk(e,t,n,r){let s=typeof t=="string"?Br(t):t,i=Sr(s.pathname||"/",n);if(i==null)return null;let l=Y0(e);rk(l);let o=null,u=fk(i);for(let c=0;o==null&&c<l.length;++c)o=hk(l[c],u);return o}function Y0(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,l,o)=>{let u={relativePath:o===void 0?i.path||"":o,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};u.relativePath.startsWith("/")&&(ie(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let c=pn([r,u.relativePath]),d=n.concat(u);i.children&&i.children.length>0&&(ie(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Y0(i.children,t,d,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:ck(c,i.index),routesMeta:d})};return e.forEach((i,l)=>{var o;if(i.path===""||!((o=i.path)!=null&&o.includes("?")))s(i,l);else for(let u of X0(i.path))s(i,l,u)}),t}function X0(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let l=X0(r.join("/")),o=[];return o.push(...l.map(u=>u===""?i:[i,u].join("/"))),s&&o.push(...l),o.map(u=>e.startsWith("/")&&u===""?"/":u)}function rk(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:dk(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const sk=/^:[\w-]+$/,ak=3,ik=2,lk=1,ok=10,uk=-2,Oh=e=>e==="*";function ck(e,t){let n=e.split("/"),r=n.length;return n.some(Oh)&&(r+=uk),t&&(r+=ik),n.filter(s=>!Oh(s)).reduce((s,i)=>s+(sk.test(i)?ak:i===""?lk:ok),r)}function dk(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function hk(e,t,n){let{routesMeta:r}=e,s={},i="/",l=[];for(let o=0;o<r.length;++o){let u=r[o],c=o===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",h=gu({path:u.relativePath,caseSensitive:u.caseSensitive,end:c},d),m=u.route;if(!h)return null;Object.assign(s,h.params),l.push({params:s,pathname:pn([i,h.pathname]),pathnameBase:vk(pn([i,h.pathnameBase])),route:m}),h.pathnameBase!=="/"&&(i=pn([i,h.pathnameBase]))}return l}function gu(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=mk(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],l=i.replace(/(.)\/+$/,"$1"),o=s.slice(1);return{params:r.reduce((c,d,h)=>{let{paramName:m,isOptional:f}=d;if(m==="*"){let y=o[h]||"";l=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const b=o[h];return f&&!b?c[m]=void 0:c[m]=(b||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:l,pattern:e}}function mk(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Hc(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,o,u)=>(r.push({paramName:o,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function fk(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Hc(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Sr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const pk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gk=e=>pk.test(e);function xk(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Br(e):e,i;if(n)if(gk(n))i=n;else{if(n.includes("//")){let l=n;n=Z0(n),Hc(!1,"Pathnames cannot have embedded double slashes - normalizing "+(l+" -> "+n))}n.startsWith("/")?i=Uh(n.substring(1),"/"):i=Uh(n,t)}else i=t;return{pathname:i,search:yk(r),hash:kk(s)}}function Uh(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Kl(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function bk(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function $c(e,t){let n=bk(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Gc(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Br(e):(s=Os({},e),ie(!s.pathname||!s.pathname.includes("?"),Kl("?","pathname","search",s)),ie(!s.pathname||!s.pathname.includes("#"),Kl("#","pathname","hash",s)),ie(!s.search||!s.search.includes("#"),Kl("#","search","hash",s)));let i=e===""||s.pathname==="",l=i?"/":s.pathname,o;if(l==null)o=n;else{let h=t.length-1;if(!r&&l.startsWith("..")){let m=l.split("/");for(;m[0]==="..";)m.shift(),h-=1;s.pathname=m.join("/")}o=h>=0?t[h]:"/"}let u=xk(s,o),c=l&&l!=="/"&&l.endsWith("/"),d=(i||l===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(c||d)&&(u.pathname+="/"),u}const Z0=e=>e.replace(/\/\/+/g,"/"),pn=e=>Z0(e.join("/")),vk=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),yk=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,kk=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function wk(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Q0=["post","put","patch","delete"];new Set(Q0);const jk=["get",...Q0];new Set(jk);/**
* React Router v6.30.4
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Us(){return Us=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Us.apply(null,arguments)}const al=g.createContext(null),J0=g.createContext(null),Gt=g.createContext(null),il=g.createContext(null),At=g.createContext({outlet:null,matches:[],isDataRoute:!1}),eg=g.createContext(null);function Nk(e,t){let{relative:n}=t===void 0?{}:t;zr()||ie(!1);let{basename:r,navigator:s}=g.useContext(Gt),{hash:i,pathname:l,search:o}=ll(e,{relative:n}),u=l;return r!=="/"&&(u=l==="/"?r:pn([r,l])),s.createHref({pathname:u,search:o,hash:i})}function zr(){return g.useContext(il)!=null}function ot(){return zr()||ie(!1),g.useContext(il).location}function tg(e){g.useContext(Gt).static||g.useLayoutEffect(e)}function ea(){let{isDataRoute:e}=g.useContext(At);return e?Fk():Sk()}function Sk(){zr()||ie(!1);let e=g.useContext(al),{basename:t,future:n,navigator:r}=g.useContext(Gt),{matches:s}=g.useContext(At),{pathname:i}=ot(),l=JSON.stringify($c(s,n.v7_relativeSplatPath)),o=g.useRef(!1);return tg(()=>{o.current=!0}),g.useCallback(function(c,d){if(d===void 0&&(d={}),!o.current)return;if(typeof c=="number"){r.go(c);return}let h=Gc(c,JSON.parse(l),i,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:pn([t,h.pathname])),(d.replace?r.replace:r.push)(h,d.state,d)},[t,r,l,i,e])}const Ck=g.createContext(null);function Pk(e){let t=g.useContext(At).outlet;return t&&g.createElement(Ck.Provider,{value:e},t)}function $n(){let{matches:e}=g.useContext(At),t=e[e.length-1];return t?t.params:{}}function ll(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=g.useContext(Gt),{matches:s}=g.useContext(At),{pathname:i}=ot(),l=JSON.stringify($c(s,r.v7_relativeSplatPath));return g.useMemo(()=>Gc(e,JSON.parse(l),i,n==="path"),[e,l,i,n])}function Ek(e,t){return Tk(e,t)}function Tk(e,t,n,r){zr()||ie(!1);let{navigator:s}=g.useContext(Gt),{matches:i}=g.useContext(At),l=i[i.length-1],o=l?l.params:{};l&&l.pathname;let u=l?l.pathnameBase:"/";l&&l.route;let c=ot(),d;if(t){var h;let k=typeof t=="string"?Br(t):t;u==="/"||(h=k.pathname)!=null&&h.startsWith(u)||ie(!1),d=k}else d=c;let m=d.pathname||"/",f=m;if(u!=="/"){let k=u.replace(/^\//,"").split("/");f="/"+m.replace(/^\//,"").split("/").slice(k.length).join("/")}let b=tk(e,{pathname:f}),y=Lk(b&&b.map(k=>Object.assign({},k,{params:Object.assign({},o,k.params),pathname:pn([u,s.encodeLocation?s.encodeLocation(k.pathname).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?u:pn([u,s.encodeLocation?s.encodeLocation(k.pathnameBase).pathname:k.pathnameBase])})),i,n,r);return t&&y?g.createElement(il.Provider,{value:{location:Us({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:rn.Pop}},y):y}function Ak(){let e=Rk(),t=wk(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:s},n):null,null)}const Mk=g.createElement(Ak,null);class _k extends g.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?g.createElement(At.Provider,{value:this.props.routeContext},g.createElement(eg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Dk(e){let{routeContext:t,match:n,children:r}=e,s=g.useContext(al);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),g.createElement(At.Provider,{value:t},r)}function Lk(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let l=e,o=(s=n)==null?void 0:s.errors;if(o!=null){let d=l.findIndex(h=>h.route.id&&(o==null?void 0:o[h.route.id])!==void 0);d>=0||ie(!1),l=l.slice(0,Math.min(l.length,d+1))}let u=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<l.length;d++){let h=l[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(c=d),h.route.id){let{loaderData:m,errors:f}=n,b=h.route.loader&&m[h.route.id]===void 0&&(!f||f[h.route.id]===void 0);if(h.route.lazy||b){u=!0,c>=0?l=l.slice(0,c+1):l=[l[0]];break}}}return l.reduceRight((d,h,m)=>{let f,b=!1,y=null,k=null;n&&(f=o&&h.route.id?o[h.route.id]:void 0,y=h.route.errorElement||Mk,u&&(c<0&&m===0?(Vk("route-fallback"),b=!0,k=null):c===m&&(b=!0,k=h.route.hydrateFallbackElement||null)));let x=t.concat(l.slice(0,m+1)),p=()=>{let v;return f?v=y:b?v=k:h.route.Component?v=g.createElement(h.route.Component,null):h.route.element?v=h.route.element:v=d,g.createElement(Dk,{match:h,routeContext:{outlet:d,matches:x,isDataRoute:n!=null},children:v})};return n&&(h.route.ErrorBoundary||h.route.errorElement||m===0)?g.createElement(_k,{location:n.location,revalidation:n.revalidation,component:y,error:f,children:p(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):p()},null)}var ng=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ng||{}),rg=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(rg||{});function Bk(e){let t=g.useContext(al);return t||ie(!1),t}function zk(e){let t=g.useContext(J0);return t||ie(!1),t}function Ik(e){let t=g.useContext(At);return t||ie(!1),t}function sg(e){let t=Ik(),n=t.matches[t.matches.length-1];return n.route.id||ie(!1),n.route.id}function Rk(){var e;let t=g.useContext(eg),n=zk(),r=sg();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Fk(){let{router:e}=Bk(ng.UseNavigateStable),t=sg(rg.UseNavigateStable),n=g.useRef(!1);return tg(()=>{n.current=!0}),g.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Us({fromRouteId:t},i)))},[e,t])}const Wh={};function Vk(e,t,n){Wh[e]||(Wh[e]=!0)}function Ok(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Ws(e){let{to:t,replace:n,state:r,relative:s}=e;zr()||ie(!1);let{future:i,static:l}=g.useContext(Gt),{matches:o}=g.useContext(At),{pathname:u}=ot(),c=ea(),d=Gc(t,$c(o,i.v7_relativeSplatPath),u,s==="path"),h=JSON.stringify(d);return g.useEffect(()=>c(JSON.parse(h),{replace:n,state:r,relative:s}),[c,h,s,n,r]),null}function ol(e){return Pk(e.context)}function H(e){ie(!1)}function Uk(e){let{basename:t="/",children:n=null,location:r,navigationType:s=rn.Pop,navigator:i,static:l=!1,future:o}=e;zr()&&ie(!1);let u=t.replace(/^\/*/,"/"),c=g.useMemo(()=>({basename:u,navigator:i,static:l,future:Us({v7_relativeSplatPath:!1},o)}),[u,o,i,l]);typeof r=="string"&&(r=Br(r));let{pathname:d="/",search:h="",hash:m="",state:f=null,key:b="default"}=r,y=g.useMemo(()=>{let k=Sr(d,u);return k==null?null:{location:{pathname:k,search:h,hash:m,state:f,key:b},navigationType:s}},[u,d,h,m,f,b,s]);return y==null?null:g.createElement(Gt.Provider,{value:c},g.createElement(il.Provider,{children:n,value:y}))}function Wk(e){let{children:t,location:n}=e;return Ek(xu(t),n)}new Promise(()=>{});function xu(e,t){t===void 0&&(t=[]);let n=[];return g.Children.forEach(e,(r,s)=>{if(!g.isValidElement(r))return;let i=[...t,s];if(r.type===g.Fragment){n.push.apply(n,xu(r.props.children,i));return}r.type!==H&&ie(!1),!r.props.index||!r.props.children||ie(!1);let l={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=xu(r.props.children,i)),n.push(l)}),n}/**
* React Router DOM v6.30.4
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Ti(){return Ti=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ti.apply(null,arguments)}function ag(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Hk(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function $k(e,t){return e.button===0&&(!t||t==="_self")&&!Hk(e)}function bu(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function Gk(e,t){let n=bu(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(i=>{n.append(s,i)})}),n}const Kk=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],qk=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Yk="6";try{window.__reactRouterVersion=Yk}catch{}const Xk=g.createContext({isTransitioning:!1}),Zk="startTransition",Hh=_b[Zk];function Qk(e){let{basename:t,children:n,future:r,window:s}=e,i=g.useRef();i.current==null&&(i.current=Qy({window:s,v5Compat:!0}));let l=i.current,[o,u]=g.useState({action:l.action,location:l.location}),{v7_startTransition:c}=r||{},d=g.useCallback(h=>{c&&Hh?Hh(()=>u(h)):u(h)},[u,c]);return g.useLayoutEffect(()=>l.listen(d),[l,d]),g.useEffect(()=>Ok(r),[r]),g.createElement(Uk,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:l,future:r})}const Jk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ew=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,O=g.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:l,state:o,target:u,to:c,preventScrollReset:d,viewTransition:h}=t,m=ag(t,Kk),{basename:f}=g.useContext(Gt),b,y=!1;if(typeof c=="string"&&ew.test(c)&&(b=c,Jk))try{let v=new URL(window.location.href),w=c.startsWith("//")?new URL(v.protocol+c):new URL(c),j=Sr(w.pathname,f);w.origin===v.origin&&j!=null?c=j+w.search+w.hash:y=!0}catch{}let k=Nk(c,{relative:s}),x=nw(c,{replace:l,state:o,target:u,preventScrollReset:d,relative:s,viewTransition:h});function p(v){r&&r(v),v.defaultPrevented||x(v)}return g.createElement("a",Ti({},m,{href:b||k,onClick:y||i?r:p,ref:n,target:u}))}),ig=g.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:s=!1,className:i="",end:l=!1,style:o,to:u,viewTransition:c,children:d}=t,h=ag(t,qk),m=ll(u,{relative:h.relative}),f=ot(),b=g.useContext(J0),{navigator:y,basename:k}=g.useContext(Gt),x=b!=null&&sw(m)&&c===!0,p=y.encodeLocation?y.encodeLocation(m).pathname:m.pathname,v=f.pathname,w=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;s||(v=v.toLowerCase(),w=w?w.toLowerCase():null,p=p.toLowerCase()),w&&k&&(w=Sr(w,k)||w);const j=p!=="/"&&p.endsWith("/")?p.length-1:p.length;let P=v===p||!l&&v.startsWith(p)&&v.charAt(j)==="/",C=w!=null&&(w===p||!l&&w.startsWith(p)&&w.charAt(p.length)==="/"),N={isActive:P,isPending:C,isTransitioning:x},S=P?r:void 0,E;typeof i=="function"?E=i(N):E=[i,P?"active":null,C?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let T=typeof o=="function"?o(N):o;return g.createElement(O,Ti({},h,{"aria-current":S,className:E,ref:n,style:T,to:u,viewTransition:c}),typeof d=="function"?d(N):d)});var vu;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(vu||(vu={}));var $h;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})($h||($h={}));function tw(e){let t=g.useContext(al);return t||ie(!1),t}function nw(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:l,viewTransition:o}=t===void 0?{}:t,u=ea(),c=ot(),d=ll(e,{relative:l});return g.useCallback(h=>{if($k(h,n)){h.preventDefault();let m=r!==void 0?r:Ei(c)===Ei(d);u(e,{replace:m,state:s,preventScrollReset:i,relative:l,viewTransition:o})}},[c,u,d,r,s,n,e,i,l,o])}function rw(e){let t=g.useRef(bu(e)),n=g.useRef(!1),r=ot(),s=g.useMemo(()=>Gk(r.search,n.current?null:t.current),[r.search]),i=ea(),l=g.useCallback((o,u)=>{const c=bu(typeof o=="function"?o(s):o);n.current=!0,i("?"+c,u)},[i,s]);return[s,l]}function sw(e,t){t===void 0&&(t={});let n=g.useContext(Xk);n==null&&ie(!1);let{basename:r}=tw(vu.useViewTransitionState),s=ll(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Sr(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=Sr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return gu(s.pathname,l)!=null||gu(s.pathname,i)!=null}function aw(){const{pathname:e}=ot();return g.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"instant"})},[e]),null}const iw='a, button, [role="button"], label, select, summary, [data-cursor="hover"], .cursor-pointer',lw='input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]):not([type="file"]), textarea, [contenteditable="true"]';function ow(){const e=g.useRef(null),t=g.useRef(null),n=g.useRef(null),r=g.useRef(null),s=g.useRef(null);return g.useEffect(()=>{const i=window.matchMedia("(pointer: fine)"),l=window.matchMedia("(prefers-reduced-motion: reduce)");if(!i.matches||l.matches)return;const o=e.current,u=t.current,c=n.current,d=r.current,h=s.current;if(!o||!u||!c||!d||!h)return;document.documentElement.classList.add("hifi-cursor-on");const m=-24*Math.PI/180,f=Math.cos(m),b=Math.sin(m);let y=-100,k=-100,x=0,p=2.4,v=2.4,w=16,j=6.5,P=16,C=6.5,N=!1,S,E=performance.now();const T=_=>{const L=Math.min((_-E)/1e3,.05);E=_,p+=(v-p)*Math.min(1,L*8),w+=(P-w)*Math.min(1,L*10),j+=(C-j)*Math.min(1,L*10),x+=p*L,u.style.transform=`translate3d(${y}px, ${k}px, 0)`,c.style.transform=`translate3d(${y}px, ${k}px, 0)`;const F=Math.cos(x)*w,V=Math.sin(x)*j;d.style.transform=`translate(${F*f-V*b}px, ${F*b+V*f}px)`,S=requestAnimationFrame(T)},I=_=>{o.dataset.state=_;const L=_==="hover";v=L?7:2.4,P=L?23:16,C=L?9.5:6.5},U=_=>{y=_.clientX,k=_.clientY,N||(N=!0,o.dataset.hidden="false")},Y=_=>{const L=_.target;L instanceof Element&&(L.closest(lw)?I("text"):L.closest(iw)?I("hover"):I("default"))},J=()=>{o.dataset.down="true",h.style.left=`${y}px`,h.style.top=`${k}px`,h.classList.remove("is-live"),h.offsetWidth,h.classList.add("is-live")},R=()=>{o.dataset.down="false"},X=()=>{N=!1,o.dataset.hidden="true"};return document.addEventListener("mousemove",U,{passive:!0}),document.addEventListener("mouseover",Y,{passive:!0}),document.addEventListener("mousedown",J,{passive:!0}),document.addEventListener("mouseup",R,{passive:!0}),document.documentElement.addEventListener("mouseleave",X),window.addEventListener("blur",X),S=requestAnimationFrame(T),()=>{cancelAnimationFrame(S),document.removeEventListener("mousemove",U),document.removeEventListener("mouseover",Y),document.removeEventListener("mousedown",J),document.removeEventListener("mouseup",R),document.documentElement.removeEventListener("mouseleave",X),window.removeEventListener("blur",X),document.documentElement.classList.remove("hifi-cursor-on")}},[]),a.jsxs("div",{ref:e,className:"hifi-cursor","data-state":"default","data-hidden":"true","data-down":"false","aria-hidden":"true",children:[a.jsxs("div",{ref:n,className:"hifi-cursor__orbit",children:[a.jsx("div",{className:"hifi-cursor__ring"}),a.jsx("div",{ref:r,className:"hifi-cursor__sat"})]}),a.jsx("div",{ref:t,className:"hifi-cursor__core"}),a.jsx("div",{ref:s,className:"hifi-cursor__pulse"})]})}const lg=`${"/".replace(/\/$/,"")}/api`;async function Jr(e,t={}){const n=await fetch(`${lg}${e}`,{credentials:"include",headers:t.body instanceof FormData?{}:{"Content-Type":"application/json"},...t}),r=await n.text();let s=null;if(r)try{s=JSON.parse(r)}catch{}if(!n.ok)throw new Error((s==null?void 0:s.error)||`Fehler ${n.status}`);if(s===null&&r)throw new Error("Unerwartete Server-Antwort (kein gültiges JSON)");return s}const M={get:e=>Jr(e),post:(e,t)=>Jr(e,{method:"POST",body:t instanceof FormData?t:JSON.stringify(t)}),put:(e,t)=>Jr(e,{method:"PUT",body:JSON.stringify(t)}),patch:(e,t)=>Jr(e,{method:"PATCH",body:JSON.stringify(t)}),delete:e=>Jr(e,{method:"DELETE"})};function uw({children:e}){const[t,n]=g.useState({pathname:null,needsSetup:null}),r=ot();return g.useEffect(()=>{let s=!1;return M.get("/setup/status").then(i=>{s||n({pathname:r.pathname,needsSetup:i.needs_setup})}).catch(()=>{s||n({pathname:r.pathname,needsSetup:!1})}),()=>{s=!0}},[r.pathname]),t.pathname!==r.pathname||t.needsSetup===null?a.jsx("div",{className:"min-h-screen bg-white dark:bg-neutral-950"}):t.needsSetup&&r.pathname!=="/setup"?a.jsx(Ws,{to:"/setup",replace:!0}):!t.needsSetup&&r.pathname==="/setup"?a.jsx(Ws,{to:"/",replace:!0}):e}const og=g.createContext(null);function cw(){const e=new Date,t=e.getHours()+e.getMinutes()/60;return t>=6.5&&t<21?"light":"dark"}function dw({children:e}){const[t,n]=g.useState(()=>{const s=localStorage.getItem("hifi-theme");return s==="light"||s==="dark"?s:cw()});g.useEffect(()=>{document.documentElement.classList.toggle("dark",t==="dark"),localStorage.setItem("hifi-theme",t)},[t]);const r=()=>n(s=>s==="dark"?"light":"dark");return a.jsx(og.Provider,{value:{theme:t,toggleTheme:r},children:e})}function hw(){return g.useContext(og)}const mw={nav:{openMenu:"Menü öffnen",closeMenu:"Menü schließen",close:"Schließen",adminPanel:"Zum Admin-Panel",vehicles:"Fahrzeuge",services:"Leistungen",gallery:"Galerie",contact:"Kontakt",whatsapp:"WhatsApp",shop:"Zum Shop"},themeToggle:{label:"Theme umschalten"},languageToggle:{label:"Sprache auswählen"},footer:{routePlan:"Route planen",contactHeading:"Kontakt",contactForm:"Kontaktformular",hoursHeading:"Öffnungszeiten",open:"Geöffnet",closed:"Geschlossen",days:{monFri:"Montag Freitag",sat:"Samstag",sun:"Sonntag"},copyright:e=>`© ${e} HifiPlanet. Alle Angaben ohne Gewähr.`,imprint:"Impressum",privacy:"Datenschutz",terms:"AGB",cookieSettings:"Cookie-Einstellungen"},cookieConsent:{bannerText:"Wir verwenden nur technisch notwendige Cookies. Für Google Maps, YouTube-Videos und Statistik-Cookies benötigen wir zusätzlich deine Zustimmung, da dabei Daten an Google übertragen werden.",moreInfo:"Mehr dazu in unserer",privacyPolicy:"Datenschutzerklärung",settings:"Einstellungen",onlyNecessary:"Nur notwendige",acceptAll:"Alle akzeptieren",modalTitle:"Cookie-Einstellungen",modalIntro:"Lege fest, welche Kategorien du zulassen möchtest. Mehr dazu in unserer",necessaryTitle:"Notwendig",necessaryDesc:"Für den Betrieb der Website erforderlich (z. B. Login-Session, Theme- und Cookie-Einstellung). Kann nicht deaktiviert werden.",externalTitle:"Externe Medien",externalDesc:"Google Maps und YouTube-Videos. Beim Laden werden Daten (u. a. deine IP-Adresse) an Google übertragen.",analyticsTitle:"Statistik",analyticsDesc:"Google Analytics hilft uns zu verstehen, wie die Website genutzt wird. Dabei werden Daten an Google übertragen.",cancel:"Abbrechen",saveSelection:"Auswahl speichern"},maintenance:{title:"Wartungsarbeiten",defaultMessage:"Dieser Bereich wird gerade aktualisiert. Bitte schau in Kürze wieder vorbei."},lightbox:{close:"Schließen",previous:"Vorheriges Bild",next:"Nächstes Bild"},home:{metaTitle:"Car-Hifi Umbauten nach Maß",metaDescription:"HifiPlanet dein Car-Hifi Spezialist in Amorbach. Marke und Modell wählen, passende Sound-Pakete entdecken und unverbindlich anfragen.",stickyCta:"Bereit für deinen Sound-Umbau?",selectVehicle:"Fahrzeug auswählen",getInTouch:"Kontakt aufnehmen",welcome:"Willkommen bei HifiPlanet",heroTitle:"Home of pure Sound",heroSubtitle:"Dein Car-Hifi Spezialist für individuelle Sound-Umbauten. Wähle dein Fahrzeug, entdecke passende Pakete und frag unverbindlich an wir kümmern uns um den Rest.",stats:[{value:"20+",label:"Jahre Erfahrung"},{value:"Riesige",label:"3D-Druckfarm im eigenen Haus"},{value:"Eigene",label:"CNC- & Laserwerkstatt"},{value:"International",label:"anerkannter Car-Hifi-Spezialist"}],brandsHeading:"Marken, mit denen wir arbeiten",youtubeBadge:"HifiPlanet präsentiert",youtubeTitle:"Das Handwerk hinter deinem Sound",youtubeText:"Entdecke die Handwerkskunst hinter unserer Arbeit",youtubeCta:"Jetzt ansehen",heroImageAlt:"Ground Zero Subwoofer und Endstufen mit violetter Ambiente-Beleuchtung",craftImageAlt:"Individueller Subwoofer-Bau",adviceImageAlt:"Endstufen-Einbau mit Ambiente-Beleuchtung",moreImageAlt:"Hochwertige Endstufe und Subwoofer, Studioaufnahme",craftEyebrow:"Handwerk",craftTitle:"Präzisionsarbeit in jedem Detail",craftText:"Ob eigens gefertigte Subwoofer-Gehäuse, integrierte Beleuchtung oder unsichtbar verlegte Kabelwege dank eigener CNC-, Laser- und 3D-Druck-Fertigung entstehen bei uns Lösungen, die es von der Stange nicht gibt.",adviceEyebrow:"Beratung",adviceTitle:"Von der ersten Idee bis zum letzten Schliff",adviceText:"Jedes Fahrzeug und jeder Anspruch ist anders. Deshalb beraten wir dich persönlich und unverbindlich vom dezenten Upgrade bis zum kompromisslosen High-End-System.",insightsTitle:"Einblicke in unsere Umbauten",insightsText:"Vom unauffälligen Sound-Upgrade bis zum aufwendigen Komplettumbau Handarbeit aus unserer Werkstatt in Amorbach.",galleryAlts:["Individueller Subwoofer-Bau mit Ground Zero Bässen","Endstufen-Einbau mit violetter Ambiente-Beleuchtung","Hochtöner- und Mitteltöner-Einbau von Focal Utopia","Sony Navigationssystem mit Apple CarPlay im Cockpit","Verbauter Hochtöner im Kofferraum","Individueller Subwoofer-Einbau mit LED-Beleuchtung im Kofferraum"],reviewsRating:"5,0 von 181 Kunden bewertet",reviewsText:"Das sagen unsere Kunden über uns.",reviewsLink:"Alle Bewertungen auf Google ansehen →",testimonials:[{name:"Thomas K.",text:"Über YouTube auf dieses Klang-Juwel gestoßen. Beratung und Empfehlungen sind erstklassig der Tesla-Vorführwagen hat meine Leidenschaft für guten Sound neu entfacht."},{name:"Andreas I.",text:"Sehr professionelle Beratung und Service. Obwohl ich von VAG zu Mercedes gewechselt bin, wurde alles reibungslos angepasst. Die 3-Wege-Lautsprecher und zwei Subwoofer liefern außergewöhnliche Leistung."},{name:"Thomas F.",text:"Kompletter Audi A4 B9 Umbau hat meine Erwartungen übertroffen. Von Anfang bis Ende professionell, mit tadelloser Verarbeitung und Klangqualität."},{name:"Drago G.",text:"Beeindruckt von der CNC-Arbeit, die auf YouTube gezeigt wird. Angefangen mit 3D-gedruckten Lautsprecherringen für meinen Ford Mustang daraus wurde ein viel größeres Projekt."},{name:"Leonardo B.",text:"Toller Service und meisterhafte Handwerkskunst. Saubere Installation, Leidenschaft in jedem Detail erkennbar."},{name:"Marcel S.",text:"Unschlagbares Preis-Leistungs-Verhältnis. Das Team hat sich viel Zeit genommen, um genau die Lösung für mein Budget zu finden."},{name:"Julia W.",text:"Endlich ein Betrieb, der auch Wohnmobile ernst nimmt. Die Soundanlage in unserem Camper klingt jetzt wie im Wohnzimmer."},{name:"Kevin R.",text:"Dashcam und Alarmanlage in einem Termin sauber verbaut, keine sichtbaren Kabel. Absolute Empfehlung für alle, die Wert auf Verarbeitung legen."},{name:"Sabrina H.",text:"Mein Oldtimer hat jetzt modernen Sound, ohne dass es dem Original-Look geschadet hätte. Genau das habe ich gesucht."},{name:"Niklas P.",text:"Von der ersten Anfrage bis zum fertigen Umbau lief alles reibungslos. Ehrliche Beratung ohne Verkaufsdruck."}],moreTitle:"Mehr als nur Car-Hifi",moreText:"Neben individuellen Sound-Umbauten bieten wir CNC-Zerspanung, Lasertechnik, 3D-Druck und mehr alles aus einer Hand in unserer eigenen Werkstatt.",moreCta:"Alle Leistungen entdecken",faqHeading:"Häufig gestellte Fragen"},vehicleSelect:{metaTitle:"Fahrzeug auswählen",metaDescription:"Wähle deine Fahrzeugmarke und dein Modell und entdecke passende Car-Hifi Sound-Pakete von HifiPlanet.",title:"Fahrzeug auswählen",intro:"Wähle zuerst deine Marke, dann dein Modell wir zeigen dir direkt die passenden Sound-Pakete.",empty:"Es sind noch keine Marken hinterlegt."},brandPage:{metaTitleFallback:"Modell auswählen",metaDescription:e=>`Wähle dein ${e} Modell und entdecke passende Car-Hifi Sound-Pakete von HifiPlanet.`,loading:"Lädt…",breadcrumbVehicles:"Fahrzeuge",titleSuffix:"Modell wählen",empty:"Für diese Marke sind noch keine Modelle hinterlegt."},modelPage:{metaTitleFallback:"Sound-Pakete",metaTitle:(e,t)=>`${e} ${t} Sound-Pakete`,metaDescription:(e,t)=>`Car-Hifi Sound-Pakete für ${e} ${t} inkl. aktueller Preise von HifiPlanet unverbindlich anfragen.`,loading:"Lädt…",breadcrumbVehicles:"Fahrzeuge",titleSuffix:"Sound-Pakete",empty:"Für dieses Modell sind noch keine Pakete hinterlegt.",totalPrice:"ab ca.",productLoading:"Produkt wird geladen…",requestContact:"Kontakt anfragen",featuredBadge:"Empfohlen",moreBullets:e=>e===1?"+ 1 weitere Leistung":`+ ${e} weitere Leistungen`,lessBullets:"Weniger anzeigen"},leistungen:{metaTitle:"Leistungen",metaDescription:"Car-Hifi, Wohnmobil & Caravan, Oldtimer, CNC-Zerspanung, Lasertechnik, 3D-Druck, Alarmanlagen und Dash Cams alles aus einer Hand bei HifiPlanet in Amorbach.",title:"Unsere Leistungen",intro:"Von individuellen Sound-Umbauten bis zur eigenen CNC- und 3D-Druck-Fertigung alles aus einer Hand in unserer Werkstatt in Amorbach.",notListedTitle:"Dein Projekt ist nicht dabei?",notListedText:"Sprich uns einfach an wir finden gemeinsam die passende Lösung.",contact:"Kontakt aufnehmen"},contactPage:{metaTitle:"Kontakt",metaDescription:"Kontaktiere HifiPlanet in Amorbach für dein individuelles Car-Hifi Projekt wir beraten dich gerne unverbindlich.",title:"Kontakt aufnehmen",heroEyebrow:"Kontakt",heroTitlePre:"Sprich",heroTitleAccent:"mit",heroTitlePost:"uns.",heroSubtitle:"Ob Anlage, Einbau oder Klang-Tuning für dein Fahrzeug — schreib uns, wir melden uns schnellstmöglich zurück.",packageBoxTitle:"Deine Anfrage bezieht sich auf",formTitle:"Anfrage senden",sentTitle:"Anfrage gesendet ✓",sentText:"Danke! Wir melden uns innerhalb eines Werktags bei dir.",contextIntro:"Deine Anfrage bezieht sich auf:",contextBrand:"Marke",contextModel:"Modell",contextPackage:"Paket",contextProduct:"Produkt",packagePrice:"Paketpreis",upgrades:"Upgrades",optionalUpgrades:"Optionale Upgrades",totalWithUpgrades:"Gesamt inkl. Upgrades",nameLabel:"Name *",namePlaceholder:"Max Mustermann",emailLabel:"E-Mail *",emailPlaceholder:"max@mail.de",phoneLabel:"Telefon",phonePlaceholder:"Optional",vinLabel:"Fahrgestellnummer (FIN)",vinPlaceholder:"Optional hilft bei der Einschätzung",messageLabel:"Nachricht",messagePlaceholder:"Erzähl uns von deinem Projekt Fahrzeug, Wunschklang, Budget …",requiredHint:"* Pflichtfelder",sending:"Wird gesendet…",submit:"Anfrage senden",cardTitle:"HifiPlanet Amorbach",address:"Adresse",phone:"Telefon",email:"E-Mail",hours:"Öffnungszeiten",hoursWeek:"MoFr: 9:0018:00 Uhr",hoursSat:"Sa: 10:0013:00 Uhr",hoursWeekDays:"MoFr",hoursWeekTime:"9:00 18:00 Uhr",hoursSatDay:"Sa",hoursSatTime:"10:00 13:00 Uhr",directionsTitle:"Anfahrt",mapEmbedName:"Die Google-Maps-Karte",mapOpenChip:"In Maps öffnen",routePlan:"Route planen",featurePremiumTitle:"Premium Klang",featurePremiumSub:"Höchste Qualität",featureGermanyTitle:"Made in Germany",featureGermanySub:"Präzise Handarbeit",featureIndividualTitle:"Individuell",featureIndividualSub:"Maßgeschneiderte Lösungen",featureExpertsTitle:"Experten Team",featureExpertsSub:"Leidenschaft & Know-how"},galleryOverview:{metaTitle:"Bildergalerie",metaDescription:"Einblicke in unsere Car-Hifi Umbauten nach Marke sortiert. Wähle eine Marke und entdecke die Projekte.",title:"Bildergalerie",intro:"Wähle eine Marke und entdecke unsere Umbauten im Detail.",loading:"Lädt…",empty:"Es sind noch keine Galerie-Marken hinterlegt."},galleryBrandPage:{metaTitleFallback:"Bildergalerie",metaTitle:e=>`${e} Umbauten`,metaDescription:e=>`Einblicke in unsere ${e} Car-Hifi Umbauten.`,loading:"Lädt…",breadcrumbGallery:"Galerie",titleSuffix:"Projekt wählen",empty:"Für diese Marke sind noch keine Projekte hinterlegt."},galleryProjectPage:{metaTitleFallback:"Bildergalerie",metaDescription:e=>`Fotos unseres ${e} Umbaus.`,loading:"Lädt…",breadcrumbGallery:"Galerie",empty:"Für dieses Projekt sind noch keine Fotos hinterlegt.",enlargeImage:"Bild vergrößern"}},fw={nav:{openMenu:"Open menu",closeMenu:"Close menu",close:"Close",adminPanel:"Go to admin panel",vehicles:"Vehicles",services:"Services",gallery:"Gallery",contact:"Contact",whatsapp:"WhatsApp",shop:"Visit shop"},themeToggle:{label:"Toggle theme"},languageToggle:{label:"Select language"},footer:{routePlan:"Get directions",contactHeading:"Contact",contactForm:"Contact form",hoursHeading:"Opening hours",open:"Open",closed:"Closed",days:{monFri:"Monday Friday",sat:"Saturday",sun:"Sunday"},copyright:e=>`© ${e} HifiPlanet. All information without guarantee.`,imprint:"Legal notice",privacy:"Privacy",terms:"Terms",cookieSettings:"Cookie settings"},cookieConsent:{bannerText:"We only use technically necessary cookies. For Google Maps, YouTube videos and analytics cookies we need your additional consent, since data is transferred to Google in that case.",moreInfo:"More details in our",privacyPolicy:"privacy policy",settings:"Settings",onlyNecessary:"Necessary only",acceptAll:"Accept all",modalTitle:"Cookie settings",modalIntro:"Choose which categories you want to allow. More details in our",necessaryTitle:"Necessary",necessaryDesc:"Required to operate the website (e.g. login session, theme and cookie preference). Cannot be disabled.",externalTitle:"External media",externalDesc:"Google Maps and YouTube videos. Loading them transfers data (including your IP address) to Google.",analyticsTitle:"Analytics",analyticsDesc:"Google Analytics helps us understand how the website is used. This transfers data to Google.",cancel:"Cancel",saveSelection:"Save selection"},maintenance:{title:"Under maintenance",defaultMessage:"This area is currently being updated. Please check back shortly."},lightbox:{close:"Close",previous:"Previous image",next:"Next image"},home:{metaTitle:"Custom Car-Hifi Installations",metaDescription:"HifiPlanet your car-hifi specialist in Amorbach, Germany. Choose your make and model, discover matching sound packages and get in touch, no obligation.",stickyCta:"Ready for your sound upgrade?",selectVehicle:"Select vehicle",getInTouch:"Get in touch",welcome:"Welcome to HifiPlanet",heroTitle:"Home of pure Sound",heroSubtitle:"Your car-hifi specialist for custom sound installations. Choose your vehicle, discover the right package and get in touch, no obligation we take care of the rest.",stats:[{value:"20+",label:"years of experience"},{value:"Huge",label:"in-house 3D print farm"},{value:"In-house",label:"CNC & laser workshop"},{value:"International",label:"recognized car-hifi specialist"}],brandsHeading:"Brands we work with",youtubeBadge:"HifiPlanet presents",youtubeTitle:"The craft behind your sound",youtubeText:"Discover the artistry behind our work",youtubeCta:"Watch now",heroImageAlt:"Ground Zero subwoofer and amplifiers with purple ambient lighting",craftImageAlt:"Custom subwoofer build",adviceImageAlt:"Amplifier installation with ambient lighting",moreImageAlt:"High-end amplifier and subwoofer, studio shot",craftEyebrow:"Craftsmanship",craftTitle:"Precision work in every detail",craftText:"Whether custom-built subwoofer enclosures, integrated lighting or invisibly routed cabling our own CNC, laser and 3D-printing production means we can build solutions you simply can't buy off the shelf.",adviceEyebrow:"Consultation",adviceTitle:"From the first idea to the final touch",adviceText:"Every vehicle and every requirement is different. That's why we advise you personally and without obligation from a subtle upgrade to an uncompromising high-end system.",insightsTitle:"A look at our installations",insightsText:"From subtle sound upgrades to elaborate full installations handcrafted in our workshop in Amorbach.",galleryAlts:["Custom subwoofer build with Ground Zero bass drivers","Amplifier installation with purple ambient lighting","Tweeter and midrange installation by Focal Utopia","Sony navigation system with Apple CarPlay in the cockpit","Installed tweeter in the trunk","Custom subwoofer installation with LED lighting in the trunk"],reviewsRating:"Rated 5.0 by 181 customers",reviewsText:"Here's what our customers say about us.",reviewsLink:"See all reviews on Google →",testimonials:[{name:"Thomas K.",text:"Found this gem through YouTube. Advice and recommendations are top-notch the Tesla demo car reignited my passion for great sound."},{name:"Andreas I.",text:"Very professional advice and service. Even though I switched from VAG to Mercedes, everything was adapted smoothly. The 3-way speakers and two subwoofers deliver outstanding performance."},{name:"Thomas F.",text:"The complete Audi A4 B9 build exceeded my expectations. Professional from start to finish, with flawless workmanship and sound quality."},{name:"Drago G.",text:"Impressed by the CNC work shown on YouTube. Started with 3D-printed speaker rings for my Ford Mustang it turned into a much bigger project."},{name:"Leonardo B.",text:"Great service and masterful craftsmanship. Clean installation, passion visible in every detail."},{name:"Marcel S.",text:"Unbeatable value for money. The team took a lot of time to find the exact solution for my budget."},{name:"Julia W.",text:"Finally a shop that takes motorhomes seriously too. The sound system in our camper now sounds like a living room."},{name:"Kevin R.",text:"Dash cam and alarm system installed cleanly in a single appointment, no visible cables. Highly recommended for anyone who values quality workmanship."},{name:"Sabrina H.",text:"My classic car now has modern sound without compromising the original look. Exactly what I was looking for."},{name:"Niklas P.",text:"From the first inquiry to the finished build, everything went smoothly. Honest advice with no sales pressure."}],moreTitle:"More than just car-hifi",moreText:"Besides custom sound installations, we also offer CNC machining, laser technology, 3D printing and more all from a single source in our own workshop.",moreCta:"Discover all our services",faqHeading:"Frequently asked questions"},vehicleSelect:{metaTitle:"Select your vehicle",metaDescription:"Choose your vehicle make and model and discover matching car-hifi sound packages from HifiPlanet.",title:"Select your vehicle",intro:"Choose your make first, then your model we'll show you the matching sound packages right away.",empty:"No brands have been added yet."},brandPage:{metaTitleFallback:"Select a model",metaDescription:e=>`Choose your ${e} model and discover matching car-hifi sound packages from HifiPlanet.`,loading:"Loading…",breadcrumbVehicles:"Vehicles",titleSuffix:"Select a model",empty:"No models have been added for this brand yet."},modelPage:{metaTitleFallback:"Sound packages",metaTitle:(e,t)=>`${e} ${t} sound packages`,metaDescription:(e,t)=>`Car-hifi sound packages for the ${e} ${t} including current prices get in touch with HifiPlanet, no obligation.`,loading:"Loading…",breadcrumbVehicles:"Vehicles",titleSuffix:"Sound packages",empty:"No packages have been added for this model yet.",totalPrice:"from approx.",productLoading:"Loading product…",requestContact:"Request contact",featuredBadge:"Recommended",moreBullets:e=>e===1?"+ 1 more feature":`+ ${e} more features`,lessBullets:"Show less"},leistungen:{metaTitle:"Services",metaDescription:"Car-hifi, motorhomes & caravans, classic cars, CNC machining, laser technology, 3D printing, alarm systems and dash cams all from a single source at HifiPlanet in Amorbach.",title:"Our services",intro:"From custom sound installations to our own CNC and 3D-printing production all from a single source in our workshop in Amorbach.",notListedTitle:"Don't see your project?",notListedText:"Just get in touch we'll find the right solution together.",contact:"Get in touch"},contactPage:{metaTitle:"Contact",metaDescription:"Get in touch with HifiPlanet in Amorbach for your custom car-hifi project we're happy to advise you, no obligation.",title:"Get in touch",heroEyebrow:"Contact",heroTitlePre:"Talk",heroTitleAccent:"to",heroTitlePost:"us.",heroSubtitle:"Whether it's a system, installation, or sound tuning for your car — write to us, we'll get back to you as soon as possible.",packageBoxTitle:"Your inquiry relates to",formTitle:"Send inquiry",sentTitle:"Inquiry sent ✓",sentText:"Thanks! We'll get back to you within one business day.",contextIntro:"Your inquiry relates to:",contextBrand:"Brand",contextModel:"Model",contextPackage:"Package",contextProduct:"Product",packagePrice:"Package price",upgrades:"Upgrades",optionalUpgrades:"Optional upgrades",totalWithUpgrades:"Total incl. upgrades",nameLabel:"Name *",namePlaceholder:"Max Mustermann",emailLabel:"Email *",emailPlaceholder:"max@mail.de",phoneLabel:"Phone",phonePlaceholder:"Optional",vinLabel:"Vehicle identification number (VIN)",vinPlaceholder:"Optional helps us assess your vehicle",messageLabel:"Message",messagePlaceholder:"Tell us about your project vehicle, desired sound, budget …",requiredHint:"* Required fields",sending:"Sending…",submit:"Send inquiry",cardTitle:"HifiPlanet Amorbach",address:"Address",phone:"Phone",email:"Email",hours:"Opening hours",hoursWeek:"MonFri: 9:00 AM6:00 PM",hoursSat:"Sat: 10:00 AM1:00 PM",hoursWeekDays:"MonFri",hoursWeekTime:"9:00 AM 6:00 PM",hoursSatDay:"Sat",hoursSatTime:"10:00 AM 1:00 PM",directionsTitle:"Directions",mapEmbedName:"The Google Maps map",mapOpenChip:"Open in Maps",routePlan:"Get directions",featurePremiumTitle:"Premium Sound",featurePremiumSub:"Highest quality",featureGermanyTitle:"Made in Germany",featureGermanySub:"Precision craftsmanship",featureIndividualTitle:"Custom-built",featureIndividualSub:"Tailored solutions",featureExpertsTitle:"Expert Team",featureExpertsSub:"Passion & know-how"},galleryOverview:{metaTitle:"Photo gallery",metaDescription:"A look at our car-hifi installations sorted by brand. Choose a brand and explore the projects.",title:"Photo gallery",intro:"Choose a brand and explore our installations in detail.",loading:"Loading…",empty:"No gallery brands have been added yet."},galleryBrandPage:{metaTitleFallback:"Photo gallery",metaTitle:e=>`${e} installations`,metaDescription:e=>`A look at our ${e} car-hifi installations.`,loading:"Loading…",breadcrumbGallery:"Gallery",titleSuffix:"Select a project",empty:"No projects have been added for this brand yet."},galleryProjectPage:{metaTitleFallback:"Photo gallery",metaDescription:e=>`Photos of our ${e} installation.`,loading:"Loading…",breadcrumbGallery:"Gallery",empty:"No photos have been added for this project yet.",enlargeImage:"Enlarge image"}},Ya={de:mw,en:fw};function pw(){const e=localStorage.getItem("hifi-lang");return e==="de"||e==="en"?e:(navigator.language||"de").toLowerCase().startsWith("de")?"de":"en"}function yu(e,t){return t.split(".").reduce((n,r)=>n==null?void 0:n[r],e)}const ug=g.createContext({language:"de",setLanguage:()=>{},toggleLanguage:()=>{},t:e=>{const t=yu(Ya.de,e);return t!==void 0?t:e}});function Gh({children:e}){const[t,n]=g.useState(pw);g.useEffect(()=>{document.documentElement.setAttribute("lang",t),localStorage.setItem("hifi-lang",t)},[t]);const r=()=>n(i=>i==="de"?"en":"de"),s=i=>{const l=Ya[t]||Ya.de,o=yu(l,i);if(o!==void 0)return o;const u=yu(Ya.de,i);return u!==void 0?u:i};return a.jsx(ug.Provider,{value:{language:t,setLanguage:n,toggleLanguage:r,t:s},children:e})}function Ne(){return g.useContext(ug)}function cg({overHero:e=!1}){const{theme:t,toggleTheme:n}=hw(),{t:r}=Ne();return a.jsx("button",{onClick:n,"aria-label":r("themeToggle.label"),className:`rounded-full p-2 transition ${e?"text-white hover:bg-white/10":"text-neutral-600 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-neutral-800"}`,children:t==="dark"?a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"h-5 w-5",children:a.jsx("path",{d:"M12 3a1 1 0 011 1v1a1 1 0 11-2 0V4a1 1 0 011-1zm0 15a5 5 0 100-10 5 5 0 000 10zm9-6a1 1 0 010 2h-1a1 1 0 110-2h1zM4 12a1 1 0 010 2H3a1 1 0 110-2h1zm14.36-7.36a1 1 0 011.42 1.42l-.71.7a1 1 0 11-1.41-1.4l.7-.72zM5.64 18.36a1 1 0 011.41 1.41l-.7.71a1 1 0 11-1.42-1.41l.71-.71zm12.72 0l.71.7a1 1 0 11-1.41 1.42l-.71-.71a1 1 0 011.41-1.41zM6.34 5.64l-.7-.7A1 1 0 117.05 3.5l.7.71A1 1 0 016.34 5.64zM12 6a1 1 0 011-1v0a1 1 0 01-1 1zm0 12a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1z"})}):a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"h-5 w-5",children:a.jsx("path",{fillRule:"evenodd",d:"M9.53 2.25a.75.75 0 01.19.82 8.25 8.25 0 0011.03 11.03.75.75 0 011.01.99A10.5 10.5 0 1112.9 2.1a.75.75 0 011.63-.85z",clipRule:"evenodd"})})})}function Re({name:e,className:t="h-6 w-6",...n}){return e?a.jsx(Db,{name:e,className:t,...n}):null}const dg=g.createContext(null);function gw({children:e}){const[t,n]=g.useState(null),[r,s]=g.useState(!0);g.useEffect(()=>{M.get("/auth/me").then(d=>n(d.authenticated===!1?null:d)).catch(()=>n(null)).finally(()=>s(!1))},[]);const i=async(d,h)=>{const m=await M.post("/auth/login",{username:d,password:h});return m.requires_2fa?{requires2fa:!0}:(n(m),{requires2fa:!1})},l=async d=>{const h=await M.post("/auth/verify-2fa",{code:d});n(h)},o=async()=>{await M.post("/auth/logout",{}),n(null)},u=async()=>{const d=await M.get("/auth/me");n(d.authenticated===!1?null:d)},c=d=>{var h;return!!t&&(t.is_super_admin||((h=t.permissions)==null?void 0:h.includes(d)))};return a.jsx(dg.Provider,{value:{user:t,loading:r,login:i,verifyTwoFactor:l,logout:o,refreshUser:u,hasPermission:c},children:e})}function Mt(){return g.useContext(dg)}const hg=g.createContext({phone:"09373 20 62 390",whatsapp:null,contact_email:"info@hifi-planet-amorbach.de",hero_image_path:null,ga_measurement_id:null}),xw=hg.Provider;function Ir(){return g.useContext(hg)}const Hs="/assets/logo-BNfZDkmN.png",Ai="/assets/logo-dark-R-ckaBhx.png",bw="https://www.audio4cars.de/",Kh=e=>(e||"").replace(/[^\d+]/g,""),qh=70,vw=500;function yw({className:e}){return a.jsxs("svg",{viewBox:"0 0 3 2",className:e,"aria-hidden":"true",children:[a.jsx("rect",{width:"3",height:"0.667",y:"0",fill:"#000"}),a.jsx("rect",{width:"3",height:"0.667",y:"0.667",fill:"#D00"}),a.jsx("rect",{width:"3",height:"0.666",y:"1.334",fill:"#FFCE00"})]})}function kw({className:e}){return a.jsxs("svg",{viewBox:"0 0 60 30",className:e,"aria-hidden":"true",children:[a.jsx("clipPath",{id:"fgb-t",children:a.jsx("path",{d:"M30,15 h30 v15 z v15 h-30 z h-30 v-15 z v-15 h30 z"})}),a.jsx("path",{d:"M0,0 v30 h60 v-30 z",fill:"#00247d"}),a.jsx("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#fff",strokeWidth:"6"}),a.jsx("path",{d:"M0,0 L60,30 M60,0 L0,30",clipPath:"url(#fgb-t)",stroke:"#cf142b",strokeWidth:"4"}),a.jsx("path",{d:"M30,0 v30 M0,15 h60",stroke:"#fff",strokeWidth:"10"}),a.jsx("path",{d:"M30,0 v30 M0,15 h60",stroke:"#cf142b",strokeWidth:"6"})]})}const ql=[{code:"de",label:"Deutsch",Flag:yw},{code:"en",label:"English",Flag:kw}];function ww({overHero:e=!1}){const{language:t,setLanguage:n,t:r}=Ne(),[s,i]=g.useState(!1),l=g.useRef(null),o=ql.find(u=>u.code===t)||ql[0];return g.useEffect(()=>{if(!s)return;const u=d=>{l.current&&!l.current.contains(d.target)&&i(!1)},c=d=>{d.key==="Escape"&&i(!1)};return document.addEventListener("mousedown",u),document.addEventListener("keydown",c),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",c)}},[s]),a.jsxs("div",{className:"relative",ref:l,children:[a.jsxs("button",{type:"button",onClick:()=>i(u=>!u),"aria-haspopup":"listbox","aria-expanded":s,"aria-label":r("languageToggle.label"),className:`flex items-center gap-1 rounded-full p-1.5 transition ${e?"hover:bg-white/10":"hover:bg-neutral-100 dark:hover:bg-neutral-800"}`,children:[a.jsx("span",{className:`block h-4 w-6 shrink-0 overflow-hidden rounded-[3px] ring-1 ${e?"ring-white/50":"ring-neutral-300 dark:ring-neutral-600"}`,children:a.jsx(o.Flag,{className:"h-full w-full"})}),a.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",className:`h-3 w-3 transition-transform ${e?"text-white/70":"text-neutral-400"} ${s?"rotate-180":""}`,children:a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z"})})]}),s&&a.jsx("div",{role:"listbox",className:"absolute right-0 z-50 mt-2 min-w-[9rem] overflow-hidden rounded-lg border border-neutral-200 bg-white py-1 shadow-lg dark:border-neutral-700 dark:bg-neutral-900",children:ql.map(u=>a.jsxs("button",{type:"button",role:"option","aria-selected":u.code===t,onClick:()=>{n(u.code),i(!1)},className:`flex w-full items-center gap-2 px-3 py-2 text-left text-sm transition hover:bg-neutral-100 dark:hover:bg-neutral-800 ${u.code===t?"font-semibold text-brand-600 dark:text-brand-400":"text-neutral-700 dark:text-neutral-200"}`,children:[a.jsx("span",{className:"block h-4 w-6 shrink-0 overflow-hidden rounded-[3px] ring-1 ring-neutral-300 dark:ring-neutral-600",children:a.jsx(u.Flag,{className:"h-full w-full"})}),u.label]},u.code))})]})}function jw(){const[e,t]=g.useState(!1),[n,r]=g.useState(!1),[s,i]=g.useState(!1),{user:l}=Mt(),{phone:o,whatsapp:u}=Ir(),{t:c}=Ne(),d=u?8:7,m=ot().pathname==="/",[f,b]=g.useState(!m);g.useEffect(()=>{if(!m){b(!0);return}const v=()=>b(window.scrollY>24);return v(),window.addEventListener("scroll",v,{passive:!0}),()=>window.removeEventListener("scroll",v)},[m]);const y=m&&!f;g.useEffect(()=>{if(e){r(!0);let j;const P=requestAnimationFrame(()=>{j=requestAnimationFrame(()=>i(!0))});return()=>{cancelAnimationFrame(P),j&&cancelAnimationFrame(j)}}i(!1);const v=vw+(d-1)*qh,w=setTimeout(()=>r(!1),v);return()=>clearTimeout(w)},[e,d]);const k=()=>`transition-all duration-500 ease-out ${s?"opacity-100":"opacity-0"}`,x=v=>({transitionDelay:`${(s?v:d-1-v)*qh}ms`,transform:s?"translateY(0)":"translateY(-140px)"}),p=l&&a.jsx(O,{to:"/admin","aria-label":c("nav.adminPanel"),title:c("nav.adminPanel"),className:`rounded-full p-2 transition ${y?"text-white hover:bg-white/10":"text-neutral-600 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-neutral-800"}`,children:a.jsx(Re,{name:"layout-dashboard",className:"h-5 w-5"})});return a.jsxs("header",{className:`sticky top-0 z-30 border-b transition-colors duration-300 ${y?"border-transparent bg-transparent":"border-neutral-200 bg-white/90 backdrop-blur dark:border-neutral-800 dark:bg-neutral-950/90"}`,children:[a.jsxs("div",{className:"mx-auto grid max-w-6xl grid-cols-[1fr_auto_1fr] items-center gap-3 px-4 py-3 sm:px-6",children:[a.jsx("div",{className:"flex items-center justify-self-start",children:a.jsx("button",{onClick:()=>t(!0),"aria-label":c("nav.openMenu"),className:`rounded-md p-2 transition ${y?"text-white hover:bg-white/10":"text-neutral-600 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-neutral-800"}`,children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-6 w-6",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h16"})})})}),a.jsxs(O,{to:"/",className:"flex items-center justify-self-center rounded-lg px-2 py-1",children:[a.jsx("img",{src:Hs,alt:"HifiPlanet",className:"h-14 w-auto dark:hidden sm:h-16"}),a.jsx("img",{src:Ai,alt:"HifiPlanet",className:"hidden h-14 w-auto dark:block sm:h-16"})]}),a.jsxs("div",{className:"flex items-center justify-self-end gap-1",children:[p,!e&&a.jsx(ww,{overHero:y}),a.jsx(cg,{overHero:y})]})]}),n&&Wc.createPortal(a.jsx("div",{className:"fixed inset-0 z-[100] overflow-y-auto text-left backdrop-blur-xl",style:{background:"linear-gradient(135deg, rgba(241,245,249,0.55) 0%, rgba(227,240,207,0.55) 50%, rgba(248,250,252,0.55) 100%)"},children:a.jsxs("div",{className:"relative mx-auto flex min-h-full max-w-6xl flex-col items-start justify-center gap-5 py-24 pl-6 pr-8 sm:pl-8",children:[a.jsxs("button",{onClick:()=>t(!1),"aria-label":c("nav.closeMenu"),className:"absolute left-6 top-8 flex items-center gap-2 text-neutral-600 hover:text-brand-600 sm:left-8 sm:top-[65px]",children:[a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-6 w-6",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6l12 12M18 6 6 18"})}),a.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide",children:c("nav.close")})]}),a.jsx(O,{to:"/fahrzeuge",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${k()}`,style:x(0),children:c("nav.vehicles")}),a.jsx(O,{to:"/leistungen",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${k()}`,style:x(1),children:c("nav.services")}),a.jsx(O,{to:"/galerie",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${k()}`,style:x(2),children:c("nav.gallery")}),a.jsx(O,{to:"/kontakt",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${k()}`,style:x(3),children:c("nav.contact")}),a.jsx("div",{className:`h-px w-16 bg-brand-500/60 ${k()}`,style:x(4)}),o&&a.jsxs("a",{href:`tel:${Kh(o)}`,className:`flex items-center gap-2 text-sm font-semibold uppercase tracking-wide text-neutral-600 hover:text-brand-600 ${k()}`,style:x(5),children:[a.jsx(Re,{name:"phone",className:"h-4 w-4"}),o]}),u&&a.jsxs("a",{href:`https://wa.me/${Kh(u).replace(/^0/,"49").replace("+","")}`,target:"_blank",rel:"noopener noreferrer",className:`flex items-center gap-2 text-sm font-semibold uppercase tracking-wide text-neutral-600 hover:text-brand-600 ${k()}`,style:x(6),children:[a.jsx(Re,{name:"message-circle",className:"h-4 w-4"}),c("nav.whatsapp")]}),a.jsxs("a",{href:bw,target:"_blank",rel:"noopener noreferrer",className:`flex items-center gap-2 text-sm font-semibold uppercase tracking-wide text-neutral-600 hover:text-brand-600 ${k()}`,style:x(u?7:6),children:[a.jsx(Re,{name:"shopping-bag",className:"h-4 w-4"}),c("nav.shop")]})]})}),document.body)]})}const Yh="hifiplanet-cookie-consent",mg={necessary:!0,external:!1,analytics:!1},fg=g.createContext({consent:mg,decided:!1,settingsOpen:!1,acceptAll:()=>{},rejectNonEssential:()=>{},saveCustom:()=>{},openSettings:()=>{},closeSettings:()=>{}});function Nw({children:e}){const[t,n]=g.useState(mg),[r,s]=g.useState(!1),[i,l]=g.useState(!1);g.useEffect(()=>{try{const f=localStorage.getItem(Yh);if(f){const b=JSON.parse(f);n({necessary:!0,external:!!b.external,analytics:!!b.analytics}),s(!0)}}catch{}},[]);const o=g.useCallback(f=>{n(f),s(!0),l(!1),localStorage.setItem(Yh,JSON.stringify({...f,decidedAt:new Date().toISOString()}))},[]),u=g.useCallback(()=>o({necessary:!0,external:!0,analytics:!0}),[o]),c=g.useCallback(()=>o({necessary:!0,external:!1,analytics:!1}),[o]),d=g.useCallback(f=>o({necessary:!0,external:!!f.external,analytics:!!f.analytics}),[o]),h=g.useCallback(()=>l(!0),[]),m=g.useCallback(()=>l(!1),[]);return a.jsx(fg.Provider,{value:{consent:t,decided:r,settingsOpen:i,acceptAll:u,rejectNonEssential:c,saveCustom:d,openSettings:h,closeSettings:m},children:e})}function Rr(){return g.useContext(fg)}const Sw=e=>(e||"").replace(/[^\d+]/g,""),Cw=encodeURIComponent("Boxbrunner Str. 20a, 63916 Amorbach"),Pw=`https://www.google.com/maps/dir/?api=1&destination=${Cw}`;function Ew(){const e=new Date,t=e.getHours()*60+e.getMinutes(),n=e.getDay();return n===0?!1:n===6?t>=10*60&&t<13*60:t>=9*60&&t<18*60}function Tw(){const e=Ew(),{openSettings:t}=Rr(),{pathname:n}=ot(),r=n==="/",{phone:s,contact_email:i}=Ir(),{t:l}=Ne(),o=[{key:"monFri",days:l("footer.days.monFri"),label:l("contactPage.hoursWeek")},{key:"sat",days:l("footer.days.sat"),label:l("contactPage.hoursSat")},{key:"sun",days:l("footer.days.sun"),label:l("footer.closed")}];return a.jsxs("footer",{className:`border-t border-neutral-200 bg-neutral-50 py-10 text-sm text-neutral-600 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-300 ${r?"pb-24":""}`,children:[a.jsxs("div",{className:"mx-auto grid max-w-6xl gap-4 px-4 sm:grid-cols-3 sm:px-6",children:[a.jsxs("div",{className:"rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[a.jsx(Re,{name:"map-pin",className:"h-4 w-4 text-brand-500"}),a.jsx("p",{className:"font-semibold text-neutral-900 dark:text-white",children:"HifiPlanet"})]}),a.jsx("p",{children:"Boxbrunner Str. 20a"}),a.jsx("p",{children:"63916 Amorbach"}),a.jsxs("a",{href:Pw,target:"_blank",rel:"noopener noreferrer",className:"mt-4 flex items-center justify-center gap-1.5 rounded-md bg-brand-500 px-3 py-2 text-xs font-semibold text-white hover:bg-brand-600",children:[a.jsx(Re,{name:"navigation",className:"h-3.5 w-3.5"}),l("footer.routePlan")]})]}),a.jsxs("div",{className:"rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[a.jsx(Re,{name:"phone",className:"h-4 w-4 text-brand-500"}),a.jsx("p",{className:"font-semibold text-neutral-900 dark:text-white",children:l("footer.contactHeading")})]}),a.jsx("p",{children:a.jsx("a",{href:`tel:${Sw(s)}`,className:"inline-block py-1 hover:text-brand-500",children:s})}),a.jsx("p",{children:a.jsx("a",{href:`mailto:${i}`,className:"inline-block py-1 hover:text-brand-500",children:i})}),a.jsx(O,{to:"/kontakt",className:"mt-4 flex items-center justify-center gap-1.5 rounded-md border border-neutral-300 px-3 py-2 text-xs font-semibold text-neutral-700 hover:border-brand-500 hover:text-brand-600 dark:border-neutral-700 dark:text-neutral-200",children:l("footer.contactForm")})]}),a.jsxs("div",{className:"rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsxs("div",{className:"mb-3 flex items-center justify-between gap-2",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Re,{name:"clock",className:"h-4 w-4 text-brand-500"}),a.jsx("p",{className:"font-semibold text-neutral-900 dark:text-white",children:l("footer.hoursHeading")})]}),a.jsxs("span",{className:`flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[11px] font-semibold ${e?"bg-green-100 text-green-700 dark:bg-green-900/40 dark:text-green-300":"bg-neutral-100 text-neutral-500 dark:bg-neutral-800 dark:text-neutral-400"}`,children:[a.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${e?"bg-green-500":"bg-neutral-400"}`}),l(e?"footer.open":"footer.closed")]})]}),a.jsx("dl",{className:"space-y-1.5",children:o.map(u=>a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[a.jsx("dt",{className:"text-neutral-500 dark:text-neutral-400",children:u.days}),a.jsx("dd",{className:"font-medium text-neutral-700 dark:text-neutral-200",children:u.label})]},u.key))})]})]}),a.jsx("div",{className:"mx-auto mt-8 max-w-6xl border-t border-neutral-200 px-4 pt-6 text-center text-xs text-neutral-500 dark:border-neutral-800 dark:text-neutral-400 sm:px-6",children:a.jsxs("p",{className:"flex flex-wrap items-center justify-center gap-x-2 gap-y-1",children:[a.jsx("span",{children:l("footer.copyright")(new Date().getFullYear())}),a.jsx("span",{children:"·"}),a.jsx(O,{to:"/impressum",className:"hover:text-brand-500",children:l("footer.imprint")}),a.jsx("span",{children:"·"}),a.jsx(O,{to:"/datenschutz",className:"hover:text-brand-500",children:l("footer.privacy")}),a.jsx("span",{children:"·"}),a.jsx(O,{to:"/agb",className:"hover:text-brand-500",children:l("footer.terms")}),a.jsx("span",{children:"·"}),a.jsx("button",{type:"button",onClick:t,className:"hover:text-brand-500",children:l("footer.cookieSettings")})]})})]})}const Kc=g.createContext({});function bn(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const Aw=typeof window<"u",ta=Aw?g.useLayoutEffect:g.useEffect,ul=g.createContext(null);function qc(e,t){e.indexOf(t)===-1&&e.push(t)}function Mi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const kt=(e,t,n)=>n>t?t:n<e?e:n;let Yc=()=>{};const vn={},pg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),gg=e=>typeof e=="object"&&e!==null,xg=e=>/^0[^.\s]+$/u.test(e);function bg(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ue=e=>e,na=(...e)=>e.reduce((t,n)=>r=>n(t(r))),Cr=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class Xc{constructor(){this.subscriptions=[]}add(t){return qc(this.subscriptions,t),()=>Mi(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const l=this.subscriptions[i];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ke=e=>e*1e3,rt=e=>e/1e3,Zc=(e,t)=>t?e*(1e3/t):0,vg=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Mw=1e-7,_w=12;function Dw(e,t,n,r,s){let i,l,o=0;do l=t+(n-t)/2,i=vg(l,r,s)-e,i>0?n=l:t=l;while(Math.abs(i)>Mw&&++o<_w);return l}function ra(e,t,n,r){if(e===t&&n===r)return Ue;const s=i=>Dw(i,0,1,e,n);return i=>i===0||i===1?i:vg(s(i),t,r)}const yg=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,kg=e=>t=>1-e(1-t),wg=ra(.33,1.53,.69,.99),Qc=kg(wg),jg=yg(Qc),Ng=e=>e>=1?1:(e*=2)<1?.5*Qc(e):.5*(2-Math.pow(2,-10*(e-1))),Jc=e=>1-Math.sin(Math.acos(e)),Sg=kg(Jc),Cg=yg(Jc),Lw=ra(.42,0,1,1),Bw=ra(0,0,.58,1),Pg=ra(.42,0,.58,1),zw=e=>Array.isArray(e)&&typeof e[0]!="number",Eg=e=>Array.isArray(e)&&typeof e[0]=="number",Iw={linear:Ue,easeIn:Lw,easeInOut:Pg,easeOut:Bw,circIn:Jc,circInOut:Cg,circOut:Sg,backIn:Qc,backInOut:jg,backOut:wg,anticipate:Ng},Rw=e=>typeof e=="string",Xh=e=>{if(Eg(e)){Yc(e.length===4);const[t,n,r,s]=e;return ra(t,n,r,s)}else if(Rw(e))return Iw[e];return e},Ea=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Fw(e){let t=new Set,n=new Set,r=!1,s=!1;const i=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function o(c){i.has(c)&&(u.schedule(c),e()),c(l)}const u={schedule:(c,d=!1,h=!1)=>{const f=h&&r?t:n;return d&&i.add(c),f.add(c),c},cancel:c=>{n.delete(c),i.delete(c)},process:c=>{if(l=c,r){s=!0;return}r=!0;const d=t;t=n,n=d,t.forEach(o),t.clear(),r=!1,s&&(s=!1,u.process(c))}};return u}const Vw=40;function Tg(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,l=Ea.reduce((v,w)=>(v[w]=Fw(i),v),{}),{setup:o,read:u,resolveKeyframes:c,preUpdate:d,update:h,preRender:m,render:f,postRender:b}=l,y=()=>{const v=vn.useManualTiming,w=v?s.timestamp:performance.now();n=!1,v||(s.delta=r?1e3/60:Math.max(Math.min(w-s.timestamp,Vw),1)),s.timestamp=w,s.isProcessing=!0,o.process(s),u.process(s),c.process(s),d.process(s),h.process(s),m.process(s),f.process(s),b.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(y))},k=()=>{n=!0,r=!0,s.isProcessing||e(y)};return{schedule:Ea.reduce((v,w)=>{const j=l[w];return v[w]=(P,C=!1,N=!1)=>(n||k(),j.schedule(P,C,N)),v},{}),cancel:v=>{for(let w=0;w<Ea.length;w++)l[Ea[w]].cancel(v)},state:s,steps:l}}const{schedule:K,cancel:lt,state:xe,steps:Yl}=Tg(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ue,!0);let Xa;function Ow(){Xa=void 0}const Ae={now:()=>(Xa===void 0&&Ae.set(xe.isProcessing||vn.useManualTiming?xe.timestamp:performance.now()),Xa),set:e=>{Xa=e,queueMicrotask(Ow)}},Ag=e=>t=>typeof t=="string"&&t.startsWith(e),Mg=Ag("--"),Uw=Ag("var(--"),ed=e=>Uw(e)?Ww.test(e.split("/*")[0].trim()):!1,Ww=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Zh(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Fr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},$s={...Fr,transform:e=>kt(0,1,e)},Ta={...Fr,default:1},xs=e=>Math.round(e*1e5)/1e5,td=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Hw(e){return e==null}const $w=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,nd=(e,t)=>n=>!!(typeof n=="string"&&$w.test(n)&&n.startsWith(e)||t&&!Hw(n)&&Object.prototype.hasOwnProperty.call(n,t)),_g=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,l,o]=r.match(td);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(l),alpha:o!==void 0?parseFloat(o):1}},Gw=e=>kt(0,255,e),Xl={...Fr,transform:e=>Math.round(Gw(e))},_n={test:nd("rgb","red"),parse:_g("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Xl.transform(e)+", "+Xl.transform(t)+", "+Xl.transform(n)+", "+xs($s.transform(r))+")"};function Kw(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const ku={test:nd("#"),parse:Kw,transform:_n.transform},sa=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Lt=sa("deg"),Tt=sa("%"),z=sa("px"),qw=sa("vh"),Yw=sa("vw"),Qh={...Tt,parse:e=>Tt.parse(e)/100,transform:e=>Tt.transform(e*100)},or={test:nd("hsl","hue"),parse:_g("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Tt.transform(xs(t))+", "+Tt.transform(xs(n))+", "+xs($s.transform(r))+")"},de={test:e=>_n.test(e)||ku.test(e)||or.test(e),parse:e=>_n.test(e)?_n.parse(e):or.test(e)?or.parse(e):ku.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?_n.transform(e):or.transform(e),getAnimatableNone:e=>{const t=de.parse(e);return t.alpha=0,de.transform(t)}},Xw=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Zw(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(td))==null?void 0:t.length)||0)+(((n=e.match(Xw))==null?void 0:n.length)||0)>0}const Dg="number",Lg="color",Qw="var",Jw="var(",Jh="${}",e1=/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 Pr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const o=t.replace(e1,u=>(de.test(u)?(r.color.push(i),s.push(Lg),n.push(de.parse(u))):u.startsWith(Jw)?(r.var.push(i),s.push(Qw),n.push(u)):(r.number.push(i),s.push(Dg),n.push(parseFloat(u))),++i,Jh)).split(Jh);return{values:n,split:o,indexes:r,types:s}}function t1(e){return Pr(e).values}function Bg({split:e,types:t}){const n=e.length;return r=>{let s="";for(let i=0;i<n;i++)if(s+=e[i],r[i]!==void 0){const l=t[i];l===Dg?s+=xs(r[i]):l===Lg?s+=de.transform(r[i]):s+=r[i]}return s}}function n1(e){return Bg(Pr(e))}const r1=e=>typeof e=="number"?0:de.test(e)?de.getAnimatableNone(e):e,s1=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:r1(e);function a1(e){const t=Pr(e);return Bg(t)(t.values.map((r,s)=>s1(r,t.split[s])))}const vt={test:Zw,parse:t1,createTransformer:n1,getAnimatableNone:a1};function Zl(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 i1({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,l=0;if(!t)s=i=l=n;else{const o=n<.5?n*(1+t):n+t-n*t,u=2*n-o;s=Zl(u,o,e+1/3),i=Zl(u,o,e),l=Zl(u,o,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(l*255),alpha:r}}function _i(e,t){return n=>n>0?t:e}const Q=(e,t,n)=>e+(t-e)*n,Ql=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},l1=[ku,_n,or],o1=e=>l1.find(t=>t.test(e));function em(e){const t=o1(e);if(!t)return!1;let n=t.parse(e);return t===or&&(n=i1(n)),n}const tm=(e,t)=>{const n=em(e),r=em(t);if(!n||!r)return _i(e,t);const s={...n};return i=>(s.red=Ql(n.red,r.red,i),s.green=Ql(n.green,r.green,i),s.blue=Ql(n.blue,r.blue,i),s.alpha=Q(n.alpha,r.alpha,i),_n.transform(s))},wu=new Set(["none","hidden"]);function u1(e,t){return wu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function c1(e,t){return n=>Q(e,t,n)}function rd(e){return typeof e=="number"?c1:typeof e=="string"?ed(e)?_i:de.test(e)?tm:m1:Array.isArray(e)?zg:typeof e=="object"?de.test(e)?tm:d1:_i}function zg(e,t){const n=[...e],r=n.length,s=e.map((i,l)=>rd(i)(i,t[l]));return i=>{for(let l=0;l<r;l++)n[l]=s[l](i);return n}}function d1(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=rd(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function h1(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],l=e.indexes[i][r[i]],o=e.values[l]??0;n[s]=o,r[i]++}return n}const m1=(e,t)=>{const n=vt.createTransformer(t),r=Pr(e),s=Pr(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?wu.has(e)&&!s.values.length||wu.has(t)&&!r.values.length?u1(e,t):na(zg(h1(r,s),s.values),n):_i(e,t)};function Ig(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Q(e,t,n):rd(e)(e,t)}const f1=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>K.update(t,n),stop:()=>lt(t),now:()=>xe.isProcessing?xe.timestamp:Ae.now()}},Rg=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=Math.round(e(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Di=2e4;function sd(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Di;)t+=n,r=e.next(t);return t>=Di?1/0:t}function p1(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(sd(r),Di);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:rt(s)}}const oe={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function ju(e,t){return e*Math.sqrt(1-t*t)}const g1=12;function x1(e,t,n){let r=n;for(let s=1;s<g1;s++)r=r-e(r)/t(r);return r}const Jl=.001;function b1({duration:e=oe.duration,bounce:t=oe.bounce,velocity:n=oe.velocity,mass:r=oe.mass}){let s,i,l=1-t;l=kt(oe.minDamping,oe.maxDamping,l),e=kt(oe.minDuration,oe.maxDuration,rt(e)),l<1?(s=c=>{const d=c*l,h=d*e,m=d-n,f=ju(c,l),b=Math.exp(-h);return Jl-m/f*b},i=c=>{const h=c*l*e,m=h*n+n,f=Math.pow(l,2)*Math.pow(c,2)*e,b=Math.exp(-h),y=ju(Math.pow(c,2),l);return(-s(c)+Jl>0?-1:1)*((m-f)*b)/y}):(s=c=>{const d=Math.exp(-c*e),h=(c-n)*e+1;return-Jl+d*h},i=c=>{const d=Math.exp(-c*e),h=(n-c)*(e*e);return d*h});const o=5/e,u=x1(s,i,o);if(e=Ke(e),isNaN(u))return{stiffness:oe.stiffness,damping:oe.damping,duration:e};{const c=Math.pow(u,2)*r;return{stiffness:c,damping:l*2*Math.sqrt(r*c),duration:e}}}const v1=["duration","bounce"],y1=["stiffness","damping","mass"];function nm(e,t){return t.some(n=>e[n]!==void 0)}function k1(e){let t={velocity:oe.velocity,stiffness:oe.stiffness,damping:oe.damping,mass:oe.mass,isResolvedFromDuration:!1,...e};if(!nm(e,y1)&&nm(e,v1))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*kt(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:oe.mass,stiffness:s,damping:i}}else{const n=b1({...e,velocity:0});t={...t,...n,mass:oe.mass},t.isResolvedFromDuration=!0}return t}function Li(e=oe.visualDuration,t=oe.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],o={done:!1,value:i},{stiffness:u,damping:c,mass:d,duration:h,velocity:m,isResolvedFromDuration:f}=k1({...n,velocity:-rt(n.velocity||0)}),b=m||0,y=c/(2*Math.sqrt(u*d)),k=l-i,x=rt(Math.sqrt(u/d)),p=Math.abs(k)<5;r||(r=p?oe.restSpeed.granular:oe.restSpeed.default),s||(s=p?oe.restDelta.granular:oe.restDelta.default);let v,w,j,P,C,N;if(y<1)j=ju(x,y),P=(b+y*x*k)/j,v=E=>{const T=Math.exp(-y*x*E);return l-T*(P*Math.sin(j*E)+k*Math.cos(j*E))},C=y*x*P+k*j,N=y*x*k-P*j,w=E=>Math.exp(-y*x*E)*(C*Math.sin(j*E)+N*Math.cos(j*E));else if(y===1){v=T=>l-Math.exp(-x*T)*(k+(b+x*k)*T);const E=b+x*k;w=T=>Math.exp(-x*T)*(x*E*T-b)}else{const E=x*Math.sqrt(y*y-1);v=Y=>{const J=Math.exp(-y*x*Y),R=Math.min(E*Y,300);return l-J*((b+y*x*k)*Math.sinh(R)+E*k*Math.cosh(R))/E};const T=(b+y*x*k)/E,I=y*x*T-k*E,U=y*x*k-T*E;w=Y=>{const J=Math.exp(-y*x*Y),R=Math.min(E*Y,300);return J*(I*Math.sinh(R)+U*Math.cosh(R))}}const S={calculatedDuration:f&&h||null,velocity:E=>Ke(w(E)),next:E=>{if(!f&&y<1){const I=Math.exp(-y*x*E),U=Math.sin(j*E),Y=Math.cos(j*E),J=l-I*(P*U+k*Y),R=Ke(I*(C*U+N*Y));return o.done=Math.abs(R)<=r&&Math.abs(l-J)<=s,o.value=o.done?l:J,o}const T=v(E);if(f)o.done=E>=h;else{const I=Ke(w(E));o.done=Math.abs(I)<=r&&Math.abs(l-T)<=s}return o.value=o.done?l:T,o},toString:()=>{const E=Math.min(sd(S),Di),T=Rg(I=>S.next(E*I).value,E,30);return E+"ms "+T},toTransition:()=>{}};return S}Li.applyToOptions=e=>{const t=p1(e,100,Li);return e.ease=t.ease,e.duration=Ke(t.duration),e.type="keyframes",e};const w1=5;function Fg(e,t,n){const r=Math.max(t-w1,0);return Zc(n-e(r),t-r)}function Nu({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:l,min:o,max:u,restDelta:c=.5,restSpeed:d}){const h=e[0],m={done:!1,value:h},f=N=>o!==void 0&&N<o||u!==void 0&&N>u,b=N=>o===void 0?u:u===void 0||Math.abs(o-N)<Math.abs(u-N)?o:u;let y=n*t;const k=h+y,x=l===void 0?k:l(k);x!==k&&(y=x-h);const p=N=>-y*Math.exp(-N/r),v=N=>x+p(N),w=N=>{const S=p(N),E=v(N);m.done=Math.abs(S)<=c,m.value=m.done?x:E};let j,P;const C=N=>{f(m.value)&&(j=N,P=Li({keyframes:[m.value,b(m.value)],velocity:Fg(v,N,m.value),damping:s,stiffness:i,restDelta:c,restSpeed:d}))};return C(0),{calculatedDuration:null,next:N=>{let S=!1;return!P&&j===void 0&&(S=!0,w(N),C(N)),j!==void 0&&N>=j?P.next(N-j):(!S&&w(N),m)}}}function j1(e,t,n){const r=[],s=n||vn.mix||Ig,i=e.length-1;for(let l=0;l<i;l++){let o=s(e[l],e[l+1]);if(t){const u=Array.isArray(t)?t[l]||Ue:t;o=na(u,o)}r.push(o)}return r}function ad(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(Yc(i===t.length),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=j1(t,r,s),u=o.length,c=d=>{if(l&&d<e[0])return t[0];let h=0;if(u>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const m=Cr(e[h],e[h+1],d);return o[h](m)};return n?d=>c(kt(e[0],e[i-1],d)):c}function N1(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Cr(0,t,r);e.push(Q(n,1,s))}}function Vg(e){const t=[0];return N1(t,e.length-1),t}function S1(e,t){return e.map(n=>n*t)}function C1(e,t){return e.map(()=>t||Pg).splice(0,e.length-1)}function bs({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=zw(r)?r.map(Xh):Xh(r),i={done:!1,value:t[0]},l=S1(n&&n.length===t.length?n:Vg(t),e),o=ad(l,t,{ease:Array.isArray(s)?s:C1(t,s)});return{calculatedDuration:e,next:u=>(i.value=o(u),i.done=u>=e,i)}}const P1=e=>e!==null;function cl(e,{repeat:t,repeatType:n="loop"},r,s=1){const i=e.filter(P1),o=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const E1={decay:Nu,inertia:Nu,tween:bs,keyframes:bs,spring:Li};function Og(e){typeof e.type=="string"&&(e.type=E1[e.type])}class id{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const T1=e=>e/100;class Gs extends id{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==Ae.now()&&this.tick(Ae.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Og(t);const{type:n=bs,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:l=0}=t;let{keyframes:o}=t;const u=n||bs;u!==bs&&typeof o[0]!="number"&&(this.mixKeyframes=na(T1,Ig(o[0],o[1])),o=[0,100]);const c=u({...t,keyframes:o});i==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...o].reverse(),velocity:-l})),c.calculatedDuration===null&&(c.calculatedDuration=sd(c));const{calculatedDuration:d}=c;this.calculatedDuration=d,this.resolvedDuration=d+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:l,resolvedDuration:o,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:d,repeat:h,repeatType:m,repeatDelay:f,type:b,onUpdate:y,finalKeyframe:k}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const x=this.currentTime-c*(this.playbackSpeed>=0?1:-1),p=this.playbackSpeed>=0?x<0:x>s;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let v=this.currentTime,w=r;if(h){const N=Math.min(this.currentTime,s)/o;let S=Math.floor(N),E=N%1;!E&&N>=1&&(E=1),E===1&&S--,S=Math.min(S,h+1),!!(S%2)&&(m==="reverse"?(E=1-E,f&&(E-=f/o)):m==="mirror"&&(w=l)),v=kt(0,1,E)*o}let j;p?(this.delayState.value=d[0],j=this.delayState):j=w.next(v),i&&!p&&(j.value=i(j.value));let{done:P}=j;!p&&u!==null&&(P=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return C&&b!==Nu&&(j.value=cl(d,this.options,k,this.speed)),y&&y(j.value),C&&this.finish(),j}then(t,n){return this.finished.then(t,n)}get duration(){return rt(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+rt(t)}get time(){return rt(this.currentTime)}set time(t){t=Ke(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return Fg(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(Ae.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=rt(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:t=f1,startTime:n}=this.options;this.driver||(this.driver=t(l=>this.tick(l))),(i=(s=this.options).onPlay)==null||i.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ae.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function A1(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Dn=e=>e*180/Math.PI,Su=e=>{const t=Dn(Math.atan2(e[1],e[0]));return Cu(t)},M1={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Su,rotateZ:Su,skewX:e=>Dn(Math.atan(e[1])),skewY:e=>Dn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Cu=e=>(e=e%360,e<0&&(e+=360),e),rm=Su,sm=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),am=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),_1={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:sm,scaleY:am,scale:e=>(sm(e)+am(e))/2,rotateX:e=>Cu(Dn(Math.atan2(e[6],e[5]))),rotateY:e=>Cu(Dn(Math.atan2(-e[2],e[0]))),rotateZ:rm,rotate:rm,skewX:e=>Dn(Math.atan(e[4])),skewY:e=>Dn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Pu(e){return e.includes("scale")?1:0}function Eu(e,t){if(!e||e==="none")return Pu(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=_1,s=n;else{const o=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=M1,s=o}if(!s)return Pu(t);const i=r[t],l=s[1].split(",").map(L1);return typeof i=="function"?i(l):l[i]}const D1=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Eu(n,t)};function L1(e){return parseFloat(e.trim())}const Vr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Or=new Set([...Vr,"pathRotation"]),im=e=>e===Fr||e===z,B1=new Set(["x","y","z"]),z1=Vr.filter(e=>!B1.has(e));function I1(e){const t=[];return z1.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const sn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Eu(t,"x"),y:(e,{transform:t})=>Eu(t,"y")};sn.translateX=sn.x;sn.translateY=sn.y;const zn=new Set;let Tu=!1,Au=!1,Mu=!1;function Ug(){if(Au){const e=Array.from(zn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=I1(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,l])=>{var o;(o=r.getValue(i))==null||o.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Au=!1,Tu=!1,zn.forEach(e=>e.complete(Mu)),zn.clear()}function Wg(){zn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Au=!0)})}function R1(){Mu=!0,Wg(),Ug(),Mu=!1}class ld{constructor(t,n,r,s,i,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(zn.add(this),Tu||(Tu=!0,K.read(Wg),K.resolveKeyframes(Ug))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const i=s==null?void 0:s.get(),l=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const o=r.readValue(n,l);o!=null&&(t[0]=o)}t[0]===void 0&&(t[0]=l),s&&i===void 0&&s.set(t[0])}A1(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),zn.delete(this)}cancel(){this.state==="scheduled"&&(zn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const F1=e=>e.startsWith("--");function Hg(e,t,n){F1(t)?e.style.setProperty(t,n):e.style[t]=n}const V1={};function od(e,t){const n=bg(e);return()=>V1[t]??n()}const ud=od(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),$g=od(()=>window.ViewTimeline!==void 0,"viewTimeline"),Gg=od(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),is=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,lm={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:is([0,.65,.55,1]),circOut:is([.55,0,1,.45]),backIn:is([.31,.01,.66,-.59]),backOut:is([.33,1.53,.69,.99])};function Kg(e,t){if(e)return typeof e=="function"?Gg()?Rg(e,t):"ease-out":Eg(e)?is(e):Array.isArray(e)?e.map(n=>Kg(n,t)||lm.easeOut):lm[e]}function O1(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:l="loop",ease:o="easeOut",times:u}={},c=void 0){const d={[t]:n};u&&(d.offset=u);const h=Kg(o,s);Array.isArray(h)&&(d.easing=h);const m={delay:r,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:l==="reverse"?"alternate":"normal"};return c&&(m.pseudoElement=c),e.animate(d,m)}function qg(e){return typeof e=="function"&&"applyToOptions"in e}function U1({type:e,...t}){return qg(e)&&Gg()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Yg extends id{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:l=!1,finalKeyframe:o,onComplete:u}=t;this.isPseudoElement=!!i,this.allowFlatten=l,this.options=t,Yc(typeof t.type!="string");const c=U1(t);this.animation=O1(n,r,s,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=cl(s,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(d),Hg(n,r,d),this.animation.cancel()}u==null||u(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return rt(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+rt(t)}get time(){return rt(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ke(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:s}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&ud()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),Ue):s(this)}}const Xg={anticipate:Ng,backInOut:jg,circInOut:Cg};function W1(e){return e in Xg}function H1(e){typeof e.ease=="string"&&W1(e.ease)&&(e.ease=Xg[e.ease])}const eo=10;class $1 extends Yg{constructor(t){H1(t),Og(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const o=new Gs({...l,autoplay:!1}),u=Math.max(eo,Ae.now()-this.startTime),c=kt(0,eo,u-eo),d=o.sample(u).value,{name:h}=this.options;i&&h&&Hg(i,h,d),n.setWithVelocity(o.sample(Math.max(0,u-c)).value,d,c),o.stop()}}const om=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(vt.test(e)||e==="0")&&!e.startsWith("url("));function G1(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function K1(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],l=om(s,t),o=om(i,t);return!l||!o?!1:G1(e)||(n==="spring"||qg(n))&&r}function _u(e){e.duration=0,e.type="keyframes"}const Zg=new Set(["opacity","clipPath","filter","transform"]),q1=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Y1(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&q1.test(e[t]))return!0;return!1}const X1=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Z1=bg(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Q1(e){var h;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:i,type:l,keyframes:o}=e;if(!(((h=t==null?void 0:t.owner)==null?void 0:h.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:d}=t.owner.getProps();return Z1()&&n&&(Zg.has(n)||X1.has(n)&&Y1(o))&&(n!=="transform"||!d)&&!c&&!r&&s!=="mirror"&&i!==0&&l!=="inertia"}const J1=40;class ej extends id{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:l="loop",keyframes:o,name:u,motionValue:c,element:d,...h}){var b;super(),this.stop=()=>{var y,k;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(k=this.keyframeResolver)==null||k.cancel()},this.createdAt=Ae.now();const m={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:l,name:u,motionValue:c,element:d,...h},f=(d==null?void 0:d.KeyframeResolver)||ld;this.keyframeResolver=new f(o,(y,k,x)=>this.onKeyframesResolved(y,k,m,!x),u,c,d),(b=this.keyframeResolver)==null||b.scheduleResolve()}onKeyframesResolved(t,n,r,s){var x,p;this.keyframeResolver=void 0;const{name:i,type:l,velocity:o,delay:u,isHandoff:c,onUpdate:d}=r;this.resolvedAt=Ae.now();let h=!0;K1(t,i,l,o)||(h=!1,(vn.instantAnimations||!u)&&(d==null||d(cl(t,r,n))),t[0]=t[t.length-1],_u(r),r.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>J1?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},b=h&&!c&&Q1(f),y=(p=(x=f.motionValue)==null?void 0:x.owner)==null?void 0:p.current;let k;if(b)try{k=new $1({...f,element:y})}catch{k=new Gs(f)}else k=new Gs(f);k.finished.then(()=>{this.notifyFinished()}).catch(Ue),this.pendingTimeline&&(this.stopTimeline=k.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=k}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),R1()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function Qg(e,t,n,r=0,s=1){const i=Array.from(e).sort((c,d)=>c.sortNodePosition(d)).indexOf(t),l=e.size,o=(l-1)*r;return typeof n=="function"?n(i,l):s===1?i*r:o-i*r}const um=30,tj=e=>!isNaN(parseFloat(e)),vs={current:void 0};class nj{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=Ae.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ae.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=tj(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 Xc);const r=this.events[t].add(n);return t==="change"?()=>{r(),K.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){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}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()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return vs.current&&vs.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Ae.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>um)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,um);return Zc(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(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function gt(e,t){return new nj(e,t)}function Jg(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function cd(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?Jg(n,e):n}const rj={type:"spring",stiffness:500,damping:25,restSpeed:10},sj=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),aj={type:"keyframes",duration:.8},ij={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},lj=(e,{keyframes:t})=>t.length>2?aj:Or.has(e)?e.startsWith("scale")?sj(t[1]):rj:ij,oj=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function uj(e){for(const t in e)if(!oj.has(t))return!0;return!1}const dd=(e,t,n,r={},s,i)=>l=>{const o=cd(r,e)||{},u=o.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Ke(u);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-c,onUpdate:m=>{t.set(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{l(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:i?void 0:s};uj(o)||Object.assign(d,lj(e,d)),d.duration&&(d.duration=Ke(d.duration)),d.repeatDelay&&(d.repeatDelay=Ke(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(_u(d),d.delay===0&&(h=!0)),(vn.instantAnimations||vn.skipAnimations||s!=null&&s.shouldSkipAnimations||o.skipAnimations)&&(h=!0,_u(d),d.delay=0),d.allowFlatten=!o.type&&!o.ease,h&&!i&&t.get()!==void 0){const m=cl(d.keyframes,o);if(m!==void 0){K.update(()=>{d.onUpdate(m),d.onComplete()});return}}return o.isSync?new Gs(d):new ej(d)},cj=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function dj(e){const t=cj.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function ex(e,t,n=1){const[r,s]=dj(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const l=i.trim();return pg(l)?parseFloat(l):l}return ed(s)?ex(s,t,n+1):s}function cm(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function hd(e,t,n,r){if(typeof t=="function"){const[s,i]=cm(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=cm(r);t=t(n!==void 0?n:e.custom,s,i)}return t}function In(e,t,n){const r=e.getProps();return hd(r,t,n!==void 0?n:r.custom,e)}const tx=new Set(["width","height","top","left","right","bottom",...Vr]),Du=e=>Array.isArray(e);function hj(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,gt(n))}function mj(e){return Du(e)?e[e.length-1]||0:e}function fj(e,t){const n=In(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const l in i){const o=mj(i[l]);hj(e,l,o)}}const ge=e=>!!(e&&e.getVelocity);function pj(e){return!!(ge(e)&&e.add)}function Lu(e,t){const n=e.getValue("willChange");if(pj(n))return n.add(t);if(!n&&vn.WillChange){const r=new vn.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function md(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const gj="framerAppearId",nx="data-"+md(gj);function rx(e){return e.props[nx]}function xj({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function sx(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:l,...o}=t;const u=e.getDefaultTransition();i=i?Jg(i,u):u;const c=i==null?void 0:i.reduceMotion,d=i==null?void 0:i.skipAnimations;r&&(i=r);const h=[],m=s&&e.animationState&&e.animationState.getState()[s],f=i==null?void 0:i.path;f&&f.animateVisualElement(e,o,i,n,h);for(const b in o){const y=e.getValue(b,e.latestValues[b]??null),k=o[b];if(k===void 0||m&&xj(m,b))continue;const x={delay:n,...cd(i||{},b)};d&&(x.skipAnimations=!0);const p=y.get();if(p!==void 0&&!y.isAnimating()&&!Array.isArray(k)&&k===p&&!x.velocity){K.update(()=>y.set(k));continue}let v=!1;if(window.MotionHandoffAnimation){const P=rx(e);if(P){const C=window.MotionHandoffAnimation(P,b,K);C!==null&&(x.startTime=C,v=!0)}}Lu(e,b);const w=c??e.shouldReduceMotion;y.start(dd(b,y,k,w&&tx.has(b)?{type:!1}:x,e,v));const j=y.animation;j&&h.push(j)}if(l){const b=()=>K.update(()=>{l&&fj(e,l)});h.length?Promise.all(h).then(b):b()}return h}function Bu(e,t,n={}){var u;const r=In(e,t,n.type==="exit"?(u=e.presenceContext)==null?void 0:u.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(sx(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:m}=s;return bj(e,t,c,d,h,m,n)}:()=>Promise.resolve(),{when:o}=s;if(o){const[c,d]=o==="beforeChildren"?[i,l]:[l,i];return c().then(()=>d())}else return Promise.all([i(),l(n.delay)])}function bj(e,t,n=0,r=0,s=0,i=1,l){const o=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),o.push(Bu(u,t,{...l,delay:n+(typeof r=="function"?0:r)+Qg(e.variantChildren,u,r,s,i)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(o)}function vj(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>Bu(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=Bu(e,t,n);else{const s=typeof t=="function"?In(e,t,n.custom):t;r=Promise.all(sx(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const yj={test:e=>e==="auto",parse:e=>e},ax=e=>t=>t.test(e),ix=[Fr,z,Tt,Lt,Yw,qw,yj],dm=e=>ix.find(ax(e));function kj(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xg(e):!0}const wj=new Set(["brightness","contrast","saturate","opacity"]);function jj(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(td)||[];if(!r)return e;const s=n.replace(r,"");let i=wj.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const Nj=/\b([a-z-]*)\(.*?\)/gu,zu={...vt,getAnimatableNone:e=>{const t=e.match(Nj);return t?t.map(jj).join(" "):e}},Iu={...vt,getAnimatableNone:e=>{const t=vt.parse(e);return vt.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},hm={...Fr,transform:Math.round},Sj={rotate:Lt,pathRotation:Lt,rotateX:Lt,rotateY:Lt,rotateZ:Lt,scale:Ta,scaleX:Ta,scaleY:Ta,scaleZ:Ta,skew:Lt,skewX:Lt,skewY:Lt,distance:z,translateX:z,translateY:z,translateZ:z,x:z,y:z,z,perspective:z,transformPerspective:z,opacity:$s,originX:Qh,originY:Qh,originZ:z},Bi={borderWidth:z,borderTopWidth:z,borderRightWidth:z,borderBottomWidth:z,borderLeftWidth:z,borderRadius:z,borderTopLeftRadius:z,borderTopRightRadius:z,borderBottomRightRadius:z,borderBottomLeftRadius:z,width:z,maxWidth:z,height:z,maxHeight:z,top:z,right:z,bottom:z,left:z,inset:z,insetBlock:z,insetBlockStart:z,insetBlockEnd:z,insetInline:z,insetInlineStart:z,insetInlineEnd:z,padding:z,paddingTop:z,paddingRight:z,paddingBottom:z,paddingLeft:z,paddingBlock:z,paddingBlockStart:z,paddingBlockEnd:z,paddingInline:z,paddingInlineStart:z,paddingInlineEnd:z,margin:z,marginTop:z,marginRight:z,marginBottom:z,marginLeft:z,marginBlock:z,marginBlockStart:z,marginBlockEnd:z,marginInline:z,marginInlineStart:z,marginInlineEnd:z,fontSize:z,backgroundPositionX:z,backgroundPositionY:z,...Sj,zIndex:hm,fillOpacity:$s,strokeOpacity:$s,numOctaves:hm},Cj={...Bi,color:de,backgroundColor:de,outlineColor:de,fill:de,stroke:de,borderColor:de,borderTopColor:de,borderRightColor:de,borderBottomColor:de,borderLeftColor:de,filter:zu,WebkitFilter:zu,mask:Iu,WebkitMask:Iu},lx=e=>Cj[e],Pj=new Set([zu,Iu]);function ox(e,t){let n=lx(e);return Pj.has(n)||(n=vt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Ej=new Set(["auto","none","0"]);function Tj(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!Ej.has(i)&&Pr(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=ox(n,s)}class Aj extends ld{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),ed(h))){const m=ex(h,n.current);m!==void 0&&(t[d]=m),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!tx.has(r)||t.length!==2)return;const[s,i]=t,l=dm(s),o=dm(i),u=Zh(s),c=Zh(i);if(u!==c&&sn[r]){this.needsMeasurement=!0;return}if(l!==o)if(im(l)&&im(o))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else sn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||kj(t[s]))&&r.push(s);r.length&&Tj(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=sn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var o;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,l=r[i];r[i]=sn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),(o=this.removedTransforms)!=null&&o.length&&this.removedTransforms.forEach(([u,c])=>{t.getValue(u).set(c)}),this.resolveNoneKeyframes()}}const fd=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function ux(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const s=document.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(r=>r!=null)}const Ru=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ys(e){return gg(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Er,cancel:cx}=Tg(queueMicrotask,!1),ht={x:!1,y:!1};function dx(){return ht.x||ht.y}function Mj(e){return e==="x"||e==="y"?ht[e]?null:(ht[e]=!0,()=>{ht[e]=!1}):ht.x||ht.y?null:(ht.x=ht.y=!0,()=>{ht.x=ht.y=!1})}function hx(e,t){const n=ux(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function _j(e){return!(e.pointerType==="touch"||dx())}function Dj(e,t,n={}){const[r,s,i]=hx(e,n);return r.forEach(l=>{let o=!1,u=!1,c;const d=()=>{l.removeEventListener("pointerleave",b)},h=k=>{c&&(c(k),c=void 0),d()},m=k=>{o=!1,window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",m),u&&(u=!1,h(k))},f=()=>{o=!0,window.addEventListener("pointerup",m,s),window.addEventListener("pointercancel",m,s)},b=k=>{if(k.pointerType!=="touch"){if(o){u=!0;return}h(k)}},y=k=>{if(!_j(k))return;u=!1;const x=t(l,k);typeof x=="function"&&(c=x,l.addEventListener("pointerleave",b,s))};l.addEventListener("pointerenter",y,s),l.addEventListener("pointerdown",f,s)}),i}const mx=(e,t)=>t?e===t?!0:mx(e,t.parentElement):!1,pd=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Lj=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Bj(e){return Lj.has(e.tagName)||e.isContentEditable===!0}const zj=new Set(["INPUT","SELECT","TEXTAREA"]);function Ij(e){return zj.has(e.tagName)||e.isContentEditable===!0}const Za=new WeakSet;function mm(e){return t=>{t.key==="Enter"&&e(t)}}function to(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Rj=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=mm(()=>{if(Za.has(n))return;to(n,"down");const s=mm(()=>{to(n,"up")}),i=()=>to(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function fm(e){return pd(e)&&!dx()}const pm=new WeakSet;function Fj(e,t,n={}){const[r,s,i]=hx(e,n),l=o=>{const u=o.currentTarget;if(!fm(o)||pm.has(o))return;Za.add(u),n.stopPropagation&&pm.add(o);const c=t(u,o),d={...s,capture:!0},h=(b,y)=>{window.removeEventListener("pointerup",m,d),window.removeEventListener("pointercancel",f,d),Za.has(u)&&Za.delete(u),fm(b)&&typeof c=="function"&&c(b,{success:y})},m=b=>{h(b,u===window||u===document||n.useGlobalTarget||mx(u,b.target))},f=b=>{h(b,!1)};window.addEventListener("pointerup",m,d),window.addEventListener("pointercancel",f,d)};return r.forEach(o=>{(n.useGlobalTarget?window:o).addEventListener("pointerdown",l,s),ys(o)&&(o.addEventListener("focus",c=>Rj(c,s)),!Bj(o)&&!o.hasAttribute("tabindex")&&(o.tabIndex=0))}),i}function gd(e){return gg(e)&&"ownerSVGElement"in e}const Qa=new WeakMap;let Yt;const fx=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:gd(r)&&"getBBox"in r?r.getBBox()[t]:r[n],Vj=fx("inline","width","offsetWidth"),Oj=fx("block","height","offsetHeight");function Uj({target:e,borderBoxSize:t}){var n;(n=Qa.get(e))==null||n.forEach(r=>{r(e,{get width(){return Vj(e,t)},get height(){return Oj(e,t)}})})}function Wj(e){e.forEach(Uj)}function Hj(){typeof ResizeObserver>"u"||(Yt=new ResizeObserver(Wj))}function $j(e,t){Yt||Hj();const n=ux(e);return n.forEach(r=>{let s=Qa.get(r);s||(s=new Set,Qa.set(r,s)),s.add(t),Yt==null||Yt.observe(r)}),()=>{n.forEach(r=>{const s=Qa.get(r);s==null||s.delete(t),s!=null&&s.size||Yt==null||Yt.unobserve(r)})}}const Ja=new Set;let ur;function Gj(){ur=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ja.forEach(t=>t(e))},window.addEventListener("resize",ur)}function Kj(e){return Ja.add(e),ur||Gj(),()=>{Ja.delete(e),!Ja.size&&typeof ur=="function"&&(window.removeEventListener("resize",ur),ur=void 0)}}function Fu(e,t){return typeof e=="function"?Kj(e):$j(e,t)}function px(e,t){let n;const r=()=>{const{currentTime:s}=t,l=(s===null?0:s.value)/100;n!==l&&e(l),n=l};return K.preUpdate(r,!0),()=>lt(r)}function qj(e){return gd(e)&&e.tagName==="svg"}function Yj(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],s=e[1+n],i=e[2+n],l=e[3+n],o=ad(s,i,l);return t?o(r):o}function Xj(e,t,n={}){const r=e.get();let s=null,i=r,l;const o=typeof r=="string"?r.replace(/[\d.-]/g,""):void 0,u=()=>{s&&(s.stop(),s=null),e.animation=void 0},c=()=>{const h=gm(e.get()),m=gm(i);if(h===m){u();return}const f=s?s.getGeneratorVelocity():e.getVelocity();u(),s=new Gs({keyframes:[h,m],velocity:f,type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:l})},d=()=>{var h;c(),e.animation=s??void 0,(h=e.events.animationStart)==null||h.notify(),s==null||s.then(()=>{var m;e.animation=void 0,(m=e.events.animationComplete)==null||m.notify()})};if(e.attach((h,m)=>{i=h,l=f=>m(no(f,o)),K.postRender(d)},u),ge(t)){let h=n.skipInitialAnimation===!0;const m=t.on("change",b=>{h?(h=!1,e.jump(no(b,o),!1)):e.set(no(b,o))}),f=e.on("destroy",m);return()=>{m(),f()}}return u}function no(e,t){return t?e+t:e}function gm(e){return typeof e=="number"?e:parseFloat(e)}const Zj=[...ix,de,vt],Qj=e=>Zj.find(ax(e)),xm=()=>({translate:0,scale:1,origin:0,originPoint:0}),cr=()=>({x:xm(),y:xm()}),bm=()=>({min:0,max:0}),me=()=>({x:bm(),y:bm()}),Jj=new WeakMap;function dl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ks(e){return typeof e=="string"||Array.isArray(e)}const xd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],bd=["initial",...xd];function hl(e){return dl(e.animate)||bd.some(t=>Ks(e[t]))}function gx(e){return!!(hl(e)||e.variants)}function eN(e,t,n){for(const r in t){const s=t[r],i=n[r];if(ge(s))e.addValue(r,s);else if(ge(i))e.addValue(r,gt(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const l=e.getValue(r);l.liveStyle===!0?l.jump(s):l.hasAnimated||l.set(s)}else{const l=e.getStaticValue(r);e.addValue(r,gt(l!==void 0?l:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Vu={current:null},xx={current:!1},tN=typeof window<"u";function nN(){if(xx.current=!0,!!tN)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Vu.current=e.matches;e.addEventListener("change",t),t()}else Vu.current=!1}const vm=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let zi={};function bx(e){zi=e}function rN(){return zi}class sN{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:l,visualState:o},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=ld,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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=Ae.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,K.render(this.render,!1,!0))};const{latestValues:c,renderState:d}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=u,this.blockInitialAnimation=!!l,this.isControllingVariants=hl(n),this.isVariantNode=gx(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...m}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in m){const b=m[f];c[f]!==void 0&&ge(b)&&b.set(c[f])}}mount(t){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,Jj.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((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(xx.current||nN(),this.shouldReduceMotion=Vu.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),lt(this.notifyUpdate),lt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&Zg.has(t)&&this.current instanceof HTMLElement){const{factory:l,keyframes:o,times:u,ease:c,duration:d}=n.accelerate,h=new Yg({element:this.current,name:t,keyframes:o,times:u,ease:c,duration:Ke(d)}),m=l(h);this.valueSubscriptions.set(t,()=>{m(),h.cancel()});return}const r=Or.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&K.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i&&i()})}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 zi){const n=zi[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):me()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<vm.length;r++){const s=vm[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,l=t[i];l&&(this.propEventSubscriptions[s]=this.on(s,l))}this.prevMotionValues=eN(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=gt(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(pg(r)||xg(r))?r=parseFloat(r):!Qj(r)&&vt.test(n)&&(r=ox(t,n)),this.setBaseTarget(t,ge(r)?r.get():r)),ge(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const l=hd(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);l&&(r=l[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!ge(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Xc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Er.render(this.render)}}class vx extends sN{constructor(){super(...arguments),this.KeyframeResolver=Aj}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ge(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class jn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function yx({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function aN({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function iN(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 ro(e){return e===void 0||e===1}function Ou({scale:e,scaleX:t,scaleY:n}){return!ro(e)||!ro(t)||!ro(n)}function En(e){return Ou(e)||kx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function kx(e){return ym(e.x)||ym(e.y)}function ym(e){return e&&e!=="0%"}function Ii(e,t,n){const r=e-n,s=t*r;return n+s}function km(e,t,n,r,s){return s!==void 0&&(e=Ii(e,s,r)),Ii(e,n,r)+t}function Uu(e,t=0,n=1,r,s){e.min=km(e.min,t,n,r,s),e.max=km(e.max,t,n,r,s)}function wx(e,{x:t,y:n}){Uu(e.x,t.translate,t.scale,t.originPoint),Uu(e.y,n.translate,n.scale,n.originPoint)}const wm=.999999999999,jm=1.0000000000001;function lN(e,t,n,r=!1){var o;const s=n.length;if(!s)return;t.x=t.y=1;let i,l;for(let u=0;u<s;u++){i=n[u],l=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(St(e.x,-i.scroll.offset.x),St(e.y,-i.scroll.offset.y)),l&&(t.x*=l.x.scale,t.y*=l.y.scale,wx(e,l)),r&&En(i.latestValues)&&ei(e,i.latestValues,(o=i.layout)==null?void 0:o.layoutBox))}t.x<jm&&t.x>wm&&(t.x=1),t.y<jm&&t.y>wm&&(t.y=1)}function St(e,t){e.min+=t,e.max+=t}function Nm(e,t,n,r,s=.5){const i=Q(e.min,e.max,s);Uu(e,t,n,i,r)}function Sm(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function ei(e,t,n){const r=n??e;Nm(e.x,Sm(t.x,r.x),t.scaleX,t.scale,t.originX),Nm(e.y,Sm(t.y,r.y),t.scaleY,t.scale,t.originY)}function jx(e,t){return yx(iN(e.getBoundingClientRect(),t))}function oN(e,t,n){const r=jx(e,n),{scroll:s}=t;return s&&(St(r.x,s.offset.x),St(r.y,s.offset.y)),r}const uN={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},cN=Vr.length;function dN(e,t,n){let r="",s=!0;for(let l=0;l<cN;l++){const o=Vr[l],u=e[o];if(u===void 0)continue;let c=!0;if(typeof u=="number")c=u===(o.startsWith("scale")?1:0);else{const d=parseFloat(u);c=o.startsWith("scale")?d===1:d===0}if(!c||n){const d=Ru(u,Bi[o]);if(!c){s=!1;const h=uN[o]||o;r+=`${h}(${d}) `}n&&(t[o]=d)}}const i=e.pathRotation;return i&&(s=!1,r+=`rotate(${Ru(i,Bi.pathRotation)}) `),r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function vd(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let l=!1,o=!1;for(const u in t){const c=t[u];if(Or.has(u)){l=!0;continue}else if(Mg(u)){s[u]=c;continue}else{const d=Ru(c,Bi[u]);u.startsWith("origin")?(o=!0,i[u]=d):r[u]=d}}if(t.transform||(l||n?r.transform=dN(t,e.transform,n):r.transform&&(r.transform="none")),o){const{originX:u="50%",originY:c="50%",originZ:d=0}=i;r.transformOrigin=`${u} ${c} ${d}`}}function Nx(e,{style:t,vars:n},r,s){const i=e.style;let l;for(l in t)i[l]=t[l];s==null||s.applyProjectionStyles(i,r);for(l in n)i.setProperty(l,n[l])}function Cm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const es={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(z.test(e))e=parseFloat(e);else return e;const n=Cm(e,t.target.x),r=Cm(e,t.target.y);return`${n}% ${r}%`}},hN={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=vt.parse(e);if(s.length>5)return r;const i=vt.createTransformer(e),l=typeof s[0]!="number"?1:0,o=n.x.scale*t.x,u=n.y.scale*t.y;s[0+l]/=o,s[1+l]/=u;const c=Q(o,u,.5);return typeof s[2+l]=="number"&&(s[2+l]/=c),typeof s[3+l]=="number"&&(s[3+l]/=c),i(s)}},Wu={borderRadius:{...es,applyTo:[...fd]},borderTopLeftRadius:es,borderTopRightRadius:es,borderBottomLeftRadius:es,borderBottomRightRadius:es,boxShadow:hN};function Sx(e,{layout:t,layoutId:n}){return Or.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Wu[e]||e==="opacity")}function yd(e,t,n){var l;const r=e.style,s=t==null?void 0:t.style,i={};if(!r)return i;for(const o in r)(ge(r[o])||s&&ge(s[o])||Sx(o,e)||((l=n==null?void 0:n.getValue(o))==null?void 0:l.liveStyle)!==void 0)&&(i[o]=r[o]);return i}function mN(e){return window.getComputedStyle(e)}class fN extends vx{constructor(){super(...arguments),this.type="html",this.renderInstance=Nx}readValueFromInstance(t,n){var r;if(Or.has(n))return(r=this.projection)!=null&&r.isProjecting?Pu(n):D1(t,n);{const s=mN(t),i=(Mg(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return jx(t,n)}build(t,n,r){vd(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return yd(t,n,r)}}const pN={offset:"stroke-dashoffset",array:"stroke-dasharray"},gN={offset:"strokeDashoffset",array:"strokeDasharray"};function xN(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?pN:gN;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const bN=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Cx(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:l=0,...o},u,c,d){if(vd(e,o,c),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:m}=e;h.transform&&(m.transform=h.transform,delete h.transform),(m.transform||h.transformOrigin)&&(m.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),m.transform&&(m.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete h.transformBox);for(const f of bN)h[f]!==void 0&&(m[f]=h[f],delete h[f]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&xN(h,s,i,l,!1)}const Px=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"]),Ex=e=>typeof e=="string"&&e.toLowerCase()==="svg";function vN(e,t,n,r){Nx(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(Px.has(s)?s:md(s),t.attrs[s])}function Tx(e,t,n){const r=yd(e,t,n);for(const s in e)if(ge(e[s])||ge(t[s])){const i=Vr.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}class yN extends vx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=me}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Or.has(n)){const r=lx(n);return r&&r.default||0}return n=Px.has(n)?n:md(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Tx(t,n,r)}build(t,n,r){Cx(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){vN(t,n,r,s)}mount(t){this.isSVGTag=Ex(t.tagName),super.mount(t)}}const kN=bd.length;function Ax(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Ax(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<kN;n++){const r=bd[n],s=e.props[r];(Ks(s)||s===!1)&&(t[r]=s)}return t}function Mx(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const wN=[...xd].reverse(),jN=xd.length;function NN(e){return t=>Promise.all(t.map(({animation:n,options:r})=>vj(e,n,r)))}function SN(e){let t=NN(e),n=Pm(),r=!0,s=!1;const i=c=>(d,h)=>{var f;const m=In(e,h,c==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(m){const{transition:b,transitionEnd:y,...k}=m;d={...d,...k,...y}}return d};function l(c){t=c(e)}function o(c){const{props:d}=e,h=Ax(e.parent)||{},m=[],f=new Set;let b={},y=1/0;for(let x=0;x<jN;x++){const p=wN[x],v=n[p],w=d[p]!==void 0?d[p]:h[p],j=Ks(w),P=p===c?v.isActive:null;P===!1&&(y=x);let C=w===h[p]&&w!==d[p]&&j;if(C&&(r||s)&&e.manuallyAnimateOnMount&&(C=!1),v.protectedKeys={...b},!v.isActive&&P===null||!w&&!v.prevProp||dl(w)||typeof w=="boolean")continue;if(p==="exit"&&v.isActive&&P!==!0){v.prevResolvedValues&&(b={...b,...v.prevResolvedValues});continue}const N=CN(v.prevProp,w);let S=N||p===c&&v.isActive&&!C&&j||x>y&&j,E=!1;const T=Array.isArray(w)?w:[w];let I=T.reduce(i(p),{});P===!1&&(I={});const{prevResolvedValues:U={}}=v,Y={...U,...I},J=_=>{S=!0,f.has(_)&&(E=!0,f.delete(_)),v.needsAnimating[_]=!0;const L=e.getValue(_);L&&(L.liveStyle=!1)};for(const _ in Y){const L=I[_],F=U[_];if(b.hasOwnProperty(_))continue;let V=!1;Du(L)&&Du(F)?V=!Mx(L,F)||N:V=L!==F,V?L!=null?J(_):f.add(_):L!==void 0&&f.has(_)?J(_):v.protectedKeys[_]=!0}v.prevProp=w,v.prevResolvedValues=I,v.isActive&&(b={...b,...I}),(r||s)&&e.blockInitialAnimation&&(S=!1);const R=C&&N;S&&(!R||E)&&m.push(...T.map(_=>{const L={type:p};if(typeof _=="string"&&(r||s)&&!R&&e.manuallyAnimateOnMount&&e.parent){const{parent:F}=e,V=In(F,_);if(F.enteringChildren&&V){const{delayChildren:$}=V.transition||{};L.delay=Qg(F.enteringChildren,e,$)}}return{animation:_,options:L}}))}if(f.size){const x={};if(typeof d.initial!="boolean"){const p=In(e,Array.isArray(d.initial)?d.initial[0]:d.initial);p&&p.transition&&(x.transition=p.transition)}f.forEach(p=>{const v=e.getBaseTarget(p),w=e.getValue(p);w&&(w.liveStyle=!0),x[p]=v??null}),m.push({animation:x})}let k=!!m.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(k=!1),r=!1,s=!1,k?t(m):Promise.resolve()}function u(c,d){var m;if(n[c].isActive===d)return Promise.resolve();(m=e.variantChildren)==null||m.forEach(f=>{var b;return(b=f.animationState)==null?void 0:b.setActive(c,d)}),n[c].isActive=d;const h=o(c);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:o,setActive:u,setAnimateFunction:l,getState:()=>n,reset:()=>{n=Pm(),s=!0}}}function CN(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Mx(t,e):!1}function Sn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Pm(){return{animate:Sn(!0),whileInView:Sn(),whileHover:Sn(),whileTap:Sn(),whileDrag:Sn(),whileFocus:Sn(),exit:Sn()}}function Hu(e,t){e.min=t.min,e.max=t.max}function dt(e,t){Hu(e.x,t.x),Hu(e.y,t.y)}function Em(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const _x=1e-4,PN=1-_x,EN=1+_x,Dx=.01,TN=0-Dx,AN=0+Dx;function Me(e){return e.max-e.min}function MN(e,t,n){return Math.abs(e-t)<=n}function Tm(e,t,n,r=.5){e.origin=r,e.originPoint=Q(t.min,t.max,e.origin),e.scale=Me(n)/Me(t),e.translate=Q(n.min,n.max,e.origin)-e.originPoint,(e.scale>=PN&&e.scale<=EN||isNaN(e.scale))&&(e.scale=1),(e.translate>=TN&&e.translate<=AN||isNaN(e.translate))&&(e.translate=0)}function ks(e,t,n,r){Tm(e.x,t.x,n.x,r?r.originX:void 0),Tm(e.y,t.y,n.y,r?r.originY:void 0)}function Am(e,t,n,r=0){const s=r?Q(n.min,n.max,r):n.min;e.min=s+t.min,e.max=e.min+Me(t)}function _N(e,t,n,r){Am(e.x,t.x,n.x,r==null?void 0:r.x),Am(e.y,t.y,n.y,r==null?void 0:r.y)}function Mm(e,t,n,r=0){const s=r?Q(n.min,n.max,r):n.min;e.min=t.min-s,e.max=e.min+Me(t)}function Ri(e,t,n,r){Mm(e.x,t.x,n.x,r==null?void 0:r.x),Mm(e.y,t.y,n.y,r==null?void 0:r.y)}function _m(e,t,n,r,s){return e-=t,e=Ii(e,1/n,r),s!==void 0&&(e=Ii(e,1/s,r)),e}function DN(e,t=0,n=1,r=.5,s,i=e,l=e){if(Tt.test(t)&&(t=parseFloat(t),t=Q(l.min,l.max,t/100)-l.min),typeof t!="number")return;let o=Q(i.min,i.max,r);e===i&&(o-=t),e.min=_m(e.min,t,n,o,s),e.max=_m(e.max,t,n,o,s)}function Dm(e,t,[n,r,s],i,l){DN(e,t[n],t[r],t[s],t.scale,i,l)}const LN=["x","scaleX","originX"],BN=["y","scaleY","originY"];function Lm(e,t,n,r){Dm(e.x,t,LN,n?n.x:void 0,r?r.x:void 0),Dm(e.y,t,BN,n?n.y:void 0,r?r.y:void 0)}function Bm(e){return e.translate===0&&e.scale===1}function Lx(e){return Bm(e.x)&&Bm(e.y)}function zm(e,t){return e.min===t.min&&e.max===t.max}function zN(e,t){return zm(e.x,t.x)&&zm(e.y,t.y)}function Im(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Bx(e,t){return Im(e.x,t.x)&&Im(e.y,t.y)}function Rm(e){return Me(e.x)/Me(e.y)}function Fm(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Nt(e){return[e("x"),e("y")]}function IN(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,l=(n==null?void 0:n.z)||0;if((s||i||l)&&(r=`translate3d(${s}px, ${i}px, ${l}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:d,pathRotation:h,rotateX:m,rotateY:f,skewX:b,skewY:y}=n;c&&(r=`perspective(${c}px) ${r}`),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotate(${h}deg) `),m&&(r+=`rotateX(${m}deg) `),f&&(r+=`rotateY(${f}deg) `),b&&(r+=`skewX(${b}deg) `),y&&(r+=`skewY(${y}deg) `)}const o=e.x.scale*t.x,u=e.y.scale*t.y;return(o!==1||u!==1)&&(r+=`scale(${o}, ${u})`),r||"none"}const RN=fd.length,Vm=e=>typeof e=="string"?parseFloat(e):e,Om=e=>typeof e=="number"||z.test(e);function FN(e,t,n,r,s,i){s?(e.opacity=Q(0,n.opacity??1,VN(r)),e.opacityExit=Q(t.opacity??1,0,ON(r))):i&&(e.opacity=Q(t.opacity??1,n.opacity??1,r));for(let l=0;l<RN;l++){const o=fd[l];let u=Um(t,o),c=Um(n,o);if(u===void 0&&c===void 0)continue;u||(u=0),c||(c=0),u===0||c===0||Om(u)===Om(c)?(e[o]=Math.max(Q(Vm(u),Vm(c),r),0),(Tt.test(c)||Tt.test(u))&&(e[o]+="%")):e[o]=c}(t.rotate||n.rotate)&&(e.rotate=Q(t.rotate||0,n.rotate||0,r))}function Um(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const VN=zx(0,.5,Sg),ON=zx(.5,.95,Ue);function zx(e,t,n){return r=>r<e?0:r>t?1:n(Cr(e,t,r))}function UN(e,t,n){const r=ge(e)?e:gt(e);return r.start(dd("",r,t,n)),r.animation}function qs(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}const WN=(e,t)=>e.depth-t.depth;class HN{constructor(){this.children=[],this.isDirty=!1}add(t){qc(this.children,t),this.isDirty=!0}remove(t){Mi(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(WN),this.isDirty=!1,this.children.forEach(t)}}function $N(e,t){const n=Ae.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(lt(r),e(i-t))};return K.setup(r,!0),()=>lt(r)}function ti(e){return ge(e)?e.get():e}class GN{constructor(){this.members=[]}add(t){qc(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const s=r.instance;(!s||s.isConnected===!1)&&!r.snapshot&&(Mi(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(Mi(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){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1&&((n=s.instance)==null?void 0:n.isConnected)!==!1)return this.promote(s),!0}return!1}promote(t,n){var s;const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=r.options,{layoutDependency:l}=t.options;(i===void 0||i!==l)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(s=t.root)!=null&&s.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,s,i,l;(r=(n=t.options).onExitComplete)==null||r.call(n),(l=(s=t.resumingFrom)==null?void 0:(i=s.options).onExitComplete)==null||l.call(i)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const ni={hasAnimatedSinceResize:!0,hasEverUpdated:!1},so=["","X","Y","Z"],KN=1e3;let qN=0;function ao(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ix(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=rx(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",K,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ix(r)}function Rx({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(l={},o=t==null?void 0:t()){this.id=qN++,this.animationId=0,this.animationCommitId=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.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(ZN),this.nodes.forEach(r2),this.nodes.forEach(s2),this.nodes.forEach(QN)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new HN)}addEventListener(l,o){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new Xc),this.eventHandlers.get(l).add(o)}notifyListeners(l,...o){const u=this.eventHandlers.get(l);u&&u.notify(...o)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=gd(l)&&!qj(l),this.instance=l;const{layoutId:o,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||o)&&(this.isLayoutDirty=!0),e){let d,h=0;const m=()=>this.root.updateBlockedByResize=!1;K.read(()=>{h=window.innerWidth}),e(l,()=>{const f=window.innerWidth;f!==h&&(h=f,this.root.updateBlockedByResize=!0,d&&d(),d=$N(m,250),ni.hasAnimatedSinceResize&&(ni.hasAnimatedSinceResize=!1,this.nodes.forEach($m)))})}o&&this.root.registerSharedNode(o,this),this.options.animate!==!1&&c&&(o||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:m,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||c.getDefaultTransition()||u2,{onLayoutAnimationStart:y,onLayoutAnimationComplete:k}=c.getProps(),x=!this.targetLayout||!Bx(this.targetLayout,f),p=!h&&m;if(this.options.layoutRoot||this.resumeFrom||p||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...cd(b,"layout"),onPlay:y,onComplete:k};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(d,p,v.path)}else h||$m(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),lt(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(a2),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ix(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:o,layout:u}=this.options;if(o===void 0&&!u)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const u=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),u&&this.nodes.forEach(e2),this.nodes.forEach(Wm);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Hm);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(t2),this.nodes.forEach(n2),this.nodes.forEach(YN),this.nodes.forEach(XN)):this.nodes.forEach(Hm),this.clearAllSnapshots();const o=Ae.now();xe.delta=kt(0,1e3/60,o-xe.timestamp),xe.timestamp=o,xe.isProcessing=!0,Yl.update.process(xe),Yl.preRender.process(xe),Yl.render.process(xe),xe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Er.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(JN),this.sharedNodes.forEach(i2)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,K.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){K.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Me(this.snapshot.measuredBox.x)&&!Me(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=me()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(o=!1),o&&this.instance){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!s)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!Lx(this.projectionDelta),u=this.getTransformTemplate(),c=u?u(this.latestValues,""):void 0,d=c!==this.prevTransformTemplateValue;l&&this.instance&&(o||En(this.latestValues)||d)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const o=this.measurePageBox();let u=this.removeElementScroll(o);return l&&(u=this.removeTransform(u)),c2(u),{animationId:this.root.animationId,measuredBox:o,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:l}=this.options;if(!l)return me();const o=l.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(d2))){const{scroll:d}=this.root;d&&(St(o.x,d.offset.x),St(o.y,d.offset.y))}return o}removeElementScroll(l){var u;const o=me();if(dt(o,l),(u=this.scroll)!=null&&u.wasRoot)return o;for(let c=0;c<this.path.length;c++){const d=this.path[c],{scroll:h,options:m}=d;d!==this.root&&h&&m.layoutScroll&&(h.wasRoot&&dt(o,l),St(o.x,h.offset.x),St(o.y,h.offset.y))}return o}applyTransform(l,o=!1,u){var d,h;const c=u||me();dt(c,l);for(let m=0;m<this.path.length;m++){const f=this.path[m];!o&&f.options.layoutScroll&&f.scroll&&f!==f.root&&(St(c.x,-f.scroll.offset.x),St(c.y,-f.scroll.offset.y)),En(f.latestValues)&&ei(c,f.latestValues,(d=f.layout)==null?void 0:d.layoutBox)}return En(this.latestValues)&&ei(c,this.latestValues,(h=this.layout)==null?void 0:h.layoutBox),c}removeTransform(l){var u;const o=me();dt(o,l);for(let c=0;c<this.path.length;c++){const d=this.path[c];if(!En(d.latestValues))continue;let h;d.instance&&(Ou(d.latestValues)&&d.updateSnapshot(),h=me(),dt(h,d.measurePageBox())),Lm(o,d.latestValues,(u=d.snapshot)==null?void 0:u.layoutBox,h)}return En(this.latestValues)&&Lm(o,this.latestValues),o}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==xe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var f;const o=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=o.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=o.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=o.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==o;if(!(l||u&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!this.layout||!(d||h))return;this.resolvedRelativeTargetAt=xe.timestamp;const m=this.getClosestProjectingParent();m&&this.linkedParentVersion!==m.layoutVersion&&!m.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&m&&m.layout?this.createRelativeTarget(m,this.layout.layoutBox,m.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=me(),this.targetWithTransforms=me()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),_N(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):dt(this.target,this.layout.layoutBox),wx(this.target,this.targetDelta)):dt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?this.createRelativeTarget(m,this.target,m.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ou(this.parent.latestValues)||kx(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(l,o,u){this.relativeParent=l,this.linkedParentVersion=l.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=me(),this.relativeTargetOrigin=me(),Ri(this.relativeTargetOrigin,o,u,this.options.layoutAnchor||void 0),dt(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var b;const l=this.getLead(),o=!!this.resumingFrom||this!==l;let u=!0;if((this.isProjectionDirty||(b=this.parent)!=null&&b.isProjectionDirty)&&(u=!1),o&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===xe.timestamp&&(u=!1),u)return;const{layout:c,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||d))return;dt(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,m=this.treeScale.y;lN(this.layoutCorrected,this.treeScale,this.path,o),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=me());const{target:f}=l;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Em(this.prevProjectionDelta.x,this.projectionDelta.x),Em(this.prevProjectionDelta.y,this.projectionDelta.y)),ks(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==m||!Fm(this.projectionDelta.x,this.prevProjectionDelta.x)||!Fm(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){var o;if((o=this.options.visualElement)==null||o.scheduleRender(),l){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=cr(),this.projectionDelta=cr(),this.projectionDeltaWithTransform=cr()}setAnimationOrigin(l,o=!1,u){const c=this.snapshot,d=c?c.latestValues:{},h={...this.latestValues},m=cr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const f=me(),b=c?c.source:void 0,y=this.layout?this.layout.source:void 0,k=b!==y,x=this.getStack(),p=!x||x.members.length<=1,v=!!(k&&!p&&this.options.crossfade===!0&&!this.path.some(o2));this.animationProgress=0;let w;const j=u==null?void 0:u.interpolateProjection(l);this.mixTargetDelta=P=>{const C=P/1e3,N=j==null?void 0:j(C);N?(m.x.translate=N.x,m.x.scale=Q(l.x.scale,1,C),m.x.origin=l.x.origin,m.x.originPoint=l.x.originPoint,m.y.translate=N.y,m.y.scale=Q(l.y.scale,1,C),m.y.origin=l.y.origin,m.y.originPoint=l.y.originPoint):(Gm(m.x,l.x,C),Gm(m.y,l.y,C)),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ri(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),l2(this.relativeTarget,this.relativeTargetOrigin,f,C),w&&zN(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=me()),dt(w,this.relativeTarget)),k&&(this.animationValues=h,FN(h,d,this.latestValues,C,v,p)),N&&N.rotate!==void 0&&(this.animationValues||(this.animationValues=h),this.animationValues.pathRotation=N.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){var o,u,c;this.notifyListeners("animationStart"),(o=this.currentAnimation)==null||o.stop(),(c=(u=this.resumingFrom)==null?void 0:u.currentAnimation)==null||c.stop(),this.pendingAnimation&&(lt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=K.update(()=>{ni.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=gt(0)),this.motionValue.jump(0,!1),this.currentAnimation=UN(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),l.onUpdate&&l.onUpdate(d)},onComplete:()=>{l.onComplete&&l.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 l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(KN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:o,target:u,layout:c,latestValues:d}=l;if(!(!o||!u||!c)){if(this!==l&&this.layout&&c&&Fx(this.options.animationType,this.layout.layoutBox,c.layoutBox)){u=this.target||me();const h=Me(this.layout.layoutBox.x);u.x.min=l.target.x.min,u.x.max=u.x.min+h;const m=Me(this.layout.layoutBox.y);u.y.min=l.target.y.min,u.y.max=u.y.min+m}dt(o,u),ei(o,d),ks(this.projectionDeltaWithTransform,this.layoutCorrected,o,d)}}registerSharedNode(l,o){this.sharedNodes.has(l)||this.sharedNodes.set(l,new GN),this.sharedNodes.get(l).add(o);const c=o.options.initialPromotionConfig;o.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(o):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var o;const{layoutId:l}=this.options;return l?((o=this.getStack())==null?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:l}=this.options;return l?(o=this.getStack())==null?void 0:o.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:o,preserveFollowOpacity:u}={}){const c=this.getStack();c&&c.promote(this,u),l&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let o=!1;const{latestValues:u}=l;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(o=!0),!o)return;const c={};u.z&&ao("z",l,c,this.animationValues);for(let d=0;d<so.length;d++)ao(`rotate${so[d]}`,l,c,this.animationValues),ao(`skew${so[d]}`,l,c,this.animationValues);l.render();for(const d in c)l.setStaticValue(d,c[d]),this.animationValues&&(this.animationValues[d]=c[d]);l.scheduleRender()}applyProjectionStyles(l,o){if(!this.instance||this.isSVG)return;if(!this.isVisible){l.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=ti(o==null?void 0:o.pointerEvents)||"",l.transform=u?u(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=ti(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!En(this.latestValues)&&(l.transform=u?u({},""):"none",this.hasProjected=!1);return}l.visibility="";const d=c.animationValues||c.latestValues;this.applyTransformsToTarget();let h=IN(this.projectionDeltaWithTransform,this.treeScale,d);u&&(h=u(d,h)),l.transform=h;const{x:m,y:f}=this.projectionDelta;l.transformOrigin=`${m.origin*100}% ${f.origin*100}% 0`,c.animationValues?l.opacity=c===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:l.opacity=c===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const b in Wu){if(d[b]===void 0)continue;const{correct:y,applyTo:k,isCSSVariable:x}=Wu[b],p=h==="none"?d[b]:y(d[b],c);if(k){const v=k.length;for(let w=0;w<v;w++)l[k[w]]=p}else x?this.options.visualElement.renderState.vars[b]=p:l[b]=p}this.options.layoutId&&(l.pointerEvents=c===this?ti(o==null?void 0:o.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var o;return(o=l.currentAnimation)==null?void 0:o.stop()}),this.root.nodes.forEach(Wm),this.root.sharedNodes.clear()}}}function YN(e){e.updateLayout()}function XN(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,l=t.source!==e.layout.source;if(i==="size")Nt(h=>{const m=l?t.measuredBox[h]:t.layoutBox[h],f=Me(m);m.min=r[h].min,m.max=m.min+f});else if(i==="x"||i==="y"){const h=i==="x"?"y":"x";Hu(l?t.measuredBox[h]:t.layoutBox[h],r[h])}else Fx(i,t.layoutBox,r)&&Nt(h=>{const m=l?t.measuredBox[h]:t.layoutBox[h],f=Me(r[h]);m.max=m.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+f)});const o=cr();ks(o,r,t.layoutBox);const u=cr();l?ks(u,e.applyTransform(s,!0),t.measuredBox):ks(u,r,t.layoutBox);const c=!Lx(o);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:m,layout:f}=h;if(m&&f){const b=e.options.layoutAnchor||void 0,y=me();Ri(y,t.layoutBox,m.layoutBox,b);const k=me();Ri(k,r,f.layoutBox,b),Bx(y,k)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=k,e.relativeTargetOrigin=y,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:u,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function ZN(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function QN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function JN(e){e.clearSnapshot()}function Wm(e){e.clearMeasurements()}function e2(e){e.isLayoutDirty=!0,e.updateLayout()}function Hm(e){e.isLayoutDirty=!1}function t2(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function n2(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function $m(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function r2(e){e.resolveTargetDelta()}function s2(e){e.calcProjection()}function a2(e){e.resetSkewAndRotation()}function i2(e){e.removeLeadSnapshot()}function Gm(e,t,n){e.translate=Q(t.translate,0,n),e.scale=Q(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Km(e,t,n,r){e.min=Q(t.min,n.min,r),e.max=Q(t.max,n.max,r)}function l2(e,t,n,r){Km(e.x,t.x,n.x,r),Km(e.y,t.y,n.y,r)}function o2(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const u2={duration:.45,ease:[.4,0,.1,1]},qm=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ym=qm("applewebkit/")&&!qm("chrome/")?Math.round:Ue;function Xm(e){e.min=Ym(e.min),e.max=Ym(e.max)}function c2(e){Xm(e.x),Xm(e.y)}function Fx(e,t,n){return e==="position"||e==="preserve-aspect"&&!MN(Rm(t),Rm(n),.2)}function d2(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const h2=Rx({attachResizeListener:(e,t)=>qs(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),io={current:void 0},Vx=Rx({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!io.current){const e=new h2({});e.mount(window),e.setOptions({layoutScroll:!0}),io.current=e}return io.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),aa=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Zm(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function m2(...e){return t=>{let n=!1;const r=e.map(s=>{const i=Zm(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():Zm(e[s],null)}}}}function f2(...e){return g.useCallback(m2(...e),e)}class p2 extends g.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(ys(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,s=ys(r)&&r.offsetWidth||0,i=ys(r)&&r.offsetHeight||0,l=getComputedStyle(n),o=this.props.sizeRef.current;o.height=parseFloat(l.height),o.width=parseFloat(l.width),o.top=n.offsetTop,o.left=n.offsetLeft,o.right=s-o.width-o.left,o.bottom=i-o.height-o.top,o.direction=l.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function g2({children:e,isPresent:t,anchorX:n,anchorY:r,root:s,pop:i}){var m;const l=g.useId(),o=g.useRef(null),u=g.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:c}=g.useContext(aa),d=((m=e.props)==null?void 0:m.ref)??(e==null?void 0:e.ref),h=f2(o,d);return g.useInsertionEffect(()=>{const{width:f,height:b,top:y,left:k,right:x,bottom:p,direction:v}=u.current;if(t||i===!1||!o.current||!f||!b)return;const w=v==="rtl",j=n==="left"?w?`right: ${x}`:`left: ${k}`:w?`left: ${k}`:`right: ${x}`,P=r==="bottom"?`bottom: ${p}`:`top: ${y}`;o.current.dataset.motionPopId=l;const C=document.createElement("style");c&&(C.nonce=c);const N=s??document.head;return N.appendChild(C),C.sheet&&C.sheet.insertRule(`
[data-motion-pop-id="${l}"] {
position: absolute !important;
width: ${f}px !important;
height: ${b}px !important;
${j}px !important;
${P}px !important;
}
`),()=>{var S;(S=o.current)==null||S.removeAttribute("data-motion-pop-id"),N.contains(C)&&N.removeChild(C)}},[t]),a.jsx(p2,{isPresent:t,childRef:o,sizeRef:u,pop:i,children:i===!1?e:g.cloneElement(e,{ref:h})})}const x2=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:l,anchorX:o,anchorY:u,root:c})=>{const d=bn(b2),h=g.useId(),m=g.useRef(n),f=g.useRef(r);ta(()=>{m.current=n,f.current=r});let b=!0,y=g.useMemo(()=>(b=!1,{id:h,initial:t,isPresent:n,custom:s,onExitComplete:k=>{d.set(k,!0);for(const x of d.values())if(!x)return;r&&r()},register:k=>(d.set(k,!1),()=>{var x;d.delete(k),!m.current&&!d.size&&((x=f.current)==null||x.call(f))})}),[n,d,r]);return i&&b&&(y={...y}),g.useMemo(()=>{d.forEach((k,x)=>d.set(x,!1))},[n]),g.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=a.jsx(g2,{pop:l==="popLayout",isPresent:n,anchorX:o,anchorY:u,root:c,children:e}),a.jsx(ul.Provider,{value:y,children:e})};function b2(){return new Map}function Ox(e=!0){const t=g.useContext(ul);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=g.useId();g.useEffect(()=>{if(e)return s(i)},[e]);const l=g.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,l]:[!0]}const Aa=e=>e.key||"";function Qm(e){const t=[];return g.Children.forEach(e,n=>{g.isValidElement(n)&&t.push(n)}),t}const v2=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:l=!1,anchorX:o="left",anchorY:u="top",root:c})=>{const[d,h]=Ox(l),m=g.useMemo(()=>Qm(e),[e]),f=l&&!d?[]:m.map(Aa),b=g.useRef(!0),y=g.useRef(m),k=bn(()=>new Map),x=g.useRef(new Set),[p,v]=g.useState(m),[w,j]=g.useState(m);ta(()=>{b.current=!1,y.current=m;for(let N=0;N<w.length;N++){const S=Aa(w[N]);f.includes(S)?(k.delete(S),x.current.delete(S)):k.get(S)!==!0&&k.set(S,!1)}},[w,f.length,f.join("-")]);const P=[];if(m!==p){let N=[...m];for(let S=0;S<w.length;S++){const E=w[S],T=Aa(E);f.includes(T)||(N.splice(S,0,E),P.push(E))}return i==="wait"&&P.length&&(N=P),j(Qm(N)),v(m),null}const{forceRender:C}=g.useContext(Kc);return a.jsx(a.Fragment,{children:w.map(N=>{const S=Aa(N),E=l&&!d?!1:m===w||f.includes(S),T=()=>{if(x.current.has(S))return;if(k.has(S))x.current.add(S),k.set(S,!0);else return;let I=!0;k.forEach(U=>{U||(I=!1)}),I&&(C==null||C(),j(y.current),l&&(h==null||h()),r&&r())};return a.jsx(x2,{isPresent:E,initial:!b.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,root:c,onExitComplete:E?void 0:T,anchorX:o,anchorY:u,children:N},S)})})},Ux=g.createContext({strict:!1}),Jm={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"]};let ef=!1;function y2(){if(ef)return;const e={};for(const t in Jm)e[t]={isEnabled:n=>Jm[t].some(r=>!!n[r])};bx(e),ef=!0}function Wx(){return y2(),rN()}function k2(e){const t=Wx();for(const n in e)t[n]={...t[n],...e[n]};bx(t)}const w2=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","propagate","ignoreStrict","viewport"]);function Fi(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||w2.has(e)}let Hx=e=>!Fi(e);function j2(e){typeof e=="function"&&(Hx=t=>t.startsWith("on")?!Fi(t):e(t))}try{j2(require("@emotion/is-prop-valid").default)}catch{}function N2(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||ge(e[s])||(Hx(s)||n===!0&&Fi(s)||!t&&!Fi(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const ml=g.createContext({});function S2(e,t){if(hl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ks(n)?n:void 0,animate:Ks(r)?r:void 0}}return e.inherit!==!1?t:{}}function C2(e){const{initial:t,animate:n}=S2(e,g.useContext(ml));return g.useMemo(()=>({initial:t,animate:n}),[tf(t),tf(n)])}function tf(e){return Array.isArray(e)?e.join(" "):e}const kd=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function $x(e,t,n){for(const r in t)!ge(t[r])&&!Sx(r,n)&&(e[r]=t[r])}function P2({transformTemplate:e},t){return g.useMemo(()=>{const n=kd();return vd(n,t,e),Object.assign({},n.vars,n.style)},[t])}function E2(e,t){const n=e.style||{},r={};return $x(r,n,e),Object.assign(r,P2(e,t)),r}function T2(e,t){const n={},r=E2(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 Gx=()=>({...kd(),attrs:{}});function A2(e,t,n,r){const s=g.useMemo(()=>{const i=Gx();return Cx(i,t,Ex(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};$x(i,e.style,e),s.style={...i,...s.style}}return s}const M2=["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 wd(e){return typeof e!="string"||e.includes("-")?!1:!!(M2.indexOf(e)>-1||/[A-Z]/u.test(e))}function _2(e,t,n,{latestValues:r},s,i=!1,l){const u=(l??wd(e)?A2:T2)(t,r,s,e),c=N2(t,typeof e=="string",i),d=e!==g.Fragment?{...c,...u,ref:n}:{},{children:h}=t,m=g.useMemo(()=>ge(h)?h.get():h,[h]);return g.createElement(e,{...d,children:m})}function D2({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:L2(n,r,s,e),renderState:t()}}function L2(e,t,n,r){const s={},i=r(e,{});for(const m in i)s[m]=ti(i[m]);let{initial:l,animate:o}=e;const u=hl(e),c=gx(e);t&&c&&!u&&e.inherit!==!1&&(l===void 0&&(l=t.initial),o===void 0&&(o=t.animate));let d=n?n.initial===!1:!1;d=d||l===!1;const h=d?o:l;if(h&&typeof h!="boolean"&&!dl(h)){const m=Array.isArray(h)?h:[h];for(let f=0;f<m.length;f++){const b=hd(e,m[f]);if(b){const{transitionEnd:y,transition:k,...x}=b;for(const p in x){let v=x[p];if(Array.isArray(v)){const w=d?v.length-1:0;v=v[w]}v!==null&&(s[p]=v)}for(const p in y)s[p]=y[p]}}}return s}const Kx=e=>(t,n)=>{const r=g.useContext(ml),s=g.useContext(ul),i=()=>D2(e,t,r,s);return n?i():bn(i)},B2=Kx({scrapeMotionValuesFromProps:yd,createRenderState:kd}),z2=Kx({scrapeMotionValuesFromProps:Tx,createRenderState:Gx}),I2=Symbol.for("motionComponentSymbol");function R2(e,t,n){const r=g.useRef(n);g.useInsertionEffect(()=>{r.current=n});const s=g.useRef(null);return g.useCallback(i=>{var o;i&&((o=e.onMount)==null||o.call(e,i)),t&&(i?t.mount(i):t.unmount());const l=r.current;if(typeof l=="function")if(i){const u=l(i);typeof u=="function"&&(s.current=u)}else s.current?(s.current(),s.current=null):l(i);else l&&(l.current=i)},[t])}const qx=g.createContext({});function Yn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function F2(e,t,n,r,s,i){var v,w;const{visualElement:l}=g.useContext(ml),o=g.useContext(Ux),u=g.useContext(ul),c=g.useContext(aa),d=c.reducedMotion,h=c.skipAnimations,m=g.useRef(null),f=g.useRef(!1);r=r||o.renderer,!m.current&&r&&(m.current=r(e,{visualState:t,parent:l,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d,skipAnimations:h,isSVG:i}),f.current&&m.current&&(m.current.manuallyAnimateOnMount=!0));const b=m.current,y=g.useContext(qx);b&&!b.projection&&s&&(b.type==="html"||b.type==="svg")&&V2(m.current,n,s,y);const k=g.useRef(!1);g.useInsertionEffect(()=>{b&&k.current&&b.update(n,u)});const x=n[nx],p=g.useRef(!!x&&typeof window<"u"&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,x))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,x)));return ta(()=>{f.current=!0,b&&(k.current=!0,window.MotionIsMounted=!0,b.updateFeatures(),b.scheduleRenderMicrotask(),p.current&&b.animationState&&b.animationState.animateChanges())}),g.useEffect(()=>{b&&(!p.current&&b.animationState&&b.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{var j;(j=window.MotionHandoffMarkAsComplete)==null||j.call(window,x)}),p.current=!1),b.enteringChildren=void 0)}),b}function V2(e,t,n,r){const{layoutId:s,layout:i,drag:l,dragConstraints:o,layoutScroll:u,layoutRoot:c,layoutAnchor:d,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Yx(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!l||o&&Yn(o),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:u,layoutRoot:c,layoutAnchor:d})}function Yx(e){if(e)return e.options.allowProjection!==!1?e.projection:Yx(e.parent)}function lo(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&k2(r);const i=n?n==="svg":wd(e),l=i?z2:B2;function o(c,d){let h;const m={...g.useContext(aa),...c,layoutId:O2(c)},{isStatic:f}=m,b=C2(c),y=l(c,f);if(!f&&typeof window<"u"){U2();const k=W2(m);h=k.MeasureLayout,b.visualElement=F2(e,y,m,s,k.ProjectionNode,i)}return a.jsxs(ml.Provider,{value:b,children:[h&&b.visualElement?a.jsx(h,{visualElement:b.visualElement,...m}):null,_2(e,c,R2(y,b.visualElement,d),y,f,t,i)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=g.forwardRef(o);return u[I2]=e,u}function O2({layoutId:e}){const t=g.useContext(Kc).id;return t&&e!==void 0?t+"-"+e:e}function U2(e,t){g.useContext(Ux).strict}function W2(e){const t=Wx(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function H2(e,t){if(typeof Proxy>"u")return lo;const n=new Map,r=(i,l)=>lo(i,l,e,t),s=(i,l)=>r(i,l);return new Proxy(s,{get:(i,l)=>l==="create"?r:(n.has(l)||n.set(l,lo(l,void 0,e,t)),n.get(l))})}const $2=(e,t)=>t.isSVG??wd(e)?new yN(t):new fN(t,{allowProjection:e!==g.Fragment});class G2 extends jn{constructor(t){super(t),t.animationState||(t.animationState=SN(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();dl(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let K2=0;class q2 extends jn{constructor(){super(...arguments),this.id=K2++,this.isExitComplete=!1}update(){var i;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;if(t&&r===!1){if(this.isExitComplete){const{initial:l,custom:o}=this.node.getProps();if(typeof l=="string"||typeof l=="object"&&l!==null&&!Array.isArray(l)){const u=In(this.node,l,o);if(u){const{transition:c,transitionEnd:d,...h}=u;for(const m in h)(i=this.node.getValue(m))==null||i.jump(h[m])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Y2={animation:{Feature:G2},exit:{Feature:q2}};function ia(e){return{point:{x:e.pageX,y:e.pageY}}}const X2=e=>t=>pd(t)&&e(t,ia(t));function ws(e,t,n,r){return qs(e,t,X2(n),r)}const Xx=({current:e})=>e?e.ownerDocument.defaultView:null,nf=(e,t)=>Math.abs(e-t);function Z2(e,t){const n=nf(e.x,t.x),r=nf(e.y,t.y);return Math.sqrt(n**2+r**2)}const rf=new Set(["auto","scroll"]);class Zx{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:l=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=b=>{this.handleScroll(b.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Ma(this.lastRawMoveEventInfo,this.transformPagePoint));const b=oo(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,k=Z2(b.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!k)return;const{point:x}=b,{timestamp:p}=xe;this.history.push({...x,timestamp:p});const{onStart:v,onMove:w}=this.handlers;y||(v&&v(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,b)},this.handlePointerMove=(b,y)=>{this.lastMoveEvent=b,this.lastRawMoveEventInfo=y,this.lastMoveEventInfo=Ma(y,this.transformPagePoint),K.update(this.updatePoint,!0)},this.handlePointerUp=(b,y)=>{this.end();const{onEnd:k,onSessionEnd:x,resumeAnimation:p}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=oo(b.type==="pointercancel"?this.lastMoveEventInfo:Ma(y,this.transformPagePoint),this.history);this.startEvent&&k&&k(b,v),x&&x(b,v)},!pd(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=l,this.contextWindow=s||window;const u=ia(t),c=Ma(u,this.transformPagePoint),{point:d}=c,{timestamp:h}=xe;this.history=[{...d,timestamp:h}];const{onSessionStart:m}=n;m&&m(t,oo(c,this.history));const f={passive:!0,capture:!0};this.removeListeners=na(ws(this.contextWindow,"pointermove",this.handlePointerMove,f),ws(this.contextWindow,"pointerup",this.handlePointerUp,f),ws(this.contextWindow,"pointercancel",this.handlePointerUp,f)),o&&this.startScrollTracking(o)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(rf.has(r.overflowX)||rf.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,s),K.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),lt(this.updatePoint)}}function Ma(e,t){return t?{point:t(e.point)}:e}function sf(e,t){return{x:e.x-t.x,y:e.y-t.y}}function oo({point:e},t){return{point:e,delta:sf(e,Qx(t)),offset:sf(e,Q2(t)),velocity:J2(t,.1)}}function Q2(e){return e[0]}function Qx(e){return e[e.length-1]}function J2(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=Qx(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Ke(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>Ke(t)*2&&(r=e[1]);const i=rt(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const l={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function eS(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Q(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Q(n,e,r.max):Math.min(e,n)),e}function af(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 tS(e,{top:t,left:n,bottom:r,right:s}){return{x:af(e.x,n,s),y:af(e.y,t,r)}}function lf(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function nS(e,t){return{x:lf(e.x,t.x),y:lf(e.y,t.y)}}function rS(e,t){let n=.5;const r=Me(e),s=Me(t);return s>r?n=Cr(t.min,t.max-r,e.min):r>s&&(n=Cr(e.min,e.max-s,t.min)),kt(0,1,n)}function sS(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 $u=.35;function aS(e=$u){return e===!1?e=0:e===!0&&(e=$u),{x:of(e,"left","right"),y:of(e,"top","bottom")}}function of(e,t,n){return{min:uf(e,t),max:uf(e,n)}}function uf(e,t){return typeof e=="number"?e:e[t]||0}const iS=new WeakMap;class lS{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=me(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=h=>{n&&this.snapToCursor(ia(h).point),this.stopAnimation()},l=(h,m)=>{const{drag:f,dragPropagation:b,onDragStart:y}=this.getProps();if(f&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Mj(f),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Nt(x=>{let p=this.getAxisMotionValue(x).get()||0;if(Tt.test(p)){const{projection:v}=this.visualElement;if(v&&v.layout){const w=v.layout.layoutBox[x];w&&(p=Me(w)*(parseFloat(p)/100))}}this.originPoint[x]=p}),y&&K.update(()=>y(h,m),!1,!0),Lu(this.visualElement,"transform");const{animationState:k}=this.visualElement;k&&k.setActive("whileDrag",!0)},o=(h,m)=>{this.latestPointerEvent=h,this.latestPanInfo=m;const{dragPropagation:f,dragDirectionLock:b,onDirectionLock:y,onDrag:k}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:x}=m;if(b&&this.currentDirection===null){this.currentDirection=uS(x),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",m.point,x),this.updateAxis("y",m.point,x),this.visualElement.render(),k&&K.update(()=>k(h,m),!1,!0)},u=(h,m)=>{this.latestPointerEvent=h,this.latestPanInfo=m,this.stop(h,m),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new Zx(t,{onSessionStart:i,onStart:l,onMove:o,onSessionEnd:u,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:Xx(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:l}=s;this.startAnimation(l);const{onDragEnd:o}=this.getProps();o&&K.postRender(()=>o(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!_a(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=eS(l,this.constraints[t],this.elastic[t])),i.set(l)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;t&&Yn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=tS(r.layoutBox,t):this.constraints=!1,this.elastic=aS(n),s!==this.constraints&&!Yn(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Nt(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=sS(r.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Yn(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;s.root&&(s.root.scroll=void 0,s.root.updateScroll());const i=oN(r,s.root,this.visualElement.getTransformPagePoint());let l=nS(s.layout.layoutBox,i);if(n){const o=n(aN(l));this.hasMutatedConstraints=!!o,o&&(l=yx(o))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:l,onDragTransitionEnd:o}=this.getProps(),u=this.constraints||{},c=Nt(d=>{if(!_a(d,n,this.currentDirection))return;let h=u&&u[d]||{};(l===!0||l===d)&&(h={min:0,max:0});const m=s?200:1e6,f=s?40:1e7,b={type:"inertia",velocity:r?t[d]:0,bounceStiffness:m,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...h};return this.startAxisValueAnimation(d,b)});return Promise.all(c).then(o)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Lu(this.visualElement,t),r.start(dd(t,r,0,n,this.visualElement,!1))}stopAnimation(){Nt(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps()[n];return s||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){Nt(n=>{const{drag:r}=this.getProps();if(!_a(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:l,max:o}=s.layout.layoutBox[n],u=i.get()||0;i.set(t[n]-Q(l,o,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Yn(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Nt(l=>{const o=this.getAxisMotionValue(l);if(o&&this.constraints!==!1){const u=o.get();s[l]=rS({min:u,max:u},this.constraints[l])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Nt(l=>{if(!_a(l,t,null))return;const o=this.getAxisMotionValue(l),{min:u,max:c}=this.constraints[l];o.set(Q(u,c,s[l]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;iS.set(this.visualElement,this);const t=this.visualElement.current,n=ws(t,"pointerdown",c=>{const{drag:d,dragListener:h=!0}=this.getProps(),m=c.target,f=m!==t&&Ij(m);d&&h&&!f&&this.start(c)});let r;const s=()=>{const{dragConstraints:c}=this.getProps();Yn(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=oS(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,l=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),K.read(s);const o=qs(window,"resize",()=>this.scalePositionWithinConstraints()),u=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(Nt(h=>{const m=this.getAxisMotionValue(h);m&&(this.originPoint[h]+=c[h].translate,m.set(m.get()+c[h].translate))}),this.visualElement.render())});return()=>{o(),n(),l(),u&&u(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:l=$u,dragMomentum:o=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:l,dragMomentum:o}}}function cf(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function oS(e,t,n){const r=Fu(e,cf(n)),s=Fu(t,cf(n));return()=>{r(),s()}}function _a(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function uS(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class cS extends jn{constructor(t){super(t),this.removeGroupControls=Ue,this.removeListeners=Ue,this.controls=new lS(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ue}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const uo=e=>(t,n)=>{e&&K.update(()=>e(t,n),!1,!0)};class dS extends jn{constructor(){super(...arguments),this.removePointerDownListener=Ue}onPointerDown(t){this.session=new Zx(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Xx(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:uo(t),onStart:uo(n),onMove:uo(r),onEnd:(i,l)=>{delete this.session,s&&K.postRender(()=>s(i,l))}}}mount(){this.removePointerDownListener=ws(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let co=!1;class hS extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),co&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ni.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:l}=r;return l&&(l.isPresent=i,t.layoutDependency!==n&&l.setOptions({...l.options,layoutDependency:n}),co=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?l.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?l.promote():l.relegate()||K.postRender(()=>{const o=l.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),Er.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;co=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Jx(e){const[t,n]=Ox(),r=g.useContext(Kc);return a.jsx(hS,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(qx),isPresent:t,safeToRemove:n})}const mS={pan:{Feature:dS},drag:{Feature:cS,ProjectionNode:Vx,MeasureLayout:Jx}};function df(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&K.postRender(()=>i(t,ia(t)))}class fS extends jn{mount(){const{current:t}=this.node;t&&(this.unmount=Dj(t,(n,r)=>(df(this.node,r,"Start"),s=>df(this.node,s,"End"))))}unmount(){}}class pS extends jn{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=na(qs(this.node.current,"focus",()=>this.onFocus()),qs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function hf(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&K.postRender(()=>i(t,ia(t)))}class gS extends jn{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=Fj(t,(s,i)=>(hf(this.node,i,"Start"),(l,{success:o})=>hf(this.node,l,o?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Gu=new WeakMap,ho=new WeakMap,xS=e=>{const t=Gu.get(e.target);t&&t(e)},bS=e=>{e.forEach(xS)};function vS({root:e,...t}){const n=e||document;ho.has(n)||ho.set(n,{});const r=ho.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(bS,{root:e,...t})),r[s]}function yS(e,t,n){const r=vS(t);return Gu.set(e,n),r.observe(e),()=>{Gu.delete(e),r.unobserve(e)}}const kS={some:0,all:1};class wS extends jn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var u;(u=this.stopObserver)==null||u.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:kS[s]},o=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,i&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:h,onViewportLeave:m}=this.node.getProps(),f=d?h:m;f&&f(c)};this.stopObserver=yS(this.node.current,l,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(jS(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function jS({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const NS={inView:{Feature:wS},tap:{Feature:gS},focus:{Feature:pS},hover:{Feature:fS}},SS={layout:{ProjectionNode:Vx,MeasureLayout:Jx}},CS={...Y2,...NS,...mS,...SS},Ft=H2(CS,$2);function Vi(e){return typeof window>"u"?!1:e?$g():ud()}const PS=50,mf=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),ES=()=>({time:0,x:mf(),y:mf()}),TS={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function ff(e,t,n,r){const s=n[t],{length:i,position:l}=TS[t],o=s.current,u=n.time;s.current=Math.abs(e[`scroll${l}`]),s.scrollLength=e[`scroll${i}`]-e[`client${i}`],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=Cr(0,s.scrollLength,s.current);const c=r-u;s.velocity=c>PS?0:Zc(s.current-o,c)}function AS(e,t,n){ff(e,"x",t,n),ff(e,"y",t,n),t.time=n}function MS(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(ys(r))n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const s=r.getBoundingClientRect();r=r.parentElement;const i=r.getBoundingClientRect();n.x+=s.left-i.left,n.y+=s.top-i.top}else if(r instanceof SVGGraphicsElement){const{x:s,y:i}=r.getBBox();n.x+=s,n.y+=i;let l=null,o=r.parentNode;for(;!l;)o.tagName==="svg"&&(l=o),o=r.parentNode;r=l}else break;return n}const Ku={start:0,center:.5,end:1};function pf(e,t,n=0){let r=0;if(e in Ku&&(e=Ku[e]),typeof e=="string"){const s=parseFloat(e);e.endsWith("px")?r=s:e.endsWith("%")?e=s/100:e.endsWith("vw")?r=s/100*document.documentElement.clientWidth:e.endsWith("vh")?r=s/100*document.documentElement.clientHeight:e=s}return typeof e=="number"&&(r=t*e),n+r}const _S=[0,0];function DS(e,t,n,r){let s=Array.isArray(e)?e:_S,i=0,l=0;return typeof e=="number"?s=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?s=e.split(" "):s=[e,Ku[e]?e:"0"]),i=pf(s[0],n,r),l=pf(s[1],t),i-l}const ls={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},LS={x:0,y:0};function BS(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function zS(e,t,n){const{offset:r=ls.All}=n,{target:s=e,axis:i="y"}=n,l=i==="y"?"height":"width",o=s!==e?MS(s,e):LS,u=s===e?{width:e.scrollWidth,height:e.scrollHeight}:BS(s),c={width:e.clientWidth,height:e.clientHeight};t[i].offset.length=0;let d=!t[i].interpolate;const h=r.length;for(let m=0;m<h;m++){const f=DS(r[m],c[l],u[l],o[i]);!d&&f!==t[i].interpolatorOffsets[m]&&(d=!0),t[i].offset[m]=f}d&&(t[i].interpolate=ad(t[i].offset,Vg(r),{clamp:!1}),t[i].interpolatorOffsets=[...t[i].offset]),t[i].progress=kt(0,1,t[i].interpolate(t[i].current))}function IS(e,t=e,n){if(n.x.targetOffset=0,n.y.targetOffset=0,t!==e){let r=t;for(;r&&r!==e;)n.x.targetOffset+=r.offsetLeft,n.y.targetOffset+=r.offsetTop,r=r.offsetParent}n.x.targetLength=t===e?t.scrollWidth:t.clientWidth,n.y.targetLength=t===e?t.scrollHeight:t.clientHeight,n.x.containerLength=e.clientWidth,n.y.containerLength=e.clientHeight}function RS(e,t,n,r={}){return{measure:s=>{IS(e,r.target,n),AS(e,n,s),(r.offset||r.target)&&zS(e,n,r)},notify:()=>t(n)}}const qn=new WeakMap,gf=new WeakMap,mo=new WeakMap,xf=new WeakMap,Da=new WeakMap,bf=e=>e===document.scrollingElement?window:e;function eb(e,{container:t=document.scrollingElement,trackContentSize:n=!1,...r}={}){if(!t)return Ue;let s=mo.get(t);s||(s=new Set,mo.set(t,s));const i=ES(),l=RS(t,e,i,r);if(s.add(l),!qn.has(t)){const u=()=>{for(const m of s)m.measure(xe.timestamp);K.preUpdate(c)},c=()=>{for(const m of s)m.notify()},d=()=>K.read(u);qn.set(t,d);const h=bf(t);window.addEventListener("resize",d),t!==document.documentElement&&gf.set(t,Fu(t,d)),h.addEventListener("scroll",d),d()}if(n&&!Da.has(t)){const u=qn.get(t),c={width:t.scrollWidth,height:t.scrollHeight};xf.set(t,c);const d=()=>{const m=t.scrollWidth,f=t.scrollHeight;(c.width!==m||c.height!==f)&&(u(),c.width=m,c.height=f)},h=K.read(d,!0);Da.set(t,h)}const o=qn.get(t);return K.read(o,!1,!0),()=>{var h;lt(o);const u=mo.get(t);if(!u||(u.delete(l),u.size))return;const c=qn.get(t);qn.delete(t),c&&(bf(t).removeEventListener("scroll",c),(h=gf.get(t))==null||h(),window.removeEventListener("resize",c));const d=Da.get(t);d&&(lt(d),Da.delete(t)),xf.delete(t)}}const FS=[[ls.Enter,"entry"],[ls.Exit,"exit"],[ls.Any,"cover"],[ls.All,"contain"]],vf={start:0,end:1};function VS(e){const t=e.trim().split(/\s+/);if(t.length!==2)return;const n=vf[t[0]],r=vf[t[1]];if(!(n===void 0||r===void 0))return[n,r]}function OS(e){if(e.length!==2)return;const t=[];for(const n of e)if(Array.isArray(n))t.push(n);else if(typeof n=="string"){const r=VS(n);if(!r)return;t.push(r)}else return;return t}function US(e,t){const n=OS(e);if(!n)return!1;for(let r=0;r<2;r++){const s=n[r],i=t[r];if(s[0]!==i[0]||s[1]!==i[1])return!1}return!0}function jd(e){if(!e)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[t,n]of FS)if(US(e,t))return{rangeStart:`${n} 0%`,rangeEnd:`${n} 100%`}}const yf=new Map;function kf(e){const t={value:0},n=eb(r=>{t.value=r[e.axis].progress*100},e);return{currentTime:t,cancel:n}}function tb({source:e,container:t,...n}){const{axis:r}=n;e&&(t=e);let s=yf.get(t);s||(s=new Map,yf.set(t,s));const i=n.target??"self";let l=s.get(i);l||(l={},s.set(i,l));const o=r+(n.offset??[]).join(",");return l[o]||(n.target&&Vi(n.target)?jd(n.offset)?l[o]=new ViewTimeline({subject:n.target,axis:r}):l[o]=kf({container:t,...n}):Vi()?l[o]=new ScrollTimeline({source:t,axis:r}):l[o]=kf({container:t,...n})),l[o]}function WS(e,t){const n=tb(t),r=t.target?jd(t.offset):void 0,s=t.target?Vi(t.target)&&!!r:Vi();return e.attachTimeline({timeline:s?n:void 0,...r&&s&&{rangeStart:r.rangeStart,rangeEnd:r.rangeEnd},observe:i=>(i.pause(),px(l=>{i.time=i.iterationDuration*l},n))})}function HS(e){return e&&(e.target||e.offset)}function $S(e){return e.length===2}function GS(e,t){return $S(e)||HS(t)?eb(n=>{e(n[t.axis].progress,n)},t):px(e,tb(t))}function nb(e,{axis:t="y",container:n=document.scrollingElement,...r}={}){if(!n)return Ue;const s={axis:t,container:n,...r};return typeof e=="function"?GS(e,s):WS(e,s)}const KS=()=>({scrollX:gt(0),scrollY:gt(0),scrollXProgress:gt(0),scrollYProgress:gt(0)}),dr=e=>e?!e.current:!1;function wf(e,t,n,r){return{factory:s=>{let i;const l=()=>{if(dr(n)||dr(r)){Er.read(l);return}i=nb(s,{...t,axis:e,container:(n==null?void 0:n.current)||void 0,target:(r==null?void 0:r.current)||void 0})};return Er.read(l),()=>{cx(l),i==null||i()}},times:[0,1],keyframes:[0,1],ease:s=>s,duration:1}}function qS(e,t){return typeof window>"u"?!1:e?$g()&&!!jd(t):ud()}function rb({container:e,target:t,...n}={}){const r=bn(KS);qS(t,n.offset)&&(r.scrollXProgress.accelerate=wf("x",n,e,t),r.scrollYProgress.accelerate=wf("y",n,e,t));const s=g.useRef(null),i=g.useRef(!1),l=g.useCallback(()=>(s.current=nb((o,{x:u,y:c})=>{r.scrollX.set(u.current),r.scrollXProgress.set(u.progress),r.scrollY.set(c.current),r.scrollYProgress.set(c.progress)},{...n,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0}),()=>{var o;(o=s.current)==null||o.call(s)}),[e,t,JSON.stringify(n.offset)]);return ta(()=>{if(i.current=!1,dr(e)||dr(t)){i.current=!0;return}else return l()},[l]),g.useEffect(()=>{if(!i.current)return;let o;const u=()=>{const c=dr(e),d=dr(t);!c&&!d&&(o=l())};return Er.read(u),()=>{cx(u),o==null||o()}},[l]),r}function sb(e){const t=bn(()=>gt(e)),{isStatic:n}=g.useContext(aa);if(n){const[,r]=g.useState(e);g.useEffect(()=>t.on("change",r),[])}return t}function ab(e,t){const n=sb(t()),r=()=>n.set(t());return r(),ta(()=>{const s=()=>K.preRender(r,!1,!0),i=e.map(l=>l.on("change",s));return()=>{i.forEach(l=>l()),lt(r)}}),n}function YS(e){vs.current=[],e();const t=ab(vs.current,e);return vs.current=void 0,t}function Qt(e,t,n,r){if(typeof e=="function")return YS(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!="function")return XS(e,t,n,r);const l=typeof t=="function"?t:Yj(t,n,r),o=Array.isArray(e)?jf(e,l):jf([e],([c])=>l(c)),u=Array.isArray(e)?void 0:e.accelerate;return u&&!u.isTransformed&&typeof t!="function"&&Array.isArray(n)&&(r==null?void 0:r.clamp)!==!1&&(o.accelerate={...u,times:t,keyframes:n,isTransformed:!0}),o}function jf(e,t){const n=bn(()=>[]);return ab(e,()=>{n.length=0;const r=e.length;for(let s=0;s<r;s++)n[s]=e[s].get();return t(n)})}function XS(e,t,n,r){const s=bn(()=>Object.keys(n)),i=bn(()=>({}));for(const l of s)i[l]=Qt(e,t,n[l],r);return i}function ZS(e,t={}){const{isStatic:n}=g.useContext(aa),r=()=>ge(e)?e.get():e;if(n)return Qt(r);const s=sb(r());return g.useInsertionEffect(()=>Xj(s,e,t),[s,JSON.stringify(t)]),s}function QS(e,t={}){return ZS(e,{type:"spring",...t})}function JS(){const{scrollYProgress:e}=rb(),t=QS(e,{stiffness:200,damping:30,restDelta:.001});return a.jsx(Ft.div,{style:{scaleX:t},className:"fixed left-0 top-0 z-40 h-0.5 w-full origin-left bg-brand-500"})}const eC=()=>a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"h-10 w-10",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.7 6.3a4 4 0 0 0-5.5 4.5L3 17l2 2 6.2-6.2a4 4 0 0 0 4.5-5.5l-2.6 2.6-2-2 2.6-2.6Z"})});function la({message:e,fullScreen:t=!1}){const{t:n}=Ne(),r=a.jsxs("div",{className:"mx-auto max-w-md text-center",children:[a.jsx("div",{className:"mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-brand-100 text-brand-600 dark:bg-brand-900/40 dark:text-brand-400",children:a.jsx(eC,{})}),a.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:n("maintenance.title")}),a.jsx("p",{className:"text-neutral-600 dark:text-neutral-300",children:e||n("maintenance.defaultMessage")})]});return t?a.jsx("div",{className:"flex min-h-screen items-center justify-center bg-white px-4 dark:bg-neutral-950",children:r}):a.jsx("div",{className:"mx-auto max-w-6xl px-4 py-20 sm:px-6",children:r})}const Nf=a.jsx(a.Fragment,{children:'Wartungsmodus aktiv Besucher sehen aktuell eine Wartungsmeldung. Du siehst diese Seite nur, weil du die Berechtigung "Wartungsmodus umgehen" hast.'});function oa({inline:e=!1}){return e?a.jsx("div",{className:"mb-8 rounded-lg bg-amber-500 px-4 py-2 text-center text-xs font-semibold text-white",children:Nf}):a.jsx("div",{className:"bg-amber-500 px-4 py-2 text-center text-xs font-semibold text-white",children:Nf})}function tC({onClose:e}){const{consent:t,saveCustom:n}=Rr(),[r,s]=g.useState(t.external),[i,l]=g.useState(t.analytics),{t:o}=Ne();return a.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center bg-black/50 p-4",onClick:e,children:a.jsxs("div",{className:"w-full max-w-md rounded-xl bg-white p-6 dark:bg-neutral-900",onClick:u=>u.stopPropagation(),children:[a.jsx("h2",{className:"mb-1 text-lg font-bold text-neutral-900 dark:text-white",children:o("cookieConsent.modalTitle")}),a.jsxs("p",{className:"mb-4 text-sm text-neutral-600 dark:text-neutral-300",children:[o("cookieConsent.modalIntro")," ",a.jsx(O,{to:"/datenschutz",className:"underline hover:text-brand-500",onClick:e,children:o("cookieConsent.privacyPolicy")}),"."]}),a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3 rounded-lg border border-neutral-200 p-3 dark:border-neutral-700",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-neutral-800 dark:text-neutral-100",children:o("cookieConsent.necessaryTitle")}),a.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:o("cookieConsent.necessaryDesc")})]}),a.jsx("input",{type:"checkbox",checked:!0,disabled:!0,className:"mt-1 h-4 w-4 shrink-0"})]}),a.jsxs("div",{className:"flex items-start justify-between gap-3 rounded-lg border border-neutral-200 p-3 dark:border-neutral-700",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-neutral-800 dark:text-neutral-100",children:o("cookieConsent.externalTitle")}),a.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:o("cookieConsent.externalDesc")})]}),a.jsx("input",{type:"checkbox",checked:r,onChange:u=>s(u.target.checked),className:"mt-1 h-4 w-4 shrink-0"})]}),a.jsxs("div",{className:"flex items-start justify-between gap-3 rounded-lg border border-neutral-200 p-3 dark:border-neutral-700",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-neutral-800 dark:text-neutral-100",children:o("cookieConsent.analyticsTitle")}),a.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:o("cookieConsent.analyticsDesc")})]}),a.jsx("input",{type:"checkbox",checked:i,onChange:u=>l(u.target.checked),className:"mt-1 h-4 w-4 shrink-0"})]})]}),a.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[a.jsx("button",{type:"button",onClick:e,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:o("cookieConsent.cancel")}),a.jsx("button",{type:"button",onClick:()=>n({external:r,analytics:i}),className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:o("cookieConsent.saveSelection")})]})]})})}function nC(){const{decided:e,settingsOpen:t,acceptAll:n,rejectNonEssential:r,openSettings:s,closeSettings:i}=Rr(),{t:l}=Ne();return a.jsxs(a.Fragment,{children:[!e&&a.jsx("div",{className:"fixed inset-x-0 bottom-0 z-50 border-t border-neutral-200 bg-white/95 p-4 shadow-lg backdrop-blur dark:border-neutral-800 dark:bg-neutral-900/95 sm:p-5",children:a.jsxs("div",{className:"mx-auto flex max-w-6xl flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[a.jsxs("p",{className:"text-sm text-neutral-600 dark:text-neutral-300",children:[l("cookieConsent.bannerText")," ",l("cookieConsent.moreInfo")," ",a.jsx(O,{to:"/datenschutz",className:"underline hover:text-brand-500",children:l("cookieConsent.privacyPolicy")}),"."]}),a.jsxs("div",{className:"flex flex-wrap gap-2 sm:shrink-0",children:[a.jsx("button",{type:"button",onClick:s,className:"rounded-md border border-neutral-300 px-3 py-2 text-sm dark:border-neutral-700",children:l("cookieConsent.settings")}),a.jsx("button",{type:"button",onClick:r,className:"rounded-md border border-neutral-300 px-3 py-2 text-sm dark:border-neutral-700",children:l("cookieConsent.onlyNecessary")}),a.jsx("button",{type:"button",onClick:n,className:"rounded-md bg-brand-500 px-3 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:l("cookieConsent.acceptAll")})]})]})}),t&&a.jsx(tC,{onClose:i})]})}function rC(){const{consent:e}=Rr(),{ga_measurement_id:t}=Ir(),n=g.useRef(!1);return g.useEffect(()=>{if(!t||!e.analytics||n.current)return;n.current=!0;const r=document.createElement("script");r.src=`https://www.googletagmanager.com/gtag/js?id=${t}`,r.async=!0,document.head.appendChild(r),window.dataLayer=window.dataLayer||[];function s(...i){window.dataLayer.push(i)}window.gtag=s,s("js",new Date),s("config",t,{anonymize_ip:!0})},[t,e.analytics]),null}const ib=g.createContext({global:{enabled:!1,message:null},services:{enabled:!1,message:null},vehicles:{enabled:!1,message:null},bypass:!1}),sC=ib.Provider;function fl(){return g.useContext(ib)}const aC={global:{enabled:!1,message:null},services:{enabled:!1,message:null},vehicles:{enabled:!1,message:null}},iC={phone:"09373 20 62 390",whatsapp:null,contact_email:"info@hifi-planet-amorbach.de",hero_image_path:null,ga_measurement_id:null,package_card_theme:"graphite",package_card_layout:"strip"},lC=["/impressum","/datenschutz","/agb"];function oC(){const[e,t]=g.useState(null),[n,r]=g.useState(iC),{loading:s,hasPermission:i}=Mt(),l=ot();if(g.useEffect(()=>{M.get("/maintenance").then(t).catch(()=>t(aC)),M.get("/site-settings").then(r).catch(()=>{})},[]),e===null||s)return a.jsx("div",{className:"min-h-screen bg-white dark:bg-neutral-950"});const o=i("maintenance.bypass"),u=lC.includes(l.pathname);return e.global.enabled&&!o&&!u?a.jsx(Gh,{children:a.jsx(la,{message:e.global.message,fullScreen:!0})}):a.jsx(Gh,{children:a.jsx(sC,{value:{...e,bypass:o},children:a.jsx(xw,{value:n,children:a.jsxs("div",{className:"page-texture flex min-h-screen flex-col text-neutral-900 dark:text-neutral-100",children:[o&&e.global.enabled&&a.jsx(oa,{}),a.jsx(JS,{}),a.jsx(jw,{}),a.jsx("main",{className:"flex-1",children:a.jsx(ol,{})}),a.jsx(Tw,{}),a.jsx(nC,{}),a.jsx(rC,{})]})})})})}const uC={home:"M3 11.5 12 4l9 7.5M5 10v9a1 1 0 0 0 1 1h4v-6h4v6h4a1 1 0 0 0 1-1v-9",tag:"M4 4h7l9 9-7 7-9-9V4Zm3.5 3.5h.01",car:"M3 13.5 4.5 9A2 2 0 0 1 6.4 7.5h11.2A2 2 0 0 1 19.5 9L21 13.5M3 13.5v4a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-1h12v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-4M3 13.5h18M6.5 16.5h.01M17.5 16.5h.01",box:"M12 3 4 7.5v9L12 21l8-4.5v-9L12 3Zm0 9 8-4.5M12 12v9M12 12 4 7.5",mail:"M4 6h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1Zm0 0 8 7 8-7",users:"M16 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm-4 6c-4 0-7 2-7 4.5V19h14v-1.5C19 15 16 13 12 13Z",shield:"M12 3 4 6v6c0 4.5 3.4 7.7 8 9 4.6-1.3 8-4.5 8-9V6l-8-3Zm-1.5 9.5 4-4 1 1-5 5-2.5-2.5 1-1 1.5 1.5Z",lock:"M6 10V8a6 6 0 1 1 12 0v2m-13 0h14a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1Zm7 5v2",briefcase:"M4 7h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1Zm4 0V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M3 12h18",sliders:"M4 6h16M4 6a2 2 0 1 0 4 0 2 2 0 0 0-4 0Zm16 6H4m10 0a2 2 0 1 0 4 0 2 2 0 0 0-4 0ZM4 18h16m-12 0a2 2 0 1 0 4 0 2 2 0 0 0-4 0Z",image:"M4 5h16a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1Zm2 12 4.5-5.5L14 16l2.5-3L20 17H6ZM8 9.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z",help:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-5.5v.01M9.5 9.25a2.5 2.5 0 1 1 3.5 2.29c-.7.32-1 .77-1 1.46v.3"},cC=({path:e})=>a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",className:"h-5 w-5 shrink-0",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})});function dC(){const{logout:e,user:t,hasPermission:n}=Mt(),r=ea(),[s,i]=g.useState(!1),[l,o]=g.useState(0);g.useEffect(()=>{n("contact.manage")&&M.get("/contact").then(m=>o(m.filter(f=>f.status==="new").length)).catch(()=>{})},[]);const u=[{title:null,links:[{to:"/admin",label:"Dashboard",icon:"home",end:!0},{to:"/admin/account",label:"Mein Konto",icon:"lock"}]},{title:"Fahrzeug-Katalog",links:[{to:"/admin/brands",label:"Marken",icon:"tag",permission:"brands.manage"},{to:"/admin/models",label:"Modelle",icon:"car",permission:"models.manage"},{to:"/admin/packages",label:"Pakete",icon:"box",permission:"packages.manage"}]},{title:"Website",links:[{to:"/admin/services",label:"Leistungen",icon:"briefcase",permission:"services.manage"},{to:"/admin/faqs",label:"FAQ",icon:"help",permission:"content.manage"}]},{title:"Bildergalerie",links:[{to:"/admin/gallery-brands",label:"Marken",icon:"tag",permission:"gallery.manage"},{to:"/admin/gallery-projects",label:"Projekte",icon:"image",permission:"gallery.manage"}]},{title:"Kunden",links:[{to:"/admin/contact-requests",label:"Kontaktanfragen",icon:"mail",permission:"contact.manage",badge:l}]},{title:"Verwaltung",links:[{to:"/admin/users",label:"Benutzer",icon:"users",permission:"users.manage"},{to:"/admin/permission-groups",label:"Berechtigungsgruppen",icon:"shield",permission:"permission_groups.manage"},{to:"/admin/settings",label:"Einstellungen",icon:"sliders",permission:"settings.manage"}]}].map(m=>({...m,links:m.links.filter(f=>!f.permission||n(f.permission))})).filter(m=>m.links.length>0),c=async()=>{await e(),r("/admin/login")},d=({isActive:m})=>`flex items-center justify-between gap-2 rounded-md px-3 py-2 text-sm font-medium transition ${m?"bg-brand-500 text-white":"text-neutral-600 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-neutral-800"}`,h=({onNavigate:m})=>a.jsx("nav",{className:"space-y-5",children:u.map((f,b)=>a.jsxs("div",{children:[f.title&&a.jsx("p",{className:"mb-1.5 px-3 text-xs font-semibold uppercase tracking-wide text-neutral-400 dark:text-neutral-500",children:f.title}),a.jsx("div",{className:"space-y-1",children:f.links.map(y=>a.jsxs(ig,{to:y.to,end:y.end,className:d,onClick:m,children:[a.jsxs("span",{className:"flex items-center gap-2.5",children:[a.jsx(cC,{path:uC[y.icon]}),y.label]}),!!y.badge&&a.jsx("span",{className:"rounded-full bg-red-500 px-2 py-0.5 text-xs font-bold text-white",children:y.badge})]},y.to))})]},b))});return a.jsxs("div",{className:"flex min-h-screen bg-neutral-50 text-neutral-900 dark:bg-neutral-950 dark:text-neutral-100",children:[a.jsxs("aside",{className:"hidden w-60 shrink-0 border-r border-neutral-200 p-4 dark:border-neutral-800 sm:block",children:[a.jsxs("div",{className:"mb-6 flex items-center gap-2 px-3",children:[a.jsxs("span",{className:"rounded-lg px-2 py-1",children:[a.jsx("img",{src:Hs,alt:"HifiPlanet",className:"h-7 w-auto dark:hidden"}),a.jsx("img",{src:Ai,alt:"HifiPlanet",className:"hidden h-7 w-auto dark:block"})]}),a.jsx("span",{className:"text-sm font-semibold text-neutral-500 dark:text-neutral-400",children:"Admin"})]}),a.jsx(h,{})]}),a.jsxs("div",{className:"flex-1",children:[a.jsxs("header",{className:"border-b border-neutral-200 dark:border-neutral-800",children:[a.jsxs("div",{className:"flex items-center justify-between px-4 py-3 sm:px-6",children:[a.jsxs("div",{className:"flex items-center gap-2 sm:hidden",children:[a.jsx("button",{onClick:()=>i(m=>!m),"aria-label":"Menü öffnen",className:"rounded-md p-2 text-neutral-600 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-neutral-800",children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-6 w-6",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h16"})})}),a.jsxs("span",{className:"rounded-lg px-1.5 py-0.5",children:[a.jsx("img",{src:Hs,alt:"HifiPlanet",className:"h-6 w-auto dark:hidden"}),a.jsx("img",{src:Ai,alt:"HifiPlanet",className:"hidden h-6 w-auto dark:block"})]})]}),a.jsxs("p",{className:"hidden text-sm text-neutral-500 dark:text-neutral-400 sm:block",children:["Angemeldet als ",t==null?void 0:t.username,t!=null&&t.is_super_admin?" · Super-Admin":""]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(cg,{}),a.jsx("button",{onClick:c,className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm font-medium text-neutral-700 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-800",children:"Abmelden"})]})]}),s&&a.jsx("div",{className:"border-t border-neutral-200 px-4 py-3 dark:border-neutral-800 sm:hidden",children:a.jsx(h,{onNavigate:()=>i(!1)})})]}),a.jsx("main",{className:"p-4 sm:p-6",children:a.jsx(ol,{})})]})]})}function hC(){const{user:e,loading:t}=Mt();return t?a.jsx("div",{className:"flex min-h-screen items-center justify-center text-neutral-500",children:"Lädt…"}):e?a.jsx(ol,{}):a.jsx(Ws,{to:"/admin/login",replace:!0})}function Be({permission:e,children:t}){const{hasPermission:n}=Mt();return(Array.isArray(e)?e:[e]).some(i=>n(i))?t:a.jsxs("div",{className:"rounded-xl border border-neutral-200 bg-white p-8 text-center dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h1",{className:"mb-2 text-lg font-bold text-neutral-900 dark:text-white",children:"Keine Berechtigung"}),a.jsx("p",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:"Du hast keinen Zugriff auf diesen Bereich. Bitte wende dich an einen Administrator, falls du hier Zugriff brauchst."})]})}function fo(e,t,n="name"){if(!t)return;let r=document.head.querySelector(`meta[${n}="${e}"]`);r||(r=document.createElement("meta"),r.setAttribute(n,e),document.head.appendChild(r)),r.setAttribute("content",t)}function mC(e){let t=document.head.querySelector('link[rel="canonical"]');t||(t=document.createElement("link"),t.setAttribute("rel","canonical"),document.head.appendChild(t)),t.setAttribute("href",`https://hifi-planet.de${e}`)}function Ze({title:e,description:t,path:n}){g.useEffect(()=>{e&&(document.title=`${e} | HifiPlanet`,fo("og:title",`${e} | HifiPlanet`,"property")),t&&(fo("description",t),fo("og:description",t,"property")),n&&mC(n)},[e,t,n])}const fC=[.16,1,.3,1],Sf={up:{y:40},left:{x:-56},right:{x:56}};function pC(e){return{hidden:{opacity:0,scale:.96,filter:"blur(8px)",...Sf[e]||Sf.up},visible:{opacity:1,scale:1,x:0,y:0,filter:"blur(0px)"}}}const gC={hidden:{x:"-130%"},visible:{x:"230%",transition:{duration:1.1,ease:"easeInOut",delay:.4}}};function ye({children:e,direction:t="up",className:n="",index:r=0,shine:s=!1}){const i=Math.min(r*.09,.45);return a.jsxs(Ft.div,{className:n,style:{position:"relative",overflow:"hidden"},initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.25,margin:"-100px"},variants:pC(t),transition:{duration:.75,ease:fC,delay:i},children:[e,s&&a.jsx(Ft.div,{"aria-hidden":!0,variants:gC,className:"pointer-events-none absolute inset-y-0 -left-1/3 w-1/3 rotate-12 bg-gradient-to-r from-transparent via-white/40 to-transparent"})]})}function xC({items:e}){const[t,n]=g.useState(null);return a.jsx("div",{className:"divide-y divide-neutral-200 rounded-xl border border-neutral-200 bg-white dark:divide-neutral-800 dark:border-neutral-800 dark:bg-neutral-900",children:e.map((r,s)=>{const i=t===s;return a.jsxs("div",{children:[a.jsxs("button",{onClick:()=>n(i?null:s),className:"flex w-full items-center justify-between gap-4 px-5 py-4 text-left","aria-expanded":i,children:[a.jsx("span",{className:"font-medium text-neutral-900 dark:text-white",children:r.question}),a.jsx(Ft.svg,{animate:{rotate:i?180:0},transition:{duration:.2},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-5 w-5 shrink-0 text-neutral-500",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m6 9 6 6 6-6"})})]}),a.jsx(v2,{initial:!1,children:i&&a.jsx(Ft.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:"easeInOut"},className:"overflow-hidden",children:a.jsx("p",{className:"px-5 pb-4 text-sm text-neutral-600 dark:text-neutral-300",children:r.answer})})})]},r.question)})})}function lb({count:e=5,className:t="h-4 w-4"}){return a.jsx("div",{className:"flex gap-0.5 text-amber-400",children:Array.from({length:e}).map((n,r)=>a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:t,children:a.jsx("path",{d:"M10 1.5l2.6 5.6 6.1.6-4.6 4.1 1.3 6-5.4-3.1-5.4 3.1 1.3-6-4.6-4.1 6.1-.6L10 1.5z"})},r))})}const bC=70;function vC({testimonials:e}){const t=g.useRef(null),n=g.useRef(null),r=g.useRef({pos:0,half:0,hovering:!1,dragging:!1,dragStartX:0,dragStartPos:0,lastTime:null,rafId:null}).current;g.useLayoutEffect(()=>{const i=n.current,l=window.matchMedia("(prefers-reduced-motion: reduce)").matches,o=()=>{i.style.transform=`translateX(${r.pos}px)`},u=p=>{if(r.half<=0)return p;for(;p>0;)p-=r.half;for(;p<=-r.half;)p+=r.half;return p},c=()=>{r.half=i.scrollWidth/2,r.pos===0?r.pos=-r.half:r.pos=u(r.pos),o()};c();const d=new ResizeObserver(c);d.observe(i);const h=p=>{r.lastTime===null&&(r.lastTime=p);const v=(p-r.lastTime)/1e3;r.lastTime=p,!r.dragging&&!r.hovering&&!l&&(r.pos=u(r.pos+bC*v),o()),r.rafId=requestAnimationFrame(h)};r.rafId=requestAnimationFrame(h);const m=t.current,f=()=>{r.hovering=!0},b=()=>{r.hovering=!1},y=p=>{r.dragging=!0,r.dragStartX=p.clientX,r.dragStartPos=r.pos,m.setPointerCapture(p.pointerId),m.classList.add("cursor-grabbing"),m.classList.remove("cursor-grab")},k=p=>{r.dragging&&(r.pos=u(r.dragStartPos+(p.clientX-r.dragStartX)),o())},x=p=>{r.dragging&&(r.dragging=!1,m.hasPointerCapture(p.pointerId)&&m.releasePointerCapture(p.pointerId),m.classList.remove("cursor-grabbing"),m.classList.add("cursor-grab"))};return m.addEventListener("pointerenter",f),m.addEventListener("pointerleave",b),m.addEventListener("pointerdown",y),m.addEventListener("pointermove",k),m.addEventListener("pointerup",x),m.addEventListener("pointercancel",x),()=>{cancelAnimationFrame(r.rafId),d.disconnect(),m.removeEventListener("pointerenter",f),m.removeEventListener("pointerleave",b),m.removeEventListener("pointerdown",y),m.removeEventListener("pointermove",k),m.removeEventListener("pointerup",x),m.removeEventListener("pointercancel",x)}},[e.length]);const s=[...e,...e];return a.jsx("div",{ref:t,className:"marquee-viewport cursor-grab touch-pan-y select-none overflow-hidden",children:a.jsx("div",{ref:n,className:"marquee-track flex w-max gap-5",children:s.map((i,l)=>a.jsx("div",{className:"w-64 shrink-0 sm:w-72 lg:w-80",children:a.jsxs("div",{className:"flex h-full flex-col rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx(lb,{className:"mb-3 h-4 w-4"}),a.jsxs("p",{className:"mb-4 flex-1 text-sm text-neutral-600 dark:text-neutral-300",children:["„",i.text,'"']}),a.jsx("p",{className:"text-sm font-semibold text-neutral-900 dark:text-white",children:i.name})]})},`${i.name}-${l}`))})})}const yC="/assets/gallery-dash2-CEVCErVK.webp",ob="/assets/gallery-amp-purple-CESAKuOf.webp",kC="/assets/gallery-speaker-CUXQZ49Q.webp",ub="/assets/gallery-subs-COSd4seJ.webp",cb="/assets/gallery-dash-Cg-7v9qo.webp",wC="/assets/hero-trunk-Dp4_JHDh.webp",jC="/assets/gallery-rear-8cIXPC7T.webp",NC="/assets/hero-highlight-Co4f1Kj5.webp",SC="/assets/youtube-hintergrund-C0osNxn7.mp4",CC="ostj2mKDVUc",PC=["Ground Zero Audio","Audison","Hertz","Helix","Brax","Gladen","Alpine","Pioneer","Kenwood","JVC"],EC=[{src:ub,width:900,height:600},{src:ob,width:900,height:600},{src:kC,width:900,height:1200},{src:cb,width:900,height:814},{src:jC,width:900,height:1200},{src:wC,width:1920,height:1280}];function TC(){const{hero_image_path:e}=Ir(),t=e||yC,{t:n,language:r}=Ne(),s=n("home.stats"),i=n("home.galleryAlts"),l=EC.map((p,v)=>({...p,alt:i[v]})),o=n("home.testimonials"),[u,c]=g.useState([]);g.useEffect(()=>{M.get("/faqs").then(p=>{c(p.map(v=>({question:r==="de"?v.question_de:v.question_en,answer:r==="de"?v.answer_de:v.answer_en})))}).catch(()=>{})},[r]),Ze({title:n("home.metaTitle"),description:n("home.metaDescription"),path:"/"}),g.useEffect(()=>{if(u.length===0)return;const p=document.createElement("script");return p.type="application/ld+json",p.text=JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:u.map(v=>({"@type":"Question",name:v.question,acceptedAnswer:{"@type":"Answer",text:v.answer}}))}),document.head.appendChild(p),()=>document.head.removeChild(p)},[u]);const d=g.useRef(null),{scrollYProgress:h}=rb({target:d,offset:["start start","end start"]}),m=Qt(h,[0,1],["-6%","6%"]),f=Qt(h,[0,1],["0%","60%"]),b=Qt(h,[0,.8],[1,0]),y=Qt(h,[.5,1],[0,1]),k=Qt(y,p=>p>.05?"auto":"none"),x=Qt(h,[.5,1],[16,0]);return a.jsxs("div",{children:[a.jsx(Ft.div,{style:{opacity:y,pointerEvents:k,y:x},className:"fixed inset-x-0 bottom-0 z-20 border-t border-neutral-200 bg-white/95 px-4 py-3 shadow-[0_-8px_24px_rgba(0,0,0,0.08)] backdrop-blur dark:border-neutral-800 dark:bg-neutral-950/95 sm:px-6",children:a.jsxs("div",{className:"mx-auto flex max-w-6xl items-center justify-between gap-3",children:[a.jsx("p",{className:"hidden text-sm font-medium text-neutral-600 dark:text-neutral-300 sm:block",children:n("home.stickyCta")}),a.jsxs("div",{className:"flex w-full gap-3 sm:w-auto",children:[a.jsx(O,{to:"/fahrzeuge",className:"flex-1 rounded-md bg-brand-500 px-5 py-2.5 text-center text-sm font-semibold text-white shadow-sm transition hover:-translate-y-0.5 hover:bg-brand-600 sm:flex-none",children:n("home.selectVehicle")}),a.jsx(O,{to:"/kontakt",className:"flex-1 rounded-md border border-neutral-300 px-5 py-2.5 text-center text-sm font-semibold text-neutral-700 transition hover:-translate-y-0.5 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-800 sm:flex-none",children:n("home.getInTouch")})]})]})}),a.jsxs("section",{ref:d,className:"relative -mt-[89px] h-dvh min-h-[560px] overflow-hidden sm:-mt-[97px]",children:[a.jsx(Ft.img,{style:{y:m,scale:1.15},src:t,alt:n("home.heroImageAlt"),className:"absolute inset-0 h-full w-full object-cover"}),a.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-neutral-950 via-neutral-950/80 to-neutral-950/40"}),a.jsx(Ft.div,{style:{y:f,opacity:b},className:"relative flex h-full max-w-6xl flex-col items-center justify-center px-4 mx-auto text-center sm:px-6",children:a.jsxs(Ft.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.7,ease:"easeOut"},children:[a.jsx("p",{className:"mb-3 text-sm font-semibold uppercase tracking-wide text-brand-400",children:n("home.welcome")}),a.jsx("h1",{className:"text-3xl font-extrabold tracking-tight text-white sm:text-5xl",children:n("home.heroTitle")}),a.jsx("p",{className:"mx-auto mt-4 max-w-2xl text-base text-neutral-200 sm:text-lg",children:n("home.heroSubtitle")}),a.jsxs("div",{className:"mt-8 flex flex-wrap items-center justify-center gap-3",children:[a.jsx(O,{to:"/fahrzeuge",className:"rounded-md bg-brand-500 px-6 py-3 text-sm font-semibold text-white shadow-sm transition hover:-translate-y-0.5 hover:bg-brand-600 hover:shadow-lg",children:n("home.selectVehicle")}),a.jsx(O,{to:"/kontakt",className:"rounded-md border border-white/30 bg-white/10 px-6 py-3 text-sm font-semibold text-white backdrop-blur transition hover:-translate-y-0.5 hover:bg-white/20",children:n("home.getInTouch")})]})]})})]}),a.jsx("section",{className:"border-b border-neutral-200 bg-neutral-950 py-8 dark:border-neutral-800",children:a.jsx("div",{className:"mx-auto grid max-w-6xl grid-cols-2 gap-6 px-4 text-center sm:grid-cols-4 sm:px-6",children:s.map((p,v)=>a.jsxs(ye,{index:v,children:[a.jsx("p",{className:"text-2xl font-extrabold text-brand-400 sm:text-3xl",children:p.value}),a.jsx("p",{className:"text-sm text-neutral-400",children:p.label})]},p.label))})}),a.jsx("section",{className:"border-b border-neutral-200 py-8 dark:border-neutral-800",children:a.jsxs("div",{className:"mx-auto max-w-6xl px-4 sm:px-6",children:[a.jsx("p",{className:"mb-4 text-center text-xs font-semibold uppercase tracking-wide text-neutral-400",children:n("home.brandsHeading")}),a.jsx("div",{className:"flex flex-wrap items-center justify-center gap-x-8 gap-y-3",children:PC.map((p,v)=>a.jsx(ye,{index:v,className:"text-lg font-bold text-neutral-400 dark:text-neutral-600",children:p},p))})]})}),a.jsxs("section",{className:"relative flex min-h-[70vh] items-center justify-center overflow-hidden sm:min-h-[85vh]",children:[a.jsx("video",{autoPlay:!0,loop:!0,muted:!0,playsInline:!0,poster:cb,className:"absolute inset-0 h-full w-full object-cover",children:a.jsx("source",{src:SC,type:"video/mp4"})}),a.jsx("div",{className:"absolute inset-0 bg-black/55"}),a.jsxs(ye,{className:"relative mx-auto max-w-3xl px-4 text-center sm:px-6",children:[a.jsx("p",{className:"mb-4 text-xs font-semibold uppercase tracking-[0.2em] text-neutral-200 sm:text-sm",children:n("home.youtubeBadge")}),a.jsx("h2",{className:"text-3xl font-bold uppercase tracking-wide text-white sm:text-5xl",children:n("home.youtubeTitle")}),a.jsx("p",{className:"mt-4 text-xs font-semibold uppercase tracking-wide text-neutral-200 sm:text-sm",children:n("home.youtubeText")}),a.jsx("a",{href:`https://www.youtube.com/watch?v=${CC}`,target:"_blank",rel:"noopener noreferrer",className:"mt-8 inline-flex items-center justify-center rounded-full bg-white px-8 py-3 text-xs font-bold uppercase tracking-wide text-neutral-900 transition hover:-translate-y-0.5 hover:bg-neutral-100",children:n("home.youtubeCta")})]})]}),a.jsx("section",{className:"grain-band border-y border-neutral-200 bg-neutral-50 py-16 dark:border-neutral-800 dark:bg-neutral-900/40",children:a.jsxs("div",{className:"mx-auto max-w-6xl space-y-16 overflow-hidden px-4 sm:px-6",children:[a.jsxs("div",{className:"grid items-center gap-8 md:grid-cols-2",children:[a.jsx(ye,{direction:"left",shine:!0,className:"rounded-xl shadow-lg",children:a.jsx("img",{src:ub,alt:n("home.craftImageAlt"),width:900,height:600,className:"w-full rounded-xl object-cover",style:{maxHeight:380}})}),a.jsxs(ye,{direction:"right",index:1,children:[a.jsx("p",{className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",children:n("home.craftEyebrow")}),a.jsx("h2",{className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",children:n("home.craftTitle")}),a.jsx("p",{className:"text-neutral-600 dark:text-neutral-300",children:n("home.craftText")})]})]}),a.jsxs("div",{className:"grid items-center gap-8 md:grid-cols-2",children:[a.jsxs(ye,{direction:"left",className:"order-2 md:order-1",children:[a.jsx("p",{className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",children:n("home.adviceEyebrow")}),a.jsx("h2",{className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",children:n("home.adviceTitle")}),a.jsx("p",{className:"text-neutral-600 dark:text-neutral-300",children:n("home.adviceText")})]}),a.jsx(ye,{direction:"right",index:1,shine:!0,className:"order-1 md:order-2 rounded-xl shadow-lg",children:a.jsx("img",{src:ob,alt:n("home.adviceImageAlt"),width:900,height:600,className:"w-full rounded-xl object-cover",style:{maxHeight:380}})})]})]})}),a.jsxs("section",{className:"mx-auto max-w-6xl px-4 py-16 sm:px-6",children:[a.jsxs(ye,{className:"mb-8 text-center",children:[a.jsx("h2",{className:"text-2xl font-bold text-neutral-900 dark:text-white",children:n("home.insightsTitle")}),a.jsx("p",{className:"mt-2 text-neutral-600 dark:text-neutral-300",children:n("home.insightsText")})]}),a.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:l.map((p,v)=>a.jsx(ye,{index:v%3,shine:!0,className:"aspect-square overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:a.jsx("img",{src:p.src,alt:p.alt,width:p.width,height:p.height,loading:"lazy",className:"h-full w-full object-cover transition duration-300 hover:scale-105"})},p.src))})]}),a.jsx("section",{className:"grain-band border-y border-neutral-200 bg-neutral-50 py-16 dark:border-neutral-800 dark:bg-neutral-900/40",children:a.jsxs("div",{className:"mx-auto max-w-6xl px-4 sm:px-6",children:[a.jsxs(ye,{className:"mb-10 text-center",children:[a.jsx("div",{className:"mb-2 flex items-center justify-center gap-2",children:a.jsx(lb,{className:"h-6 w-6"})}),a.jsx("h2",{className:"text-2xl font-bold text-neutral-900 dark:text-white",children:n("home.reviewsRating")}),a.jsx("p",{className:"mt-1 text-neutral-600 dark:text-neutral-300",children:n("home.reviewsText")}),a.jsx("a",{href:"https://www.google.com/maps/search/?api=1&query=Hifi+Planet+Amorbach+Boxbrunner+Stra%C3%9Fe+20a",target:"_blank",rel:"noopener noreferrer",className:"mt-2 inline-block text-sm font-medium text-brand-600 hover:underline dark:text-brand-400",children:n("home.reviewsLink")})]}),a.jsx(ye,{children:a.jsx(vC,{testimonials:o})})]})}),a.jsx("section",{className:"mx-auto max-w-6xl overflow-hidden px-4 py-16 sm:px-6",children:a.jsxs("div",{className:"grid items-center gap-10 md:grid-cols-2",children:[a.jsx(ye,{direction:"left",shine:!0,className:"overflow-hidden rounded-xl shadow-lg",children:a.jsx("img",{src:NC,alt:n("home.moreImageAlt"),width:1600,height:905,className:"h-full w-full object-cover",loading:"lazy"})}),a.jsxs(ye,{direction:"right",index:1,className:"rounded-xl border border-neutral-200 bg-white p-8 text-center shadow-sm dark:border-neutral-800 dark:bg-neutral-900 md:text-left",children:[a.jsx("h2",{className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",children:n("home.moreTitle")}),a.jsx("p",{className:"mx-auto mb-8 max-w-2xl text-neutral-600 dark:text-neutral-300 md:mx-0",children:n("home.moreText")}),a.jsx(O,{to:"/leistungen",className:"inline-block rounded-md border border-neutral-300 px-6 py-3 text-sm font-semibold text-neutral-700 transition hover:-translate-y-0.5 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-800",children:n("home.moreCta")})]})]})}),a.jsx("section",{className:"border-t border-neutral-300 py-16 dark:border-neutral-700",children:a.jsxs("div",{className:"mx-auto max-w-3xl px-4 sm:px-6",children:[a.jsx(ye,{className:"mb-8 text-center",children:a.jsx("h2",{className:"text-2xl font-bold text-neutral-900 dark:text-white",children:n("home.faqHeading")})}),a.jsx(ye,{index:1,children:a.jsx(xC,{items:u})})]})})]})}function AC(){const[e,t]=g.useState([]),[n,r]=g.useState(""),s=fl(),{t:i}=Ne();return Ze({title:i("vehicleSelect.metaTitle"),description:i("vehicleSelect.metaDescription"),path:"/fahrzeuge"}),g.useEffect(()=>{s.vehicles.enabled&&!s.bypass||M.get("/brands").then(t).catch(l=>r(l.message))},[s.vehicles.enabled,s.bypass]),s.vehicles.enabled&&!s.bypass?a.jsx(la,{message:s.vehicles.message}):a.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[s.vehicles.enabled&&s.bypass&&a.jsx(oa,{inline:!0}),a.jsx("h1",{className:"mb-2 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:i("vehicleSelect.title")}),a.jsx("p",{className:"mb-8 text-neutral-600 dark:text-neutral-300",children:i("vehicleSelect.intro")}),n&&a.jsx("p",{className:"text-red-600",children:n}),e.length===0&&!n&&a.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:i("vehicleSelect.empty")}),a.jsx("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4",children:e.map(l=>a.jsx(O,{to:`/fahrzeuge/${l.slug}`,className:"flex items-center justify-center rounded-xl border border-neutral-200 bg-white px-6 py-8 text-center font-semibold text-neutral-800 shadow-sm transition hover:-translate-y-0.5 hover:border-brand-500 hover:shadow-md dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-100",children:l.name},l.id))})]})}function MC(){const{brandSlug:e}=$n(),[t,n]=g.useState(null),[r,s]=g.useState(""),i=fl(),{t:l}=Ne();return g.useEffect(()=>{i.vehicles.enabled&&!i.bypass||M.get(`/brands/${e}/models`).then(n).catch(o=>s(o.message))},[e,i.vehicles.enabled,i.bypass]),Ze({title:t?`${t.brand.name} ${l("brandPage.titleSuffix")}`:l("brandPage.metaTitleFallback"),description:t?l("brandPage.metaDescription")(t.brand.name):void 0,path:`/fahrzeuge/${e}`}),i.vehicles.enabled&&!i.bypass?a.jsx(la,{message:i.vehicles.message}):r?a.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:r}):t?a.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[i.vehicles.enabled&&i.bypass&&a.jsx(oa,{inline:!0}),a.jsxs("p",{className:"mb-1 text-sm text-neutral-500 dark:text-neutral-400",children:[a.jsx(O,{to:"/fahrzeuge",className:"hover:text-brand-500",children:l("brandPage.breadcrumbVehicles")})," / ",t.brand.name]}),a.jsxs("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:[t.brand.name," ",l("brandPage.titleSuffix")]}),t.models.length===0&&a.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:l("brandPage.empty")}),a.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3",children:t.models.map(o=>a.jsx(O,{to:`/fahrzeuge/${e}/${o.slug}`,className:"flex items-center justify-center rounded-xl border border-neutral-200 bg-white px-6 py-8 text-center font-semibold text-neutral-800 shadow-sm transition hover:-translate-y-0.5 hover:border-brand-500 hover:shadow-md dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-100",children:o.name},o.id))})]}):a.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:l("brandPage.loading")})}const Cf="data:image/webp;base64,UklGRmoNAABXRUJQVlA4IF4NAAAQjACdASrgAVYDPlEok0ajoqGhIRK4IHAKCWlu/F+5xDCoDux8VXNtc99B5Uf715Q+k/+V6E/yD7bfvf7tYI7QKys1Pu/n/K9wD+L/0L/aeqHflfZf937AH81/p//N/yXr9f9f+M/yf7c+4D6R/7n+O+BL9d+rb+0f//9yX9VQU+fHDhw4cN7KTkCBAgQIECBAgQIEB8GtgzU5WrVq1atWrVq1atTTWWxGRvDLM5r169evXr169evVcNgPhleRXp06dOnTp06dOnTpUIn65+OKaJVsmzZs2bNmzZs2bNmSyYC6ipEunTp06dOnTp06dOlydZVuN901q1atWrVq1atWrVXZqLYS16JYyeHDhw4cOHDhw4cN4wtQeDaQLgECBAgQIECBAgQIDddB6sEmQB2atWrVq1atWrVq1aq1iYS5JU9iBlzXr169evXr169evXeEPp+8N6OklatWrVq1atWrVq1V3IfqDdZ8CK1AgQIECBAgQIECBBQFoI3bXHSzdGb8+OHDhw4cOHDhw4ZwLNj/Gx48ePHjx48ePHjx5HaZ5q8hFQPLVq1atWrVq1atWrVWlrSSS1atWrVq1atWrVq1VouJ4vs1atWrVq1atWrVqzMNN6naRaj4OHDhw4cOHDhwzggYy8goXr169evXr169evXbAmy3nWg79+/fv379+/fv377Aw+GV3JG24BIkSJEiRIkSJEiRH091sORb3KZK2rVq1atWrVq1atWZgOgxn2g3CECBAgQIECBAgQHwEh4tRYq5WHRSJEiRIkSJEiRIkRmQ4gXd9q0Xa9evXr169evXr169SUP3aSDmqBOfHDhw4cOHDhw4cN/rYXzoW6jx48ePHjx48ePHjwyNgV/F/hRIkSJEiRIkSJEiRGcgeccx2x48ePHjx48ePHjx5+h2DL7y1q1atWrVq1atWrVqrLjxn1+UevXr169evXr169epWz/ixb7G7Fx48ePHjx48ePHjx64Dpo0+TFzjw4cOHDhw4cOHDhwr64/FOVqj1ftlBYsWLFixYsWLFixsB93m6MKtrfi/YePHjx48ePHjx48eGCFP4MdBX+BXbQiRIkSJEiRIkSJEiA+X4/Ne4l0FixYsWLFixYsWLTKZjxkHLs7TTrVq1atWrVq1atWrSGY83Cktx0PPjhw4cOHDhw4cN/7Xmd/H4DxEePHjx48ePHjx48ct7KWpas7p5jy5cuXLly5cuXLlyM+h2/gRIkSJEiRIkSJEiRAPRMs9EnbFixYsWLFixYsWLBwJstxClHwcOHDhw4cOHDhw3+o6GvCGxY8ePHjx48ePHjx45aAayr3BCnnxw4cOHDhw4cOG/2HuJWxIvK1JLZs2bNmzZs2bNmyAMNnZLnTo6dOnTp06dOnTp06Vd0rFPQfnwwCPHjx48ePHjx48eOU7jRhCFUn5bFixYsWLFixYsWKZRr/1LzwcOHDhw4cOHDhw4ZshIGgexQoECBAgQIECBAgQH+hD+jvXr169eu0AAP7/2BA2pStbx3f0LK6/mZcFuZpv73FLTm7GUv07j8lFLoOGX1EwKUHfPc4FImBkAvjxF1E2TgBogJKpQ2lbMv5bOqPckB4PELJo9ZXlMwGup4PkMOtTZPmrbNoaCJqn0H4Bx7A0xA439P5hkMGBnAEfInQIN5UeUIDb3y6tLej2gR8HhJ5XmTsxvmM15ltL5ZwdGmoNeW8NevUVUKqJ8mNngu7ocCsyGYaeYOGGZBBt6rj6bPVKVbxvb8onw6mljAaaxGTz0W+aNPv06kK3qhDe6/uHi8kg2qvjF3njhRMyOJKZzg12h4qOtVgTuKPAMRWYDkgwiRs9iYqcumonNNXvXk3FAk2LO5XnyjtD5sHSUO3pIrztpBvqq+UJzKeIwGBlPwA2NP46tOJxLzbrKeH4SQjt2HAsbrVcQ/b/TgKZGPwaqfGDN+OjqJK3Z9dyCkGGfGKeG1w9+HSZTm/qh052lQEJAcdUX6vm/+sDBxtrfl4Sg8iMcVnDsfTKJpsTYF/vzJ1oQ6/VPyIX1HpDwnPXsptu9rKDFazlkwc3ofi8uKJmycgPiG9xOLlzn4Af8Dm+LcjJUMAtA7XeZPLlW1bwogbRthU8oA4LcURuku6eXDJ1eb1IKUU7k/UK0cBeK+R5YVcmrOnZIyHzcIaClYnrIwerP535fHv4VXjURTO6/85BvSeTNWvQGqkW5v1hG6AEMrxBryfat3kmr+SNEz5wC2f54z1O7C2KsRpt3maISh9PhMg7jDIxmVe07eHtkLtz6v3yQUJQV95yazDYpH5JfpuYSb8dtmB1cKjeoDTPvik9dCA1UFCTZBfojpIOwXdwAR7JEdZkEi/24hMNKJJlB6udZZKqNJB1hNl24Z++z6lAGSAuRgSwDZGdbqxs+0iL6wmRHilqPOiYB6hQiPZ7cfpMZxesqRwyhcf1O29w4ORG/7BlerR8hYvY4B1XsPYbDORvPk6FHIDXwTXGpuDIta7G4F6RNDdOvCFkAl53GZo5h/p2QkWUry5YuyegnPlKjT3He6ewYypA9YOvMhaqip7kr9sF4TU2bX9foKZ+FFZNzhyySS+13+g4BdJo9YF3bw5b6eSxUfTWiDLNh50VjuqRQWHUEkiA8zJqnqkKCwuDy6iY2oF20FJQlGIPpCDKPBzdXSb/n9NDltaoUlbam7cDAU7CwNdaWFXTABRk0S0e49iF4tO106Uwul7DGYpq0Eu71TnKUjCtEBc83QH8skvRzHniEne3AtJLYRH0cMNSSzeCJ1g+Nfc8RaZkhLhCaZGZdYe5j0LGmQnVFt2iapZvGBi7Sw0X56zdziC9Foq0OPsqKFetZdICc2eUV5Vu1+nvisSzn8wlSDUt3OmRkt/gJxfJQfWxcu5HZ26qqNpA4ablWrX4E9DEmvXzpFGYCnYJMheN2BlWwBVLh1cyQ8INngXaoB8I5Pj9oYyuz/W+jvJQ6G074luX9D3pLkuc88D0Hae3ZqXrRYRzGF1vD8pHsk9Co8B6rpE/4GEwW/zsCtnjz5G8m4KFwf2qW1k0HkNv7Nlg38bcz6TdTzuw/jega5XZQQhflLu4I6l+s90BHFIR+JEXTBBqJwT+IgTnpHNc+h5Ek74HiKqXuGUNGIKIozHkiFxMlnrsklrpweBzYY6ype9CzepAuQF63xC/eIJw1pMZEC1pPgq/r+1gWx5M6g8fpu2O12sb6pLeqT+G4mK3yHMZTojfp1xwQedRmwZnWQ8SCh4XV2a/+3OTz4D4pmmumyBV7V2VW3he8y6usinSjfYPxLyTng27fgw6jQhHl2mVhxBBjiwr5ljvJV7L+MJYDiZjGWfBCsTmehk6rbNt7ahTJpHu4B9ctRqiZXjx0zGpTF91OKifmy4nTq31p1XaIsZAHCWvItXKeke06KKKRTIm6mCT9yBJVwG1sqQhjrkP77q0/JGYgOwgdCQCstsAZQ0FlOrGYXYTIQK/krLyCAZjg8vP/Ers/KVN8F88OsyU5/T1e5ba8A2F63qgwhtkWoVIEZErOVL8sM/DtpWTlcBNsvVOFl4tT+Sk6a2ScCptFL5F6cZXTIw8JmgoCbyqB6xyU+uPP5y09s5T8MDC7Em7NpxCjgD39eed40gHQrBm6CtAbS9JOCVPkPxbpcGDj/LoAGbnyYzMpOmTi28LJ9FTIqyGuAI0jxY/QpNelOOEvNK3io1HeYkK3AprImDk99tlUjgt9bc3ejCOFDXt9LqGHjFssGrhVHyJBmWjwHQipcIMHxF2jfP5jfAGuHtJRRncHIFgLWmJ1XmzJ0LLqWCJShdJSJLc7L6YeVcgKfzOZCwhtzJ7VeI3uBhPXQNOqCf5tlQ32HApAMvCIiBwhYrpfFo/kvjfTMB/NJ0w2Lk8GAFfFQY+U6uX1oB0hztGmA5HggJTwgLo8exG64m3Xu4fg2g4MmQol7z6xNwwubABnpoS3Og85giFkaarUP2ovQyixFpXki8Xf5a5NwjUGCPbx+LD3WKJiBtkiHsYMMV/VAZVNvdg/Ph/V4ZYOr+hw7g9mOJXi+oVZxG9pqJC9w8nRkegsnQ2lpRHn22lTsIa9aOkR0X8zp/IajQxUzv057a3WptBst0EZbZtfmWp6h2K0sDQS9oQT1PqOkGDJlz6ZHZzDMShDTcwJfIZMdnjpeHdPoYoqlcn3M8daRuMeTSP3mabP1/pdQrs6Wl7ToKog2Au/gv46pUMgVcKmdWNJdDF8RplMMXJpU2tZMdkTWq4ofSypsCfuWfeHOpFQGJdFF6OoH2pDJXvkqpj1a832g3uYtVQg1TGyqYqI7UBZQy4NEZbdj6O/s6MNEnfujUDQ8QZj7rSE2RI77egKDWzM708AsvlMFoeX4CVP09rMzXNP2aOZwY7zOBTvBgEEqCWlXAFlY8pW0zIm16gqSPiwRUgH41i1PuJx382C0zTWGT243ZhLnyOIlreUrMQAfwR/oYt+ljnDFKqa5PEczDPa+u/vWmR6UM+Q/lLFiIlgBJTfaekWoeLpPd9FPN4gIHzK1ZS8kDHyq3lh/e6FQ84a4Zg6JlfQC/qhAAAAA==",_C="/assets/base-BKOm0Bib.webp",DC="/assets/clear-DZZMSrMX.webp",LC="/assets/drive-BE2W1yna.webp",BC="/assets/prime-BTVNe2Gb.webp",zC="/assets/elite_r-BRvz_pyr.webp",IC="/assets/apex-CFy2qup8.webp",RC="/assets/statement-pTO-wTPx.webp",FC="/assets/limitless-DDs0S_PU.webp",VC=(e,t,n)=>{t/=100,n/=100;const r=l=>(l+e/30)%12,s=t*Math.min(n,1-n),i=l=>n-s*Math.max(-1,Math.min(r(l)-3,Math.min(9-r(l),1)));return[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)]},po=(e,t,n)=>`rgb(${VC(e,t,n).join(", ")})`,Pf=e=>e.map(([t,n,r,s,i,l])=>({bgTop:po(t,n,r),border:po(t,n,r+8),accent:po(s,i,l),img:null})),Ef={graphite:[{accent:"#b6b6b6",border:"#2a2a2a",bgTop:"#1c1c1c",img:_C},{accent:"#d3d3d3",border:"#2e2e2e",bgTop:"#212121",img:DC},{accent:"#8fb8bd",border:"#26383b",bgTop:"#16282b",img:LC},{accent:"#6fbf73",border:"#1f3a24",bgTop:"#122916",img:BC},{accent:"#63d34f",border:"#204a1c",bgTop:"#123312",img:zC},{accent:"#8bea3c",border:"#2b5518",bgTop:"#173a0f",img:IC},{accent:"#d9a83c",border:"#4a3a16",bgTop:"#33270d",img:RC},{accent:"#f2c14e",border:"#5a4718",bgTop:"#3d2f0c",img:FC}],"deep-blue":Pf([[215,18,11,210,15,60],[212,25,11,208,32,60],[210,38,12,206,46,60],[212,46,12,205,56,61],[214,52,12,205,63,62],[216,58,12,205,68,63],[220,62,12,212,73,65],[226,66,12,216,78,68]]),"warm-bronze":Pf([[30,15,11,34,22,60],[34,32,11,34,46,60],[32,46,12,30,58,60],[26,52,12,24,65,60],[20,55,12,18,68,60],[14,55,12,12,68,61],[8,52,12,6,64,62],[2,50,12,358,60,63]])},OC="#f2f2f2",UC="#8a8a8a",WC="#c4c4c4",Tf=5;function HC({pkg:e,tier:t,tierT:n,layout:r,bullets:s,formatPrice:i,contactUrl:l,t:o}){const[u,c]=g.useState(!1),d=s.length-Tf,h=u?s:s.slice(0,Tf),m=t.img?null:{backgroundColor:t.accent,WebkitMaskImage:`url(${Cf})`,maskImage:`url(${Cf})`,maskMode:"luminance",WebkitMaskSize:"cover",maskSize:"cover",WebkitMaskPosition:"center",maskPosition:"center",WebkitMaskRepeat:"no-repeat",maskRepeat:"no-repeat"};return a.jsxs("div",{style:{borderColor:t.border,background:`linear-gradient(180deg, ${t.bgTop} 0%, #0b0b0b 55%, #080808 100%)`},className:r==="strip"?"relative flex min-h-[640px] grow shrink basis-[190px] min-w-[190px] max-w-[240px] snap-start flex-col overflow-hidden rounded-[18px] border shadow-xl shadow-neutral-900/20 dark:shadow-black/40 sm:basis-[210px]":r==="coverflow"?"relative flex min-h-[640px] w-[230px] shrink-0 snap-center flex-col overflow-hidden rounded-[18px] border shadow-xl shadow-neutral-900/20 will-change-transform dark:shadow-black/40":"relative flex min-h-[640px] flex-col overflow-hidden rounded-[18px] border shadow-xl shadow-neutral-900/20 dark:shadow-black/40",children:[t.img?a.jsx("img",{src:t.img,alt:"","aria-hidden":"true",className:"pointer-events-none absolute inset-0 h-full w-full object-cover"}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"pointer-events-none absolute inset-0",style:{...m,opacity:.2+n*.45,filter:"blur(18px)"},"aria-hidden":"true"}),a.jsx("div",{className:"pointer-events-none absolute inset-0",style:{...m,opacity:.55+n*.45},"aria-hidden":"true"})]}),e.is_featured&&a.jsx("span",{className:"absolute top-2 left-1/2 z-10 -translate-x-1/2 rounded-full bg-brand-500 px-3 py-1 text-xs font-bold text-white shadow",children:o("modelPage.featuredBadge")}),a.jsxs("div",{className:"relative z-10 text-center",style:{padding:"34px 20px 0"},children:[a.jsx("div",{style:{fontFamily:"'Barlow Condensed', sans-serif",fontSize:"30px",letterSpacing:"3px",fontWeight:600,color:t.accent,textTransform:"uppercase",lineHeight:1.1},children:e.name}),a.jsx("div",{style:{width:"44px",height:"2px",margin:"14px auto 0",background:`linear-gradient(90deg, rgba(255,255,255,0) 0%, ${t.accent} 50%, rgba(255,255,255,0) 100%)`}})]}),s.length>0&&a.jsxs("div",{className:"relative z-10",style:{padding:"18px 20px 14px",background:u?"linear-gradient(180deg, rgba(8,8,8,0.7) 0%, rgba(8,8,8,0.62) 94%, rgba(8,8,8,0) 100%)":"linear-gradient(180deg, rgba(8,8,8,0.55) 0%, rgba(8,8,8,0.48) 92%, rgba(8,8,8,0) 100%)"},children:[a.jsx("ul",{className:"space-y-1.5 text-left",children:h.map((f,b)=>a.jsxs("li",{className:"flex items-start gap-2",style:{fontSize:"13px",color:WC},children:[a.jsx(Re,{name:"check",className:"mt-0.5 h-3.5 w-3.5 shrink-0",style:{color:t.accent}}),a.jsx("span",{className:"leading-snug",children:f})]},b))}),d>0&&a.jsxs("button",{type:"button",onClick:()=>c(f=>!f),className:"mt-2.5 flex items-center gap-1 hover:opacity-80",style:{fontSize:"13px",color:t.accent},children:[u?o("modelPage.lessBullets"):o("modelPage.moreBullets")(d),a.jsx(Re,{name:u?"chevron-up":"chevron-down",className:"h-3.5 w-3.5"})]})]}),a.jsx("div",{className:"relative z-10 flex-1"}),a.jsx("div",{className:"relative z-10",style:{padding:"20px 20px 28px",background:"linear-gradient(180deg, rgba(8,8,8,0) 0%, rgba(8,8,8,0.85) 45%, rgba(8,8,8,0.95) 100%)"},children:a.jsxs("div",{className:"text-center",children:[!e.price_text&&a.jsx("div",{style:{fontSize:"13px",color:UC},children:o("modelPage.totalPrice")}),a.jsx("div",{style:{marginTop:"4px",fontFamily:"'Barlow Condensed', sans-serif",fontSize:"30px",fontWeight:600,letterSpacing:"1px",color:OC},children:e.price_text||i(e.total_price)}),a.jsx(O,{to:l(e),className:"mt-4 inline-block rounded-md bg-brand-500 px-4 py-2 text-center text-sm font-semibold text-white shadow-lg shadow-brand-500/30 hover:bg-brand-400",children:o("modelPage.requestContact")})]})})]})}function $C(){const{brandSlug:e,modelSlug:t}=$n(),[n,r]=g.useState(null),[s,i]=g.useState(""),l=fl(),{t:o,language:u}=Ne(),{package_card_theme:c,package_card_layout:d}=Ir(),h=Ef[c]||Ef.graphite,m=["grid","strip","coverflow"].includes(d)?d:"strip",f=g.useRef(null),b=g.useRef(null),y=g.useRef(null),k=g.useRef(!1),x=N=>new Intl.NumberFormat(u==="de"?"de-DE":"en-US",{style:"currency",currency:"EUR"}).format(N);if(g.useEffect(()=>{l.vehicles.enabled&&!l.bypass||M.get(`/models/${e}/${t}/packages`).then(r).catch(N=>i(N.message))},[e,t,l.vehicles.enabled,l.bypass]),g.useEffect(()=>{const N=f.current;if(m!=="coverflow"||!N)return;let S=0;const E=()=>{S=0;const U=N.scrollLeft+N.clientWidth/2;for(const Y of N.children){const J=Y.offsetLeft+Y.offsetWidth/2,R=Math.max(-1,Math.min(1,(J-U)/(Y.offsetWidth*1.4))),X=Math.abs(R);Y.style.transform=`rotateY(${(-R*35).toFixed(2)}deg) scale(${(1-X*.13).toFixed(3)}) translateZ(${(-X*60).toFixed(1)}px)`,Y.style.zIndex=String(100-Math.round(X*50))}},T=()=>{S||(S=requestAnimationFrame(E))};E(),N.addEventListener("scroll",T,{passive:!0});const I=new ResizeObserver(T);return I.observe(N),()=>{N.removeEventListener("scroll",T),I.disconnect(),cancelAnimationFrame(S)}},[m,n]),g.useEffect(()=>{const N=f.current;if(m==="grid"||!N||k.current)return;const S=window.matchMedia("(pointer: coarse)").matches,E=window.matchMedia("(prefers-reduced-motion: reduce)").matches;if(!S||E)return;k.current=!0;const T=Math.min(N.clientWidth*.4,160),I=setTimeout(()=>N.scrollTo({left:T,behavior:"smooth"}),500),U=setTimeout(()=>N.scrollTo({left:0,behavior:"smooth"}),1250);return()=>{clearTimeout(I),clearTimeout(U)}},[m,n]),g.useEffect(()=>{const N=f.current,S=b.current,E=y.current;if(m==="grid"||!N||!S||!E)return;let T=0;const I=()=>{T=0;const V=N.scrollWidth-N.clientWidth;if(V<=1){S.style.opacity="0",S.style.pointerEvents="none";return}S.style.opacity="1",S.style.pointerEvents="auto";const $=S.clientWidth,Je=Math.max(32,N.clientWidth/N.scrollWidth*$);E.style.width=`${Je}px`,E.style.transform=`translateX(${(N.scrollLeft/V*($-Je)).toFixed(1)}px)`},U=()=>{T||(T=requestAnimationFrame(I))};I(),N.addEventListener("scroll",U,{passive:!0});const Y=new ResizeObserver(U);Y.observe(N);let J=!1,R=0;const X=V=>{const $=S.getBoundingClientRect(),Je=E.clientWidth,ut=Math.min(Math.max(V-$.left-R,0),$.width-Je);N.scrollLeft=ut/($.width-Je)*(N.scrollWidth-N.clientWidth)},_=V=>{J=!0,S.setPointerCapture(V.pointerId),N.style.scrollSnapType="none";const $=E.getBoundingClientRect();R=V.clientX>=$.left&&V.clientX<=$.right?V.clientX-$.left:E.clientWidth/2,V.clientX>=$.left&&V.clientX<=$.right||X(V.clientX)},L=V=>{J&&X(V.clientX)},F=V=>{var $;J&&(J=!1,($=S.hasPointerCapture)!=null&&$.call(S,V.pointerId)&&S.releasePointerCapture(V.pointerId),N.style.scrollSnapType="")};return S.addEventListener("pointerdown",_),S.addEventListener("pointermove",L),S.addEventListener("pointerup",F),S.addEventListener("pointercancel",F),()=>{N.removeEventListener("scroll",U),Y.disconnect(),cancelAnimationFrame(T),S.removeEventListener("pointerdown",_),S.removeEventListener("pointermove",L),S.removeEventListener("pointerup",F),S.removeEventListener("pointercancel",F)}},[m,n]),Ze({title:n?o("modelPage.metaTitle")(n.model.brand_name,n.model.name):o("modelPage.metaTitleFallback"),description:n?o("modelPage.metaDescription")(n.model.brand_name,n.model.name):void 0,path:`/fahrzeuge/${e}/${t}`}),l.vehicles.enabled&&!l.bypass)return a.jsx(la,{message:l.vehicles.message});if(s)return a.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:s});if(!n)return a.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:o("modelPage.loading")});const{model:p,packages:v}=n,w=new Map([...v].sort((N,S)=>N.total_price-S.total_price).map((N,S)=>[N.id,S])),j=N=>{const S=v.length,E=w.get(N.id)??0,T=S<=1?0:E/(S-1),I=Math.round(T*(h.length-1));return{tier:h[I],tierT:T}},P=N=>[...N.products.map(S=>S.name_override||S.scraped_name||o("modelPage.productLoading")),...(N.description||"").split(`
`).map(S=>S.trim()).filter(Boolean)],C=N=>`/kontakt?${new URLSearchParams({brand:p.brand_name,model:p.name,package:N.name,packageId:N.id,total:N.total_price}).toString()}`;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"mx-auto max-w-6xl px-4 pt-12 sm:px-6",children:[l.vehicles.enabled&&l.bypass&&a.jsx(oa,{inline:!0}),a.jsxs("p",{className:"mb-1 text-sm text-neutral-500 dark:text-neutral-400",children:[a.jsx(O,{to:"/fahrzeuge",className:"hover:text-brand-500",children:o("modelPage.breadcrumbVehicles")})," /"," ",a.jsx(O,{to:`/fahrzeuge/${e}`,className:"hover:text-brand-500",children:p.brand_name})," / ",p.name]}),a.jsxs("h1",{className:`text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl ${v.length?"mb-2":"mb-8"}`,children:[p.brand_name," ",p.name," ",o("modelPage.titleSuffix")]}),v.length===0&&a.jsx("p",{className:"pb-12 text-neutral-500 dark:text-neutral-400",children:o("modelPage.empty")})]}),v.length>0&&a.jsx("section",{className:"py-10 sm:py-14",style:{fontFamily:"'Barlow', sans-serif"},children:a.jsxs("div",{className:m==="grid"?"mx-auto max-w-6xl px-4 sm:px-6":"mx-auto max-w-[1880px] px-4 sm:px-6",children:[a.jsx("div",{ref:m==="grid"?void 0:f,className:m==="grid"?"grid items-start gap-[18px] sm:grid-cols-2 xl:grid-cols-3":"flex select-none items-start gap-[18px] overflow-x-auto pb-3 snap-x snap-mandatory [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",style:m==="coverflow"?{perspective:"1200px",paddingLeft:"calc(50% - 115px)",paddingRight:"calc(50% - 115px)",paddingTop:"10px"}:void 0,children:v.map(N=>{const{tier:S,tierT:E}=j(N);return a.jsx(HC,{pkg:N,tier:S,tierT:E,layout:m,bullets:P(N),formatPrice:x,contactUrl:C,t:o},N.id)})}),m!=="grid"&&a.jsx("div",{ref:b,className:"relative mx-auto mt-5 h-2 w-56 max-w-full cursor-pointer rounded-full bg-neutral-900/10 transition-opacity duration-200 dark:bg-white/10",style:{touchAction:"none"},"aria-hidden":"true",children:a.jsx("div",{ref:y,className:"absolute left-0 top-0 h-full rounded-full bg-brand-500 shadow-[0_0_10px_rgba(107,166,38,0.7)]",style:{width:"48px"}})})]})})]})}function GC(){const[e,t]=g.useState(null),[n,r]=g.useState(""),{t:s}=Ne();return Ze({title:s("galleryOverview.metaTitle"),description:s("galleryOverview.metaDescription"),path:"/galerie"}),g.useEffect(()=>{M.get("/gallery-brands").then(t).catch(i=>r(i.message))},[]),a.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[a.jsx("h1",{className:"mb-2 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:s("galleryOverview.title")}),a.jsx("p",{className:"mb-8 text-neutral-600 dark:text-neutral-300",children:s("galleryOverview.intro")}),n&&a.jsx("p",{className:"text-red-600",children:n}),!e&&!n&&a.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:s("galleryOverview.loading")}),e&&e.length===0&&a.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:s("galleryOverview.empty")}),a.jsx("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4",children:e==null?void 0:e.map(i=>a.jsxs(O,{to:`/galerie/${i.slug}`,className:"group relative block aspect-[4/3] overflow-hidden rounded-xl bg-neutral-900 shadow-sm transition hover:shadow-lg",children:[i.cover_image_path?a.jsx("img",{src:i.cover_image_path,alt:i.name,className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}):a.jsx("div",{className:"flex h-full w-full items-center justify-center bg-neutral-200 dark:bg-neutral-800"}),a.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/10 to-transparent transition group-hover:from-black/95"}),a.jsx("span",{className:"absolute inset-x-0 bottom-0 p-4 text-lg font-extrabold text-white",children:i.name})]},i.id))})]})}function KC(){const{brandSlug:e}=$n(),[t,n]=g.useState(null),[r,s]=g.useState(""),{t:i}=Ne();return g.useEffect(()=>{M.get(`/gallery-brands/${e}/projects`).then(n).catch(l=>s(l.message))},[e]),Ze({title:t?i("galleryBrandPage.metaTitle")(t.brand.name):i("galleryBrandPage.metaTitleFallback"),description:t?i("galleryBrandPage.metaDescription")(t.brand.name):void 0,path:`/galerie/${e}`}),r?a.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:r}):t?a.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[a.jsxs("p",{className:"mb-1 text-sm text-neutral-500 dark:text-neutral-400",children:[a.jsx(O,{to:"/galerie",className:"hover:text-brand-500",children:i("galleryBrandPage.breadcrumbGallery")})," / ",t.brand.name]}),a.jsxs("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:[t.brand.name," ",i("galleryBrandPage.titleSuffix")]}),t.projects.length===0&&a.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:i("galleryBrandPage.empty")}),a.jsx("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4",children:t.projects.map(l=>a.jsxs(O,{to:`/galerie/${e}/${l.slug}`,className:"group relative block aspect-[4/3] overflow-hidden rounded-xl bg-neutral-900 shadow-sm transition hover:shadow-lg",children:[l.cover_image_path?a.jsx("img",{src:l.cover_image_path,alt:l.name,className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}):a.jsx("div",{className:"flex h-full w-full items-center justify-center bg-neutral-200 dark:bg-neutral-800"}),a.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/10 to-transparent transition group-hover:from-black/95"}),a.jsx("span",{className:"absolute inset-x-0 bottom-0 p-4 text-lg font-extrabold text-white",children:l.name})]},l.id))})]}):a.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:i("galleryBrandPage.loading")})}function qC({photos:e,index:t,onClose:n,onNavigate:r}){const{t:s}=Ne();if(g.useEffect(()=>{if(t==null)return;const o=u=>{u.key==="Escape"&&n(),u.key==="ArrowRight"&&r(1),u.key==="ArrowLeft"&&r(-1)};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[t,n,r]),t==null)return null;const i=e[t],l=o=>o.stopPropagation();return Wc.createPortal(a.jsxs("div",{className:"fixed inset-0 z-[200] flex items-center justify-center bg-black/90 p-4",onClick:n,children:[a.jsx("button",{onClick:o=>{l(o),n()},"aria-label":s("lightbox.close"),className:"absolute right-4 top-4 rounded-full p-2 text-white/80 hover:bg-white/10 hover:text-white",children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-7 w-7",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6l12 12M18 6 6 18"})})}),e.length>1&&a.jsx("button",{onClick:o=>{l(o),r(-1)},"aria-label":s("lightbox.previous"),className:"absolute left-2 top-1/2 -translate-y-1/2 rounded-full p-2 text-white/80 hover:bg-white/10 hover:text-white sm:left-4",children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-8 w-8",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m15 18-6-6 6-6"})})}),a.jsx("img",{src:i.image_path,alt:i.caption||"",onClick:l,className:"max-h-[85vh] max-w-full rounded-lg object-contain"}),e.length>1&&a.jsx("button",{onClick:o=>{l(o),r(1)},"aria-label":s("lightbox.next"),className:"absolute right-2 top-1/2 -translate-y-1/2 rounded-full p-2 text-white/80 hover:bg-white/10 hover:text-white sm:right-4",children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-8 w-8",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9 18 6-6-6-6"})})}),i.caption&&a.jsx("p",{onClick:l,className:"absolute bottom-4 left-1/2 -translate-x-1/2 rounded-full bg-black/60 px-4 py-1.5 text-sm text-white",children:i.caption})]}),document.body)}function YC(){const{brandSlug:e,projectSlug:t}=$n(),[n,r]=g.useState(null),[s,i]=g.useState(""),[l,o]=g.useState(null),{t:u}=Ne();g.useEffect(()=>{M.get(`/gallery-brands/${e}/${t}/photos`).then(r).catch(d=>i(d.message))},[e,t]),Ze({title:n?`${n.project.name} ${n.project.brand_name}`:u("galleryProjectPage.metaTitleFallback"),description:n?u("galleryProjectPage.metaDescription")(n.project.name):void 0,path:`/galerie/${e}/${t}`});const c=d=>{o(h=>{const m=n.photos.length;return(h+d+m)%m})};return s?a.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:s}):n?a.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[a.jsxs("p",{className:"mb-1 text-sm text-neutral-500 dark:text-neutral-400",children:[a.jsx(O,{to:"/galerie",className:"hover:text-brand-500",children:u("galleryProjectPage.breadcrumbGallery")})," /"," ",a.jsx(O,{to:`/galerie/${e}`,className:"hover:text-brand-500",children:n.project.brand_name})," / ",n.project.name]}),a.jsx("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:n.project.name}),n.photos.length===0&&a.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:u("galleryProjectPage.empty")}),a.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:n.photos.map((d,h)=>a.jsx(ye,{index:h%6,shine:!0,className:"aspect-square overflow-hidden rounded-xl",children:a.jsx("button",{onClick:()=>o(h),className:"block h-full w-full","aria-label":d.caption||u("galleryProjectPage.enlargeImage"),children:a.jsx("img",{src:d.image_path,alt:d.caption||"",className:"h-full w-full object-cover transition duration-300 hover:scale-105"})})},d.id))}),a.jsx(qC,{photos:n.photos,index:l,onClose:()=>o(null),onNavigate:c})]}):a.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:u("galleryProjectPage.loading")})}function XC(){const[e,t]=g.useState([]),n=fl(),{t:r}=Ne();return g.useEffect(()=>{M.get("/services").then(t).catch(()=>t([]))},[]),Ze({title:r("leistungen.metaTitle"),description:r("leistungen.metaDescription"),path:"/leistungen"}),n.services.enabled&&!n.bypass?a.jsx(la,{message:n.services.message}):a.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[n.services.enabled&&n.bypass&&a.jsx(oa,{inline:!0}),a.jsx("h1",{className:"mb-2 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:r("leistungen.title")}),a.jsx("p",{className:"mb-10 max-w-2xl text-neutral-600 dark:text-neutral-300",children:r("leistungen.intro")}),a.jsx("div",{className:"grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:e.map((s,i)=>a.jsxs(ye,{index:i%3,shine:!0,className:"overflow-hidden rounded-xl border border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsxs("div",{className:"relative aspect-[4/3]",children:[s.image_path&&a.jsx("img",{src:s.image_path,alt:s.title,className:"h-full w-full object-cover",loading:"lazy"}),a.jsx("div",{className:"absolute -bottom-5 left-5 flex h-12 w-12 items-center justify-center rounded-full bg-brand-500 text-white shadow-lg ring-4 ring-white dark:ring-neutral-900",children:a.jsx(Re,{name:s.icon_name,className:"h-6 w-6"})})]}),a.jsxs("div",{className:"p-6 pt-8",children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:s.title}),a.jsx("p",{className:"mb-3 text-sm text-neutral-600 dark:text-neutral-300",children:s.description}),s.cta_label&&s.cta_url&&a.jsxs(O,{to:s.cta_url,className:"text-sm font-semibold text-brand-600 hover:underline dark:text-brand-400",children:[s.cta_label," →"]})]})]},s.id))}),a.jsxs("div",{className:"mt-12 rounded-xl border border-neutral-200 bg-neutral-50 p-8 text-center dark:border-neutral-800 dark:bg-neutral-900/40",children:[a.jsx("h2",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:r("leistungen.notListedTitle")}),a.jsx("p",{className:"mb-5 text-neutral-600 dark:text-neutral-300",children:r("leistungen.notListedText")}),a.jsx(O,{to:"/kontakt",className:"inline-block rounded-md bg-brand-500 px-6 py-3 text-sm font-semibold text-white hover:bg-brand-600",children:r("leistungen.contact")})]})]})}function ZC({name:e,description:t,className:n="",children:r}){const{consent:s,acceptAll:i,openSettings:l}=Rr();return s.external?r:a.jsxs("div",{className:`flex flex-col items-center justify-center gap-3 rounded-xl border border-neutral-200 bg-neutral-50 p-6 text-center dark:border-neutral-800 dark:bg-neutral-900/40 ${n}`,children:[a.jsx("p",{className:"text-sm text-neutral-600 dark:text-neutral-300",children:t||`${e} wird erst nach deiner Zustimmung geladen, da dabei Daten an Google übertragen werden.`}),a.jsxs("div",{className:"flex flex-wrap justify-center gap-2",children:[a.jsx("button",{type:"button",onClick:i,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:"Laden erlauben"}),a.jsx("button",{type:"button",onClick:l,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Cookie-Einstellungen"})]})]})}const QC="/assets/grunge-Ct6SL4uw.png",JC="/assets/splatter-ChpwEetv.png",eP="/assets/car-light-CV3-PIkV.png",db=e=>(e||"").replace(/[^\d+]/g,""),tP=e=>`https://wa.me/${db(e).replace(/^0/,"49").replace("+","")}`,hb=encodeURIComponent("Boxbrunner Str. 20a, 63916 Amorbach"),Af=`https://www.google.com/maps/dir/?api=1&destination=${hb}`,ri={fontFamily:"'Michroma', sans-serif"};function nP({className:e}){return a.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:a.jsx("path",{d:"M12 2a10 10 0 0 0-8.6 15l-1.3 4.8 5-1.3A10 10 0 1 0 12 2zm0 2a8 8 0 1 1-4.2 14.8l-.3-.2-2.6.7.7-2.5-.2-.3A8 8 0 0 1 12 4zm4.3 9.9c-.2-.1-1.4-.7-1.6-.8s-.4-.1-.5.1l-.7.9c-.1.1-.3.2-.5.1a6.5 6.5 0 0 1-3.2-2.8c-.1-.2 0-.4.1-.5l.4-.5.2-.4v-.4l-.7-1.7c-.2-.4-.4-.4-.5-.4h-.5c-.2 0-.4.1-.6.3-.7.7-.9 1.6-.6 2.7.5 1.7 1.6 3.1 3.4 4.2 1.7 1 2.5 1 3.4.9.5-.1 1.4-.6 1.6-1.1.2-.5.2-1 .1-1.1z"})})}function rP({path:e,className:t}){return a.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:a.jsx("path",{d:e})})}const sP={premium:"M4 12v3M8 8v11M12 4v16M16 8v11M20 12v3",germany:"M12 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0 M12 2v2M12 20v2M2 12h2M20 12h2M5 5l1.5 1.5M17.5 17.5 19 19M19 5l-1.5 1.5M6.5 17.5 5 19",individual:"M6 3h12l4 6-10 12L2 9z M11 3 8 9l4 12 4-12-3-6M2 9h20",experts:"M20 6 9 17l-5-5"};function Mf({formatted:e,color:t}){const[n,r]=e.split("€");return a.jsxs("span",{style:{...ri,color:t},children:[n,a.jsx("span",{style:{fontFamily:"'Barlow', sans-serif"},children:"€"}),r]})}function La({icon:e,label:t,name:n,type:r="text",required:s,value:i,onChange:l,placeholder:o}){return a.jsxs("div",{className:"flex flex-col gap-2",children:[a.jsx("label",{htmlFor:`kf-${n}`,className:"text-xs font-semibold uppercase tracking-[2px]",style:{color:"var(--kf-label)"},children:t}),a.jsxs("div",{className:"relative flex items-center",children:[a.jsx(e,{className:"pointer-events-none absolute left-[14px] h-[17px] w-[17px]",style:{color:"var(--kf-fieldicon)"}}),a.jsx("input",{id:`kf-${n}`,name:n,type:r,required:s,value:i,onChange:l,placeholder:o,className:"w-full rounded-lg border py-3.5 pl-[42px] pr-4 text-[15px] outline-none transition-colors",style:{background:"var(--kf-field)",borderColor:"var(--kf-fieldbrd)",color:"var(--kf-text2)"}})]})]})}function aP(){const[e]=rw(),{phone:t,whatsapp:n,contact_email:r}=Ir(),{t:s,language:i}=Ne(),{consent:l}=Rr(),o=T=>new Intl.NumberFormat(i==="de"?"de-DE":"en-US",{style:"currency",currency:"EUR"}).format(T),[u,c]=g.useState({name:"",email:"",phone:"",vin:"",message:""}),[d,h]=g.useState("idle"),[m,f]=g.useState(""),[b,y]=g.useState([]),[k,x]=g.useState([]),p=e.get("packageId"),v=e.get("total")?Number(e.get("total")):null;g.useEffect(()=>{if(!p){y([]);return}M.get(`/packages/${p}/upgrades`).then(y).catch(()=>y([]))},[p]);const w=T=>{x(I=>I.includes(T)?I.filter(U=>U!==T):[...I,T])},j=b.filter(T=>k.includes(T.id)).reduce((T,I)=>T+Number(I.price),0);Ze({title:s("contactPage.metaTitle"),description:s("contactPage.metaDescription"),path:"/kontakt"});const P={brand:e.get("brand")||"",model:e.get("model")||"",package:e.get("package")||""},C=!!(P.brand&&P.model&&P.package),N=T=>c(I=>({...I,[T.target.name]:T.target.value})),S=async T=>{T.preventDefault(),h("sending"),f("");try{await M.post("/contact",{...u,brand_name:P.brand||null,model_name:P.model||null,package_name:P.package||null,product_name:e.get("product")||null,package_id:p||null,package_product_id:e.get("productId")||null,upgrade_ids:k}),h("sent"),c({name:"",email:"",phone:"",vin:"",message:""})}catch(I){f(I.message),h("idle")}},E=[{key:"premium",title:s("contactPage.featurePremiumTitle"),sub:s("contactPage.featurePremiumSub")},{key:"germany",title:s("contactPage.featureGermanyTitle"),sub:s("contactPage.featureGermanySub")},{key:"individual",title:s("contactPage.featureIndividualTitle"),sub:s("contactPage.featureIndividualSub")},{key:"experts",title:s("contactPage.featureExpertsTitle"),sub:s("contactPage.featureExpertsSub")}];return a.jsxs("div",{className:"kf-page relative w-full overflow-hidden px-4 pb-10 sm:px-10",style:{background:"var(--kf-pagebg)",color:"var(--kf-text2)"},children:[a.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 hidden bg-cover bg-center dark:block",style:{backgroundImage:`url(${QC})`}}),a.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute -right-[4%] -top-[8%] hidden h-[122%] w-[46%] bg-contain bg-right bg-no-repeat dark:block",style:{backgroundImage:`url(${JC})`,filter:"drop-shadow(0 0 22px rgba(164,212,23,0.35))"}}),a.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 600 1000",preserveAspectRatio:"xMaxYMid slice",className:"pointer-events-none absolute right-0 top-0 hidden h-full w-[60%] dark:block",children:[a.jsx("path",{d:"M 900 -200 A 720 720 0 0 1 900 1200",fill:"none",stroke:"rgba(168,225,12,0.5)",strokeWidth:"1.5"}),a.jsx("path",{d:"M 860 -160 A 700 700 0 0 1 860 1160",fill:"none",stroke:"rgba(168,225,12,0.18)",strokeWidth:"1",strokeDasharray:"2 9"})]}),a.jsxs("div",{"aria-hidden":"true",className:"pointer-events-none absolute bottom-0 left-0 hidden h-full w-[34%] dark:!hidden min-[981px]:block",children:[a.jsx("div",{className:"h-full w-full bg-cover",style:{backgroundImage:`url(${eP})`,backgroundPosition:"left bottom",WebkitMaskImage:"linear-gradient(180deg, transparent 0%, black 40%)",maskImage:"linear-gradient(180deg, transparent 0%, black 40%)"}}),a.jsx("div",{className:"absolute inset-0",style:{background:"var(--kf-scrim)"}})]}),a.jsxs("div",{"aria-hidden":"true",className:"pointer-events-none absolute right-[4%] top-0 hidden h-full w-[26%] rotate-6 dark:!hidden min-[981px]:block",children:[a.jsx("div",{className:"absolute right-1/2 top-0 h-full w-[3px] opacity-80 blur-[1px]",style:{background:"linear-gradient(180deg, transparent, #b6e619 30%, #cfef5a 55%, transparent)"}}),a.jsx("div",{className:"absolute right-1/2 top-0 h-full w-[90px] translate-x-1/2 opacity-70 blur-[26px]",style:{background:"linear-gradient(180deg, transparent, #cfef5a 40%, transparent)"}}),a.jsx("div",{className:"absolute right-[40%] top-0 h-full w-[2px] opacity-60 blur-[1px]",style:{background:"linear-gradient(180deg, transparent, #b6e619 35%, transparent)"}}),a.jsx("div",{className:"absolute right-1/2 top-1/3 h-[420px] w-[420px] translate-x-1/2 rounded-full opacity-70 blur-[40px]",style:{background:"radial-gradient(circle, rgba(207,239,90,0.35), transparent 70%)"}})]}),a.jsxs("div",{className:"relative z-10 mx-auto max-w-[1280px] pt-10 sm:pt-14",children:[a.jsx("div",{className:"mb-3 text-[13px] font-semibold uppercase tracking-[6px]",style:{color:"var(--kf-accent2)"},children:s("contactPage.heroEyebrow")}),a.jsxs("h1",{className:"text-[34px] leading-[1.08] sm:text-[46px] lg:text-[60px]",style:{...ri,color:"var(--kf-text)"},children:[s("contactPage.heroTitlePre")," ",a.jsx("span",{style:{color:"var(--kf-accent2)"},children:s("contactPage.heroTitleAccent")})," ",s("contactPage.heroTitlePost")]}),a.jsx("p",{className:"mb-10 mt-5 max-w-[520px] text-lg leading-[1.55]",style:{color:"var(--kf-muted)"},children:s("contactPage.heroSubtitle")}),a.jsxs("div",{className:"grid grid-cols-1 items-start gap-10 min-[981px]:grid-cols-[minmax(0,1.35fr)_minmax(320px,1fr)]",children:[a.jsx("div",{children:a.jsxs("div",{className:"rounded-2xl border p-[22px] sm:p-10",style:{background:"var(--kf-card)",borderColor:"var(--kf-cardbrd)",boxShadow:"var(--kf-shadow)"},children:[C&&a.jsxs("div",{className:"mb-8 rounded-xl border px-6 py-[22px]",style:{background:"var(--kf-pkgbg)",borderColor:"var(--kf-pkgbrd)"},children:[a.jsxs("div",{className:"mb-3.5 flex items-center gap-2.5 text-xs font-bold uppercase tracking-[2px]",style:{color:"var(--kf-accent2)"},children:[a.jsx(Lb,{className:"h-4 w-4"}),s("contactPage.packageBoxTitle")]}),a.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-5 gap-y-2 text-[15px]",children:[a.jsx("span",{style:{color:"var(--kf-label)"},children:s("contactPage.contextBrand")}),a.jsx("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:P.brand}),a.jsx("span",{style:{color:"var(--kf-label)"},children:s("contactPage.contextModel")}),a.jsx("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:P.model}),a.jsx("span",{style:{color:"var(--kf-label)"},children:s("contactPage.contextPackage")}),a.jsx("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:P.package})]}),a.jsxs("div",{className:"mt-3.5 flex items-baseline justify-between border-t pt-3.5",style:{borderColor:"var(--kf-pkgbrd)"},children:[a.jsx("span",{className:"text-[13px] font-semibold uppercase tracking-wide",style:{color:"var(--kf-muted)"},children:s("contactPage.packagePrice")}),a.jsx("span",{className:"text-xl",children:v!=null?a.jsx(Mf,{formatted:o(v),color:"var(--kf-text)"}):"—"})]})]}),b.length>0&&a.jsxs("div",{className:"mb-8 rounded-xl border p-5",style:{background:"var(--kf-field)",borderColor:"var(--kf-fieldbrd)"},children:[a.jsx("div",{className:"mb-3 text-xs font-bold uppercase tracking-[2px]",style:{color:"var(--kf-accent2)"},children:s("contactPage.optionalUpgrades")}),a.jsx("div",{className:"space-y-2",children:b.map(T=>a.jsxs("label",{className:"flex cursor-pointer items-start gap-3 rounded-lg border p-3 text-sm",style:{borderColor:"var(--kf-fieldbrd)"},children:[a.jsx("input",{type:"checkbox",checked:k.includes(T.id),onChange:()=>w(T.id),className:"mt-0.5 h-4 w-4 rounded",style:{accentColor:"var(--kf-accent)"}}),a.jsxs("span",{className:"flex-1",children:[a.jsx("span",{className:"block font-semibold",style:{color:"var(--kf-text2)"},children:T.name}),T.description&&a.jsx("span",{className:"block text-xs",style:{color:"var(--kf-muted)"},children:T.description})]}),a.jsxs("span",{className:"font-semibold",style:{color:"var(--kf-accent2)"},children:["+",o(T.price)]})]},T.id))}),k.length>0&&v!=null&&a.jsxs("div",{className:"mt-3 flex items-baseline justify-between border-t pt-3 text-sm",style:{borderColor:"var(--kf-pkgbrd)"},children:[a.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide",style:{color:"var(--kf-muted)"},children:s("contactPage.totalWithUpgrades")}),a.jsx(Mf,{formatted:o(v+j),color:"var(--kf-text)"})]})]}),a.jsx("h2",{className:"mb-8 text-xl",style:{...ri,color:"var(--kf-text)"},children:s("contactPage.formTitle")}),d==="sent"&&a.jsxs("div",{className:"mb-6 rounded-[10px] border p-5",style:{borderColor:"var(--kf-accent)",background:"var(--kf-accentsoft)"},children:[a.jsx("div",{className:"text-base font-bold",style:{color:"var(--kf-accent2)"},children:s("contactPage.sentTitle")}),a.jsx("div",{className:"mt-1 text-sm",style:{color:"var(--kf-muted)"},children:s("contactPage.sentText")})]}),a.jsxs("form",{onSubmit:S,children:[a.jsxs("div",{className:"grid grid-cols-1 gap-6 min-[641px]:grid-cols-2",children:[a.jsx(La,{icon:Bb,label:s("contactPage.nameLabel"),name:"name",required:!0,value:u.name,onChange:N,placeholder:s("contactPage.namePlaceholder")}),a.jsx(La,{icon:Ad,label:s("contactPage.emailLabel"),name:"email",type:"email",required:!0,value:u.email,onChange:N,placeholder:s("contactPage.emailPlaceholder")}),a.jsx(La,{icon:Md,label:s("contactPage.phoneLabel"),name:"phone",value:u.phone,onChange:N,placeholder:s("contactPage.phonePlaceholder")}),a.jsx(La,{icon:zb,label:s("contactPage.vinLabel"),name:"vin",value:u.vin,onChange:N,placeholder:s("contactPage.vinPlaceholder")})]}),a.jsxs("div",{className:"mt-6 flex flex-col gap-2",children:[a.jsx("label",{htmlFor:"kf-message",className:"text-xs font-semibold uppercase tracking-[2px]",style:{color:"var(--kf-label)"},children:s("contactPage.messageLabel")}),a.jsx("textarea",{id:"kf-message",name:"message",rows:5,value:u.message,onChange:N,placeholder:s("contactPage.messagePlaceholder"),className:"w-full resize-y rounded-lg border px-4 py-3.5 text-[15px] outline-none",style:{background:"var(--kf-field)",borderColor:"var(--kf-fieldbrd)",color:"var(--kf-text2)"}})]}),m&&a.jsx("p",{className:"mt-4 text-sm text-red-600 dark:text-red-400",children:m}),a.jsxs("div",{className:"mt-8 flex flex-wrap items-center gap-5",children:[a.jsxs("button",{type:"submit",disabled:d==="sending",className:"inline-flex items-center gap-3 rounded-lg px-8 py-4 text-sm font-bold uppercase tracking-[3px] transition-[filter,box-shadow] hover:brightness-110 disabled:opacity-60",style:{background:"var(--kf-accent)",color:"var(--kf-btntext)",boxShadow:"0 10px 24px rgba(150,200,20,0.32)"},children:[a.jsx(Ib,{className:"h-[18px] w-[18px]"}),s(d==="sending"?"contactPage.sending":"contactPage.submit")]}),a.jsx("div",{className:"text-[13px]",style:{color:"var(--kf-label)"},children:s("contactPage.requiredHint")})]})]})]})}),a.jsxs("div",{className:"flex flex-col gap-6",children:[a.jsxs("div",{className:"relative overflow-hidden rounded-2xl border px-[22px] py-[26px] sm:px-8 sm:py-[34px]",style:{background:"var(--kf-card)",borderColor:"var(--kf-cardbrd)",boxShadow:"var(--kf-shadow)"},children:[a.jsx("div",{className:"pointer-events-none absolute -right-[60px] -top-[60px] h-[190px] w-[190px] rounded-full border border-dashed",style:{borderColor:"var(--kf-pkgbrd)"}}),a.jsx("h2",{className:"mb-7 text-[17px]",style:{...ri,color:"var(--kf-text)"},children:s("contactPage.cardTitle")}),a.jsxs("div",{className:"flex flex-col gap-5",children:[a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full",style:{background:"var(--kf-accentsoft)"},children:a.jsx(Md,{className:"h-[18px] w-[18px]",style:{color:"var(--kf-accent2)"}})}),a.jsxs("div",{children:[a.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:s("contactPage.phone")}),a.jsx("a",{href:`tel:${db(t)}`,className:"text-base font-semibold",style:{color:"var(--kf-text2)"},children:t})]})]}),a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full",style:{background:"var(--kf-accentsoft)"},children:a.jsx(Ad,{className:"h-[18px] w-[18px]",style:{color:"var(--kf-accent2)"}})}),a.jsxs("div",{children:[a.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:s("contactPage.email")}),a.jsx("a",{href:`mailto:${r}`,className:"text-base font-semibold",style:{color:"var(--kf-text2)"},children:r})]})]}),a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full",style:{background:"var(--kf-accentsoft)"},children:a.jsx(Rb,{className:"h-[18px] w-[18px]",style:{color:"var(--kf-accent2)"}})}),a.jsxs("div",{children:[a.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:s("contactPage.address")}),a.jsxs("div",{className:"text-base font-semibold leading-[1.4]",style:{color:"var(--kf-text2)"},children:["Boxbrunner Straße 20a",a.jsx("br",{}),"63916 Amorbach"]})]})]}),n&&a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full",style:{background:"var(--kf-accentsoft)"},children:a.jsx(nP,{className:"h-[18px] w-[18px]",style:{color:"var(--kf-accent2)"}})}),a.jsxs("div",{children:[a.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:s("nav.whatsapp")}),a.jsx("a",{href:tP(n),className:"text-base font-semibold",style:{color:"var(--kf-text2)"},children:n})]})]})]}),a.jsxs("div",{className:"mt-7 border-t pt-6",style:{borderColor:"var(--kf-divider)"},children:[a.jsx("div",{className:"mb-3 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:s("contactPage.hours")}),a.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-6 gap-y-2 text-[15px]",children:[a.jsx("span",{style:{color:"var(--kf-label)"},children:s("contactPage.hoursWeekDays")}),a.jsx("span",{children:s("contactPage.hoursWeekTime")}),a.jsx("span",{style:{color:"var(--kf-label)"},children:s("contactPage.hoursSatDay")}),a.jsx("span",{children:s("contactPage.hoursSatTime")})]})]})]}),a.jsxs("div",{className:"relative overflow-hidden rounded-2xl border",style:{background:"var(--kf-card)",borderColor:"var(--kf-cardbrd)",boxShadow:"var(--kf-shadow)"},children:[l.external&&a.jsxs("a",{href:Af,target:"_blank",rel:"noopener noreferrer",className:"absolute left-3.5 top-3.5 z-10 inline-flex items-center gap-2 rounded-lg border px-3.5 py-2 text-[13px] font-semibold hover:border-[var(--kf-accent)]",style:{background:"var(--kf-pill)",borderColor:"var(--kf-pillbrd)",color:"var(--kf-text2)",boxShadow:"var(--kf-shadow2)"},children:[s("contactPage.mapOpenChip"),a.jsx(Fb,{className:"h-3.5 w-3.5",style:{color:"var(--kf-accent2)"}})]}),a.jsx(ZC,{name:s("contactPage.mapEmbedName"),className:"h-[210px] w-full",children:a.jsx("iframe",{title:"HifiPlanet Amorbach Standort",src:`https://www.google.com/maps?q=${hb}&output=embed`,width:"100%",height:"210",style:{border:0,display:"block"},loading:"lazy",referrerPolicy:"no-referrer-when-downgrade"})}),a.jsxs("a",{href:Af,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center gap-2.5 border-t px-4 py-4 text-[13px] font-bold uppercase tracking-[3px] hover:bg-[var(--kf-accentsoft)]",style:{borderColor:"var(--kf-divider)",color:"var(--kf-accent2)"},children:[s("contactPage.routePlan")," →"]})]})]})]}),a.jsx("div",{className:"mt-10 grid grid-cols-1 overflow-hidden rounded-2xl border min-[641px]:grid-cols-2 min-[901px]:grid-cols-4",style:{background:"var(--kf-card)",borderColor:"var(--kf-cardbrd)",boxShadow:"var(--kf-shadow2)"},children:E.map(T=>a.jsxs("div",{className:"flex items-center gap-4 border-b p-6 last:border-b-0 min-[641px]:border-b-0 min-[641px]:border-r min-[641px]:last:border-r-0",style:{borderColor:"var(--kf-divider)"},children:[a.jsx("div",{className:"flex h-[46px] w-[46px] flex-shrink-0 items-center justify-center rounded-full border-[1.5px]",style:{borderColor:"var(--kf-pkgbrd)",color:"var(--kf-accent2)"},children:a.jsx(rP,{path:sP[T.key],className:"h-[22px] w-[22px]"})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-[15px] font-bold",style:{color:"var(--kf-text)"},children:T.title}),a.jsx("div",{className:"mt-0.5 text-[13px]",style:{color:"var(--kf-muted)"},children:T.sub})]})]},T.key))})]})]})}function iP(){return Ze({title:"Impressum",description:"Impressum von HifiPlanet Amorbach gemäß § 5 DDG.",path:"/impressum"}),a.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-12 sm:px-6",children:[a.jsx("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:"Impressum"}),a.jsxs("div",{className:"space-y-8 text-sm text-neutral-600 dark:text-neutral-300",children:[a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"Angaben gemäß § 5 DDG"}),a.jsxs("p",{children:["Hifi Planet e.K.",a.jsx("br",{}),"Inhaber: Christopher Horndasch",a.jsx("br",{}),"Boxbrunner Str. 20a",a.jsx("br",{}),"63916 Amorbach"]})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"Kontakt"}),a.jsxs("p",{children:["Telefon: ",a.jsx("a",{href:"tel:+4993732062390",className:"hover:text-brand-500",children:"09373 20 62 390"}),a.jsx("br",{}),"E-Mail: ",a.jsx("a",{href:"mailto:info@hifi-planet-amorbach.de",className:"hover:text-brand-500",children:"info@hifi-planet-amorbach.de"})]})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"Umsatzsteuer-ID"}),a.jsx("p",{children:"Umsatzsteuer-Identifikationsnummer gemäß § 27a Umsatzsteuergesetz: DE 275084766"})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"Zuständige Kammer"}),a.jsx("p",{children:"IHK Aschaffenburg"})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"Verantwortlich für den Inhalt nach § 18 Abs. 2 MStV"}),a.jsxs("p",{children:["Christopher Horndasch",a.jsx("br",{}),"Anschrift wie oben"]})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"Verbraucherstreitbeilegung"}),a.jsx("p",{children:"Wir sind nicht bereit und nicht verpflichtet, an Streitbeilegungsverfahren vor einer Verbraucherschlichtungsstelle im Sinne des Verbraucherstreitbeilegungsgesetzes (VSBG) teilzunehmen."})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"Haftung für Inhalte"}),a.jsx("p",{children:"Als Diensteanbieter sind wir gemäß § 7 Abs. 1 DDG für eigene Inhalte auf diesen Seiten nach den allgemeinen Gesetzen verantwortlich. Nach §§ 8 bis 10 DDG sind wir als Diensteanbieter jedoch nicht verpflichtet, übermittelte oder gespeicherte fremde Informationen zu überwachen oder nach Umständen zu forschen, die auf eine rechtswidrige Tätigkeit hinweisen. Verpflichtungen zur Entfernung oder Sperrung der Nutzung von Informationen nach den allgemeinen Gesetzen bleiben hiervon unberührt. Eine diesbezügliche Haftung ist jedoch erst ab dem Zeitpunkt der Kenntnis einer konkreten Rechtsverletzung möglich. Bei Bekanntwerden von entsprechenden Rechtsverletzungen werden wir diese Inhalte umgehend entfernen."})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"Haftung für Links"}),a.jsx("p",{children:"Unser Angebot enthält Links zu externen Websites Dritter, auf deren Inhalte wir keinen Einfluss haben. Deshalb können wir für diese fremden Inhalte auch keine Gewähr übernehmen. Für die Inhalte der verlinkten Seiten ist stets der jeweilige Anbieter oder Betreiber der Seiten verantwortlich. Eine permanente inhaltliche Kontrolle der verlinkten Seiten ist ohne konkrete Anhaltspunkte einer Rechtsverletzung nicht zumutbar. Bei Bekanntwerden von Rechtsverletzungen werden wir derartige Links umgehend entfernen."})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"Urheberrecht"}),a.jsx("p",{children:"Die durch die Seitenbetreiber erstellten Inhalte und Werke auf diesen Seiten unterliegen dem deutschen Urheberrecht. Die Vervielfältigung, Bearbeitung, Verbreitung und jede Art der Verwertung außerhalb der Grenzen des Urheberrechtes bedürfen der schriftlichen Zustimmung des jeweiligen Autors bzw. Erstellers. Downloads und Kopien dieser Seite sind nur für den privaten, nicht kommerziellen Gebrauch gestattet. Soweit die Inhalte auf dieser Seite nicht vom Betreiber erstellt wurden, werden die Urheberrechte Dritter beachtet. Insbesondere werden Inhalte Dritter als solche gekennzeichnet. Sollten Sie trotzdem auf eine Urheberrechtsverletzung aufmerksam werden, bitten wir um einen entsprechenden Hinweis. Bei Bekanntwerden von Rechtsverletzungen werden wir derartige Inhalte umgehend entfernen."})]})]})]})}function lP(){return Ze({title:"Datenschutzerklärung",description:"Datenschutzerklärung von HifiPlanet Amorbach gemäß Art. 13 DSGVO.",path:"/datenschutz"}),a.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-12 sm:px-6",children:[a.jsx("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:"Datenschutzerklärung"}),a.jsxs("div",{className:"space-y-8 text-sm text-neutral-600 dark:text-neutral-300",children:[a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"1. Verantwortlicher"}),a.jsxs("p",{children:["Verantwortlicher im Sinne der Datenschutz-Grundverordnung (DSGVO) ist:",a.jsx("br",{}),"Hifi Planet e.K., Christopher Horndasch",a.jsx("br",{}),"Boxbrunner Str. 20a, 63916 Amorbach",a.jsx("br",{}),"Telefon: 09373 20 62 390 · E-Mail:"," ",a.jsx("a",{href:"mailto:info@hifi-planet-amorbach.de",className:"hover:text-brand-500",children:"info@hifi-planet-amorbach.de"})]})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"2. Ihre Rechte als betroffene Person"}),a.jsx("p",{className:"mb-2",children:"Sie haben jederzeit das Recht,"}),a.jsxs("ul",{className:"list-disc space-y-1 pl-5",children:[a.jsx("li",{children:"Auskunft über Ihre bei uns gespeicherten personenbezogenen Daten zu erhalten (Art. 15 DSGVO),"}),a.jsx("li",{children:"die Berichtigung unrichtiger Daten zu verlangen (Art. 16 DSGVO),"}),a.jsx("li",{children:"die Löschung Ihrer Daten zu verlangen (Art. 17 DSGVO),"}),a.jsx("li",{children:"die Verarbeitung Ihrer Daten einschränken zu lassen (Art. 18 DSGVO),"}),a.jsx("li",{children:"der Verarbeitung Ihrer Daten zu widersprechen (Art. 21 DSGVO),"}),a.jsx("li",{children:"Ihre Daten in einem gängigen Format zu erhalten (Datenübertragbarkeit, Art. 20 DSGVO), und"}),a.jsx("li",{children:"eine erteilte Einwilligung jederzeit mit Wirkung für die Zukunft zu widerrufen (Art. 7 Abs. 3 DSGVO)."})]}),a.jsx("p",{className:"mt-2",children:"Außerdem haben Sie das Recht, sich bei einer Datenschutz-Aufsichtsbehörde über die Verarbeitung Ihrer personenbezogenen Daten durch uns zu beschweren, zum Beispiel beim Bayerischen Landesamt für Datenschutzaufsicht (BayLDA)."})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"3. Hosting und Server-Logfiles"}),a.jsx("p",{children:"Beim Aufruf dieser Website erhebt der Webserver automatisch Daten in sogenannten Server-Logfiles, die Ihr Browser übermittelt. Dazu gehören: IP-Adresse, Datum und Uhrzeit der Anfrage, aufgerufene Seite, verwendeter Browser und Betriebssystem sowie die zuvor besuchte Seite (Referrer-URL). Diese Daten dienen ausschließlich der technisch fehlerfreien Auslieferung der Website sowie der IT-Sicherheit (z. B. zur Abwehr von Angriffen) und werden nicht mit anderen Datenquellen zusammengeführt. Rechtsgrundlage ist unser berechtigtes Interesse an einem sicheren und stabilen Betrieb der Website (Art. 6 Abs. 1 lit. f DSGVO)."})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"4. Kontaktformular"}),a.jsx("p",{children:"Wenn Sie uns über das Kontaktformular eine Anfrage zukommen lassen, werden Ihre Angaben aus dem Formular (Name, E-Mail-Adresse, optional Telefonnummer, Nachricht sowie ggf. der Kontext Ihrer Anfrage wie Marke, Modell oder Paket) inklusive der von Ihnen dort angegebenen Kontaktdaten bei uns gespeichert, um Ihre Anfrage zu bearbeiten und zu beantworten. Die Verarbeitung erfolgt auf Grundlage Ihrer Einwilligung durch Absenden des Formulars (Art. 6 Abs. 1 lit. a DSGVO) bzw., sofern Ihre Anfrage der Vorbereitung eines Vertrags dient, auf Grundlage von Art. 6 Abs. 1 lit. b DSGVO. Wir löschen die Anfrage inklusive der Kontaktdaten, sobald der jeweilige Sachverhalt abschließend geklärt ist und keine gesetzlichen Aufbewahrungspflichten entgegenstehen. Diese Einwilligung können Sie jederzeit widerrufen, indem Sie uns formlos per E-Mail kontaktieren."})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"5. Cookies und lokale Speicherung"}),a.jsx("p",{className:"mb-2",children:"Diese Website verwendet technisch notwendige Cookies bzw. Speichertechnologien, die für den Betrieb der Seite erforderlich sind und ohne die einzelne Funktionen nicht funktionieren würden. Dazu gehören:"}),a.jsxs("ul",{className:"list-disc space-y-1 pl-5",children:[a.jsxs("li",{children:["ein Session-Cookie (",a.jsx("code",{children:"hifi_admin_session"}),"), das für den Anmeldestatus im Mitarbeiter-Login benötigt wird und mit Ende der Browsersitzung abläuft,"]}),a.jsxs("li",{children:["eine lokale Speicherung (",a.jsx("code",{children:"localStorage"}),") Ihrer Hell-/Dunkelmodus-Einstellung sowie Ihrer Cookie-Auswahl, damit wir Sie nicht bei jedem Besuch erneut danach fragen müssen."]})]}),a.jsx("p",{className:"mt-2",children:'Für diese technisch notwendigen Cookies ist gemäß § 25 Abs. 2 Nr. 2 TTDSG keine Einwilligung erforderlich. Rechtsgrundlage ist unser berechtigtes Interesse am technischen Betrieb der Website (Art. 6 Abs. 1 lit. f DSGVO). Für alle darüber hinausgehenden Inhalte und Dienste aktuell die eingebundenen Google Maps- und YouTube-Elemente sowie Google Analytics fragen wir Sie beim ersten Besuch aktiv nach Ihrer Einwilligung. Sie können Ihre Auswahl jederzeit über den Link „Cookie-Einstellungen" im Footer ändern.'})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"6. Google Maps"}),a.jsxs("p",{children:['Auf unserer Kontaktseite und im Footer binden wir Kartenmaterial des Dienstes „Google Maps" ein, um Ihnen die Anfahrt zu unserem Standort zu erleichtern. Anbieter ist Google Ireland Limited, Gordon House, Barrow Street, Dublin 4, Irland. Die eingebettete Karte wird erst geladen, nachdem Sie dem im Cookie-Banner unter „Externe Medien" zugestimmt haben. Beim Laden der Karte wird Ihre IP-Adresse an Google übertragen; eine Verarbeitung kann dabei auch auf Servern außerhalb der EU/des EWR erfolgen. Die Verarbeitung erfolgt auf Grundlage Ihrer Einwilligung (Art. 6 Abs. 1 lit. a DSGVO), die Sie jederzeit über die Cookie-Einstellungen widerrufen können. Weitere Informationen finden Sie in der'," ",a.jsx("a",{href:"https://policies.google.com/privacy",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-brand-500",children:"Datenschutzerklärung von Google"}),"."]})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"7. YouTube"}),a.jsxs("p",{children:['Auf unserer Startseite binden wir ein Video des Anbieters YouTube (Google Ireland Limited, Gordon House, Barrow Street, Dublin 4, Irland) im „erweiterten Datenschutzmodus" ein (Domain youtube-nocookie.com). Auch dieses Video wird erst geladen, nachdem Sie unter „Externe Medien" zugestimmt haben. Nach Angaben von Google werden dabei bis zum Start der Wiedergabe keine Cookies gesetzt; beim Laden des Players wird jedoch bereits eine Verbindung zu Google-Servern aufgebaut und Ihre IP-Adresse übertragen. Die Verarbeitung erfolgt auf Grundlage Ihrer Einwilligung (Art. 6 Abs. 1 lit. a DSGVO), die Sie jederzeit über die Cookie-Einstellungen widerrufen können. Weitere Informationen finden Sie in der'," ",a.jsx("a",{href:"https://policies.google.com/privacy",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-brand-500",children:"Datenschutzerklärung von Google"}),"."]})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"8. Google Analytics"}),a.jsxs("p",{children:['Sofern Sie der Statistik-Kategorie im Cookie-Banner zugestimmt haben, setzen wir „Google Analytics" ein, einen Webanalysedienst der Google Ireland Limited, Gordon House, Barrow Street, Dublin 4, Irland. Google Analytics verwendet Cookies und ähnliche Technologien, die eine Analyse der Benutzung dieser Website durch Sie ermöglichen. Die dabei erzeugten Informationen (u. a. Ihre IP-Adresse, die vor der Verarbeitung durch die Aktivierung der IP-Anonymisierung gekürzt wird) werden an einen Server von Google übertragen und dort gespeichert; eine Verarbeitung kann dabei auch auf Servern außerhalb der EU/des EWR erfolgen. Die Verarbeitung erfolgt ausschließlich auf Grundlage Ihrer Einwilligung (Art. 6 Abs. 1 lit. a DSGVO), die Sie jederzeit über die Cookie-Einstellungen mit Wirkung für die Zukunft widerrufen können. Weitere Informationen finden Sie in der'," ",a.jsx("a",{href:"https://policies.google.com/privacy",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-brand-500",children:"Datenschutzerklärung von Google"}),"."]})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"9. Empfänger der Daten"}),a.jsx("p",{children:"Ihre Daten werden grundsätzlich nur innerhalb unseres Unternehmens verarbeitet. Eine Weitergabe an Dritte erfolgt nur, soweit dies zur Bearbeitung Ihrer Anfrage erforderlich ist (z. B. an unseren Hosting-Provider zum Betrieb dieser Website und an unseren E-Mail-Anbieter zur Zustellung Ihrer Kontaktanfrage) oder soweit wir gesetzlich dazu verpflichtet sind."})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"10. Speicherdauer"}),a.jsx("p",{children:"Sofern in dieser Erklärung keine speziellere Speicherdauer genannt wurde, verbleiben Ihre personenbezogenen Daten bei uns, bis der Zweck für die Datenspeicherung entfällt. Gesetzliche Aufbewahrungsfristen (z. B. aus dem Handels- oder Steuerrecht) bleiben hiervon unberührt und können eine längere Speicherung erforderlich machen."})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"11. SSL-/TLS-Verschlüsselung"}),a.jsx("p",{children:"Diese Seite nutzt aus Sicherheitsgründen eine SSL-/TLS-Verschlüsselung zur Übertragung Ihrer Daten. Eine verschlüsselte Verbindung erkennen Sie an dem Schloss-Symbol in der Adresszeile Ihres Browsers."})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"12. Änderung dieser Datenschutzerklärung"}),a.jsx("p",{children:"Wir passen diese Datenschutzerklärung an, sobald sich die von uns eingesetzten Datenverarbeitungen ändern. Es gilt jeweils die zum Zeitpunkt Ihres Besuchs aktuelle, auf dieser Seite veröffentlichte Fassung."})]}),a.jsxs("p",{children:["Fragen zum Datenschutz beantworten wir Ihnen gerne über unser"," ",a.jsx(O,{to:"/kontakt",className:"underline hover:text-brand-500",children:"Kontaktformular"})," oder direkt per E-Mail."]})]})]})}function oP(){return Ze({title:"AGB",description:"Allgemeine Geschäftsbedingungen von HifiPlanet Amorbach.",path:"/agb"}),a.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-12 sm:px-6",children:[a.jsx("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:"Allgemeine Geschäftsbedingungen"}),a.jsxs("div",{className:"space-y-8 text-sm text-neutral-600 dark:text-neutral-300",children:[a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"1. Geltungsbereich"}),a.jsx("p",{children:'Diese Allgemeinen Geschäftsbedingungen (AGB) gelten für alle Beratungs-, Werkstatt- und Umbauleistungen, die die Hifi Planet e.K., Boxbrunner Str. 20a, 63916 Amorbach („wir", „HifiPlanet") gegenüber ihren Kunden erbringt, sowie für die Nutzung des Kontaktformulars auf dieser Website.'})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"2. Anfragen über die Website"}),a.jsx("p",{children:"Über das Kontaktformular können Sie unverbindlich eine Beratung oder ein Angebot zu einem einzelnen Produkt oder einem ganzen Paket anfragen. Die auf der Website angezeigten Preise sind, soweit sie von Drittanbietern automatisiert übernommen werden, unverbindliche Circa-Preise ohne Einbau und können sich bis zur Erstellung eines konkreten Angebots ändern. Mit dem Absenden einer Anfrage kommt noch kein Vertrag zustande."})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"3. Vertragsschluss"}),a.jsx("p",{children:"Ein verbindlicher Vertrag über Beratung, Material und Einbauleistungen kommt erst zustande, wenn wir Ihnen nach persönlicher oder schriftlicher Abstimmung ein konkretes Angebot unterbreitet haben und Sie dieses angenommen haben, spätestens jedoch mit der Übergabe Ihres Fahrzeugs zur vereinbarten Auftragsdurchführung in unserer Werkstatt in Amorbach."})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"4. Preise und Zahlung"}),a.jsx("p",{children:"Es gelten die im jeweiligen Einzelangebot genannten Preise inklusive der zum Zeitpunkt der Rechnungsstellung gesetzlich geltenden Umsatzsteuer. Sofern nichts anderes vereinbart ist, ist die Rechnung nach Abnahme der Leistung bzw. Übergabe des Fahrzeugs ohne Abzug fällig."})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"5. Termine und Fahrzeugübergabe"}),a.jsx("p",{children:"Vereinbarte Termine zur Fahrzeugübergabe sind von beiden Seiten einzuhalten. Verschiebungen sind möglichst frühzeitig mitzuteilen. Für Gegenstände, die sich zum Zeitpunkt der Übergabe im Fahrzeug befinden und nicht Gegenstand des Auftrags sind, übernehmen wir keine Haftung."})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"6. Gewährleistung"}),a.jsx("p",{children:"Es gelten die gesetzlichen Gewährleistungsrechte. Mängel sind uns unverzüglich nach Feststellung anzuzeigen, damit wir Ihnen Nacherfüllung anbieten können. Für Verschleißteile sowie für Schäden, die auf unsachgemäße Behandlung, Fremdeingriffe Dritter oder normalen Verschleiß zurückzuführen sind, besteht kein Gewährleistungsanspruch."})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"7. Eigentumsvorbehalt"}),a.jsx("p",{children:"Verbautes Material und gelieferte Ware bleiben bis zur vollständigen Bezahlung unser Eigentum."})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"8. Haftung"}),a.jsx("p",{children:"Wir haften unbeschränkt bei Vorsatz und grober Fahrlässigkeit sowie nach Maßgabe des Produkthaftungsgesetzes. Bei leichter Fahrlässigkeit haften wir nur bei Verletzung einer wesentlichen Vertragspflicht (Kardinalpflicht) und begrenzt auf den vertragstypisch vorhersehbaren Schaden. Die Haftung für Schäden aus der Verletzung des Lebens, des Körpers oder der Gesundheit bleibt hiervon unberührt."})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"9. Widerrufsrecht"}),a.jsx("p",{children:"Ein gesetzliches Widerrufsrecht für Verbraucher besteht bei Verträgen, die außerhalb von Geschäftsräumen oder im Fernabsatz geschlossen werden. Da der eigentliche Werkvertrag über Beratung und Einbauleistungen erst bei persönlicher Fahrzeugübergabe in unseren Geschäftsräumen in Amorbach geschlossen wird, handelt es sich hierbei nicht um einen Fernabsatzvertrag; ein gesetzliches Widerrufsrecht besteht in diesem Fall nicht. Sollte im Einzelfall ausnahmsweise ein Vertrag im Fernabsatz zustande kommen, informieren wir Sie gesondert über Ihr gesetzliches Widerrufsrecht."})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"10. Anwendbares Recht und Gerichtsstand"}),a.jsx("p",{children:"Es gilt das Recht der Bundesrepublik Deutschland unter Ausschluss des UN-Kaufrechts. Ist der Kunde Kaufmann, juristische Person des öffentlichen Rechts oder öffentlich-rechtliches Sondervermögen, ist Gerichtsstand für alle Streitigkeiten aus diesem Vertragsverhältnis unser Geschäftssitz in Amorbach."})]}),a.jsxs("section",{children:[a.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:"11. Schlussbestimmungen"}),a.jsx("p",{children:"Sollte eine Bestimmung dieser AGB unwirksam sein oder werden, bleibt die Wirksamkeit der übrigen Bestimmungen hiervon unberührt."})]})]})]})}const uP={host:"",name:"",user:"",password:"",charset:"utf8mb4"},cP={username:"",password:"",password_confirmation:""};function dP(){Ze({title:"Ersteinrichtung",path:"/setup"});const[e,t]=g.useState("loading"),[n,r]=g.useState(""),[s,i]=g.useState(!1),[l,o]=g.useState(""),[u,c]=g.useState(uP),[d,h]=g.useState(cP),[m,f]=g.useState(null),b=()=>M.get("/setup/status").then(C=>(C.needs_setup?C.steps.admin.ok?t("done"):C.steps.schema.ok?t("admin"):t(C.steps.database.ok?"schema":"database"):t("locked"),C));g.useEffect(()=>{M.get("/setup/status").then(C=>t(C.needs_setup?"password":"locked")).catch(()=>t("locked"))},[]);const y=async C=>{C.preventDefault(),r(""),i(!0);try{await M.post("/setup/verify-password",{password:l}),await b()}catch(N){r(N.message)}finally{i(!1)}},k=async C=>{C.preventDefault(),r(""),i(!0);try{await M.post("/setup/database",u),await b()}catch(N){r(N.message)}finally{i(!1)}},x=async()=>{r(""),i(!0);try{const C=await M.post("/setup/migrate",{});f(C.actions),C.status.steps.schema.ok&&t("admin")}catch(C){r(C.message)}finally{i(!1)}},p=async C=>{if(C.preventDefault(),r(""),d.password!==d.password_confirmation){r("Die Passwörter stimmen nicht überein");return}i(!0);try{await M.post("/setup/admin",d),t("done")}catch(N){r(N.message)}finally{i(!1)}},v="w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm focus:border-brand-500 focus:outline-none dark:border-neutral-700 dark:bg-neutral-900",w="mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",j=[{key:"database",label:"Datenbank"},{key:"schema",label:"Struktur"},{key:"admin",label:"Admin-Account"}],P=j.findIndex(C=>C.key===e);return a.jsxs("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-neutral-50 px-4 py-12 dark:bg-neutral-950",children:[a.jsx("img",{src:Hs,alt:"HifiPlanet",className:"h-16 w-auto sm:h-20"}),a.jsxs("div",{className:"w-full max-w-md rounded-xl border border-neutral-200 bg-white p-8 shadow-sm dark:border-neutral-800 dark:bg-neutral-900",children:[e==="loading"&&a.jsx("p",{className:"text-center text-sm text-neutral-400",children:"Lädt…"}),e==="locked"&&a.jsxs("div",{className:"text-center",children:[a.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:"Bereits eingerichtet"}),a.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:"Diese Seite wurde bereits vollständig eingerichtet. Der Assistent ist deshalb gesperrt."}),a.jsx(O,{to:"/admin/login",className:"text-sm font-medium text-brand-600 hover:underline dark:text-brand-400",children:"Zum Login"})]}),["database","schema","admin"].includes(e)&&a.jsx("div",{className:"mb-6 flex items-center justify-center gap-2",children:j.map((C,N)=>a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:`flex h-6 w-6 items-center justify-center rounded-full text-xs font-semibold ${N<P?"bg-green-500 text-white":N===P?"bg-brand-500 text-white":"bg-neutral-200 text-neutral-500 dark:bg-neutral-700 dark:text-neutral-400"}`,children:N<P?"✓":N+1}),N<j.length-1&&a.jsx("span",{className:"h-px w-6 bg-neutral-300 dark:bg-neutral-700"})]},C.key))}),e==="password"&&a.jsxs("form",{onSubmit:y,children:[a.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:"Ersteinrichtung"}),a.jsxs("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:["Gib das Einmalpasswort ein, das in ",a.jsx("code",{children:"config/setup.php"})," hinterlegt ist."]}),a.jsxs("div",{className:"mb-4",children:[a.jsx("label",{className:w,children:"Einmalpasswort"}),a.jsx("input",{type:"password",value:l,onChange:C=>o(C.target.value),required:!0,autoFocus:!0,className:v})]}),n&&a.jsx("p",{className:"mb-4 text-sm text-red-600",children:n}),a.jsx("button",{type:"submit",disabled:s,className:"w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:s?"Prüfe…":"Weiter"})]}),e==="database"&&a.jsxs("form",{onSubmit:k,children:[a.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:"Datenbank-Zugangsdaten"}),a.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:"Trage die Zugangsdaten der Datenbank auf diesem Server ein. Die Verbindung wird vor dem Speichern getestet."}),a.jsxs("div",{className:"mb-3",children:[a.jsx("label",{className:w,children:"Host *"}),a.jsx("input",{required:!0,value:u.host,onChange:C=>c({...u,host:C.target.value}),className:v})]}),a.jsxs("div",{className:"mb-3",children:[a.jsx("label",{className:w,children:"Datenbankname *"}),a.jsx("input",{required:!0,value:u.name,onChange:C=>c({...u,name:C.target.value}),className:v})]}),a.jsxs("div",{className:"mb-3",children:[a.jsx("label",{className:w,children:"Benutzer *"}),a.jsx("input",{required:!0,value:u.user,onChange:C=>c({...u,user:C.target.value}),className:v})]}),a.jsxs("div",{className:"mb-3",children:[a.jsx("label",{className:w,children:"Passwort"}),a.jsx("input",{type:"password",value:u.password,onChange:C=>c({...u,password:C.target.value}),className:v})]}),a.jsxs("div",{className:"mb-6",children:[a.jsx("label",{className:w,children:"Zeichensatz"}),a.jsx("input",{value:u.charset,onChange:C=>c({...u,charset:C.target.value}),className:v})]}),n&&a.jsx("p",{className:"mb-4 text-sm text-red-600",children:n}),a.jsx("button",{type:"submit",disabled:s,className:"w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:s?"Teste Verbindung…":"Verbindung testen & speichern"})]}),e==="schema"&&a.jsxs("div",{children:[a.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:"Datenbankstruktur"}),a.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:"Die Datenbankverbindung funktioniert. Jetzt legen wir die benötigten Tabellen an."}),m&&a.jsx("ul",{className:"mb-4 space-y-1 rounded-md bg-neutral-50 p-3 text-sm text-neutral-700 dark:bg-neutral-800 dark:text-neutral-300",children:m.map((C,N)=>a.jsx("li",{children:C},N))}),n&&a.jsx("p",{className:"mb-4 text-sm text-red-600",children:n}),a.jsx("button",{type:"button",onClick:x,disabled:s,className:"w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:s?"Richte ein…":"Datenbankstruktur einrichten"})]}),e==="admin"&&a.jsxs("form",{onSubmit:p,children:[a.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:"Erster Admin-Account"}),a.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:"Lege den ersten Super-Admin-Account an, mit dem du dich anschließend einloggen kannst."}),a.jsxs("div",{className:"mb-3",children:[a.jsx("label",{className:w,children:"Benutzername"}),a.jsx("input",{required:!0,autoFocus:!0,value:d.username,onChange:C=>h({...d,username:C.target.value}),className:v})]}),a.jsxs("div",{className:"mb-3",children:[a.jsx("label",{className:w,children:"Passwort"}),a.jsx("input",{type:"password",required:!0,minLength:8,value:d.password,onChange:C=>h({...d,password:C.target.value}),className:v})]}),a.jsxs("div",{className:"mb-6",children:[a.jsx("label",{className:w,children:"Passwort wiederholen"}),a.jsx("input",{type:"password",required:!0,minLength:8,value:d.password_confirmation,onChange:C=>h({...d,password_confirmation:C.target.value}),className:v})]}),n&&a.jsx("p",{className:"mb-4 text-sm text-red-600",children:n}),a.jsx("button",{type:"submit",disabled:s,className:"w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:s?"Lege an…":"Admin-Account anlegen"})]}),e==="done"&&a.jsxs("div",{className:"text-center",children:[a.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:"Fertig!"}),a.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:"Die Ersteinrichtung ist abgeschlossen. Du kannst dich jetzt mit deinem neuen Admin-Account anmelden."}),a.jsx(O,{to:"/admin/login",className:"inline-block w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600",children:"Zum Login"})]})]})]})}function hP(){const{user:e,login:t,verifyTwoFactor:n}=Mt(),r=ea(),[s,i]=g.useState("credentials"),[l,o]=g.useState(""),[u,c]=g.useState(""),[d,h]=g.useState(""),[m,f]=g.useState(""),[b,y]=g.useState(!1);if(e)return a.jsx(Ws,{to:"/admin",replace:!0});const k=async p=>{p.preventDefault(),y(!0),f("");try{(await t(l,u)).requires2fa?i("code"):r("/admin")}catch(v){f(v.message)}finally{y(!1)}},x=async p=>{p.preventDefault(),y(!0),f("");try{await n(d),r("/admin")}catch(v){f(v.message)}finally{y(!1)}};return a.jsxs("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-neutral-50 px-4 dark:bg-neutral-950",children:[a.jsx("img",{src:Hs,alt:"HifiPlanet",className:"h-16 w-auto dark:hidden sm:h-20"}),a.jsx("img",{src:Ai,alt:"HifiPlanet",className:"hidden h-16 w-auto dark:block sm:h-20"}),s==="credentials"?a.jsxs("form",{onSubmit:k,className:"w-full max-w-sm rounded-xl border border-neutral-200 bg-white p-8 shadow-sm dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h1",{className:"mb-6 text-xl font-bold text-neutral-900 dark:text-white",children:"Admin-Login"}),a.jsxs("div",{className:"mb-4",children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Benutzername"}),a.jsx("input",{value:l,onChange:p=>o(p.target.value),required:!0,autoFocus:!0,className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm focus:border-brand-500 focus:outline-none dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{className:"mb-6",children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Passwort"}),a.jsx("input",{type:"password",value:u,onChange:p=>c(p.target.value),required:!0,className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm focus:border-brand-500 focus:outline-none dark:border-neutral-700 dark:bg-neutral-900"})]}),m&&a.jsx("p",{className:"mb-4 text-sm text-red-600",children:m}),a.jsx("button",{type:"submit",disabled:b,className:"w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:b?"Anmelden…":"Anmelden"})]}):a.jsxs("form",{onSubmit:x,className:"w-full max-w-sm rounded-xl border border-neutral-200 bg-white p-8 shadow-sm dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:"Bestätigungscode"}),a.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:"Öffne die Google Authenticator App und gib den 6-stelligen Code ein. Alternativ kannst du auch einen deiner Wiederherstellungscodes verwenden."}),a.jsxs("div",{className:"mb-6",children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Code"}),a.jsx("input",{value:d,onChange:p=>h(p.target.value),required:!0,autoFocus:!0,inputMode:"numeric",placeholder:"123456",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-center text-lg tracking-widest focus:border-brand-500 focus:outline-none dark:border-neutral-700 dark:bg-neutral-900"})]}),m&&a.jsx("p",{className:"mb-4 text-sm text-red-600",children:m}),a.jsx("button",{type:"submit",disabled:b,className:"w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:b?"Prüfe…":"Bestätigen"}),a.jsx("button",{type:"button",onClick:()=>{i("credentials"),h(""),f("")},className:"mt-3 w-full text-sm text-neutral-500 hover:underline dark:text-neutral-400",children:"Zurück zum Login"})]})]})}const mP={tag:"M4 4h7l9 9-7 7-9-9V4Zm3.5 3.5h.01",car:"M3 13.5 4.5 9A2 2 0 0 1 6.4 7.5h11.2A2 2 0 0 1 19.5 9L21 13.5M3 13.5v4a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-1h12v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-4M3 13.5h18M6.5 16.5h.01M17.5 16.5h.01",box:"M12 3 4 7.5v9L12 21l8-4.5v-9L12 3Zm0 9 8-4.5M12 12v9M12 12 4 7.5",mail:"M4 6h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1Zm0 0 8 7 8-7"},fP=({path:e,className:t="h-6 w-6"})=>a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",className:t,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})});function pP(){const[e,t]=g.useState(null),[n,r]=g.useState("");if(g.useEffect(()=>{M.get("/analytics/report").then(t).catch(i=>r(i.message))},[]),n)return a.jsxs("section",{className:"mt-8 rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Google Analytics"}),a.jsx("p",{className:"text-sm text-red-600",children:n})]});if(!e)return null;if(!e.configured)return a.jsxs("section",{className:"mt-8 rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Google Analytics"}),a.jsxs("p",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:["Noch nicht eingerichtet. Unter"," ",a.jsx(O,{to:"/admin/settings/website",className:"text-brand-600 hover:underline dark:text-brand-400",children:"Einstellungen → Website"})," ","kannst du die Dashboard-Anbindung konfigurieren, um hier Besucherzahlen zu sehen."]})]});const s=Math.max(1,...e.daily.map(i=>i.pageviews));return a.jsxs("section",{className:"mt-8 rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Google Analytics"}),a.jsx("p",{className:"mb-5 text-sm text-neutral-500 dark:text-neutral-400",children:"Letzte 7 Tage."}),a.jsxs("div",{className:"mb-6 grid grid-cols-3 gap-4",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-2xl font-extrabold text-brand-600 dark:text-brand-400",children:e.totals.users}),a.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:"Nutzer"})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-2xl font-extrabold text-brand-600 dark:text-brand-400",children:e.totals.sessions}),a.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:"Sitzungen"})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-2xl font-extrabold text-brand-600 dark:text-brand-400",children:e.totals.pageviews}),a.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:"Seitenaufrufe"})]})]}),e.daily.length>0&&a.jsx("div",{className:"mb-6 flex h-24 items-end gap-1.5",children:e.daily.map(i=>a.jsxs("div",{className:"flex flex-1 flex-col items-center gap-1",children:[a.jsx("div",{className:"w-full rounded-t bg-brand-400 dark:bg-brand-500",style:{height:`${Math.max(4,i.pageviews/s*80)}px`},title:`${i.date}: ${i.pageviews} Seitenaufrufe`}),a.jsxs("span",{className:"text-[10px] text-neutral-400",children:[i.date.slice(6,8),".",i.date.slice(4,6),"."]})]},i.date))}),e.top_pages.length>0&&a.jsxs("div",{children:[a.jsx("p",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-neutral-400",children:"Meistbesuchte Seiten"}),a.jsx("ul",{className:"space-y-1 text-sm",children:e.top_pages.map(i=>a.jsxs("li",{className:"flex items-center justify-between gap-3 text-neutral-700 dark:text-neutral-300",children:[a.jsx("span",{className:"truncate font-mono text-xs",children:i.path}),a.jsx("span",{className:"shrink-0 font-semibold",children:i.pageviews})]},i.path))})]})]})}function gP(){const{user:e,hasPermission:t}=Mt(),[n,r]=g.useState({});g.useEffect(()=>{t("brands.manage")&&M.get("/brands").then(i=>r(l=>({...l,brands:i.length}))),(t("models.manage")||t("packages.manage"))&&M.get("/models").then(i=>r(l=>({...l,models:i.length}))),t("packages.manage")&&M.get("/packages").then(i=>r(l=>({...l,packages:i.length}))),t("contact.manage")&&M.get("/contact").then(i=>r(l=>({...l,newContacts:i.filter(o=>o.status==="new").length})))},[]);const s=[{key:"brands",label:"Marken",icon:"tag",hint:"Die Hersteller, z. B. Audi oder BMW.",value:n.brands,to:"/admin/brands",show:t("brands.manage")},{key:"models",label:"Modelle",icon:"car",hint:"Die Fahrzeuge einer Marke, z. B. A4.",value:n.models,to:"/admin/models",show:t("models.manage")},{key:"packages",label:"Pakete",icon:"box",hint:"Die Sound-Pakete für ein Modell.",value:n.packages,to:"/admin/packages",show:t("packages.manage")},{key:"contacts",label:"Neue Anfragen",icon:"mail",hint:"Kunden, die noch auf Antwort warten.",value:n.newContacts,to:"/admin/contact-requests",show:t("contact.manage"),highlight:!0}].filter(i=>i.show);return a.jsxs("div",{children:[a.jsxs("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:["Willkommen, ",e==null?void 0:e.username,"!"]}),a.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:"Hier siehst du auf einen Blick, wie viel in deinem Shop hinterlegt ist. Klicke auf eine Kachel, um dorthin zu gelangen."}),s.length===0?a.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:"Für deinen Account sind noch keine Bereiche freigeschaltet. Bitte wende dich an einen Administrator."}):a.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:s.map(i=>a.jsxs(O,{to:i.to,className:`rounded-xl border p-5 shadow-sm transition hover:-translate-y-0.5 hover:shadow-md ${i.highlight&&i.value>0?"border-brand-300 bg-brand-50 dark:border-brand-900 dark:bg-brand-900/20":"border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-900"}`,children:[a.jsx("div",{className:"mb-3 flex h-10 w-10 items-center justify-center rounded-full bg-brand-100 text-brand-600 dark:bg-brand-900/40 dark:text-brand-400",children:a.jsx(fP,{path:mP[i.icon]})}),a.jsx("p",{className:"text-sm font-semibold text-neutral-700 dark:text-neutral-200",children:i.label}),a.jsx("p",{className:"mt-1 text-3xl font-extrabold text-brand-600 dark:text-brand-400",children:i.value??"…"}),a.jsx("p",{className:"mt-2 text-xs text-neutral-500 dark:text-neutral-400",children:i.hint})]},i.key))}),t("settings.manage")&&a.jsx(pP,{})]})}const _f={name:"",sort_order:0};function xP(){const[e,t]=g.useState([]),[n,r]=g.useState(_f),[s,i]=g.useState(null),[l,o]=g.useState(""),u=()=>M.get("/brands").then(t);g.useEffect(()=>{u()},[]);const c=f=>{i(f.id),r({name:f.name,sort_order:f.sort_order})},d=()=>{i(null),r(_f)},h=async f=>{f.preventDefault(),o("");try{s?await M.put(`/brands/${s}`,n):await M.post("/brands",n),d(),u()}catch(b){o(b.message)}},m=async f=>{confirm("Marke inkl. aller Modelle/Pakete/Produkte wirklich löschen?")&&(await M.delete(`/brands/${f}`),u())};return a.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[a.jsxs("div",{className:"lg:col-span-2",children:[a.jsx("h1",{className:"mb-4 text-xl font-bold text-neutral-900 dark:text-white",children:"Marken"}),a.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:a.jsxs("table",{className:"w-full text-left text-sm",children:[a.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-4 py-2",children:"Name"}),a.jsx("th",{className:"px-4 py-2",children:"Sortierung"}),a.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),a.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[e.map(f=>a.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[a.jsx("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:a.jsx(O,{to:`/marken/${f.slug}`,target:"_blank",className:"hover:text-brand-500",children:f.name})}),a.jsx("td",{className:"px-4 py-2",children:f.sort_order}),a.jsxs("td",{className:"px-4 py-2 text-right",children:[a.jsx("button",{onClick:()=>c(f),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),a.jsx("button",{onClick:()=>m(f.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},f.id)),e.length===0&&a.jsx("tr",{children:a.jsx("td",{colSpan:3,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Marken angelegt."})})]})]})})]}),a.jsxs("form",{onSubmit:h,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:s?"Marke bearbeiten":"Neue Marke"}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Name *"}),a.jsx("input",{required:!0,value:n.name,onChange:f=>r({...n,name:f.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),a.jsx("input",{type:"number",value:n.sort_order,onChange:f=>r({...n,sort_order:Number(f.target.value)}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),l&&a.jsx("p",{className:"text-sm text-red-600",children:l}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:s?"Speichern":"Anlegen"}),s&&a.jsx("button",{type:"button",onClick:d,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}const Df={name:"",brand_id:"",sort_order:0};function bP(){const[e,t]=g.useState([]),[n,r]=g.useState([]),[s,i]=g.useState(Df),[l,o]=g.useState(null),[u,c]=g.useState(""),[d,h]=g.useState("all"),m=g.useMemo(()=>d==="all"?e:e.filter(p=>String(p.brand_id)===d),[e,d]),f=()=>{M.get("/models").then(t),M.get("/brands").then(r)};g.useEffect(f,[]);const b=p=>{o(p.id),i({name:p.name,brand_id:p.brand_id,sort_order:p.sort_order})},y=()=>{o(null),i(Df)},k=async p=>{p.preventDefault(),c("");const v={...s,brand_id:Number(s.brand_id)};try{l?await M.put(`/models/${l}`,v):await M.post("/models",v),y(),f()}catch(w){c(w.message)}},x=async p=>{confirm("Modell inkl. aller Pakete/Produkte wirklich löschen?")&&(await M.delete(`/models/${p}`),f())};return a.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[a.jsxs("div",{className:"lg:col-span-2",children:[a.jsx("h1",{className:"mb-4 text-xl font-bold text-neutral-900 dark:text-white",children:"Modelle"}),a.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:[a.jsx("label",{className:"text-sm font-medium text-neutral-600 dark:text-neutral-300",children:"Nach Marke filtern:"}),a.jsxs("select",{value:d,onChange:p=>h(p.target.value),className:"rounded-md border border-neutral-300 bg-white px-3 py-1.5 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:[a.jsx("option",{value:"all",children:"Alle Marken"}),n.map(p=>a.jsx("option",{value:String(p.id),children:p.name},p.id))]}),d!=="all"&&a.jsx("button",{onClick:()=>h("all"),className:"text-sm text-brand-600 hover:underline",children:"Filter zurücksetzen"}),a.jsxs("span",{className:"text-sm text-neutral-400",children:[m.length," von ",e.length]})]}),a.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:a.jsxs("table",{className:"w-full text-left text-sm",children:[a.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-4 py-2",children:"Marke"}),a.jsx("th",{className:"px-4 py-2",children:"Modell"}),a.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),a.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[m.map(p=>a.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[a.jsx("td",{className:"px-4 py-2",children:p.brand_name}),a.jsx("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:p.name}),a.jsxs("td",{className:"px-4 py-2 text-right",children:[a.jsx("button",{onClick:()=>b(p),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),a.jsx("button",{onClick:()=>x(p.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},p.id)),m.length===0&&a.jsx("tr",{children:a.jsx("td",{colSpan:3,className:"px-4 py-6 text-center text-neutral-400",children:e.length===0?"Noch keine Modelle angelegt.":"Keine Modelle für diese Marke."})})]})]})})]}),a.jsxs("form",{onSubmit:k,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:l?"Modell bearbeiten":"Neues Modell"}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Marke *"}),a.jsxs("select",{required:!0,value:s.brand_id,onChange:p=>i({...s,brand_id:p.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:[a.jsx("option",{value:"",children:"Bitte wählen…"}),n.map(p=>a.jsx("option",{value:p.id,children:p.name},p.id))]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Modellname *"}),a.jsx("input",{required:!0,value:s.name,onChange:p=>i({...s,name:p.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),a.jsx("input",{type:"number",value:s.sort_order,onChange:p=>i({...s,sort_order:Number(p.target.value)}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),u&&a.jsx("p",{className:"text-sm text-red-600",children:u}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:l?"Speichern":"Anlegen"}),l&&a.jsx("button",{type:"button",onClick:y,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}function pl({value:e,onChange:t,label:n="Bild"}){const[r,s]=g.useState(!1),[i,l]=g.useState(""),o=async u=>{var d;const c=(d=u.target.files)==null?void 0:d[0];if(c){s(!0),l("");try{const h=new FormData;h.append("file",c);const m=await M.post("/uploads",h);t(m.path)}catch(h){l(h.message)}finally{s(!1)}}};return a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:n}),a.jsxs("div",{className:"flex items-center gap-3",children:[e&&a.jsx("img",{src:e,alt:"",className:"h-12 w-12 rounded-md object-cover"}),a.jsx("input",{type:"file",accept:"image/png,image/jpeg,image/webp",onChange:o,className:"text-sm"}),r&&a.jsx("span",{className:"text-sm text-neutral-500",children:"Lädt hoch…"})]}),i&&a.jsx("p",{className:"mt-1 text-sm text-red-600",children:i})]})}const Lf={name:"",cover_image_path:"",sort_order:0};function vP(){const[e,t]=g.useState([]),[n,r]=g.useState(Lf),[s,i]=g.useState(null),[l,o]=g.useState(""),u=()=>M.get("/gallery-brands").then(t);g.useEffect(()=>{u()},[]);const c=f=>{i(f.id),r({name:f.name,cover_image_path:f.cover_image_path||"",sort_order:f.sort_order})},d=()=>{i(null),r(Lf)},h=async f=>{f.preventDefault(),o("");try{s?await M.put(`/gallery-brands/${s}`,n):await M.post("/gallery-brands",n),d(),u()}catch(b){o(b.message)}},m=async f=>{confirm("Marke inkl. aller Projekte/Fotos wirklich löschen?")&&(await M.delete(`/gallery-brands/${f}`),u())};return a.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[a.jsxs("div",{className:"lg:col-span-2",children:[a.jsx("h1",{className:"mb-4 text-xl font-bold text-neutral-900 dark:text-white",children:"Galerie-Marken"}),a.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:a.jsxs("table",{className:"w-full text-left text-sm",children:[a.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-4 py-2",children:"Bild"}),a.jsx("th",{className:"px-4 py-2",children:"Name"}),a.jsx("th",{className:"px-4 py-2",children:"Sortierung"}),a.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),a.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[e.map(f=>a.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[a.jsx("td",{className:"px-4 py-2",children:f.cover_image_path?a.jsx("img",{src:f.cover_image_path,alt:"",className:"h-10 w-10 rounded-md object-cover"}):a.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-md bg-neutral-100 text-xs text-neutral-400 dark:bg-neutral-800",children:""})}),a.jsx("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:a.jsx(O,{to:`/galerie/${f.slug}`,target:"_blank",className:"hover:text-brand-500",children:f.name})}),a.jsx("td",{className:"px-4 py-2",children:f.sort_order}),a.jsxs("td",{className:"px-4 py-2 text-right",children:[a.jsx("button",{onClick:()=>c(f),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),a.jsx("button",{onClick:()=>m(f.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},f.id)),e.length===0&&a.jsx("tr",{children:a.jsx("td",{colSpan:4,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Galerie-Marken angelegt."})})]})]})})]}),a.jsxs("form",{onSubmit:h,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:s?"Marke bearbeiten":"Neue Marke"}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Name *"}),a.jsx("input",{required:!0,value:n.name,onChange:f=>r({...n,name:f.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsx(pl,{value:n.cover_image_path,onChange:f=>r({...n,cover_image_path:f}),label:"Titelbild (optional)"}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),a.jsx("input",{type:"number",value:n.sort_order,onChange:f=>r({...n,sort_order:Number(f.target.value)}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),l&&a.jsx("p",{className:"text-sm text-red-600",children:l}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:s?"Speichern":"Anlegen"}),s&&a.jsx("button",{type:"button",onClick:d,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}const Bf={name:"",gallery_brand_id:"",cover_image_path:"",sort_order:0};function yP(){const[e,t]=g.useState([]),[n,r]=g.useState([]),[s,i]=g.useState(Bf),[l,o]=g.useState(null),[u,c]=g.useState(""),[d,h]=g.useState("all"),m=g.useMemo(()=>d==="all"?e:e.filter(p=>String(p.gallery_brand_id)===d),[e,d]),f=()=>{M.get("/gallery-projects").then(t),M.get("/gallery-brands").then(r)};g.useEffect(f,[]);const b=p=>{o(p.id),i({name:p.name,gallery_brand_id:p.gallery_brand_id,cover_image_path:p.cover_image_path||"",sort_order:p.sort_order})},y=()=>{o(null),i(Bf)},k=async p=>{p.preventDefault(),c("");const v={...s,gallery_brand_id:Number(s.gallery_brand_id)};try{l?await M.put(`/gallery-projects/${l}`,v):await M.post("/gallery-projects",v),y(),f()}catch(w){c(w.message)}},x=async p=>{confirm("Projekt inkl. aller Fotos wirklich löschen?")&&(await M.delete(`/gallery-projects/${p}`),f())};return a.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[a.jsxs("div",{className:"lg:col-span-2",children:[a.jsx("h1",{className:"mb-4 text-xl font-bold text-neutral-900 dark:text-white",children:"Galerie-Projekte"}),a.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:[a.jsx("label",{className:"text-sm font-medium text-neutral-600 dark:text-neutral-300",children:"Nach Marke filtern:"}),a.jsxs("select",{value:d,onChange:p=>h(p.target.value),className:"rounded-md border border-neutral-300 bg-white px-3 py-1.5 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:[a.jsx("option",{value:"all",children:"Alle Marken"}),n.map(p=>a.jsx("option",{value:String(p.id),children:p.name},p.id))]}),d!=="all"&&a.jsx("button",{onClick:()=>h("all"),className:"text-sm text-brand-600 hover:underline",children:"Filter zurücksetzen"}),a.jsxs("span",{className:"text-sm text-neutral-400",children:[m.length," von ",e.length]})]}),a.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:a.jsxs("table",{className:"w-full text-left text-sm",children:[a.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-4 py-2",children:"Marke"}),a.jsx("th",{className:"px-4 py-2",children:"Projekt"}),a.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),a.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[m.map(p=>a.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[a.jsx("td",{className:"px-4 py-2",children:p.brand_name}),a.jsx("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:p.name}),a.jsxs("td",{className:"px-4 py-2 text-right",children:[a.jsx(O,{to:`/admin/gallery-projects/${p.id}/photos`,className:"mr-3 text-brand-600 hover:underline",children:"Fotos"}),a.jsx("button",{onClick:()=>b(p),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),a.jsx("button",{onClick:()=>x(p.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},p.id)),m.length===0&&a.jsx("tr",{children:a.jsx("td",{colSpan:3,className:"px-4 py-6 text-center text-neutral-400",children:e.length===0?"Noch keine Projekte angelegt.":"Keine Projekte für diese Marke."})})]})]})})]}),a.jsxs("form",{onSubmit:k,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:l?"Projekt bearbeiten":"Neues Projekt"}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Marke *"}),a.jsxs("select",{required:!0,value:s.gallery_brand_id,onChange:p=>i({...s,gallery_brand_id:p.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:[a.jsx("option",{value:"",children:"Bitte wählen…"}),n.map(p=>a.jsx("option",{value:p.id,children:p.name},p.id))]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Projektname *"}),a.jsx("input",{required:!0,placeholder:"z. B. Audi TT",value:s.name,onChange:p=>i({...s,name:p.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsx(pl,{value:s.cover_image_path,onChange:p=>i({...s,cover_image_path:p}),label:"Titelbild (optional)"}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),a.jsx("input",{type:"number",value:s.sort_order,onChange:p=>i({...s,sort_order:Number(p.target.value)}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),u&&a.jsx("p",{className:"text-sm text-red-600",children:u}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:l?"Speichern":"Anlegen"}),l&&a.jsx("button",{type:"button",onClick:y,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}function kP(){const{projectId:e}=$n(),[t,n]=g.useState([]),[r,s]=g.useState(""),[i,l]=g.useState(!1),[o,u]=g.useState(""),c=g.useRef(null),d=()=>M.get(`/gallery-projects/${e}/photos`).then(n);g.useEffect(()=>{d()},[e]);const h=async k=>{const x=Array.from(k.target.files||[]);if(x.length!==0){s(""),l(!0);try{for(let p=0;p<x.length;p++){u(`Lade Bild ${p+1} von ${x.length} hoch…`);const v=new FormData;v.append("file",x[p]);const w=await M.post("/uploads",v);await M.post("/gallery-photos",{gallery_project_id:Number(e),image_path:w.path,sort_order:t.length+p})}d()}catch(p){s(p.message)}finally{l(!1),u(""),c.current&&(c.current.value="")}}},m=(k,x)=>{n(p=>p.map(v=>v.id===k.id?{...v,caption:x}:v))},f=(k,x)=>{n(p=>p.map(v=>v.id===k.id?{...v,sort_order:x}:v))},b=async k=>{await M.put(`/gallery-photos/${k.id}`,{caption:k.caption,sort_order:k.sort_order}),d()},y=async k=>{confirm("Foto wirklich entfernen?")&&(await M.delete(`/gallery-photos/${k}`),d())};return a.jsxs("div",{children:[a.jsx("p",{className:"mb-2 text-sm",children:a.jsx(O,{to:"/admin/gallery-projects",className:"text-brand-600 hover:underline",children:"← Zurück zu den Projekten"})}),a.jsx("h1",{className:"mb-4 text-xl font-bold text-neutral-900 dark:text-white",children:"Fotos im Projekt"}),a.jsxs("div",{className:"mb-6 rounded-xl border border-neutral-200 bg-white p-4 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Fotos hinzufügen (Mehrfachauswahl möglich)"}),a.jsx("input",{ref:c,type:"file",multiple:!0,accept:"image/png,image/jpeg,image/webp",onChange:h,disabled:i,className:"text-sm"}),i&&a.jsx("p",{className:"mt-2 text-sm text-neutral-500",children:o})]}),r&&a.jsx("p",{className:"mb-4 text-sm text-red-600",children:r}),a.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4",children:[t.map(k=>a.jsxs("div",{className:"overflow-hidden rounded-xl border border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("img",{src:k.image_path,alt:k.caption||"",className:"aspect-square w-full object-cover"}),a.jsxs("div",{className:"space-y-2 p-3",children:[a.jsx("input",{value:k.caption||"",onChange:x=>m(k,x.target.value),onBlur:()=>b(k),placeholder:"Bildunterschrift (optional)",className:"w-full rounded-md border border-neutral-300 bg-white px-2 py-1 text-xs dark:border-neutral-700 dark:bg-neutral-900"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("input",{type:"number",value:k.sort_order,onChange:x=>f(k,Number(x.target.value)),onBlur:()=>b(k),className:"w-16 rounded-md border border-neutral-300 bg-white px-2 py-1 text-xs dark:border-neutral-700 dark:bg-neutral-900"}),a.jsx("button",{onClick:()=>y(k.id),className:"text-xs text-red-600 hover:underline",children:"Entfernen"})]})]})]},k.id)),t.length===0&&a.jsx("p",{className:"col-span-full py-6 text-center text-neutral-400",children:"Noch keine Fotos in diesem Projekt."})]})]})}const wP=["Base","Clear","Drive","Prime","Elite","Apex","The Statement","Limitless"],jP=e=>(e+1)*10,Ba="w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900",qu=e=>({description:e.description||"",markup_type:e.markup_type||"none",markup_value:e.markup_value||0,icon_name:e.icon_name||"",tagline:e.tagline||"",price_text:e.price_text||"",is_featured:!!e.is_featured,sort_order:e.sort_order??0}),NP=e=>({description:"",markup_type:"none",markup_value:0,icon_name:"",tagline:"",price_text:"",is_featured:!1,sort_order:jP(e)}),SP=["description","markup_type","markup_value","icon_name","tagline","price_text","is_featured","sort_order"],go=e=>{if(!e.existing)return e.checked;const t=qu(e.existing);return SP.some(n=>n==="is_featured"?!!t[n]!=!!e.form[n]:String(t[n])!==String(e.form[n]))},ts=(e,t)=>{const n=t.filter(l=>l.car_model_id===e).slice().sort((l,o)=>l.sort_order-o.sort_order||l.name.localeCompare(o.name)),r=new Set,s=wP.map((l,o)=>{const u=n.find(c=>!r.has(c.id)&&c.name.trim().toLowerCase()===l.toLowerCase());return u&&r.add(u.id),{key:`tier-${o}`,tierName:l,existing:u||null,checked:!!u,form:u?qu(u):NP(o)}}),i=n.filter(l=>!r.has(l.id)).map(l=>({key:`legacy-${l.id}`,tierName:null,existing:l,checked:!0,form:qu(l)}));return[...s,...i]},CP=e=>{e.target.style.height="auto",e.target.style.height=`${e.target.scrollHeight}px`};function PP(){const[e,t]=g.useState([]),[n,r]=g.useState([]),[s,i]=g.useState(""),[l,o]=g.useState(""),[u,c]=g.useState([]),[d,h]=g.useState({}),[m,f]=g.useState(!1),[b,y]=g.useState(null),[k,x]=g.useState(""),[p,v]=g.useState(!1),[w,j]=g.useState(null),[P,C]=g.useState("all"),[N,S]=g.useState("all"),E=async()=>{const[A,W]=await Promise.all([M.get("/packages"),M.get("/models")]);return t(A),r(W),A};g.useEffect(()=>{E()},[]);const T=g.useMemo(()=>new Map(n.map(A=>[A.id,A])),[n]),I=g.useMemo(()=>{const A=new Map;return n.forEach(W=>{A.has(W.brand_id)||A.set(W.brand_id,W.brand_name)}),Array.from(A,([W,G])=>({id:W,name:G})).sort((W,G)=>W.name.localeCompare(G.name))},[n]),U=g.useMemo(()=>n.filter(A=>!s||String(A.brand_id)===s).sort((A,W)=>A.name.localeCompare(W.name)),[n,s]),Y=l?T.get(Number(l)):null,J=g.useMemo(()=>u.some(go),[u]),R=()=>!J||confirm("Ungespeicherte Änderungen verwerfen?"),X=(A,W,G=e)=>{i(String(A)),o(String(W)),c(ts(Number(W),G)),h({}),y(null),x(""),j(null)},_=A=>{R()&&(i(A),o(""),c([]),h({}),y(null),j(null))},L=A=>{if(!R())return;if(!A){o(""),c([]);return}const W=T.get(Number(A));X(W?W.brand_id:s,A)},F=(A,W)=>c(G=>G.map(Le=>Le.key===A?{...Le,checked:W}:Le)),V=(A,W)=>c(G=>G.map(Le=>Le.key===A?{...Le,form:{...Le.form,...W}}:Le)),$=A=>({name:A.tierName??A.existing.name,car_model_id:Number(l),...A.form,markup_value:Number(A.form.markup_value),sort_order:Number(A.form.sort_order)}),Je=async()=>{f(!0),y(null);const A={},W=u;let G=0,Le=0;for(const We of u)try{We.existing?go(We)&&(await M.put(`/packages/${We.existing.id}`,$(We)),Le+=1):We.checked&&(await M.post("/packages",$(We)),G+=1)}catch(Hr){A[We.key]=Hr.message}const da=await E(),kl=ts(Number(l),da).map(We=>{if(!A[We.key])return We;const Hr=W.find(Mb=>Mb.key===We.key);return Hr?{...We,checked:Hr.checked,form:Hr.form}:We});c(kl),h(A);const Wr=Object.keys(A).length,Kt=[];G&&Kt.push(`${G} neu angelegt`),Le&&Kt.push(`${Le} aktualisiert`),!Kt.length&&!Wr&&Kt.push("Keine Änderungen"),y(Wr?{kind:"error",text:`${Kt.join(", ")||"Nichts gespeichert"} ${Wr} Paket(e) fehlgeschlagen (Details an der Zeile).`}:{kind:"ok",text:`${Kt.join(", ")}.`}),f(!1)},ut=async A=>{if(!confirm(`Paket "${A.tierName??A.existing.name}" inkl. aller Produkte wirklich löschen?`))return;await M.delete(`/packages/${A.existing.id}`);const W=await E();c(ts(Number(l),W)),y(null)},Ur=async A=>{if(!confirm("Paket inkl. aller Produkte wirklich löschen?"))return;await M.delete(`/packages/${A.id}`);const W=await E();l&&c(ts(Number(l),W))},Dt=async()=>{if(!k||!R())return;const A=T.get(Number(k)),W=T.get(Number(l));if(confirm(`Alle Pakete von "${A.brand_name} ${A.name}" inkl. verknüpfter Produkte nach "${W.brand_name} ${W.name}" kopieren?
Bereits vorhandene Paketstufen werden übersprungen. Upgrades werden nicht mitkopiert.`)){v(!0),j(null);try{const G=await M.post(`/models/${l}/copy-packages`,{source_model_id:Number(k)}),Le=G.copied.reduce((Wr,Kt)=>Wr+Kt.products,0),da=[`${G.copied.length} Paket(e) kopiert (${Le} Produkte)`];G.skipped.length&&da.push(`übersprungen: ${G.skipped.join(", ")}`),j({text:`${da.join(" ")}.`});const kl=await E();c(ts(Number(l),kl)),h({})}catch(G){j({error:G.message})}v(!1)}},Gn=u.filter(A=>!A.existing&&A.checked).length,Tb=u.filter(A=>A.existing&&go(A)).length,Ab=g.useMemo(()=>n.filter(A=>P==="all"||String(A.brand_id)===P).sort((A,W)=>A.name.localeCompare(W.name)),[n,P]),yl=g.useMemo(()=>e.filter(A=>{const W=T.get(A.car_model_id);return!(P!=="all"&&String(W==null?void 0:W.brand_id)!==P||N!=="all"&&String(A.car_model_id)!==N)}),[e,T,P,N]),Td=a.jsxs("div",{children:[a.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:[a.jsx("label",{className:"text-sm font-medium text-neutral-600 dark:text-neutral-300",children:"Filtern:"}),a.jsxs("select",{value:P,onChange:A=>{C(A.target.value),S("all")},className:"rounded-md border border-neutral-300 bg-white px-3 py-1.5 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:[a.jsx("option",{value:"all",children:"Alle Marken"}),I.map(A=>a.jsx("option",{value:String(A.id),children:A.name},A.id))]}),a.jsxs("select",{value:N,onChange:A=>S(A.target.value),className:"rounded-md border border-neutral-300 bg-white px-3 py-1.5 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:[a.jsx("option",{value:"all",children:"Alle Modelle"}),Ab.map(A=>a.jsxs("option",{value:String(A.id),children:[A.brand_name," ",A.name]},A.id))]}),(P!=="all"||N!=="all")&&a.jsx("button",{onClick:()=>{C("all"),S("all")},className:"text-sm text-brand-600 hover:underline",children:"Filter zurücksetzen"}),a.jsxs("span",{className:"text-sm text-neutral-400",children:[yl.length," von ",e.length]})]}),a.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:a.jsxs("table",{className:"w-full text-left text-sm",children:[a.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-4 py-2",children:"Marke / Modell"}),a.jsx("th",{className:"px-4 py-2",children:"Paket"}),a.jsx("th",{className:"px-4 py-2",children:"Aufschlag"}),a.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),a.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[yl.map(A=>a.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[a.jsxs("td",{className:"px-4 py-2",children:[A.brand_name," ",A.model_name]}),a.jsx("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[A.name,A.is_featured&&a.jsx("span",{className:"rounded-full bg-brand-100 px-2 py-0.5 text-xs font-semibold text-brand-700 dark:bg-brand-900/40 dark:text-brand-400",children:"Empfohlen"})]})}),a.jsxs("td",{className:"px-4 py-2 text-neutral-500 dark:text-neutral-400",children:[A.markup_type==="fixed"&&`+${A.markup_value}`,A.markup_type==="percent"&&`+${A.markup_value} %`,(!A.markup_type||A.markup_type==="none")&&""]}),a.jsxs("td",{className:"px-4 py-2 text-right",children:[a.jsx(O,{to:`/admin/packages/${A.id}/products`,className:"mr-3 text-brand-600 hover:underline",children:"Produkte"}),a.jsx(O,{to:`/admin/packages/${A.id}/upgrades`,className:"mr-3 text-brand-600 hover:underline",children:"Upgrades"}),a.jsx("button",{onClick:()=>{if(!R())return;const W=T.get(A.car_model_id);X(W.brand_id,A.car_model_id),window.scrollTo({top:0,behavior:"smooth"})},className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),a.jsx("button",{onClick:()=>Ur(A),className:"text-red-600 hover:underline",children:"Löschen"})]})]},A.id)),yl.length===0&&a.jsx("tr",{children:a.jsx("td",{colSpan:4,className:"px-4 py-6 text-center text-neutral-400",children:e.length===0?"Noch keine Pakete angelegt.":"Keine Pakete für diesen Filter."})})]})]})})]});return a.jsxs("div",{className:"space-y-6",children:[a.jsx("h1",{className:"text-xl font-bold text-neutral-900 dark:text-white",children:"Pakete"}),a.jsxs("div",{className:"rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"mb-3 font-bold text-neutral-900 dark:text-white",children:"Modell wählen"}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsxs("select",{value:s,onChange:A=>_(A.target.value),className:"rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:[a.jsx("option",{value:"",children:"Marke wählen…"}),I.map(A=>a.jsx("option",{value:String(A.id),children:A.name},A.id))]}),a.jsxs("select",{value:l,onChange:A=>L(A.target.value),className:"min-w-[220px] rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:[a.jsx("option",{value:"",children:"Modell wählen…"}),U.map(A=>a.jsxs("option",{value:String(A.id),children:[A.brand_name," ",A.name]},A.id))]})]}),!l&&a.jsx("p",{className:"mt-2 text-sm text-neutral-500 dark:text-neutral-400",children:"Modell auswählen, um dessen Pakete anzulegen oder zu bearbeiten die Standard-Paketstufen stehen dann als Checkliste bereit."})]}),Y&&a.jsxs("div",{className:"rounded-xl border border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsxs("div",{className:"border-b border-neutral-200 px-5 py-4 dark:border-neutral-800",children:[a.jsxs("h2",{className:"font-bold text-neutral-900 dark:text-white",children:["Pakete für ",Y.brand_name," ",Y.name]}),a.jsx("p",{className:"mt-1 text-sm text-neutral-500 dark:text-neutral-400",children:"Paketstufen anhaken, Beschreibung und Aufschlag ausfüllen, unten alles auf einmal speichern."}),a.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 rounded-lg border border-neutral-200 bg-neutral-50 px-3 py-2.5 dark:border-neutral-800 dark:bg-neutral-950",children:[a.jsx("span",{className:"text-sm font-medium text-neutral-600 dark:text-neutral-300",children:"Pakete von anderem Modell kopieren:"}),a.jsxs("select",{value:k,onChange:A=>x(A.target.value),className:"rounded-md border border-neutral-300 bg-white px-3 py-1.5 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:[a.jsx("option",{value:"",children:"Quellmodell wählen…"}),n.filter(A=>String(A.id)!==l).sort((A,W)=>`${A.brand_name} ${A.name}`.localeCompare(`${W.brand_name} ${W.name}`)).map(A=>a.jsxs("option",{value:String(A.id),children:[A.brand_name," ",A.name]},A.id))]}),a.jsx("button",{type:"button",onClick:Dt,disabled:!k||p,className:"rounded-md border border-brand-500 px-3 py-1.5 text-sm font-semibold text-brand-600 hover:bg-brand-50 disabled:opacity-50 dark:hover:bg-brand-900/20",children:p?"Kopiert…":"Kopieren"}),a.jsx("span",{className:"text-xs text-neutral-400",children:"inkl. Produkte, ohne Upgrades"}),w&&a.jsx("span",{className:`w-full text-sm ${w.error?"text-red-600":"text-brand-600 dark:text-brand-400"}`,children:w.error||w.text})]})]}),a.jsx("div",{children:u.map((A,W)=>a.jsxs("div",{children:[A.tierName===null&&W>0&&u[W-1].tierName!==null&&a.jsx("div",{className:"border-t border-neutral-200 bg-neutral-50 px-5 py-2 text-xs font-semibold uppercase tracking-wide text-neutral-500 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-400",children:"Weitere Pakete (alte Namen)"}),a.jsxs("div",{className:`border-t border-neutral-100 dark:border-neutral-800 ${A.checked?"":"opacity-70"}`,children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-3 px-5 py-3",children:[a.jsxs("label",{className:"flex cursor-pointer items-center gap-3",children:[a.jsx("input",{type:"checkbox",checked:A.checked,disabled:!!A.existing||m,onChange:G=>F(A.key,G.target.checked),className:"h-5 w-5 rounded border-neutral-300 text-brand-600 focus:ring-brand-500 disabled:opacity-60"}),a.jsx("span",{className:"font-semibold text-neutral-900 dark:text-white",children:A.tierName??A.existing.name})]}),A.tierName===null&&a.jsx("span",{className:"text-xs text-neutral-400",children:"(alter Name)"}),A.existing?a.jsx("span",{className:"rounded-full bg-neutral-100 px-2 py-0.5 text-xs font-semibold text-neutral-600 dark:bg-neutral-800 dark:text-neutral-300",children:"Vorhanden"}):A.checked&&a.jsx("span",{className:"rounded-full bg-brand-100 px-2 py-0.5 text-xs font-semibold text-brand-700 dark:bg-brand-900/40 dark:text-brand-400",children:"Neu"}),A.form.is_featured&&a.jsx("span",{className:"rounded-full bg-brand-100 px-2 py-0.5 text-xs font-semibold text-brand-700 dark:bg-brand-900/40 dark:text-brand-400",children:"Empfohlen"}),A.existing&&a.jsxs("span",{className:"ml-auto flex items-center gap-3 text-sm",children:[a.jsx(O,{to:`/admin/packages/${A.existing.id}/products`,className:"text-brand-600 hover:underline",children:"Produkte"}),a.jsx(O,{to:`/admin/packages/${A.existing.id}/upgrades`,className:"text-brand-600 hover:underline",children:"Upgrades"}),a.jsx("button",{type:"button",onClick:()=>ut(A),className:"text-red-600 hover:underline",children:"Löschen"})]})]}),A.checked&&a.jsxs("div",{className:"space-y-4 px-5 pb-5 sm:pl-[52px]",children:[a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Beschreibung"}),a.jsx("p",{className:"mb-1 text-xs text-neutral-500 dark:text-neutral-400",children:"Jede Zeile erscheint als eigener Stichpunkt zusammen mit den Bauteilen."}),a.jsx("textarea",{rows:10,value:A.form.description,onChange:G=>V(A.key,{description:G.target.value}),onInput:CP,className:Ba})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Aufschlag"}),a.jsxs("div",{className:"flex max-w-md gap-2",children:[a.jsxs("select",{value:A.form.markup_type,onChange:G=>V(A.key,{markup_type:G.target.value}),className:"w-40 rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:[a.jsx("option",{value:"none",children:"Kein Aufschlag"}),a.jsx("option",{value:"fixed",children:"Fester Betrag (€)"}),a.jsx("option",{value:"percent",children:"Prozent (%)"})]}),a.jsx("input",{type:"number",step:"0.01",min:"0",disabled:A.form.markup_type==="none",value:A.form.markup_value,onChange:G=>V(A.key,{markup_value:G.target.value}),className:`${Ba} disabled:opacity-50`})]}),a.jsx("p",{className:"mt-1 text-xs text-neutral-500 dark:text-neutral-400",children:"Wird auf die Summe der Bauteilpreise aufgeschlagen und ergibt den Gesamtpreis für den Kunden."})]}),a.jsxs("details",{className:"rounded-lg border border-neutral-200 dark:border-neutral-800",children:[a.jsx("summary",{className:"cursor-pointer select-none px-3 py-2 text-sm font-medium text-neutral-600 dark:text-neutral-300",children:"Weitere Optionen (Preis-Text, Empfohlen, Sortierung)"}),a.jsxs("div",{className:"space-y-4 border-t border-neutral-200 p-3 dark:border-neutral-800",children:[a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Preis-Text (optional)"}),a.jsx("input",{value:A.form.price_text,onChange:G=>V(A.key,{price_text:G.target.value}),placeholder:'z. B. "Coming soon" oder "Preis auf Anfrage"',className:Ba}),a.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:"Ersetzt auf der Kachel den berechneten Preis, solange ausgefüllt."})]}),a.jsxs("label",{className:"flex items-center gap-2 text-sm text-neutral-700 dark:text-neutral-300",children:[a.jsx("input",{type:"checkbox",checked:A.form.is_featured,onChange:G=>V(A.key,{is_featured:G.target.checked}),className:"h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),"Als empfohlen hervorheben"]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),a.jsx("input",{type:"number",value:A.form.sort_order,onChange:G=>V(A.key,{sort_order:G.target.value}),className:`${Ba} max-w-[160px]`})]})]})]}),d[A.key]&&a.jsx("p",{className:"text-sm text-red-600",children:d[A.key]})]})]})]},A.key))}),a.jsxs("div",{className:"sticky bottom-0 flex flex-wrap items-center gap-3 rounded-b-xl border-t border-neutral-200 bg-white px-5 py-3 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("button",{type:"button",onClick:Je,disabled:m||!J,className:"rounded-md bg-brand-500 px-5 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:m?"Speichert…":"Alle speichern"}),a.jsxs("span",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:[Gn," neu, ",Tb," geändert"]}),b&&a.jsx("span",{className:`text-sm ${b.kind==="error"?"text-red-600":"text-brand-600 dark:text-brand-400"}`,children:b.text})]})]}),Y?a.jsxs("details",{className:"rounded-xl border border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("summary",{className:"cursor-pointer select-none px-5 py-3 font-bold text-neutral-900 dark:text-white",children:"Alle Pakete (Übersicht)"}),a.jsx("div",{className:"border-t border-neutral-200 p-5 dark:border-neutral-800",children:Td})]}):Td]})}const za=[...Vb].sort(),EP=120,TP=200;function AP({value:e,onChange:t}){const[n,r]=g.useState(""),s=g.useMemo(()=>{const i=n.trim().toLowerCase();return i?za.filter(l=>l.includes(i)).slice(0,TP):za.slice(0,EP)},[n]);return a.jsxs("div",{children:[a.jsxs("div",{className:"mb-2 flex items-center gap-3 rounded-md border border-neutral-300 p-2 dark:border-neutral-700",children:[a.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md bg-brand-100 text-brand-600 dark:bg-brand-900/40 dark:text-brand-400",children:e?a.jsx(Re,{name:e,className:"h-6 w-6"}):a.jsx("span",{className:"text-xs text-neutral-400",children:"?"})}),a.jsxs("div",{className:"text-sm",children:[a.jsx("p",{className:"font-medium text-neutral-800 dark:text-neutral-100",children:e||"Kein Icon gewählt"}),a.jsxs("p",{className:"text-xs text-neutral-400",children:[za.length," Icons verfügbar"]})]})]}),a.jsx("input",{value:n,onChange:i=>r(i.target.value),placeholder:"Icon suchen (z. B. car, shield, zap)…",className:"mb-2 w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),a.jsxs("div",{className:"grid max-h-64 grid-cols-6 gap-1 overflow-y-auto rounded-md border border-neutral-200 p-2 sm:grid-cols-8 dark:border-neutral-700",children:[s.map(i=>a.jsx("button",{type:"button",title:i,onClick:()=>t(i),className:`flex h-10 w-10 items-center justify-center rounded-md transition ${e===i?"bg-brand-500 text-white":"text-neutral-600 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-neutral-800"}`,children:a.jsx(Re,{name:i,className:"h-5 w-5"})},i)),s.length===0&&a.jsx("p",{className:"col-span-full py-4 text-center text-sm text-neutral-400",children:"Keine Icons gefunden."})]}),!n&&a.jsxs("p",{className:"mt-1 text-xs text-neutral-400",children:["Tipp: Tippe einen Suchbegriff ein, um alle ",za.length," Icons zu durchsuchen."]})]})}const zf={icon_name:"",title:"",description:"",image_path:"",cta_label:"",cta_url:"",sort_order:0};function MP(){const[e,t]=g.useState([]),[n,r]=g.useState(zf),[s,i]=g.useState(null),[l,o]=g.useState(""),u=()=>M.get("/services").then(t);g.useEffect(u,[]);const c=f=>{i(f.id),r({icon_name:f.icon_name,title:f.title,description:f.description,image_path:f.image_path||"",cta_label:f.cta_label||"",cta_url:f.cta_url||"",sort_order:f.sort_order})},d=()=>{i(null),r(zf)},h=async f=>{if(f.preventDefault(),o(""),!n.icon_name){o("Bitte ein Icon auswählen");return}const b={...n,sort_order:Number(n.sort_order)};try{s?await M.put(`/services/${s}`,b):await M.post("/services",b),d(),u()}catch(y){o(y.message)}},m=async f=>{confirm("Diese Leistung wirklich löschen?")&&(await M.delete(`/services/${f}`),u())};return a.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[a.jsxs("div",{className:"lg:col-span-2",children:[a.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Leistungen"}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Diese Karten erscheinen auf der öffentlichen Leistungen-Seite. Die 8 mitgelieferten Einträge sind die Standard-Einstellung du kannst sie bearbeiten, löschen und beliebig neue hinzufügen."}),a.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:a.jsxs("table",{className:"w-full text-left text-sm",children:[a.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-4 py-2",children:"Icon"}),a.jsx("th",{className:"px-4 py-2",children:"Titel"}),a.jsx("th",{className:"px-4 py-2",children:"Sortierung"}),a.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),a.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[e.map(f=>a.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[a.jsx("td",{className:"px-4 py-2",children:a.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-full bg-brand-100 text-brand-600 dark:bg-brand-900/40 dark:text-brand-400",children:a.jsx(Re,{name:f.icon_name,className:"h-5 w-5"})})}),a.jsx("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:f.title}),a.jsx("td",{className:"px-4 py-2",children:f.sort_order}),a.jsxs("td",{className:"px-4 py-2 text-right",children:[a.jsx("button",{onClick:()=>c(f),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),a.jsx("button",{onClick:()=>m(f.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},f.id)),e.length===0&&a.jsx("tr",{children:a.jsx("td",{colSpan:4,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Leistungen angelegt."})})]})]})})]}),a.jsxs("form",{onSubmit:h,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:s?"Leistung bearbeiten":"Neue Leistung"}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Icon *"}),a.jsx(AP,{value:n.icon_name,onChange:f=>r({...n,icon_name:f})})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Name *"}),a.jsx("input",{required:!0,value:n.title,onChange:f=>r({...n,title:f.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Beschreibung *"}),a.jsx("textarea",{required:!0,rows:4,value:n.description,onChange:f=>r({...n,description:f.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsx(pl,{value:n.image_path,onChange:f=>r({...n,image_path:f}),label:"Bild"}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Button-Text (optional)"}),a.jsx("input",{value:n.cta_label,onChange:f=>r({...n,cta_label:f.target.value}),placeholder:"z. B. Fahrzeug konfigurieren",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Button-Link (optional)"}),a.jsx("input",{value:n.cta_url,onChange:f=>r({...n,cta_url:f.target.value}),placeholder:"z. B. /fahrzeuge",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),a.jsx("input",{type:"number",value:n.sort_order,onChange:f=>r({...n,sort_order:Number(f.target.value)}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),l&&a.jsx("p",{className:"text-sm text-red-600",children:l}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:s?"Speichern":"Anlegen"}),s&&a.jsx("button",{type:"button",onClick:d,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}const If={question_de:"",answer_de:"",question_en:"",answer_en:"",sort_order:0};function _P(){const[e,t]=g.useState([]),[n,r]=g.useState(If),[s,i]=g.useState(null),[l,o]=g.useState(""),u=()=>M.get("/faqs").then(t);g.useEffect(u,[]);const c=f=>{i(f.id),r({question_de:f.question_de,answer_de:f.answer_de,question_en:f.question_en,answer_en:f.answer_en,sort_order:f.sort_order})},d=()=>{i(null),r(If)},h=async f=>{f.preventDefault(),o("");const b={...n,sort_order:Number(n.sort_order)};try{s?await M.put(`/faqs/${s}`,b):await M.post("/faqs",b),d(),u()}catch(y){o(y.message)}},m=async f=>{confirm("Diese Frage wirklich löschen?")&&(await M.delete(`/faqs/${f}`),u())};return a.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[a.jsxs("div",{className:"lg:col-span-2",children:[a.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Häufig gestellte Fragen"}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Diese Fragen erscheinen im FAQ-Bereich der Startseite, jeweils in der aktuell gewählten Sprache. Die 6 mitgelieferten Einträge sind die Standard-Einstellung du kannst sie bearbeiten, löschen und beliebig neue hinzufügen."}),a.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:a.jsxs("table",{className:"w-full text-left text-sm",children:[a.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-4 py-2",children:"Frage (DE)"}),a.jsx("th",{className:"px-4 py-2",children:"Sortierung"}),a.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),a.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[e.map(f=>a.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[a.jsx("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:f.question_de}),a.jsx("td",{className:"px-4 py-2",children:f.sort_order}),a.jsxs("td",{className:"px-4 py-2 text-right",children:[a.jsx("button",{onClick:()=>c(f),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),a.jsx("button",{onClick:()=>m(f.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},f.id)),e.length===0&&a.jsx("tr",{children:a.jsx("td",{colSpan:3,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Fragen angelegt."})})]})]})})]}),a.jsxs("form",{onSubmit:h,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:s?"Frage bearbeiten":"Neue Frage"}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Frage (Deutsch) *"}),a.jsx("input",{required:!0,value:n.question_de,onChange:f=>r({...n,question_de:f.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Antwort (Deutsch) *"}),a.jsx("textarea",{required:!0,rows:3,value:n.answer_de,onChange:f=>r({...n,answer_de:f.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Frage (Englisch) *"}),a.jsx("input",{required:!0,value:n.question_en,onChange:f=>r({...n,question_en:f.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Antwort (Englisch) *"}),a.jsx("textarea",{required:!0,rows:3,value:n.answer_en,onChange:f=>r({...n,answer_en:f.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),a.jsx("input",{type:"number",value:n.sort_order,onChange:f=>r({...n,sort_order:Number(f.target.value)}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),l&&a.jsx("p",{className:"text-sm text-red-600",children:l}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:s?"Speichern":"Anlegen"}),s&&a.jsx("button",{type:"button",onClick:d,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}const DP=e=>e==null?"":new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(e),LP={ok:"bg-green-100 text-green-700 dark:bg-green-900/40 dark:text-green-300",pending:"bg-amber-100 text-amber-700 dark:bg-amber-900/40 dark:text-amber-300",error:"bg-red-100 text-red-700 dark:bg-red-900/40 dark:text-red-300"};function BP(){const{packageId:e}=$n(),[t,n]=g.useState([]),[r,s]=g.useState(""),[i,l]=g.useState(""),[o,u]=g.useState(""),[c,d]=g.useState(!1),h=()=>M.get(`/packages/${e}/products`).then(n);g.useEffect(()=>{h()},[e]);const m=async y=>{y.preventDefault(),u(""),d(!0);try{await M.post("/products",{package_id:Number(e),source_url:r,name_override:i||null}),s(""),l(""),h()}catch(k){u(k.message)}finally{d(!1)}},f=async y=>{d(!0);try{await M.post(`/products/${y}/refresh-price`,{}),h()}finally{d(!1)}},b=async y=>{confirm("Produkt wirklich entfernen?")&&(await M.delete(`/products/${y}`),h())};return a.jsxs("div",{children:[a.jsx("p",{className:"mb-2 text-sm",children:a.jsx(O,{to:"/admin/packages",className:"text-brand-600 hover:underline",children:"← Zurück zu den Paketen"})}),a.jsx("h1",{className:"mb-4 text-xl font-bold text-neutral-900 dark:text-white",children:"Produkte im Paket"}),a.jsxs("form",{onSubmit:m,className:"mb-6 flex flex-wrap items-end gap-3 rounded-xl border border-neutral-200 bg-white p-4 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsxs("div",{className:"flex-1 min-w-[240px]",children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"audio4cars.de Produkt-URL *"}),a.jsx("input",{required:!0,type:"url",placeholder:"https://www.audio4cars.de/produkt/...",value:r,onChange:y=>s(y.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{className:"w-56",children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Name überschreiben (optional)"}),a.jsx("input",{value:i,onChange:y=>l(y.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsx("button",{disabled:c,type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:"Hinzufügen"})]}),o&&a.jsx("p",{className:"mb-4 text-sm text-red-600",children:o}),a.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:a.jsxs("table",{className:"w-full text-left text-sm",children:[a.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-4 py-2",children:"Produkt"}),a.jsx("th",{className:"px-4 py-2",children:"Preis"}),a.jsx("th",{className:"px-4 py-2",children:"Status"}),a.jsx("th",{className:"px-4 py-2",children:"Zuletzt aktualisiert"}),a.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),a.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[t.map(y=>a.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[a.jsxs("td",{className:"px-4 py-2",children:[a.jsx("a",{href:y.source_url,target:"_blank",rel:"noreferrer",className:"font-medium text-neutral-800 hover:underline dark:text-neutral-100",children:y.name_override||y.scraped_name||y.source_url}),y.scrape_status==="error"&&a.jsx("p",{className:"text-xs text-red-500",children:y.scrape_error})]}),a.jsx("td",{className:"px-4 py-2",children:DP(y.scraped_price)}),a.jsx("td",{className:"px-4 py-2",children:a.jsx("span",{className:`rounded-full px-2 py-0.5 text-xs font-medium ${LP[y.scrape_status]}`,children:y.scrape_status})}),a.jsx("td",{className:"px-4 py-2 text-neutral-500 dark:text-neutral-400",children:y.price_updated_at?new Date(y.price_updated_at.replace(" ","T")).toLocaleString("de-DE"):""}),a.jsxs("td",{className:"px-4 py-2 text-right",children:[a.jsx("button",{disabled:c,onClick:()=>f(y.id),className:"mr-3 text-brand-600 hover:underline disabled:opacity-60",children:"Preis aktualisieren"}),a.jsx("button",{onClick:()=>b(y.id),className:"text-red-600 hover:underline",children:"Entfernen"})]})]},y.id)),t.length===0&&a.jsx("tr",{children:a.jsx("td",{colSpan:5,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Produkte im Paket."})})]})]})})]})}const zP=e=>new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(e),Rf={name:"",description:"",price:0,sort_order:0};function IP(){const{packageId:e}=$n(),[t,n]=g.useState([]),[r,s]=g.useState(Rf),[i,l]=g.useState(null),[o,u]=g.useState(""),c=()=>M.get(`/packages/${e}/upgrades`).then(n);g.useEffect(()=>{c()},[e]);const d=b=>{l(b.id),s({name:b.name,description:b.description||"",price:b.price,sort_order:b.sort_order})},h=()=>{l(null),s(Rf)},m=async b=>{b.preventDefault(),u("");const y={...r,package_id:Number(e),price:Number(r.price)};try{i?await M.put(`/package-upgrades/${i}`,y):await M.post("/package-upgrades",y),h(),c()}catch(k){u(k.message)}},f=async b=>{confirm("Upgrade wirklich löschen?")&&(await M.delete(`/package-upgrades/${b}`),c())};return a.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[a.jsxs("div",{className:"lg:col-span-2",children:[a.jsx("p",{className:"mb-2 text-sm",children:a.jsx(O,{to:"/admin/packages",className:"text-brand-600 hover:underline",children:"← Zurück zu den Paketen"})}),a.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Optionale Upgrades"}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Diese Upgrades erscheinen nicht in der öffentlichen Paketübersicht, sondern erst als Auswahl im Kontaktformular."}),a.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:a.jsxs("table",{className:"w-full text-left text-sm",children:[a.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-4 py-2",children:"Name"}),a.jsx("th",{className:"px-4 py-2",children:"Preis"}),a.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),a.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[t.map(b=>a.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[a.jsxs("td",{className:"px-4 py-2",children:[a.jsx("p",{className:"font-medium text-neutral-800 dark:text-neutral-100",children:b.name}),b.description&&a.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:b.description})]}),a.jsx("td",{className:"px-4 py-2",children:zP(b.price)}),a.jsxs("td",{className:"px-4 py-2 text-right",children:[a.jsx("button",{onClick:()=>d(b),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),a.jsx("button",{onClick:()=>f(b.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},b.id)),t.length===0&&a.jsx("tr",{children:a.jsx("td",{colSpan:3,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Upgrades hinterlegt."})})]})]})})]}),a.jsxs("form",{onSubmit:m,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:i?"Upgrade bearbeiten":"Neues Upgrade"}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Name *"}),a.jsx("input",{required:!0,value:r.name,onChange:b=>s({...r,name:b.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Beschreibung"}),a.jsx("textarea",{rows:2,value:r.description,onChange:b=>s({...r,description:b.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Preis (€) *"}),a.jsx("input",{required:!0,type:"number",step:"0.01",min:"0",value:r.price,onChange:b=>s({...r,price:b.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),a.jsx("input",{type:"number",value:r.sort_order,onChange:b=>s({...r,sort_order:Number(b.target.value)}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),o&&a.jsx("p",{className:"text-sm text-red-600",children:o}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:i?"Speichern":"Anlegen"}),i&&a.jsx("button",{type:"button",onClick:h,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}const RP=e=>new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(e),FP={new:"Neu",in_progress:"In Bearbeitung",done:"Erledigt"},VP={new:"bg-brand-100 text-brand-700 dark:bg-brand-900/40 dark:text-brand-300",in_progress:"bg-amber-100 text-amber-700 dark:bg-amber-900/40 dark:text-amber-300",done:"bg-green-100 text-green-700 dark:bg-green-900/40 dark:text-green-300"},OP=()=>a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",className:"h-4 w-4",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 7h16M9 7V5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2m3 0-.8 12.1a1 1 0 0 1-1 .9H7.8a1 1 0 0 1-1-.9L6 7h12ZM10 11v6M14 11v6"})});function UP(){const{hasPermission:e}=Mt(),[t,n]=g.useState([]),[r,s]=g.useState("all"),i=()=>M.get("/contact").then(n);g.useEffect(()=>{i()},[]);const l=async(h,m)=>{await M.patch(`/contact/${h}`,{status:m}),i()},o=async h=>{confirm("Diese Kontaktanfrage wirklich unwiderruflich löschen?")&&(await M.delete(`/contact/${h}`),i())},u=g.useMemo(()=>({all:t.length,new:t.filter(h=>h.status==="new").length,in_progress:t.filter(h=>h.status==="in_progress").length,done:t.filter(h=>h.status==="done").length}),[t]),c=r==="all"?t:t.filter(h=>h.status===r),d=[{value:"all",label:"Alle"},{value:"new",label:"Neu"},{value:"in_progress",label:"In Bearbeitung"},{value:"done",label:"Erledigt"}];return a.jsxs("div",{children:[a.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Kontaktanfragen"}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Alle Anfragen deiner Kunden. Wähle oben einen Reiter, um nur bestimmte Anfragen zu sehen."}),a.jsx("div",{className:"mb-5 flex flex-wrap gap-2",children:d.map(h=>a.jsxs("button",{onClick:()=>s(h.value),className:`rounded-full px-4 py-1.5 text-sm font-medium transition ${r===h.value?"bg-brand-500 text-white":"bg-neutral-100 text-neutral-600 hover:bg-neutral-200 dark:bg-neutral-800 dark:text-neutral-300 dark:hover:bg-neutral-700"}`,children:[h.label," (",u[h.value],")"]},h.value))}),a.jsxs("div",{className:"space-y-3",children:[c.map(h=>{var m;return a.jsxs("div",{className:"rounded-xl border border-neutral-200 bg-white p-4 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsxs("div",{className:"mb-2 flex flex-wrap items-start justify-between gap-2",children:[a.jsxs("div",{children:[a.jsxs("p",{className:"font-semibold text-neutral-800 dark:text-neutral-100",children:[h.name," · ",h.email,h.phone?` · ${h.phone}`:""]}),h.vin&&a.jsxs("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:["FIN: ",a.jsx("span",{className:"font-mono",children:h.vin})]}),a.jsx("p",{className:"text-xs text-neutral-400",children:new Date(h.created_at.replace(" ","T")).toLocaleString("de-DE")})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("select",{value:h.status,onChange:f=>l(h.id,f.target.value),className:`rounded-full border-0 px-3 py-1 text-xs font-medium ${VP[h.status]}`,children:Object.entries(FP).map(([f,b])=>a.jsx("option",{value:f,children:b},f))}),e("contact.delete")&&a.jsx("button",{onClick:()=>o(h.id),"aria-label":"Anfrage löschen",title:"Anfrage löschen",className:"rounded-md p-1.5 text-neutral-400 hover:bg-red-50 hover:text-red-600 dark:hover:bg-red-900/20",children:a.jsx(OP,{})})]})]}),(h.brand_name||h.model_name||h.package_name||h.product_name)&&a.jsx("p",{className:"mb-2 text-sm text-neutral-500 dark:text-neutral-400",children:[h.brand_name,h.model_name,h.package_name,h.product_name].filter(Boolean).join(" · ")}),((m=h.selected_upgrades)==null?void 0:m.length)>0&&a.jsxs("div",{className:"mb-2 rounded-md bg-brand-50 p-2 text-sm text-brand-800 dark:bg-brand-900/20 dark:text-brand-200",children:[a.jsx("p",{className:"font-semibold",children:"Gewünschte Upgrades:"}),a.jsx("ul",{className:"list-disc pl-5",children:h.selected_upgrades.map(f=>a.jsxs("li",{children:[f.name," ",RP(f.price)]},f.id))})]}),h.message&&a.jsx("p",{className:"text-sm text-neutral-700 dark:text-neutral-300",children:h.message})]},h.id)}),c.length===0&&a.jsx("p",{className:"text-neutral-400",children:r==="all"?"Noch keine Kontaktanfragen eingegangen.":"Keine Anfragen mit diesem Status."})]})]})}var ua={},WP=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},mb={},Qe={};let Nd;const HP=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Qe.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};Qe.getSymbolTotalCodewords=function(t){return HP[t]};Qe.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};Qe.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');Nd=t};Qe.isKanjiModeEnabled=function(){return typeof Nd<"u"};Qe.toSJIS=function(t){return Nd(t)};var gl={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,s){if(e.isValid(r))return r;try{return t(r)}catch{return s}}})(gl);function fb(){this.buffer=[],this.length=0}fb.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var $P=fb;function ca(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}ca.prototype.set=function(e,t,n,r){const s=e*this.size+t;this.data[s]=n,r&&(this.reservedBit[s]=!0)};ca.prototype.get=function(e,t){return this.data[e*this.size+t]};ca.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n};ca.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var GP=ca,pb={};(function(e){const t=Qe.getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const s=Math.floor(r/7)+2,i=t(r),l=i===145?26:Math.ceil((i-13)/(2*s-2))*2,o=[i-7];for(let u=1;u<s-1;u++)o[u]=o[u-1]-l;return o.push(6),o.reverse()},e.getPositions=function(r){const s=[],i=e.getRowColCoords(r),l=i.length;for(let o=0;o<l;o++)for(let u=0;u<l;u++)o===0&&u===0||o===0&&u===l-1||o===l-1&&u===0||s.push([i[o],i[u]]);return s}})(pb);var gb={};const KP=Qe.getSymbolSize,Ff=7;gb.getPositions=function(t){const n=KP(t);return[[0,0],[n-Ff,0],[0,n-Ff]]};var xb={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(s){return s!=null&&s!==""&&!isNaN(s)&&s>=0&&s<=7},e.from=function(s){return e.isValid(s)?parseInt(s,10):void 0},e.getPenaltyN1=function(s){const i=s.size;let l=0,o=0,u=0,c=null,d=null;for(let h=0;h<i;h++){o=u=0,c=d=null;for(let m=0;m<i;m++){let f=s.get(h,m);f===c?o++:(o>=5&&(l+=t.N1+(o-5)),c=f,o=1),f=s.get(m,h),f===d?u++:(u>=5&&(l+=t.N1+(u-5)),d=f,u=1)}o>=5&&(l+=t.N1+(o-5)),u>=5&&(l+=t.N1+(u-5))}return l},e.getPenaltyN2=function(s){const i=s.size;let l=0;for(let o=0;o<i-1;o++)for(let u=0;u<i-1;u++){const c=s.get(o,u)+s.get(o,u+1)+s.get(o+1,u)+s.get(o+1,u+1);(c===4||c===0)&&l++}return l*t.N2},e.getPenaltyN3=function(s){const i=s.size;let l=0,o=0,u=0;for(let c=0;c<i;c++){o=u=0;for(let d=0;d<i;d++)o=o<<1&2047|s.get(c,d),d>=10&&(o===1488||o===93)&&l++,u=u<<1&2047|s.get(d,c),d>=10&&(u===1488||u===93)&&l++}return l*t.N3},e.getPenaltyN4=function(s){let i=0;const l=s.data.length;for(let u=0;u<l;u++)i+=s.data[u];return Math.abs(Math.ceil(i*100/l/5)-10)*t.N4};function n(r,s,i){switch(r){case e.Patterns.PATTERN000:return(s+i)%2===0;case e.Patterns.PATTERN001:return s%2===0;case e.Patterns.PATTERN010:return i%3===0;case e.Patterns.PATTERN011:return(s+i)%3===0;case e.Patterns.PATTERN100:return(Math.floor(s/2)+Math.floor(i/3))%2===0;case e.Patterns.PATTERN101:return s*i%2+s*i%3===0;case e.Patterns.PATTERN110:return(s*i%2+s*i%3)%2===0;case e.Patterns.PATTERN111:return(s*i%3+(s+i)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(s,i){const l=i.size;for(let o=0;o<l;o++)for(let u=0;u<l;u++)i.isReserved(u,o)||i.xor(u,o,n(s,u,o))},e.getBestMask=function(s,i){const l=Object.keys(e.Patterns).length;let o=0,u=1/0;for(let c=0;c<l;c++){i(c),e.applyMask(c,s);const d=e.getPenaltyN1(s)+e.getPenaltyN2(s)+e.getPenaltyN3(s)+e.getPenaltyN4(s);e.applyMask(c,s),d<u&&(u=d,o=c)}return o}})(xb);var xl={};const an=gl,Ia=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],Ra=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];xl.getBlocksCount=function(t,n){switch(n){case an.L:return Ia[(t-1)*4+0];case an.M:return Ia[(t-1)*4+1];case an.Q:return Ia[(t-1)*4+2];case an.H:return Ia[(t-1)*4+3];default:return}};xl.getTotalCodewordsCount=function(t,n){switch(n){case an.L:return Ra[(t-1)*4+0];case an.M:return Ra[(t-1)*4+1];case an.Q:return Ra[(t-1)*4+2];case an.H:return Ra[(t-1)*4+3];default:return}};var bb={},bl={};const js=new Uint8Array(512),Oi=new Uint8Array(256);(function(){let t=1;for(let n=0;n<255;n++)js[n]=t,Oi[t]=n,t<<=1,t&256&&(t^=285);for(let n=255;n<512;n++)js[n]=js[n-255]})();bl.log=function(t){if(t<1)throw new Error("log("+t+")");return Oi[t]};bl.exp=function(t){return js[t]};bl.mul=function(t,n){return t===0||n===0?0:js[Oi[t]+Oi[n]]};(function(e){const t=bl;e.mul=function(r,s){const i=new Uint8Array(r.length+s.length-1);for(let l=0;l<r.length;l++)for(let o=0;o<s.length;o++)i[l+o]^=t.mul(r[l],s[o]);return i},e.mod=function(r,s){let i=new Uint8Array(r);for(;i.length-s.length>=0;){const l=i[0];for(let u=0;u<s.length;u++)i[u]^=t.mul(s[u],l);let o=0;for(;o<i.length&&i[o]===0;)o++;i=i.slice(o)}return i},e.generateECPolynomial=function(r){let s=new Uint8Array([1]);for(let i=0;i<r;i++)s=e.mul(s,new Uint8Array([1,t.exp(i)]));return s}})(bb);const vb=bb;function Sd(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}Sd.prototype.initialize=function(t){this.degree=t,this.genPoly=vb.generateECPolynomial(this.degree)};Sd.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(t.length+this.degree);n.set(t);const r=vb.mod(n,this.genPoly),s=this.degree-r.length;if(s>0){const i=new Uint8Array(this.degree);return i.set(r,s),i}return r};var qP=Sd,yb={},Nn={},Cd={};Cd.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var _t={};const kb="[0-9]+",YP="[A-Z $%*+\\-./:]+";let Ys="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Ys=Ys.replace(/u/g,"\\u");const XP="(?:(?![A-Z0-9 $%*+\\-./:]|"+Ys+`)(?:.|[\r
]))+`;_t.KANJI=new RegExp(Ys,"g");_t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");_t.BYTE=new RegExp(XP,"g");_t.NUMERIC=new RegExp(kb,"g");_t.ALPHANUMERIC=new RegExp(YP,"g");const ZP=new RegExp("^"+Ys+"$"),QP=new RegExp("^"+kb+"$"),JP=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");_t.testKanji=function(t){return ZP.test(t)};_t.testNumeric=function(t){return QP.test(t)};_t.testAlphanumeric=function(t){return JP.test(t)};(function(e){const t=Cd,n=_t;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(i,l){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!t.isValid(l))throw new Error("Invalid version: "+l);return l>=1&&l<10?i.ccBits[0]:l<27?i.ccBits[1]:i.ccBits[2]},e.getBestModeForData=function(i){return n.testNumeric(i)?e.NUMERIC:n.testAlphanumeric(i)?e.ALPHANUMERIC:n.testKanji(i)?e.KANJI:e.BYTE},e.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},e.isValid=function(i){return i&&i.bit&&i.ccBits};function r(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+s)}}e.from=function(i,l){if(e.isValid(i))return i;try{return r(i)}catch{return l}}})(Nn);(function(e){const t=Qe,n=xl,r=gl,s=Nn,i=Cd,l=7973,o=t.getBCHDigit(l);function u(m,f,b){for(let y=1;y<=40;y++)if(f<=e.getCapacity(y,b,m))return y}function c(m,f){return s.getCharCountIndicator(m,f)+4}function d(m,f){let b=0;return m.forEach(function(y){const k=c(y.mode,f);b+=k+y.getBitsLength()}),b}function h(m,f){for(let b=1;b<=40;b++)if(d(m,b)<=e.getCapacity(b,f,s.MIXED))return b}e.from=function(f,b){return i.isValid(f)?parseInt(f,10):b},e.getCapacity=function(f,b,y){if(!i.isValid(f))throw new Error("Invalid QR Code version");typeof y>"u"&&(y=s.BYTE);const k=t.getSymbolTotalCodewords(f),x=n.getTotalCodewordsCount(f,b),p=(k-x)*8;if(y===s.MIXED)return p;const v=p-c(y,f);switch(y){case s.NUMERIC:return Math.floor(v/10*3);case s.ALPHANUMERIC:return Math.floor(v/11*2);case s.KANJI:return Math.floor(v/13);case s.BYTE:default:return Math.floor(v/8)}},e.getBestVersionForData=function(f,b){let y;const k=r.from(b,r.M);if(Array.isArray(f)){if(f.length>1)return h(f,k);if(f.length===0)return 1;y=f[0]}else y=f;return u(y.mode,y.getLength(),k)},e.getEncodedBits=function(f){if(!i.isValid(f)||f<7)throw new Error("Invalid QR Code version");let b=f<<12;for(;t.getBCHDigit(b)-o>=0;)b^=l<<t.getBCHDigit(b)-o;return f<<12|b}})(yb);var wb={};const Yu=Qe,jb=1335,e4=21522,Vf=Yu.getBCHDigit(jb);wb.getEncodedBits=function(t,n){const r=t.bit<<3|n;let s=r<<10;for(;Yu.getBCHDigit(s)-Vf>=0;)s^=jb<<Yu.getBCHDigit(s)-Vf;return(r<<10|s)^e4};var Nb={};const t4=Nn;function Tr(e){this.mode=t4.NUMERIC,this.data=e.toString()}Tr.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};Tr.prototype.getLength=function(){return this.data.length};Tr.prototype.getBitsLength=function(){return Tr.getBitsLength(this.data.length)};Tr.prototype.write=function(t){let n,r,s;for(n=0;n+3<=this.data.length;n+=3)r=this.data.substr(n,3),s=parseInt(r,10),t.put(s,10);const i=this.data.length-n;i>0&&(r=this.data.substr(n),s=parseInt(r,10),t.put(s,i*3+1))};var n4=Tr;const r4=Nn,xo=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Ar(e){this.mode=r4.ALPHANUMERIC,this.data=e}Ar.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};Ar.prototype.getLength=function(){return this.data.length};Ar.prototype.getBitsLength=function(){return Ar.getBitsLength(this.data.length)};Ar.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let r=xo.indexOf(this.data[n])*45;r+=xo.indexOf(this.data[n+1]),t.put(r,11)}this.data.length%2&&t.put(xo.indexOf(this.data[n]),6)};var s4=Ar;const a4=Nn;function Mr(e){this.mode=a4.BYTE,typeof e=="string"?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}Mr.getBitsLength=function(t){return t*8};Mr.prototype.getLength=function(){return this.data.length};Mr.prototype.getBitsLength=function(){return Mr.getBitsLength(this.data.length)};Mr.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)};var i4=Mr;const l4=Nn,o4=Qe;function _r(e){this.mode=l4.KANJI,this.data=e}_r.getBitsLength=function(t){return t*13};_r.prototype.getLength=function(){return this.data.length};_r.prototype.getBitsLength=function(){return _r.getBitsLength(this.data.length)};_r.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=o4.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}};var u4=_r,Sb={exports:{}};(function(e){var t={single_source_shortest_paths:function(n,r,s){var i={},l={};l[r]=0;var o=t.PriorityQueue.make();o.push(r,0);for(var u,c,d,h,m,f,b,y,k;!o.empty();){u=o.pop(),c=u.value,h=u.cost,m=n[c]||{};for(d in m)m.hasOwnProperty(d)&&(f=m[d],b=h+f,y=l[d],k=typeof l[d]>"u",(k||y>b)&&(l[d]=b,o.push(d,b),i[d]=c))}if(typeof s<"u"&&typeof l[s]>"u"){var x=["Could not find a path from ",r," to ",s,"."].join("");throw new Error(x)}return i},extract_shortest_path_from_predecessor_list:function(n,r){for(var s=[],i=r;i;)s.push(i),n[i],i=n[i];return s.reverse(),s},find_path:function(n,r,s){var i=t.single_source_shortest_paths(n,r,s);return t.extract_shortest_path_from_predecessor_list(i,s)},PriorityQueue:{make:function(n){var r=t.PriorityQueue,s={},i;n=n||{};for(i in r)r.hasOwnProperty(i)&&(s[i]=r[i]);return s.queue=[],s.sorter=n.sorter||r.default_sorter,s},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var s={value:n,cost:r};this.queue.push(s),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Sb);var c4=Sb.exports;(function(e){const t=Nn,n=n4,r=s4,s=i4,i=u4,l=_t,o=Qe,u=c4;function c(x){return unescape(encodeURIComponent(x)).length}function d(x,p,v){const w=[];let j;for(;(j=x.exec(v))!==null;)w.push({data:j[0],index:j.index,mode:p,length:j[0].length});return w}function h(x){const p=d(l.NUMERIC,t.NUMERIC,x),v=d(l.ALPHANUMERIC,t.ALPHANUMERIC,x);let w,j;return o.isKanjiModeEnabled()?(w=d(l.BYTE,t.BYTE,x),j=d(l.KANJI,t.KANJI,x)):(w=d(l.BYTE_KANJI,t.BYTE,x),j=[]),p.concat(v,w,j).sort(function(C,N){return C.index-N.index}).map(function(C){return{data:C.data,mode:C.mode,length:C.length}})}function m(x,p){switch(p){case t.NUMERIC:return n.getBitsLength(x);case t.ALPHANUMERIC:return r.getBitsLength(x);case t.KANJI:return i.getBitsLength(x);case t.BYTE:return s.getBitsLength(x)}}function f(x){return x.reduce(function(p,v){const w=p.length-1>=0?p[p.length-1]:null;return w&&w.mode===v.mode?(p[p.length-1].data+=v.data,p):(p.push(v),p)},[])}function b(x){const p=[];for(let v=0;v<x.length;v++){const w=x[v];switch(w.mode){case t.NUMERIC:p.push([w,{data:w.data,mode:t.ALPHANUMERIC,length:w.length},{data:w.data,mode:t.BYTE,length:w.length}]);break;case t.ALPHANUMERIC:p.push([w,{data:w.data,mode:t.BYTE,length:w.length}]);break;case t.KANJI:p.push([w,{data:w.data,mode:t.BYTE,length:c(w.data)}]);break;case t.BYTE:p.push([{data:w.data,mode:t.BYTE,length:c(w.data)}])}}return p}function y(x,p){const v={},w={start:{}};let j=["start"];for(let P=0;P<x.length;P++){const C=x[P],N=[];for(let S=0;S<C.length;S++){const E=C[S],T=""+P+S;N.push(T),v[T]={node:E,lastCount:0},w[T]={};for(let I=0;I<j.length;I++){const U=j[I];v[U]&&v[U].node.mode===E.mode?(w[U][T]=m(v[U].lastCount+E.length,E.mode)-m(v[U].lastCount,E.mode),v[U].lastCount+=E.length):(v[U]&&(v[U].lastCount=E.length),w[U][T]=m(E.length,E.mode)+4+t.getCharCountIndicator(E.mode,p))}}j=N}for(let P=0;P<j.length;P++)w[j[P]].end=0;return{map:w,table:v}}function k(x,p){let v;const w=t.getBestModeForData(x);if(v=t.from(p,w),v!==t.BYTE&&v.bit<w.bit)throw new Error('"'+x+'" cannot be encoded with mode '+t.toString(v)+`.
Suggested mode is: `+t.toString(w));switch(v===t.KANJI&&!o.isKanjiModeEnabled()&&(v=t.BYTE),v){case t.NUMERIC:return new n(x);case t.ALPHANUMERIC:return new r(x);case t.KANJI:return new i(x);case t.BYTE:return new s(x)}}e.fromArray=function(p){return p.reduce(function(v,w){return typeof w=="string"?v.push(k(w,null)):w.data&&v.push(k(w.data,w.mode)),v},[])},e.fromString=function(p,v){const w=h(p,o.isKanjiModeEnabled()),j=b(w),P=y(j,v),C=u.find_path(P.map,"start","end"),N=[];for(let S=1;S<C.length-1;S++)N.push(P.table[C[S]].node);return e.fromArray(f(N))},e.rawSplit=function(p){return e.fromArray(h(p,o.isKanjiModeEnabled()))}})(Nb);const vl=Qe,bo=gl,d4=$P,h4=GP,m4=pb,f4=gb,Xu=xb,Zu=xl,p4=qP,Ui=yb,g4=wb,x4=Nn,vo=Nb;function b4(e,t){const n=e.size,r=f4.getPositions(t);for(let s=0;s<r.length;s++){const i=r[s][0],l=r[s][1];for(let o=-1;o<=7;o++)if(!(i+o<=-1||n<=i+o))for(let u=-1;u<=7;u++)l+u<=-1||n<=l+u||(o>=0&&o<=6&&(u===0||u===6)||u>=0&&u<=6&&(o===0||o===6)||o>=2&&o<=4&&u>=2&&u<=4?e.set(i+o,l+u,!0,!0):e.set(i+o,l+u,!1,!0))}}function v4(e){const t=e.size;for(let n=8;n<t-8;n++){const r=n%2===0;e.set(n,6,r,!0),e.set(6,n,r,!0)}}function y4(e,t){const n=m4.getPositions(t);for(let r=0;r<n.length;r++){const s=n[r][0],i=n[r][1];for(let l=-2;l<=2;l++)for(let o=-2;o<=2;o++)l===-2||l===2||o===-2||o===2||l===0&&o===0?e.set(s+l,i+o,!0,!0):e.set(s+l,i+o,!1,!0)}}function k4(e,t){const n=e.size,r=Ui.getEncodedBits(t);let s,i,l;for(let o=0;o<18;o++)s=Math.floor(o/3),i=o%3+n-8-3,l=(r>>o&1)===1,e.set(s,i,l,!0),e.set(i,s,l,!0)}function yo(e,t,n){const r=e.size,s=g4.getEncodedBits(t,n);let i,l;for(i=0;i<15;i++)l=(s>>i&1)===1,i<6?e.set(i,8,l,!0):i<8?e.set(i+1,8,l,!0):e.set(r-15+i,8,l,!0),i<8?e.set(8,r-i-1,l,!0):i<9?e.set(8,15-i-1+1,l,!0):e.set(8,15-i-1,l,!0);e.set(r-8,8,1,!0)}function w4(e,t){const n=e.size;let r=-1,s=n-1,i=7,l=0;for(let o=n-1;o>0;o-=2)for(o===6&&o--;;){for(let u=0;u<2;u++)if(!e.isReserved(s,o-u)){let c=!1;l<t.length&&(c=(t[l]>>>i&1)===1),e.set(s,o-u,c),i--,i===-1&&(l++,i=7)}if(s+=r,s<0||n<=s){s-=r,r=-r;break}}}function j4(e,t,n){const r=new d4;n.forEach(function(u){r.put(u.mode.bit,4),r.put(u.getLength(),x4.getCharCountIndicator(u.mode,e)),u.write(r)});const s=vl.getSymbolTotalCodewords(e),i=Zu.getTotalCodewordsCount(e,t),l=(s-i)*8;for(r.getLengthInBits()+4<=l&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);const o=(l-r.getLengthInBits())/8;for(let u=0;u<o;u++)r.put(u%2?17:236,8);return N4(r,e,t)}function N4(e,t,n){const r=vl.getSymbolTotalCodewords(t),s=Zu.getTotalCodewordsCount(t,n),i=r-s,l=Zu.getBlocksCount(t,n),o=r%l,u=l-o,c=Math.floor(r/l),d=Math.floor(i/l),h=d+1,m=c-d,f=new p4(m);let b=0;const y=new Array(l),k=new Array(l);let x=0;const p=new Uint8Array(e.buffer);for(let C=0;C<l;C++){const N=C<u?d:h;y[C]=p.slice(b,b+N),k[C]=f.encode(y[C]),b+=N,x=Math.max(x,N)}const v=new Uint8Array(r);let w=0,j,P;for(j=0;j<x;j++)for(P=0;P<l;P++)j<y[P].length&&(v[w++]=y[P][j]);for(j=0;j<m;j++)for(P=0;P<l;P++)v[w++]=k[P][j];return v}function S4(e,t,n,r){let s;if(Array.isArray(e))s=vo.fromArray(e);else if(typeof e=="string"){let c=t;if(!c){const d=vo.rawSplit(e);c=Ui.getBestVersionForData(d,n)}s=vo.fromString(e,c||40)}else throw new Error("Invalid data");const i=Ui.getBestVersionForData(s,n);if(!i)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=i;else if(t<i)throw new Error(`
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: `+i+`.
`);const l=j4(t,n,s),o=vl.getSymbolSize(t),u=new h4(o);return b4(u,t),v4(u),y4(u,t),yo(u,n,0),t>=7&&k4(u,t),w4(u,l),isNaN(r)&&(r=Xu.getBestMask(u,yo.bind(null,u,n))),Xu.applyMask(r,u),yo(u,n,r),{modules:u,version:t,errorCorrectionLevel:n,maskPattern:r,segments:s}}mb.create=function(t,n){if(typeof t>"u"||t==="")throw new Error("No input text");let r=bo.M,s,i;return typeof n<"u"&&(r=bo.from(n.errorCorrectionLevel,bo.M),s=Ui.from(n.version),i=Xu.from(n.maskPattern),n.toSJISFunc&&vl.setToSJISFunction(n.toSJISFunc)),S4(t,s,r,i)};var Cb={},Pd={};(function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(i){return[i,i]}))),r.length===6&&r.push("F","F");const s=parseInt(r.join(""),16);return{r:s>>24&255,g:s>>16&255,b:s>>8&255,a:s&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const s=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,i=r.width&&r.width>=21?r.width:void 0,l=r.scale||4;return{width:i,scale:i?4:l,margin:s,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,s){return s.width&&s.width>=r+s.margin*2?s.width/(r+s.margin*2):s.scale},e.getImageWidth=function(r,s){const i=e.getScale(r,s);return Math.floor((r+s.margin*2)*i)},e.qrToImageData=function(r,s,i){const l=s.modules.size,o=s.modules.data,u=e.getScale(l,i),c=Math.floor((l+i.margin*2)*u),d=i.margin*u,h=[i.color.light,i.color.dark];for(let m=0;m<c;m++)for(let f=0;f<c;f++){let b=(m*c+f)*4,y=i.color.light;if(m>=d&&f>=d&&m<c-d&&f<c-d){const k=Math.floor((m-d)/u),x=Math.floor((f-d)/u);y=h[o[k*l+x]?1:0]}r[b++]=y.r,r[b++]=y.g,r[b++]=y.b,r[b]=y.a}}})(Pd);(function(e){const t=Pd;function n(s,i,l){s.clearRect(0,0,i.width,i.height),i.style||(i.style={}),i.height=l,i.width=l,i.style.height=l+"px",i.style.width=l+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(i,l,o){let u=o,c=l;typeof u>"u"&&(!l||!l.getContext)&&(u=l,l=void 0),l||(c=r()),u=t.getOptions(u);const d=t.getImageWidth(i.modules.size,u),h=c.getContext("2d"),m=h.createImageData(d,d);return t.qrToImageData(m.data,i,u),n(h,c,d),h.putImageData(m,0,0),c},e.renderToDataURL=function(i,l,o){let u=o;typeof u>"u"&&(!l||!l.getContext)&&(u=l,l=void 0),u||(u={});const c=e.render(i,l,u),d=u.type||"image/png",h=u.rendererOpts||{};return c.toDataURL(d,h.quality)}})(Cb);var Pb={};const C4=Pd;function Of(e,t){const n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function ko(e,t,n){let r=e+t;return typeof n<"u"&&(r+=" "+n),r}function P4(e,t,n){let r="",s=0,i=!1,l=0;for(let o=0;o<e.length;o++){const u=Math.floor(o%t),c=Math.floor(o/t);!u&&!i&&(i=!0),e[o]?(l++,o>0&&u>0&&e[o-1]||(r+=i?ko("M",u+n,.5+c+n):ko("m",s,0),s=0,i=!1),u+1<t&&e[o+1]||(r+=ko("h",l),l=0)):s++}return r}Pb.render=function(t,n,r){const s=C4.getOptions(n),i=t.modules.size,l=t.modules.data,o=i+s.margin*2,u=s.color.light.a?"<path "+Of(s.color.light,"fill")+' d="M0 0h'+o+"v"+o+'H0z"/>':"",c="<path "+Of(s.color.dark,"stroke")+' d="'+P4(l,i,s.margin)+'"/>',d='viewBox="0 0 '+o+" "+o+'"',m='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+d+' shape-rendering="crispEdges">'+u+c+`</svg>
`;return typeof r=="function"&&r(null,m),m};const E4=WP,Qu=mb,Eb=Cb,T4=Pb;function Ed(e,t,n,r,s){const i=[].slice.call(arguments,1),l=i.length,o=typeof i[l-1]=="function";if(!o&&!E4())throw new Error("Callback required as last argument");if(o){if(l<2)throw new Error("Too few arguments provided");l===2?(s=n,n=t,t=r=void 0):l===3&&(t.getContext&&typeof s>"u"?(s=r,r=void 0):(s=r,r=n,n=t,t=void 0))}else{if(l<1)throw new Error("Too few arguments provided");return l===1?(n=t,t=r=void 0):l===2&&!t.getContext&&(r=n,n=t,t=void 0),new Promise(function(u,c){try{const d=Qu.create(n,r);u(e(d,t,r))}catch(d){c(d)}})}try{const u=Qu.create(n,r);s(null,e(u,t,r))}catch(u){s(u)}}ua.create=Qu.create;ua.toCanvas=Ed.bind(null,Eb.render);ua.toDataURL=Ed.bind(null,Eb.renderToDataURL);ua.toString=Ed.bind(null,function(e,t,n){return T4.render(e,n)});const Uf={current_password:"",new_password:"",new_password_confirmation:"",two_factor_code:""};function A4(){const{user:e,refreshUser:t}=Mt(),[n,r]=g.useState("idle"),[s,i]=g.useState(""),[l,o]=g.useState(""),[u,c]=g.useState(""),[d,h]=g.useState(""),[m,f]=g.useState([]),[b,y]=g.useState(""),[k,x]=g.useState(!1),[p,v]=g.useState(Uf),[w,j]=g.useState(""),[P,C]=g.useState(""),[N,S]=g.useState(!1),E=async R=>{if(R.preventDefault(),j(""),C(""),p.new_password!==p.new_password_confirmation){j("Die neuen Passwörter stimmen nicht überein");return}S(!0);try{await M.post("/auth/change-password",p),v(Uf),C("Passwort erfolgreich geändert.")}catch(X){j(X.message)}finally{S(!1)}},T=async()=>{y(""),x(!0);try{const R=await M.get("/auth/2fa/setup");o(R.secret),i(await ua.toDataURL(R.otpauth_url)),c(""),r("setup")}catch(R){y(R.message)}finally{x(!1)}},I=async R=>{R.preventDefault(),y(""),x(!0);try{const X=await M.post("/auth/2fa/enable",{code:u});f(X.recovery_codes),r("recovery-codes"),await t()}catch(X){y(X.message)}finally{x(!1)}},U=()=>{r("idle"),f([]),h("")},Y=async R=>{R.preventDefault(),y(""),x(!0);try{await M.post("/auth/2fa/disable",{password:d}),h(""),r("idle"),await t()}catch(X){y(X.message)}finally{x(!1)}},J=async R=>{R.preventDefault(),y(""),x(!0);try{const X=await M.post("/auth/2fa/recovery-codes",{password:d});f(X.recovery_codes),r("recovery-codes")}catch(X){y(X.message)}finally{x(!1)}};return a.jsxs("div",{className:"max-w-xl",children:[a.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Mein Konto"}),a.jsxs("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:["Angemeldet als ",a.jsx("strong",{children:e==null?void 0:e.username}),e!=null&&e.is_super_admin?" (Super-Admin)":"","."]}),a.jsxs("div",{className:"mb-6 rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Passwort ändern"}),a.jsxs("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:["Vergib ein neues Passwort für dein Konto.",(e==null?void 0:e.two_factor_enabled)&&" Da 2FA aktiv ist, musst du die Änderung zusätzlich mit deinem Code bestätigen."]}),a.jsxs("form",{onSubmit:E,children:[a.jsxs("div",{className:"mb-4",children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Aktuelles Passwort"}),a.jsx("input",{type:"password",value:p.current_password,onChange:R=>v({...p,current_password:R.target.value}),required:!0,className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{className:"mb-4",children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Neues Passwort"}),a.jsx("input",{type:"password",value:p.new_password,onChange:R=>v({...p,new_password:R.target.value}),required:!0,minLength:8,className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{className:"mb-4",children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Neues Passwort wiederholen"}),a.jsx("input",{type:"password",value:p.new_password_confirmation,onChange:R=>v({...p,new_password_confirmation:R.target.value}),required:!0,minLength:8,className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),(e==null?void 0:e.two_factor_enabled)&&a.jsxs("div",{className:"mb-4",children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"2FA-Code zur Bestätigung"}),a.jsx("input",{value:p.two_factor_code,onChange:R=>v({...p,two_factor_code:R.target.value}),required:!0,inputMode:"numeric",placeholder:"123456 oder Wiederherstellungscode",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),w&&a.jsx("p",{className:"mb-4 text-sm text-red-600",children:w}),P&&a.jsx("p",{className:"mb-4 text-sm text-green-600 dark:text-green-400",children:P}),a.jsx("button",{type:"submit",disabled:N,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:N?"Wird geändert…":"Passwort ändern"})]})]}),a.jsxs("div",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Zwei-Faktor-Authentifizierung"}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Schützt dein Konto zusätzlich mit einem Code aus der Google Authenticator App."}),n==="idle"&&a.jsxs(a.Fragment,{children:[a.jsxs("p",{className:"mb-4 text-sm",children:["Status:"," ",e!=null&&e.two_factor_enabled?a.jsx("span",{className:"font-semibold text-green-600 dark:text-green-400",children:"Aktiv"}):a.jsx("span",{className:"font-semibold text-neutral-500 dark:text-neutral-400",children:"Nicht aktiv"})]}),e!=null&&e.two_factor_enabled?a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsx("button",{onClick:()=>{r("regenerate"),y("")},className:"rounded-md border border-neutral-300 px-4 py-2 text-sm font-medium hover:bg-neutral-50 dark:border-neutral-700 dark:hover:bg-neutral-800",children:"Neue Wiederherstellungscodes erzeugen"}),a.jsx("button",{onClick:()=>{r("disable"),y("")},className:"rounded-md border border-red-300 px-4 py-2 text-sm font-medium text-red-600 hover:bg-red-50 dark:border-red-900 dark:hover:bg-red-900/20",children:"2FA deaktivieren"})]}):a.jsx("button",{onClick:T,disabled:k,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:"2FA aktivieren"})]}),n==="setup"&&a.jsxs("form",{onSubmit:I,children:[a.jsxs("ol",{className:"mb-4 list-decimal space-y-2 pl-5 text-sm text-neutral-700 dark:text-neutral-300",children:[a.jsx("li",{children:"Öffne die Google Authenticator App (oder eine kompatible App)."}),a.jsx("li",{children:"Scanne den folgenden QR-Code:"})]}),a.jsx("div",{className:"mb-4 flex justify-center",children:s&&a.jsx("img",{src:s,alt:"QR-Code für Zwei-Faktor-Authentifizierung",className:"h-48 w-48 rounded-lg border border-neutral-200 dark:border-neutral-700"})}),a.jsxs("p",{className:"mb-4 text-center text-xs text-neutral-500 dark:text-neutral-400",children:["Geht das Scannen nicht? Gib diesen Code manuell ein: ",a.jsx("br",{}),a.jsx("code",{className:"mt-1 inline-block rounded bg-neutral-100 px-2 py-1 font-mono tracking-wider dark:bg-neutral-800",children:l})]}),a.jsxs("div",{className:"mb-4",children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Bestätigungscode aus der App"}),a.jsx("input",{value:u,onChange:R=>c(R.target.value),required:!0,autoFocus:!0,inputMode:"numeric",placeholder:"123456",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-center text-lg tracking-widest dark:border-neutral-700 dark:bg-neutral-900"})]}),b&&a.jsx("p",{className:"mb-4 text-sm text-red-600",children:b}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("button",{type:"submit",disabled:k,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:"Bestätigen & aktivieren"}),a.jsx("button",{type:"button",onClick:()=>r("idle"),className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]}),n==="recovery-codes"&&a.jsxs("div",{children:[a.jsx("p",{className:"mb-3 text-sm font-semibold text-neutral-900 dark:text-white",children:"Wiederherstellungscodes jetzt sicher speichern!"}),a.jsx("p",{className:"mb-3 text-sm text-neutral-500 dark:text-neutral-400",children:"Jeder Code funktioniert einmalig, falls du keinen Zugriff mehr auf die Authenticator-App hast. Diese Codes werden nur jetzt angezeigt."}),a.jsx("div",{className:"mb-4 grid grid-cols-2 gap-2 rounded-md bg-neutral-100 p-4 font-mono text-sm dark:bg-neutral-800",children:m.map(R=>a.jsx("span",{children:R},R))}),a.jsx("button",{onClick:U,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:"Ich habe die Codes gespeichert"})]}),n==="disable"&&a.jsxs("form",{onSubmit:Y,children:[a.jsxs("div",{className:"mb-4",children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Passwort zur Bestätigung"}),a.jsx("input",{type:"password",value:d,onChange:R=>h(R.target.value),required:!0,autoFocus:!0,className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),b&&a.jsx("p",{className:"mb-4 text-sm text-red-600",children:b}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("button",{type:"submit",disabled:k,className:"rounded-md bg-red-600 px-4 py-2 text-sm font-semibold text-white hover:bg-red-700 disabled:opacity-60",children:"2FA jetzt deaktivieren"}),a.jsx("button",{type:"button",onClick:()=>{r("idle"),h("")},className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]}),n==="regenerate"&&a.jsxs("form",{onSubmit:J,children:[a.jsx("p",{className:"mb-3 text-sm text-neutral-500 dark:text-neutral-400",children:"Die bisherigen Wiederherstellungscodes werden ungültig."}),a.jsxs("div",{className:"mb-4",children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Passwort zur Bestätigung"}),a.jsx("input",{type:"password",value:d,onChange:R=>h(R.target.value),required:!0,autoFocus:!0,className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),b&&a.jsx("p",{className:"mb-4 text-sm text-red-600",children:b}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("button",{type:"submit",disabled:k,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:"Neue Codes erzeugen"}),a.jsx("button",{type:"button",onClick:()=>{r("idle"),h("")},className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})]})}const Wf={username:"",password:"",is_super_admin:!1,permissions:[],group_ids:[]};function M4(){const{user:e,hasPermission:t}=Mt(),[n,r]=g.useState([]),[s,i]=g.useState([]),[l,o]=g.useState([]),[u,c]=g.useState(Wf),[d,h]=g.useState(null),[m,f]=g.useState(""),b=()=>{M.get("/admin-users").then(r),M.get("/permissions/catalog").then(i),(t("permission_groups.manage")||t("users.manage"))&&M.get("/permission-groups").then(o)};g.useEffect(b,[]);const y=j=>{h(j.id),c({username:j.username,password:"",is_super_admin:j.is_super_admin,permissions:j.permissions,group_ids:j.groups.map(P=>P.id)})},k=()=>{h(null),c(Wf)},x=j=>{c(P=>({...P,permissions:P.permissions.includes(j)?P.permissions.filter(C=>C!==j):[...P.permissions,j]}))},p=j=>{c(P=>({...P,group_ids:P.group_ids.includes(j)?P.group_ids.filter(C=>C!==j):[...P.group_ids,j]}))},v=async j=>{j.preventDefault(),f("");try{if(d)await M.put(`/admin-users/${d}`,u);else{if(u.password.length<8){f("Passwort muss mindestens 8 Zeichen lang sein");return}await M.post("/admin-users",u)}k(),b()}catch(P){f(P.message)}},w=async j=>{if(confirm("Diesen Benutzer wirklich löschen?"))try{await M.delete(`/admin-users/${j}`),b()}catch(P){alert(P.message)}};return a.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[a.jsxs("div",{className:"lg:col-span-2",children:[a.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Benutzer"}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Jeder Mitarbeiter bekommt ein eigenes Konto mit genau den Rechten, die er braucht."}),a.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:a.jsxs("table",{className:"w-full text-left text-sm",children:[a.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-4 py-2",children:"Benutzername"}),a.jsx("th",{className:"px-4 py-2",children:"Rolle"}),a.jsx("th",{className:"px-4 py-2",children:"Berechtigungsgruppen"}),a.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),a.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[n.map(j=>a.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[a.jsxs("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:[j.username,j.id===(e==null?void 0:e.id)&&a.jsx("span",{className:"ml-1 text-xs text-neutral-400",children:"(du)"})]}),a.jsx("td",{className:"px-4 py-2",children:j.is_super_admin?a.jsx("span",{className:"rounded-full bg-brand-100 px-2 py-0.5 text-xs font-medium text-brand-700 dark:bg-brand-900/40 dark:text-brand-300",children:"Super-Admin"}):a.jsxs("span",{className:"text-neutral-500 dark:text-neutral-400",children:[j.permissions.length," Einzelrechte"]})}),a.jsx("td",{className:"px-4 py-2",children:a.jsxs("div",{className:"flex flex-wrap gap-1",children:[j.groups.map(P=>a.jsx("span",{className:"rounded-full bg-neutral-100 px-2 py-0.5 text-xs text-neutral-600 dark:bg-neutral-800 dark:text-neutral-300",children:P.name},P.id)),j.groups.length===0&&""]})}),a.jsxs("td",{className:"px-4 py-2 text-right",children:[a.jsx("button",{onClick:()=>y(j),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),j.id!==(e==null?void 0:e.id)&&a.jsx("button",{onClick:()=>w(j.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},j.id)),n.length===0&&a.jsx("tr",{children:a.jsx("td",{colSpan:4,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Benutzer angelegt."})})]})]})})]}),a.jsxs("form",{onSubmit:v,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:d?"Benutzer bearbeiten":"Neuer Benutzer"}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Benutzername *"}),a.jsx("input",{required:!0,value:u.username,onChange:j=>c({...u,username:j.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsxs("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:["Passwort ",d?"(leer lassen = unverändert)":"*"]}),a.jsx("input",{type:"password",required:!d,value:u.password,onChange:j=>c({...u,password:j.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),(e==null?void 0:e.is_super_admin)&&a.jsxs("label",{className:"flex items-center gap-2 text-sm text-neutral-700 dark:text-neutral-300",children:[a.jsx("input",{type:"checkbox",checked:u.is_super_admin,onChange:j=>c({...u,is_super_admin:j.target.checked}),className:"h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),"Super-Admin (hat automatisch alle Rechte)"]}),!u.is_super_admin&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{children:[a.jsx("p",{className:"mb-1 text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Einzelne Berechtigungen"}),a.jsx("div",{className:"space-y-1.5 rounded-md border border-neutral-200 p-3 dark:border-neutral-700",children:s.map(j=>a.jsxs("label",{className:"flex items-center gap-2 text-sm text-neutral-700 dark:text-neutral-300",children:[a.jsx("input",{type:"checkbox",checked:u.permissions.includes(j.key),onChange:()=>x(j.key),className:"h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),j.label]},j.key))})]}),a.jsxs("div",{children:[a.jsx("p",{className:"mb-1 text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Berechtigungsgruppen"}),a.jsxs("div",{className:"space-y-1.5 rounded-md border border-neutral-200 p-3 dark:border-neutral-700",children:[l.map(j=>a.jsxs("label",{className:"flex items-center gap-2 text-sm text-neutral-700 dark:text-neutral-300",children:[a.jsx("input",{type:"checkbox",checked:u.group_ids.includes(j.id),onChange:()=>p(j.id),className:"h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),j.name]},j.id)),l.length===0&&a.jsx("p",{className:"text-sm text-neutral-400",children:"Noch keine Berechtigungsgruppen angelegt."})]})]})]}),m&&a.jsx("p",{className:"text-sm text-red-600",children:m}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:d?"Speichern":"Anlegen"}),d&&a.jsx("button",{type:"button",onClick:k,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}const Hf={name:"",description:"",permissions:[]};function _4(){const[e,t]=g.useState([]),[n,r]=g.useState([]),[s,i]=g.useState(Hf),[l,o]=g.useState(null),[u,c]=g.useState(""),d=()=>{M.get("/permission-groups").then(t),M.get("/permissions/catalog").then(r)};g.useEffect(d,[]);const h=k=>{o(k.id),i({name:k.name,description:k.description||"",permissions:k.permissions})},m=()=>{o(null),i(Hf)},f=k=>{i(x=>({...x,permissions:x.permissions.includes(k)?x.permissions.filter(p=>p!==k):[...x.permissions,k]}))},b=async k=>{k.preventDefault(),c("");try{l?await M.put(`/permission-groups/${l}`,s):await M.post("/permission-groups",s),m(),d()}catch(x){c(x.message)}},y=async k=>{confirm("Diese Berechtigungsgruppe wirklich löschen? Benutzer behalten ihre sonstigen Rechte.")&&(await M.delete(`/permission-groups/${k}`),d())};return a.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[a.jsxs("div",{className:"lg:col-span-2",children:[a.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Berechtigungsgruppen"}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:'Fasse mehrere Berechtigungen zu einer Gruppe zusammen (z. B. „Werkstatt"), die du dann bequem einem oder mehreren Benutzern zuweisen kannst.'}),a.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:a.jsxs("table",{className:"w-full text-left text-sm",children:[a.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-4 py-2",children:"Name"}),a.jsx("th",{className:"px-4 py-2",children:"Berechtigungen"}),a.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),a.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[e.map(k=>a.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[a.jsxs("td",{className:"px-4 py-2",children:[a.jsx("p",{className:"font-medium text-neutral-800 dark:text-neutral-100",children:k.name}),k.description&&a.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:k.description})]}),a.jsxs("td",{className:"px-4 py-2 text-neutral-500 dark:text-neutral-400",children:[k.permissions.length," von ",n.length]}),a.jsxs("td",{className:"px-4 py-2 text-right",children:[a.jsx("button",{onClick:()=>h(k),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),a.jsx("button",{onClick:()=>y(k.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},k.id)),e.length===0&&a.jsx("tr",{children:a.jsx("td",{colSpan:3,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Berechtigungsgruppen angelegt."})})]})]})})]}),a.jsxs("form",{onSubmit:b,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:l?"Gruppe bearbeiten":"Neue Gruppe"}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Name *"}),a.jsx("input",{required:!0,value:s.name,onChange:k=>i({...s,name:k.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Beschreibung"}),a.jsx("textarea",{rows:2,value:s.description,onChange:k=>i({...s,description:k.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsx("p",{className:"mb-1 text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Berechtigungen"}),a.jsx("div",{className:"space-y-1.5 rounded-md border border-neutral-200 p-3 dark:border-neutral-700",children:n.map(k=>a.jsxs("label",{className:"flex items-center gap-2 text-sm text-neutral-700 dark:text-neutral-300",children:[a.jsx("input",{type:"checkbox",checked:s.permissions.includes(k.key),onChange:()=>f(k.key),className:"h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),k.label]},k.key))})]}),u&&a.jsx("p",{className:"text-sm text-red-600",children:u}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:l?"Speichern":"Anlegen"}),l&&a.jsx("button",{type:"button",onClick:m,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}const D4=[{to:"/admin/settings/website",label:"Website"},{to:"/admin/settings/email",label:"E-Mail"},{to:"/admin/settings/database",label:"Datenbank"},{to:"/admin/settings/export-import",label:"Export & Import"},{to:"/admin/settings/maintenance",label:"Wartungsmodus"},{to:"/admin/settings/reset",label:"Zurücksetzen"}];function L4(){const e=({isActive:t})=>`rounded-md px-4 py-2 text-sm font-medium transition ${t?"bg-brand-500 text-white":"text-neutral-600 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-neutral-800"}`;return a.jsxs("div",{children:[a.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Einstellungen"}),a.jsx("p",{className:"mb-5 text-sm text-neutral-500 dark:text-neutral-400",children:"Werkzeuge rund um Datenbank, Server-Umzug und Zurücksetzen dieser Seite."}),a.jsx("nav",{className:"mb-6 flex flex-wrap gap-2",children:D4.map(t=>a.jsx(ig,{to:t.to,className:e,children:t.label},t.to))}),a.jsx(ol,{})]})}const B4={phone:"",whatsapp:"",contact_email:"",hero_image_path:"",ga_measurement_id:"",package_card_theme:"graphite",package_card_layout:"strip"},z4=[{value:"graphite",label:"Graphite Green",description:"Graphit über Bronze/Silber/Gold/Platin bis zur Onyx-Krönung."},{value:"deep-blue",label:"Deep Blue Luxury",description:"Kühles Blau, das sich über Grün zu Gold erwärmt."},{value:"warm-bronze",label:"Warm Bronze",description:"Durchgehend warmes Kupfer/Bronze/Amber bis zum Gold."}],I4=[{value:"grid",label:"Raster",description:"Breite Kacheln, die responsiv in mehrere Zeilen umbrechen."},{value:"strip",label:"Scroll-Band",description:"Schmale, hochkant Kacheln in einer horizontal scrollbaren Reihe."},{value:"coverflow",label:"3D-Coverflow",description:"Kacheln drehen sich beim Wischen räumlich die mittlere steht im Fokus."}];function R4(){const[e,t]=g.useState(B4),[n,r]=g.useState(!0),[s,i]=g.useState(!1),[l,o]=g.useState(!1),[u,c]=g.useState(""),[d,h]=g.useState(""),[m,f]=g.useState(""),[b,y]=g.useState(!1),[k,x]=g.useState(!1),[p,v]=g.useState(""),[w,j]=g.useState(!1);g.useEffect(()=>{M.get("/site-settings").then(S=>t({phone:S.phone||"",whatsapp:S.whatsapp||"",contact_email:S.contact_email||"",hero_image_path:S.hero_image_path||"",ga_measurement_id:S.ga_measurement_id||"",package_card_theme:S.package_card_theme||"graphite",package_card_layout:S.package_card_layout||"strip"})).finally(()=>r(!1)),M.get("/settings/analytics").then(S=>{h(S.ga_property_id||""),y(S.has_credentials)})},[]);const P=async()=>{x(!0),v(""),j(!1);try{const S=await M.post("/settings/analytics",{ga_property_id:d,service_account_json:m});y(S.has_credentials),f(""),j(!0)}catch(S){v(S.message)}finally{x(!1)}},C=(S,E)=>{t(T=>({...T,[S]:E})),o(!1)},N=async S=>{S.preventDefault(),i(!0),c(""),o(!1);try{await M.post("/site-settings",e),o(!0)}catch(E){c(E.message)}finally{i(!1)}};return n?a.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}):a.jsxs("form",{onSubmit:N,className:"max-w-2xl space-y-6",children:[a.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Startseiten-Bild"}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Das große Hero-Bild ganz oben auf der Startseite. Ohne eigenes Bild wird das Standardbild verwendet."}),a.jsx(pl,{value:e.hero_image_path,onChange:S=>C("hero_image_path",S),label:"Bild"})]}),a.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Kontaktdaten"}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Wird im Header, Footer und auf der Kontaktseite angezeigt."}),a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Telefon"}),a.jsx("input",{value:e.phone,onChange:S=>C("phone",S.target.value),placeholder:"09373 20 62 390",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"WhatsApp Business Nummer"}),a.jsx("input",{value:e.whatsapp,onChange:S=>C("whatsapp",S.target.value),placeholder:"z. B. 09373 20 62 390",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),a.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:"Leer lassen, um den WhatsApp-Link im Header auszublenden."})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"E-Mail"}),a.jsx("input",{type:"email",value:e.contact_email,onChange:S=>C("contact_email",S.target.value),placeholder:"info@hifi-planet-amorbach.de",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]})]})]}),a.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Paket-Kachel-Design"}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Bestimmt die Farbgebung der Paket-Stufen auf jeder Fahrzeug-Modell-Seite (von der günstigsten bis zur teuersten Option)."}),a.jsx("div",{className:"grid gap-3 sm:grid-cols-3",children:z4.map(S=>a.jsxs("label",{className:`cursor-pointer rounded-lg border p-3 text-sm transition ${e.package_card_theme===S.value?"border-brand-500 ring-2 ring-brand-500/40":"border-neutral-300 hover:border-neutral-400 dark:border-neutral-700 dark:hover:border-neutral-600"}`,children:[a.jsx("input",{type:"radio",name:"package_card_theme",value:S.value,checked:e.package_card_theme===S.value,onChange:E=>C("package_card_theme",E.target.value),className:"sr-only"}),a.jsx("p",{className:"font-semibold text-neutral-900 dark:text-white",children:S.label}),a.jsx("p",{className:"mt-1 text-xs text-neutral-500 dark:text-neutral-400",children:S.description})]},S.value))})]}),a.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Kachel-Layout"}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Bestimmt, wie die Paket-Stufen auf jeder Fahrzeug-Modell-Seite angeordnet werden."}),a.jsx("div",{className:"grid gap-3 sm:grid-cols-3",children:I4.map(S=>a.jsxs("label",{className:`cursor-pointer rounded-lg border p-3 text-sm transition ${e.package_card_layout===S.value?"border-brand-500 ring-2 ring-brand-500/40":"border-neutral-300 hover:border-neutral-400 dark:border-neutral-700 dark:hover:border-neutral-600"}`,children:[a.jsx("input",{type:"radio",name:"package_card_layout",value:S.value,checked:e.package_card_layout===S.value,onChange:E=>C("package_card_layout",E.target.value),className:"sr-only"}),a.jsx("p",{className:"font-semibold text-neutral-900 dark:text-white",children:S.label}),a.jsx("p",{className:"mt-1 text-xs text-neutral-500 dark:text-neutral-400",children:S.description})]},S.value))})]}),a.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Google Analytics"}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Wird erst geladen, nachdem ein Besucher der Statistik-Kategorie im Cookie-Banner zugestimmt hat. Leer lassen, um Google Analytics zu deaktivieren."}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Measurement-ID"}),a.jsx("input",{value:e.ga_measurement_id,onChange:S=>C("ga_measurement_id",S.target.value),placeholder:"G-XXXXXXXXXX",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{className:"mt-5 border-t border-neutral-200 pt-5 dark:border-neutral-800",children:[a.jsx("h3",{className:"mb-1 text-sm font-semibold text-neutral-900 dark:text-white",children:"Dashboard-Anbindung (optional)"}),a.jsx("p",{className:"mb-3 text-sm text-neutral-500 dark:text-neutral-400",children:"Zeigt Besucherzahlen direkt in deinem Admin-Dashboard an. Braucht ein Google-Cloud-Service-Account mit Lesezugriff auf diese GA4-Property."}),a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Property-ID"}),a.jsx("input",{value:d,onChange:S=>{h(S.target.value),j(!1)},placeholder:"z. B. 123456789",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),a.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:"Nicht die Measurement-ID (G-...) - zu finden unter GA4 → Verwaltung → Property-Details."})]}),a.jsxs("div",{children:[a.jsxs("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:["Service-Account-JSON-Schlüssel ",b?"(leer lassen = unverändert)":""]}),a.jsx("textarea",{rows:4,value:m,onChange:S=>{f(S.target.value),j(!1)},placeholder:b?'{ "type": "service_account", ... } (bereits hinterlegt)':'{ "type": "service_account", ... }',className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 font-mono text-xs dark:border-neutral-700 dark:bg-neutral-900"})]})]}),p&&a.jsx("p",{className:"mt-2 text-sm text-red-600",children:p}),w&&a.jsx("p",{className:"mt-2 text-sm text-green-600 dark:text-green-400",children:"Gespeichert."}),a.jsx("button",{type:"button",onClick:P,disabled:k,className:"mt-3 rounded-md border border-neutral-300 px-4 py-2 text-sm font-medium hover:bg-neutral-50 disabled:opacity-50 dark:border-neutral-700 dark:hover:bg-neutral-800",children:k?"Speichere…":"Dashboard-Anbindung speichern"})]})]}),u&&a.jsx("p",{className:"text-sm text-red-600",children:u}),l&&a.jsx("p",{className:"text-sm text-green-600 dark:text-green-400",children:"Gespeichert."}),a.jsx("button",{type:"submit",disabled:s,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:s?"Speichere…":"Speichern"})]})}const F4={mail_host:"",mail_port:587,mail_username:"",mail_password:"",mail_encryption:"tls",mail_from_email:"",mail_from_name:"",mail_notify_email:"",mail_customer_subject:"",mail_customer_body:"",mail_owner_subject:"",mail_owner_body:""},V4=[["{{name}}","Name des Kunden"],["{{email}}","E-Mail des Kunden"],["{{phone}}","Telefonnummer"],["{{vin}}","Fahrgestellnummer (FIN)"],["{{message}}","Nachricht des Kunden"],["{{brand}}","Marke"],["{{model}}","Modell"],["{{package}}","Paket"],["{{product}}","Produkt"],["{{upgrades}}","Gewählte Upgrades"]];function $f(){return a.jsx("div",{className:"mt-3 flex flex-wrap gap-1.5",children:V4.map(([e,t])=>a.jsx("span",{title:t,className:"rounded-md bg-neutral-100 px-2 py-1 font-mono text-xs text-neutral-600 dark:bg-neutral-800 dark:text-neutral-300",children:e},e))})}function O4(){const[e,t]=g.useState(F4),[n,r]=g.useState(!1),[s,i]=g.useState(!0),[l,o]=g.useState(!1),[u,c]=g.useState(!1),[d,h]=g.useState(""),[m,f]=g.useState(!1),[b,y]=g.useState(!1),[k,x]=g.useState(""),[p,v]=g.useState(""),[w,j]=g.useState(""),[P,C]=g.useState(null);g.useEffect(()=>{M.get("/settings/mail").then(T=>{t({...T,mail_password:""}),r(T.has_password)}).finally(()=>i(!1))},[]);const N=(T,I)=>{t(U=>({...U,[T]:I})),f(!1)},S=async T=>{T.preventDefault(),c(!0),h(""),f(!1);try{const I=await M.post("/settings/mail",e);t({...I,mail_password:""}),r(I.has_password),f(!0)}catch(I){h(I.message)}finally{c(!1)}},E=async()=>{y(!0),x(""),v(""),j(""),C(null);try{const T=await M.post("/settings/mail/test",e);v(`Testmail gesendet an ${T.sent_to}. Der Server hat die Mail angenommen - prüfe auch den Spam-Ordner, das ist noch keine Garantie für die Zustellung.`),j(T.warning||""),C(T.smtp_log||null)}catch(T){x(T.message)}finally{y(!1)}};return s?a.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}):a.jsxs("form",{onSubmit:S,className:"max-w-2xl space-y-6",children:[a.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"SMTP-Server"}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Zugangsdaten deines Mail-Postfachs oder Transactional-Mail-Anbieters. Solange kein Server eingetragen ist, werden keine E-Mails verschickt (Kontaktanfragen werden trotzdem in der Datenbank gespeichert)."}),a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-[1fr_120px]",children:[a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Server (Host)"}),a.jsx("input",{value:e.mail_host,onChange:T=>N("mail_host",T.target.value),placeholder:"smtp.beispiel.de",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Port"}),a.jsx("input",{type:"number",value:e.mail_port,onChange:T=>N("mail_port",T.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Verschlüsselung"}),a.jsxs("select",{value:e.mail_encryption,onChange:T=>N("mail_encryption",T.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:[a.jsx("option",{value:"tls",children:"STARTTLS"}),a.jsx("option",{value:"ssl",children:"SSL"}),a.jsx("option",{value:"none",children:"Keine"})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Benutzername"}),a.jsx("input",{value:e.mail_username,onChange:T=>N("mail_username",T.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsxs("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:["Passwort ",n?"(leer lassen = unverändert)":""]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("input",{type:l?"text":"password",value:e.mail_password,onChange:T=>N("mail_password",T.target.value),placeholder:n?"••••••••":"",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),a.jsx("button",{type:"button",onClick:()=>o(T=>!T),className:"shrink-0 rounded-md border border-neutral-300 px-3 text-sm dark:border-neutral-700",children:l?"Verbergen":"Anzeigen"})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Absender-E-Mail"}),a.jsx("input",{type:"email",value:e.mail_from_email,onChange:T=>N("mail_from_email",T.target.value),placeholder:"info@hifi-planet-amorbach.de",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Absender-Name"}),a.jsx("input",{value:e.mail_from_name,onChange:T=>N("mail_from_name",T.target.value),placeholder:"HifiPlanet",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]})]}),a.jsxs("div",{className:"mt-4 border-t border-neutral-200 pt-4 dark:border-neutral-800",children:[k&&a.jsx("p",{className:"mb-2 whitespace-pre-wrap text-sm text-red-600",children:k}),p&&a.jsx("p",{className:"mb-2 text-sm text-green-600 dark:text-green-400",children:p}),w&&a.jsx("p",{className:"mb-2 rounded-md bg-amber-50 p-2 text-sm text-amber-800 dark:bg-amber-900/20 dark:text-amber-300",children:w}),a.jsx("button",{type:"button",onClick:E,disabled:b,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm font-medium hover:bg-neutral-50 disabled:opacity-50 dark:border-neutral-700 dark:hover:bg-neutral-800",children:b?"Sende Testmail…":"Verbindung testen"}),P&&P.length>0&&a.jsxs("details",{className:"mt-3",children:[a.jsx("summary",{className:"cursor-pointer text-xs text-neutral-500 dark:text-neutral-400",children:"SMTP-Protokoll anzeigen"}),a.jsx("pre",{className:"mt-2 max-h-64 overflow-auto rounded-md bg-neutral-900 p-3 text-xs text-neutral-200",children:P.join(`
`)})]})]})]}),a.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Empfänger"}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"An diese Adresse geht die Benachrichtigung bei jeder neuen Kontaktanfrage."}),a.jsx("input",{type:"email",value:e.mail_notify_email,onChange:T=>N("mail_notify_email",T.target.value),placeholder:"info@hifi-planet-amorbach.de",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"E-Mail an den Kunden (Bestätigung)"}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Geht automatisch an den Kunden, sobald er eine Kontaktanfrage abschickt."}),a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Betreff"}),a.jsx("input",{value:e.mail_customer_subject,onChange:T=>N("mail_customer_subject",T.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Text"}),a.jsx("textarea",{rows:8,value:e.mail_customer_body,onChange:T=>N("mail_customer_body",T.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]})]}),a.jsx($f,{})]}),a.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"E-Mail an den Shop (Benachrichtigung)"}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Geht an die oben eingestellte Empfänger-Adresse, sobald eine neue Kontaktanfrage eingeht."}),a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Betreff"}),a.jsx("input",{value:e.mail_owner_subject,onChange:T=>N("mail_owner_subject",T.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Text"}),a.jsx("textarea",{rows:8,value:e.mail_owner_body,onChange:T=>N("mail_owner_body",T.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]})]}),a.jsx($f,{})]}),d&&a.jsx("p",{className:"text-sm text-red-600",children:d}),m&&a.jsx("p",{className:"text-sm text-green-600 dark:text-green-400",children:"Gespeichert."}),a.jsx("button",{type:"submit",disabled:u,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:u?"Speichere…":"Speichern"})]})}function U4(){const[e,t]=g.useState({host:"",name:"",user:"",password:"",charset:"utf8mb4"}),[n,r]=g.useState(!1),[s,i]=g.useState(!0),[l,o]=g.useState(!1),[u,c]=g.useState(!1),[d,h]=g.useState(""),[m,f]=g.useState(!1),[b,y]=g.useState(null),[k,x]=g.useState(!0),[p,v]=g.useState(!1),[w,j]=g.useState(null),P=()=>{i(!0),M.get("/settings/database").then(E=>{t({...E.config,password:""}),r(E.has_password)}).finally(()=>i(!1))},C=()=>{x(!0),M.get("/settings/schema-check").then(y).catch(E=>y({ok:!1,error:E.message,tables:[]})).finally(()=>x(!1))};g.useEffect(()=>{P(),C()},[]);const N=async()=>{v(!0),j(null);try{const E=await M.post("/settings/schema-migrate",{});j(E.actions),y(E.report)}catch(E){j(["Fehler: "+E.message])}finally{v(!1)}},S=async E=>{E.preventDefault(),c(!0),h(""),f(!1);try{await M.post("/settings/database",e),f(!0),t(T=>({...T,password:""})),r(!0),C()}catch(T){h(T.message)}finally{c(!1)}};return a.jsxs("div",{className:"max-w-2xl space-y-6",children:[a.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Datenbank-Zugangsdaten"}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Wichtig für einen Umzug auf einen anderen Server/Webspace: Trage hier die Zugangsdaten der dortigen Datenbank ein. Die Verbindung wird vor dem Speichern getestet, damit du dich nicht aussperrst."}),s?a.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}):a.jsxs("form",{onSubmit:S,className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Host *"}),a.jsx("input",{required:!0,value:e.host,onChange:E=>t({...e,host:E.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Datenbankname *"}),a.jsx("input",{required:!0,value:e.name,onChange:E=>t({...e,name:E.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Benutzer *"}),a.jsx("input",{required:!0,value:e.user,onChange:E=>t({...e,user:E.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a.jsxs("div",{children:[a.jsxs("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:["Passwort ",n?"(leer lassen = unverändert)":""]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("input",{type:l?"text":"password",value:e.password,onChange:E=>t({...e,password:E.target.value}),placeholder:n?"••••••••":"",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),a.jsx("button",{type:"button",onClick:()=>o(E=>!E),className:"shrink-0 rounded-md border border-neutral-300 px-3 text-sm dark:border-neutral-700",children:l?"Verbergen":"Anzeigen"})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Zeichensatz"}),a.jsx("input",{value:e.charset,onChange:E=>t({...e,charset:E.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),d&&a.jsx("p",{className:"text-sm text-red-600",children:d}),m&&a.jsx("p",{className:"text-sm text-green-600 dark:text-green-400",children:"Verbindung erfolgreich getestet und gespeichert."}),a.jsx("button",{type:"submit",disabled:u,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:u?"Teste & speichere…":"Verbindung testen & speichern"})]})]}),a.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsxs("div",{className:"mb-1 flex items-center justify-between gap-3",children:[a.jsx("h2",{className:"font-semibold text-neutral-900 dark:text-white",children:"Datenbankstruktur"}),!k&&b&&a.jsx("span",{className:`rounded-full px-3 py-1 text-xs font-semibold ${b.ok?"bg-green-100 text-green-700 dark:bg-green-900/40 dark:text-green-300":"bg-red-100 text-red-700 dark:bg-red-900/40 dark:text-red-300"}`,children:b.ok?"Datenbank OK":"Datenbank nicht OK"})]}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Prüft, ob diese Datenbank alle Tabellen und Spalten hat, die der aktuelle Code-Stand braucht wichtig, wenn deine Live-Version auf einem anderen Server einen älteren Stand hat."}),k&&a.jsx("p",{className:"text-sm text-neutral-400",children:"Prüfe…"}),!k&&b&&!b.ok&&a.jsx("ul",{className:"mb-4 space-y-1 rounded-md bg-red-50 p-3 text-sm text-red-800 dark:bg-red-900/20 dark:text-red-300",children:b.tables.filter(E=>!E.ok).map(E=>a.jsx("li",{children:E.exists?a.jsxs(a.Fragment,{children:["Tabelle ",a.jsx("code",{className:"font-mono",children:E.table}),": Spalte(n) fehlen ",E.missing_columns.join(", ")]}):a.jsxs(a.Fragment,{children:["Tabelle ",a.jsx("code",{className:"font-mono",children:E.table})," fehlt komplett"]})},E.table))}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsx("button",{onClick:C,disabled:k,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm font-medium hover:bg-neutral-50 disabled:opacity-50 dark:border-neutral-700 dark:hover:bg-neutral-800",children:"Erneut prüfen"}),b&&!b.ok&&a.jsx("button",{onClick:N,disabled:p,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:p?"Aktualisiere…":"Datenbankstruktur aktualisieren"})]}),w&&a.jsx("ul",{className:"mt-3 space-y-1 rounded-md bg-neutral-50 p-3 text-sm text-neutral-700 dark:bg-neutral-800 dark:text-neutral-300",children:w.map((E,T)=>a.jsx("li",{children:E},T))})]})]})}function W4(){const[e,t]=g.useState(null),[n,r]=g.useState(!1),[s,i]=g.useState(!1),[l,o]=g.useState(null),[u,c]=g.useState(""),d=async h=>{if(h.preventDefault(),!(!e||!n)){i(!0),c(""),o(null);try{const m=new FormData;m.append("file",e);const f=await M.post("/settings/import",m);o(f),t(null),r(!1),h.target.reset()}catch(m){c(m.message)}finally{i(!1)}}};return a.jsxs("div",{className:"max-w-2xl space-y-6",children:[a.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Daten exportieren"}),a.jsxs("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:["Lädt eine Datei mit allen Marken, Modellen, Paketen, Produkten, Upgrades, Leistungen, FAQs und der kompletten Bildergalerie (inkl. Bilder) herunter. Benutzerkonten und Kontaktanfragen sind bewusst",a.jsx("strong",{children:" nicht"})," enthalten."]}),a.jsx("a",{href:`${lg}/settings/export`,className:"inline-block rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:"Jetzt exportieren"})]}),a.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Daten importieren"}),a.jsxs("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:["Lädt eine zuvor exportierte Datei auf diesen Server. ",a.jsx("strong",{children:"Ersetzt dabei alle"})," aktuellen Marken, Modelle, Pakete, Produkte, Upgrades, Leistungen, FAQs und die komplette Bildergalerie auf diesem Server das kann nicht rückgängig gemacht werden. Kontaktanfragen und Benutzerkonten bleiben unangetastet."]}),a.jsxs("form",{onSubmit:d,className:"space-y-3",children:[a.jsx("input",{type:"file",accept:"application/json,.json",onChange:h=>{var m;return t(((m=h.target.files)==null?void 0:m[0])||null)},className:"text-sm"}),a.jsxs("label",{className:"flex items-start gap-2 text-sm text-neutral-700 dark:text-neutral-300",children:[a.jsx("input",{type:"checkbox",checked:n,onChange:h=>r(h.target.checked),className:"mt-0.5 h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),"Mir ist bewusst, dass dies alle aktuellen Marken, Modelle, Pakete, Produkte, Upgrades, Leistungen, FAQs und die Bildergalerie auf diesem Server unwiderruflich ersetzt."]}),a.jsx("button",{type:"submit",disabled:!e||!n||s,className:"rounded-md bg-red-600 px-4 py-2 text-sm font-semibold text-white hover:bg-red-700 disabled:opacity-50",children:s?"Importiere…":"Importieren"})]}),u&&a.jsx("p",{className:"mt-3 text-sm text-red-600",children:u}),l&&a.jsxs("div",{className:"mt-3 rounded-md bg-green-50 p-3 text-sm text-green-800 dark:bg-green-900/20 dark:text-green-300",children:[a.jsx("p",{className:"mb-1 font-semibold",children:"Import erfolgreich:"}),a.jsxs("ul",{className:"list-disc pl-5",children:[a.jsxs("li",{children:[l.counts.brands," Marken"]}),a.jsxs("li",{children:[l.counts.car_models," Modelle"]}),a.jsxs("li",{children:[l.counts.packages," Pakete"]}),a.jsxs("li",{children:[l.counts.package_products," Produkte"]}),a.jsxs("li",{children:[l.counts.package_upgrades," Upgrades"]}),a.jsxs("li",{children:[l.counts.services," Leistungen"]}),a.jsxs("li",{children:[l.counts.faqs," FAQs"]}),a.jsxs("li",{children:[l.counts.gallery_brands," Galerie-Marken"]}),a.jsxs("li",{children:[l.counts.gallery_projects," Galerie-Projekte"]}),a.jsxs("li",{children:[l.counts.gallery_photos," Galerie-Fotos"]}),a.jsxs("li",{children:[l.images_restored," Bilder wiederhergestellt"]})]})]})]})]})}const H4={global:{enabled:!1,message:""},services:{enabled:!1,message:""},vehicles:{enabled:!1,message:""}};function $4(){const[e,t]=g.useState(H4),[n,r]=g.useState(!0),[s,i]=g.useState(!1),[l,o]=g.useState(!1),[u,c]=g.useState("");g.useEffect(()=>{M.get("/maintenance").then(f=>{t({global:{enabled:f.global.enabled,message:f.global.message||""},services:{enabled:f.services.enabled,message:f.services.message||""},vehicles:{enabled:f.vehicles.enabled,message:f.vehicles.message||""}})}).finally(()=>r(!1))},[]);const d=(f,b,y)=>{t(k=>({...k,[f]:{...k[f],[b]:y}})),o(!1)},h=async f=>{f.preventDefault(),i(!0),c(""),o(!1);try{const b=await M.post("/maintenance",e);t({global:{enabled:b.global.enabled,message:b.global.message||""},services:{enabled:b.services.enabled,message:b.services.message||""},vehicles:{enabled:b.vehicles.enabled,message:b.vehicles.message||""}}),o(!0)}catch(b){c(b.message)}finally{i(!1)}},m=[{key:"global",title:"Gesamte Seite",hint:"Besucher sehen nur noch eine Wartungsmeldung egal welche Seite sie aufrufen. Das Admin-Panel bleibt für dich erreichbar."},{key:"services",title:"Nur Leistungen",hint:"Nur die Leistungen-Seite zeigt eine Wartungsmeldung, der Rest der Website funktioniert normal."},{key:"vehicles",title:"Nur Fahrzeugkatalog",hint:"Nur die Fahrzeugauswahl (Marke → Modell → Pakete) zeigt eine Wartungsmeldung, der Rest der Website funktioniert normal."}];return n?a.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}):a.jsxs("form",{onSubmit:h,className:"max-w-2xl space-y-6",children:[a.jsx("p",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:'Ist "Gesamte Seite" aktiv, gewinnt das immer die beiden anderen Schalter spielen dann keine Rolle mehr.'}),m.map(f=>a.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsxs("div",{className:"mb-1 flex items-center justify-between gap-3",children:[a.jsx("h2",{className:"font-semibold text-neutral-900 dark:text-white",children:f.title}),a.jsxs("label",{className:"relative inline-flex cursor-pointer items-center",children:[a.jsx("input",{type:"checkbox",checked:e[f.key].enabled,onChange:b=>d(f.key,"enabled",b.target.checked),className:"peer sr-only"}),a.jsx("div",{className:"h-6 w-11 rounded-full bg-neutral-200 transition peer-checked:bg-brand-500 dark:bg-neutral-700"}),a.jsx("div",{className:"absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition peer-checked:translate-x-5"})]})]}),a.jsx("p",{className:"mb-3 text-sm text-neutral-500 dark:text-neutral-400",children:f.hint}),a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Eigene Nachricht (optional)"}),a.jsx("textarea",{rows:2,value:e[f.key].message,onChange:b=>d(f.key,"message",b.target.value),placeholder:"z. B. Wir aktualisieren gerade unser Angebot. Schau bald wieder vorbei!",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]},f.key)),u&&a.jsx("p",{className:"text-sm text-red-600",children:u}),l&&a.jsx("p",{className:"text-sm text-green-600 dark:text-green-400",children:"Gespeichert."}),a.jsx("button",{type:"submit",disabled:s,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:s?"Speichere…":"Speichern"})]})}function G4(){const[e,t]=g.useState(!1),[n,r]=g.useState(""),[s,i]=g.useState(!1),[l,o]=g.useState(""),[u,c]=g.useState(!1),[d,h]=g.useState(""),[m,f]=g.useState(!1),[b,y]=g.useState(""),[k,x]=g.useState(!1),[p,v]=g.useState(""),w=async()=>{if(confirm("Alle aktuellen Leistungen werden gelöscht und durch die 8 Standard-Leistungen ersetzt. Fortfahren?")){t(!0),r("");try{const S=await M.post("/settings/reset-services",{});r(`${S.count} Standard-Leistungen wiederhergestellt.`)}catch(S){r("Fehler: "+S.message)}finally{t(!1)}}},j=async()=>{if(confirm("Alle aktuellen FAQ-Einträge werden gelöscht und durch die 6 Standard-Fragen ersetzt. Fortfahren?")){i(!0),o("");try{const S=await M.post("/settings/reset-faqs",{});o(`${S.count} Standard-Fragen wiederhergestellt.`)}catch(S){o("Fehler: "+S.message)}finally{i(!1)}}},P=async()=>{if(confirm("Die komplette Bildergalerie wird gelöscht und durch die 13 Marken/29 Projekte/207 Fotos der alten hifi-planet.de-Seite ersetzt. Fortfahren?")){c(!0),h("");try{const S=await M.post("/settings/reset-gallery",{});h(`${S.photos} Fotos wiederhergestellt.`)}catch(S){h("Fehler: "+S.message)}finally{c(!1)}}},C=async()=>{if(confirm("Alle Marken, Modelle, Pakete, Produkte und Upgrades werden unwiderruflich gelöscht. Leistungen und Kontaktanfragen bleiben erhalten. Fortfahren?")){f(!0),y("");try{const S=await M.post("/settings/reset-catalog",{});y(`Fahrzeugkatalog geleert (${S.brands_removed} Marken entfernt).`)}catch(S){y("Fehler: "+S.message)}finally{f(!1)}}},N=async()=>{if(confirm("WIRKLICH ALLES zurücksetzen? Marken, Modelle, Pakete, Produkte und Upgrades werden gelöscht, Leistungen, FAQs und die Bildergalerie auf Standard zurückgesetzt. Kontaktanfragen und Benutzerkonten bleiben erhalten. Das kann nicht rückgängig gemacht werden!")){x(!0),v("");try{const S=await M.post("/settings/reset-all",{});v(`Erledigt: ${S.brands_removed} Marken entfernt, ${S.services_reset} Standard-Leistungen, ${S.faqs_reset} Standard-Fragen und ${S.gallery_photos_reset} Galerie-Fotos wiederhergestellt.`)}catch(S){v("Fehler: "+S.message)}finally{x(!1)}}};return a.jsxs("div",{className:"max-w-2xl space-y-6",children:[a.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Nur Leistungen zurücksetzen"}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Löscht alle aktuellen Leistungen-Karten und stellt die 8 mitgelieferten Standard-Leistungen wieder her. Marken, Modelle und Pakete bleiben unangetastet."}),a.jsx("button",{onClick:w,disabled:e,className:"rounded-md border border-red-300 px-4 py-2 text-sm font-semibold text-red-600 hover:bg-red-50 disabled:opacity-50 dark:border-red-900 dark:hover:bg-red-900/20",children:e?"Setze zurück…":"Leistungen auf Standard zurücksetzen"}),n&&a.jsx("p",{className:"mt-3 text-sm text-neutral-600 dark:text-neutral-300",children:n})]}),a.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Nur FAQs zurücksetzen"}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Löscht alle aktuellen Fragen und stellt die 6 mitgelieferten Standard-Fragen (Deutsch & Englisch) wieder her. Leistungen, Marken, Modelle und Pakete bleiben unangetastet."}),a.jsx("button",{onClick:j,disabled:s,className:"rounded-md border border-red-300 px-4 py-2 text-sm font-semibold text-red-600 hover:bg-red-50 disabled:opacity-50 dark:border-red-900 dark:hover:bg-red-900/20",children:s?"Setze zurück…":"FAQs auf Standard zurücksetzen"}),l&&a.jsx("p",{className:"mt-3 text-sm text-neutral-600 dark:text-neutral-300",children:l})]}),a.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Nur Bildergalerie zurücksetzen"}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Löscht alle aktuellen Galerie-Marken, -Projekte und -Fotos und stellt die komplette Galerie der alten hifi-planet.de-Seite wieder her (13 Marken, 29 Projekte, 207 Fotos). Fahrzeugkatalog, Leistungen und FAQs bleiben unangetastet."}),a.jsx("button",{onClick:P,disabled:u,className:"rounded-md border border-red-300 px-4 py-2 text-sm font-semibold text-red-600 hover:bg-red-50 disabled:opacity-50 dark:border-red-900 dark:hover:bg-red-900/20",children:u?"Setze zurück…":"Galerie auf Standard zurücksetzen"}),d&&a.jsx("p",{className:"mt-3 text-sm text-neutral-600 dark:text-neutral-300",children:d})]}),a.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Nur Fahrzeugkatalog leeren"}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Löscht alle Marken, Modelle, Pakete, Produkte und Upgrades unwiderruflich. Leistungen, Kontaktanfragen und Benutzerkonten bleiben erhalten."}),a.jsx("button",{onClick:C,disabled:m,className:"rounded-md border border-red-300 px-4 py-2 text-sm font-semibold text-red-600 hover:bg-red-50 disabled:opacity-50 dark:border-red-900 dark:hover:bg-red-900/20",children:m?"Leere…":"Fahrzeugkatalog leeren"}),b&&a.jsx("p",{className:"mt-3 text-sm text-neutral-600 dark:text-neutral-300",children:b})]}),a.jsxs("section",{className:"rounded-xl border border-red-300 bg-red-50/40 p-6 dark:border-red-900 dark:bg-red-900/10",children:[a.jsx("h2",{className:"mb-1 font-semibold text-red-700 dark:text-red-300",children:"Alles zurücksetzen"}),a.jsxs("p",{className:"mb-4 text-sm text-neutral-600 dark:text-neutral-300",children:["Kombiniert alles: Fahrzeugkatalog wird komplett geleert ",a.jsx("strong",{children:"und"})," Leistungen, FAQs sowie die Bildergalerie werden auf Standard zurückgesetzt. Kontaktanfragen und Benutzerkonten bleiben erhalten. Nicht rückgängig zu machen."]}),a.jsx("button",{onClick:N,disabled:k,className:"rounded-md bg-red-600 px-4 py-2 text-sm font-semibold text-white hover:bg-red-700 disabled:opacity-50",children:k?"Setze zurück…":"Wirklich alles zurücksetzen"}),p&&a.jsx("p",{className:"mt-3 text-sm text-neutral-700 dark:text-neutral-300",children:p})]})]})}function K4(){return a.jsxs(a.Fragment,{children:[a.jsx(aw,{}),a.jsx(ow,{}),a.jsx(uw,{children:a.jsxs(Wk,{children:[a.jsx(H,{path:"/setup",element:a.jsx(dP,{})}),a.jsxs(H,{element:a.jsx(oC,{}),children:[a.jsx(H,{path:"/",element:a.jsx(TC,{})}),a.jsx(H,{path:"/fahrzeuge",element:a.jsx(AC,{})}),a.jsx(H,{path:"/fahrzeuge/:brandSlug",element:a.jsx(MC,{})}),a.jsx(H,{path:"/fahrzeuge/:brandSlug/:modelSlug",element:a.jsx($C,{})}),a.jsx(H,{path:"/galerie",element:a.jsx(GC,{})}),a.jsx(H,{path:"/galerie/:brandSlug",element:a.jsx(KC,{})}),a.jsx(H,{path:"/galerie/:brandSlug/:projectSlug",element:a.jsx(YC,{})}),a.jsx(H,{path:"/leistungen",element:a.jsx(XC,{})}),a.jsx(H,{path:"/kontakt",element:a.jsx(aP,{})}),a.jsx(H,{path:"/impressum",element:a.jsx(iP,{})}),a.jsx(H,{path:"/datenschutz",element:a.jsx(lP,{})}),a.jsx(H,{path:"/agb",element:a.jsx(oP,{})})]}),a.jsx(H,{path:"/admin/login",element:a.jsx(hP,{})}),a.jsx(H,{path:"/admin",element:a.jsx(hC,{}),children:a.jsxs(H,{element:a.jsx(dC,{}),children:[a.jsx(H,{index:!0,element:a.jsx(gP,{})}),a.jsx(H,{path:"account",element:a.jsx(A4,{})}),a.jsx(H,{path:"brands",element:a.jsx(Be,{permission:"brands.manage",children:a.jsx(xP,{})})}),a.jsx(H,{path:"models",element:a.jsx(Be,{permission:"models.manage",children:a.jsx(bP,{})})}),a.jsx(H,{path:"gallery-brands",element:a.jsx(Be,{permission:"gallery.manage",children:a.jsx(vP,{})})}),a.jsx(H,{path:"gallery-projects",element:a.jsx(Be,{permission:"gallery.manage",children:a.jsx(yP,{})})}),a.jsx(H,{path:"gallery-projects/:projectId/photos",element:a.jsx(Be,{permission:"gallery.manage",children:a.jsx(kP,{})})}),a.jsx(H,{path:"packages",element:a.jsx(Be,{permission:"packages.manage",children:a.jsx(PP,{})})}),a.jsx(H,{path:"packages/:packageId/products",element:a.jsx(Be,{permission:"packages.manage",children:a.jsx(BP,{})})}),a.jsx(H,{path:"packages/:packageId/upgrades",element:a.jsx(Be,{permission:"packages.manage",children:a.jsx(IP,{})})}),a.jsx(H,{path:"services",element:a.jsx(Be,{permission:"services.manage",children:a.jsx(MP,{})})}),a.jsx(H,{path:"faqs",element:a.jsx(Be,{permission:"content.manage",children:a.jsx(_P,{})})}),a.jsx(H,{path:"contact-requests",element:a.jsx(Be,{permission:"contact.manage",children:a.jsx(UP,{})})}),a.jsx(H,{path:"users",element:a.jsx(Be,{permission:"users.manage",children:a.jsx(M4,{})})}),a.jsx(H,{path:"permission-groups",element:a.jsx(Be,{permission:"permission_groups.manage",children:a.jsx(_4,{})})}),a.jsxs(H,{path:"settings",element:a.jsx(Be,{permission:"settings.manage",children:a.jsx(L4,{})}),children:[a.jsx(H,{index:!0,element:a.jsx(Ws,{to:"website",replace:!0})}),a.jsx(H,{path:"website",element:a.jsx(R4,{})}),a.jsx(H,{path:"email",element:a.jsx(O4,{})}),a.jsx(H,{path:"database",element:a.jsx(U4,{})}),a.jsx(H,{path:"export-import",element:a.jsx(W4,{})}),a.jsx(H,{path:"maintenance",element:a.jsx($4,{})}),a.jsx(H,{path:"reset",element:a.jsx(G4,{})})]})]})})]})})]})}wo.createRoot(document.getElementById("root")).render(a.jsx(Ob.StrictMode,{children:a.jsx(Qk,{basename:"/".replace(/\/$/,"")||"/",children:a.jsx(dw,{children:a.jsx(gw,{children:a.jsx(Nw,{children:a.jsx(K4,{})})})})})}));