s(G,L))tes(se,G)?(N[F]=se,N[te]=L,F=te):(N[F]=G,N[z]=L,F=z);else if(te
s(se,L))N[F]=se,N[te]=L,F=te;else break e}}return A}function s(N,A){var L=N.sortIndex-A.sortIndex;return L!==0?L:N.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var u=[],c=[],d=1,f=null,h=3,g=!1,v=!1,w=!1,b=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(N){for(var A=n(c);A!==null;){if(A.callback===null)r(c);else if(A.startTime<=N)r(c),A.sortIndex=A.expirationTime,t(u,A);else break;A=n(c)}}function k(N){if(w=!1,y(N),!v)if(n(u)!==null)v=!0,q(E);else{var A=n(c);A!==null&&oe(k,A.startTime-N)}}function E(N,A){v=!1,w&&(w=!1,p(j),j=-1),g=!0;var L=h;try{for(y(A),f=n(u);f!==null&&(!(f.expirationTime>A)||N&&!B());){var F=f.callback;if(typeof F=="function"){f.callback=null,h=f.priorityLevel;var P=F(f.expirationTime<=A);A=e.unstable_now(),typeof P=="function"?f.callback=P:f===n(u)&&r(u),y(A)}else r(u);f=n(u)}if(f!==null)var R=!0;else{var z=n(c);z!==null&&oe(k,z.startTime-A),R=!1}return R}finally{f=null,h=L,g=!1}}var T=!1,S=null,j=-1,_=5,C=-1;function B(){return!(e.unstable_now()-C<_)}function H(){if(S!==null){var N=e.unstable_now();C=N;var A=!0;try{A=S(!0,N)}finally{A?ee():(T=!1,S=null)}}else T=!1}var ee;if(typeof x=="function")ee=function(){x(H)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,K=W.port2;W.port1.onmessage=H,ee=function(){K.postMessage(null)}}else ee=function(){b(H,0)};function q(N){S=N,T||(T=!0,ee())}function oe(N,A){j=b(function(){N(e.unstable_now())},A)}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(N){N.callback=null},e.unstable_continueExecution=function(){v||g||(v=!0,q(E))},e.unstable_forceFrameRate=function(N){0>N||125F?(N.sortIndex=L,t(c,N),n(u)===null&&N===n(c)&&(w?(p(j),j=-1):w=!0,oe(k,L-F))):(N.sortIndex=P,t(u,N),v||g||(v=!0,q(E))),N},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(N){var A=h;return function(){var L=h;h=A;try{return N.apply(this,arguments)}finally{h=L}}}})(_p);Np.exports=_p;var Nv=Np.exports;/**
+ */(function(e){function t(N,A){var L=N.length;N.push(A);e:for(;0>>1,P=N[F];if(0>>1;Fs(G,L))ees(se,G)?(N[F]=se,N[ee]=L,F=ee):(N[F]=G,N[z]=L,F=z);else if(ee
s(se,L))N[F]=se,N[ee]=L,F=ee;else break e}}return A}function s(N,A){var L=N.sortIndex-A.sortIndex;return L!==0?L:N.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var u=[],c=[],d=1,f=null,h=3,g=!1,v=!1,w=!1,b=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(N){for(var A=n(c);A!==null;){if(A.callback===null)r(c);else if(A.startTime<=N)r(c),A.sortIndex=A.expirationTime,t(u,A);else break;A=n(c)}}function k(N){if(w=!1,y(N),!v)if(n(u)!==null)v=!0,q(E);else{var A=n(c);A!==null&&oe(k,A.startTime-N)}}function E(N,A){v=!1,w&&(w=!1,p(j),j=-1),g=!0;var L=h;try{for(y(A),f=n(u);f!==null&&(!(f.expirationTime>A)||N&&!B());){var F=f.callback;if(typeof F=="function"){f.callback=null,h=f.priorityLevel;var P=F(f.expirationTime<=A);A=e.unstable_now(),typeof P=="function"?f.callback=P:f===n(u)&&r(u),y(A)}else r(u);f=n(u)}if(f!==null)var R=!0;else{var z=n(c);z!==null&&oe(k,z.startTime-A),R=!1}return R}finally{f=null,h=L,g=!1}}var T=!1,S=null,j=-1,_=5,C=-1;function B(){return!(e.unstable_now()-C<_)}function H(){if(S!==null){var N=e.unstable_now();C=N;var A=!0;try{A=S(!0,N)}finally{A?ne():(T=!1,S=null)}}else T=!1}var ne;if(typeof x=="function")ne=function(){x(H)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,K=W.port2;W.port1.onmessage=H,ne=function(){K.postMessage(null)}}else ne=function(){b(H,0)};function q(N){S=N,T||(T=!0,ne())}function oe(N,A){j=b(function(){N(e.unstable_now())},A)}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(N){N.callback=null},e.unstable_continueExecution=function(){v||g||(v=!0,q(E))},e.unstable_forceFrameRate=function(N){0>N||125F?(N.sortIndex=L,t(c,N),n(u)===null&&N===n(c)&&(w?(p(j),j=-1):w=!0,oe(k,L-F))):(N.sortIndex=P,t(u,N),v||g||(v=!0,q(E))),N},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(N){var A=h;return function(){var L=h;h=A;try{return N.apply(this,arguments)}finally{h=L}}}})(_p);Np.exports=_p;var Nv=Np.exports;/**
* @license React
* react-dom.production.min.js
*
@@ -36,9 +36,9 @@ function ov(e,t){for(var n=0;nl||s[o]!==i[l]){var u=`
`+s[o].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=o&&0<=l);break}}}finally{Aa=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?gs(e):""}function Rv(e){switch(e.tag){case 5:return gs(e.type);case 16:return gs("Lazy");case 13:return gs("Suspense");case 19:return gs("SuspenseList");case 0:case 2:case 15:return e=Da(e.type,!1),e;case 11:return e=Da(e.type.render,!1),e;case 1:return e=Da(e.type,!0),e;default:return""}}function Fl(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 xr:return"Fragment";case gr:return"Portal";case Rl:return"Profiler";case gc:return"StrictMode";case Vl:return"Suspense";case Il:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ap:return(e.displayName||"Context")+".Consumer";case Lp:return(e._context.displayName||"Context")+".Provider";case xc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case yc:return t=e.displayName||null,t!==null?t:Fl(e.type)||"Memo";case cn:t=e._payload,e=e._init;try{return Fl(e(t))}catch{}}return null}function Vv(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 Fl(t);case 8:return t===gc?"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 Mn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Rp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Iv(e){var t=Rp(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Si(e){e._valueTracker||(e._valueTracker=Iv(e))}function Vp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Rp(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function go(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 Ol(e,t){var n=t.checked;return ve({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function rf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Mn(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 Ip(e,t){t=t.checked,t!=null&&pc(e,"checked",t,!1)}function zl(e,t){Ip(e,t);var n=Mn(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")?Bl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Bl(e,t.type,Mn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function sf(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 Bl(e,t,n){(t!=="number"||go(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var xs=Array.isArray;function Lr(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=ji.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Os(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ks={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},Fv=["Webkit","ms","Moz","O"];Object.keys(ks).forEach(function(e){Fv.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ks[t]=ks[e]})});function Bp(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ks.hasOwnProperty(e)&&ks[e]?(""+t).trim():t+"px"}function $p(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Bp(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Ov=ve({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 Ul(e,t){if(t){if(Ov[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 Wl(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 Gl=null;function vc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Kl=null,Ar=null,Dr=null;function lf(e){if(e=di(e)){if(typeof Kl!="function")throw Error(D(280));var t=e.stateNode;t&&(t=la(t),Kl(e.stateNode,e.type,t))}}function Hp(e){Ar?Dr?Dr.push(e):Dr=[e]:Ar=e}function Up(){if(Ar){var e=Ar,t=Dr;if(Dr=Ar=null,lf(e),t)for(e=0;e>>=0,e===0?32:31-(Xv(e)/Zv|0)|0}var Ei=64,Ci=4194304;function ys(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 wo(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var l=o&~s;l!==0?r=ys(l):(i&=o,i!==0&&(r=ys(i)))}else o=n&~s,o!==0?r=ys(o):i!==0&&(r=ys(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;0n;n++)t.push(e);return t}function ui(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Lt(t),e[t]=n}function t1(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=js),xf=" ",yf=!1;function cg(e,t){switch(e){case"keyup":return N1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var yr=!1;function M1(e,t){switch(e){case"compositionend":return dg(t);case"keypress":return t.which!==32?null:(yf=!0,xf);case"textInput":return e=t.data,e===xf&&yf?null:e;default:return null}}function L1(e,t){if(yr)return e==="compositionend"||!Pc&&cg(e,t)?(e=lg(),Xi=jc=pn=null,yr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=kf(n)}}function pg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?pg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function gg(){for(var e=window,t=go();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=go(e.document)}return t}function Tc(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 B1(e){var t=gg(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&pg(n.ownerDocument.documentElement,n)){if(r!==null&&Tc(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=Sf(n,i);var o=Sf(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,vr=null,Jl=null,Cs=null,eu=!1;function jf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;eu||vr==null||vr!==go(r)||(r=vr,"selectionStart"in r&&Tc(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}),Cs&&Ws(Cs,r)||(Cs=r,r=So(Jl,"onSelect"),0kr||(e.current=ou[kr],ou[kr]=null,kr--)}function de(e,t){kr++,ou[kr]=e.current,e.current=t}var Ln={},Ke=Rn(Ln),rt=Rn(!1),Jn=Ln;function Or(e,t){var n=e.type.contextTypes;if(!n)return Ln;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 st(e){return e=e.childContextTypes,e!=null}function Eo(){he(rt),he(Ke)}function Mf(e,t,n){if(Ke.current!==Ln)throw Error(D(168));de(Ke,t),de(rt,n)}function Eg(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,Vv(e)||"Unknown",s));return ve({},n,r)}function Co(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ln,Jn=Ke.current,de(Ke,e),de(rt,rt.current),!0}function Lf(e,t,n){var r=e.stateNode;if(!r)throw Error(D(169));n?(e=Eg(e,t,Jn),r.__reactInternalMemoizedMergedChildContext=e,he(rt),he(Ke),de(Ke,e)):he(rt),de(rt,n)}var Yt=null,ua=!1,qa=!1;function Cg(e){Yt===null?Yt=[e]:Yt.push(e)}function J1(e){ua=!0,Cg(e)}function Vn(){if(!qa&&Yt!==null){qa=!0;var e=0,t=re;try{var n=Yt;for(re=1;e>=o,s-=o,Xt=1<<32-Lt(t)+s|n<j?(_=S,S=null):_=S.sibling;var C=h(p,S,y[j],k);if(C===null){S===null&&(S=_);break}e&&S&&C.alternate===null&&t(p,S),x=i(C,x,j),T===null?E=C:T.sibling=C,T=C,S=_}if(j===y.length)return n(p,S),me&&Bn(p,j),E;if(S===null){for(;jj?(_=S,S=null):_=S.sibling;var B=h(p,S,C.value,k);if(B===null){S===null&&(S=_);break}e&&S&&B.alternate===null&&t(p,S),x=i(B,x,j),T===null?E=B:T.sibling=B,T=B,S=_}if(C.done)return n(p,S),me&&Bn(p,j),E;if(S===null){for(;!C.done;j++,C=y.next())C=f(p,C.value,k),C!==null&&(x=i(C,x,j),T===null?E=C:T.sibling=C,T=C);return me&&Bn(p,j),E}for(S=r(p,S);!C.done;j++,C=y.next())C=g(S,p,j,C.value,k),C!==null&&(e&&C.alternate!==null&&S.delete(C.key===null?j:C.key),x=i(C,x,j),T===null?E=C:T.sibling=C,T=C);return e&&S.forEach(function(H){return t(p,H)}),me&&Bn(p,j),E}function b(p,x,y,k){if(typeof y=="object"&&y!==null&&y.type===xr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case ki:e:{for(var E=y.key,T=x;T!==null;){if(T.key===E){if(E=y.type,E===xr){if(T.tag===7){n(p,T.sibling),x=s(T,y.props.children),x.return=p,p=x;break e}}else if(T.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===cn&&Rf(E)===T.type){n(p,T.sibling),x=s(T,y.props),x.ref=cs(p,T,y),x.return=p,p=x;break e}n(p,T);break}else t(p,T);T=T.sibling}y.type===xr?(x=Xn(y.props.children,p.mode,k,y.key),x.return=p,p=x):(k=so(y.type,y.key,y.props,null,p.mode,k),k.ref=cs(p,x,y),k.return=p,p=k)}return o(p);case gr:e:{for(T=y.key;x!==null;){if(x.key===T)if(x.tag===4&&x.stateNode.containerInfo===y.containerInfo&&x.stateNode.implementation===y.implementation){n(p,x.sibling),x=s(x,y.children||[]),x.return=p,p=x;break e}else{n(p,x);break}else t(p,x);x=x.sibling}x=nl(y,p.mode,k),x.return=p,p=x}return o(p);case cn:return T=y._init,b(p,x,T(y._payload),k)}if(xs(y))return v(p,x,y,k);if(is(y))return w(p,x,y,k);Ai(p,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,x!==null&&x.tag===6?(n(p,x.sibling),x=s(x,y),x.return=p,p=x):(n(p,x),x=tl(y,p.mode,k),x.return=p,p=x),o(p)):n(p,x)}return b}var Br=_g(!0),Mg=_g(!1),No=Rn(null),_o=null,Er=null,Lc=null;function Ac(){Lc=Er=_o=null}function Dc(e){var t=No.current;he(No),e._currentValue=t}function uu(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 Vr(e,t){_o=e,Lc=Er=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(nt=!0),e.firstContext=null)}function bt(e){var t=e._currentValue;if(Lc!==e)if(e={context:e,memoizedValue:t,next:null},Er===null){if(_o===null)throw Error(D(308));Er=e,_o.dependencies={lanes:0,firstContext:e}}else Er=Er.next=e;return t}var Wn=null;function Rc(e){Wn===null?Wn=[e]:Wn.push(e)}function Lg(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Rc(t)):(n.next=s.next,s.next=n),t.interleaved=n,nn(e,r)}function nn(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 dn=!1;function Vc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ag(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 Jt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function jn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ne&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,nn(e,n)}return s=r.interleaved,s===null?(t.next=t,Rc(r)):(t.next=s.next,s.next=t),r.interleaved=t,nn(e,n)}function Qi(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,bc(e,n)}}function Vf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Mo(e,t,n,r){var s=e.updateQueue;dn=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var u=l,c=u.next;u.next=null,o===null?i=c:o.next=c,o=u;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==o&&(l===null?d.firstBaseUpdate=c:l.next=c,d.lastBaseUpdate=u))}if(i!==null){var f=s.baseState;o=0,d=c=u=null,l=i;do{var h=l.lane,g=l.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:g,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var v=e,w=l;switch(h=t,g=n,w.tag){case 1:if(v=w.payload,typeof v=="function"){f=v.call(g,f,h);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=w.payload,h=typeof v=="function"?v.call(g,f,h):v,h==null)break e;f=ve({},f,h);break e;case 2:dn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[l]:h.push(l))}else g={eventTime:g,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(c=d=g,u=f):d=d.next=g,o|=h;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;h=l,l=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(d===null&&(u=f),s.baseState=u,s.firstBaseUpdate=c,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);nr|=o,e.lanes=o,e.memoizedState=f}}function If(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Xa.transition;Xa.transition={};try{e(!1),t()}finally{re=n,Xa.transition=r}}function Xg(){return kt().memoizedState}function rw(e,t,n){var r=Cn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Zg(e))Qg(t,n);else if(n=Lg(e,t,n,r),n!==null){var s=Ze();At(n,e,r,s),Jg(n,t,r)}}function sw(e,t,n){var r=Cn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Zg(e))Qg(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,l=i(o,n);if(s.hasEagerState=!0,s.eagerState=l,Rt(l,o)){var u=t.interleaved;u===null?(s.next=s,Rc(t)):(s.next=u.next,u.next=s),t.interleaved=s;return}}catch{}finally{}n=Lg(e,t,s,r),n!==null&&(s=Ze(),At(n,e,r,s),Jg(n,t,r))}}function Zg(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function Qg(e,t){Ps=Ao=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Jg(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bc(e,n)}}var Do={readContext:bt,useCallback:Be,useContext:Be,useEffect:Be,useImperativeHandle:Be,useInsertionEffect:Be,useLayoutEffect:Be,useMemo:Be,useReducer:Be,useRef:Be,useState:Be,useDebugValue:Be,useDeferredValue:Be,useTransition:Be,useMutableSource:Be,useSyncExternalStore:Be,useId:Be,unstable_isNewReconciler:!1},iw={readContext:bt,useCallback:function(e,t){return Ot().memoizedState=[e,t===void 0?null:t],e},useContext:bt,useEffect:Of,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,eo(4194308,4,Wg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return eo(4194308,4,e,t)},useInsertionEffect:function(e,t){return eo(4,2,e,t)},useMemo:function(e,t){var n=Ot();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ot();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=rw.bind(null,xe,e),[r.memoizedState,e]},useRef:function(e){var t=Ot();return e={current:e},t.memoizedState=e},useState:Ff,useDebugValue:Uc,useDeferredValue:function(e){return Ot().memoizedState=e},useTransition:function(){var e=Ff(!1),t=e[0];return e=nw.bind(null,e[1]),Ot().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=xe,s=Ot();if(me){if(n===void 0)throw Error(D(407));n=n()}else{if(n=t(),Re===null)throw Error(D(349));tr&30||Ig(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Of(Og.bind(null,r,i,e),[e]),r.flags|=2048,Js(9,Fg.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Ot(),t=Re.identifierPrefix;if(me){var n=Zt,r=Xt;n=(r&~(1<<32-Lt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Zs++,0kr||(e.current=ou[kr],ou[kr]=null,kr--)}function de(e,t){kr++,ou[kr]=e.current,e.current=t}var Ln={},Ke=Rn(Ln),rt=Rn(!1),Jn=Ln;function Or(e,t){var n=e.type.contextTypes;if(!n)return Ln;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 st(e){return e=e.childContextTypes,e!=null}function Eo(){he(rt),he(Ke)}function Mf(e,t,n){if(Ke.current!==Ln)throw Error(D(168));de(Ke,t),de(rt,n)}function Eg(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,Vv(e)||"Unknown",s));return ve({},n,r)}function Co(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ln,Jn=Ke.current,de(Ke,e),de(rt,rt.current),!0}function Lf(e,t,n){var r=e.stateNode;if(!r)throw Error(D(169));n?(e=Eg(e,t,Jn),r.__reactInternalMemoizedMergedChildContext=e,he(rt),he(Ke),de(Ke,e)):he(rt),de(rt,n)}var Yt=null,ua=!1,qa=!1;function Cg(e){Yt===null?Yt=[e]:Yt.push(e)}function J1(e){ua=!0,Cg(e)}function Vn(){if(!qa&&Yt!==null){qa=!0;var e=0,t=re;try{var n=Yt;for(re=1;e>=o,s-=o,Xt=1<<32-Lt(t)+s|n<j?(_=S,S=null):_=S.sibling;var C=h(p,S,y[j],k);if(C===null){S===null&&(S=_);break}e&&S&&C.alternate===null&&t(p,S),x=i(C,x,j),T===null?E=C:T.sibling=C,T=C,S=_}if(j===y.length)return n(p,S),me&&Bn(p,j),E;if(S===null){for(;jj?(_=S,S=null):_=S.sibling;var B=h(p,S,C.value,k);if(B===null){S===null&&(S=_);break}e&&S&&B.alternate===null&&t(p,S),x=i(B,x,j),T===null?E=B:T.sibling=B,T=B,S=_}if(C.done)return n(p,S),me&&Bn(p,j),E;if(S===null){for(;!C.done;j++,C=y.next())C=f(p,C.value,k),C!==null&&(x=i(C,x,j),T===null?E=C:T.sibling=C,T=C);return me&&Bn(p,j),E}for(S=r(p,S);!C.done;j++,C=y.next())C=g(S,p,j,C.value,k),C!==null&&(e&&C.alternate!==null&&S.delete(C.key===null?j:C.key),x=i(C,x,j),T===null?E=C:T.sibling=C,T=C);return e&&S.forEach(function(H){return t(p,H)}),me&&Bn(p,j),E}function b(p,x,y,k){if(typeof y=="object"&&y!==null&&y.type===xr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case ki:e:{for(var E=y.key,T=x;T!==null;){if(T.key===E){if(E=y.type,E===xr){if(T.tag===7){n(p,T.sibling),x=s(T,y.props.children),x.return=p,p=x;break e}}else if(T.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===cn&&Rf(E)===T.type){n(p,T.sibling),x=s(T,y.props),x.ref=cs(p,T,y),x.return=p,p=x;break e}n(p,T);break}else t(p,T);T=T.sibling}y.type===xr?(x=Xn(y.props.children,p.mode,k,y.key),x.return=p,p=x):(k=so(y.type,y.key,y.props,null,p.mode,k),k.ref=cs(p,x,y),k.return=p,p=k)}return o(p);case gr:e:{for(T=y.key;x!==null;){if(x.key===T)if(x.tag===4&&x.stateNode.containerInfo===y.containerInfo&&x.stateNode.implementation===y.implementation){n(p,x.sibling),x=s(x,y.children||[]),x.return=p,p=x;break e}else{n(p,x);break}else t(p,x);x=x.sibling}x=nl(y,p.mode,k),x.return=p,p=x}return o(p);case cn:return T=y._init,b(p,x,T(y._payload),k)}if(xs(y))return v(p,x,y,k);if(is(y))return w(p,x,y,k);Ai(p,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,x!==null&&x.tag===6?(n(p,x.sibling),x=s(x,y),x.return=p,p=x):(n(p,x),x=tl(y,p.mode,k),x.return=p,p=x),o(p)):n(p,x)}return b}var Br=_g(!0),Mg=_g(!1),No=Rn(null),_o=null,Er=null,Lc=null;function Ac(){Lc=Er=_o=null}function Dc(e){var t=No.current;he(No),e._currentValue=t}function uu(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 Vr(e,t){_o=e,Lc=Er=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(nt=!0),e.firstContext=null)}function bt(e){var t=e._currentValue;if(Lc!==e)if(e={context:e,memoizedValue:t,next:null},Er===null){if(_o===null)throw Error(D(308));Er=e,_o.dependencies={lanes:0,firstContext:e}}else Er=Er.next=e;return t}var Wn=null;function Rc(e){Wn===null?Wn=[e]:Wn.push(e)}function Lg(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Rc(t)):(n.next=s.next,s.next=n),t.interleaved=n,nn(e,r)}function nn(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 dn=!1;function Vc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ag(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 Jt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function jn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,te&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,nn(e,n)}return s=r.interleaved,s===null?(t.next=t,Rc(r)):(t.next=s.next,s.next=t),r.interleaved=t,nn(e,n)}function Qi(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,bc(e,n)}}function Vf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Mo(e,t,n,r){var s=e.updateQueue;dn=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var u=l,c=u.next;u.next=null,o===null?i=c:o.next=c,o=u;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==o&&(l===null?d.firstBaseUpdate=c:l.next=c,d.lastBaseUpdate=u))}if(i!==null){var f=s.baseState;o=0,d=c=u=null,l=i;do{var h=l.lane,g=l.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:g,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var v=e,w=l;switch(h=t,g=n,w.tag){case 1:if(v=w.payload,typeof v=="function"){f=v.call(g,f,h);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=w.payload,h=typeof v=="function"?v.call(g,f,h):v,h==null)break e;f=ve({},f,h);break e;case 2:dn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[l]:h.push(l))}else g={eventTime:g,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(c=d=g,u=f):d=d.next=g,o|=h;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;h=l,l=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(d===null&&(u=f),s.baseState=u,s.firstBaseUpdate=c,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);nr|=o,e.lanes=o,e.memoizedState=f}}function If(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Xa.transition;Xa.transition={};try{e(!1),t()}finally{re=n,Xa.transition=r}}function Xg(){return kt().memoizedState}function rw(e,t,n){var r=Cn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Zg(e))Qg(t,n);else if(n=Lg(e,t,n,r),n!==null){var s=Ze();At(n,e,r,s),Jg(n,t,r)}}function sw(e,t,n){var r=Cn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Zg(e))Qg(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,l=i(o,n);if(s.hasEagerState=!0,s.eagerState=l,Rt(l,o)){var u=t.interleaved;u===null?(s.next=s,Rc(t)):(s.next=u.next,u.next=s),t.interleaved=s;return}}catch{}finally{}n=Lg(e,t,s,r),n!==null&&(s=Ze(),At(n,e,r,s),Jg(n,t,r))}}function Zg(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function Qg(e,t){Ps=Ao=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Jg(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bc(e,n)}}var Do={readContext:bt,useCallback:Be,useContext:Be,useEffect:Be,useImperativeHandle:Be,useInsertionEffect:Be,useLayoutEffect:Be,useMemo:Be,useReducer:Be,useRef:Be,useState:Be,useDebugValue:Be,useDeferredValue:Be,useTransition:Be,useMutableSource:Be,useSyncExternalStore:Be,useId:Be,unstable_isNewReconciler:!1},iw={readContext:bt,useCallback:function(e,t){return Ot().memoizedState=[e,t===void 0?null:t],e},useContext:bt,useEffect:Of,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,eo(4194308,4,Wg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return eo(4194308,4,e,t)},useInsertionEffect:function(e,t){return eo(4,2,e,t)},useMemo:function(e,t){var n=Ot();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ot();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=rw.bind(null,xe,e),[r.memoizedState,e]},useRef:function(e){var t=Ot();return e={current:e},t.memoizedState=e},useState:Ff,useDebugValue:Uc,useDeferredValue:function(e){return Ot().memoizedState=e},useTransition:function(){var e=Ff(!1),t=e[0];return e=nw.bind(null,e[1]),Ot().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=xe,s=Ot();if(me){if(n===void 0)throw Error(D(407));n=n()}else{if(n=t(),Re===null)throw Error(D(349));tr&30||Ig(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Of(Og.bind(null,r,i,e),[e]),r.flags|=2048,Js(9,Fg.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Ot(),t=Re.identifierPrefix;if(me){var n=Zt,r=Xt;n=(r&~(1<<32-Lt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Zs++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[$t]=t,e[qs]=r,u0(e,t,!1,!1),t.stateNode=e;e:{switch(o=Wl(n,r),n){case"dialog":fe("cancel",e),fe("close",e),s=r;break;case"iframe":case"object":case"embed":fe("load",e),s=r;break;case"video":case"audio":for(s=0;sUr&&(t.flags|=128,r=!0,ds(i,!1),t.lanes=4194304)}else{if(!r)if(e=Lo(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ds(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!me)return $e(t),null}else 2*Se()-i.renderingStartTime>Ur&&n!==1073741824&&(t.flags|=128,r=!0,ds(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Se(),t.sibling=null,n=ge.current,de(ge,r?n&1|2:n&1),t):($e(t),null);case 22:case 23:return Xc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?lt&1073741824&&($e(t),t.subtreeFlags&6&&(t.flags|=8192)):$e(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function hw(e,t){switch(_c(t),t.tag){case 1:return st(t.type)&&Eo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $r(),he(rt),he(Ke),Oc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Fc(t),null;case 13:if(he(ge),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));zr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return he(ge),null;case 4:return $r(),null;case 10:return Dc(t.type._context),null;case 22:case 23:return Xc(),null;case 24:return null;default:return null}}var Ri=!1,Ge=!1,mw=typeof WeakSet=="function"?WeakSet:Set,I=null;function Cr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ke(e,t,r)}else n.current=null}function yu(e,t,n){try{n()}catch(r){ke(e,t,r)}}var Xf=!1;function pw(e,t){if(tu=bo,e=gg(),Tc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,l=-1,u=-1,c=0,d=0,f=e,h=null;t:for(;;){for(var g;f!==n||s!==0&&f.nodeType!==3||(l=o+s),f!==i||r!==0&&f.nodeType!==3||(u=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(g=f.firstChild)!==null;)h=f,f=g;for(;;){if(f===e)break t;if(h===n&&++c===s&&(l=o),h===i&&++d===r&&(u=o),(g=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=g}n=l===-1||u===-1?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(nu={focusedElem:e,selectionRange:n},bo=!1,I=t;I!==null;)if(t=I,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,I=e;else for(;I!==null;){t=I;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,b=v.memoizedState,p=t.stateNode,x=p.getSnapshotBeforeUpdate(t.elementType===t.type?w:Tt(t.type,w),b);p.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(k){ke(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,I=e;break}I=t.return}return v=Xf,Xf=!1,v}function Ts(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&&yu(t,n,i)}s=s.next}while(s!==r)}}function fa(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 vu(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 f0(e){var t=e.alternate;t!==null&&(e.alternate=null,f0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[$t],delete t[qs],delete t[iu],delete t[Z1],delete t[Q1])),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 h0(e){return e.tag===5||e.tag===3||e.tag===4}function Zf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||h0(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 wu(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=jo));else if(r!==4&&(e=e.child,e!==null))for(wu(e,t,n),e=e.sibling;e!==null;)wu(e,t,n),e=e.sibling}function bu(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(bu(e,t,n),e=e.sibling;e!==null;)bu(e,t,n),e=e.sibling}var Fe=null,Nt=!1;function ln(e,t,n){for(n=n.child;n!==null;)m0(e,t,n),n=n.sibling}function m0(e,t,n){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(sa,n)}catch{}switch(n.tag){case 5:Ge||Cr(n,t);case 6:var r=Fe,s=Nt;Fe=null,ln(e,t,n),Fe=r,Nt=s,Fe!==null&&(Nt?(e=Fe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Fe.removeChild(n.stateNode));break;case 18:Fe!==null&&(Nt?(e=Fe,n=n.stateNode,e.nodeType===8?Ka(e.parentNode,n):e.nodeType===1&&Ka(e,n),Hs(e)):Ka(Fe,n.stateNode));break;case 4:r=Fe,s=Nt,Fe=n.stateNode.containerInfo,Nt=!0,ln(e,t,n),Fe=r,Nt=s;break;case 0:case 11:case 14:case 15:if(!Ge&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&yu(n,t,o),s=s.next}while(s!==r)}ln(e,t,n);break;case 1:if(!Ge&&(Cr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ke(n,t,l)}ln(e,t,n);break;case 21:ln(e,t,n);break;case 22:n.mode&1?(Ge=(r=Ge)||n.memoizedState!==null,ln(e,t,n),Ge=r):ln(e,t,n);break;default:ln(e,t,n)}}function Qf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new mw),t.forEach(function(r){var s=jw.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Et(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=o),r&=~i}if(r=s,r=Se()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*xw(r/1960))-r,10e?16:e,gn===null)var r=!1;else{if(e=gn,gn=null,Io=0,ne&6)throw Error(D(331));var s=ne;for(ne|=4,I=e.current;I!==null;){var i=I,o=i.child;if(I.flags&16){var l=i.deletions;if(l!==null){for(var u=0;uSe()-qc?Yn(e,0):Kc|=n),it(e,t)}function k0(e,t){t===0&&(e.mode&1?(t=Ci,Ci<<=1,!(Ci&130023424)&&(Ci=4194304)):t=1);var n=Ze();e=nn(e,t),e!==null&&(ui(e,t,n),it(e,n))}function Sw(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),k0(e,n)}function jw(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),k0(e,n)}var S0;S0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||rt.current)nt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return nt=!1,dw(e,t,n);nt=!!(e.flags&131072)}else nt=!1,me&&t.flags&1048576&&Pg(t,To,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;to(e,t),e=t.pendingProps;var s=Or(t,Ke.current);Vr(t,n),s=Bc(null,t,r,e,s,n);var i=$c();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,st(r)?(i=!0,Co(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Vc(t),s.updater=da,t.stateNode=s,s._reactInternals=t,du(t,r,e,n),t=mu(null,t,r,!0,i,n)):(t.tag=0,me&&i&&Nc(t),qe(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(to(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=Cw(r),e=Tt(r,e),s){case 0:t=hu(null,t,r,e,n);break e;case 1:t=Kf(null,t,r,e,n);break e;case 11:t=Wf(null,t,r,e,n);break e;case 14:t=Gf(null,t,r,Tt(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:Tt(r,s),hu(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Tt(r,s),Kf(e,t,r,s,n);case 3:e:{if(o0(t),e===null)throw Error(D(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Ag(e,t),Mo(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Hr(Error(D(423)),t),t=qf(e,t,r,n,s);break e}else if(r!==s){s=Hr(Error(D(424)),t),t=qf(e,t,r,n,s);break e}else for(ut=Sn(t.stateNode.containerInfo.firstChild),ct=t,me=!0,_t=null,n=Mg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(zr(),r===s){t=rn(e,t,n);break e}qe(e,t,r,n)}t=t.child}return t;case 5:return Dg(t),e===null&&lu(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,ru(r,s)?o=null:i!==null&&ru(r,i)&&(t.flags|=32),i0(e,t),qe(e,t,o,n),t.child;case 6:return e===null&&lu(t),null;case 13:return a0(e,t,n);case 4:return Ic(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Br(t,null,r,n):qe(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Tt(r,s),Wf(e,t,r,s,n);case 7:return qe(e,t,t.pendingProps,n),t.child;case 8:return qe(e,t,t.pendingProps.children,n),t.child;case 12:return qe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,de(No,r._currentValue),r._currentValue=o,i!==null)if(Rt(i.value,o)){if(i.children===s.children&&!rt.current){t=rn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){o=i.child;for(var u=l.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=Jt(-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),uu(i.return,n,t),l.lanes|=n;break}u=u.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(D(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),uu(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}qe(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Vr(t,n),s=bt(s),r=r(s),t.flags|=1,qe(e,t,r,n),t.child;case 14:return r=t.type,s=Tt(r,t.pendingProps),s=Tt(r.type,s),Gf(e,t,r,s,n);case 15:return r0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Tt(r,s),to(e,t),t.tag=1,st(r)?(e=!0,Co(t)):e=!1,Vr(t,n),e0(t,r,s),du(t,r,s,n),mu(null,t,r,!0,e,n);case 19:return l0(e,t,n);case 22:return s0(e,t,n)}throw Error(D(156,t.tag))};function j0(e,t){return Zp(e,t)}function Ew(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 yt(e,t,n,r){return new Ew(e,t,n,r)}function Qc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Cw(e){if(typeof e=="function")return Qc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xc)return 11;if(e===yc)return 14}return 2}function Pn(e,t){var n=e.alternate;return n===null?(n=yt(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 so(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")Qc(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case xr:return Xn(n.children,s,i,t);case gc:o=8,s|=8;break;case Rl:return e=yt(12,n,t,s|2),e.elementType=Rl,e.lanes=i,e;case Vl:return e=yt(13,n,t,s),e.elementType=Vl,e.lanes=i,e;case Il:return e=yt(19,n,t,s),e.elementType=Il,e.lanes=i,e;case Dp:return ma(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Lp:o=10;break e;case Ap:o=9;break e;case xc:o=11;break e;case yc:o=14;break e;case cn:o=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=yt(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function Xn(e,t,n,r){return e=yt(7,e,r,t),e.lanes=n,e}function ma(e,t,n,r){return e=yt(22,e,r,t),e.elementType=Dp,e.lanes=n,e.stateNode={isHidden:!1},e}function tl(e,t,n){return e=yt(6,e,null,t),e.lanes=n,e}function nl(e,t,n){return t=yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Pw(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=Va(0),this.expirationTimes=Va(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Va(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Jc(e,t,n,r,s,i,o,l,u){return e=new Pw(e,t,n,l,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=yt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Vc(i),e}function Tw(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(T0)}catch(e){console.error(e)}}T0(),Tp.exports=ht;var rd=Tp.exports;const N4=pp(rd);var oh=rd;Al.createRoot=oh.createRoot,Al.hydrateRoot=oh.hydrateRoot;/**
+`+i.stack}return{value:e,source:t,stack:s,digest:null}}function Ja(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function fu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var lw=typeof WeakMap=="function"?WeakMap:Map;function t0(e,t,n){n=Jt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vo||(Vo=!0,ku=r),fu(e,t)},n}function n0(e,t,n){n=Jt(-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(){fu(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){fu(e,t),typeof r!="function"&&(En===null?En=new Set([this]):En.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function $f(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new lw;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=kw.bind(null,e,t,n),t.then(e,e))}function Hf(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 Uf(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=Jt(-1,1),t.tag=2,jn(n,t,1))),n.lanes|=1),e)}var uw=on.ReactCurrentOwner,nt=!1;function qe(e,t,n,r){t.child=e===null?Mg(t,null,n,r):Br(t,e.child,n,r)}function Wf(e,t,n,r,s){n=n.render;var i=t.ref;return Vr(t,s),r=Bc(e,t,n,r,i,s),n=$c(),e!==null&&!nt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,rn(e,t,s)):(me&&n&&Nc(t),t.flags|=1,qe(e,t,r,s),t.child)}function Gf(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!Qc(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,r0(e,t,i,r,s)):(e=so(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Ws,n(o,r)&&e.ref===t.ref)return rn(e,t,s)}return t.flags|=1,e=Pn(i,r),e.ref=t.ref,e.return=t,t.child=e}function r0(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Ws(i,r)&&e.ref===t.ref)if(nt=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(nt=!0);else return t.lanes=e.lanes,rn(e,t,s)}return hu(e,t,n,r,s)}function s0(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},de(Pr,lt),lt|=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,de(Pr,lt),lt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,de(Pr,lt),lt|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,de(Pr,lt),lt|=r;return qe(e,t,s,n),t.child}function i0(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function hu(e,t,n,r,s){var i=st(n)?Jn:Ke.current;return i=Or(t,i),Vr(t,s),n=Bc(e,t,n,r,i,s),r=$c(),e!==null&&!nt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,rn(e,t,s)):(me&&r&&Nc(t),t.flags|=1,qe(e,t,n,s),t.child)}function Kf(e,t,n,r,s){if(st(n)){var i=!0;Co(t)}else i=!1;if(Vr(t,s),t.stateNode===null)to(e,t),e0(t,n,r),du(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var u=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=bt(c):(c=st(n)?Jn:Ke.current,c=Or(t,c));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||u!==c)&&Bf(t,o,r,c),dn=!1;var h=t.memoizedState;o.state=h,Mo(t,r,o,s),u=t.memoizedState,l!==r||h!==u||rt.current||dn?(typeof d=="function"&&(cu(t,n,d,r),u=t.memoizedState),(l=dn||zf(t,n,l,r,h,u,c))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),o.props=r,o.state=u,o.context=c,r=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Ag(e,t),l=t.memoizedProps,c=t.type===t.elementType?l:Tt(t.type,l),o.props=c,f=t.pendingProps,h=o.context,u=n.contextType,typeof u=="object"&&u!==null?u=bt(u):(u=st(n)?Jn:Ke.current,u=Or(t,u));var g=n.getDerivedStateFromProps;(d=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==f||h!==u)&&Bf(t,o,r,u),dn=!1,h=t.memoizedState,o.state=h,Mo(t,r,o,s);var v=t.memoizedState;l!==f||h!==v||rt.current||dn?(typeof g=="function"&&(cu(t,n,g,r),v=t.memoizedState),(c=dn||zf(t,n,c,r,h,v,u)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,v,u),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,v,u)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),o.props=r,o.state=v,o.context=u,r=c):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return mu(e,t,n,r,i,s)}function mu(e,t,n,r,s,i){i0(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&Lf(t,n,!1),rn(e,t,i);r=t.stateNode,uw.current=t;var l=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Br(t,e.child,null,i),t.child=Br(t,null,l,i)):qe(e,t,l,i),t.memoizedState=r.state,s&&Lf(t,n,!0),t.child}function o0(e){var t=e.stateNode;t.pendingContext?Mf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Mf(e,t.context,!1),Ic(e,t.containerInfo)}function qf(e,t,n,r,s){return zr(),Mc(s),t.flags|=256,qe(e,t,n,r),t.child}var pu={dehydrated:null,treeContext:null,retryLane:0};function gu(e){return{baseLanes:e,cachePool:null,transitions:null}}function a0(e,t,n){var r=t.pendingProps,s=ge.current,i=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),de(ge,s&1),e===null)return lu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=ma(o,r,0,null),e=Xn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=gu(n),t.memoizedState=pu,e):Wc(t,o));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return cw(e,t,o,r,l,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,l=s.sibling;var u={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Pn(s,u),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?i=Pn(l,i):(i=Xn(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?gu(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=pu,r}return i=e.child,e=i.sibling,r=Pn(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 Wc(e,t){return t=ma({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Di(e,t,n,r){return r!==null&&Mc(r),Br(t,e.child,null,n),e=Wc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function cw(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=Ja(Error(D(422))),Di(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=ma({mode:"visible",children:r.children},s,0,null),i=Xn(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Br(t,e.child,null,o),t.child.memoizedState=gu(o),t.memoizedState=pu,i);if(!(t.mode&1))return Di(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(D(419)),r=Ja(i,r,void 0),Di(e,t,o,r)}if(l=(o&e.childLanes)!==0,nt||l){if(r=Re,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,nn(e,s),At(r,e,s,-1))}return Zc(),r=Ja(Error(D(421))),Di(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=Sw.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,ut=Sn(s.nextSibling),ct=t,me=!0,_t=null,e!==null&&(gt[xt++]=Xt,gt[xt++]=Zt,gt[xt++]=er,Xt=e.id,Zt=e.overflow,er=t),t=Wc(t,r.children),t.flags|=4096,t)}function Yf(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),uu(e.return,t,n)}function el(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 l0(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(qe(e,t,r.children,n),r=ge.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&&Yf(e,n,t);else if(e.tag===19)Yf(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(de(ge,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&&Lo(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),el(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&&Lo(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}el(t,!0,n,null,i);break;case"together":el(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function to(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function rn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),nr|=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=Pn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Pn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function dw(e,t,n){switch(t.tag){case 3:o0(t),zr();break;case 5:Dg(t);break;case 1:st(t.type)&&Co(t);break;case 4:Ic(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;de(No,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(de(ge,ge.current&1),t.flags|=128,null):n&t.child.childLanes?a0(e,t,n):(de(ge,ge.current&1),e=rn(e,t,n),e!==null?e.sibling:null);de(ge,ge.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return l0(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),de(ge,ge.current),r)break;return null;case 22:case 23:return t.lanes=0,s0(e,t,n)}return rn(e,t,n)}var u0,xu,c0,d0;u0=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}};xu=function(){};c0=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Gn(Ut.current);var i=null;switch(n){case"input":s=Ol(e,s),r=Ol(e,r),i=[];break;case"select":s=ve({},s,{value:void 0}),r=ve({},r,{value:void 0}),i=[];break;case"textarea":s=$l(e,s),r=$l(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=jo)}Ul(n,r);var o;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var l=s[c];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Fs.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var u=r[c];if(l=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(u!=null||l!=null))if(c==="style")if(l){for(o in l)!l.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&l[o]!==u[o]&&(n||(n={}),n[o]=u[o])}else n||(i||(i=[]),i.push(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,l=l?l.__html:void 0,u!=null&&l!==u&&(i=i||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(i=i||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Fs.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&fe("scroll",e),i||l===u||(i=[])):(i=i||[]).push(c,u))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};d0=function(e,t,n,r){n!==r&&(t.flags|=4)};function ds(e,t){if(!me)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 $e(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 fw(e,t,n){var r=t.pendingProps;switch(_c(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $e(t),null;case 1:return st(t.type)&&Eo(),$e(t),null;case 3:return r=t.stateNode,$r(),he(rt),he(Ke),Oc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Li(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,_t!==null&&(Eu(_t),_t=null))),xu(e,t),$e(t),null;case 5:Fc(t);var s=Gn(Xs.current);if(n=t.type,e!==null&&t.stateNode!=null)c0(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 $e(t),null}if(e=Gn(Ut.current),Li(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[$t]=t,r[qs]=i,e=(t.mode&1)!==0,n){case"dialog":fe("cancel",r),fe("close",r);break;case"iframe":case"object":case"embed":fe("load",r);break;case"video":case"audio":for(s=0;s<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[$t]=t,e[qs]=r,u0(e,t,!1,!1),t.stateNode=e;e:{switch(o=Wl(n,r),n){case"dialog":fe("cancel",e),fe("close",e),s=r;break;case"iframe":case"object":case"embed":fe("load",e),s=r;break;case"video":case"audio":for(s=0;sUr&&(t.flags|=128,r=!0,ds(i,!1),t.lanes=4194304)}else{if(!r)if(e=Lo(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ds(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!me)return $e(t),null}else 2*Se()-i.renderingStartTime>Ur&&n!==1073741824&&(t.flags|=128,r=!0,ds(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Se(),t.sibling=null,n=ge.current,de(ge,r?n&1|2:n&1),t):($e(t),null);case 22:case 23:return Xc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?lt&1073741824&&($e(t),t.subtreeFlags&6&&(t.flags|=8192)):$e(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function hw(e,t){switch(_c(t),t.tag){case 1:return st(t.type)&&Eo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $r(),he(rt),he(Ke),Oc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Fc(t),null;case 13:if(he(ge),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));zr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return he(ge),null;case 4:return $r(),null;case 10:return Dc(t.type._context),null;case 22:case 23:return Xc(),null;case 24:return null;default:return null}}var Ri=!1,Ge=!1,mw=typeof WeakSet=="function"?WeakSet:Set,I=null;function Cr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ke(e,t,r)}else n.current=null}function yu(e,t,n){try{n()}catch(r){ke(e,t,r)}}var Xf=!1;function pw(e,t){if(tu=bo,e=gg(),Tc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,l=-1,u=-1,c=0,d=0,f=e,h=null;t:for(;;){for(var g;f!==n||s!==0&&f.nodeType!==3||(l=o+s),f!==i||r!==0&&f.nodeType!==3||(u=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(g=f.firstChild)!==null;)h=f,f=g;for(;;){if(f===e)break t;if(h===n&&++c===s&&(l=o),h===i&&++d===r&&(u=o),(g=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=g}n=l===-1||u===-1?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(nu={focusedElem:e,selectionRange:n},bo=!1,I=t;I!==null;)if(t=I,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,I=e;else for(;I!==null;){t=I;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,b=v.memoizedState,p=t.stateNode,x=p.getSnapshotBeforeUpdate(t.elementType===t.type?w:Tt(t.type,w),b);p.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(k){ke(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,I=e;break}I=t.return}return v=Xf,Xf=!1,v}function Ts(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&&yu(t,n,i)}s=s.next}while(s!==r)}}function fa(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 vu(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 f0(e){var t=e.alternate;t!==null&&(e.alternate=null,f0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[$t],delete t[qs],delete t[iu],delete t[Z1],delete t[Q1])),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 h0(e){return e.tag===5||e.tag===3||e.tag===4}function Zf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||h0(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 wu(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=jo));else if(r!==4&&(e=e.child,e!==null))for(wu(e,t,n),e=e.sibling;e!==null;)wu(e,t,n),e=e.sibling}function bu(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(bu(e,t,n),e=e.sibling;e!==null;)bu(e,t,n),e=e.sibling}var Fe=null,Nt=!1;function ln(e,t,n){for(n=n.child;n!==null;)m0(e,t,n),n=n.sibling}function m0(e,t,n){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(sa,n)}catch{}switch(n.tag){case 5:Ge||Cr(n,t);case 6:var r=Fe,s=Nt;Fe=null,ln(e,t,n),Fe=r,Nt=s,Fe!==null&&(Nt?(e=Fe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Fe.removeChild(n.stateNode));break;case 18:Fe!==null&&(Nt?(e=Fe,n=n.stateNode,e.nodeType===8?Ka(e.parentNode,n):e.nodeType===1&&Ka(e,n),Hs(e)):Ka(Fe,n.stateNode));break;case 4:r=Fe,s=Nt,Fe=n.stateNode.containerInfo,Nt=!0,ln(e,t,n),Fe=r,Nt=s;break;case 0:case 11:case 14:case 15:if(!Ge&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&yu(n,t,o),s=s.next}while(s!==r)}ln(e,t,n);break;case 1:if(!Ge&&(Cr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ke(n,t,l)}ln(e,t,n);break;case 21:ln(e,t,n);break;case 22:n.mode&1?(Ge=(r=Ge)||n.memoizedState!==null,ln(e,t,n),Ge=r):ln(e,t,n);break;default:ln(e,t,n)}}function Qf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new mw),t.forEach(function(r){var s=jw.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Et(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=o),r&=~i}if(r=s,r=Se()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*xw(r/1960))-r,10e?16:e,gn===null)var r=!1;else{if(e=gn,gn=null,Io=0,te&6)throw Error(D(331));var s=te;for(te|=4,I=e.current;I!==null;){var i=I,o=i.child;if(I.flags&16){var l=i.deletions;if(l!==null){for(var u=0;uSe()-qc?Yn(e,0):Kc|=n),it(e,t)}function k0(e,t){t===0&&(e.mode&1?(t=Ci,Ci<<=1,!(Ci&130023424)&&(Ci=4194304)):t=1);var n=Ze();e=nn(e,t),e!==null&&(ui(e,t,n),it(e,n))}function Sw(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),k0(e,n)}function jw(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),k0(e,n)}var S0;S0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||rt.current)nt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return nt=!1,dw(e,t,n);nt=!!(e.flags&131072)}else nt=!1,me&&t.flags&1048576&&Pg(t,To,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;to(e,t),e=t.pendingProps;var s=Or(t,Ke.current);Vr(t,n),s=Bc(null,t,r,e,s,n);var i=$c();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,st(r)?(i=!0,Co(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Vc(t),s.updater=da,t.stateNode=s,s._reactInternals=t,du(t,r,e,n),t=mu(null,t,r,!0,i,n)):(t.tag=0,me&&i&&Nc(t),qe(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(to(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=Cw(r),e=Tt(r,e),s){case 0:t=hu(null,t,r,e,n);break e;case 1:t=Kf(null,t,r,e,n);break e;case 11:t=Wf(null,t,r,e,n);break e;case 14:t=Gf(null,t,r,Tt(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:Tt(r,s),hu(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Tt(r,s),Kf(e,t,r,s,n);case 3:e:{if(o0(t),e===null)throw Error(D(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Ag(e,t),Mo(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Hr(Error(D(423)),t),t=qf(e,t,r,n,s);break e}else if(r!==s){s=Hr(Error(D(424)),t),t=qf(e,t,r,n,s);break e}else for(ut=Sn(t.stateNode.containerInfo.firstChild),ct=t,me=!0,_t=null,n=Mg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(zr(),r===s){t=rn(e,t,n);break e}qe(e,t,r,n)}t=t.child}return t;case 5:return Dg(t),e===null&&lu(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,ru(r,s)?o=null:i!==null&&ru(r,i)&&(t.flags|=32),i0(e,t),qe(e,t,o,n),t.child;case 6:return e===null&&lu(t),null;case 13:return a0(e,t,n);case 4:return Ic(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Br(t,null,r,n):qe(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Tt(r,s),Wf(e,t,r,s,n);case 7:return qe(e,t,t.pendingProps,n),t.child;case 8:return qe(e,t,t.pendingProps.children,n),t.child;case 12:return qe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,de(No,r._currentValue),r._currentValue=o,i!==null)if(Rt(i.value,o)){if(i.children===s.children&&!rt.current){t=rn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){o=i.child;for(var u=l.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=Jt(-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),uu(i.return,n,t),l.lanes|=n;break}u=u.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(D(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),uu(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}qe(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Vr(t,n),s=bt(s),r=r(s),t.flags|=1,qe(e,t,r,n),t.child;case 14:return r=t.type,s=Tt(r,t.pendingProps),s=Tt(r.type,s),Gf(e,t,r,s,n);case 15:return r0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Tt(r,s),to(e,t),t.tag=1,st(r)?(e=!0,Co(t)):e=!1,Vr(t,n),e0(t,r,s),du(t,r,s,n),mu(null,t,r,!0,e,n);case 19:return l0(e,t,n);case 22:return s0(e,t,n)}throw Error(D(156,t.tag))};function j0(e,t){return Zp(e,t)}function Ew(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 yt(e,t,n,r){return new Ew(e,t,n,r)}function Qc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Cw(e){if(typeof e=="function")return Qc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xc)return 11;if(e===yc)return 14}return 2}function Pn(e,t){var n=e.alternate;return n===null?(n=yt(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 so(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")Qc(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case xr:return Xn(n.children,s,i,t);case gc:o=8,s|=8;break;case Rl:return e=yt(12,n,t,s|2),e.elementType=Rl,e.lanes=i,e;case Vl:return e=yt(13,n,t,s),e.elementType=Vl,e.lanes=i,e;case Il:return e=yt(19,n,t,s),e.elementType=Il,e.lanes=i,e;case Dp:return ma(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Lp:o=10;break e;case Ap:o=9;break e;case xc:o=11;break e;case yc:o=14;break e;case cn:o=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=yt(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function Xn(e,t,n,r){return e=yt(7,e,r,t),e.lanes=n,e}function ma(e,t,n,r){return e=yt(22,e,r,t),e.elementType=Dp,e.lanes=n,e.stateNode={isHidden:!1},e}function tl(e,t,n){return e=yt(6,e,null,t),e.lanes=n,e}function nl(e,t,n){return t=yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Pw(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=Va(0),this.expirationTimes=Va(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Va(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Jc(e,t,n,r,s,i,o,l,u){return e=new Pw(e,t,n,l,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=yt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Vc(i),e}function Tw(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(T0)}catch(e){console.error(e)}}T0(),Tp.exports=ht;var rd=Tp.exports;const N4=pp(rd);var oh=rd;Al.createRoot=oh.createRoot,Al.hydrateRoot=oh.hydrateRoot;/**
* @remix-run/router v1.23.3
*
* Copyright (c) Remix Software Inc.
@@ -65,7 +65,7 @@ Error generating stack: `+i.message+`
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
- */function Bo(){return Bo=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function Pb(e,t){let n=Nu(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(i=>{n.append(s,i)})}),n}const Tb=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Nb=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],_b="6";try{window.__reactRouterVersion=_b}catch{}const Mb=m.createContext({isTransitioning:!1}),Lb="startTransition",hh=kv[Lb];function Ab(e){let{basename:t,children:n,future:r,window:s}=e,i=m.useRef();i.current==null&&(i.current=Aw({window:s,v5Compat:!0}));let o=i.current,[l,u]=m.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},d=m.useCallback(f=>{c&&hh?hh(()=>u(f)):u(f)},[u,c]);return m.useLayoutEffect(()=>o.listen(d),[o,d]),m.useEffect(()=>kb(r),[r]),m.createElement(Sb,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,future:r})}const Db=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Rb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,U=m.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:l,target:u,to:c,preventScrollReset:d,viewTransition:f}=t,h=O0(t,Tb),{basename:g}=m.useContext(an),v,w=!1;if(typeof c=="string"&&Rb.test(c)&&(v=c,Db))try{let y=new URL(window.location.href),k=c.startsWith("//")?new URL(y.protocol+c):new URL(c),E=Wr(k.pathname,g);k.origin===y.origin&&E!=null?c=E+k.search+k.hash:w=!0}catch{}let b=ib(c,{relative:s}),p=Fb(c,{replace:o,state:l,target:u,preventScrollReset:d,relative:s,viewTransition:f});function x(y){r&&r(y),y.defaultPrevented||p(y)}return m.createElement("a",Bo({},h,{href:v||b,onClick:w||i?r:x,ref:n,target:u}))}),Vb=m.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:s=!1,className:i="",end:o=!1,style:l,to:u,viewTransition:c,children:d}=t,f=O0(t,Nb),h=ba(u,{relative:f.relative}),g=et(),v=m.useContext(A0),{navigator:w,basename:b}=m.useContext(an),p=v!=null&&zb(h)&&c===!0,x=w.encodeLocation?w.encodeLocation(h).pathname:h.pathname,y=g.pathname,k=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;s||(y=y.toLowerCase(),k=k?k.toLowerCase():null,x=x.toLowerCase()),k&&b&&(k=Wr(k,b)||k);const E=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let T=y===x||!o&&y.startsWith(x)&&y.charAt(E)==="/",S=k!=null&&(k===x||!o&&k.startsWith(x)&&k.charAt(x.length)==="/"),j={isActive:T,isPending:S,isTransitioning:p},_=T?r:void 0,C;typeof i=="function"?C=i(j):C=[i,T?"active":null,S?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let B=typeof l=="function"?l(j):l;return m.createElement(U,Bo({},f,{"aria-current":_,className:C,ref:n,style:B,to:u,viewTransition:c}),typeof d=="function"?d(j):d)});var _u;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(_u||(_u={}));var mh;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(mh||(mh={}));function Ib(e){let t=m.useContext(va);return t||ye(!1),t}function Fb(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:l}=t===void 0?{}:t,u=es(),c=et(),d=ba(e,{relative:o});return m.useCallback(f=>{if(Cb(f,n)){f.preventDefault();let h=r!==void 0?r:zo(c)===zo(d);u(e,{replace:h,state:s,preventScrollReset:i,relative:o,viewTransition:l})}},[c,u,d,r,s,n,e,i,o,l])}function Ob(e){let t=m.useRef(Nu(e)),n=m.useRef(!1),r=et(),s=m.useMemo(()=>Pb(r.search,n.current?null:t.current),[r.search]),i=es(),o=m.useCallback((l,u)=>{const c=Nu(typeof l=="function"?l(s):l);n.current=!0,i("?"+c,u)},[i,s]);return[s,o]}function zb(e,t){t===void 0&&(t={});let n=m.useContext(Mb);n==null&&ye(!1);let{basename:r}=Ib(_u.useViewTransitionState),s=ba(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Wr(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Wr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Pu(s.pathname,o)!=null||Pu(s.pathname,i)!=null}const Bb="modulepreload",$b=function(e){return"/"+e},ph={},X=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(n.map(u=>{if(u=$b(u),u in ph)return;ph[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":Bb,c||(f.as="script"),f.crossOrigin="",f.href=u,l&&f.setAttribute("nonce",l),document.head.appendChild(f),c)return new Promise((h,g)=>{f.addEventListener("load",h),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return s.then(o=>{for(const l of o||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},ud=m.createContext({});function sn(e){const t=m.useRef(null);return t.current===null&&(t.current=e()),t.current}const Hb=typeof window<"u",hi=Hb?m.useLayoutEffect:m.useEffect,ka=m.createContext(null);function cd(e,t){e.indexOf(t)===-1&&e.push(t)}function $o(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Vt=(e,t,n)=>n>t?t:n{};const An={},z0=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),B0=e=>typeof e=="object"&&e!==null,$0=e=>/^0[^.\s]+$/u.test(e);function H0(e){let t;return()=>(t===void 0&&(t=e()),t)}const ot=e=>e,mi=(...e)=>e.reduce((t,n)=>r=>n(t(r))),Gr=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class fd{constructor(){this.subscriptions=[]}add(t){return cd(this.subscriptions,t),()=>$o(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;ie*1e3,vt=e=>e/1e3,hd=(e,t)=>t?e*(1e3/t):0,U0=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ub=1e-7,Wb=12;function Gb(e,t,n,r,s){let i,o,l=0;do o=t+(n-t)/2,i=U0(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>Ub&&++lGb(i,0,1,e,n);return i=>i===0||i===1?i:U0(s(i),t,r)}const W0=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,G0=e=>t=>1-e(1-t),K0=pi(.33,1.53,.69,.99),md=G0(K0),q0=W0(md),Y0=e=>e>=1?1:(e*=2)<1?.5*md(e):.5*(2-Math.pow(2,-10*(e-1))),pd=e=>1-Math.sin(Math.acos(e)),X0=G0(pd),Z0=W0(pd),Kb=pi(.42,0,1,1),qb=pi(0,0,.58,1),Q0=pi(.42,0,.58,1),Yb=e=>Array.isArray(e)&&typeof e[0]!="number",J0=e=>Array.isArray(e)&&typeof e[0]=="number",Xb={linear:ot,easeIn:Kb,easeInOut:Q0,easeOut:qb,circIn:pd,circInOut:Z0,circOut:X0,backIn:md,backInOut:q0,backOut:K0,anticipate:Y0},Zb=e=>typeof e=="string",gh=e=>{if(J0(e)){dd(e.length===4);const[t,n,r,s]=e;return pi(t,n,r,s)}else if(Zb(e))return Xb[e];return e},Fi=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Qb(e){let t=new Set,n=new Set,r=!1,s=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function l(c){i.has(c)&&(u.schedule(c),e()),c(o)}const u={schedule:(c,d=!1,f=!1)=>{const g=f&&r?t:n;return d&&i.add(c),g.add(c),c},cancel:c=>{n.delete(c),i.delete(c)},process:c=>{if(o=c,r){s=!0;return}r=!0;const d=t;t=n,n=d,t.forEach(l),t.clear(),r=!1,s&&(s=!1,u.process(c))}};return u}const Jb=40;function ex(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=Fi.reduce((y,k)=>(y[k]=Qb(i),y),{}),{setup:l,read:u,resolveKeyframes:c,preUpdate:d,update:f,preRender:h,render:g,postRender:v}=o,w=()=>{const y=An.useManualTiming,k=y?s.timestamp:performance.now();n=!1,y||(s.delta=r?1e3/60:Math.max(Math.min(k-s.timestamp,Jb),1)),s.timestamp=k,s.isProcessing=!0,l.process(s),u.process(s),c.process(s),d.process(s),f.process(s),h.process(s),g.process(s),v.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(w))},b=()=>{n=!0,r=!0,s.isProcessing||e(w)};return{schedule:Fi.reduce((y,k)=>{const E=o[k];return y[k]=(T,S=!1,j=!1)=>(n||b(),E.schedule(T,S,j)),y},{}),cancel:y=>{for(let k=0;k(io===void 0&&Ye.set(Ae.isProcessing||An.useManualTiming?Ae.timestamp:performance.now()),io),set:e=>{io=e,queueMicrotask(ek)}},tx=e=>t=>typeof t=="string"&&t.startsWith(e),nx=tx("--"),tk=tx("var(--"),gd=e=>tk(e)?nk.test(e.split("/*")[0].trim()):!1,nk=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function xh(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const ts={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ri={...ts,transform:e=>Vt(0,1,e)},Oi={...ts,default:1},Ms=e=>Math.round(e*1e5)/1e5,xd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function rk(e){return e==null}const sk=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,yd=(e,t)=>n=>!!(typeof n=="string"&&sk.test(n)&&n.startsWith(e)||t&&!rk(n)&&Object.prototype.hasOwnProperty.call(n,t)),rx=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,l]=r.match(xd);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},ik=e=>Vt(0,255,e),il={...ts,transform:e=>Math.round(ik(e))},Kn={test:yd("rgb","red"),parse:rx("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+il.transform(e)+", "+il.transform(t)+", "+il.transform(n)+", "+Ms(ri.transform(r))+")"};function ok(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 Mu={test:yd("#"),parse:ok,transform:Kn.transform},gi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Kt=gi("deg"),Wt=gi("%"),O=gi("px"),ak=gi("vh"),lk=gi("vw"),yh={...Wt,parse:e=>Wt.parse(e)/100,transform:e=>Wt.transform(e*100)},Tr={test:yd("hsl","hue"),parse:rx("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Wt.transform(Ms(t))+", "+Wt.transform(Ms(n))+", "+Ms(ri.transform(r))+")"},Ce={test:e=>Kn.test(e)||Mu.test(e)||Tr.test(e),parse:e=>Kn.test(e)?Kn.parse(e):Tr.test(e)?Tr.parse(e):Mu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Kn.transform(e):Tr.transform(e),getAnimatableNone:e=>{const t=Ce.parse(e);return t.alpha=0,Ce.transform(t)}},uk=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ck(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(xd))==null?void 0:t.length)||0)+(((n=e.match(uk))==null?void 0:n.length)||0)>0}const sx="number",ix="color",dk="var",fk="var(",vh="${}",hk=/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 Kr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const l=t.replace(hk,u=>(Ce.test(u)?(r.color.push(i),s.push(ix),n.push(Ce.parse(u))):u.startsWith(fk)?(r.var.push(i),s.push(dk),n.push(u)):(r.number.push(i),s.push(sx),n.push(parseFloat(u))),++i,vh)).split(vh);return{values:n,split:l,indexes:r,types:s}}function mk(e){return Kr(e).values}function ox({split:e,types:t}){const n=e.length;return r=>{let s="";for(let i=0;itypeof e=="number"?0:Ce.test(e)?Ce.getAnimatableNone(e):e,xk=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:gk(e);function yk(e){const t=Kr(e);return ox(t)(t.values.map((r,s)=>xk(r,t.split[s])))}const Dt={test:ck,parse:mk,createTransformer:pk,getAnimatableNone:yk};function ol(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 vk({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const l=n<.5?n*(1+t):n+t-n*t,u=2*n-l;s=ol(u,l,e+1/3),i=ol(u,l,e),o=ol(u,l,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Ho(e,t){return n=>n>0?t:e}const ue=(e,t,n)=>e+(t-e)*n,al=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},wk=[Mu,Kn,Tr],bk=e=>wk.find(t=>t.test(e));function wh(e){const t=bk(e);if(!t)return!1;let n=t.parse(e);return t===Tr&&(n=vk(n)),n}const bh=(e,t)=>{const n=wh(e),r=wh(t);if(!n||!r)return Ho(e,t);const s={...n};return i=>(s.red=al(n.red,r.red,i),s.green=al(n.green,r.green,i),s.blue=al(n.blue,r.blue,i),s.alpha=ue(n.alpha,r.alpha,i),Kn.transform(s))},Lu=new Set(["none","hidden"]);function kk(e,t){return Lu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Sk(e,t){return n=>ue(e,t,n)}function vd(e){return typeof e=="number"?Sk:typeof e=="string"?gd(e)?Ho:Ce.test(e)?bh:Ck:Array.isArray(e)?ax:typeof e=="object"?Ce.test(e)?bh:jk:Ho}function ax(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>vd(i)(i,t[o]));return i=>{for(let o=0;o{for(const i in r)n[i]=r[i](s);return n}}function Ek(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s{const n=Dt.createTransformer(t),r=Kr(e),s=Kr(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?Lu.has(e)&&!s.values.length||Lu.has(t)&&!r.values.length?kk(e,t):mi(ax(Ek(r,s),s.values),n):Ho(e,t)};function lx(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ue(e,t,n):vd(e)(e,t)}const Pk=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>J.update(t,n),stop:()=>St(t),now:()=>Ae.isProcessing?Ae.timestamp:Ye.now()}},ux=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i=Uo?1/0:t}function Tk(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(wd(r),Uo);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:vt(s)}}const be={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 Au(e,t){return e*Math.sqrt(1-t*t)}const Nk=12;function _k(e,t,n){let r=n;for(let s=1;s{const d=c*o,f=d*e,h=d-n,g=Au(c,o),v=Math.exp(-f);return ll-h/g*v},i=c=>{const f=c*o*e,h=f*n+n,g=Math.pow(o,2)*Math.pow(c,2)*e,v=Math.exp(-f),w=Au(Math.pow(c,2),o);return(-s(c)+ll>0?-1:1)*((h-g)*v)/w}):(s=c=>{const d=Math.exp(-c*e),f=(c-n)*e+1;return-ll+d*f},i=c=>{const d=Math.exp(-c*e),f=(n-c)*(e*e);return d*f});const l=5/e,u=_k(s,i,l);if(e=dt(e),isNaN(u))return{stiffness:be.stiffness,damping:be.damping,duration:e};{const c=Math.pow(u,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const Lk=["duration","bounce"],Ak=["stiffness","damping","mass"];function kh(e,t){return t.some(n=>e[n]!==void 0)}function Dk(e){let t={velocity:be.velocity,stiffness:be.stiffness,damping:be.damping,mass:be.mass,isResolvedFromDuration:!1,...e};if(!kh(e,Ak)&&kh(e,Lk))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*Vt(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:be.mass,stiffness:s,damping:i}}else{const n=Mk({...e,velocity:0});t={...t,...n,mass:be.mass},t.isResolvedFromDuration=!0}return t}function Wo(e=be.visualDuration,t=be.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:i},{stiffness:u,damping:c,mass:d,duration:f,velocity:h,isResolvedFromDuration:g}=Dk({...n,velocity:-vt(n.velocity||0)}),v=h||0,w=c/(2*Math.sqrt(u*d)),b=o-i,p=vt(Math.sqrt(u/d)),x=Math.abs(b)<5;r||(r=x?be.restSpeed.granular:be.restSpeed.default),s||(s=x?be.restDelta.granular:be.restDelta.default);let y,k,E,T,S,j;if(w<1)E=Au(p,w),T=(v+w*p*b)/E,y=C=>{const B=Math.exp(-w*p*C);return o-B*(T*Math.sin(E*C)+b*Math.cos(E*C))},S=w*p*T+b*E,j=w*p*b-T*E,k=C=>Math.exp(-w*p*C)*(S*Math.sin(E*C)+j*Math.cos(E*C));else if(w===1){y=B=>o-Math.exp(-p*B)*(b+(v+p*b)*B);const C=v+p*b;k=B=>Math.exp(-p*B)*(p*C*B-v)}else{const C=p*Math.sqrt(w*w-1);y=W=>{const K=Math.exp(-w*p*W),q=Math.min(C*W,300);return o-K*((v+w*p*b)*Math.sinh(q)+C*b*Math.cosh(q))/C};const B=(v+w*p*b)/C,H=w*p*B-b*C,ee=w*p*b-B*C;k=W=>{const K=Math.exp(-w*p*W),q=Math.min(C*W,300);return K*(H*Math.sinh(q)+ee*Math.cosh(q))}}const _={calculatedDuration:g&&f||null,velocity:C=>dt(k(C)),next:C=>{if(!g&&w<1){const H=Math.exp(-w*p*C),ee=Math.sin(E*C),W=Math.cos(E*C),K=o-H*(T*ee+b*W),q=dt(H*(S*ee+j*W));return l.done=Math.abs(q)<=r&&Math.abs(o-K)<=s,l.value=l.done?o:K,l}const B=y(C);if(g)l.done=C>=f;else{const H=dt(k(C));l.done=Math.abs(H)<=r&&Math.abs(o-B)<=s}return l.value=l.done?o:B,l},toString:()=>{const C=Math.min(wd(_),Uo),B=ux(H=>_.next(C*H).value,C,30);return C+"ms "+B},toTransition:()=>{}};return _}Wo.applyToOptions=e=>{const t=Tk(e,100,Wo);return e.ease=t.ease,e.duration=dt(t.duration),e.type="keyframes",e};const Rk=5;function cx(e,t,n){const r=Math.max(t-Rk,0);return hd(n-e(r),t-r)}function Du({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:l,max:u,restDelta:c=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},g=j=>l!==void 0&&ju,v=j=>l===void 0?u:u===void 0||Math.abs(l-j)-w*Math.exp(-j/r),y=j=>p+x(j),k=j=>{const _=x(j),C=y(j);h.done=Math.abs(_)<=c,h.value=h.done?p:C};let E,T;const S=j=>{g(h.value)&&(E=j,T=Wo({keyframes:[h.value,v(h.value)],velocity:cx(y,j,h.value),damping:s,stiffness:i,restDelta:c,restSpeed:d}))};return S(0),{calculatedDuration:null,next:j=>{let _=!1;return!T&&E===void 0&&(_=!0,k(j),S(j)),E!==void 0&&j>=E?T.next(j-E):(!_&&k(j),h)}}}function Vk(e,t,n){const r=[],s=n||An.mix||lx,i=e.length-1;for(let o=0;ot[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=Vk(t,r,s),u=l.length,c=d=>{if(o&&d1)for(;fc(Vt(e[0],e[i-1],d)):c}function Ik(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Gr(0,t,r);e.push(ue(n,1,s))}}function dx(e){const t=[0];return Ik(t,e.length-1),t}function Fk(e,t){return e.map(n=>n*t)}function Ok(e,t){return e.map(()=>t||Q0).splice(0,e.length-1)}function Ls({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=Yb(r)?r.map(gh):gh(r),i={done:!1,value:t[0]},o=Fk(n&&n.length===t.length?n:dx(t),e),l=bd(o,t,{ease:Array.isArray(s)?s:Ok(t,s)});return{calculatedDuration:e,next:u=>(i.value=l(u),i.done=u>=e,i)}}const zk=e=>e!==null;function Sa(e,{repeat:t,repeatType:n="loop"},r,s=1){const i=e.filter(zk),l=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!l||r===void 0?i[l]:r}const Bk={decay:Du,inertia:Du,tween:Ls,keyframes:Ls,spring:Wo};function fx(e){typeof e.type=="string"&&(e.type=Bk[e.type])}class kd{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 $k=e=>e/100;class si extends kd{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!==Ye.now()&&this.tick(Ye.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;fx(t);const{type:n=Ls,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=t;let{keyframes:l}=t;const u=n||Ls;u!==Ls&&typeof l[0]!="number"&&(this.mixKeyframes=mi($k,lx(l[0],l[1])),l=[0,100]);const c=u({...t,keyframes:l});i==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...l].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=wd(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:o,resolvedDuration:l,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:d,repeat:f,repeatType:h,repeatDelay:g,type:v,onUpdate:w,finalKeyframe:b}=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 p=this.currentTime-c*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?p<0:p>s;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let y=this.currentTime,k=r;if(f){const j=Math.min(this.currentTime,s)/l;let _=Math.floor(j),C=j%1;!C&&j>=1&&(C=1),C===1&&_--,_=Math.min(_,f+1),!!(_%2)&&(h==="reverse"?(C=1-C,g&&(C-=g/l)):h==="mirror"&&(k=o)),y=Vt(0,1,C)*l}let E;x?(this.delayState.value=d[0],E=this.delayState):E=k.next(y),i&&!x&&(E.value=i(E.value));let{done:T}=E;!x&&u!==null&&(T=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return S&&v!==Du&&(E.value=Sa(d,this.options,b,this.speed)),w&&w(E.value),S&&this.finish(),E}then(t,n){return this.finished.then(t,n)}get duration(){return vt(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+vt(t)}get time(){return vt(this.currentTime)}set time(t){t=dt(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 cx(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(Ye.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=vt(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:t=Pk,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(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(Ye.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 Hk(e){for(let t=1;te*180/Math.PI,Ru=e=>{const t=qn(Math.atan2(e[1],e[0]));return Vu(t)},Uk={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ru,rotateZ:Ru,skewX:e=>qn(Math.atan(e[1])),skewY:e=>qn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Vu=e=>(e=e%360,e<0&&(e+=360),e),Sh=Ru,jh=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Eh=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Wk={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:jh,scaleY:Eh,scale:e=>(jh(e)+Eh(e))/2,rotateX:e=>Vu(qn(Math.atan2(e[6],e[5]))),rotateY:e=>Vu(qn(Math.atan2(-e[2],e[0]))),rotateZ:Sh,rotate:Sh,skewX:e=>qn(Math.atan(e[4])),skewY:e=>qn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Iu(e){return e.includes("scale")?1:0}function Fu(e,t){if(!e||e==="none")return Iu(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=Wk,s=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Uk,s=l}if(!s)return Iu(t);const i=r[t],o=s[1].split(",").map(Kk);return typeof i=="function"?i(o):o[i]}const Gk=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Fu(n,t)};function Kk(e){return parseFloat(e.trim())}const ns=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],rs=new Set([...ns,"pathRotation"]),Ch=e=>e===ts||e===O,qk=new Set(["x","y","z"]),Yk=ns.filter(e=>!qk.has(e));function Xk(e){const t=[];return Yk.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const yn={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})=>Fu(t,"x"),y:(e,{transform:t})=>Fu(t,"y")};yn.translateX=yn.x;yn.translateY=yn.y;const Zn=new Set;let Ou=!1,zu=!1,Bu=!1;function hx(){if(zu){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=Xk(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var l;(l=r.getValue(i))==null||l.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}zu=!1,Ou=!1,Zn.forEach(e=>e.complete(Bu)),Zn.clear()}function mx(){Zn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(zu=!0)})}function Zk(){Bu=!0,mx(),hx(),Bu=!1}class Sd{constructor(t,n,r,s,i,o=!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=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Zn.add(this),Ou||(Ou=!0,J.read(mx),J.resolveKeyframes(hx))):(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(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,o);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=o),s&&i===void 0&&s.set(t[0])}Hk(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 Qk=e=>e.startsWith("--");function px(e,t,n){Qk(t)?e.style.setProperty(t,n):e.style[t]=n}const Jk={};function jd(e,t){const n=H0(e);return()=>Jk[t]??n()}const Ed=jd(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),gx=jd(()=>window.ViewTimeline!==void 0,"viewTimeline"),xx=jd(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ws=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ph={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ws([0,.65,.55,1]),circOut:ws([.55,0,1,.45]),backIn:ws([.31,.01,.66,-.59]),backOut:ws([.33,1.53,.69,.99])};function yx(e,t){if(e)return typeof e=="function"?xx()?ux(e,t):"ease-out":J0(e)?ws(e):Array.isArray(e)?e.map(n=>yx(n,t)||Ph.easeOut):Ph[e]}function eS(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:l="easeOut",times:u}={},c=void 0){const d={[t]:n};u&&(d.offset=u);const f=yx(l,s);Array.isArray(f)&&(d.easing=f);const h={delay:r,duration:s,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),e.animate(d,h)}function vx(e){return typeof e=="function"&&"applyToOptions"in e}function tS({type:e,...t}){return vx(e)&&xx()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class wx extends kd{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:o=!1,finalKeyframe:l,onComplete:u}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,dd(typeof t.type!="string");const c=tS(t);this.animation=eS(n,r,s,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=Sa(s,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(d),px(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 vt(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+vt(t)}get time(){return vt(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=dt(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&&Ed()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),ot):s(this)}}const bx={anticipate:Y0,backInOut:q0,circInOut:Z0};function nS(e){return e in bx}function rS(e){typeof e.ease=="string"&&nS(e.ease)&&(e.ease=bx[e.ease])}const ul=10;class sS extends wx{constructor(t){rS(t),fx(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,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new si({...o,autoplay:!1}),u=Math.max(ul,Ye.now()-this.startTime),c=Vt(0,ul,u-ul),d=l.sample(u).value,{name:f}=this.options;i&&f&&px(i,f,d),n.setWithVelocity(l.sample(Math.max(0,u-c)).value,d,c),l.stop()}}const Th=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Dt.test(e)||e==="0")&&!e.startsWith("url("));function iS(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nObject.hasOwnProperty.call(Element.prototype,"animate"));function dS(e){var f;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:i,type:o,keyframes:l}=e;if(!(((f=t==null?void 0:t.owner)==null?void 0:f.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:d}=t.owner.getProps();return cS()&&n&&(kx.has(n)||uS.has(n)&&lS(l))&&(n!=="transform"||!d)&&!c&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const fS=40;class hS extends kd{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",keyframes:l,name:u,motionValue:c,element:d,...f}){var v;super(),this.stop=()=>{var w,b;this._animation&&(this._animation.stop(),(w=this.stopTimeline)==null||w.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=Ye.now();const h={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:u,motionValue:c,element:d,...f},g=(d==null?void 0:d.KeyframeResolver)||Sd;this.keyframeResolver=new g(l,(w,b,p)=>this.onKeyframesResolved(w,b,h,!p),u,c,d),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,n,r,s){var p,x;this.keyframeResolver=void 0;const{name:i,type:o,velocity:l,delay:u,isHandoff:c,onUpdate:d}=r;this.resolvedAt=Ye.now();let f=!0;oS(t,i,o,l)||(f=!1,(An.instantAnimations||!u)&&(d==null||d(Sa(t,r,n))),t[0]=t[t.length-1],$u(r),r.repeat=0);const g={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>fS?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},v=f&&!c&&dS(g),w=(x=(p=g.motionValue)==null?void 0:p.owner)==null?void 0:x.current;let b;if(v)try{b=new sS({...g,element:w})}catch{b=new si(g)}else b=new si(g);b.finished.then(()=>{this.notifyFinished()}).catch(ot),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}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(),Zk()),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 Sx(e,t,n,r=0,s=1){const i=Array.from(e).sort((c,d)=>c.sortNodePosition(d)).indexOf(t),o=e.size,l=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:l-i*r}const Nh=30,mS=e=>!isNaN(parseFloat(e)),As={current:void 0};class pS{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=Ye.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 o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ye.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=mS(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 fd);const r=this.events[t].add(n);return t==="change"?()=>{r(),J.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 As.current&&As.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Ye.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Nh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Nh);return hd(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 Mt(e,t){return new pS(e,t)}function Cd(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Pd(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?Cd(n,e):n}const gS={type:"spring",stiffness:500,damping:25,restSpeed:10},xS=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),yS={type:"keyframes",duration:.8},vS={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wS=(e,{keyframes:t})=>t.length>2?yS:rs.has(e)?e.startsWith("scale")?xS(t[1]):gS:vS,bS=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function kS(e){for(const t in e)if(!bS.has(t))return!0;return!1}const Td=(e,t,n,r={},s,i)=>o=>{const l=Pd(r,e)||{},u=l.delay||r.delay||0;let{elapsed:c=0}=r;c=c-dt(u);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-c,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:i?void 0:s};kS(l)||Object.assign(d,wS(e,d)),d.duration&&(d.duration=dt(d.duration)),d.repeatDelay&&(d.repeatDelay=dt(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&($u(d),d.delay===0&&(f=!0)),(An.instantAnimations||An.skipAnimations||s!=null&&s.shouldSkipAnimations||l.skipAnimations)&&(f=!0,$u(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,f&&!i&&t.get()!==void 0){const h=Sa(d.keyframes,l);if(h!==void 0){J.update(()=>{d.onUpdate(h),d.onComplete()});return}}return l.isSync?new si(d):new hS(d)},SS=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function jS(e){const t=SS.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function jx(e,t,n=1){const[r,s]=jS(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return z0(o)?parseFloat(o):o}return gd(s)?jx(s,t,n+1):s}function _h(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Nd(e,t,n,r){if(typeof t=="function"){const[s,i]=_h(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]=_h(r);t=t(n!==void 0?n:e.custom,s,i)}return t}function Qn(e,t,n){const r=e.getProps();return Nd(r,t,n!==void 0?n:r.custom,e)}const Ex=new Set(["width","height","top","left","right","bottom",...ns]),Hu=e=>Array.isArray(e);function ES(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Mt(n))}function CS(e){return Hu(e)?e[e.length-1]||0:e}function PS(e,t){const n=Qn(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const l=CS(i[o]);ES(e,o,l)}}const Le=e=>!!(e&&e.getVelocity);function TS(e){return!!(Le(e)&&e.add)}function Uu(e,t){const n=e.getValue("willChange");if(TS(n))return n.add(t);if(!n&&An.WillChange){const r=new An.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function _d(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const NS="framerAppearId",Cx="data-"+_d(NS);function Px(e){return e.props[Cx]}function _S({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Tx(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:o,...l}=t;const u=e.getDefaultTransition();i=i?Cd(i,u):u;const c=i==null?void 0:i.reduceMotion,d=i==null?void 0:i.skipAnimations;r&&(i=r);const f=[],h=s&&e.animationState&&e.animationState.getState()[s],g=i==null?void 0:i.path;g&&g.animateVisualElement(e,l,i,n,f);for(const v in l){const w=e.getValue(v,e.latestValues[v]??null),b=l[v];if(b===void 0||h&&_S(h,v))continue;const p={delay:n,...Pd(i||{},v)};d&&(p.skipAnimations=!0);const x=w.get();if(x!==void 0&&!w.isAnimating()&&!Array.isArray(b)&&b===x&&!p.velocity){J.update(()=>w.set(b));continue}let y=!1;if(window.MotionHandoffAnimation){const T=Px(e);if(T){const S=window.MotionHandoffAnimation(T,v,J);S!==null&&(p.startTime=S,y=!0)}}Uu(e,v);const k=c??e.shouldReduceMotion;w.start(Td(v,w,b,k&&Ex.has(v)?{type:!1}:p,e,y));const E=w.animation;E&&f.push(E)}if(o){const v=()=>J.update(()=>{o&&PS(e,o)});f.length?Promise.all(f).then(v):v()}return f}function Wu(e,t,n={}){var u;const r=Qn(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(Tx(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=s;return MS(e,t,c,d,f,h,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,d]=l==="beforeChildren"?[i,o]:[o,i];return c().then(()=>d())}else return Promise.all([i(),o(n.delay)])}function MS(e,t,n=0,r=0,s=0,i=1,o){const l=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),l.push(Wu(u,t,{...o,delay:n+(typeof r=="function"?0:r)+Sx(e.variantChildren,u,r,s,i)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(l)}function LS(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>Wu(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=Wu(e,t,n);else{const s=typeof t=="function"?Qn(e,t,n.custom):t;r=Promise.all(Tx(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const AS={test:e=>e==="auto",parse:e=>e},Nx=e=>t=>t.test(e),_x=[ts,O,Wt,Kt,lk,ak,AS],Mh=e=>_x.find(Nx(e));function DS(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||$0(e):!0}const RS=new Set(["brightness","contrast","saturate","opacity"]);function VS(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(xd)||[];if(!r)return e;const s=n.replace(r,"");let i=RS.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const IS=/\b([a-z-]*)\(.*?\)/gu,Gu={...Dt,getAnimatableNone:e=>{const t=e.match(IS);return t?t.map(VS).join(" "):e}},Ku={...Dt,getAnimatableNone:e=>{const t=Dt.parse(e);return Dt.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Lh={...ts,transform:Math.round},FS={rotate:Kt,pathRotation:Kt,rotateX:Kt,rotateY:Kt,rotateZ:Kt,scale:Oi,scaleX:Oi,scaleY:Oi,scaleZ:Oi,skew:Kt,skewX:Kt,skewY:Kt,distance:O,translateX:O,translateY:O,translateZ:O,x:O,y:O,z:O,perspective:O,transformPerspective:O,opacity:ri,originX:yh,originY:yh,originZ:O},Go={borderWidth:O,borderTopWidth:O,borderRightWidth:O,borderBottomWidth:O,borderLeftWidth:O,borderRadius:O,borderTopLeftRadius:O,borderTopRightRadius:O,borderBottomRightRadius:O,borderBottomLeftRadius:O,width:O,maxWidth:O,height:O,maxHeight:O,top:O,right:O,bottom:O,left:O,inset:O,insetBlock:O,insetBlockStart:O,insetBlockEnd:O,insetInline:O,insetInlineStart:O,insetInlineEnd:O,padding:O,paddingTop:O,paddingRight:O,paddingBottom:O,paddingLeft:O,paddingBlock:O,paddingBlockStart:O,paddingBlockEnd:O,paddingInline:O,paddingInlineStart:O,paddingInlineEnd:O,margin:O,marginTop:O,marginRight:O,marginBottom:O,marginLeft:O,marginBlock:O,marginBlockStart:O,marginBlockEnd:O,marginInline:O,marginInlineStart:O,marginInlineEnd:O,fontSize:O,backgroundPositionX:O,backgroundPositionY:O,...FS,zIndex:Lh,fillOpacity:ri,strokeOpacity:ri,numOctaves:Lh},OS={...Go,color:Ce,backgroundColor:Ce,outlineColor:Ce,fill:Ce,stroke:Ce,borderColor:Ce,borderTopColor:Ce,borderRightColor:Ce,borderBottomColor:Ce,borderLeftColor:Ce,filter:Gu,WebkitFilter:Gu,mask:Ku,WebkitMask:Ku},Mx=e=>OS[e],zS=new Set([Gu,Ku]);function Lx(e,t){let n=Mx(e);return zS.has(n)||(n=Dt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const BS=new Set(["auto","none","0"]);function $S(e,t,n){let r=0,s;for(;r{t.getValue(u).set(c)}),this.resolveNoneKeyframes()}}const Md=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Ax(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 qu=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Ds(e){return B0(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:qr,cancel:Dx}=ex(queueMicrotask,!1),Pt={x:!1,y:!1};function Rx(){return Pt.x||Pt.y}function US(e){return e==="x"||e==="y"?Pt[e]?null:(Pt[e]=!0,()=>{Pt[e]=!1}):Pt.x||Pt.y?null:(Pt.x=Pt.y=!0,()=>{Pt.x=Pt.y=!1})}function Vx(e,t){const n=Ax(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function WS(e){return!(e.pointerType==="touch"||Rx())}function GS(e,t,n={}){const[r,s,i]=Vx(e,n);return r.forEach(o=>{let l=!1,u=!1,c;const d=()=>{o.removeEventListener("pointerleave",v)},f=b=>{c&&(c(b),c=void 0),d()},h=b=>{l=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),u&&(u=!1,f(b))},g=()=>{l=!0,window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",h,s)},v=b=>{if(b.pointerType!=="touch"){if(l){u=!0;return}f(b)}},w=b=>{if(!WS(b))return;u=!1;const p=t(o,b);typeof p=="function"&&(c=p,o.addEventListener("pointerleave",v,s))};o.addEventListener("pointerenter",w,s),o.addEventListener("pointerdown",g,s)}),i}const Ix=(e,t)=>t?e===t?!0:Ix(e,t.parentElement):!1,Ld=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,KS=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function qS(e){return KS.has(e.tagName)||e.isContentEditable===!0}const YS=new Set(["INPUT","SELECT","TEXTAREA"]);function XS(e){return YS.has(e.tagName)||e.isContentEditable===!0}const oo=new WeakSet;function Ah(e){return t=>{t.key==="Enter"&&e(t)}}function cl(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const ZS=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Ah(()=>{if(oo.has(n))return;cl(n,"down");const s=Ah(()=>{cl(n,"up")}),i=()=>cl(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 Dh(e){return Ld(e)&&!Rx()}const Rh=new WeakSet;function QS(e,t,n={}){const[r,s,i]=Vx(e,n),o=l=>{const u=l.currentTarget;if(!Dh(l)||Rh.has(l))return;oo.add(u),n.stopPropagation&&Rh.add(l);const c=t(u,l),d={...s,capture:!0},f=(v,w)=>{window.removeEventListener("pointerup",h,d),window.removeEventListener("pointercancel",g,d),oo.has(u)&&oo.delete(u),Dh(v)&&typeof c=="function"&&c(v,{success:w})},h=v=>{f(v,u===window||u===document||n.useGlobalTarget||Ix(u,v.target))},g=v=>{f(v,!1)};window.addEventListener("pointerup",h,d),window.addEventListener("pointercancel",g,d)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",o,s),Ds(l)&&(l.addEventListener("focus",c=>ZS(c,s)),!qS(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),i}function Ad(e){return B0(e)&&"ownerSVGElement"in e}const ao=new WeakMap;let un;const Fx=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:Ad(r)&&"getBBox"in r?r.getBBox()[t]:r[n],JS=Fx("inline","width","offsetWidth"),e2=Fx("block","height","offsetHeight");function t2({target:e,borderBoxSize:t}){var n;(n=ao.get(e))==null||n.forEach(r=>{r(e,{get width(){return JS(e,t)},get height(){return e2(e,t)}})})}function n2(e){e.forEach(t2)}function r2(){typeof ResizeObserver>"u"||(un=new ResizeObserver(n2))}function s2(e,t){un||r2();const n=Ax(e);return n.forEach(r=>{let s=ao.get(r);s||(s=new Set,ao.set(r,s)),s.add(t),un==null||un.observe(r)}),()=>{n.forEach(r=>{const s=ao.get(r);s==null||s.delete(t),s!=null&&s.size||un==null||un.unobserve(r)})}}const lo=new Set;let Nr;function i2(){Nr=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};lo.forEach(t=>t(e))},window.addEventListener("resize",Nr)}function o2(e){return lo.add(e),Nr||i2(),()=>{lo.delete(e),!lo.size&&typeof Nr=="function"&&(window.removeEventListener("resize",Nr),Nr=void 0)}}function Yu(e,t){return typeof e=="function"?o2(e):s2(e,t)}function Ox(e,t){let n;const r=()=>{const{currentTime:s}=t,o=(s===null?0:s.value)/100;n!==o&&e(o),n=o};return J.preUpdate(r,!0),()=>St(r)}function a2(e){return Ad(e)&&e.tagName==="svg"}function l2(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],s=e[1+n],i=e[2+n],o=e[3+n],l=bd(s,i,o);return t?l(r):l}function u2(e,t,n={}){const r=e.get();let s=null,i=r,o;const l=typeof r=="string"?r.replace(/[\d.-]/g,""):void 0,u=()=>{s&&(s.stop(),s=null),e.animation=void 0},c=()=>{const f=Vh(e.get()),h=Vh(i);if(f===h){u();return}const g=s?s.getGeneratorVelocity():e.getVelocity();u(),s=new si({keyframes:[f,h],velocity:g,type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:o})},d=()=>{var f;c(),e.animation=s??void 0,(f=e.events.animationStart)==null||f.notify(),s==null||s.then(()=>{var h;e.animation=void 0,(h=e.events.animationComplete)==null||h.notify()})};if(e.attach((f,h)=>{i=f,o=g=>h(dl(g,l)),J.postRender(d)},u),Le(t)){let f=n.skipInitialAnimation===!0;const h=t.on("change",v=>{f?(f=!1,e.jump(dl(v,l),!1)):e.set(dl(v,l))}),g=e.on("destroy",h);return()=>{h(),g()}}return u}function dl(e,t){return t?e+t:e}function Vh(e){return typeof e=="number"?e:parseFloat(e)}const c2=[..._x,Ce,Dt],d2=e=>c2.find(Nx(e)),Ih=()=>({translate:0,scale:1,origin:0,originPoint:0}),_r=()=>({x:Ih(),y:Ih()}),Fh=()=>({min:0,max:0}),Ne=()=>({x:Fh(),y:Fh()}),f2=new WeakMap;function ja(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ii(e){return typeof e=="string"||Array.isArray(e)}const Dd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Rd=["initial",...Dd];function Ea(e){return ja(e.animate)||Rd.some(t=>ii(e[t]))}function zx(e){return!!(Ea(e)||e.variants)}function h2(e,t,n){for(const r in t){const s=t[r],i=n[r];if(Le(s))e.addValue(r,s);else if(Le(i))e.addValue(r,Mt(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,Mt(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Ko={current:null},Vd={current:!1},m2=typeof window<"u";function Bx(){if(Vd.current=!0,!!m2)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ko.current=e.matches;e.addEventListener("change",t),t()}else Ko.current=!1}const Oh=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let qo={};function $x(e){qo=e}function p2(){return qo}class g2{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:o,visualState:l},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=Sd,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 g=Ye.now();this.renderScheduledAtthis.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Vd.current||Bx(),this.shouldReduceMotion=Ko.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(),St(this.notifyUpdate),St(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&&kx.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:l,times:u,ease:c,duration:d}=n.accelerate,f=new wx({element:this.current,name:t,keyframes:l,times:u,ease:c,duration:dt(d)}),h=o(f);this.valueSubscriptions.set(t,()=>{h(),f.cancel()});return}const r=rs.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&J.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 qo){const n=qo[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):Ne()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Mt(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"&&(z0(r)||$0(r))?r=parseFloat(r):!d2(r)&&Dt.test(n)&&(r=Lx(t,n)),this.setBaseTarget(t,Le(r)?r.get():r)),Le(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 o=Nd(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Le(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 fd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){qr.render(this.render)}}class Hx extends g2{constructor(){super(...arguments),this.KeyframeResolver=HS}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;Le(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class In{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Ux({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function x2({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function y2(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 fl(e){return e===void 0||e===1}function Xu({scale:e,scaleX:t,scaleY:n}){return!fl(e)||!fl(t)||!fl(n)}function Hn(e){return Xu(e)||Wx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Wx(e){return zh(e.x)||zh(e.y)}function zh(e){return e&&e!=="0%"}function Yo(e,t,n){const r=e-n,s=t*r;return n+s}function Bh(e,t,n,r,s){return s!==void 0&&(e=Yo(e,s,r)),Yo(e,n,r)+t}function Zu(e,t=0,n=1,r,s){e.min=Bh(e.min,t,n,r,s),e.max=Bh(e.max,t,n,r,s)}function Gx(e,{x:t,y:n}){Zu(e.x,t.translate,t.scale,t.originPoint),Zu(e.y,n.translate,n.scale,n.originPoint)}const $h=.999999999999,Hh=1.0000000000001;function v2(e,t,n,r=!1){var l;const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let u=0;u$h&&(t.x=1),t.y$h&&(t.y=1)}function Bt(e,t){e.min+=t,e.max+=t}function Uh(e,t,n,r,s=.5){const i=ue(e.min,e.max,s);Zu(e,t,n,i,r)}function Wh(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function uo(e,t,n){const r=n??e;Uh(e.x,Wh(t.x,r.x),t.scaleX,t.scale,t.originX),Uh(e.y,Wh(t.y,r.y),t.scaleY,t.scale,t.originY)}function Kx(e,t){return Ux(y2(e.getBoundingClientRect(),t))}function w2(e,t,n){const r=Kx(e,n),{scroll:s}=t;return s&&(Bt(r.x,s.offset.x),Bt(r.y,s.offset.y)),r}const b2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},k2=ns.length;function S2(e,t,n){let r="",s=!0;for(let o=0;o{if(!t.target)return e;if(typeof e=="string")if(O.test(e))e=parseFloat(e);else return e;const n=Gh(e,t.target.x),r=Gh(e,t.target.y);return`${n}% ${r}%`}},j2={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Dt.parse(e);if(s.length>5)return r;const i=Dt.createTransformer(e),o=typeof s[0]!="number"?1:0,l=n.x.scale*t.x,u=n.y.scale*t.y;s[0+o]/=l,s[1+o]/=u;const c=ue(l,u,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),i(s)}},Qu={borderRadius:{...hs,applyTo:[...Md]},borderTopLeftRadius:hs,borderTopRightRadius:hs,borderBottomLeftRadius:hs,borderBottomRightRadius:hs,boxShadow:j2};function Yx(e,{layout:t,layoutId:n}){return rs.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Qu[e]||e==="opacity")}function Fd(e,t,n){var o;const r=e.style,s=t==null?void 0:t.style,i={};if(!r)return i;for(const l in r)(Le(r[l])||s&&Le(s[l])||Yx(l,e)||((o=n==null?void 0:n.getValue(l))==null?void 0:o.liveStyle)!==void 0)&&(i[l]=r[l]);return i}function E2(e){return window.getComputedStyle(e)}class C2 extends Hx{constructor(){super(...arguments),this.type="html",this.renderInstance=qx}readValueFromInstance(t,n){var r;if(rs.has(n))return(r=this.projection)!=null&&r.isProjecting?Iu(n):Gk(t,n);{const s=E2(t),i=(nx(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Kx(t,n)}build(t,n,r){Id(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Fd(t,n,r)}}const P2={offset:"stroke-dashoffset",array:"stroke-dasharray"},T2={offset:"strokeDashoffset",array:"strokeDasharray"};function N2(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?P2:T2;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const _2=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Xx(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...l},u,c,d){if(Id(e,l,c),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h}=e;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete f.transformBox);for(const g of _2)f[g]!==void 0&&(h[g]=f[g],delete f[g]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),s!==void 0&&N2(f,s,i,o,!1)}const Zx=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"]),Qx=e=>typeof e=="string"&&e.toLowerCase()==="svg";function M2(e,t,n,r){qx(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(Zx.has(s)?s:_d(s),t.attrs[s])}function Jx(e,t,n){const r=Fd(e,t,n);for(const s in e)if(Le(e[s])||Le(t[s])){const i=ns.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}class L2 extends Hx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ne}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(rs.has(n)){const r=Mx(n);return r&&r.default||0}return n=Zx.has(n)?n:_d(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Jx(t,n,r)}build(t,n,r){Xx(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){M2(t,n,r,s)}mount(t){this.isSVGTag=Qx(t.tagName),super.mount(t)}}const A2=Rd.length;function ey(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ey(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:r})=>LS(e,n,r)))}function I2(e){let t=V2(e),n=Kh(),r=!0,s=!1;const i=c=>(d,f)=>{var g;const h=Qn(e,f,c==="exit"?(g=e.presenceContext)==null?void 0:g.custom:void 0);if(h){const{transition:v,transitionEnd:w,...b}=h;d={...d,...b,...w}}return d};function o(c){t=c(e)}function l(c){const{props:d}=e,f=ey(e.parent)||{},h=[],g=new Set;let v={},w=1/0;for(let p=0;pw&&E,C=!1;const B=Array.isArray(k)?k:[k];let H=B.reduce(i(x),{});T===!1&&(H={});const{prevResolvedValues:ee={}}=y,W={...ee,...H},K=N=>{_=!0,g.has(N)&&(C=!0,g.delete(N)),y.needsAnimating[N]=!0;const A=e.getValue(N);A&&(A.liveStyle=!1)};for(const N in W){const A=H[N],L=ee[N];if(v.hasOwnProperty(N))continue;let F=!1;Hu(A)&&Hu(L)?F=!ty(A,L)||j:F=A!==L,F?A!=null?K(N):g.add(N):A!==void 0&&g.has(N)?K(N):y.protectedKeys[N]=!0}y.prevProp=k,y.prevResolvedValues=H,y.isActive&&(v={...v,...H}),(r||s)&&e.blockInitialAnimation&&(_=!1);const q=S&&j;_&&(!q||C)&&h.push(...B.map(N=>{const A={type:x};if(typeof N=="string"&&(r||s)&&!q&&e.manuallyAnimateOnMount&&e.parent){const{parent:L}=e,F=Qn(L,N);if(L.enteringChildren&&F){const{delayChildren:P}=F.transition||{};A.delay=Sx(L.enteringChildren,e,P)}}return{animation:N,options:A}}))}if(g.size){const p={};if(typeof d.initial!="boolean"){const x=Qn(e,Array.isArray(d.initial)?d.initial[0]:d.initial);x&&x.transition&&(p.transition=x.transition)}g.forEach(x=>{const y=e.getBaseTarget(x),k=e.getValue(x);k&&(k.liveStyle=!0),p[x]=y??null}),h.push({animation:p})}let b=!!h.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,s=!1,b?t(h):Promise.resolve()}function u(c,d){var h;if(n[c].isActive===d)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(g=>{var v;return(v=g.animationState)==null?void 0:v.setActive(c,d)}),n[c].isActive=d;const f=l(c);for(const g in n)n[g].protectedKeys={};return f}return{animateChanges:l,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Kh(),s=!0}}}function F2(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ty(t,e):!1}function On(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Kh(){return{animate:On(!0),whileInView:On(),whileHover:On(),whileTap:On(),whileDrag:On(),whileFocus:On(),exit:On()}}function Ju(e,t){e.min=t.min,e.max=t.max}function Ct(e,t){Ju(e.x,t.x),Ju(e.y,t.y)}function qh(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const ny=1e-4,O2=1-ny,z2=1+ny,ry=.01,B2=0-ry,$2=0+ry;function Xe(e){return e.max-e.min}function H2(e,t,n){return Math.abs(e-t)<=n}function Yh(e,t,n,r=.5){e.origin=r,e.originPoint=ue(t.min,t.max,e.origin),e.scale=Xe(n)/Xe(t),e.translate=ue(n.min,n.max,e.origin)-e.originPoint,(e.scale>=O2&&e.scale<=z2||isNaN(e.scale))&&(e.scale=1),(e.translate>=B2&&e.translate<=$2||isNaN(e.translate))&&(e.translate=0)}function Rs(e,t,n,r){Yh(e.x,t.x,n.x,r?r.originX:void 0),Yh(e.y,t.y,n.y,r?r.originY:void 0)}function Xh(e,t,n,r=0){const s=r?ue(n.min,n.max,r):n.min;e.min=s+t.min,e.max=e.min+Xe(t)}function U2(e,t,n,r){Xh(e.x,t.x,n.x,r==null?void 0:r.x),Xh(e.y,t.y,n.y,r==null?void 0:r.y)}function Zh(e,t,n,r=0){const s=r?ue(n.min,n.max,r):n.min;e.min=t.min-s,e.max=e.min+Xe(t)}function Xo(e,t,n,r){Zh(e.x,t.x,n.x,r==null?void 0:r.x),Zh(e.y,t.y,n.y,r==null?void 0:r.y)}function Qh(e,t,n,r,s){return e-=t,e=Yo(e,1/n,r),s!==void 0&&(e=Yo(e,1/s,r)),e}function W2(e,t=0,n=1,r=.5,s,i=e,o=e){if(Wt.test(t)&&(t=parseFloat(t),t=ue(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=ue(i.min,i.max,r);e===i&&(l-=t),e.min=Qh(e.min,t,n,l,s),e.max=Qh(e.max,t,n,l,s)}function Jh(e,t,[n,r,s],i,o){W2(e,t[n],t[r],t[s],t.scale,i,o)}const G2=["x","scaleX","originX"],K2=["y","scaleY","originY"];function em(e,t,n,r){Jh(e.x,t,G2,n?n.x:void 0,r?r.x:void 0),Jh(e.y,t,K2,n?n.y:void 0,r?r.y:void 0)}function tm(e){return e.translate===0&&e.scale===1}function sy(e){return tm(e.x)&&tm(e.y)}function nm(e,t){return e.min===t.min&&e.max===t.max}function q2(e,t){return nm(e.x,t.x)&&nm(e.y,t.y)}function rm(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function iy(e,t){return rm(e.x,t.x)&&rm(e.y,t.y)}function sm(e){return Xe(e.x)/Xe(e.y)}function im(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function zt(e){return[e("x"),e("y")]}function Y2(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:d,pathRotation:f,rotateX:h,rotateY:g,skewX:v,skewY:w}=n;c&&(r=`perspective(${c}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotate(${f}deg) `),h&&(r+=`rotateX(${h}deg) `),g&&(r+=`rotateY(${g}deg) `),v&&(r+=`skewX(${v}deg) `),w&&(r+=`skewY(${w}deg) `)}const l=e.x.scale*t.x,u=e.y.scale*t.y;return(l!==1||u!==1)&&(r+=`scale(${l}, ${u})`),r||"none"}const X2=Md.length,om=e=>typeof e=="string"?parseFloat(e):e,am=e=>typeof e=="number"||O.test(e);function Z2(e,t,n,r,s,i){s?(e.opacity=ue(0,n.opacity??1,Q2(r)),e.opacityExit=ue(t.opacity??1,0,J2(r))):i&&(e.opacity=ue(t.opacity??1,n.opacity??1,r));for(let o=0;ort?1:n(Gr(e,t,r))}function ej(e,t,n){const r=Le(e)?e:Mt(e);return r.start(Td("",r,t,n)),r.animation}function oi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}const tj=(e,t)=>e.depth-t.depth;class nj{constructor(){this.children=[],this.isDirty=!1}add(t){cd(this.children,t),this.isDirty=!0}remove(t){$o(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(tj),this.isDirty=!1,this.children.forEach(t)}}function rj(e,t){const n=Ye.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(St(r),e(i-t))};return J.setup(r,!0),()=>St(r)}function co(e){return Le(e)?e.get():e}class sj{constructor(){this.members=[]}add(t){cd(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&&($o(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if($o(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:o}=t.options;(i===void 0||i!==o)&&(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,o;(r=(n=t.options).onExitComplete)==null||r.call(n),(o=(s=t.resumingFrom)==null?void 0:(i=s.options).onExitComplete)==null||o.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 fo={hasAnimatedSinceResize:!0,hasEverUpdated:!1},hl=["","X","Y","Z"],ij=1e3;let oj=0;function ml(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ay(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Px(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",J,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ay(r)}function ly({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},l=t==null?void 0:t()){this.id=oj++,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(uj),this.nodes.forEach(pj),this.nodes.forEach(gj),this.nodes.forEach(cj)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let u=0;uthis.root.updateBlockedByResize=!1;J.read(()=>{f=window.innerWidth}),e(o,()=>{const g=window.innerWidth;g!==f&&(f=g,this.root.updateBlockedByResize=!0,d&&d(),d=rj(h,250),fo.hasAnimatedSinceResize&&(fo.hasAnimatedSinceResize=!1,this.nodes.forEach(dm)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||bj,{onLayoutAnimationStart:w,onLayoutAnimationComplete:b}=c.getProps(),p=!this.targetLayout||!iy(this.targetLayout,g),x=!f&&h;if(this.options.layoutRoot||this.resumeFrom||x||f&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...Pd(v,"layout"),onPlay:w,onComplete:b};(c.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(d,x,y.path)}else f||dm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),St(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(xj),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ay(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Xe(this.snapshot.measuredBox.x)&&!Xe(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{const S=T/1e3,j=E==null?void 0:E(S);j?(h.x.translate=j.x,h.x.scale=ue(o.x.scale,1,S),h.x.origin=o.x.origin,h.x.originPoint=o.x.originPoint,h.y.translate=j.y,h.y.scale=ue(o.y.scale,1,S),h.y.origin=o.y.origin,h.y.originPoint=o.y.originPoint):(fm(h.x,o.x,S),fm(h.y,o.y,S)),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Xo(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),vj(this.relativeTarget,this.relativeTargetOrigin,g,S),k&&q2(this.relativeTarget,k)&&(this.isProjectionDirty=!1),k||(k=Ne()),Ct(k,this.relativeTarget)),b&&(this.animationValues=f,Z2(f,d,this.latestValues,S,y,x)),j&&j.rotate!==void 0&&(this.animationValues||(this.animationValues=f),this.animationValues.pathRotation=j.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var l,u,c;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(c=(u=this.resumingFrom)==null?void 0:u.currentAnimation)==null||c.stop(),this.pendingAnimation&&(St(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=J.update(()=>{fo.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Mt(0)),this.motionValue.jump(0,!1),this.currentAnimation=ej(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),o.onUpdate&&o.onUpdate(d)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ij),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:u,layout:c,latestValues:d}=o;if(!(!l||!u||!c)){if(this!==o&&this.layout&&c&&uy(this.options.animationType,this.layout.layoutBox,c.layoutBox)){u=this.target||Ne();const f=Xe(this.layout.layoutBox.x);u.x.min=o.target.x.min,u.x.max=u.x.min+f;const h=Xe(this.layout.layoutBox.y);u.y.min=o.target.y.min,u.y.max=u.y.min+h}Ct(l,u),uo(l,d),Rs(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new sj),this.sharedNodes.get(o).add(l);const c=l.options.initialPromotionConfig;l.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var l;const{layoutId:o}=this.options;return o?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:o}=this.options;return o?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:u}={}){const c=this.getStack();c&&c.promote(this,u),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:u}=o;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(l=!0),!l)return;const c={};u.z&&ml("z",o,c,this.animationValues);for(let d=0;d{var l;return(l=o.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(um),this.root.sharedNodes.clear()}}}function aj(e){e.updateLayout()}function lj(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,o=t.source!==e.layout.source;if(i==="size")zt(f=>{const h=o?t.measuredBox[f]:t.layoutBox[f],g=Xe(h);h.min=r[f].min,h.max=h.min+g});else if(i==="x"||i==="y"){const f=i==="x"?"y":"x";Ju(o?t.measuredBox[f]:t.layoutBox[f],r[f])}else uy(i,t.layoutBox,r)&&zt(f=>{const h=o?t.measuredBox[f]:t.layoutBox[f],g=Xe(r[f]);h.max=h.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+g)});const l=_r();Rs(l,r,t.layoutBox);const u=_r();o?Rs(u,e.applyTransform(s,!0),t.measuredBox):Rs(u,r,t.layoutBox);const c=!sy(l);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:g}=f;if(h&&g){const v=e.options.layoutAnchor||void 0,w=Ne();Xo(w,t.layoutBox,h.layoutBox,v);const b=Ne();Xo(b,r,g.layoutBox,v),iy(w,b)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=w,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:u,layoutDelta:l,hasLayoutChanged:c,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function uj(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 cj(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function dj(e){e.clearSnapshot()}function um(e){e.clearMeasurements()}function fj(e){e.isLayoutDirty=!0,e.updateLayout()}function cm(e){e.isLayoutDirty=!1}function hj(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function mj(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function dm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function pj(e){e.resolveTargetDelta()}function gj(e){e.calcProjection()}function xj(e){e.resetSkewAndRotation()}function yj(e){e.removeLeadSnapshot()}function fm(e,t,n){e.translate=ue(t.translate,0,n),e.scale=ue(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function hm(e,t,n,r){e.min=ue(t.min,n.min,r),e.max=ue(t.max,n.max,r)}function vj(e,t,n,r){hm(e.x,t.x,n.x,r),hm(e.y,t.y,n.y,r)}function wj(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const bj={duration:.45,ease:[.4,0,.1,1]},mm=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),pm=mm("applewebkit/")&&!mm("chrome/")?Math.round:ot;function gm(e){e.min=pm(e.min),e.max=pm(e.max)}function kj(e){gm(e.x),gm(e.y)}function uy(e,t,n){return e==="position"||e==="preserve-aspect"&&!H2(sm(t),sm(n),.2)}function Sj(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const jj=ly({attachResizeListener:(e,t)=>oi(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}),pl={current:void 0},cy=ly({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!pl.current){const e=new jj({});e.mount(window),e.setOptions({layoutScroll:!0}),pl.current=e}return pl.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ir=m.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function xm(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ej(...e){return t=>{let n=!1;const r=e.map(s=>{const i=xm(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s{const{width:g,height:v,top:w,left:b,right:p,bottom:x,direction:y}=u.current;if(t||i===!1||!l.current||!g||!v)return;const k=y==="rtl",E=n==="left"?k?`right: ${p}`:`left: ${b}`:k?`left: ${b}`:`right: ${p}`,T=r==="bottom"?`bottom: ${x}`:`top: ${w}`;l.current.dataset.motionPopId=o;const S=document.createElement("style");c&&(S.nonce=c);const j=s??document.head;return j.appendChild(S),S.sheet&&S.sheet.insertRule(`
+ */function Bo(){return Bo=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function Pb(e,t){let n=Nu(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(i=>{n.append(s,i)})}),n}const Tb=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Nb=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],_b="6";try{window.__reactRouterVersion=_b}catch{}const Mb=m.createContext({isTransitioning:!1}),Lb="startTransition",hh=kv[Lb];function Ab(e){let{basename:t,children:n,future:r,window:s}=e,i=m.useRef();i.current==null&&(i.current=Aw({window:s,v5Compat:!0}));let o=i.current,[l,u]=m.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},d=m.useCallback(f=>{c&&hh?hh(()=>u(f)):u(f)},[u,c]);return m.useLayoutEffect(()=>o.listen(d),[o,d]),m.useEffect(()=>kb(r),[r]),m.createElement(Sb,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,future:r})}const Db=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Rb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,U=m.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:l,target:u,to:c,preventScrollReset:d,viewTransition:f}=t,h=O0(t,Tb),{basename:g}=m.useContext(an),v,w=!1;if(typeof c=="string"&&Rb.test(c)&&(v=c,Db))try{let y=new URL(window.location.href),k=c.startsWith("//")?new URL(y.protocol+c):new URL(c),E=Wr(k.pathname,g);k.origin===y.origin&&E!=null?c=E+k.search+k.hash:w=!0}catch{}let b=ib(c,{relative:s}),p=Fb(c,{replace:o,state:l,target:u,preventScrollReset:d,relative:s,viewTransition:f});function x(y){r&&r(y),y.defaultPrevented||p(y)}return m.createElement("a",Bo({},h,{href:v||b,onClick:w||i?r:x,ref:n,target:u}))}),Vb=m.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:s=!1,className:i="",end:o=!1,style:l,to:u,viewTransition:c,children:d}=t,f=O0(t,Nb),h=ba(u,{relative:f.relative}),g=et(),v=m.useContext(A0),{navigator:w,basename:b}=m.useContext(an),p=v!=null&&zb(h)&&c===!0,x=w.encodeLocation?w.encodeLocation(h).pathname:h.pathname,y=g.pathname,k=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;s||(y=y.toLowerCase(),k=k?k.toLowerCase():null,x=x.toLowerCase()),k&&b&&(k=Wr(k,b)||k);const E=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let T=y===x||!o&&y.startsWith(x)&&y.charAt(E)==="/",S=k!=null&&(k===x||!o&&k.startsWith(x)&&k.charAt(x.length)==="/"),j={isActive:T,isPending:S,isTransitioning:p},_=T?r:void 0,C;typeof i=="function"?C=i(j):C=[i,T?"active":null,S?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let B=typeof l=="function"?l(j):l;return m.createElement(U,Bo({},f,{"aria-current":_,className:C,ref:n,style:B,to:u,viewTransition:c}),typeof d=="function"?d(j):d)});var _u;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(_u||(_u={}));var mh;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(mh||(mh={}));function Ib(e){let t=m.useContext(va);return t||ye(!1),t}function Fb(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:l}=t===void 0?{}:t,u=es(),c=et(),d=ba(e,{relative:o});return m.useCallback(f=>{if(Cb(f,n)){f.preventDefault();let h=r!==void 0?r:zo(c)===zo(d);u(e,{replace:h,state:s,preventScrollReset:i,relative:o,viewTransition:l})}},[c,u,d,r,s,n,e,i,o,l])}function Ob(e){let t=m.useRef(Nu(e)),n=m.useRef(!1),r=et(),s=m.useMemo(()=>Pb(r.search,n.current?null:t.current),[r.search]),i=es(),o=m.useCallback((l,u)=>{const c=Nu(typeof l=="function"?l(s):l);n.current=!0,i("?"+c,u)},[i,s]);return[s,o]}function zb(e,t){t===void 0&&(t={});let n=m.useContext(Mb);n==null&&ye(!1);let{basename:r}=Ib(_u.useViewTransitionState),s=ba(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Wr(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Wr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Pu(s.pathname,o)!=null||Pu(s.pathname,i)!=null}const Bb="modulepreload",$b=function(e){return"/"+e},ph={},X=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(n.map(u=>{if(u=$b(u),u in ph)return;ph[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":Bb,c||(f.as="script"),f.crossOrigin="",f.href=u,l&&f.setAttribute("nonce",l),document.head.appendChild(f),c)return new Promise((h,g)=>{f.addEventListener("load",h),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return s.then(o=>{for(const l of o||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},ud=m.createContext({});function sn(e){const t=m.useRef(null);return t.current===null&&(t.current=e()),t.current}const Hb=typeof window<"u",hi=Hb?m.useLayoutEffect:m.useEffect,ka=m.createContext(null);function cd(e,t){e.indexOf(t)===-1&&e.push(t)}function $o(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Vt=(e,t,n)=>n>t?t:n{};const An={},z0=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),B0=e=>typeof e=="object"&&e!==null,$0=e=>/^0[^.\s]+$/u.test(e);function H0(e){let t;return()=>(t===void 0&&(t=e()),t)}const ot=e=>e,mi=(...e)=>e.reduce((t,n)=>r=>n(t(r))),Gr=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class fd{constructor(){this.subscriptions=[]}add(t){return cd(this.subscriptions,t),()=>$o(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;ie*1e3,vt=e=>e/1e3,hd=(e,t)=>t?e*(1e3/t):0,U0=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ub=1e-7,Wb=12;function Gb(e,t,n,r,s){let i,o,l=0;do o=t+(n-t)/2,i=U0(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>Ub&&++lGb(i,0,1,e,n);return i=>i===0||i===1?i:U0(s(i),t,r)}const W0=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,G0=e=>t=>1-e(1-t),K0=pi(.33,1.53,.69,.99),md=G0(K0),q0=W0(md),Y0=e=>e>=1?1:(e*=2)<1?.5*md(e):.5*(2-Math.pow(2,-10*(e-1))),pd=e=>1-Math.sin(Math.acos(e)),X0=G0(pd),Z0=W0(pd),Kb=pi(.42,0,1,1),qb=pi(0,0,.58,1),Q0=pi(.42,0,.58,1),Yb=e=>Array.isArray(e)&&typeof e[0]!="number",J0=e=>Array.isArray(e)&&typeof e[0]=="number",Xb={linear:ot,easeIn:Kb,easeInOut:Q0,easeOut:qb,circIn:pd,circInOut:Z0,circOut:X0,backIn:md,backInOut:q0,backOut:K0,anticipate:Y0},Zb=e=>typeof e=="string",gh=e=>{if(J0(e)){dd(e.length===4);const[t,n,r,s]=e;return pi(t,n,r,s)}else if(Zb(e))return Xb[e];return e},Fi=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Qb(e){let t=new Set,n=new Set,r=!1,s=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function l(c){i.has(c)&&(u.schedule(c),e()),c(o)}const u={schedule:(c,d=!1,f=!1)=>{const g=f&&r?t:n;return d&&i.add(c),g.add(c),c},cancel:c=>{n.delete(c),i.delete(c)},process:c=>{if(o=c,r){s=!0;return}r=!0;const d=t;t=n,n=d,t.forEach(l),t.clear(),r=!1,s&&(s=!1,u.process(c))}};return u}const Jb=40;function ex(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=Fi.reduce((y,k)=>(y[k]=Qb(i),y),{}),{setup:l,read:u,resolveKeyframes:c,preUpdate:d,update:f,preRender:h,render:g,postRender:v}=o,w=()=>{const y=An.useManualTiming,k=y?s.timestamp:performance.now();n=!1,y||(s.delta=r?1e3/60:Math.max(Math.min(k-s.timestamp,Jb),1)),s.timestamp=k,s.isProcessing=!0,l.process(s),u.process(s),c.process(s),d.process(s),f.process(s),h.process(s),g.process(s),v.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(w))},b=()=>{n=!0,r=!0,s.isProcessing||e(w)};return{schedule:Fi.reduce((y,k)=>{const E=o[k];return y[k]=(T,S=!1,j=!1)=>(n||b(),E.schedule(T,S,j)),y},{}),cancel:y=>{for(let k=0;k(io===void 0&&Ye.set(Ae.isProcessing||An.useManualTiming?Ae.timestamp:performance.now()),io),set:e=>{io=e,queueMicrotask(ek)}},tx=e=>t=>typeof t=="string"&&t.startsWith(e),nx=tx("--"),tk=tx("var(--"),gd=e=>tk(e)?nk.test(e.split("/*")[0].trim()):!1,nk=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function xh(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const ts={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ri={...ts,transform:e=>Vt(0,1,e)},Oi={...ts,default:1},Ms=e=>Math.round(e*1e5)/1e5,xd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function rk(e){return e==null}const sk=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,yd=(e,t)=>n=>!!(typeof n=="string"&&sk.test(n)&&n.startsWith(e)||t&&!rk(n)&&Object.prototype.hasOwnProperty.call(n,t)),rx=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,l]=r.match(xd);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},ik=e=>Vt(0,255,e),il={...ts,transform:e=>Math.round(ik(e))},Kn={test:yd("rgb","red"),parse:rx("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+il.transform(e)+", "+il.transform(t)+", "+il.transform(n)+", "+Ms(ri.transform(r))+")"};function ok(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 Mu={test:yd("#"),parse:ok,transform:Kn.transform},gi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Kt=gi("deg"),Wt=gi("%"),O=gi("px"),ak=gi("vh"),lk=gi("vw"),yh={...Wt,parse:e=>Wt.parse(e)/100,transform:e=>Wt.transform(e*100)},Tr={test:yd("hsl","hue"),parse:rx("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Wt.transform(Ms(t))+", "+Wt.transform(Ms(n))+", "+Ms(ri.transform(r))+")"},Ce={test:e=>Kn.test(e)||Mu.test(e)||Tr.test(e),parse:e=>Kn.test(e)?Kn.parse(e):Tr.test(e)?Tr.parse(e):Mu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Kn.transform(e):Tr.transform(e),getAnimatableNone:e=>{const t=Ce.parse(e);return t.alpha=0,Ce.transform(t)}},uk=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ck(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(xd))==null?void 0:t.length)||0)+(((n=e.match(uk))==null?void 0:n.length)||0)>0}const sx="number",ix="color",dk="var",fk="var(",vh="${}",hk=/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 Kr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const l=t.replace(hk,u=>(Ce.test(u)?(r.color.push(i),s.push(ix),n.push(Ce.parse(u))):u.startsWith(fk)?(r.var.push(i),s.push(dk),n.push(u)):(r.number.push(i),s.push(sx),n.push(parseFloat(u))),++i,vh)).split(vh);return{values:n,split:l,indexes:r,types:s}}function mk(e){return Kr(e).values}function ox({split:e,types:t}){const n=e.length;return r=>{let s="";for(let i=0;itypeof e=="number"?0:Ce.test(e)?Ce.getAnimatableNone(e):e,xk=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:gk(e);function yk(e){const t=Kr(e);return ox(t)(t.values.map((r,s)=>xk(r,t.split[s])))}const Dt={test:ck,parse:mk,createTransformer:pk,getAnimatableNone:yk};function ol(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 vk({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const l=n<.5?n*(1+t):n+t-n*t,u=2*n-l;s=ol(u,l,e+1/3),i=ol(u,l,e),o=ol(u,l,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Ho(e,t){return n=>n>0?t:e}const ue=(e,t,n)=>e+(t-e)*n,al=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},wk=[Mu,Kn,Tr],bk=e=>wk.find(t=>t.test(e));function wh(e){const t=bk(e);if(!t)return!1;let n=t.parse(e);return t===Tr&&(n=vk(n)),n}const bh=(e,t)=>{const n=wh(e),r=wh(t);if(!n||!r)return Ho(e,t);const s={...n};return i=>(s.red=al(n.red,r.red,i),s.green=al(n.green,r.green,i),s.blue=al(n.blue,r.blue,i),s.alpha=ue(n.alpha,r.alpha,i),Kn.transform(s))},Lu=new Set(["none","hidden"]);function kk(e,t){return Lu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Sk(e,t){return n=>ue(e,t,n)}function vd(e){return typeof e=="number"?Sk:typeof e=="string"?gd(e)?Ho:Ce.test(e)?bh:Ck:Array.isArray(e)?ax:typeof e=="object"?Ce.test(e)?bh:jk:Ho}function ax(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>vd(i)(i,t[o]));return i=>{for(let o=0;o{for(const i in r)n[i]=r[i](s);return n}}function Ek(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s{const n=Dt.createTransformer(t),r=Kr(e),s=Kr(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?Lu.has(e)&&!s.values.length||Lu.has(t)&&!r.values.length?kk(e,t):mi(ax(Ek(r,s),s.values),n):Ho(e,t)};function lx(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ue(e,t,n):vd(e)(e,t)}const Pk=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>J.update(t,n),stop:()=>St(t),now:()=>Ae.isProcessing?Ae.timestamp:Ye.now()}},ux=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i=Uo?1/0:t}function Tk(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(wd(r),Uo);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:vt(s)}}const be={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 Au(e,t){return e*Math.sqrt(1-t*t)}const Nk=12;function _k(e,t,n){let r=n;for(let s=1;s{const d=c*o,f=d*e,h=d-n,g=Au(c,o),v=Math.exp(-f);return ll-h/g*v},i=c=>{const f=c*o*e,h=f*n+n,g=Math.pow(o,2)*Math.pow(c,2)*e,v=Math.exp(-f),w=Au(Math.pow(c,2),o);return(-s(c)+ll>0?-1:1)*((h-g)*v)/w}):(s=c=>{const d=Math.exp(-c*e),f=(c-n)*e+1;return-ll+d*f},i=c=>{const d=Math.exp(-c*e),f=(n-c)*(e*e);return d*f});const l=5/e,u=_k(s,i,l);if(e=dt(e),isNaN(u))return{stiffness:be.stiffness,damping:be.damping,duration:e};{const c=Math.pow(u,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const Lk=["duration","bounce"],Ak=["stiffness","damping","mass"];function kh(e,t){return t.some(n=>e[n]!==void 0)}function Dk(e){let t={velocity:be.velocity,stiffness:be.stiffness,damping:be.damping,mass:be.mass,isResolvedFromDuration:!1,...e};if(!kh(e,Ak)&&kh(e,Lk))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*Vt(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:be.mass,stiffness:s,damping:i}}else{const n=Mk({...e,velocity:0});t={...t,...n,mass:be.mass},t.isResolvedFromDuration=!0}return t}function Wo(e=be.visualDuration,t=be.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:i},{stiffness:u,damping:c,mass:d,duration:f,velocity:h,isResolvedFromDuration:g}=Dk({...n,velocity:-vt(n.velocity||0)}),v=h||0,w=c/(2*Math.sqrt(u*d)),b=o-i,p=vt(Math.sqrt(u/d)),x=Math.abs(b)<5;r||(r=x?be.restSpeed.granular:be.restSpeed.default),s||(s=x?be.restDelta.granular:be.restDelta.default);let y,k,E,T,S,j;if(w<1)E=Au(p,w),T=(v+w*p*b)/E,y=C=>{const B=Math.exp(-w*p*C);return o-B*(T*Math.sin(E*C)+b*Math.cos(E*C))},S=w*p*T+b*E,j=w*p*b-T*E,k=C=>Math.exp(-w*p*C)*(S*Math.sin(E*C)+j*Math.cos(E*C));else if(w===1){y=B=>o-Math.exp(-p*B)*(b+(v+p*b)*B);const C=v+p*b;k=B=>Math.exp(-p*B)*(p*C*B-v)}else{const C=p*Math.sqrt(w*w-1);y=W=>{const K=Math.exp(-w*p*W),q=Math.min(C*W,300);return o-K*((v+w*p*b)*Math.sinh(q)+C*b*Math.cosh(q))/C};const B=(v+w*p*b)/C,H=w*p*B-b*C,ne=w*p*b-B*C;k=W=>{const K=Math.exp(-w*p*W),q=Math.min(C*W,300);return K*(H*Math.sinh(q)+ne*Math.cosh(q))}}const _={calculatedDuration:g&&f||null,velocity:C=>dt(k(C)),next:C=>{if(!g&&w<1){const H=Math.exp(-w*p*C),ne=Math.sin(E*C),W=Math.cos(E*C),K=o-H*(T*ne+b*W),q=dt(H*(S*ne+j*W));return l.done=Math.abs(q)<=r&&Math.abs(o-K)<=s,l.value=l.done?o:K,l}const B=y(C);if(g)l.done=C>=f;else{const H=dt(k(C));l.done=Math.abs(H)<=r&&Math.abs(o-B)<=s}return l.value=l.done?o:B,l},toString:()=>{const C=Math.min(wd(_),Uo),B=ux(H=>_.next(C*H).value,C,30);return C+"ms "+B},toTransition:()=>{}};return _}Wo.applyToOptions=e=>{const t=Tk(e,100,Wo);return e.ease=t.ease,e.duration=dt(t.duration),e.type="keyframes",e};const Rk=5;function cx(e,t,n){const r=Math.max(t-Rk,0);return hd(n-e(r),t-r)}function Du({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:l,max:u,restDelta:c=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},g=j=>l!==void 0&&ju,v=j=>l===void 0?u:u===void 0||Math.abs(l-j)-w*Math.exp(-j/r),y=j=>p+x(j),k=j=>{const _=x(j),C=y(j);h.done=Math.abs(_)<=c,h.value=h.done?p:C};let E,T;const S=j=>{g(h.value)&&(E=j,T=Wo({keyframes:[h.value,v(h.value)],velocity:cx(y,j,h.value),damping:s,stiffness:i,restDelta:c,restSpeed:d}))};return S(0),{calculatedDuration:null,next:j=>{let _=!1;return!T&&E===void 0&&(_=!0,k(j),S(j)),E!==void 0&&j>=E?T.next(j-E):(!_&&k(j),h)}}}function Vk(e,t,n){const r=[],s=n||An.mix||lx,i=e.length-1;for(let o=0;ot[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=Vk(t,r,s),u=l.length,c=d=>{if(o&&d1)for(;fc(Vt(e[0],e[i-1],d)):c}function Ik(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Gr(0,t,r);e.push(ue(n,1,s))}}function dx(e){const t=[0];return Ik(t,e.length-1),t}function Fk(e,t){return e.map(n=>n*t)}function Ok(e,t){return e.map(()=>t||Q0).splice(0,e.length-1)}function Ls({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=Yb(r)?r.map(gh):gh(r),i={done:!1,value:t[0]},o=Fk(n&&n.length===t.length?n:dx(t),e),l=bd(o,t,{ease:Array.isArray(s)?s:Ok(t,s)});return{calculatedDuration:e,next:u=>(i.value=l(u),i.done=u>=e,i)}}const zk=e=>e!==null;function Sa(e,{repeat:t,repeatType:n="loop"},r,s=1){const i=e.filter(zk),l=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!l||r===void 0?i[l]:r}const Bk={decay:Du,inertia:Du,tween:Ls,keyframes:Ls,spring:Wo};function fx(e){typeof e.type=="string"&&(e.type=Bk[e.type])}class kd{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 $k=e=>e/100;class si extends kd{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!==Ye.now()&&this.tick(Ye.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;fx(t);const{type:n=Ls,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=t;let{keyframes:l}=t;const u=n||Ls;u!==Ls&&typeof l[0]!="number"&&(this.mixKeyframes=mi($k,lx(l[0],l[1])),l=[0,100]);const c=u({...t,keyframes:l});i==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...l].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=wd(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:o,resolvedDuration:l,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:d,repeat:f,repeatType:h,repeatDelay:g,type:v,onUpdate:w,finalKeyframe:b}=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 p=this.currentTime-c*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?p<0:p>s;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let y=this.currentTime,k=r;if(f){const j=Math.min(this.currentTime,s)/l;let _=Math.floor(j),C=j%1;!C&&j>=1&&(C=1),C===1&&_--,_=Math.min(_,f+1),!!(_%2)&&(h==="reverse"?(C=1-C,g&&(C-=g/l)):h==="mirror"&&(k=o)),y=Vt(0,1,C)*l}let E;x?(this.delayState.value=d[0],E=this.delayState):E=k.next(y),i&&!x&&(E.value=i(E.value));let{done:T}=E;!x&&u!==null&&(T=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return S&&v!==Du&&(E.value=Sa(d,this.options,b,this.speed)),w&&w(E.value),S&&this.finish(),E}then(t,n){return this.finished.then(t,n)}get duration(){return vt(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+vt(t)}get time(){return vt(this.currentTime)}set time(t){t=dt(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 cx(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(Ye.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=vt(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:t=Pk,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(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(Ye.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 Hk(e){for(let t=1;te*180/Math.PI,Ru=e=>{const t=qn(Math.atan2(e[1],e[0]));return Vu(t)},Uk={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ru,rotateZ:Ru,skewX:e=>qn(Math.atan(e[1])),skewY:e=>qn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Vu=e=>(e=e%360,e<0&&(e+=360),e),Sh=Ru,jh=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Eh=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Wk={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:jh,scaleY:Eh,scale:e=>(jh(e)+Eh(e))/2,rotateX:e=>Vu(qn(Math.atan2(e[6],e[5]))),rotateY:e=>Vu(qn(Math.atan2(-e[2],e[0]))),rotateZ:Sh,rotate:Sh,skewX:e=>qn(Math.atan(e[4])),skewY:e=>qn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Iu(e){return e.includes("scale")?1:0}function Fu(e,t){if(!e||e==="none")return Iu(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=Wk,s=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Uk,s=l}if(!s)return Iu(t);const i=r[t],o=s[1].split(",").map(Kk);return typeof i=="function"?i(o):o[i]}const Gk=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Fu(n,t)};function Kk(e){return parseFloat(e.trim())}const ns=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],rs=new Set([...ns,"pathRotation"]),Ch=e=>e===ts||e===O,qk=new Set(["x","y","z"]),Yk=ns.filter(e=>!qk.has(e));function Xk(e){const t=[];return Yk.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const yn={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})=>Fu(t,"x"),y:(e,{transform:t})=>Fu(t,"y")};yn.translateX=yn.x;yn.translateY=yn.y;const Zn=new Set;let Ou=!1,zu=!1,Bu=!1;function hx(){if(zu){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=Xk(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var l;(l=r.getValue(i))==null||l.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}zu=!1,Ou=!1,Zn.forEach(e=>e.complete(Bu)),Zn.clear()}function mx(){Zn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(zu=!0)})}function Zk(){Bu=!0,mx(),hx(),Bu=!1}class Sd{constructor(t,n,r,s,i,o=!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=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Zn.add(this),Ou||(Ou=!0,J.read(mx),J.resolveKeyframes(hx))):(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(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,o);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=o),s&&i===void 0&&s.set(t[0])}Hk(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 Qk=e=>e.startsWith("--");function px(e,t,n){Qk(t)?e.style.setProperty(t,n):e.style[t]=n}const Jk={};function jd(e,t){const n=H0(e);return()=>Jk[t]??n()}const Ed=jd(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),gx=jd(()=>window.ViewTimeline!==void 0,"viewTimeline"),xx=jd(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ws=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ph={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ws([0,.65,.55,1]),circOut:ws([.55,0,1,.45]),backIn:ws([.31,.01,.66,-.59]),backOut:ws([.33,1.53,.69,.99])};function yx(e,t){if(e)return typeof e=="function"?xx()?ux(e,t):"ease-out":J0(e)?ws(e):Array.isArray(e)?e.map(n=>yx(n,t)||Ph.easeOut):Ph[e]}function eS(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:l="easeOut",times:u}={},c=void 0){const d={[t]:n};u&&(d.offset=u);const f=yx(l,s);Array.isArray(f)&&(d.easing=f);const h={delay:r,duration:s,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),e.animate(d,h)}function vx(e){return typeof e=="function"&&"applyToOptions"in e}function tS({type:e,...t}){return vx(e)&&xx()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class wx extends kd{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:o=!1,finalKeyframe:l,onComplete:u}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,dd(typeof t.type!="string");const c=tS(t);this.animation=eS(n,r,s,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=Sa(s,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(d),px(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 vt(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+vt(t)}get time(){return vt(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=dt(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&&Ed()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),ot):s(this)}}const bx={anticipate:Y0,backInOut:q0,circInOut:Z0};function nS(e){return e in bx}function rS(e){typeof e.ease=="string"&&nS(e.ease)&&(e.ease=bx[e.ease])}const ul=10;class sS extends wx{constructor(t){rS(t),fx(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,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new si({...o,autoplay:!1}),u=Math.max(ul,Ye.now()-this.startTime),c=Vt(0,ul,u-ul),d=l.sample(u).value,{name:f}=this.options;i&&f&&px(i,f,d),n.setWithVelocity(l.sample(Math.max(0,u-c)).value,d,c),l.stop()}}const Th=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Dt.test(e)||e==="0")&&!e.startsWith("url("));function iS(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nObject.hasOwnProperty.call(Element.prototype,"animate"));function dS(e){var f;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:i,type:o,keyframes:l}=e;if(!(((f=t==null?void 0:t.owner)==null?void 0:f.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:d}=t.owner.getProps();return cS()&&n&&(kx.has(n)||uS.has(n)&&lS(l))&&(n!=="transform"||!d)&&!c&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const fS=40;class hS extends kd{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",keyframes:l,name:u,motionValue:c,element:d,...f}){var v;super(),this.stop=()=>{var w,b;this._animation&&(this._animation.stop(),(w=this.stopTimeline)==null||w.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=Ye.now();const h={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:u,motionValue:c,element:d,...f},g=(d==null?void 0:d.KeyframeResolver)||Sd;this.keyframeResolver=new g(l,(w,b,p)=>this.onKeyframesResolved(w,b,h,!p),u,c,d),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,n,r,s){var p,x;this.keyframeResolver=void 0;const{name:i,type:o,velocity:l,delay:u,isHandoff:c,onUpdate:d}=r;this.resolvedAt=Ye.now();let f=!0;oS(t,i,o,l)||(f=!1,(An.instantAnimations||!u)&&(d==null||d(Sa(t,r,n))),t[0]=t[t.length-1],$u(r),r.repeat=0);const g={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>fS?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},v=f&&!c&&dS(g),w=(x=(p=g.motionValue)==null?void 0:p.owner)==null?void 0:x.current;let b;if(v)try{b=new sS({...g,element:w})}catch{b=new si(g)}else b=new si(g);b.finished.then(()=>{this.notifyFinished()}).catch(ot),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}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(),Zk()),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 Sx(e,t,n,r=0,s=1){const i=Array.from(e).sort((c,d)=>c.sortNodePosition(d)).indexOf(t),o=e.size,l=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:l-i*r}const Nh=30,mS=e=>!isNaN(parseFloat(e)),As={current:void 0};class pS{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=Ye.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 o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ye.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=mS(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 fd);const r=this.events[t].add(n);return t==="change"?()=>{r(),J.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 As.current&&As.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Ye.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Nh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Nh);return hd(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 Mt(e,t){return new pS(e,t)}function Cd(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Pd(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?Cd(n,e):n}const gS={type:"spring",stiffness:500,damping:25,restSpeed:10},xS=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),yS={type:"keyframes",duration:.8},vS={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wS=(e,{keyframes:t})=>t.length>2?yS:rs.has(e)?e.startsWith("scale")?xS(t[1]):gS:vS,bS=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function kS(e){for(const t in e)if(!bS.has(t))return!0;return!1}const Td=(e,t,n,r={},s,i)=>o=>{const l=Pd(r,e)||{},u=l.delay||r.delay||0;let{elapsed:c=0}=r;c=c-dt(u);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-c,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:i?void 0:s};kS(l)||Object.assign(d,wS(e,d)),d.duration&&(d.duration=dt(d.duration)),d.repeatDelay&&(d.repeatDelay=dt(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&($u(d),d.delay===0&&(f=!0)),(An.instantAnimations||An.skipAnimations||s!=null&&s.shouldSkipAnimations||l.skipAnimations)&&(f=!0,$u(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,f&&!i&&t.get()!==void 0){const h=Sa(d.keyframes,l);if(h!==void 0){J.update(()=>{d.onUpdate(h),d.onComplete()});return}}return l.isSync?new si(d):new hS(d)},SS=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function jS(e){const t=SS.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function jx(e,t,n=1){const[r,s]=jS(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return z0(o)?parseFloat(o):o}return gd(s)?jx(s,t,n+1):s}function _h(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Nd(e,t,n,r){if(typeof t=="function"){const[s,i]=_h(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]=_h(r);t=t(n!==void 0?n:e.custom,s,i)}return t}function Qn(e,t,n){const r=e.getProps();return Nd(r,t,n!==void 0?n:r.custom,e)}const Ex=new Set(["width","height","top","left","right","bottom",...ns]),Hu=e=>Array.isArray(e);function ES(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Mt(n))}function CS(e){return Hu(e)?e[e.length-1]||0:e}function PS(e,t){const n=Qn(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const l=CS(i[o]);ES(e,o,l)}}const Le=e=>!!(e&&e.getVelocity);function TS(e){return!!(Le(e)&&e.add)}function Uu(e,t){const n=e.getValue("willChange");if(TS(n))return n.add(t);if(!n&&An.WillChange){const r=new An.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function _d(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const NS="framerAppearId",Cx="data-"+_d(NS);function Px(e){return e.props[Cx]}function _S({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Tx(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:o,...l}=t;const u=e.getDefaultTransition();i=i?Cd(i,u):u;const c=i==null?void 0:i.reduceMotion,d=i==null?void 0:i.skipAnimations;r&&(i=r);const f=[],h=s&&e.animationState&&e.animationState.getState()[s],g=i==null?void 0:i.path;g&&g.animateVisualElement(e,l,i,n,f);for(const v in l){const w=e.getValue(v,e.latestValues[v]??null),b=l[v];if(b===void 0||h&&_S(h,v))continue;const p={delay:n,...Pd(i||{},v)};d&&(p.skipAnimations=!0);const x=w.get();if(x!==void 0&&!w.isAnimating()&&!Array.isArray(b)&&b===x&&!p.velocity){J.update(()=>w.set(b));continue}let y=!1;if(window.MotionHandoffAnimation){const T=Px(e);if(T){const S=window.MotionHandoffAnimation(T,v,J);S!==null&&(p.startTime=S,y=!0)}}Uu(e,v);const k=c??e.shouldReduceMotion;w.start(Td(v,w,b,k&&Ex.has(v)?{type:!1}:p,e,y));const E=w.animation;E&&f.push(E)}if(o){const v=()=>J.update(()=>{o&&PS(e,o)});f.length?Promise.all(f).then(v):v()}return f}function Wu(e,t,n={}){var u;const r=Qn(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(Tx(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=s;return MS(e,t,c,d,f,h,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,d]=l==="beforeChildren"?[i,o]:[o,i];return c().then(()=>d())}else return Promise.all([i(),o(n.delay)])}function MS(e,t,n=0,r=0,s=0,i=1,o){const l=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),l.push(Wu(u,t,{...o,delay:n+(typeof r=="function"?0:r)+Sx(e.variantChildren,u,r,s,i)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(l)}function LS(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>Wu(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=Wu(e,t,n);else{const s=typeof t=="function"?Qn(e,t,n.custom):t;r=Promise.all(Tx(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const AS={test:e=>e==="auto",parse:e=>e},Nx=e=>t=>t.test(e),_x=[ts,O,Wt,Kt,lk,ak,AS],Mh=e=>_x.find(Nx(e));function DS(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||$0(e):!0}const RS=new Set(["brightness","contrast","saturate","opacity"]);function VS(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(xd)||[];if(!r)return e;const s=n.replace(r,"");let i=RS.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const IS=/\b([a-z-]*)\(.*?\)/gu,Gu={...Dt,getAnimatableNone:e=>{const t=e.match(IS);return t?t.map(VS).join(" "):e}},Ku={...Dt,getAnimatableNone:e=>{const t=Dt.parse(e);return Dt.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Lh={...ts,transform:Math.round},FS={rotate:Kt,pathRotation:Kt,rotateX:Kt,rotateY:Kt,rotateZ:Kt,scale:Oi,scaleX:Oi,scaleY:Oi,scaleZ:Oi,skew:Kt,skewX:Kt,skewY:Kt,distance:O,translateX:O,translateY:O,translateZ:O,x:O,y:O,z:O,perspective:O,transformPerspective:O,opacity:ri,originX:yh,originY:yh,originZ:O},Go={borderWidth:O,borderTopWidth:O,borderRightWidth:O,borderBottomWidth:O,borderLeftWidth:O,borderRadius:O,borderTopLeftRadius:O,borderTopRightRadius:O,borderBottomRightRadius:O,borderBottomLeftRadius:O,width:O,maxWidth:O,height:O,maxHeight:O,top:O,right:O,bottom:O,left:O,inset:O,insetBlock:O,insetBlockStart:O,insetBlockEnd:O,insetInline:O,insetInlineStart:O,insetInlineEnd:O,padding:O,paddingTop:O,paddingRight:O,paddingBottom:O,paddingLeft:O,paddingBlock:O,paddingBlockStart:O,paddingBlockEnd:O,paddingInline:O,paddingInlineStart:O,paddingInlineEnd:O,margin:O,marginTop:O,marginRight:O,marginBottom:O,marginLeft:O,marginBlock:O,marginBlockStart:O,marginBlockEnd:O,marginInline:O,marginInlineStart:O,marginInlineEnd:O,fontSize:O,backgroundPositionX:O,backgroundPositionY:O,...FS,zIndex:Lh,fillOpacity:ri,strokeOpacity:ri,numOctaves:Lh},OS={...Go,color:Ce,backgroundColor:Ce,outlineColor:Ce,fill:Ce,stroke:Ce,borderColor:Ce,borderTopColor:Ce,borderRightColor:Ce,borderBottomColor:Ce,borderLeftColor:Ce,filter:Gu,WebkitFilter:Gu,mask:Ku,WebkitMask:Ku},Mx=e=>OS[e],zS=new Set([Gu,Ku]);function Lx(e,t){let n=Mx(e);return zS.has(n)||(n=Dt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const BS=new Set(["auto","none","0"]);function $S(e,t,n){let r=0,s;for(;r{t.getValue(u).set(c)}),this.resolveNoneKeyframes()}}const Md=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Ax(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 qu=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Ds(e){return B0(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:qr,cancel:Dx}=ex(queueMicrotask,!1),Pt={x:!1,y:!1};function Rx(){return Pt.x||Pt.y}function US(e){return e==="x"||e==="y"?Pt[e]?null:(Pt[e]=!0,()=>{Pt[e]=!1}):Pt.x||Pt.y?null:(Pt.x=Pt.y=!0,()=>{Pt.x=Pt.y=!1})}function Vx(e,t){const n=Ax(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function WS(e){return!(e.pointerType==="touch"||Rx())}function GS(e,t,n={}){const[r,s,i]=Vx(e,n);return r.forEach(o=>{let l=!1,u=!1,c;const d=()=>{o.removeEventListener("pointerleave",v)},f=b=>{c&&(c(b),c=void 0),d()},h=b=>{l=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),u&&(u=!1,f(b))},g=()=>{l=!0,window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",h,s)},v=b=>{if(b.pointerType!=="touch"){if(l){u=!0;return}f(b)}},w=b=>{if(!WS(b))return;u=!1;const p=t(o,b);typeof p=="function"&&(c=p,o.addEventListener("pointerleave",v,s))};o.addEventListener("pointerenter",w,s),o.addEventListener("pointerdown",g,s)}),i}const Ix=(e,t)=>t?e===t?!0:Ix(e,t.parentElement):!1,Ld=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,KS=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function qS(e){return KS.has(e.tagName)||e.isContentEditable===!0}const YS=new Set(["INPUT","SELECT","TEXTAREA"]);function XS(e){return YS.has(e.tagName)||e.isContentEditable===!0}const oo=new WeakSet;function Ah(e){return t=>{t.key==="Enter"&&e(t)}}function cl(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const ZS=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Ah(()=>{if(oo.has(n))return;cl(n,"down");const s=Ah(()=>{cl(n,"up")}),i=()=>cl(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 Dh(e){return Ld(e)&&!Rx()}const Rh=new WeakSet;function QS(e,t,n={}){const[r,s,i]=Vx(e,n),o=l=>{const u=l.currentTarget;if(!Dh(l)||Rh.has(l))return;oo.add(u),n.stopPropagation&&Rh.add(l);const c=t(u,l),d={...s,capture:!0},f=(v,w)=>{window.removeEventListener("pointerup",h,d),window.removeEventListener("pointercancel",g,d),oo.has(u)&&oo.delete(u),Dh(v)&&typeof c=="function"&&c(v,{success:w})},h=v=>{f(v,u===window||u===document||n.useGlobalTarget||Ix(u,v.target))},g=v=>{f(v,!1)};window.addEventListener("pointerup",h,d),window.addEventListener("pointercancel",g,d)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",o,s),Ds(l)&&(l.addEventListener("focus",c=>ZS(c,s)),!qS(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),i}function Ad(e){return B0(e)&&"ownerSVGElement"in e}const ao=new WeakMap;let un;const Fx=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:Ad(r)&&"getBBox"in r?r.getBBox()[t]:r[n],JS=Fx("inline","width","offsetWidth"),e2=Fx("block","height","offsetHeight");function t2({target:e,borderBoxSize:t}){var n;(n=ao.get(e))==null||n.forEach(r=>{r(e,{get width(){return JS(e,t)},get height(){return e2(e,t)}})})}function n2(e){e.forEach(t2)}function r2(){typeof ResizeObserver>"u"||(un=new ResizeObserver(n2))}function s2(e,t){un||r2();const n=Ax(e);return n.forEach(r=>{let s=ao.get(r);s||(s=new Set,ao.set(r,s)),s.add(t),un==null||un.observe(r)}),()=>{n.forEach(r=>{const s=ao.get(r);s==null||s.delete(t),s!=null&&s.size||un==null||un.unobserve(r)})}}const lo=new Set;let Nr;function i2(){Nr=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};lo.forEach(t=>t(e))},window.addEventListener("resize",Nr)}function o2(e){return lo.add(e),Nr||i2(),()=>{lo.delete(e),!lo.size&&typeof Nr=="function"&&(window.removeEventListener("resize",Nr),Nr=void 0)}}function Yu(e,t){return typeof e=="function"?o2(e):s2(e,t)}function Ox(e,t){let n;const r=()=>{const{currentTime:s}=t,o=(s===null?0:s.value)/100;n!==o&&e(o),n=o};return J.preUpdate(r,!0),()=>St(r)}function a2(e){return Ad(e)&&e.tagName==="svg"}function l2(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],s=e[1+n],i=e[2+n],o=e[3+n],l=bd(s,i,o);return t?l(r):l}function u2(e,t,n={}){const r=e.get();let s=null,i=r,o;const l=typeof r=="string"?r.replace(/[\d.-]/g,""):void 0,u=()=>{s&&(s.stop(),s=null),e.animation=void 0},c=()=>{const f=Vh(e.get()),h=Vh(i);if(f===h){u();return}const g=s?s.getGeneratorVelocity():e.getVelocity();u(),s=new si({keyframes:[f,h],velocity:g,type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:o})},d=()=>{var f;c(),e.animation=s??void 0,(f=e.events.animationStart)==null||f.notify(),s==null||s.then(()=>{var h;e.animation=void 0,(h=e.events.animationComplete)==null||h.notify()})};if(e.attach((f,h)=>{i=f,o=g=>h(dl(g,l)),J.postRender(d)},u),Le(t)){let f=n.skipInitialAnimation===!0;const h=t.on("change",v=>{f?(f=!1,e.jump(dl(v,l),!1)):e.set(dl(v,l))}),g=e.on("destroy",h);return()=>{h(),g()}}return u}function dl(e,t){return t?e+t:e}function Vh(e){return typeof e=="number"?e:parseFloat(e)}const c2=[..._x,Ce,Dt],d2=e=>c2.find(Nx(e)),Ih=()=>({translate:0,scale:1,origin:0,originPoint:0}),_r=()=>({x:Ih(),y:Ih()}),Fh=()=>({min:0,max:0}),Ne=()=>({x:Fh(),y:Fh()}),f2=new WeakMap;function ja(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ii(e){return typeof e=="string"||Array.isArray(e)}const Dd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Rd=["initial",...Dd];function Ea(e){return ja(e.animate)||Rd.some(t=>ii(e[t]))}function zx(e){return!!(Ea(e)||e.variants)}function h2(e,t,n){for(const r in t){const s=t[r],i=n[r];if(Le(s))e.addValue(r,s);else if(Le(i))e.addValue(r,Mt(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,Mt(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Ko={current:null},Vd={current:!1},m2=typeof window<"u";function Bx(){if(Vd.current=!0,!!m2)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ko.current=e.matches;e.addEventListener("change",t),t()}else Ko.current=!1}const Oh=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let qo={};function $x(e){qo=e}function p2(){return qo}class g2{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:o,visualState:l},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=Sd,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 g=Ye.now();this.renderScheduledAtthis.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Vd.current||Bx(),this.shouldReduceMotion=Ko.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(),St(this.notifyUpdate),St(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&&kx.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:l,times:u,ease:c,duration:d}=n.accelerate,f=new wx({element:this.current,name:t,keyframes:l,times:u,ease:c,duration:dt(d)}),h=o(f);this.valueSubscriptions.set(t,()=>{h(),f.cancel()});return}const r=rs.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&J.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 qo){const n=qo[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):Ne()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Mt(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"&&(z0(r)||$0(r))?r=parseFloat(r):!d2(r)&&Dt.test(n)&&(r=Lx(t,n)),this.setBaseTarget(t,Le(r)?r.get():r)),Le(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 o=Nd(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Le(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 fd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){qr.render(this.render)}}class Hx extends g2{constructor(){super(...arguments),this.KeyframeResolver=HS}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;Le(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class In{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Ux({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function x2({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function y2(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 fl(e){return e===void 0||e===1}function Xu({scale:e,scaleX:t,scaleY:n}){return!fl(e)||!fl(t)||!fl(n)}function Hn(e){return Xu(e)||Wx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Wx(e){return zh(e.x)||zh(e.y)}function zh(e){return e&&e!=="0%"}function Yo(e,t,n){const r=e-n,s=t*r;return n+s}function Bh(e,t,n,r,s){return s!==void 0&&(e=Yo(e,s,r)),Yo(e,n,r)+t}function Zu(e,t=0,n=1,r,s){e.min=Bh(e.min,t,n,r,s),e.max=Bh(e.max,t,n,r,s)}function Gx(e,{x:t,y:n}){Zu(e.x,t.translate,t.scale,t.originPoint),Zu(e.y,n.translate,n.scale,n.originPoint)}const $h=.999999999999,Hh=1.0000000000001;function v2(e,t,n,r=!1){var l;const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let u=0;u$h&&(t.x=1),t.y$h&&(t.y=1)}function Bt(e,t){e.min+=t,e.max+=t}function Uh(e,t,n,r,s=.5){const i=ue(e.min,e.max,s);Zu(e,t,n,i,r)}function Wh(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function uo(e,t,n){const r=n??e;Uh(e.x,Wh(t.x,r.x),t.scaleX,t.scale,t.originX),Uh(e.y,Wh(t.y,r.y),t.scaleY,t.scale,t.originY)}function Kx(e,t){return Ux(y2(e.getBoundingClientRect(),t))}function w2(e,t,n){const r=Kx(e,n),{scroll:s}=t;return s&&(Bt(r.x,s.offset.x),Bt(r.y,s.offset.y)),r}const b2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},k2=ns.length;function S2(e,t,n){let r="",s=!0;for(let o=0;o{if(!t.target)return e;if(typeof e=="string")if(O.test(e))e=parseFloat(e);else return e;const n=Gh(e,t.target.x),r=Gh(e,t.target.y);return`${n}% ${r}%`}},j2={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Dt.parse(e);if(s.length>5)return r;const i=Dt.createTransformer(e),o=typeof s[0]!="number"?1:0,l=n.x.scale*t.x,u=n.y.scale*t.y;s[0+o]/=l,s[1+o]/=u;const c=ue(l,u,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),i(s)}},Qu={borderRadius:{...hs,applyTo:[...Md]},borderTopLeftRadius:hs,borderTopRightRadius:hs,borderBottomLeftRadius:hs,borderBottomRightRadius:hs,boxShadow:j2};function Yx(e,{layout:t,layoutId:n}){return rs.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Qu[e]||e==="opacity")}function Fd(e,t,n){var o;const r=e.style,s=t==null?void 0:t.style,i={};if(!r)return i;for(const l in r)(Le(r[l])||s&&Le(s[l])||Yx(l,e)||((o=n==null?void 0:n.getValue(l))==null?void 0:o.liveStyle)!==void 0)&&(i[l]=r[l]);return i}function E2(e){return window.getComputedStyle(e)}class C2 extends Hx{constructor(){super(...arguments),this.type="html",this.renderInstance=qx}readValueFromInstance(t,n){var r;if(rs.has(n))return(r=this.projection)!=null&&r.isProjecting?Iu(n):Gk(t,n);{const s=E2(t),i=(nx(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Kx(t,n)}build(t,n,r){Id(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Fd(t,n,r)}}const P2={offset:"stroke-dashoffset",array:"stroke-dasharray"},T2={offset:"strokeDashoffset",array:"strokeDasharray"};function N2(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?P2:T2;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const _2=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Xx(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...l},u,c,d){if(Id(e,l,c),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h}=e;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete f.transformBox);for(const g of _2)f[g]!==void 0&&(h[g]=f[g],delete f[g]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),s!==void 0&&N2(f,s,i,o,!1)}const Zx=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"]),Qx=e=>typeof e=="string"&&e.toLowerCase()==="svg";function M2(e,t,n,r){qx(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(Zx.has(s)?s:_d(s),t.attrs[s])}function Jx(e,t,n){const r=Fd(e,t,n);for(const s in e)if(Le(e[s])||Le(t[s])){const i=ns.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}class L2 extends Hx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ne}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(rs.has(n)){const r=Mx(n);return r&&r.default||0}return n=Zx.has(n)?n:_d(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Jx(t,n,r)}build(t,n,r){Xx(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){M2(t,n,r,s)}mount(t){this.isSVGTag=Qx(t.tagName),super.mount(t)}}const A2=Rd.length;function ey(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ey(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:r})=>LS(e,n,r)))}function I2(e){let t=V2(e),n=Kh(),r=!0,s=!1;const i=c=>(d,f)=>{var g;const h=Qn(e,f,c==="exit"?(g=e.presenceContext)==null?void 0:g.custom:void 0);if(h){const{transition:v,transitionEnd:w,...b}=h;d={...d,...b,...w}}return d};function o(c){t=c(e)}function l(c){const{props:d}=e,f=ey(e.parent)||{},h=[],g=new Set;let v={},w=1/0;for(let p=0;pw&&E,C=!1;const B=Array.isArray(k)?k:[k];let H=B.reduce(i(x),{});T===!1&&(H={});const{prevResolvedValues:ne={}}=y,W={...ne,...H},K=N=>{_=!0,g.has(N)&&(C=!0,g.delete(N)),y.needsAnimating[N]=!0;const A=e.getValue(N);A&&(A.liveStyle=!1)};for(const N in W){const A=H[N],L=ne[N];if(v.hasOwnProperty(N))continue;let F=!1;Hu(A)&&Hu(L)?F=!ty(A,L)||j:F=A!==L,F?A!=null?K(N):g.add(N):A!==void 0&&g.has(N)?K(N):y.protectedKeys[N]=!0}y.prevProp=k,y.prevResolvedValues=H,y.isActive&&(v={...v,...H}),(r||s)&&e.blockInitialAnimation&&(_=!1);const q=S&&j;_&&(!q||C)&&h.push(...B.map(N=>{const A={type:x};if(typeof N=="string"&&(r||s)&&!q&&e.manuallyAnimateOnMount&&e.parent){const{parent:L}=e,F=Qn(L,N);if(L.enteringChildren&&F){const{delayChildren:P}=F.transition||{};A.delay=Sx(L.enteringChildren,e,P)}}return{animation:N,options:A}}))}if(g.size){const p={};if(typeof d.initial!="boolean"){const x=Qn(e,Array.isArray(d.initial)?d.initial[0]:d.initial);x&&x.transition&&(p.transition=x.transition)}g.forEach(x=>{const y=e.getBaseTarget(x),k=e.getValue(x);k&&(k.liveStyle=!0),p[x]=y??null}),h.push({animation:p})}let b=!!h.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,s=!1,b?t(h):Promise.resolve()}function u(c,d){var h;if(n[c].isActive===d)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(g=>{var v;return(v=g.animationState)==null?void 0:v.setActive(c,d)}),n[c].isActive=d;const f=l(c);for(const g in n)n[g].protectedKeys={};return f}return{animateChanges:l,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Kh(),s=!0}}}function F2(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ty(t,e):!1}function On(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Kh(){return{animate:On(!0),whileInView:On(),whileHover:On(),whileTap:On(),whileDrag:On(),whileFocus:On(),exit:On()}}function Ju(e,t){e.min=t.min,e.max=t.max}function Ct(e,t){Ju(e.x,t.x),Ju(e.y,t.y)}function qh(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const ny=1e-4,O2=1-ny,z2=1+ny,ry=.01,B2=0-ry,$2=0+ry;function Xe(e){return e.max-e.min}function H2(e,t,n){return Math.abs(e-t)<=n}function Yh(e,t,n,r=.5){e.origin=r,e.originPoint=ue(t.min,t.max,e.origin),e.scale=Xe(n)/Xe(t),e.translate=ue(n.min,n.max,e.origin)-e.originPoint,(e.scale>=O2&&e.scale<=z2||isNaN(e.scale))&&(e.scale=1),(e.translate>=B2&&e.translate<=$2||isNaN(e.translate))&&(e.translate=0)}function Rs(e,t,n,r){Yh(e.x,t.x,n.x,r?r.originX:void 0),Yh(e.y,t.y,n.y,r?r.originY:void 0)}function Xh(e,t,n,r=0){const s=r?ue(n.min,n.max,r):n.min;e.min=s+t.min,e.max=e.min+Xe(t)}function U2(e,t,n,r){Xh(e.x,t.x,n.x,r==null?void 0:r.x),Xh(e.y,t.y,n.y,r==null?void 0:r.y)}function Zh(e,t,n,r=0){const s=r?ue(n.min,n.max,r):n.min;e.min=t.min-s,e.max=e.min+Xe(t)}function Xo(e,t,n,r){Zh(e.x,t.x,n.x,r==null?void 0:r.x),Zh(e.y,t.y,n.y,r==null?void 0:r.y)}function Qh(e,t,n,r,s){return e-=t,e=Yo(e,1/n,r),s!==void 0&&(e=Yo(e,1/s,r)),e}function W2(e,t=0,n=1,r=.5,s,i=e,o=e){if(Wt.test(t)&&(t=parseFloat(t),t=ue(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=ue(i.min,i.max,r);e===i&&(l-=t),e.min=Qh(e.min,t,n,l,s),e.max=Qh(e.max,t,n,l,s)}function Jh(e,t,[n,r,s],i,o){W2(e,t[n],t[r],t[s],t.scale,i,o)}const G2=["x","scaleX","originX"],K2=["y","scaleY","originY"];function em(e,t,n,r){Jh(e.x,t,G2,n?n.x:void 0,r?r.x:void 0),Jh(e.y,t,K2,n?n.y:void 0,r?r.y:void 0)}function tm(e){return e.translate===0&&e.scale===1}function sy(e){return tm(e.x)&&tm(e.y)}function nm(e,t){return e.min===t.min&&e.max===t.max}function q2(e,t){return nm(e.x,t.x)&&nm(e.y,t.y)}function rm(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function iy(e,t){return rm(e.x,t.x)&&rm(e.y,t.y)}function sm(e){return Xe(e.x)/Xe(e.y)}function im(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function zt(e){return[e("x"),e("y")]}function Y2(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:d,pathRotation:f,rotateX:h,rotateY:g,skewX:v,skewY:w}=n;c&&(r=`perspective(${c}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotate(${f}deg) `),h&&(r+=`rotateX(${h}deg) `),g&&(r+=`rotateY(${g}deg) `),v&&(r+=`skewX(${v}deg) `),w&&(r+=`skewY(${w}deg) `)}const l=e.x.scale*t.x,u=e.y.scale*t.y;return(l!==1||u!==1)&&(r+=`scale(${l}, ${u})`),r||"none"}const X2=Md.length,om=e=>typeof e=="string"?parseFloat(e):e,am=e=>typeof e=="number"||O.test(e);function Z2(e,t,n,r,s,i){s?(e.opacity=ue(0,n.opacity??1,Q2(r)),e.opacityExit=ue(t.opacity??1,0,J2(r))):i&&(e.opacity=ue(t.opacity??1,n.opacity??1,r));for(let o=0;ort?1:n(Gr(e,t,r))}function ej(e,t,n){const r=Le(e)?e:Mt(e);return r.start(Td("",r,t,n)),r.animation}function oi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}const tj=(e,t)=>e.depth-t.depth;class nj{constructor(){this.children=[],this.isDirty=!1}add(t){cd(this.children,t),this.isDirty=!0}remove(t){$o(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(tj),this.isDirty=!1,this.children.forEach(t)}}function rj(e,t){const n=Ye.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(St(r),e(i-t))};return J.setup(r,!0),()=>St(r)}function co(e){return Le(e)?e.get():e}class sj{constructor(){this.members=[]}add(t){cd(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&&($o(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if($o(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:o}=t.options;(i===void 0||i!==o)&&(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,o;(r=(n=t.options).onExitComplete)==null||r.call(n),(o=(s=t.resumingFrom)==null?void 0:(i=s.options).onExitComplete)==null||o.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 fo={hasAnimatedSinceResize:!0,hasEverUpdated:!1},hl=["","X","Y","Z"],ij=1e3;let oj=0;function ml(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ay(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Px(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",J,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ay(r)}function ly({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},l=t==null?void 0:t()){this.id=oj++,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(uj),this.nodes.forEach(pj),this.nodes.forEach(gj),this.nodes.forEach(cj)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let u=0;uthis.root.updateBlockedByResize=!1;J.read(()=>{f=window.innerWidth}),e(o,()=>{const g=window.innerWidth;g!==f&&(f=g,this.root.updateBlockedByResize=!0,d&&d(),d=rj(h,250),fo.hasAnimatedSinceResize&&(fo.hasAnimatedSinceResize=!1,this.nodes.forEach(dm)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||bj,{onLayoutAnimationStart:w,onLayoutAnimationComplete:b}=c.getProps(),p=!this.targetLayout||!iy(this.targetLayout,g),x=!f&&h;if(this.options.layoutRoot||this.resumeFrom||x||f&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...Pd(v,"layout"),onPlay:w,onComplete:b};(c.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(d,x,y.path)}else f||dm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),St(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(xj),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ay(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Xe(this.snapshot.measuredBox.x)&&!Xe(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{const S=T/1e3,j=E==null?void 0:E(S);j?(h.x.translate=j.x,h.x.scale=ue(o.x.scale,1,S),h.x.origin=o.x.origin,h.x.originPoint=o.x.originPoint,h.y.translate=j.y,h.y.scale=ue(o.y.scale,1,S),h.y.origin=o.y.origin,h.y.originPoint=o.y.originPoint):(fm(h.x,o.x,S),fm(h.y,o.y,S)),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Xo(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),vj(this.relativeTarget,this.relativeTargetOrigin,g,S),k&&q2(this.relativeTarget,k)&&(this.isProjectionDirty=!1),k||(k=Ne()),Ct(k,this.relativeTarget)),b&&(this.animationValues=f,Z2(f,d,this.latestValues,S,y,x)),j&&j.rotate!==void 0&&(this.animationValues||(this.animationValues=f),this.animationValues.pathRotation=j.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var l,u,c;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(c=(u=this.resumingFrom)==null?void 0:u.currentAnimation)==null||c.stop(),this.pendingAnimation&&(St(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=J.update(()=>{fo.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Mt(0)),this.motionValue.jump(0,!1),this.currentAnimation=ej(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),o.onUpdate&&o.onUpdate(d)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ij),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:u,layout:c,latestValues:d}=o;if(!(!l||!u||!c)){if(this!==o&&this.layout&&c&&uy(this.options.animationType,this.layout.layoutBox,c.layoutBox)){u=this.target||Ne();const f=Xe(this.layout.layoutBox.x);u.x.min=o.target.x.min,u.x.max=u.x.min+f;const h=Xe(this.layout.layoutBox.y);u.y.min=o.target.y.min,u.y.max=u.y.min+h}Ct(l,u),uo(l,d),Rs(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new sj),this.sharedNodes.get(o).add(l);const c=l.options.initialPromotionConfig;l.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var l;const{layoutId:o}=this.options;return o?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:o}=this.options;return o?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:u}={}){const c=this.getStack();c&&c.promote(this,u),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:u}=o;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(l=!0),!l)return;const c={};u.z&&ml("z",o,c,this.animationValues);for(let d=0;d{var l;return(l=o.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(um),this.root.sharedNodes.clear()}}}function aj(e){e.updateLayout()}function lj(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,o=t.source!==e.layout.source;if(i==="size")zt(f=>{const h=o?t.measuredBox[f]:t.layoutBox[f],g=Xe(h);h.min=r[f].min,h.max=h.min+g});else if(i==="x"||i==="y"){const f=i==="x"?"y":"x";Ju(o?t.measuredBox[f]:t.layoutBox[f],r[f])}else uy(i,t.layoutBox,r)&&zt(f=>{const h=o?t.measuredBox[f]:t.layoutBox[f],g=Xe(r[f]);h.max=h.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+g)});const l=_r();Rs(l,r,t.layoutBox);const u=_r();o?Rs(u,e.applyTransform(s,!0),t.measuredBox):Rs(u,r,t.layoutBox);const c=!sy(l);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:g}=f;if(h&&g){const v=e.options.layoutAnchor||void 0,w=Ne();Xo(w,t.layoutBox,h.layoutBox,v);const b=Ne();Xo(b,r,g.layoutBox,v),iy(w,b)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=w,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:u,layoutDelta:l,hasLayoutChanged:c,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function uj(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 cj(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function dj(e){e.clearSnapshot()}function um(e){e.clearMeasurements()}function fj(e){e.isLayoutDirty=!0,e.updateLayout()}function cm(e){e.isLayoutDirty=!1}function hj(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function mj(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function dm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function pj(e){e.resolveTargetDelta()}function gj(e){e.calcProjection()}function xj(e){e.resetSkewAndRotation()}function yj(e){e.removeLeadSnapshot()}function fm(e,t,n){e.translate=ue(t.translate,0,n),e.scale=ue(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function hm(e,t,n,r){e.min=ue(t.min,n.min,r),e.max=ue(t.max,n.max,r)}function vj(e,t,n,r){hm(e.x,t.x,n.x,r),hm(e.y,t.y,n.y,r)}function wj(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const bj={duration:.45,ease:[.4,0,.1,1]},mm=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),pm=mm("applewebkit/")&&!mm("chrome/")?Math.round:ot;function gm(e){e.min=pm(e.min),e.max=pm(e.max)}function kj(e){gm(e.x),gm(e.y)}function uy(e,t,n){return e==="position"||e==="preserve-aspect"&&!H2(sm(t),sm(n),.2)}function Sj(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const jj=ly({attachResizeListener:(e,t)=>oi(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}),pl={current:void 0},cy=ly({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!pl.current){const e=new jj({});e.mount(window),e.setOptions({layoutScroll:!0}),pl.current=e}return pl.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ir=m.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function xm(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ej(...e){return t=>{let n=!1;const r=e.map(s=>{const i=xm(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s{const{width:g,height:v,top:w,left:b,right:p,bottom:x,direction:y}=u.current;if(t||i===!1||!l.current||!g||!v)return;const k=y==="rtl",E=n==="left"?k?`right: ${p}`:`left: ${b}`:k?`left: ${b}`:`right: ${p}`,T=r==="bottom"?`bottom: ${x}`:`top: ${w}`;l.current.dataset.motionPopId=o;const S=document.createElement("style");c&&(S.nonce=c);const j=s??document.head;return j.appendChild(S),S.sheet&&S.sheet.insertRule(`
[data-motion-pop-id="${o}"] {
position: absolute !important;
width: ${g}px !important;
@@ -73,7 +73,7 @@ Error generating stack: `+i.message+`
${E}px !important;
${T}px !important;
}
- `),()=>{var _;(_=l.current)==null||_.removeAttribute("data-motion-pop-id"),j.contains(S)&&j.removeChild(S)}},[t]),a.jsx(Pj,{isPresent:t,childRef:l,sizeRef:u,pop:i,children:i===!1?e:m.cloneElement(e,{ref:f})})}const Nj=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o,anchorX:l,anchorY:u,root:c})=>{const d=sn(_j),f=m.useId(),h=m.useRef(n),g=m.useRef(r);hi(()=>{h.current=n,g.current=r});let v=!0,w=m.useMemo(()=>(v=!1,{id:f,initial:t,isPresent:n,custom:s,onExitComplete:b=>{d.set(b,!0);for(const p of d.values())if(!p)return;r&&r()},register:b=>(d.set(b,!1),()=>{var p;d.delete(b),!h.current&&!d.size&&((p=g.current)==null||p.call(g))})}),[n,d,r]);return i&&v&&(w={...w}),m.useMemo(()=>{d.forEach((b,p)=>d.set(p,!1))},[n]),m.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=a.jsx(Tj,{pop:o==="popLayout",isPresent:n,anchorX:l,anchorY:u,root:c,children:e}),a.jsx(ka.Provider,{value:w,children:e})};function _j(){return new Map}function dy(e=!0){const t=m.useContext(ka);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=m.useId();m.useEffect(()=>{if(e)return s(i)},[e]);const o=m.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const zi=e=>e.key||"";function ym(e){const t=[];return m.Children.forEach(e,n=>{m.isValidElement(n)&&t.push(n)}),t}const Mj=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1,anchorX:l="left",anchorY:u="top",root:c})=>{const[d,f]=dy(o),h=m.useMemo(()=>ym(e),[e]),g=o&&!d?[]:h.map(zi),v=m.useRef(!0),w=m.useRef(h),b=sn(()=>new Map),p=m.useRef(new Set),[x,y]=m.useState(h),[k,E]=m.useState(h);hi(()=>{v.current=!1,w.current=h;for(let j=0;j{const _=zi(j),C=o&&!d?!1:h===k||g.includes(_),B=()=>{if(p.current.has(_))return;if(b.has(_))p.current.add(_),b.set(_,!0);else return;let H=!0;b.forEach(ee=>{ee||(H=!1)}),H&&(S==null||S(),E(w.current),o&&(f==null||f()),r&&r())};return a.jsx(Nj,{isPresent:C,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,root:c,onExitComplete:C?void 0:B,anchorX:l,anchorY:u,children:j},_)})})},fy=m.createContext({strict:!1}),vm={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 wm=!1;function Lj(){if(wm)return;const e={};for(const t in vm)e[t]={isEnabled:n=>vm[t].some(r=>!!n[r])};$x(e),wm=!0}function hy(){return Lj(),p2()}function Aj(e){const t=hy();for(const n in e)t[n]={...t[n],...e[n]};$x(t)}const Dj=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 Zo(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Dj.has(e)}let my=e=>!Zo(e);function py(e){typeof e=="function"&&(my=t=>t.startsWith("on")?!Zo(t):e(t))}try{py(require("@emotion/is-prop-valid").default)}catch{}function Rj(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||Le(e[s])||(my(s)||n===!0&&Zo(s)||!t&&!Zo(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function Vj({children:e,isValidProp:t,...n}){t&&py(t);const r=m.useContext(ir);n={...r,...n},n.transition=Cd(n.transition,r.transition),n.isStatic=sn(()=>n.isStatic);const s=m.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations]);return a.jsx(ir.Provider,{value:s,children:e})}const Ca=m.createContext({});function Ij(e,t){if(Ea(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ii(n)?n:void 0,animate:ii(r)?r:void 0}}return e.inherit!==!1?t:{}}function Fj(e){const{initial:t,animate:n}=Ij(e,m.useContext(Ca));return m.useMemo(()=>({initial:t,animate:n}),[bm(t),bm(n)])}function bm(e){return Array.isArray(e)?e.join(" "):e}const Od=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function gy(e,t,n){for(const r in t)!Le(t[r])&&!Yx(r,n)&&(e[r]=t[r])}function Oj({transformTemplate:e},t){return m.useMemo(()=>{const n=Od();return Id(n,t,e),Object.assign({},n.vars,n.style)},[t])}function zj(e,t){const n=e.style||{},r={};return gy(r,n,e),Object.assign(r,Oj(e,t)),r}function Bj(e,t){const n={},r=zj(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 xy=()=>({...Od(),attrs:{}});function $j(e,t,n,r){const s=m.useMemo(()=>{const i=xy();return Xx(i,t,Qx(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};gy(i,e.style,e),s.style={...i,...s.style}}return s}const Hj=["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 zd(e){return typeof e!="string"||e.includes("-")?!1:!!(Hj.indexOf(e)>-1||/[A-Z]/u.test(e))}function Uj(e,t,n,{latestValues:r},s,i=!1,o){const u=(o??zd(e)?$j:Bj)(t,r,s,e),c=Rj(t,typeof e=="string",i),d=e!==m.Fragment?{...c,...u,ref:n}:{},{children:f}=t,h=m.useMemo(()=>Le(f)?f.get():f,[f]);return m.createElement(e,{...d,children:h})}function Wj({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:Gj(n,r,s,e),renderState:t()}}function Gj(e,t,n,r){const s={},i=r(e,{});for(const h in i)s[h]=co(i[h]);let{initial:o,animate:l}=e;const u=Ea(e),c=zx(e);t&&c&&!u&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const f=d?l:o;if(f&&typeof f!="boolean"&&!ja(f)){const h=Array.isArray(f)?f:[f];for(let g=0;g(t,n)=>{const r=m.useContext(Ca),s=m.useContext(ka),i=()=>Wj(e,t,r,s);return n?i():sn(i)},Kj=yy({scrapeMotionValuesFromProps:Fd,createRenderState:Od}),qj=yy({scrapeMotionValuesFromProps:Jx,createRenderState:xy}),Yj=Symbol.for("motionComponentSymbol");function Xj(e,t,n){const r=m.useRef(n);m.useInsertionEffect(()=>{r.current=n});const s=m.useRef(null);return m.useCallback(i=>{var l;i&&((l=e.onMount)==null||l.call(e,i)),t&&(i?t.mount(i):t.unmount());const o=r.current;if(typeof o=="function")if(i){const u=o(i);typeof u=="function"&&(s.current=u)}else s.current?(s.current(),s.current=null):o(i);else o&&(o.current=i)},[t])}const vy=m.createContext({});function pr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Zj(e,t,n,r,s,i){var y,k;const{visualElement:o}=m.useContext(Ca),l=m.useContext(fy),u=m.useContext(ka),c=m.useContext(ir),d=c.reducedMotion,f=c.skipAnimations,h=m.useRef(null),g=m.useRef(!1);r=r||l.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:i}),g.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const v=h.current,w=m.useContext(vy);v&&!v.projection&&s&&(v.type==="html"||v.type==="svg")&&Qj(h.current,n,s,w);const b=m.useRef(!1);m.useInsertionEffect(()=>{v&&b.current&&v.update(n,u)});const p=n[Cx],x=m.useRef(!!p&&typeof window<"u"&&!((y=window.MotionHandoffIsComplete)!=null&&y.call(window,p))&&((k=window.MotionHasOptimisedAnimation)==null?void 0:k.call(window,p)));return hi(()=>{g.current=!0,v&&(b.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),x.current&&v.animationState&&v.animationState.animateChanges())}),m.useEffect(()=>{v&&(!x.current&&v.animationState&&v.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var E;(E=window.MotionHandoffMarkAsComplete)==null||E.call(window,p)}),x.current=!1),v.enteringChildren=void 0)}),v}function Qj(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:l,layoutScroll:u,layoutRoot:c,layoutAnchor:d,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:wy(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||l&&pr(l),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:u,layoutRoot:c,layoutAnchor:d})}function wy(e){if(e)return e.options.allowProjection!==!1?e.projection:wy(e.parent)}function gl(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&Aj(r);const i=n?n==="svg":zd(e),o=i?qj:Kj;function l(c,d){let f;const h={...m.useContext(ir),...c,layoutId:Jj(c)},{isStatic:g}=h,v=Fj(c),w=o(c,g);if(!g&&typeof window<"u"){eE();const b=tE(h);f=b.MeasureLayout,v.visualElement=Zj(e,w,h,s,b.ProjectionNode,i)}return a.jsxs(Ca.Provider,{value:v,children:[f&&v.visualElement?a.jsx(f,{visualElement:v.visualElement,...h}):null,Uj(e,c,Xj(w,v.visualElement,d),w,g,t,i)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=m.forwardRef(l);return u[Yj]=e,u}function Jj({layoutId:e}){const t=m.useContext(ud).id;return t&&e!==void 0?t+"-"+e:e}function eE(e,t){m.useContext(fy).strict}function tE(e){const t=hy(),{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 nE(e,t){if(typeof Proxy>"u")return gl;const n=new Map,r=(i,o)=>gl(i,o,e,t),s=(i,o)=>r(i,o);return new Proxy(s,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,gl(o,void 0,e,t)),n.get(o))})}const rE=(e,t)=>t.isSVG??zd(e)?new L2(t):new C2(t,{allowProjection:e!==m.Fragment});class sE extends In{constructor(t){super(t),t.animationState||(t.animationState=I2(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ja(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 iE=0;class oE extends In{constructor(){super(...arguments),this.id=iE++,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:o,custom:l}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){const u=Qn(this.node,o,l);if(u){const{transition:c,transitionEnd:d,...f}=u;for(const h in f)(i=this.node.getValue(h))==null||i.jump(f[h])}}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 aE={animation:{Feature:sE},exit:{Feature:oE}};function xi(e){return{point:{x:e.pageX,y:e.pageY}}}const lE=e=>t=>Ld(t)&&e(t,xi(t));function Vs(e,t,n,r){return oi(e,t,lE(n),r)}const by=({current:e})=>e?e.ownerDocument.defaultView:null,km=(e,t)=>Math.abs(e-t);function uE(e,t){const n=km(e.x,t.x),r=km(e.y,t.y);return Math.sqrt(n**2+r**2)}const Sm=new Set(["auto","scroll"]);class ky{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:l}={}){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=v=>{this.handleScroll(v.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Bi(this.lastRawMoveEventInfo,this.transformPagePoint));const v=xl(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,b=uE(v.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!b)return;const{point:p}=v,{timestamp:x}=Ae;this.history.push({...p,timestamp:x});const{onStart:y,onMove:k}=this.handlers;w||(y&&y(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,v)},this.handlePointerMove=(v,w)=>{this.lastMoveEvent=v,this.lastRawMoveEventInfo=w,this.lastMoveEventInfo=Bi(w,this.transformPagePoint),J.update(this.updatePoint,!0)},this.handlePointerUp=(v,w)=>{this.end();const{onEnd:b,onSessionEnd:p,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=xl(v.type==="pointercancel"?this.lastMoveEventInfo:Bi(w,this.transformPagePoint),this.history);this.startEvent&&b&&b(v,y),p&&p(v,y)},!Ld(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const u=xi(t),c=Bi(u,this.transformPagePoint),{point:d}=c,{timestamp:f}=Ae;this.history=[{...d,timestamp:f}];const{onSessionStart:h}=n;h&&h(t,xl(c,this.history));const g={passive:!0,capture:!0};this.removeListeners=mi(Vs(this.contextWindow,"pointermove",this.handlePointerMove,g),Vs(this.contextWindow,"pointerup",this.handlePointerUp,g),Vs(this.contextWindow,"pointercancel",this.handlePointerUp,g)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Sm.has(r.overflowX)||Sm.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),J.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),St(this.updatePoint)}}function Bi(e,t){return t?{point:t(e.point)}:e}function jm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xl({point:e},t){return{point:e,delta:jm(e,Sy(t)),offset:jm(e,cE(t)),velocity:dE(t,.1)}}function cE(e){return e[0]}function Sy(e){return e[e.length-1]}function dE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=Sy(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>dt(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>dt(t)*2&&(r=e[1]);const i=vt(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function fE(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?ue(n,e,r.max):Math.min(e,n)),e}function Em(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 hE(e,{top:t,left:n,bottom:r,right:s}){return{x:Em(e.x,n,s),y:Em(e.y,t,r)}}function Cm(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Gr(t.min,t.max-r,e.min):r>s&&(n=Gr(e.min,e.max-s,t.min)),Vt(0,1,n)}function gE(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 ec=.35;function xE(e=ec){return e===!1?e=0:e===!0&&(e=ec),{x:Pm(e,"left","right"),y:Pm(e,"top","bottom")}}function Pm(e,t,n){return{min:Tm(e,t),max:Tm(e,n)}}function Tm(e,t){return typeof e=="number"?e:e[t]||0}const yE=new WeakMap;class vE{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=Ne(),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=f=>{n&&this.snapToCursor(xi(f).point),this.stopAnimation()},o=(f,h)=>{const{drag:g,dragPropagation:v,onDragStart:w}=this.getProps();if(g&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=US(g),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),zt(p=>{let x=this.getAxisMotionValue(p).get()||0;if(Wt.test(x)){const{projection:y}=this.visualElement;if(y&&y.layout){const k=y.layout.layoutBox[p];k&&(x=Xe(k)*(parseFloat(x)/100))}}this.originPoint[p]=x}),w&&J.update(()=>w(f,h),!1,!0),Uu(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},l=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:g,dragDirectionLock:v,onDirectionLock:w,onDrag:b}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:p}=h;if(v&&this.currentDirection===null){this.currentDirection=bE(p),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",h.point,p),this.updateAxis("y",h.point,p),this.visualElement.render(),b&&J.update(()=>b(f,h),!1,!0)},u=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new ky(t,{onSessionStart:i,onStart:o,onMove:l,onSessionEnd:u,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:by(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:o}=s;this.startAnimation(o);const{onDragEnd:l}=this.getProps();l&&J.postRender(()=>l(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||!$i(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=fE(o,this.constraints[t],this.elastic[t])),i.set(o)}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&&pr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=hE(r.layoutBox,t):this.constraints=!1,this.elastic=xE(n),s!==this.constraints&&!pr(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&zt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=gE(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!pr(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=w2(r,s.root,this.visualElement.getTransformPagePoint());let o=mE(s.layout.layoutBox,i);if(n){const l=n(x2(o));this.hasMutatedConstraints=!!l,l&&(o=Ux(l))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),u=this.constraints||{},c=zt(d=>{if(!$i(d,n,this.currentDirection))return;let f=u&&u[d]||{};(o===!0||o===d)&&(f={min:0,max:0});const h=s?200:1e6,g=s?40:1e7,v={type:"inertia",velocity:r?t[d]:0,bounceStiffness:h,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(d,v)});return Promise.all(c).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Uu(this.visualElement,t),r.start(Td(t,r,0,n,this.visualElement,!1))}stopAnimation(){zt(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){zt(n=>{const{drag:r}=this.getProps();if(!$i(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:l}=s.layout.layoutBox[n],u=i.get()||0;i.set(t[n]-ue(o,l,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!pr(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};zt(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const u=l.get();s[o]=pE({min:u,max:u},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),zt(o=>{if(!$i(o,t,null))return;const l=this.getAxisMotionValue(o),{min:u,max:c}=this.constraints[o];l.set(ue(u,c,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;yE.set(this.visualElement,this);const t=this.visualElement.current,n=Vs(t,"pointerdown",c=>{const{drag:d,dragListener:f=!0}=this.getProps(),h=c.target,g=h!==t&&XS(h);d&&f&&!g&&this.start(c)});let r;const s=()=>{const{dragConstraints:c}=this.getProps();pr(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=wE(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),J.read(s);const l=oi(window,"resize",()=>this.scalePositionWithinConstraints()),u=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(zt(f=>{const h=this.getAxisMotionValue(f);h&&(this.originPoint[f]+=c[f].translate,h.set(h.get()+c[f].translate))}),this.visualElement.render())});return()=>{l(),n(),o(),u&&u(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=ec,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:l}}}function Nm(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function wE(e,t,n){const r=Yu(e,Nm(n)),s=Yu(t,Nm(n));return()=>{r(),s()}}function $i(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function bE(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class kE extends In{constructor(t){super(t),this.removeGroupControls=ot,this.removeListeners=ot,this.controls=new vE(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ot}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 yl=e=>(t,n)=>{e&&J.update(()=>e(t,n),!1,!0)};class SE extends In{constructor(){super(...arguments),this.removePointerDownListener=ot}onPointerDown(t){this.session=new ky(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:by(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:yl(t),onStart:yl(n),onMove:yl(r),onEnd:(i,o)=>{delete this.session,s&&J.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=Vs(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 vl=!1;class jE extends m.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),vl&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),fo.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),vl=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||J.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),qr.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;vl=!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 jy(e){const[t,n]=dy(),r=m.useContext(ud);return a.jsx(jE,{...e,layoutGroup:r,switchLayoutGroup:m.useContext(vy),isPresent:t,safeToRemove:n})}const EE={pan:{Feature:SE},drag:{Feature:kE,ProjectionNode:cy,MeasureLayout:jy}};function _m(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&&J.postRender(()=>i(t,xi(t)))}class CE extends In{mount(){const{current:t}=this.node;t&&(this.unmount=GS(t,(n,r)=>(_m(this.node,r,"Start"),s=>_m(this.node,s,"End"))))}unmount(){}}class PE extends In{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=mi(oi(this.node.current,"focus",()=>this.onFocus()),oi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Mm(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&&J.postRender(()=>i(t,xi(t)))}class TE extends In{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=QS(t,(s,i)=>(Mm(this.node,i,"Start"),(o,{success:l})=>Mm(this.node,o,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const tc=new WeakMap,wl=new WeakMap,NE=e=>{const t=tc.get(e.target);t&&t(e)},_E=e=>{e.forEach(NE)};function ME({root:e,...t}){const n=e||document;wl.has(n)||wl.set(n,{});const r=wl.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(_E,{root:e,...t})),r[s]}function LE(e,t,n){const r=ME(t);return tc.set(e,n),r.observe(e),()=>{tc.delete(e),r.unobserve(e)}}const AE={some:0,all:1};class DE extends In{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,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:AE[s]},l=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:f,onViewportLeave:h}=this.node.getProps(),g=d?f:h;g&&g(c)};this.stopObserver=LE(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(RE(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function RE({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const VE={inView:{Feature:DE},tap:{Feature:TE},focus:{Feature:PE},hover:{Feature:CE}},IE={layout:{ProjectionNode:cy,MeasureLayout:jy}},FE={...aE,...VE,...EE,...IE},Qt=nE(FE,rE);function Qo(e){return typeof window>"u"?!1:e?gx():Ed()}const OE=50,Lm=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),zE=()=>({time:0,x:Lm(),y:Lm()}),BE={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Am(e,t,n,r){const s=n[t],{length:i,position:o}=BE[t],l=s.current,u=n.time;s.current=Math.abs(e[`scroll${o}`]),s.scrollLength=e[`scroll${i}`]-e[`client${i}`],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=Gr(0,s.scrollLength,s.current);const c=r-u;s.velocity=c>OE?0:hd(s.current-l,c)}function $E(e,t,n){Am(e,"x",t,n),Am(e,"y",t,n),t.time=n}function HE(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(Ds(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 o=null,l=r.parentNode;for(;!o;)l.tagName==="svg"&&(o=l),l=r.parentNode;r=o}else break;return n}const nc={start:0,center:.5,end:1};function Dm(e,t,n=0){let r=0;if(e in nc&&(e=nc[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 UE=[0,0];function WE(e,t,n,r){let s=Array.isArray(e)?e:UE,i=0,o=0;return typeof e=="number"?s=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?s=e.split(" "):s=[e,nc[e]?e:"0"]),i=Dm(s[0],n,r),o=Dm(s[1],t),i-o}const bs={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},GE={x:0,y:0};function KE(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function qE(e,t,n){const{offset:r=bs.All}=n,{target:s=e,axis:i="y"}=n,o=i==="y"?"height":"width",l=s!==e?HE(s,e):GE,u=s===e?{width:e.scrollWidth,height:e.scrollHeight}:KE(s),c={width:e.clientWidth,height:e.clientHeight};t[i].offset.length=0;let d=!t[i].interpolate;const f=r.length;for(let h=0;h{YE(e,r.target,n),$E(e,n,s),(r.offset||r.target)&&qE(e,n,r)},notify:()=>t(n)}}const hr=new WeakMap,Rm=new WeakMap,bl=new WeakMap,Vm=new WeakMap,Hi=new WeakMap,Im=e=>e===document.scrollingElement?window:e;function Ey(e,{container:t=document.scrollingElement,trackContentSize:n=!1,...r}={}){if(!t)return ot;let s=bl.get(t);s||(s=new Set,bl.set(t,s));const i=zE(),o=XE(t,e,i,r);if(s.add(o),!hr.has(t)){const u=()=>{for(const h of s)h.measure(Ae.timestamp);J.preUpdate(c)},c=()=>{for(const h of s)h.notify()},d=()=>J.read(u);hr.set(t,d);const f=Im(t);window.addEventListener("resize",d),t!==document.documentElement&&Rm.set(t,Yu(t,d)),f.addEventListener("scroll",d),d()}if(n&&!Hi.has(t)){const u=hr.get(t),c={width:t.scrollWidth,height:t.scrollHeight};Vm.set(t,c);const d=()=>{const h=t.scrollWidth,g=t.scrollHeight;(c.width!==h||c.height!==g)&&(u(),c.width=h,c.height=g)},f=J.read(d,!0);Hi.set(t,f)}const l=hr.get(t);return J.read(l,!1,!0),()=>{var f;St(l);const u=bl.get(t);if(!u||(u.delete(o),u.size))return;const c=hr.get(t);hr.delete(t),c&&(Im(t).removeEventListener("scroll",c),(f=Rm.get(t))==null||f(),window.removeEventListener("resize",c));const d=Hi.get(t);d&&(St(d),Hi.delete(t)),Vm.delete(t)}}const ZE=[[bs.Enter,"entry"],[bs.Exit,"exit"],[bs.Any,"cover"],[bs.All,"contain"]],Fm={start:0,end:1};function QE(e){const t=e.trim().split(/\s+/);if(t.length!==2)return;const n=Fm[t[0]],r=Fm[t[1]];if(!(n===void 0||r===void 0))return[n,r]}function JE(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=QE(n);if(!r)return;t.push(r)}else return;return t}function eC(e,t){const n=JE(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 Bd(e){if(!e)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[t,n]of ZE)if(eC(e,t))return{rangeStart:`${n} 0%`,rangeEnd:`${n} 100%`}}const Om=new Map;function zm(e){const t={value:0},n=Ey(r=>{t.value=r[e.axis].progress*100},e);return{currentTime:t,cancel:n}}function Cy({source:e,container:t,...n}){const{axis:r}=n;e&&(t=e);let s=Om.get(t);s||(s=new Map,Om.set(t,s));const i=n.target??"self";let o=s.get(i);o||(o={},s.set(i,o));const l=r+(n.offset??[]).join(",");return o[l]||(n.target&&Qo(n.target)?Bd(n.offset)?o[l]=new ViewTimeline({subject:n.target,axis:r}):o[l]=zm({container:t,...n}):Qo()?o[l]=new ScrollTimeline({source:t,axis:r}):o[l]=zm({container:t,...n})),o[l]}function tC(e,t){const n=Cy(t),r=t.target?Bd(t.offset):void 0,s=t.target?Qo(t.target)&&!!r:Qo();return e.attachTimeline({timeline:s?n:void 0,...r&&s&&{rangeStart:r.rangeStart,rangeEnd:r.rangeEnd},observe:i=>(i.pause(),Ox(o=>{i.time=i.iterationDuration*o},n))})}function nC(e){return e&&(e.target||e.offset)}function rC(e){return e.length===2}function sC(e,t){return rC(e)||nC(t)?Ey(n=>{e(n[t.axis].progress,n)},t):Ox(e,Cy(t))}function Py(e,{axis:t="y",container:n=document.scrollingElement,...r}={}){if(!n)return ot;const s={axis:t,container:n,...r};return typeof e=="function"?sC(e,s):tC(e,s)}const iC=()=>({scrollX:Mt(0),scrollY:Mt(0),scrollXProgress:Mt(0),scrollYProgress:Mt(0)}),Mr=e=>e?!e.current:!1;function Bm(e,t,n,r){return{factory:s=>{let i;const o=()=>{if(Mr(n)||Mr(r)){qr.read(o);return}i=Py(s,{...t,axis:e,container:(n==null?void 0:n.current)||void 0,target:(r==null?void 0:r.current)||void 0})};return qr.read(o),()=>{Dx(o),i==null||i()}},times:[0,1],keyframes:[0,1],ease:s=>s,duration:1}}function oC(e,t){return typeof window>"u"?!1:e?gx()&&!!Bd(t):Ed()}function Ty({container:e,target:t,...n}={}){const r=sn(iC);oC(t,n.offset)&&(r.scrollXProgress.accelerate=Bm("x",n,e,t),r.scrollYProgress.accelerate=Bm("y",n,e,t));const s=m.useRef(null),i=m.useRef(!1),o=m.useCallback(()=>(s.current=Py((l,{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 l;(l=s.current)==null||l.call(s)}),[e,t,JSON.stringify(n.offset)]);return hi(()=>{if(i.current=!1,Mr(e)||Mr(t)){i.current=!0;return}else return o()},[o]),m.useEffect(()=>{if(!i.current)return;let l;const u=()=>{const c=Mr(e),d=Mr(t);!c&&!d&&(l=o())};return qr.read(u),()=>{Dx(u),l==null||l()}},[o]),r}function Ny(e){const t=sn(()=>Mt(e)),{isStatic:n}=m.useContext(ir);if(n){const[,r]=m.useState(e);m.useEffect(()=>t.on("change",r),[])}return t}function _y(e,t){const n=Ny(t()),r=()=>n.set(t());return r(),hi(()=>{const s=()=>J.preRender(r,!1,!0),i=e.map(o=>o.on("change",s));return()=>{i.forEach(o=>o()),St(r)}}),n}function aC(e){As.current=[],e();const t=_y(As.current,e);return As.current=void 0,t}function fn(e,t,n,r){if(typeof e=="function")return aC(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!="function")return lC(e,t,n,r);const o=typeof t=="function"?t:l2(t,n,r),l=Array.isArray(e)?$m(e,o):$m([e],([c])=>o(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&&(l.accelerate={...u,times:t,keyframes:n,isTransformed:!0}),l}function $m(e,t){const n=sn(()=>[]);return _y(e,()=>{n.length=0;const r=e.length;for(let s=0;sObject.keys(n)),i=sn(()=>({}));for(const o of s)i[o]=fn(e,t,n[o],r);return i}function uC(e,t={}){const{isStatic:n}=m.useContext(ir),r=()=>Le(e)?e.get():e;if(n)return fn(r);const s=Ny(r());return m.useInsertionEffect(()=>u2(s,e,t),[s,JSON.stringify(t)]),s}function cC(e,t={}){return uC(e,{type:"spring",...t})}function dC(){!Vd.current&&Bx();const[e]=m.useState(Ko.current);return e}function fC(){const{pathname:e}=et();return m.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"instant"})},[e]),null}const hC='a, button, [role="button"], label, select, summary, [data-cursor="hover"], .cursor-pointer',mC='input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]):not([type="file"]), textarea, [contenteditable="true"]';function pC(){const e=m.useRef(null),t=m.useRef(null),n=m.useRef(null),r=m.useRef(null),s=m.useRef(null);return m.useEffect(()=>{const i=window.matchMedia("(pointer: fine)"),o=window.matchMedia("(prefers-reduced-motion: reduce)");if(!i.matches||o.matches)return;const l=e.current,u=t.current,c=n.current,d=r.current,f=s.current;if(!l||!u||!c||!d||!f)return;document.documentElement.classList.add("hifi-cursor-on");const h=-24*Math.PI/180,g=Math.cos(h),v=Math.sin(h);let w=-100,b=-100,p=0,x=2.4,y=2.4,k=16,E=6.5,T=16,S=6.5,j=!1,_,C=performance.now();const B=N=>{const A=Math.min((N-C)/1e3,.05);C=N,x+=(y-x)*Math.min(1,A*8),k+=(T-k)*Math.min(1,A*10),E+=(S-E)*Math.min(1,A*10),p+=x*A,u.style.transform=`translate3d(${w}px, ${b}px, 0)`,c.style.transform=`translate3d(${w}px, ${b}px, 0)`;const L=Math.cos(p)*k,F=Math.sin(p)*E;d.style.transform=`translate(${L*g-F*v}px, ${L*v+F*g}px)`,_=requestAnimationFrame(B)},H=N=>{l.dataset.state=N;const A=N==="hover";y=A?7:2.4,T=A?23:16,S=A?9.5:6.5},ee=N=>{w=N.clientX,b=N.clientY,j||(j=!0,l.dataset.hidden="false")},W=N=>{const A=N.target;A instanceof Element&&(A.closest(mC)?H("text"):A.closest(hC)?H("hover"):H("default"))},K=()=>{l.dataset.down="true",f.style.left=`${w}px`,f.style.top=`${b}px`,f.classList.remove("is-live"),f.offsetWidth,f.classList.add("is-live")},q=()=>{l.dataset.down="false"},oe=()=>{j=!1,l.dataset.hidden="true"};return document.addEventListener("mousemove",ee,{passive:!0}),document.addEventListener("mouseover",W,{passive:!0}),document.addEventListener("mousedown",K,{passive:!0}),document.addEventListener("mouseup",q,{passive:!0}),document.documentElement.addEventListener("mouseleave",oe),window.addEventListener("blur",oe),_=requestAnimationFrame(B),()=>{cancelAnimationFrame(_),document.removeEventListener("mousemove",ee),document.removeEventListener("mouseover",W),document.removeEventListener("mousedown",K),document.removeEventListener("mouseup",q),document.documentElement.removeEventListener("mouseleave",oe),window.removeEventListener("blur",oe),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 gC=`${"/".replace(/\/$/,"")}/api`;let rc=0;const sc=new Set,Hm=e=>{rc+=e,sc.forEach(t=>t(rc))},xC=()=>rc,yC=e=>(sc.add(e),()=>sc.delete(e)),ic=new Set,vC=e=>(ic.add(e),()=>ic.delete(e));async function ms(e,t={}){Hm(1);try{return await wC(e,t)}finally{Hm(-1)}}async function wC(e,t){const n=await fetch(`${gC}${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){const i=new Error((s==null?void 0:s.error)||`Fehler ${n.status}`);throw i.status=n.status,i.code=(s==null?void 0:s.code)||null,n.status===401&&!e.startsWith("/auth/")&&ic.forEach(o=>o()),i}if(s===null&&r){const i=new Error("Unerwartete Server-Antwort (kein gültiges JSON)");throw i.status=n.status,i.code="invalid_response",i}return s}const ie={get:(e,t)=>ms(e,t),post:(e,t)=>ms(e,{method:"POST",body:t instanceof FormData?t:JSON.stringify(t)}),put:(e,t)=>ms(e,{method:"PUT",body:JSON.stringify(t)}),patch:(e,t)=>ms(e,{method:"PATCH",body:JSON.stringify(t)}),delete:e=>ms(e,{method:"DELETE"})};function bC({children:e}){const[t,n]=m.useState({pathname:null,needsSetup:null}),r=et(),s=t.needsSetup===!1;m.useEffect(()=>{if(s)return;let o=!1;return ie.get("/setup/status").then(l=>{o||n({pathname:r.pathname,needsSetup:l.needs_setup})}).catch(()=>{o||n({pathname:r.pathname,needsSetup:!1})}),()=>{o=!0}},[r.pathname,s]);const i=t.pathname===r.pathname;return r.pathname==="/setup"?s?a.jsx(sr,{to:"/",replace:!0}):!i||t.needsSetup===null?a.jsx("div",{className:"min-h-screen bg-white dark:bg-neutral-950"}):e:i&&t.needsSetup?a.jsx(sr,{to:"/setup",replace:!0}):e}/**
+ `),()=>{var _;(_=l.current)==null||_.removeAttribute("data-motion-pop-id"),j.contains(S)&&j.removeChild(S)}},[t]),a.jsx(Pj,{isPresent:t,childRef:l,sizeRef:u,pop:i,children:i===!1?e:m.cloneElement(e,{ref:f})})}const Nj=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o,anchorX:l,anchorY:u,root:c})=>{const d=sn(_j),f=m.useId(),h=m.useRef(n),g=m.useRef(r);hi(()=>{h.current=n,g.current=r});let v=!0,w=m.useMemo(()=>(v=!1,{id:f,initial:t,isPresent:n,custom:s,onExitComplete:b=>{d.set(b,!0);for(const p of d.values())if(!p)return;r&&r()},register:b=>(d.set(b,!1),()=>{var p;d.delete(b),!h.current&&!d.size&&((p=g.current)==null||p.call(g))})}),[n,d,r]);return i&&v&&(w={...w}),m.useMemo(()=>{d.forEach((b,p)=>d.set(p,!1))},[n]),m.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=a.jsx(Tj,{pop:o==="popLayout",isPresent:n,anchorX:l,anchorY:u,root:c,children:e}),a.jsx(ka.Provider,{value:w,children:e})};function _j(){return new Map}function dy(e=!0){const t=m.useContext(ka);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=m.useId();m.useEffect(()=>{if(e)return s(i)},[e]);const o=m.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const zi=e=>e.key||"";function ym(e){const t=[];return m.Children.forEach(e,n=>{m.isValidElement(n)&&t.push(n)}),t}const Mj=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1,anchorX:l="left",anchorY:u="top",root:c})=>{const[d,f]=dy(o),h=m.useMemo(()=>ym(e),[e]),g=o&&!d?[]:h.map(zi),v=m.useRef(!0),w=m.useRef(h),b=sn(()=>new Map),p=m.useRef(new Set),[x,y]=m.useState(h),[k,E]=m.useState(h);hi(()=>{v.current=!1,w.current=h;for(let j=0;j{const _=zi(j),C=o&&!d?!1:h===k||g.includes(_),B=()=>{if(p.current.has(_))return;if(b.has(_))p.current.add(_),b.set(_,!0);else return;let H=!0;b.forEach(ne=>{ne||(H=!1)}),H&&(S==null||S(),E(w.current),o&&(f==null||f()),r&&r())};return a.jsx(Nj,{isPresent:C,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,root:c,onExitComplete:C?void 0:B,anchorX:l,anchorY:u,children:j},_)})})},fy=m.createContext({strict:!1}),vm={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 wm=!1;function Lj(){if(wm)return;const e={};for(const t in vm)e[t]={isEnabled:n=>vm[t].some(r=>!!n[r])};$x(e),wm=!0}function hy(){return Lj(),p2()}function Aj(e){const t=hy();for(const n in e)t[n]={...t[n],...e[n]};$x(t)}const Dj=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 Zo(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Dj.has(e)}let my=e=>!Zo(e);function py(e){typeof e=="function"&&(my=t=>t.startsWith("on")?!Zo(t):e(t))}try{py(require("@emotion/is-prop-valid").default)}catch{}function Rj(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||Le(e[s])||(my(s)||n===!0&&Zo(s)||!t&&!Zo(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function Vj({children:e,isValidProp:t,...n}){t&&py(t);const r=m.useContext(ir);n={...r,...n},n.transition=Cd(n.transition,r.transition),n.isStatic=sn(()=>n.isStatic);const s=m.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations]);return a.jsx(ir.Provider,{value:s,children:e})}const Ca=m.createContext({});function Ij(e,t){if(Ea(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ii(n)?n:void 0,animate:ii(r)?r:void 0}}return e.inherit!==!1?t:{}}function Fj(e){const{initial:t,animate:n}=Ij(e,m.useContext(Ca));return m.useMemo(()=>({initial:t,animate:n}),[bm(t),bm(n)])}function bm(e){return Array.isArray(e)?e.join(" "):e}const Od=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function gy(e,t,n){for(const r in t)!Le(t[r])&&!Yx(r,n)&&(e[r]=t[r])}function Oj({transformTemplate:e},t){return m.useMemo(()=>{const n=Od();return Id(n,t,e),Object.assign({},n.vars,n.style)},[t])}function zj(e,t){const n=e.style||{},r={};return gy(r,n,e),Object.assign(r,Oj(e,t)),r}function Bj(e,t){const n={},r=zj(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 xy=()=>({...Od(),attrs:{}});function $j(e,t,n,r){const s=m.useMemo(()=>{const i=xy();return Xx(i,t,Qx(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};gy(i,e.style,e),s.style={...i,...s.style}}return s}const Hj=["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 zd(e){return typeof e!="string"||e.includes("-")?!1:!!(Hj.indexOf(e)>-1||/[A-Z]/u.test(e))}function Uj(e,t,n,{latestValues:r},s,i=!1,o){const u=(o??zd(e)?$j:Bj)(t,r,s,e),c=Rj(t,typeof e=="string",i),d=e!==m.Fragment?{...c,...u,ref:n}:{},{children:f}=t,h=m.useMemo(()=>Le(f)?f.get():f,[f]);return m.createElement(e,{...d,children:h})}function Wj({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:Gj(n,r,s,e),renderState:t()}}function Gj(e,t,n,r){const s={},i=r(e,{});for(const h in i)s[h]=co(i[h]);let{initial:o,animate:l}=e;const u=Ea(e),c=zx(e);t&&c&&!u&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const f=d?l:o;if(f&&typeof f!="boolean"&&!ja(f)){const h=Array.isArray(f)?f:[f];for(let g=0;g(t,n)=>{const r=m.useContext(Ca),s=m.useContext(ka),i=()=>Wj(e,t,r,s);return n?i():sn(i)},Kj=yy({scrapeMotionValuesFromProps:Fd,createRenderState:Od}),qj=yy({scrapeMotionValuesFromProps:Jx,createRenderState:xy}),Yj=Symbol.for("motionComponentSymbol");function Xj(e,t,n){const r=m.useRef(n);m.useInsertionEffect(()=>{r.current=n});const s=m.useRef(null);return m.useCallback(i=>{var l;i&&((l=e.onMount)==null||l.call(e,i)),t&&(i?t.mount(i):t.unmount());const o=r.current;if(typeof o=="function")if(i){const u=o(i);typeof u=="function"&&(s.current=u)}else s.current?(s.current(),s.current=null):o(i);else o&&(o.current=i)},[t])}const vy=m.createContext({});function pr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Zj(e,t,n,r,s,i){var y,k;const{visualElement:o}=m.useContext(Ca),l=m.useContext(fy),u=m.useContext(ka),c=m.useContext(ir),d=c.reducedMotion,f=c.skipAnimations,h=m.useRef(null),g=m.useRef(!1);r=r||l.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:i}),g.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const v=h.current,w=m.useContext(vy);v&&!v.projection&&s&&(v.type==="html"||v.type==="svg")&&Qj(h.current,n,s,w);const b=m.useRef(!1);m.useInsertionEffect(()=>{v&&b.current&&v.update(n,u)});const p=n[Cx],x=m.useRef(!!p&&typeof window<"u"&&!((y=window.MotionHandoffIsComplete)!=null&&y.call(window,p))&&((k=window.MotionHasOptimisedAnimation)==null?void 0:k.call(window,p)));return hi(()=>{g.current=!0,v&&(b.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),x.current&&v.animationState&&v.animationState.animateChanges())}),m.useEffect(()=>{v&&(!x.current&&v.animationState&&v.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var E;(E=window.MotionHandoffMarkAsComplete)==null||E.call(window,p)}),x.current=!1),v.enteringChildren=void 0)}),v}function Qj(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:l,layoutScroll:u,layoutRoot:c,layoutAnchor:d,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:wy(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||l&&pr(l),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:u,layoutRoot:c,layoutAnchor:d})}function wy(e){if(e)return e.options.allowProjection!==!1?e.projection:wy(e.parent)}function gl(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&Aj(r);const i=n?n==="svg":zd(e),o=i?qj:Kj;function l(c,d){let f;const h={...m.useContext(ir),...c,layoutId:Jj(c)},{isStatic:g}=h,v=Fj(c),w=o(c,g);if(!g&&typeof window<"u"){eE();const b=tE(h);f=b.MeasureLayout,v.visualElement=Zj(e,w,h,s,b.ProjectionNode,i)}return a.jsxs(Ca.Provider,{value:v,children:[f&&v.visualElement?a.jsx(f,{visualElement:v.visualElement,...h}):null,Uj(e,c,Xj(w,v.visualElement,d),w,g,t,i)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=m.forwardRef(l);return u[Yj]=e,u}function Jj({layoutId:e}){const t=m.useContext(ud).id;return t&&e!==void 0?t+"-"+e:e}function eE(e,t){m.useContext(fy).strict}function tE(e){const t=hy(),{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 nE(e,t){if(typeof Proxy>"u")return gl;const n=new Map,r=(i,o)=>gl(i,o,e,t),s=(i,o)=>r(i,o);return new Proxy(s,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,gl(o,void 0,e,t)),n.get(o))})}const rE=(e,t)=>t.isSVG??zd(e)?new L2(t):new C2(t,{allowProjection:e!==m.Fragment});class sE extends In{constructor(t){super(t),t.animationState||(t.animationState=I2(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ja(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 iE=0;class oE extends In{constructor(){super(...arguments),this.id=iE++,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:o,custom:l}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){const u=Qn(this.node,o,l);if(u){const{transition:c,transitionEnd:d,...f}=u;for(const h in f)(i=this.node.getValue(h))==null||i.jump(f[h])}}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 aE={animation:{Feature:sE},exit:{Feature:oE}};function xi(e){return{point:{x:e.pageX,y:e.pageY}}}const lE=e=>t=>Ld(t)&&e(t,xi(t));function Vs(e,t,n,r){return oi(e,t,lE(n),r)}const by=({current:e})=>e?e.ownerDocument.defaultView:null,km=(e,t)=>Math.abs(e-t);function uE(e,t){const n=km(e.x,t.x),r=km(e.y,t.y);return Math.sqrt(n**2+r**2)}const Sm=new Set(["auto","scroll"]);class ky{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:l}={}){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=v=>{this.handleScroll(v.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Bi(this.lastRawMoveEventInfo,this.transformPagePoint));const v=xl(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,b=uE(v.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!b)return;const{point:p}=v,{timestamp:x}=Ae;this.history.push({...p,timestamp:x});const{onStart:y,onMove:k}=this.handlers;w||(y&&y(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,v)},this.handlePointerMove=(v,w)=>{this.lastMoveEvent=v,this.lastRawMoveEventInfo=w,this.lastMoveEventInfo=Bi(w,this.transformPagePoint),J.update(this.updatePoint,!0)},this.handlePointerUp=(v,w)=>{this.end();const{onEnd:b,onSessionEnd:p,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=xl(v.type==="pointercancel"?this.lastMoveEventInfo:Bi(w,this.transformPagePoint),this.history);this.startEvent&&b&&b(v,y),p&&p(v,y)},!Ld(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const u=xi(t),c=Bi(u,this.transformPagePoint),{point:d}=c,{timestamp:f}=Ae;this.history=[{...d,timestamp:f}];const{onSessionStart:h}=n;h&&h(t,xl(c,this.history));const g={passive:!0,capture:!0};this.removeListeners=mi(Vs(this.contextWindow,"pointermove",this.handlePointerMove,g),Vs(this.contextWindow,"pointerup",this.handlePointerUp,g),Vs(this.contextWindow,"pointercancel",this.handlePointerUp,g)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Sm.has(r.overflowX)||Sm.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),J.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),St(this.updatePoint)}}function Bi(e,t){return t?{point:t(e.point)}:e}function jm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xl({point:e},t){return{point:e,delta:jm(e,Sy(t)),offset:jm(e,cE(t)),velocity:dE(t,.1)}}function cE(e){return e[0]}function Sy(e){return e[e.length-1]}function dE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=Sy(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>dt(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>dt(t)*2&&(r=e[1]);const i=vt(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function fE(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?ue(n,e,r.max):Math.min(e,n)),e}function Em(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 hE(e,{top:t,left:n,bottom:r,right:s}){return{x:Em(e.x,n,s),y:Em(e.y,t,r)}}function Cm(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Gr(t.min,t.max-r,e.min):r>s&&(n=Gr(e.min,e.max-s,t.min)),Vt(0,1,n)}function gE(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 ec=.35;function xE(e=ec){return e===!1?e=0:e===!0&&(e=ec),{x:Pm(e,"left","right"),y:Pm(e,"top","bottom")}}function Pm(e,t,n){return{min:Tm(e,t),max:Tm(e,n)}}function Tm(e,t){return typeof e=="number"?e:e[t]||0}const yE=new WeakMap;class vE{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=Ne(),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=f=>{n&&this.snapToCursor(xi(f).point),this.stopAnimation()},o=(f,h)=>{const{drag:g,dragPropagation:v,onDragStart:w}=this.getProps();if(g&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=US(g),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),zt(p=>{let x=this.getAxisMotionValue(p).get()||0;if(Wt.test(x)){const{projection:y}=this.visualElement;if(y&&y.layout){const k=y.layout.layoutBox[p];k&&(x=Xe(k)*(parseFloat(x)/100))}}this.originPoint[p]=x}),w&&J.update(()=>w(f,h),!1,!0),Uu(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},l=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:g,dragDirectionLock:v,onDirectionLock:w,onDrag:b}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:p}=h;if(v&&this.currentDirection===null){this.currentDirection=bE(p),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",h.point,p),this.updateAxis("y",h.point,p),this.visualElement.render(),b&&J.update(()=>b(f,h),!1,!0)},u=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new ky(t,{onSessionStart:i,onStart:o,onMove:l,onSessionEnd:u,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:by(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:o}=s;this.startAnimation(o);const{onDragEnd:l}=this.getProps();l&&J.postRender(()=>l(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||!$i(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=fE(o,this.constraints[t],this.elastic[t])),i.set(o)}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&&pr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=hE(r.layoutBox,t):this.constraints=!1,this.elastic=xE(n),s!==this.constraints&&!pr(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&zt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=gE(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!pr(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=w2(r,s.root,this.visualElement.getTransformPagePoint());let o=mE(s.layout.layoutBox,i);if(n){const l=n(x2(o));this.hasMutatedConstraints=!!l,l&&(o=Ux(l))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),u=this.constraints||{},c=zt(d=>{if(!$i(d,n,this.currentDirection))return;let f=u&&u[d]||{};(o===!0||o===d)&&(f={min:0,max:0});const h=s?200:1e6,g=s?40:1e7,v={type:"inertia",velocity:r?t[d]:0,bounceStiffness:h,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(d,v)});return Promise.all(c).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Uu(this.visualElement,t),r.start(Td(t,r,0,n,this.visualElement,!1))}stopAnimation(){zt(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){zt(n=>{const{drag:r}=this.getProps();if(!$i(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:l}=s.layout.layoutBox[n],u=i.get()||0;i.set(t[n]-ue(o,l,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!pr(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};zt(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const u=l.get();s[o]=pE({min:u,max:u},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),zt(o=>{if(!$i(o,t,null))return;const l=this.getAxisMotionValue(o),{min:u,max:c}=this.constraints[o];l.set(ue(u,c,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;yE.set(this.visualElement,this);const t=this.visualElement.current,n=Vs(t,"pointerdown",c=>{const{drag:d,dragListener:f=!0}=this.getProps(),h=c.target,g=h!==t&&XS(h);d&&f&&!g&&this.start(c)});let r;const s=()=>{const{dragConstraints:c}=this.getProps();pr(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=wE(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),J.read(s);const l=oi(window,"resize",()=>this.scalePositionWithinConstraints()),u=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(zt(f=>{const h=this.getAxisMotionValue(f);h&&(this.originPoint[f]+=c[f].translate,h.set(h.get()+c[f].translate))}),this.visualElement.render())});return()=>{l(),n(),o(),u&&u(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=ec,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:l}}}function Nm(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function wE(e,t,n){const r=Yu(e,Nm(n)),s=Yu(t,Nm(n));return()=>{r(),s()}}function $i(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function bE(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class kE extends In{constructor(t){super(t),this.removeGroupControls=ot,this.removeListeners=ot,this.controls=new vE(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ot}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 yl=e=>(t,n)=>{e&&J.update(()=>e(t,n),!1,!0)};class SE extends In{constructor(){super(...arguments),this.removePointerDownListener=ot}onPointerDown(t){this.session=new ky(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:by(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:yl(t),onStart:yl(n),onMove:yl(r),onEnd:(i,o)=>{delete this.session,s&&J.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=Vs(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 vl=!1;class jE extends m.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),vl&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),fo.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),vl=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||J.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),qr.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;vl=!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 jy(e){const[t,n]=dy(),r=m.useContext(ud);return a.jsx(jE,{...e,layoutGroup:r,switchLayoutGroup:m.useContext(vy),isPresent:t,safeToRemove:n})}const EE={pan:{Feature:SE},drag:{Feature:kE,ProjectionNode:cy,MeasureLayout:jy}};function _m(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&&J.postRender(()=>i(t,xi(t)))}class CE extends In{mount(){const{current:t}=this.node;t&&(this.unmount=GS(t,(n,r)=>(_m(this.node,r,"Start"),s=>_m(this.node,s,"End"))))}unmount(){}}class PE extends In{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=mi(oi(this.node.current,"focus",()=>this.onFocus()),oi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Mm(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&&J.postRender(()=>i(t,xi(t)))}class TE extends In{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=QS(t,(s,i)=>(Mm(this.node,i,"Start"),(o,{success:l})=>Mm(this.node,o,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const tc=new WeakMap,wl=new WeakMap,NE=e=>{const t=tc.get(e.target);t&&t(e)},_E=e=>{e.forEach(NE)};function ME({root:e,...t}){const n=e||document;wl.has(n)||wl.set(n,{});const r=wl.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(_E,{root:e,...t})),r[s]}function LE(e,t,n){const r=ME(t);return tc.set(e,n),r.observe(e),()=>{tc.delete(e),r.unobserve(e)}}const AE={some:0,all:1};class DE extends In{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,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:AE[s]},l=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:f,onViewportLeave:h}=this.node.getProps(),g=d?f:h;g&&g(c)};this.stopObserver=LE(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(RE(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function RE({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const VE={inView:{Feature:DE},tap:{Feature:TE},focus:{Feature:PE},hover:{Feature:CE}},IE={layout:{ProjectionNode:cy,MeasureLayout:jy}},FE={...aE,...VE,...EE,...IE},Qt=nE(FE,rE);function Qo(e){return typeof window>"u"?!1:e?gx():Ed()}const OE=50,Lm=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),zE=()=>({time:0,x:Lm(),y:Lm()}),BE={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Am(e,t,n,r){const s=n[t],{length:i,position:o}=BE[t],l=s.current,u=n.time;s.current=Math.abs(e[`scroll${o}`]),s.scrollLength=e[`scroll${i}`]-e[`client${i}`],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=Gr(0,s.scrollLength,s.current);const c=r-u;s.velocity=c>OE?0:hd(s.current-l,c)}function $E(e,t,n){Am(e,"x",t,n),Am(e,"y",t,n),t.time=n}function HE(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(Ds(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 o=null,l=r.parentNode;for(;!o;)l.tagName==="svg"&&(o=l),l=r.parentNode;r=o}else break;return n}const nc={start:0,center:.5,end:1};function Dm(e,t,n=0){let r=0;if(e in nc&&(e=nc[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 UE=[0,0];function WE(e,t,n,r){let s=Array.isArray(e)?e:UE,i=0,o=0;return typeof e=="number"?s=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?s=e.split(" "):s=[e,nc[e]?e:"0"]),i=Dm(s[0],n,r),o=Dm(s[1],t),i-o}const bs={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},GE={x:0,y:0};function KE(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function qE(e,t,n){const{offset:r=bs.All}=n,{target:s=e,axis:i="y"}=n,o=i==="y"?"height":"width",l=s!==e?HE(s,e):GE,u=s===e?{width:e.scrollWidth,height:e.scrollHeight}:KE(s),c={width:e.clientWidth,height:e.clientHeight};t[i].offset.length=0;let d=!t[i].interpolate;const f=r.length;for(let h=0;h{YE(e,r.target,n),$E(e,n,s),(r.offset||r.target)&&qE(e,n,r)},notify:()=>t(n)}}const hr=new WeakMap,Rm=new WeakMap,bl=new WeakMap,Vm=new WeakMap,Hi=new WeakMap,Im=e=>e===document.scrollingElement?window:e;function Ey(e,{container:t=document.scrollingElement,trackContentSize:n=!1,...r}={}){if(!t)return ot;let s=bl.get(t);s||(s=new Set,bl.set(t,s));const i=zE(),o=XE(t,e,i,r);if(s.add(o),!hr.has(t)){const u=()=>{for(const h of s)h.measure(Ae.timestamp);J.preUpdate(c)},c=()=>{for(const h of s)h.notify()},d=()=>J.read(u);hr.set(t,d);const f=Im(t);window.addEventListener("resize",d),t!==document.documentElement&&Rm.set(t,Yu(t,d)),f.addEventListener("scroll",d),d()}if(n&&!Hi.has(t)){const u=hr.get(t),c={width:t.scrollWidth,height:t.scrollHeight};Vm.set(t,c);const d=()=>{const h=t.scrollWidth,g=t.scrollHeight;(c.width!==h||c.height!==g)&&(u(),c.width=h,c.height=g)},f=J.read(d,!0);Hi.set(t,f)}const l=hr.get(t);return J.read(l,!1,!0),()=>{var f;St(l);const u=bl.get(t);if(!u||(u.delete(o),u.size))return;const c=hr.get(t);hr.delete(t),c&&(Im(t).removeEventListener("scroll",c),(f=Rm.get(t))==null||f(),window.removeEventListener("resize",c));const d=Hi.get(t);d&&(St(d),Hi.delete(t)),Vm.delete(t)}}const ZE=[[bs.Enter,"entry"],[bs.Exit,"exit"],[bs.Any,"cover"],[bs.All,"contain"]],Fm={start:0,end:1};function QE(e){const t=e.trim().split(/\s+/);if(t.length!==2)return;const n=Fm[t[0]],r=Fm[t[1]];if(!(n===void 0||r===void 0))return[n,r]}function JE(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=QE(n);if(!r)return;t.push(r)}else return;return t}function eC(e,t){const n=JE(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 Bd(e){if(!e)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[t,n]of ZE)if(eC(e,t))return{rangeStart:`${n} 0%`,rangeEnd:`${n} 100%`}}const Om=new Map;function zm(e){const t={value:0},n=Ey(r=>{t.value=r[e.axis].progress*100},e);return{currentTime:t,cancel:n}}function Cy({source:e,container:t,...n}){const{axis:r}=n;e&&(t=e);let s=Om.get(t);s||(s=new Map,Om.set(t,s));const i=n.target??"self";let o=s.get(i);o||(o={},s.set(i,o));const l=r+(n.offset??[]).join(",");return o[l]||(n.target&&Qo(n.target)?Bd(n.offset)?o[l]=new ViewTimeline({subject:n.target,axis:r}):o[l]=zm({container:t,...n}):Qo()?o[l]=new ScrollTimeline({source:t,axis:r}):o[l]=zm({container:t,...n})),o[l]}function tC(e,t){const n=Cy(t),r=t.target?Bd(t.offset):void 0,s=t.target?Qo(t.target)&&!!r:Qo();return e.attachTimeline({timeline:s?n:void 0,...r&&s&&{rangeStart:r.rangeStart,rangeEnd:r.rangeEnd},observe:i=>(i.pause(),Ox(o=>{i.time=i.iterationDuration*o},n))})}function nC(e){return e&&(e.target||e.offset)}function rC(e){return e.length===2}function sC(e,t){return rC(e)||nC(t)?Ey(n=>{e(n[t.axis].progress,n)},t):Ox(e,Cy(t))}function Py(e,{axis:t="y",container:n=document.scrollingElement,...r}={}){if(!n)return ot;const s={axis:t,container:n,...r};return typeof e=="function"?sC(e,s):tC(e,s)}const iC=()=>({scrollX:Mt(0),scrollY:Mt(0),scrollXProgress:Mt(0),scrollYProgress:Mt(0)}),Mr=e=>e?!e.current:!1;function Bm(e,t,n,r){return{factory:s=>{let i;const o=()=>{if(Mr(n)||Mr(r)){qr.read(o);return}i=Py(s,{...t,axis:e,container:(n==null?void 0:n.current)||void 0,target:(r==null?void 0:r.current)||void 0})};return qr.read(o),()=>{Dx(o),i==null||i()}},times:[0,1],keyframes:[0,1],ease:s=>s,duration:1}}function oC(e,t){return typeof window>"u"?!1:e?gx()&&!!Bd(t):Ed()}function Ty({container:e,target:t,...n}={}){const r=sn(iC);oC(t,n.offset)&&(r.scrollXProgress.accelerate=Bm("x",n,e,t),r.scrollYProgress.accelerate=Bm("y",n,e,t));const s=m.useRef(null),i=m.useRef(!1),o=m.useCallback(()=>(s.current=Py((l,{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 l;(l=s.current)==null||l.call(s)}),[e,t,JSON.stringify(n.offset)]);return hi(()=>{if(i.current=!1,Mr(e)||Mr(t)){i.current=!0;return}else return o()},[o]),m.useEffect(()=>{if(!i.current)return;let l;const u=()=>{const c=Mr(e),d=Mr(t);!c&&!d&&(l=o())};return qr.read(u),()=>{Dx(u),l==null||l()}},[o]),r}function Ny(e){const t=sn(()=>Mt(e)),{isStatic:n}=m.useContext(ir);if(n){const[,r]=m.useState(e);m.useEffect(()=>t.on("change",r),[])}return t}function _y(e,t){const n=Ny(t()),r=()=>n.set(t());return r(),hi(()=>{const s=()=>J.preRender(r,!1,!0),i=e.map(o=>o.on("change",s));return()=>{i.forEach(o=>o()),St(r)}}),n}function aC(e){As.current=[],e();const t=_y(As.current,e);return As.current=void 0,t}function fn(e,t,n,r){if(typeof e=="function")return aC(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!="function")return lC(e,t,n,r);const o=typeof t=="function"?t:l2(t,n,r),l=Array.isArray(e)?$m(e,o):$m([e],([c])=>o(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&&(l.accelerate={...u,times:t,keyframes:n,isTransformed:!0}),l}function $m(e,t){const n=sn(()=>[]);return _y(e,()=>{n.length=0;const r=e.length;for(let s=0;sObject.keys(n)),i=sn(()=>({}));for(const o of s)i[o]=fn(e,t,n[o],r);return i}function uC(e,t={}){const{isStatic:n}=m.useContext(ir),r=()=>Le(e)?e.get():e;if(n)return fn(r);const s=Ny(r());return m.useInsertionEffect(()=>u2(s,e,t),[s,JSON.stringify(t)]),s}function cC(e,t={}){return uC(e,{type:"spring",...t})}function dC(){!Vd.current&&Bx();const[e]=m.useState(Ko.current);return e}function fC(){const{pathname:e}=et();return m.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"instant"})},[e]),null}const hC='a, button, [role="button"], label, select, summary, [data-cursor="hover"], .cursor-pointer',mC='input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]):not([type="file"]), textarea, [contenteditable="true"]';function pC(){const e=m.useRef(null),t=m.useRef(null),n=m.useRef(null),r=m.useRef(null),s=m.useRef(null);return m.useEffect(()=>{const i=window.matchMedia("(pointer: fine)"),o=window.matchMedia("(prefers-reduced-motion: reduce)");if(!i.matches||o.matches)return;const l=e.current,u=t.current,c=n.current,d=r.current,f=s.current;if(!l||!u||!c||!d||!f)return;document.documentElement.classList.add("hifi-cursor-on");const h=-24*Math.PI/180,g=Math.cos(h),v=Math.sin(h);let w=-100,b=-100,p=0,x=2.4,y=2.4,k=16,E=6.5,T=16,S=6.5,j=!1,_,C=performance.now();const B=N=>{const A=Math.min((N-C)/1e3,.05);C=N,x+=(y-x)*Math.min(1,A*8),k+=(T-k)*Math.min(1,A*10),E+=(S-E)*Math.min(1,A*10),p+=x*A,u.style.transform=`translate3d(${w}px, ${b}px, 0)`,c.style.transform=`translate3d(${w}px, ${b}px, 0)`;const L=Math.cos(p)*k,F=Math.sin(p)*E;d.style.transform=`translate(${L*g-F*v}px, ${L*v+F*g}px)`,_=requestAnimationFrame(B)},H=N=>{l.dataset.state=N;const A=N==="hover";y=A?7:2.4,T=A?23:16,S=A?9.5:6.5},ne=N=>{w=N.clientX,b=N.clientY,j||(j=!0,l.dataset.hidden="false")},W=N=>{const A=N.target;A instanceof Element&&(A.closest(mC)?H("text"):A.closest(hC)?H("hover"):H("default"))},K=()=>{l.dataset.down="true",f.style.left=`${w}px`,f.style.top=`${b}px`,f.classList.remove("is-live"),f.offsetWidth,f.classList.add("is-live")},q=()=>{l.dataset.down="false"},oe=()=>{j=!1,l.dataset.hidden="true"};return document.addEventListener("mousemove",ne,{passive:!0}),document.addEventListener("mouseover",W,{passive:!0}),document.addEventListener("mousedown",K,{passive:!0}),document.addEventListener("mouseup",q,{passive:!0}),document.documentElement.addEventListener("mouseleave",oe),window.addEventListener("blur",oe),_=requestAnimationFrame(B),()=>{cancelAnimationFrame(_),document.removeEventListener("mousemove",ne),document.removeEventListener("mouseover",W),document.removeEventListener("mousedown",K),document.removeEventListener("mouseup",q),document.documentElement.removeEventListener("mouseleave",oe),window.removeEventListener("blur",oe),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 gC=`${"/".replace(/\/$/,"")}/api`;let rc=0;const sc=new Set,Hm=e=>{rc+=e,sc.forEach(t=>t(rc))},xC=()=>rc,yC=e=>(sc.add(e),()=>sc.delete(e)),ic=new Set,vC=e=>(ic.add(e),()=>ic.delete(e));async function ms(e,t={}){Hm(1);try{return await wC(e,t)}finally{Hm(-1)}}async function wC(e,t){const n=await fetch(`${gC}${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){const i=new Error((s==null?void 0:s.error)||`Fehler ${n.status}`);throw i.status=n.status,i.code=(s==null?void 0:s.code)||null,n.status===401&&!e.startsWith("/auth/")&&ic.forEach(o=>o()),i}if(s===null&&r){const i=new Error("Unerwartete Server-Antwort (kein gültiges JSON)");throw i.status=n.status,i.code="invalid_response",i}return s}const ie={get:(e,t)=>ms(e,t),post:(e,t)=>ms(e,{method:"POST",body:t instanceof FormData?t:JSON.stringify(t)}),put:(e,t)=>ms(e,{method:"PUT",body:JSON.stringify(t)}),patch:(e,t)=>ms(e,{method:"PATCH",body:JSON.stringify(t)}),delete:e=>ms(e,{method:"DELETE"})};function bC({children:e}){const[t,n]=m.useState({pathname:null,needsSetup:null}),r=et(),s=t.needsSetup===!1;m.useEffect(()=>{if(s)return;let o=!1;return ie.get("/setup/status").then(l=>{o||n({pathname:r.pathname,needsSetup:l.needs_setup})}).catch(()=>{o||n({pathname:r.pathname,needsSetup:!1})}),()=>{o=!0}},[r.pathname,s]);const i=t.pathname===r.pathname;return r.pathname==="/setup"?s?a.jsx(sr,{to:"/",replace:!0}):!i||t.needsSetup===null?a.jsx("div",{className:"min-h-screen bg-white dark:bg-neutral-950"}):e:i&&t.needsSetup?a.jsx(sr,{to:"/setup",replace:!0}):e}/**
* @license lucide-react v1.23.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -293,9 +293,9 @@ Error generating stack: `+i.message+`
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
- */const RP=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],VP=Z("zap",RP),Oy=m.createContext(null);function IP(){const e=new Date,t=e.getHours()+e.getMinutes()/60;return t>=6.5&&t<21?"light":"dark"}function FP({children:e}){const[t,n]=m.useState(()=>{const s=localStorage.getItem("hifi-theme");return s==="light"||s==="dark"?s:IP()});m.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(Oy.Provider,{value:{theme:t,toggleTheme:r},children:e})}function OP(){return m.useContext(Oy)}const zP={nav:{mainNav:"Hauptnavigation",menu:"Menü",call:"Anrufen",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",downloads:"Downloads"},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",downloads:"Downloads",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.",login:"Anmelden"},countdown:{eyebrow:"Neue Website",title:"Bald wird’s laut.",message:"Wir drehen gerade die letzten Schrauben fest. Unsere neue Website mit allen Paketen für dein Fahrzeug startet in Kürze.",days:"Tage",hours:"Stunden",minutes:"Minuten",seconds:"Sekunden",launchPrefix:"Start",launchAt:"um",clock:"Uhr",addToCalendar:"In den Kalender",calendarTitle:"Launch der neuen HifiPlanet-Website",questions:"Fragen vorab?",liveEyebrow:"Jetzt online",liveTitle:"Wir sind live!",liveMessage:"Einen Moment, die Seite öffnet sich …",preview:"Vorschau – nur für dich sichtbar",closePreview:"Vorschau schließen",adminActive:"Countdown aktiv – Besucher sehen bis {date} nur den Teaser.",adminPreview:"Vorschau ansehen"},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",reviewsRatingDynamic:(e,t)=>`${e.toFixed(1).replace(".",",")} von ${t} 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:{loading:"Marken werden geladen…",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."},vehicleSearch:{label:"Fahrzeug direkt suchen",placeholder:"Direkt suchen, z. B. Golf 7 oder BMW 3er",clear:"Suche leeren",loading:"Suche läuft…",noResults:"Kein passendes Fahrzeug gefunden.",contact:"Frag uns einfach direkt.",allModels:"Alle Modelle"},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:{customRequest:"Individuell anfragen",customHint:"Nicht das Passende dabei? Wir stellen dir gerne ein Paket nach deinen Wünschen zusammen.",whatsappText:(e,t)=>`Hallo HifiPlanet, ich interessiere mich für einen Car-Hifi-Umbau für meinen ${e} ${t}.`,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",badges:{recommended:"Empfohlen",popular:"Am beliebtesten",tip:"Tipp",coming_soon:"Coming soon"},videoLink:"Zum Video",moreBullets:e=>e===1?"+ 1 weitere Leistung":`+ ${e} weitere Leistungen`,showMore:"Mehr anzeigen",lessBullets:"Weniger anzeigen",wheelHint:"Mit dem Mausrad blättern"},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:{sendAnother:"Weitere Anfrage senden",vehicleBoxTitle:"Dein Fahrzeug:",privacyPre:"Mit dem Absenden stimmst du zu, dass wir deine Angaben zur Bearbeitung der Anfrage verwenden. Mehr dazu in der ",privacyLink:"Datenschutzerklärung",privacyPost:".",mapIframeTitle:"Standort von HifiPlanet in Amorbach auf Google Maps",whatsappText:(e,t,n)=>`Hallo HifiPlanet, ich interessiere mich für das Paket "${n}" für meinen ${e} ${t}.`,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:"HiFi Planet Amorbach",address:"Adresse",phone:"Telefon",email:"E-Mail",hours:"Öffnungszeiten",hoursWeek:"Mo–Fr: 9:00–18:00 Uhr",hoursSat:"Sa: 10:00–13:00 Uhr",hoursWeekDays:"Mo–Fr",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:{ctaTitle:"So etwas für dein Auto?",ctaText:"Erzähl uns von deinem Fahrzeug – wir planen einen ähnlichen Umbau für dich.",ctaButton:"Ähnlichen Umbau anfragen",ctaTopic:e=>`Mich interessiert ein ähnlicher Umbau wie "${e}" aus eurer Galerie.`,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"},downloadsPage:{metaTitle:"Downloads",metaDescription:"Dateien und Songs von HifiPlanet zum Anhören und Herunterladen.",title:"Downloads",intro:"Hier stellen wir dir Dateien und Songs bereit – direkt anhören oder herunterladen.",loading:"Lädt…",empty:"Aktuell stehen keine Downloads bereit.",download:"Herunterladen",lockedTitle:"Geschützter Bereich",lockedText:"Bitte gib das Passwort ein, das du von uns bekommen hast.",passwordLabel:"Passwort",unlock:"Freischalten",unlocking:"Wird geprüft…",wrongPassword:"Das Passwort stimmt leider nicht."},errors:{generic:"Da ist etwas schiefgelaufen. Bitte versuche es noch einmal.",network:"Keine Verbindung zum Server. Bitte prüfe deine Internetverbindung.",notFound:"Diese Seite gibt es nicht (mehr).",rateLimited:"Zu viele Anfragen in kurzer Zeit. Bitte versuche es später noch einmal oder ruf uns an.",invalidInput:"Bitte gib deinen Namen und eine gültige E-Mail-Adresse an.",server:"Auf dem Server ist ein Fehler aufgetreten. Bitte versuche es später noch einmal.",maintenance:"Dieser Bereich wird gerade überarbeitet. Bitte schau später wieder vorbei."},notFound:{metaTitle:"Seite nicht gefunden",title:"Diese Seite haben wir nicht gefunden",text:"Vielleicht ist der Link veraltet oder hat einen Tippfehler. Hier geht es direkt weiter:",toVehicles:"Fahrzeug wählen",toContact:"Kontakt aufnehmen",toHome:"Zur Startseite"}},BP={nav:{mainNav:"Main navigation",menu:"Menu",call:"Call",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",downloads:"Downloads"},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",downloads:"Downloads",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.",login:"Log in"},countdown:{eyebrow:"New website",title:"Things are about to get loud.",message:"We are tightening the last screws. Our new website with every package for your vehicle launches shortly.",days:"Days",hours:"Hours",minutes:"Minutes",seconds:"Seconds",launchPrefix:"Launch",launchAt:"at",clock:"",addToCalendar:"Add to calendar",calendarTitle:"Launch of the new HifiPlanet website",questions:"Questions?",liveEyebrow:"Now online",liveTitle:"We are live!",liveMessage:"One moment, the site is opening …",preview:"Preview – only visible to you",closePreview:"Close preview",adminActive:"Countdown active – visitors only see the teaser until {date}.",adminPreview:"Open preview"},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",reviewsRatingDynamic:(e,t)=>`Rated ${e.toFixed(1)} by ${t} 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:{loading:"Loading brands…",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."},vehicleSearch:{label:"Search for your vehicle",placeholder:"Search directly, e.g. Golf 7 or BMW 3 Series",clear:"Clear search",loading:"Searching…",noResults:"No matching vehicle found.",contact:"Just ask us directly.",allModels:"All models"},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:{customRequest:"Request a custom setup",customHint:"Nothing quite right? We will happily put together a package to suit you.",whatsappText:(e,t)=>`Hello HifiPlanet, I am interested in a car audio upgrade for my ${e} ${t}.`,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",badges:{recommended:"Recommended",popular:"Most popular",tip:"Tip",coming_soon:"Coming soon"},videoLink:"Watch video",moreBullets:e=>e===1?"+ 1 more feature":`+ ${e} more features`,showMore:"Show more",lessBullets:"Show less",wheelHint:"Scroll to browse"},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:{sendAnother:"Send another request",vehicleBoxTitle:"Your vehicle:",privacyPre:"By sending this form you agree that we use your details to handle your request. Learn more in our ",privacyLink:"privacy policy",privacyPost:".",mapIframeTitle:"HifiPlanet location in Amorbach on Google Maps",whatsappText:(e,t,n)=>`Hello HifiPlanet, I am interested in the "${n}" package for my ${e} ${t}.`,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:"HiFi Planet Amorbach",address:"Address",phone:"Phone",email:"Email",hours:"Opening hours",hoursWeek:"Mon–Fri: 9:00 AM–6:00 PM",hoursSat:"Sat: 10:00 AM–1:00 PM",hoursWeekDays:"Mon–Fri",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:{ctaTitle:"Want something like this for your car?",ctaText:"Tell us about your vehicle and we will plan a similar build for you.",ctaButton:"Request a similar build",ctaTopic:e=>`I am interested in a build similar to "${e}" from your gallery.`,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"},downloadsPage:{metaTitle:"Downloads",metaDescription:"Files and songs from HifiPlanet to listen to and download.",title:"Downloads",intro:"Here you will find files and songs we provide for you – listen right here or download them.",loading:"Loading…",empty:"There are no downloads available right now.",download:"Download",lockedTitle:"Protected area",lockedText:"Please enter the password you received from us.",passwordLabel:"Password",unlock:"Unlock",unlocking:"Checking…",wrongPassword:"Sorry, that password is not correct."},errors:{generic:"Something went wrong. Please try again.",network:"No connection to the server. Please check your internet connection.",notFound:"This page does not exist (anymore).",rateLimited:"Too many requests in a short time. Please try again later or give us a call.",invalidInput:"Please enter your name and a valid email address.",server:"A server error occurred. Please try again later.",maintenance:"This section is being updated. Please check back later."},notFound:{metaTitle:"Page not found",title:"We could not find this page",text:"The link may be outdated or contain a typo. Continue here:",toVehicles:"Choose your vehicle",toContact:"Get in touch",toHome:"Back to the homepage"}},vn={de:zP,en:BP},zy=m.createContext(null);function $P({children:e}){const[t,n]=m.useState(null),[r,s]=m.useState(!0);m.useEffect(()=>{ie.get("/auth/me").then(d=>n(d.authenticated===!1?null:d)).catch(()=>n(null)).finally(()=>s(!1))},[]);const i=async(d,f)=>{const h=await ie.post("/auth/login",{username:d,password:f});return h.requires_2fa?{requires2fa:!0}:(n(h),{requires2fa:!1})},o=async d=>{const f=await ie.post("/auth/verify-2fa",{code:d});n(f)},l=async()=>{await ie.post("/auth/logout",{}),n(null)},u=async()=>{const d=await ie.get("/auth/me");n(d.authenticated===!1?null:d)},c=d=>{var f;return!!t&&(t.is_super_admin||((f=t.permissions)==null?void 0:f.includes(d)))};return a.jsx(zy.Provider,{value:{user:t,loading:r,login:i,verifyTwoFactor:o,logout:l,refreshUser:u,hasPermission:c},children:e})}function cr(){return m.useContext(zy)}const Sl={home_sections:"content.manage",faqs:"content.manage",partners:"content.manage",text:"content.manage",services:"services.manage",packages:"packages.manage",brands:"brands.manage",car_models:"models.manage",gallery_brands:"gallery.manage",gallery_projects:"gallery.manage",gallery_photos:"gallery.manage",legal_pages:"settings.manage"},ac="hifi-live-edit",HP={de:{},en:{}},ps=(e,t,n,r)=>`${e}|${t}|${n}|${r}`;function UP(){try{const e=new URLSearchParams(window.location.search);if(e.get("bearbeiten")==="1"){sessionStorage.setItem(ac,"1"),e.delete("bearbeiten");const t=e.toString();return window.history.replaceState(window.history.state,"",window.location.pathname+(t?`?${t}`:"")+window.location.hash),!0}return sessionStorage.getItem(ac)==="1"}catch{return!1}}const zn=()=>{},By=m.createContext({available:!1,enabled:!1,setEnabled:zn,canEdit:()=>!1,getValue:(e,t,n,r,s)=>s,setValue:zn,resetValue:zn,hasPending:()=>!1,textOverride:()=>{},trackTextKey:zn,usedTextKeys:()=>[],pendingCount:0,saving:!1,error:"",save:async()=>{},discard:zn,editor:null,openEditor:zn,closeEditor:zn});function jl({serverOverrides:e,children:t}){const{user:n,hasPermission:r}=cr(),s=!!n&&Object.values(Sl).some(L=>r(L)),[i,o]=m.useState(UP),l=s&&i,[u,c]=m.useState({}),[d,f]=m.useState({}),[h,g]=m.useState(!1),[v,w]=m.useState(""),[b,p]=m.useState(null),x=m.useRef(l);x.current=l;const y=m.useRef(new Map),k=m.useCallback(L=>{o(L);try{sessionStorage.setItem(ac,L?"1":"0")}catch{}L||p(null)},[]),E=m.useCallback(L=>l&&!!Sl[L]&&r(Sl[L]),[l,r]),T=m.useCallback((L,F,P,R,z)=>{const G=ps(L,F,P,R);return G in u?u[G]:G in d?d[G]:z},[u,d]),S=m.useCallback((L,F,P,R,z)=>{w(""),c(G=>({...G,[ps(L,F,P,R)]:z}))},[]),j=m.useCallback((L,F,P,R)=>{c(z=>{const G=ps(L,F,P,R);if(!(G in z))return z;const te={...z};return delete te[G],te})},[]),_=m.useCallback((L,F,P,R)=>ps(L,F,P,R)in u,[u]),C=e||HP,B=m.useCallback((L,F)=>{var z;const P=ps("text",F,"value",L),R=P in u?u[P]:P in d?d[P]:(z=C[L])==null?void 0:z[F];return R||void 0},[u,d,C]),H=m.useCallback(L=>{if(!x.current)return;const F=window.location.pathname,P=y.current.get(L);P?P.add(F):y.current.set(L,new Set([F]))},[]),ee=m.useCallback(L=>{const F=[];return y.current.forEach((P,R)=>{P.has(L)&&F.push(R)}),F.sort()},[]),W=Object.keys(u).length,K=m.useCallback(async()=>{const L=Object.entries(u);if(!L.length)return;const F=L.map(([P,R])=>{const[z,G,te,se]=P.split("|");return{entity:z,id:G,field:te,lang:se,value:R??""}});g(!0),w("");try{await ie.put("/live-edit",{changes:F}),f(P=>({...P,...u})),c({})}catch(P){w(P.status===401?"Deine Anmeldung ist abgelaufen. Bitte im Admin-Bereich neu anmelden, die Änderungen bleiben hier so lange erhalten.":P.message)}finally{g(!1)}},[u]),q=m.useCallback(()=>{c({}),w(""),p(null)},[]),oe=m.useCallback(L=>p(L),[]),N=m.useCallback(()=>p(null),[]);m.useEffect(()=>{if(!W)return;const L=F=>{F.preventDefault(),F.returnValue=""};return window.addEventListener("beforeunload",L),()=>window.removeEventListener("beforeunload",L)},[W]);const A=m.useMemo(()=>({available:s,enabled:l,setEnabled:k,canEdit:E,getValue:T,setValue:S,resetValue:j,hasPending:_,textOverride:B,trackTextKey:H,usedTextKeys:ee,pendingCount:W,saving:h,error:v,save:K,discard:q,editor:b,openEditor:oe,closeEditor:N}),[s,l,k,E,T,S,j,_,B,H,ee,W,h,v,K,q,b,oe,N]);return a.jsx(By.Provider,{value:A,children:t})}function at(){return m.useContext(By)}function WP(){const e=localStorage.getItem("hifi-lang");return e==="de"||e==="en"?e:(navigator.language||"de").toLowerCase().startsWith("de")?"de":"en"}function ho(e,t){return t.split(".").reduce((n,r)=>n==null?void 0:n[r],e)}const $y=m.createContext({language:"de",setLanguage:()=>{},toggleLanguage:()=>{},t:e=>{const t=ho(vn.de,e);return t!==void 0?t:e}});function El({children:e}){const[t,n]=m.useState(WP),{textOverride:r,trackTextKey:s}=at();m.useEffect(()=>{document.documentElement.setAttribute("lang",t),localStorage.setItem("hifi-lang",t)},[t]);const i=()=>n(l=>l==="de"?"en":"de"),o=l=>{const u=vn[t]||vn.de,c=ho(u,l);if(typeof c=="string"||c===void 0&&typeof ho(vn.de,l)=="string"){s(l);const f=r(t,l);if(f!==void 0)return f}if(c!==void 0)return c;const d=ho(vn.de,l);return d!==void 0?d:l};return a.jsx($y.Provider,{value:{language:t,setLanguage:n,toggleLanguage:i,t:o},children:e})}function pe(){return m.useContext($y)}function Hy({overHero:e=!1,forceDark:t=!1}){const{theme:n,toggleTheme:r}=OP(),{t:s}=pe();return a.jsx("button",{onClick:r,"aria-label":s("themeToggle.label"),className:`rounded-full p-2 transition ${e?"text-white hover:bg-white/10":t?"text-neutral-300 hover:bg-neutral-800":"text-neutral-600 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-neutral-800"}`,children:n==="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"})})})}const $d=m.createContext({phone:"09373 20 62 390",whatsapp:null,contact_email:"info@hifi-planet-amorbach.de",address_street:"Boxbrunner Str. 20a",address_zip:"63916",address_city:"Amorbach",logo_path:null,logo_dark_path:null,business_hours:null,hero_image_path:null,ga_measurement_id:null,gallery_card_text_x:0,gallery_card_text_y:100,site_font:null,page_loader_enabled:1,package_card_width:210,package_card_height:480,vehicle_tile_width:240,vehicle_tile_height:180,hidden_areas:[]}),GP=$d.Provider;function It(){return m.useContext($d)}function Pa(){const{hidden_areas:e}=m.useContext($d);return t=>(e||[]).includes(t)}const ea="/assets/logo-dark-R-ckaBhx.png",Uy=e=>(e||"").replace(/[^\d+]/g,""),ai=e=>`tel:${Uy(e)}`,Hd=(e,t="")=>`https://wa.me/${Uy(e).replace(/^0/,"49").replace("+","")}${t?`?text=${encodeURIComponent(t)}`:""}`;function Nn(e,t={}){typeof window>"u"||typeof window.gtag!="function"||window.gtag("event",e,t)}const KP="https://www.audio4cars.de/",Wm=70,qP=500;function YP({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 XP({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 Cl=[{code:"de",label:"Deutsch",Flag:YP},{code:"en",label:"English",Flag:XP}];function ZP({overHero:e=!1}){const{language:t,setLanguage:n,t:r}=pe(),[s,i]=m.useState(!1),o=m.useRef(null),l=Cl.find(u=>u.code===t)||Cl[0];return m.useEffect(()=>{if(!s)return;const u=d=>{o.current&&!o.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:o,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-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-600"}`,children:a.jsx(l.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-700 bg-neutral-900 py-1 shadow-lg",children:Cl.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-800 ${u.code===t?"font-semibold text-brand-400":"text-neutral-200"}`,children:[a.jsx("span",{className:"block h-4 w-6 shrink-0 overflow-hidden rounded-[3px] ring-1 ring-neutral-600",children:a.jsx(u.Flag,{className:"h-full w-full"})}),u.label]},u.code))})]})}function QP(){const[e,t]=m.useState(!1),[n,r]=m.useState(!1),[s,i]=m.useState(!1),{user:o}=cr(),{phone:l,whatsapp:u,logo_dark_path:c,has_downloads:d}=It(),f=Pa(),{t:h}=pe(),g=!f("page.vehicles"),v=!f("page.services"),w=!f("page.gallery"),b=d&&!f("page.downloads"),p=3+[g,v,w,b,l,u].filter(Boolean).length,y=et().pathname==="/",[k,E]=m.useState(!y);m.useEffect(()=>{if(!y){E(!0);return}const q=()=>E(window.scrollY>24);return q(),window.addEventListener("scroll",q,{passive:!0}),()=>window.removeEventListener("scroll",q)},[y]);const T=y&&!k,S=m.useRef(null),j=m.useRef(null);m.useEffect(()=>{if(!e)return;const q=document.body.style.overflow;document.body.style.overflow="hidden";const oe=setTimeout(()=>{var A,L;return(L=(A=S.current)==null?void 0:A.querySelector("button, a"))==null?void 0:L.focus()},50),N=A=>{if(A.key==="Escape"){t(!1);return}if(A.key!=="Tab"||!S.current)return;const L=[...S.current.querySelectorAll("a[href], button")];if(!L.length)return;const F=L[0],P=L[L.length-1];A.shiftKey&&document.activeElement===F?(A.preventDefault(),P.focus()):!A.shiftKey&&document.activeElement===P&&(A.preventDefault(),F.focus())};return document.addEventListener("keydown",N),()=>{var A;clearTimeout(oe),document.body.style.overflow=q,document.removeEventListener("keydown",N),(A=j.current)==null||A.focus({preventScroll:!0})}},[e]),m.useEffect(()=>{if(e){r(!0);let N;const A=requestAnimationFrame(()=>{N=requestAnimationFrame(()=>i(!0))});return()=>{cancelAnimationFrame(A),N&&cancelAnimationFrame(N)}}i(!1);const q=qP+(p-1)*Wm,oe=setTimeout(()=>r(!1),q);return()=>clearTimeout(oe)},[e,p]);const _=()=>`transition-all duration-500 ease-out ${s?"opacity-100":"opacity-0"}`,C=q=>({transitionDelay:`${(s?q:p-1-q)*Wm}ms`,transform:s?"translateY(0)":"translateY(-140px)"}),B=o&&a.jsx(U,{to:"/admin","aria-label":h("nav.adminPanel"),title:h("nav.adminPanel"),className:`rounded-full p-2 transition ${T?"text-white hover:bg-white/10":"text-neutral-300 hover:bg-neutral-800"}`,children:a.jsx(tP,{className:"h-5 w-5"})}),H=at(),ee=H.available&&a.jsx("button",{type:"button",onClick:()=>H.setEnabled(!H.enabled),"aria-pressed":H.enabled,"aria-label":"Seite bearbeiten",title:H.enabled?"Bearbeiten beenden":"Seite bearbeiten",className:`rounded-full p-2 transition ${H.enabled?"bg-brand-500 text-white hover:bg-brand-600":T?"text-white hover:bg-white/10":"text-neutral-300 hover:bg-neutral-800"}`,children:a.jsx(Fy,{className:"h-5 w-5"})});let W=0;const K=()=>C(W++);return a.jsxs("header",{className:`sticky top-0 z-30 border-b transition-colors duration-300 ${T?"border-transparent bg-transparent":"border-neutral-800 bg-neutral-950/90 backdrop-blur"}`,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",{ref:j,onClick:()=>t(!0),"aria-label":h("nav.openMenu"),"aria-expanded":e,"aria-haspopup":"dialog",className:`rounded-md p-2 transition ${T?"text-white hover:bg-white/10":"text-neutral-300 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.jsx(U,{to:"/",className:"flex items-center justify-self-center rounded-lg px-2 py-1",children:a.jsx("img",{src:c||ea,alt:"HifiPlanet",className:"h-14 w-auto sm:h-16"})}),a.jsxs("div",{className:"flex items-center justify-self-end gap-1",children:[ee,B,!e&&a.jsx(ZP,{overHero:T}),a.jsx(Hy,{overHero:T,forceDark:!0})]})]}),n&&rd.createPortal(a.jsx("div",{ref:S,role:"dialog","aria-modal":"true","aria-label":h("nav.menu"),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":h("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:h("nav.close")})]}),g&&a.jsx(U,{to:"/fahrzeuge",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${_()}`,style:K(),children:h("nav.vehicles")}),v&&a.jsx(U,{to:"/leistungen",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${_()}`,style:K(),children:h("nav.services")}),w&&a.jsx(U,{to:"/galerie",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${_()}`,style:K(),children:h("nav.gallery")}),a.jsx(U,{to:"/kontakt",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${_()}`,style:K(),children:h("nav.contact")}),b&&a.jsx(U,{to:"/downloads",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${_()}`,style:K(),children:h("nav.downloads")}),a.jsx("div",{className:`h-px w-16 bg-brand-500/60 ${_()}`,style:K()}),l&&a.jsxs("a",{href:ai(l),onClick:()=>Nn("contact_call"),className:`flex items-center gap-2 text-sm font-semibold uppercase tracking-wide text-neutral-600 hover:text-brand-600 ${_()}`,style:K(),children:[a.jsx(or,{className:"h-4 w-4"}),l]}),u&&a.jsxs("a",{href:Hd(u),onClick:()=>Nn("contact_whatsapp"),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 ${_()}`,style:K(),children:[a.jsx(Iy,{className:"h-4 w-4"}),h("nav.whatsapp")]}),a.jsxs("a",{href:KP,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 ${_()}`,style:K(),children:[a.jsx(PP,{className:"h-4 w-4"}),h("nav.shop")]})]})}),document.body)]})}const Gm="hifiplanet-cookie-consent",Wy={necessary:!0,external:!1,analytics:!1},Gy=m.createContext({consent:Wy,decided:!1,settingsOpen:!1,acceptAll:()=>{},rejectNonEssential:()=>{},saveCustom:()=>{},openSettings:()=>{},closeSettings:()=>{}});function JP({children:e}){const[t,n]=m.useState(Wy),[r,s]=m.useState(!1),[i,o]=m.useState(!1);m.useEffect(()=>{try{const g=localStorage.getItem(Gm);if(g){const v=JSON.parse(g);n({necessary:!0,external:!!v.external,analytics:!!v.analytics}),s(!0)}}catch{}},[]);const l=m.useCallback(g=>{n(g),s(!0),o(!1),localStorage.setItem(Gm,JSON.stringify({...g,decidedAt:new Date().toISOString()}))},[]),u=m.useCallback(()=>l({necessary:!0,external:!0,analytics:!0}),[l]),c=m.useCallback(()=>l({necessary:!0,external:!1,analytics:!1}),[l]),d=m.useCallback(g=>l({necessary:!0,external:!!g.external,analytics:!!g.analytics}),[l]),f=m.useCallback(()=>o(!0),[]),h=m.useCallback(()=>o(!1),[]);return a.jsx(Gy.Provider,{value:{consent:t,decided:r,settingsOpen:i,acceptAll:u,rejectNonEssential:c,saveCustom:d,openSettings:f,closeSettings:h},children:e})}function ss(){return m.useContext(Gy)}const eT=["mon","tue","wed","thu","fri","sat","sun"],tT=["sun","mon","tue","wed","thu","fri","sat"],Pl={mon:"Mo",tue:"Di",wed:"Mi",thu:"Do",fri:"Fr",sat:"Sa",sun:"So"};function nT(e){const t=new Date,n=e==null?void 0:e[tT[t.getDay()]];if(!n||n.closed||!n.open||!n.close)return!1;const r=t.getHours()*60+t.getMinutes(),[s,i]=n.open.split(":").map(Number),[o,l]=n.close.split(":").map(Number);return r>=s*60+i&&r{const s=rT(e==null?void 0:e[r])||t,i=n[n.length-1];i&&i.label===s?i.days=`${i.firstLabel}-${Pl[r]}`:n.push({key:r,days:Pl[r],firstLabel:Pl[r],label:s})}),n}const sT=e=>(e||"").replace(/[^\d+]/g,"");function iT(){const{phone:e,contact_email:t,address_street:n,address_zip:r,address_city:s,business_hours:i,has_downloads:o}=It(),l=Pa(),u=o&&!l("page.downloads"),c=nT(i),{openSettings:d}=ss(),{pathname:f}=et(),h=f==="/",{t:g}=pe(),v=[n,[r,s].filter(Boolean).join(" ")].filter(Boolean).join(", "),w=`https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent(v)}`,b=Ky(i,g("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 ${h?"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(Vy,{className:"h-4 w-4 text-brand-500"}),a.jsx("p",{className:"font-semibold text-neutral-900 dark:text-white",children:"HifiPlanet"})]}),n&&a.jsx("p",{children:n}),(r||s)&&a.jsx("p",{children:[r,s].filter(Boolean).join(" ")}),a.jsxs("a",{href:w,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(hP,{className:"h-3.5 w-3.5"}),g("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(or,{className:"h-4 w-4 text-brand-500"}),a.jsx("p",{className:"font-semibold text-neutral-900 dark:text-white",children:g("footer.contactHeading")})]}),a.jsx("p",{children:a.jsx("a",{href:`tel:${sT(e)}`,className:"inline-block py-1 hover:text-brand-500",children:e})}),a.jsx("p",{children:a.jsx("a",{href:`mailto:${t}`,className:"inline-block py-1 hover:text-brand-500",children:t})}),a.jsx(U,{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:g("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(Dy,{className:"h-4 w-4 text-brand-500"}),a.jsx("p",{className:"font-semibold text-neutral-900 dark:text-white",children:g("footer.hoursHeading")})]}),a.jsxs("span",{className:`flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[11px] font-semibold ${c?"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 ${c?"bg-green-500":"bg-neutral-400"}`}),g(c?"footer.open":"footer.closed")]})]}),a.jsx("dl",{className:"space-y-1.5",children:b.map(p=>a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[a.jsx("dt",{className:"text-neutral-500 dark:text-neutral-400",children:p.days}),a.jsx("dd",{className:"font-medium text-neutral-700 dark:text-neutral-200",children:p.label})]},p.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:g("footer.copyright")(new Date().getFullYear())}),a.jsx("span",{children:"·"}),a.jsx(U,{to:"/impressum",className:"hover:text-brand-500",children:g("footer.imprint")}),a.jsx("span",{children:"·"}),a.jsx(U,{to:"/datenschutz",className:"hover:text-brand-500",children:g("footer.privacy")}),a.jsx("span",{children:"·"}),a.jsx(U,{to:"/agb",className:"hover:text-brand-500",children:g("footer.terms")}),a.jsx("span",{children:"·"}),u&&a.jsxs(a.Fragment,{children:[a.jsx(U,{to:"/downloads",className:"hover:text-brand-500",children:g("footer.downloads")}),a.jsx("span",{children:"·"})]}),a.jsx("button",{type:"button",onClick:d,className:"hover:text-brand-500",children:g("footer.cookieSettings")})]})})]})}function oT(){const{scrollYProgress:e}=Ty(),t=cC(e,{stiffness:200,damping:30,restDelta:.001});return a.jsx(Qt.div,{style:{scaleX:t},className:"fixed left-0 top-0 z-40 h-0.5 w-full origin-left bg-brand-500"})}const aT=()=>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 vi({message:e,fullScreen:t=!1}){const{t:n}=pe(),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(aT,{})}),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.jsxs("div",{className:"relative flex min-h-screen items-center justify-center bg-white px-4 dark:bg-neutral-950",children:[r,a.jsxs(U,{to:"/admin/login","aria-label":n("maintenance.login"),title:n("maintenance.login"),className:"fixed bottom-4 right-4 flex items-center gap-2 rounded-full border border-neutral-200 bg-white px-3 py-2 text-sm font-medium text-neutral-600 shadow-sm transition hover:border-brand-500 hover:text-brand-600 dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-300 dark:hover:text-brand-400",children:[a.jsx(Ry,{className:"h-4 w-4"}),n("maintenance.login")]})]}):a.jsx("div",{className:"mx-auto max-w-6xl px-4 py-20 sm:px-6",children:r})}const Km=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 wi({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:Km}):a.jsx("div",{className:"bg-amber-500 px-4 py-2 text-center text-xs font-semibold text-white",children:Km})}const qm='a[href], button:not([disabled]), input:not([disabled]), select, textarea, [tabindex]:not([tabindex="-1"])';function qy(e,t,n){m.useEffect(()=>{if(!t)return;const r=document.activeElement,s=document.body.style.overflow;document.body.style.overflow="hidden";const i=setTimeout(()=>{var l,u;return(u=(l=e.current)==null?void 0:l.querySelector(qm))==null?void 0:u.focus()},30),o=l=>{if(l.key==="Escape"){l.stopPropagation(),n==null||n();return}if(l.key!=="Tab"||!e.current)return;const u=[...e.current.querySelectorAll(qm)];if(!u.length)return;const c=u[0],d=u[u.length-1];l.shiftKey&&document.activeElement===c?(l.preventDefault(),d.focus()):!l.shiftKey&&document.activeElement===d&&(l.preventDefault(),c.focus())};return document.addEventListener("keydown",o),()=>{clearTimeout(i),document.body.style.overflow=s,document.removeEventListener("keydown",o),r instanceof HTMLElement&&r.focus({preventScroll:!0})}},[t,e])}function lT({onClose:e}){const{consent:t,saveCustom:n}=ss(),[r,s]=m.useState(t.external),[i,o]=m.useState(t.analytics),{t:l}=pe(),u=m.useRef(null);return qy(u,!0,e),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",{ref:u,role:"dialog","aria-modal":"true","aria-label":l("cookieConsent.modalTitle"),className:"w-full max-w-md rounded-xl bg-white p-6 dark:bg-neutral-900",onClick:c=>c.stopPropagation(),children:[a.jsx("h2",{className:"mb-1 text-lg font-bold text-neutral-900 dark:text-white",children:l("cookieConsent.modalTitle")}),a.jsxs("p",{className:"mb-4 text-sm text-neutral-600 dark:text-neutral-300",children:[l("cookieConsent.modalIntro")," ",a.jsx(U,{to:"/datenschutz",className:"underline hover:text-brand-500",onClick:e,children:l("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:l("cookieConsent.necessaryTitle")}),a.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:l("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:l("cookieConsent.externalTitle")}),a.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:l("cookieConsent.externalDesc")})]}),a.jsx("input",{type:"checkbox",checked:r,onChange:c=>s(c.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:l("cookieConsent.analyticsTitle")}),a.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:l("cookieConsent.analyticsDesc")})]}),a.jsx("input",{type:"checkbox",checked:i,onChange:c=>o(c.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:l("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:l("cookieConsent.saveSelection")})]})]})})}function uT(){const{decided:e,settingsOpen:t,acceptAll:n,rejectNonEssential:r,openSettings:s,closeSettings:i}=ss(),{t:o}=pe();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:[o("cookieConsent.bannerText")," ",o("cookieConsent.moreInfo")," ",a.jsx(U,{to:"/datenschutz",className:"underline hover:text-brand-500",children:o("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:o("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:o("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:o("cookieConsent.acceptAll")})]})]})}),t&&a.jsx(lT,{onClose:i})]})}const cT="/assets/bg-dark-B4R1klEI.webp",Te={card:"#14170e",cardBorder:"rgba(168,225,12,0.16)",divider:"rgba(168,225,12,0.15)",text:"#f3f6ea",muted:"#9aa38c",label:"#8f987f",accent:"#b6e619",pillBorder:"rgba(168,225,12,0.28)"},Ym={fontFamily:"'Michroma', sans-serif"};function ta(e,t=0){return e!=null&&e.launch_at?new Date(e.launch_at).getTime()-(Date.now()+t):0}function dT(e,t){return!(e!=null&&e.server_time)||!t?0:new Date(e.server_time).getTime()-t}function fT(e){const t=Math.max(0,Math.floor(e/1e3));return{days:Math.floor(t/86400),hours:Math.floor(t%86400/3600),minutes:Math.floor(t%3600/60),seconds:t%60}}function hT(e,t){const n=new Date(e),r=new Date(n.getTime()+60*60*1e3),s=o=>o.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),i=["BEGIN:VCALENDAR","VERSION:2.0","PRODID:-//HifiPlanet//Countdown//DE","BEGIN:VEVENT",`UID:launch-${s(n)}@hifi-planet.de`,`DTSTAMP:${s(new Date)}`,`DTSTART:${s(n)}`,`DTEND:${s(r)}`,`SUMMARY:${t}`,`URL:${window.location.origin}`,"END:VEVENT","END:VCALENDAR"].join(`\r
+ */const RP=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],VP=Z("zap",RP),Oy=m.createContext(null);function IP(){const e=new Date,t=e.getHours()+e.getMinutes()/60;return t>=6.5&&t<21?"light":"dark"}function FP({children:e}){const[t,n]=m.useState(()=>{const s=localStorage.getItem("hifi-theme");return s==="light"||s==="dark"?s:IP()});m.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(Oy.Provider,{value:{theme:t,toggleTheme:r},children:e})}function OP(){return m.useContext(Oy)}const zP={nav:{mainNav:"Hauptnavigation",menu:"Menü",call:"Anrufen",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",downloads:"Downloads"},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",downloads:"Downloads",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.",login:"Anmelden"},countdown:{eyebrow:"Neue Website",title:"Bald wird’s laut.",message:"Wir drehen gerade die letzten Schrauben fest. Unsere neue Website mit allen Paketen für dein Fahrzeug startet in Kürze.",days:"Tage",hours:"Stunden",minutes:"Minuten",seconds:"Sekunden",launchPrefix:"Start",launchAt:"um",clock:"Uhr",addToCalendar:"In den Kalender",calendarTitle:"Launch der neuen HifiPlanet-Website",questions:"Fragen vorab?",liveEyebrow:"Jetzt online",liveTitle:"Wir sind live!",liveMessage:"Einen Moment, die Seite öffnet sich …",preview:"Vorschau – nur für dich sichtbar",closePreview:"Vorschau schließen",adminActive:"Countdown aktiv – Besucher sehen bis {date} nur den Teaser.",adminPreview:"Vorschau ansehen"},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",reviewsRatingDynamic:(e,t)=>`${e.toFixed(1).replace(".",",")} von ${t} 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:{loading:"Marken werden geladen…",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."},vehicleSearch:{label:"Fahrzeug direkt suchen",placeholder:"Direkt suchen, z. B. Golf 7 oder BMW 3er",clear:"Suche leeren",loading:"Suche läuft…",noResults:"Kein passendes Fahrzeug gefunden.",contact:"Frag uns einfach direkt.",allModels:"Alle Modelle"},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:{customRequest:"Individuell anfragen",customHint:"Nicht das Passende dabei? Wir stellen dir gerne ein Paket nach deinen Wünschen zusammen.",whatsappText:(e,t)=>`Hallo HifiPlanet, ich interessiere mich für einen Car-Hifi-Umbau für meinen ${e} ${t}.`,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",badges:{recommended:"Empfohlen",popular:"Am beliebtesten",tip:"Tipp",coming_soon:"Coming soon"},videoLink:"Zum Video",moreBullets:e=>e===1?"+ 1 weitere Leistung":`+ ${e} weitere Leistungen`,showMore:"Mehr anzeigen",lessBullets:"Weniger anzeigen",wheelHint:"Mit dem Mausrad blättern"},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:{sendAnother:"Weitere Anfrage senden",vehicleBoxTitle:"Dein Fahrzeug:",privacyPre:"Mit dem Absenden stimmst du zu, dass wir deine Angaben zur Bearbeitung der Anfrage verwenden. Mehr dazu in der ",privacyLink:"Datenschutzerklärung",privacyPost:".",mapIframeTitle:"Standort von HifiPlanet in Amorbach auf Google Maps",whatsappText:(e,t,n)=>`Hallo HifiPlanet, ich interessiere mich für das Paket "${n}" für meinen ${e} ${t}.`,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:"HiFi Planet Amorbach",address:"Adresse",phone:"Telefon",email:"E-Mail",hours:"Öffnungszeiten",hoursWeek:"Mo–Fr: 9:00–18:00 Uhr",hoursSat:"Sa: 10:00–13:00 Uhr",hoursWeekDays:"Mo–Fr",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:{ctaTitle:"So etwas für dein Auto?",ctaText:"Erzähl uns von deinem Fahrzeug – wir planen einen ähnlichen Umbau für dich.",ctaButton:"Ähnlichen Umbau anfragen",ctaTopic:e=>`Mich interessiert ein ähnlicher Umbau wie "${e}" aus eurer Galerie.`,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"},downloadsPage:{metaTitle:"Downloads",metaDescription:"Dateien und Songs von HifiPlanet zum Anhören und Herunterladen.",title:"Downloads",intro:"Hier stellen wir dir Dateien und Songs bereit – direkt anhören oder herunterladen.",loading:"Lädt…",empty:"Aktuell stehen keine Downloads bereit.",download:"Herunterladen",lockedTitle:"Geschützter Bereich",lockedText:"Bitte gib das Passwort ein, das du von uns bekommen hast.",passwordLabel:"Passwort",unlock:"Freischalten",unlocking:"Wird geprüft…",wrongPassword:"Das Passwort stimmt leider nicht."},errors:{generic:"Da ist etwas schiefgelaufen. Bitte versuche es noch einmal.",network:"Keine Verbindung zum Server. Bitte prüfe deine Internetverbindung.",notFound:"Diese Seite gibt es nicht (mehr).",rateLimited:"Zu viele Anfragen in kurzer Zeit. Bitte versuche es später noch einmal oder ruf uns an.",invalidInput:"Bitte gib deinen Namen und eine gültige E-Mail-Adresse an.",server:"Auf dem Server ist ein Fehler aufgetreten. Bitte versuche es später noch einmal.",maintenance:"Dieser Bereich wird gerade überarbeitet. Bitte schau später wieder vorbei."},notFound:{metaTitle:"Seite nicht gefunden",title:"Diese Seite haben wir nicht gefunden",text:"Vielleicht ist der Link veraltet oder hat einen Tippfehler. Hier geht es direkt weiter:",toVehicles:"Fahrzeug wählen",toContact:"Kontakt aufnehmen",toHome:"Zur Startseite"}},BP={nav:{mainNav:"Main navigation",menu:"Menu",call:"Call",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",downloads:"Downloads"},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",downloads:"Downloads",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.",login:"Log in"},countdown:{eyebrow:"New website",title:"Things are about to get loud.",message:"We are tightening the last screws. Our new website with every package for your vehicle launches shortly.",days:"Days",hours:"Hours",minutes:"Minutes",seconds:"Seconds",launchPrefix:"Launch",launchAt:"at",clock:"",addToCalendar:"Add to calendar",calendarTitle:"Launch of the new HifiPlanet website",questions:"Questions?",liveEyebrow:"Now online",liveTitle:"We are live!",liveMessage:"One moment, the site is opening …",preview:"Preview – only visible to you",closePreview:"Close preview",adminActive:"Countdown active – visitors only see the teaser until {date}.",adminPreview:"Open preview"},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",reviewsRatingDynamic:(e,t)=>`Rated ${e.toFixed(1)} by ${t} 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:{loading:"Loading brands…",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."},vehicleSearch:{label:"Search for your vehicle",placeholder:"Search directly, e.g. Golf 7 or BMW 3 Series",clear:"Clear search",loading:"Searching…",noResults:"No matching vehicle found.",contact:"Just ask us directly.",allModels:"All models"},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:{customRequest:"Request a custom setup",customHint:"Nothing quite right? We will happily put together a package to suit you.",whatsappText:(e,t)=>`Hello HifiPlanet, I am interested in a car audio upgrade for my ${e} ${t}.`,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",badges:{recommended:"Recommended",popular:"Most popular",tip:"Tip",coming_soon:"Coming soon"},videoLink:"Watch video",moreBullets:e=>e===1?"+ 1 more feature":`+ ${e} more features`,showMore:"Show more",lessBullets:"Show less",wheelHint:"Scroll to browse"},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:{sendAnother:"Send another request",vehicleBoxTitle:"Your vehicle:",privacyPre:"By sending this form you agree that we use your details to handle your request. Learn more in our ",privacyLink:"privacy policy",privacyPost:".",mapIframeTitle:"HifiPlanet location in Amorbach on Google Maps",whatsappText:(e,t,n)=>`Hello HifiPlanet, I am interested in the "${n}" package for my ${e} ${t}.`,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:"HiFi Planet Amorbach",address:"Address",phone:"Phone",email:"Email",hours:"Opening hours",hoursWeek:"Mon–Fri: 9:00 AM–6:00 PM",hoursSat:"Sat: 10:00 AM–1:00 PM",hoursWeekDays:"Mon–Fri",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:{ctaTitle:"Want something like this for your car?",ctaText:"Tell us about your vehicle and we will plan a similar build for you.",ctaButton:"Request a similar build",ctaTopic:e=>`I am interested in a build similar to "${e}" from your gallery.`,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"},downloadsPage:{metaTitle:"Downloads",metaDescription:"Files and songs from HifiPlanet to listen to and download.",title:"Downloads",intro:"Here you will find files and songs we provide for you – listen right here or download them.",loading:"Loading…",empty:"There are no downloads available right now.",download:"Download",lockedTitle:"Protected area",lockedText:"Please enter the password you received from us.",passwordLabel:"Password",unlock:"Unlock",unlocking:"Checking…",wrongPassword:"Sorry, that password is not correct."},errors:{generic:"Something went wrong. Please try again.",network:"No connection to the server. Please check your internet connection.",notFound:"This page does not exist (anymore).",rateLimited:"Too many requests in a short time. Please try again later or give us a call.",invalidInput:"Please enter your name and a valid email address.",server:"A server error occurred. Please try again later.",maintenance:"This section is being updated. Please check back later."},notFound:{metaTitle:"Page not found",title:"We could not find this page",text:"The link may be outdated or contain a typo. Continue here:",toVehicles:"Choose your vehicle",toContact:"Get in touch",toHome:"Back to the homepage"}},vn={de:zP,en:BP},zy=m.createContext(null);function $P({children:e}){const[t,n]=m.useState(null),[r,s]=m.useState(!0);m.useEffect(()=>{ie.get("/auth/me").then(d=>n(d.authenticated===!1?null:d)).catch(()=>n(null)).finally(()=>s(!1))},[]);const i=async(d,f)=>{const h=await ie.post("/auth/login",{username:d,password:f});return h.requires_2fa?{requires2fa:!0}:(n(h),{requires2fa:!1})},o=async d=>{const f=await ie.post("/auth/verify-2fa",{code:d});n(f)},l=async()=>{await ie.post("/auth/logout",{}),n(null)},u=async()=>{const d=await ie.get("/auth/me");n(d.authenticated===!1?null:d)},c=d=>{var f;return!!t&&(t.is_super_admin||((f=t.permissions)==null?void 0:f.includes(d)))};return a.jsx(zy.Provider,{value:{user:t,loading:r,login:i,verifyTwoFactor:o,logout:l,refreshUser:u,hasPermission:c},children:e})}function cr(){return m.useContext(zy)}const Sl={home_sections:"content.manage",faqs:"content.manage",partners:"content.manage",text:"content.manage",services:"services.manage",packages:"packages.manage",brands:"brands.manage",car_models:"models.manage",gallery_brands:"gallery.manage",gallery_projects:"gallery.manage",gallery_photos:"gallery.manage",legal_pages:"settings.manage"},ac="hifi-live-edit",HP={de:{},en:{}},ps=(e,t,n,r)=>`${e}|${t}|${n}|${r}`;function UP(){try{const e=new URLSearchParams(window.location.search);if(e.get("bearbeiten")==="1"){sessionStorage.setItem(ac,"1"),e.delete("bearbeiten");const t=e.toString();return window.history.replaceState(window.history.state,"",window.location.pathname+(t?`?${t}`:"")+window.location.hash),!0}return sessionStorage.getItem(ac)==="1"}catch{return!1}}const zn=()=>{},By=m.createContext({available:!1,enabled:!1,setEnabled:zn,canEdit:()=>!1,getValue:(e,t,n,r,s)=>s,setValue:zn,resetValue:zn,hasPending:()=>!1,textOverride:()=>{},trackTextKey:zn,usedTextKeys:()=>[],pendingCount:0,saving:!1,error:"",save:async()=>{},discard:zn,editor:null,openEditor:zn,closeEditor:zn});function jl({serverOverrides:e,children:t}){const{user:n,hasPermission:r}=cr(),s=!!n&&Object.values(Sl).some(L=>r(L)),[i,o]=m.useState(UP),l=s&&i,[u,c]=m.useState({}),[d,f]=m.useState({}),[h,g]=m.useState(!1),[v,w]=m.useState(""),[b,p]=m.useState(null),x=m.useRef(l);x.current=l;const y=m.useRef(new Map),k=m.useCallback(L=>{o(L);try{sessionStorage.setItem(ac,L?"1":"0")}catch{}L||p(null)},[]),E=m.useCallback(L=>l&&!!Sl[L]&&r(Sl[L]),[l,r]),T=m.useCallback((L,F,P,R,z)=>{const G=ps(L,F,P,R);return G in u?u[G]:G in d?d[G]:z},[u,d]),S=m.useCallback((L,F,P,R,z)=>{w(""),c(G=>({...G,[ps(L,F,P,R)]:z}))},[]),j=m.useCallback((L,F,P,R)=>{c(z=>{const G=ps(L,F,P,R);if(!(G in z))return z;const ee={...z};return delete ee[G],ee})},[]),_=m.useCallback((L,F,P,R)=>ps(L,F,P,R)in u,[u]),C=e||HP,B=m.useCallback((L,F)=>{var z;const P=ps("text",F,"value",L),R=P in u?u[P]:P in d?d[P]:(z=C[L])==null?void 0:z[F];return R||void 0},[u,d,C]),H=m.useCallback(L=>{if(!x.current)return;const F=window.location.pathname,P=y.current.get(L);P?P.add(F):y.current.set(L,new Set([F]))},[]),ne=m.useCallback(L=>{const F=[];return y.current.forEach((P,R)=>{P.has(L)&&F.push(R)}),F.sort()},[]),W=Object.keys(u).length,K=m.useCallback(async()=>{const L=Object.entries(u);if(!L.length)return;const F=L.map(([P,R])=>{const[z,G,ee,se]=P.split("|");return{entity:z,id:G,field:ee,lang:se,value:R??""}});g(!0),w("");try{await ie.put("/live-edit",{changes:F}),f(P=>({...P,...u})),c({})}catch(P){w(P.status===401?"Deine Anmeldung ist abgelaufen. Bitte im Admin-Bereich neu anmelden, die Änderungen bleiben hier so lange erhalten.":P.message)}finally{g(!1)}},[u]),q=m.useCallback(()=>{c({}),w(""),p(null)},[]),oe=m.useCallback(L=>p(L),[]),N=m.useCallback(()=>p(null),[]);m.useEffect(()=>{if(!W)return;const L=F=>{F.preventDefault(),F.returnValue=""};return window.addEventListener("beforeunload",L),()=>window.removeEventListener("beforeunload",L)},[W]);const A=m.useMemo(()=>({available:s,enabled:l,setEnabled:k,canEdit:E,getValue:T,setValue:S,resetValue:j,hasPending:_,textOverride:B,trackTextKey:H,usedTextKeys:ne,pendingCount:W,saving:h,error:v,save:K,discard:q,editor:b,openEditor:oe,closeEditor:N}),[s,l,k,E,T,S,j,_,B,H,ne,W,h,v,K,q,b,oe,N]);return a.jsx(By.Provider,{value:A,children:t})}function at(){return m.useContext(By)}function WP(){const e=localStorage.getItem("hifi-lang");return e==="de"||e==="en"?e:(navigator.language||"de").toLowerCase().startsWith("de")?"de":"en"}function ho(e,t){return t.split(".").reduce((n,r)=>n==null?void 0:n[r],e)}const $y=m.createContext({language:"de",setLanguage:()=>{},toggleLanguage:()=>{},t:e=>{const t=ho(vn.de,e);return t!==void 0?t:e}});function El({children:e}){const[t,n]=m.useState(WP),{textOverride:r,trackTextKey:s}=at();m.useEffect(()=>{document.documentElement.setAttribute("lang",t),localStorage.setItem("hifi-lang",t)},[t]);const i=()=>n(l=>l==="de"?"en":"de"),o=l=>{const u=vn[t]||vn.de,c=ho(u,l);if(typeof c=="string"||c===void 0&&typeof ho(vn.de,l)=="string"){s(l);const f=r(t,l);if(f!==void 0)return f}if(c!==void 0)return c;const d=ho(vn.de,l);return d!==void 0?d:l};return a.jsx($y.Provider,{value:{language:t,setLanguage:n,toggleLanguage:i,t:o},children:e})}function pe(){return m.useContext($y)}function Hy({overHero:e=!1,forceDark:t=!1}){const{theme:n,toggleTheme:r}=OP(),{t:s}=pe();return a.jsx("button",{onClick:r,"aria-label":s("themeToggle.label"),className:`rounded-full p-2 transition ${e?"text-white hover:bg-white/10":t?"text-neutral-300 hover:bg-neutral-800":"text-neutral-600 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-neutral-800"}`,children:n==="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"})})})}const $d=m.createContext({phone:"09373 20 62 390",whatsapp:null,contact_email:"info@hifi-planet-amorbach.de",address_street:"Boxbrunner Str. 20a",address_zip:"63916",address_city:"Amorbach",logo_path:null,logo_dark_path:null,business_hours:null,hero_image_path:null,ga_measurement_id:null,gallery_card_text_x:0,gallery_card_text_y:100,site_font:null,page_loader_enabled:1,package_card_width:210,package_card_height:480,vehicle_tile_width:240,vehicle_tile_height:180,hidden_areas:[]}),GP=$d.Provider;function It(){return m.useContext($d)}function Pa(){const{hidden_areas:e}=m.useContext($d);return t=>(e||[]).includes(t)}const ea="/assets/logo-dark-R-ckaBhx.png",Uy=e=>(e||"").replace(/[^\d+]/g,""),ai=e=>`tel:${Uy(e)}`,Hd=(e,t="")=>`https://wa.me/${Uy(e).replace(/^0/,"49").replace("+","")}${t?`?text=${encodeURIComponent(t)}`:""}`;function Nn(e,t={}){typeof window>"u"||typeof window.gtag!="function"||window.gtag("event",e,t)}const KP="https://www.audio4cars.de/",Wm=70,qP=500;function YP({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 XP({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 Cl=[{code:"de",label:"Deutsch",Flag:YP},{code:"en",label:"English",Flag:XP}];function ZP({overHero:e=!1}){const{language:t,setLanguage:n,t:r}=pe(),[s,i]=m.useState(!1),o=m.useRef(null),l=Cl.find(u=>u.code===t)||Cl[0];return m.useEffect(()=>{if(!s)return;const u=d=>{o.current&&!o.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:o,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-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-600"}`,children:a.jsx(l.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-700 bg-neutral-900 py-1 shadow-lg",children:Cl.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-800 ${u.code===t?"font-semibold text-brand-400":"text-neutral-200"}`,children:[a.jsx("span",{className:"block h-4 w-6 shrink-0 overflow-hidden rounded-[3px] ring-1 ring-neutral-600",children:a.jsx(u.Flag,{className:"h-full w-full"})}),u.label]},u.code))})]})}function QP(){const[e,t]=m.useState(!1),[n,r]=m.useState(!1),[s,i]=m.useState(!1),{user:o}=cr(),{phone:l,whatsapp:u,logo_dark_path:c,has_downloads:d}=It(),f=Pa(),{t:h}=pe(),g=!f("page.vehicles"),v=!f("page.services"),w=!f("page.gallery"),b=d&&!f("page.downloads"),p=3+[g,v,w,b,l,u].filter(Boolean).length,y=et().pathname==="/",[k,E]=m.useState(!y);m.useEffect(()=>{if(!y){E(!0);return}const q=()=>E(window.scrollY>24);return q(),window.addEventListener("scroll",q,{passive:!0}),()=>window.removeEventListener("scroll",q)},[y]);const T=y&&!k,S=m.useRef(null),j=m.useRef(null);m.useEffect(()=>{if(!e)return;const q=document.body.style.overflow;document.body.style.overflow="hidden";const oe=setTimeout(()=>{var A,L;return(L=(A=S.current)==null?void 0:A.querySelector("button, a"))==null?void 0:L.focus()},50),N=A=>{if(A.key==="Escape"){t(!1);return}if(A.key!=="Tab"||!S.current)return;const L=[...S.current.querySelectorAll("a[href], button")];if(!L.length)return;const F=L[0],P=L[L.length-1];A.shiftKey&&document.activeElement===F?(A.preventDefault(),P.focus()):!A.shiftKey&&document.activeElement===P&&(A.preventDefault(),F.focus())};return document.addEventListener("keydown",N),()=>{var A;clearTimeout(oe),document.body.style.overflow=q,document.removeEventListener("keydown",N),(A=j.current)==null||A.focus({preventScroll:!0})}},[e]),m.useEffect(()=>{if(e){r(!0);let N;const A=requestAnimationFrame(()=>{N=requestAnimationFrame(()=>i(!0))});return()=>{cancelAnimationFrame(A),N&&cancelAnimationFrame(N)}}i(!1);const q=qP+(p-1)*Wm,oe=setTimeout(()=>r(!1),q);return()=>clearTimeout(oe)},[e,p]);const _=()=>`transition-all duration-500 ease-out ${s?"opacity-100":"opacity-0"}`,C=q=>({transitionDelay:`${(s?q:p-1-q)*Wm}ms`,transform:s?"translateY(0)":"translateY(-140px)"}),B=o&&a.jsx(U,{to:"/admin","aria-label":h("nav.adminPanel"),title:h("nav.adminPanel"),className:`rounded-full p-2 transition ${T?"text-white hover:bg-white/10":"text-neutral-300 hover:bg-neutral-800"}`,children:a.jsx(tP,{className:"h-5 w-5"})}),H=at(),ne=H.available&&a.jsx("button",{type:"button",onClick:()=>H.setEnabled(!H.enabled),"aria-pressed":H.enabled,"aria-label":"Seite bearbeiten",title:H.enabled?"Bearbeiten beenden":"Seite bearbeiten",className:`rounded-full p-2 transition ${H.enabled?"bg-brand-500 text-white hover:bg-brand-600":T?"text-white hover:bg-white/10":"text-neutral-300 hover:bg-neutral-800"}`,children:a.jsx(Fy,{className:"h-5 w-5"})});let W=0;const K=()=>C(W++);return a.jsxs("header",{className:`sticky top-0 z-30 border-b transition-colors duration-300 ${T?"border-transparent bg-transparent":"border-neutral-800 bg-neutral-950/90 backdrop-blur"}`,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",{ref:j,onClick:()=>t(!0),"aria-label":h("nav.openMenu"),"aria-expanded":e,"aria-haspopup":"dialog",className:`rounded-md p-2 transition ${T?"text-white hover:bg-white/10":"text-neutral-300 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.jsx(U,{to:"/",className:"flex items-center justify-self-center rounded-lg px-2 py-1",children:a.jsx("img",{src:c||ea,alt:"HifiPlanet",className:"h-14 w-auto sm:h-16"})}),a.jsxs("div",{className:"flex items-center justify-self-end gap-1",children:[ne,B,!e&&a.jsx(ZP,{overHero:T}),a.jsx(Hy,{overHero:T,forceDark:!0})]})]}),n&&rd.createPortal(a.jsx("div",{ref:S,role:"dialog","aria-modal":"true","aria-label":h("nav.menu"),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":h("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:h("nav.close")})]}),g&&a.jsx(U,{to:"/fahrzeuge",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${_()}`,style:K(),children:h("nav.vehicles")}),v&&a.jsx(U,{to:"/leistungen",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${_()}`,style:K(),children:h("nav.services")}),w&&a.jsx(U,{to:"/galerie",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${_()}`,style:K(),children:h("nav.gallery")}),a.jsx(U,{to:"/kontakt",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${_()}`,style:K(),children:h("nav.contact")}),b&&a.jsx(U,{to:"/downloads",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${_()}`,style:K(),children:h("nav.downloads")}),a.jsx("div",{className:`h-px w-16 bg-brand-500/60 ${_()}`,style:K()}),l&&a.jsxs("a",{href:ai(l),onClick:()=>Nn("contact_call"),className:`flex items-center gap-2 text-sm font-semibold uppercase tracking-wide text-neutral-600 hover:text-brand-600 ${_()}`,style:K(),children:[a.jsx(or,{className:"h-4 w-4"}),l]}),u&&a.jsxs("a",{href:Hd(u),onClick:()=>Nn("contact_whatsapp"),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 ${_()}`,style:K(),children:[a.jsx(Iy,{className:"h-4 w-4"}),h("nav.whatsapp")]}),a.jsxs("a",{href:KP,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 ${_()}`,style:K(),children:[a.jsx(PP,{className:"h-4 w-4"}),h("nav.shop")]})]})}),document.body)]})}const Gm="hifiplanet-cookie-consent",Wy={necessary:!0,external:!1,analytics:!1},Gy=m.createContext({consent:Wy,decided:!1,settingsOpen:!1,acceptAll:()=>{},rejectNonEssential:()=>{},saveCustom:()=>{},openSettings:()=>{},closeSettings:()=>{}});function JP({children:e}){const[t,n]=m.useState(Wy),[r,s]=m.useState(!1),[i,o]=m.useState(!1);m.useEffect(()=>{try{const g=localStorage.getItem(Gm);if(g){const v=JSON.parse(g);n({necessary:!0,external:!!v.external,analytics:!!v.analytics}),s(!0)}}catch{}},[]);const l=m.useCallback(g=>{n(g),s(!0),o(!1),localStorage.setItem(Gm,JSON.stringify({...g,decidedAt:new Date().toISOString()}))},[]),u=m.useCallback(()=>l({necessary:!0,external:!0,analytics:!0}),[l]),c=m.useCallback(()=>l({necessary:!0,external:!1,analytics:!1}),[l]),d=m.useCallback(g=>l({necessary:!0,external:!!g.external,analytics:!!g.analytics}),[l]),f=m.useCallback(()=>o(!0),[]),h=m.useCallback(()=>o(!1),[]);return a.jsx(Gy.Provider,{value:{consent:t,decided:r,settingsOpen:i,acceptAll:u,rejectNonEssential:c,saveCustom:d,openSettings:f,closeSettings:h},children:e})}function ss(){return m.useContext(Gy)}const eT=["mon","tue","wed","thu","fri","sat","sun"],tT=["sun","mon","tue","wed","thu","fri","sat"],Pl={mon:"Mo",tue:"Di",wed:"Mi",thu:"Do",fri:"Fr",sat:"Sa",sun:"So"};function nT(e){const t=new Date,n=e==null?void 0:e[tT[t.getDay()]];if(!n||n.closed||!n.open||!n.close)return!1;const r=t.getHours()*60+t.getMinutes(),[s,i]=n.open.split(":").map(Number),[o,l]=n.close.split(":").map(Number);return r>=s*60+i&&r{const s=rT(e==null?void 0:e[r])||t,i=n[n.length-1];i&&i.label===s?i.days=`${i.firstLabel}-${Pl[r]}`:n.push({key:r,days:Pl[r],firstLabel:Pl[r],label:s})}),n}const sT=e=>(e||"").replace(/[^\d+]/g,"");function iT(){const{phone:e,contact_email:t,address_street:n,address_zip:r,address_city:s,business_hours:i,has_downloads:o}=It(),l=Pa(),u=o&&!l("page.downloads"),c=nT(i),{openSettings:d}=ss(),{pathname:f}=et(),h=f==="/",{t:g}=pe(),v=[n,[r,s].filter(Boolean).join(" ")].filter(Boolean).join(", "),w=`https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent(v)}`,b=Ky(i,g("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 ${h?"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(Vy,{className:"h-4 w-4 text-brand-500"}),a.jsx("p",{className:"font-semibold text-neutral-900 dark:text-white",children:"HifiPlanet"})]}),n&&a.jsx("p",{children:n}),(r||s)&&a.jsx("p",{children:[r,s].filter(Boolean).join(" ")}),a.jsxs("a",{href:w,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(hP,{className:"h-3.5 w-3.5"}),g("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(or,{className:"h-4 w-4 text-brand-500"}),a.jsx("p",{className:"font-semibold text-neutral-900 dark:text-white",children:g("footer.contactHeading")})]}),a.jsx("p",{children:a.jsx("a",{href:`tel:${sT(e)}`,className:"inline-block py-1 hover:text-brand-500",children:e})}),a.jsx("p",{children:a.jsx("a",{href:`mailto:${t}`,className:"inline-block py-1 hover:text-brand-500",children:t})}),a.jsx(U,{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:g("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(Dy,{className:"h-4 w-4 text-brand-500"}),a.jsx("p",{className:"font-semibold text-neutral-900 dark:text-white",children:g("footer.hoursHeading")})]}),a.jsxs("span",{className:`flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[11px] font-semibold ${c?"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 ${c?"bg-green-500":"bg-neutral-400"}`}),g(c?"footer.open":"footer.closed")]})]}),a.jsx("dl",{className:"space-y-1.5",children:b.map(p=>a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[a.jsx("dt",{className:"text-neutral-500 dark:text-neutral-400",children:p.days}),a.jsx("dd",{className:"font-medium text-neutral-700 dark:text-neutral-200",children:p.label})]},p.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:g("footer.copyright")(new Date().getFullYear())}),a.jsx("span",{children:"·"}),a.jsx(U,{to:"/impressum",className:"hover:text-brand-500",children:g("footer.imprint")}),a.jsx("span",{children:"·"}),a.jsx(U,{to:"/datenschutz",className:"hover:text-brand-500",children:g("footer.privacy")}),a.jsx("span",{children:"·"}),a.jsx(U,{to:"/agb",className:"hover:text-brand-500",children:g("footer.terms")}),a.jsx("span",{children:"·"}),u&&a.jsxs(a.Fragment,{children:[a.jsx(U,{to:"/downloads",className:"hover:text-brand-500",children:g("footer.downloads")}),a.jsx("span",{children:"·"})]}),a.jsx("button",{type:"button",onClick:d,className:"hover:text-brand-500",children:g("footer.cookieSettings")})]})})]})}function oT(){const{scrollYProgress:e}=Ty(),t=cC(e,{stiffness:200,damping:30,restDelta:.001});return a.jsx(Qt.div,{style:{scaleX:t},className:"fixed left-0 top-0 z-40 h-0.5 w-full origin-left bg-brand-500"})}const aT=()=>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 vi({message:e,fullScreen:t=!1}){const{t:n}=pe(),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(aT,{})}),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.jsxs("div",{className:"relative flex min-h-screen items-center justify-center bg-white px-4 dark:bg-neutral-950",children:[r,a.jsxs(U,{to:"/admin/login","aria-label":n("maintenance.login"),title:n("maintenance.login"),className:"fixed bottom-4 right-4 flex items-center gap-2 rounded-full border border-neutral-200 bg-white px-3 py-2 text-sm font-medium text-neutral-600 shadow-sm transition hover:border-brand-500 hover:text-brand-600 dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-300 dark:hover:text-brand-400",children:[a.jsx(Ry,{className:"h-4 w-4"}),n("maintenance.login")]})]}):a.jsx("div",{className:"mx-auto max-w-6xl px-4 py-20 sm:px-6",children:r})}const Km=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 wi({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:Km}):a.jsx("div",{className:"bg-amber-500 px-4 py-2 text-center text-xs font-semibold text-white",children:Km})}const qm='a[href], button:not([disabled]), input:not([disabled]), select, textarea, [tabindex]:not([tabindex="-1"])';function qy(e,t,n){m.useEffect(()=>{if(!t)return;const r=document.activeElement,s=document.body.style.overflow;document.body.style.overflow="hidden";const i=setTimeout(()=>{var l,u;return(u=(l=e.current)==null?void 0:l.querySelector(qm))==null?void 0:u.focus()},30),o=l=>{if(l.key==="Escape"){l.stopPropagation(),n==null||n();return}if(l.key!=="Tab"||!e.current)return;const u=[...e.current.querySelectorAll(qm)];if(!u.length)return;const c=u[0],d=u[u.length-1];l.shiftKey&&document.activeElement===c?(l.preventDefault(),d.focus()):!l.shiftKey&&document.activeElement===d&&(l.preventDefault(),c.focus())};return document.addEventListener("keydown",o),()=>{clearTimeout(i),document.body.style.overflow=s,document.removeEventListener("keydown",o),r instanceof HTMLElement&&r.focus({preventScroll:!0})}},[t,e])}function lT({onClose:e}){const{consent:t,saveCustom:n}=ss(),[r,s]=m.useState(t.external),[i,o]=m.useState(t.analytics),{t:l}=pe(),u=m.useRef(null);return qy(u,!0,e),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",{ref:u,role:"dialog","aria-modal":"true","aria-label":l("cookieConsent.modalTitle"),className:"w-full max-w-md rounded-xl bg-white p-6 dark:bg-neutral-900",onClick:c=>c.stopPropagation(),children:[a.jsx("h2",{className:"mb-1 text-lg font-bold text-neutral-900 dark:text-white",children:l("cookieConsent.modalTitle")}),a.jsxs("p",{className:"mb-4 text-sm text-neutral-600 dark:text-neutral-300",children:[l("cookieConsent.modalIntro")," ",a.jsx(U,{to:"/datenschutz",className:"underline hover:text-brand-500",onClick:e,children:l("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:l("cookieConsent.necessaryTitle")}),a.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:l("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:l("cookieConsent.externalTitle")}),a.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:l("cookieConsent.externalDesc")})]}),a.jsx("input",{type:"checkbox",checked:r,onChange:c=>s(c.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:l("cookieConsent.analyticsTitle")}),a.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:l("cookieConsent.analyticsDesc")})]}),a.jsx("input",{type:"checkbox",checked:i,onChange:c=>o(c.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:l("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:l("cookieConsent.saveSelection")})]})]})})}function uT(){const{decided:e,settingsOpen:t,acceptAll:n,rejectNonEssential:r,openSettings:s,closeSettings:i}=ss(),{t:o}=pe();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:[o("cookieConsent.bannerText")," ",o("cookieConsent.moreInfo")," ",a.jsx(U,{to:"/datenschutz",className:"underline hover:text-brand-500",children:o("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:o("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:o("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:o("cookieConsent.acceptAll")})]})]})}),t&&a.jsx(lT,{onClose:i})]})}const cT="/assets/bg-dark-B4R1klEI.webp",Te={card:"#14170e",cardBorder:"rgba(168,225,12,0.16)",divider:"rgba(168,225,12,0.15)",text:"#f3f6ea",muted:"#9aa38c",label:"#8f987f",accent:"#b6e619",pillBorder:"rgba(168,225,12,0.28)"},Ym={fontFamily:"'Michroma', sans-serif"};function ta(e,t=0){return e!=null&&e.launch_at?new Date(e.launch_at).getTime()-(Date.now()+t):0}function dT(e,t){return!(e!=null&&e.server_time)||!t?0:new Date(e.server_time).getTime()-t}function fT(e){const t=Math.max(0,Math.floor(e/1e3));return{days:Math.floor(t/86400),hours:Math.floor(t%86400/3600),minutes:Math.floor(t%3600/60),seconds:t%60}}function hT(e,t){const n=new Date(e),r=new Date(n.getTime()+60*60*1e3),s=o=>o.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),i=["BEGIN:VCALENDAR","VERSION:2.0","PRODID:-//HifiPlanet//Countdown//DE","BEGIN:VEVENT",`UID:launch-${s(n)}@hifi-planet.de`,`DTSTAMP:${s(new Date)}`,`DTSTART:${s(n)}`,`DTEND:${s(r)}`,`SUMMARY:${t}`,`URL:${window.location.origin}`,"END:VEVENT","END:VCALENDAR"].join(`\r
`);return`data:text/calendar;charset=utf-8,${encodeURIComponent(i)}`}function mT({text:e}){const t=e.trimEnd().lastIndexOf(" ");return t<0?e:a.jsxs(a.Fragment,{children:[e.slice(0,t+1),a.jsx("span",{style:{color:Te.accent},children:e.slice(t+1)})]})}function pT({countdown:e,clockOffset:t=0,settings:n={},preview:r=!1,onClosePreview:s,onLaunch:i}){const{t:o,language:l,toggleLanguage:u}=pe(),[c,d]=m.useState(()=>ta(e,t)),f=c<=0;m.useEffect(()=>{const y=()=>d(ta(e,t));y();const k=setInterval(y,250);return()=>clearInterval(k)},[e,t]),m.useEffect(()=>{if(!f||r)return;const y=setTimeout(()=>i==null?void 0:i(),2600);return()=>clearTimeout(y)},[f,r,i]),m.useEffect(()=>{const y=document.title;return document.title=`HifiPlanet – ${o("countdown.eyebrow")}`,()=>{document.title=y}},[o]);const h=fT(c),g=l==="en",v=f?o("countdown.liveTitle"):(g?e.title_en:e.title)||o("countdown.title"),w=f?o("countdown.liveMessage"):(g?e.message_en:e.message)||o("countdown.message"),b=e.launch_at?new Date(e.launch_at):null,p=b?b.toLocaleString(g?"en-GB":"de-DE",{weekday:"long",day:"numeric",month:"long",hour:"2-digit",minute:"2-digit",timeZone:"Europe/Berlin"}):"",x=[[h.days,o("countdown.days")],[h.hours,o("countdown.hours")],[h.minutes,o("countdown.minutes")],[h.seconds,o("countdown.seconds")]];return a.jsxs("div",{className:"flex min-h-[100svh] flex-col bg-[#0a0c06] bg-cover bg-center",style:{backgroundImage:`url(${cT})`,color:Te.text,fontFamily:"'Barlow', sans-serif"},children:[r&&a.jsxs("div",{className:"flex items-center justify-center gap-3 px-4 py-2 text-xs font-semibold",style:{background:Te.accent,color:"#0f1208"},children:[o("countdown.preview"),a.jsxs("button",{type:"button",onClick:s,className:"inline-flex items-center gap-1 underline",children:[a.jsx(yi,{className:"h-3.5 w-3.5"}),o("countdown.closePreview")]})]}),a.jsxs("div",{className:"mx-auto flex w-full max-w-[1280px] flex-1 flex-col px-4 pb-6 sm:px-10 sm:pb-10",children:[a.jsxs("header",{className:"flex items-center justify-between gap-4 border-b pb-5 pt-6 sm:pt-8",style:{borderColor:Te.divider},children:[a.jsx("img",{src:n.logo_dark_path||ea,alt:"HifiPlanet",className:"h-12 w-auto sm:h-14"}),a.jsxs("div",{className:"flex items-center gap-5",children:[a.jsx("button",{type:"button",onClick:u,"aria-label":o("languageToggle.label"),className:"text-xs font-semibold uppercase tracking-[3px] hover:text-white",style:{color:Te.muted},children:l==="de"?"EN":"DE"}),n.phone&&a.jsxs("a",{href:ai(n.phone),className:"hidden items-center gap-2.5 rounded-full border py-2 pl-2 pr-5 text-sm font-semibold sm:inline-flex",style:{borderColor:Te.pillBorder,background:Te.card},children:[a.jsx("span",{className:"flex h-7 w-7 items-center justify-center rounded-full",style:{background:"rgba(168,225,12,0.1)",color:Te.accent},children:a.jsx(or,{className:"h-3.5 w-3.5"})}),n.phone]})]})]}),a.jsxs("main",{className:"flex flex-1 flex-col justify-center py-12 sm:py-16",children:[a.jsx("p",{className:"mb-3 text-[13px] font-semibold uppercase tracking-[6px]",style:{color:Te.accent},children:o(f?"countdown.liveEyebrow":"countdown.eyebrow")}),a.jsx("h1",{style:Ym,className:"max-w-3xl text-[34px] leading-[1.08] sm:text-[clamp(34px,5vw,60px)]",children:a.jsx(mT,{text:v})}),a.jsx("p",{className:"mb-10 mt-5 max-w-[520px] text-lg leading-[1.55]",style:{color:Te.muted},children:w}),a.jsx("div",{className:"grid w-full max-w-[720px] grid-cols-4 rounded-[14px] border shadow-[0_24px_60px_rgba(0,0,0,0.55)]",style:{background:Te.card,borderColor:Te.cardBorder},children:x.map(([y,k],E)=>a.jsxs("div",{className:`px-2 py-5 text-center sm:px-6 sm:py-7 ${E>0?"border-l":""}`,style:{borderColor:Te.divider},children:[a.jsx("div",{style:Ym,className:"text-[22px] tabular-nums leading-none min-[400px]:text-[26px] sm:text-[44px]",children:String(y).padStart(2,"0")}),a.jsx("div",{className:"mt-3 text-[10px] font-semibold uppercase tracking-[2px] sm:text-[11px] sm:tracking-[3px]",style:{color:Te.label},children:k})]},k))}),b&&!f&&a.jsxs("div",{className:"mt-6 flex flex-col gap-3 text-[15px] sm:flex-row sm:items-center sm:gap-8",children:[a.jsxs("p",{style:{color:Te.muted},children:[o("countdown.launchPrefix"),": ",a.jsx("span",{className:"font-semibold",style:{color:Te.text},children:p}),o("countdown.clock")&&` ${o("countdown.clock")}`]}),a.jsxs("a",{href:hT(e.launch_at,o("countdown.calendarTitle")),download:"hifiplanet-launch.ics",className:"text-[13px] font-bold uppercase tracking-[3px] hover:underline",style:{color:Te.accent},children:[o("countdown.addToCalendar")," →"]})]})]}),a.jsxs("footer",{className:"flex flex-wrap gap-x-6 gap-y-2 border-t pt-5 text-[13px]",style:{borderColor:Te.divider,color:Te.label},children:[n.phone&&a.jsx("a",{href:ai(n.phone),className:"hover:text-white sm:hidden",children:n.phone}),n.address_city&&a.jsxs("span",{children:[n.address_street,", ",n.address_zip," ",n.address_city]}),a.jsx(U,{to:"/impressum",className:"hover:text-white",children:"Impressum"}),a.jsx(U,{to:"/datenschutz",className:"hover:text-white",children:g?"Privacy":"Datenschutz"}),a.jsx(U,{to:"/admin/login","aria-label":o("maintenance.login"),title:o("maintenance.login"),className:"hover:text-white",children:a.jsx(Ry,{className:"h-3.5 w-3.5"})})]})]})]})}function gT({countdown:e}){const{t,language:n}=pe(),r=new Date(e.launch_at).toLocaleString(n==="en"?"en-GB":"de-DE",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",timeZone:"Europe/Berlin"});return a.jsxs("div",{className:"bg-neutral-900 px-4 py-2 text-center text-xs font-semibold text-neutral-200",children:[t("countdown.adminActive").replace("{date}",r)," ",a.jsx(U,{to:"/?countdown=vorschau",className:"text-brand-300 underline hover:text-brand-200",children:t("countdown.adminPreview")})]})}function xT(){const{consent:e}=ss(),{ga_measurement_id:t}=It(),n=m.useRef(!1),r=et();return m.useEffect(()=>{if(!t||!e.analytics||n.current)return;n.current=!0;const s=document.createElement("script");s.src=`https://www.googletagmanager.com/gtag/js?id=${t}`,s.async=!0,document.head.appendChild(s),window.dataLayer=window.dataLayer||[];function i(...o){window.dataLayer.push(o)}window.gtag=i,i("js",new Date),i("config",t,{anonymize_ip:!0,send_page_view:!1})},[t,e.analytics]),m.useEffect(()=>{!n.current||typeof window.gtag!="function"||window.gtag("consent","update",{analytics_storage:e.analytics?"granted":"denied"})},[e.analytics]),m.useEffect(()=>{!e.analytics||typeof window.gtag!="function"||window.gtag("event","page_view",{page_path:r.pathname+r.search,page_location:window.location.href,page_title:document.title})},[r.pathname,r.search,e.analytics,t]),null}const Yy=m.createContext({global:{enabled:!1,message:null},services:{enabled:!1,message:null},vehicles:{enabled:!1,message:null},bypass:!1}),yT=Yy.Provider;function Ta(){return m.useContext(Yy)}const Ud=m.createContext({}),vT=Ud.Provider;function ar(e,t){const n=e[t];if(!n)return{};const r={};return n.font_family&&(r.fontFamily=n.font_family),n.font_size&&(r.fontSize=n.font_size),n.color&&(r.color=n.color),r}function Ue(e){const t=m.useContext(Ud);return ar(t,e)}function Wd(){return m.useContext(Ud)}const wT=[{label:"Systemschrift",value:""},{label:"Serifenlos (Arial)",value:"Arial, Helvetica, sans-serif"},{label:"Serif (Georgia)",value:'Georgia, "Times New Roman", serif'},{label:"Klassisch (Times New Roman)",value:'"Times New Roman", Times, serif'},{label:"Modern (Verdana)",value:"Verdana, Geneva, sans-serif"},{label:"Schreibmaschine (Courier New)",value:'"Courier New", Courier, monospace'}],Gd=m.createContext({fonts:[],refresh:()=>{}}),Xy=Gd.Provider;function Zy(){return m.useContext(Gd).fonts}function L4(){return m.useContext(Gd).refresh}function A4(){const e=Zy();return[...wT,...e.map(t=>({label:t.name,value:t.font_family}))]}function bT(e){const t=/\.([a-z0-9]+)$/i.exec(e||"");return t?t[1].toLowerCase():""}const kT={woff2:"woff2",woff:"woff",ttf:"truetype",otf:"opentype"};function Qy(){const e=Zy();if(e.length===0)return null;const t=e.map(n=>{const r=kT[bT(n.file_path)]||"woff2";return`@font-face { font-family: "${n.font_family}"; src: url("${n.file_path}") format("${r}"); font-display: swap; }`}).join(`
-`);return a.jsx("style",{children:t})}const ST=150,jT=300,ET=80,CT=5e3;function PT(){return a.jsx("div",{className:"fixed inset-0 z-[200] flex items-center justify-center bg-white dark:bg-neutral-950",children:a.jsx("div",{className:"h-10 w-10 animate-spin rounded-full border-4 border-neutral-200 border-t-brand-500 dark:border-neutral-800 dark:border-t-brand-500"})})}function TT({enabled:e,children:t}){const n=et(),[r,s]=m.useState(!e),[i,o]=m.useState(!1),l=m.useRef(null);return m.useLayoutEffect(()=>{const u=l.current;if(!e||!u){s(!0),o(!1);return}s(!1),o(!1);let c=!1,d=0,f=null;const h=new Set,g=setTimeout(()=>{d=Date.now(),o(!0)},ST),v=()=>{s(!0),o(!1)},w=()=>{c=!0,clearTimeout(g),clearTimeout(f),clearTimeout(T),k.disconnect(),E()},b=()=>{if(c)return;w();const S=d?jT-(Date.now()-d):0;S>0?setTimeout(v,S):v()},p=()=>{clearTimeout(f),f=setTimeout(()=>{h.size===0&&xC()===0&&b()},ET)},x=S=>{if(h.has(S)||S.complete||S.getBoundingClientRect().top>=window.innerHeight)return;S.loading==="lazy"&&(S.loading="eager"),h.add(S);const j=()=>{h.delete(S),S.removeEventListener("load",j),S.removeEventListener("error",j),p()};S.addEventListener("load",j),S.addEventListener("error",j)},y=S=>{var j;S.nodeType===1&&(S.tagName==="IMG"&&x(S),(j=S.querySelectorAll)==null||j.call(S,"img").forEach(x))},k=new MutationObserver(S=>{S.forEach(j=>j.addedNodes.forEach(y)),p()});k.observe(u,{childList:!0,subtree:!0});const E=yC(p),T=setTimeout(b,CT);return u.querySelectorAll("img").forEach(x),p(),()=>{c||w()}},[n.pathname,e]),a.jsxs("div",{className:"relative",children:[a.jsx("div",{ref:l,style:e?{visibility:r?"visible":"hidden"}:void 0,children:t}),e&&i&&a.jsx(PT,{})]})}const NT=m.lazy(()=>X(()=>import("./RichTextEditor-DQS6tfZU.js"),[])),Kd={de:"Deutsch",en:"Englisch"},_T=["nav.","footer.","cookieConsent.","languageToggle.","themeToggle.","maintenance."],Ui=e=>_T.some(t=>e.startsWith(t));function Tl(e,t){return t.split(".").reduce((n,r)=>n==null?void 0:n[r],e)}function MT({editor:e}){const t=at(),{entity:n,id:r,field:s,lang:i,kind:o,label:l,hint:u,original:c}=e,[d]=m.useState(()=>({value:c,wasPending:t.hasPending(n,r,s,i)})),[f,h]=m.useState(c),g=w=>{h(w),t.setValue(n,r,s,i,w)},v=()=>{d.wasPending?t.setValue(n,r,s,i,d.value):t.resetValue(n,r,s,i),t.closeEditor()};return a.jsxs("div",{className:"pointer-events-auto w-full rounded-xl border border-neutral-200 bg-white p-4 text-neutral-900 shadow-2xl dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-100 sm:w-[min(92vw,520px)]",children:[a.jsxs("div",{className:"mb-2 flex items-center justify-between gap-3",children:[a.jsxs("p",{className:"text-sm font-semibold",children:[l," ",a.jsxs("span",{className:"font-normal text-neutral-500",children:["(",Kd[i],")"]})]}),a.jsx("button",{type:"button",onClick:v,"aria-label":"Abbrechen",className:"rounded p-1 text-neutral-500 hover:bg-neutral-100 dark:hover:bg-neutral-800",children:a.jsx(yi,{className:"h-4 w-4"})})]}),u&&a.jsx("p",{className:"mb-2 text-xs text-neutral-500 dark:text-neutral-400",children:u}),o==="html"?a.jsx("div",{className:"max-h-[45vh] overflow-y-auto rounded-md border border-neutral-300 dark:border-neutral-700",children:a.jsx(m.Suspense,{fallback:a.jsx("p",{className:"p-3 text-sm text-neutral-500",children:"Editor lädt…"}),children:a.jsx(NT,{value:f,onChange:g})})}):o==="input"?a.jsx("input",{autoFocus:!0,value:f,onChange:w=>g(w.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-800"}):a.jsx("textarea",{autoFocus:!0,rows:7,value:f,onChange:w=>g(w.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-800"}),a.jsxs("div",{className:"mt-3 flex justify-end gap-2",children:[a.jsx("button",{type:"button",onClick:v,className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm font-medium hover:bg-neutral-50 dark:border-neutral-700 dark:hover:bg-neutral-800",children:"Abbrechen"}),a.jsx("button",{type:"button",onClick:t.closeEditor,className:"rounded-md bg-brand-500 px-3 py-1.5 text-sm font-semibold text-white hover:bg-brand-600",children:"Übernehmen"})]})]})}function LT({onClose:e}){const t=at(),{language:n,t:r}=pe(),s=et(),[i,o]=m.useState(""),[l,u]=m.useState(0);m.useEffect(()=>{const h=setTimeout(()=>u(g=>g+1),400);return()=>clearTimeout(h)},[s.pathname]);const c=m.useMemo(()=>t.usedTextKeys(s.pathname).filter(h=>typeof Tl(vn.de,h)=="string").sort((h,g)=>Ui(h)-Ui(g)||h.localeCompare(g)),[s.pathname,l,t.usedTextKeys]),d=i.trim().toLowerCase(),f=c.filter(h=>!d||h.toLowerCase().includes(d)||r(h).toLowerCase().includes(d));return a.jsxs("div",{className:"pointer-events-auto flex max-h-[60vh] w-full flex-col rounded-xl border border-neutral-200 bg-white text-neutral-900 shadow-2xl dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-100 sm:w-[min(92vw,520px)]",children:[a.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-neutral-200 p-4 pb-3 dark:border-neutral-800",children:[a.jsxs("div",{children:[a.jsxs("p",{className:"text-sm font-semibold",children:["Feste Texte auf dieser Seite ",a.jsxs("span",{className:"font-normal text-neutral-500",children:["(",Kd[n],")"]})]}),a.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:"Buttons, Beschriftungen, Menü und Fußzeile. Leer lassen = Standardtext."})]}),a.jsx("button",{type:"button",onClick:e,"aria-label":"Schließen",className:"rounded p-1 text-neutral-500 hover:bg-neutral-100 dark:hover:bg-neutral-800",children:a.jsx(yi,{className:"h-4 w-4"})})]}),a.jsx("div",{className:"px-4 pt-3",children:a.jsx("input",{type:"search",value:i,onChange:h=>o(h.target.value),placeholder:"Suchen…",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-1.5 text-sm dark:border-neutral-700 dark:bg-neutral-800"})}),a.jsxs("ul",{className:"flex-1 space-y-3 overflow-y-auto p-4",children:[f.length===0&&a.jsx("li",{className:"text-sm text-neutral-500",children:"Keine Texte gefunden."}),f.map((h,g)=>{const v=Tl(vn[n],h)??Tl(vn.de,h),w=t.textOverride(n,h)!==void 0,b=r(h);return a.jsxs("li",{children:[Ui(h)&&(g===0||!Ui(f[g-1]))&&a.jsx("p",{className:"mb-3 border-t border-neutral-200 pt-3 text-xs font-semibold uppercase tracking-wide text-neutral-500 dark:border-neutral-800",children:"Auf allen Seiten (Menü, Fußzeile, Cookie-Hinweis)"}),a.jsxs("div",{className:"mb-1 flex items-center justify-between gap-2",children:[a.jsx("label",{htmlFor:`live-text-${h}`,className:"truncate font-mono text-[11px] text-neutral-500",title:h,children:h}),w&&a.jsxs("button",{type:"button",onClick:()=>t.setValue("text",h,"value",n,""),className:"flex shrink-0 items-center gap-1 text-[11px] text-neutral-500 hover:text-brand-600",title:`Standard: ${v}`,children:[a.jsx(vP,{className:"h-3 w-3"})," Standard"]})]}),a.jsx("textarea",{id:`live-text-${h}`,rows:b.length>60?3:1,value:b,onChange:p=>t.setValue("text",h,"value",n,p.target.value===v?"":p.target.value),className:`w-full resize-y rounded-md border bg-white px-2.5 py-1.5 text-sm dark:bg-neutral-800 ${w?"border-amber-400 dark:border-amber-500":"border-neutral-300 dark:border-neutral-700"}`})]},h)})]})]})}function AT(){const e=at(),{language:t}=pe(),[n,r]=m.useState(!1);if(!e.enabled)return null;const s=()=>{e.pendingCount&&!window.confirm("Es gibt ungespeicherte Änderungen. Bearbeiten trotzdem beenden? Die Änderungen gehen dann verloren.")||(e.discard(),e.setEnabled(!1))},i=e.editor&&`${e.editor.entity}|${e.editor.id}|${e.editor.field}|${e.editor.lang}`;return a.jsxs("div",{className:"pointer-events-none fixed inset-x-0 bottom-0 z-[150] flex flex-col items-end gap-2 p-2 sm:p-4",children:[e.editor?a.jsx(MT,{editor:e.editor},i):n&&a.jsx(LT,{onClose:()=>r(!1)}),a.jsxs("div",{className:"pointer-events-auto flex w-full flex-wrap items-center justify-between gap-2 rounded-xl border border-neutral-700 bg-neutral-950/95 px-3 py-2.5 text-sm text-neutral-100 shadow-2xl backdrop-blur sm:px-4",children:[a.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[a.jsx(Fy,{className:"h-4 w-4 shrink-0 text-brand-400"}),a.jsxs("p",{className:"min-w-0 truncate",children:[a.jsx("span",{className:"font-semibold",children:"Bearbeiten"}),a.jsxs("span",{className:"hidden text-neutral-400 sm:inline",children:[" · ",Kd[t]," · gestrichelte Stellen anklicken"]})]})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.error&&a.jsx("span",{className:"max-w-xs text-xs text-red-400",children:e.error}),a.jsxs("button",{type:"button",onClick:()=>{e.closeEditor(),r(o=>!o)},className:`flex items-center gap-1.5 rounded-md border px-3 py-1.5 font-medium ${n?"border-brand-400 text-brand-300":"border-neutral-700 hover:bg-neutral-800"}`,children:[a.jsx(iP,{className:"h-4 w-4"}),a.jsx("span",{className:"hidden sm:inline",children:"Feste Texte"})]}),e.pendingCount>0&&a.jsx("button",{type:"button",onClick:e.discard,className:"rounded-md border border-neutral-700 px-3 py-1.5 font-medium hover:bg-neutral-800",children:"Verwerfen"}),a.jsxs("button",{type:"button",onClick:e.save,disabled:!e.pendingCount||e.saving,className:"flex items-center gap-1.5 rounded-md bg-brand-500 px-3 py-1.5 font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:[a.jsx(Ay,{className:"h-4 w-4"}),e.saving?"Speichere…":e.pendingCount?`Speichern (${e.pendingCount})`:"Gespeichert"]}),a.jsx("button",{type:"button",onClick:s,"aria-label":"Bearbeiten beenden",title:"Bearbeiten beenden",className:"rounded-md p-1.5 text-neutral-400 hover:bg-neutral-800 hover:text-white",children:a.jsx(yi,{className:"h-4 w-4"})})]})]})]})}const Jy=[{title:"Seiten",hint:"Ausgeblendete Seiten verschwinden aus dem Menü und leiten Besucher auf die Startseite um.",areas:[{key:"page.vehicles",label:"Fahrzeuge & Pakete",path:"/fahrzeuge"},{key:"page.services",label:"Leistungen",path:"/leistungen"},{key:"page.gallery",label:"Galerie",path:"/galerie"},{key:"page.downloads",label:"Downloads",path:"/downloads",note:"Erscheint ohnehin nur, wenn Downloads hinterlegt sind."}]},{title:"Startseite",hint:"Einzelne Abschnitte der Startseite. Das große Titelbild oben bleibt immer sichtbar.",areas:[{key:"home.stats",label:"Zahlen-Leiste"},{key:"home.partners",label:"Marken / Partner-Logos"},{key:"home.youtube",label:"Video-Abschnitt"},{key:"home.craft",label:"Handwerk & Beratung"},{key:"home.insights",label:"Einblicke (Bilder)"},{key:"home.reviews",label:"Kundenbewertungen"},{key:"home.more",label:'„Mehr als Car-Hifi"'},{key:"home.faq",label:"Häufige Fragen (FAQ)"}]}],DT=Jy[0].areas;function RT(e){if(!e)return null;const t=DT.find(n=>e===n.path||e.startsWith(`${n.path}/`));return t?t.key:null}function ev(e,t=[]){const n=RT(e);return!!n&&t.includes(n)}const VT=Jy.flatMap(e=>e.areas),IT={global:{enabled:!1,message:null},services:{enabled:!1,message:null},vehicles:{enabled:!1,message:null}},FT={mon:{open:"09:00",close:"18:00",closed:!1},tue:{open:"09:00",close:"18:00",closed:!1},wed:{open:"09:00",close:"18:00",closed:!1},thu:{open:"09:00",close:"18:00",closed:!1},fri:{open:"09:00",close:"18:00",closed:!1},sat:{open:"10:00",close:"13:00",closed:!1},sun:{open:"",close:"",closed:!0}},Nl={phone:"09373 20 62 390",whatsapp:null,contact_email:"info@hifi-planet-amorbach.de",address_street:"Boxbrunner Str. 20a",address_zip:"63916",address_city:"Amorbach",logo_path:null,logo_dark_path:null,business_hours:FT,hero_image_path:null,ga_measurement_id:null,package_card_theme:"graphite",package_card_layout:"strip",package_wheel_hint_interval:8,package_card_width:210,package_card_height:480,vehicle_tile_width:240,vehicle_tile_height:180,gallery_card_text_x:0,gallery_card_text_y:100,site_font:null,page_loader_enabled:1,has_downloads:!1,hidden_areas:[],price_note:null,price_note_en:null},OT=["/impressum","/datenschutz","/agb"],Xm="hifi-site-settings",Zm="hifi-maintenance";function Qm(e){try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch{return null}}function Jm(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}const zT={mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday",sun:"Sunday"};function BT(e){var n,r,s;const t=document.getElementById("ld-business");if(t)try{const i=JSON.parse(t.textContent),o=(e.phone||"").replace(/[^\d+]/g,"");o&&(i.telephone=o.startsWith("+")?o:`+49${o.replace(/^0/,"")}`),e.contact_email&&(i.email=e.contact_email),i.address={"@type":"PostalAddress",streetAddress:e.address_street||((n=i.address)==null?void 0:n.streetAddress),postalCode:e.address_zip||((r=i.address)==null?void 0:r.postalCode),addressLocality:e.address_city||((s=i.address)==null?void 0:s.addressLocality),addressCountry:"DE"};const l=e.business_hours;l&&typeof l=="object"&&(i.openingHoursSpecification=Object.entries(zT).filter(([u])=>l[u]&&!l[u].closed&&l[u].open&&l[u].close).map(([u,c])=>({"@type":"OpeningHoursSpecification",dayOfWeek:c,opens:l[u].open,closes:l[u].close}))),t.textContent=JSON.stringify(i)}catch{}}function $T(){var _;const[e]=m.useState(()=>Qm(Xm)),[t,n]=m.useState(()=>Qm(Zm)),[r,s]=m.useState(()=>e?{...Nl,...e}:Nl),[i,o]=m.useState(!!e),[l,u]=m.useState({}),[c,d]=m.useState([]),{loading:f,hasPermission:h,user:g}=cr(),v=et(),w=es(),[b,p]=m.useState(!1),[x]=m.useState(()=>new Date(Date.now()+(7*24+3)*3600*1e3+42*60*1e3).toISOString());m.useEffect(()=>{ie.get("/maintenance").then(C=>{const B={...C,_received_at:Date.now()};n(B),Jm(Zm,B)}).catch(()=>n(C=>C||IT)),ie.get("/site-settings").then(C=>{s({...Nl,...C}),Jm(Xm,C)}).catch(()=>{}).finally(()=>o(!0)),ie.get("/text-styles").then(u).catch(()=>{}),ie.get("/custom-fonts").then(d).catch(()=>{})},[]),m.useEffect(()=>{r.site_font?document.documentElement.style.setProperty("--site-font",r.site_font):document.documentElement.style.removeProperty("--site-font")},[r.site_font]),m.useEffect(()=>{i&&BT(r)},[r,i]);const y=t==null?void 0:t.countdown,k=dT(y,t==null?void 0:t._received_at),E=!!(y!=null&&y.active)&&!b&&ta(y,k)>0;if(t===null||!i||((_=t.global)!=null&&_.enabled||E)&&f)return a.jsx("div",{className:"min-h-screen bg-white dark:bg-neutral-950"});const T=h("maintenance.bypass"),S=OT.includes(v.pathname),j=!!g&&new URLSearchParams(v.search).get("countdown")==="vorschau";if(!S&&(E&&!g||j)){const C=j&&!(y!=null&&y.launch_at&&ta(y,k)>0)?{...y,launch_at:x}:y;return a.jsx(jl,{serverOverrides:r.text_overrides,children:a.jsx(El,{children:a.jsx(pT,{countdown:C,clockOffset:C===y?k:0,settings:r,preview:j,onClosePreview:()=>w("/",{replace:!0}),onLaunch:()=>p(!0)})})})}return t.global.enabled&&!T&&!S?a.jsx(jl,{serverOverrides:r.text_overrides,children:a.jsx(El,{children:a.jsx(vi,{message:t.global.message,fullScreen:!0})})}):a.jsx(jl,{serverOverrides:r.text_overrides,children:a.jsx(El,{children:a.jsx(yT,{value:{...t,bypass:T},children:a.jsx(GP,{value:r,children:a.jsx(vT,{value:l,children:a.jsx(Xy,{value:{fonts:c,refresh:()=>{}},children:a.jsxs("div",{className:"page-texture flex min-h-screen flex-col text-neutral-900 dark:text-neutral-100",children:[a.jsx(Qy,{}),T&&t.global.enabled&&a.jsx(wi,{}),!!g&&E&&a.jsx(gT,{countdown:y}),a.jsx(oT,{}),a.jsx(QP,{}),a.jsx("main",{className:"flex-1",children:a.jsx(TT,{enabled:v.pathname!=="/"&&!!r.page_loader_enabled,children:ev(v.pathname,r.hidden_areas)?a.jsx(sr,{to:"/",replace:!0}):a.jsx(m.Suspense,{fallback:a.jsx("div",{className:"min-h-[60vh]"}),children:a.jsx(ld,{})})})}),a.jsx(iT,{}),a.jsx(uT,{}),a.jsx(xT,{}),a.jsx(AT,{})]})})})})})})})}const Na=m.createContext({toast:{success:()=>{},error:()=>{},info:()=>{}},setDirty:()=>{},confirmLeave:()=>!0,refreshCounters:()=>{}});let HT=0;function UT({children:e,onRefreshCounters:t}){const[n,r]=m.useState([]),s=m.useRef(new Set),i=m.useCallback(f=>r(h=>h.filter(g=>g.id!==f)),[]),o=m.useCallback((f,h,g={})=>{const v=++HT;return r(w=>[...w.slice(-3),{id:v,type:f,message:h,action:g.action}]),setTimeout(()=>i(v),g.duration||(f==="error"?7e3:3500)),v},[i]),l=m.useMemo(()=>({success:(f,h)=>o("success",f,h),error:(f,h)=>o("error",f,h),info:(f,h)=>o("info",f,h)}),[o]),u=m.useCallback((f,h)=>{h?s.current.add(f):s.current.delete(f)},[]),c=m.useCallback(()=>{if(s.current.size===0)return!0;const f=window.confirm("Du hast ungespeicherte Änderungen. Seite trotzdem verlassen? Die Änderungen gehen dann verloren.");return f&&s.current.clear(),f},[]);m.useEffect(()=>{const f=g=>{s.current.size!==0&&(g.preventDefault(),g.returnValue="")},h=g=>{var b,p;if(s.current.size===0||g.defaultPrevented||g.button!==0)return;const v=(p=(b=g.target).closest)==null?void 0:p.call(b,"a[href]");if(!v||v.target==="_blank"||g.metaKey||g.ctrlKey||g.shiftKey)return;const w=new URL(v.href,window.location.href);w.origin!==window.location.origin||w.pathname===window.location.pathname||c()||(g.preventDefault(),g.stopPropagation())};return window.addEventListener("beforeunload",f),document.addEventListener("click",h,!0),()=>{window.removeEventListener("beforeunload",f),document.removeEventListener("click",h,!0)}},[c]);const d=m.useMemo(()=>({toast:l,setDirty:u,confirmLeave:c,refreshCounters:t||(()=>{})}),[l,u,c,t]);return a.jsxs(Na.Provider,{value:d,children:[e,a.jsx("div",{className:"pointer-events-none fixed bottom-4 right-4 z-[300] flex w-[min(92vw,380px)] flex-col gap-2","aria-live":"polite",children:n.map(f=>a.jsxs("div",{role:f.type==="error"?"alert":"status",className:`pointer-events-auto flex items-start justify-between gap-3 rounded-lg border px-4 py-3 text-sm shadow-lg ${f.type==="error"?"border-red-200 bg-red-50 text-red-800 dark:border-red-900 dark:bg-red-950 dark:text-red-200":f.type==="success"?"border-green-200 bg-green-50 text-green-800 dark:border-green-900 dark:bg-green-950 dark:text-green-200":"border-neutral-200 bg-white text-neutral-800 dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-100"}`,children:[a.jsxs("span",{children:[f.type==="success"?"✓ ":"",f.message]}),a.jsxs("span",{className:"flex shrink-0 items-center gap-3",children:[f.action&&a.jsx("button",{type:"button",onClick:()=>{f.action.onClick(),i(f.id)},className:"font-semibold underline",children:f.action.label}),a.jsx("button",{type:"button",onClick:()=>i(f.id),"aria-label":"Meldung schließen",className:"opacity-60 hover:opacity-100",children:"✕"})]})]},f.id))})]})}function D4(){return m.useContext(Na)}function R4(){return m.useContext(Na).toast}function V4(e,t="page"){const{setDirty:n}=m.useContext(Na);m.useEffect(()=>{n(t,!!e)},[e,t,n]),m.useEffect(()=>()=>n(t,!1),[t,n])}const WT=5*60*1e3,GT=30*60*1e3;function KT(){const{user:e,login:t,verifyTwoFactor:n}=cr(),[r,s]=m.useState(!1),[i,o]=m.useState("credentials"),[l,u]=m.useState((e==null?void 0:e.username)||""),[c,d]=m.useState(""),[f,h]=m.useState(""),[g,v]=m.useState(""),[w,b]=m.useState(!1),p=m.useRef(Date.now()),x=m.useRef(null);if(qy(x,r,()=>{}),m.useEffect(()=>vC(()=>s(!0)),[]),m.useEffect(()=>{const S=()=>{p.current=Date.now()},j=["keydown","pointerdown","scroll"];j.forEach(C=>window.addEventListener(C,S,{passive:!0}));const _=setInterval(()=>{document.hidden||Date.now()-p.current>GT||ie.get("/auth/me").then(C=>{(C==null?void 0:C.authenticated)===!1&&s(!0)}).catch(()=>{})},WT);return()=>{j.forEach(C=>window.removeEventListener(C,S)),clearInterval(_)}},[]),!r)return null;const y=()=>{s(!1),o("credentials"),d(""),h(""),v("")},k=async S=>{S.preventDefault(),b(!0),v("");try{(await t(l,c)).requires2fa?o("code"):y()}catch(j){v(j.message)}finally{b(!1)}},E=async S=>{S.preventDefault(),b(!0),v("");try{await n(f),y()}catch(j){v(j.message)}finally{b(!1)}},T="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";return a.jsx("div",{className:"fixed inset-0 z-[400] flex items-center justify-center bg-black/50 p-4",children:a.jsxs("div",{ref:x,role:"dialog","aria-modal":"true","aria-labelledby":"session-expired-title",className:"w-full max-w-sm rounded-xl bg-white p-6 shadow-xl dark:bg-neutral-900",children:[a.jsx("h2",{id:"session-expired-title",className:"mb-1 text-lg font-bold text-neutral-900 dark:text-white",children:"Bitte erneut anmelden"}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Deine Sitzung ist abgelaufen. Deine Eingaben auf dieser Seite bleiben erhalten – nach dem Anmelden einfach noch einmal speichern."}),i==="credentials"?a.jsxs("form",{onSubmit:k,className:"space-y-3",children:[a.jsx("input",{value:l,onChange:S=>u(S.target.value),required:!0,placeholder:"Benutzername",autoComplete:"username",className:T}),a.jsx("input",{type:"password",value:c,onChange:S=>d(S.target.value),required:!0,placeholder:"Passwort",autoComplete:"current-password",className:T}),g&&a.jsx("p",{className:"text-sm text-red-600",children:g}),a.jsx("button",{type:"submit",disabled:w,className:"w-full rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:w?"Melde an…":"Anmelden"})]}):a.jsxs("form",{onSubmit:E,className:"space-y-3",children:[a.jsx("input",{value:f,onChange:S=>h(S.target.value),required:!0,inputMode:"numeric",autoComplete:"one-time-code",placeholder:"6-stelliger Code aus der App",className:T}),g&&a.jsx("p",{className:"text-sm text-red-600",children:g}),a.jsx("button",{type:"submit",disabled:w,className:"w-full rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:w?"Prüfe…":"Bestätigen"})]})]})})}const ep="/assets/logo-BNfZDkmN.png",tp={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",download:"M12 4v11m0 0-4-4m4 4 4-4M5 19h14",gauge:"M4 13a8 8 0 1 1 16 0M12 13l3.5-3.5M6 17h12",inbox:"M3 13h5l1.5 2.5h5L16 13h5M5 5h14l2 8v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-5l2-8Z",building:"M4 21V5a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v16M15 9h4a1 1 0 0 1 1 1v11M3 21h18M8 8h3M8 12h3M8 16h3",palette:"M12 3a9 9 0 1 0 0 18c1 0 1.5-.7 1.5-1.5 0-.4-.2-.8-.4-1.1-.3-.3-.4-.7-.4-1.1 0-.8.7-1.5 1.5-1.5H16a5 5 0 0 0 5-5c0-4.4-4-7.8-9-7.8ZM7.5 12h.01M10 7.5h.01M15 7.5h.01",file:"M7 3h7l5 5v12a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm7 0v5h5M9 13h6M9 17h6",wrench:"M14.5 6.5a4 4 0 0 0-5.3 5.3L4 17l3 3 5.2-5.2a4 4 0 0 0 5.3-5.3l-2.5 2.5-2.5-.5-.5-2.5 2.5-2.5Z",server:"M4 4h16v6H4V4Zm0 10h16v6H4v-6Zm3-7h.01M7 17h.01",globe:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm-9-9h18M12 3c2.5 2.5 3.5 5.5 3.5 9s-1 6.5-3.5 9c-2.5-2.5-3.5-5.5-3.5-9s1-6.5 3.5-9Z",send:"M4 12 20 4l-4 16-4-7-8-1Zm8 1 8-9",refresh:"M20 11a8 8 0 0 0-14.9-3M4 4v4h4m-4 5a8 8 0 0 0 14.9 3M20 20v-4h-4",trash:"M5 7h14M10 11v6m4-6v6M6 7l1 13h10l1-13M9 7V4h6v3",external:"M14 4h6v6m0-6-9 9M19 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h5",pause:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm-2-12v6m4-6v6",timer:"M10 2h4M12 14l3-3M12 22a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z"},np=({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 qT(){const{logout:e,user:t,hasPermission:n}=cr(),r=es(),[s,i]=m.useState(!1),[o,l]=m.useState(0),[u,c]=m.useState([]),[d,f]=m.useState([]),[h,g]=m.useState(!1),[v,w]=m.useState(null),b=m.useCallback(()=>{n("contact.manage")&&ie.get("/contact").then(S=>l(S.filter(j=>j.status==="new").length)).catch(()=>{}),ie.get("/site-settings").then(S=>f(S.hidden_areas||[])).catch(()=>{}),ie.get("/maintenance").then(S=>{var j,_;g(!!((j=S==null?void 0:S.global)!=null&&j.enabled)),w((_=S==null?void 0:S.countdown)!=null&&_.active?S.countdown.launch_at:null)}).catch(()=>{})},[t==null?void 0:t.id]);m.useEffect(()=>{b();const S=setInterval(b,2*60*1e3);return()=>clearInterval(S)},[b]);const p=VT.filter(S=>d.includes(S.key)).map(S=>S.label),x=()=>ie.get("/custom-fonts").then(c).catch(()=>{});m.useEffect(()=>{x()},[]);const y=[{title:null,links:[{to:"/admin",label:"Übersicht",icon:"gauge",end:!0},{to:"/admin/contact-requests",label:"Anfragen",icon:"inbox",permission:"contact.manage",badge:o}]},{title:"Fahrzeuge & Pakete",links:[{to:"/admin/brands",label:"Fahrzeugmarken",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-Inhalte",links:[{to:"/admin/home-sections",label:"Startseite",icon:"home",permission:"content.manage"},{to:"/admin/services",label:"Leistungen",icon:"briefcase",permission:"services.manage"},{to:"/admin/faqs",label:"FAQ",icon:"help",permission:"content.manage"},{to:"/admin/partners",label:"Partner-Logos",icon:"shield",permission:"content.manage"},{to:"/admin/downloads",label:"Downloads",icon:"download",permission:"downloads.manage"}]},{title:"Bildergalerie",links:[{to:"/admin/gallery-brands",label:"Galerie-Marken",icon:"image",permission:"gallery.manage"},{to:"/admin/gallery-projects",label:"Projekte & Fotos",icon:"image",permission:"gallery.manage"}]},{title:"Firma & Aussehen",links:[{to:"/admin/settings/company",label:"Firmendaten",icon:"building",permission:"settings.manage"},{to:"/admin/settings/design",label:"Aussehen",icon:"palette",permission:"settings.manage"},{to:"/admin/settings/legal",label:"Rechtstexte",icon:"file",permission:"settings.manage"},{to:"/admin/settings/maintenance",label:"Wartungsmodus",icon:"pause",permission:"settings.manage"},{to:"/admin/settings/countdown",label:"Launch-Countdown",icon:"timer",permission:"settings.manage"}]},{title:"System (Experten)",links:[{to:"/admin/users",label:"Benutzer",icon:"users",permission:"users.manage"},{to:"/admin/permission-groups",label:"Berechtigungsgruppen",icon:"lock",permission:"permission_groups.manage"},{to:"/admin/settings/email",label:"E-Mail-Versand",icon:"send",permission:"system.admin"},{to:"/admin/settings/google",label:"Google-Dienste",icon:"globe",permission:"system.admin"},{to:"/admin/settings/database",label:"Datenbank",icon:"server",permission:"system.admin"},{to:"/admin/settings/export-import",label:"Export & Import",icon:"download",permission:"system.admin"},{to:"/admin/settings/update",label:"Updates",icon:"refresh",permission:"system.update"},{to:"/admin/settings/reset",label:"Zurücksetzen",icon:"trash",permission:"system.admin"}]},{title:null,links:[{to:"/admin/account",label:"Mein Konto",icon:"lock"}]}].map(S=>({...S,links:S.links.filter(j=>!j.permission||n(j.permission))})).filter(S=>S.links.length>0),k=async()=>{await e(),r("/admin/login")},E=({isActive:S})=>`flex items-center justify-between gap-2 rounded-md px-3 py-2 text-sm font-medium transition ${S?"bg-brand-500 text-white":"text-neutral-600 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-neutral-800"}`,T=({onNavigate:S})=>a.jsx("nav",{className:"space-y-5",children:y.map((j,_)=>a.jsxs("div",{children:[j.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:j.title}),a.jsx("div",{className:"space-y-1",children:j.links.map(C=>a.jsxs(Vb,{to:C.to,end:C.end,className:E,onClick:S,children:[a.jsxs("span",{className:"flex items-center gap-2.5",children:[a.jsx(np,{path:tp[C.icon]}),C.label]}),!!C.badge&&a.jsx("span",{className:"rounded-full bg-red-500 px-2 py-0.5 text-xs font-bold text-white",children:C.badge})]},C.to))})]},_))});return a.jsxs(UT,{onRefreshCounters:b,children:[a.jsx(KT,{}),a.jsx(Xy,{value:{fonts:u,refresh:x},children:a.jsxs("div",{className:"flex min-h-screen bg-neutral-50 text-neutral-900 dark:bg-neutral-950 dark:text-neutral-100",children:[a.jsx(Qy,{}),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(U,{to:"/",className:"rounded-lg px-2 py-1",children:[a.jsx("img",{src:ep,alt:"HifiPlanet",className:"h-7 w-auto dark:hidden"}),a.jsx("img",{src:ea,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(T,{})]}),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(S=>!S),"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(U,{to:"/",className:"rounded-lg px-1.5 py-0.5",children:[a.jsx("img",{src:ep,alt:"HifiPlanet",className:"h-6 w-auto dark:hidden"}),a.jsx("img",{src:ea,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.jsxs("a",{href:"/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 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:[a.jsx(np,{path:tp.external}),a.jsx("span",{className:"hidden sm:inline",children:"Website öffnen"})]}),a.jsx(Hy,{}),a.jsx("button",{onClick:k,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(T,{onNavigate:()=>i(!1)})})]}),(h||v||p.length>0)&&a.jsxs("div",{className:"border-b border-amber-200 bg-amber-50 px-4 py-2 text-sm text-amber-900 dark:border-amber-900 dark:bg-amber-950 dark:text-amber-200 sm:px-6",children:[h&&a.jsxs("p",{children:[a.jsx("strong",{children:"Wartungsmodus ist aktiv"})," – Besucher sehen gerade nur die Wartungsseite."," ",n("settings.manage")&&a.jsx(U,{to:"/admin/settings/maintenance",className:"underline",children:"Ändern"})]}),v&&a.jsxs("p",{children:[a.jsx("strong",{children:"Launch-Countdown läuft"})," – Besucher sehen bis"," ",new Date(v).toLocaleString("de-DE",{dateStyle:"medium",timeStyle:"short",timeZone:"Europe/Berlin"})," Uhr nur den Countdown."," ",n("settings.manage")&&a.jsx(U,{to:"/admin/settings/countdown",className:"underline",children:"Ändern"})]}),p.length>0&&a.jsxs("p",{children:[a.jsx("strong",{children:"Ausgeblendet für Besucher:"})," ",p.join(", "),"."," ",a.jsx(U,{to:"/admin",className:"underline",children:"Auf der Übersicht ändern"})]})]}),a.jsx("main",{className:"p-4 sm:p-6",children:a.jsx(m.Suspense,{fallback:a.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}),children:a.jsx(ld,{})})})]})]})})]})}function YT(){const{user:e,loading:t}=cr();return t?a.jsx("div",{className:"flex min-h-screen items-center justify-center text-neutral-500",children:"Lädt…"}):e?a.jsx(ld,{}):a.jsx(sr,{to:"/admin/login",replace:!0})}function ce({permission:e,children:t}){const{hasPermission:n}=cr();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 mo(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 XT(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}`),mo("og:url",`https://hifi-planet.de${e}`,"property")}function rp(e){let t=document.head.querySelector('meta[name="robots"]');if(!e){t==null||t.remove();return}t||(t=document.createElement("meta"),t.setAttribute("name","robots"),document.head.appendChild(t)),t.setAttribute("content","noindex")}function dr({title:e,description:t,path:n,noindex:r=!1}){m.useEffect(()=>(rp(r),()=>rp(!1)),[r]),m.useEffect(()=>{e&&(document.title=`${e} | HifiPlanet`,mo("og:title",`${e} | HifiPlanet`,"property")),t&&(mo("description",t),mo("og:description",t,"property")),n&&XT(n)},[e,t,n])}const ZT=[.16,1,.3,1],sp={up:{y:40},left:{x:-56},right:{x:56}};function QT(e){return{hidden:{opacity:0,scale:.96,filter:"blur(8px)",...sp[e]||sp.up},visible:{opacity:1,scale:1,x:0,y:0,filter:"blur(0px)"}}}const JT={hidden:{x:"-130%"},visible:{x:"230%",transition:{duration:1.1,ease:"easeInOut",delay:.4}}};function He({children:e,direction:t="up",className:n="",index:r=0,shine:s=!1,style:i}){const o=Math.min(r*.09,.45);return a.jsxs(Qt.div,{className:n,style:{position:"relative",overflow:"hidden",...i},initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.25,margin:"-100px"},variants:QT(t),transition:{duration:.75,ease:ZT,delay:o},children:[e,s&&a.jsx(Qt.div,{"aria-hidden":!0,variants:JT,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"})]})}const qd=e=>{e.preventDefault(),e.stopPropagation()};function eN(e){e.preventDefault();const t=e.clipboardData.getData("text/plain");document.execCommand("insertText",!1,t)}function le({entity:e,id:t,field:n,lang:r,value:s,as:i="span",multiline:o=!1,placeholder:l="Text eingeben…",className:u="",...c}){const{language:d}=pe(),f=at(),h=r||d,g=f.getValue(e,t,n,h,s??"")??"";if(!f.canEdit(e))return a.jsx(i,{className:u,...c,children:g});const v=w=>{const b=o?w.innerText.replace(/\n{3,}/g,`
+`);return a.jsx("style",{children:t})}const ST=150,jT=300,ET=80,CT=5e3;function PT(){return a.jsx("div",{className:"fixed inset-0 z-[200] flex items-center justify-center bg-white dark:bg-neutral-950",children:a.jsx("div",{className:"h-10 w-10 animate-spin rounded-full border-4 border-neutral-200 border-t-brand-500 dark:border-neutral-800 dark:border-t-brand-500"})})}function TT({enabled:e,children:t}){const n=et(),[r,s]=m.useState(!e),[i,o]=m.useState(!1),l=m.useRef(null);return m.useLayoutEffect(()=>{const u=l.current;if(!e||!u){s(!0),o(!1);return}s(!1),o(!1);let c=!1,d=0,f=null;const h=new Set,g=setTimeout(()=>{d=Date.now(),o(!0)},ST),v=()=>{s(!0),o(!1)},w=()=>{c=!0,clearTimeout(g),clearTimeout(f),clearTimeout(T),k.disconnect(),E()},b=()=>{if(c)return;w();const S=d?jT-(Date.now()-d):0;S>0?setTimeout(v,S):v()},p=()=>{clearTimeout(f),f=setTimeout(()=>{h.size===0&&xC()===0&&b()},ET)},x=S=>{if(h.has(S)||S.complete||S.getBoundingClientRect().top>=window.innerHeight)return;S.loading==="lazy"&&(S.loading="eager"),h.add(S);const j=()=>{h.delete(S),S.removeEventListener("load",j),S.removeEventListener("error",j),p()};S.addEventListener("load",j),S.addEventListener("error",j)},y=S=>{var j;S.nodeType===1&&(S.tagName==="IMG"&&x(S),(j=S.querySelectorAll)==null||j.call(S,"img").forEach(x))},k=new MutationObserver(S=>{S.forEach(j=>j.addedNodes.forEach(y)),p()});k.observe(u,{childList:!0,subtree:!0});const E=yC(p),T=setTimeout(b,CT);return u.querySelectorAll("img").forEach(x),p(),()=>{c||w()}},[n.pathname,e]),a.jsxs("div",{className:"relative",children:[a.jsx("div",{ref:l,style:e?{visibility:r?"visible":"hidden"}:void 0,children:t}),e&&i&&a.jsx(PT,{})]})}const NT=m.lazy(()=>X(()=>import("./RichTextEditor-CO4xzKJO.js"),[])),Kd={de:"Deutsch",en:"Englisch"},_T=["nav.","footer.","cookieConsent.","languageToggle.","themeToggle.","maintenance."],Ui=e=>_T.some(t=>e.startsWith(t));function Tl(e,t){return t.split(".").reduce((n,r)=>n==null?void 0:n[r],e)}function MT({editor:e}){const t=at(),{entity:n,id:r,field:s,lang:i,kind:o,label:l,hint:u,original:c}=e,[d]=m.useState(()=>({value:c,wasPending:t.hasPending(n,r,s,i)})),[f,h]=m.useState(c),g=w=>{h(w),t.setValue(n,r,s,i,w)},v=()=>{d.wasPending?t.setValue(n,r,s,i,d.value):t.resetValue(n,r,s,i),t.closeEditor()};return a.jsxs("div",{className:"pointer-events-auto w-full rounded-xl border border-neutral-200 bg-white p-4 text-neutral-900 shadow-2xl dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-100 sm:w-[min(92vw,520px)]",children:[a.jsxs("div",{className:"mb-2 flex items-center justify-between gap-3",children:[a.jsxs("p",{className:"text-sm font-semibold",children:[l," ",a.jsxs("span",{className:"font-normal text-neutral-500",children:["(",Kd[i],")"]})]}),a.jsx("button",{type:"button",onClick:v,"aria-label":"Abbrechen",className:"rounded p-1 text-neutral-500 hover:bg-neutral-100 dark:hover:bg-neutral-800",children:a.jsx(yi,{className:"h-4 w-4"})})]}),u&&a.jsx("p",{className:"mb-2 text-xs text-neutral-500 dark:text-neutral-400",children:u}),o==="html"?a.jsx("div",{className:"max-h-[45vh] overflow-y-auto rounded-md border border-neutral-300 dark:border-neutral-700",children:a.jsx(m.Suspense,{fallback:a.jsx("p",{className:"p-3 text-sm text-neutral-500",children:"Editor lädt…"}),children:a.jsx(NT,{value:f,onChange:g})})}):o==="input"?a.jsx("input",{autoFocus:!0,value:f,onChange:w=>g(w.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-800"}):a.jsx("textarea",{autoFocus:!0,rows:7,value:f,onChange:w=>g(w.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-800"}),a.jsxs("div",{className:"mt-3 flex justify-end gap-2",children:[a.jsx("button",{type:"button",onClick:v,className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm font-medium hover:bg-neutral-50 dark:border-neutral-700 dark:hover:bg-neutral-800",children:"Abbrechen"}),a.jsx("button",{type:"button",onClick:t.closeEditor,className:"rounded-md bg-brand-500 px-3 py-1.5 text-sm font-semibold text-white hover:bg-brand-600",children:"Übernehmen"})]})]})}function LT({onClose:e}){const t=at(),{language:n,t:r}=pe(),s=et(),[i,o]=m.useState(""),[l,u]=m.useState(0);m.useEffect(()=>{const h=setTimeout(()=>u(g=>g+1),400);return()=>clearTimeout(h)},[s.pathname]);const c=m.useMemo(()=>t.usedTextKeys(s.pathname).filter(h=>typeof Tl(vn.de,h)=="string").sort((h,g)=>Ui(h)-Ui(g)||h.localeCompare(g)),[s.pathname,l,t.usedTextKeys]),d=i.trim().toLowerCase(),f=c.filter(h=>!d||h.toLowerCase().includes(d)||r(h).toLowerCase().includes(d));return a.jsxs("div",{className:"pointer-events-auto flex max-h-[60vh] w-full flex-col rounded-xl border border-neutral-200 bg-white text-neutral-900 shadow-2xl dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-100 sm:w-[min(92vw,520px)]",children:[a.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-neutral-200 p-4 pb-3 dark:border-neutral-800",children:[a.jsxs("div",{children:[a.jsxs("p",{className:"text-sm font-semibold",children:["Feste Texte auf dieser Seite ",a.jsxs("span",{className:"font-normal text-neutral-500",children:["(",Kd[n],")"]})]}),a.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:"Buttons, Beschriftungen, Menü und Fußzeile. Leer lassen = Standardtext."})]}),a.jsx("button",{type:"button",onClick:e,"aria-label":"Schließen",className:"rounded p-1 text-neutral-500 hover:bg-neutral-100 dark:hover:bg-neutral-800",children:a.jsx(yi,{className:"h-4 w-4"})})]}),a.jsx("div",{className:"px-4 pt-3",children:a.jsx("input",{type:"search",value:i,onChange:h=>o(h.target.value),placeholder:"Suchen…",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-1.5 text-sm dark:border-neutral-700 dark:bg-neutral-800"})}),a.jsxs("ul",{className:"flex-1 space-y-3 overflow-y-auto p-4",children:[f.length===0&&a.jsx("li",{className:"text-sm text-neutral-500",children:"Keine Texte gefunden."}),f.map((h,g)=>{const v=Tl(vn[n],h)??Tl(vn.de,h),w=t.textOverride(n,h)!==void 0,b=r(h);return a.jsxs("li",{children:[Ui(h)&&(g===0||!Ui(f[g-1]))&&a.jsx("p",{className:"mb-3 border-t border-neutral-200 pt-3 text-xs font-semibold uppercase tracking-wide text-neutral-500 dark:border-neutral-800",children:"Auf allen Seiten (Menü, Fußzeile, Cookie-Hinweis)"}),a.jsxs("div",{className:"mb-1 flex items-center justify-between gap-2",children:[a.jsx("label",{htmlFor:`live-text-${h}`,className:"truncate font-mono text-[11px] text-neutral-500",title:h,children:h}),w&&a.jsxs("button",{type:"button",onClick:()=>t.setValue("text",h,"value",n,""),className:"flex shrink-0 items-center gap-1 text-[11px] text-neutral-500 hover:text-brand-600",title:`Standard: ${v}`,children:[a.jsx(vP,{className:"h-3 w-3"})," Standard"]})]}),a.jsx("textarea",{id:`live-text-${h}`,rows:b.length>60?3:1,value:b,onChange:p=>t.setValue("text",h,"value",n,p.target.value===v?"":p.target.value),className:`w-full resize-y rounded-md border bg-white px-2.5 py-1.5 text-sm dark:bg-neutral-800 ${w?"border-amber-400 dark:border-amber-500":"border-neutral-300 dark:border-neutral-700"}`})]},h)})]})]})}function AT(){const e=at(),{language:t}=pe(),[n,r]=m.useState(!1);if(!e.enabled)return null;const s=()=>{e.pendingCount&&!window.confirm("Es gibt ungespeicherte Änderungen. Bearbeiten trotzdem beenden? Die Änderungen gehen dann verloren.")||(e.discard(),e.setEnabled(!1))},i=e.editor&&`${e.editor.entity}|${e.editor.id}|${e.editor.field}|${e.editor.lang}`;return a.jsxs("div",{className:"pointer-events-none fixed inset-x-0 bottom-0 z-[150] flex flex-col items-end gap-2 p-2 sm:p-4",children:[e.editor?a.jsx(MT,{editor:e.editor},i):n&&a.jsx(LT,{onClose:()=>r(!1)}),a.jsxs("div",{className:"pointer-events-auto flex w-full flex-wrap items-center justify-between gap-2 rounded-xl border border-neutral-700 bg-neutral-950/95 px-3 py-2.5 text-sm text-neutral-100 shadow-2xl backdrop-blur sm:px-4",children:[a.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[a.jsx(Fy,{className:"h-4 w-4 shrink-0 text-brand-400"}),a.jsxs("p",{className:"min-w-0 truncate",children:[a.jsx("span",{className:"font-semibold",children:"Bearbeiten"}),a.jsxs("span",{className:"hidden text-neutral-400 sm:inline",children:[" · ",Kd[t]," · gestrichelte Stellen anklicken"]})]})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.error&&a.jsx("span",{className:"max-w-xs text-xs text-red-400",children:e.error}),a.jsxs("button",{type:"button",onClick:()=>{e.closeEditor(),r(o=>!o)},className:`flex items-center gap-1.5 rounded-md border px-3 py-1.5 font-medium ${n?"border-brand-400 text-brand-300":"border-neutral-700 hover:bg-neutral-800"}`,children:[a.jsx(iP,{className:"h-4 w-4"}),a.jsx("span",{className:"hidden sm:inline",children:"Feste Texte"})]}),e.pendingCount>0&&a.jsx("button",{type:"button",onClick:e.discard,className:"rounded-md border border-neutral-700 px-3 py-1.5 font-medium hover:bg-neutral-800",children:"Verwerfen"}),a.jsxs("button",{type:"button",onClick:e.save,disabled:!e.pendingCount||e.saving,className:"flex items-center gap-1.5 rounded-md bg-brand-500 px-3 py-1.5 font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:[a.jsx(Ay,{className:"h-4 w-4"}),e.saving?"Speichere…":e.pendingCount?`Speichern (${e.pendingCount})`:"Gespeichert"]}),a.jsx("button",{type:"button",onClick:s,"aria-label":"Bearbeiten beenden",title:"Bearbeiten beenden",className:"rounded-md p-1.5 text-neutral-400 hover:bg-neutral-800 hover:text-white",children:a.jsx(yi,{className:"h-4 w-4"})})]})]})]})}const Jy=[{title:"Seiten",hint:"Ausgeblendete Seiten verschwinden aus dem Menü und leiten Besucher auf die Startseite um.",areas:[{key:"page.vehicles",label:"Fahrzeuge & Pakete",path:"/fahrzeuge"},{key:"page.services",label:"Leistungen",path:"/leistungen"},{key:"page.gallery",label:"Galerie",path:"/galerie"},{key:"page.downloads",label:"Downloads",path:"/downloads",note:"Erscheint ohnehin nur, wenn Downloads hinterlegt sind."}]},{title:"Startseite",hint:"Einzelne Abschnitte der Startseite. Das große Titelbild oben bleibt immer sichtbar.",areas:[{key:"home.stats",label:"Zahlen-Leiste"},{key:"home.partners",label:"Marken / Partner-Logos"},{key:"home.youtube",label:"Video-Abschnitt"},{key:"home.craft",label:"Handwerk & Beratung"},{key:"home.insights",label:"Einblicke (Bilder)"},{key:"home.reviews",label:"Kundenbewertungen"},{key:"home.more",label:'„Mehr als Car-Hifi"'},{key:"home.faq",label:"Häufige Fragen (FAQ)"}]}],DT=Jy[0].areas;function RT(e){if(!e)return null;const t=DT.find(n=>e===n.path||e.startsWith(`${n.path}/`));return t?t.key:null}function ev(e,t=[]){const n=RT(e);return!!n&&t.includes(n)}const VT=Jy.flatMap(e=>e.areas),IT={global:{enabled:!1,message:null},services:{enabled:!1,message:null},vehicles:{enabled:!1,message:null}},FT={mon:{open:"09:00",close:"18:00",closed:!1},tue:{open:"09:00",close:"18:00",closed:!1},wed:{open:"09:00",close:"18:00",closed:!1},thu:{open:"09:00",close:"18:00",closed:!1},fri:{open:"09:00",close:"18:00",closed:!1},sat:{open:"10:00",close:"13:00",closed:!1},sun:{open:"",close:"",closed:!0}},Nl={phone:"09373 20 62 390",whatsapp:null,contact_email:"info@hifi-planet-amorbach.de",address_street:"Boxbrunner Str. 20a",address_zip:"63916",address_city:"Amorbach",logo_path:null,logo_dark_path:null,business_hours:FT,hero_image_path:null,ga_measurement_id:null,package_card_theme:"graphite",package_card_layout:"strip",package_wheel_hint_interval:8,package_card_width:210,package_card_height:480,vehicle_tile_width:240,vehicle_tile_height:180,gallery_card_text_x:0,gallery_card_text_y:100,site_font:null,page_loader_enabled:1,has_downloads:!1,hidden_areas:[],price_note:null,price_note_en:null},OT=["/impressum","/datenschutz","/agb"],Xm="hifi-site-settings",Zm="hifi-maintenance";function Qm(e){try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch{return null}}function Jm(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}const zT={mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday",sun:"Sunday"};function BT(e){var n,r,s;const t=document.getElementById("ld-business");if(t)try{const i=JSON.parse(t.textContent),o=(e.phone||"").replace(/[^\d+]/g,"");o&&(i.telephone=o.startsWith("+")?o:`+49${o.replace(/^0/,"")}`),e.contact_email&&(i.email=e.contact_email),i.address={"@type":"PostalAddress",streetAddress:e.address_street||((n=i.address)==null?void 0:n.streetAddress),postalCode:e.address_zip||((r=i.address)==null?void 0:r.postalCode),addressLocality:e.address_city||((s=i.address)==null?void 0:s.addressLocality),addressCountry:"DE"};const l=e.business_hours;l&&typeof l=="object"&&(i.openingHoursSpecification=Object.entries(zT).filter(([u])=>l[u]&&!l[u].closed&&l[u].open&&l[u].close).map(([u,c])=>({"@type":"OpeningHoursSpecification",dayOfWeek:c,opens:l[u].open,closes:l[u].close}))),t.textContent=JSON.stringify(i)}catch{}}function $T(){var _;const[e]=m.useState(()=>Qm(Xm)),[t,n]=m.useState(()=>Qm(Zm)),[r,s]=m.useState(()=>e?{...Nl,...e}:Nl),[i,o]=m.useState(!!e),[l,u]=m.useState({}),[c,d]=m.useState([]),{loading:f,hasPermission:h,user:g}=cr(),v=et(),w=es(),[b,p]=m.useState(!1),[x]=m.useState(()=>new Date(Date.now()+(7*24+3)*3600*1e3+42*60*1e3).toISOString());m.useEffect(()=>{ie.get("/maintenance").then(C=>{const B={...C,_received_at:Date.now()};n(B),Jm(Zm,B)}).catch(()=>n(C=>C||IT)),ie.get("/site-settings").then(C=>{s({...Nl,...C}),Jm(Xm,C)}).catch(()=>{}).finally(()=>o(!0)),ie.get("/text-styles").then(u).catch(()=>{}),ie.get("/custom-fonts").then(d).catch(()=>{})},[]),m.useEffect(()=>{r.site_font?document.documentElement.style.setProperty("--site-font",r.site_font):document.documentElement.style.removeProperty("--site-font")},[r.site_font]),m.useEffect(()=>{i&&BT(r)},[r,i]);const y=t==null?void 0:t.countdown,k=dT(y,t==null?void 0:t._received_at),E=!!(y!=null&&y.active)&&!b&&ta(y,k)>0;if(t===null||!i||((_=t.global)!=null&&_.enabled||E)&&f)return a.jsx("div",{className:"min-h-screen bg-white dark:bg-neutral-950"});const T=h("maintenance.bypass"),S=OT.includes(v.pathname),j=!!g&&new URLSearchParams(v.search).get("countdown")==="vorschau";if(!S&&(E&&!g||j)){const C=j&&!(y!=null&&y.launch_at&&ta(y,k)>0)?{...y,launch_at:x}:y;return a.jsx(jl,{serverOverrides:r.text_overrides,children:a.jsx(El,{children:a.jsx(pT,{countdown:C,clockOffset:C===y?k:0,settings:r,preview:j,onClosePreview:()=>w("/",{replace:!0}),onLaunch:()=>p(!0)})})})}return t.global.enabled&&!T&&!S?a.jsx(jl,{serverOverrides:r.text_overrides,children:a.jsx(El,{children:a.jsx(vi,{message:t.global.message,fullScreen:!0})})}):a.jsx(jl,{serverOverrides:r.text_overrides,children:a.jsx(El,{children:a.jsx(yT,{value:{...t,bypass:T},children:a.jsx(GP,{value:r,children:a.jsx(vT,{value:l,children:a.jsx(Xy,{value:{fonts:c,refresh:()=>{}},children:a.jsxs("div",{className:"page-texture flex min-h-screen flex-col text-neutral-900 dark:text-neutral-100",children:[a.jsx(Qy,{}),T&&t.global.enabled&&a.jsx(wi,{}),!!g&&E&&a.jsx(gT,{countdown:y}),a.jsx(oT,{}),a.jsx(QP,{}),a.jsx("main",{className:"flex-1",children:a.jsx(TT,{enabled:v.pathname!=="/"&&!!r.page_loader_enabled,children:ev(v.pathname,r.hidden_areas)?a.jsx(sr,{to:"/",replace:!0}):a.jsx(m.Suspense,{fallback:a.jsx("div",{className:"min-h-[60vh]"}),children:a.jsx(ld,{})})})}),a.jsx(iT,{}),a.jsx(uT,{}),a.jsx(xT,{}),a.jsx(AT,{})]})})})})})})})}const Na=m.createContext({toast:{success:()=>{},error:()=>{},info:()=>{}},setDirty:()=>{},confirmLeave:()=>!0,refreshCounters:()=>{}});let HT=0;function UT({children:e,onRefreshCounters:t}){const[n,r]=m.useState([]),s=m.useRef(new Set),i=m.useCallback(f=>r(h=>h.filter(g=>g.id!==f)),[]),o=m.useCallback((f,h,g={})=>{const v=++HT;return r(w=>[...w.slice(-3),{id:v,type:f,message:h,action:g.action}]),setTimeout(()=>i(v),g.duration||(f==="error"?7e3:3500)),v},[i]),l=m.useMemo(()=>({success:(f,h)=>o("success",f,h),error:(f,h)=>o("error",f,h),info:(f,h)=>o("info",f,h)}),[o]),u=m.useCallback((f,h)=>{h?s.current.add(f):s.current.delete(f)},[]),c=m.useCallback(()=>{if(s.current.size===0)return!0;const f=window.confirm("Du hast ungespeicherte Änderungen. Seite trotzdem verlassen? Die Änderungen gehen dann verloren.");return f&&s.current.clear(),f},[]);m.useEffect(()=>{const f=g=>{s.current.size!==0&&(g.preventDefault(),g.returnValue="")},h=g=>{var b,p;if(s.current.size===0||g.defaultPrevented||g.button!==0)return;const v=(p=(b=g.target).closest)==null?void 0:p.call(b,"a[href]");if(!v||v.target==="_blank"||g.metaKey||g.ctrlKey||g.shiftKey)return;const w=new URL(v.href,window.location.href);w.origin!==window.location.origin||w.pathname===window.location.pathname||c()||(g.preventDefault(),g.stopPropagation())};return window.addEventListener("beforeunload",f),document.addEventListener("click",h,!0),()=>{window.removeEventListener("beforeunload",f),document.removeEventListener("click",h,!0)}},[c]);const d=m.useMemo(()=>({toast:l,setDirty:u,confirmLeave:c,refreshCounters:t||(()=>{})}),[l,u,c,t]);return a.jsxs(Na.Provider,{value:d,children:[e,a.jsx("div",{className:"pointer-events-none fixed bottom-4 right-4 z-[300] flex w-[min(92vw,380px)] flex-col gap-2","aria-live":"polite",children:n.map(f=>a.jsxs("div",{role:f.type==="error"?"alert":"status",className:`pointer-events-auto flex items-start justify-between gap-3 rounded-lg border px-4 py-3 text-sm shadow-lg ${f.type==="error"?"border-red-200 bg-red-50 text-red-800 dark:border-red-900 dark:bg-red-950 dark:text-red-200":f.type==="success"?"border-green-200 bg-green-50 text-green-800 dark:border-green-900 dark:bg-green-950 dark:text-green-200":"border-neutral-200 bg-white text-neutral-800 dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-100"}`,children:[a.jsxs("span",{children:[f.type==="success"?"✓ ":"",f.message]}),a.jsxs("span",{className:"flex shrink-0 items-center gap-3",children:[f.action&&a.jsx("button",{type:"button",onClick:()=>{f.action.onClick(),i(f.id)},className:"font-semibold underline",children:f.action.label}),a.jsx("button",{type:"button",onClick:()=>i(f.id),"aria-label":"Meldung schließen",className:"opacity-60 hover:opacity-100",children:"✕"})]})]},f.id))})]})}function D4(){return m.useContext(Na)}function R4(){return m.useContext(Na).toast}function V4(e,t="page"){const{setDirty:n}=m.useContext(Na);m.useEffect(()=>{n(t,!!e)},[e,t,n]),m.useEffect(()=>()=>n(t,!1),[t,n])}const WT=5*60*1e3,GT=30*60*1e3;function KT(){const{user:e,login:t,verifyTwoFactor:n}=cr(),[r,s]=m.useState(!1),[i,o]=m.useState("credentials"),[l,u]=m.useState((e==null?void 0:e.username)||""),[c,d]=m.useState(""),[f,h]=m.useState(""),[g,v]=m.useState(""),[w,b]=m.useState(!1),p=m.useRef(Date.now()),x=m.useRef(null);if(qy(x,r,()=>{}),m.useEffect(()=>vC(()=>s(!0)),[]),m.useEffect(()=>{const S=()=>{p.current=Date.now()},j=["keydown","pointerdown","scroll"];j.forEach(C=>window.addEventListener(C,S,{passive:!0}));const _=setInterval(()=>{document.hidden||Date.now()-p.current>GT||ie.get("/auth/me").then(C=>{(C==null?void 0:C.authenticated)===!1&&s(!0)}).catch(()=>{})},WT);return()=>{j.forEach(C=>window.removeEventListener(C,S)),clearInterval(_)}},[]),!r)return null;const y=()=>{s(!1),o("credentials"),d(""),h(""),v("")},k=async S=>{S.preventDefault(),b(!0),v("");try{(await t(l,c)).requires2fa?o("code"):y()}catch(j){v(j.message)}finally{b(!1)}},E=async S=>{S.preventDefault(),b(!0),v("");try{await n(f),y()}catch(j){v(j.message)}finally{b(!1)}},T="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";return a.jsx("div",{className:"fixed inset-0 z-[400] flex items-center justify-center bg-black/50 p-4",children:a.jsxs("div",{ref:x,role:"dialog","aria-modal":"true","aria-labelledby":"session-expired-title",className:"w-full max-w-sm rounded-xl bg-white p-6 shadow-xl dark:bg-neutral-900",children:[a.jsx("h2",{id:"session-expired-title",className:"mb-1 text-lg font-bold text-neutral-900 dark:text-white",children:"Bitte erneut anmelden"}),a.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Deine Sitzung ist abgelaufen. Deine Eingaben auf dieser Seite bleiben erhalten – nach dem Anmelden einfach noch einmal speichern."}),i==="credentials"?a.jsxs("form",{onSubmit:k,className:"space-y-3",children:[a.jsx("input",{value:l,onChange:S=>u(S.target.value),required:!0,placeholder:"Benutzername",autoComplete:"username",className:T}),a.jsx("input",{type:"password",value:c,onChange:S=>d(S.target.value),required:!0,placeholder:"Passwort",autoComplete:"current-password",className:T}),g&&a.jsx("p",{className:"text-sm text-red-600",children:g}),a.jsx("button",{type:"submit",disabled:w,className:"w-full rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:w?"Melde an…":"Anmelden"})]}):a.jsxs("form",{onSubmit:E,className:"space-y-3",children:[a.jsx("input",{value:f,onChange:S=>h(S.target.value),required:!0,inputMode:"numeric",autoComplete:"one-time-code",placeholder:"6-stelliger Code aus der App",className:T}),g&&a.jsx("p",{className:"text-sm text-red-600",children:g}),a.jsx("button",{type:"submit",disabled:w,className:"w-full rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:w?"Prüfe…":"Bestätigen"})]})]})})}const ep="/assets/logo-BNfZDkmN.png",tp={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",download:"M12 4v11m0 0-4-4m4 4 4-4M5 19h14",gauge:"M4 13a8 8 0 1 1 16 0M12 13l3.5-3.5M6 17h12",inbox:"M3 13h5l1.5 2.5h5L16 13h5M5 5h14l2 8v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-5l2-8Z",building:"M4 21V5a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v16M15 9h4a1 1 0 0 1 1 1v11M3 21h18M8 8h3M8 12h3M8 16h3",palette:"M12 3a9 9 0 1 0 0 18c1 0 1.5-.7 1.5-1.5 0-.4-.2-.8-.4-1.1-.3-.3-.4-.7-.4-1.1 0-.8.7-1.5 1.5-1.5H16a5 5 0 0 0 5-5c0-4.4-4-7.8-9-7.8ZM7.5 12h.01M10 7.5h.01M15 7.5h.01",file:"M7 3h7l5 5v12a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Zm7 0v5h5M9 13h6M9 17h6",wrench:"M14.5 6.5a4 4 0 0 0-5.3 5.3L4 17l3 3 5.2-5.2a4 4 0 0 0 5.3-5.3l-2.5 2.5-2.5-.5-.5-2.5 2.5-2.5Z",server:"M4 4h16v6H4V4Zm0 10h16v6H4v-6Zm3-7h.01M7 17h.01",globe:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm-9-9h18M12 3c2.5 2.5 3.5 5.5 3.5 9s-1 6.5-3.5 9c-2.5-2.5-3.5-5.5-3.5-9s1-6.5 3.5-9Z",send:"M4 12 20 4l-4 16-4-7-8-1Zm8 1 8-9",refresh:"M20 11a8 8 0 0 0-14.9-3M4 4v4h4m-4 5a8 8 0 0 0 14.9 3M20 20v-4h-4",trash:"M5 7h14M10 11v6m4-6v6M6 7l1 13h10l1-13M9 7V4h6v3",external:"M14 4h6v6m0-6-9 9M19 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h5",pause:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm-2-12v6m4-6v6",timer:"M10 2h4M12 14l3-3M12 22a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z"},np=({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 qT(){const{logout:e,user:t,hasPermission:n}=cr(),r=es(),[s,i]=m.useState(!1),[o,l]=m.useState(0),[u,c]=m.useState([]),[d,f]=m.useState([]),[h,g]=m.useState(!1),[v,w]=m.useState(null),b=m.useCallback(()=>{n("contact.manage")&&ie.get("/contact").then(S=>l(S.filter(j=>j.status==="new").length)).catch(()=>{}),ie.get("/site-settings").then(S=>f(S.hidden_areas||[])).catch(()=>{}),ie.get("/maintenance").then(S=>{var j,_;g(!!((j=S==null?void 0:S.global)!=null&&j.enabled)),w((_=S==null?void 0:S.countdown)!=null&&_.active?S.countdown.launch_at:null)}).catch(()=>{})},[t==null?void 0:t.id]);m.useEffect(()=>{b();const S=setInterval(b,2*60*1e3);return()=>clearInterval(S)},[b]);const p=VT.filter(S=>d.includes(S.key)).map(S=>S.label),x=()=>ie.get("/custom-fonts").then(c).catch(()=>{});m.useEffect(()=>{x()},[]);const y=[{title:null,links:[{to:"/admin",label:"Übersicht",icon:"gauge",end:!0},{to:"/admin/contact-requests",label:"Anfragen",icon:"inbox",permission:"contact.manage",badge:o}]},{title:"Fahrzeuge & Pakete",links:[{to:"/admin/brands",label:"Fahrzeugmarken",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-Inhalte",links:[{to:"/admin/home-sections",label:"Startseite",icon:"home",permission:"content.manage"},{to:"/admin/services",label:"Leistungen",icon:"briefcase",permission:"services.manage"},{to:"/admin/faqs",label:"FAQ",icon:"help",permission:"content.manage"},{to:"/admin/partners",label:"Partner-Logos",icon:"shield",permission:"content.manage"},{to:"/admin/downloads",label:"Downloads",icon:"download",permission:"downloads.manage"}]},{title:"Bildergalerie",links:[{to:"/admin/gallery-brands",label:"Galerie-Marken",icon:"image",permission:"gallery.manage"},{to:"/admin/gallery-projects",label:"Projekte & Fotos",icon:"image",permission:"gallery.manage"}]},{title:"Firma & Aussehen",links:[{to:"/admin/settings/company",label:"Firmendaten",icon:"building",permission:"settings.manage"},{to:"/admin/settings/design",label:"Aussehen",icon:"palette",permission:"settings.manage"},{to:"/admin/settings/legal",label:"Rechtstexte",icon:"file",permission:"settings.manage"},{to:"/admin/settings/maintenance",label:"Wartungsmodus",icon:"pause",permission:"settings.manage"},{to:"/admin/settings/countdown",label:"Launch-Countdown",icon:"timer",permission:"settings.manage"}]},{title:"System (Experten)",links:[{to:"/admin/users",label:"Benutzer",icon:"users",permission:"users.manage"},{to:"/admin/permission-groups",label:"Berechtigungsgruppen",icon:"lock",permission:"permission_groups.manage"},{to:"/admin/settings/email",label:"E-Mail-Versand",icon:"send",permission:"system.admin"},{to:"/admin/settings/google",label:"Google-Dienste",icon:"globe",permission:"system.admin"},{to:"/admin/settings/database",label:"Datenbank",icon:"server",permission:"system.admin"},{to:"/admin/settings/export-import",label:"Export & Import",icon:"download",permission:"system.admin"},{to:"/admin/settings/update",label:"Updates",icon:"refresh",permission:"system.update"},{to:"/admin/settings/reset",label:"Zurücksetzen",icon:"trash",permission:"system.admin"}]},{title:null,links:[{to:"/admin/account",label:"Mein Konto",icon:"lock"}]}].map(S=>({...S,links:S.links.filter(j=>!j.permission||n(j.permission))})).filter(S=>S.links.length>0),k=async()=>{await e(),r("/admin/login")},E=({isActive:S})=>`flex items-center justify-between gap-2 rounded-md px-3 py-2 text-sm font-medium transition ${S?"bg-brand-500 text-white":"text-neutral-600 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-neutral-800"}`,T=({onNavigate:S})=>a.jsx("nav",{className:"space-y-5",children:y.map((j,_)=>a.jsxs("div",{children:[j.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:j.title}),a.jsx("div",{className:"space-y-1",children:j.links.map(C=>a.jsxs(Vb,{to:C.to,end:C.end,className:E,onClick:S,children:[a.jsxs("span",{className:"flex items-center gap-2.5",children:[a.jsx(np,{path:tp[C.icon]}),C.label]}),!!C.badge&&a.jsx("span",{className:"rounded-full bg-red-500 px-2 py-0.5 text-xs font-bold text-white",children:C.badge})]},C.to))})]},_))});return a.jsxs(UT,{onRefreshCounters:b,children:[a.jsx(KT,{}),a.jsx(Xy,{value:{fonts:u,refresh:x},children:a.jsxs("div",{className:"flex min-h-screen bg-neutral-50 text-neutral-900 dark:bg-neutral-950 dark:text-neutral-100",children:[a.jsx(Qy,{}),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(U,{to:"/",className:"rounded-lg px-2 py-1",children:[a.jsx("img",{src:ep,alt:"HifiPlanet",className:"h-7 w-auto dark:hidden"}),a.jsx("img",{src:ea,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(T,{})]}),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(S=>!S),"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(U,{to:"/",className:"rounded-lg px-1.5 py-0.5",children:[a.jsx("img",{src:ep,alt:"HifiPlanet",className:"h-6 w-auto dark:hidden"}),a.jsx("img",{src:ea,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.jsxs("a",{href:"/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 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:[a.jsx(np,{path:tp.external}),a.jsx("span",{className:"hidden sm:inline",children:"Website öffnen"})]}),a.jsx(Hy,{}),a.jsx("button",{onClick:k,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(T,{onNavigate:()=>i(!1)})})]}),(h||v||p.length>0)&&a.jsxs("div",{className:"border-b border-amber-200 bg-amber-50 px-4 py-2 text-sm text-amber-900 dark:border-amber-900 dark:bg-amber-950 dark:text-amber-200 sm:px-6",children:[h&&a.jsxs("p",{children:[a.jsx("strong",{children:"Wartungsmodus ist aktiv"})," – Besucher sehen gerade nur die Wartungsseite."," ",n("settings.manage")&&a.jsx(U,{to:"/admin/settings/maintenance",className:"underline",children:"Ändern"})]}),v&&a.jsxs("p",{children:[a.jsx("strong",{children:"Launch-Countdown läuft"})," – Besucher sehen bis"," ",new Date(v).toLocaleString("de-DE",{dateStyle:"medium",timeStyle:"short",timeZone:"Europe/Berlin"})," Uhr nur den Countdown."," ",n("settings.manage")&&a.jsx(U,{to:"/admin/settings/countdown",className:"underline",children:"Ändern"})]}),p.length>0&&a.jsxs("p",{children:[a.jsx("strong",{children:"Ausgeblendet für Besucher:"})," ",p.join(", "),"."," ",a.jsx(U,{to:"/admin",className:"underline",children:"Auf der Übersicht ändern"})]})]}),a.jsx("main",{className:"p-4 sm:p-6",children:a.jsx(m.Suspense,{fallback:a.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}),children:a.jsx(ld,{})})})]})]})})]})}function YT(){const{user:e,loading:t}=cr();return t?a.jsx("div",{className:"flex min-h-screen items-center justify-center text-neutral-500",children:"Lädt…"}):e?a.jsx(ld,{}):a.jsx(sr,{to:"/admin/login",replace:!0})}function ce({permission:e,children:t}){const{hasPermission:n}=cr();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 mo(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 XT(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}`),mo("og:url",`https://hifi-planet.de${e}`,"property")}function rp(e){let t=document.head.querySelector('meta[name="robots"]');if(!e){t==null||t.remove();return}t||(t=document.createElement("meta"),t.setAttribute("name","robots"),document.head.appendChild(t)),t.setAttribute("content","noindex")}function dr({title:e,description:t,path:n,noindex:r=!1}){m.useEffect(()=>(rp(r),()=>rp(!1)),[r]),m.useEffect(()=>{e&&(document.title=`${e} | HifiPlanet`,mo("og:title",`${e} | HifiPlanet`,"property")),t&&(mo("description",t),mo("og:description",t,"property")),n&&XT(n)},[e,t,n])}const ZT=[.16,1,.3,1],sp={up:{y:40},left:{x:-56},right:{x:56}};function QT(e){return{hidden:{opacity:0,scale:.96,filter:"blur(8px)",...sp[e]||sp.up},visible:{opacity:1,scale:1,x:0,y:0,filter:"blur(0px)"}}}const JT={hidden:{x:"-130%"},visible:{x:"230%",transition:{duration:1.1,ease:"easeInOut",delay:.4}}};function He({children:e,direction:t="up",className:n="",index:r=0,shine:s=!1,style:i}){const o=Math.min(r*.09,.45);return a.jsxs(Qt.div,{className:n,style:{position:"relative",overflow:"hidden",...i},initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.25,margin:"-100px"},variants:QT(t),transition:{duration:.75,ease:ZT,delay:o},children:[e,s&&a.jsx(Qt.div,{"aria-hidden":!0,variants:JT,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"})]})}const qd=e=>{e.preventDefault(),e.stopPropagation()};function eN(e){e.preventDefault();const t=e.clipboardData.getData("text/plain");document.execCommand("insertText",!1,t)}function le({entity:e,id:t,field:n,lang:r,value:s,as:i="span",multiline:o=!1,placeholder:l="Text eingeben…",className:u="",...c}){const{language:d}=pe(),f=at(),h=r||d,g=f.getValue(e,t,n,h,s??"")??"";if(!f.canEdit(e))return a.jsx(i,{className:u,...c,children:g});const v=w=>{const b=o?w.innerText.replace(/\n{3,}/g,`
-`).trim():w.innerText.replace(/\s+/g," ").trim();b!==g.trim()&&f.setValue(e,t,n,h,b),w.innerText!==b&&(w.innerText=b)};return a.jsx(i,{...c,className:`${u} live-editable${f.hasPending(e,t,n,h)?" live-editable-changed":""}`,contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!0,"data-live-placeholder":l,onClick:qd,onPaste:eN,onKeyDown:w=>{w.key==="Enter"&&!o?(w.preventDefault(),w.currentTarget.blur()):w.key==="Escape"&&(w.currentTarget.innerText=g,w.currentTarget.blur()),w.stopPropagation()},onKeyUp:w=>w.stopPropagation(),onBlur:w=>v(w.currentTarget),children:g},`${h}:${g}`)}function We({k:e,...t}){const{t:n}=pe();return a.jsx(le,{entity:"text",id:e,field:"value",value:n(e),placeholder:"Leer = Standardtext",...t})}function mr({entity:e,id:t,field:n,lang:r,value:s,label:i="Text",className:o="",...l}){const{language:u}=pe(),c=at(),d=r||u,f=c.getValue(e,t,n,d,s??"")??"";if(!c.canEdit(e))return a.jsx("div",{className:o,...l,dangerouslySetInnerHTML:{__html:f}});const h=g=>{qd(g),c.openEditor({kind:"html",entity:e,id:t,field:n,lang:d,label:i,original:f})};return a.jsx("div",{...l,className:`${o} live-editable live-editable-block${c.hasPending(e,t,n,d)?" live-editable-changed":""}`,role:"button",tabIndex:0,title:"Klicken zum Bearbeiten",onClick:h,onKeyDown:g=>g.key==="Enter"&&h(g),"data-live-placeholder":"Text hinzufügen…",dangerouslySetInnerHTML:{__html:f}})}function lc({entity:e,id:t,field:n,lang:r,value:s,label:i,kind:o="textarea",hint:l,as:u="div",className:c="",children:d,...f}){const{language:h}=pe(),g=at(),v=r||h;if(!g.canEdit(e))return a.jsx(u,{className:c,...f,children:d});const w=g.getValue(e,t,n,v,s??"")??"",b=p=>{qd(p),g.openEditor({kind:o,entity:e,id:t,field:n,lang:v,label:i,hint:l,original:w})};return a.jsx(u,{...f,className:`${c} live-editable live-editable-block${g.hasPending(e,t,n,v)?" live-editable-changed":""}`,role:"button",tabIndex:0,title:`${i} bearbeiten`,onClickCapture:b,onKeyDown:p=>p.key==="Enter"&&b(p),children:d})}function tN({items:e,entity:t="faqs"}){const[n,r]=m.useState(null),s=at(),{language:i}=pe();return s.canEdit(t)?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((o,l)=>a.jsxs("div",{className:"space-y-3 px-5 py-4",children:[a.jsx(le,{entity:t,id:o.id,field:"question",value:o.question,as:"p",className:"block font-medium text-neutral-900 dark:text-white",placeholder:"Frage"}),a.jsx(le,{entity:t,id:o.id,field:"answer",value:o.answer,as:"p",multiline:!0,className:"block whitespace-pre-line text-sm text-neutral-600 dark:text-neutral-300",placeholder:"Antwort"})]},o.id??l))}):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((o,l)=>{const u=n===l,c=o.id?{...o,question:s.getValue(t,o.id,"question",i,o.question),answer:s.getValue(t,o.id,"answer",i,o.answer)}:o;return a.jsxs("div",{children:[a.jsxs("button",{onClick:()=>r(u?null:l),className:"flex w-full items-center justify-between gap-4 px-5 py-4 text-left","aria-expanded":u,children:[a.jsx("span",{className:"font-medium text-neutral-900 dark:text-white",children:c.question}),a.jsx(Qt.svg,{animate:{rotate:u?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(Mj,{initial:!1,children:u&&a.jsx(Qt.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:c.answer})})})]},c.id??c.question)})})}function tv({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 nN=70;function rN({testimonials:e}){const t=m.useRef(null),n=m.useRef(null),r=m.useRef({pos:0,half:0,hovering:!1,dragging:!1,dragStartX:0,dragStartPos:0,lastTime:null,rafId:null}).current;m.useLayoutEffect(()=>{const i=n.current,o=window.matchMedia("(prefers-reduced-motion: reduce)").matches,l=()=>{i.style.transform=`translateX(${r.pos}px)`},u=x=>{if(r.half<=0)return x;for(;x>0;)x-=r.half;for(;x<=-r.half;)x+=r.half;return x},c=()=>{r.half=i.scrollWidth/2,r.pos===0?r.pos=-r.half:r.pos=u(r.pos),l()};c();const d=new ResizeObserver(c);d.observe(i);const f=x=>{r.lastTime===null&&(r.lastTime=x);const y=(x-r.lastTime)/1e3;r.lastTime=x,!r.dragging&&!r.hovering&&!o&&(r.pos=u(r.pos+nN*y),l()),r.rafId=requestAnimationFrame(f)};r.rafId=requestAnimationFrame(f);const h=t.current,g=()=>{r.hovering=!0},v=()=>{r.hovering=!1},w=x=>{r.dragging=!0,r.dragStartX=x.clientX,r.dragStartPos=r.pos,h.setPointerCapture(x.pointerId),h.classList.add("cursor-grabbing"),h.classList.remove("cursor-grab")},b=x=>{r.dragging&&(r.pos=u(r.dragStartPos+(x.clientX-r.dragStartX)),l())},p=x=>{r.dragging&&(r.dragging=!1,h.hasPointerCapture(x.pointerId)&&h.releasePointerCapture(x.pointerId),h.classList.remove("cursor-grabbing"),h.classList.add("cursor-grab"))};return h.addEventListener("pointerenter",g),h.addEventListener("pointerleave",v),h.addEventListener("pointerdown",w),h.addEventListener("pointermove",b),h.addEventListener("pointerup",p),h.addEventListener("pointercancel",p),()=>{cancelAnimationFrame(r.rafId),d.disconnect(),h.removeEventListener("pointerenter",g),h.removeEventListener("pointerleave",v),h.removeEventListener("pointerdown",w),h.removeEventListener("pointermove",b),h.removeEventListener("pointerup",p),h.removeEventListener("pointercancel",p)}},[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,o)=>a.jsx("div",{className:"w-64 shrink-0 sm:w-72 lg:w-80",children:a.jsxs("div",{className:"relative flex h-full flex-col overflow-hidden rounded-xl border border-neutral-200 bg-white p-6 shadow-sm transition-shadow duration-300 hover:shadow-lg dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 32 24",className:"absolute -right-1 -top-1 h-16 w-16 text-brand-500/10 dark:text-brand-400/10",children:a.jsx("path",{fill:"currentColor",d:"M9.4 0C4.4 3.5 1 9.1 1 15.3 1 20.6 4.3 24 8.4 24c3.8 0 6.6-3 6.6-6.6 0-3.4-2.4-5.9-5.4-5.9-.6 0-1.4.1-1.6.2C8.5 8.5 11.6 4.6 14.6 2.6L9.4 0zm16.5 0c-4.8 3.5-8.3 9.1-8.3 15.3 0 5.3 3.3 8.6 7.5 8.6 3.7 0 6.6-3 6.6-6.6 0-3.4-2.5-5.9-5.4-5.9-.6 0-1.4.1-1.6.2.5-3.3 3.6-7.1 6.7-9.1L25.9 0z"})}),a.jsx(tv,{className:"relative z-10 mb-3 h-4 w-4",count:i.rating||5}),a.jsxs("p",{className:"relative z-10 mb-4 line-clamp-6 flex-1 text-sm leading-relaxed text-neutral-600 dark:text-neutral-300",children:["„",i.text,'"']}),a.jsxs("div",{className:"relative z-10 mt-auto flex items-center gap-3",children:[i.photo?a.jsx("img",{src:i.photo,alt:"",referrerPolicy:"no-referrer",className:"h-9 w-9 shrink-0 rounded-full object-cover"}):a.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-brand-100 text-sm font-semibold text-brand-700 dark:bg-brand-900/40 dark:text-brand-300",children:i.name.charAt(0).toUpperCase()}),a.jsx("p",{className:"text-sm font-semibold text-neutral-900 dark:text-white",children:i.name})]})]})},`${i.name}-${o}`))})})}function ip(e,t,n={x:0,y:0}){const r=Math.max(0,Math.min(100,e==null?n.x:Number(e)||0)),s=Math.max(0,Math.min(100,t==null?n.y:Number(t)||0));return{left:`${r}%`,top:`${s}%`,transform:`translate(-${r}%, -${s}%)`}}const sN="/assets/gallery-dash2-CEVCErVK.webp",nv="/assets/gallery-amp-purple-CESAKuOf.webp",iN="/assets/gallery-speaker-CUXQZ49Q.webp",rv="/assets/gallery-subs-COSd4seJ.webp",sv="/assets/gallery-dash-Cg-7v9qo.webp",oN="/assets/hero-trunk-Dp4_JHDh.webp",aN="/assets/gallery-rear-8cIXPC7T.webp",lN="/assets/hero-highlight-Co4f1Kj5.webp",uN="/assets/youtube-hintergrund-BqSbCrLQ.mp4",cN="/assets/youtube-hintergrund-mobil-BolxAIc0.mp4",Wi={left:"text-left",center:"text-center",right:"text-right"},dN={left:"",center:"mx-auto",right:"ml-auto"},fN={eyebrow_de:"",eyebrow_en:"",title_de:"",title_en:"",body_html_de:"",body_html_en:"",text_align:"center",text_align_x:50,text_align_y:50,button_label_de:"",button_label_en:"",button_url:"",font_family:null};function op({slug:e,label:t,url:n,className:r,style:s}){const{hidden_areas:i}=It(),o=at();return e&&o.canEdit("home_sections")?a.jsxs("span",{className:"inline-flex flex-wrap items-center justify-center gap-2",children:[a.jsx(le,{entity:"home_sections",id:e,field:"button_label",value:t,className:r,style:s,placeholder:"Button-Text (leer = kein Button)"}),a.jsxs(lc,{entity:"home_sections",id:e,field:"button_url",lang:"de",value:n,kind:"input",label:"Button-Ziel",hint:"Interne Seite mit / am Anfang (z. B. /leistungen) oder volle Adresse (https://...).",as:"span",className:"rounded bg-black/60 px-2 py-1 text-xs font-medium text-white",children:["Ziel: ",n||"–"]})]}):!t||!n||ev(n,i)?null:n.startsWith("/")?a.jsx(U,{to:n,className:r,style:s,children:t}):a.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:r,style:s,children:t})}const hN=[{src:rv,width:900,height:600},{src:nv,width:900,height:600},{src:iN,width:900,height:1200},{src:sv,width:900,height:814},{src:aN,width:900,height:1200},{src:oN,width:1920,height:1280}];function mN(){const{hero_image_path:e}=It(),t=e||sN,{t:n,language:r}=pe(),s=Pa(),i=at(),o=i.canEdit("home_sections"),l=!s("page.vehicles"),u=n("home.stats"),c=n("home.galleryAlts"),d=hN.map((M,V)=>({...M,alt:c[V]})),[f,h]=m.useState([]),[g,v]=m.useState({}),[w,b]=m.useState(!1),[p,x]=m.useState([]),y=M=>{const V=g[M]||fN,Ee=w&&{hero:n("home.heroTitle"),craft:n("home.craftTitle")}[M]||"",Ie=w&&M==="hero"?`${n("home.heroSubtitle")}
`:"";return{eyebrow:i.getValue("home_sections",M,"eyebrow",r,V[`eyebrow_${r}`]||""),title:i.getValue("home_sections",M,"title",r,V[`title_${r}`]||Ee),bodyHtml:i.getValue("home_sections",M,"body_html",r,V[`body_html_${r}`]||Ie),align:V.text_align||"center",alignX:V.text_align_x,alignY:V.text_align_y,buttonLabel:i.getValue("home_sections",M,"button_label",r,V[`button_label_${r}`]||""),buttonUrl:i.getValue("home_sections",M,"button_url","de",V.button_url||""),fontFamily:V.font_family||void 0}},k=Ue("home_sections.hero.eyebrow"),E=Ue("home_sections.hero.title"),T=Ue("home_sections.youtube.eyebrow"),S=Ue("home_sections.youtube.title"),j=Ue("home_sections.youtube.button_label"),_=Ue("home_sections.craft.eyebrow"),C=Ue("home_sections.craft.title"),B=Ue("home_sections.advice.eyebrow"),H=Ue("home_sections.advice.title"),ee=Ue("home_sections.insights.eyebrow"),W=Ue("home_sections.insights.title"),K=Ue("home_sections.more.eyebrow"),q=Ue("home_sections.more.title"),oe=Ue("home_sections.more.button_label");m.useEffect(()=>{ie.get("/home-sections").then(v).catch(()=>b(!0))},[]),m.useEffect(()=>{ie.get("/partners").then(x).catch(()=>{})},[]);const[N,A]=m.useState(null),L=N?N.reviews.filter(M=>M.review_text).map(M=>({name:M.author_name,text:M.review_text,rating:M.rating,photo:M.profile_photo_url})):n("home.testimonials");m.useEffect(()=>{ie.get("/faqs").then(M=>{h(M.map(V=>({id:V.id,question:r==="de"?V.question_de:V.question_en,answer:r==="de"?V.answer_de:V.answer_en})))}).catch(()=>{})},[r]),m.useEffect(()=>{ie.get("/google-reviews").then(M=>{M.rating!=null&&M.reviews.some(V=>V.review_text)&&A(M)}).catch(()=>{})},[]),dr({title:n("home.metaTitle"),description:n("home.metaDescription"),path:"/"}),m.useEffect(()=>{if(f.length===0||s("home.faq"))return;const M=document.createElement("script");return M.type="application/ld+json",M.text=JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:f.map(V=>({"@type":"Question",name:V.question,acceptedAnswer:{"@type":"Answer",text:V.answer}}))}),document.head.appendChild(M),()=>document.head.removeChild(M)},[f]),m.useEffect(()=>{var M;f.length>0&&window.location.hash==="#faq"&&((M=document.getElementById("faq"))==null||M.scrollIntoView())},[f]);const F=m.useRef(null);m.useEffect(()=>{var pt,Fn,Xd;const M=F.current;if(!M)return;const V=(pt=window.matchMedia)==null?void 0:pt.call(window,"(prefers-reduced-motion: reduce)").matches,Ee=(Fn=navigator.connection)==null?void 0:Fn.saveData;if(V||Ee)return;const ae=((Xd=window.matchMedia)==null?void 0:Xd.call(window,"(max-width: 767px), (pointer: coarse)").matches)?cN:uN,we=new IntersectionObserver(([iv])=>{iv.isIntersecting?(M.getAttribute("src")||(M.src=ae),M.play().catch(()=>{})):M.paused||M.pause()},{rootMargin:"300px 0px"});return we.observe(M),()=>we.disconnect()},[]);const P=m.useRef(null),{scrollYProgress:R}=Ty({target:P,offset:["start start","end start"]}),z=dC(),G=fn(R,[0,1],z?["0%","0%"]:["-6%","6%"]),te=fn(R,[0,1],z?["0%","0%"]:["0%","60%"]),se=fn(R,[0,.8],[1,0]),je=fn(R,[.5,1],[0,1]),Ve=fn(je,M=>M>.05?"auto":"none"),jt=fn(R,[.5,1],[16,0]);return a.jsxs("div",{children:[a.jsx(Qt.div,{style:{opacity:je,pointerEvents:Ve,y:jt},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(We,{k:"home.stickyCta",as:"p",className:"hidden text-sm font-medium text-neutral-600 dark:text-neutral-300 sm:block"}),a.jsxs("div",{className:"flex w-full gap-3 sm:w-auto",children:[l&&a.jsx(U,{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:a.jsx(We,{k:"home.selectVehicle"})}),a.jsx(U,{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:a.jsx(We,{k:"home.getInTouch"})})]})]})}),a.jsxs("section",{ref:P,className:"relative -mt-[89px] h-svh min-h-[560px] overflow-hidden sm:-mt-[97px]",children:[a.jsx(Qt.img,{style:{y:G,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(Qt.div,{style:{y:te,opacity:se},className:"absolute inset-0",children:a.jsx("div",{className:"absolute w-full max-w-2xl px-4 text-center sm:px-6",style:{...ip(y("hero").alignX,y("hero").alignY,{x:50,y:50}),fontFamily:y("hero").fontFamily},children:a.jsxs(Qt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.7,ease:"easeOut"},children:[(y("hero").eyebrow||o)&&a.jsx(le,{entity:"home_sections",id:"hero",field:"eyebrow",value:y("hero").eyebrow,as:"p",className:"mb-3 text-sm font-semibold uppercase tracking-wide text-brand-400",style:k,placeholder:"Vorspann (optional)"}),a.jsx(le,{entity:"home_sections",id:"hero",field:"title",value:y("hero").title,as:"h1",className:"text-3xl font-extrabold tracking-tight text-white sm:text-5xl",style:E,placeholder:"Überschrift"}),a.jsx(mr,{entity:"home_sections",id:"hero",field:"body_html",value:y("hero").bodyHtml,label:"Text",className:"legal-content mx-auto mt-4 max-w-2xl text-base text-neutral-200 sm:text-lg"}),a.jsxs("div",{className:"mt-8 flex flex-wrap items-center justify-center gap-3",children:[l&&a.jsx(U,{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:a.jsx(We,{k:"home.selectVehicle"})}),a.jsx(U,{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:a.jsx(We,{k:"home.getInTouch"})})]})]})})})]}),!s("home.stats")&&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:u.map((M,V)=>a.jsxs(He,{index:V,children:[a.jsx("p",{className:"text-2xl font-extrabold text-brand-400 sm:text-3xl",children:M.value}),a.jsx("p",{className:"text-sm text-neutral-400",children:M.label})]},M.label))})}),!s("home.partners")&&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(We,{k:"home.brandsHeading",as:"p",className:"mb-4 block text-center text-xs font-semibold uppercase tracking-wide text-neutral-400"}),a.jsx("div",{className:"flex flex-wrap items-center justify-center gap-x-8 gap-y-3",children:p.map((M,V)=>a.jsx(He,{index:V,children:M.logo_path?a.jsx("img",{src:M.logo_path,alt:M.name,className:"h-8 max-w-[8rem] object-contain opacity-70 grayscale transition hover:opacity-100 hover:grayscale-0"}):a.jsx(le,{entity:"partners",id:M.id,field:"name",lang:"de",value:M.name,className:"text-lg font-bold text-neutral-400 dark:text-neutral-600"})},M.id))})]})}),!s("home.youtube")&&a.jsxs("section",{className:"relative min-h-[70vh] overflow-hidden sm:min-h-[85vh]",children:[a.jsx("video",{ref:F,loop:!0,muted:!0,playsInline:!0,preload:"none",poster:sv,className:"absolute inset-0 h-full w-full object-cover"}),a.jsx("div",{className:"absolute inset-0 bg-black/55"}),a.jsx("div",{className:"absolute w-full max-w-3xl px-4 text-center sm:px-6",style:{...ip(y("youtube").alignX,y("youtube").alignY,{x:50,y:50}),fontFamily:y("youtube").fontFamily},children:a.jsxs(He,{children:[(y("youtube").eyebrow||o)&&a.jsx(le,{entity:"home_sections",id:"youtube",field:"eyebrow",value:y("youtube").eyebrow,as:"p",className:"mb-4 text-xs font-semibold uppercase tracking-[0.2em] text-neutral-200 sm:text-sm",style:T,placeholder:"Vorspann (optional)"}),a.jsx(le,{entity:"home_sections",id:"youtube",field:"title",value:y("youtube").title,as:"h2",className:"text-3xl font-bold uppercase tracking-wide text-white sm:text-5xl",style:S,placeholder:"Überschrift"}),a.jsx(mr,{entity:"home_sections",id:"youtube",field:"body_html",value:y("youtube").bodyHtml,label:"Text",className:"legal-content mt-4 text-xs font-semibold uppercase tracking-wide text-neutral-200 sm:text-sm"}),a.jsx(op,{slug:"youtube",label:y("youtube").buttonLabel,url:y("youtube").buttonUrl,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",style:j})]})})]}),!s("home.craft")&&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(He,{direction:"left",shine:!0,className:"rounded-xl shadow-lg",children:a.jsx("img",{src:rv,alt:n("home.craftImageAlt"),width:900,height:600,className:"w-full rounded-xl object-cover",style:{maxHeight:380}})}),a.jsxs(He,{direction:"right",index:1,className:Wi[y("craft").align],style:{fontFamily:y("craft").fontFamily},children:[(y("craft").eyebrow||o)&&a.jsx(le,{entity:"home_sections",id:"craft",field:"eyebrow",value:y("craft").eyebrow,as:"p",className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:_,placeholder:"Vorspann (optional)"}),a.jsx(le,{entity:"home_sections",id:"craft",field:"title",value:y("craft").title,as:"h2",className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",style:C,placeholder:"Überschrift"}),a.jsx(mr,{entity:"home_sections",id:"craft",field:"body_html",value:y("craft").bodyHtml,label:"Text",className:"legal-content text-neutral-600 dark:text-neutral-300"})]})]}),a.jsxs("div",{className:"grid items-center gap-8 md:grid-cols-2",children:[a.jsxs(He,{direction:"left",className:`order-2 md:order-1 ${Wi[y("advice").align]}`,style:{fontFamily:y("advice").fontFamily},children:[(y("advice").eyebrow||o)&&a.jsx(le,{entity:"home_sections",id:"advice",field:"eyebrow",value:y("advice").eyebrow,as:"p",className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:B,placeholder:"Vorspann (optional)"}),a.jsx(le,{entity:"home_sections",id:"advice",field:"title",value:y("advice").title,as:"h2",className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",style:H,placeholder:"Überschrift"}),a.jsx(mr,{entity:"home_sections",id:"advice",field:"body_html",value:y("advice").bodyHtml,label:"Text",className:"legal-content text-neutral-600 dark:text-neutral-300"})]}),a.jsx(He,{direction:"right",index:1,shine:!0,className:"order-1 md:order-2 rounded-xl shadow-lg",children:a.jsx("img",{src:nv,alt:n("home.adviceImageAlt"),width:900,height:600,className:"w-full rounded-xl object-cover",style:{maxHeight:380}})})]})]})}),!s("home.insights")&&a.jsxs("section",{className:"mx-auto max-w-6xl px-4 py-16 sm:px-6",children:[a.jsxs(He,{className:`mb-8 ${Wi[y("insights").align]}`,style:{fontFamily:y("insights").fontFamily},children:[(y("insights").eyebrow||o)&&a.jsx(le,{entity:"home_sections",id:"insights",field:"eyebrow",value:y("insights").eyebrow,as:"p",className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:ee,placeholder:"Vorspann (optional)"}),a.jsx(le,{entity:"home_sections",id:"insights",field:"title",value:y("insights").title,as:"h2",className:"text-2xl font-bold text-neutral-900 dark:text-white",style:W,placeholder:"Überschrift"}),a.jsx(mr,{entity:"home_sections",id:"insights",field:"body_html",value:y("insights").bodyHtml,label:"Text",className:"legal-content mt-2 text-neutral-600 dark:text-neutral-300"})]}),a.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:d.map((M,V)=>a.jsx(He,{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:M.src,alt:M.alt,width:M.width,height:M.height,loading:"lazy",className:"h-full w-full object-cover transition duration-300 hover:scale-105"})},M.src))})]}),!s("home.reviews")&&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(He,{className:"mb-10 text-center",children:[a.jsx("div",{className:"mb-2 flex items-center justify-center gap-2",children:a.jsx(tv,{className:"h-6 w-6",count:N?Math.round(N.rating):5})}),a.jsx("h2",{className:"text-2xl font-bold text-neutral-900 dark:text-white",children:N?n("home.reviewsRatingDynamic")(N.rating,N.rating_count):n("home.reviewsRating")}),a.jsx(We,{k:"home.reviewsText",as:"p",className:"mt-1 text-neutral-600 dark:text-neutral-300"}),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:a.jsx(We,{k:"home.reviewsLink"})})]}),a.jsx(He,{children:a.jsx(rN,{testimonials:L})})]})}),!s("home.more")&&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(He,{direction:"left",shine:!0,className:"overflow-hidden rounded-xl shadow-lg",children:a.jsx("img",{src:lN,alt:n("home.moreImageAlt"),width:1600,height:905,className:"h-full w-full object-cover",loading:"lazy"})}),a.jsxs(He,{direction:"right",index:1,className:`rounded-xl border border-neutral-200 bg-white p-8 shadow-sm dark:border-neutral-800 dark:bg-neutral-900 ${Wi[y("more").align]}`,style:{fontFamily:y("more").fontFamily},children:[(y("more").eyebrow||o)&&a.jsx(le,{entity:"home_sections",id:"more",field:"eyebrow",value:y("more").eyebrow,as:"p",className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:K,placeholder:"Vorspann (optional)"}),a.jsx(le,{entity:"home_sections",id:"more",field:"title",value:y("more").title,as:"h2",className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",style:q,placeholder:"Überschrift"}),a.jsx(mr,{entity:"home_sections",id:"more",field:"body_html",value:y("more").bodyHtml,label:"Text",className:`legal-content mb-8 max-w-2xl text-neutral-600 dark:text-neutral-300 ${dN[y("more").align]}`}),a.jsx(op,{slug:"more",label:y("more").buttonLabel,url:y("more").buttonUrl,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",style:oe})]})]})}),!s("home.faq")&&a.jsx("section",{id:"faq",className:"scroll-mt-20 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(He,{className:"mb-8 text-center",children:a.jsx(We,{k:"home.faqHeading",as:"h2",className:"text-2xl font-bold text-neutral-900 dark:text-white"})}),a.jsx(He,{index:1,children:a.jsx(tN,{items:f})})]})})]})}function _a(e,t){return e?e.code==="rate_limited"||e.status===429?t("errors.rateLimited"):e.code==="invalid_input"||e.status===422?t("errors.invalidInput"):e.status===404?t("errors.notFound"):e.status===503?t("errors.maintenance"):e.status>=500?t("errors.server"):e.status?t("errors.generic"):t("errors.network"):""}const ap={vw:"volkswagen",mercedes:"mercedes-benz",benz:"mercedes-benz",mb:"mercedes-benz",chevy:"chevrolet",alfa:"alfa romeo"},pN=8,Is=e=>String(e||"").toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g,"").replace(/ß/g,"ss").replace(/[-_./]+/g," ").replace(/\s+/g," ").trim(),na=e=>e.replace(/\s/g,"");function gN(e,t){const n=(e||[]).map(s=>{const i=Is(s.name);return{key:`b${s.id}`,type:"brand",label:s.name,to:`/fahrzeuge/${s.slug}`,text:i,flat:na(i)}}),r=(t||[]).map(s=>{const i=Is(`${s.brand_name} ${s.name}`);return{key:`m${s.id}`,type:"model",label:s.name,brand:s.brand_name,image:s.image_path,to:`/fahrzeuge/${s.brand_slug}/${s.slug}`,text:i,flat:na(i),modelText:Is(s.name)}});return[...n,...r]}function xN(e,t){const n=Is(t).split(" ").filter(Boolean);if(n.length===0)return[];const r=n.map(o=>ap[o]?[o,Is(ap[o])]:[o]),s=na(n.join("")),i=[];for(const o of e){const l=c=>o.text.includes(c)||o.flat.includes(na(c));if(!r.every(c=>c.some(l))&&!o.flat.includes(s))continue;let u=0;for(const c of r)c.some(d=>o.text.startsWith(d))?u+=3:c.some(d=>` ${o.text}`.includes(` ${d}`))&&(u+=2),c.some(d=>{var f;return(f=o.modelText)==null?void 0:f.startsWith(d)})&&(u+=2);o.type==="brand"&&(u+=1),i.push({entry:o,score:u})}return i.sort((o,l)=>l.score-o.score||o.entry.text.localeCompare(l.entry.text,void 0,{numeric:!0})),i.slice(0,pN).map(o=>o.entry)}function yN({brands:e,width:t}){const{t:n}=pe(),r=es(),s=m.useId(),i=m.useRef(null),[o,l]=m.useState(null),[u,c]=m.useState(""),[d,f]=m.useState(!1),[h,g]=m.useState(0),v=m.useRef(!1),w=()=>{o||v.current||(v.current=!0,ie.get("/vehicle-search").then(l).catch(()=>l([])).finally(()=>{v.current=!1}))},b=m.useMemo(()=>gN(e,o),[e,o]),p=m.useMemo(()=>xN(b,u),[b,u]),x=d&&u.trim()!=="",y=p.some(S=>S.image);m.useEffect(()=>g(0),[u]),m.useEffect(()=>{if(!x)return;const S=j=>{var _;(_=i.current)!=null&&_.contains(j.target)||f(!1)};return document.addEventListener("pointerdown",S),()=>document.removeEventListener("pointerdown",S)},[x]);const k=S=>{f(!1),r(S.to)},E=S=>{S.key==="ArrowDown"&&p.length?(S.preventDefault(),f(!0),g(j=>(j+1)%p.length)):S.key==="ArrowUp"&&p.length?(S.preventDefault(),g(j=>(j-1+p.length)%p.length)):S.key==="Enter"&&x&&p[h]?(S.preventDefault(),k(p[h])):S.key==="Escape"&&(x?f(!1):c(""))},T=o===null&&u.trim()!=="";return a.jsxs("div",{ref:i,className:"relative mb-8 max-w-full",style:{width:t?`${t}px`:"100%"},children:[a.jsx("label",{htmlFor:`${s}-input`,className:"sr-only",children:n("vehicleSearch.label")}),a.jsxs("div",{className:"relative flex items-center",children:[a.jsx(bP,{className:"pointer-events-none absolute left-4 h-[18px] w-[18px] text-neutral-400","aria-hidden":"true"}),a.jsx("input",{id:`${s}-input`,type:"search",role:"combobox","aria-expanded":x,"aria-controls":`${s}-list`,"aria-autocomplete":"list","aria-activedescendant":x&&p[h]?`${s}-${p[h].key}`:void 0,autoComplete:"off",spellCheck:!1,value:u,placeholder:n("vehicleSearch.placeholder"),onFocus:()=>{w(),f(!0)},onChange:S=>{w(),c(S.target.value),f(!0)},onKeyDown:E,className:"vehicle-search-input w-full rounded-xl border border-neutral-300 bg-gradient-to-b from-white to-neutral-50 py-3.5 pl-11 pr-11 text-[15px] text-neutral-900 outline-none transition-[border-color,box-shadow] duration-200 placeholder:text-neutral-400 focus:border-brand-500 dark:border-neutral-700 dark:from-neutral-800 dark:to-neutral-900 dark:text-white dark:placeholder:text-neutral-500 [&::-webkit-search-cancel-button]:hidden"}),u&&a.jsx("button",{type:"button",onClick:()=>c(""),"aria-label":n("vehicleSearch.clear"),className:"absolute right-3 rounded-md p-1 text-neutral-400 transition hover:text-neutral-700 dark:hover:text-neutral-200",children:a.jsx(yi,{className:"h-4 w-4"})})]}),x&&a.jsx("div",{className:"absolute inset-x-0 top-full z-30 mt-2 overflow-hidden rounded-xl border border-neutral-200 bg-white shadow-lg dark:border-neutral-800 dark:bg-neutral-900",children:p.length>0?a.jsx("ul",{id:`${s}-list`,role:"listbox",className:"max-h-[360px] overflow-y-auto py-1",children:p.map((S,j)=>a.jsx("li",{id:`${s}-${S.key}`,role:"option","aria-selected":j===h,children:a.jsxs(U,{to:S.to,onClick:()=>f(!1),onMouseEnter:()=>g(j),className:`flex items-center gap-3 px-4 py-2.5 text-[15px] ${j===h?"bg-neutral-100 dark:bg-neutral-800":""}`,children:[S.type==="model"?a.jsxs(a.Fragment,{children:[S.image?a.jsx("img",{src:S.image,alt:"",loading:"lazy",className:"h-9 w-14 shrink-0 rounded object-cover"}):y&&a.jsx("span",{className:"h-9 w-14 shrink-0 rounded bg-neutral-100 dark:bg-neutral-800"}),a.jsxs("span",{className:"min-w-0 flex-1 truncate text-neutral-900 dark:text-white",children:[a.jsx("span",{className:"text-neutral-500 dark:text-neutral-400",children:S.brand})," ",S.label]})]}):a.jsxs("span",{className:"min-w-0 flex-1 truncate text-neutral-900 dark:text-white",children:[S.label,a.jsx("span",{className:"ml-2 text-xs uppercase tracking-wider text-neutral-500 dark:text-neutral-400",children:n("vehicleSearch.allModels")})]}),a.jsx(TC,{className:`h-4 w-4 shrink-0 text-brand-500 transition-opacity ${j===h?"opacity-100":"opacity-0"}`,"aria-hidden":"true"})]})},S.key))}):a.jsx("div",{id:`${s}-list`,className:"px-4 py-3 text-sm text-neutral-500 dark:text-neutral-400",children:T?n("vehicleSearch.loading"):a.jsxs(a.Fragment,{children:[n("vehicleSearch.noResults")," ",a.jsx(U,{to:"/kontakt",className:"font-semibold text-brand-500 hover:underline",children:n("vehicleSearch.contact")})]})})})]})}function vN(){const[e,t]=m.useState(null),[n,r]=m.useState(null),s=Ta(),{t:i}=pe(),o=Wd(),{vehicle_tile_width:l,vehicle_tile_height:u}=It(),c={width:`${l}px`,height:`${u}px`},d=m.useRef(null),[f,h]=m.useState(0);m.useEffect(()=>{const p=d.current;if(!p)return;const x=new ResizeObserver(([y])=>h(y.contentRect.width));return x.observe(p),()=>x.disconnect()},[]);const g=16,v=e?e.length:6,w=Math.max(1,Math.min(v,Math.floor((f+g)/(Number(l)+g)))),b=f&&v?w*Number(l)+(w-1)*g:void 0;return dr({title:i("vehicleSelect.metaTitle"),description:i("vehicleSelect.metaDescription"),path:"/fahrzeuge"}),m.useEffect(()=>{s.vehicles.enabled&&!s.bypass||ie.get("/brands").then(t).catch(p=>r(p))},[s.vehicles.enabled,s.bypass]),s.vehicles.enabled&&!s.bypass?a.jsx(vi,{message:s.vehicles.message}):a.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[a.jsx("div",{ref:d}),s.vehicles.enabled&&s.bypass&&a.jsx(wi,{inline:!0}),a.jsx(We,{k:"vehicleSelect.title",as:"h1",className:"mb-2 block text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl"}),a.jsx(We,{k:"vehicleSelect.intro",as:"p",className:"mb-6 block text-neutral-600 dark:text-neutral-300"}),a.jsx(yN,{brands:e,width:b}),n&&a.jsx("p",{className:"text-red-600",children:typeof n=="string"?n:_a(n,i)}),e===null&&!n&&a.jsx("div",{className:"flex flex-wrap gap-4","aria-busy":"true","aria-label":i("vehicleSelect.loading"),children:Array.from({length:6},(p,x)=>a.jsx("div",{style:c,className:"shrink-0 animate-pulse rounded-xl bg-neutral-200 dark:bg-neutral-800"},x))}),(e==null?void 0:e.length)===0&&!n&&a.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:i("vehicleSelect.empty")}),a.jsx("div",{className:"flex flex-wrap gap-4",children:(e||[]).map(p=>p.image_path?a.jsxs(U,{to:`/fahrzeuge/${p.slug}`,style:c,className:"group relative block shrink-0 overflow-hidden rounded-xl bg-neutral-900 shadow-sm transition hover:shadow-lg",children:[a.jsx("img",{src:p.image_path,alt:"",loading:"lazy",decoding:"async",width:l,height:u,className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}),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(le,{entity:"brands",id:p.id,field:"name",lang:"de",value:p.name,className:"absolute inset-x-0 bottom-0 p-4 text-center text-lg font-extrabold text-white",style:ar(o,`brands.${p.id}.name`)})]},p.id):a.jsx(U,{to:`/fahrzeuge/${p.slug}`,style:c,className:"flex shrink-0 flex-col items-center justify-center gap-3 rounded-xl border border-neutral-200 bg-white px-6 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:a.jsx(le,{entity:"brands",id:p.id,field:"name",lang:"de",value:p.name,style:ar(o,`brands.${p.id}.name`)})},p.id))})]})}function Yd(){const{t:e}=pe(),{phone:t}=It(),n=Pa();return dr({title:e("notFound.metaTitle"),noindex:!0}),a.jsxs("div",{className:"mx-auto max-w-2xl px-4 py-20 text-center sm:px-6",children:[a.jsx("p",{className:"text-sm font-semibold uppercase tracking-[4px] text-brand-500",children:"404"}),a.jsx("h1",{className:"mt-3 text-3xl font-bold text-neutral-900 dark:text-white sm:text-4xl",children:e("notFound.title")}),a.jsx("p",{className:"mx-auto mt-4 max-w-md text-neutral-600 dark:text-neutral-300",children:e("notFound.text")}),a.jsxs("div",{className:"mt-10 flex flex-wrap justify-center gap-3",children:[!n("page.vehicles")&&a.jsxs(U,{to:"/fahrzeuge",className:"inline-flex items-center gap-2 rounded-md bg-brand-500 px-5 py-3 text-sm font-semibold text-white shadow-sm hover:bg-brand-600",children:[a.jsx(Jo,{className:"h-4 w-4"}),e("notFound.toVehicles")]}),a.jsxs(U,{to:"/kontakt",className:"inline-flex items-center gap-2 rounded-md border border-neutral-300 px-5 py-3 text-sm font-semibold text-neutral-700 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-800",children:[a.jsx(oc,{className:"h-4 w-4"}),e("notFound.toContact")]}),t&&a.jsxs("a",{href:ai(t),className:"inline-flex items-center gap-2 rounded-md border border-neutral-300 px-5 py-3 text-sm font-semibold text-neutral-700 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-800",children:[a.jsx(or,{className:"h-4 w-4"}),t]})]}),a.jsx(U,{to:"/",className:"mt-8 inline-block text-sm text-neutral-500 underline hover:text-brand-500",children:e("notFound.toHome")})]})}function wN(){const{brandSlug:e}=ad(),[t,n]=m.useState(null),[r,s]=m.useState(null),i=Ta(),{t:o}=pe(),l=Wd(),u=Ue(t?`brands.${t.brand.id}.name`:""),{vehicle_tile_width:c,vehicle_tile_height:d}=It(),f={width:`${c}px`,height:`${d}px`};return m.useEffect(()=>{i.vehicles.enabled&&!i.bypass||ie.get(`/brands/${e}/models`).then(n).catch(h=>s(h))},[e,i.vehicles.enabled,i.bypass]),dr({title:t?`${t.brand.name} ${o("brandPage.titleSuffix")}`:o("brandPage.metaTitleFallback"),description:t?o("brandPage.metaDescription")(t.brand.name):void 0,path:`/fahrzeuge/${e}`}),i.vehicles.enabled&&!i.bypass?a.jsx(vi,{message:i.vehicles.message}):r?r.status===404?a.jsx(Yd,{}):a.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:_a(r,o)}):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(wi,{inline:!0}),a.jsxs("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:[a.jsx("span",{style:u,children:t.brand.name})," – ",o("brandPage.titleSuffix")]}),t.models.length===0&&a.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:o("brandPage.empty")}),a.jsx("div",{className:"flex flex-wrap gap-4",children:t.models.map(h=>h.image_path?a.jsxs(U,{to:`/fahrzeuge/${e}/${h.slug}`,style:f,className:"group relative block shrink-0 overflow-hidden rounded-xl bg-neutral-900 shadow-sm transition hover:shadow-lg",children:[a.jsx("img",{src:h.image_path,alt:"",loading:"lazy",decoding:"async",width:c,height:d,className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}),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(le,{entity:"car_models",id:h.id,field:"name",lang:"de",value:h.name,className:"absolute inset-x-0 bottom-0 p-4 text-center text-lg font-extrabold text-white",style:ar(l,`car_models.${h.id}.name`)})]},h.id):a.jsx(U,{to:`/fahrzeuge/${e}/${h.slug}`,style:f,className:"flex shrink-0 flex-col items-center justify-center gap-3 rounded-xl border border-neutral-200 bg-white px-6 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:a.jsx(le,{entity:"car_models",id:h.id,field:"name",lang:"de",value:h.name,style:ar(l,`car_models.${h.id}.name`)})},h.id))})]}):a.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:o("brandPage.loading")})}function bN({text:e}){return e?e.split(/(\*\*[^*]+\*\*)/g).map((n,r)=>{const s=n.match(/^\*\*([^*]+)\*\*$/);return s?a.jsx("strong",{children:s[1]},r):a.jsx("span",{children:n},r)}):null}const lp="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==",kN="/assets/base-BKOm0Bib.webp",SN="/assets/clear-DZZMSrMX.webp",jN="/assets/drive-BE2W1yna.webp",EN="/assets/prime-BTVNe2Gb.webp",CN="/assets/elite_r-BRvz_pyr.webp",PN="/assets/apex-CFy2qup8.webp",TN="/assets/statement-pTO-wTPx.webp",NN="/assets/limitless-DDs0S_PU.webp";function _n(e,t,n){if(!e)return"";if(n==="en"){const r=e[`${t}_en`];if(r)return r}return e[t]}const _N=(e,t,n)=>{t/=100,n/=100;const r=o=>(o+e/30)%12,s=t*Math.min(n,1-n),i=o=>n-s*Math.max(-1,Math.min(r(o)-3,Math.min(9-r(o),1)));return[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)]},_l=(e,t,n)=>`rgb(${_N(e,t,n).join(", ")})`,up=e=>e.map(([t,n,r,s,i,o])=>({bgTop:_l(t,n,r),border:_l(t,n,r+8),accent:_l(s,i,o),img:null})),cp={graphite:[{accent:"#b6b6b6",border:"#2a2a2a",bgTop:"#1c1c1c",img:kN},{accent:"#d3d3d3",border:"#2e2e2e",bgTop:"#212121",img:SN},{accent:"#8fb8bd",border:"#26383b",bgTop:"#16282b",img:jN},{accent:"#6fbf73",border:"#1f3a24",bgTop:"#122916",img:EN},{accent:"#63d34f",border:"#204a1c",bgTop:"#123312",img:CN},{accent:"#8bea3c",border:"#2b5518",bgTop:"#173a0f",img:PN},{accent:"#d9a83c",border:"#4a3a16",bgTop:"#33270d",img:TN},{accent:"#f2c14e",border:"#5a4718",bgTop:"#3d2f0c",img:NN}],"deep-blue":up([[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":up([[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]])},MN="#f2f2f2",dp="#8a8a8a",fp="#c4c4c4",hp=5,LN=3,AN={recommended:{Icon:NP,className:"bg-brand-500 text-white"},popular:{Icon:JC,className:"bg-amber-400 text-neutral-950"},tip:{Icon:rP,className:"bg-sky-500 text-white"},coming_soon:{Icon:Dy,className:"bg-white text-neutral-900"},custom:{Icon:null,className:"bg-brand-500 text-white"}};function DN({pkg:e,tier:t,tierT:n,layout:r,bullets:s,formatPrice:i,contactUrl:o,priceNote:l,t:u}){const[c,d]=m.useState(!1),f=at().canEdit("packages"),[h,g]=m.useState(!1),v=m.useRef(null),w=s.length-hp,b=c?s:s.slice(0,hp);m.useLayoutEffect(()=>{const _=v.current;if(!_||c){g(!1);return}const C=()=>g([..._.querySelectorAll("[data-clamp]")].some(H=>H.scrollHeight>H.clientHeight+1));C();const B=new ResizeObserver(C);return B.observe(_),()=>B.disconnect()},[c,s.length,e.description]);const p=Wd(),x=ar(p,`packages.${e.id}.description`),y=ar(p,`packages.${e.id}.price_text`),{package_card_height:k}=It(),E=AN[e.badge],T=r!=="grid",S=e.badge==="custom"?e.badge_text:e.badge&&u(`modelPage.badges.${e.badge}`),j=t.img?null:{backgroundColor:t.accent,WebkitMaskImage:`url(${lp})`,maskImage:`url(${lp})`,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%)`,...T?{gridRow:"span 4",gridTemplateRows:"subgrid",rowGap:0}:{minHeight:`${k}px`}},className:r==="strip"?"relative grid snap-start overflow-hidden rounded-[18px] border shadow-xl shadow-neutral-900/20 dark:shadow-black/40":r==="coverflow"?"relative grid snap-center overflow-hidden rounded-[18px] border shadow-xl shadow-neutral-900/20 will-change-transform dark:shadow-black/40":"relative flex 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:{...j,opacity:.2+n*.45,filter:"blur(18px)"},"aria-hidden":"true"}),a.jsx("div",{className:"pointer-events-none absolute inset-0",style:{...j,opacity:.55+n*.45},"aria-hidden":"true"})]}),E&&S&&a.jsxs("span",{className:`absolute top-2 left-1/2 z-10 flex max-w-[calc(100%-16px)] -translate-x-1/2 items-center gap-1 whitespace-nowrap rounded-full px-3 py-1 text-xs font-bold shadow ${E.className}`,children:[E.Icon&&a.jsx(E.Icon,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),a.jsx("span",{className:"truncate",children:S})]}),a.jsxs("div",{className:"relative z-10 text-center",style:{padding:"34px 20px 0",gridRow:1},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:a.jsx(le,{entity:"packages",id:e.id,field:"name",lang:"de",value:e.name,placeholder:"Paketname"})}),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:{gridRow:2,padding:"18px 20px 14px",background:c?"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(lc,{entity:"packages",id:e.id,field:"description",value:e.description,label:"Zusätzliche Stichpunkte",hint:"Eine Zeile = ein Stichpunkt (unter den Produkten). **fett** wird fett dargestellt. Die Produkte selbst pflegst du im Admin unter Pakete.",children:a.jsx("ul",{ref:v,className:"space-y-1.5 text-left",children:b.map((_,C)=>a.jsxs("li",{className:"flex items-start gap-2",style:{fontSize:"13px",color:fp,..._.fromDescription?x:null},children:[a.jsx(Ay,{className:"mt-0.5 h-3.5 w-3.5 shrink-0",style:{color:t.accent}}),a.jsx("span",{"data-clamp":!0,className:"leading-snug",style:c?void 0:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:LN,overflow:"hidden"},children:_.fromDescription?a.jsx(bN,{text:_.text}):_.text})]},C))})}),(c||w>0||h)&&a.jsxs("button",{type:"button",onClick:()=>d(_=>!_),className:"mt-2.5 flex items-center gap-1 hover:opacity-80",style:{fontSize:"13px",color:t.accent},children:[c?u("modelPage.lessBullets"):w>0?u("modelPage.moreBullets")(w):u("modelPage.showMore"),c?a.jsx(UC,{className:"h-3.5 w-3.5"}):a.jsx(FC,{className:"h-3.5 w-3.5"})]})]}),s.length===0&&f&&a.jsx(lc,{entity:"packages",id:e.id,field:"description",value:e.description,label:"Zusätzliche Stichpunkte",hint:"Eine Zeile = ein Stichpunkt. **fett** wird fett dargestellt.",className:"relative z-10 mx-5 mt-4 text-center text-xs",style:{gridRow:2,color:fp},children:"+ Stichpunkte hinzufügen"}),a.jsx("div",{className:"relative z-10 flex-1",style:{gridRow:3}}),a.jsx("div",{className:"relative z-10",style:{gridRow:4,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:dp},children:u("modelPage.totalPrice")}),a.jsx("div",{style:{marginTop:"4px",fontFamily:"'Barlow Condensed', sans-serif",fontSize:"30px",fontWeight:600,letterSpacing:"1px",color:MN,...e.price_text?y:null},children:f?a.jsx(le,{entity:"packages",id:e.id,field:"price_text",value:e.price_text,placeholder:i(e.total_price),title:"Leer lassen = Preis automatisch aus den Produkten"}):e.price_text||i(e.total_price)}),!e.price_text&&l&&a.jsx("div",{style:{marginTop:"2px",fontSize:"11px",color:dp},children:l}),a.jsx(U,{to:o(e),onClick:()=>Nn("select_package",{package_name:e.name,value:Number(e.total_price)||void 0,currency:"EUR"}),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:u("modelPage.requestContact")}),e.video_url&&a.jsx("div",{className:"mt-3",children:a.jsxs("a",{href:e.video_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 rounded-full border border-white/15 bg-white/5 px-3 py-1 text-xs font-semibold text-white transition hover:bg-white/15",children:[a.jsx(GC,{className:"h-4 w-4 text-red-500","aria-hidden":"true"}),u("modelPage.videoLink")]})})]})})]})}function RN(){const{brandSlug:e,modelSlug:t}=ad(),[n,r]=m.useState(null),[s,i]=m.useState(null),o=Ta(),{t:l,language:u}=pe(),c=at(),{package_card_theme:d,package_card_layout:f,package_wheel_hint_interval:h,package_card_width:g,package_card_height:v,phone:w,whatsapp:b,price_note:p,price_note_en:x}=It(),y=u==="en"&&x||p,k=cp[d]||cp.graphite,E=["grid","strip","coverflow"].includes(f)?f:"strip",T=Math.max(2,Number(h)||8)*1e3,S=m.useRef(null),j=m.useRef(null),_=m.useRef(null),[C,B]=m.useState(!1),H=P=>new Intl.NumberFormat(u==="de"?"de-DE":"en-US",{style:"currency",currency:"EUR"}).format(P);m.useEffect(()=>{o.vehicles.enabled&&!o.bypass||ie.get(`/models/${e}/${t}/packages`).then(r).catch(P=>i(P))},[e,t,o.vehicles.enabled,o.bypass]),m.useEffect(()=>{const P=S.current;if(E!=="coverflow"||!P)return;let R=0;const z=()=>{R=0;const se=P.scrollLeft+P.clientWidth/2;for(const je of P.children){const Ve=je.offsetLeft+je.offsetWidth/2,jt=Math.max(-1,Math.min(1,(Ve-se)/(je.offsetWidth*1.4))),M=Math.abs(jt);je.style.transform=`rotateY(${(-jt*35).toFixed(2)}deg) scale(${(1-M*.13).toFixed(3)}) translateZ(${(-M*60).toFixed(1)}px)`,je.style.zIndex=String(100-Math.round(M*50))}},G=()=>{R||(R=requestAnimationFrame(z))};z(),P.addEventListener("scroll",G,{passive:!0});const te=new ResizeObserver(G);return te.observe(P),()=>{P.removeEventListener("scroll",G),te.disconnect(),cancelAnimationFrame(R)}},[E,n]),m.useEffect(()=>{const P=S.current;if(E==="grid"||!P)return;const R=window.matchMedia("(pointer: coarse)").matches;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let G=[],te=0;const se=()=>{const Ve=Math.min(P.clientWidth*.4,160);G.push(setTimeout(()=>P.scrollTo({left:Ve,behavior:"smooth"}),500)),G.push(setTimeout(()=>P.scrollTo({left:0,behavior:"smooth"}),1250)),R||(G.push(setTimeout(()=>B(!0),450)),G.push(setTimeout(()=>B(!1),1700)))},je=new IntersectionObserver(([Ve])=>{Ve.isIntersecting&&(je.disconnect(),se(),te=setInterval(()=>{P.scrollLeft<=1&&se()},T))},{threshold:.35});return je.observe(P),()=>{je.disconnect(),clearInterval(te),G.forEach(clearTimeout)}},[E,n,T]),m.useEffect(()=>{const P=S.current;if(E==="grid"||!P)return;let R=0,z=0,G=!1,te=0,se=0;const je=()=>[...P.children].map(V=>V.offsetLeft+V.offsetWidth/2),Ve=(V,Ee)=>{let Ie=0,ae=1/0;return V.forEach((we,pt)=>{const Fn=Math.abs(we-Ee);Fn{G=!1;const V=je();if(!V.length)return;const Ee=P.scrollLeft+P.clientWidth/2,Ie=Ve(V,Ee);let ae=Ie;Ie===te&&Math.abs(se)>4&&(ae=se>0?Math.min(te+1,V.length-1):Math.max(te-1,0));const we=P.scrollWidth-P.clientWidth,pt=Math.max(0,Math.min(V[ae]-P.clientWidth/2,we));P.scrollTo({left:pt,behavior:"smooth"}),clearTimeout(z),z=setTimeout(()=>{P.style.scrollSnapType=""},450)},M=V=>{if(Math.abs(V.deltaX)>Math.abs(V.deltaY))return;const Ee=P.scrollWidth-P.clientWidth;if(Ee<=1)return;const Ie=P.scrollLeft<=1,ae=P.scrollLeft>=Ee-1;V.deltaY<0&&Ie||V.deltaY>0&&ae||(V.preventDefault(),G||(G=!0,se=0,te=Ve(je(),P.scrollLeft+P.clientWidth/2)),se+=V.deltaY,P.style.scrollSnapType="none",P.scrollLeft+=V.deltaY,clearTimeout(R),R=setTimeout(jt,150))};return P.addEventListener("wheel",M,{passive:!1}),()=>{P.removeEventListener("wheel",M),clearTimeout(R),clearTimeout(z)}},[E,n]),m.useEffect(()=>{const P=S.current,R=j.current,z=_.current;if(E==="grid"||!P||!R||!z)return;let G=0;const te=()=>{G=0;const ae=P.scrollWidth-P.clientWidth;if(ae<=1){R.style.opacity="0",R.style.pointerEvents="none";return}R.style.opacity="1",R.style.pointerEvents="auto";const we=R.clientWidth,pt=Math.max(32,P.clientWidth/P.scrollWidth*we);z.style.width=`${pt}px`,z.style.transform=`translateX(${(P.scrollLeft/ae*(we-pt)).toFixed(1)}px)`},se=()=>{G||(G=requestAnimationFrame(te))};te(),P.addEventListener("scroll",se,{passive:!0});const je=new ResizeObserver(se);je.observe(P);let Ve=!1,jt=0;const M=ae=>{const we=R.getBoundingClientRect(),pt=z.clientWidth,Fn=Math.min(Math.max(ae-we.left-jt,0),we.width-pt);P.scrollLeft=Fn/(we.width-pt)*(P.scrollWidth-P.clientWidth)},V=ae=>{Ve=!0,R.setPointerCapture(ae.pointerId),P.style.scrollSnapType="none";const we=z.getBoundingClientRect();jt=ae.clientX>=we.left&&ae.clientX<=we.right?ae.clientX-we.left:z.clientWidth/2,ae.clientX>=we.left&&ae.clientX<=we.right||M(ae.clientX)},Ee=ae=>{Ve&&M(ae.clientX)},Ie=ae=>{var we;Ve&&(Ve=!1,(we=R.hasPointerCapture)!=null&&we.call(R,ae.pointerId)&&R.releasePointerCapture(ae.pointerId),P.style.scrollSnapType="")};return R.addEventListener("pointerdown",V),R.addEventListener("pointermove",Ee),R.addEventListener("pointerup",Ie),R.addEventListener("pointercancel",Ie),()=>{P.removeEventListener("scroll",se),je.disconnect(),cancelAnimationFrame(G),R.removeEventListener("pointerdown",V),R.removeEventListener("pointermove",Ee),R.removeEventListener("pointerup",Ie),R.removeEventListener("pointercancel",Ie)}},[E,n]),dr({title:n?l("modelPage.metaTitle")(n.model.brand_name,n.model.name):l("modelPage.metaTitleFallback"),description:n?l("modelPage.metaDescription")(n.model.brand_name,n.model.name):void 0,path:`/fahrzeuge/${e}/${t}`});const ee=Ue(n?`car_models.${n.model.id}.name`:"");if(o.vehicles.enabled&&!o.bypass)return a.jsx(vi,{message:o.vehicles.message});if(s)return s.status===404?a.jsx(Yd,{}):a.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:_a(s,l)});if(!n)return a.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:l("modelPage.loading")});const{model:W}=n,K=n.packages.map(P=>({...P,name:c.getValue("packages",P.id,"name","de",P.name),description:c.getValue("packages",P.id,"description",u,_n(P,"description",u)),tagline:_n(P,"tagline",u),price_text:c.getValue("packages",P.id,"price_text",u,_n(P,"price_text",u))})),q=new Map([...K].sort((P,R)=>P.total_price-R.total_price).map((P,R)=>[P.id,R])),oe=P=>{const R=P.tier_count??K.length,z=P.tier_rank??q.get(P.id)??0,G=R<=1?0:z/(R-1),te=Math.round(G*(k.length-1));return{tier:k[te],tierT:G}},N=P=>[...P.products.map(R=>({text:R.name_override||R.scraped_name||l("modelPage.productLoading"),fromDescription:!1})),...(P.description||"").split(`
-`).map(R=>R.trim()).filter(Boolean).map(R=>({text:R,fromDescription:!0}))],A=P=>`/kontakt?${new URLSearchParams({brand:W.brand_name,model:W.name,package:P.name,packageId:P.id,total:P.total_price,brandSlug:e,modelSlug:t}).toString()}`,L=`/kontakt?${new URLSearchParams({brand:W.brand_name,model:W.name}).toString()}`,F=l("modelPage.whatsappText")(W.brand_name,W.name);return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"mx-auto max-w-6xl px-4 pt-12 sm:px-6",children:[o.vehicles.enabled&&o.bypass&&a.jsx(wi,{inline:!0}),a.jsxs("p",{className:"mb-1 text-sm text-neutral-500 dark:text-neutral-400",children:[a.jsx(U,{to:"/fahrzeuge",className:"hover:text-brand-500",children:l("modelPage.breadcrumbVehicles")})," /"," ",a.jsx(U,{to:`/fahrzeuge/${e}`,className:"hover:text-brand-500",children:W.brand_name})," / ",a.jsx("span",{style:ee,children:W.name})]}),a.jsxs("h1",{className:`text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl ${K.length?"mb-2":"mb-8"}`,children:[W.brand_name," ",a.jsx(le,{entity:"car_models",id:W.id,field:"name",lang:"de",value:W.name,style:ee})," – ",l("modelPage.titleSuffix")]}),K.length===0&&a.jsxs("div",{className:"pb-12",children:[a.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:l("modelPage.empty")}),a.jsx(U,{to:L,className:"mt-5 inline-block rounded-md bg-brand-500 px-5 py-3 text-sm font-semibold text-white shadow-sm hover:bg-brand-600",children:l("modelPage.customRequest")})]})]}),K.length>0&&a.jsx("section",{className:"py-10 sm:py-14",style:{fontFamily:"'Barlow', sans-serif"},children:a.jsxs("div",{className:E==="grid"?"mx-auto max-w-6xl px-4 sm:px-6":"relative mx-auto max-w-[1880px] px-4 sm:px-6",children:[a.jsx("div",{ref:E==="grid"?void 0:S,className:E==="grid"?"grid items-stretch gap-[18px]":"grid select-none gap-x-[18px] overflow-x-auto pb-3 snap-x snap-mandatory [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",style:E==="grid"?{gridTemplateColumns:`repeat(auto-fill, minmax(${g}px, 1fr))`,gridAutoRows:"1fr"}:{gridAutoFlow:"column",gridAutoColumns:`${g}px`,gridTemplateRows:"auto auto 1fr auto",minHeight:`${Number(v)+(E==="coverflow"?22:12)}px`,...E==="coverflow"?{perspective:"1200px",paddingLeft:`calc(50% - ${g/2}px)`,paddingRight:`calc(50% - ${g/2}px)`,paddingTop:"10px"}:null},children:K.map(P=>{const{tier:R,tierT:z}=oe(P);return a.jsx(DN,{pkg:P,tier:R,tierT:z,layout:E,bullets:N(P),formatPrice:H,contactUrl:A,priceNote:y,t:l},P.id)})}),E!=="grid"&&a.jsx("div",{className:`pointer-events-none absolute inset-x-0 top-1/2 z-[200] flex -translate-y-1/2 justify-center transition-opacity duration-300 ${C?"opacity-100":"opacity-0"}`,"aria-hidden":"true",children:a.jsxs("div",{className:"flex items-center gap-2 rounded-full border border-white/10 bg-neutral-900/85 px-4 py-2 text-xs font-medium text-white shadow-lg backdrop-blur-sm",children:[a.jsx(zC,{className:"h-3.5 w-3.5 text-brand-400"}),a.jsx(dP,{className:"h-4 w-4 text-brand-400"}),a.jsx($C,{className:"h-3.5 w-3.5 text-brand-400"}),a.jsx("span",{children:l("modelPage.wheelHint")})]})}),E!=="grid"&&a.jsx("div",{ref:j,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:_,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"}})})]})}),K.length>0&&a.jsxs("div",{className:"mx-auto max-w-6xl px-4 pb-24 text-center sm:px-6 sm:pb-14",children:[a.jsx("p",{className:"text-sm text-neutral-600 dark:text-neutral-300",children:l("modelPage.customHint")}),a.jsx(U,{to:L,className:"mt-2 inline-block text-sm font-semibold text-brand-600 underline hover:text-brand-500",children:l("modelPage.customRequest")})]}),(w||b)&&a.jsxs("div",{className:"fixed inset-x-0 bottom-0 z-20 flex gap-3 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:hidden",children:[w&&a.jsxs("a",{href:ai(w),onClick:()=>Nn("contact_call"),className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white",children:[a.jsx(or,{className:"h-4 w-4"}),l("nav.call")]}),b&&a.jsxs("a",{href:Hd(b,F),target:"_blank",rel:"noopener noreferrer",onClick:()=>Nn("contact_whatsapp"),className:"flex flex-1 items-center justify-center gap-2 rounded-md border border-neutral-300 px-4 py-2.5 text-sm font-semibold text-neutral-700 dark:border-neutral-700 dark:text-neutral-200",children:[a.jsx(Iy,{className:"h-4 w-4"}),l("nav.whatsapp")]})]})]})}const VN={car:Jo,caravan:RC,"car-front":LC,cog:YC,zap:VP,boxes:_C,"shield-alert":EP,video:AP},IN=m.lazy(()=>X(()=>import("./iconRegistry-CyGi0Zpe.js"),__vite__mapDeps([0,1,2,3,4])));function FN({name:e,className:t="h-6 w-6",...n}){if(!e)return null;const r=VN[e];return r?a.jsx(r,{className:t,...n}):a.jsx(m.Suspense,{fallback:a.jsx("span",{className:`inline-block ${t}`,"aria-hidden":"true"}),children:a.jsx(IN,{name:e,className:t,...n})})}function ON(){const[e,t]=m.useState([]),n=Ta(),{t:r,language:s}=pe(),i=at();return m.useEffect(()=>{ie.get("/services").then(t).catch(()=>t([]))},[]),dr({title:r("leistungen.metaTitle"),description:r("leistungen.metaDescription"),path:"/leistungen"}),n.services.enabled&&!n.bypass?a.jsx(vi,{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(wi,{inline:!0}),a.jsx(We,{k:"leistungen.title",as:"h1",className:"mb-2 block text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl"}),a.jsx(We,{k:"leistungen.intro",as:"p",className:"mb-10 block max-w-2xl text-neutral-600 dark:text-neutral-300"}),a.jsx("div",{className:"grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:e.map(o=>({...o,title:_n(o,"title",s),description:_n(o,"description",s),cta_label:_n(o,"cta_label",s)})).map((o,l)=>a.jsxs(He,{index:l%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:[o.image_path&&a.jsx("img",{src:o.image_path,alt:o.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(FN,{name:o.icon_name,className:"h-6 w-6"})})]}),a.jsxs("div",{className:"p-6 pt-8",children:[a.jsx(le,{entity:"services",id:o.id,field:"title",value:o.title,as:"h2",className:"mb-2 block font-semibold text-neutral-900 dark:text-white"}),a.jsx(le,{entity:"services",id:o.id,field:"description",value:o.description,as:"p",multiline:!0,className:"mb-3 block text-sm text-neutral-600 dark:text-neutral-300"}),a.jsxs(U,{to:o.cta_url||"/kontakt",className:"text-sm font-semibold text-brand-600 hover:underline dark:text-brand-400",children:[i.canEdit("services")||o.cta_label?a.jsx(le,{entity:"services",id:o.id,field:"cta_label",value:o.cta_label,placeholder:r("leistungen.contact")}):r("leistungen.contact")," ","→"]})]})]},o.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(We,{k:"leistungen.notListedTitle",as:"h2",className:"mb-2 block text-xl font-bold text-neutral-900 dark:text-white"}),a.jsx(We,{k:"leistungen.notListedText",as:"p",className:"mb-5 block text-neutral-600 dark:text-neutral-300"}),a.jsx(U,{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:a.jsx(We,{k:"leistungen.contact"})})]})]})}function zN({name:e,description:t,className:n="",children:r}){const{consent:s,acceptAll:i,openSettings:o}=ss();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:o,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Cookie-Einstellungen"})]})]})}const BN=e=>(e||"").replace(/[^\d+]/g,""),po={fontFamily:"'Michroma', sans-serif"};function $N({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 HN({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 UN={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 mp({formatted:e,color:t}){const[n,r]=e.split("€");return a.jsxs("span",{style:{...po,color:t},children:[n,a.jsx("span",{style:{fontFamily:"'Barlow', sans-serif"},children:"€"}),r]})}function Gi({icon:e,label:t,name:n,type:r="text",required:s,value:i,onChange:o,placeholder:l,autoComplete:u,inputMode:c}){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,autoComplete:u,inputMode:c,value:i,onChange:o,placeholder:l,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 WN(){const[e]=Ob(),{phone:t,whatsapp:n,contact_email:r,address_street:s,address_zip:i,address_city:o,business_hours:l,price_note:u,price_note_en:c}=It(),{t:d,language:f}=pe(),{consent:h}=ss(),g=[s,[i,o].filter(Boolean).join(" ")].filter(Boolean).join(", "),v=encodeURIComponent(g),w=`https://www.google.com/maps/dir/?api=1&destination=${v}`,b=Ky(l,d("footer.closed")),p=M=>new Intl.NumberFormat(f==="de"?"de-DE":"en-US",{style:"currency",currency:"EUR"}).format(M),[x,y]=m.useState(()=>({name:"",email:"",phone:"",vin:"",message:e.get("topic")||""})),[k,E]=m.useState("idle"),[T,S]=m.useState(""),[j,_]=m.useState([]),[C,B]=m.useState([]),H=m.useRef(Date.now()),ee=m.useRef(null),W=e.get("packageId"),K=e.get("brandSlug"),q=e.get("modelSlug"),[oe,N]=m.useState(e.get("total")?Number(e.get("total")):null),[A,L]=m.useState(null),F=f==="en"&&c||u;m.useEffect(()=>{!W||!K||!q||ie.get(`/models/${encodeURIComponent(K)}/${encodeURIComponent(q)}/packages`).then(M=>{var Ee;const V=(Ee=M==null?void 0:M.packages)==null?void 0:Ee.find(Ie=>String(Ie.id)===String(W));V&&(N(Number(V.total_price)),L(V.price_text||null))}).catch(()=>{})},[W,K,q]),m.useEffect(()=>{if(!W){_([]);return}ie.get(`/packages/${W}/upgrades`).then(_).catch(()=>_([]))},[W]);const P=M=>{B(V=>V.includes(M)?V.filter(Ee=>Ee!==M):[...V,M])},R=j.filter(M=>C.includes(M.id)).reduce((M,V)=>M+Number(V.price),0);dr({title:d("contactPage.metaTitle"),description:d("contactPage.metaDescription"),path:"/kontakt"});const z={brand:e.get("brand")||"",model:e.get("model")||"",package:e.get("package")||""},G=!!(z.brand&&z.model&&z.package),te=!G&&!!(z.brand&&z.model),se=M=>y(V=>({...V,[M.target.name]:M.target.value})),je=async M=>{var V;M.preventDefault(),E("sending"),S("");try{await ie.post("/contact",{...x,website:((V=M.target.elements.website)==null?void 0:V.value)||"",fill_ms:Date.now()-H.current,brand_name:z.brand||null,model_name:z.model||null,package_name:z.package||null,product_name:e.get("product")||null,package_id:W||null,package_product_id:e.get("productId")||null,upgrade_ids:C}),E("sent"),y({name:"",email:"",phone:"",vin:"",message:""}),Nn("generate_lead",{package_name:z.package||void 0,value:oe||void 0,currency:"EUR"})}catch(Ee){S(_a(Ee,d)),E("idle")}};m.useEffect(()=>{k==="sent"&&ee.current&&(ee.current.scrollIntoView({behavior:"smooth",block:"center"}),ee.current.focus({preventScroll:!0}))},[k]);const Ve=G?d("contactPage.whatsappText")(z.brand,z.model,z.package):te?d("modelPage.whatsappText")(z.brand,z.model):"",jt=[{key:"premium",title:d("contactPage.featurePremiumTitle"),sub:d("contactPage.featurePremiumSub")},{key:"germany",title:d("contactPage.featureGermanyTitle"),sub:d("contactPage.featureGermanySub")},{key:"individual",title:d("contactPage.featureIndividualTitle"),sub:d("contactPage.featureIndividualSub")},{key:"experts",title:d("contactPage.featureExpertsTitle"),sub:d("contactPage.featureExpertsSub")}];return a.jsx("div",{className:"kf-page kontakt-sektion relative w-full overflow-hidden px-4 pb-10 sm:px-10",style:{color:"var(--kf-text2)",fontFamily:"'Barlow', sans-serif"},children: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:d("contactPage.heroEyebrow")}),a.jsxs("h1",{className:"text-[34px] leading-[1.08] sm:text-[46px] lg:text-[60px]",style:{...po,color:"var(--kf-text)"},children:[d("contactPage.heroTitlePre")," ",a.jsx("span",{style:{color:"var(--kf-accent2)"},children:d("contactPage.heroTitleAccent")})," ",d("contactPage.heroTitlePost")]}),a.jsx("p",{className:"mb-10 mt-5 max-w-[520px] text-lg leading-[1.55]",style:{color:"var(--kf-muted)"},children:d("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:[G&&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(pP,{className:"h-4 w-4"}),d("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:d("contactPage.contextBrand")}),a.jsx("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:z.brand}),a.jsx("span",{style:{color:"var(--kf-label)"},children:d("contactPage.contextModel")}),a.jsx("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:z.model}),a.jsx("span",{style:{color:"var(--kf-label)"},children:d("contactPage.contextPackage")}),a.jsx("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:z.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:d("contactPage.packagePrice")}),a.jsx("span",{className:"text-xl",children:A||(oe!=null?a.jsx(mp,{formatted:p(oe),color:"var(--kf-text)"}):"—")})]}),F&&!A&&a.jsx("div",{className:"mt-1 text-right text-xs",style:{color:"var(--kf-muted)"},children:F})]}),te&&a.jsxs("div",{className:"mb-8 flex items-center gap-3 rounded-xl border px-6 py-4 text-[15px]",style:{background:"var(--kf-pkgbg)",borderColor:"var(--kf-pkgbrd)"},children:[a.jsx(Jo,{className:"h-4 w-4",style:{color:"var(--kf-accent2)"}}),a.jsx("span",{style:{color:"var(--kf-label)"},children:d("contactPage.vehicleBoxTitle")}),a.jsxs("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:[z.brand," ",z.model]})]}),j.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:d("contactPage.optionalUpgrades")}),a.jsx("div",{className:"space-y-2",children:j.map(M=>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:C.includes(M.id),onChange:()=>P(M.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:_n(M,"name",f)}),M.description&&a.jsx("span",{className:"block text-xs",style:{color:"var(--kf-muted)"},children:_n(M,"description",f)})]}),a.jsxs("span",{className:"font-semibold",style:{color:"var(--kf-accent2)"},children:["+",p(M.price)]})]},M.id))}),C.length>0&&oe!=null&&!A&&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:d("contactPage.totalWithUpgrades")}),a.jsx(mp,{formatted:p(oe+R),color:"var(--kf-text)"})]})]}),a.jsx("h2",{className:"mb-8 text-xl",style:{...po,color:"var(--kf-text)"},children:d("contactPage.formTitle")}),a.jsx("div",{role:"status","aria-live":"polite",children:k==="sent"&&a.jsxs("div",{ref:ee,tabIndex:-1,className:"rounded-[10px] border p-5 outline-none",style:{borderColor:"var(--kf-accent)",background:"var(--kf-accentsoft)"},children:[a.jsx("div",{className:"text-base font-bold",style:{color:"var(--kf-accent2)"},children:d("contactPage.sentTitle")}),a.jsx("div",{className:"mt-1 text-sm",style:{color:"var(--kf-muted)"},children:d("contactPage.sentText")}),a.jsx("button",{type:"button",onClick:()=>{H.current=Date.now(),E("idle")},className:"mt-4 text-sm font-semibold underline",style:{color:"var(--kf-text2)"},children:d("contactPage.sendAnother")})]})}),k!=="sent"&&a.jsxs("form",{onSubmit:je,noValidate:!1,children:[a.jsxs("div",{"aria-hidden":"true",style:{position:"absolute",left:"-10000px",width:"1px",height:"1px",overflow:"hidden"},children:[a.jsx("label",{htmlFor:"kf-website",children:"Website"}),a.jsx("input",{id:"kf-website",name:"website",type:"text",tabIndex:-1,autoComplete:"off",defaultValue:""})]}),a.jsxs("div",{className:"grid grid-cols-1 gap-6 min-[641px]:grid-cols-2",children:[a.jsx(Gi,{icon:MP,label:d("contactPage.nameLabel"),name:"name",autoComplete:"name",required:!0,value:x.name,onChange:se,placeholder:d("contactPage.namePlaceholder")}),a.jsx(Gi,{icon:oc,label:d("contactPage.emailLabel"),name:"email",type:"email",autoComplete:"email",required:!0,value:x.email,onChange:se,placeholder:d("contactPage.emailPlaceholder")}),a.jsx(Gi,{icon:or,label:d("contactPage.phoneLabel"),name:"phone",type:"tel",inputMode:"tel",autoComplete:"tel",value:x.phone,onChange:se,placeholder:d("contactPage.phonePlaceholder")}),a.jsx(Gi,{icon:Jo,label:d("contactPage.vinLabel"),name:"vin",value:x.vin,onChange:se,placeholder:d("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:d("contactPage.messageLabel")}),a.jsx("textarea",{id:"kf-message",name:"message",rows:5,value:x.message,onChange:se,placeholder:d("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)"}})]}),a.jsx("div",{role:"alert","aria-live":"assertive",children:T&&a.jsx("p",{className:"mt-4 text-sm text-red-600 dark:text-red-400",children:T})}),a.jsxs("div",{className:"mt-8 flex flex-wrap items-center gap-5",children:[a.jsxs("button",{type:"submit",disabled:k==="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(SP,{className:"h-[18px] w-[18px]"}),d(k==="sending"?"contactPage.sending":"contactPage.submit")]}),a.jsx("div",{className:"text-[13px]",style:{color:"var(--kf-label)"},children:d("contactPage.requiredHint")})]}),a.jsxs("p",{className:"mt-5 text-[13px] leading-relaxed",style:{color:"var(--kf-muted)"},children:[d("contactPage.privacyPre"),a.jsx(U,{to:"/datenschutz",className:"underline",style:{color:"var(--kf-text2)"},children:d("contactPage.privacyLink")}),d("contactPage.privacyPost")]})]})]})}),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:{...po,color:"var(--kf-text)"},children:d("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(or,{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:d("contactPage.phone")}),a.jsx("a",{href:`tel:${BN(t)}`,onClick:()=>Nn("contact_call"),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(oc,{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:d("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(Vy,{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:d("contactPage.address")}),a.jsxs("div",{className:"text-base font-semibold leading-[1.4]",style:{color:"var(--kf-text2)"},children:[s,a.jsx("br",{}),[i,o].filter(Boolean).join(" ")]})]})]}),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($N,{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:d("nav.whatsapp")}),a.jsx("a",{href:Hd(n,Ve),target:"_blank",rel:"noopener noreferrer",onClick:()=>Nn("contact_whatsapp"),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:d("contactPage.hours")}),a.jsx("div",{className:"grid grid-cols-[auto_1fr] gap-x-6 gap-y-2 text-[15px]",children:b.map(M=>a.jsxs("span",{style:{display:"contents"},children:[a.jsx("span",{style:{color:"var(--kf-label)"},children:M.days}),a.jsx("span",{children:M.label})]},M.key))})]})]}),a.jsxs("div",{className:"relative overflow-hidden rounded-2xl border",style:{background:"var(--kf-card)",borderColor:"var(--kf-cardbrd)",boxShadow:"var(--kf-shadow)"},children:[h.external&&a.jsxs("a",{href:w,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:[d("contactPage.mapOpenChip"),a.jsx(ZC,{className:"h-3.5 w-3.5",style:{color:"var(--kf-accent2)"}})]}),a.jsx(zN,{name:d("contactPage.mapEmbedName"),className:"h-[210px] w-full",children:a.jsx("div",{className:"h-[210px] overflow-hidden",children:a.jsx("iframe",{title:d("contactPage.mapIframeTitle"),src:`https://www.google.com/maps?q=${v}&output=embed`,width:"100%",height:"290",style:{border:0,display:"block",marginTop:"-60px"},loading:"lazy",referrerPolicy:"no-referrer-when-downgrade"})})}),a.jsxs("a",{href:w,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:[d("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:jt.map(M=>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(HN,{path:UN[M.key],className:"h-[22px] w-[22px]"})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-[15px] font-bold",style:{color:"var(--kf-text)"},children:M.title}),a.jsx("div",{className:"mt-0.5 text-[13px]",style:{color:"var(--kf-muted)"},children:M.sub})]})]},M.key))})]})})}const Ml="hifi-chunk-reload",Q=e=>m.lazy(()=>e().then(t=>{try{sessionStorage.removeItem(Ml)}catch{}return t},t=>{let n=!0;try{n=!!sessionStorage.getItem(Ml),sessionStorage.setItem(Ml,"1")}catch{}if(n)throw t;return window.location.reload(),new Promise(()=>{})})),GN=Q(()=>X(()=>import("./GalleryOverview-aLAAnPqU.js"),[])),KN=Q(()=>X(()=>import("./GalleryBrandPage-CkNyN9Hv.js"),[])),qN=Q(()=>X(()=>import("./GalleryProjectPage-C_S20NBY.js"),[])),YN=Q(()=>X(()=>import("./DownloadsPage-CAPs2mkW.js"),__vite__mapDeps([5,6,1]))),XN=Q(()=>X(()=>import("./Impressum-DfZuiEK4.js"),__vite__mapDeps([7,8]))),ZN=Q(()=>X(()=>import("./Datenschutz-D23PBDCa.js"),__vite__mapDeps([9,8]))),QN=Q(()=>X(()=>import("./AGB-DL9HEWig.js"),__vite__mapDeps([10,8]))),JN=Q(()=>X(()=>import("./SetupWizard-BtrT9iUj.js"),[])),e4=Q(()=>X(()=>import("./Login-CHpah8Vu.js"),[])),t4=Q(()=>X(()=>import("./Dashboard-CAvIqRJt.js"),__vite__mapDeps([11,12,13]))),n4=Q(()=>X(()=>import("./Brands-DUHhBFao.js"),__vite__mapDeps([14,15,16,17,18,19,3]))),r4=Q(()=>X(()=>import("./Models-D5rnzwVb.js"),__vite__mapDeps([20,15,16,17,18,19,3,21]))),s4=Q(()=>X(()=>import("./GalleryBrands-DOWIcyB3.js"),__vite__mapDeps([22,15,16,18,19,3,21]))),i4=Q(()=>X(()=>import("./GalleryProjects-CwOpmZGv.js"),__vite__mapDeps([23,15,16,18,19,3,21]))),o4=Q(()=>X(()=>import("./GalleryPhotos-BeKd4-mD.js"),__vite__mapDeps([24,18,19,3,21,16]))),a4=Q(()=>X(()=>import("./Packages-CClV_qD7.js"),__vite__mapDeps([25,17,21,19,4,3,2]))),l4=Q(()=>X(()=>import("./Services-CNrxbwXE.js"),__vite__mapDeps([26,18,19,3,21,15,16,0,1,2,4]))),u4=Q(()=>X(()=>import("./Faqs-DnjCXPgi.js"),__vite__mapDeps([27,18,19,3,21]))),c4=Q(()=>X(()=>import("./Partners-vuleO0fM.js"),__vite__mapDeps([28,15,16,18,19,3,21]))),d4=Q(()=>X(()=>import("./Downloads-Bh95q25Z.js"),__vite__mapDeps([29,6,18,19,3,21,2]))),f4=Q(()=>X(()=>import("./HomeSections-DOtMi6bk.js"),__vite__mapDeps([30,31,17,32]))),h4=Q(()=>X(()=>import("./ContactRequests-C-SMEc0v.js"),__vite__mapDeps([33,13]))),m4=Q(()=>X(()=>import("./AccountSettings-BYeTUWr4.js"),[])),p4=Q(()=>X(()=>import("./AdminUsers-CWUsL6A3.js"),[])),g4=Q(()=>X(()=>import("./PermissionGroups-IWS4spqT.js"),[])),x4=Q(()=>X(()=>import("./SettingsLayout-0Hod3Mvk.js"),[])),Ll=Q(()=>X(()=>import("./WebsiteSettings-BLD4o4Wf.js"),__vite__mapDeps([34,15,16,32]))),y4=Q(()=>X(()=>import("./LegalSettings-CeAksQRS.js"),__vite__mapDeps([35,31]))),v4=Q(()=>X(()=>import("./UpdateSettings-B58G34T3.js"),[])),w4=Q(()=>X(()=>import("./EmailSettings-D2Hs-ZX6.js"),__vite__mapDeps([36,31]))),b4=Q(()=>X(()=>import("./DatabaseSettings-DU0VlIdw.js"),__vite__mapDeps([37,12]))),k4=Q(()=>X(()=>import("./ExportImportSettings-5qT7iGh9.js"),[])),S4=Q(()=>X(()=>import("./MaintenanceSettings-C5m7yZb7.js"),[])),j4=Q(()=>X(()=>import("./CountdownSettings-D0__ITzn.js"),[])),E4=Q(()=>X(()=>import("./ResetSettings-Df3ShQHR.js"),[])),C4=a.jsx("div",{className:"min-h-screen bg-white dark:bg-neutral-950"});function P4(){const{packageId:e}=ad();return a.jsx(sr,{to:`/admin/packages?paket=${e}`,replace:!0})}function T4(){return a.jsxs(Vj,{reducedMotion:"user",children:[a.jsx(fC,{}),a.jsx(pC,{}),a.jsx(bC,{children:a.jsx(m.Suspense,{fallback:C4,children:a.jsxs(jb,{children:[a.jsx($,{path:"/setup",element:a.jsx(JN,{})}),a.jsxs($,{element:a.jsx($T,{}),children:[a.jsx($,{path:"/",element:a.jsx(mN,{})}),a.jsx($,{path:"/fahrzeuge",element:a.jsx(vN,{})}),a.jsx($,{path:"/fahrzeuge/:brandSlug",element:a.jsx(wN,{})}),a.jsx($,{path:"/fahrzeuge/:brandSlug/:modelSlug",element:a.jsx(RN,{})}),a.jsx($,{path:"/galerie",element:a.jsx(GN,{})}),a.jsx($,{path:"/galerie/:brandSlug",element:a.jsx(KN,{})}),a.jsx($,{path:"/galerie/:brandSlug/:projectSlug",element:a.jsx(qN,{})}),a.jsx($,{path:"/leistungen",element:a.jsx(ON,{})}),a.jsx($,{path:"/kontakt",element:a.jsx(WN,{})}),a.jsx($,{path:"/downloads",element:a.jsx(YN,{})}),a.jsx($,{path:"/impressum",element:a.jsx(XN,{})}),a.jsx($,{path:"/datenschutz",element:a.jsx(ZN,{})}),a.jsx($,{path:"/agb",element:a.jsx(QN,{})}),a.jsx($,{path:"*",element:a.jsx(Yd,{})})]}),a.jsx($,{path:"/admin/login",element:a.jsx(e4,{})}),a.jsx($,{path:"/admin",element:a.jsx(YT,{}),children:a.jsxs($,{element:a.jsx(qT,{}),children:[a.jsx($,{index:!0,element:a.jsx(t4,{})}),a.jsx($,{path:"account",element:a.jsx(m4,{})}),a.jsx($,{path:"brands",element:a.jsx(ce,{permission:"brands.manage",children:a.jsx(n4,{})})}),a.jsx($,{path:"models",element:a.jsx(ce,{permission:"models.manage",children:a.jsx(r4,{})})}),a.jsx($,{path:"gallery-brands",element:a.jsx(ce,{permission:"gallery.manage",children:a.jsx(s4,{})})}),a.jsx($,{path:"gallery-projects",element:a.jsx(ce,{permission:"gallery.manage",children:a.jsx(i4,{})})}),a.jsx($,{path:"gallery-projects/:projectId/photos",element:a.jsx(ce,{permission:"gallery.manage",children:a.jsx(o4,{})})}),a.jsx($,{path:"packages",element:a.jsx(ce,{permission:"packages.manage",children:a.jsx(a4,{})})}),a.jsx($,{path:"packages/:packageId/*",element:a.jsx(P4,{})}),a.jsx($,{path:"services",element:a.jsx(ce,{permission:"services.manage",children:a.jsx(l4,{})})}),a.jsx($,{path:"faqs",element:a.jsx(ce,{permission:"content.manage",children:a.jsx(u4,{})})}),a.jsx($,{path:"partners",element:a.jsx(ce,{permission:"content.manage",children:a.jsx(c4,{})})}),a.jsx($,{path:"downloads",element:a.jsx(ce,{permission:"downloads.manage",children:a.jsx(d4,{})})}),a.jsx($,{path:"home-sections",element:a.jsx(ce,{permission:"content.manage",children:a.jsx(f4,{})})}),a.jsx($,{path:"contact-requests",element:a.jsx(ce,{permission:"contact.manage",children:a.jsx(h4,{})})}),a.jsx($,{path:"users",element:a.jsx(ce,{permission:"users.manage",children:a.jsx(p4,{})})}),a.jsx($,{path:"permission-groups",element:a.jsx(ce,{permission:"permission_groups.manage",children:a.jsx(g4,{})})}),a.jsxs($,{path:"settings",element:a.jsx(ce,{permission:["settings.manage","system.admin","system.update"],children:a.jsx(x4,{})}),children:[a.jsx($,{index:!0,element:a.jsx(sr,{to:"company",replace:!0})}),a.jsx($,{path:"website",element:a.jsx(sr,{to:"../company",replace:!0})}),a.jsx($,{path:"company",element:a.jsx(ce,{permission:"settings.manage",children:a.jsx(Ll,{section:"company"})})}),a.jsx($,{path:"design",element:a.jsx(ce,{permission:"settings.manage",children:a.jsx(Ll,{section:"design"})})}),a.jsx($,{path:"legal",element:a.jsx(ce,{permission:"settings.manage",children:a.jsx(y4,{})})}),a.jsx($,{path:"maintenance",element:a.jsx(ce,{permission:"settings.manage",children:a.jsx(S4,{})})}),a.jsx($,{path:"countdown",element:a.jsx(ce,{permission:"settings.manage",children:a.jsx(j4,{})})}),a.jsx($,{path:"google",element:a.jsx(ce,{permission:"system.admin",children:a.jsx(Ll,{section:"google"})})}),a.jsx($,{path:"email",element:a.jsx(ce,{permission:"system.admin",children:a.jsx(w4,{})})}),a.jsx($,{path:"database",element:a.jsx(ce,{permission:"system.admin",children:a.jsx(b4,{})})}),a.jsx($,{path:"export-import",element:a.jsx(ce,{permission:"system.admin",children:a.jsx(k4,{})})}),a.jsx($,{path:"update",element:a.jsx(ce,{permission:"system.update",children:a.jsx(v4,{})})}),a.jsx($,{path:"reset",element:a.jsx(ce,{permission:"system.admin",children:a.jsx(E4,{})})})]})]})})]})})})]})}Al.createRoot(document.getElementById("root")).render(a.jsx(Cp.StrictMode,{children:a.jsx(Ab,{basename:"/".replace(/\/$/,"")||"/",children:a.jsx(FP,{children:a.jsx($P,{children:a.jsx(JP,{children:a.jsx(T4,{})})})})})}));export{rP as $,gC as A,et as B,GC as C,FN as D,We as E,Zy as F,L4 as G,pp as H,Z as I,TC as J,_C as K,U as L,Jo as M,Yd as N,ld as O,Fy as P,LC as Q,He as R,Jy as S,RC as T,Ay as U,zC as V,UC as W,Dy as X,YC as Y,JC as Z,tP as _,It as a,iP as a0,Ry as a1,oc as a2,Vy as a3,Iy as a4,dP as a5,hP as a6,pP as a7,or as a8,vP as a9,bP as aa,SP as ab,EP as ac,PP as ad,NP as ae,MP as af,AP as ag,yi as ah,VP as ai,CC as aj,M4 as ak,EC as al,N4 as am,dr as b,ie as c,le as d,_a as e,ip as f,ad as g,rd as h,mr as i,a as j,cr as k,ep as l,es as m,sr as n,ea as o,D4 as p,R4 as q,m as r,V4 as s,Ob as t,pe as u,FC as v,$C as w,ZC as x,Cp as y,A4 as z};
+`).trim():w.innerText.replace(/\s+/g," ").trim();b!==g.trim()&&f.setValue(e,t,n,h,b),w.innerText!==b&&(w.innerText=b)};return a.jsx(i,{...c,className:`${u} live-editable${f.hasPending(e,t,n,h)?" live-editable-changed":""}`,contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!0,"data-live-placeholder":l,onClick:qd,onPaste:eN,onKeyDown:w=>{w.key==="Enter"&&!o?(w.preventDefault(),w.currentTarget.blur()):w.key==="Escape"&&(w.currentTarget.innerText=g,w.currentTarget.blur()),w.stopPropagation()},onKeyUp:w=>w.stopPropagation(),onBlur:w=>v(w.currentTarget),children:g},`${h}:${g}`)}function We({k:e,...t}){const{t:n}=pe();return a.jsx(le,{entity:"text",id:e,field:"value",value:n(e),placeholder:"Leer = Standardtext",...t})}function mr({entity:e,id:t,field:n,lang:r,value:s,label:i="Text",className:o="",...l}){const{language:u}=pe(),c=at(),d=r||u,f=c.getValue(e,t,n,d,s??"")??"";if(!c.canEdit(e))return a.jsx("div",{className:o,...l,dangerouslySetInnerHTML:{__html:f}});const h=g=>{qd(g),c.openEditor({kind:"html",entity:e,id:t,field:n,lang:d,label:i,original:f})};return a.jsx("div",{...l,className:`${o} live-editable live-editable-block${c.hasPending(e,t,n,d)?" live-editable-changed":""}`,role:"button",tabIndex:0,title:"Klicken zum Bearbeiten",onClick:h,onKeyDown:g=>g.key==="Enter"&&h(g),"data-live-placeholder":"Text hinzufügen…",dangerouslySetInnerHTML:{__html:f}})}function lc({entity:e,id:t,field:n,lang:r,value:s,label:i,kind:o="textarea",hint:l,as:u="div",className:c="",children:d,...f}){const{language:h}=pe(),g=at(),v=r||h;if(!g.canEdit(e))return a.jsx(u,{className:c,...f,children:d});const w=g.getValue(e,t,n,v,s??"")??"",b=p=>{qd(p),g.openEditor({kind:o,entity:e,id:t,field:n,lang:v,label:i,hint:l,original:w})};return a.jsx(u,{...f,className:`${c} live-editable live-editable-block${g.hasPending(e,t,n,v)?" live-editable-changed":""}`,role:"button",tabIndex:0,title:`${i} bearbeiten`,onClickCapture:b,onKeyDown:p=>p.key==="Enter"&&b(p),children:d})}function tN({items:e,entity:t="faqs"}){const[n,r]=m.useState(null),s=at(),{language:i}=pe();return s.canEdit(t)?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((o,l)=>a.jsxs("div",{className:"space-y-3 px-5 py-4",children:[a.jsx(le,{entity:t,id:o.id,field:"question",value:o.question,as:"p",className:"block font-medium text-neutral-900 dark:text-white",placeholder:"Frage"}),a.jsx(le,{entity:t,id:o.id,field:"answer",value:o.answer,as:"p",multiline:!0,className:"block whitespace-pre-line text-sm text-neutral-600 dark:text-neutral-300",placeholder:"Antwort"})]},o.id??l))}):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((o,l)=>{const u=n===l,c=o.id?{...o,question:s.getValue(t,o.id,"question",i,o.question),answer:s.getValue(t,o.id,"answer",i,o.answer)}:o;return a.jsxs("div",{children:[a.jsxs("button",{onClick:()=>r(u?null:l),className:"flex w-full items-center justify-between gap-4 px-5 py-4 text-left","aria-expanded":u,children:[a.jsx("span",{className:"font-medium text-neutral-900 dark:text-white",children:c.question}),a.jsx(Qt.svg,{animate:{rotate:u?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(Mj,{initial:!1,children:u&&a.jsx(Qt.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:c.answer})})})]},c.id??c.question)})})}function tv({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 nN=70;function rN({testimonials:e}){const t=m.useRef(null),n=m.useRef(null),r=m.useRef({pos:0,half:0,hovering:!1,dragging:!1,dragStartX:0,dragStartPos:0,lastTime:null,rafId:null}).current;m.useLayoutEffect(()=>{const i=n.current,o=window.matchMedia("(prefers-reduced-motion: reduce)").matches,l=()=>{i.style.transform=`translateX(${r.pos}px)`},u=x=>{if(r.half<=0)return x;for(;x>0;)x-=r.half;for(;x<=-r.half;)x+=r.half;return x},c=()=>{r.half=i.scrollWidth/2,r.pos===0?r.pos=-r.half:r.pos=u(r.pos),l()};c();const d=new ResizeObserver(c);d.observe(i);const f=x=>{r.lastTime===null&&(r.lastTime=x);const y=(x-r.lastTime)/1e3;r.lastTime=x,!r.dragging&&!r.hovering&&!o&&(r.pos=u(r.pos+nN*y),l()),r.rafId=requestAnimationFrame(f)};r.rafId=requestAnimationFrame(f);const h=t.current,g=()=>{r.hovering=!0},v=()=>{r.hovering=!1},w=x=>{r.dragging=!0,r.dragStartX=x.clientX,r.dragStartPos=r.pos,h.setPointerCapture(x.pointerId),h.classList.add("cursor-grabbing"),h.classList.remove("cursor-grab")},b=x=>{r.dragging&&(r.pos=u(r.dragStartPos+(x.clientX-r.dragStartX)),l())},p=x=>{r.dragging&&(r.dragging=!1,h.hasPointerCapture(x.pointerId)&&h.releasePointerCapture(x.pointerId),h.classList.remove("cursor-grabbing"),h.classList.add("cursor-grab"))};return h.addEventListener("pointerenter",g),h.addEventListener("pointerleave",v),h.addEventListener("pointerdown",w),h.addEventListener("pointermove",b),h.addEventListener("pointerup",p),h.addEventListener("pointercancel",p),()=>{cancelAnimationFrame(r.rafId),d.disconnect(),h.removeEventListener("pointerenter",g),h.removeEventListener("pointerleave",v),h.removeEventListener("pointerdown",w),h.removeEventListener("pointermove",b),h.removeEventListener("pointerup",p),h.removeEventListener("pointercancel",p)}},[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,o)=>a.jsx("div",{className:"w-64 shrink-0 sm:w-72 lg:w-80",children:a.jsxs("div",{className:"relative flex h-full flex-col overflow-hidden rounded-xl border border-neutral-200 bg-white p-6 shadow-sm transition-shadow duration-300 hover:shadow-lg dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsx("svg",{"aria-hidden":"true",viewBox:"0 0 32 24",className:"absolute -right-1 -top-1 h-16 w-16 text-brand-500/10 dark:text-brand-400/10",children:a.jsx("path",{fill:"currentColor",d:"M9.4 0C4.4 3.5 1 9.1 1 15.3 1 20.6 4.3 24 8.4 24c3.8 0 6.6-3 6.6-6.6 0-3.4-2.4-5.9-5.4-5.9-.6 0-1.4.1-1.6.2C8.5 8.5 11.6 4.6 14.6 2.6L9.4 0zm16.5 0c-4.8 3.5-8.3 9.1-8.3 15.3 0 5.3 3.3 8.6 7.5 8.6 3.7 0 6.6-3 6.6-6.6 0-3.4-2.5-5.9-5.4-5.9-.6 0-1.4.1-1.6.2.5-3.3 3.6-7.1 6.7-9.1L25.9 0z"})}),a.jsx(tv,{className:"relative z-10 mb-3 h-4 w-4",count:i.rating||5}),a.jsxs("p",{className:"relative z-10 mb-4 line-clamp-6 flex-1 text-sm leading-relaxed text-neutral-600 dark:text-neutral-300",children:["„",i.text,'"']}),a.jsxs("div",{className:"relative z-10 mt-auto flex items-center gap-3",children:[i.photo?a.jsx("img",{src:i.photo,alt:"",referrerPolicy:"no-referrer",className:"h-9 w-9 shrink-0 rounded-full object-cover"}):a.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-brand-100 text-sm font-semibold text-brand-700 dark:bg-brand-900/40 dark:text-brand-300",children:i.name.charAt(0).toUpperCase()}),a.jsx("p",{className:"text-sm font-semibold text-neutral-900 dark:text-white",children:i.name})]})]})},`${i.name}-${o}`))})})}function ip(e,t,n={x:0,y:0}){const r=Math.max(0,Math.min(100,e==null?n.x:Number(e)||0)),s=Math.max(0,Math.min(100,t==null?n.y:Number(t)||0));return{left:`${r}%`,top:`${s}%`,transform:`translate(-${r}%, -${s}%)`}}const sN="/assets/gallery-dash2-CEVCErVK.webp",nv="/assets/gallery-amp-purple-CESAKuOf.webp",iN="/assets/gallery-speaker-CUXQZ49Q.webp",rv="/assets/gallery-subs-COSd4seJ.webp",sv="/assets/gallery-dash-Cg-7v9qo.webp",oN="/assets/hero-trunk-Dp4_JHDh.webp",aN="/assets/gallery-rear-8cIXPC7T.webp",lN="/assets/hero-highlight-Co4f1Kj5.webp",uN="/assets/youtube-hintergrund-BqSbCrLQ.mp4",cN="/assets/youtube-hintergrund-mobil-BolxAIc0.mp4",Wi={left:"text-left",center:"text-center",right:"text-right"},dN={left:"",center:"mx-auto",right:"ml-auto"},fN={eyebrow_de:"",eyebrow_en:"",title_de:"",title_en:"",body_html_de:"",body_html_en:"",text_align:"center",text_align_x:50,text_align_y:50,button_label_de:"",button_label_en:"",button_url:"",font_family:null};function op({slug:e,label:t,url:n,className:r,style:s}){const{hidden_areas:i}=It(),o=at();return e&&o.canEdit("home_sections")?a.jsxs("span",{className:"inline-flex flex-wrap items-center justify-center gap-2",children:[a.jsx(le,{entity:"home_sections",id:e,field:"button_label",value:t,className:r,style:s,placeholder:"Button-Text (leer = kein Button)"}),a.jsxs(lc,{entity:"home_sections",id:e,field:"button_url",lang:"de",value:n,kind:"input",label:"Button-Ziel",hint:"Interne Seite mit / am Anfang (z. B. /leistungen) oder volle Adresse (https://...).",as:"span",className:"rounded bg-black/60 px-2 py-1 text-xs font-medium text-white",children:["Ziel: ",n||"–"]})]}):!t||!n||ev(n,i)?null:n.startsWith("/")?a.jsx(U,{to:n,className:r,style:s,children:t}):a.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:r,style:s,children:t})}const hN=[{src:rv,width:900,height:600},{src:nv,width:900,height:600},{src:iN,width:900,height:1200},{src:sv,width:900,height:814},{src:aN,width:900,height:1200},{src:oN,width:1920,height:1280}];function mN(){const{hero_image_path:e}=It(),t=e||sN,{t:n,language:r}=pe(),s=Pa(),i=at(),o=i.canEdit("home_sections"),l=!s("page.vehicles"),u=n("home.stats"),c=n("home.galleryAlts"),d=hN.map((M,V)=>({...M,alt:c[V]})),[f,h]=m.useState([]),[g,v]=m.useState({}),[w,b]=m.useState(!1),[p,x]=m.useState([]),y=M=>{const V=g[M]||fN,Ee=w&&{hero:n("home.heroTitle"),craft:n("home.craftTitle")}[M]||"",Ie=w&&M==="hero"?`${n("home.heroSubtitle")}
`:"";return{eyebrow:i.getValue("home_sections",M,"eyebrow",r,V[`eyebrow_${r}`]||""),title:i.getValue("home_sections",M,"title",r,V[`title_${r}`]||Ee),bodyHtml:i.getValue("home_sections",M,"body_html",r,V[`body_html_${r}`]||Ie),align:V.text_align||"center",alignX:V.text_align_x,alignY:V.text_align_y,buttonLabel:i.getValue("home_sections",M,"button_label",r,V[`button_label_${r}`]||""),buttonUrl:i.getValue("home_sections",M,"button_url","de",V.button_url||""),fontFamily:V.font_family||void 0}},k=Ue("home_sections.hero.eyebrow"),E=Ue("home_sections.hero.title"),T=Ue("home_sections.youtube.eyebrow"),S=Ue("home_sections.youtube.title"),j=Ue("home_sections.youtube.button_label"),_=Ue("home_sections.craft.eyebrow"),C=Ue("home_sections.craft.title"),B=Ue("home_sections.advice.eyebrow"),H=Ue("home_sections.advice.title"),ne=Ue("home_sections.insights.eyebrow"),W=Ue("home_sections.insights.title"),K=Ue("home_sections.more.eyebrow"),q=Ue("home_sections.more.title"),oe=Ue("home_sections.more.button_label");m.useEffect(()=>{ie.get("/home-sections").then(v).catch(()=>b(!0))},[]),m.useEffect(()=>{ie.get("/partners").then(x).catch(()=>{})},[]);const[N,A]=m.useState(null),L=N?N.reviews.filter(M=>M.review_text).map(M=>({name:M.author_name,text:M.review_text,rating:M.rating,photo:M.profile_photo_url})):n("home.testimonials");m.useEffect(()=>{ie.get("/faqs").then(M=>{h(M.map(V=>({id:V.id,question:r==="de"?V.question_de:V.question_en,answer:r==="de"?V.answer_de:V.answer_en})))}).catch(()=>{})},[r]),m.useEffect(()=>{ie.get("/google-reviews").then(M=>{M.rating!=null&&M.reviews.some(V=>V.review_text)&&A(M)}).catch(()=>{})},[]),dr({title:n("home.metaTitle"),description:n("home.metaDescription"),path:"/"}),m.useEffect(()=>{if(f.length===0||s("home.faq"))return;const M=document.createElement("script");return M.type="application/ld+json",M.text=JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:f.map(V=>({"@type":"Question",name:V.question,acceptedAnswer:{"@type":"Answer",text:V.answer}}))}),document.head.appendChild(M),()=>document.head.removeChild(M)},[f]),m.useEffect(()=>{var M;f.length>0&&window.location.hash==="#faq"&&((M=document.getElementById("faq"))==null||M.scrollIntoView())},[f]);const F=m.useRef(null);m.useEffect(()=>{var pt,Fn,Xd;const M=F.current;if(!M)return;const V=(pt=window.matchMedia)==null?void 0:pt.call(window,"(prefers-reduced-motion: reduce)").matches,Ee=(Fn=navigator.connection)==null?void 0:Fn.saveData;if(V||Ee)return;const ae=((Xd=window.matchMedia)==null?void 0:Xd.call(window,"(max-width: 767px), (pointer: coarse)").matches)?cN:uN,we=new IntersectionObserver(([iv])=>{iv.isIntersecting?(M.getAttribute("src")||(M.src=ae),M.play().catch(()=>{})):M.paused||M.pause()},{rootMargin:"300px 0px"});return we.observe(M),()=>we.disconnect()},[]);const P=m.useRef(null),{scrollYProgress:R}=Ty({target:P,offset:["start start","end start"]}),z=dC(),G=fn(R,[0,1],z?["0%","0%"]:["-6%","6%"]),ee=fn(R,[0,1],z?["0%","0%"]:["0%","60%"]),se=fn(R,[0,.8],[1,0]),je=fn(R,[.5,1],[0,1]),Ve=fn(je,M=>M>.05?"auto":"none"),jt=fn(R,[.5,1],[16,0]);return a.jsxs("div",{children:[a.jsx(Qt.div,{style:{opacity:je,pointerEvents:Ve,y:jt},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(We,{k:"home.stickyCta",as:"p",className:"hidden text-sm font-medium text-neutral-600 dark:text-neutral-300 sm:block"}),a.jsxs("div",{className:"flex w-full gap-3 sm:w-auto",children:[l&&a.jsx(U,{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:a.jsx(We,{k:"home.selectVehicle"})}),a.jsx(U,{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:a.jsx(We,{k:"home.getInTouch"})})]})]})}),a.jsxs("section",{ref:P,className:"relative -mt-[89px] h-svh min-h-[560px] overflow-hidden sm:-mt-[97px]",children:[a.jsx(Qt.img,{style:{y:G,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(Qt.div,{style:{y:ee,opacity:se},className:"absolute inset-0",children:a.jsx("div",{className:"absolute w-full max-w-2xl px-4 text-center sm:px-6",style:{...ip(y("hero").alignX,y("hero").alignY,{x:50,y:50}),fontFamily:y("hero").fontFamily},children:a.jsxs(Qt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.7,ease:"easeOut"},children:[(y("hero").eyebrow||o)&&a.jsx(le,{entity:"home_sections",id:"hero",field:"eyebrow",value:y("hero").eyebrow,as:"p",className:"mb-3 text-sm font-semibold uppercase tracking-wide text-brand-400",style:k,placeholder:"Vorspann (optional)"}),a.jsx(le,{entity:"home_sections",id:"hero",field:"title",value:y("hero").title,as:"h1",className:"text-3xl font-extrabold tracking-tight text-white sm:text-5xl",style:E,placeholder:"Überschrift"}),a.jsx(mr,{entity:"home_sections",id:"hero",field:"body_html",value:y("hero").bodyHtml,label:"Text",className:"legal-content mx-auto mt-4 max-w-2xl text-base text-neutral-200 sm:text-lg"}),a.jsxs("div",{className:"mt-8 flex flex-wrap items-center justify-center gap-3",children:[l&&a.jsx(U,{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:a.jsx(We,{k:"home.selectVehicle"})}),a.jsx(U,{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:a.jsx(We,{k:"home.getInTouch"})})]})]})})})]}),!s("home.stats")&&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:u.map((M,V)=>a.jsxs(He,{index:V,children:[a.jsx("p",{className:"text-2xl font-extrabold text-brand-400 sm:text-3xl",children:M.value}),a.jsx("p",{className:"text-sm text-neutral-400",children:M.label})]},M.label))})}),!s("home.partners")&&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(We,{k:"home.brandsHeading",as:"p",className:"mb-4 block text-center text-xs font-semibold uppercase tracking-wide text-neutral-400"}),a.jsx("div",{className:"flex flex-wrap items-center justify-center gap-x-8 gap-y-3",children:p.map((M,V)=>a.jsx(He,{index:V,children:M.logo_path?a.jsx("img",{src:M.logo_path,alt:M.name,className:"h-8 max-w-[8rem] object-contain opacity-70 grayscale transition hover:opacity-100 hover:grayscale-0"}):a.jsx(le,{entity:"partners",id:M.id,field:"name",lang:"de",value:M.name,className:"text-lg font-bold text-neutral-400 dark:text-neutral-600"})},M.id))})]})}),!s("home.youtube")&&a.jsxs("section",{className:"relative min-h-[70vh] overflow-hidden sm:min-h-[85vh]",children:[a.jsx("video",{ref:F,loop:!0,muted:!0,playsInline:!0,preload:"none",poster:sv,className:"absolute inset-0 h-full w-full object-cover"}),a.jsx("div",{className:"absolute inset-0 bg-black/55"}),a.jsx("div",{className:"absolute w-full max-w-3xl px-4 text-center sm:px-6",style:{...ip(y("youtube").alignX,y("youtube").alignY,{x:50,y:50}),fontFamily:y("youtube").fontFamily},children:a.jsxs(He,{children:[(y("youtube").eyebrow||o)&&a.jsx(le,{entity:"home_sections",id:"youtube",field:"eyebrow",value:y("youtube").eyebrow,as:"p",className:"mb-4 text-xs font-semibold uppercase tracking-[0.2em] text-neutral-200 sm:text-sm",style:T,placeholder:"Vorspann (optional)"}),a.jsx(le,{entity:"home_sections",id:"youtube",field:"title",value:y("youtube").title,as:"h2",className:"text-3xl font-bold uppercase tracking-wide text-white sm:text-5xl",style:S,placeholder:"Überschrift"}),a.jsx(mr,{entity:"home_sections",id:"youtube",field:"body_html",value:y("youtube").bodyHtml,label:"Text",className:"legal-content mt-4 text-xs font-semibold uppercase tracking-wide text-neutral-200 sm:text-sm"}),a.jsx(op,{slug:"youtube",label:y("youtube").buttonLabel,url:y("youtube").buttonUrl,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",style:j})]})})]}),!s("home.craft")&&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(He,{direction:"left",shine:!0,className:"rounded-xl shadow-lg",children:a.jsx("img",{src:rv,alt:n("home.craftImageAlt"),width:900,height:600,className:"w-full rounded-xl object-cover",style:{maxHeight:380}})}),a.jsxs(He,{direction:"right",index:1,className:Wi[y("craft").align],style:{fontFamily:y("craft").fontFamily},children:[(y("craft").eyebrow||o)&&a.jsx(le,{entity:"home_sections",id:"craft",field:"eyebrow",value:y("craft").eyebrow,as:"p",className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:_,placeholder:"Vorspann (optional)"}),a.jsx(le,{entity:"home_sections",id:"craft",field:"title",value:y("craft").title,as:"h2",className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",style:C,placeholder:"Überschrift"}),a.jsx(mr,{entity:"home_sections",id:"craft",field:"body_html",value:y("craft").bodyHtml,label:"Text",className:"legal-content text-neutral-600 dark:text-neutral-300"})]})]}),a.jsxs("div",{className:"grid items-center gap-8 md:grid-cols-2",children:[a.jsxs(He,{direction:"left",className:`order-2 md:order-1 ${Wi[y("advice").align]}`,style:{fontFamily:y("advice").fontFamily},children:[(y("advice").eyebrow||o)&&a.jsx(le,{entity:"home_sections",id:"advice",field:"eyebrow",value:y("advice").eyebrow,as:"p",className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:B,placeholder:"Vorspann (optional)"}),a.jsx(le,{entity:"home_sections",id:"advice",field:"title",value:y("advice").title,as:"h2",className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",style:H,placeholder:"Überschrift"}),a.jsx(mr,{entity:"home_sections",id:"advice",field:"body_html",value:y("advice").bodyHtml,label:"Text",className:"legal-content text-neutral-600 dark:text-neutral-300"})]}),a.jsx(He,{direction:"right",index:1,shine:!0,className:"order-1 md:order-2 rounded-xl shadow-lg",children:a.jsx("img",{src:nv,alt:n("home.adviceImageAlt"),width:900,height:600,className:"w-full rounded-xl object-cover",style:{maxHeight:380}})})]})]})}),!s("home.insights")&&a.jsxs("section",{className:"mx-auto max-w-6xl px-4 py-16 sm:px-6",children:[a.jsxs(He,{className:`mb-8 ${Wi[y("insights").align]}`,style:{fontFamily:y("insights").fontFamily},children:[(y("insights").eyebrow||o)&&a.jsx(le,{entity:"home_sections",id:"insights",field:"eyebrow",value:y("insights").eyebrow,as:"p",className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:ne,placeholder:"Vorspann (optional)"}),a.jsx(le,{entity:"home_sections",id:"insights",field:"title",value:y("insights").title,as:"h2",className:"text-2xl font-bold text-neutral-900 dark:text-white",style:W,placeholder:"Überschrift"}),a.jsx(mr,{entity:"home_sections",id:"insights",field:"body_html",value:y("insights").bodyHtml,label:"Text",className:"legal-content mt-2 text-neutral-600 dark:text-neutral-300"})]}),a.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:d.map((M,V)=>a.jsx(He,{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:M.src,alt:M.alt,width:M.width,height:M.height,loading:"lazy",className:"h-full w-full object-cover transition duration-300 hover:scale-105"})},M.src))})]}),!s("home.reviews")&&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(He,{className:"mb-10 text-center",children:[a.jsx("div",{className:"mb-2 flex items-center justify-center gap-2",children:a.jsx(tv,{className:"h-6 w-6",count:N?Math.round(N.rating):5})}),a.jsx("h2",{className:"text-2xl font-bold text-neutral-900 dark:text-white",children:N?n("home.reviewsRatingDynamic")(N.rating,N.rating_count):n("home.reviewsRating")}),a.jsx(We,{k:"home.reviewsText",as:"p",className:"mt-1 text-neutral-600 dark:text-neutral-300"}),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:a.jsx(We,{k:"home.reviewsLink"})})]}),a.jsx(He,{children:a.jsx(rN,{testimonials:L})})]})}),!s("home.more")&&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(He,{direction:"left",shine:!0,className:"overflow-hidden rounded-xl shadow-lg",children:a.jsx("img",{src:lN,alt:n("home.moreImageAlt"),width:1600,height:905,className:"h-full w-full object-cover",loading:"lazy"})}),a.jsxs(He,{direction:"right",index:1,className:`rounded-xl border border-neutral-200 bg-white p-8 shadow-sm dark:border-neutral-800 dark:bg-neutral-900 ${Wi[y("more").align]}`,style:{fontFamily:y("more").fontFamily},children:[(y("more").eyebrow||o)&&a.jsx(le,{entity:"home_sections",id:"more",field:"eyebrow",value:y("more").eyebrow,as:"p",className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:K,placeholder:"Vorspann (optional)"}),a.jsx(le,{entity:"home_sections",id:"more",field:"title",value:y("more").title,as:"h2",className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",style:q,placeholder:"Überschrift"}),a.jsx(mr,{entity:"home_sections",id:"more",field:"body_html",value:y("more").bodyHtml,label:"Text",className:`legal-content mb-8 max-w-2xl text-neutral-600 dark:text-neutral-300 ${dN[y("more").align]}`}),a.jsx(op,{slug:"more",label:y("more").buttonLabel,url:y("more").buttonUrl,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",style:oe})]})]})}),!s("home.faq")&&a.jsx("section",{id:"faq",className:"scroll-mt-20 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(He,{className:"mb-8 text-center",children:a.jsx(We,{k:"home.faqHeading",as:"h2",className:"text-2xl font-bold text-neutral-900 dark:text-white"})}),a.jsx(He,{index:1,children:a.jsx(tN,{items:f})})]})})]})}function _a(e,t){return e?e.code==="rate_limited"||e.status===429?t("errors.rateLimited"):e.code==="invalid_input"||e.status===422?t("errors.invalidInput"):e.status===404?t("errors.notFound"):e.status===503?t("errors.maintenance"):e.status>=500?t("errors.server"):e.status?t("errors.generic"):t("errors.network"):""}const ap={vw:"volkswagen",mercedes:"mercedes-benz",benz:"mercedes-benz",mb:"mercedes-benz",chevy:"chevrolet",alfa:"alfa romeo"},pN=8,Is=e=>String(e||"").toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g,"").replace(/ß/g,"ss").replace(/[-_./]+/g," ").replace(/\s+/g," ").trim(),na=e=>e.replace(/\s/g,"");function gN(e,t){const n=(e||[]).map(s=>{const i=Is(s.name);return{key:`b${s.id}`,type:"brand",label:s.name,to:`/fahrzeuge/${s.slug}`,text:i,flat:na(i)}}),r=(t||[]).map(s=>{const i=Is(`${s.brand_name} ${s.name}`);return{key:`m${s.id}`,type:"model",label:s.name,brand:s.brand_name,image:s.image_path,to:`/fahrzeuge/${s.brand_slug}/${s.slug}`,text:i,flat:na(i),modelText:Is(s.name)}});return[...n,...r]}function xN(e,t){const n=Is(t).split(" ").filter(Boolean);if(n.length===0)return[];const r=n.map(o=>ap[o]?[o,Is(ap[o])]:[o]),s=na(n.join("")),i=[];for(const o of e){const l=c=>o.text.includes(c)||o.flat.includes(na(c));if(!r.every(c=>c.some(l))&&!o.flat.includes(s))continue;let u=0;for(const c of r)c.some(d=>o.text.startsWith(d))?u+=3:c.some(d=>` ${o.text}`.includes(` ${d}`))&&(u+=2),c.some(d=>{var f;return(f=o.modelText)==null?void 0:f.startsWith(d)})&&(u+=2);o.type==="brand"&&(u+=1),i.push({entry:o,score:u})}return i.sort((o,l)=>l.score-o.score||o.entry.text.localeCompare(l.entry.text,void 0,{numeric:!0})),i.slice(0,pN).map(o=>o.entry)}function yN({brands:e,width:t}){const{t:n}=pe(),r=es(),s=m.useId(),i=m.useRef(null),[o,l]=m.useState(null),[u,c]=m.useState(""),[d,f]=m.useState(!1),[h,g]=m.useState(0),v=m.useRef(!1),w=()=>{o||v.current||(v.current=!0,ie.get("/vehicle-search").then(l).catch(()=>l([])).finally(()=>{v.current=!1}))},b=m.useMemo(()=>gN(e,o),[e,o]),p=m.useMemo(()=>xN(b,u),[b,u]),x=d&&u.trim()!=="",y=p.some(S=>S.image);m.useEffect(()=>g(0),[u]),m.useEffect(()=>{if(!x)return;const S=j=>{var _;(_=i.current)!=null&&_.contains(j.target)||f(!1)};return document.addEventListener("pointerdown",S),()=>document.removeEventListener("pointerdown",S)},[x]);const k=S=>{f(!1),r(S.to)},E=S=>{S.key==="ArrowDown"&&p.length?(S.preventDefault(),f(!0),g(j=>(j+1)%p.length)):S.key==="ArrowUp"&&p.length?(S.preventDefault(),g(j=>(j-1+p.length)%p.length)):S.key==="Enter"&&x&&p[h]?(S.preventDefault(),k(p[h])):S.key==="Escape"&&(x?f(!1):c(""))},T=o===null&&u.trim()!=="";return a.jsxs("div",{ref:i,className:"relative mb-8 max-w-full",style:{width:t?`${t}px`:"100%"},children:[a.jsx("label",{htmlFor:`${s}-input`,className:"sr-only",children:n("vehicleSearch.label")}),a.jsxs("div",{className:"relative flex items-center",children:[a.jsx(bP,{className:"pointer-events-none absolute left-4 h-[18px] w-[18px] text-neutral-400","aria-hidden":"true"}),a.jsx("input",{id:`${s}-input`,type:"search",role:"combobox","aria-expanded":x,"aria-controls":`${s}-list`,"aria-autocomplete":"list","aria-activedescendant":x&&p[h]?`${s}-${p[h].key}`:void 0,autoComplete:"off",spellCheck:!1,value:u,placeholder:n("vehicleSearch.placeholder"),onFocus:()=>{w(),f(!0)},onChange:S=>{w(),c(S.target.value),f(!0)},onKeyDown:E,className:"vehicle-search-input w-full rounded-xl border border-neutral-300 bg-gradient-to-b from-white to-neutral-50 py-3.5 pl-11 pr-11 text-[15px] text-neutral-900 outline-none transition-[border-color,box-shadow] duration-200 placeholder:text-neutral-400 focus:border-brand-500 dark:border-neutral-700 dark:from-neutral-800 dark:to-neutral-900 dark:text-white dark:placeholder:text-neutral-500 [&::-webkit-search-cancel-button]:hidden"}),u&&a.jsx("button",{type:"button",onClick:()=>c(""),"aria-label":n("vehicleSearch.clear"),className:"absolute right-3 rounded-md p-1 text-neutral-400 transition hover:text-neutral-700 dark:hover:text-neutral-200",children:a.jsx(yi,{className:"h-4 w-4"})})]}),x&&a.jsx("div",{className:"absolute inset-x-0 top-full z-30 mt-2 overflow-hidden rounded-xl border border-neutral-200 bg-white shadow-lg dark:border-neutral-800 dark:bg-neutral-900",children:p.length>0?a.jsx("ul",{id:`${s}-list`,role:"listbox",className:"max-h-[360px] overflow-y-auto py-1",children:p.map((S,j)=>a.jsx("li",{id:`${s}-${S.key}`,role:"option","aria-selected":j===h,children:a.jsxs(U,{to:S.to,onClick:()=>f(!1),onMouseEnter:()=>g(j),className:`flex items-center gap-3 px-4 py-2.5 text-[15px] ${j===h?"bg-neutral-100 dark:bg-neutral-800":""}`,children:[S.type==="model"?a.jsxs(a.Fragment,{children:[S.image?a.jsx("img",{src:S.image,alt:"",loading:"lazy",className:"h-9 w-14 shrink-0 rounded object-cover"}):y&&a.jsx("span",{className:"h-9 w-14 shrink-0 rounded bg-neutral-100 dark:bg-neutral-800"}),a.jsxs("span",{className:"min-w-0 flex-1 truncate text-neutral-900 dark:text-white",children:[a.jsx("span",{className:"text-neutral-500 dark:text-neutral-400",children:S.brand})," ",S.label]})]}):a.jsxs("span",{className:"min-w-0 flex-1 truncate text-neutral-900 dark:text-white",children:[S.label,a.jsx("span",{className:"ml-2 text-xs uppercase tracking-wider text-neutral-500 dark:text-neutral-400",children:n("vehicleSearch.allModels")})]}),a.jsx(TC,{className:`h-4 w-4 shrink-0 text-brand-500 transition-opacity ${j===h?"opacity-100":"opacity-0"}`,"aria-hidden":"true"})]})},S.key))}):a.jsx("div",{id:`${s}-list`,className:"px-4 py-3 text-sm text-neutral-500 dark:text-neutral-400",children:T?n("vehicleSearch.loading"):a.jsxs(a.Fragment,{children:[n("vehicleSearch.noResults")," ",a.jsx(U,{to:"/kontakt",className:"font-semibold text-brand-500 hover:underline",children:n("vehicleSearch.contact")})]})})})]})}function vN(){const[e,t]=m.useState(null),[n,r]=m.useState(null),s=Ta(),{t:i}=pe(),o=Wd(),{vehicle_tile_width:l,vehicle_tile_height:u}=It(),c={width:`${l}px`,height:`${u}px`},d=m.useRef(null),[f,h]=m.useState(0);m.useEffect(()=>{const p=d.current;if(!p)return;const x=new ResizeObserver(([y])=>h(y.contentRect.width));return x.observe(p),()=>x.disconnect()},[]);const g=16,v=e?e.length:6,w=Math.max(1,Math.min(v,Math.floor((f+g)/(Number(l)+g)))),b=f&&v?w*Number(l)+(w-1)*g:void 0;return dr({title:i("vehicleSelect.metaTitle"),description:i("vehicleSelect.metaDescription"),path:"/fahrzeuge"}),m.useEffect(()=>{s.vehicles.enabled&&!s.bypass||ie.get("/brands").then(t).catch(p=>r(p))},[s.vehicles.enabled,s.bypass]),s.vehicles.enabled&&!s.bypass?a.jsx(vi,{message:s.vehicles.message}):a.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[a.jsx("div",{ref:d}),s.vehicles.enabled&&s.bypass&&a.jsx(wi,{inline:!0}),a.jsx(We,{k:"vehicleSelect.title",as:"h1",className:"mb-2 block text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl"}),a.jsx(We,{k:"vehicleSelect.intro",as:"p",className:"mb-6 block text-neutral-600 dark:text-neutral-300"}),a.jsx(yN,{brands:e,width:b}),n&&a.jsx("p",{className:"text-red-600",children:typeof n=="string"?n:_a(n,i)}),e===null&&!n&&a.jsx("div",{className:"flex flex-wrap gap-4","aria-busy":"true","aria-label":i("vehicleSelect.loading"),children:Array.from({length:6},(p,x)=>a.jsx("div",{style:c,className:"shrink-0 animate-pulse rounded-xl bg-neutral-200 dark:bg-neutral-800"},x))}),(e==null?void 0:e.length)===0&&!n&&a.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:i("vehicleSelect.empty")}),a.jsx("div",{className:"flex flex-wrap gap-4",children:(e||[]).map(p=>p.image_path?a.jsxs(U,{to:`/fahrzeuge/${p.slug}`,style:c,className:"group relative block shrink-0 overflow-hidden rounded-xl bg-neutral-900 shadow-sm transition hover:shadow-lg",children:[a.jsx("img",{src:p.image_path,alt:"",loading:"lazy",decoding:"async",width:l,height:u,className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}),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(le,{entity:"brands",id:p.id,field:"name",lang:"de",value:p.name,className:"absolute inset-x-0 bottom-0 p-4 text-center text-lg font-extrabold text-white",style:ar(o,`brands.${p.id}.name`)})]},p.id):a.jsx(U,{to:`/fahrzeuge/${p.slug}`,style:c,className:"flex shrink-0 flex-col items-center justify-center gap-3 rounded-xl border border-neutral-200 bg-white px-6 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:a.jsx(le,{entity:"brands",id:p.id,field:"name",lang:"de",value:p.name,style:ar(o,`brands.${p.id}.name`)})},p.id))})]})}function Yd(){const{t:e}=pe(),{phone:t}=It(),n=Pa();return dr({title:e("notFound.metaTitle"),noindex:!0}),a.jsxs("div",{className:"mx-auto max-w-2xl px-4 py-20 text-center sm:px-6",children:[a.jsx("p",{className:"text-sm font-semibold uppercase tracking-[4px] text-brand-500",children:"404"}),a.jsx("h1",{className:"mt-3 text-3xl font-bold text-neutral-900 dark:text-white sm:text-4xl",children:e("notFound.title")}),a.jsx("p",{className:"mx-auto mt-4 max-w-md text-neutral-600 dark:text-neutral-300",children:e("notFound.text")}),a.jsxs("div",{className:"mt-10 flex flex-wrap justify-center gap-3",children:[!n("page.vehicles")&&a.jsxs(U,{to:"/fahrzeuge",className:"inline-flex items-center gap-2 rounded-md bg-brand-500 px-5 py-3 text-sm font-semibold text-white shadow-sm hover:bg-brand-600",children:[a.jsx(Jo,{className:"h-4 w-4"}),e("notFound.toVehicles")]}),a.jsxs(U,{to:"/kontakt",className:"inline-flex items-center gap-2 rounded-md border border-neutral-300 px-5 py-3 text-sm font-semibold text-neutral-700 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-800",children:[a.jsx(oc,{className:"h-4 w-4"}),e("notFound.toContact")]}),t&&a.jsxs("a",{href:ai(t),className:"inline-flex items-center gap-2 rounded-md border border-neutral-300 px-5 py-3 text-sm font-semibold text-neutral-700 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-800",children:[a.jsx(or,{className:"h-4 w-4"}),t]})]}),a.jsx(U,{to:"/",className:"mt-8 inline-block text-sm text-neutral-500 underline hover:text-brand-500",children:e("notFound.toHome")})]})}function wN(){const{brandSlug:e}=ad(),[t,n]=m.useState(null),[r,s]=m.useState(null),i=Ta(),{t:o}=pe(),l=Wd(),u=Ue(t?`brands.${t.brand.id}.name`:""),{vehicle_tile_width:c,vehicle_tile_height:d}=It(),f={width:`${c}px`,height:`${d}px`};return m.useEffect(()=>{i.vehicles.enabled&&!i.bypass||ie.get(`/brands/${e}/models`).then(n).catch(h=>s(h))},[e,i.vehicles.enabled,i.bypass]),dr({title:t?`${t.brand.name} ${o("brandPage.titleSuffix")}`:o("brandPage.metaTitleFallback"),description:t?o("brandPage.metaDescription")(t.brand.name):void 0,path:`/fahrzeuge/${e}`}),i.vehicles.enabled&&!i.bypass?a.jsx(vi,{message:i.vehicles.message}):r?r.status===404?a.jsx(Yd,{}):a.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:_a(r,o)}):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(wi,{inline:!0}),a.jsxs("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:[a.jsx("span",{style:u,children:t.brand.name})," – ",o("brandPage.titleSuffix")]}),t.models.length===0&&a.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:o("brandPage.empty")}),a.jsx("div",{className:"flex flex-wrap gap-4",children:t.models.map(h=>h.image_path?a.jsxs(U,{to:`/fahrzeuge/${e}/${h.slug}`,style:f,className:"group relative block shrink-0 overflow-hidden rounded-xl bg-neutral-900 shadow-sm transition hover:shadow-lg",children:[a.jsx("img",{src:h.image_path,alt:"",loading:"lazy",decoding:"async",width:c,height:d,className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}),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(le,{entity:"car_models",id:h.id,field:"name",lang:"de",value:h.name,className:"absolute inset-x-0 bottom-0 p-4 text-center text-lg font-extrabold text-white",style:ar(l,`car_models.${h.id}.name`)})]},h.id):a.jsx(U,{to:`/fahrzeuge/${e}/${h.slug}`,style:f,className:"flex shrink-0 flex-col items-center justify-center gap-3 rounded-xl border border-neutral-200 bg-white px-6 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:a.jsx(le,{entity:"car_models",id:h.id,field:"name",lang:"de",value:h.name,style:ar(l,`car_models.${h.id}.name`)})},h.id))})]}):a.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:o("brandPage.loading")})}function bN({text:e}){return e?e.split(/(\*\*[^*]+\*\*)/g).map((n,r)=>{const s=n.match(/^\*\*([^*]+)\*\*$/);return s?a.jsx("strong",{children:s[1]},r):a.jsx("span",{children:n},r)}):null}const lp="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==",kN="/assets/base-BKOm0Bib.webp",SN="/assets/clear-DZZMSrMX.webp",jN="/assets/drive-BE2W1yna.webp",EN="/assets/prime-BTVNe2Gb.webp",CN="/assets/elite_r-BRvz_pyr.webp",PN="/assets/apex-CFy2qup8.webp",TN="/assets/statement-pTO-wTPx.webp",NN="/assets/limitless-DDs0S_PU.webp";function _n(e,t,n){if(!e)return"";if(n==="en"){const r=e[`${t}_en`];if(r)return r}return e[t]}const _N=(e,t,n)=>{t/=100,n/=100;const r=o=>(o+e/30)%12,s=t*Math.min(n,1-n),i=o=>n-s*Math.max(-1,Math.min(r(o)-3,Math.min(9-r(o),1)));return[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)]},_l=(e,t,n)=>`rgb(${_N(e,t,n).join(", ")})`,up=e=>e.map(([t,n,r,s,i,o])=>({bgTop:_l(t,n,r),border:_l(t,n,r+8),accent:_l(s,i,o),img:null})),cp={graphite:[{accent:"#b6b6b6",border:"#2a2a2a",bgTop:"#1c1c1c",img:kN},{accent:"#d3d3d3",border:"#2e2e2e",bgTop:"#212121",img:SN},{accent:"#8fb8bd",border:"#26383b",bgTop:"#16282b",img:jN},{accent:"#6fbf73",border:"#1f3a24",bgTop:"#122916",img:EN},{accent:"#63d34f",border:"#204a1c",bgTop:"#123312",img:CN},{accent:"#8bea3c",border:"#2b5518",bgTop:"#173a0f",img:PN},{accent:"#d9a83c",border:"#4a3a16",bgTop:"#33270d",img:TN},{accent:"#f2c14e",border:"#5a4718",bgTop:"#3d2f0c",img:NN}],"deep-blue":up([[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":up([[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]])},MN="#f2f2f2",dp="#8a8a8a",fp="#c4c4c4",hp=5,LN=3,AN={recommended:{Icon:NP,className:"bg-brand-500 text-white"},popular:{Icon:JC,className:"bg-amber-400 text-neutral-950"},tip:{Icon:rP,className:"bg-sky-500 text-white"},coming_soon:{Icon:Dy,className:"bg-white text-neutral-900"},custom:{Icon:null,className:"bg-brand-500 text-white"}};function DN({pkg:e,tier:t,tierT:n,layout:r,bullets:s,formatPrice:i,contactUrl:o,priceNote:l,t:u}){const[c,d]=m.useState(!1),f=at().canEdit("packages"),[h,g]=m.useState(!1),v=m.useRef(null),w=s.length-hp,b=c?s:s.slice(0,hp);m.useLayoutEffect(()=>{const _=v.current;if(!_||c){g(!1);return}const C=()=>g([..._.querySelectorAll("[data-clamp]")].some(H=>H.scrollHeight>H.clientHeight+1));C();const B=new ResizeObserver(C);return B.observe(_),()=>B.disconnect()},[c,s.length,e.description]);const p=Wd(),x=ar(p,`packages.${e.id}.description`),y=ar(p,`packages.${e.id}.price_text`),{package_card_height:k}=It(),E=AN[e.badge],T=r!=="grid",S=e.badge==="custom"?e.badge_text:e.badge&&u(`modelPage.badges.${e.badge}`),j=t.img?null:{backgroundColor:t.accent,WebkitMaskImage:`url(${lp})`,maskImage:`url(${lp})`,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%)`,...T?{gridRow:"span 4",gridTemplateRows:"subgrid",rowGap:0}:{minHeight:`${k}px`}},className:r==="strip"?"relative grid snap-start overflow-hidden rounded-[18px] border shadow-xl shadow-neutral-900/20 dark:shadow-black/40":r==="coverflow"?"relative grid snap-center overflow-hidden rounded-[18px] border shadow-xl shadow-neutral-900/20 will-change-transform dark:shadow-black/40":"relative flex 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:{...j,opacity:.2+n*.45,filter:"blur(18px)"},"aria-hidden":"true"}),a.jsx("div",{className:"pointer-events-none absolute inset-0",style:{...j,opacity:.55+n*.45},"aria-hidden":"true"})]}),E&&S&&a.jsxs("span",{className:`absolute top-2 left-1/2 z-10 flex max-w-[calc(100%-16px)] -translate-x-1/2 items-center gap-1 whitespace-nowrap rounded-full px-3 py-1 text-xs font-bold shadow ${E.className}`,children:[E.Icon&&a.jsx(E.Icon,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),a.jsx("span",{className:"truncate",children:S})]}),a.jsxs("div",{className:"relative z-10 text-center",style:{padding:"34px 20px 0",gridRow:1},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:a.jsx(le,{entity:"packages",id:e.id,field:"name",lang:"de",value:e.name,placeholder:"Paketname"})}),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:{gridRow:2,padding:"18px 20px 14px",background:c?"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(lc,{entity:"packages",id:e.id,field:"description",value:e.description,label:"Zusätzliche Stichpunkte",hint:"Eine Zeile = ein Stichpunkt (unter den Produkten). **fett** wird fett dargestellt. Die Produkte selbst pflegst du im Admin unter Pakete.",children:a.jsx("ul",{ref:v,className:"space-y-1.5 text-left",children:b.map((_,C)=>a.jsxs("li",{className:"flex items-start gap-2",style:{fontSize:"13px",color:fp,..._.fromDescription?x:null},children:[a.jsx(Ay,{className:"mt-0.5 h-3.5 w-3.5 shrink-0",style:{color:t.accent}}),a.jsx("span",{"data-clamp":!0,className:"leading-snug",style:c?void 0:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:LN,overflow:"hidden"},children:_.fromDescription?a.jsx(bN,{text:_.text}):_.text})]},C))})}),(c||w>0||h)&&a.jsxs("button",{type:"button",onClick:()=>d(_=>!_),className:"mt-2.5 flex items-center gap-1 hover:opacity-80",style:{fontSize:"13px",color:t.accent},children:[c?u("modelPage.lessBullets"):w>0?u("modelPage.moreBullets")(w):u("modelPage.showMore"),c?a.jsx(UC,{className:"h-3.5 w-3.5"}):a.jsx(FC,{className:"h-3.5 w-3.5"})]})]}),s.length===0&&f&&a.jsx(lc,{entity:"packages",id:e.id,field:"description",value:e.description,label:"Zusätzliche Stichpunkte",hint:"Eine Zeile = ein Stichpunkt. **fett** wird fett dargestellt.",className:"relative z-10 mx-5 mt-4 text-center text-xs",style:{gridRow:2,color:fp},children:"+ Stichpunkte hinzufügen"}),a.jsx("div",{className:"relative z-10 flex-1",style:{gridRow:3}}),a.jsx("div",{className:"relative z-10",style:{gridRow:4,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:dp},children:u("modelPage.totalPrice")}),a.jsx("div",{style:{marginTop:"4px",fontFamily:"'Barlow Condensed', sans-serif",fontSize:"30px",fontWeight:600,letterSpacing:"1px",color:MN,...e.price_text?y:null},children:f?a.jsx(le,{entity:"packages",id:e.id,field:"price_text",value:e.price_text,placeholder:i(e.total_price),title:"Leer lassen = Preis automatisch aus den Produkten"}):e.price_text||i(e.total_price)}),!e.price_text&&l&&a.jsx("div",{style:{marginTop:"2px",fontSize:"11px",color:dp},children:l}),a.jsx(U,{to:o(e),onClick:()=>Nn("select_package",{package_name:e.name,value:Number(e.total_price)||void 0,currency:"EUR"}),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:u("modelPage.requestContact")}),e.video_url&&a.jsx("div",{className:"mt-3",children:a.jsxs("a",{href:e.video_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 rounded-full border border-white/15 bg-white/5 px-3 py-1 text-xs font-semibold text-white transition hover:bg-white/15",children:[a.jsx(GC,{className:"h-4 w-4 text-red-500","aria-hidden":"true"}),u("modelPage.videoLink")]})})]})})]})}function RN(){const{brandSlug:e,modelSlug:t}=ad(),[n,r]=m.useState(null),[s,i]=m.useState(null),o=Ta(),{t:l,language:u}=pe(),c=at(),{package_card_theme:d,package_card_layout:f,package_wheel_hint_interval:h,package_card_width:g,package_card_height:v,phone:w,whatsapp:b,price_note:p,price_note_en:x}=It(),y=u==="en"&&x||p,k=cp[d]||cp.graphite,E=["grid","strip","coverflow"].includes(f)?f:"strip",T=Math.max(2,Number(h)||8)*1e3,S=m.useRef(null),j=m.useRef(null),_=m.useRef(null),[C,B]=m.useState(!1),H=P=>new Intl.NumberFormat(u==="de"?"de-DE":"en-US",{style:"currency",currency:"EUR"}).format(P);m.useEffect(()=>{o.vehicles.enabled&&!o.bypass||ie.get(`/models/${e}/${t}/packages`).then(r).catch(P=>i(P))},[e,t,o.vehicles.enabled,o.bypass]),m.useEffect(()=>{const P=S.current;if(E!=="coverflow"||!P)return;let R=0;const z=()=>{R=0;const se=P.scrollLeft+P.clientWidth/2;for(const je of P.children){const Ve=je.offsetLeft+je.offsetWidth/2,jt=Math.max(-1,Math.min(1,(Ve-se)/(je.offsetWidth*1.4))),M=Math.abs(jt);je.style.transform=`rotateY(${(-jt*35).toFixed(2)}deg) scale(${(1-M*.13).toFixed(3)}) translateZ(${(-M*60).toFixed(1)}px)`,je.style.zIndex=String(100-Math.round(M*50))}},G=()=>{R||(R=requestAnimationFrame(z))};z(),P.addEventListener("scroll",G,{passive:!0});const ee=new ResizeObserver(G);return ee.observe(P),()=>{P.removeEventListener("scroll",G),ee.disconnect(),cancelAnimationFrame(R)}},[E,n]),m.useEffect(()=>{const P=S.current;if(E==="grid"||!P)return;const R=window.matchMedia("(pointer: coarse)").matches;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let G=[],ee=0;const se=()=>{const Ve=Math.min(P.clientWidth*.4,160);G.push(setTimeout(()=>P.scrollTo({left:Ve,behavior:"smooth"}),500)),G.push(setTimeout(()=>P.scrollTo({left:0,behavior:"smooth"}),1250)),R||(G.push(setTimeout(()=>B(!0),450)),G.push(setTimeout(()=>B(!1),1700)))},je=new IntersectionObserver(([Ve])=>{Ve.isIntersecting&&(je.disconnect(),se(),ee=setInterval(()=>{P.scrollLeft<=1&&se()},T))},{threshold:.35});return je.observe(P),()=>{je.disconnect(),clearInterval(ee),G.forEach(clearTimeout)}},[E,n,T]),m.useEffect(()=>{const P=S.current;if(E==="grid"||!P)return;let R=0,z=0,G=!1,ee=0,se=0;const je=()=>[...P.children].map(V=>V.offsetLeft+V.offsetWidth/2),Ve=(V,Ee)=>{let Ie=0,ae=1/0;return V.forEach((we,pt)=>{const Fn=Math.abs(we-Ee);Fn{G=!1;const V=je();if(!V.length)return;const Ee=P.scrollLeft+P.clientWidth/2,Ie=Ve(V,Ee);let ae=Ie;Ie===ee&&Math.abs(se)>4&&(ae=se>0?Math.min(ee+1,V.length-1):Math.max(ee-1,0));const we=P.scrollWidth-P.clientWidth,pt=Math.max(0,Math.min(V[ae]-P.clientWidth/2,we));P.scrollTo({left:pt,behavior:"smooth"}),clearTimeout(z),z=setTimeout(()=>{P.style.scrollSnapType=""},450)},M=V=>{if(Math.abs(V.deltaX)>Math.abs(V.deltaY))return;const Ee=P.scrollWidth-P.clientWidth;if(Ee<=1)return;const Ie=P.scrollLeft<=1,ae=P.scrollLeft>=Ee-1;V.deltaY<0&&Ie||V.deltaY>0&&ae||(V.preventDefault(),G||(G=!0,se=0,ee=Ve(je(),P.scrollLeft+P.clientWidth/2)),se+=V.deltaY,P.style.scrollSnapType="none",P.scrollLeft+=V.deltaY,clearTimeout(R),R=setTimeout(jt,150))};return P.addEventListener("wheel",M,{passive:!1}),()=>{P.removeEventListener("wheel",M),clearTimeout(R),clearTimeout(z)}},[E,n]),m.useEffect(()=>{const P=S.current,R=j.current,z=_.current;if(E==="grid"||!P||!R||!z)return;let G=0;const ee=()=>{G=0;const ae=P.scrollWidth-P.clientWidth;if(ae<=1){R.style.opacity="0",R.style.pointerEvents="none";return}R.style.opacity="1",R.style.pointerEvents="auto";const we=R.clientWidth,pt=Math.max(32,P.clientWidth/P.scrollWidth*we);z.style.width=`${pt}px`,z.style.transform=`translateX(${(P.scrollLeft/ae*(we-pt)).toFixed(1)}px)`},se=()=>{G||(G=requestAnimationFrame(ee))};ee(),P.addEventListener("scroll",se,{passive:!0});const je=new ResizeObserver(se);je.observe(P);let Ve=!1,jt=0;const M=ae=>{const we=R.getBoundingClientRect(),pt=z.clientWidth,Fn=Math.min(Math.max(ae-we.left-jt,0),we.width-pt);P.scrollLeft=Fn/(we.width-pt)*(P.scrollWidth-P.clientWidth)},V=ae=>{Ve=!0,R.setPointerCapture(ae.pointerId),P.style.scrollSnapType="none";const we=z.getBoundingClientRect();jt=ae.clientX>=we.left&&ae.clientX<=we.right?ae.clientX-we.left:z.clientWidth/2,ae.clientX>=we.left&&ae.clientX<=we.right||M(ae.clientX)},Ee=ae=>{Ve&&M(ae.clientX)},Ie=ae=>{var we;Ve&&(Ve=!1,(we=R.hasPointerCapture)!=null&&we.call(R,ae.pointerId)&&R.releasePointerCapture(ae.pointerId),P.style.scrollSnapType="")};return R.addEventListener("pointerdown",V),R.addEventListener("pointermove",Ee),R.addEventListener("pointerup",Ie),R.addEventListener("pointercancel",Ie),()=>{P.removeEventListener("scroll",se),je.disconnect(),cancelAnimationFrame(G),R.removeEventListener("pointerdown",V),R.removeEventListener("pointermove",Ee),R.removeEventListener("pointerup",Ie),R.removeEventListener("pointercancel",Ie)}},[E,n]),dr({title:n?l("modelPage.metaTitle")(n.model.brand_name,n.model.name):l("modelPage.metaTitleFallback"),description:n?l("modelPage.metaDescription")(n.model.brand_name,n.model.name):void 0,path:`/fahrzeuge/${e}/${t}`});const ne=Ue(n?`car_models.${n.model.id}.name`:"");if(o.vehicles.enabled&&!o.bypass)return a.jsx(vi,{message:o.vehicles.message});if(s)return s.status===404?a.jsx(Yd,{}):a.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:_a(s,l)});if(!n)return a.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:l("modelPage.loading")});const{model:W}=n,K=n.packages.map(P=>({...P,name:c.getValue("packages",P.id,"name","de",P.name),description:c.getValue("packages",P.id,"description",u,_n(P,"description",u)),tagline:_n(P,"tagline",u),price_text:c.getValue("packages",P.id,"price_text",u,_n(P,"price_text",u))})),q=new Map([...K].sort((P,R)=>P.total_price-R.total_price).map((P,R)=>[P.id,R])),oe=P=>{const R=P.tier_count??K.length,z=P.tier_rank??q.get(P.id)??0,G=R<=1?0:z/(R-1),ee=Math.round(G*(k.length-1));return{tier:k[ee],tierT:G}},N=P=>[...P.products.map(R=>({text:R.name_override||R.scraped_name||l("modelPage.productLoading"),fromDescription:!1})),...(P.description||"").split(`
+`).map(R=>R.trim()).filter(Boolean).map(R=>({text:R,fromDescription:!0}))],A=P=>`/kontakt?${new URLSearchParams({brand:W.brand_name,model:W.name,package:P.name,packageId:P.id,total:P.total_price,brandSlug:e,modelSlug:t}).toString()}`,L=`/kontakt?${new URLSearchParams({brand:W.brand_name,model:W.name}).toString()}`,F=l("modelPage.whatsappText")(W.brand_name,W.name);return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"mx-auto max-w-6xl px-4 pt-12 sm:px-6",children:[o.vehicles.enabled&&o.bypass&&a.jsx(wi,{inline:!0}),a.jsxs("h1",{className:`text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl ${K.length?"mb-2":"mb-8"}`,children:[W.brand_name," ",a.jsx(le,{entity:"car_models",id:W.id,field:"name",lang:"de",value:W.name,style:ne})," – ",l("modelPage.titleSuffix")]}),K.length===0&&a.jsxs("div",{className:"pb-12",children:[a.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:l("modelPage.empty")}),a.jsx(U,{to:L,className:"mt-5 inline-block rounded-md bg-brand-500 px-5 py-3 text-sm font-semibold text-white shadow-sm hover:bg-brand-600",children:l("modelPage.customRequest")})]})]}),K.length>0&&a.jsx("section",{className:"py-10 sm:py-14",style:{fontFamily:"'Barlow', sans-serif"},children:a.jsxs("div",{className:E==="grid"?"mx-auto max-w-6xl px-4 sm:px-6":"relative mx-auto max-w-[1880px] px-4 sm:px-6",children:[a.jsx("div",{ref:E==="grid"?void 0:S,className:E==="grid"?"grid items-stretch gap-[18px]":"grid select-none gap-x-[18px] overflow-x-auto pb-3 snap-x snap-mandatory [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",style:E==="grid"?{gridTemplateColumns:`repeat(auto-fill, minmax(${g}px, 1fr))`,gridAutoRows:"1fr"}:{gridAutoFlow:"column",gridAutoColumns:`${g}px`,gridTemplateRows:"auto auto 1fr auto",minHeight:`${Number(v)+(E==="coverflow"?22:12)}px`,...E==="coverflow"?{perspective:"1200px",paddingLeft:`calc(50% - ${g/2}px)`,paddingRight:`calc(50% - ${g/2}px)`,paddingTop:"10px"}:null},children:K.map(P=>{const{tier:R,tierT:z}=oe(P);return a.jsx(DN,{pkg:P,tier:R,tierT:z,layout:E,bullets:N(P),formatPrice:H,contactUrl:A,priceNote:y,t:l},P.id)})}),E!=="grid"&&a.jsx("div",{className:`pointer-events-none absolute inset-x-0 top-1/2 z-[200] flex -translate-y-1/2 justify-center transition-opacity duration-300 ${C?"opacity-100":"opacity-0"}`,"aria-hidden":"true",children:a.jsxs("div",{className:"flex items-center gap-2 rounded-full border border-white/10 bg-neutral-900/85 px-4 py-2 text-xs font-medium text-white shadow-lg backdrop-blur-sm",children:[a.jsx(zC,{className:"h-3.5 w-3.5 text-brand-400"}),a.jsx(dP,{className:"h-4 w-4 text-brand-400"}),a.jsx($C,{className:"h-3.5 w-3.5 text-brand-400"}),a.jsx("span",{children:l("modelPage.wheelHint")})]})}),E!=="grid"&&a.jsx("div",{ref:j,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:_,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"}})})]})}),K.length>0&&a.jsxs("div",{className:"mx-auto max-w-6xl px-4 pb-24 text-center sm:px-6 sm:pb-14",children:[a.jsx("p",{className:"text-sm text-neutral-600 dark:text-neutral-300",children:l("modelPage.customHint")}),a.jsx(U,{to:L,className:"mt-2 inline-block text-sm font-semibold text-brand-600 underline hover:text-brand-500",children:l("modelPage.customRequest")})]}),(w||b)&&a.jsxs("div",{className:"fixed inset-x-0 bottom-0 z-20 flex gap-3 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:hidden",children:[w&&a.jsxs("a",{href:ai(w),onClick:()=>Nn("contact_call"),className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white",children:[a.jsx(or,{className:"h-4 w-4"}),l("nav.call")]}),b&&a.jsxs("a",{href:Hd(b,F),target:"_blank",rel:"noopener noreferrer",onClick:()=>Nn("contact_whatsapp"),className:"flex flex-1 items-center justify-center gap-2 rounded-md border border-neutral-300 px-4 py-2.5 text-sm font-semibold text-neutral-700 dark:border-neutral-700 dark:text-neutral-200",children:[a.jsx(Iy,{className:"h-4 w-4"}),l("nav.whatsapp")]})]})]})}const VN={car:Jo,caravan:RC,"car-front":LC,cog:YC,zap:VP,boxes:_C,"shield-alert":EP,video:AP},IN=m.lazy(()=>X(()=>import("./iconRegistry-B5nlmNdu.js"),__vite__mapDeps([0,1,2,3,4])));function FN({name:e,className:t="h-6 w-6",...n}){if(!e)return null;const r=VN[e];return r?a.jsx(r,{className:t,...n}):a.jsx(m.Suspense,{fallback:a.jsx("span",{className:`inline-block ${t}`,"aria-hidden":"true"}),children:a.jsx(IN,{name:e,className:t,...n})})}function ON(){const[e,t]=m.useState([]),n=Ta(),{t:r,language:s}=pe(),i=at();return m.useEffect(()=>{ie.get("/services").then(t).catch(()=>t([]))},[]),dr({title:r("leistungen.metaTitle"),description:r("leistungen.metaDescription"),path:"/leistungen"}),n.services.enabled&&!n.bypass?a.jsx(vi,{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(wi,{inline:!0}),a.jsx(We,{k:"leistungen.title",as:"h1",className:"mb-2 block text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl"}),a.jsx(We,{k:"leistungen.intro",as:"p",className:"mb-10 block max-w-2xl text-neutral-600 dark:text-neutral-300"}),a.jsx("div",{className:"grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:e.map(o=>({...o,title:_n(o,"title",s),description:_n(o,"description",s),cta_label:_n(o,"cta_label",s)})).map((o,l)=>a.jsxs(He,{index:l%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:[o.image_path&&a.jsx("img",{src:o.image_path,alt:o.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(FN,{name:o.icon_name,className:"h-6 w-6"})})]}),a.jsxs("div",{className:"p-6 pt-8",children:[a.jsx(le,{entity:"services",id:o.id,field:"title",value:o.title,as:"h2",className:"mb-2 block font-semibold text-neutral-900 dark:text-white"}),a.jsx(le,{entity:"services",id:o.id,field:"description",value:o.description,as:"p",multiline:!0,className:"mb-3 block text-sm text-neutral-600 dark:text-neutral-300"}),a.jsxs(U,{to:o.cta_url||"/kontakt",className:"text-sm font-semibold text-brand-600 hover:underline dark:text-brand-400",children:[i.canEdit("services")||o.cta_label?a.jsx(le,{entity:"services",id:o.id,field:"cta_label",value:o.cta_label,placeholder:r("leistungen.contact")}):r("leistungen.contact")," ","→"]})]})]},o.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(We,{k:"leistungen.notListedTitle",as:"h2",className:"mb-2 block text-xl font-bold text-neutral-900 dark:text-white"}),a.jsx(We,{k:"leistungen.notListedText",as:"p",className:"mb-5 block text-neutral-600 dark:text-neutral-300"}),a.jsx(U,{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:a.jsx(We,{k:"leistungen.contact"})})]})]})}function zN({name:e,description:t,className:n="",children:r}){const{consent:s,acceptAll:i,openSettings:o}=ss();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:o,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Cookie-Einstellungen"})]})]})}const BN=e=>(e||"").replace(/[^\d+]/g,""),po={fontFamily:"'Michroma', sans-serif"};function $N({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 HN({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 UN={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 mp({formatted:e,color:t}){const[n,r]=e.split("€");return a.jsxs("span",{style:{...po,color:t},children:[n,a.jsx("span",{style:{fontFamily:"'Barlow', sans-serif"},children:"€"}),r]})}function Gi({icon:e,label:t,name:n,type:r="text",required:s,value:i,onChange:o,placeholder:l,autoComplete:u,inputMode:c}){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,autoComplete:u,inputMode:c,value:i,onChange:o,placeholder:l,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 WN(){const[e]=Ob(),{phone:t,whatsapp:n,contact_email:r,address_street:s,address_zip:i,address_city:o,business_hours:l,price_note:u,price_note_en:c}=It(),{t:d,language:f}=pe(),{consent:h}=ss(),g=[s,[i,o].filter(Boolean).join(" ")].filter(Boolean).join(", "),v=encodeURIComponent(g),w=`https://www.google.com/maps/dir/?api=1&destination=${v}`,b=Ky(l,d("footer.closed")),p=M=>new Intl.NumberFormat(f==="de"?"de-DE":"en-US",{style:"currency",currency:"EUR"}).format(M),[x,y]=m.useState(()=>({name:"",email:"",phone:"",vin:"",message:e.get("topic")||""})),[k,E]=m.useState("idle"),[T,S]=m.useState(""),[j,_]=m.useState([]),[C,B]=m.useState([]),H=m.useRef(Date.now()),ne=m.useRef(null),W=e.get("packageId"),K=e.get("brandSlug"),q=e.get("modelSlug"),[oe,N]=m.useState(e.get("total")?Number(e.get("total")):null),[A,L]=m.useState(null),F=f==="en"&&c||u;m.useEffect(()=>{!W||!K||!q||ie.get(`/models/${encodeURIComponent(K)}/${encodeURIComponent(q)}/packages`).then(M=>{var Ee;const V=(Ee=M==null?void 0:M.packages)==null?void 0:Ee.find(Ie=>String(Ie.id)===String(W));V&&(N(Number(V.total_price)),L(V.price_text||null))}).catch(()=>{})},[W,K,q]),m.useEffect(()=>{if(!W){_([]);return}ie.get(`/packages/${W}/upgrades`).then(_).catch(()=>_([]))},[W]);const P=M=>{B(V=>V.includes(M)?V.filter(Ee=>Ee!==M):[...V,M])},R=j.filter(M=>C.includes(M.id)).reduce((M,V)=>M+Number(V.price),0);dr({title:d("contactPage.metaTitle"),description:d("contactPage.metaDescription"),path:"/kontakt"});const z={brand:e.get("brand")||"",model:e.get("model")||"",package:e.get("package")||""},G=!!(z.brand&&z.model&&z.package),ee=!G&&!!(z.brand&&z.model),se=M=>y(V=>({...V,[M.target.name]:M.target.value})),je=async M=>{var V;M.preventDefault(),E("sending"),S("");try{await ie.post("/contact",{...x,website:((V=M.target.elements.website)==null?void 0:V.value)||"",fill_ms:Date.now()-H.current,brand_name:z.brand||null,model_name:z.model||null,package_name:z.package||null,product_name:e.get("product")||null,package_id:W||null,package_product_id:e.get("productId")||null,upgrade_ids:C}),E("sent"),y({name:"",email:"",phone:"",vin:"",message:""}),Nn("generate_lead",{package_name:z.package||void 0,value:oe||void 0,currency:"EUR"})}catch(Ee){S(_a(Ee,d)),E("idle")}};m.useEffect(()=>{k==="sent"&&ne.current&&(ne.current.scrollIntoView({behavior:"smooth",block:"center"}),ne.current.focus({preventScroll:!0}))},[k]);const Ve=G?d("contactPage.whatsappText")(z.brand,z.model,z.package):ee?d("modelPage.whatsappText")(z.brand,z.model):"",jt=[{key:"premium",title:d("contactPage.featurePremiumTitle"),sub:d("contactPage.featurePremiumSub")},{key:"germany",title:d("contactPage.featureGermanyTitle"),sub:d("contactPage.featureGermanySub")},{key:"individual",title:d("contactPage.featureIndividualTitle"),sub:d("contactPage.featureIndividualSub")},{key:"experts",title:d("contactPage.featureExpertsTitle"),sub:d("contactPage.featureExpertsSub")}];return a.jsx("div",{className:"kf-page kontakt-sektion relative w-full overflow-hidden px-4 pb-10 sm:px-10",style:{color:"var(--kf-text2)",fontFamily:"'Barlow', sans-serif"},children: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:d("contactPage.heroEyebrow")}),a.jsxs("h1",{className:"text-[34px] leading-[1.08] sm:text-[46px] lg:text-[60px]",style:{...po,color:"var(--kf-text)"},children:[d("contactPage.heroTitlePre")," ",a.jsx("span",{style:{color:"var(--kf-accent2)"},children:d("contactPage.heroTitleAccent")})," ",d("contactPage.heroTitlePost")]}),a.jsx("p",{className:"mb-10 mt-5 max-w-[520px] text-lg leading-[1.55]",style:{color:"var(--kf-muted)"},children:d("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:[G&&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(pP,{className:"h-4 w-4"}),d("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:d("contactPage.contextBrand")}),a.jsx("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:z.brand}),a.jsx("span",{style:{color:"var(--kf-label)"},children:d("contactPage.contextModel")}),a.jsx("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:z.model}),a.jsx("span",{style:{color:"var(--kf-label)"},children:d("contactPage.contextPackage")}),a.jsx("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:z.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:d("contactPage.packagePrice")}),a.jsx("span",{className:"text-xl",children:A||(oe!=null?a.jsx(mp,{formatted:p(oe),color:"var(--kf-text)"}):"—")})]}),F&&!A&&a.jsx("div",{className:"mt-1 text-right text-xs",style:{color:"var(--kf-muted)"},children:F})]}),ee&&a.jsxs("div",{className:"mb-8 flex items-center gap-3 rounded-xl border px-6 py-4 text-[15px]",style:{background:"var(--kf-pkgbg)",borderColor:"var(--kf-pkgbrd)"},children:[a.jsx(Jo,{className:"h-4 w-4",style:{color:"var(--kf-accent2)"}}),a.jsx("span",{style:{color:"var(--kf-label)"},children:d("contactPage.vehicleBoxTitle")}),a.jsxs("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:[z.brand," ",z.model]})]}),j.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:d("contactPage.optionalUpgrades")}),a.jsx("div",{className:"space-y-2",children:j.map(M=>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:C.includes(M.id),onChange:()=>P(M.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:_n(M,"name",f)}),M.description&&a.jsx("span",{className:"block text-xs",style:{color:"var(--kf-muted)"},children:_n(M,"description",f)})]}),a.jsxs("span",{className:"font-semibold",style:{color:"var(--kf-accent2)"},children:["+",p(M.price)]})]},M.id))}),C.length>0&&oe!=null&&!A&&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:d("contactPage.totalWithUpgrades")}),a.jsx(mp,{formatted:p(oe+R),color:"var(--kf-text)"})]})]}),a.jsx("h2",{className:"mb-8 text-xl",style:{...po,color:"var(--kf-text)"},children:d("contactPage.formTitle")}),a.jsx("div",{role:"status","aria-live":"polite",children:k==="sent"&&a.jsxs("div",{ref:ne,tabIndex:-1,className:"rounded-[10px] border p-5 outline-none",style:{borderColor:"var(--kf-accent)",background:"var(--kf-accentsoft)"},children:[a.jsx("div",{className:"text-base font-bold",style:{color:"var(--kf-accent2)"},children:d("contactPage.sentTitle")}),a.jsx("div",{className:"mt-1 text-sm",style:{color:"var(--kf-muted)"},children:d("contactPage.sentText")}),a.jsx("button",{type:"button",onClick:()=>{H.current=Date.now(),E("idle")},className:"mt-4 text-sm font-semibold underline",style:{color:"var(--kf-text2)"},children:d("contactPage.sendAnother")})]})}),k!=="sent"&&a.jsxs("form",{onSubmit:je,noValidate:!1,children:[a.jsxs("div",{"aria-hidden":"true",style:{position:"absolute",left:"-10000px",width:"1px",height:"1px",overflow:"hidden"},children:[a.jsx("label",{htmlFor:"kf-website",children:"Website"}),a.jsx("input",{id:"kf-website",name:"website",type:"text",tabIndex:-1,autoComplete:"off",defaultValue:""})]}),a.jsxs("div",{className:"grid grid-cols-1 gap-6 min-[641px]:grid-cols-2",children:[a.jsx(Gi,{icon:MP,label:d("contactPage.nameLabel"),name:"name",autoComplete:"name",required:!0,value:x.name,onChange:se,placeholder:d("contactPage.namePlaceholder")}),a.jsx(Gi,{icon:oc,label:d("contactPage.emailLabel"),name:"email",type:"email",autoComplete:"email",required:!0,value:x.email,onChange:se,placeholder:d("contactPage.emailPlaceholder")}),a.jsx(Gi,{icon:or,label:d("contactPage.phoneLabel"),name:"phone",type:"tel",inputMode:"tel",autoComplete:"tel",value:x.phone,onChange:se,placeholder:d("contactPage.phonePlaceholder")}),a.jsx(Gi,{icon:Jo,label:d("contactPage.vinLabel"),name:"vin",value:x.vin,onChange:se,placeholder:d("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:d("contactPage.messageLabel")}),a.jsx("textarea",{id:"kf-message",name:"message",rows:5,value:x.message,onChange:se,placeholder:d("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)"}})]}),a.jsx("div",{role:"alert","aria-live":"assertive",children:T&&a.jsx("p",{className:"mt-4 text-sm text-red-600 dark:text-red-400",children:T})}),a.jsxs("div",{className:"mt-8 flex flex-wrap items-center gap-5",children:[a.jsxs("button",{type:"submit",disabled:k==="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(SP,{className:"h-[18px] w-[18px]"}),d(k==="sending"?"contactPage.sending":"contactPage.submit")]}),a.jsx("div",{className:"text-[13px]",style:{color:"var(--kf-label)"},children:d("contactPage.requiredHint")})]}),a.jsxs("p",{className:"mt-5 text-[13px] leading-relaxed",style:{color:"var(--kf-muted)"},children:[d("contactPage.privacyPre"),a.jsx(U,{to:"/datenschutz",className:"underline",style:{color:"var(--kf-text2)"},children:d("contactPage.privacyLink")}),d("contactPage.privacyPost")]})]})]})}),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:{...po,color:"var(--kf-text)"},children:d("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(or,{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:d("contactPage.phone")}),a.jsx("a",{href:`tel:${BN(t)}`,onClick:()=>Nn("contact_call"),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(oc,{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:d("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(Vy,{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:d("contactPage.address")}),a.jsxs("div",{className:"text-base font-semibold leading-[1.4]",style:{color:"var(--kf-text2)"},children:[s,a.jsx("br",{}),[i,o].filter(Boolean).join(" ")]})]})]}),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($N,{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:d("nav.whatsapp")}),a.jsx("a",{href:Hd(n,Ve),target:"_blank",rel:"noopener noreferrer",onClick:()=>Nn("contact_whatsapp"),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:d("contactPage.hours")}),a.jsx("div",{className:"grid grid-cols-[auto_1fr] gap-x-6 gap-y-2 text-[15px]",children:b.map(M=>a.jsxs("span",{style:{display:"contents"},children:[a.jsx("span",{style:{color:"var(--kf-label)"},children:M.days}),a.jsx("span",{children:M.label})]},M.key))})]})]}),a.jsxs("div",{className:"relative overflow-hidden rounded-2xl border",style:{background:"var(--kf-card)",borderColor:"var(--kf-cardbrd)",boxShadow:"var(--kf-shadow)"},children:[h.external&&a.jsxs("a",{href:w,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:[d("contactPage.mapOpenChip"),a.jsx(ZC,{className:"h-3.5 w-3.5",style:{color:"var(--kf-accent2)"}})]}),a.jsx(zN,{name:d("contactPage.mapEmbedName"),className:"h-[210px] w-full",children:a.jsx("div",{className:"h-[210px] overflow-hidden",children:a.jsx("iframe",{title:d("contactPage.mapIframeTitle"),src:`https://www.google.com/maps?q=${v}&output=embed`,width:"100%",height:"290",style:{border:0,display:"block",marginTop:"-60px"},loading:"lazy",referrerPolicy:"no-referrer-when-downgrade"})})}),a.jsxs("a",{href:w,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:[d("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:jt.map(M=>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(HN,{path:UN[M.key],className:"h-[22px] w-[22px]"})}),a.jsxs("div",{children:[a.jsx("div",{className:"text-[15px] font-bold",style:{color:"var(--kf-text)"},children:M.title}),a.jsx("div",{className:"mt-0.5 text-[13px]",style:{color:"var(--kf-muted)"},children:M.sub})]})]},M.key))})]})})}const Ml="hifi-chunk-reload",Q=e=>m.lazy(()=>e().then(t=>{try{sessionStorage.removeItem(Ml)}catch{}return t},t=>{let n=!0;try{n=!!sessionStorage.getItem(Ml),sessionStorage.setItem(Ml,"1")}catch{}if(n)throw t;return window.location.reload(),new Promise(()=>{})})),GN=Q(()=>X(()=>import("./GalleryOverview-B79TQ8ce.js"),[])),KN=Q(()=>X(()=>import("./GalleryBrandPage-Ds2PJMaS.js"),[])),qN=Q(()=>X(()=>import("./GalleryProjectPage-cPDbShnw.js"),[])),YN=Q(()=>X(()=>import("./DownloadsPage-BLst4c-p.js"),__vite__mapDeps([5,6,1]))),XN=Q(()=>X(()=>import("./Impressum-BcYT0HIo.js"),__vite__mapDeps([7,8]))),ZN=Q(()=>X(()=>import("./Datenschutz-Q_MacwGA.js"),__vite__mapDeps([9,8]))),QN=Q(()=>X(()=>import("./AGB-CaHRKcOb.js"),__vite__mapDeps([10,8]))),JN=Q(()=>X(()=>import("./SetupWizard-BQmYQeMI.js"),[])),e4=Q(()=>X(()=>import("./Login-CtyQdW_H.js"),[])),t4=Q(()=>X(()=>import("./Dashboard-7_CH1XOt.js"),__vite__mapDeps([11,12,13]))),n4=Q(()=>X(()=>import("./Brands-DT4cKYHY.js"),__vite__mapDeps([14,15,16,17,18,19,3]))),r4=Q(()=>X(()=>import("./Models-cJVztP8m.js"),__vite__mapDeps([20,15,16,17,18,19,3,21]))),s4=Q(()=>X(()=>import("./GalleryBrands-DTIwD_Dw.js"),__vite__mapDeps([22,15,16,18,19,3,21]))),i4=Q(()=>X(()=>import("./GalleryProjects-CXCOXFl8.js"),__vite__mapDeps([23,15,16,18,19,3,21]))),o4=Q(()=>X(()=>import("./GalleryPhotos-DcLBcwrS.js"),__vite__mapDeps([24,18,19,3,21,16]))),a4=Q(()=>X(()=>import("./Packages-Qhz_q4KJ.js"),__vite__mapDeps([25,17,21,19,4,3,2]))),l4=Q(()=>X(()=>import("./Services-Y3-jTFYy.js"),__vite__mapDeps([26,18,19,3,21,15,16,0,1,2,4]))),u4=Q(()=>X(()=>import("./Faqs-XZAy4Qhr.js"),__vite__mapDeps([27,18,19,3,21]))),c4=Q(()=>X(()=>import("./Partners-gT0HmSOb.js"),__vite__mapDeps([28,15,16,18,19,3,21]))),d4=Q(()=>X(()=>import("./Downloads-DZAlZIUI.js"),__vite__mapDeps([29,6,18,19,3,21,2]))),f4=Q(()=>X(()=>import("./HomeSections-ZA3Lw7hJ.js"),__vite__mapDeps([30,31,17,32]))),h4=Q(()=>X(()=>import("./ContactRequests-BC1CK4Mp.js"),__vite__mapDeps([33,13]))),m4=Q(()=>X(()=>import("./AccountSettings-CYJZRLnt.js"),[])),p4=Q(()=>X(()=>import("./AdminUsers-DpMLkktK.js"),[])),g4=Q(()=>X(()=>import("./PermissionGroups-RYkt4uTw.js"),[])),x4=Q(()=>X(()=>import("./SettingsLayout-BpB6khtG.js"),[])),Ll=Q(()=>X(()=>import("./WebsiteSettings-LkaVnoOm.js"),__vite__mapDeps([34,15,16,32]))),y4=Q(()=>X(()=>import("./LegalSettings-DOcxDZNv.js"),__vite__mapDeps([35,31]))),v4=Q(()=>X(()=>import("./UpdateSettings-JQfCGU1a.js"),[])),w4=Q(()=>X(()=>import("./EmailSettings-Co9DiTkD.js"),__vite__mapDeps([36,31]))),b4=Q(()=>X(()=>import("./DatabaseSettings-561PD_Cp.js"),__vite__mapDeps([37,12]))),k4=Q(()=>X(()=>import("./ExportImportSettings-C7wRrxdF.js"),[])),S4=Q(()=>X(()=>import("./MaintenanceSettings-C-n0I6ae.js"),[])),j4=Q(()=>X(()=>import("./CountdownSettings-CeR3sHjT.js"),[])),E4=Q(()=>X(()=>import("./ResetSettings-CCa36SGd.js"),[])),C4=a.jsx("div",{className:"min-h-screen bg-white dark:bg-neutral-950"});function P4(){const{packageId:e}=ad();return a.jsx(sr,{to:`/admin/packages?paket=${e}`,replace:!0})}function T4(){return a.jsxs(Vj,{reducedMotion:"user",children:[a.jsx(fC,{}),a.jsx(pC,{}),a.jsx(bC,{children:a.jsx(m.Suspense,{fallback:C4,children:a.jsxs(jb,{children:[a.jsx($,{path:"/setup",element:a.jsx(JN,{})}),a.jsxs($,{element:a.jsx($T,{}),children:[a.jsx($,{path:"/",element:a.jsx(mN,{})}),a.jsx($,{path:"/fahrzeuge",element:a.jsx(vN,{})}),a.jsx($,{path:"/fahrzeuge/:brandSlug",element:a.jsx(wN,{})}),a.jsx($,{path:"/fahrzeuge/:brandSlug/:modelSlug",element:a.jsx(RN,{})}),a.jsx($,{path:"/galerie",element:a.jsx(GN,{})}),a.jsx($,{path:"/galerie/:brandSlug",element:a.jsx(KN,{})}),a.jsx($,{path:"/galerie/:brandSlug/:projectSlug",element:a.jsx(qN,{})}),a.jsx($,{path:"/leistungen",element:a.jsx(ON,{})}),a.jsx($,{path:"/kontakt",element:a.jsx(WN,{})}),a.jsx($,{path:"/downloads",element:a.jsx(YN,{})}),a.jsx($,{path:"/impressum",element:a.jsx(XN,{})}),a.jsx($,{path:"/datenschutz",element:a.jsx(ZN,{})}),a.jsx($,{path:"/agb",element:a.jsx(QN,{})}),a.jsx($,{path:"*",element:a.jsx(Yd,{})})]}),a.jsx($,{path:"/admin/login",element:a.jsx(e4,{})}),a.jsx($,{path:"/admin",element:a.jsx(YT,{}),children:a.jsxs($,{element:a.jsx(qT,{}),children:[a.jsx($,{index:!0,element:a.jsx(t4,{})}),a.jsx($,{path:"account",element:a.jsx(m4,{})}),a.jsx($,{path:"brands",element:a.jsx(ce,{permission:"brands.manage",children:a.jsx(n4,{})})}),a.jsx($,{path:"models",element:a.jsx(ce,{permission:"models.manage",children:a.jsx(r4,{})})}),a.jsx($,{path:"gallery-brands",element:a.jsx(ce,{permission:"gallery.manage",children:a.jsx(s4,{})})}),a.jsx($,{path:"gallery-projects",element:a.jsx(ce,{permission:"gallery.manage",children:a.jsx(i4,{})})}),a.jsx($,{path:"gallery-projects/:projectId/photos",element:a.jsx(ce,{permission:"gallery.manage",children:a.jsx(o4,{})})}),a.jsx($,{path:"packages",element:a.jsx(ce,{permission:"packages.manage",children:a.jsx(a4,{})})}),a.jsx($,{path:"packages/:packageId/*",element:a.jsx(P4,{})}),a.jsx($,{path:"services",element:a.jsx(ce,{permission:"services.manage",children:a.jsx(l4,{})})}),a.jsx($,{path:"faqs",element:a.jsx(ce,{permission:"content.manage",children:a.jsx(u4,{})})}),a.jsx($,{path:"partners",element:a.jsx(ce,{permission:"content.manage",children:a.jsx(c4,{})})}),a.jsx($,{path:"downloads",element:a.jsx(ce,{permission:"downloads.manage",children:a.jsx(d4,{})})}),a.jsx($,{path:"home-sections",element:a.jsx(ce,{permission:"content.manage",children:a.jsx(f4,{})})}),a.jsx($,{path:"contact-requests",element:a.jsx(ce,{permission:"contact.manage",children:a.jsx(h4,{})})}),a.jsx($,{path:"users",element:a.jsx(ce,{permission:"users.manage",children:a.jsx(p4,{})})}),a.jsx($,{path:"permission-groups",element:a.jsx(ce,{permission:"permission_groups.manage",children:a.jsx(g4,{})})}),a.jsxs($,{path:"settings",element:a.jsx(ce,{permission:["settings.manage","system.admin","system.update"],children:a.jsx(x4,{})}),children:[a.jsx($,{index:!0,element:a.jsx(sr,{to:"company",replace:!0})}),a.jsx($,{path:"website",element:a.jsx(sr,{to:"../company",replace:!0})}),a.jsx($,{path:"company",element:a.jsx(ce,{permission:"settings.manage",children:a.jsx(Ll,{section:"company"})})}),a.jsx($,{path:"design",element:a.jsx(ce,{permission:"settings.manage",children:a.jsx(Ll,{section:"design"})})}),a.jsx($,{path:"legal",element:a.jsx(ce,{permission:"settings.manage",children:a.jsx(y4,{})})}),a.jsx($,{path:"maintenance",element:a.jsx(ce,{permission:"settings.manage",children:a.jsx(S4,{})})}),a.jsx($,{path:"countdown",element:a.jsx(ce,{permission:"settings.manage",children:a.jsx(j4,{})})}),a.jsx($,{path:"google",element:a.jsx(ce,{permission:"system.admin",children:a.jsx(Ll,{section:"google"})})}),a.jsx($,{path:"email",element:a.jsx(ce,{permission:"system.admin",children:a.jsx(w4,{})})}),a.jsx($,{path:"database",element:a.jsx(ce,{permission:"system.admin",children:a.jsx(b4,{})})}),a.jsx($,{path:"export-import",element:a.jsx(ce,{permission:"system.admin",children:a.jsx(k4,{})})}),a.jsx($,{path:"update",element:a.jsx(ce,{permission:"system.update",children:a.jsx(v4,{})})}),a.jsx($,{path:"reset",element:a.jsx(ce,{permission:"system.admin",children:a.jsx(E4,{})})})]})]})})]})})})]})}Al.createRoot(document.getElementById("root")).render(a.jsx(Cp.StrictMode,{children:a.jsx(Ab,{basename:"/".replace(/\/$/,"")||"/",children:a.jsx(FP,{children:a.jsx($P,{children:a.jsx(JP,{children:a.jsx(T4,{})})})})})}));export{rP as $,gC as A,et as B,GC as C,FN as D,We as E,Zy as F,L4 as G,pp as H,Z as I,TC as J,_C as K,U as L,Jo as M,Yd as N,ld as O,Fy as P,LC as Q,He as R,Jy as S,RC as T,Ay as U,zC as V,UC as W,Dy as X,YC as Y,JC as Z,tP as _,It as a,iP as a0,Ry as a1,oc as a2,Vy as a3,Iy as a4,dP as a5,hP as a6,pP as a7,or as a8,vP as a9,bP as aa,SP as ab,EP as ac,PP as ad,NP as ae,MP as af,AP as ag,yi as ah,VP as ai,CC as aj,M4 as ak,EC as al,N4 as am,dr as b,ie as c,le as d,_a as e,ip as f,ad as g,rd as h,mr as i,a as j,cr as k,ep as l,es as m,sr as n,ea as o,D4 as p,R4 as q,m as r,V4 as s,Ob as t,pe as u,FC as v,$C as w,ZC as x,Cp as y,A4 as z};
diff --git a/hifi/assets/music-TbDZQPPP.js b/hifi/assets/music-Co2R5rSR.js
similarity index 98%
rename from hifi/assets/music-TbDZQPPP.js
rename to hifi/assets/music-Co2R5rSR.js
index ecc7971..658d521 100644
--- a/hifi/assets/music-TbDZQPPP.js
+++ b/hifi/assets/music-Co2R5rSR.js
@@ -1,4 +1,4 @@
-import{I as a}from"./index-s3eIr1sf.js";/**
+import{I as a}from"./index-BlspSYV0.js";/**
* @license lucide-react v1.23.0 - ISC
*
* This source code is licensed under the ISC license.
diff --git a/hifi/assets/sortable.esm-CkNy0jji.js b/hifi/assets/sortable.esm-D1g5h7xA.js
similarity index 99%
rename from hifi/assets/sortable.esm-CkNy0jji.js
rename to hifi/assets/sortable.esm-D1g5h7xA.js
index c62e8ae..ce29345 100644
--- a/hifi/assets/sortable.esm-CkNy0jji.js
+++ b/hifi/assets/sortable.esm-D1g5h7xA.js
@@ -1,4 +1,4 @@
-import{r as c,y as P,h as Oe}from"./index-s3eIr1sf.js";function Rn(){for(var e=arguments.length,t=new Array(e),n=0;nr=>{t.forEach(o=>o(r))},t)}const et=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function me(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function pt(e){return"nodeType"in e}function B(e){var t,n;return e?me(e)?e:pt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function bt(e){const{Document:t}=B(e);return e instanceof t}function Be(e){return me(e)?!1:e instanceof B(e).HTMLElement}function Ut(e){return e instanceof B(e).SVGElement}function ye(e){return e?me(e)?e.document:pt(e)?bt(e)?e:Be(e)||Ut(e)?e.ownerDocument:document:document:document}const Q=et?c.useLayoutEffect:c.useEffect;function wt(e){const t=c.useRef(e);return Q(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ke(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return Q(()=>{n.current!==e&&(n.current=e)},t),n}function Fe(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Ge(e){const t=wt(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function dt(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let at={};function $e(e,t){return c.useMemo(()=>{if(t)return t;const n=at[e]==null?0:at[e]+1;return at[e]=n,e+"-"+n},[e,t])}function Wt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{const a=Object.entries(s);for(const[l,u]of a){const f=i[l];f!=null&&(i[l]=f+e*u)}return i},{...t})}}const we=Wt(1),ze=Wt(-1);function En(e){return"clientX"in e&&"clientY"in e}function mt(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function Mn(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function ft(e){if(Mn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return En(e)?{x:e.clientX,y:e.clientY}:null}const Je=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Je.Translate.toString(e),Je.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Ot="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function In(e){return e.matches(Ot)?e:e.querySelector(Ot)}const An={display:"none"};function On(e){let{id:t,value:n}=e;return P.createElement("div",{id:t,style:An},n)}function Tn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return P.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Nn(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Ht=c.createContext(null);function Ln(e){const t=c.useContext(Ht);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function kn(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:i}=r;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const zn={draggable:`
+import{r as c,y as P,h as Oe}from"./index-BlspSYV0.js";function Rn(){for(var e=arguments.length,t=new Array(e),n=0;nr=>{t.forEach(o=>o(r))},t)}const et=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function me(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function pt(e){return"nodeType"in e}function B(e){var t,n;return e?me(e)?e:pt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function bt(e){const{Document:t}=B(e);return e instanceof t}function Be(e){return me(e)?!1:e instanceof B(e).HTMLElement}function Ut(e){return e instanceof B(e).SVGElement}function ye(e){return e?me(e)?e.document:pt(e)?bt(e)?e:Be(e)||Ut(e)?e.ownerDocument:document:document:document}const Q=et?c.useLayoutEffect:c.useEffect;function wt(e){const t=c.useRef(e);return Q(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ke(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return Q(()=>{n.current!==e&&(n.current=e)},t),n}function Fe(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Ge(e){const t=wt(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function dt(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let at={};function $e(e,t){return c.useMemo(()=>{if(t)return t;const n=at[e]==null?0:at[e]+1;return at[e]=n,e+"-"+n},[e,t])}function Wt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{const a=Object.entries(s);for(const[l,u]of a){const f=i[l];f!=null&&(i[l]=f+e*u)}return i},{...t})}}const we=Wt(1),ze=Wt(-1);function En(e){return"clientX"in e&&"clientY"in e}function mt(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function Mn(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function ft(e){if(Mn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return En(e)?{x:e.clientX,y:e.clientY}:null}const Je=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Je.Translate.toString(e),Je.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Ot="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function In(e){return e.matches(Ot)?e:e.querySelector(Ot)}const An={display:"none"};function On(e){let{id:t,value:n}=e;return P.createElement("div",{id:t,style:An},n)}function Tn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return P.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Nn(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Ht=c.createContext(null);function Ln(e){const t=c.useContext(Ht);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function kn(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:i}=r;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const zn={draggable:`
To pick up a draggable item, press the space bar.
While dragging, use the arrow keys to move the item.
Press space again to drop the item in its new position, or press escape to cancel.
diff --git a/hifi/assets/trash-2-CtUrkOy8.js b/hifi/assets/trash-2-BGP0wMN7.js
similarity index 95%
rename from hifi/assets/trash-2-CtUrkOy8.js
rename to hifi/assets/trash-2-BGP0wMN7.js
index 076521b..a71377b 100644
--- a/hifi/assets/trash-2-CtUrkOy8.js
+++ b/hifi/assets/trash-2-BGP0wMN7.js
@@ -1,4 +1,4 @@
-import{I as a}from"./index-s3eIr1sf.js";/**
+import{I as a}from"./index-BlspSYV0.js";/**
* @license lucide-react v1.23.0 - ISC
*
* This source code is licensed under the ISC license.
diff --git a/hifi/index.html b/hifi/index.html
index 4180f66..33b5fb5 100644
--- a/hifi/index.html
+++ b/hifi/index.html
@@ -49,7 +49,7 @@
"sameAs": ["https://www.youtube.com/@hifiplanet2812"]
}
-
+