diff --git a/.gitignore b/.gitignore index 8280acb..28dd4e5 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,7 @@ *.log Thumbs.db .DS_Store + +# Lokal gespeicherte Profilfotos der Google-Bewertungen (GooglePlacesReviewsFetcher legt +# sie beim Refresh an) - Inhalte der jeweiligen Umgebung, kein Code. +/hifi/api/uploads/reviews/ diff --git a/hifi-src/src/i18n/de.js b/hifi-src/src/i18n/de.js index 68f64d0..b551193 100644 --- a/hifi-src/src/i18n/de.js +++ b/hifi-src/src/i18n/de.js @@ -38,7 +38,7 @@ export default { 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.', + bannerText: 'Wir verwenden nur technisch notwendige Cookies. Für Google Maps 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', @@ -49,7 +49,7 @@ export default { 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.', + externalDesc: 'Google Maps (Kontaktseite). 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', diff --git a/hifi-src/src/i18n/en.js b/hifi-src/src/i18n/en.js index e661c8a..d96cf57 100644 --- a/hifi-src/src/i18n/en.js +++ b/hifi-src/src/i18n/en.js @@ -38,7 +38,7 @@ export default { 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.', + bannerText: 'We only use technically necessary cookies. For Google Maps 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', @@ -49,7 +49,7 @@ export default { 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.', + externalDesc: 'Google Maps (contact page). Loading it 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', diff --git a/hifi/api/src/Controllers/GoogleReviewsController.php b/hifi/api/src/Controllers/GoogleReviewsController.php index e5e13a5..4f366d4 100644 --- a/hifi/api/src/Controllers/GoogleReviewsController.php +++ b/hifi/api/src/Controllers/GoogleReviewsController.php @@ -76,6 +76,14 @@ class GoogleReviewsController 'SELECT author_name, profile_photo_url, rating, review_text FROM google_reviews ORDER BY sort_order' ); $reviews = $stmt->fetchAll(); + // Noch nicht lokal gespeicherte Fotos (Stand vor dem naechsten Refresh) nicht an + // den Browser geben - sie wuerden ohne Einwilligung direkt von Google geladen. + foreach ($reviews as &$review) { + if (preg_match('#^https?://#i', (string) $review['profile_photo_url'])) { + $review['profile_photo_url'] = null; + } + } + unset($review); } Http::send(['rating' => $rating, 'rating_count' => $ratingCount, 'reviews' => $reviews]); diff --git a/hifi/api/src/Controllers/PageContentController.php b/hifi/api/src/Controllers/PageContentController.php index b5d24a5..ffb5b25 100644 --- a/hifi/api/src/Controllers/PageContentController.php +++ b/hifi/api/src/Controllers/PageContentController.php @@ -44,8 +44,10 @@ HTML, 'datenschutz' => [ 'title' => 'Datenschutzerklärung', 'body_html' => <<<'HTML' +

Stand: Oktober 2026

1. Verantwortlicher

Verantwortlicher im Sinne der Datenschutz-Grundverordnung (DSGVO) ist:
Hifi Planet e.K., Christopher Horndasch
Boxbrunner Str. 20a, 63916 Amorbach
Telefon: 09373 20 62 390 · E-Mail: info@hifi-planet-amorbach.de

+

Einen Datenschutzbeauftragten haben wir nicht benannt, da wir hierzu gesetzlich nicht verpflichtet sind. Bei Fragen zum Datenschutz wenden Sie sich bitte an die oben genannten Kontaktdaten.

2. Ihre Rechte als betroffene Person

Sie haben jederzeit das Recht,

-

Außerdem haben Sie das Recht, sich bei einer Datenschutz-Aufsichtsbehörde über die Verarbeitung Ihrer personenbezogenen Daten durch uns zu beschweren, zum Beispiel beim Bayerischen Landesamt für Datenschutzaufsicht (BayLDA).

+

Außerdem haben Sie das Recht, sich bei einer Datenschutz-Aufsichtsbehörde über die Verarbeitung Ihrer personenbezogenen Daten durch uns zu beschweren (Art. 77 DSGVO). Für uns zuständig ist das Bayerische Landesamt für Datenschutzaufsicht (BayLDA), Promenade 18, 91522 Ansbach.

+

Widerspruchsrecht (Art. 21 DSGVO)

+

Soweit wir Ihre Daten auf Grundlage unseres berechtigten Interesses (Art. 6 Abs. 1 lit. f DSGVO) verarbeiten, haben Sie das Recht, aus Gründen, die sich aus Ihrer besonderen Situation ergeben, jederzeit Widerspruch gegen diese Verarbeitung einzulegen. Wir verarbeiten die Daten dann nicht mehr, es sei denn, wir können zwingende schutzwürdige Gründe für die Verarbeitung nachweisen, die Ihre Interessen, Rechte und Freiheiten überwiegen, oder die Verarbeitung dient der Geltendmachung, Ausübung oder Verteidigung von Rechtsansprüchen. Für den Widerspruch genügt eine formlose Nachricht an die oben genannten Kontaktdaten.

3. Hosting und Server-Logfiles

-

Beim Aufruf dieser Website erhebt der Webserver automatisch Daten in sogenannten Server-Logfiles, die Ihr Browser übermittelt. Dazu gehören: IP-Adresse, Datum und Uhrzeit der Anfrage, aufgerufene Seite, verwendeter Browser und Betriebssystem sowie die zuvor besuchte Seite (Referrer-URL). Diese Daten dienen ausschließlich der technisch fehlerfreien Auslieferung der Website sowie der IT-Sicherheit (z. B. zur Abwehr von Angriffen) und werden nicht mit anderen Datenquellen zusammengeführt. Rechtsgrundlage ist unser berechtigtes Interesse an einem sicheren und stabilen Betrieb der Website (Art. 6 Abs. 1 lit. f DSGVO).

+

Diese Website wird bei der ALL-INKL.COM – Neue Medien Münnich, Inhaber René Münnich, Hauptstraße 68, 02742 Friedersdorf, gehostet. Die Server stehen in Deutschland. Mit dem Hoster haben wir einen Vertrag zur Auftragsverarbeitung nach Art. 28 DSGVO geschlossen.

+

Beim Aufruf dieser Website erhebt der Webserver automatisch Daten in sogenannten Server-Logfiles, die Ihr Browser übermittelt. Dazu gehören: IP-Adresse, Datum und Uhrzeit der Anfrage, aufgerufene Seite, verwendeter Browser und Betriebssystem sowie die zuvor besuchte Seite (Referrer-URL). Diese Daten dienen ausschließlich der technisch fehlerfreien Auslieferung der Website sowie der IT-Sicherheit (z. B. zur Abwehr von Angriffen) und werden nicht mit anderen Datenquellen zusammengeführt. Sie werden nur so lange gespeichert, wie es für diese Zwecke erforderlich ist, und danach gelöscht oder anonymisiert. Rechtsgrundlage ist unser berechtigtes Interesse an einem sicheren und stabilen Betrieb der Website (Art. 6 Abs. 1 lit. f DSGVO).

Schriftarten: Die auf dieser Website verwendeten Schriftarten sind lokal auf unserem Webserver gespeichert und werden direkt von dort geladen. Eine Verbindung zu Servern von Google (Google Fonts) oder anderen Schriftarten-Anbietern wird dabei nicht aufgebaut; es werden keine Daten an Dritte übertragen.

-

4. Kontaktformular

-

Wenn Sie uns über das Kontaktformular eine Anfrage zukommen lassen, werden Ihre Angaben aus dem Formular (Name, E-Mail-Adresse, optional Telefonnummer, Nachricht sowie ggf. der Kontext Ihrer Anfrage wie Marke, Modell oder Paket) inklusive der von Ihnen dort angegebenen Kontaktdaten bei uns gespeichert, um Ihre Anfrage zu bearbeiten und zu beantworten. Die Verarbeitung erfolgt auf Grundlage Ihrer Einwilligung durch Absenden des Formulars (Art. 6 Abs. 1 lit. a DSGVO) bzw., sofern Ihre Anfrage der Vorbereitung eines Vertrags dient, auf Grundlage von Art. 6 Abs. 1 lit. b DSGVO. Wir löschen die Anfrage inklusive der Kontaktdaten, sobald der jeweilige Sachverhalt abschließend geklärt ist und keine gesetzlichen Aufbewahrungspflichten entgegenstehen. Diese Einwilligung können Sie jederzeit widerrufen, indem Sie uns formlos per E-Mail kontaktieren.

+

4. Kontaktaufnahme und Kontaktformular

+

Wenn Sie uns über das Kontaktformular eine Anfrage zukommen lassen, verarbeiten wir Ihre Angaben aus dem Formular (Name, E-Mail-Adresse, optional Telefonnummer, Nachricht sowie ggf. der Kontext Ihrer Anfrage wie Marke, Modell oder Paket), um Ihre Anfrage zu bearbeiten und zu beantworten. Die Anfrage wird in unserer Datenbank gespeichert und per E-Mail an uns weitergeleitet; Sie erhalten außerdem eine automatische Eingangsbestätigung an die angegebene E-Mail-Adresse. Pflichtfelder sind als solche gekennzeichnet; ohne diese Angaben können wir Ihre Anfrage nicht bearbeiten.

+

Dasselbe gilt, wenn Sie uns per E-Mail, Telefon oder über den WhatsApp-Link auf unserer Website kontaktieren. Bei WhatsApp gelten zusätzlich die Datenschutzbestimmungen der WhatsApp Ireland Limited; die Nutzung ist freiwillig, Sie können uns jederzeit auch auf anderem Weg erreichen.

+

Rechtsgrundlage ist Art. 6 Abs. 1 lit. b DSGVO, sofern Ihre Anfrage mit einem Vertrag zusammenhängt oder der Vorbereitung eines Vertrags dient (z. B. Angebot für einen Einbau). In allen anderen Fällen beruht die Verarbeitung auf unserem berechtigten Interesse an der Beantwortung der an uns gerichteten Anfragen (Art. 6 Abs. 1 lit. f DSGVO). Wir löschen die Anfrage inklusive der Kontaktdaten, sobald der jeweilige Sachverhalt abschließend geklärt ist und keine gesetzlichen Aufbewahrungspflichten entgegenstehen (z. B. bei Anfragen, aus denen ein Auftrag entsteht).

5. Cookies und lokale Speicherung

Diese Website verwendet technisch notwendige Cookies bzw. Speichertechnologien, die für den Betrieb der Seite erforderlich sind und ohne die einzelne Funktionen nicht funktionieren würden. Dazu gehören:

-

Für diese technisch notwendigen Cookies und Speichervorgänge ist gemäß § 25 Abs. 2 Nr. 2 TDDDG keine Einwilligung erforderlich. Rechtsgrundlage ist unser berechtigtes Interesse am technischen Betrieb der Website (Art. 6 Abs. 1 lit. f DSGVO). Für alle darüber hinausgehenden Inhalte und Dienste – aktuell die eingebundenen Google Maps- und YouTube-Elemente sowie Google Analytics – fragen wir Sie beim ersten Besuch aktiv nach Ihrer Einwilligung. Sie können Ihre Auswahl jederzeit über den Link „Cookie-Einstellungen" im Footer ändern.

-

6. Google Maps

-

Auf unserer Kontaktseite und im Footer binden wir Kartenmaterial des Dienstes „Google Maps" ein, um Ihnen die Anfahrt zu unserem Standort zu erleichtern. Anbieter ist Google Ireland Limited, Gordon House, Barrow Street, Dublin 4, Irland. Die eingebettete Karte wird erst geladen, nachdem Sie dem im Cookie-Banner unter „Externe Medien" zugestimmt haben. Beim Laden der Karte wird Ihre IP-Adresse an Google übertragen; eine Verarbeitung kann dabei auch auf Servern außerhalb der EU/des EWR erfolgen. Die Verarbeitung erfolgt auf Grundlage Ihrer Einwilligung (Art. 6 Abs. 1 lit. a DSGVO), die Sie jederzeit über die Cookie-Einstellungen widerrufen können. Weitere Informationen finden Sie in der Datenschutzerklärung von Google.

-

7. YouTube

-

Auf unserer Startseite binden wir ein Video des Anbieters YouTube (Google Ireland Limited, Gordon House, Barrow Street, Dublin 4, Irland) im „erweiterten Datenschutzmodus" ein (Domain youtube-nocookie.com). Auch dieses Video wird erst geladen, nachdem Sie unter „Externe Medien" zugestimmt haben. Nach Angaben von Google werden dabei bis zum Start der Wiedergabe keine Cookies gesetzt; beim Laden des Players wird jedoch bereits eine Verbindung zu Google-Servern aufgebaut und Ihre IP-Adresse übertragen. Die Verarbeitung erfolgt auf Grundlage Ihrer Einwilligung (Art. 6 Abs. 1 lit. a DSGVO), die Sie jederzeit über die Cookie-Einstellungen widerrufen können. Weitere Informationen finden Sie in der Datenschutzerklärung von Google.

-

8. Google Analytics

-

Sofern Sie der Statistik-Kategorie im Cookie-Banner zugestimmt haben, setzen wir „Google Analytics" ein, einen Webanalysedienst der Google Ireland Limited, Gordon House, Barrow Street, Dublin 4, Irland. Google Analytics verwendet Cookies und ähnliche Technologien, die eine Analyse der Benutzung dieser Website durch Sie ermöglichen. Die dabei erzeugten Informationen (u. a. Ihre IP-Adresse, die vor der Verarbeitung durch die Aktivierung der IP-Anonymisierung gekürzt wird) werden an einen Server von Google übertragen und dort gespeichert; eine Verarbeitung kann dabei auch auf Servern außerhalb der EU/des EWR erfolgen. Die Verarbeitung erfolgt ausschließlich auf Grundlage Ihrer Einwilligung (Art. 6 Abs. 1 lit. a DSGVO), die Sie jederzeit über die Cookie-Einstellungen mit Wirkung für die Zukunft widerrufen können. Weitere Informationen finden Sie in der Datenschutzerklärung von Google.

-

9. Empfänger der Daten

-

Ihre Daten werden grundsätzlich nur innerhalb unseres Unternehmens verarbeitet. Eine Weitergabe an Dritte erfolgt nur, soweit dies zur Bearbeitung Ihrer Anfrage erforderlich ist (z. B. an unseren Hosting-Provider zum Betrieb dieser Website und an unseren E-Mail-Anbieter zur Zustellung Ihrer Kontaktanfrage) oder soweit wir gesetzlich dazu verpflichtet sind.

-

10. Speicherdauer

-

Sofern in dieser Erklärung keine speziellere Speicherdauer genannt wurde, verbleiben Ihre personenbezogenen Daten bei uns, bis der Zweck für die Datenspeicherung entfällt. Gesetzliche Aufbewahrungsfristen (z. B. aus dem Handels- oder Steuerrecht) bleiben hiervon unberührt und können eine längere Speicherung erforderlich machen.

-

11. SSL-/TLS-Verschlüsselung

+

Für diese technisch notwendigen Cookies und Speichervorgänge ist gemäß § 25 Abs. 2 Nr. 2 TDDDG keine Einwilligung erforderlich. Rechtsgrundlage ist unser berechtigtes Interesse am technischen Betrieb der Website (Art. 6 Abs. 1 lit. f DSGVO). Für alle darüber hinausgehenden Dienste – aktuell die eingebundene Google-Maps-Karte und Google Analytics – fragen wir Sie beim ersten Besuch aktiv nach Ihrer Einwilligung (§ 25 Abs. 1 TDDDG, Art. 6 Abs. 1 lit. a DSGVO). Sie können Ihre Auswahl jederzeit über den Link „Cookie-Einstellungen“ im Footer ändern oder widerrufen.

+

6. Google-Dienste und Übermittlung in die USA

+

Die unten genannten Google-Dienste werden von der Google Ireland Limited, Gordon House, Barrow Street, Dublin 4, Irland, angeboten. Dabei können Daten auch an die Google LLC in den USA übermittelt werden. Die Google LLC ist unter dem EU-US Data Privacy Framework zertifiziert; für die Übermittlung besteht damit ein Angemessenheitsbeschluss der EU-Kommission (Art. 45 DSGVO). Weitere Informationen finden Sie in der Datenschutzerklärung von Google.

+

7. Google Maps

+

Auf unserer Kontaktseite binden wir eine Karte des Dienstes „Google Maps“ ein, um Ihnen die Anfahrt zu unserem Standort zu erleichtern. Die Karte wird erst geladen, nachdem Sie im Cookie-Banner unter „Externe Medien“ zugestimmt haben. Beim Laden der Karte wird Ihre IP-Adresse an Google übertragen, und Google kann Cookies setzen. Rechtsgrundlage ist Ihre Einwilligung (Art. 6 Abs. 1 lit. a DSGVO, § 25 Abs. 1 TDDDG), die Sie jederzeit über die Cookie-Einstellungen widerrufen können.

+

Links zu Google Maps (z. B. „Route planen“ im Footer und auf der Kontaktseite) öffnen Google Maps in einem neuen Fenster; dort gelten die Datenschutzbestimmungen von Google. Ohne Klick auf einen solchen Link werden keine Daten an Google übertragen.

+

8. Google-Bewertungen

+

Auf unserer Startseite zeigen wir Bewertungen an, die Kunden über Google zu unserem Unternehmen abgegeben haben (Gesamtbewertung, Name bzw. Anzeigename, Profilbild, Sternebewertung und Text). Diese Angaben rufen wir über die Google Places API ab, speichern sie auf unserem Server und liefern sie von dort aus. Beim Aufruf unserer Seite wird dabei keine Verbindung zu Google aufgebaut. Rechtsgrundlage ist unser berechtigtes Interesse, Besuchern einen authentischen Eindruck von Kundenerfahrungen zu geben (Art. 6 Abs. 1 lit. f DSGVO); die Bewertungen wurden von den Verfassern auf Google öffentlich gestellt. Wir aktualisieren die gespeicherten Bewertungen regelmäßig; Bewertungen, die Google nicht mehr liefert, löschen wir dabei. Ihre eigene Bewertung können Sie jederzeit in Ihrem Google-Konto bearbeiten oder löschen.

+

9. Google Analytics

+

Sofern Sie im Cookie-Banner der Kategorie „Statistik“ zugestimmt haben, setzen wir den Webanalysedienst „Google Analytics 4“ ein. Google Analytics verwendet Cookies (u. a. _ga und _ga_<ID>, Speicherdauer bis zu 2 Jahre), mit denen sich die Nutzung unserer Website auswerten lässt, z. B. aufgerufene Seiten, Verweildauer, verwendetes Gerät und Browser sowie ungefährer Standort (Land/Stadt). IP-Adressen werden in Google Analytics 4 nach Angaben von Google nicht protokolliert oder gespeichert. Die erhobenen Daten werden nach spätestens 14 Monaten gelöscht. Mit Google haben wir einen Vertrag zur Auftragsverarbeitung geschlossen.

+

Die Verarbeitung erfolgt ausschließlich auf Grundlage Ihrer Einwilligung (Art. 6 Abs. 1 lit. a DSGVO, § 25 Abs. 1 TDDDG), die Sie jederzeit über die Cookie-Einstellungen mit Wirkung für die Zukunft widerrufen können. Ohne Ihre Einwilligung wird Google Analytics nicht geladen.

+

10. YouTube-Kanal

+

Auf unserer Website verlinken wir auf unseren YouTube-Kanal bzw. auf einzelne Videos. Es handelt sich um einfache Links, es werden keine YouTube-Videos eingebettet. Erst wenn Sie einen solchen Link anklicken, werden Sie zu YouTube (Google Ireland Limited) weitergeleitet; dort gelten die Datenschutzbestimmungen von Google. Das Video auf unserer Startseite wird direkt von unserem eigenen Server ausgeliefert.

+

11. Empfänger der Daten

+

Ihre Daten werden grundsätzlich nur innerhalb unseres Unternehmens verarbeitet. Eine Weitergabe an Dritte erfolgt nur, soweit dies zur Bearbeitung Ihrer Anfrage erforderlich ist (z. B. an unseren Hosting-Provider zum Betrieb dieser Website und an unseren E-Mail-Anbieter zur Zustellung Ihrer Kontaktanfrage), Sie eingewilligt haben (siehe Google-Dienste oben) oder wir gesetzlich dazu verpflichtet sind.

+

12. Speicherdauer

+

Sofern in dieser Erklärung keine speziellere Speicherdauer genannt wurde, verbleiben Ihre personenbezogenen Daten bei uns, bis der Zweck für die Datenspeicherung entfällt. Gesetzliche Aufbewahrungsfristen (z. B. aus dem Handels- oder Steuerrecht, in der Regel 6 bzw. 8 Jahre) bleiben hiervon unberührt und können eine längere Speicherung erforderlich machen.

+

13. Pflicht zur Bereitstellung, keine automatisierte Entscheidung

+

Sie sind weder gesetzlich noch vertraglich verpflichtet, uns personenbezogene Daten bereitzustellen. Ohne die Angaben im Kontaktformular können wir Ihre Anfrage jedoch nicht beantworten. Eine automatisierte Entscheidungsfindung einschließlich Profiling im Sinne von Art. 22 DSGVO findet nicht statt.

+

14. SSL-/TLS-Verschlüsselung

Diese Seite nutzt aus Sicherheitsgründen eine SSL-/TLS-Verschlüsselung zur Übertragung Ihrer Daten. Eine verschlüsselte Verbindung erkennen Sie an dem Schloss-Symbol in der Adresszeile Ihres Browsers.

-

12. Änderung dieser Datenschutzerklärung

+

15. Änderung dieser Datenschutzerklärung

Wir passen diese Datenschutzerklärung an, sobald sich die von uns eingesetzten Datenverarbeitungen ändern. Es gilt jeweils die zum Zeitpunkt Ihres Besuchs aktuelle, auf dieser Seite veröffentlichte Fassung.

Fragen zum Datenschutz beantworten wir Ihnen gerne über unser Kontaktformular oder direkt per E-Mail.

HTML, @@ -93,31 +108,57 @@ HTML, 'title' => 'Allgemeine Geschäftsbedingungen', 'body_html' => <<<'HTML'

1. Geltungsbereich

-

Diese Allgemeinen Geschäftsbedingungen (AGB) gelten für alle Beratungs-, Werkstatt- und Umbauleistungen, die die Hifi Planet e.K., Boxbrunner Str. 20a, 63916 Amorbach („wir", „HifiPlanet") gegenüber ihren Kunden erbringt, sowie für die Nutzung des Kontaktformulars auf dieser Website.

+

Diese Allgemeinen Geschäftsbedingungen (AGB) gelten für alle Beratungs-, Werkstatt- und Umbauleistungen sowie Warenlieferungen, die die Hifi Planet e.K., Boxbrunner Str. 20a, 63916 Amorbach („wir“, „HifiPlanet“) gegenüber ihren Kunden erbringt, sowie für die Nutzung des Kontaktformulars auf dieser Website. Verbraucher im Sinne dieser AGB ist jede natürliche Person, die ein Rechtsgeschäft zu Zwecken abschließt, die überwiegend weder ihrer gewerblichen noch ihrer selbständigen beruflichen Tätigkeit zugerechnet werden können (§ 13 BGB).

2. Anfragen über die Website

-

Über das Kontaktformular können Sie unverbindlich eine Beratung oder ein Angebot zu einem einzelnen Produkt oder einem ganzen Paket anfragen. Die auf der Website angezeigten Preise sind, soweit sie von Drittanbietern automatisiert übernommen werden, unverbindliche Circa-Preise ohne Einbau und können sich bis zur Erstellung eines konkreten Angebots ändern. Mit dem Absenden einer Anfrage kommt noch kein Vertrag zustande.

+

Über das Kontaktformular können Sie unverbindlich eine Beratung oder ein Angebot zu einem einzelnen Produkt oder einem ganzen Paket anfragen. Die auf der Website angezeigten Preise sind, soweit sie von Drittanbietern automatisiert übernommen werden, unverbindliche Circa-Preise inklusive Umsatzsteuer und ohne Einbau und können sich bis zur Erstellung eines konkreten Angebots ändern. Mit dem Absenden einer Anfrage kommt noch kein Vertrag zustande; über die Website selbst werden keine Verträge geschlossen.

3. Vertragsschluss

-

Ein verbindlicher Vertrag über Beratung, Material und Einbauleistungen kommt erst zustande, wenn wir Ihnen nach persönlicher oder schriftlicher Abstimmung ein konkretes Angebot unterbreitet haben und Sie dieses angenommen haben, spätestens jedoch mit der Übergabe Ihres Fahrzeugs zur vereinbarten Auftragsdurchführung in unserer Werkstatt in Amorbach.

-

4. Preise und Zahlung

-

Es gelten die im jeweiligen Einzelangebot genannten Preise inklusive der zum Zeitpunkt der Rechnungsstellung gesetzlich geltenden Umsatzsteuer. Sofern nichts anderes vereinbart ist, ist die Rechnung nach Abnahme der Leistung bzw. Übergabe des Fahrzeugs ohne Abzug fällig.

-

5. Termine und Fahrzeugübergabe

-

Vereinbarte Termine zur Fahrzeugübergabe sind von beiden Seiten einzuhalten. Verschiebungen sind möglichst frühzeitig mitzuteilen. Für Gegenstände, die sich zum Zeitpunkt der Übergabe im Fahrzeug befinden und nicht Gegenstand des Auftrags sind, übernehmen wir keine Haftung.

-

6. Gewährleistung

-

Es gelten die gesetzlichen Gewährleistungsrechte. Mängel sind uns unverzüglich nach Feststellung anzuzeigen, damit wir Ihnen Nacherfüllung anbieten können. Für Verschleißteile sowie für Schäden, die auf unsachgemäße Behandlung, Fremdeingriffe Dritter oder normalen Verschleiß zurückzuführen sind, besteht kein Gewährleistungsanspruch.

-

7. Eigentumsvorbehalt

-

Verbautes Material und gelieferte Ware bleiben bis zur vollständigen Bezahlung unser Eigentum.

-

8. Haftung

-

Wir haften unbeschränkt bei Vorsatz und grober Fahrlässigkeit sowie nach Maßgabe des Produkthaftungsgesetzes. Bei leichter Fahrlässigkeit haften wir nur bei Verletzung einer wesentlichen Vertragspflicht (Kardinalpflicht) und begrenzt auf den vertragstypisch vorhersehbaren Schaden. Die Haftung für Schäden aus der Verletzung des Lebens, des Körpers oder der Gesundheit bleibt hiervon unberührt.

-

9. Widerrufsrecht

-

Ein gesetzliches Widerrufsrecht für Verbraucher besteht bei Verträgen, die außerhalb von Geschäftsräumen oder im Fernabsatz geschlossen werden. Da der eigentliche Werkvertrag über Beratung und Einbauleistungen erst bei persönlicher Fahrzeugübergabe in unseren Geschäftsräumen in Amorbach geschlossen wird, handelt es sich hierbei nicht um einen Fernabsatzvertrag; ein gesetzliches Widerrufsrecht besteht in diesem Fall nicht. Sollte im Einzelfall ausnahmsweise ein Vertrag im Fernabsatz zustande kommen, informieren wir Sie gesondert über Ihr gesetzliches Widerrufsrecht.

-

10. Anwendbares Recht und Gerichtsstand

-

Es gilt das Recht der Bundesrepublik Deutschland unter Ausschluss des UN-Kaufrechts. Ist der Kunde Kaufmann, juristische Person des öffentlichen Rechts oder öffentlich-rechtliches Sondervermögen, ist Gerichtsstand für alle Streitigkeiten aus diesem Vertragsverhältnis unser Geschäftssitz in Amorbach.

-

11. Schlussbestimmungen

+

Ein verbindlicher Vertrag über Beratung, Material und Einbauleistungen kommt zustande, wenn Sie ein konkretes Angebot von uns annehmen. Die Annahme erfolgt in der Regel bei der persönlichen Auftragserteilung bzw. Fahrzeugübergabe in unserer Werkstatt in Amorbach. Nehmen Sie ein Angebot als Verbraucher ausschließlich per E-Mail, Telefon, Messenger oder Brief an (Fernabsatzvertrag), steht Ihnen das gesetzliche Widerrufsrecht nach Ziffer 10 zu.

+

4. Kostenvoranschlag und Zusatzarbeiten

+

Angebote und Kostenvoranschläge erstellen wir auf Grundlage der vorab bekannten Informationen zum Fahrzeug. Stellt sich bei der Arbeit heraus, dass zusätzliche Arbeiten oder Teile erforderlich sind oder der veranschlagte Preis wesentlich überschritten wird, holen wir vorher Ihre Zustimmung ein.

+

5. Preise und Zahlung

+

Es gelten die im jeweiligen Einzelangebot genannten Preise inklusive der gesetzlichen Umsatzsteuer. Sofern nichts anderes vereinbart ist, ist die Rechnung nach Abnahme der Leistung bei Abholung des Fahrzeugs ohne Abzug fällig. Wegen unserer Forderungen aus dem Auftrag steht uns ein gesetzliches Pfandrecht an dem uns übergebenen Fahrzeug zu (§ 647 BGB).

+

6. Termine, Fahrzeugübergabe und Abnahme

+

Vereinbarte Termine zur Fahrzeugübergabe sind von beiden Seiten einzuhalten. Verschiebungen sind möglichst frühzeitig mitzuteilen. Bitte entnehmen Sie vor der Übergabe Wertgegenstände und persönliche Gegenstände, die nicht Gegenstand des Auftrags sind, aus dem Fahrzeug. Für solche Gegenstände haften wir nur nach Maßgabe von Ziffer 9. Wir zeigen Ihnen die fertige Leistung bei der Abholung; mit der Abholung ohne Beanstandung gilt die Leistung als abgenommen, soweit keine wesentlichen Mängel vorliegen.

+

7. Gewährleistung

+

Es gelten die gesetzlichen Mängelrechte. Bitte teilen Sie uns Mängel möglichst zeitnah mit, damit wir Ihnen Nacherfüllung anbieten können; Ihre gesetzlichen Rechte bleiben davon unberührt. Keine Mängel sind Schäden, die auf normalen Verschleiß, unsachgemäße Behandlung oder nachträgliche Eingriffe Dritter zurückzuführen sind. Gegenüber Unternehmern beträgt die Verjährungsfrist für Mängelansprüche ein Jahr, und es gilt die Untersuchungs- und Rügepflicht nach § 377 HGB; dies gilt nicht für Schadensersatzansprüche nach Ziffer 9.

+

8. Eigentumsvorbehalt

+

Gelieferte Ware und verbautes Material bleiben bis zur vollständigen Bezahlung unser Eigentum, soweit sie nicht durch den Einbau wesentlicher Bestandteil des Fahrzeugs geworden sind.

+

9. Haftung

+

Wir haften unbeschränkt bei Vorsatz und grober Fahrlässigkeit, für Schäden aus der Verletzung des Lebens, des Körpers oder der Gesundheit sowie nach Maßgabe des Produkthaftungsgesetzes. Bei leichter Fahrlässigkeit haften wir nur bei Verletzung einer wesentlichen Vertragspflicht (Kardinalpflicht), deren Erfüllung die ordnungsgemäße Durchführung des Vertrags überhaupt erst ermöglicht und auf deren Einhaltung Sie regelmäßig vertrauen dürfen; die Haftung ist in diesem Fall auf den vertragstypisch vorhersehbaren Schaden begrenzt. Im Übrigen ist die Haftung für leichte Fahrlässigkeit ausgeschlossen.

+

10. Widerrufsrecht für Verbraucher

+

Schließen Sie als Verbraucher einen Vertrag in unseren Geschäftsräumen in Amorbach, besteht kein gesetzliches Widerrufsrecht. Kommt ein Vertrag mit einem Verbraucher ausschließlich über Fernkommunikationsmittel zustande (z. B. Annahme eines Angebots per E-Mail oder Telefon), gilt die folgende Widerrufsbelehrung:

+

Widerrufsbelehrung

+

Widerrufsrecht
Sie haben das Recht, binnen vierzehn Tagen ohne Angabe von Gründen diesen Vertrag zu widerrufen. Die Widerrufsfrist beträgt vierzehn Tage ab dem Tag des Vertragsschlusses; bei einem Vertrag über die Lieferung von Waren ab dem Tag, an dem Sie oder ein von Ihnen benannter Dritter, der nicht der Beförderer ist, die Waren in Besitz genommen haben bzw. hat.

+

Um Ihr Widerrufsrecht auszuüben, müssen Sie uns (Hifi Planet e.K., Boxbrunner Str. 20a, 63916 Amorbach, Telefon: 09373 20 62 390, E-Mail: info@hifi-planet-amorbach.de) mittels einer eindeutigen Erklärung (z. B. ein mit der Post versandter Brief oder eine E-Mail) über Ihren Entschluss, diesen Vertrag zu widerrufen, informieren. Sie können dafür das unten stehende Muster-Widerrufsformular verwenden, das jedoch nicht vorgeschrieben ist. Zur Wahrung der Widerrufsfrist reicht es aus, dass Sie die Mitteilung über die Ausübung des Widerrufsrechts vor Ablauf der Widerrufsfrist absenden.

+

Folgen des Widerrufs
Wenn Sie diesen Vertrag widerrufen, haben wir Ihnen alle Zahlungen, die wir von Ihnen erhalten haben, einschließlich der Lieferkosten (mit Ausnahme der zusätzlichen Kosten, die sich daraus ergeben, dass Sie eine andere Art der Lieferung als die von uns angebotene, günstigste Standardlieferung gewählt haben), unverzüglich und spätestens binnen vierzehn Tagen ab dem Tag zurückzuzahlen, an dem die Mitteilung über Ihren Widerruf dieses Vertrags bei uns eingegangen ist. Für diese Rückzahlung verwenden wir dasselbe Zahlungsmittel, das Sie bei der ursprünglichen Transaktion eingesetzt haben, es sei denn, mit Ihnen wurde ausdrücklich etwas anderes vereinbart; in keinem Fall werden Ihnen wegen dieser Rückzahlung Entgelte berechnet. Wir können die Rückzahlung verweigern, bis wir gelieferte Waren wieder zurückerhalten haben oder bis Sie den Nachweis erbracht haben, dass Sie die Waren zurückgesandt haben, je nachdem, welches der frühere Zeitpunkt ist. Sie haben Waren unverzüglich und in jedem Fall spätestens binnen vierzehn Tagen ab dem Tag, an dem Sie uns über den Widerruf unterrichten, an uns zurückzusenden oder zu übergeben. Die Frist ist gewahrt, wenn Sie die Waren vor Ablauf der Frist absenden. Sie tragen die unmittelbaren Kosten der Rücksendung der Waren. Sie müssen für einen etwaigen Wertverlust der Waren nur aufkommen, wenn dieser Wertverlust auf einen zur Prüfung der Beschaffenheit, Eigenschaften und Funktionsweise der Waren nicht notwendigen Umgang mit ihnen zurückzuführen ist.

+

Haben Sie verlangt, dass die Dienstleistungen während der Widerrufsfrist beginnen sollen, so haben Sie uns einen angemessenen Betrag zu zahlen, der dem Anteil der bis zu dem Zeitpunkt, zu dem Sie uns von der Ausübung des Widerrufsrechts hinsichtlich dieses Vertrags unterrichten, bereits erbrachten Dienstleistungen im Vergleich zum Gesamtumfang der im Vertrag vorgesehenen Dienstleistungen entspricht.

+

Ende der Belehrung

+

Muster-Widerrufsformular

+

(Wenn Sie den Vertrag widerrufen wollen, dann füllen Sie bitte dieses Formular aus und senden Sie es zurück.)

+

An: Hifi Planet e.K., Boxbrunner Str. 20a, 63916 Amorbach, E-Mail: info@hifi-planet-amorbach.de

+

Hiermit widerrufe(n) ich/wir (*) den von mir/uns (*) abgeschlossenen Vertrag über den Kauf der folgenden Waren (*)/die Erbringung der folgenden Dienstleistung (*)
– Bestellt am (*)/erhalten am (*)
– Name des/der Verbraucher(s)
– Anschrift des/der Verbraucher(s)
– Unterschrift des/der Verbraucher(s) (nur bei Mitteilung auf Papier)
– Datum

+

(*) Unzutreffendes streichen.

+

11. Anwendbares Recht und Gerichtsstand

+

Es gilt das Recht der Bundesrepublik Deutschland unter Ausschluss des UN-Kaufrechts. Bei Verbrauchern gilt diese Rechtswahl nur, soweit dadurch nicht der Schutz durch zwingende Bestimmungen des Rechts des Staates, in dem der Verbraucher seinen gewöhnlichen Aufenthalt hat, entzogen wird. Ist der Kunde Kaufmann, juristische Person des öffentlichen Rechts oder öffentlich-rechtliches Sondervermögen, ist Gerichtsstand für alle Streitigkeiten aus diesem Vertragsverhältnis unser Geschäftssitz in Amorbach.

+

12. Schlussbestimmungen

Sollte eine Bestimmung dieser AGB unwirksam sein oder werden, bleibt die Wirksamkeit der übrigen Bestimmungen hiervon unberührt.

HTML, ], ]; + // SHA-1 frueherer Standardtexte: Steht in legal_pages noch unveraendert ein alter + // Standardtext (z. B. ohne Aenderung im Admin gespeichert), wird stattdessen der aktuelle + // Standardtext ausgeliefert - so kommen Korrekturen per git pull auch dort an. + private const OUTDATED_DEFAULT_HASHES = [ + 'datenschutz' => ['aab0cf338059166f3ff0fc1420ff86d1b216783a'], + 'agb' => ['0afe6e51b6cdee755289e0a2fb06694ad7492858'], + ]; + + private static function isOutdatedDefault(string $slug, array $row): bool + { + return in_array(sha1((string) $row['body_html']), self::OUTDATED_DEFAULT_HASHES[$slug] ?? [], true); + } + /** Admin: alle drei Rechtstexte (DB-Stand oder Standardtext) auf einmal, fuer die Uebersicht. */ public static function index(): void { @@ -126,6 +167,9 @@ HTML, foreach (self::ALLOWED_SLUGS as $slug) { $stmt->execute([$slug]); $row = $stmt->fetch(); + if ($row && self::isOutdatedDefault($slug, $row)) { + $row = false; + } $pages[$slug] = $row ?: [ 'title' => self::DEFAULTS[$slug]['title'], 'body_html' => self::DEFAULTS[$slug]['body_html'], @@ -146,6 +190,9 @@ HTML, $stmt = Database::connection()->prepare('SELECT title, body_html FROM legal_pages WHERE slug = ?'); $stmt->execute([$slug]); $row = $stmt->fetch(); + if ($row && self::isOutdatedDefault($slug, $row)) { + $row = false; + } Http::send($row ?: [ 'title' => self::DEFAULTS[$slug]['title'], diff --git a/hifi/api/src/Services/GooglePlacesReviewsFetcher.php b/hifi/api/src/Services/GooglePlacesReviewsFetcher.php index b7da941..f08b3a7 100644 --- a/hifi/api/src/Services/GooglePlacesReviewsFetcher.php +++ b/hifi/api/src/Services/GooglePlacesReviewsFetcher.php @@ -16,6 +16,11 @@ class GooglePlacesReviewsFetcher { private const ENDPOINT = 'https://places.googleapis.com/v1/places/'; private const FIELD_MASK = 'displayName,rating,userRatingCount,reviews'; + // Profilfotos der Bewerter werden beim Refresh heruntergeladen und lokal ausgeliefert - + // direkt von googleusercontent.com geladen ginge bei jedem Seitenaufruf die IP-Adresse + // des Besuchers ohne Einwilligung an Google (siehe Datenschutzerklaerung). + private const PHOTO_DIR = __DIR__ . '/../../uploads/reviews/'; + private const PHOTO_MAX_BYTES = 512 * 1024; private int $timeout; @@ -103,6 +108,15 @@ class GooglePlacesReviewsFetcher return $result; } + $photoNames = []; + foreach ($result['reviews'] as $i => $review) { + $local = $this->storePhoto($review['profile_photo_url']); + $result['reviews'][$i]['profile_photo_url'] = $local; + if ($local !== null) { + $photoNames[] = basename($local); + } + } + $db->beginTransaction(); try { $db->exec('DELETE FROM google_reviews'); @@ -133,6 +147,7 @@ class GooglePlacesReviewsFetcher $update->execute([$result['rating'], $result['rating_count']]); $db->commit(); + $this->removeStalePhotos($photoNames); } catch (\Throwable $e) { $db->rollBack(); $error = 'Speichern fehlgeschlagen: ' . $e->getMessage(); @@ -148,6 +163,61 @@ class GooglePlacesReviewsFetcher ]; } + /** + * Laedt ein Profilfoto von Google herunter und legt es unter uploads/reviews/ ab. + * Dateiname = Hash der URL, damit ein taeglicher Refresh unveraenderte Fotos nicht neu + * schreibt. Liefert den oeffentlichen Pfad oder null (dann zeigt die Seite Initialen). + */ + private function storePhoto(?string $url): ?string + { + if (!is_string($url) || !preg_match('#^https://[a-z0-9.-]+\.googleusercontent\.com/#i', $url)) { + return null; + } + + if (!is_dir(self::PHOTO_DIR) && !@mkdir(self::PHOTO_DIR, 0755, true)) { + return null; + } + + $filename = sha1($url) . '.jpg'; + $destination = self::PHOTO_DIR . $filename; + + if (!is_file($destination)) { + $ch = curl_init($url); + curl_setopt_array($ch, [ + CURLOPT_RETURNTRANSFER => true, + CURLOPT_TIMEOUT => $this->timeout, + CURLOPT_SSL_VERIFYPEER => true, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_MAXREDIRS => 3, + ]); + $body = curl_exec($ch); + $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); + $type = (string) curl_getinfo($ch, CURLINFO_CONTENT_TYPE); + curl_close($ch); + + if (!is_string($body) || $status !== 200 || $body === '' || strlen($body) > self::PHOTO_MAX_BYTES + || !str_starts_with(strtolower($type), 'image/')) { + return null; + } + if (@file_put_contents($destination, $body) === false) { + return null; + } + } + + $config = require __DIR__ . '/../../config/config.php'; + return rtrim($config['app']['base_path'], '/') . '/api/uploads/reviews/' . $filename; + } + + /** Entfernt Fotos von Rezensionen, die Google nicht mehr liefert. */ + private function removeStalePhotos(array $keep): void + { + foreach (glob(self::PHOTO_DIR . '*.jpg') ?: [] as $file) { + if (!in_array(basename($file), $keep, true)) { + @unlink($file); + } + } + } + private function recordError(PDO $db, string $error): void { $db->exec('INSERT IGNORE INTO app_settings (id) VALUES (1)'); diff --git a/hifi/assets/AccountSettings-CfY49TlQ.js b/hifi/assets/AccountSettings-2nhdohvL.js similarity index 99% rename from hifi/assets/AccountSettings-CfY49TlQ.js rename to hifi/assets/AccountSettings-2nhdohvL.js index 60d63bb..f19a0b2 100644 --- a/hifi/assets/AccountSettings-CfY49TlQ.js +++ b/hifi/assets/AccountSettings-2nhdohvL.js @@ -1,4 +1,4 @@ -import{b as De,r as I,j as u,a as V}from"./index-QV-Szw5n.js";var Y={},Fe=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},ye={},S={};let de;const Ue=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];S.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};S.getSymbolTotalCodewords=function(t){return Ue[t]};S.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};S.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');de=t};S.isKanjiModeEnabled=function(){return typeof de<"u"};S.toSJIS=function(t){return de(t)};var W={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+s)}}e.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})(W);function xe(){this.buffer=[],this.length=0}xe.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let s=0;s>>t-s-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var ze=xe;function O(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}O.prototype.set=function(e,t,s,n){const r=e*this.size+t;this.data[r]=s,n&&(this.reservedBit[r]=!0)};O.prototype.get=function(e,t){return this.data[e*this.size+t]};O.prototype.xor=function(e,t,s){this.data[e*this.size+t]^=s};O.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var Ke=O,Ce={};(function(e){const t=S.getSymbolSize;e.getRowColCoords=function(n){if(n===1)return[];const r=Math.floor(n/7)+2,o=t(n),i=o===145?26:Math.ceil((o-13)/(2*r-2))*2,l=[o-7];for(let a=1;a=0&&r<=7},e.from=function(r){return e.isValid(r)?parseInt(r,10):void 0},e.getPenaltyN1=function(r){const o=r.size;let i=0,l=0,a=0,c=null,d=null;for(let x=0;x=5&&(i+=t.N1+(l-5)),c=f,l=1),f=r.get(y,x),f===d?a++:(a>=5&&(i+=t.N1+(a-5)),d=f,a=1)}l>=5&&(i+=t.N1+(l-5)),a>=5&&(i+=t.N1+(a-5))}return i},e.getPenaltyN2=function(r){const o=r.size;let i=0;for(let l=0;l=10&&(l===1488||l===93)&&i++,a=a<<1&2047|r.get(d,c),d>=10&&(a===1488||a===93)&&i++}return i*t.N3},e.getPenaltyN4=function(r){let o=0;const i=r.data.length;for(let a=0;a=0;){const i=o[0];for(let a=0;a0){const o=new Uint8Array(this.degree);return o.set(n,r),o}return n};var He=ce,ke={},R={},fe={};fe.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var _={};const Se="[0-9]+",Je="[A-Z $%*+\\-./:]+";let J="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";J=J.replace(/u/g,"\\u");const Ye="(?:(?![A-Z0-9 $%*+\\-./:]|"+J+`)(?:.|[\r +import{b as De,r as I,j as u,a as V}from"./index-D7JbPKAF.js";var Y={},Fe=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},ye={},S={};let de;const Ue=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];S.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};S.getSymbolTotalCodewords=function(t){return Ue[t]};S.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};S.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');de=t};S.isKanjiModeEnabled=function(){return typeof de<"u"};S.toSJIS=function(t){return de(t)};var W={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+s)}}e.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})(W);function xe(){this.buffer=[],this.length=0}xe.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let s=0;s>>t-s-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var ze=xe;function O(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}O.prototype.set=function(e,t,s,n){const r=e*this.size+t;this.data[r]=s,n&&(this.reservedBit[r]=!0)};O.prototype.get=function(e,t){return this.data[e*this.size+t]};O.prototype.xor=function(e,t,s){this.data[e*this.size+t]^=s};O.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var Ke=O,Ce={};(function(e){const t=S.getSymbolSize;e.getRowColCoords=function(n){if(n===1)return[];const r=Math.floor(n/7)+2,o=t(n),i=o===145?26:Math.ceil((o-13)/(2*r-2))*2,l=[o-7];for(let a=1;a=0&&r<=7},e.from=function(r){return e.isValid(r)?parseInt(r,10):void 0},e.getPenaltyN1=function(r){const o=r.size;let i=0,l=0,a=0,c=null,d=null;for(let x=0;x=5&&(i+=t.N1+(l-5)),c=f,l=1),f=r.get(y,x),f===d?a++:(a>=5&&(i+=t.N1+(a-5)),d=f,a=1)}l>=5&&(i+=t.N1+(l-5)),a>=5&&(i+=t.N1+(a-5))}return i},e.getPenaltyN2=function(r){const o=r.size;let i=0;for(let l=0;l=10&&(l===1488||l===93)&&i++,a=a<<1&2047|r.get(d,c),d>=10&&(a===1488||a===93)&&i++}return i*t.N3},e.getPenaltyN4=function(r){let o=0;const i=r.data.length;for(let a=0;a=0;){const i=o[0];for(let a=0;a0){const o=new Uint8Array(this.degree);return o.set(n,r),o}return n};var He=ce,ke={},R={},fe={};fe.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var _={};const Se="[0-9]+",Je="[A-Z $%*+\\-./:]+";let J="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";J=J.replace(/u/g,"\\u");const Ye="(?:(?![A-Z0-9 $%*+\\-./:]|"+J+`)(?:.|[\r ]))+`;_.KANJI=new RegExp(J,"g");_.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");_.BYTE=new RegExp(Ye,"g");_.NUMERIC=new RegExp(Se,"g");_.ALPHANUMERIC=new RegExp(Je,"g");const Oe=new RegExp("^"+J+"$"),$e=new RegExp("^"+Se+"$"),qe=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");_.testKanji=function(t){return Oe.test(t)};_.testNumeric=function(t){return $e.test(t)};_.testAlphanumeric=function(t){return qe.test(t)};(function(e){const t=fe,s=_;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(o,i){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!t.isValid(i))throw new Error("Invalid version: "+i);return i>=1&&i<10?o.ccBits[0]:i<27?o.ccBits[1]:o.ccBits[2]},e.getBestModeForData=function(o){return s.testNumeric(o)?e.NUMERIC:s.testAlphanumeric(o)?e.ALPHANUMERIC:s.testKanji(o)?e.KANJI:e.BYTE},e.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},e.isValid=function(o){return o&&o.bit&&o.ccBits};function n(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+r)}}e.from=function(o,i){if(e.isValid(o))return o;try{return n(o)}catch{return i}}})(R);(function(e){const t=S,s=Z,n=W,r=R,o=fe,i=7973,l=t.getBCHDigit(i);function a(y,f,p){for(let w=1;w<=40;w++)if(f<=e.getCapacity(w,p,y))return w}function c(y,f){return r.getCharCountIndicator(y,f)+4}function d(y,f){let p=0;return y.forEach(function(w){const B=c(w.mode,f);p+=B+w.getBitsLength()}),p}function x(y,f){for(let p=1;p<=40;p++)if(d(y,p)<=e.getCapacity(p,f,r.MIXED))return p}e.from=function(f,p){return o.isValid(f)?parseInt(f,10):p},e.getCapacity=function(f,p,w){if(!o.isValid(f))throw new Error("Invalid QR Code version");typeof w>"u"&&(w=r.BYTE);const B=t.getSymbolTotalCodewords(f),h=s.getTotalCodewordsCount(f,p),b=(B-h)*8;if(w===r.MIXED)return b;const g=b-c(w,f);switch(w){case r.NUMERIC:return Math.floor(g/10*3);case r.ALPHANUMERIC:return Math.floor(g/11*2);case r.KANJI:return Math.floor(g/13);case r.BYTE:default:return Math.floor(g/8)}},e.getBestVersionForData=function(f,p){let w;const B=n.from(p,n.M);if(Array.isArray(f)){if(f.length>1)return x(f,B);if(f.length===0)return 1;w=f[0]}else w=f;return a(w.mode,w.getLength(),B)},e.getEncodedBits=function(f){if(!o.isValid(f)||f<7)throw new Error("Invalid QR Code version");let p=f<<12;for(;t.getBCHDigit(p)-l>=0;)p^=i<=0;)r^=Ie<0&&(n=this.data.substr(s),r=parseInt(n,10),t.put(r,o*3+1))};var We=D;const Ze=R,te=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function F(e){this.mode=Ze.ALPHANUMERIC,this.data=e}F.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};F.prototype.getLength=function(){return this.data.length};F.prototype.getBitsLength=function(){return F.getBitsLength(this.data.length)};F.prototype.write=function(t){let s;for(s=0;s+2<=this.data.length;s+=2){let n=te.indexOf(this.data[s])*45;n+=te.indexOf(this.data[s+1]),t.put(n,11)}this.data.length%2&&t.put(te.indexOf(this.data[s]),6)};var Xe=F;const et=R;function U(e){this.mode=et.BYTE,typeof e=="string"?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}U.getBitsLength=function(t){return t*8};U.prototype.getLength=function(){return this.data.length};U.prototype.getBitsLength=function(){return U.getBitsLength(this.data.length)};U.prototype.write=function(e){for(let t=0,s=this.data.length;t=33088&&s<=40956)s-=33088;else if(s>=57408&&s<=60351)s-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+` Make sure your charset is UTF-8`);s=(s>>>8&255)*192+(s&255),e.put(s,13)}};var ot=z,Me={exports:{}};(function(e){var t={single_source_shortest_paths:function(s,n,r){var o={},i={};i[n]=0;var l=t.PriorityQueue.make();l.push(n,0);for(var a,c,d,x,y,f,p,w,B;!l.empty();){a=l.pop(),c=a.value,x=a.cost,y=s[c]||{};for(d in y)y.hasOwnProperty(d)&&(f=y[d],p=x+f,w=i[d],B=typeof i[d]>"u",(B||w>p)&&(i[d]=p,l.push(d,p),o[d]=c))}if(typeof r<"u"&&typeof i[r]>"u"){var h=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(h)}return o},extract_shortest_path_from_predecessor_list:function(s,n){for(var r=[],o=n;o;)r.push(o),s[o],o=s[o];return r.reverse(),r},find_path:function(s,n,r){var o=t.single_source_shortest_paths(s,n,r);return t.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(s){var n=t.PriorityQueue,r={},o;s=s||{};for(o in n)n.hasOwnProperty(o)&&(r[o]=n[o]);return r.queue=[],r.sorter=s.sorter||n.default_sorter,r},default_sorter:function(s,n){return s.cost-n.cost},push:function(s,n){var r={value:s,cost:n};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Me);var st=Me.exports;(function(e){const t=R,s=We,n=Xe,r=tt,o=ot,i=_,l=S,a=st;function c(h){return unescape(encodeURIComponent(h)).length}function d(h,b,g){const m=[];let C;for(;(C=h.exec(g))!==null;)m.push({data:C[0],index:C.index,mode:b,length:C[0].length});return m}function x(h){const b=d(i.NUMERIC,t.NUMERIC,h),g=d(i.ALPHANUMERIC,t.ALPHANUMERIC,h);let m,C;return l.isKanjiModeEnabled()?(m=d(i.BYTE,t.BYTE,h),C=d(i.KANJI,t.KANJI,h)):(m=d(i.BYTE_KANJI,t.BYTE,h),C=[]),b.concat(g,m,C).sort(function(A,k){return A.index-k.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function y(h,b){switch(b){case t.NUMERIC:return s.getBitsLength(h);case t.ALPHANUMERIC:return n.getBitsLength(h);case t.KANJI:return o.getBitsLength(h);case t.BYTE:return r.getBitsLength(h)}}function f(h){return h.reduce(function(b,g){const m=b.length-1>=0?b[b.length-1]:null;return m&&m.mode===g.mode?(b[b.length-1].data+=g.data,b):(b.push(g),b)},[])}function p(h){const b=[];for(let g=0;g=0&&l<=6&&(a===0||a===6)||a>=0&&a<=6&&(l===0||l===6)||l>=2&&l<=4&&a>=2&&a<=4?e.set(o+l,i+a,!0,!0):e.set(o+l,i+a,!1,!0))}}function gt(e){const t=e.size;for(let s=8;s>l&1)===1,e.set(r,o,i,!0),e.set(o,r,i,!0)}function oe(e,t,s){const n=e.size,r=ct.getEncodedBits(t,s);let o,i;for(o=0;o<15;o++)i=(r>>o&1)===1,o<6?e.set(o,8,i,!0):o<8?e.set(o+1,8,i,!0):e.set(n-15+o,8,i,!0),o<8?e.set(8,n-o-1,i,!0):o<9?e.set(8,15-o-1+1,i,!0):e.set(8,15-o-1,i,!0);e.set(n-8,8,1,!0)}function wt(e,t){const s=e.size;let n=-1,r=s-1,o=7,i=0;for(let l=s-1;l>0;l-=2)for(l===6&&l--;;){for(let a=0;a<2;a++)if(!e.isReserved(r,l-a)){let c=!1;i>>o&1)===1),e.set(r,l-a,c),o--,o===-1&&(i++,o=7)}if(r+=n,r<0||s<=r){r-=n,n=-n;break}}}function pt(e,t,s){const n=new it;s.forEach(function(a){n.put(a.mode.bit,4),n.put(a.getLength(),ft.getCharCountIndicator(a.mode,e)),a.write(n)});const r=ee.getSymbolTotalCodewords(e),o=le.getTotalCodewordsCount(e,t),i=(r-o)*8;for(n.getLengthInBits()+4<=i&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);const l=(i-n.getLengthInBits())/8;for(let a=0;a{i.get("/admin-users").then(y),i.get("/permissions/catalog").then(_),(o("permission_groups.manage")||o("users.manage"))&&i.get("/permission-groups").then(w)};n.useEffect(m,[]);const v=t=>{h(t.id),b(t.is_primary),d({username:t.username,password:"",is_super_admin:t.is_super_admin,permissions:t.permissions,group_ids:t.groups.map(s=>s.id)})},N=()=>{h(null),b(!1),d(k)},S=t=>{d(s=>({...s,permissions:s.permissions.includes(t)?s.permissions.filter(u=>u!==t):[...s.permissions,t]}))},B=t=>{d(s=>({...s,group_ids:s.group_ids.includes(t)?s.group_ids.filter(u=>u!==t):[...s.group_ids,t]}))},E=async t=>{t.preventDefault(),c("");try{if(l)await i.put(`/admin-users/${l}`,a);else{if(a.password.length<8){c("Passwort muss mindestens 8 Zeichen lang sein");return}await i.post("/admin-users",a)}N(),m()}catch(s){c(s.message)}},A=async t=>{if(confirm("Diesen Benutzer wirklich löschen?"))try{await i.delete(`/admin-users/${t}`),m()}catch(s){alert(s.message)}};return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Benutzer"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Jeder Mitarbeiter bekommt ein eigenes Konto mit genau den Rechten, die er braucht."}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2",children:"Benutzername"}),e.jsx("th",{className:"px-4 py-2",children:"Rolle"}),e.jsx("th",{className:"px-4 py-2",children:"Berechtigungsgruppen"}),e.jsx("th",{className:"px-4 py-2",children:"Zuletzt aktiv"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),e.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[x.map(t=>e.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[e.jsxs("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:[t.username,t.id===(r==null?void 0:r.id)&&e.jsx("span",{className:"ml-1 text-xs text-neutral-400",children:"(du)"}),t.is_primary&&e.jsx("span",{className:"ml-1 text-xs text-neutral-400",children:"(Erst-Administrator)"})]}),e.jsx("td",{className:"px-4 py-2",children:t.is_super_admin?e.jsx("span",{className:"rounded-full bg-brand-100 px-2 py-0.5 text-xs font-medium text-brand-700 dark:bg-brand-900/40 dark:text-brand-300",children:"Super-Admin"}):e.jsxs("span",{className:"text-neutral-500 dark:text-neutral-400",children:[t.permissions.length," Einzelrechte"]})}),e.jsx("td",{className:"px-4 py-2",children:e.jsxs("div",{className:"flex flex-wrap gap-1",children:[t.groups.map(s=>e.jsx("span",{className:"rounded-full bg-neutral-100 px-2 py-0.5 text-xs text-neutral-600 dark:bg-neutral-800 dark:text-neutral-300",children:s.name},s.id)),t.groups.length===0&&"–"]})}),e.jsx("td",{className:"px-4 py-2 text-neutral-500 dark:text-neutral-400",children:C(t.last_active_at)}),e.jsxs("td",{className:"px-4 py-2 text-right",children:[e.jsx("button",{onClick:()=>v(t),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),t.id!==(r==null?void 0:r.id)&&!t.is_primary&&e.jsx("button",{onClick:()=>A(t.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},t.id)),x.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Benutzer angelegt."})})]})]})})]}),e.jsxs("form",{onSubmit:E,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:l?"Benutzer bearbeiten":"Neuer Benutzer"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Benutzername *"}),e.jsx("input",{required:!0,value:a.username,onChange:t=>d({...a,username:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:["Passwort ",l?"(leer lassen = unverändert)":"*"]}),e.jsx("input",{type:"password",required:!l,value:a.password,onChange:t=>d({...a,password:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),(r==null?void 0:r.is_super_admin)&&e.jsxs("div",{children:[e.jsxs("label",{className:"flex items-center gap-2 text-sm text-neutral-700 dark:text-neutral-300",children:[e.jsx("input",{type:"checkbox",checked:a.is_super_admin,disabled:g,onChange:t=>d({...a,is_super_admin:t.target.checked}),className:"h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500 disabled:opacity-50"}),"Super-Admin (hat automatisch alle Rechte)"]}),g&&e.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:"Der Erst-Administrator behält immer den Super-Admin-Status."})]}),!a.is_super_admin&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Einzelne Berechtigungen"}),e.jsx("div",{className:"space-y-1.5 rounded-md border border-neutral-200 p-3 dark:border-neutral-700",children:f.map(t=>e.jsxs("label",{className:"flex items-center gap-2 text-sm text-neutral-700 dark:text-neutral-300",children:[e.jsx("input",{type:"checkbox",checked:a.permissions.includes(t.key),onChange:()=>S(t.key),className:"h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),t.label]},t.key))})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Berechtigungsgruppen"}),e.jsxs("div",{className:"space-y-1.5 rounded-md border border-neutral-200 p-3 dark:border-neutral-700",children:[p.map(t=>e.jsxs("label",{className:"flex items-center gap-2 text-sm text-neutral-700 dark:text-neutral-300",children:[e.jsx("input",{type:"checkbox",checked:a.group_ids.includes(t.id),onChange:()=>B(t.id),className:"h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),t.name]},t.id)),p.length===0&&e.jsx("p",{className:"text-sm text-neutral-400",children:"Noch keine Berechtigungsgruppen angelegt."})]})]})]}),j&&e.jsx("p",{className:"text-sm text-red-600",children:j}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:l?"Speichern":"Anlegen"}),l&&e.jsx("button",{type:"button",onClick:N,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}export{P as default}; +import{b as z,r as n,j as e,a as i}from"./index-D7JbPKAF.js";const k={username:"",password:"",is_super_admin:!1,permissions:[],group_ids:[]};function C(r){return r?new Date(r.replace(" ","T")).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"}):"Noch nie"}function P(){const{user:r,hasPermission:o}=z(),[x,y]=n.useState([]),[f,_]=n.useState([]),[p,w]=n.useState([]),[a,d]=n.useState(k),[l,h]=n.useState(null),[g,b]=n.useState(!1),[j,c]=n.useState(""),m=()=>{i.get("/admin-users").then(y),i.get("/permissions/catalog").then(_),(o("permission_groups.manage")||o("users.manage"))&&i.get("/permission-groups").then(w)};n.useEffect(m,[]);const v=t=>{h(t.id),b(t.is_primary),d({username:t.username,password:"",is_super_admin:t.is_super_admin,permissions:t.permissions,group_ids:t.groups.map(s=>s.id)})},N=()=>{h(null),b(!1),d(k)},S=t=>{d(s=>({...s,permissions:s.permissions.includes(t)?s.permissions.filter(u=>u!==t):[...s.permissions,t]}))},B=t=>{d(s=>({...s,group_ids:s.group_ids.includes(t)?s.group_ids.filter(u=>u!==t):[...s.group_ids,t]}))},E=async t=>{t.preventDefault(),c("");try{if(l)await i.put(`/admin-users/${l}`,a);else{if(a.password.length<8){c("Passwort muss mindestens 8 Zeichen lang sein");return}await i.post("/admin-users",a)}N(),m()}catch(s){c(s.message)}},A=async t=>{if(confirm("Diesen Benutzer wirklich löschen?"))try{await i.delete(`/admin-users/${t}`),m()}catch(s){alert(s.message)}};return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Benutzer"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Jeder Mitarbeiter bekommt ein eigenes Konto mit genau den Rechten, die er braucht."}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2",children:"Benutzername"}),e.jsx("th",{className:"px-4 py-2",children:"Rolle"}),e.jsx("th",{className:"px-4 py-2",children:"Berechtigungsgruppen"}),e.jsx("th",{className:"px-4 py-2",children:"Zuletzt aktiv"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),e.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[x.map(t=>e.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[e.jsxs("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:[t.username,t.id===(r==null?void 0:r.id)&&e.jsx("span",{className:"ml-1 text-xs text-neutral-400",children:"(du)"}),t.is_primary&&e.jsx("span",{className:"ml-1 text-xs text-neutral-400",children:"(Erst-Administrator)"})]}),e.jsx("td",{className:"px-4 py-2",children:t.is_super_admin?e.jsx("span",{className:"rounded-full bg-brand-100 px-2 py-0.5 text-xs font-medium text-brand-700 dark:bg-brand-900/40 dark:text-brand-300",children:"Super-Admin"}):e.jsxs("span",{className:"text-neutral-500 dark:text-neutral-400",children:[t.permissions.length," Einzelrechte"]})}),e.jsx("td",{className:"px-4 py-2",children:e.jsxs("div",{className:"flex flex-wrap gap-1",children:[t.groups.map(s=>e.jsx("span",{className:"rounded-full bg-neutral-100 px-2 py-0.5 text-xs text-neutral-600 dark:bg-neutral-800 dark:text-neutral-300",children:s.name},s.id)),t.groups.length===0&&"–"]})}),e.jsx("td",{className:"px-4 py-2 text-neutral-500 dark:text-neutral-400",children:C(t.last_active_at)}),e.jsxs("td",{className:"px-4 py-2 text-right",children:[e.jsx("button",{onClick:()=>v(t),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),t.id!==(r==null?void 0:r.id)&&!t.is_primary&&e.jsx("button",{onClick:()=>A(t.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},t.id)),x.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Benutzer angelegt."})})]})]})})]}),e.jsxs("form",{onSubmit:E,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:l?"Benutzer bearbeiten":"Neuer Benutzer"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Benutzername *"}),e.jsx("input",{required:!0,value:a.username,onChange:t=>d({...a,username:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:["Passwort ",l?"(leer lassen = unverändert)":"*"]}),e.jsx("input",{type:"password",required:!l,value:a.password,onChange:t=>d({...a,password:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),(r==null?void 0:r.is_super_admin)&&e.jsxs("div",{children:[e.jsxs("label",{className:"flex items-center gap-2 text-sm text-neutral-700 dark:text-neutral-300",children:[e.jsx("input",{type:"checkbox",checked:a.is_super_admin,disabled:g,onChange:t=>d({...a,is_super_admin:t.target.checked}),className:"h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500 disabled:opacity-50"}),"Super-Admin (hat automatisch alle Rechte)"]}),g&&e.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:"Der Erst-Administrator behält immer den Super-Admin-Status."})]}),!a.is_super_admin&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Einzelne Berechtigungen"}),e.jsx("div",{className:"space-y-1.5 rounded-md border border-neutral-200 p-3 dark:border-neutral-700",children:f.map(t=>e.jsxs("label",{className:"flex items-center gap-2 text-sm text-neutral-700 dark:text-neutral-300",children:[e.jsx("input",{type:"checkbox",checked:a.permissions.includes(t.key),onChange:()=>S(t.key),className:"h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),t.label]},t.key))})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Berechtigungsgruppen"}),e.jsxs("div",{className:"space-y-1.5 rounded-md border border-neutral-200 p-3 dark:border-neutral-700",children:[p.map(t=>e.jsxs("label",{className:"flex items-center gap-2 text-sm text-neutral-700 dark:text-neutral-300",children:[e.jsx("input",{type:"checkbox",checked:a.group_ids.includes(t.id),onChange:()=>B(t.id),className:"h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),t.name]},t.id)),p.length===0&&e.jsx("p",{className:"text-sm text-neutral-400",children:"Noch keine Berechtigungsgruppen angelegt."})]})]})]}),j&&e.jsx("p",{className:"text-sm text-red-600",children:j}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:l?"Speichern":"Anlegen"}),l&&e.jsx("button",{type:"button",onClick:N,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}export{P as default}; diff --git a/hifi/assets/Brands-V9s4vz2i.js b/hifi/assets/Brands-Dox0FZUh.js similarity index 95% rename from hifi/assets/Brands-V9s4vz2i.js rename to hifi/assets/Brands-Dox0FZUh.js index 1b57d59..a0e79d1 100644 --- a/hifi/assets/Brands-V9s4vz2i.js +++ b/hifi/assets/Brands-Dox0FZUh.js @@ -1 +1 @@ -import{r as l,j as e,L as k,a as n}from"./index-QV-Szw5n.js";import{I as N}from"./ImageUploadField-DyLcJG5-.js";import{T as f}from"./TextStyleWidget-Czb7ujSZ.js";const u={name:"",image_path:"",sort_order:0};function _(){const[i,h]=l.useState([]),[r,s]=l.useState(u),[a,o]=l.useState(null),[c,m]=l.useState(""),d=()=>n.get("/brands").then(h);l.useEffect(()=>{d()},[]);const p=t=>{o(t.id),s({name:t.name,image_path:t.image_path||"",sort_order:t.sort_order})},x=()=>{o(null),s(u)},b=async t=>{t.preventDefault(),m("");try{a?await n.put(`/brands/${a}`,r):await n.post("/brands",r),x(),d()}catch(j){m(j.message)}},g=async t=>{confirm("Marke inkl. aller Modelle/Pakete/Produkte wirklich löschen?")&&(await n.delete(`/brands/${t}`),d())};return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("h1",{className:"mb-4 text-xl font-bold text-neutral-900 dark:text-white",children:"Marken"}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2",children:"Bild"}),e.jsx("th",{className:"px-4 py-2",children:"Name"}),e.jsx("th",{className:"px-4 py-2",children:"Sortierung"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),e.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[i.map(t=>e.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[e.jsx("td",{className:"px-4 py-2",children:t.image_path?e.jsx("img",{src:t.image_path,alt:"",className:"h-10 w-10 rounded-md object-cover"}):e.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-md bg-neutral-100 text-xs text-neutral-400 dark:bg-neutral-800",children:"–"})}),e.jsx("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:e.jsx(k,{to:`/marken/${t.slug}`,target:"_blank",className:"hover:text-brand-500",children:t.name})}),e.jsx("td",{className:"px-4 py-2",children:t.sort_order}),e.jsxs("td",{className:"px-4 py-2 text-right",children:[e.jsx("button",{onClick:()=>p(t),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),e.jsx("button",{onClick:()=>g(t.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},t.id)),i.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Marken angelegt."})})]})]})})]}),e.jsxs("form",{onSubmit:b,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:a?"Marke bearbeiten":"Neue Marke"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Name *"}),e.jsx("input",{required:!0,value:r.name,onChange:t=>s({...r,name:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),a&&e.jsx(f,{fieldKey:`brands.${a}.name`,previewText:r.name||"Beispieltext"})]}),e.jsx(N,{value:r.image_path,onChange:t=>s({...r,image_path:t}),label:"Bild (optional)"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),e.jsx("input",{type:"number",value:r.sort_order,onChange:t=>s({...r,sort_order:Number(t.target.value)}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),c&&e.jsx("p",{className:"text-sm text-red-600",children:c}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:a?"Speichern":"Anlegen"}),a&&e.jsx("button",{type:"button",onClick:x,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}export{_ as default}; +import{r as l,j as e,L as k,a as n}from"./index-D7JbPKAF.js";import{I as N}from"./ImageUploadField-Dz5jsGY3.js";import{T as f}from"./TextStyleWidget-DvjoGL1J.js";const u={name:"",image_path:"",sort_order:0};function _(){const[i,h]=l.useState([]),[r,s]=l.useState(u),[a,o]=l.useState(null),[c,m]=l.useState(""),d=()=>n.get("/brands").then(h);l.useEffect(()=>{d()},[]);const p=t=>{o(t.id),s({name:t.name,image_path:t.image_path||"",sort_order:t.sort_order})},x=()=>{o(null),s(u)},b=async t=>{t.preventDefault(),m("");try{a?await n.put(`/brands/${a}`,r):await n.post("/brands",r),x(),d()}catch(j){m(j.message)}},g=async t=>{confirm("Marke inkl. aller Modelle/Pakete/Produkte wirklich löschen?")&&(await n.delete(`/brands/${t}`),d())};return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("h1",{className:"mb-4 text-xl font-bold text-neutral-900 dark:text-white",children:"Marken"}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2",children:"Bild"}),e.jsx("th",{className:"px-4 py-2",children:"Name"}),e.jsx("th",{className:"px-4 py-2",children:"Sortierung"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),e.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[i.map(t=>e.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[e.jsx("td",{className:"px-4 py-2",children:t.image_path?e.jsx("img",{src:t.image_path,alt:"",className:"h-10 w-10 rounded-md object-cover"}):e.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-md bg-neutral-100 text-xs text-neutral-400 dark:bg-neutral-800",children:"–"})}),e.jsx("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:e.jsx(k,{to:`/marken/${t.slug}`,target:"_blank",className:"hover:text-brand-500",children:t.name})}),e.jsx("td",{className:"px-4 py-2",children:t.sort_order}),e.jsxs("td",{className:"px-4 py-2 text-right",children:[e.jsx("button",{onClick:()=>p(t),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),e.jsx("button",{onClick:()=>g(t.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},t.id)),i.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Marken angelegt."})})]})]})})]}),e.jsxs("form",{onSubmit:b,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:a?"Marke bearbeiten":"Neue Marke"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Name *"}),e.jsx("input",{required:!0,value:r.name,onChange:t=>s({...r,name:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),a&&e.jsx(f,{fieldKey:`brands.${a}.name`,previewText:r.name||"Beispieltext"})]}),e.jsx(N,{value:r.image_path,onChange:t=>s({...r,image_path:t}),label:"Bild (optional)"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),e.jsx("input",{type:"number",value:r.sort_order,onChange:t=>s({...r,sort_order:Number(t.target.value)}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),c&&e.jsx("p",{className:"text-sm text-red-600",children:c}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:a?"Speichern":"Anlegen"}),a&&e.jsx("button",{type:"button",onClick:x,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}export{_ as default}; diff --git a/hifi/assets/ContactRequests-BcF_HxL3.js b/hifi/assets/ContactRequests-zg1QMKCt.js similarity index 98% rename from hifi/assets/ContactRequests-BcF_HxL3.js rename to hifi/assets/ContactRequests-zg1QMKCt.js index 317c8ee..ad0f892 100644 --- a/hifi/assets/ContactRequests-BcF_HxL3.js +++ b/hifi/assets/ContactRequests-zg1QMKCt.js @@ -1 +1 @@ -import{b as f,r as l,j as t,a as c}from"./index-QV-Szw5n.js";const j=d=>new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(d),k={new:"Neu",in_progress:"In Bearbeitung",done:"Erledigt"},v={new:"bg-brand-100 text-brand-700 dark:bg-brand-900/40 dark:text-brand-300",in_progress:"bg-amber-100 text-amber-700 dark:bg-amber-900/40 dark:text-amber-300",done:"bg-green-100 text-green-700 dark:bg-green-900/40 dark:text-green-300"},N=()=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",className:"h-4 w-4",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 7h16M9 7V5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2m3 0-.8 12.1a1 1 0 0 1-1 .9H7.8a1 1 0 0 1-1-.9L6 7h12ZM10 11v6M14 11v6"})});function _(){const{hasPermission:d}=f(),[n,u]=l.useState([]),[s,m]=l.useState("all"),i=()=>c.get("/contact").then(u);l.useEffect(()=>{i()},[]);const x=async(e,r)=>{await c.patch(`/contact/${e}`,{status:r}),i()},h=async e=>{confirm("Diese Kontaktanfrage wirklich unwiderruflich löschen?")&&(await c.delete(`/contact/${e}`),i())},g=l.useMemo(()=>({all:n.length,new:n.filter(e=>e.status==="new").length,in_progress:n.filter(e=>e.status==="in_progress").length,done:n.filter(e=>e.status==="done").length}),[n]),o=s==="all"?n:n.filter(e=>e.status===s),b=[{value:"all",label:"Alle"},{value:"new",label:"Neu"},{value:"in_progress",label:"In Bearbeitung"},{value:"done",label:"Erledigt"}];return t.jsxs("div",{children:[t.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Kontaktanfragen"}),t.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Alle Anfragen deiner Kunden. Wähle oben einen Reiter, um nur bestimmte Anfragen zu sehen."}),t.jsx("div",{className:"mb-5 flex flex-wrap gap-2",children:b.map(e=>t.jsxs("button",{onClick:()=>m(e.value),className:`rounded-full px-4 py-1.5 text-sm font-medium transition ${s===e.value?"bg-brand-500 text-white":"bg-neutral-100 text-neutral-600 hover:bg-neutral-200 dark:bg-neutral-800 dark:text-neutral-300 dark:hover:bg-neutral-700"}`,children:[e.label," (",g[e.value],")"]},e.value))}),t.jsxs("div",{className:"space-y-3",children:[o.map(e=>{var r;return t.jsxs("div",{className:"rounded-xl border border-neutral-200 bg-white p-4 dark:border-neutral-800 dark:bg-neutral-900",children:[t.jsxs("div",{className:"mb-2 flex flex-wrap items-start justify-between gap-2",children:[t.jsxs("div",{children:[t.jsxs("p",{className:"font-semibold text-neutral-800 dark:text-neutral-100",children:[e.name," · ",e.email,e.phone?` · ${e.phone}`:""]}),e.vin&&t.jsxs("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:["FIN: ",t.jsx("span",{className:"font-mono",children:e.vin})]}),t.jsx("p",{className:"text-xs text-neutral-400",children:new Date(e.created_at.replace(" ","T")).toLocaleString("de-DE")})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("select",{value:e.status,onChange:a=>x(e.id,a.target.value),className:`rounded-full border-0 px-3 py-1 text-xs font-medium ${v[e.status]}`,children:Object.entries(k).map(([a,p])=>t.jsx("option",{value:a,children:p},a))}),d("contact.delete")&&t.jsx("button",{onClick:()=>h(e.id),"aria-label":"Anfrage löschen",title:"Anfrage löschen",className:"rounded-md p-1.5 text-neutral-400 hover:bg-red-50 hover:text-red-600 dark:hover:bg-red-900/20",children:t.jsx(N,{})})]})]}),(e.brand_name||e.model_name||e.package_name||e.product_name)&&t.jsx("p",{className:"mb-2 text-sm text-neutral-500 dark:text-neutral-400",children:[e.brand_name,e.model_name,e.package_name,e.product_name].filter(Boolean).join(" · ")}),((r=e.selected_upgrades)==null?void 0:r.length)>0&&t.jsxs("div",{className:"mb-2 rounded-md bg-brand-50 p-2 text-sm text-brand-800 dark:bg-brand-900/20 dark:text-brand-200",children:[t.jsx("p",{className:"font-semibold",children:"Gewünschte Upgrades:"}),t.jsx("ul",{className:"list-disc pl-5",children:e.selected_upgrades.map(a=>t.jsxs("li",{children:[a.name," – ",j(a.price)]},a.id))})]}),e.message&&t.jsx("p",{className:"text-sm text-neutral-700 dark:text-neutral-300",children:e.message})]},e.id)}),o.length===0&&t.jsx("p",{className:"text-neutral-400",children:s==="all"?"Noch keine Kontaktanfragen eingegangen.":"Keine Anfragen mit diesem Status."})]})]})}export{_ as default}; +import{b as f,r as l,j as t,a as c}from"./index-D7JbPKAF.js";const j=d=>new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR"}).format(d),k={new:"Neu",in_progress:"In Bearbeitung",done:"Erledigt"},v={new:"bg-brand-100 text-brand-700 dark:bg-brand-900/40 dark:text-brand-300",in_progress:"bg-amber-100 text-amber-700 dark:bg-amber-900/40 dark:text-amber-300",done:"bg-green-100 text-green-700 dark:bg-green-900/40 dark:text-green-300"},N=()=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",className:"h-4 w-4",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 7h16M9 7V5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2m3 0-.8 12.1a1 1 0 0 1-1 .9H7.8a1 1 0 0 1-1-.9L6 7h12ZM10 11v6M14 11v6"})});function _(){const{hasPermission:d}=f(),[n,u]=l.useState([]),[s,m]=l.useState("all"),i=()=>c.get("/contact").then(u);l.useEffect(()=>{i()},[]);const x=async(e,r)=>{await c.patch(`/contact/${e}`,{status:r}),i()},h=async e=>{confirm("Diese Kontaktanfrage wirklich unwiderruflich löschen?")&&(await c.delete(`/contact/${e}`),i())},g=l.useMemo(()=>({all:n.length,new:n.filter(e=>e.status==="new").length,in_progress:n.filter(e=>e.status==="in_progress").length,done:n.filter(e=>e.status==="done").length}),[n]),o=s==="all"?n:n.filter(e=>e.status===s),b=[{value:"all",label:"Alle"},{value:"new",label:"Neu"},{value:"in_progress",label:"In Bearbeitung"},{value:"done",label:"Erledigt"}];return t.jsxs("div",{children:[t.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Kontaktanfragen"}),t.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Alle Anfragen deiner Kunden. Wähle oben einen Reiter, um nur bestimmte Anfragen zu sehen."}),t.jsx("div",{className:"mb-5 flex flex-wrap gap-2",children:b.map(e=>t.jsxs("button",{onClick:()=>m(e.value),className:`rounded-full px-4 py-1.5 text-sm font-medium transition ${s===e.value?"bg-brand-500 text-white":"bg-neutral-100 text-neutral-600 hover:bg-neutral-200 dark:bg-neutral-800 dark:text-neutral-300 dark:hover:bg-neutral-700"}`,children:[e.label," (",g[e.value],")"]},e.value))}),t.jsxs("div",{className:"space-y-3",children:[o.map(e=>{var r;return t.jsxs("div",{className:"rounded-xl border border-neutral-200 bg-white p-4 dark:border-neutral-800 dark:bg-neutral-900",children:[t.jsxs("div",{className:"mb-2 flex flex-wrap items-start justify-between gap-2",children:[t.jsxs("div",{children:[t.jsxs("p",{className:"font-semibold text-neutral-800 dark:text-neutral-100",children:[e.name," · ",e.email,e.phone?` · ${e.phone}`:""]}),e.vin&&t.jsxs("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:["FIN: ",t.jsx("span",{className:"font-mono",children:e.vin})]}),t.jsx("p",{className:"text-xs text-neutral-400",children:new Date(e.created_at.replace(" ","T")).toLocaleString("de-DE")})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("select",{value:e.status,onChange:a=>x(e.id,a.target.value),className:`rounded-full border-0 px-3 py-1 text-xs font-medium ${v[e.status]}`,children:Object.entries(k).map(([a,p])=>t.jsx("option",{value:a,children:p},a))}),d("contact.delete")&&t.jsx("button",{onClick:()=>h(e.id),"aria-label":"Anfrage löschen",title:"Anfrage löschen",className:"rounded-md p-1.5 text-neutral-400 hover:bg-red-50 hover:text-red-600 dark:hover:bg-red-900/20",children:t.jsx(N,{})})]})]}),(e.brand_name||e.model_name||e.package_name||e.product_name)&&t.jsx("p",{className:"mb-2 text-sm text-neutral-500 dark:text-neutral-400",children:[e.brand_name,e.model_name,e.package_name,e.product_name].filter(Boolean).join(" · ")}),((r=e.selected_upgrades)==null?void 0:r.length)>0&&t.jsxs("div",{className:"mb-2 rounded-md bg-brand-50 p-2 text-sm text-brand-800 dark:bg-brand-900/20 dark:text-brand-200",children:[t.jsx("p",{className:"font-semibold",children:"Gewünschte Upgrades:"}),t.jsx("ul",{className:"list-disc pl-5",children:e.selected_upgrades.map(a=>t.jsxs("li",{children:[a.name," – ",j(a.price)]},a.id))})]}),e.message&&t.jsx("p",{className:"text-sm text-neutral-700 dark:text-neutral-300",children:e.message})]},e.id)}),o.length===0&&t.jsx("p",{className:"text-neutral-400",children:s==="all"?"Noch keine Kontaktanfragen eingegangen.":"Keine Anfragen mit diesem Status."})]})]})}export{_ as default}; diff --git a/hifi/assets/Dashboard-m6lX2kWI.js b/hifi/assets/Dashboard-HhIWPkCY.js similarity index 98% rename from hifi/assets/Dashboard-m6lX2kWI.js rename to hifi/assets/Dashboard-HhIWPkCY.js index 25c655e..f8fe197 100644 --- a/hifi/assets/Dashboard-m6lX2kWI.js +++ b/hifi/assets/Dashboard-HhIWPkCY.js @@ -1 +1 @@ -import{b,r as c,a as x,j as e,L as m,S as g}from"./index-QV-Szw5n.js";const p={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"},k=({path:a,className:s="h-6 w-6"})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",className:s,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:a})});function j(){const[a,s]=c.useState(null),[r,l]=c.useState(null),[o,t]=c.useState("");c.useEffect(()=>{x.get("/site-settings").then(n=>s(n.hidden_areas||[])).catch(n=>t(n.message))},[]);const i=async n=>{const d=a,h=a.includes(n)?a.filter(u=>u!==n):[...a,n];s(h),l(n),t("");try{const u=await x.put("/site-settings/visibility",{hidden_areas:h});s(u.hidden_areas)}catch(u){s(d),t(u.message)}finally{l(null)}};return e.jsxs("section",{className:"mt-8 rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Sichtbarkeit der Website"}),e.jsx("p",{className:"mb-5 text-sm text-neutral-500 dark:text-neutral-400",children:"Schalte Bereiche aus, die Besucher gerade nicht sehen sollen. Die Inhalte bleiben gespeichert und sind nach dem Wiedereinschalten sofort wieder da. Änderungen gelten sofort."}),o&&e.jsx("p",{className:"mb-4 text-sm text-red-600",children:o}),a===null?!o&&e.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}):e.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:g.map(n=>e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-xs font-semibold uppercase tracking-wide text-neutral-400",children:n.title}),e.jsx("p",{className:"mb-3 text-xs text-neutral-500 dark:text-neutral-400",children:n.hint}),e.jsx("ul",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:n.areas.map(d=>{const h=!a.includes(d.key);return e.jsxs("li",{className:"flex items-center justify-between gap-3 py-2.5",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:`text-sm font-medium ${h?"text-neutral-800 dark:text-neutral-100":"text-neutral-400 line-through dark:text-neutral-500"}`,children:d.label}),d.note&&e.jsx("p",{className:"text-xs text-neutral-400",children:d.note})]}),e.jsxs("label",{className:"relative inline-flex shrink-0 cursor-pointer items-center",title:h?"Sichtbar – zum Ausblenden klicken":"Ausgeblendet – zum Einblenden klicken",children:[e.jsxs("span",{className:"sr-only",children:[d.label," sichtbar"]}),e.jsx("input",{type:"checkbox",checked:h,disabled:r!==null,onChange:()=>i(d.key),className:"peer sr-only"}),e.jsx("div",{className:"h-6 w-11 rounded-full bg-neutral-200 transition peer-checked:bg-brand-500 peer-disabled:opacity-60 dark:bg-neutral-700"}),e.jsx("div",{className:"absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition peer-checked:translate-x-5"})]})]},d.key)})})]},n.title))})]})}function f(){const[a,s]=c.useState(null),[r,l]=c.useState("");if(c.useEffect(()=>{x.get("/analytics/report").then(s).catch(t=>l(t.message))},[]),r)return e.jsxs("section",{className:"mt-8 rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Google Analytics"}),e.jsx("p",{className:"text-sm text-red-600",children:r})]});if(!a)return null;if(!a.configured)return e.jsxs("section",{className:"mt-8 rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Google Analytics"}),e.jsxs("p",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:["Noch nicht eingerichtet. Unter"," ",e.jsx(m,{to:"/admin/settings/website",className:"text-brand-600 hover:underline dark:text-brand-400",children:"Einstellungen → Website"})," ","kannst du die Dashboard-Anbindung konfigurieren, um hier Besucherzahlen zu sehen."]})]});const o=Math.max(1,...a.daily.map(t=>t.pageviews));return e.jsxs("section",{className:"mt-8 rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Google Analytics"}),e.jsx("p",{className:"mb-5 text-sm text-neutral-500 dark:text-neutral-400",children:"Letzte 7 Tage."}),e.jsxs("div",{className:"mb-6 grid grid-cols-3 gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-extrabold text-brand-600 dark:text-brand-400",children:a.totals.users}),e.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:"Nutzer"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-extrabold text-brand-600 dark:text-brand-400",children:a.totals.sessions}),e.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:"Sitzungen"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-extrabold text-brand-600 dark:text-brand-400",children:a.totals.pageviews}),e.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:"Seitenaufrufe"})]})]}),a.daily.length>0&&e.jsx("div",{className:"mb-6 flex h-24 items-end gap-1.5",children:a.daily.map(t=>e.jsxs("div",{className:"flex flex-1 flex-col items-center gap-1",children:[e.jsx("div",{className:"w-full rounded-t bg-brand-400 dark:bg-brand-500",style:{height:`${Math.max(4,t.pageviews/o*80)}px`},title:`${t.date}: ${t.pageviews} Seitenaufrufe`}),e.jsxs("span",{className:"text-[10px] text-neutral-400",children:[t.date.slice(6,8),".",t.date.slice(4,6),"."]})]},t.date))}),a.top_pages.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-neutral-400",children:"Meistbesuchte Seiten"}),e.jsx("ul",{className:"space-y-1 text-sm",children:a.top_pages.map(t=>e.jsxs("li",{className:"flex items-center justify-between gap-3 text-neutral-700 dark:text-neutral-300",children:[e.jsx("span",{className:"truncate font-mono text-xs",children:t.path}),e.jsx("span",{className:"shrink-0 font-semibold",children:t.pageviews})]},t.path))})]})]})}function v(){const{user:a,hasPermission:s}=b(),[r,l]=c.useState({});c.useEffect(()=>{s("brands.manage")&&x.get("/brands").then(t=>l(i=>({...i,brands:t.length}))),(s("models.manage")||s("packages.manage"))&&x.get("/models").then(t=>l(i=>({...i,models:t.length}))),s("packages.manage")&&x.get("/packages").then(t=>l(i=>({...i,packages:t.length}))),s("contact.manage")&&x.get("/contact").then(t=>l(i=>({...i,newContacts:t.filter(n=>n.status==="new").length})))},[]);const o=[{key:"brands",label:"Marken",icon:"tag",hint:"Die Hersteller, z. B. Audi oder BMW.",value:r.brands,to:"/admin/brands",show:s("brands.manage")},{key:"models",label:"Modelle",icon:"car",hint:"Die Fahrzeuge einer Marke, z. B. A4.",value:r.models,to:"/admin/models",show:s("models.manage")},{key:"packages",label:"Pakete",icon:"box",hint:"Die Sound-Pakete für ein Modell.",value:r.packages,to:"/admin/packages",show:s("packages.manage")},{key:"contacts",label:"Neue Anfragen",icon:"mail",hint:"Kunden, die noch auf Antwort warten.",value:r.newContacts,to:"/admin/contact-requests",show:s("contact.manage"),highlight:!0}].filter(t=>t.show);return e.jsxs("div",{children:[e.jsxs("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:["Willkommen, ",a==null?void 0:a.username,"!"]}),e.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:"Hier siehst du auf einen Blick, wie viel in deinem Shop hinterlegt ist. Klicke auf eine Kachel, um dorthin zu gelangen."}),o.length===0?e.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:"Für deinen Account sind noch keine Bereiche freigeschaltet. Bitte wende dich an einen Administrator."}):e.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:o.map(t=>e.jsxs(m,{to:t.to,className:`rounded-xl border p-5 shadow-sm transition hover:-translate-y-0.5 hover:shadow-md ${t.highlight&&t.value>0?"border-brand-300 bg-brand-50 dark:border-brand-900 dark:bg-brand-900/20":"border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-900"}`,children:[e.jsx("div",{className:"mb-3 flex h-10 w-10 items-center justify-center rounded-full bg-brand-100 text-brand-600 dark:bg-brand-900/40 dark:text-brand-400",children:e.jsx(k,{path:p[t.icon]})}),e.jsx("p",{className:"text-sm font-semibold text-neutral-700 dark:text-neutral-200",children:t.label}),e.jsx("p",{className:"mt-1 text-3xl font-extrabold text-brand-600 dark:text-brand-400",children:t.value??"…"}),e.jsx("p",{className:"mt-2 text-xs text-neutral-500 dark:text-neutral-400",children:t.hint})]},t.key))}),(s("content.manage")||s("settings.manage"))&&e.jsx(j,{}),s("settings.manage")&&e.jsx(f,{})]})}export{v as default}; +import{b,r as c,a as x,j as e,L as m,S as g}from"./index-D7JbPKAF.js";const p={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"},k=({path:a,className:s="h-6 w-6"})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",className:s,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:a})});function j(){const[a,s]=c.useState(null),[r,l]=c.useState(null),[o,t]=c.useState("");c.useEffect(()=>{x.get("/site-settings").then(n=>s(n.hidden_areas||[])).catch(n=>t(n.message))},[]);const i=async n=>{const d=a,h=a.includes(n)?a.filter(u=>u!==n):[...a,n];s(h),l(n),t("");try{const u=await x.put("/site-settings/visibility",{hidden_areas:h});s(u.hidden_areas)}catch(u){s(d),t(u.message)}finally{l(null)}};return e.jsxs("section",{className:"mt-8 rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Sichtbarkeit der Website"}),e.jsx("p",{className:"mb-5 text-sm text-neutral-500 dark:text-neutral-400",children:"Schalte Bereiche aus, die Besucher gerade nicht sehen sollen. Die Inhalte bleiben gespeichert und sind nach dem Wiedereinschalten sofort wieder da. Änderungen gelten sofort."}),o&&e.jsx("p",{className:"mb-4 text-sm text-red-600",children:o}),a===null?!o&&e.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}):e.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:g.map(n=>e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-xs font-semibold uppercase tracking-wide text-neutral-400",children:n.title}),e.jsx("p",{className:"mb-3 text-xs text-neutral-500 dark:text-neutral-400",children:n.hint}),e.jsx("ul",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:n.areas.map(d=>{const h=!a.includes(d.key);return e.jsxs("li",{className:"flex items-center justify-between gap-3 py-2.5",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:`text-sm font-medium ${h?"text-neutral-800 dark:text-neutral-100":"text-neutral-400 line-through dark:text-neutral-500"}`,children:d.label}),d.note&&e.jsx("p",{className:"text-xs text-neutral-400",children:d.note})]}),e.jsxs("label",{className:"relative inline-flex shrink-0 cursor-pointer items-center",title:h?"Sichtbar – zum Ausblenden klicken":"Ausgeblendet – zum Einblenden klicken",children:[e.jsxs("span",{className:"sr-only",children:[d.label," sichtbar"]}),e.jsx("input",{type:"checkbox",checked:h,disabled:r!==null,onChange:()=>i(d.key),className:"peer sr-only"}),e.jsx("div",{className:"h-6 w-11 rounded-full bg-neutral-200 transition peer-checked:bg-brand-500 peer-disabled:opacity-60 dark:bg-neutral-700"}),e.jsx("div",{className:"absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition peer-checked:translate-x-5"})]})]},d.key)})})]},n.title))})]})}function f(){const[a,s]=c.useState(null),[r,l]=c.useState("");if(c.useEffect(()=>{x.get("/analytics/report").then(s).catch(t=>l(t.message))},[]),r)return e.jsxs("section",{className:"mt-8 rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Google Analytics"}),e.jsx("p",{className:"text-sm text-red-600",children:r})]});if(!a)return null;if(!a.configured)return e.jsxs("section",{className:"mt-8 rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Google Analytics"}),e.jsxs("p",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:["Noch nicht eingerichtet. Unter"," ",e.jsx(m,{to:"/admin/settings/website",className:"text-brand-600 hover:underline dark:text-brand-400",children:"Einstellungen → Website"})," ","kannst du die Dashboard-Anbindung konfigurieren, um hier Besucherzahlen zu sehen."]})]});const o=Math.max(1,...a.daily.map(t=>t.pageviews));return e.jsxs("section",{className:"mt-8 rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Google Analytics"}),e.jsx("p",{className:"mb-5 text-sm text-neutral-500 dark:text-neutral-400",children:"Letzte 7 Tage."}),e.jsxs("div",{className:"mb-6 grid grid-cols-3 gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-extrabold text-brand-600 dark:text-brand-400",children:a.totals.users}),e.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:"Nutzer"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-extrabold text-brand-600 dark:text-brand-400",children:a.totals.sessions}),e.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:"Sitzungen"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-extrabold text-brand-600 dark:text-brand-400",children:a.totals.pageviews}),e.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:"Seitenaufrufe"})]})]}),a.daily.length>0&&e.jsx("div",{className:"mb-6 flex h-24 items-end gap-1.5",children:a.daily.map(t=>e.jsxs("div",{className:"flex flex-1 flex-col items-center gap-1",children:[e.jsx("div",{className:"w-full rounded-t bg-brand-400 dark:bg-brand-500",style:{height:`${Math.max(4,t.pageviews/o*80)}px`},title:`${t.date}: ${t.pageviews} Seitenaufrufe`}),e.jsxs("span",{className:"text-[10px] text-neutral-400",children:[t.date.slice(6,8),".",t.date.slice(4,6),"."]})]},t.date))}),a.top_pages.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-neutral-400",children:"Meistbesuchte Seiten"}),e.jsx("ul",{className:"space-y-1 text-sm",children:a.top_pages.map(t=>e.jsxs("li",{className:"flex items-center justify-between gap-3 text-neutral-700 dark:text-neutral-300",children:[e.jsx("span",{className:"truncate font-mono text-xs",children:t.path}),e.jsx("span",{className:"shrink-0 font-semibold",children:t.pageviews})]},t.path))})]})]})}function v(){const{user:a,hasPermission:s}=b(),[r,l]=c.useState({});c.useEffect(()=>{s("brands.manage")&&x.get("/brands").then(t=>l(i=>({...i,brands:t.length}))),(s("models.manage")||s("packages.manage"))&&x.get("/models").then(t=>l(i=>({...i,models:t.length}))),s("packages.manage")&&x.get("/packages").then(t=>l(i=>({...i,packages:t.length}))),s("contact.manage")&&x.get("/contact").then(t=>l(i=>({...i,newContacts:t.filter(n=>n.status==="new").length})))},[]);const o=[{key:"brands",label:"Marken",icon:"tag",hint:"Die Hersteller, z. B. Audi oder BMW.",value:r.brands,to:"/admin/brands",show:s("brands.manage")},{key:"models",label:"Modelle",icon:"car",hint:"Die Fahrzeuge einer Marke, z. B. A4.",value:r.models,to:"/admin/models",show:s("models.manage")},{key:"packages",label:"Pakete",icon:"box",hint:"Die Sound-Pakete für ein Modell.",value:r.packages,to:"/admin/packages",show:s("packages.manage")},{key:"contacts",label:"Neue Anfragen",icon:"mail",hint:"Kunden, die noch auf Antwort warten.",value:r.newContacts,to:"/admin/contact-requests",show:s("contact.manage"),highlight:!0}].filter(t=>t.show);return e.jsxs("div",{children:[e.jsxs("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:["Willkommen, ",a==null?void 0:a.username,"!"]}),e.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:"Hier siehst du auf einen Blick, wie viel in deinem Shop hinterlegt ist. Klicke auf eine Kachel, um dorthin zu gelangen."}),o.length===0?e.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:"Für deinen Account sind noch keine Bereiche freigeschaltet. Bitte wende dich an einen Administrator."}):e.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:o.map(t=>e.jsxs(m,{to:t.to,className:`rounded-xl border p-5 shadow-sm transition hover:-translate-y-0.5 hover:shadow-md ${t.highlight&&t.value>0?"border-brand-300 bg-brand-50 dark:border-brand-900 dark:bg-brand-900/20":"border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-900"}`,children:[e.jsx("div",{className:"mb-3 flex h-10 w-10 items-center justify-center rounded-full bg-brand-100 text-brand-600 dark:bg-brand-900/40 dark:text-brand-400",children:e.jsx(k,{path:p[t.icon]})}),e.jsx("p",{className:"text-sm font-semibold text-neutral-700 dark:text-neutral-200",children:t.label}),e.jsx("p",{className:"mt-1 text-3xl font-extrabold text-brand-600 dark:text-brand-400",children:t.value??"…"}),e.jsx("p",{className:"mt-2 text-xs text-neutral-500 dark:text-neutral-400",children:t.hint})]},t.key))}),(s("content.manage")||s("settings.manage"))&&e.jsx(j,{}),s("settings.manage")&&e.jsx(f,{})]})}export{v as default}; diff --git a/hifi/assets/DatabaseSettings-pQejbEjR.js b/hifi/assets/DatabaseSettings-G32NG4hK.js similarity index 99% rename from hifi/assets/DatabaseSettings-pQejbEjR.js rename to hifi/assets/DatabaseSettings-G32NG4hK.js index 5287e7d..caca385 100644 --- a/hifi/assets/DatabaseSettings-pQejbEjR.js +++ b/hifi/assets/DatabaseSettings-G32NG4hK.js @@ -1 +1 @@ -import{r as s,a as l,j as e}from"./index-QV-Szw5n.js";function q(){const[r,n]=s.useState({host:"",name:"",user:"",password:"",charset:"utf8mb4"}),[x,h]=s.useState(!1),[F,g]=s.useState(!0),[p,H]=s.useState(!1),[k,f]=s.useState(!1),[j,w]=s.useState(""),[V,v]=s.useState(!1),[a,u]=s.useState(null),[o,N]=s.useState(!0),[y,S]=s.useState(!1),[C,m]=s.useState(null),[B,D]=s.useState(!1),[c,P]=s.useState(null),[z,E]=s.useState(""),[d,A]=s.useState(null),T=()=>{g(!0),l.get("/settings/database").then(t=>{n({...t.config,password:""}),h(t.has_password)}).finally(()=>g(!1))},b=()=>{N(!0),l.get("/settings/schema-check").then(u).catch(t=>u({ok:!1,error:t.message,tables:[]})).finally(()=>N(!1))};s.useEffect(()=>{T(),b(),l.get("/settings/compress-status").then(t=>A(t.gd_available)).catch(()=>A(!1))},[]);const M=async()=>{S(!0),m(null);try{const t=await l.post("/settings/schema-migrate",{});m(t.actions),u(t.report)}catch(t){m(["Fehler: "+t.message])}finally{S(!1)}},R=async()=>{D(!0),E(""),P(null);try{const t=await l.post("/settings/compress-uploads",{});P(t)}catch(t){E(t.message)}finally{D(!1)}},_=async t=>{t.preventDefault(),f(!0),w(""),v(!1);try{await l.post("/settings/database",r),v(!0),n(i=>({...i,password:""})),h(!0),b()}catch(i){w(i.message)}finally{f(!1)}};return e.jsxs("div",{className:"max-w-2xl space-y-6",children:[e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Datenbank-Zugangsdaten"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Wichtig für einen Umzug auf einen anderen Server/Webspace: Trage hier die Zugangsdaten der dortigen Datenbank ein. Die Verbindung wird vor dem Speichern getestet, damit du dich nicht aussperrst."}),F?e.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}):e.jsxs("form",{onSubmit:_,className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Host *"}),e.jsx("input",{required:!0,value:r.host,onChange:t=>n({...r,host:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Datenbankname *"}),e.jsx("input",{required:!0,value:r.name,onChange:t=>n({...r,name:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Benutzer *"}),e.jsx("input",{required:!0,value:r.user,onChange:t=>n({...r,user:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:["Passwort ",x?"(leer lassen = unverändert)":""]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{type:p?"text":"password",value:r.password,onChange:t=>n({...r,password:t.target.value}),placeholder:x?"••••••••":"",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsx("button",{type:"button",onClick:()=>H(t=>!t),className:"shrink-0 rounded-md border border-neutral-300 px-3 text-sm dark:border-neutral-700",children:p?"Verbergen":"Anzeigen"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Zeichensatz"}),e.jsx("input",{value:r.charset,onChange:t=>n({...r,charset:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),j&&e.jsx("p",{className:"text-sm text-red-600",children:j}),V&&e.jsx("p",{className:"text-sm text-green-600 dark:text-green-400",children:"Verbindung erfolgreich getestet und gespeichert."}),e.jsx("button",{type:"submit",disabled:k,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:k?"Teste & speichere…":"Verbindung testen & speichern"})]})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsxs("div",{className:"mb-1 flex items-center justify-between gap-3",children:[e.jsx("h2",{className:"font-semibold text-neutral-900 dark:text-white",children:"Datenbankstruktur"}),!o&&a&&e.jsx("span",{className:`rounded-full px-3 py-1 text-xs font-semibold ${a.ok?"bg-green-100 text-green-700 dark:bg-green-900/40 dark:text-green-300":"bg-red-100 text-red-700 dark:bg-red-900/40 dark:text-red-300"}`,children:a.ok?"Datenbank OK":"Datenbank nicht OK"})]}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Prüft, ob diese Datenbank alle Tabellen und Spalten hat, die der aktuelle Code-Stand braucht – wichtig, wenn deine Live-Version auf einem anderen Server einen älteren Stand hat."}),o&&e.jsx("p",{className:"text-sm text-neutral-400",children:"Prüfe…"}),!o&&a&&!a.ok&&e.jsx("ul",{className:"mb-4 space-y-1 rounded-md bg-red-50 p-3 text-sm text-red-800 dark:bg-red-900/20 dark:text-red-300",children:a.tables.filter(t=>!t.ok).map(t=>e.jsx("li",{children:t.exists?e.jsxs(e.Fragment,{children:["Tabelle ",e.jsx("code",{className:"font-mono",children:t.table}),": Spalte(n) fehlen – ",t.missing_columns.join(", ")]}):e.jsxs(e.Fragment,{children:["Tabelle ",e.jsx("code",{className:"font-mono",children:t.table})," fehlt komplett"]})},t.table))}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("button",{onClick:b,disabled:o,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm font-medium hover:bg-neutral-50 disabled:opacity-50 dark:border-neutral-700 dark:hover:bg-neutral-800",children:"Erneut prüfen"}),a&&!a.ok&&e.jsx("button",{onClick:M,disabled:y,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:y?"Aktualisiere…":"Datenbankstruktur aktualisieren"})]}),C&&e.jsx("ul",{className:"mt-3 space-y-1 rounded-md bg-neutral-50 p-3 text-sm text-neutral-700 dark:bg-neutral-800 dark:text-neutral-300",children:C.map((t,i)=>e.jsx("li",{children:t},i))})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsxs("div",{className:"mb-1 flex items-center justify-between gap-3",children:[e.jsx("h2",{className:"font-semibold text-neutral-900 dark:text-white",children:"Bilder optimieren"}),d!==null&&e.jsx("span",{className:`rounded-full px-3 py-1 text-xs font-semibold ${d?"bg-green-100 text-green-700 dark:bg-green-900/40 dark:text-green-300":"bg-red-100 text-red-700 dark:bg-red-900/40 dark:text-red-300"}`,children:d?"Aktiv":"Nicht verfügbar"})]}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Neu hochgeladene Bilder werden seit Kurzem automatisch verkleinert und komprimiert. Dieser Button holt das für alle bereits vorhandenen Bilder nach – nützlich, wenn die Seite durch zu hoch aufgelöste Fotos spürbar langsam lädt."}),d===!1&&e.jsx("p",{className:"mb-4 rounded-md bg-amber-50 p-3 text-sm text-amber-800 dark:bg-amber-900/20 dark:text-amber-300",children:'Diese Funktion braucht die PHP-Erweiterung "gd", die auf diesem Server aktuell nicht aktiv ist. Bei den meisten Hostern (auch All-Inkl) ist sie standardmäßig Teil jeder PHP-Version und lässt sich nicht einzeln zu- oder abschalten – bitte beim Hoster-Support nachfragen bzw. prüfen, ob in den Hosting-Einstellungen eine andere PHP-Version ausgewählt werden muss.'}),e.jsx("button",{onClick:R,disabled:B||d===!1,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:B?"Komprimiert…":"Bestehende Bilder optimieren"}),z&&e.jsx("p",{className:"mt-3 text-sm text-red-600",children:z}),c&&e.jsxs("p",{className:"mt-3 text-sm text-green-600 dark:text-green-400",children:[c.processed," Bild(er) verkleinert: ",(c.before_bytes/1024/1024).toFixed(1)," MB"," → ",(c.after_bytes/1024/1024).toFixed(1)," MB."]})]})]})}export{q as default}; +import{r as s,a as l,j as e}from"./index-D7JbPKAF.js";function q(){const[r,n]=s.useState({host:"",name:"",user:"",password:"",charset:"utf8mb4"}),[x,h]=s.useState(!1),[F,g]=s.useState(!0),[p,H]=s.useState(!1),[k,f]=s.useState(!1),[j,w]=s.useState(""),[V,v]=s.useState(!1),[a,u]=s.useState(null),[o,N]=s.useState(!0),[y,S]=s.useState(!1),[C,m]=s.useState(null),[B,D]=s.useState(!1),[c,P]=s.useState(null),[z,E]=s.useState(""),[d,A]=s.useState(null),T=()=>{g(!0),l.get("/settings/database").then(t=>{n({...t.config,password:""}),h(t.has_password)}).finally(()=>g(!1))},b=()=>{N(!0),l.get("/settings/schema-check").then(u).catch(t=>u({ok:!1,error:t.message,tables:[]})).finally(()=>N(!1))};s.useEffect(()=>{T(),b(),l.get("/settings/compress-status").then(t=>A(t.gd_available)).catch(()=>A(!1))},[]);const M=async()=>{S(!0),m(null);try{const t=await l.post("/settings/schema-migrate",{});m(t.actions),u(t.report)}catch(t){m(["Fehler: "+t.message])}finally{S(!1)}},R=async()=>{D(!0),E(""),P(null);try{const t=await l.post("/settings/compress-uploads",{});P(t)}catch(t){E(t.message)}finally{D(!1)}},_=async t=>{t.preventDefault(),f(!0),w(""),v(!1);try{await l.post("/settings/database",r),v(!0),n(i=>({...i,password:""})),h(!0),b()}catch(i){w(i.message)}finally{f(!1)}};return e.jsxs("div",{className:"max-w-2xl space-y-6",children:[e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Datenbank-Zugangsdaten"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Wichtig für einen Umzug auf einen anderen Server/Webspace: Trage hier die Zugangsdaten der dortigen Datenbank ein. Die Verbindung wird vor dem Speichern getestet, damit du dich nicht aussperrst."}),F?e.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}):e.jsxs("form",{onSubmit:_,className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Host *"}),e.jsx("input",{required:!0,value:r.host,onChange:t=>n({...r,host:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Datenbankname *"}),e.jsx("input",{required:!0,value:r.name,onChange:t=>n({...r,name:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Benutzer *"}),e.jsx("input",{required:!0,value:r.user,onChange:t=>n({...r,user:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:["Passwort ",x?"(leer lassen = unverändert)":""]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{type:p?"text":"password",value:r.password,onChange:t=>n({...r,password:t.target.value}),placeholder:x?"••••••••":"",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsx("button",{type:"button",onClick:()=>H(t=>!t),className:"shrink-0 rounded-md border border-neutral-300 px-3 text-sm dark:border-neutral-700",children:p?"Verbergen":"Anzeigen"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Zeichensatz"}),e.jsx("input",{value:r.charset,onChange:t=>n({...r,charset:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),j&&e.jsx("p",{className:"text-sm text-red-600",children:j}),V&&e.jsx("p",{className:"text-sm text-green-600 dark:text-green-400",children:"Verbindung erfolgreich getestet und gespeichert."}),e.jsx("button",{type:"submit",disabled:k,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:k?"Teste & speichere…":"Verbindung testen & speichern"})]})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsxs("div",{className:"mb-1 flex items-center justify-between gap-3",children:[e.jsx("h2",{className:"font-semibold text-neutral-900 dark:text-white",children:"Datenbankstruktur"}),!o&&a&&e.jsx("span",{className:`rounded-full px-3 py-1 text-xs font-semibold ${a.ok?"bg-green-100 text-green-700 dark:bg-green-900/40 dark:text-green-300":"bg-red-100 text-red-700 dark:bg-red-900/40 dark:text-red-300"}`,children:a.ok?"Datenbank OK":"Datenbank nicht OK"})]}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Prüft, ob diese Datenbank alle Tabellen und Spalten hat, die der aktuelle Code-Stand braucht – wichtig, wenn deine Live-Version auf einem anderen Server einen älteren Stand hat."}),o&&e.jsx("p",{className:"text-sm text-neutral-400",children:"Prüfe…"}),!o&&a&&!a.ok&&e.jsx("ul",{className:"mb-4 space-y-1 rounded-md bg-red-50 p-3 text-sm text-red-800 dark:bg-red-900/20 dark:text-red-300",children:a.tables.filter(t=>!t.ok).map(t=>e.jsx("li",{children:t.exists?e.jsxs(e.Fragment,{children:["Tabelle ",e.jsx("code",{className:"font-mono",children:t.table}),": Spalte(n) fehlen – ",t.missing_columns.join(", ")]}):e.jsxs(e.Fragment,{children:["Tabelle ",e.jsx("code",{className:"font-mono",children:t.table})," fehlt komplett"]})},t.table))}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("button",{onClick:b,disabled:o,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm font-medium hover:bg-neutral-50 disabled:opacity-50 dark:border-neutral-700 dark:hover:bg-neutral-800",children:"Erneut prüfen"}),a&&!a.ok&&e.jsx("button",{onClick:M,disabled:y,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:y?"Aktualisiere…":"Datenbankstruktur aktualisieren"})]}),C&&e.jsx("ul",{className:"mt-3 space-y-1 rounded-md bg-neutral-50 p-3 text-sm text-neutral-700 dark:bg-neutral-800 dark:text-neutral-300",children:C.map((t,i)=>e.jsx("li",{children:t},i))})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsxs("div",{className:"mb-1 flex items-center justify-between gap-3",children:[e.jsx("h2",{className:"font-semibold text-neutral-900 dark:text-white",children:"Bilder optimieren"}),d!==null&&e.jsx("span",{className:`rounded-full px-3 py-1 text-xs font-semibold ${d?"bg-green-100 text-green-700 dark:bg-green-900/40 dark:text-green-300":"bg-red-100 text-red-700 dark:bg-red-900/40 dark:text-red-300"}`,children:d?"Aktiv":"Nicht verfügbar"})]}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Neu hochgeladene Bilder werden seit Kurzem automatisch verkleinert und komprimiert. Dieser Button holt das für alle bereits vorhandenen Bilder nach – nützlich, wenn die Seite durch zu hoch aufgelöste Fotos spürbar langsam lädt."}),d===!1&&e.jsx("p",{className:"mb-4 rounded-md bg-amber-50 p-3 text-sm text-amber-800 dark:bg-amber-900/20 dark:text-amber-300",children:'Diese Funktion braucht die PHP-Erweiterung "gd", die auf diesem Server aktuell nicht aktiv ist. Bei den meisten Hostern (auch All-Inkl) ist sie standardmäßig Teil jeder PHP-Version und lässt sich nicht einzeln zu- oder abschalten – bitte beim Hoster-Support nachfragen bzw. prüfen, ob in den Hosting-Einstellungen eine andere PHP-Version ausgewählt werden muss.'}),e.jsx("button",{onClick:R,disabled:B||d===!1,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:B?"Komprimiert…":"Bestehende Bilder optimieren"}),z&&e.jsx("p",{className:"mt-3 text-sm text-red-600",children:z}),c&&e.jsxs("p",{className:"mt-3 text-sm text-green-600 dark:text-green-400",children:[c.processed," Bild(er) verkleinert: ",(c.before_bytes/1024/1024).toFixed(1)," MB"," → ",(c.after_bytes/1024/1024).toFixed(1)," MB."]})]})]})}export{q as default}; diff --git a/hifi/assets/Downloads-DCZm2dP9.js b/hifi/assets/Downloads-_Z8wR0YD.js similarity index 98% rename from hifi/assets/Downloads-DCZm2dP9.js rename to hifi/assets/Downloads-_Z8wR0YD.js index cafcf90..6c9995a 100644 --- a/hifi/assets/Downloads-DCZm2dP9.js +++ b/hifi/assets/Downloads-_Z8wR0YD.js @@ -1 +1 @@ -import{r as n,j as e,k as B,A as P,a as m,m as L}from"./index-QV-Szw5n.js";import{E as W,a as F}from"./eye-YlN_9rkm.js";const g="w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900",S={title:"",description:"",sort_order:0};function D(o,h,l){return new Promise((i,c)=>{const r=new XMLHttpRequest;r.open("POST",`${L}${o}`),r.withCredentials=!0,r.upload.onprogress=s=>{s.lengthComputable&&l(s.loaded/s.total)},r.onload=()=>{let s=null;try{s=JSON.parse(r.responseText)}catch{}r.status>=200&&r.status<300?i(s):c(new Error((s==null?void 0:s.error)||(r.status===413?"Die Datei ist zu groß für diesen Server.":`Fehler ${r.status}`)))},r.onerror=()=>c(new Error("Netzwerkfehler beim Hochladen")),r.send(h)})}function I(){const[o,h]=n.useState(void 0),[l,i]=n.useState(""),[c,r]=n.useState(!1),[s,x]=n.useState(null);n.useEffect(()=>{m.get("/settings/downloads").then(d=>{h(d.password),i(d.password||"")}).catch(d=>x({kind:"error",text:d.message}))},[]);const b=async d=>{d.preventDefault(),r(!0),x(null);try{const u=await m.put("/settings/downloads",{password:l});h(u.password),i(u.password||""),x({kind:"ok",text:u.password?"Gespeichert – der Bereich ist jetzt geschützt.":"Gespeichert – der Bereich ist jetzt öffentlich."})}catch(u){x({kind:"error",text:u.message})}finally{r(!1)}};return e.jsxs("form",{onSubmit:b,className:"space-y-3 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:"Zugriffsschutz"}),e.jsxs("p",{className:"text-sm text-neutral-600 dark:text-neutral-300",children:[o===void 0&&"Lädt…",o===null&&"Öffentlich – jeder, der die Seite aufruft, sieht die Dateien.",typeof o=="string"&&"Geschützt – Besucher müssen zuerst das Passwort eingeben."]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Zugangspasswort (leer = öffentlich)"}),e.jsx("input",{value:l,maxLength:100,autoComplete:"off",onChange:d=>i(d.target.value),className:g}),e.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:"Das Passwort an die Kunden weitergeben – es bleibt hier jederzeit einsehbar. Direkte Links zu einzelnen Dateien funktionieren auch ohne Passwort; wer freigeschaltet hat, könnte sie also weitergeben."})]}),s&&e.jsx("p",{className:`text-sm ${s.kind==="error"?"text-red-600":"text-brand-600 dark:text-brand-400"}`,children:s.text}),e.jsx("button",{type:"submit",disabled:c||o===void 0,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:"Speichern"})]})}function T(){const[o,h]=n.useState([]),[l,i]=n.useState(S),[c,r]=n.useState(null),[s,x]=n.useState(null),[b,d]=n.useState(null),[u,N]=n.useState(!1),[y,p]=n.useState(""),[_,v]=n.useState(null),w=n.useRef(null),k=()=>m.get("/downloads/manage").then(h);n.useEffect(()=>{k()},[]);const f=()=>{x(null),i(S),r(null),p(""),w.current&&(w.current.value="")},z=t=>{f(),x(t.id),i({title:t.title,description:t.description||"",sort_order:t.sort_order}),window.scrollTo({top:0,behavior:"smooth"})},E=async t=>{if(t.preventDefault(),!s&&!c){p("Bitte eine Datei auswählen.");return}N(!0),p("");try{if(s){if(await m.put(`/downloads/${s}`,l),c){const a=new FormData;a.append("file",c),d(0),await D(`/downloads/${s}/file`,a,d)}}else{const a=new FormData;a.append("file",c),a.append("title",l.title),a.append("description",l.description),d(0),await D("/downloads",a,d)}f(),k()}catch(a){p(a.message)}finally{N(!1),d(null)}},A=async t=>{v(t.id);try{const a=await m.patch(`/downloads/${t.id}/visibility`,{is_hidden:!t.is_hidden});h(C=>C.map(j=>j.id===t.id?{...j,is_hidden:a.is_hidden}:j))}catch(a){alert(`Sichtbarkeit konnte nicht geändert werden: ${a.message}`)}finally{v(null)}},$=async t=>{confirm(`"${t.title}" inkl. Datei wirklich löschen?`)&&(await m.delete(`/downloads/${t.id}`),s===t.id&&f(),k())};return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("h1",{className:"mb-4 text-xl font-bold text-neutral-900 dark:text-white",children:"Downloads"}),e.jsxs("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:["Dateien, die Kunden auf der Seite"," ",e.jsx("a",{href:"/downloads",target:"_blank",rel:"noopener noreferrer",className:"text-brand-600 hover:underline",children:"/downloads"})," ","anhören bzw. herunterladen können, z. B. Songs oder Anleitungen. Der Menüpunkt „Downloads“ erscheint auf der Website automatisch, sobald mindestens eine Datei sichtbar ist. Ohne Zugangspasswort (siehe „Zugriffsschutz“) ist die Seite öffentlich."]}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2",children:"Titel / Datei"}),e.jsx("th",{className:"px-4 py-2",children:"Größe"}),e.jsx("th",{className:"px-4 py-2",children:"Website"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),e.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[o.map(t=>e.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[e.jsxs("td",{className:`px-4 py-2 ${t.is_hidden?"opacity-60":""}`,children:[e.jsx("p",{className:"font-medium text-neutral-800 dark:text-neutral-100",children:t.title}),e.jsx("a",{href:t.file_path,target:"_blank",rel:"noopener noreferrer",className:"break-all text-xs text-neutral-500 hover:text-brand-600 dark:text-neutral-400",children:t.file_name})]}),e.jsx("td",{className:"whitespace-nowrap px-4 py-2 text-neutral-500 dark:text-neutral-400",children:B(t.file_size)}),e.jsx("td",{className:"px-4 py-2",children:e.jsxs("button",{type:"button",onClick:()=>A(t),disabled:_===t.id,title:t.is_hidden?"Wieder auf der Website anzeigen":"Auf der Website ausblenden",className:`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-semibold transition disabled:opacity-50 ${t.is_hidden?"border-amber-300 bg-amber-50 text-amber-800 hover:bg-amber-100 dark:border-amber-700 dark:bg-amber-900/30 dark:text-amber-300":"border-neutral-300 text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800"}`,children:[t.is_hidden?e.jsx(W,{className:"h-3.5 w-3.5"}):e.jsx(F,{className:"h-3.5 w-3.5"}),t.is_hidden?"Ausgeblendet":"Sichtbar"]})}),e.jsxs("td",{className:"whitespace-nowrap px-4 py-2 text-right",children:[e.jsx("button",{onClick:()=>z(t),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),e.jsx("button",{onClick:()=>$(t),className:"text-red-600 hover:underline",children:"Löschen"})]})]},t.id)),o.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Dateien hochgeladen."})})]})]})})]}),e.jsxs("div",{className:"h-fit space-y-6",children:[e.jsxs("form",{onSubmit:E,className:"space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:s?"Download bearbeiten":"Neue Datei hochladen"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:s?"Datei ersetzen (optional)":"Datei *"}),e.jsx("input",{ref:w,type:"file",accept:P.map(t=>`.${t}`).join(","),onChange:t=>{var a;return r(((a=t.target.files)==null?void 0:a[0])||null)},className:"block w-full text-sm text-neutral-600 file:mr-3 file:rounded-md file:border-0 file:bg-brand-500 file:px-3 file:py-2 file:text-sm file:font-semibold file:text-white hover:file:bg-brand-600 dark:text-neutral-300"}),e.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:"Musik (MP3, WAV, FLAC, …), Videos, PDFs, Bilder, Office-Dokumente oder ZIP-Archive. Andere Dateitypen bitte als ZIP hochladen."})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:["Titel ",s?"*":"(optional)"]}),e.jsx("input",{required:!!s,value:l.title,maxLength:150,onChange:t=>i({...l,title:t.target.value}),placeholder:s?"":"Leer lassen = Dateiname",className:g})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Beschreibung (optional)"}),e.jsx("textarea",{rows:3,value:l.description,onChange:t=>i({...l,description:t.target.value}),className:g})]}),s&&e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),e.jsx("input",{type:"number",value:l.sort_order,onChange:t=>i({...l,sort_order:Number(t.target.value)}),className:g})]}),b!==null&&e.jsxs("div",{children:[e.jsx("div",{className:"h-2 overflow-hidden rounded-full bg-neutral-200 dark:bg-neutral-800",children:e.jsx("div",{className:"h-full rounded-full bg-brand-500 transition-[width]",style:{width:`${Math.round(b*100)}%`}})}),e.jsx("p",{className:"mt-1 text-xs text-neutral-500 dark:text-neutral-400",children:b<1?`Wird hochgeladen … ${Math.round(b*100)} %`:"Wird gespeichert …"})]}),y&&e.jsx("p",{className:"text-sm text-red-600",children:y}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",disabled:u,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:s?"Speichern":"Hochladen"}),s&&e.jsx("button",{type:"button",onClick:f,disabled:u,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]}),e.jsx(I,{})]})]})}export{T as default}; +import{r as n,j as e,k as B,A as P,a as m,m as L}from"./index-D7JbPKAF.js";import{E as W,a as F}from"./eye-zEWyQJeC.js";const g="w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900",S={title:"",description:"",sort_order:0};function D(o,h,l){return new Promise((i,c)=>{const r=new XMLHttpRequest;r.open("POST",`${L}${o}`),r.withCredentials=!0,r.upload.onprogress=s=>{s.lengthComputable&&l(s.loaded/s.total)},r.onload=()=>{let s=null;try{s=JSON.parse(r.responseText)}catch{}r.status>=200&&r.status<300?i(s):c(new Error((s==null?void 0:s.error)||(r.status===413?"Die Datei ist zu groß für diesen Server.":`Fehler ${r.status}`)))},r.onerror=()=>c(new Error("Netzwerkfehler beim Hochladen")),r.send(h)})}function I(){const[o,h]=n.useState(void 0),[l,i]=n.useState(""),[c,r]=n.useState(!1),[s,x]=n.useState(null);n.useEffect(()=>{m.get("/settings/downloads").then(d=>{h(d.password),i(d.password||"")}).catch(d=>x({kind:"error",text:d.message}))},[]);const b=async d=>{d.preventDefault(),r(!0),x(null);try{const u=await m.put("/settings/downloads",{password:l});h(u.password),i(u.password||""),x({kind:"ok",text:u.password?"Gespeichert – der Bereich ist jetzt geschützt.":"Gespeichert – der Bereich ist jetzt öffentlich."})}catch(u){x({kind:"error",text:u.message})}finally{r(!1)}};return e.jsxs("form",{onSubmit:b,className:"space-y-3 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:"Zugriffsschutz"}),e.jsxs("p",{className:"text-sm text-neutral-600 dark:text-neutral-300",children:[o===void 0&&"Lädt…",o===null&&"Öffentlich – jeder, der die Seite aufruft, sieht die Dateien.",typeof o=="string"&&"Geschützt – Besucher müssen zuerst das Passwort eingeben."]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Zugangspasswort (leer = öffentlich)"}),e.jsx("input",{value:l,maxLength:100,autoComplete:"off",onChange:d=>i(d.target.value),className:g}),e.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:"Das Passwort an die Kunden weitergeben – es bleibt hier jederzeit einsehbar. Direkte Links zu einzelnen Dateien funktionieren auch ohne Passwort; wer freigeschaltet hat, könnte sie also weitergeben."})]}),s&&e.jsx("p",{className:`text-sm ${s.kind==="error"?"text-red-600":"text-brand-600 dark:text-brand-400"}`,children:s.text}),e.jsx("button",{type:"submit",disabled:c||o===void 0,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:"Speichern"})]})}function T(){const[o,h]=n.useState([]),[l,i]=n.useState(S),[c,r]=n.useState(null),[s,x]=n.useState(null),[b,d]=n.useState(null),[u,N]=n.useState(!1),[y,p]=n.useState(""),[_,v]=n.useState(null),w=n.useRef(null),k=()=>m.get("/downloads/manage").then(h);n.useEffect(()=>{k()},[]);const f=()=>{x(null),i(S),r(null),p(""),w.current&&(w.current.value="")},z=t=>{f(),x(t.id),i({title:t.title,description:t.description||"",sort_order:t.sort_order}),window.scrollTo({top:0,behavior:"smooth"})},E=async t=>{if(t.preventDefault(),!s&&!c){p("Bitte eine Datei auswählen.");return}N(!0),p("");try{if(s){if(await m.put(`/downloads/${s}`,l),c){const a=new FormData;a.append("file",c),d(0),await D(`/downloads/${s}/file`,a,d)}}else{const a=new FormData;a.append("file",c),a.append("title",l.title),a.append("description",l.description),d(0),await D("/downloads",a,d)}f(),k()}catch(a){p(a.message)}finally{N(!1),d(null)}},A=async t=>{v(t.id);try{const a=await m.patch(`/downloads/${t.id}/visibility`,{is_hidden:!t.is_hidden});h(C=>C.map(j=>j.id===t.id?{...j,is_hidden:a.is_hidden}:j))}catch(a){alert(`Sichtbarkeit konnte nicht geändert werden: ${a.message}`)}finally{v(null)}},$=async t=>{confirm(`"${t.title}" inkl. Datei wirklich löschen?`)&&(await m.delete(`/downloads/${t.id}`),s===t.id&&f(),k())};return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("h1",{className:"mb-4 text-xl font-bold text-neutral-900 dark:text-white",children:"Downloads"}),e.jsxs("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:["Dateien, die Kunden auf der Seite"," ",e.jsx("a",{href:"/downloads",target:"_blank",rel:"noopener noreferrer",className:"text-brand-600 hover:underline",children:"/downloads"})," ","anhören bzw. herunterladen können, z. B. Songs oder Anleitungen. Der Menüpunkt „Downloads“ erscheint auf der Website automatisch, sobald mindestens eine Datei sichtbar ist. Ohne Zugangspasswort (siehe „Zugriffsschutz“) ist die Seite öffentlich."]}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2",children:"Titel / Datei"}),e.jsx("th",{className:"px-4 py-2",children:"Größe"}),e.jsx("th",{className:"px-4 py-2",children:"Website"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),e.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[o.map(t=>e.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[e.jsxs("td",{className:`px-4 py-2 ${t.is_hidden?"opacity-60":""}`,children:[e.jsx("p",{className:"font-medium text-neutral-800 dark:text-neutral-100",children:t.title}),e.jsx("a",{href:t.file_path,target:"_blank",rel:"noopener noreferrer",className:"break-all text-xs text-neutral-500 hover:text-brand-600 dark:text-neutral-400",children:t.file_name})]}),e.jsx("td",{className:"whitespace-nowrap px-4 py-2 text-neutral-500 dark:text-neutral-400",children:B(t.file_size)}),e.jsx("td",{className:"px-4 py-2",children:e.jsxs("button",{type:"button",onClick:()=>A(t),disabled:_===t.id,title:t.is_hidden?"Wieder auf der Website anzeigen":"Auf der Website ausblenden",className:`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-semibold transition disabled:opacity-50 ${t.is_hidden?"border-amber-300 bg-amber-50 text-amber-800 hover:bg-amber-100 dark:border-amber-700 dark:bg-amber-900/30 dark:text-amber-300":"border-neutral-300 text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800"}`,children:[t.is_hidden?e.jsx(W,{className:"h-3.5 w-3.5"}):e.jsx(F,{className:"h-3.5 w-3.5"}),t.is_hidden?"Ausgeblendet":"Sichtbar"]})}),e.jsxs("td",{className:"whitespace-nowrap px-4 py-2 text-right",children:[e.jsx("button",{onClick:()=>z(t),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),e.jsx("button",{onClick:()=>$(t),className:"text-red-600 hover:underline",children:"Löschen"})]})]},t.id)),o.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Dateien hochgeladen."})})]})]})})]}),e.jsxs("div",{className:"h-fit space-y-6",children:[e.jsxs("form",{onSubmit:E,className:"space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:s?"Download bearbeiten":"Neue Datei hochladen"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:s?"Datei ersetzen (optional)":"Datei *"}),e.jsx("input",{ref:w,type:"file",accept:P.map(t=>`.${t}`).join(","),onChange:t=>{var a;return r(((a=t.target.files)==null?void 0:a[0])||null)},className:"block w-full text-sm text-neutral-600 file:mr-3 file:rounded-md file:border-0 file:bg-brand-500 file:px-3 file:py-2 file:text-sm file:font-semibold file:text-white hover:file:bg-brand-600 dark:text-neutral-300"}),e.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:"Musik (MP3, WAV, FLAC, …), Videos, PDFs, Bilder, Office-Dokumente oder ZIP-Archive. Andere Dateitypen bitte als ZIP hochladen."})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:["Titel ",s?"*":"(optional)"]}),e.jsx("input",{required:!!s,value:l.title,maxLength:150,onChange:t=>i({...l,title:t.target.value}),placeholder:s?"":"Leer lassen = Dateiname",className:g})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Beschreibung (optional)"}),e.jsx("textarea",{rows:3,value:l.description,onChange:t=>i({...l,description:t.target.value}),className:g})]}),s&&e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),e.jsx("input",{type:"number",value:l.sort_order,onChange:t=>i({...l,sort_order:Number(t.target.value)}),className:g})]}),b!==null&&e.jsxs("div",{children:[e.jsx("div",{className:"h-2 overflow-hidden rounded-full bg-neutral-200 dark:bg-neutral-800",children:e.jsx("div",{className:"h-full rounded-full bg-brand-500 transition-[width]",style:{width:`${Math.round(b*100)}%`}})}),e.jsx("p",{className:"mt-1 text-xs text-neutral-500 dark:text-neutral-400",children:b<1?`Wird hochgeladen … ${Math.round(b*100)} %`:"Wird gespeichert …"})]}),y&&e.jsx("p",{className:"text-sm text-red-600",children:y}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",disabled:u,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:s?"Speichern":"Hochladen"}),s&&e.jsx("button",{type:"button",onClick:f,disabled:u,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]}),e.jsx(I,{})]})]})}export{T as default}; diff --git a/hifi/assets/EmailSettings-VadOa5J3.js b/hifi/assets/EmailSettings-BmNJuhHH.js similarity index 98% rename from hifi/assets/EmailSettings-VadOa5J3.js rename to hifi/assets/EmailSettings-BmNJuhHH.js index 30b1a55..2509478 100644 --- a/hifi/assets/EmailSettings-VadOa5J3.js +++ b/hifi/assets/EmailSettings-BmNJuhHH.js @@ -1,2 +1,2 @@ -import{r,a as m,j as e}from"./index-QV-Szw5n.js";import{R as E}from"./RichTextEditor-DJwdsoJ6.js";function d(a){if(!a)return"";if(/<[a-z][\s\S]*>/i.test(a))return a;const l=document.createElement("div");return l.textContent=a,`

${l.innerHTML.replace(/\n/g,"
")}

`}const H={mail_host:"",mail_port:587,mail_username:"",mail_password:"",mail_encryption:"tls",mail_from_email:"",mail_from_name:"",mail_notify_email:"",mail_customer_subject:"",mail_customer_body:"",mail_owner_subject:"",mail_owner_body:""},z=[["{{name}}","Name des Kunden"],["{{email}}","E-Mail des Kunden"],["{{phone}}","Telefonnummer"],["{{vin}}","Fahrgestellnummer (FIN)"],["{{message}}","Nachricht des Kunden"],["{{brand}}","Marke"],["{{model}}","Modell"],["{{package}}","Paket"],["{{product}}","Produkt"],["{{upgrades}}","Gewählte Upgrades"]];function T(){return e.jsx("div",{className:"mt-3 flex flex-wrap gap-1.5",children:z.map(([a,l])=>e.jsx("span",{title:l,className:"rounded-md bg-neutral-100 px-2 py-1 font-mono text-xs text-neutral-600 dark:bg-neutral-800 dark:text-neutral-300",children:a},a))})}function D(){const[a,l]=r.useState(H),[u,c]=r.useState(!1),[C,P]=r.useState(!0),[x,M]=r.useState(!1),[b,h]=r.useState(!1),[p,g]=r.useState(""),[B,o]=r.useState(!1),[f,k]=r.useState(!1),[_,j]=r.useState(""),[w,v]=r.useState(""),[y,N]=r.useState(""),[i,S]=r.useState(null);r.useEffect(()=>{m.get("/settings/mail").then(t=>{l({...t,mail_password:"",mail_customer_body:d(t.mail_customer_body),mail_owner_body:d(t.mail_owner_body)}),c(t.has_password)}).finally(()=>P(!1))},[]);const s=(t,n)=>{l(A=>({...A,[t]:n})),o(!1)},K=async t=>{t.preventDefault(),h(!0),g(""),o(!1);try{const n=await m.post("/settings/mail",a);l({...n,mail_password:"",mail_customer_body:d(n.mail_customer_body),mail_owner_body:d(n.mail_owner_body)}),c(n.has_password),o(!0)}catch(n){g(n.message)}finally{h(!1)}},L=async()=>{k(!0),j(""),v(""),N(""),S(null);try{const t=await m.post("/settings/mail/test",a);v(`Testmail gesendet an ${t.sent_to}. Der Server hat die Mail angenommen - prüfe auch den Spam-Ordner, das ist noch keine Garantie für die Zustellung.`),N(t.warning||""),S(t.smtp_log||null)}catch(t){j(t.message)}finally{k(!1)}};return C?e.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}):e.jsxs("form",{onSubmit:K,className:"max-w-2xl space-y-6",children:[e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"SMTP-Server"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Zugangsdaten deines Mail-Postfachs oder Transactional-Mail-Anbieters. Solange kein Server eingetragen ist, werden keine E-Mails verschickt (Kontaktanfragen werden trotzdem in der Datenbank gespeichert)."}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-[1fr_120px]",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Server (Host)"}),e.jsx("input",{value:a.mail_host,onChange:t=>s("mail_host",t.target.value),placeholder:"smtp.beispiel.de",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Port"}),e.jsx("input",{type:"number",value:a.mail_port,onChange:t=>s("mail_port",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Verschlüsselung"}),e.jsxs("select",{value:a.mail_encryption,onChange:t=>s("mail_encryption",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:[e.jsx("option",{value:"tls",children:"STARTTLS"}),e.jsx("option",{value:"ssl",children:"SSL"}),e.jsx("option",{value:"none",children:"Keine"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Benutzername"}),e.jsx("input",{value:a.mail_username,onChange:t=>s("mail_username",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:["Passwort ",u?"(leer lassen = unverändert)":""]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{type:x?"text":"password",value:a.mail_password,onChange:t=>s("mail_password",t.target.value),placeholder:u?"••••••••":"",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsx("button",{type:"button",onClick:()=>M(t=>!t),className:"shrink-0 rounded-md border border-neutral-300 px-3 text-sm dark:border-neutral-700",children:x?"Verbergen":"Anzeigen"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Absender-E-Mail"}),e.jsx("input",{type:"email",value:a.mail_from_email,onChange:t=>s("mail_from_email",t.target.value),placeholder:"info@hifi-planet-amorbach.de",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Absender-Name"}),e.jsx("input",{value:a.mail_from_name,onChange:t=>s("mail_from_name",t.target.value),placeholder:"HifiPlanet",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]})]}),e.jsxs("div",{className:"mt-4 border-t border-neutral-200 pt-4 dark:border-neutral-800",children:[_&&e.jsx("p",{className:"mb-2 whitespace-pre-wrap text-sm text-red-600",children:_}),w&&e.jsx("p",{className:"mb-2 text-sm text-green-600 dark:text-green-400",children:w}),y&&e.jsx("p",{className:"mb-2 rounded-md bg-amber-50 p-2 text-sm text-amber-800 dark:bg-amber-900/20 dark:text-amber-300",children:y}),e.jsx("button",{type:"button",onClick:L,disabled:f,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm font-medium hover:bg-neutral-50 disabled:opacity-50 dark:border-neutral-700 dark:hover:bg-neutral-800",children:f?"Sende Testmail…":"Verbindung testen"}),i&&i.length>0&&e.jsxs("details",{className:"mt-3",children:[e.jsx("summary",{className:"cursor-pointer text-xs text-neutral-500 dark:text-neutral-400",children:"SMTP-Protokoll anzeigen"}),e.jsx("pre",{className:"mt-2 max-h-64 overflow-auto rounded-md bg-neutral-900 p-3 text-xs text-neutral-200",children:i.join(` +import{r,a as m,j as e}from"./index-D7JbPKAF.js";import{R as E}from"./RichTextEditor-DSo9zuZu.js";function d(a){if(!a)return"";if(/<[a-z][\s\S]*>/i.test(a))return a;const l=document.createElement("div");return l.textContent=a,`

${l.innerHTML.replace(/\n/g,"
")}

`}const H={mail_host:"",mail_port:587,mail_username:"",mail_password:"",mail_encryption:"tls",mail_from_email:"",mail_from_name:"",mail_notify_email:"",mail_customer_subject:"",mail_customer_body:"",mail_owner_subject:"",mail_owner_body:""},z=[["{{name}}","Name des Kunden"],["{{email}}","E-Mail des Kunden"],["{{phone}}","Telefonnummer"],["{{vin}}","Fahrgestellnummer (FIN)"],["{{message}}","Nachricht des Kunden"],["{{brand}}","Marke"],["{{model}}","Modell"],["{{package}}","Paket"],["{{product}}","Produkt"],["{{upgrades}}","Gewählte Upgrades"]];function T(){return e.jsx("div",{className:"mt-3 flex flex-wrap gap-1.5",children:z.map(([a,l])=>e.jsx("span",{title:l,className:"rounded-md bg-neutral-100 px-2 py-1 font-mono text-xs text-neutral-600 dark:bg-neutral-800 dark:text-neutral-300",children:a},a))})}function D(){const[a,l]=r.useState(H),[u,c]=r.useState(!1),[C,P]=r.useState(!0),[x,M]=r.useState(!1),[b,h]=r.useState(!1),[p,g]=r.useState(""),[B,o]=r.useState(!1),[f,k]=r.useState(!1),[_,j]=r.useState(""),[w,v]=r.useState(""),[y,N]=r.useState(""),[i,S]=r.useState(null);r.useEffect(()=>{m.get("/settings/mail").then(t=>{l({...t,mail_password:"",mail_customer_body:d(t.mail_customer_body),mail_owner_body:d(t.mail_owner_body)}),c(t.has_password)}).finally(()=>P(!1))},[]);const s=(t,n)=>{l(A=>({...A,[t]:n})),o(!1)},K=async t=>{t.preventDefault(),h(!0),g(""),o(!1);try{const n=await m.post("/settings/mail",a);l({...n,mail_password:"",mail_customer_body:d(n.mail_customer_body),mail_owner_body:d(n.mail_owner_body)}),c(n.has_password),o(!0)}catch(n){g(n.message)}finally{h(!1)}},L=async()=>{k(!0),j(""),v(""),N(""),S(null);try{const t=await m.post("/settings/mail/test",a);v(`Testmail gesendet an ${t.sent_to}. Der Server hat die Mail angenommen - prüfe auch den Spam-Ordner, das ist noch keine Garantie für die Zustellung.`),N(t.warning||""),S(t.smtp_log||null)}catch(t){j(t.message)}finally{k(!1)}};return C?e.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}):e.jsxs("form",{onSubmit:K,className:"max-w-2xl space-y-6",children:[e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"SMTP-Server"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Zugangsdaten deines Mail-Postfachs oder Transactional-Mail-Anbieters. Solange kein Server eingetragen ist, werden keine E-Mails verschickt (Kontaktanfragen werden trotzdem in der Datenbank gespeichert)."}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-[1fr_120px]",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Server (Host)"}),e.jsx("input",{value:a.mail_host,onChange:t=>s("mail_host",t.target.value),placeholder:"smtp.beispiel.de",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Port"}),e.jsx("input",{type:"number",value:a.mail_port,onChange:t=>s("mail_port",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Verschlüsselung"}),e.jsxs("select",{value:a.mail_encryption,onChange:t=>s("mail_encryption",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:[e.jsx("option",{value:"tls",children:"STARTTLS"}),e.jsx("option",{value:"ssl",children:"SSL"}),e.jsx("option",{value:"none",children:"Keine"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Benutzername"}),e.jsx("input",{value:a.mail_username,onChange:t=>s("mail_username",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:["Passwort ",u?"(leer lassen = unverändert)":""]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{type:x?"text":"password",value:a.mail_password,onChange:t=>s("mail_password",t.target.value),placeholder:u?"••••••••":"",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsx("button",{type:"button",onClick:()=>M(t=>!t),className:"shrink-0 rounded-md border border-neutral-300 px-3 text-sm dark:border-neutral-700",children:x?"Verbergen":"Anzeigen"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Absender-E-Mail"}),e.jsx("input",{type:"email",value:a.mail_from_email,onChange:t=>s("mail_from_email",t.target.value),placeholder:"info@hifi-planet-amorbach.de",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Absender-Name"}),e.jsx("input",{value:a.mail_from_name,onChange:t=>s("mail_from_name",t.target.value),placeholder:"HifiPlanet",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]})]}),e.jsxs("div",{className:"mt-4 border-t border-neutral-200 pt-4 dark:border-neutral-800",children:[_&&e.jsx("p",{className:"mb-2 whitespace-pre-wrap text-sm text-red-600",children:_}),w&&e.jsx("p",{className:"mb-2 text-sm text-green-600 dark:text-green-400",children:w}),y&&e.jsx("p",{className:"mb-2 rounded-md bg-amber-50 p-2 text-sm text-amber-800 dark:bg-amber-900/20 dark:text-amber-300",children:y}),e.jsx("button",{type:"button",onClick:L,disabled:f,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm font-medium hover:bg-neutral-50 disabled:opacity-50 dark:border-neutral-700 dark:hover:bg-neutral-800",children:f?"Sende Testmail…":"Verbindung testen"}),i&&i.length>0&&e.jsxs("details",{className:"mt-3",children:[e.jsx("summary",{className:"cursor-pointer text-xs text-neutral-500 dark:text-neutral-400",children:"SMTP-Protokoll anzeigen"}),e.jsx("pre",{className:"mt-2 max-h-64 overflow-auto rounded-md bg-neutral-900 p-3 text-xs text-neutral-200",children:i.join(` `)})]})]})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Empfänger"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"An diese Adresse geht die Benachrichtigung bei jeder neuen Kontaktanfrage."}),e.jsx("input",{type:"email",value:a.mail_notify_email,onChange:t=>s("mail_notify_email",t.target.value),placeholder:"info@hifi-planet-amorbach.de",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"E-Mail an den Kunden (Bestätigung)"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Geht automatisch an den Kunden, sobald er eine Kontaktanfrage abschickt."}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Betreff"}),e.jsx("input",{value:a.mail_customer_subject,onChange:t=>s("mail_customer_subject",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsx(E,{label:"Text",value:a.mail_customer_body,onChange:t=>s("mail_customer_body",t)})]}),e.jsx(T,{})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"E-Mail an den Shop (Benachrichtigung)"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Geht an die oben eingestellte Empfänger-Adresse, sobald eine neue Kontaktanfrage eingeht."}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Betreff"}),e.jsx("input",{value:a.mail_owner_subject,onChange:t=>s("mail_owner_subject",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsx(E,{label:"Text",value:a.mail_owner_body,onChange:t=>s("mail_owner_body",t)})]}),e.jsx(T,{})]}),p&&e.jsx("p",{className:"text-sm text-red-600",children:p}),B&&e.jsx("p",{className:"text-sm text-green-600 dark:text-green-400",children:"Gespeichert."}),e.jsx("button",{type:"submit",disabled:b,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:b?"Speichere…":"Speichern"})]})}export{D as default}; diff --git a/hifi/assets/ExportImportSettings-Bkwm__tE.js b/hifi/assets/ExportImportSettings-DeVHjr9k.js similarity index 99% rename from hifi/assets/ExportImportSettings-Bkwm__tE.js rename to hifi/assets/ExportImportSettings-DeVHjr9k.js index 0b60aa5..1d8f982 100644 --- a/hifi/assets/ExportImportSettings-Bkwm__tE.js +++ b/hifi/assets/ExportImportSettings-DeVHjr9k.js @@ -1 +1 @@ -import{r as n,j as e,m as D,a as F}from"./index-QV-Szw5n.js";const p=[{key:"catalog",label:"Fahrzeug-Katalog",hint:"Marken, Modelle (inkl. Bilder), Pakete, Produkte, Upgrades",tables:["brands","car_models","packages","package_products","package_upgrades"]},{key:"services",label:"Leistungen",hint:"Die Leistungen-Übersicht",tables:["services"]},{key:"faqs",label:"FAQs",hint:"Häufig gestellte Fragen",tables:["faqs"]},{key:"gallery",label:"Bildergalerie",hint:"Galerie-Marken, Projekte und Fotos (inkl. Bilder)",tables:["gallery_brands","gallery_projects","gallery_photos"]},{key:"settings",label:"Einstellungen",hint:"Telefon/Adresse/Öffnungszeiten, Logo, Wartungsmodus-Texte, Kachel-Design, Mail-Vorlagen (ohne Zugangsdaten)",tables:["app_settings"]},{key:"legal",label:"Rechtstexte",hint:"Impressum, Datenschutzerklärung, AGB",tables:["legal_pages"]},{key:"home",label:"Startseiten-Texte",hint:'Hero, YouTube-Sektion, Handwerk, Beratung, Einblicke, "Mehr als Car-Hifi"',tables:["home_sections"]},{key:"partners",label:"Partner",hint:"Marken-Logozeile auf der Startseite (inkl. Logos)",tables:["partners"]},{key:"permissions",label:"Berechtigungsgruppen",hint:"Rollen-Vorlagen und ihre Rechte (ohne Benutzerkonten selbst)",tables:["permission_groups","permission_group_permissions"]}],v={brands:"Marken",car_models:"Modelle",packages:"Pakete",package_products:"Produkte",package_upgrades:"Upgrades",services:"Leistungen",faqs:"FAQs",gallery_brands:"Galerie-Marken",gallery_projects:"Galerie-Projekte",gallery_photos:"Galerie-Fotos",app_settings:"Einstellungen",legal_pages:"Rechtstexte",home_sections:"Startseiten-Texte",partners:"Partner",permission_groups:"Berechtigungsgruppen",permission_group_permissions:"Berechtigungsgruppen-Rechte",admin_users:"Benutzerkonten",admin_user_permissions:"Benutzer-Einzelrechte",admin_user_groups:"Benutzer-Gruppenzuweisungen"},L=(l,d)=>{if(!l)return null;const i=d.map(s=>[s,Array.isArray(l[s])?l[s].length:0]).filter(([,s])=>s>0).map(([s,c])=>`${c} ${v[s]||s}`);return i.length?i.join(", "):"leer in dieser Datei"};function C(){const[l,d]=n.useState(null),[i,s]=n.useState(null),[c,y]=n.useState(""),[o,w]=n.useState(()=>new Set(p.map(t=>t.key))),[N,E]=n.useState(!1),[m,g]=n.useState(!1),[h,_]=n.useState(!1),[S,B]=n.useState(!1),[u,x]=n.useState(null),[z,b]=n.useState(""),I=async t=>{var a;const r=((a=t.target.files)==null?void 0:a[0])||null;if(d(r),x(null),b(""),s(null),y(""),w(new Set(p.map(f=>f.key))),g(!1),!!r)try{const f=await r.text(),j=JSON.parse(f);if(!j||typeof j.data!="object")throw new Error("kein gültiges Export-Format");s(j.data)}catch{y("Datei konnte nicht gelesen werden – Vorschau der Inhalte nicht möglich. Import würde trotzdem versucht (alle Bereiche).")}},A=t=>{w(r=>{const a=new Set(r);return a.has(t)?a.delete(t):a.add(t),a})},P=async t=>{if(t.preventDefault(),!(!l||!h||o.size===0)){B(!0),b(""),x(null);try{const r=new FormData;r.append("file",l),r.append("sections",JSON.stringify([...o])),r.append("include_accounts",m?"1":"0");const a=await F.post("/settings/import",r);x(a),d(null),s(null),_(!1),g(!1),t.target.reset()}catch(r){b(r.message)}finally{B(!1)}}},k=p.filter(t=>o.has(t.key)).map(t=>t.label);return m&&k.push("Benutzerkonten"),e.jsxs("div",{className:"max-w-2xl space-y-6",children:[e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Daten exportieren"}),e.jsxs("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:["Lädt eine Datei mit allen Marken, Modellen, Paketen, Produkten, Upgrades, Leistungen, FAQs, der kompletten Bildergalerie (inkl. Bilder), den Einstellungen und den Berechtigungsgruppen herunter (ohne Zugangsdaten wie SMTP-Passwort oder API-Keys – die müssen auf jedem Server neu eingetragen werden). Kontaktanfragen sind bewusst ",e.jsx("strong",{children:"nicht"})," enthalten."]}),e.jsxs("label",{className:"mb-3 flex items-start gap-2 text-sm text-neutral-700 dark:text-neutral-300",children:[e.jsx("input",{type:"checkbox",checked:N,onChange:t=>E(t.target.checked),className:"mt-0.5 h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),"Benutzerkonten mit exportieren (enthält Passwort-Hashes und 2FA-Geheimnisse – nur für Backups an einem vertrauenswürdigen Ort)"]}),e.jsx("a",{href:`${D}/settings/export${N?"?include_accounts=1":""}`,className:"inline-block rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:"Jetzt exportieren"})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Daten importieren"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Lädt eine zuvor exportierte Datei auf diesen Server. Ersetzt dabei die ausgewählten Bereiche komplett durch den Inhalt der Datei – das kann nicht rückgängig gemacht werden. Kontaktanfragen bleiben immer unangetastet, Benutzerkonten nur wenn unten explizit angehakt."}),e.jsxs("form",{onSubmit:P,className:"space-y-4",children:[e.jsx("input",{type:"file",accept:"application/json,.json",onChange:I,className:"text-sm"}),l&&e.jsxs("div",{className:"rounded-lg border border-neutral-200 dark:border-neutral-700",children:[e.jsx("div",{className:"border-b border-neutral-200 px-4 py-2 text-xs font-semibold uppercase tracking-wide text-neutral-500 dark:border-neutral-700 dark:text-neutral-400",children:"Was soll importiert werden?"}),c&&e.jsx("p",{className:"px-4 pt-3 text-sm text-amber-600 dark:text-amber-400",children:c}),e.jsxs("div",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[p.map(t=>e.jsxs("label",{className:"flex cursor-pointer items-start gap-3 px-4 py-3 hover:bg-neutral-50 dark:hover:bg-neutral-800/50",children:[e.jsx("input",{type:"checkbox",checked:o.has(t.key),onChange:()=>A(t.key),className:"mt-0.5 h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),e.jsxs("span",{className:"flex-1",children:[e.jsx("span",{className:"block text-sm font-medium text-neutral-800 dark:text-neutral-100",children:t.label}),e.jsx("span",{className:"block text-xs text-neutral-500 dark:text-neutral-400",children:i?L(i,t.tables):t.hint})]})]},t.key)),e.jsxs("label",{className:"flex cursor-pointer items-start gap-3 px-4 py-3 hover:bg-neutral-50 dark:hover:bg-neutral-800/50",children:[e.jsx("input",{type:"checkbox",checked:m,onChange:t=>g(t.target.checked),className:"mt-0.5 h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),e.jsxs("span",{className:"flex-1",children:[e.jsx("span",{className:"block text-sm font-medium text-neutral-800 dark:text-neutral-100",children:"Benutzerkonten"}),e.jsx("span",{className:"block text-xs text-neutral-500 dark:text-neutral-400",children:'Nur wenn die Datei mit "Benutzerkonten mit exportieren" erstellt wurde. Ersetzt auch dein eigenes Konto – danach ggf. mit den Zugangsdaten aus der Export-Datei neu einloggen.'})]})]})]})]}),e.jsxs("label",{className:"flex items-start gap-2 text-sm text-neutral-700 dark:text-neutral-300",children:[e.jsx("input",{type:"checkbox",checked:h,onChange:t=>_(t.target.checked),className:"mt-0.5 h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),"Mir ist bewusst, dass dies"," ",k.length?e.jsx("strong",{children:k.join(", ")}):"die ausgewählten Bereiche"," auf diesem Server unwiderruflich ersetzt."]}),e.jsx("button",{type:"submit",disabled:!l||!h||S||o.size===0,className:"rounded-md bg-red-600 px-4 py-2 text-sm font-semibold text-white hover:bg-red-700 disabled:opacity-50",children:S?"Importiere…":"Importieren"})]}),z&&e.jsx("p",{className:"mt-3 text-sm text-red-600",children:z}),u&&e.jsxs("div",{className:"mt-3 rounded-md bg-green-50 p-3 text-sm text-green-800 dark:bg-green-900/20 dark:text-green-300",children:[e.jsx("p",{className:"mb-1 font-semibold",children:"Import erfolgreich:"}),e.jsxs("ul",{className:"list-disc pl-5",children:[Object.entries(u.counts).map(([t,r])=>e.jsxs("li",{children:[r," ",v[t]||t]},t)),u.images_restored>0&&e.jsxs("li",{children:[u.images_restored," Bilder wiederhergestellt"]})]})]})]})]})}export{C as default}; +import{r as n,j as e,m as D,a as F}from"./index-D7JbPKAF.js";const p=[{key:"catalog",label:"Fahrzeug-Katalog",hint:"Marken, Modelle (inkl. Bilder), Pakete, Produkte, Upgrades",tables:["brands","car_models","packages","package_products","package_upgrades"]},{key:"services",label:"Leistungen",hint:"Die Leistungen-Übersicht",tables:["services"]},{key:"faqs",label:"FAQs",hint:"Häufig gestellte Fragen",tables:["faqs"]},{key:"gallery",label:"Bildergalerie",hint:"Galerie-Marken, Projekte und Fotos (inkl. Bilder)",tables:["gallery_brands","gallery_projects","gallery_photos"]},{key:"settings",label:"Einstellungen",hint:"Telefon/Adresse/Öffnungszeiten, Logo, Wartungsmodus-Texte, Kachel-Design, Mail-Vorlagen (ohne Zugangsdaten)",tables:["app_settings"]},{key:"legal",label:"Rechtstexte",hint:"Impressum, Datenschutzerklärung, AGB",tables:["legal_pages"]},{key:"home",label:"Startseiten-Texte",hint:'Hero, YouTube-Sektion, Handwerk, Beratung, Einblicke, "Mehr als Car-Hifi"',tables:["home_sections"]},{key:"partners",label:"Partner",hint:"Marken-Logozeile auf der Startseite (inkl. Logos)",tables:["partners"]},{key:"permissions",label:"Berechtigungsgruppen",hint:"Rollen-Vorlagen und ihre Rechte (ohne Benutzerkonten selbst)",tables:["permission_groups","permission_group_permissions"]}],v={brands:"Marken",car_models:"Modelle",packages:"Pakete",package_products:"Produkte",package_upgrades:"Upgrades",services:"Leistungen",faqs:"FAQs",gallery_brands:"Galerie-Marken",gallery_projects:"Galerie-Projekte",gallery_photos:"Galerie-Fotos",app_settings:"Einstellungen",legal_pages:"Rechtstexte",home_sections:"Startseiten-Texte",partners:"Partner",permission_groups:"Berechtigungsgruppen",permission_group_permissions:"Berechtigungsgruppen-Rechte",admin_users:"Benutzerkonten",admin_user_permissions:"Benutzer-Einzelrechte",admin_user_groups:"Benutzer-Gruppenzuweisungen"},L=(l,d)=>{if(!l)return null;const i=d.map(s=>[s,Array.isArray(l[s])?l[s].length:0]).filter(([,s])=>s>0).map(([s,c])=>`${c} ${v[s]||s}`);return i.length?i.join(", "):"leer in dieser Datei"};function C(){const[l,d]=n.useState(null),[i,s]=n.useState(null),[c,y]=n.useState(""),[o,w]=n.useState(()=>new Set(p.map(t=>t.key))),[N,E]=n.useState(!1),[m,g]=n.useState(!1),[h,_]=n.useState(!1),[S,B]=n.useState(!1),[u,x]=n.useState(null),[z,b]=n.useState(""),I=async t=>{var a;const r=((a=t.target.files)==null?void 0:a[0])||null;if(d(r),x(null),b(""),s(null),y(""),w(new Set(p.map(f=>f.key))),g(!1),!!r)try{const f=await r.text(),j=JSON.parse(f);if(!j||typeof j.data!="object")throw new Error("kein gültiges Export-Format");s(j.data)}catch{y("Datei konnte nicht gelesen werden – Vorschau der Inhalte nicht möglich. Import würde trotzdem versucht (alle Bereiche).")}},A=t=>{w(r=>{const a=new Set(r);return a.has(t)?a.delete(t):a.add(t),a})},P=async t=>{if(t.preventDefault(),!(!l||!h||o.size===0)){B(!0),b(""),x(null);try{const r=new FormData;r.append("file",l),r.append("sections",JSON.stringify([...o])),r.append("include_accounts",m?"1":"0");const a=await F.post("/settings/import",r);x(a),d(null),s(null),_(!1),g(!1),t.target.reset()}catch(r){b(r.message)}finally{B(!1)}}},k=p.filter(t=>o.has(t.key)).map(t=>t.label);return m&&k.push("Benutzerkonten"),e.jsxs("div",{className:"max-w-2xl space-y-6",children:[e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Daten exportieren"}),e.jsxs("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:["Lädt eine Datei mit allen Marken, Modellen, Paketen, Produkten, Upgrades, Leistungen, FAQs, der kompletten Bildergalerie (inkl. Bilder), den Einstellungen und den Berechtigungsgruppen herunter (ohne Zugangsdaten wie SMTP-Passwort oder API-Keys – die müssen auf jedem Server neu eingetragen werden). Kontaktanfragen sind bewusst ",e.jsx("strong",{children:"nicht"})," enthalten."]}),e.jsxs("label",{className:"mb-3 flex items-start gap-2 text-sm text-neutral-700 dark:text-neutral-300",children:[e.jsx("input",{type:"checkbox",checked:N,onChange:t=>E(t.target.checked),className:"mt-0.5 h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),"Benutzerkonten mit exportieren (enthält Passwort-Hashes und 2FA-Geheimnisse – nur für Backups an einem vertrauenswürdigen Ort)"]}),e.jsx("a",{href:`${D}/settings/export${N?"?include_accounts=1":""}`,className:"inline-block rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:"Jetzt exportieren"})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Daten importieren"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Lädt eine zuvor exportierte Datei auf diesen Server. Ersetzt dabei die ausgewählten Bereiche komplett durch den Inhalt der Datei – das kann nicht rückgängig gemacht werden. Kontaktanfragen bleiben immer unangetastet, Benutzerkonten nur wenn unten explizit angehakt."}),e.jsxs("form",{onSubmit:P,className:"space-y-4",children:[e.jsx("input",{type:"file",accept:"application/json,.json",onChange:I,className:"text-sm"}),l&&e.jsxs("div",{className:"rounded-lg border border-neutral-200 dark:border-neutral-700",children:[e.jsx("div",{className:"border-b border-neutral-200 px-4 py-2 text-xs font-semibold uppercase tracking-wide text-neutral-500 dark:border-neutral-700 dark:text-neutral-400",children:"Was soll importiert werden?"}),c&&e.jsx("p",{className:"px-4 pt-3 text-sm text-amber-600 dark:text-amber-400",children:c}),e.jsxs("div",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[p.map(t=>e.jsxs("label",{className:"flex cursor-pointer items-start gap-3 px-4 py-3 hover:bg-neutral-50 dark:hover:bg-neutral-800/50",children:[e.jsx("input",{type:"checkbox",checked:o.has(t.key),onChange:()=>A(t.key),className:"mt-0.5 h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),e.jsxs("span",{className:"flex-1",children:[e.jsx("span",{className:"block text-sm font-medium text-neutral-800 dark:text-neutral-100",children:t.label}),e.jsx("span",{className:"block text-xs text-neutral-500 dark:text-neutral-400",children:i?L(i,t.tables):t.hint})]})]},t.key)),e.jsxs("label",{className:"flex cursor-pointer items-start gap-3 px-4 py-3 hover:bg-neutral-50 dark:hover:bg-neutral-800/50",children:[e.jsx("input",{type:"checkbox",checked:m,onChange:t=>g(t.target.checked),className:"mt-0.5 h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),e.jsxs("span",{className:"flex-1",children:[e.jsx("span",{className:"block text-sm font-medium text-neutral-800 dark:text-neutral-100",children:"Benutzerkonten"}),e.jsx("span",{className:"block text-xs text-neutral-500 dark:text-neutral-400",children:'Nur wenn die Datei mit "Benutzerkonten mit exportieren" erstellt wurde. Ersetzt auch dein eigenes Konto – danach ggf. mit den Zugangsdaten aus der Export-Datei neu einloggen.'})]})]})]})]}),e.jsxs("label",{className:"flex items-start gap-2 text-sm text-neutral-700 dark:text-neutral-300",children:[e.jsx("input",{type:"checkbox",checked:h,onChange:t=>_(t.target.checked),className:"mt-0.5 h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),"Mir ist bewusst, dass dies"," ",k.length?e.jsx("strong",{children:k.join(", ")}):"die ausgewählten Bereiche"," auf diesem Server unwiderruflich ersetzt."]}),e.jsx("button",{type:"submit",disabled:!l||!h||S||o.size===0,className:"rounded-md bg-red-600 px-4 py-2 text-sm font-semibold text-white hover:bg-red-700 disabled:opacity-50",children:S?"Importiere…":"Importieren"})]}),z&&e.jsx("p",{className:"mt-3 text-sm text-red-600",children:z}),u&&e.jsxs("div",{className:"mt-3 rounded-md bg-green-50 p-3 text-sm text-green-800 dark:bg-green-900/20 dark:text-green-300",children:[e.jsx("p",{className:"mb-1 font-semibold",children:"Import erfolgreich:"}),e.jsxs("ul",{className:"list-disc pl-5",children:[Object.entries(u.counts).map(([t,r])=>e.jsxs("li",{children:[r," ",v[t]||t]},t)),u.images_restored>0&&e.jsxs("li",{children:[u.images_restored," Bilder wiederhergestellt"]})]})]})]})]})}export{C as default}; diff --git a/hifi/assets/Faqs-CDIDxeRo.js b/hifi/assets/Faqs-YTy7XkGr.js similarity index 98% rename from hifi/assets/Faqs-CDIDxeRo.js rename to hifi/assets/Faqs-YTy7XkGr.js index e959dd0..0af227b 100644 --- a/hifi/assets/Faqs-CDIDxeRo.js +++ b/hifi/assets/Faqs-YTy7XkGr.js @@ -1 +1 @@ -import{r as n,j as e,a as l}from"./index-QV-Szw5n.js";const b={question_de:"",answer_de:"",question_en:"",answer_en:"",sort_order:0};function w(){const[i,h]=n.useState([]),[r,a]=n.useState(b),[s,u]=n.useState(null),[o,c]=n.useState(""),d=()=>l.get("/faqs").then(h);n.useEffect(d,[]);const g=t=>{u(t.id),a({question_de:t.question_de,answer_de:t.answer_de,question_en:t.question_en,answer_en:t.answer_en,sort_order:t.sort_order})},x=()=>{u(null),a(b)},p=async t=>{t.preventDefault(),c("");const m={...r,sort_order:Number(r.sort_order)};try{s?await l.put(`/faqs/${s}`,m):await l.post("/faqs",m),x(),d()}catch(k){c(k.message)}},j=async t=>{confirm("Diese Frage wirklich löschen?")&&(await l.delete(`/faqs/${t}`),d())};return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Häufig gestellte Fragen"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Diese Fragen erscheinen im FAQ-Bereich der Startseite, jeweils in der aktuell gewählten Sprache. Die 6 mitgelieferten Einträge sind die Standard-Einstellung – du kannst sie bearbeiten, löschen und beliebig neue hinzufügen."}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2",children:"Frage (DE)"}),e.jsx("th",{className:"px-4 py-2",children:"Sortierung"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),e.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[i.map(t=>e.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[e.jsx("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:t.question_de}),e.jsx("td",{className:"px-4 py-2",children:t.sort_order}),e.jsxs("td",{className:"px-4 py-2 text-right",children:[e.jsx("button",{onClick:()=>g(t),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),e.jsx("button",{onClick:()=>j(t.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},t.id)),i.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:3,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Fragen angelegt."})})]})]})})]}),e.jsxs("form",{onSubmit:p,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:s?"Frage bearbeiten":"Neue Frage"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Frage (Deutsch) *"}),e.jsx("input",{required:!0,value:r.question_de,onChange:t=>a({...r,question_de:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Antwort (Deutsch) *"}),e.jsx("textarea",{required:!0,rows:3,value:r.answer_de,onChange:t=>a({...r,answer_de:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Frage (Englisch) *"}),e.jsx("input",{required:!0,value:r.question_en,onChange:t=>a({...r,question_en:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Antwort (Englisch) *"}),e.jsx("textarea",{required:!0,rows:3,value:r.answer_en,onChange:t=>a({...r,answer_en:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),e.jsx("input",{type:"number",value:r.sort_order,onChange:t=>a({...r,sort_order:Number(t.target.value)}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),o&&e.jsx("p",{className:"text-sm text-red-600",children:o}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:s?"Speichern":"Anlegen"}),s&&e.jsx("button",{type:"button",onClick:x,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}export{w as default}; +import{r as n,j as e,a as l}from"./index-D7JbPKAF.js";const b={question_de:"",answer_de:"",question_en:"",answer_en:"",sort_order:0};function w(){const[i,h]=n.useState([]),[r,a]=n.useState(b),[s,u]=n.useState(null),[o,c]=n.useState(""),d=()=>l.get("/faqs").then(h);n.useEffect(d,[]);const g=t=>{u(t.id),a({question_de:t.question_de,answer_de:t.answer_de,question_en:t.question_en,answer_en:t.answer_en,sort_order:t.sort_order})},x=()=>{u(null),a(b)},p=async t=>{t.preventDefault(),c("");const m={...r,sort_order:Number(r.sort_order)};try{s?await l.put(`/faqs/${s}`,m):await l.post("/faqs",m),x(),d()}catch(k){c(k.message)}},j=async t=>{confirm("Diese Frage wirklich löschen?")&&(await l.delete(`/faqs/${t}`),d())};return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Häufig gestellte Fragen"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Diese Fragen erscheinen im FAQ-Bereich der Startseite, jeweils in der aktuell gewählten Sprache. Die 6 mitgelieferten Einträge sind die Standard-Einstellung – du kannst sie bearbeiten, löschen und beliebig neue hinzufügen."}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2",children:"Frage (DE)"}),e.jsx("th",{className:"px-4 py-2",children:"Sortierung"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),e.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[i.map(t=>e.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[e.jsx("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:t.question_de}),e.jsx("td",{className:"px-4 py-2",children:t.sort_order}),e.jsxs("td",{className:"px-4 py-2 text-right",children:[e.jsx("button",{onClick:()=>g(t),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),e.jsx("button",{onClick:()=>j(t.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},t.id)),i.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:3,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Fragen angelegt."})})]})]})})]}),e.jsxs("form",{onSubmit:p,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:s?"Frage bearbeiten":"Neue Frage"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Frage (Deutsch) *"}),e.jsx("input",{required:!0,value:r.question_de,onChange:t=>a({...r,question_de:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Antwort (Deutsch) *"}),e.jsx("textarea",{required:!0,rows:3,value:r.answer_de,onChange:t=>a({...r,answer_de:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Frage (Englisch) *"}),e.jsx("input",{required:!0,value:r.question_en,onChange:t=>a({...r,question_en:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Antwort (Englisch) *"}),e.jsx("textarea",{required:!0,rows:3,value:r.answer_en,onChange:t=>a({...r,answer_en:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),e.jsx("input",{type:"number",value:r.sort_order,onChange:t=>a({...r,sort_order:Number(t.target.value)}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),o&&e.jsx("p",{className:"text-sm text-red-600",children:o}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:s?"Speichern":"Anlegen"}),s&&e.jsx("button",{type:"button",onClick:x,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}export{w as default}; diff --git a/hifi/assets/GalleryBrands-CeGo7QXi.js b/hifi/assets/GalleryBrands-CmjBzT9Y.js similarity index 96% rename from hifi/assets/GalleryBrands-CeGo7QXi.js rename to hifi/assets/GalleryBrands-CmjBzT9Y.js index 42f62d0..a2fc47c 100644 --- a/hifi/assets/GalleryBrands-CeGo7QXi.js +++ b/hifi/assets/GalleryBrands-CmjBzT9Y.js @@ -1 +1 @@ -import{r as l,j as e,L as N,a as n}from"./index-QV-Szw5n.js";import{I as k}from"./ImageUploadField-DyLcJG5-.js";const u={name:"",cover_image_path:"",sort_order:0};function f(){const[i,h]=l.useState([]),[r,a]=l.useState(u),[s,o]=l.useState(null),[c,m]=l.useState(""),d=()=>n.get("/gallery-brands").then(h);l.useEffect(()=>{d()},[]);const p=t=>{o(t.id),a({name:t.name,cover_image_path:t.cover_image_path||"",sort_order:t.sort_order})},x=()=>{o(null),a(u)},b=async t=>{t.preventDefault(),m("");try{s?await n.put(`/gallery-brands/${s}`,r):await n.post("/gallery-brands",r),x(),d()}catch(j){m(j.message)}},g=async t=>{confirm("Marke inkl. aller Projekte/Fotos wirklich löschen?")&&(await n.delete(`/gallery-brands/${t}`),d())};return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("h1",{className:"mb-4 text-xl font-bold text-neutral-900 dark:text-white",children:"Galerie-Marken"}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2",children:"Bild"}),e.jsx("th",{className:"px-4 py-2",children:"Name"}),e.jsx("th",{className:"px-4 py-2",children:"Sortierung"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),e.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[i.map(t=>e.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[e.jsx("td",{className:"px-4 py-2",children:t.cover_image_path?e.jsx("img",{src:t.cover_image_path,alt:"",className:"h-10 w-10 rounded-md object-cover"}):e.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-md bg-neutral-100 text-xs text-neutral-400 dark:bg-neutral-800",children:"–"})}),e.jsx("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:e.jsx(N,{to:`/galerie/${t.slug}`,target:"_blank",className:"hover:text-brand-500",children:t.name})}),e.jsx("td",{className:"px-4 py-2",children:t.sort_order}),e.jsxs("td",{className:"px-4 py-2 text-right",children:[e.jsx("button",{onClick:()=>p(t),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),e.jsx("button",{onClick:()=>g(t.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},t.id)),i.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Galerie-Marken angelegt."})})]})]})})]}),e.jsxs("form",{onSubmit:b,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:s?"Marke bearbeiten":"Neue Marke"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Name *"}),e.jsx("input",{required:!0,value:r.name,onChange:t=>a({...r,name:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsx(k,{value:r.cover_image_path,onChange:t=>a({...r,cover_image_path:t}),aspect:4/3,label:"Titelbild (optional)"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),e.jsx("input",{type:"number",value:r.sort_order,onChange:t=>a({...r,sort_order:Number(t.target.value)}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),c&&e.jsx("p",{className:"text-sm text-red-600",children:c}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:s?"Speichern":"Anlegen"}),s&&e.jsx("button",{type:"button",onClick:x,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}export{f as default}; +import{r as l,j as e,L as N,a as n}from"./index-D7JbPKAF.js";import{I as k}from"./ImageUploadField-Dz5jsGY3.js";const u={name:"",cover_image_path:"",sort_order:0};function f(){const[i,h]=l.useState([]),[r,a]=l.useState(u),[s,o]=l.useState(null),[c,m]=l.useState(""),d=()=>n.get("/gallery-brands").then(h);l.useEffect(()=>{d()},[]);const p=t=>{o(t.id),a({name:t.name,cover_image_path:t.cover_image_path||"",sort_order:t.sort_order})},x=()=>{o(null),a(u)},b=async t=>{t.preventDefault(),m("");try{s?await n.put(`/gallery-brands/${s}`,r):await n.post("/gallery-brands",r),x(),d()}catch(j){m(j.message)}},g=async t=>{confirm("Marke inkl. aller Projekte/Fotos wirklich löschen?")&&(await n.delete(`/gallery-brands/${t}`),d())};return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("h1",{className:"mb-4 text-xl font-bold text-neutral-900 dark:text-white",children:"Galerie-Marken"}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2",children:"Bild"}),e.jsx("th",{className:"px-4 py-2",children:"Name"}),e.jsx("th",{className:"px-4 py-2",children:"Sortierung"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),e.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[i.map(t=>e.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[e.jsx("td",{className:"px-4 py-2",children:t.cover_image_path?e.jsx("img",{src:t.cover_image_path,alt:"",className:"h-10 w-10 rounded-md object-cover"}):e.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-md bg-neutral-100 text-xs text-neutral-400 dark:bg-neutral-800",children:"–"})}),e.jsx("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:e.jsx(N,{to:`/galerie/${t.slug}`,target:"_blank",className:"hover:text-brand-500",children:t.name})}),e.jsx("td",{className:"px-4 py-2",children:t.sort_order}),e.jsxs("td",{className:"px-4 py-2 text-right",children:[e.jsx("button",{onClick:()=>p(t),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),e.jsx("button",{onClick:()=>g(t.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},t.id)),i.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Galerie-Marken angelegt."})})]})]})})]}),e.jsxs("form",{onSubmit:b,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:s?"Marke bearbeiten":"Neue Marke"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Name *"}),e.jsx("input",{required:!0,value:r.name,onChange:t=>a({...r,name:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsx(k,{value:r.cover_image_path,onChange:t=>a({...r,cover_image_path:t}),aspect:4/3,label:"Titelbild (optional)"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),e.jsx("input",{type:"number",value:r.sort_order,onChange:t=>a({...r,sort_order:Number(t.target.value)}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),c&&e.jsx("p",{className:"text-sm text-red-600",children:c}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:s?"Speichern":"Anlegen"}),s&&e.jsx("button",{type:"button",onClick:x,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}export{f as default}; diff --git a/hifi/assets/GalleryPhotos-NPKQDZMi.js b/hifi/assets/GalleryPhotos-D63_2-5i.js similarity index 97% rename from hifi/assets/GalleryPhotos-NPKQDZMi.js rename to hifi/assets/GalleryPhotos-D63_2-5i.js index c0beeb8..2fa51d8 100644 --- a/hifi/assets/GalleryPhotos-NPKQDZMi.js +++ b/hifi/assets/GalleryPhotos-D63_2-5i.js @@ -1 +1 @@ -import{e as w,r as l,j as t,L as P,a as n}from"./index-QV-Szw5n.js";function C(){const{projectId:d}=w(),[i,c]=l.useState([]),[m,h]=l.useState(""),[x,g]=l.useState(!1),[f,p]=l.useState(""),u=l.useRef(null),o=()=>n.get(`/gallery-projects/${d}/photos`).then(c);l.useEffect(()=>{o()},[d]);const j=async e=>{const r=Array.from(e.target.files||[]);if(r.length!==0){h(""),g(!0);try{for(let a=0;a{c(a=>a.map(s=>s.id===e.id?{...s,caption:r}:s))},k=(e,r)=>{c(a=>a.map(s=>s.id===e.id?{...s,sort_order:r}:s))},b=async e=>{await n.put(`/gallery-photos/${e.id}`,{caption:e.caption,sort_order:e.sort_order}),o()},y=async e=>{confirm("Foto wirklich entfernen?")&&(await n.delete(`/gallery-photos/${e}`),o())};return t.jsxs("div",{children:[t.jsx("p",{className:"mb-2 text-sm",children:t.jsx(P,{to:"/admin/gallery-projects",className:"text-brand-600 hover:underline",children:"← Zurück zu den Projekten"})}),t.jsx("h1",{className:"mb-4 text-xl font-bold text-neutral-900 dark:text-white",children:"Fotos im Projekt"}),t.jsxs("div",{className:"mb-6 rounded-xl border border-neutral-200 bg-white p-4 dark:border-neutral-800 dark:bg-neutral-900",children:[t.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Fotos hinzufügen (Mehrfachauswahl möglich)"}),t.jsx("input",{ref:u,type:"file",multiple:!0,accept:"image/png,image/jpeg,image/webp",onChange:j,disabled:x,className:"text-sm"}),x&&t.jsx("p",{className:"mt-2 text-sm text-neutral-500",children:f})]}),m&&t.jsx("p",{className:"mb-4 text-sm text-red-600",children:m}),t.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4",children:[i.map(e=>t.jsxs("div",{className:"overflow-hidden rounded-xl border border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-900",children:[t.jsx("img",{src:e.image_path,alt:e.caption||"",className:"aspect-square w-full object-cover"}),t.jsxs("div",{className:"space-y-2 p-3",children:[t.jsx("input",{value:e.caption||"",onChange:r=>N(e,r.target.value),onBlur:()=>b(e),placeholder:"Bildunterschrift (optional)",className:"w-full rounded-md border border-neutral-300 bg-white px-2 py-1 text-xs dark:border-neutral-700 dark:bg-neutral-900"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("input",{type:"number",value:e.sort_order,onChange:r=>k(e,Number(r.target.value)),onBlur:()=>b(e),className:"w-16 rounded-md border border-neutral-300 bg-white px-2 py-1 text-xs dark:border-neutral-700 dark:bg-neutral-900"}),t.jsx("button",{onClick:()=>y(e.id),className:"text-xs text-red-600 hover:underline",children:"Entfernen"})]})]})]},e.id)),i.length===0&&t.jsx("p",{className:"col-span-full py-6 text-center text-neutral-400",children:"Noch keine Fotos in diesem Projekt."})]})]})}export{C as default}; +import{e as w,r as l,j as t,L as P,a as n}from"./index-D7JbPKAF.js";function C(){const{projectId:d}=w(),[i,c]=l.useState([]),[m,h]=l.useState(""),[x,g]=l.useState(!1),[f,p]=l.useState(""),u=l.useRef(null),o=()=>n.get(`/gallery-projects/${d}/photos`).then(c);l.useEffect(()=>{o()},[d]);const j=async e=>{const r=Array.from(e.target.files||[]);if(r.length!==0){h(""),g(!0);try{for(let a=0;a{c(a=>a.map(s=>s.id===e.id?{...s,caption:r}:s))},k=(e,r)=>{c(a=>a.map(s=>s.id===e.id?{...s,sort_order:r}:s))},b=async e=>{await n.put(`/gallery-photos/${e.id}`,{caption:e.caption,sort_order:e.sort_order}),o()},y=async e=>{confirm("Foto wirklich entfernen?")&&(await n.delete(`/gallery-photos/${e}`),o())};return t.jsxs("div",{children:[t.jsx("p",{className:"mb-2 text-sm",children:t.jsx(P,{to:"/admin/gallery-projects",className:"text-brand-600 hover:underline",children:"← Zurück zu den Projekten"})}),t.jsx("h1",{className:"mb-4 text-xl font-bold text-neutral-900 dark:text-white",children:"Fotos im Projekt"}),t.jsxs("div",{className:"mb-6 rounded-xl border border-neutral-200 bg-white p-4 dark:border-neutral-800 dark:bg-neutral-900",children:[t.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Fotos hinzufügen (Mehrfachauswahl möglich)"}),t.jsx("input",{ref:u,type:"file",multiple:!0,accept:"image/png,image/jpeg,image/webp",onChange:j,disabled:x,className:"text-sm"}),x&&t.jsx("p",{className:"mt-2 text-sm text-neutral-500",children:f})]}),m&&t.jsx("p",{className:"mb-4 text-sm text-red-600",children:m}),t.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4",children:[i.map(e=>t.jsxs("div",{className:"overflow-hidden rounded-xl border border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-900",children:[t.jsx("img",{src:e.image_path,alt:e.caption||"",className:"aspect-square w-full object-cover"}),t.jsxs("div",{className:"space-y-2 p-3",children:[t.jsx("input",{value:e.caption||"",onChange:r=>N(e,r.target.value),onBlur:()=>b(e),placeholder:"Bildunterschrift (optional)",className:"w-full rounded-md border border-neutral-300 bg-white px-2 py-1 text-xs dark:border-neutral-700 dark:bg-neutral-900"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("input",{type:"number",value:e.sort_order,onChange:r=>k(e,Number(r.target.value)),onBlur:()=>b(e),className:"w-16 rounded-md border border-neutral-300 bg-white px-2 py-1 text-xs dark:border-neutral-700 dark:bg-neutral-900"}),t.jsx("button",{onClick:()=>y(e.id),className:"text-xs text-red-600 hover:underline",children:"Entfernen"})]})]})]},e.id)),i.length===0&&t.jsx("p",{className:"col-span-full py-6 text-center text-neutral-400",children:"Noch keine Fotos in diesem Projekt."})]})]})}export{C as default}; diff --git a/hifi/assets/GalleryProjects-CfB-fA4x.js b/hifi/assets/GalleryProjects-DyPMRVIE.js similarity index 97% rename from hifi/assets/GalleryProjects-CfB-fA4x.js rename to hifi/assets/GalleryProjects-DyPMRVIE.js index e7066a6..6f40897 100644 --- a/hifi/assets/GalleryProjects-CfB-fA4x.js +++ b/hifi/assets/GalleryProjects-DyPMRVIE.js @@ -1 +1 @@ -import{r as a,j as e,L as w,a as i}from"./index-QV-Szw5n.js";import{I as S}from"./ImageUploadField-DyLcJG5-.js";const j={name:"",gallery_brand_id:"",cover_image_path:"",sort_order:0};function F(){const[n,k]=a.useState([]),[m,N]=a.useState([]),[t,l]=a.useState(j),[s,u]=a.useState(null),[x,h]=a.useState(""),[d,b]=a.useState("all"),o=a.useMemo(()=>d==="all"?n:n.filter(r=>String(r.gallery_brand_id)===d),[n,d]),c=()=>{i.get("/gallery-projects").then(k),i.get("/gallery-brands").then(N)};a.useEffect(c,[]);const y=r=>{u(r.id),l({name:r.name,gallery_brand_id:r.gallery_brand_id,cover_image_path:r.cover_image_path||"",sort_order:r.sort_order})},g=()=>{u(null),l(j)},v=async r=>{r.preventDefault(),h("");const p={...t,gallery_brand_id:Number(t.gallery_brand_id)};try{s?await i.put(`/gallery-projects/${s}`,p):await i.post("/gallery-projects",p),g(),c()}catch(_){h(_.message)}},f=async r=>{confirm("Projekt inkl. aller Fotos wirklich löschen?")&&(await i.delete(`/gallery-projects/${r}`),c())};return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("h1",{className:"mb-4 text-xl font-bold text-neutral-900 dark:text-white",children:"Galerie-Projekte"}),e.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-neutral-600 dark:text-neutral-300",children:"Nach Marke filtern:"}),e.jsxs("select",{value:d,onChange:r=>b(r.target.value),className:"rounded-md border border-neutral-300 bg-white px-3 py-1.5 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:[e.jsx("option",{value:"all",children:"Alle Marken"}),m.map(r=>e.jsx("option",{value:String(r.id),children:r.name},r.id))]}),d!=="all"&&e.jsx("button",{onClick:()=>b("all"),className:"text-sm text-brand-600 hover:underline",children:"Filter zurücksetzen"}),e.jsxs("span",{className:"text-sm text-neutral-400",children:[o.length," von ",n.length]})]}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2",children:"Marke"}),e.jsx("th",{className:"px-4 py-2",children:"Projekt"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),e.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[o.map(r=>e.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[e.jsx("td",{className:"px-4 py-2",children:r.brand_name}),e.jsx("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:r.name}),e.jsxs("td",{className:"px-4 py-2 text-right",children:[e.jsx(w,{to:`/admin/gallery-projects/${r.id}/photos`,className:"mr-3 text-brand-600 hover:underline",children:"Fotos"}),e.jsx("button",{onClick:()=>y(r),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),e.jsx("button",{onClick:()=>f(r.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},r.id)),o.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:3,className:"px-4 py-6 text-center text-neutral-400",children:n.length===0?"Noch keine Projekte angelegt.":"Keine Projekte für diese Marke."})})]})]})})]}),e.jsxs("form",{onSubmit:v,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:s?"Projekt bearbeiten":"Neues Projekt"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Marke *"}),e.jsxs("select",{required:!0,value:t.gallery_brand_id,onChange:r=>l({...t,gallery_brand_id:r.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:[e.jsx("option",{value:"",children:"Bitte wählen…"}),m.map(r=>e.jsx("option",{value:r.id,children:r.name},r.id))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Projektname *"}),e.jsx("input",{required:!0,placeholder:"z. B. Audi TT",value:t.name,onChange:r=>l({...t,name:r.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsx(S,{value:t.cover_image_path,onChange:r=>l({...t,cover_image_path:r}),aspect:4/3,label:"Titelbild (optional)"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),e.jsx("input",{type:"number",value:t.sort_order,onChange:r=>l({...t,sort_order:Number(r.target.value)}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),x&&e.jsx("p",{className:"text-sm text-red-600",children:x}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:s?"Speichern":"Anlegen"}),s&&e.jsx("button",{type:"button",onClick:g,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}export{F as default}; +import{r as a,j as e,L as w,a as i}from"./index-D7JbPKAF.js";import{I as S}from"./ImageUploadField-Dz5jsGY3.js";const j={name:"",gallery_brand_id:"",cover_image_path:"",sort_order:0};function F(){const[n,k]=a.useState([]),[m,N]=a.useState([]),[t,l]=a.useState(j),[s,u]=a.useState(null),[x,h]=a.useState(""),[d,b]=a.useState("all"),o=a.useMemo(()=>d==="all"?n:n.filter(r=>String(r.gallery_brand_id)===d),[n,d]),c=()=>{i.get("/gallery-projects").then(k),i.get("/gallery-brands").then(N)};a.useEffect(c,[]);const y=r=>{u(r.id),l({name:r.name,gallery_brand_id:r.gallery_brand_id,cover_image_path:r.cover_image_path||"",sort_order:r.sort_order})},g=()=>{u(null),l(j)},v=async r=>{r.preventDefault(),h("");const p={...t,gallery_brand_id:Number(t.gallery_brand_id)};try{s?await i.put(`/gallery-projects/${s}`,p):await i.post("/gallery-projects",p),g(),c()}catch(_){h(_.message)}},f=async r=>{confirm("Projekt inkl. aller Fotos wirklich löschen?")&&(await i.delete(`/gallery-projects/${r}`),c())};return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("h1",{className:"mb-4 text-xl font-bold text-neutral-900 dark:text-white",children:"Galerie-Projekte"}),e.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-neutral-600 dark:text-neutral-300",children:"Nach Marke filtern:"}),e.jsxs("select",{value:d,onChange:r=>b(r.target.value),className:"rounded-md border border-neutral-300 bg-white px-3 py-1.5 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:[e.jsx("option",{value:"all",children:"Alle Marken"}),m.map(r=>e.jsx("option",{value:String(r.id),children:r.name},r.id))]}),d!=="all"&&e.jsx("button",{onClick:()=>b("all"),className:"text-sm text-brand-600 hover:underline",children:"Filter zurücksetzen"}),e.jsxs("span",{className:"text-sm text-neutral-400",children:[o.length," von ",n.length]})]}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2",children:"Marke"}),e.jsx("th",{className:"px-4 py-2",children:"Projekt"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),e.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[o.map(r=>e.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[e.jsx("td",{className:"px-4 py-2",children:r.brand_name}),e.jsx("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:r.name}),e.jsxs("td",{className:"px-4 py-2 text-right",children:[e.jsx(w,{to:`/admin/gallery-projects/${r.id}/photos`,className:"mr-3 text-brand-600 hover:underline",children:"Fotos"}),e.jsx("button",{onClick:()=>y(r),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),e.jsx("button",{onClick:()=>f(r.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},r.id)),o.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:3,className:"px-4 py-6 text-center text-neutral-400",children:n.length===0?"Noch keine Projekte angelegt.":"Keine Projekte für diese Marke."})})]})]})})]}),e.jsxs("form",{onSubmit:v,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:s?"Projekt bearbeiten":"Neues Projekt"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Marke *"}),e.jsxs("select",{required:!0,value:t.gallery_brand_id,onChange:r=>l({...t,gallery_brand_id:r.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:[e.jsx("option",{value:"",children:"Bitte wählen…"}),m.map(r=>e.jsx("option",{value:r.id,children:r.name},r.id))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Projektname *"}),e.jsx("input",{required:!0,placeholder:"z. B. Audi TT",value:t.name,onChange:r=>l({...t,name:r.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsx(S,{value:t.cover_image_path,onChange:r=>l({...t,cover_image_path:r}),aspect:4/3,label:"Titelbild (optional)"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),e.jsx("input",{type:"number",value:t.sort_order,onChange:r=>l({...t,sort_order:Number(r.target.value)}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),x&&e.jsx("p",{className:"text-sm text-red-600",children:x}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:s?"Speichern":"Anlegen"}),s&&e.jsx("button",{type:"button",onClick:g,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}export{F as default}; diff --git a/hifi/assets/HomeSections-BzNKNMho.js b/hifi/assets/HomeSections-DhyhYK-h.js similarity index 98% rename from hifi/assets/HomeSections-BzNKNMho.js rename to hifi/assets/HomeSections-DhyhYK-h.js index 2a6ba3d..ab57183 100644 --- a/hifi/assets/HomeSections-BzNKNMho.js +++ b/hifi/assets/HomeSections-DhyhYK-h.js @@ -1 +1 @@ -import{n as H,r as d,a as g,j as e,o as R}from"./index-QV-Szw5n.js";import{R as Z}from"./RichTextEditor-DJwdsoJ6.js";import{T as p}from"./TextStyleWidget-Czb7ujSZ.js";const T=[{slug:"hero",label:"Hero (ganz oben)"},{slug:"youtube",label:"YouTube-Sektion"},{slug:"craft",label:"Handwerk"},{slug:"advice",label:"Beratung"},{slug:"insights",label:"Einblicke (Bildergalerie-Intro)"},{slug:"more",label:"Mehr als Car-Hifi"}],z=["hero","youtube"],K=[{value:"left",label:"Links"},{value:"center",label:"Mittig"},{value:"right",label:"Rechts"}],G={left:"text-left",center:"text-center",right:"text-right"};function U(b){const u=document.createElement("div");return u.innerHTML=b||"",u.textContent||""}function Y(){var C;const b=H(),[u,m]=d.useState(null),[n,$]=d.useState("hero"),[a,B]=d.useState("de"),[v,f]=d.useState(!1),[k,h]=d.useState(""),[E,c]=d.useState(!1),[j,M]=d.useState(""),y=d.useRef(null),[_,w]=d.useState(!1);if(d.useEffect(()=>{g.get("/home-sections").then(m),g.get("/site-settings").then(t=>M(t.hero_image_path||""))},[]),!u)return e.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"});const r=u[n],P=z.includes(n),o=(t,s)=>{m(l=>({...l,[n]:{...l[n],[t]:s}})),c(!1)},i=(t,s)=>{m(l=>({...l,[n]:{...l[n],text_align_x:t,text_align_y:s}})),c(!1)},N=(t,s)=>{const l=y.current.getBoundingClientRect();return{x:Math.max(0,Math.min(100,Math.round((t-l.left)/l.width*100))),y:Math.max(0,Math.min(100,Math.round((s-l.top)/l.height*100)))}},I=t=>{t.preventDefault(),t.currentTarget.setPointerCapture(t.pointerId),w(!0);const{x:s,y:l}=N(t.clientX,t.clientY);i(s,l)},L=t=>{if(!_)return;const{x:s,y:l}=N(t.clientX,t.clientY);i(s,l)},O=t=>{w(!1),t.currentTarget.releasePointerCapture(t.pointerId)},D=async()=>{f(!0),h(""),c(!1);try{await g.put(`/home-sections/${n}`,r),c(!0)}catch(t){h(t.message)}finally{f(!1)}},x=r[`eyebrow_${a}`]||"",S=r[`title_${a}`]||((C=T.find(t=>t.slug===n))==null?void 0:C.label)||"",A=U(r[`body_html_${a}`]);return e.jsxs("div",{className:"max-w-3xl space-y-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Startseite"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Text, Position/Ausrichtung und (falls vorhanden) Button-Ziel der wichtigsten Textabschnitte auf der Startseite. Bilder, Statistik-Kacheln, Marken-Streifen, Bewertungen und FAQ werden an anderer Stelle verwaltet."})]}),e.jsxs("div",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("div",{className:"mb-4 flex flex-wrap gap-2",children:T.map(t=>e.jsx("button",{type:"button",onClick:()=>{$(t.slug),c(!1),h("")},className:`rounded-md px-3 py-1.5 text-sm font-medium transition ${n===t.slug?"bg-brand-500 text-white":"border border-neutral-300 text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800"}`,children:t.label},t.slug))}),e.jsx("div",{className:"mb-4 flex gap-1 border-b border-neutral-200 pb-4 dark:border-neutral-800",children:[["de","Deutsch"],["en","English"]].map(([t,s])=>e.jsx("button",{type:"button",onClick:()=>B(t),className:`rounded-md px-3 py-1 text-sm font-medium transition ${a===t?"bg-neutral-800 text-white dark:bg-neutral-100 dark:text-neutral-900":"text-neutral-500 hover:bg-neutral-100 dark:text-neutral-400 dark:hover:bg-neutral-800"}`,children:s},t))}),P?e.jsxs("div",{className:"mb-5 grid gap-4 border-b border-neutral-200 pb-5 dark:border-neutral-800 sm:grid-cols-[16rem_1fr] sm:items-start",children:[e.jsxs("div",{children:[e.jsxs("div",{ref:y,className:"relative aspect-video select-none overflow-hidden rounded-xl bg-neutral-900 shadow-sm",children:[n==="hero"&&j?e.jsx("img",{src:j,alt:"",draggable:!1,className:"h-full w-full object-cover"}):e.jsx("div",{className:"flex h-full w-full items-center justify-center bg-gradient-to-br from-neutral-700 to-neutral-900 text-xs uppercase tracking-wide text-neutral-500",children:n==="youtube"?"Video-Hintergrund":"Hero-Bild"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/70 via-black/20 to-black/40"}),e.jsxs("div",{onPointerDown:I,onPointerMove:L,onPointerUp:O,style:{...R(r.text_align_x,r.text_align_y,{x:50,y:50}),touchAction:"none"},className:`absolute max-w-[85%] select-none whitespace-nowrap rounded p-2 text-center transition-colors ${_?"cursor-grabbing bg-white/10 ring-2 ring-brand-400":"cursor-grab hover:bg-white/10"}`,children:[x&&e.jsx("p",{className:"truncate text-[10px] font-semibold uppercase tracking-wide text-brand-300",children:x}),e.jsx("p",{className:"truncate text-sm font-extrabold text-white",children:S})]})]}),e.jsx("p",{className:"mt-1.5 text-center text-xs text-neutral-400",children:"Zum Verschieben ziehen"})]}),e.jsxs("div",{className:"flex flex-col gap-3 sm:pt-1",children:[e.jsxs("p",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:["Position:"," ",e.jsxs("span",{className:"font-mono font-semibold text-neutral-700 dark:text-neutral-200",children:[r.text_align_x,"% / ",r.text_align_y,"%"]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1.5 text-xs font-medium uppercase tracking-wide text-neutral-400",children:"Schnellauswahl waagerecht"}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("button",{type:"button",onClick:()=>i(0,r.text_align_y),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Links"}),e.jsx("button",{type:"button",onClick:()=>i(50,r.text_align_y),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Mittig"}),e.jsx("button",{type:"button",onClick:()=>i(100,r.text_align_y),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Rechts"})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1.5 text-xs font-medium uppercase tracking-wide text-neutral-400",children:"Schnellauswahl senkrecht"}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("button",{type:"button",onClick:()=>i(r.text_align_x,0),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Oben"}),e.jsx("button",{type:"button",onClick:()=>i(r.text_align_x,50),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Mittig"}),e.jsx("button",{type:"button",onClick:()=>i(r.text_align_x,100),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Unten"})]})]})]})]}):e.jsxs("div",{className:"mb-5 grid gap-4 border-b border-neutral-200 pb-5 dark:border-neutral-800 sm:grid-cols-[10rem_1fr] sm:items-center",children:[e.jsx("div",{className:"aspect-square rounded-xl bg-neutral-100 dark:bg-neutral-800","aria-hidden":!0}),e.jsxs("div",{children:[e.jsxs("div",{className:`rounded-lg border border-neutral-200 p-3 dark:border-neutral-700 ${G[r.text_align]||"text-left"}`,children:[x&&e.jsx("p",{className:"mb-1 text-xs font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",children:x}),e.jsx("p",{className:"mb-1 font-bold text-neutral-900 dark:text-white",children:S}),e.jsx("p",{className:"line-clamp-2 text-xs text-neutral-500 dark:text-neutral-400",children:A||"Text erscheint hier…"})]}),e.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:K.map(t=>e.jsx("button",{type:"button",onClick:()=>o("text_align",t.value),className:`rounded-md border px-3 py-1.5 text-sm font-medium transition ${r.text_align===t.value?"border-brand-500 bg-brand-500 text-white":"border-neutral-300 text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800"}`,children:t.label},t.value))})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Kurzer Vorspann (optional)"}),e.jsx("input",{value:r[`eyebrow_${a}`]||"",onChange:t=>o(`eyebrow_${a}`,t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsx(p,{fieldKey:`home_sections.${n}.eyebrow`,previewText:r[`eyebrow_${a}`]||"Beispieltext"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Überschrift"}),e.jsx("input",{value:r[`title_${a}`]||"",onChange:t=>o(`title_${a}`,t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsx(p,{fieldKey:`home_sections.${n}.title`,previewText:r[`title_${a}`]||"Beispieltext"})]}),e.jsx(Z,{label:"Text",value:r[`body_html_${a}`]||"",onChange:t=>o(`body_html_${a}`,t)}),e.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Button-Beschriftung (optional)"}),e.jsx("input",{value:r[`button_label_${a}`]||"",onChange:t=>o(`button_label_${a}`,t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsx(p,{fieldKey:`home_sections.${n}.button_label`,previewText:r[`button_label_${a}`]||"Beispieltext"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Button-Ziel (Link, für beide Sprachen gleich)"}),e.jsx("input",{value:r.button_url||"",onChange:t=>o("button_url",t.target.value),placeholder:"/leistungen oder https://…",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:'Ohne Beschriftung UND Ziel wird kein Button angezeigt. Mit "/" beginnende Ziele bleiben innerhalb der Seite, alles andere öffnet extern in einem neuen Tab.'})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Schriftart (für beide Sprachen gleich)"}),e.jsxs("select",{value:r.font_family||"",onChange:t=>o("font_family",t.target.value||null),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:[e.jsx("option",{value:"",children:"Standard (globale Schriftart)"}),b.filter(t=>t.value).map(t=>e.jsx("option",{value:t.value,children:t.label},t.label))]})]})]}),r.updated_at&&e.jsxs("p",{className:"mt-3 text-xs text-neutral-400",children:["Zuletzt geändert: ",new Date(r.updated_at.replace(" ","T")).toLocaleString("de-DE")]}),k&&e.jsx("p",{className:"mt-3 text-sm text-red-600",children:k}),E&&e.jsx("p",{className:"mt-3 text-sm text-green-600 dark:text-green-400",children:"Gespeichert."}),e.jsx("button",{type:"button",onClick:D,disabled:v,className:"mt-4 rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:v?"Speichere…":"Speichern"})]})]})}export{Y as default}; +import{n as H,r as d,a as g,j as e,o as R}from"./index-D7JbPKAF.js";import{R as Z}from"./RichTextEditor-DSo9zuZu.js";import{T as p}from"./TextStyleWidget-DvjoGL1J.js";const T=[{slug:"hero",label:"Hero (ganz oben)"},{slug:"youtube",label:"YouTube-Sektion"},{slug:"craft",label:"Handwerk"},{slug:"advice",label:"Beratung"},{slug:"insights",label:"Einblicke (Bildergalerie-Intro)"},{slug:"more",label:"Mehr als Car-Hifi"}],z=["hero","youtube"],K=[{value:"left",label:"Links"},{value:"center",label:"Mittig"},{value:"right",label:"Rechts"}],G={left:"text-left",center:"text-center",right:"text-right"};function U(b){const u=document.createElement("div");return u.innerHTML=b||"",u.textContent||""}function Y(){var C;const b=H(),[u,m]=d.useState(null),[n,$]=d.useState("hero"),[a,B]=d.useState("de"),[v,f]=d.useState(!1),[k,h]=d.useState(""),[E,c]=d.useState(!1),[j,M]=d.useState(""),y=d.useRef(null),[_,w]=d.useState(!1);if(d.useEffect(()=>{g.get("/home-sections").then(m),g.get("/site-settings").then(t=>M(t.hero_image_path||""))},[]),!u)return e.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"});const r=u[n],P=z.includes(n),o=(t,s)=>{m(l=>({...l,[n]:{...l[n],[t]:s}})),c(!1)},i=(t,s)=>{m(l=>({...l,[n]:{...l[n],text_align_x:t,text_align_y:s}})),c(!1)},N=(t,s)=>{const l=y.current.getBoundingClientRect();return{x:Math.max(0,Math.min(100,Math.round((t-l.left)/l.width*100))),y:Math.max(0,Math.min(100,Math.round((s-l.top)/l.height*100)))}},I=t=>{t.preventDefault(),t.currentTarget.setPointerCapture(t.pointerId),w(!0);const{x:s,y:l}=N(t.clientX,t.clientY);i(s,l)},L=t=>{if(!_)return;const{x:s,y:l}=N(t.clientX,t.clientY);i(s,l)},O=t=>{w(!1),t.currentTarget.releasePointerCapture(t.pointerId)},D=async()=>{f(!0),h(""),c(!1);try{await g.put(`/home-sections/${n}`,r),c(!0)}catch(t){h(t.message)}finally{f(!1)}},x=r[`eyebrow_${a}`]||"",S=r[`title_${a}`]||((C=T.find(t=>t.slug===n))==null?void 0:C.label)||"",A=U(r[`body_html_${a}`]);return e.jsxs("div",{className:"max-w-3xl space-y-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Startseite"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Text, Position/Ausrichtung und (falls vorhanden) Button-Ziel der wichtigsten Textabschnitte auf der Startseite. Bilder, Statistik-Kacheln, Marken-Streifen, Bewertungen und FAQ werden an anderer Stelle verwaltet."})]}),e.jsxs("div",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("div",{className:"mb-4 flex flex-wrap gap-2",children:T.map(t=>e.jsx("button",{type:"button",onClick:()=>{$(t.slug),c(!1),h("")},className:`rounded-md px-3 py-1.5 text-sm font-medium transition ${n===t.slug?"bg-brand-500 text-white":"border border-neutral-300 text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800"}`,children:t.label},t.slug))}),e.jsx("div",{className:"mb-4 flex gap-1 border-b border-neutral-200 pb-4 dark:border-neutral-800",children:[["de","Deutsch"],["en","English"]].map(([t,s])=>e.jsx("button",{type:"button",onClick:()=>B(t),className:`rounded-md px-3 py-1 text-sm font-medium transition ${a===t?"bg-neutral-800 text-white dark:bg-neutral-100 dark:text-neutral-900":"text-neutral-500 hover:bg-neutral-100 dark:text-neutral-400 dark:hover:bg-neutral-800"}`,children:s},t))}),P?e.jsxs("div",{className:"mb-5 grid gap-4 border-b border-neutral-200 pb-5 dark:border-neutral-800 sm:grid-cols-[16rem_1fr] sm:items-start",children:[e.jsxs("div",{children:[e.jsxs("div",{ref:y,className:"relative aspect-video select-none overflow-hidden rounded-xl bg-neutral-900 shadow-sm",children:[n==="hero"&&j?e.jsx("img",{src:j,alt:"",draggable:!1,className:"h-full w-full object-cover"}):e.jsx("div",{className:"flex h-full w-full items-center justify-center bg-gradient-to-br from-neutral-700 to-neutral-900 text-xs uppercase tracking-wide text-neutral-500",children:n==="youtube"?"Video-Hintergrund":"Hero-Bild"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/70 via-black/20 to-black/40"}),e.jsxs("div",{onPointerDown:I,onPointerMove:L,onPointerUp:O,style:{...R(r.text_align_x,r.text_align_y,{x:50,y:50}),touchAction:"none"},className:`absolute max-w-[85%] select-none whitespace-nowrap rounded p-2 text-center transition-colors ${_?"cursor-grabbing bg-white/10 ring-2 ring-brand-400":"cursor-grab hover:bg-white/10"}`,children:[x&&e.jsx("p",{className:"truncate text-[10px] font-semibold uppercase tracking-wide text-brand-300",children:x}),e.jsx("p",{className:"truncate text-sm font-extrabold text-white",children:S})]})]}),e.jsx("p",{className:"mt-1.5 text-center text-xs text-neutral-400",children:"Zum Verschieben ziehen"})]}),e.jsxs("div",{className:"flex flex-col gap-3 sm:pt-1",children:[e.jsxs("p",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:["Position:"," ",e.jsxs("span",{className:"font-mono font-semibold text-neutral-700 dark:text-neutral-200",children:[r.text_align_x,"% / ",r.text_align_y,"%"]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1.5 text-xs font-medium uppercase tracking-wide text-neutral-400",children:"Schnellauswahl waagerecht"}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("button",{type:"button",onClick:()=>i(0,r.text_align_y),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Links"}),e.jsx("button",{type:"button",onClick:()=>i(50,r.text_align_y),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Mittig"}),e.jsx("button",{type:"button",onClick:()=>i(100,r.text_align_y),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Rechts"})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1.5 text-xs font-medium uppercase tracking-wide text-neutral-400",children:"Schnellauswahl senkrecht"}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("button",{type:"button",onClick:()=>i(r.text_align_x,0),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Oben"}),e.jsx("button",{type:"button",onClick:()=>i(r.text_align_x,50),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Mittig"}),e.jsx("button",{type:"button",onClick:()=>i(r.text_align_x,100),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Unten"})]})]})]})]}):e.jsxs("div",{className:"mb-5 grid gap-4 border-b border-neutral-200 pb-5 dark:border-neutral-800 sm:grid-cols-[10rem_1fr] sm:items-center",children:[e.jsx("div",{className:"aspect-square rounded-xl bg-neutral-100 dark:bg-neutral-800","aria-hidden":!0}),e.jsxs("div",{children:[e.jsxs("div",{className:`rounded-lg border border-neutral-200 p-3 dark:border-neutral-700 ${G[r.text_align]||"text-left"}`,children:[x&&e.jsx("p",{className:"mb-1 text-xs font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",children:x}),e.jsx("p",{className:"mb-1 font-bold text-neutral-900 dark:text-white",children:S}),e.jsx("p",{className:"line-clamp-2 text-xs text-neutral-500 dark:text-neutral-400",children:A||"Text erscheint hier…"})]}),e.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:K.map(t=>e.jsx("button",{type:"button",onClick:()=>o("text_align",t.value),className:`rounded-md border px-3 py-1.5 text-sm font-medium transition ${r.text_align===t.value?"border-brand-500 bg-brand-500 text-white":"border-neutral-300 text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800"}`,children:t.label},t.value))})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Kurzer Vorspann (optional)"}),e.jsx("input",{value:r[`eyebrow_${a}`]||"",onChange:t=>o(`eyebrow_${a}`,t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsx(p,{fieldKey:`home_sections.${n}.eyebrow`,previewText:r[`eyebrow_${a}`]||"Beispieltext"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Überschrift"}),e.jsx("input",{value:r[`title_${a}`]||"",onChange:t=>o(`title_${a}`,t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsx(p,{fieldKey:`home_sections.${n}.title`,previewText:r[`title_${a}`]||"Beispieltext"})]}),e.jsx(Z,{label:"Text",value:r[`body_html_${a}`]||"",onChange:t=>o(`body_html_${a}`,t)}),e.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Button-Beschriftung (optional)"}),e.jsx("input",{value:r[`button_label_${a}`]||"",onChange:t=>o(`button_label_${a}`,t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsx(p,{fieldKey:`home_sections.${n}.button_label`,previewText:r[`button_label_${a}`]||"Beispieltext"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Button-Ziel (Link, für beide Sprachen gleich)"}),e.jsx("input",{value:r.button_url||"",onChange:t=>o("button_url",t.target.value),placeholder:"/leistungen oder https://…",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:'Ohne Beschriftung UND Ziel wird kein Button angezeigt. Mit "/" beginnende Ziele bleiben innerhalb der Seite, alles andere öffnet extern in einem neuen Tab.'})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Schriftart (für beide Sprachen gleich)"}),e.jsxs("select",{value:r.font_family||"",onChange:t=>o("font_family",t.target.value||null),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:[e.jsx("option",{value:"",children:"Standard (globale Schriftart)"}),b.filter(t=>t.value).map(t=>e.jsx("option",{value:t.value,children:t.label},t.label))]})]})]}),r.updated_at&&e.jsxs("p",{className:"mt-3 text-xs text-neutral-400",children:["Zuletzt geändert: ",new Date(r.updated_at.replace(" ","T")).toLocaleString("de-DE")]}),k&&e.jsx("p",{className:"mt-3 text-sm text-red-600",children:k}),E&&e.jsx("p",{className:"mt-3 text-sm text-green-600 dark:text-green-400",children:"Gespeichert."}),e.jsx("button",{type:"button",onClick:D,disabled:v,className:"mt-4 rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:v?"Speichere…":"Speichern"})]})]})}export{Y as default}; diff --git a/hifi/assets/ImageUploadField-DyLcJG5-.js b/hifi/assets/ImageUploadField-Dz5jsGY3.js similarity index 99% rename from hifi/assets/ImageUploadField-DyLcJG5-.js rename to hifi/assets/ImageUploadField-Dz5jsGY3.js index 7797e01..783c37e 100644 --- a/hifi/assets/ImageUploadField-DyLcJG5-.js +++ b/hifi/assets/ImageUploadField-Dz5jsGY3.js @@ -1,4 +1,4 @@ -import{t as mt,r as d,j as u,a as ft}from"./index-QV-Szw5n.js";var V=!1,E,Z,k,_,N,rt,W,U,B,H,nt,G,X,st,at;function g(){if(!V){V=!0;var o=navigator.userAgent,e=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(o),t=/(Mac OS X)|(Windows)|(Linux)/.exec(o);if(G=/\b(iPhone|iP[ao]d)/.exec(o),X=/\b(iP[ao]d)/.exec(o),H=/Android/i.exec(o),st=/FBAN\/\w+;/i.exec(o),at=/Mobile/i.exec(o),nt=!!/Win64/.exec(o),e){E=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,E&&document&&document.documentMode&&(E=document.documentMode);var i=/(?:Trident\/(\d+.\d+))/.exec(o);rt=i?parseFloat(i[1])+4:E,Z=e[2]?parseFloat(e[2]):NaN,k=e[3]?parseFloat(e[3]):NaN,_=e[4]?parseFloat(e[4]):NaN,_?(e=/(?:Chrome\/(\d+\.\d+))/.exec(o),N=e&&e[1]?parseFloat(e[1]):NaN):N=NaN}else E=Z=k=N=_=NaN;if(t){if(t[1]){var r=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(o);W=r?parseFloat(r[1].replace("_",".")):!0}else W=!1;U=!!t[2],B=!!t[3]}else W=U=B=!1}}var Y={ie:function(){return g()||E},ieCompatibilityMode:function(){return g()||rt>E},ie64:function(){return Y.ie()&&nt},firefox:function(){return g()||Z},opera:function(){return g()||k},webkit:function(){return g()||_},safari:function(){return Y.webkit()},chrome:function(){return g()||N},windows:function(){return g()||U},osx:function(){return g()||W},linux:function(){return g()||B},iphone:function(){return g()||G},mobile:function(){return g()||G||X||H||at},nativeApp:function(){return g()||st},android:function(){return g()||H},ipad:function(){return g()||X}},gt=Y,vt=!!(typeof window<"u"&&window.document&&window.document.createElement),wt={canUseDOM:vt},bt=wt,ht=bt,ct;ht.canUseDOM&&(ct=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);/** +import{t as mt,r as d,j as u,a as ft}from"./index-D7JbPKAF.js";var V=!1,E,Z,k,_,N,rt,W,U,B,H,nt,G,X,st,at;function g(){if(!V){V=!0;var o=navigator.userAgent,e=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(o),t=/(Mac OS X)|(Windows)|(Linux)/.exec(o);if(G=/\b(iPhone|iP[ao]d)/.exec(o),X=/\b(iP[ao]d)/.exec(o),H=/Android/i.exec(o),st=/FBAN\/\w+;/i.exec(o),at=/Mobile/i.exec(o),nt=!!/Win64/.exec(o),e){E=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,E&&document&&document.documentMode&&(E=document.documentMode);var i=/(?:Trident\/(\d+.\d+))/.exec(o);rt=i?parseFloat(i[1])+4:E,Z=e[2]?parseFloat(e[2]):NaN,k=e[3]?parseFloat(e[3]):NaN,_=e[4]?parseFloat(e[4]):NaN,_?(e=/(?:Chrome\/(\d+\.\d+))/.exec(o),N=e&&e[1]?parseFloat(e[1]):NaN):N=NaN}else E=Z=k=N=_=NaN;if(t){if(t[1]){var r=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(o);W=r?parseFloat(r[1].replace("_",".")):!0}else W=!1;U=!!t[2],B=!!t[3]}else W=U=B=!1}}var Y={ie:function(){return g()||E},ieCompatibilityMode:function(){return g()||rt>E},ie64:function(){return Y.ie()&&nt},firefox:function(){return g()||Z},opera:function(){return g()||k},webkit:function(){return g()||_},safari:function(){return Y.webkit()},chrome:function(){return g()||N},windows:function(){return g()||U},osx:function(){return g()||W},linux:function(){return g()||B},iphone:function(){return g()||G},mobile:function(){return g()||G||X||H||at},nativeApp:function(){return g()||st},android:function(){return g()||H},ipad:function(){return g()||X}},gt=Y,vt=!!(typeof window<"u"&&window.document&&window.document.createElement),wt={canUseDOM:vt},bt=wt,ht=bt,ct;ht.canUseDOM&&(ct=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);/** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, diff --git a/hifi/assets/LegalSettings-BnY85Lz7.js b/hifi/assets/LegalSettings-EsPW5ccC.js similarity index 95% rename from hifi/assets/LegalSettings-BnY85Lz7.js rename to hifi/assets/LegalSettings-EsPW5ccC.js index c3d6e82..5ce5fdb 100644 --- a/hifi/assets/LegalSettings-BnY85Lz7.js +++ b/hifi/assets/LegalSettings-EsPW5ccC.js @@ -1 +1 @@ -import{r as s,a as b,j as e}from"./index-QV-Szw5n.js";import{R as v}from"./RichTextEditor-DJwdsoJ6.js";const j=[{slug:"impressum",label:"Impressum"},{slug:"datenschutz",label:"Datenschutzerklärung"},{slug:"agb",label:"AGB"}];function k(){const[d,u]=s.useState(null),[r,h]=s.useState("impressum"),[c,i]=s.useState(!1),[o,n]=s.useState(""),[g,l]=s.useState(!1);if(s.useEffect(()=>{b.get("/legal-pages").then(u)},[]),!d)return e.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"});const a=d[r],m=(t,f)=>{u(x=>({...x,[r]:{...x[r],[t]:f}})),l(!1)},p=async()=>{i(!0),n(""),l(!1);try{await b.put(`/legal-pages/${r}`,{title:a.title,body_html:a.body_html}),l(!0)}catch(t){n(t.message)}finally{i(!1)}};return e.jsx("div",{className:"max-w-3xl space-y-6",children:e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Rechtstexte"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Impressum, Datenschutzerklärung und AGB direkt hier pflegen, statt einen Deploy für jede Textänderung zu brauchen. Bitte bei Rechtstexten im Zweifel rechtlich beraten lassen, bevor du größere Änderungen veröffentlichst."}),e.jsx("div",{className:"mb-4 flex flex-wrap gap-2",children:j.map(t=>e.jsx("button",{type:"button",onClick:()=>{h(t.slug),l(!1),n("")},className:`rounded-md px-3 py-1.5 text-sm font-medium transition ${r===t.slug?"bg-brand-500 text-white":"border border-neutral-300 text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800"}`,children:t.label},t.slug))}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Überschrift"}),e.jsx("input",{value:a.title,onChange:t=>m("title",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsx(v,{label:"Inhalt",value:a.body_html,onChange:t=>m("body_html",t)})]}),a.updated_at&&e.jsxs("p",{className:"mt-3 text-xs text-neutral-400",children:["Zuletzt geändert: ",new Date(a.updated_at.replace(" ","T")).toLocaleString("de-DE")]}),o&&e.jsx("p",{className:"mt-3 text-sm text-red-600",children:o}),g&&e.jsx("p",{className:"mt-3 text-sm text-green-600 dark:text-green-400",children:"Gespeichert."}),e.jsx("button",{type:"button",onClick:p,disabled:c,className:"mt-4 rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:c?"Speichere…":"Speichern"})]})})}export{k as default}; +import{r as s,a as b,j as e}from"./index-D7JbPKAF.js";import{R as v}from"./RichTextEditor-DSo9zuZu.js";const j=[{slug:"impressum",label:"Impressum"},{slug:"datenschutz",label:"Datenschutzerklärung"},{slug:"agb",label:"AGB"}];function k(){const[d,u]=s.useState(null),[r,h]=s.useState("impressum"),[c,i]=s.useState(!1),[o,n]=s.useState(""),[g,l]=s.useState(!1);if(s.useEffect(()=>{b.get("/legal-pages").then(u)},[]),!d)return e.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"});const a=d[r],m=(t,f)=>{u(x=>({...x,[r]:{...x[r],[t]:f}})),l(!1)},p=async()=>{i(!0),n(""),l(!1);try{await b.put(`/legal-pages/${r}`,{title:a.title,body_html:a.body_html}),l(!0)}catch(t){n(t.message)}finally{i(!1)}};return e.jsx("div",{className:"max-w-3xl space-y-6",children:e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Rechtstexte"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Impressum, Datenschutzerklärung und AGB direkt hier pflegen, statt einen Deploy für jede Textänderung zu brauchen. Bitte bei Rechtstexten im Zweifel rechtlich beraten lassen, bevor du größere Änderungen veröffentlichst."}),e.jsx("div",{className:"mb-4 flex flex-wrap gap-2",children:j.map(t=>e.jsx("button",{type:"button",onClick:()=>{h(t.slug),l(!1),n("")},className:`rounded-md px-3 py-1.5 text-sm font-medium transition ${r===t.slug?"bg-brand-500 text-white":"border border-neutral-300 text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800"}`,children:t.label},t.slug))}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Überschrift"}),e.jsx("input",{value:a.title,onChange:t=>m("title",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsx(v,{label:"Inhalt",value:a.body_html,onChange:t=>m("body_html",t)})]}),a.updated_at&&e.jsxs("p",{className:"mt-3 text-xs text-neutral-400",children:["Zuletzt geändert: ",new Date(a.updated_at.replace(" ","T")).toLocaleString("de-DE")]}),o&&e.jsx("p",{className:"mt-3 text-sm text-red-600",children:o}),g&&e.jsx("p",{className:"mt-3 text-sm text-green-600 dark:text-green-400",children:"Gespeichert."}),e.jsx("button",{type:"button",onClick:p,disabled:c,className:"mt-4 rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:c?"Speichere…":"Speichern"})]})})}export{k as default}; diff --git a/hifi/assets/Login-Dc1nFqtx.js b/hifi/assets/Login-DQGVfomx.js similarity index 98% rename from hifi/assets/Login-Dc1nFqtx.js rename to hifi/assets/Login-DQGVfomx.js index ff3d918..5d61d08 100644 --- a/hifi/assets/Login-Dc1nFqtx.js +++ b/hifi/assets/Login-DQGVfomx.js @@ -1 +1 @@ -import{b as N,c as v,r,j as e,N as y,l as C,d as S}from"./index-QV-Szw5n.js";function P(){const{user:x,login:h,verifyTwoFactor:g}=N(),o=v(),[f,u]=r.useState("credentials"),[i,p]=r.useState(""),[c,w]=r.useState(""),[m,b]=r.useState(""),[s,a]=r.useState(""),[n,l]=r.useState(!1);if(x)return e.jsx(y,{to:"/admin",replace:!0});const k=async t=>{t.preventDefault(),l(!0),a("");try{(await h(i,c)).requires2fa?u("code"):o("/admin")}catch(d){a(d.message)}finally{l(!1)}},j=async t=>{t.preventDefault(),l(!0),a("");try{await g(m),o("/admin")}catch(d){a(d.message)}finally{l(!1)}};return e.jsxs("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-neutral-50 px-4 dark:bg-neutral-950",children:[e.jsx("img",{src:C,alt:"HifiPlanet",className:"h-16 w-auto dark:hidden sm:h-20"}),e.jsx("img",{src:S,alt:"HifiPlanet",className:"hidden h-16 w-auto dark:block sm:h-20"}),f==="credentials"?e.jsxs("form",{onSubmit:k,className:"w-full max-w-sm rounded-xl border border-neutral-200 bg-white p-8 shadow-sm dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h1",{className:"mb-6 text-xl font-bold text-neutral-900 dark:text-white",children:"Admin-Login"}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Benutzername"}),e.jsx("input",{value:i,onChange:t=>p(t.target.value),required:!0,autoFocus:!0,className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm focus:border-brand-500 focus:outline-none dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Passwort"}),e.jsx("input",{type:"password",value:c,onChange:t=>w(t.target.value),required:!0,className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm focus:border-brand-500 focus:outline-none dark:border-neutral-700 dark:bg-neutral-900"})]}),s&&e.jsx("p",{className:"mb-4 text-sm text-red-600",children:s}),e.jsx("button",{type:"submit",disabled:n,className:"w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:n?"Anmelden…":"Anmelden"})]}):e.jsxs("form",{onSubmit:j,className:"w-full max-w-sm rounded-xl border border-neutral-200 bg-white p-8 shadow-sm dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:"Bestätigungscode"}),e.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:"Öffne die Google Authenticator App und gib den 6-stelligen Code ein. Alternativ kannst du auch einen deiner Wiederherstellungscodes verwenden."}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Code"}),e.jsx("input",{value:m,onChange:t=>b(t.target.value),required:!0,autoFocus:!0,inputMode:"numeric",placeholder:"123456",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-center text-lg tracking-widest focus:border-brand-500 focus:outline-none dark:border-neutral-700 dark:bg-neutral-900"})]}),s&&e.jsx("p",{className:"mb-4 text-sm text-red-600",children:s}),e.jsx("button",{type:"submit",disabled:n,className:"w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:n?"Prüfe…":"Bestätigen"}),e.jsx("button",{type:"button",onClick:()=>{u("credentials"),b(""),a("")},className:"mt-3 w-full text-sm text-neutral-500 hover:underline dark:text-neutral-400",children:"Zurück zum Login"})]})]})}export{P as default}; +import{b as N,c as v,r,j as e,N as y,l as C,d as S}from"./index-D7JbPKAF.js";function P(){const{user:x,login:h,verifyTwoFactor:g}=N(),o=v(),[f,u]=r.useState("credentials"),[i,p]=r.useState(""),[c,w]=r.useState(""),[m,b]=r.useState(""),[s,a]=r.useState(""),[n,l]=r.useState(!1);if(x)return e.jsx(y,{to:"/admin",replace:!0});const k=async t=>{t.preventDefault(),l(!0),a("");try{(await h(i,c)).requires2fa?u("code"):o("/admin")}catch(d){a(d.message)}finally{l(!1)}},j=async t=>{t.preventDefault(),l(!0),a("");try{await g(m),o("/admin")}catch(d){a(d.message)}finally{l(!1)}};return e.jsxs("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-neutral-50 px-4 dark:bg-neutral-950",children:[e.jsx("img",{src:C,alt:"HifiPlanet",className:"h-16 w-auto dark:hidden sm:h-20"}),e.jsx("img",{src:S,alt:"HifiPlanet",className:"hidden h-16 w-auto dark:block sm:h-20"}),f==="credentials"?e.jsxs("form",{onSubmit:k,className:"w-full max-w-sm rounded-xl border border-neutral-200 bg-white p-8 shadow-sm dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h1",{className:"mb-6 text-xl font-bold text-neutral-900 dark:text-white",children:"Admin-Login"}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Benutzername"}),e.jsx("input",{value:i,onChange:t=>p(t.target.value),required:!0,autoFocus:!0,className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm focus:border-brand-500 focus:outline-none dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Passwort"}),e.jsx("input",{type:"password",value:c,onChange:t=>w(t.target.value),required:!0,className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm focus:border-brand-500 focus:outline-none dark:border-neutral-700 dark:bg-neutral-900"})]}),s&&e.jsx("p",{className:"mb-4 text-sm text-red-600",children:s}),e.jsx("button",{type:"submit",disabled:n,className:"w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:n?"Anmelden…":"Anmelden"})]}):e.jsxs("form",{onSubmit:j,className:"w-full max-w-sm rounded-xl border border-neutral-200 bg-white p-8 shadow-sm dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:"Bestätigungscode"}),e.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:"Öffne die Google Authenticator App und gib den 6-stelligen Code ein. Alternativ kannst du auch einen deiner Wiederherstellungscodes verwenden."}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Code"}),e.jsx("input",{value:m,onChange:t=>b(t.target.value),required:!0,autoFocus:!0,inputMode:"numeric",placeholder:"123456",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-center text-lg tracking-widest focus:border-brand-500 focus:outline-none dark:border-neutral-700 dark:bg-neutral-900"})]}),s&&e.jsx("p",{className:"mb-4 text-sm text-red-600",children:s}),e.jsx("button",{type:"submit",disabled:n,className:"w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:n?"Prüfe…":"Bestätigen"}),e.jsx("button",{type:"button",onClick:()=>{u("credentials"),b(""),a("")},className:"mt-3 w-full text-sm text-neutral-500 hover:underline dark:text-neutral-400",children:"Zurück zum Login"})]})]})}export{P as default}; diff --git a/hifi/assets/MaintenanceSettings-CFGyPBuq.js b/hifi/assets/MaintenanceSettings-Bv_S6G54.js similarity index 98% rename from hifi/assets/MaintenanceSettings-CFGyPBuq.js rename to hifi/assets/MaintenanceSettings-Bv_S6G54.js index 5ba3287..9957e67 100644 --- a/hifi/assets/MaintenanceSettings-CFGyPBuq.js +++ b/hifi/assets/MaintenanceSettings-Bv_S6G54.js @@ -1 +1 @@ -import{r as s,a as o,j as a}from"./index-QV-Szw5n.js";const v={global:{enabled:!1,message:""},services:{enabled:!1,message:""},vehicles:{enabled:!1,message:""}};function N(){const[l,n]=s.useState(v),[g,h]=s.useState(!0),[i,d]=s.useState(!1),[x,r]=s.useState(!1),[c,u]=s.useState("");s.useEffect(()=>{o.get("/maintenance").then(e=>{n({global:{enabled:e.global.enabled,message:e.global.message||""},services:{enabled:e.services.enabled,message:e.services.message||""},vehicles:{enabled:e.vehicles.enabled,message:e.vehicles.message||""}})}).finally(()=>h(!1))},[]);const m=(e,t,k)=>{n(b=>({...b,[e]:{...b[e],[t]:k}})),r(!1)},p=async e=>{e.preventDefault(),d(!0),u(""),r(!1);try{const t=await o.post("/maintenance",l);n({global:{enabled:t.global.enabled,message:t.global.message||""},services:{enabled:t.services.enabled,message:t.services.message||""},vehicles:{enabled:t.vehicles.enabled,message:t.vehicles.message||""}}),r(!0)}catch(t){u(t.message)}finally{d(!1)}},f=[{key:"global",title:"Gesamte Seite",hint:"Besucher sehen nur noch eine Wartungsmeldung – egal welche Seite sie aufrufen. Das Admin-Panel bleibt für dich erreichbar."},{key:"services",title:"Nur Leistungen",hint:"Nur die Leistungen-Seite zeigt eine Wartungsmeldung, der Rest der Website funktioniert normal."},{key:"vehicles",title:"Nur Fahrzeugkatalog",hint:"Nur die Fahrzeugauswahl (Marke → Modell → Pakete) zeigt eine Wartungsmeldung, der Rest der Website funktioniert normal."}];return g?a.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}):a.jsxs("form",{onSubmit:p,className:"max-w-2xl space-y-6",children:[a.jsx("p",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:'Ist "Gesamte Seite" aktiv, gewinnt das immer – die beiden anderen Schalter spielen dann keine Rolle mehr.'}),f.map(e=>a.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsxs("div",{className:"mb-1 flex items-center justify-between gap-3",children:[a.jsx("h2",{className:"font-semibold text-neutral-900 dark:text-white",children:e.title}),a.jsxs("label",{className:"relative inline-flex cursor-pointer items-center",children:[a.jsx("input",{type:"checkbox",checked:l[e.key].enabled,onChange:t=>m(e.key,"enabled",t.target.checked),className:"peer sr-only"}),a.jsx("div",{className:"h-6 w-11 rounded-full bg-neutral-200 transition peer-checked:bg-brand-500 dark:bg-neutral-700"}),a.jsx("div",{className:"absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition peer-checked:translate-x-5"})]})]}),a.jsx("p",{className:"mb-3 text-sm text-neutral-500 dark:text-neutral-400",children:e.hint}),a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Eigene Nachricht (optional)"}),a.jsx("textarea",{rows:2,value:l[e.key].message,onChange:t=>m(e.key,"message",t.target.value),placeholder:"z. B. Wir aktualisieren gerade unser Angebot. Schau bald wieder vorbei!",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]},e.key)),c&&a.jsx("p",{className:"text-sm text-red-600",children:c}),x&&a.jsx("p",{className:"text-sm text-green-600 dark:text-green-400",children:"Gespeichert."}),a.jsx("button",{type:"submit",disabled:i,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:i?"Speichere…":"Speichern"})]})}export{N as default}; +import{r as s,a as o,j as a}from"./index-D7JbPKAF.js";const v={global:{enabled:!1,message:""},services:{enabled:!1,message:""},vehicles:{enabled:!1,message:""}};function N(){const[l,n]=s.useState(v),[g,h]=s.useState(!0),[i,d]=s.useState(!1),[x,r]=s.useState(!1),[c,u]=s.useState("");s.useEffect(()=>{o.get("/maintenance").then(e=>{n({global:{enabled:e.global.enabled,message:e.global.message||""},services:{enabled:e.services.enabled,message:e.services.message||""},vehicles:{enabled:e.vehicles.enabled,message:e.vehicles.message||""}})}).finally(()=>h(!1))},[]);const m=(e,t,k)=>{n(b=>({...b,[e]:{...b[e],[t]:k}})),r(!1)},p=async e=>{e.preventDefault(),d(!0),u(""),r(!1);try{const t=await o.post("/maintenance",l);n({global:{enabled:t.global.enabled,message:t.global.message||""},services:{enabled:t.services.enabled,message:t.services.message||""},vehicles:{enabled:t.vehicles.enabled,message:t.vehicles.message||""}}),r(!0)}catch(t){u(t.message)}finally{d(!1)}},f=[{key:"global",title:"Gesamte Seite",hint:"Besucher sehen nur noch eine Wartungsmeldung – egal welche Seite sie aufrufen. Das Admin-Panel bleibt für dich erreichbar."},{key:"services",title:"Nur Leistungen",hint:"Nur die Leistungen-Seite zeigt eine Wartungsmeldung, der Rest der Website funktioniert normal."},{key:"vehicles",title:"Nur Fahrzeugkatalog",hint:"Nur die Fahrzeugauswahl (Marke → Modell → Pakete) zeigt eine Wartungsmeldung, der Rest der Website funktioniert normal."}];return g?a.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}):a.jsxs("form",{onSubmit:p,className:"max-w-2xl space-y-6",children:[a.jsx("p",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:'Ist "Gesamte Seite" aktiv, gewinnt das immer – die beiden anderen Schalter spielen dann keine Rolle mehr.'}),f.map(e=>a.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[a.jsxs("div",{className:"mb-1 flex items-center justify-between gap-3",children:[a.jsx("h2",{className:"font-semibold text-neutral-900 dark:text-white",children:e.title}),a.jsxs("label",{className:"relative inline-flex cursor-pointer items-center",children:[a.jsx("input",{type:"checkbox",checked:l[e.key].enabled,onChange:t=>m(e.key,"enabled",t.target.checked),className:"peer sr-only"}),a.jsx("div",{className:"h-6 w-11 rounded-full bg-neutral-200 transition peer-checked:bg-brand-500 dark:bg-neutral-700"}),a.jsx("div",{className:"absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition peer-checked:translate-x-5"})]})]}),a.jsx("p",{className:"mb-3 text-sm text-neutral-500 dark:text-neutral-400",children:e.hint}),a.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Eigene Nachricht (optional)"}),a.jsx("textarea",{rows:2,value:l[e.key].message,onChange:t=>m(e.key,"message",t.target.value),placeholder:"z. B. Wir aktualisieren gerade unser Angebot. Schau bald wieder vorbei!",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]},e.key)),c&&a.jsx("p",{className:"text-sm text-red-600",children:c}),x&&a.jsx("p",{className:"text-sm text-green-600 dark:text-green-400",children:"Gespeichert."}),a.jsx("button",{type:"submit",disabled:i,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:i?"Speichere…":"Speichern"})]})}export{N as default}; diff --git a/hifi/assets/Models-CyjYxQOO.js b/hifi/assets/Models-ii45_Sg2.js similarity index 96% rename from hifi/assets/Models-CyjYxQOO.js rename to hifi/assets/Models-ii45_Sg2.js index 0b88ad2..593b21c 100644 --- a/hifi/assets/Models-CyjYxQOO.js +++ b/hifi/assets/Models-ii45_Sg2.js @@ -1 +1 @@ -import{r as a,j as e,a as i}from"./index-QV-Szw5n.js";import{I as _}from"./ImageUploadField-DyLcJG5-.js";import{T as M}from"./TextStyleWidget-Czb7ujSZ.js";const j={name:"",brand_id:"",image_path:"",sort_order:0};function F(){const[n,k]=a.useState([]),[x,N]=a.useState([]),[r,s]=a.useState(j),[l,m]=a.useState(null),[u,h]=a.useState(""),[d,b]=a.useState("all"),o=a.useMemo(()=>d==="all"?n:n.filter(t=>String(t.brand_id)===d),[n,d]),c=()=>{i.get("/models").then(k),i.get("/brands").then(N)};a.useEffect(c,[]);const f=t=>{m(t.id),s({name:t.name,brand_id:t.brand_id,image_path:t.image_path||"",sort_order:t.sort_order})},p=()=>{m(null),s(j)},v=async t=>{t.preventDefault(),h("");const g={...r,brand_id:Number(r.brand_id)};try{l?await i.put(`/models/${l}`,g):await i.post("/models",g),p(),c()}catch(w){h(w.message)}},y=async t=>{confirm("Modell inkl. aller Pakete/Produkte wirklich löschen?")&&(await i.delete(`/models/${t}`),c())};return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("h1",{className:"mb-4 text-xl font-bold text-neutral-900 dark:text-white",children:"Modelle"}),e.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-neutral-600 dark:text-neutral-300",children:"Nach Marke filtern:"}),e.jsxs("select",{value:d,onChange:t=>b(t.target.value),className:"rounded-md border border-neutral-300 bg-white px-3 py-1.5 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:[e.jsx("option",{value:"all",children:"Alle Marken"}),x.map(t=>e.jsx("option",{value:String(t.id),children:t.name},t.id))]}),d!=="all"&&e.jsx("button",{onClick:()=>b("all"),className:"text-sm text-brand-600 hover:underline",children:"Filter zurücksetzen"}),e.jsxs("span",{className:"text-sm text-neutral-400",children:[o.length," von ",n.length]})]}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2",children:"Bild"}),e.jsx("th",{className:"px-4 py-2",children:"Marke"}),e.jsx("th",{className:"px-4 py-2",children:"Modell"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),e.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[o.map(t=>e.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[e.jsx("td",{className:"px-4 py-2",children:t.image_path?e.jsx("img",{src:t.image_path,alt:"",className:"h-10 w-10 rounded-md object-cover"}):e.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-md bg-neutral-100 text-xs text-neutral-400 dark:bg-neutral-800",children:"–"})}),e.jsx("td",{className:"px-4 py-2",children:t.brand_name}),e.jsx("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:t.name}),e.jsxs("td",{className:"px-4 py-2 text-right",children:[e.jsx("button",{onClick:()=>f(t),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),e.jsx("button",{onClick:()=>y(t.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},t.id)),o.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"px-4 py-6 text-center text-neutral-400",children:n.length===0?"Noch keine Modelle angelegt.":"Keine Modelle für diese Marke."})})]})]})})]}),e.jsxs("form",{onSubmit:v,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:l?"Modell bearbeiten":"Neues Modell"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Marke *"}),e.jsxs("select",{required:!0,value:r.brand_id,onChange:t=>s({...r,brand_id:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:[e.jsx("option",{value:"",children:"Bitte wählen…"}),x.map(t=>e.jsx("option",{value:t.id,children:t.name},t.id))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Modellname *"}),e.jsx("input",{required:!0,value:r.name,onChange:t=>s({...r,name:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),l&&e.jsx(M,{fieldKey:`car_models.${l}.name`,previewText:r.name||"Beispieltext"})]}),e.jsx(_,{value:r.image_path,onChange:t=>s({...r,image_path:t}),label:"Bild (optional)"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),e.jsx("input",{type:"number",value:r.sort_order,onChange:t=>s({...r,sort_order:Number(t.target.value)}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),u&&e.jsx("p",{className:"text-sm text-red-600",children:u}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:l?"Speichern":"Anlegen"}),l&&e.jsx("button",{type:"button",onClick:p,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}export{F as default}; +import{r as a,j as e,a as i}from"./index-D7JbPKAF.js";import{I as _}from"./ImageUploadField-Dz5jsGY3.js";import{T as M}from"./TextStyleWidget-DvjoGL1J.js";const j={name:"",brand_id:"",image_path:"",sort_order:0};function F(){const[n,k]=a.useState([]),[x,N]=a.useState([]),[r,s]=a.useState(j),[l,m]=a.useState(null),[u,h]=a.useState(""),[d,b]=a.useState("all"),o=a.useMemo(()=>d==="all"?n:n.filter(t=>String(t.brand_id)===d),[n,d]),c=()=>{i.get("/models").then(k),i.get("/brands").then(N)};a.useEffect(c,[]);const f=t=>{m(t.id),s({name:t.name,brand_id:t.brand_id,image_path:t.image_path||"",sort_order:t.sort_order})},p=()=>{m(null),s(j)},v=async t=>{t.preventDefault(),h("");const g={...r,brand_id:Number(r.brand_id)};try{l?await i.put(`/models/${l}`,g):await i.post("/models",g),p(),c()}catch(w){h(w.message)}},y=async t=>{confirm("Modell inkl. aller Pakete/Produkte wirklich löschen?")&&(await i.delete(`/models/${t}`),c())};return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("h1",{className:"mb-4 text-xl font-bold text-neutral-900 dark:text-white",children:"Modelle"}),e.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:[e.jsx("label",{className:"text-sm font-medium text-neutral-600 dark:text-neutral-300",children:"Nach Marke filtern:"}),e.jsxs("select",{value:d,onChange:t=>b(t.target.value),className:"rounded-md border border-neutral-300 bg-white px-3 py-1.5 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:[e.jsx("option",{value:"all",children:"Alle Marken"}),x.map(t=>e.jsx("option",{value:String(t.id),children:t.name},t.id))]}),d!=="all"&&e.jsx("button",{onClick:()=>b("all"),className:"text-sm text-brand-600 hover:underline",children:"Filter zurücksetzen"}),e.jsxs("span",{className:"text-sm text-neutral-400",children:[o.length," von ",n.length]})]}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2",children:"Bild"}),e.jsx("th",{className:"px-4 py-2",children:"Marke"}),e.jsx("th",{className:"px-4 py-2",children:"Modell"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),e.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[o.map(t=>e.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[e.jsx("td",{className:"px-4 py-2",children:t.image_path?e.jsx("img",{src:t.image_path,alt:"",className:"h-10 w-10 rounded-md object-cover"}):e.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-md bg-neutral-100 text-xs text-neutral-400 dark:bg-neutral-800",children:"–"})}),e.jsx("td",{className:"px-4 py-2",children:t.brand_name}),e.jsx("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:t.name}),e.jsxs("td",{className:"px-4 py-2 text-right",children:[e.jsx("button",{onClick:()=>f(t),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),e.jsx("button",{onClick:()=>y(t.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},t.id)),o.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"px-4 py-6 text-center text-neutral-400",children:n.length===0?"Noch keine Modelle angelegt.":"Keine Modelle für diese Marke."})})]})]})})]}),e.jsxs("form",{onSubmit:v,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:l?"Modell bearbeiten":"Neues Modell"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Marke *"}),e.jsxs("select",{required:!0,value:r.brand_id,onChange:t=>s({...r,brand_id:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:[e.jsx("option",{value:"",children:"Bitte wählen…"}),x.map(t=>e.jsx("option",{value:t.id,children:t.name},t.id))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Modellname *"}),e.jsx("input",{required:!0,value:r.name,onChange:t=>s({...r,name:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),l&&e.jsx(M,{fieldKey:`car_models.${l}.name`,previewText:r.name||"Beispieltext"})]}),e.jsx(_,{value:r.image_path,onChange:t=>s({...r,image_path:t}),label:"Bild (optional)"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),e.jsx("input",{type:"number",value:r.sort_order,onChange:t=>s({...r,sort_order:Number(t.target.value)}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),u&&e.jsx("p",{className:"text-sm text-red-600",children:u}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:l?"Speichern":"Anlegen"}),l&&e.jsx("button",{type:"button",onClick:p,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}export{F as default}; diff --git a/hifi/assets/Packages-6JjKaOj1.js b/hifi/assets/Packages-Dpbb0BQ5.js similarity index 99% rename from hifi/assets/Packages-6JjKaOj1.js rename to hifi/assets/Packages-Dpbb0BQ5.js index ee05a16..2b4d292 100644 --- a/hifi/assets/Packages-6JjKaOj1.js +++ b/hifi/assets/Packages-Dpbb0BQ5.js @@ -1,4 +1,4 @@ -import{r as c,R as J,f as Ze,j as a,a as U,g as Gn,C as mn,h as qn,i as Jn}from"./index-QV-Szw5n.js";import{T as Jt}from"./TextStyleWidget-Czb7ujSZ.js";import{P as bn,R as Zn,T as xn,G as Qn}from"./trash-2-fu7u5OTF.js";import{E as er,a as tr}from"./eye-YlN_9rkm.js";const nr=["Base","Clear","Drive","Prime","Elite","Apex","The Statement","Limitless"],rr=e=>(e+1)*10;function sr(){for(var e=arguments.length,t=new Array(e),n=0;nr=>{t.forEach(s=>s(r))},t)}const St=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Fe(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Ut(e){return"nodeType"in e}function Z(e){var t,n;return e?Fe(e)?e:Ut(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Kt(e){const{Document:t}=Z(e);return e instanceof t}function ot(e){return Fe(e)?!1:e instanceof Z(e).HTMLElement}function vn(e){return e instanceof Z(e).SVGElement}function Ue(e){return e?Fe(e)?e.document:Ut(e)?Kt(e)?e:ot(e)||vn(e)?e.ownerDocument:document:document:document}const ve=St?c.useLayoutEffect:c.useEffect;function Wt(e){const t=c.useRef(e);return ve(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s{e.current=setInterval(r,s)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function rt(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return ve(()=>{n.current!==e&&(n.current=e)},t),n}function lt(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function vt(e){const t=Wt(e),n=c.useRef(null),r=c.useCallback(s=>{s!==n.current&&(t==null||t(s,n.current)),n.current=s},[]);return[n,r]}function Tt(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let Mt={};function ct(e,t){return c.useMemo(()=>{if(t)return t;const n=Mt[e]==null?0:Mt[e]+1;return Mt[e]=n,e+"-"+n},[e,t])}function yn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s{const d=Object.entries(l);for(const[f,h]of d){const g=i[f];g!=null&&(i[f]=g+e*h)}return i},{...t})}}const Be=yn(1),st=yn(-1);function ir(e){return"clientX"in e&&"clientY"in e}function Xt(e){if(!e)return!1;const{KeyboardEvent:t}=Z(e.target);return t&&e instanceof t}function or(e){if(!e)return!1;const{TouchEvent:t}=Z(e.target);return t&&e instanceof t}function Ot(e){if(or(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 ir(e)?{x:e.clientX,y:e.clientY}:null}const at=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[at.Translate.toString(e),at.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Zt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function lr(e){return e.matches(Zt)?e:e.querySelector(Zt)}const cr={display:"none"};function dr(e){let{id:t,value:n}=e;return J.createElement("div",{id:t,style:cr},n)}function ur(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const s={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 J.createElement("div",{id:t,style:s,role:"status","aria-live":r,"aria-atomic":!0},n)}function fr(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const wn=c.createContext(null);function hr(e){const t=c.useContext(wn);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function gr(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:s,event:i}=r;e.forEach(l=>{var d;return(d=l[s])==null?void 0:d.call(l,i)})},[e]),t]}const pr={draggable:` +import{r as c,R as J,f as Ze,j as a,a as U,g as Gn,C as mn,h as qn,i as Jn}from"./index-D7JbPKAF.js";import{T as Jt}from"./TextStyleWidget-DvjoGL1J.js";import{P as bn,R as Zn,T as xn,G as Qn}from"./trash-2-D2g7JxqJ.js";import{E as er,a as tr}from"./eye-zEWyQJeC.js";const nr=["Base","Clear","Drive","Prime","Elite","Apex","The Statement","Limitless"],rr=e=>(e+1)*10;function sr(){for(var e=arguments.length,t=new Array(e),n=0;nr=>{t.forEach(s=>s(r))},t)}const St=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Fe(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Ut(e){return"nodeType"in e}function Z(e){var t,n;return e?Fe(e)?e:Ut(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Kt(e){const{Document:t}=Z(e);return e instanceof t}function ot(e){return Fe(e)?!1:e instanceof Z(e).HTMLElement}function vn(e){return e instanceof Z(e).SVGElement}function Ue(e){return e?Fe(e)?e.document:Ut(e)?Kt(e)?e:ot(e)||vn(e)?e.ownerDocument:document:document:document}const ve=St?c.useLayoutEffect:c.useEffect;function Wt(e){const t=c.useRef(e);return ve(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s{e.current=setInterval(r,s)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function rt(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return ve(()=>{n.current!==e&&(n.current=e)},t),n}function lt(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function vt(e){const t=Wt(e),n=c.useRef(null),r=c.useCallback(s=>{s!==n.current&&(t==null||t(s,n.current)),n.current=s},[]);return[n,r]}function Tt(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let Mt={};function ct(e,t){return c.useMemo(()=>{if(t)return t;const n=Mt[e]==null?0:Mt[e]+1;return Mt[e]=n,e+"-"+n},[e,t])}function yn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s{const d=Object.entries(l);for(const[f,h]of d){const g=i[f];g!=null&&(i[f]=g+e*h)}return i},{...t})}}const Be=yn(1),st=yn(-1);function ir(e){return"clientX"in e&&"clientY"in e}function Xt(e){if(!e)return!1;const{KeyboardEvent:t}=Z(e.target);return t&&e instanceof t}function or(e){if(!e)return!1;const{TouchEvent:t}=Z(e.target);return t&&e instanceof t}function Ot(e){if(or(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 ir(e)?{x:e.clientX,y:e.clientY}:null}const at=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[at.Translate.toString(e),at.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Zt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function lr(e){return e.matches(Zt)?e:e.querySelector(Zt)}const cr={display:"none"};function dr(e){let{id:t,value:n}=e;return J.createElement("div",{id:t,style:cr},n)}function ur(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const s={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 J.createElement("div",{id:t,style:s,role:"status","aria-live":r,"aria-atomic":!0},n)}function fr(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const wn=c.createContext(null);function hr(e){const t=c.useContext(wn);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function gr(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:s,event:i}=r;e.forEach(l=>{var d;return(d=l[s])==null?void 0:d.call(l,i)})},[e]),t]}const pr={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/Partners-BRwobp6H.js b/hifi/assets/Partners-XxA2Rj_b.js similarity index 96% rename from hifi/assets/Partners-BRwobp6H.js rename to hifi/assets/Partners-XxA2Rj_b.js index 8abf349..cef8e0b 100644 --- a/hifi/assets/Partners-BRwobp6H.js +++ b/hifi/assets/Partners-XxA2Rj_b.js @@ -1 +1 @@ -import{r as l,j as e,a as n}from"./index-QV-Szw5n.js";import{I as N}from"./ImageUploadField-DyLcJG5-.js";const u={name:"",logo_path:"",sort_order:0};function y(){const[o,h]=l.useState([]),[r,a]=l.useState(u),[s,i]=l.useState(null),[c,x]=l.useState(""),d=()=>n.get("/partners").then(h);l.useEffect(()=>{d()},[]);const b=t=>{i(t.id),a({name:t.name,logo_path:t.logo_path||"",sort_order:t.sort_order})},m=()=>{i(null),a(u)},p=async t=>{t.preventDefault(),x("");try{s?await n.put(`/partners/${s}`,r):await n.post("/partners",r),m(),d()}catch(j){x(j.message)}},g=async t=>{confirm("Partner wirklich löschen?")&&(await n.delete(`/partners/${t}`),d())};return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("h1",{className:"mb-4 text-xl font-bold text-neutral-900 dark:text-white",children:"Partner"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Die Marken-Logozeile auf der Startseite. Ohne Logo wird der Name als Text angezeigt."}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2",children:"Logo"}),e.jsx("th",{className:"px-4 py-2",children:"Name"}),e.jsx("th",{className:"px-4 py-2",children:"Sortierung"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),e.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[o.map(t=>e.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[e.jsx("td",{className:"px-4 py-2",children:t.logo_path?e.jsx("img",{src:t.logo_path,alt:"",className:"h-10 w-10 rounded-md object-contain"}):e.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-md bg-neutral-100 text-xs text-neutral-400 dark:bg-neutral-800",children:"–"})}),e.jsx("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:t.name}),e.jsx("td",{className:"px-4 py-2",children:t.sort_order}),e.jsxs("td",{className:"px-4 py-2 text-right",children:[e.jsx("button",{onClick:()=>b(t),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),e.jsx("button",{onClick:()=>g(t.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},t.id)),o.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Partner angelegt."})})]})]})})]}),e.jsxs("form",{onSubmit:p,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:s?"Partner bearbeiten":"Neuer Partner"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Name *"}),e.jsx("input",{required:!0,value:r.name,onChange:t=>a({...r,name:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsx(N,{value:r.logo_path,onChange:t=>a({...r,logo_path:t}),label:"Logo (optional)"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),e.jsx("input",{type:"number",value:r.sort_order,onChange:t=>a({...r,sort_order:Number(t.target.value)}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),c&&e.jsx("p",{className:"text-sm text-red-600",children:c}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:s?"Speichern":"Anlegen"}),s&&e.jsx("button",{type:"button",onClick:m,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}export{y as default}; +import{r as l,j as e,a as n}from"./index-D7JbPKAF.js";import{I as N}from"./ImageUploadField-Dz5jsGY3.js";const u={name:"",logo_path:"",sort_order:0};function y(){const[o,h]=l.useState([]),[r,a]=l.useState(u),[s,i]=l.useState(null),[c,x]=l.useState(""),d=()=>n.get("/partners").then(h);l.useEffect(()=>{d()},[]);const b=t=>{i(t.id),a({name:t.name,logo_path:t.logo_path||"",sort_order:t.sort_order})},m=()=>{i(null),a(u)},p=async t=>{t.preventDefault(),x("");try{s?await n.put(`/partners/${s}`,r):await n.post("/partners",r),m(),d()}catch(j){x(j.message)}},g=async t=>{confirm("Partner wirklich löschen?")&&(await n.delete(`/partners/${t}`),d())};return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("h1",{className:"mb-4 text-xl font-bold text-neutral-900 dark:text-white",children:"Partner"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Die Marken-Logozeile auf der Startseite. Ohne Logo wird der Name als Text angezeigt."}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2",children:"Logo"}),e.jsx("th",{className:"px-4 py-2",children:"Name"}),e.jsx("th",{className:"px-4 py-2",children:"Sortierung"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),e.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[o.map(t=>e.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[e.jsx("td",{className:"px-4 py-2",children:t.logo_path?e.jsx("img",{src:t.logo_path,alt:"",className:"h-10 w-10 rounded-md object-contain"}):e.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-md bg-neutral-100 text-xs text-neutral-400 dark:bg-neutral-800",children:"–"})}),e.jsx("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:t.name}),e.jsx("td",{className:"px-4 py-2",children:t.sort_order}),e.jsxs("td",{className:"px-4 py-2 text-right",children:[e.jsx("button",{onClick:()=>b(t),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),e.jsx("button",{onClick:()=>g(t.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},t.id)),o.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Partner angelegt."})})]})]})})]}),e.jsxs("form",{onSubmit:p,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:s?"Partner bearbeiten":"Neuer Partner"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Name *"}),e.jsx("input",{required:!0,value:r.name,onChange:t=>a({...r,name:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsx(N,{value:r.logo_path,onChange:t=>a({...r,logo_path:t}),label:"Logo (optional)"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),e.jsx("input",{type:"number",value:r.sort_order,onChange:t=>a({...r,sort_order:Number(t.target.value)}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),c&&e.jsx("p",{className:"text-sm text-red-600",children:c}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:s?"Speichern":"Anlegen"}),s&&e.jsx("button",{type:"button",onClick:m,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}export{y as default}; diff --git a/hifi/assets/PermissionGroups-CW64DGq9.js b/hifi/assets/PermissionGroups-B2LgV5x6.js similarity index 98% rename from hifi/assets/PermissionGroups-CW64DGq9.js rename to hifi/assets/PermissionGroups-B2LgV5x6.js index e52a192..5c6d56e 100644 --- a/hifi/assets/PermissionGroups-CW64DGq9.js +++ b/hifi/assets/PermissionGroups-B2LgV5x6.js @@ -1 +1 @@ -import{r as n,j as e,a as i}from"./index-QV-Szw5n.js";const h={name:"",description:"",permissions:[]};function w(){const[c,b]=n.useState([]),[o,g]=n.useState([]),[r,a]=n.useState(h),[l,u]=n.useState(null),[m,x]=n.useState(""),d=()=>{i.get("/permission-groups").then(b),i.get("/permissions/catalog").then(g)};n.useEffect(d,[]);const j=t=>{u(t.id),a({name:t.name,description:t.description||"",permissions:t.permissions})},p=()=>{u(null),a(h)},N=t=>{a(s=>({...s,permissions:s.permissions.includes(t)?s.permissions.filter(y=>y!==t):[...s.permissions,t]}))},k=async t=>{t.preventDefault(),x("");try{l?await i.put(`/permission-groups/${l}`,r):await i.post("/permission-groups",r),p(),d()}catch(s){x(s.message)}},f=async t=>{confirm("Diese Berechtigungsgruppe wirklich löschen? Benutzer behalten ihre sonstigen Rechte.")&&(await i.delete(`/permission-groups/${t}`),d())};return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Berechtigungsgruppen"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:'Fasse mehrere Berechtigungen zu einer Gruppe zusammen (z. B. „Werkstatt"), die du dann bequem einem oder mehreren Benutzern zuweisen kannst.'}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2",children:"Name"}),e.jsx("th",{className:"px-4 py-2",children:"Berechtigungen"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),e.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[c.map(t=>e.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[e.jsxs("td",{className:"px-4 py-2",children:[e.jsx("p",{className:"font-medium text-neutral-800 dark:text-neutral-100",children:t.name}),t.description&&e.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:t.description})]}),e.jsxs("td",{className:"px-4 py-2 text-neutral-500 dark:text-neutral-400",children:[t.permissions.length," von ",o.length]}),e.jsxs("td",{className:"px-4 py-2 text-right",children:[e.jsx("button",{onClick:()=>j(t),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),e.jsx("button",{onClick:()=>f(t.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},t.id)),c.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:3,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Berechtigungsgruppen angelegt."})})]})]})})]}),e.jsxs("form",{onSubmit:k,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:l?"Gruppe bearbeiten":"Neue Gruppe"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Name *"}),e.jsx("input",{required:!0,value:r.name,onChange:t=>a({...r,name:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Beschreibung"}),e.jsx("textarea",{rows:2,value:r.description,onChange:t=>a({...r,description:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Berechtigungen"}),e.jsx("div",{className:"space-y-1.5 rounded-md border border-neutral-200 p-3 dark:border-neutral-700",children:o.map(t=>e.jsxs("label",{className:"flex items-center gap-2 text-sm text-neutral-700 dark:text-neutral-300",children:[e.jsx("input",{type:"checkbox",checked:r.permissions.includes(t.key),onChange:()=>N(t.key),className:"h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),t.label]},t.key))})]}),m&&e.jsx("p",{className:"text-sm text-red-600",children:m}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:l?"Speichern":"Anlegen"}),l&&e.jsx("button",{type:"button",onClick:p,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}export{w as default}; +import{r as n,j as e,a as i}from"./index-D7JbPKAF.js";const h={name:"",description:"",permissions:[]};function w(){const[c,b]=n.useState([]),[o,g]=n.useState([]),[r,a]=n.useState(h),[l,u]=n.useState(null),[m,x]=n.useState(""),d=()=>{i.get("/permission-groups").then(b),i.get("/permissions/catalog").then(g)};n.useEffect(d,[]);const j=t=>{u(t.id),a({name:t.name,description:t.description||"",permissions:t.permissions})},p=()=>{u(null),a(h)},N=t=>{a(s=>({...s,permissions:s.permissions.includes(t)?s.permissions.filter(y=>y!==t):[...s.permissions,t]}))},k=async t=>{t.preventDefault(),x("");try{l?await i.put(`/permission-groups/${l}`,r):await i.post("/permission-groups",r),p(),d()}catch(s){x(s.message)}},f=async t=>{confirm("Diese Berechtigungsgruppe wirklich löschen? Benutzer behalten ihre sonstigen Rechte.")&&(await i.delete(`/permission-groups/${t}`),d())};return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Berechtigungsgruppen"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:'Fasse mehrere Berechtigungen zu einer Gruppe zusammen (z. B. „Werkstatt"), die du dann bequem einem oder mehreren Benutzern zuweisen kannst.'}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2",children:"Name"}),e.jsx("th",{className:"px-4 py-2",children:"Berechtigungen"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),e.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[c.map(t=>e.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[e.jsxs("td",{className:"px-4 py-2",children:[e.jsx("p",{className:"font-medium text-neutral-800 dark:text-neutral-100",children:t.name}),t.description&&e.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:t.description})]}),e.jsxs("td",{className:"px-4 py-2 text-neutral-500 dark:text-neutral-400",children:[t.permissions.length," von ",o.length]}),e.jsxs("td",{className:"px-4 py-2 text-right",children:[e.jsx("button",{onClick:()=>j(t),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),e.jsx("button",{onClick:()=>f(t.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},t.id)),c.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:3,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Berechtigungsgruppen angelegt."})})]})]})})]}),e.jsxs("form",{onSubmit:k,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:l?"Gruppe bearbeiten":"Neue Gruppe"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Name *"}),e.jsx("input",{required:!0,value:r.name,onChange:t=>a({...r,name:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Beschreibung"}),e.jsx("textarea",{rows:2,value:r.description,onChange:t=>a({...r,description:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Berechtigungen"}),e.jsx("div",{className:"space-y-1.5 rounded-md border border-neutral-200 p-3 dark:border-neutral-700",children:o.map(t=>e.jsxs("label",{className:"flex items-center gap-2 text-sm text-neutral-700 dark:text-neutral-300",children:[e.jsx("input",{type:"checkbox",checked:r.permissions.includes(t.key),onChange:()=>N(t.key),className:"h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),t.label]},t.key))})]}),m&&e.jsx("p",{className:"text-sm text-red-600",children:m}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:l?"Speichern":"Anlegen"}),l&&e.jsx("button",{type:"button",onClick:p,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}export{w as default}; diff --git a/hifi/assets/ResetSettings-Bm64tgsK.js b/hifi/assets/ResetSettings-BPp-Ruq2.js similarity index 99% rename from hifi/assets/ResetSettings-Bm64tgsK.js rename to hifi/assets/ResetSettings-BPp-Ruq2.js index 2339044..08c0035 100644 --- a/hifi/assets/ResetSettings-Bm64tgsK.js +++ b/hifi/assets/ResetSettings-BPp-Ruq2.js @@ -1 +1 @@ -import{r,j as e,a}from"./index-QV-Szw5n.js";function B(){const[o,u]=r.useState(!1),[c,s]=r.useState(""),[g,h]=r.useState(!1),[b,n]=r.useState(""),[k,m]=r.useState(!1),[x,l]=r.useState(""),[f,p]=r.useState(!1),[y,d]=r.useState(""),[z,S]=r.useState(!1),[w,i]=r.useState(""),F=async()=>{if(confirm("Alle aktuellen Leistungen werden gelöscht und durch die 8 Standard-Leistungen ersetzt. Fortfahren?")){u(!0),s("");try{const t=await a.post("/settings/reset-services",{});s(`${t.count} Standard-Leistungen wiederhergestellt.`)}catch(t){s("Fehler: "+t.message)}finally{u(!1)}}},j=async()=>{if(confirm("Alle aktuellen FAQ-Einträge werden gelöscht und durch die 6 Standard-Fragen ersetzt. Fortfahren?")){h(!0),n("");try{const t=await a.post("/settings/reset-faqs",{});n(`${t.count} Standard-Fragen wiederhergestellt.`)}catch(t){n("Fehler: "+t.message)}finally{h(!1)}}},N=async()=>{if(confirm("Die komplette Bildergalerie wird gelöscht und durch die 13 Marken/29 Projekte/207 Fotos der alten hifi-planet.de-Seite ersetzt. Fortfahren?")){m(!0),l("");try{const t=await a.post("/settings/reset-gallery",{});l(`${t.photos} Fotos wiederhergestellt.`)}catch(t){l("Fehler: "+t.message)}finally{m(!1)}}},M=async()=>{if(confirm("Alle Marken, Modelle, Pakete, Produkte und Upgrades werden unwiderruflich gelöscht. Leistungen und Kontaktanfragen bleiben erhalten. Fortfahren?")){p(!0),d("");try{const t=await a.post("/settings/reset-catalog",{});d(`Fahrzeugkatalog geleert (${t.brands_removed} Marken entfernt).`)}catch(t){d("Fehler: "+t.message)}finally{p(!1)}}},L=async()=>{if(confirm("WIRKLICH ALLES zurücksetzen? Marken, Modelle, Pakete, Produkte und Upgrades werden gelöscht, Leistungen, FAQs und die Bildergalerie auf Standard zurückgesetzt. Kontaktanfragen und Benutzerkonten bleiben erhalten. Das kann nicht rückgängig gemacht werden!")){S(!0),i("");try{const t=await a.post("/settings/reset-all",{});i(`Erledigt: ${t.brands_removed} Marken entfernt, ${t.services_reset} Standard-Leistungen, ${t.faqs_reset} Standard-Fragen und ${t.gallery_photos_reset} Galerie-Fotos wiederhergestellt.`)}catch(t){i("Fehler: "+t.message)}finally{S(!1)}}};return e.jsxs("div",{className:"max-w-2xl space-y-6",children:[e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Nur Leistungen zurücksetzen"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Löscht alle aktuellen Leistungen-Karten und stellt die 8 mitgelieferten Standard-Leistungen wieder her. Marken, Modelle und Pakete bleiben unangetastet."}),e.jsx("button",{onClick:F,disabled:o,className:"rounded-md border border-red-300 px-4 py-2 text-sm font-semibold text-red-600 hover:bg-red-50 disabled:opacity-50 dark:border-red-900 dark:hover:bg-red-900/20",children:o?"Setze zurück…":"Leistungen auf Standard zurücksetzen"}),c&&e.jsx("p",{className:"mt-3 text-sm text-neutral-600 dark:text-neutral-300",children:c})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Nur FAQs zurücksetzen"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Löscht alle aktuellen Fragen und stellt die 6 mitgelieferten Standard-Fragen (Deutsch & Englisch) wieder her. Leistungen, Marken, Modelle und Pakete bleiben unangetastet."}),e.jsx("button",{onClick:j,disabled:g,className:"rounded-md border border-red-300 px-4 py-2 text-sm font-semibold text-red-600 hover:bg-red-50 disabled:opacity-50 dark:border-red-900 dark:hover:bg-red-900/20",children:g?"Setze zurück…":"FAQs auf Standard zurücksetzen"}),b&&e.jsx("p",{className:"mt-3 text-sm text-neutral-600 dark:text-neutral-300",children:b})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Nur Bildergalerie zurücksetzen"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Löscht alle aktuellen Galerie-Marken, -Projekte und -Fotos und stellt die komplette Galerie der alten hifi-planet.de-Seite wieder her (13 Marken, 29 Projekte, 207 Fotos). Fahrzeugkatalog, Leistungen und FAQs bleiben unangetastet."}),e.jsx("button",{onClick:N,disabled:k,className:"rounded-md border border-red-300 px-4 py-2 text-sm font-semibold text-red-600 hover:bg-red-50 disabled:opacity-50 dark:border-red-900 dark:hover:bg-red-900/20",children:k?"Setze zurück…":"Galerie auf Standard zurücksetzen"}),x&&e.jsx("p",{className:"mt-3 text-sm text-neutral-600 dark:text-neutral-300",children:x})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Nur Fahrzeugkatalog leeren"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Löscht alle Marken, Modelle, Pakete, Produkte und Upgrades unwiderruflich. Leistungen, Kontaktanfragen und Benutzerkonten bleiben erhalten."}),e.jsx("button",{onClick:M,disabled:f,className:"rounded-md border border-red-300 px-4 py-2 text-sm font-semibold text-red-600 hover:bg-red-50 disabled:opacity-50 dark:border-red-900 dark:hover:bg-red-900/20",children:f?"Leere…":"Fahrzeugkatalog leeren"}),y&&e.jsx("p",{className:"mt-3 text-sm text-neutral-600 dark:text-neutral-300",children:y})]}),e.jsxs("section",{className:"rounded-xl border border-red-300 bg-red-50/40 p-6 dark:border-red-900 dark:bg-red-900/10",children:[e.jsx("h2",{className:"mb-1 font-semibold text-red-700 dark:text-red-300",children:"Alles zurücksetzen"}),e.jsxs("p",{className:"mb-4 text-sm text-neutral-600 dark:text-neutral-300",children:["Kombiniert alles: Fahrzeugkatalog wird komplett geleert ",e.jsx("strong",{children:"und"})," Leistungen, FAQs sowie die Bildergalerie werden auf Standard zurückgesetzt. Kontaktanfragen und Benutzerkonten bleiben erhalten. Nicht rückgängig zu machen."]}),e.jsx("button",{onClick:L,disabled:z,className:"rounded-md bg-red-600 px-4 py-2 text-sm font-semibold text-white hover:bg-red-700 disabled:opacity-50",children:z?"Setze zurück…":"Wirklich alles zurücksetzen"}),w&&e.jsx("p",{className:"mt-3 text-sm text-neutral-700 dark:text-neutral-300",children:w})]})]})}export{B as default}; +import{r,j as e,a}from"./index-D7JbPKAF.js";function B(){const[o,u]=r.useState(!1),[c,s]=r.useState(""),[g,h]=r.useState(!1),[b,n]=r.useState(""),[k,m]=r.useState(!1),[x,l]=r.useState(""),[f,p]=r.useState(!1),[y,d]=r.useState(""),[z,S]=r.useState(!1),[w,i]=r.useState(""),F=async()=>{if(confirm("Alle aktuellen Leistungen werden gelöscht und durch die 8 Standard-Leistungen ersetzt. Fortfahren?")){u(!0),s("");try{const t=await a.post("/settings/reset-services",{});s(`${t.count} Standard-Leistungen wiederhergestellt.`)}catch(t){s("Fehler: "+t.message)}finally{u(!1)}}},j=async()=>{if(confirm("Alle aktuellen FAQ-Einträge werden gelöscht und durch die 6 Standard-Fragen ersetzt. Fortfahren?")){h(!0),n("");try{const t=await a.post("/settings/reset-faqs",{});n(`${t.count} Standard-Fragen wiederhergestellt.`)}catch(t){n("Fehler: "+t.message)}finally{h(!1)}}},N=async()=>{if(confirm("Die komplette Bildergalerie wird gelöscht und durch die 13 Marken/29 Projekte/207 Fotos der alten hifi-planet.de-Seite ersetzt. Fortfahren?")){m(!0),l("");try{const t=await a.post("/settings/reset-gallery",{});l(`${t.photos} Fotos wiederhergestellt.`)}catch(t){l("Fehler: "+t.message)}finally{m(!1)}}},M=async()=>{if(confirm("Alle Marken, Modelle, Pakete, Produkte und Upgrades werden unwiderruflich gelöscht. Leistungen und Kontaktanfragen bleiben erhalten. Fortfahren?")){p(!0),d("");try{const t=await a.post("/settings/reset-catalog",{});d(`Fahrzeugkatalog geleert (${t.brands_removed} Marken entfernt).`)}catch(t){d("Fehler: "+t.message)}finally{p(!1)}}},L=async()=>{if(confirm("WIRKLICH ALLES zurücksetzen? Marken, Modelle, Pakete, Produkte und Upgrades werden gelöscht, Leistungen, FAQs und die Bildergalerie auf Standard zurückgesetzt. Kontaktanfragen und Benutzerkonten bleiben erhalten. Das kann nicht rückgängig gemacht werden!")){S(!0),i("");try{const t=await a.post("/settings/reset-all",{});i(`Erledigt: ${t.brands_removed} Marken entfernt, ${t.services_reset} Standard-Leistungen, ${t.faqs_reset} Standard-Fragen und ${t.gallery_photos_reset} Galerie-Fotos wiederhergestellt.`)}catch(t){i("Fehler: "+t.message)}finally{S(!1)}}};return e.jsxs("div",{className:"max-w-2xl space-y-6",children:[e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Nur Leistungen zurücksetzen"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Löscht alle aktuellen Leistungen-Karten und stellt die 8 mitgelieferten Standard-Leistungen wieder her. Marken, Modelle und Pakete bleiben unangetastet."}),e.jsx("button",{onClick:F,disabled:o,className:"rounded-md border border-red-300 px-4 py-2 text-sm font-semibold text-red-600 hover:bg-red-50 disabled:opacity-50 dark:border-red-900 dark:hover:bg-red-900/20",children:o?"Setze zurück…":"Leistungen auf Standard zurücksetzen"}),c&&e.jsx("p",{className:"mt-3 text-sm text-neutral-600 dark:text-neutral-300",children:c})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Nur FAQs zurücksetzen"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Löscht alle aktuellen Fragen und stellt die 6 mitgelieferten Standard-Fragen (Deutsch & Englisch) wieder her. Leistungen, Marken, Modelle und Pakete bleiben unangetastet."}),e.jsx("button",{onClick:j,disabled:g,className:"rounded-md border border-red-300 px-4 py-2 text-sm font-semibold text-red-600 hover:bg-red-50 disabled:opacity-50 dark:border-red-900 dark:hover:bg-red-900/20",children:g?"Setze zurück…":"FAQs auf Standard zurücksetzen"}),b&&e.jsx("p",{className:"mt-3 text-sm text-neutral-600 dark:text-neutral-300",children:b})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Nur Bildergalerie zurücksetzen"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Löscht alle aktuellen Galerie-Marken, -Projekte und -Fotos und stellt die komplette Galerie der alten hifi-planet.de-Seite wieder her (13 Marken, 29 Projekte, 207 Fotos). Fahrzeugkatalog, Leistungen und FAQs bleiben unangetastet."}),e.jsx("button",{onClick:N,disabled:k,className:"rounded-md border border-red-300 px-4 py-2 text-sm font-semibold text-red-600 hover:bg-red-50 disabled:opacity-50 dark:border-red-900 dark:hover:bg-red-900/20",children:k?"Setze zurück…":"Galerie auf Standard zurücksetzen"}),x&&e.jsx("p",{className:"mt-3 text-sm text-neutral-600 dark:text-neutral-300",children:x})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Nur Fahrzeugkatalog leeren"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Löscht alle Marken, Modelle, Pakete, Produkte und Upgrades unwiderruflich. Leistungen, Kontaktanfragen und Benutzerkonten bleiben erhalten."}),e.jsx("button",{onClick:M,disabled:f,className:"rounded-md border border-red-300 px-4 py-2 text-sm font-semibold text-red-600 hover:bg-red-50 disabled:opacity-50 dark:border-red-900 dark:hover:bg-red-900/20",children:f?"Leere…":"Fahrzeugkatalog leeren"}),y&&e.jsx("p",{className:"mt-3 text-sm text-neutral-600 dark:text-neutral-300",children:y})]}),e.jsxs("section",{className:"rounded-xl border border-red-300 bg-red-50/40 p-6 dark:border-red-900 dark:bg-red-900/10",children:[e.jsx("h2",{className:"mb-1 font-semibold text-red-700 dark:text-red-300",children:"Alles zurücksetzen"}),e.jsxs("p",{className:"mb-4 text-sm text-neutral-600 dark:text-neutral-300",children:["Kombiniert alles: Fahrzeugkatalog wird komplett geleert ",e.jsx("strong",{children:"und"})," Leistungen, FAQs sowie die Bildergalerie werden auf Standard zurückgesetzt. Kontaktanfragen und Benutzerkonten bleiben erhalten. Nicht rückgängig zu machen."]}),e.jsx("button",{onClick:L,disabled:z,className:"rounded-md bg-red-600 px-4 py-2 text-sm font-semibold text-white hover:bg-red-700 disabled:opacity-50",children:z?"Setze zurück…":"Wirklich alles zurücksetzen"}),w&&e.jsx("p",{className:"mt-3 text-sm text-neutral-700 dark:text-neutral-300",children:w})]})]})}export{B as default}; diff --git a/hifi/assets/RichTextEditor-DJwdsoJ6.js b/hifi/assets/RichTextEditor-DSo9zuZu.js similarity index 99% rename from hifi/assets/RichTextEditor-DJwdsoJ6.js rename to hifi/assets/RichTextEditor-DSo9zuZu.js index 90b2a17..5bf0141 100644 --- a/hifi/assets/RichTextEditor-DJwdsoJ6.js +++ b/hifi/assets/RichTextEditor-DSo9zuZu.js @@ -1,4 +1,4 @@ -import{r as q,R as xt,j as R,v as Gu,n as Yu}from"./index-QV-Szw5n.js";var Hl={exports:{}},jl={};/** +import{r as q,R as xt,j as R,v as Gu,n as Yu}from"./index-D7JbPKAF.js";var Hl={exports:{}},jl={};/** * @license React * use-sync-external-store-shim.production.js * diff --git a/hifi/assets/Services-BTvu0ymy.js b/hifi/assets/Services-BS6wXqv9.js similarity index 96% rename from hifi/assets/Services-BTvu0ymy.js rename to hifi/assets/Services-BS6wXqv9.js index ad69d81..401cb03 100644 --- a/hifi/assets/Services-BTvu0ymy.js +++ b/hifi/assets/Services-BS6wXqv9.js @@ -1 +1 @@ -import{r as d,j as e,D as w,a as u}from"./index-QV-Szw5n.js";import{I as y}from"./ImageUploadField-DyLcJG5-.js";import{toComponentName as p,ICON_NAMES as x,findIcon as _}from"./iconRegistry-DUWamfSa.js";import"./eye-YlN_9rkm.js";import"./trash-2-fu7u5OTF.js";function g({name:s,className:i}){const r=_(s);return r?e.jsx(r,{className:i}):null}const I=120,S=200;function C({value:s,onChange:i}){const[r,n]=d.useState(""),l=s?p(s):null,c=d.useMemo(()=>{const a=r.trim().toLowerCase();return a?x.filter(o=>o.includes(a)).slice(0,S):x.slice(0,I)},[r]);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-center gap-3 rounded-md border border-neutral-300 p-2 dark:border-neutral-700",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md bg-brand-100 text-brand-600 dark:bg-brand-900/40 dark:text-brand-400",children:s?e.jsx(g,{name:s,className:"h-6 w-6"}):e.jsx("span",{className:"text-xs text-neutral-400",children:"?"})}),e.jsxs("div",{className:"text-sm",children:[e.jsx("p",{className:"font-medium text-neutral-800 dark:text-neutral-100",children:s||"Kein Icon gewählt"}),e.jsxs("p",{className:"text-xs text-neutral-400",children:[x.length," Icons verfügbar"]})]})]}),e.jsx("input",{value:r,onChange:a=>n(a.target.value),placeholder:"Icon suchen (z. B. car, shield, zap)…",className:"mb-2 w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsxs("div",{className:"grid max-h-64 grid-cols-6 gap-1 overflow-y-auto rounded-md border border-neutral-200 p-2 sm:grid-cols-8 dark:border-neutral-700",children:[c.map(a=>e.jsx("button",{type:"button",title:a,onClick:()=>i(a),className:`flex h-10 w-10 items-center justify-center rounded-md transition ${l===p(a)?"bg-brand-500 text-white":"text-neutral-600 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-neutral-800"}`,children:e.jsx(g,{name:a,className:"h-5 w-5"})},a)),c.length===0&&e.jsx("p",{className:"col-span-full py-4 text-center text-sm text-neutral-400",children:"Keine Icons gefunden."})]}),!r&&e.jsxs("p",{className:"mt-1 text-xs text-neutral-400",children:["Tipp: Tippe einen Suchbegriff ein, um alle ",x.length," Icons zu durchsuchen."]})]})}const j={icon_name:"",title:"",description:"",image_path:"",cta_label:"",cta_url:"",sort_order:0};function T(){const[s,i]=d.useState([]),[r,n]=d.useState(j),[l,c]=d.useState(null),[a,o]=d.useState(""),m=()=>u.get("/services").then(i);d.useEffect(m,[]);const f=t=>{c(t.id),n({icon_name:t.icon_name,title:t.title,description:t.description,image_path:t.image_path||"",cta_label:t.cta_label||"",cta_url:t.cta_url||"",sort_order:t.sort_order})},h=()=>{c(null),n(j)},N=async t=>{if(t.preventDefault(),o(""),!r.icon_name){o("Bitte ein Icon auswählen");return}const b={...r,sort_order:Number(r.sort_order)};try{l?await u.put(`/services/${l}`,b):await u.post("/services",b),h(),m()}catch(v){o(v.message)}},k=async t=>{confirm("Diese Leistung wirklich löschen?")&&(await u.delete(`/services/${t}`),m())};return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Leistungen"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Diese Karten erscheinen auf der öffentlichen Leistungen-Seite. Die 8 mitgelieferten Einträge sind die Standard-Einstellung – du kannst sie bearbeiten, löschen und beliebig neue hinzufügen."}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2",children:"Icon"}),e.jsx("th",{className:"px-4 py-2",children:"Titel"}),e.jsx("th",{className:"px-4 py-2",children:"Sortierung"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),e.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[s.map(t=>e.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[e.jsx("td",{className:"px-4 py-2",children:e.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-full bg-brand-100 text-brand-600 dark:bg-brand-900/40 dark:text-brand-400",children:e.jsx(w,{name:t.icon_name,className:"h-5 w-5"})})}),e.jsx("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:t.title}),e.jsx("td",{className:"px-4 py-2",children:t.sort_order}),e.jsxs("td",{className:"px-4 py-2 text-right",children:[e.jsx("button",{onClick:()=>f(t),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),e.jsx("button",{onClick:()=>k(t.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},t.id)),s.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Leistungen angelegt."})})]})]})})]}),e.jsxs("form",{onSubmit:N,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:l?"Leistung bearbeiten":"Neue Leistung"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Icon *"}),e.jsx(C,{value:r.icon_name,onChange:t=>n({...r,icon_name:t})})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Name *"}),e.jsx("input",{required:!0,value:r.title,onChange:t=>n({...r,title:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Beschreibung *"}),e.jsx("textarea",{required:!0,rows:4,value:r.description,onChange:t=>n({...r,description:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsx(y,{value:r.image_path,onChange:t=>n({...r,image_path:t}),aspect:4/3,label:"Bild"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Button-Text (optional)"}),e.jsx("input",{value:r.cta_label,onChange:t=>n({...r,cta_label:t.target.value}),placeholder:"z. B. Fahrzeug konfigurieren",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Button-Link (optional)"}),e.jsx("input",{value:r.cta_url,onChange:t=>n({...r,cta_url:t.target.value}),placeholder:"z. B. /fahrzeuge",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),e.jsx("input",{type:"number",value:r.sort_order,onChange:t=>n({...r,sort_order:Number(t.target.value)}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a&&e.jsx("p",{className:"text-sm text-red-600",children:a}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:l?"Speichern":"Anlegen"}),l&&e.jsx("button",{type:"button",onClick:h,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}export{T as default}; +import{r as d,j as e,D as w,a as u}from"./index-D7JbPKAF.js";import{I as y}from"./ImageUploadField-Dz5jsGY3.js";import{toComponentName as p,ICON_NAMES as x,findIcon as _}from"./iconRegistry-BKlgDlOd.js";import"./eye-zEWyQJeC.js";import"./trash-2-D2g7JxqJ.js";function g({name:s,className:i}){const r=_(s);return r?e.jsx(r,{className:i}):null}const I=120,S=200;function C({value:s,onChange:i}){const[r,n]=d.useState(""),l=s?p(s):null,c=d.useMemo(()=>{const a=r.trim().toLowerCase();return a?x.filter(o=>o.includes(a)).slice(0,S):x.slice(0,I)},[r]);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-center gap-3 rounded-md border border-neutral-300 p-2 dark:border-neutral-700",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md bg-brand-100 text-brand-600 dark:bg-brand-900/40 dark:text-brand-400",children:s?e.jsx(g,{name:s,className:"h-6 w-6"}):e.jsx("span",{className:"text-xs text-neutral-400",children:"?"})}),e.jsxs("div",{className:"text-sm",children:[e.jsx("p",{className:"font-medium text-neutral-800 dark:text-neutral-100",children:s||"Kein Icon gewählt"}),e.jsxs("p",{className:"text-xs text-neutral-400",children:[x.length," Icons verfügbar"]})]})]}),e.jsx("input",{value:r,onChange:a=>n(a.target.value),placeholder:"Icon suchen (z. B. car, shield, zap)…",className:"mb-2 w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsxs("div",{className:"grid max-h-64 grid-cols-6 gap-1 overflow-y-auto rounded-md border border-neutral-200 p-2 sm:grid-cols-8 dark:border-neutral-700",children:[c.map(a=>e.jsx("button",{type:"button",title:a,onClick:()=>i(a),className:`flex h-10 w-10 items-center justify-center rounded-md transition ${l===p(a)?"bg-brand-500 text-white":"text-neutral-600 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-neutral-800"}`,children:e.jsx(g,{name:a,className:"h-5 w-5"})},a)),c.length===0&&e.jsx("p",{className:"col-span-full py-4 text-center text-sm text-neutral-400",children:"Keine Icons gefunden."})]}),!r&&e.jsxs("p",{className:"mt-1 text-xs text-neutral-400",children:["Tipp: Tippe einen Suchbegriff ein, um alle ",x.length," Icons zu durchsuchen."]})]})}const j={icon_name:"",title:"",description:"",image_path:"",cta_label:"",cta_url:"",sort_order:0};function T(){const[s,i]=d.useState([]),[r,n]=d.useState(j),[l,c]=d.useState(null),[a,o]=d.useState(""),m=()=>u.get("/services").then(i);d.useEffect(m,[]);const f=t=>{c(t.id),n({icon_name:t.icon_name,title:t.title,description:t.description,image_path:t.image_path||"",cta_label:t.cta_label||"",cta_url:t.cta_url||"",sort_order:t.sort_order})},h=()=>{c(null),n(j)},N=async t=>{if(t.preventDefault(),o(""),!r.icon_name){o("Bitte ein Icon auswählen");return}const b={...r,sort_order:Number(r.sort_order)};try{l?await u.put(`/services/${l}`,b):await u.post("/services",b),h(),m()}catch(v){o(v.message)}},k=async t=>{confirm("Diese Leistung wirklich löschen?")&&(await u.delete(`/services/${t}`),m())};return e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Leistungen"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Diese Karten erscheinen auf der öffentlichen Leistungen-Seite. Die 8 mitgelieferten Einträge sind die Standard-Einstellung – du kannst sie bearbeiten, löschen und beliebig neue hinzufügen."}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"bg-neutral-50 text-neutral-500 dark:bg-neutral-900 dark:text-neutral-400",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2",children:"Icon"}),e.jsx("th",{className:"px-4 py-2",children:"Titel"}),e.jsx("th",{className:"px-4 py-2",children:"Sortierung"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Aktionen"})]})}),e.jsxs("tbody",{className:"divide-y divide-neutral-100 dark:divide-neutral-800",children:[s.map(t=>e.jsxs("tr",{className:"bg-white dark:bg-neutral-950",children:[e.jsx("td",{className:"px-4 py-2",children:e.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-full bg-brand-100 text-brand-600 dark:bg-brand-900/40 dark:text-brand-400",children:e.jsx(w,{name:t.icon_name,className:"h-5 w-5"})})}),e.jsx("td",{className:"px-4 py-2 font-medium text-neutral-800 dark:text-neutral-100",children:t.title}),e.jsx("td",{className:"px-4 py-2",children:t.sort_order}),e.jsxs("td",{className:"px-4 py-2 text-right",children:[e.jsx("button",{onClick:()=>f(t),className:"mr-3 text-brand-600 hover:underline",children:"Bearbeiten"}),e.jsx("button",{onClick:()=>k(t.id),className:"text-red-600 hover:underline",children:"Löschen"})]})]},t.id)),s.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"px-4 py-6 text-center text-neutral-400",children:"Noch keine Leistungen angelegt."})})]})]})})]}),e.jsxs("form",{onSubmit:N,className:"h-fit space-y-4 rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"font-bold text-neutral-900 dark:text-white",children:l?"Leistung bearbeiten":"Neue Leistung"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Icon *"}),e.jsx(C,{value:r.icon_name,onChange:t=>n({...r,icon_name:t})})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Name *"}),e.jsx("input",{required:!0,value:r.title,onChange:t=>n({...r,title:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Beschreibung *"}),e.jsx("textarea",{required:!0,rows:4,value:r.description,onChange:t=>n({...r,description:t.target.value}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsx(y,{value:r.image_path,onChange:t=>n({...r,image_path:t}),aspect:4/3,label:"Bild"}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Button-Text (optional)"}),e.jsx("input",{value:r.cta_label,onChange:t=>n({...r,cta_label:t.target.value}),placeholder:"z. B. Fahrzeug konfigurieren",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Button-Link (optional)"}),e.jsx("input",{value:r.cta_url,onChange:t=>n({...r,cta_url:t.target.value}),placeholder:"z. B. /fahrzeuge",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Sortierung"}),e.jsx("input",{type:"number",value:r.sort_order,onChange:t=>n({...r,sort_order:Number(t.target.value)}),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),a&&e.jsx("p",{className:"text-sm text-red-600",children:a}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"submit",className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:l?"Speichern":"Anlegen"}),l&&e.jsx("button",{type:"button",onClick:h,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:"Abbrechen"})]})]})]})}export{T as default}; diff --git a/hifi/assets/SettingsLayout-C5JQlIqD.js b/hifi/assets/SettingsLayout-DBaO9_MT.js similarity index 95% rename from hifi/assets/SettingsLayout-C5JQlIqD.js rename to hifi/assets/SettingsLayout-DBaO9_MT.js index 697d6a9..16a571f 100644 --- a/hifi/assets/SettingsLayout-C5JQlIqD.js +++ b/hifi/assets/SettingsLayout-DBaO9_MT.js @@ -1 +1 @@ -import{b as l,j as t,p as i,r,O as m}from"./index-QV-Szw5n.js";const o=[{to:"/admin/settings/website",label:"Website"},{to:"/admin/settings/legal",label:"Rechtstexte"},{to:"/admin/settings/email",label:"E-Mail"},{to:"/admin/settings/database",label:"Datenbank"},{to:"/admin/settings/export-import",label:"Export & Import"},{to:"/admin/settings/maintenance",label:"Wartungsmodus"},{to:"/admin/settings/update",label:"Updates",permission:"system.update"},{to:"/admin/settings/reset",label:"Zurücksetzen"}];function u(){const{hasPermission:s}=l(),a=o.filter(e=>!e.permission||s(e.permission)),n=({isActive:e})=>`rounded-md px-4 py-2 text-sm font-medium transition ${e?"bg-brand-500 text-white":"text-neutral-600 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-neutral-800"}`;return t.jsxs("div",{children:[t.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Einstellungen"}),t.jsx("p",{className:"mb-5 text-sm text-neutral-500 dark:text-neutral-400",children:"Werkzeuge rund um Datenbank, Server-Umzug und Zurücksetzen dieser Seite."}),t.jsx("nav",{className:"mb-6 flex flex-wrap gap-2",children:a.map(e=>t.jsx(i,{to:e.to,className:n,children:e.label},e.to))}),t.jsx(r.Suspense,{fallback:t.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}),children:t.jsx(m,{})})]})}export{u as default}; +import{b as l,j as t,p as i,r,O as m}from"./index-D7JbPKAF.js";const o=[{to:"/admin/settings/website",label:"Website"},{to:"/admin/settings/legal",label:"Rechtstexte"},{to:"/admin/settings/email",label:"E-Mail"},{to:"/admin/settings/database",label:"Datenbank"},{to:"/admin/settings/export-import",label:"Export & Import"},{to:"/admin/settings/maintenance",label:"Wartungsmodus"},{to:"/admin/settings/update",label:"Updates",permission:"system.update"},{to:"/admin/settings/reset",label:"Zurücksetzen"}];function u(){const{hasPermission:s}=l(),a=o.filter(e=>!e.permission||s(e.permission)),n=({isActive:e})=>`rounded-md px-4 py-2 text-sm font-medium transition ${e?"bg-brand-500 text-white":"text-neutral-600 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-neutral-800"}`;return t.jsxs("div",{children:[t.jsx("h1",{className:"mb-1 text-xl font-bold text-neutral-900 dark:text-white",children:"Einstellungen"}),t.jsx("p",{className:"mb-5 text-sm text-neutral-500 dark:text-neutral-400",children:"Werkzeuge rund um Datenbank, Server-Umzug und Zurücksetzen dieser Seite."}),t.jsx("nav",{className:"mb-6 flex flex-wrap gap-2",children:a.map(e=>t.jsx(i,{to:e.to,className:n,children:e.label},e.to))}),t.jsx(r.Suspense,{fallback:t.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}),children:t.jsx(m,{})})]})}export{u as default}; diff --git a/hifi/assets/SetupWizard-Cu-s4Wuc.js b/hifi/assets/SetupWizard-CnDw-GC8.js similarity index 98% rename from hifi/assets/SetupWizard-Cu-s4Wuc.js rename to hifi/assets/SetupWizard-CnDw-GC8.js index 37e9fa8..1bd2ae8 100644 --- a/hifi/assets/SetupWizard-Cu-s4Wuc.js +++ b/hifi/assets/SetupWizard-CnDw-GC8.js @@ -1 +1 @@ -import{u as E,r as x,a as b,j as e,l as P,L as k}from"./index-QV-Szw5n.js";const F={host:"",name:"",user:"",password:"",charset:"utf8mb4"},L={username:"",password:"",password_confirmation:""};function z(){E({title:"Ersteinrichtung",path:"/setup"});const[n,c]=x.useState("loading"),[m,r]=x.useState(""),[u,o]=x.useState(!1),[f,v]=x.useState(""),[a,h]=x.useState(F),[l,p]=x.useState(L),[w,y]=x.useState(null),N=()=>b.get("/setup/status").then(t=>(t.needs_setup?t.steps.admin.ok?c("done"):t.steps.schema.ok?c("admin"):c(t.steps.database.ok?"schema":"database"):c("locked"),t));x.useEffect(()=>{b.get("/setup/status").then(t=>c(t.needs_setup?"password":"locked")).catch(()=>c("locked"))},[]);const D=async t=>{t.preventDefault(),r(""),o(!0);try{await b.post("/setup/verify-password",{password:f}),await N()}catch(s){r(s.message)}finally{o(!1)}},S=async t=>{t.preventDefault(),r(""),o(!0);try{await b.post("/setup/database",a),await N()}catch(s){r(s.message)}finally{o(!1)}},A=async()=>{r(""),o(!0);try{const t=await b.post("/setup/migrate",{});y(t.actions),t.status.steps.schema.ok&&c("admin")}catch(t){r(t.message)}finally{o(!1)}},C=async t=>{if(t.preventDefault(),r(""),l.password!==l.password_confirmation){r("Die Passwörter stimmen nicht überein");return}o(!0);try{await b.post("/setup/admin",l),c("done")}catch(s){r(s.message)}finally{o(!1)}},d="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",i="mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",g=[{key:"database",label:"Datenbank"},{key:"schema",label:"Struktur"},{key:"admin",label:"Admin-Account"}],j=g.findIndex(t=>t.key===n);return e.jsxs("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-neutral-50 px-4 py-12 dark:bg-neutral-950",children:[e.jsx("img",{src:P,alt:"HifiPlanet",className:"h-16 w-auto sm:h-20"}),e.jsxs("div",{className:"w-full max-w-md rounded-xl border border-neutral-200 bg-white p-8 shadow-sm dark:border-neutral-800 dark:bg-neutral-900",children:[n==="loading"&&e.jsx("p",{className:"text-center text-sm text-neutral-400",children:"Lädt…"}),n==="locked"&&e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:"Bereits eingerichtet"}),e.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:"Diese Seite wurde bereits vollständig eingerichtet. Der Assistent ist deshalb gesperrt."}),e.jsx(k,{to:"/admin/login",className:"text-sm font-medium text-brand-600 hover:underline dark:text-brand-400",children:"Zum Login"})]}),["database","schema","admin"].includes(n)&&e.jsx("div",{className:"mb-6 flex items-center justify-center gap-2",children:g.map((t,s)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`flex h-6 w-6 items-center justify-center rounded-full text-xs font-semibold ${sv(t.target.value),required:!0,autoFocus:!0,className:d})]}),m&&e.jsx("p",{className:"mb-4 text-sm text-red-600",children:m}),e.jsx("button",{type:"submit",disabled:u,className:"w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:u?"Prüfe…":"Weiter"})]}),n==="database"&&e.jsxs("form",{onSubmit:S,children:[e.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:"Datenbank-Zugangsdaten"}),e.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:"Trage die Zugangsdaten der Datenbank auf diesem Server ein. Die Verbindung wird vor dem Speichern getestet."}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:i,children:"Host *"}),e.jsx("input",{required:!0,value:a.host,onChange:t=>h({...a,host:t.target.value}),className:d})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:i,children:"Datenbankname *"}),e.jsx("input",{required:!0,value:a.name,onChange:t=>h({...a,name:t.target.value}),className:d})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:i,children:"Benutzer *"}),e.jsx("input",{required:!0,value:a.user,onChange:t=>h({...a,user:t.target.value}),className:d})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:i,children:"Passwort"}),e.jsx("input",{type:"password",value:a.password,onChange:t=>h({...a,password:t.target.value}),className:d})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:i,children:"Zeichensatz"}),e.jsx("input",{value:a.charset,onChange:t=>h({...a,charset:t.target.value}),className:d})]}),m&&e.jsx("p",{className:"mb-4 text-sm text-red-600",children:m}),e.jsx("button",{type:"submit",disabled:u,className:"w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:u?"Teste Verbindung…":"Verbindung testen & speichern"})]}),n==="schema"&&e.jsxs("div",{children:[e.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:"Datenbankstruktur"}),e.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:"Die Datenbankverbindung funktioniert. Jetzt legen wir die benötigten Tabellen an."}),w&&e.jsx("ul",{className:"mb-4 space-y-1 rounded-md bg-neutral-50 p-3 text-sm text-neutral-700 dark:bg-neutral-800 dark:text-neutral-300",children:w.map((t,s)=>e.jsx("li",{children:t},s))}),m&&e.jsx("p",{className:"mb-4 text-sm text-red-600",children:m}),e.jsx("button",{type:"button",onClick:A,disabled:u,className:"w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:u?"Richte ein…":"Datenbankstruktur einrichten"})]}),n==="admin"&&e.jsxs("form",{onSubmit:C,children:[e.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:"Erster Admin-Account"}),e.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:"Lege den ersten Super-Admin-Account an, mit dem du dich anschließend einloggen kannst."}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:i,children:"Benutzername"}),e.jsx("input",{required:!0,autoFocus:!0,value:l.username,onChange:t=>p({...l,username:t.target.value}),className:d})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:i,children:"Passwort"}),e.jsx("input",{type:"password",required:!0,minLength:8,value:l.password,onChange:t=>p({...l,password:t.target.value}),className:d})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:i,children:"Passwort wiederholen"}),e.jsx("input",{type:"password",required:!0,minLength:8,value:l.password_confirmation,onChange:t=>p({...l,password_confirmation:t.target.value}),className:d})]}),m&&e.jsx("p",{className:"mb-4 text-sm text-red-600",children:m}),e.jsx("button",{type:"submit",disabled:u,className:"w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:u?"Lege an…":"Admin-Account anlegen"})]}),n==="done"&&e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:"Fertig!"}),e.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:"Die Ersteinrichtung ist abgeschlossen. Du kannst dich jetzt mit deinem neuen Admin-Account anmelden."}),e.jsx(k,{to:"/admin/login",className:"inline-block w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600",children:"Zum Login"})]})]})]})}export{z as default}; +import{u as E,r as x,a as b,j as e,l as P,L as k}from"./index-D7JbPKAF.js";const F={host:"",name:"",user:"",password:"",charset:"utf8mb4"},L={username:"",password:"",password_confirmation:""};function z(){E({title:"Ersteinrichtung",path:"/setup"});const[n,c]=x.useState("loading"),[m,r]=x.useState(""),[u,o]=x.useState(!1),[f,v]=x.useState(""),[a,h]=x.useState(F),[l,p]=x.useState(L),[w,y]=x.useState(null),N=()=>b.get("/setup/status").then(t=>(t.needs_setup?t.steps.admin.ok?c("done"):t.steps.schema.ok?c("admin"):c(t.steps.database.ok?"schema":"database"):c("locked"),t));x.useEffect(()=>{b.get("/setup/status").then(t=>c(t.needs_setup?"password":"locked")).catch(()=>c("locked"))},[]);const D=async t=>{t.preventDefault(),r(""),o(!0);try{await b.post("/setup/verify-password",{password:f}),await N()}catch(s){r(s.message)}finally{o(!1)}},S=async t=>{t.preventDefault(),r(""),o(!0);try{await b.post("/setup/database",a),await N()}catch(s){r(s.message)}finally{o(!1)}},A=async()=>{r(""),o(!0);try{const t=await b.post("/setup/migrate",{});y(t.actions),t.status.steps.schema.ok&&c("admin")}catch(t){r(t.message)}finally{o(!1)}},C=async t=>{if(t.preventDefault(),r(""),l.password!==l.password_confirmation){r("Die Passwörter stimmen nicht überein");return}o(!0);try{await b.post("/setup/admin",l),c("done")}catch(s){r(s.message)}finally{o(!1)}},d="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",i="mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",g=[{key:"database",label:"Datenbank"},{key:"schema",label:"Struktur"},{key:"admin",label:"Admin-Account"}],j=g.findIndex(t=>t.key===n);return e.jsxs("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-neutral-50 px-4 py-12 dark:bg-neutral-950",children:[e.jsx("img",{src:P,alt:"HifiPlanet",className:"h-16 w-auto sm:h-20"}),e.jsxs("div",{className:"w-full max-w-md rounded-xl border border-neutral-200 bg-white p-8 shadow-sm dark:border-neutral-800 dark:bg-neutral-900",children:[n==="loading"&&e.jsx("p",{className:"text-center text-sm text-neutral-400",children:"Lädt…"}),n==="locked"&&e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:"Bereits eingerichtet"}),e.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:"Diese Seite wurde bereits vollständig eingerichtet. Der Assistent ist deshalb gesperrt."}),e.jsx(k,{to:"/admin/login",className:"text-sm font-medium text-brand-600 hover:underline dark:text-brand-400",children:"Zum Login"})]}),["database","schema","admin"].includes(n)&&e.jsx("div",{className:"mb-6 flex items-center justify-center gap-2",children:g.map((t,s)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`flex h-6 w-6 items-center justify-center rounded-full text-xs font-semibold ${sv(t.target.value),required:!0,autoFocus:!0,className:d})]}),m&&e.jsx("p",{className:"mb-4 text-sm text-red-600",children:m}),e.jsx("button",{type:"submit",disabled:u,className:"w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:u?"Prüfe…":"Weiter"})]}),n==="database"&&e.jsxs("form",{onSubmit:S,children:[e.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:"Datenbank-Zugangsdaten"}),e.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:"Trage die Zugangsdaten der Datenbank auf diesem Server ein. Die Verbindung wird vor dem Speichern getestet."}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:i,children:"Host *"}),e.jsx("input",{required:!0,value:a.host,onChange:t=>h({...a,host:t.target.value}),className:d})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:i,children:"Datenbankname *"}),e.jsx("input",{required:!0,value:a.name,onChange:t=>h({...a,name:t.target.value}),className:d})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:i,children:"Benutzer *"}),e.jsx("input",{required:!0,value:a.user,onChange:t=>h({...a,user:t.target.value}),className:d})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:i,children:"Passwort"}),e.jsx("input",{type:"password",value:a.password,onChange:t=>h({...a,password:t.target.value}),className:d})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:i,children:"Zeichensatz"}),e.jsx("input",{value:a.charset,onChange:t=>h({...a,charset:t.target.value}),className:d})]}),m&&e.jsx("p",{className:"mb-4 text-sm text-red-600",children:m}),e.jsx("button",{type:"submit",disabled:u,className:"w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:u?"Teste Verbindung…":"Verbindung testen & speichern"})]}),n==="schema"&&e.jsxs("div",{children:[e.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:"Datenbankstruktur"}),e.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:"Die Datenbankverbindung funktioniert. Jetzt legen wir die benötigten Tabellen an."}),w&&e.jsx("ul",{className:"mb-4 space-y-1 rounded-md bg-neutral-50 p-3 text-sm text-neutral-700 dark:bg-neutral-800 dark:text-neutral-300",children:w.map((t,s)=>e.jsx("li",{children:t},s))}),m&&e.jsx("p",{className:"mb-4 text-sm text-red-600",children:m}),e.jsx("button",{type:"button",onClick:A,disabled:u,className:"w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:u?"Richte ein…":"Datenbankstruktur einrichten"})]}),n==="admin"&&e.jsxs("form",{onSubmit:C,children:[e.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:"Erster Admin-Account"}),e.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:"Lege den ersten Super-Admin-Account an, mit dem du dich anschließend einloggen kannst."}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:i,children:"Benutzername"}),e.jsx("input",{required:!0,autoFocus:!0,value:l.username,onChange:t=>p({...l,username:t.target.value}),className:d})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:i,children:"Passwort"}),e.jsx("input",{type:"password",required:!0,minLength:8,value:l.password,onChange:t=>p({...l,password:t.target.value}),className:d})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{className:i,children:"Passwort wiederholen"}),e.jsx("input",{type:"password",required:!0,minLength:8,value:l.password_confirmation,onChange:t=>p({...l,password_confirmation:t.target.value}),className:d})]}),m&&e.jsx("p",{className:"mb-4 text-sm text-red-600",children:m}),e.jsx("button",{type:"submit",disabled:u,className:"w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-60",children:u?"Lege an…":"Admin-Account anlegen"})]}),n==="done"&&e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:"Fertig!"}),e.jsx("p",{className:"mb-6 text-sm text-neutral-500 dark:text-neutral-400",children:"Die Ersteinrichtung ist abgeschlossen. Du kannst dich jetzt mit deinem neuen Admin-Account anmelden."}),e.jsx(k,{to:"/admin/login",className:"inline-block w-full rounded-md bg-brand-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-600",children:"Zum Login"})]})]})]})}export{z as default}; diff --git a/hifi/assets/TextStyleWidget-Czb7ujSZ.js b/hifi/assets/TextStyleWidget-DvjoGL1J.js similarity index 97% rename from hifi/assets/TextStyleWidget-Czb7ujSZ.js rename to hifi/assets/TextStyleWidget-DvjoGL1J.js index 3953dc6..45f4fc1 100644 --- a/hifi/assets/TextStyleWidget-Czb7ujSZ.js +++ b/hifi/assets/TextStyleWidget-DvjoGL1J.js @@ -1 +1 @@ -import{n as g,r as l,a as x,j as t}from"./index-QV-Szw5n.js";const y=[{label:"Standard",value:""},{label:"S (14px)",value:"14px"},{label:"M (16px)",value:"16px"},{label:"L (18px)",value:"18px"},{label:"XL (20px)",value:"20px"},{label:"XXL (24px)",value:"24px"},{label:"XXXL (28px)",value:"28px"},{label:"Groß (36px)",value:"36px"},{label:"Riesig (48px)",value:"48px"}],s={font_family:"",font_size:"",color:""};function k({fieldKey:n,previewText:p="Beispieltext",label:c="Stil"}){const b=g(),[a,o]=l.useState(s),[m,u]=l.useState(!0),[d,i]=l.useState("");l.useEffect(()=>{u(!0),x.get(`/text-styles/one?key=${encodeURIComponent(n)}`).then(e=>o({font_family:e.font_family||"",font_size:e.font_size||"",color:e.color||""})).catch(()=>o(s)).finally(()=>u(!1))},[n]);const r=async e=>{o(e),i("");try{await x.put("/text-styles",{field_key:n,...e})}catch(v){i(v.message)}};if(m)return null;const f={fontFamily:a.font_family||void 0,fontSize:a.font_size||void 0,color:a.color||void 0};return t.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-2 rounded-md border border-neutral-200 bg-neutral-50 p-2 dark:border-neutral-700 dark:bg-neutral-800/50",children:[t.jsx("span",{className:"text-xs font-medium uppercase tracking-wide text-neutral-400",children:c}),t.jsx("select",{value:a.font_family,onChange:e=>r({...a,font_family:e.target.value}),className:"rounded-md border border-neutral-300 bg-white px-2 py-1 text-xs dark:border-neutral-700 dark:bg-neutral-900",children:b.map(e=>t.jsx("option",{value:e.value,children:e.label},e.label))}),t.jsx("select",{value:a.font_size,onChange:e=>r({...a,font_size:e.target.value}),className:"rounded-md border border-neutral-300 bg-white px-2 py-1 text-xs dark:border-neutral-700 dark:bg-neutral-900",children:y.map(e=>t.jsx("option",{value:e.value,children:e.label},e.label))}),t.jsx("input",{type:"color",value:a.color||"#000000",onChange:e=>r({...a,color:e.target.value}),className:"h-7 w-9 cursor-pointer rounded border border-neutral-300 bg-white p-0.5 dark:border-neutral-700 dark:bg-neutral-900",title:"Textfarbe"}),t.jsx("button",{type:"button",onClick:()=>r(s),className:"rounded-md border border-neutral-300 px-2 py-1 text-xs text-neutral-500 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-400 dark:hover:bg-neutral-700",children:"Zurücksetzen"}),t.jsx("span",{className:"ml-1 rounded px-2 py-1 text-sm",style:f,children:p}),d&&t.jsx("span",{className:"text-xs text-red-600",children:d})]})}export{k as T}; +import{n as g,r as l,a as x,j as t}from"./index-D7JbPKAF.js";const y=[{label:"Standard",value:""},{label:"S (14px)",value:"14px"},{label:"M (16px)",value:"16px"},{label:"L (18px)",value:"18px"},{label:"XL (20px)",value:"20px"},{label:"XXL (24px)",value:"24px"},{label:"XXXL (28px)",value:"28px"},{label:"Groß (36px)",value:"36px"},{label:"Riesig (48px)",value:"48px"}],s={font_family:"",font_size:"",color:""};function k({fieldKey:n,previewText:p="Beispieltext",label:c="Stil"}){const b=g(),[a,o]=l.useState(s),[m,u]=l.useState(!0),[d,i]=l.useState("");l.useEffect(()=>{u(!0),x.get(`/text-styles/one?key=${encodeURIComponent(n)}`).then(e=>o({font_family:e.font_family||"",font_size:e.font_size||"",color:e.color||""})).catch(()=>o(s)).finally(()=>u(!1))},[n]);const r=async e=>{o(e),i("");try{await x.put("/text-styles",{field_key:n,...e})}catch(v){i(v.message)}};if(m)return null;const f={fontFamily:a.font_family||void 0,fontSize:a.font_size||void 0,color:a.color||void 0};return t.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-2 rounded-md border border-neutral-200 bg-neutral-50 p-2 dark:border-neutral-700 dark:bg-neutral-800/50",children:[t.jsx("span",{className:"text-xs font-medium uppercase tracking-wide text-neutral-400",children:c}),t.jsx("select",{value:a.font_family,onChange:e=>r({...a,font_family:e.target.value}),className:"rounded-md border border-neutral-300 bg-white px-2 py-1 text-xs dark:border-neutral-700 dark:bg-neutral-900",children:b.map(e=>t.jsx("option",{value:e.value,children:e.label},e.label))}),t.jsx("select",{value:a.font_size,onChange:e=>r({...a,font_size:e.target.value}),className:"rounded-md border border-neutral-300 bg-white px-2 py-1 text-xs dark:border-neutral-700 dark:bg-neutral-900",children:y.map(e=>t.jsx("option",{value:e.value,children:e.label},e.label))}),t.jsx("input",{type:"color",value:a.color||"#000000",onChange:e=>r({...a,color:e.target.value}),className:"h-7 w-9 cursor-pointer rounded border border-neutral-300 bg-white p-0.5 dark:border-neutral-700 dark:bg-neutral-900",title:"Textfarbe"}),t.jsx("button",{type:"button",onClick:()=>r(s),className:"rounded-md border border-neutral-300 px-2 py-1 text-xs text-neutral-500 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-400 dark:hover:bg-neutral-700",children:"Zurücksetzen"}),t.jsx("span",{className:"ml-1 rounded px-2 py-1 text-sm",style:f,children:p}),d&&t.jsx("span",{className:"text-xs text-red-600",children:d})]})}export{k as T}; diff --git a/hifi/assets/UpdateSettings-CQNnNfsJ.js b/hifi/assets/UpdateSettings-QieYS0cn.js similarity index 99% rename from hifi/assets/UpdateSettings-CQNnNfsJ.js rename to hifi/assets/UpdateSettings-QieYS0cn.js index 0bde674..07bacef 100644 --- a/hifi/assets/UpdateSettings-CQNnNfsJ.js +++ b/hifi/assets/UpdateSettings-QieYS0cn.js @@ -1 +1 @@ -import{r,j as e,a as i}from"./index-QV-Szw5n.js";const z={download:"Herunterladen",extract:"Entpacken",backup:"Sichern",apply:"Installieren"};function C(a){return a?a.slice(0,7):"–"}function A(a){return a?new Date(a).toLocaleString("de-DE"):"–"}function O(){const[a,y]=r.useState(null),[n,S]=r.useState(null),[R,v]=r.useState(!0),[_,B]=r.useState(""),[h,E]=r.useState([]),[b,P]=r.useState(!1),[m,U]=r.useState(!1),[u,o]=r.useState({download:null,extract:null,backup:null,apply:null}),[g,p]=r.useState(""),[f,j]=r.useState(null),k=()=>{v(!0),B(""),Promise.all([i.get("/settings/update-status"),i.get("/settings/update-check")]).then(([t,s])=>{y(t),S(s)}).catch(t=>B(t.message)).finally(()=>v(!1)),i.get("/settings/update-branches").then(t=>E(t.branches||[])).catch(()=>E([]))},H=async t=>{P(!0),p(""),j(null);try{const s=await i.post("/settings/update-branch",{branch:t});S(s),y(d=>d&&{...d,branch:t})}catch(s){p(s.message)}finally{P(!1)}};r.useEffect(k,[]);const I=async()=>{U(!0),p(""),j(null),o({download:"busy",extract:null,backup:null,apply:null});try{const s=(await i.post("/settings/update-download",{})).run_id;o(l=>({...l,download:"done",extract:"busy"})),await i.post("/settings/update-extract",{run_id:s}),o(l=>({...l,extract:"done",backup:"busy"})),await i.post("/settings/update-backup",{}),o(l=>({...l,backup:"done",apply:"busy"}));const d=await i.post("/settings/update-apply",{run_id:s});o(l=>({...l,apply:"done"})),j(d.log||[]),k()}catch(t){o(s=>{const d=Object.keys(s).find(l=>s[l]==="busy");return d?{...s,[d]:"error"}:s}),p(t.message)}finally{U(!1)}};if(R)return e.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"});const N=(a==null?void 0:a.capabilities)||{},D=N.zip?N.http_client?N.writable?null:"Das Website-Verzeichnis ist für PHP nicht beschreibbar - bitte Dateiberechtigungen prüfen.":"Diese Funktion benötigt ausgehende HTTPS-Verbindungen (curl oder allow_url_fopen), die auf diesem Server aktuell nicht verfügbar sind.":'Diese Funktion benötigt die PHP-Erweiterung "zip", die auf diesem Server aktuell nicht aktiviert ist. Bitte beim Hoster aktivieren lassen.',w=n==null?void 0:n.update_available,c=(a==null?void 0:a.branch)||"main",x=a==null?void 0:a.deployed_branch,L=!!x&&x!==c,F=h.some(t=>t.name===c)?h:[{name:c},...h];return e.jsx("div",{className:"max-w-2xl space-y-6",children:e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Updates aus Git"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:'Zieht den aktuellen Stand direkt vom Code-Repository und installiert ihn hier - ohne manuellen FTP-Upload. Passiert nur, wenn du unten aktiv auf "Update installieren" klickst, nie automatisch im Hintergrund.'}),_&&e.jsx("p",{className:"mb-3 text-sm text-red-600",children:_}),D?e.jsx("p",{className:"rounded-md bg-amber-50 p-3 text-sm text-amber-800 dark:bg-amber-900/20 dark:text-amber-300",children:D}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{htmlFor:"update-branch",className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-200",children:"Branch"}),e.jsx("select",{id:"update-branch",value:c,onChange:t=>H(t.target.value),disabled:m||b,className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm disabled:opacity-50 dark:border-neutral-700 dark:bg-neutral-800 dark:text-neutral-100",children:F.map(t=>e.jsxs("option",{value:t.name,children:[t.name,t.message?` – ${t.message}`:""]},t.name))}),e.jsx("p",{className:"mt-1 text-xs text-neutral-500 dark:text-neutral-400",children:"Von diesem Branch wird installiert. Zum Zurückwechseln einfach wieder „main“ wählen und installieren – vorher wird wie immer eine Sicherung angelegt."})]}),e.jsxs("div",{className:"mb-4 grid grid-cols-2 gap-3 text-sm",children:[e.jsxs("div",{className:"rounded-md bg-neutral-50 p-3 dark:bg-neutral-800/50",children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-neutral-400",children:"Installiert"}),e.jsxs("p",{className:"font-mono text-neutral-800 dark:text-neutral-100",children:[C(a==null?void 0:a.deployed_sha),x&&e.jsxs("span",{className:"ml-2 font-sans text-xs text-neutral-400",children:["(",x,")"]})]}),e.jsx("p",{className:"text-xs text-neutral-400",children:A(a==null?void 0:a.deployed_at)})]}),e.jsxs("div",{className:"rounded-md bg-neutral-50 p-3 dark:bg-neutral-800/50",children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-neutral-400",children:"Neuester Stand"}),e.jsxs("p",{className:"font-mono text-neutral-800 dark:text-neutral-100",children:[C(n==null?void 0:n.latest_sha),e.jsxs("span",{className:"ml-2 font-sans text-xs text-neutral-400",children:["(",c,")"]})]}),(n==null?void 0:n.latest_message)&&e.jsx("p",{className:"truncate text-xs text-neutral-400",title:n.latest_message,children:n.latest_message})]})]}),L&&w?e.jsxs("p",{className:"mb-3 text-sm font-medium text-brand-600 dark:text-brand-400",children:["Installiert ist „",x,"“ – mit „Update installieren“ wechselst du auf „",c,"“."]}):w?e.jsx("p",{className:"mb-3 text-sm font-medium text-brand-600 dark:text-brand-400",children:"Update verfügbar."}):e.jsx("p",{className:"mb-3 text-sm text-neutral-500 dark:text-neutral-400",children:"Bereits auf dem neuesten Stand."}),e.jsxs("div",{className:"mb-3 flex gap-2",children:[e.jsx("button",{type:"button",onClick:k,disabled:m||b,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm font-medium hover:bg-neutral-50 disabled:opacity-50 dark:border-neutral-700 dark:hover:bg-neutral-800",children:"Nach Updates suchen"}),e.jsx("button",{type:"button",onClick:I,disabled:m||b||!w,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:m?"Installiere…":L?`Auf „${c}“ wechseln`:"Update installieren"})]}),(m||g)&&e.jsx("ul",{className:"mb-3 space-y-1 text-sm",children:Object.entries(z).map(([t,s])=>e.jsxs("li",{className:"flex items-center gap-2",children:[e.jsx("span",{className:u[t]==="done"?"text-green-600 dark:text-green-400":u[t]==="error"?"text-red-600":u[t]==="busy"?"text-brand-600 dark:text-brand-400":"text-neutral-300 dark:text-neutral-600",children:u[t]==="done"?"✓":u[t]==="error"?"✕":u[t]==="busy"?"…":"○"}),s]},t))}),g&&e.jsx("p",{className:"text-sm text-red-600",children:g}),f&&e.jsxs("div",{className:"mt-3 rounded-md bg-green-50 p-3 text-sm text-green-800 dark:bg-green-900/20 dark:text-green-300",children:[e.jsx("p",{className:"mb-1 font-semibold",children:"Update installiert."}),f.length>0&&e.jsxs("details",{children:[e.jsx("summary",{className:"cursor-pointer text-xs",children:"Details anzeigen"}),e.jsx("ul",{className:"mt-2 list-disc pl-5 text-xs",children:f.map((t,s)=>e.jsx("li",{children:t},s))})]})]})]})]})})}export{O as default}; +import{r,j as e,a as i}from"./index-D7JbPKAF.js";const z={download:"Herunterladen",extract:"Entpacken",backup:"Sichern",apply:"Installieren"};function C(a){return a?a.slice(0,7):"–"}function A(a){return a?new Date(a).toLocaleString("de-DE"):"–"}function O(){const[a,y]=r.useState(null),[n,S]=r.useState(null),[R,v]=r.useState(!0),[_,B]=r.useState(""),[h,E]=r.useState([]),[b,P]=r.useState(!1),[m,U]=r.useState(!1),[u,o]=r.useState({download:null,extract:null,backup:null,apply:null}),[g,p]=r.useState(""),[f,j]=r.useState(null),k=()=>{v(!0),B(""),Promise.all([i.get("/settings/update-status"),i.get("/settings/update-check")]).then(([t,s])=>{y(t),S(s)}).catch(t=>B(t.message)).finally(()=>v(!1)),i.get("/settings/update-branches").then(t=>E(t.branches||[])).catch(()=>E([]))},H=async t=>{P(!0),p(""),j(null);try{const s=await i.post("/settings/update-branch",{branch:t});S(s),y(d=>d&&{...d,branch:t})}catch(s){p(s.message)}finally{P(!1)}};r.useEffect(k,[]);const I=async()=>{U(!0),p(""),j(null),o({download:"busy",extract:null,backup:null,apply:null});try{const s=(await i.post("/settings/update-download",{})).run_id;o(l=>({...l,download:"done",extract:"busy"})),await i.post("/settings/update-extract",{run_id:s}),o(l=>({...l,extract:"done",backup:"busy"})),await i.post("/settings/update-backup",{}),o(l=>({...l,backup:"done",apply:"busy"}));const d=await i.post("/settings/update-apply",{run_id:s});o(l=>({...l,apply:"done"})),j(d.log||[]),k()}catch(t){o(s=>{const d=Object.keys(s).find(l=>s[l]==="busy");return d?{...s,[d]:"error"}:s}),p(t.message)}finally{U(!1)}};if(R)return e.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"});const N=(a==null?void 0:a.capabilities)||{},D=N.zip?N.http_client?N.writable?null:"Das Website-Verzeichnis ist für PHP nicht beschreibbar - bitte Dateiberechtigungen prüfen.":"Diese Funktion benötigt ausgehende HTTPS-Verbindungen (curl oder allow_url_fopen), die auf diesem Server aktuell nicht verfügbar sind.":'Diese Funktion benötigt die PHP-Erweiterung "zip", die auf diesem Server aktuell nicht aktiviert ist. Bitte beim Hoster aktivieren lassen.',w=n==null?void 0:n.update_available,c=(a==null?void 0:a.branch)||"main",x=a==null?void 0:a.deployed_branch,L=!!x&&x!==c,F=h.some(t=>t.name===c)?h:[{name:c},...h];return e.jsx("div",{className:"max-w-2xl space-y-6",children:e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Updates aus Git"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:'Zieht den aktuellen Stand direkt vom Code-Repository und installiert ihn hier - ohne manuellen FTP-Upload. Passiert nur, wenn du unten aktiv auf "Update installieren" klickst, nie automatisch im Hintergrund.'}),_&&e.jsx("p",{className:"mb-3 text-sm text-red-600",children:_}),D?e.jsx("p",{className:"rounded-md bg-amber-50 p-3 text-sm text-amber-800 dark:bg-amber-900/20 dark:text-amber-300",children:D}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{htmlFor:"update-branch",className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-200",children:"Branch"}),e.jsx("select",{id:"update-branch",value:c,onChange:t=>H(t.target.value),disabled:m||b,className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm disabled:opacity-50 dark:border-neutral-700 dark:bg-neutral-800 dark:text-neutral-100",children:F.map(t=>e.jsxs("option",{value:t.name,children:[t.name,t.message?` – ${t.message}`:""]},t.name))}),e.jsx("p",{className:"mt-1 text-xs text-neutral-500 dark:text-neutral-400",children:"Von diesem Branch wird installiert. Zum Zurückwechseln einfach wieder „main“ wählen und installieren – vorher wird wie immer eine Sicherung angelegt."})]}),e.jsxs("div",{className:"mb-4 grid grid-cols-2 gap-3 text-sm",children:[e.jsxs("div",{className:"rounded-md bg-neutral-50 p-3 dark:bg-neutral-800/50",children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-neutral-400",children:"Installiert"}),e.jsxs("p",{className:"font-mono text-neutral-800 dark:text-neutral-100",children:[C(a==null?void 0:a.deployed_sha),x&&e.jsxs("span",{className:"ml-2 font-sans text-xs text-neutral-400",children:["(",x,")"]})]}),e.jsx("p",{className:"text-xs text-neutral-400",children:A(a==null?void 0:a.deployed_at)})]}),e.jsxs("div",{className:"rounded-md bg-neutral-50 p-3 dark:bg-neutral-800/50",children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-neutral-400",children:"Neuester Stand"}),e.jsxs("p",{className:"font-mono text-neutral-800 dark:text-neutral-100",children:[C(n==null?void 0:n.latest_sha),e.jsxs("span",{className:"ml-2 font-sans text-xs text-neutral-400",children:["(",c,")"]})]}),(n==null?void 0:n.latest_message)&&e.jsx("p",{className:"truncate text-xs text-neutral-400",title:n.latest_message,children:n.latest_message})]})]}),L&&w?e.jsxs("p",{className:"mb-3 text-sm font-medium text-brand-600 dark:text-brand-400",children:["Installiert ist „",x,"“ – mit „Update installieren“ wechselst du auf „",c,"“."]}):w?e.jsx("p",{className:"mb-3 text-sm font-medium text-brand-600 dark:text-brand-400",children:"Update verfügbar."}):e.jsx("p",{className:"mb-3 text-sm text-neutral-500 dark:text-neutral-400",children:"Bereits auf dem neuesten Stand."}),e.jsxs("div",{className:"mb-3 flex gap-2",children:[e.jsx("button",{type:"button",onClick:k,disabled:m||b,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm font-medium hover:bg-neutral-50 disabled:opacity-50 dark:border-neutral-700 dark:hover:bg-neutral-800",children:"Nach Updates suchen"}),e.jsx("button",{type:"button",onClick:I,disabled:m||b||!w,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:m?"Installiere…":L?`Auf „${c}“ wechseln`:"Update installieren"})]}),(m||g)&&e.jsx("ul",{className:"mb-3 space-y-1 text-sm",children:Object.entries(z).map(([t,s])=>e.jsxs("li",{className:"flex items-center gap-2",children:[e.jsx("span",{className:u[t]==="done"?"text-green-600 dark:text-green-400":u[t]==="error"?"text-red-600":u[t]==="busy"?"text-brand-600 dark:text-brand-400":"text-neutral-300 dark:text-neutral-600",children:u[t]==="done"?"✓":u[t]==="error"?"✕":u[t]==="busy"?"…":"○"}),s]},t))}),g&&e.jsx("p",{className:"text-sm text-red-600",children:g}),f&&e.jsxs("div",{className:"mt-3 rounded-md bg-green-50 p-3 text-sm text-green-800 dark:bg-green-900/20 dark:text-green-300",children:[e.jsx("p",{className:"mb-1 font-semibold",children:"Update installiert."}),f.length>0&&e.jsxs("details",{children:[e.jsx("summary",{className:"cursor-pointer text-xs",children:"Details anzeigen"}),e.jsx("ul",{className:"mt-2 list-disc pl-5 text-xs",children:f.map((t,s)=>e.jsx("li",{children:t},s))})]})]})]})]})})}export{O as default}; diff --git a/hifi/assets/WebsiteSettings-B7CzBT2R.js b/hifi/assets/WebsiteSettings-B0cs1m83.js similarity index 99% rename from hifi/assets/WebsiteSettings-B7CzBT2R.js rename to hifi/assets/WebsiteSettings-B0cs1m83.js index 7495fa4..e733eb9 100644 --- a/hifi/assets/WebsiteSettings-B7CzBT2R.js +++ b/hifi/assets/WebsiteSettings-B0cs1m83.js @@ -1 +1 @@ -import{n as Ne,q as Se,s as Ce,r as l,a as d,j as e,o as ze}from"./index-QV-Szw5n.js";import{I as v}from"./ImageUploadField-DyLcJG5-.js";const se=[{key:"mon",label:"Montag"},{key:"tue",label:"Dienstag"},{key:"wed",label:"Mittwoch"},{key:"thu",label:"Donnerstag"},{key:"fri",label:"Freitag"},{key:"sat",label:"Samstag"},{key:"sun",label:"Sonntag"}],ne=Object.fromEntries(se.map(g=>[g.key,{open:"09:00",close:"18:00",closed:!1}])),Be={phone:"",whatsapp:"",contact_email:"",address_street:"",address_zip:"",address_city:"",logo_path:"",logo_dark_path:"",business_hours:ne,hero_image_path:"",ga_measurement_id:"",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:"",page_loader_enabled:!0},De=[{value:"graphite",label:"Graphite Green",description:"Graphit über Bronze/Silber/Gold/Platin bis zur Onyx-Krönung."},{value:"deep-blue",label:"Deep Blue Luxury",description:"Kühles Blau, das sich über Grün zu Gold erwärmt."},{value:"warm-bronze",label:"Warm Bronze",description:"Durchgehend warmes Kupfer/Bronze/Amber bis zum Gold."}],Fe=[{value:"grid",label:"Raster",description:"Breite Kacheln, die responsiv in mehrere Zeilen umbrechen."},{value:"strip",label:"Scroll-Band",description:"Schmale, hochkant Kacheln in einer horizontal scrollbaren Reihe."},{value:"coverflow",label:"3D-Coverflow",description:"Kacheln drehen sich beim Wischen räumlich – die mittlere steht im Fokus."}];function Pe(){const g=Ne(),j=Se(),w=Ce(),[y,N]=l.useState(""),[de,S]=l.useState(null),[C,z]=l.useState(!1),[B,D]=l.useState(""),ie=async t=>{t.preventDefault(),D(""),z(!0);try{const a=new FormData;a.append("name",y),a.append("file",de),await d.post("/custom-fonts",a),N(""),S(null),t.target.reset(),w()}catch(a){D(a.message)}finally{z(!1)}},oe=async t=>{confirm("Schriftart wirklich löschen? Felder, die sie noch verwenden, fallen danach auf die Standardschrift zurück.")&&(await d.delete(`/custom-fonts/${t}`),w())},[r,u]=l.useState(Be),[ce,ue]=l.useState(!0),[F,G]=l.useState(!1),[me,o]=l.useState(!1),[A,P]=l.useState(""),[m,he]=l.useState(null),R=l.useRef(null),[K,M]=l.useState(!1),xe=(t,a)=>{const n=R.current.getBoundingClientRect();return{x:Math.max(0,Math.min(100,Math.round((t-n.left)/n.width*100))),y:Math.max(0,Math.min(100,Math.round((a-n.top)/n.height*100)))}},E=(t,a)=>{const{x:n,y:c}=xe(t,a);u(ye=>({...ye,gallery_card_text_x:n,gallery_card_text_y:c})),o(!1)},be=t=>{t.preventDefault(),t.currentTarget.setPointerCapture(t.pointerId),M(!0),E(t.clientX,t.clientY)},ge=t=>{K&&E(t.clientX,t.clientY)},pe=t=>{M(!1),t.currentTarget.releasePointerCapture(t.pointerId)},[L,H]=l.useState(""),[I,W]=l.useState(""),[O,X]=l.useState(!1),[T,U]=l.useState(!1),[Z,J]=l.useState(""),[ke,h]=l.useState(!1),[p,Y]=l.useState(""),[V,$]=l.useState(""),[k,q]=l.useState(!1),[i,_]=l.useState(null),[Q,ee]=l.useState(!1),[te,x]=l.useState(""),[_e,b]=l.useState(!1),[ae,re]=l.useState(!1);l.useEffect(()=>{d.get("/site-settings").then(t=>u({phone:t.phone||"",whatsapp:t.whatsapp||"",contact_email:t.contact_email||"",address_street:t.address_street||"",address_zip:t.address_zip||"",address_city:t.address_city||"",logo_path:t.logo_path||"",logo_dark_path:t.logo_dark_path||"",business_hours:t.business_hours||ne,hero_image_path:t.hero_image_path||"",ga_measurement_id:t.ga_measurement_id||"",package_card_theme:t.package_card_theme||"graphite",package_card_layout:t.package_card_layout||"strip",package_wheel_hint_interval:t.package_wheel_hint_interval||8,package_card_width:t.package_card_width||210,package_card_height:t.package_card_height||480,vehicle_tile_width:t.vehicle_tile_width||240,vehicle_tile_height:t.vehicle_tile_height||180,gallery_card_text_x:t.gallery_card_text_x??0,gallery_card_text_y:t.gallery_card_text_y??100,site_font:t.site_font||"",page_loader_enabled:t.page_loader_enabled===void 0?!0:!!t.page_loader_enabled})).finally(()=>ue(!1)),d.get("/gallery-brands").then(t=>he(t.find(a=>a.cover_image_path)||null)).catch(()=>{}),d.get("/settings/analytics").then(t=>{H(t.ga_property_id||""),X(t.has_credentials)}),le()},[]);const le=()=>{d.get("/settings/google-reviews").then(t=>{Y(t.place_id||""),q(t.has_api_key),_(t)})},fe=async()=>{ee(!0),x(""),b(!1);try{const t=await d.post("/settings/google-reviews",{place_id:p,api_key:V});q(t.has_api_key),_(t),$(""),b(!0)}catch(t){x(t.message)}finally{ee(!1)}},ve=async()=>{re(!0),x("");try{const t=await d.post("/settings/google-reviews/refresh",{});_(t)}catch(t){x(t.message),le()}finally{re(!1)}},je=async()=>{U(!0),J(""),h(!1);try{const t=await d.post("/settings/analytics",{ga_property_id:L,service_account_json:I});X(t.has_credentials),W(""),h(!0)}catch(t){J(t.message)}finally{U(!1)}},s=(t,a)=>{u(n=>({...n,[t]:a})),o(!1)},f=(t,a,n)=>{u(c=>({...c,business_hours:{...c.business_hours,[t]:{...c.business_hours[t],[a]:n}}})),o(!1)},we=async t=>{t.preventDefault(),G(!0),P(""),o(!1);try{await d.post("/site-settings",r),o(!0)}catch(a){P(a.message)}finally{G(!1)}};return ce?e.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}):e.jsxs("form",{onSubmit:we,className:"max-w-2xl space-y-6",children:[e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Startseiten-Bild"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Das große Hero-Bild ganz oben auf der Startseite. Ohne eigenes Bild wird das Standardbild verwendet."}),e.jsx(v,{value:r.hero_image_path,onChange:t=>s("hero_image_path",t),label:"Bild",aspect:16/9})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Firmenlogo"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Ohne eigenes Logo wird das Standard-Logo dieser Vorlage angezeigt. Für den Dunkelmodus kann eine eigene Variante hinterlegt werden (z. B. mit heller statt dunkler Wortmarke)."}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(v,{value:r.logo_path,onChange:t=>s("logo_path",t),label:"Logo (Hellmodus)"}),e.jsx(v,{value:r.logo_dark_path,onChange:t=>s("logo_dark_path",t),label:"Logo (Dunkelmodus)"})]})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Schriftart"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Gilt für die gesamte Website. Einzelne Startseiten-Sektionen können unter „Startseite“ davon abweichen."}),e.jsx("select",{value:r.site_font,onChange:t=>s("site_font",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:g.map(t=>e.jsx("option",{value:t.value,children:t.label},t.label))})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Eigene Schriftarten"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Eigene Schriftart-Dateien (WOFF2, WOFF, TTF oder OTF) hochladen - stehen danach in jeder Schriftart-Auswahl im Dashboard zusätzlich zur Wahl."}),j.length>0&&e.jsx("ul",{className:"mb-4 space-y-2",children:j.map(t=>e.jsxs("li",{className:"flex items-center justify-between gap-2 rounded-md border border-neutral-200 px-3 py-2 text-sm dark:border-neutral-700",children:[e.jsx("span",{style:{fontFamily:t.font_family},children:t.name}),e.jsx("button",{type:"button",onClick:()=>oe(t.id),className:"text-red-600 hover:underline",children:"Löschen"})]},t.id))}),e.jsxs("form",{onSubmit:ie,className:"flex flex-wrap items-end gap-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Name"}),e.jsx("input",{required:!0,value:y,onChange:t=>N(t.target.value),placeholder:"z. B. Firmenschrift",className:"rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Datei"}),e.jsx("input",{required:!0,type:"file",accept:".woff2,.woff,.ttf,.otf",onChange:t=>{var a;return S(((a=t.target.files)==null?void 0:a[0])||null)},className:"text-sm"})]}),e.jsx("button",{type:"submit",disabled:C,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:C?"Lädt hoch…":"Hochladen"})]}),B&&e.jsx("p",{className:"mt-2 text-sm text-red-600",children:B})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Seiten-Ladeanzeige"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:'Solange Daten und Bilder im sichtbaren Bereich einer Seite noch laden, bleibt der Inhalt ausgeblendet – verhindert, dass Bilder nachträglich "einpoppen". Das Lade-Symbol erscheint nur, wenn das länger als einen Augenblick dauert. Wirkt sich nicht auf das Dashboard und die Startseite aus, nur auf die übrigen Seiten der öffentlichen Website.'}),e.jsxs("label",{className:"flex items-center gap-2 text-sm text-neutral-700 dark:text-neutral-300",children:[e.jsx("input",{type:"checkbox",checked:r.page_loader_enabled,onChange:t=>s("page_loader_enabled",t.target.checked),className:"h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),"Ladeanzeige aktivieren"]})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Kontaktdaten"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Wird im Header, Footer und auf der Kontaktseite angezeigt."}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Telefon"}),e.jsx("input",{value:r.phone,onChange:t=>s("phone",t.target.value),placeholder:"09373 20 62 390",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"WhatsApp Business Nummer"}),e.jsx("input",{value:r.whatsapp,onChange:t=>s("whatsapp",t.target.value),placeholder:"z. B. 09373 20 62 390",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:"Leer lassen, um den WhatsApp-Link im Header auszublenden."})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"E-Mail"}),e.jsx("input",{type:"email",value:r.contact_email,onChange:t=>s("contact_email",t.target.value),placeholder:"info@hifi-planet-amorbach.de",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-[1fr_120px_1fr]",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Straße & Hausnummer"}),e.jsx("input",{value:r.address_street,onChange:t=>s("address_street",t.target.value),placeholder:"Boxbrunner Str. 20a",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"PLZ"}),e.jsx("input",{value:r.address_zip,onChange:t=>s("address_zip",t.target.value),placeholder:"63916",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Ort"}),e.jsx("input",{value:r.address_city,onChange:t=>s("address_city",t.target.value),placeholder:"Amorbach",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]})]})]})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Öffnungszeiten"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:'Wird im Footer und auf der Kontaktseite angezeigt, inklusive dem "Geöffnet/Geschlossen"-Hinweis im Footer, der live gegen diese Zeiten rechnet.'}),e.jsx("div",{className:"space-y-2",children:se.map(t=>{const a=r.business_hours[t.key]||{open:"",close:"",closed:!1};return e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("span",{className:"w-24 shrink-0 text-sm text-neutral-600 dark:text-neutral-300",children:t.label}),e.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-neutral-500 dark:text-neutral-400",children:[e.jsx("input",{type:"checkbox",checked:!a.closed,onChange:n=>f(t.key,"closed",!n.target.checked),className:"h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),"geöffnet"]}),!a.closed&&e.jsxs(e.Fragment,{children:[e.jsx("input",{type:"time",value:a.open,onChange:n=>f(t.key,"open",n.target.value),className:"rounded-md border border-neutral-300 bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsx("span",{className:"text-neutral-400",children:"–"}),e.jsx("input",{type:"time",value:a.close,onChange:n=>f(t.key,"close",n.target.value),className:"rounded-md border border-neutral-300 bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]})]},t.key)})})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Paket-Kachel-Design"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Bestimmt die Farbgebung der Paket-Stufen auf jeder Fahrzeug-Modell-Seite (von der günstigsten bis zur teuersten Option)."}),e.jsx("div",{className:"grid gap-3 sm:grid-cols-3",children:De.map(t=>e.jsxs("label",{className:`cursor-pointer rounded-lg border p-3 text-sm transition ${r.package_card_theme===t.value?"border-brand-500 ring-2 ring-brand-500/40":"border-neutral-300 hover:border-neutral-400 dark:border-neutral-700 dark:hover:border-neutral-600"}`,children:[e.jsx("input",{type:"radio",name:"package_card_theme",value:t.value,checked:r.package_card_theme===t.value,onChange:a=>s("package_card_theme",a.target.value),className:"sr-only"}),e.jsx("p",{className:"font-semibold text-neutral-900 dark:text-white",children:t.label}),e.jsx("p",{className:"mt-1 text-xs text-neutral-500 dark:text-neutral-400",children:t.description})]},t.value))})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Kachel-Layout"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Bestimmt, wie die Paket-Stufen auf jeder Fahrzeug-Modell-Seite angeordnet werden."}),e.jsx("div",{className:"grid gap-3 sm:grid-cols-3",children:Fe.map(t=>e.jsxs("label",{className:`cursor-pointer rounded-lg border p-3 text-sm transition ${r.package_card_layout===t.value?"border-brand-500 ring-2 ring-brand-500/40":"border-neutral-300 hover:border-neutral-400 dark:border-neutral-700 dark:hover:border-neutral-600"}`,children:[e.jsx("input",{type:"radio",name:"package_card_layout",value:t.value,checked:r.package_card_layout===t.value,onChange:a=>s("package_card_layout",a.target.value),className:"sr-only"}),e.jsx("p",{className:"font-semibold text-neutral-900 dark:text-white",children:t.label}),e.jsx("p",{className:"mt-1 text-xs text-neutral-500 dark:text-neutral-400",children:t.description})]},t.value))}),e.jsxs("div",{className:"mt-5 max-w-xs",children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Mausrad-Hinweis: Wiederholung (Sekunden)"}),e.jsx("input",{type:"number",min:"2",max:"120",value:r.package_wheel_hint_interval,onChange:t=>s("package_wheel_hint_interval",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:'Nur bei Scroll-Band/3D-Coverflow: Solange ein Besucher noch auf der ersten Kachel steht, wird der "mit dem Mausrad blättern"-Hinweis in diesem Abstand wiederholt.'})]}),e.jsxs("div",{className:"mt-5 grid max-w-xs gap-3 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Breite (px)"}),e.jsx("input",{type:"number",min:"80",max:"600",value:r.package_card_width,onChange:t=>s("package_card_width",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Höhe (px)"}),e.jsx("input",{type:"number",min:"80",max:"900",value:r.package_card_height,onChange:t=>s("package_card_height",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsx("p",{className:"text-xs text-neutral-400 sm:col-span-2",children:'Bei „Raster" bestimmt die Breite stattdessen, wie viele Kacheln pro Zeile passen.'})]})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Marken-/Modell-Kacheln"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:'Größe der Kacheln unter „Fahrzeuge wählen" und auf der Marken-Detailseite.'}),e.jsxs("div",{className:"grid max-w-xs gap-3 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Breite (px)"}),e.jsx("input",{type:"number",min:"80",max:"600",value:r.vehicle_tile_width,onChange:t=>s("vehicle_tile_width",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Höhe (px)"}),e.jsx("input",{type:"number",min:"80",max:"600",value:r.vehicle_tile_height,onChange:t=>s("vehicle_tile_height",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]})]})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Bildergalerie-Kacheln"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Position des Marken-/Projekt-Namens auf den Kacheln der Bildergalerie-Übersicht und der Marken-Detailseite."}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-[16rem_1fr] sm:items-start",children:[e.jsxs("div",{children:[e.jsxs("div",{ref:R,className:"relative aspect-[4/3] select-none overflow-hidden rounded-xl bg-neutral-900 shadow-sm",children:[m?e.jsx("img",{src:m.cover_image_path,alt:"",draggable:!1,className:"h-full w-full object-cover"}):e.jsx("div",{className:"h-full w-full bg-gradient-to-br from-neutral-700 to-neutral-900"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/10 to-transparent"}),e.jsx("span",{onPointerDown:be,onPointerMove:ge,onPointerUp:pe,style:{...ze(r.gallery_card_text_x,r.gallery_card_text_y,{x:0,y:100}),touchAction:"none"},className:`absolute select-none whitespace-nowrap rounded p-3 text-sm font-extrabold text-white transition-colors ${K?"cursor-grabbing bg-white/10 ring-2 ring-brand-400":"cursor-grab hover:bg-white/10"}`,children:m?m.name:"Beispiel-Marke"})]}),e.jsx("p",{className:"mt-1.5 text-center text-xs text-neutral-400",children:"Namen zum Verschieben ziehen"})]}),e.jsxs("div",{className:"flex flex-col gap-3 sm:pt-1",children:[e.jsxs("p",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:["Position:"," ",e.jsxs("span",{className:"font-mono font-semibold text-neutral-700 dark:text-neutral-200",children:[r.gallery_card_text_x,"% / ",r.gallery_card_text_y,"%"]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1.5 text-xs font-medium uppercase tracking-wide text-neutral-400",children:"Schnellauswahl waagerecht"}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("button",{type:"button",onClick:()=>s("gallery_card_text_x",0),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Links"}),e.jsx("button",{type:"button",onClick:()=>s("gallery_card_text_x",50),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Mittig"}),e.jsx("button",{type:"button",onClick:()=>s("gallery_card_text_x",100),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Rechts"})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1.5 text-xs font-medium uppercase tracking-wide text-neutral-400",children:"Schnellauswahl senkrecht"}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("button",{type:"button",onClick:()=>s("gallery_card_text_y",0),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Oben"}),e.jsx("button",{type:"button",onClick:()=>s("gallery_card_text_y",50),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Mittig"}),e.jsx("button",{type:"button",onClick:()=>s("gallery_card_text_y",100),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Unten"})]})]})]})]})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Google Analytics"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Wird erst geladen, nachdem ein Besucher der Statistik-Kategorie im Cookie-Banner zugestimmt hat. Leer lassen, um Google Analytics zu deaktivieren."}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Measurement-ID"}),e.jsx("input",{value:r.ga_measurement_id,onChange:t=>s("ga_measurement_id",t.target.value),placeholder:"G-XXXXXXXXXX",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{className:"mt-5 border-t border-neutral-200 pt-5 dark:border-neutral-800",children:[e.jsx("h3",{className:"mb-1 text-sm font-semibold text-neutral-900 dark:text-white",children:"Dashboard-Anbindung (optional)"}),e.jsx("p",{className:"mb-3 text-sm text-neutral-500 dark:text-neutral-400",children:"Zeigt Besucherzahlen direkt in deinem Admin-Dashboard an. Braucht ein Google-Cloud-Service-Account mit Lesezugriff auf diese GA4-Property."}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Property-ID"}),e.jsx("input",{value:L,onChange:t=>{H(t.target.value),h(!1)},placeholder:"z. B. 123456789",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:"Nicht die Measurement-ID (G-...) - zu finden unter GA4 → Verwaltung → Property-Details."})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:["Service-Account-JSON-Schlüssel ",O?"(leer lassen = unverändert)":""]}),e.jsx("textarea",{rows:4,value:I,onChange:t=>{W(t.target.value),h(!1)},placeholder:O?'{ "type": "service_account", ... } (bereits hinterlegt)':'{ "type": "service_account", ... }',className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 font-mono text-xs dark:border-neutral-700 dark:bg-neutral-900"})]})]}),Z&&e.jsx("p",{className:"mt-2 text-sm text-red-600",children:Z}),ke&&e.jsx("p",{className:"mt-2 text-sm text-green-600 dark:text-green-400",children:"Gespeichert."}),e.jsx("button",{type:"button",onClick:je,disabled:T,className:"mt-3 rounded-md border border-neutral-300 px-4 py-2 text-sm font-medium hover:bg-neutral-50 disabled:opacity-50 dark:border-neutral-700 dark:hover:bg-neutral-800",children:T?"Speichere…":"Dashboard-Anbindung speichern"})]})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Google-Rezensionen"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Zeigt die echte Google-Bewertung und die aktuellsten Rezensionen auf der Startseite an, statt der fest eingetragenen Beispiel-Texte. Wird einmal täglich automatisch aktualisiert (nie bei einem Seitenbesuch selbst) – die Seite zeigt also immer den letzten erfolgreich abgerufenen Stand."}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Place-ID"}),e.jsx("input",{value:p,onChange:t=>{Y(t.target.value),b(!1)},placeholder:"z. B. ChIJN1t_tDeuEmsRUsoyG83frY4",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsxs("p",{className:"mt-1 text-xs text-neutral-400",children:["Eindeutige Google-Kennung eures Eintrags – zu finden über den"," ",e.jsx("a",{href:"https://developers.google.com/maps/documentation/places/web-service/place-id#find-id",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-brand-600",children:"Google Place ID Finder"}),"."]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:["Places-API-Key ",k?"(leer lassen = unverändert)":""]}),e.jsx("input",{value:V,onChange:t=>{$(t.target.value),b(!1)},placeholder:k?"••••••••••••••••••••• (bereits hinterlegt)":"AIzaSy…",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 font-mono text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:"Aus der Google-Cloud-Console, mit aktivierter „Places API (New)“."})]})]}),te&&e.jsx("p",{className:"mt-3 text-sm text-red-600",children:te}),_e&&e.jsx("p",{className:"mt-3 text-sm text-green-600 dark:text-green-400",children:"Gespeichert."}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-3",children:[e.jsx("button",{type:"button",onClick:fe,disabled:Q,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm font-medium hover:bg-neutral-50 disabled:opacity-50 dark:border-neutral-700 dark:hover:bg-neutral-800",children:Q?"Speichere…":"Google-Rezensionen-Einstellungen speichern"}),e.jsx("button",{type:"button",onClick:ve,disabled:ae||!p||!k,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:ae?"Aktualisiere…":"Jetzt aktualisieren"})]}),i&&e.jsxs("div",{className:"mt-4 rounded-md bg-neutral-50 p-3 text-sm dark:bg-neutral-800/50",children:[i.rating!=null?e.jsxs("p",{className:"text-neutral-700 dark:text-neutral-300",children:["Aktuell hinterlegt: ",e.jsxs("strong",{children:[i.rating," ★"]})," (",i.rating_count," Bewertungen)",i.updated_at&&e.jsxs(e.Fragment,{children:[" – zuletzt aktualisiert am ",new Date(i.updated_at.replace(" ","T")).toLocaleString("de-DE")]})]}):e.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:"Noch keine erfolgreiche Aktualisierung – die Startseite zeigt bis dahin weiter die Beispiel-Rezensionen."}),i.error&&e.jsxs("p",{className:"mt-1 text-red-600",children:["Letzter Fehler: ",i.error]})]})]}),A&&e.jsx("p",{className:"text-sm text-red-600",children:A}),me&&e.jsx("p",{className:"text-sm text-green-600 dark:text-green-400",children:"Gespeichert."}),e.jsx("button",{type:"submit",disabled:F,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:F?"Speichere…":"Speichern"})]})}export{Pe as default}; +import{n as Ne,q as Se,s as Ce,r as l,a as d,j as e,o as ze}from"./index-D7JbPKAF.js";import{I as v}from"./ImageUploadField-Dz5jsGY3.js";const se=[{key:"mon",label:"Montag"},{key:"tue",label:"Dienstag"},{key:"wed",label:"Mittwoch"},{key:"thu",label:"Donnerstag"},{key:"fri",label:"Freitag"},{key:"sat",label:"Samstag"},{key:"sun",label:"Sonntag"}],ne=Object.fromEntries(se.map(g=>[g.key,{open:"09:00",close:"18:00",closed:!1}])),Be={phone:"",whatsapp:"",contact_email:"",address_street:"",address_zip:"",address_city:"",logo_path:"",logo_dark_path:"",business_hours:ne,hero_image_path:"",ga_measurement_id:"",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:"",page_loader_enabled:!0},De=[{value:"graphite",label:"Graphite Green",description:"Graphit über Bronze/Silber/Gold/Platin bis zur Onyx-Krönung."},{value:"deep-blue",label:"Deep Blue Luxury",description:"Kühles Blau, das sich über Grün zu Gold erwärmt."},{value:"warm-bronze",label:"Warm Bronze",description:"Durchgehend warmes Kupfer/Bronze/Amber bis zum Gold."}],Fe=[{value:"grid",label:"Raster",description:"Breite Kacheln, die responsiv in mehrere Zeilen umbrechen."},{value:"strip",label:"Scroll-Band",description:"Schmale, hochkant Kacheln in einer horizontal scrollbaren Reihe."},{value:"coverflow",label:"3D-Coverflow",description:"Kacheln drehen sich beim Wischen räumlich – die mittlere steht im Fokus."}];function Pe(){const g=Ne(),j=Se(),w=Ce(),[y,N]=l.useState(""),[de,S]=l.useState(null),[C,z]=l.useState(!1),[B,D]=l.useState(""),ie=async t=>{t.preventDefault(),D(""),z(!0);try{const a=new FormData;a.append("name",y),a.append("file",de),await d.post("/custom-fonts",a),N(""),S(null),t.target.reset(),w()}catch(a){D(a.message)}finally{z(!1)}},oe=async t=>{confirm("Schriftart wirklich löschen? Felder, die sie noch verwenden, fallen danach auf die Standardschrift zurück.")&&(await d.delete(`/custom-fonts/${t}`),w())},[r,u]=l.useState(Be),[ce,ue]=l.useState(!0),[F,G]=l.useState(!1),[me,o]=l.useState(!1),[A,P]=l.useState(""),[m,he]=l.useState(null),R=l.useRef(null),[K,M]=l.useState(!1),xe=(t,a)=>{const n=R.current.getBoundingClientRect();return{x:Math.max(0,Math.min(100,Math.round((t-n.left)/n.width*100))),y:Math.max(0,Math.min(100,Math.round((a-n.top)/n.height*100)))}},E=(t,a)=>{const{x:n,y:c}=xe(t,a);u(ye=>({...ye,gallery_card_text_x:n,gallery_card_text_y:c})),o(!1)},be=t=>{t.preventDefault(),t.currentTarget.setPointerCapture(t.pointerId),M(!0),E(t.clientX,t.clientY)},ge=t=>{K&&E(t.clientX,t.clientY)},pe=t=>{M(!1),t.currentTarget.releasePointerCapture(t.pointerId)},[L,H]=l.useState(""),[I,W]=l.useState(""),[O,X]=l.useState(!1),[T,U]=l.useState(!1),[Z,J]=l.useState(""),[ke,h]=l.useState(!1),[p,Y]=l.useState(""),[V,$]=l.useState(""),[k,q]=l.useState(!1),[i,_]=l.useState(null),[Q,ee]=l.useState(!1),[te,x]=l.useState(""),[_e,b]=l.useState(!1),[ae,re]=l.useState(!1);l.useEffect(()=>{d.get("/site-settings").then(t=>u({phone:t.phone||"",whatsapp:t.whatsapp||"",contact_email:t.contact_email||"",address_street:t.address_street||"",address_zip:t.address_zip||"",address_city:t.address_city||"",logo_path:t.logo_path||"",logo_dark_path:t.logo_dark_path||"",business_hours:t.business_hours||ne,hero_image_path:t.hero_image_path||"",ga_measurement_id:t.ga_measurement_id||"",package_card_theme:t.package_card_theme||"graphite",package_card_layout:t.package_card_layout||"strip",package_wheel_hint_interval:t.package_wheel_hint_interval||8,package_card_width:t.package_card_width||210,package_card_height:t.package_card_height||480,vehicle_tile_width:t.vehicle_tile_width||240,vehicle_tile_height:t.vehicle_tile_height||180,gallery_card_text_x:t.gallery_card_text_x??0,gallery_card_text_y:t.gallery_card_text_y??100,site_font:t.site_font||"",page_loader_enabled:t.page_loader_enabled===void 0?!0:!!t.page_loader_enabled})).finally(()=>ue(!1)),d.get("/gallery-brands").then(t=>he(t.find(a=>a.cover_image_path)||null)).catch(()=>{}),d.get("/settings/analytics").then(t=>{H(t.ga_property_id||""),X(t.has_credentials)}),le()},[]);const le=()=>{d.get("/settings/google-reviews").then(t=>{Y(t.place_id||""),q(t.has_api_key),_(t)})},fe=async()=>{ee(!0),x(""),b(!1);try{const t=await d.post("/settings/google-reviews",{place_id:p,api_key:V});q(t.has_api_key),_(t),$(""),b(!0)}catch(t){x(t.message)}finally{ee(!1)}},ve=async()=>{re(!0),x("");try{const t=await d.post("/settings/google-reviews/refresh",{});_(t)}catch(t){x(t.message),le()}finally{re(!1)}},je=async()=>{U(!0),J(""),h(!1);try{const t=await d.post("/settings/analytics",{ga_property_id:L,service_account_json:I});X(t.has_credentials),W(""),h(!0)}catch(t){J(t.message)}finally{U(!1)}},s=(t,a)=>{u(n=>({...n,[t]:a})),o(!1)},f=(t,a,n)=>{u(c=>({...c,business_hours:{...c.business_hours,[t]:{...c.business_hours[t],[a]:n}}})),o(!1)},we=async t=>{t.preventDefault(),G(!0),P(""),o(!1);try{await d.post("/site-settings",r),o(!0)}catch(a){P(a.message)}finally{G(!1)}};return ce?e.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}):e.jsxs("form",{onSubmit:we,className:"max-w-2xl space-y-6",children:[e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Startseiten-Bild"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Das große Hero-Bild ganz oben auf der Startseite. Ohne eigenes Bild wird das Standardbild verwendet."}),e.jsx(v,{value:r.hero_image_path,onChange:t=>s("hero_image_path",t),label:"Bild",aspect:16/9})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Firmenlogo"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Ohne eigenes Logo wird das Standard-Logo dieser Vorlage angezeigt. Für den Dunkelmodus kann eine eigene Variante hinterlegt werden (z. B. mit heller statt dunkler Wortmarke)."}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(v,{value:r.logo_path,onChange:t=>s("logo_path",t),label:"Logo (Hellmodus)"}),e.jsx(v,{value:r.logo_dark_path,onChange:t=>s("logo_dark_path",t),label:"Logo (Dunkelmodus)"})]})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Schriftart"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Gilt für die gesamte Website. Einzelne Startseiten-Sektionen können unter „Startseite“ davon abweichen."}),e.jsx("select",{value:r.site_font,onChange:t=>s("site_font",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900",children:g.map(t=>e.jsx("option",{value:t.value,children:t.label},t.label))})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Eigene Schriftarten"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Eigene Schriftart-Dateien (WOFF2, WOFF, TTF oder OTF) hochladen - stehen danach in jeder Schriftart-Auswahl im Dashboard zusätzlich zur Wahl."}),j.length>0&&e.jsx("ul",{className:"mb-4 space-y-2",children:j.map(t=>e.jsxs("li",{className:"flex items-center justify-between gap-2 rounded-md border border-neutral-200 px-3 py-2 text-sm dark:border-neutral-700",children:[e.jsx("span",{style:{fontFamily:t.font_family},children:t.name}),e.jsx("button",{type:"button",onClick:()=>oe(t.id),className:"text-red-600 hover:underline",children:"Löschen"})]},t.id))}),e.jsxs("form",{onSubmit:ie,className:"flex flex-wrap items-end gap-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Name"}),e.jsx("input",{required:!0,value:y,onChange:t=>N(t.target.value),placeholder:"z. B. Firmenschrift",className:"rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Datei"}),e.jsx("input",{required:!0,type:"file",accept:".woff2,.woff,.ttf,.otf",onChange:t=>{var a;return S(((a=t.target.files)==null?void 0:a[0])||null)},className:"text-sm"})]}),e.jsx("button",{type:"submit",disabled:C,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:C?"Lädt hoch…":"Hochladen"})]}),B&&e.jsx("p",{className:"mt-2 text-sm text-red-600",children:B})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Seiten-Ladeanzeige"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:'Solange Daten und Bilder im sichtbaren Bereich einer Seite noch laden, bleibt der Inhalt ausgeblendet – verhindert, dass Bilder nachträglich "einpoppen". Das Lade-Symbol erscheint nur, wenn das länger als einen Augenblick dauert. Wirkt sich nicht auf das Dashboard und die Startseite aus, nur auf die übrigen Seiten der öffentlichen Website.'}),e.jsxs("label",{className:"flex items-center gap-2 text-sm text-neutral-700 dark:text-neutral-300",children:[e.jsx("input",{type:"checkbox",checked:r.page_loader_enabled,onChange:t=>s("page_loader_enabled",t.target.checked),className:"h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),"Ladeanzeige aktivieren"]})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Kontaktdaten"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Wird im Header, Footer und auf der Kontaktseite angezeigt."}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Telefon"}),e.jsx("input",{value:r.phone,onChange:t=>s("phone",t.target.value),placeholder:"09373 20 62 390",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"WhatsApp Business Nummer"}),e.jsx("input",{value:r.whatsapp,onChange:t=>s("whatsapp",t.target.value),placeholder:"z. B. 09373 20 62 390",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:"Leer lassen, um den WhatsApp-Link im Header auszublenden."})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"E-Mail"}),e.jsx("input",{type:"email",value:r.contact_email,onChange:t=>s("contact_email",t.target.value),placeholder:"info@hifi-planet-amorbach.de",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-[1fr_120px_1fr]",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Straße & Hausnummer"}),e.jsx("input",{value:r.address_street,onChange:t=>s("address_street",t.target.value),placeholder:"Boxbrunner Str. 20a",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"PLZ"}),e.jsx("input",{value:r.address_zip,onChange:t=>s("address_zip",t.target.value),placeholder:"63916",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Ort"}),e.jsx("input",{value:r.address_city,onChange:t=>s("address_city",t.target.value),placeholder:"Amorbach",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]})]})]})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Öffnungszeiten"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:'Wird im Footer und auf der Kontaktseite angezeigt, inklusive dem "Geöffnet/Geschlossen"-Hinweis im Footer, der live gegen diese Zeiten rechnet.'}),e.jsx("div",{className:"space-y-2",children:se.map(t=>{const a=r.business_hours[t.key]||{open:"",close:"",closed:!1};return e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("span",{className:"w-24 shrink-0 text-sm text-neutral-600 dark:text-neutral-300",children:t.label}),e.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-neutral-500 dark:text-neutral-400",children:[e.jsx("input",{type:"checkbox",checked:!a.closed,onChange:n=>f(t.key,"closed",!n.target.checked),className:"h-4 w-4 rounded border-neutral-300 text-brand-600 focus:ring-brand-500"}),"geöffnet"]}),!a.closed&&e.jsxs(e.Fragment,{children:[e.jsx("input",{type:"time",value:a.open,onChange:n=>f(t.key,"open",n.target.value),className:"rounded-md border border-neutral-300 bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsx("span",{className:"text-neutral-400",children:"–"}),e.jsx("input",{type:"time",value:a.close,onChange:n=>f(t.key,"close",n.target.value),className:"rounded-md border border-neutral-300 bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]})]},t.key)})})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Paket-Kachel-Design"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Bestimmt die Farbgebung der Paket-Stufen auf jeder Fahrzeug-Modell-Seite (von der günstigsten bis zur teuersten Option)."}),e.jsx("div",{className:"grid gap-3 sm:grid-cols-3",children:De.map(t=>e.jsxs("label",{className:`cursor-pointer rounded-lg border p-3 text-sm transition ${r.package_card_theme===t.value?"border-brand-500 ring-2 ring-brand-500/40":"border-neutral-300 hover:border-neutral-400 dark:border-neutral-700 dark:hover:border-neutral-600"}`,children:[e.jsx("input",{type:"radio",name:"package_card_theme",value:t.value,checked:r.package_card_theme===t.value,onChange:a=>s("package_card_theme",a.target.value),className:"sr-only"}),e.jsx("p",{className:"font-semibold text-neutral-900 dark:text-white",children:t.label}),e.jsx("p",{className:"mt-1 text-xs text-neutral-500 dark:text-neutral-400",children:t.description})]},t.value))})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Kachel-Layout"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Bestimmt, wie die Paket-Stufen auf jeder Fahrzeug-Modell-Seite angeordnet werden."}),e.jsx("div",{className:"grid gap-3 sm:grid-cols-3",children:Fe.map(t=>e.jsxs("label",{className:`cursor-pointer rounded-lg border p-3 text-sm transition ${r.package_card_layout===t.value?"border-brand-500 ring-2 ring-brand-500/40":"border-neutral-300 hover:border-neutral-400 dark:border-neutral-700 dark:hover:border-neutral-600"}`,children:[e.jsx("input",{type:"radio",name:"package_card_layout",value:t.value,checked:r.package_card_layout===t.value,onChange:a=>s("package_card_layout",a.target.value),className:"sr-only"}),e.jsx("p",{className:"font-semibold text-neutral-900 dark:text-white",children:t.label}),e.jsx("p",{className:"mt-1 text-xs text-neutral-500 dark:text-neutral-400",children:t.description})]},t.value))}),e.jsxs("div",{className:"mt-5 max-w-xs",children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Mausrad-Hinweis: Wiederholung (Sekunden)"}),e.jsx("input",{type:"number",min:"2",max:"120",value:r.package_wheel_hint_interval,onChange:t=>s("package_wheel_hint_interval",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:'Nur bei Scroll-Band/3D-Coverflow: Solange ein Besucher noch auf der ersten Kachel steht, wird der "mit dem Mausrad blättern"-Hinweis in diesem Abstand wiederholt.'})]}),e.jsxs("div",{className:"mt-5 grid max-w-xs gap-3 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Breite (px)"}),e.jsx("input",{type:"number",min:"80",max:"600",value:r.package_card_width,onChange:t=>s("package_card_width",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Höhe (px)"}),e.jsx("input",{type:"number",min:"80",max:"900",value:r.package_card_height,onChange:t=>s("package_card_height",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsx("p",{className:"text-xs text-neutral-400 sm:col-span-2",children:'Bei „Raster" bestimmt die Breite stattdessen, wie viele Kacheln pro Zeile passen.'})]})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Marken-/Modell-Kacheln"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:'Größe der Kacheln unter „Fahrzeuge wählen" und auf der Marken-Detailseite.'}),e.jsxs("div",{className:"grid max-w-xs gap-3 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Breite (px)"}),e.jsx("input",{type:"number",min:"80",max:"600",value:r.vehicle_tile_width,onChange:t=>s("vehicle_tile_width",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Höhe (px)"}),e.jsx("input",{type:"number",min:"80",max:"600",value:r.vehicle_tile_height,onChange:t=>s("vehicle_tile_height",t.target.value),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]})]})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Bildergalerie-Kacheln"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Position des Marken-/Projekt-Namens auf den Kacheln der Bildergalerie-Übersicht und der Marken-Detailseite."}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-[16rem_1fr] sm:items-start",children:[e.jsxs("div",{children:[e.jsxs("div",{ref:R,className:"relative aspect-[4/3] select-none overflow-hidden rounded-xl bg-neutral-900 shadow-sm",children:[m?e.jsx("img",{src:m.cover_image_path,alt:"",draggable:!1,className:"h-full w-full object-cover"}):e.jsx("div",{className:"h-full w-full bg-gradient-to-br from-neutral-700 to-neutral-900"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/10 to-transparent"}),e.jsx("span",{onPointerDown:be,onPointerMove:ge,onPointerUp:pe,style:{...ze(r.gallery_card_text_x,r.gallery_card_text_y,{x:0,y:100}),touchAction:"none"},className:`absolute select-none whitespace-nowrap rounded p-3 text-sm font-extrabold text-white transition-colors ${K?"cursor-grabbing bg-white/10 ring-2 ring-brand-400":"cursor-grab hover:bg-white/10"}`,children:m?m.name:"Beispiel-Marke"})]}),e.jsx("p",{className:"mt-1.5 text-center text-xs text-neutral-400",children:"Namen zum Verschieben ziehen"})]}),e.jsxs("div",{className:"flex flex-col gap-3 sm:pt-1",children:[e.jsxs("p",{className:"text-sm text-neutral-500 dark:text-neutral-400",children:["Position:"," ",e.jsxs("span",{className:"font-mono font-semibold text-neutral-700 dark:text-neutral-200",children:[r.gallery_card_text_x,"% / ",r.gallery_card_text_y,"%"]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1.5 text-xs font-medium uppercase tracking-wide text-neutral-400",children:"Schnellauswahl waagerecht"}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("button",{type:"button",onClick:()=>s("gallery_card_text_x",0),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Links"}),e.jsx("button",{type:"button",onClick:()=>s("gallery_card_text_x",50),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Mittig"}),e.jsx("button",{type:"button",onClick:()=>s("gallery_card_text_x",100),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Rechts"})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1.5 text-xs font-medium uppercase tracking-wide text-neutral-400",children:"Schnellauswahl senkrecht"}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("button",{type:"button",onClick:()=>s("gallery_card_text_y",0),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Oben"}),e.jsx("button",{type:"button",onClick:()=>s("gallery_card_text_y",50),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Mittig"}),e.jsx("button",{type:"button",onClick:()=>s("gallery_card_text_y",100),className:"rounded-md border border-neutral-300 px-3 py-1.5 text-sm text-neutral-600 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-800",children:"Unten"})]})]})]})]})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Google Analytics"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Wird erst geladen, nachdem ein Besucher der Statistik-Kategorie im Cookie-Banner zugestimmt hat. Leer lassen, um Google Analytics zu deaktivieren."}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Measurement-ID"}),e.jsx("input",{value:r.ga_measurement_id,onChange:t=>s("ga_measurement_id",t.target.value),placeholder:"G-XXXXXXXXXX",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"})]}),e.jsxs("div",{className:"mt-5 border-t border-neutral-200 pt-5 dark:border-neutral-800",children:[e.jsx("h3",{className:"mb-1 text-sm font-semibold text-neutral-900 dark:text-white",children:"Dashboard-Anbindung (optional)"}),e.jsx("p",{className:"mb-3 text-sm text-neutral-500 dark:text-neutral-400",children:"Zeigt Besucherzahlen direkt in deinem Admin-Dashboard an. Braucht ein Google-Cloud-Service-Account mit Lesezugriff auf diese GA4-Property."}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Property-ID"}),e.jsx("input",{value:L,onChange:t=>{H(t.target.value),h(!1)},placeholder:"z. B. 123456789",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:"Nicht die Measurement-ID (G-...) - zu finden unter GA4 → Verwaltung → Property-Details."})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:["Service-Account-JSON-Schlüssel ",O?"(leer lassen = unverändert)":""]}),e.jsx("textarea",{rows:4,value:I,onChange:t=>{W(t.target.value),h(!1)},placeholder:O?'{ "type": "service_account", ... } (bereits hinterlegt)':'{ "type": "service_account", ... }',className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 font-mono text-xs dark:border-neutral-700 dark:bg-neutral-900"})]})]}),Z&&e.jsx("p",{className:"mt-2 text-sm text-red-600",children:Z}),ke&&e.jsx("p",{className:"mt-2 text-sm text-green-600 dark:text-green-400",children:"Gespeichert."}),e.jsx("button",{type:"button",onClick:je,disabled:T,className:"mt-3 rounded-md border border-neutral-300 px-4 py-2 text-sm font-medium hover:bg-neutral-50 disabled:opacity-50 dark:border-neutral-700 dark:hover:bg-neutral-800",children:T?"Speichere…":"Dashboard-Anbindung speichern"})]})]}),e.jsxs("section",{className:"rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[e.jsx("h2",{className:"mb-1 font-semibold text-neutral-900 dark:text-white",children:"Google-Rezensionen"}),e.jsx("p",{className:"mb-4 text-sm text-neutral-500 dark:text-neutral-400",children:"Zeigt die echte Google-Bewertung und die aktuellsten Rezensionen auf der Startseite an, statt der fest eingetragenen Beispiel-Texte. Wird einmal täglich automatisch aktualisiert (nie bei einem Seitenbesuch selbst) – die Seite zeigt also immer den letzten erfolgreich abgerufenen Stand."}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:"Place-ID"}),e.jsx("input",{value:p,onChange:t=>{Y(t.target.value),b(!1)},placeholder:"z. B. ChIJN1t_tDeuEmsRUsoyG83frY4",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsxs("p",{className:"mt-1 text-xs text-neutral-400",children:["Eindeutige Google-Kennung eures Eintrags – zu finden über den"," ",e.jsx("a",{href:"https://developers.google.com/maps/documentation/places/web-service/place-id#find-id",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-brand-600",children:"Google Place ID Finder"}),"."]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"mb-1 block text-sm font-medium text-neutral-700 dark:text-neutral-300",children:["Places-API-Key ",k?"(leer lassen = unverändert)":""]}),e.jsx("input",{value:V,onChange:t=>{$(t.target.value),b(!1)},placeholder:k?"••••••••••••••••••••• (bereits hinterlegt)":"AIzaSy…",className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 font-mono text-sm dark:border-neutral-700 dark:bg-neutral-900"}),e.jsx("p",{className:"mt-1 text-xs text-neutral-400",children:"Aus der Google-Cloud-Console, mit aktivierter „Places API (New)“."})]})]}),te&&e.jsx("p",{className:"mt-3 text-sm text-red-600",children:te}),_e&&e.jsx("p",{className:"mt-3 text-sm text-green-600 dark:text-green-400",children:"Gespeichert."}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-3",children:[e.jsx("button",{type:"button",onClick:fe,disabled:Q,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm font-medium hover:bg-neutral-50 disabled:opacity-50 dark:border-neutral-700 dark:hover:bg-neutral-800",children:Q?"Speichere…":"Google-Rezensionen-Einstellungen speichern"}),e.jsx("button",{type:"button",onClick:ve,disabled:ae||!p||!k,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:ae?"Aktualisiere…":"Jetzt aktualisieren"})]}),i&&e.jsxs("div",{className:"mt-4 rounded-md bg-neutral-50 p-3 text-sm dark:bg-neutral-800/50",children:[i.rating!=null?e.jsxs("p",{className:"text-neutral-700 dark:text-neutral-300",children:["Aktuell hinterlegt: ",e.jsxs("strong",{children:[i.rating," ★"]})," (",i.rating_count," Bewertungen)",i.updated_at&&e.jsxs(e.Fragment,{children:[" – zuletzt aktualisiert am ",new Date(i.updated_at.replace(" ","T")).toLocaleString("de-DE")]})]}):e.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:"Noch keine erfolgreiche Aktualisierung – die Startseite zeigt bis dahin weiter die Beispiel-Rezensionen."}),i.error&&e.jsxs("p",{className:"mt-1 text-red-600",children:["Letzter Fehler: ",i.error]})]})]}),A&&e.jsx("p",{className:"text-sm text-red-600",children:A}),me&&e.jsx("p",{className:"text-sm text-green-600 dark:text-green-400",children:"Gespeichert."}),e.jsx("button",{type:"submit",disabled:F,className:"rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:F?"Speichere…":"Speichern"})]})}export{Pe as default}; diff --git a/hifi/assets/eye-YlN_9rkm.js b/hifi/assets/eye-zEWyQJeC.js similarity index 95% rename from hifi/assets/eye-YlN_9rkm.js rename to hifi/assets/eye-zEWyQJeC.js index 4bf0950..33d7f8a 100644 --- a/hifi/assets/eye-YlN_9rkm.js +++ b/hifi/assets/eye-zEWyQJeC.js @@ -1,4 +1,4 @@ -import{w as e}from"./index-QV-Szw5n.js";/** +import{w as e}from"./index-D7JbPKAF.js";/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. diff --git a/hifi/assets/iconRegistry-DUWamfSa.js b/hifi/assets/iconRegistry-BKlgDlOd.js similarity index 99% rename from hifi/assets/iconRegistry-DUWamfSa.js rename to hifi/assets/iconRegistry-BKlgDlOd.js index 3e1a2ee..f4aa8b8 100644 --- a/hifi/assets/iconRegistry-DUWamfSa.js +++ b/hifi/assets/iconRegistry-BKlgDlOd.js @@ -1,4 +1,4 @@ -import{w as e,B as L0,x as x0,y as w0,z as f0,E as I0,h as C0,F as N0,i as b0,G as $0,C as s,H as q0,I as z0,J as S0,K as A0,M as H0,P as j0,Q as l,T as V0,U as P0,V as B0,W as D0,X as F0,Y as R0,Z as T0,_ as U0,$ as O0,a0 as G0,a1 as Z0,a2 as W0,a3 as E0,a4 as X0,a5 as K0,a6 as Q0,a7 as J0,a8 as Y0,a9 as ea,aa,ab as ca,ac as fL,ad as IL,ae as CL,j as NL}from"./index-QV-Szw5n.js";import{a as ta,E as oa}from"./eye-YlN_9rkm.js";import{G as da,P as na,R as ha,T as ia}from"./trash-2-fu7u5OTF.js";/** +import{w as e,B as L0,x as x0,y as w0,z as f0,E as I0,h as C0,F as N0,i as b0,G as $0,C as s,H as q0,I as z0,J as S0,K as A0,M as H0,P as j0,Q as l,T as V0,U as P0,V as B0,W as D0,X as F0,Y as R0,Z as T0,_ as U0,$ as O0,a0 as G0,a1 as Z0,a2 as W0,a3 as E0,a4 as X0,a5 as K0,a6 as Q0,a7 as J0,a8 as Y0,a9 as ea,aa,ab as ca,ac as fL,ad as IL,ae as CL,j as NL}from"./index-D7JbPKAF.js";import{a as ta,E as oa}from"./eye-zEWyQJeC.js";import{G as da,P as na,R as ha,T as ia}from"./trash-2-D2g7JxqJ.js";/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. diff --git a/hifi/assets/index-QV-Szw5n.js b/hifi/assets/index-D7JbPKAF.js similarity index 65% rename from hifi/assets/index-QV-Szw5n.js rename to hifi/assets/index-D7JbPKAF.js index 8b38c5e..d0bbf0f 100644 --- a/hifi/assets/index-QV-Szw5n.js +++ b/hifi/assets/index-D7JbPKAF.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/iconRegistry-DUWamfSa.js","assets/eye-YlN_9rkm.js","assets/trash-2-fu7u5OTF.js","assets/Brands-V9s4vz2i.js","assets/ImageUploadField-DyLcJG5-.js","assets/TextStyleWidget-Czb7ujSZ.js","assets/Models-CyjYxQOO.js","assets/GalleryBrands-CeGo7QXi.js","assets/GalleryProjects-CfB-fA4x.js","assets/Packages-6JjKaOj1.js","assets/Services-BTvu0ymy.js","assets/Partners-BRwobp6H.js","assets/Downloads-DCZm2dP9.js","assets/HomeSections-BzNKNMho.js","assets/RichTextEditor-DJwdsoJ6.js","assets/WebsiteSettings-B7CzBT2R.js","assets/LegalSettings-BnY85Lz7.js","assets/EmailSettings-VadOa5J3.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/iconRegistry-BKlgDlOd.js","assets/eye-zEWyQJeC.js","assets/trash-2-D2g7JxqJ.js","assets/Brands-Dox0FZUh.js","assets/ImageUploadField-Dz5jsGY3.js","assets/TextStyleWidget-DvjoGL1J.js","assets/Models-ii45_Sg2.js","assets/GalleryBrands-CmjBzT9Y.js","assets/GalleryProjects-DyPMRVIE.js","assets/Packages-Dpbb0BQ5.js","assets/Services-BS6wXqv9.js","assets/Partners-XxA2Rj_b.js","assets/Downloads-_Z8wR0YD.js","assets/HomeSections-DhyhYK-h.js","assets/RichTextEditor-DSo9zuZu.js","assets/WebsiteSettings-B0cs1m83.js","assets/LegalSettings-EsPW5ccC.js","assets/EmailSettings-BmNJuhHH.js"])))=>i.map(i=>d[i]); function ax(e,t){for(var n=0;nr[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function Sm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jm={exports:{}},_o={},Pm={exports:{}},G={};/** * @license React * react.production.min.js @@ -7,7 +7,7 @@ function ax(e,t){for(var n=0;n>>1,q=E[z];if(0>>1;zs(Ve,A))Rs(O,Ve)?(E[z]=O,E[R]=A,z=R):(E[z]=Ve,E[Q]=A,z=Q);else if(Rs(O,A))E[z]=O,E[R]=A,z=R;else break e}}return T}function s(E,T){var A=E.sortIndex-T.sortIndex;return A!==0?A:E.id-T.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var u=[],c=[],d=1,f=null,h=3,x=!1,w=!1,y=!1,k=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(E){for(var T=n(c);T!==null;){if(T.callback===null)r(c);else if(T.startTime<=E)r(c),T.sortIndex=T.expirationTime,t(u,T);else break;T=n(c)}}function b(E){if(y=!1,v(E),!w)if(n(u)!==null)w=!0,$(P);else{var T=n(c);T!==null&&K(b,T.startTime-E)}}function P(E,T){w=!1,y&&(y=!1,p(j),j=-1),x=!0;var A=h;try{for(v(T),f=n(u);f!==null&&(!(f.expirationTime>T)||E&&!F());){var z=f.callback;if(typeof z=="function"){f.callback=null,h=f.priorityLevel;var q=z(f.expirationTime<=T);T=e.unstable_now(),typeof q=="function"?f.callback=q:f===n(u)&&r(u),v(T)}else r(u);f=n(u)}if(f!==null)var Ce=!0;else{var Q=n(c);Q!==null&&K(b,Q.startTime-T),Ce=!1}return Ce}finally{f=null,h=A,x=!1}}var C=!1,S=null,j=-1,L=5,_=-1;function F(){return!(e.unstable_now()-_E||125z?(E.sortIndex=A,t(c,E),n(u)===null&&E===n(c)&&(y?(p(j),j=-1):y=!0,K(b,A-z))):(E.sortIndex=q,t(u,E),w||x||(w=!0,$(P))),E},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(E){var T=h;return function(){var A=h;h=T;try{return E.apply(this,arguments)}finally{h=A}}}})(Om);Vm.exports=Om;var _x=Vm.exports;/** + */(function(e){function t(E,C){var A=E.length;E.push(C);e:for(;0>>1,q=E[z];if(0>>1;zs(Ve,A))Rs(O,Ve)?(E[z]=O,E[R]=A,z=R):(E[z]=Ve,E[Q]=A,z=Q);else if(Rs(O,A))E[z]=O,E[R]=A,z=R;else break e}}return C}function s(E,C){var A=E.sortIndex-C.sortIndex;return A!==0?A:E.id-C.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var u=[],c=[],d=1,f=null,h=3,x=!1,w=!1,y=!1,k=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(E){for(var C=n(c);C!==null;){if(C.callback===null)r(c);else if(C.startTime<=E)r(c),C.sortIndex=C.expirationTime,t(u,C);else break;C=n(c)}}function b(E){if(y=!1,v(E),!w)if(n(u)!==null)w=!0,$(P);else{var C=n(c);C!==null&&K(b,C.startTime-E)}}function P(E,C){w=!1,y&&(y=!1,p(j),j=-1),x=!0;var A=h;try{for(v(C),f=n(u);f!==null&&(!(f.expirationTime>C)||E&&!F());){var z=f.callback;if(typeof z=="function"){f.callback=null,h=f.priorityLevel;var q=z(f.expirationTime<=C);C=e.unstable_now(),typeof q=="function"?f.callback=q:f===n(u)&&r(u),v(C)}else r(u);f=n(u)}if(f!==null)var Te=!0;else{var Q=n(c);Q!==null&&K(b,Q.startTime-C),Te=!1}return Te}finally{f=null,h=A,x=!1}}var T=!1,S=null,j=-1,L=5,_=-1;function F(){return!(e.unstable_now()-_E||125z?(E.sortIndex=A,t(c,E),n(u)===null&&E===n(c)&&(y?(p(j),j=-1):y=!0,K(b,A-z))):(E.sortIndex=q,t(u,E),w||x||(w=!0,$(P))),E},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(E){var C=h;return function(){var A=h;h=C;try{return E.apply(this,arguments)}finally{h=A}}}})(Om);Vm.exports=Om;var _x=Vm.exports;/** * @license React * react-dom.production.min.js * @@ -35,10 +35,10 @@ function ax(e,t){for(var n=0;na||s[o]!==i[a]){var u=` -`+s[o].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=o&&0<=a);break}}}finally{ia=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Kr(e):""}function Ix(e){switch(e.tag){case 5:return Kr(e.type);case 16:return Kr("Lazy");case 13:return Kr("Suspense");case 19:return Kr("SuspenseList");case 0:case 2:case 15:return e=oa(e.type,!1),e;case 11:return e=oa(e.type.render,!1),e;case 1:return e=oa(e.type,!0),e;default:return""}}function il(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 Yn:return"Fragment";case Xn:return"Portal";case nl:return"Profiler";case Ou:return"StrictMode";case rl:return"Suspense";case sl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Bm:return(e.displayName||"Context")+".Consumer";case zm:return(e._context.displayName||"Context")+".Provider";case Fu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case zu:return t=e.displayName||null,t!==null?t:il(e.type)||"Memo";case Qt:t=e._payload,e=e._init;try{return il(e(t))}catch{}}return null}function Vx(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 il(t);case 8:return t===Ou?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function gn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Hm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ox(e){var t=Hm(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 ti(e){e._valueTracker||(e._valueTracker=Ox(e))}function Wm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Hm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ui(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 de({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function xd(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=gn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Um(e,t){t=t.checked,t!=null&&Vu(e,"checked",t,!1)}function al(e,t){Um(e,t);var n=gn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ll(e,t.type,n):t.hasOwnProperty("defaultValue")&&ll(e,t.type,gn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function vd(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 ll(e,t,n){(t!=="number"||Ui(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Xr=Array.isArray;function cr(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=ni.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ps(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Jr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Fx=["Webkit","ms","Moz","O"];Object.keys(Jr).forEach(function(e){Fx.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jr[t]=Jr[e]})});function Ym(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Jr.hasOwnProperty(e)&&Jr[e]?(""+t).trim():t+"px"}function qm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Ym(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var zx=de({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 dl(e,t){if(t){if(zx[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(M(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(M(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(M(61))}if(t.style!=null&&typeof t.style!="object")throw Error(M(62))}}function fl(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 hl=null;function Bu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ml=null,dr=null,fr=null;function bd(e){if(e=zs(e)){if(typeof ml!="function")throw Error(M(280));var t=e.stateNode;t&&(t=Ro(t),ml(e.stateNode,e.type,t))}}function Qm(e){dr?fr?fr.push(e):fr=[e]:dr=e}function Zm(){if(dr){var e=dr,t=fr;if(fr=dr=null,bd(e),t)for(e=0;e>>=0,e===0?32:31-(Qx(e)/Zx|0)|0}var ri=64,si=4194304;function Yr(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 Yi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=Yr(a):(i&=o,i!==0&&(r=Yr(i)))}else o=n&~s,o!==0?r=Yr(o):i!==0&&(r=Yr(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 Os(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-kt(t),e[t]=n}function nv(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=ts),Md=" ",Ld=!1;function xp(e,t){switch(e){case"keyup":return _v.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qn=!1;function Lv(e,t){switch(e){case"compositionend":return vp(t);case"keypress":return t.which!==32?null:(Ld=!0,Md);case"textInput":return e=t.data,e===Md&&Ld?null:e;default:return null}}function Av(e,t){if(qn)return e==="compositionend"||!Yu&&xp(e,t)?(e=gp(),Ci=Gu=nn=null,qn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)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=Id(n)}}function Sp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jp(){for(var e=window,t=Ui();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ui(e.document)}return t}function qu(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 $v(e){var t=jp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Sp(n.ownerDocument.documentElement,n)){if(r!==null&&qu(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=Vd(n,i);var o=Vd(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,Qn=null,wl=null,rs=null,kl=!1;function Od(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;kl||Qn==null||Qn!==Ui(r)||(r=Qn,"selectionStart"in r&&qu(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}),rs&&ks(rs,r)||(rs=r,r=Zi(wl,"onSelect"),0er||(e.current=Cl[er],Cl[er]=null,er--)}function se(e,t){er++,Cl[er]=e.current,e.current=t}var yn={},Ie=kn(yn),Ge=kn(!1),Vn=yn;function yr(e,t){var n=e.type.contextTypes;if(!n)return yn;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 Ke(e){return e=e.childContextTypes,e!=null}function eo(){oe(Ge),oe(Ie)}function Ud(e,t,n){if(Ie.current!==yn)throw Error(M(168));se(Ie,t),se(Ge,n)}function Ap(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(M(108,Vx(e)||"Unknown",s));return de({},n,r)}function to(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||yn,Vn=Ie.current,se(Ie,e),se(Ge,Ge.current),!0}function Gd(e,t,n){var r=e.stateNode;if(!r)throw Error(M(169));n?(e=Ap(e,t,Vn),r.__reactInternalMemoizedMergedChildContext=e,oe(Ge),oe(Ie),se(Ie,e)):oe(Ge),se(Ge,n)}var Ot=null,Io=!1,wa=!1;function Dp(e){Ot===null?Ot=[e]:Ot.push(e)}function e1(e){Io=!0,Dp(e)}function bn(){if(!wa&&Ot!==null){wa=!0;var e=0,t=J;try{var n=Ot;for(J=1;e>=o,s-=o,Ft=1<<32-kt(t)+s|n<j?(L=S,S=null):L=S.sibling;var _=h(p,S,v[j],b);if(_===null){S===null&&(S=L);break}e&&S&&_.alternate===null&&t(p,S),m=i(_,m,j),C===null?P=_:C.sibling=_,C=_,S=L}if(j===v.length)return n(p,S),ae&&Pn(p,j),P;if(S===null){for(;jj?(L=S,S=null):L=S.sibling;var F=h(p,S,_.value,b);if(F===null){S===null&&(S=L);break}e&&S&&F.alternate===null&&t(p,S),m=i(F,m,j),C===null?P=F:C.sibling=F,C=F,S=L}if(_.done)return n(p,S),ae&&Pn(p,j),P;if(S===null){for(;!_.done;j++,_=v.next())_=f(p,_.value,b),_!==null&&(m=i(_,m,j),C===null?P=_:C.sibling=_,C=_);return ae&&Pn(p,j),P}for(S=r(p,S);!_.done;j++,_=v.next())_=x(S,p,j,_.value,b),_!==null&&(e&&_.alternate!==null&&S.delete(_.key===null?j:_.key),m=i(_,m,j),C===null?P=_:C.sibling=_,C=_);return e&&S.forEach(function(H){return t(p,H)}),ae&&Pn(p,j),P}function k(p,m,v,b){if(typeof v=="object"&&v!==null&&v.type===Yn&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case ei:e:{for(var P=v.key,C=m;C!==null;){if(C.key===P){if(P=v.type,P===Yn){if(C.tag===7){n(p,C.sibling),m=s(C,v.props.children),m.return=p,p=m;break e}}else if(C.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Qt&&Yd(P)===C.type){n(p,C.sibling),m=s(C,v.props),m.ref=$r(p,C,v),m.return=p,p=m;break e}n(p,C);break}else t(p,C);C=C.sibling}v.type===Yn?(m=Dn(v.props.children,p.mode,b,v.key),m.return=p,p=m):(b=Ri(v.type,v.key,v.props,null,p.mode,b),b.ref=$r(p,m,v),b.return=p,p=b)}return o(p);case Xn:e:{for(C=v.key;m!==null;){if(m.key===C)if(m.tag===4&&m.stateNode.containerInfo===v.containerInfo&&m.stateNode.implementation===v.implementation){n(p,m.sibling),m=s(m,v.children||[]),m.return=p,p=m;break e}else{n(p,m);break}else t(p,m);m=m.sibling}m=Ea(v,p.mode,b),m.return=p,p=m}return o(p);case Qt:return C=v._init,k(p,m,C(v._payload),b)}if(Xr(v))return w(p,m,v,b);if(Vr(v))return y(p,m,v,b);di(p,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,m!==null&&m.tag===6?(n(p,m.sibling),m=s(m,v),m.return=p,p=m):(n(p,m),m=Ca(v,p.mode,b),m.return=p,p=m),o(p)):n(p,m)}return k}var vr=Op(!0),Fp=Op(!1),so=kn(null),io=null,rr=null,ec=null;function tc(){ec=rr=io=null}function nc(e){var t=so.current;oe(so),e._currentValue=t}function _l(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 mr(e,t){io=e,ec=rr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ue=!0),e.firstContext=null)}function ct(e){var t=e._currentValue;if(ec!==e)if(e={context:e,memoizedValue:t,next:null},rr===null){if(io===null)throw Error(M(308));rr=e,io.dependencies={lanes:0,firstContext:e}}else rr=rr.next=e;return t}var Nn=null;function rc(e){Nn===null?Nn=[e]:Nn.push(e)}function zp(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,Ut(e,r)}function Ut(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Zt=!1;function sc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Bp(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 $t(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function dn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Y&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Ut(e,n)}return s=r.interleaved,s===null?(t.next=t,rc(r)):(t.next=s.next,s.next=t),r.interleaved=t,Ut(e,n)}function Ni(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,Hu(e,n)}}function qd(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 oo(e,t,n,r){var s=e.updateQueue;Zt=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var u=a,c=u.next;u.next=null,o===null?i=c:o.next=c,o=u;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=u))}if(i!==null){var f=s.baseState;o=0,d=c=u=null,a=i;do{var h=a.lane,x=a.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:x,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,y=a;switch(h=t,x=n,y.tag){case 1:if(w=y.payload,typeof w=="function"){f=w.call(x,f,h);break e}f=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=y.payload,h=typeof w=="function"?w.call(x,f,h):w,h==null)break e;f=de({},f,h);break e;case 2:Zt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else x={eventTime:x,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=x,u=f):d=d.next=x,o|=h;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;h=a,a=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);zn|=o,e.lanes=o,e.memoizedState=f}}function Qd(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=ba.transition;ba.transition={};try{e(!1),t()}finally{J=n,ba.transition=r}}function sg(){return dt().memoizedState}function s1(e,t,n){var r=hn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ig(e))og(t,n);else if(n=zp(e,t,n,r),n!==null){var s=Be();bt(n,e,r,s),ag(n,t,r)}}function i1(e,t,n){var r=hn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ig(e))og(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,jt(a,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=zp(e,t,s,r),n!==null&&(s=Be(),bt(n,e,r,s),ag(n,t,r))}}function ig(e){var t=e.alternate;return e===ue||t!==null&&t===ue}function og(e,t){ss=lo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ag(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Hu(e,n)}}var uo={readContext:ct,useCallback:Me,useContext:Me,useEffect:Me,useImperativeHandle:Me,useInsertionEffect:Me,useLayoutEffect:Me,useMemo:Me,useReducer:Me,useRef:Me,useState:Me,useDebugValue:Me,useDeferredValue:Me,useTransition:Me,useMutableSource:Me,useSyncExternalStore:Me,useId:Me,unstable_isNewReconciler:!1},o1={readContext:ct,useCallback:function(e,t){return Ct().memoizedState=[e,t===void 0?null:t],e},useContext:ct,useEffect:Jd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Mi(4194308,4,Jp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Mi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Mi(4,2,e,t)},useMemo:function(e,t){var n=Ct();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ct();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=s1.bind(null,ue,e),[r.memoizedState,e]},useRef:function(e){var t=Ct();return e={current:e},t.memoizedState=e},useState:Zd,useDebugValue:fc,useDeferredValue:function(e){return Ct().memoizedState=e},useTransition:function(){var e=Zd(!1),t=e[0];return e=r1.bind(null,e[1]),Ct().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ue,s=Ct();if(ae){if(n===void 0)throw Error(M(407));n=n()}else{if(n=t(),Pe===null)throw Error(M(349));Fn&30||Up(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Jd(Kp.bind(null,r,i,e),[e]),r.flags|=2048,Ns(9,Gp.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Ct(),t=Pe.identifierPrefix;if(ae){var n=zt,r=Ft;n=(r&~(1<<32-kt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Cs++,0")&&(u=u.replace("",e.displayName)),u}while(1<=o&&0<=a);break}}}finally{ia=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Kr(e):""}function Ix(e){switch(e.tag){case 5:return Kr(e.type);case 16:return Kr("Lazy");case 13:return Kr("Suspense");case 19:return Kr("SuspenseList");case 0:case 2:case 15:return e=oa(e.type,!1),e;case 11:return e=oa(e.type.render,!1),e;case 1:return e=oa(e.type,!0),e;default:return""}}function il(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 Yn:return"Fragment";case Xn:return"Portal";case nl:return"Profiler";case Ou:return"StrictMode";case rl:return"Suspense";case sl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Bm:return(e.displayName||"Context")+".Consumer";case zm:return(e._context.displayName||"Context")+".Provider";case Fu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case zu:return t=e.displayName||null,t!==null?t:il(e.type)||"Memo";case Qt:t=e._payload,e=e._init;try{return il(e(t))}catch{}}return null}function Vx(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 il(t);case 8:return t===Ou?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function gn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Hm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ox(e){var t=Hm(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 ti(e){e._valueTracker||(e._valueTracker=Ox(e))}function Wm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Hm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ui(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 de({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function xd(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=gn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Um(e,t){t=t.checked,t!=null&&Vu(e,"checked",t,!1)}function al(e,t){Um(e,t);var n=gn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ll(e,t.type,n):t.hasOwnProperty("defaultValue")&&ll(e,t.type,gn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function vd(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 ll(e,t,n){(t!=="number"||Ui(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Xr=Array.isArray;function cr(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=ni.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ps(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Jr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Fx=["Webkit","ms","Moz","O"];Object.keys(Jr).forEach(function(e){Fx.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jr[t]=Jr[e]})});function Ym(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Jr.hasOwnProperty(e)&&Jr[e]?(""+t).trim():t+"px"}function qm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Ym(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var zx=de({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 dl(e,t){if(t){if(zx[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(M(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(M(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(M(61))}if(t.style!=null&&typeof t.style!="object")throw Error(M(62))}}function fl(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 hl=null;function Bu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ml=null,dr=null,fr=null;function bd(e){if(e=zs(e)){if(typeof ml!="function")throw Error(M(280));var t=e.stateNode;t&&(t=Ro(t),ml(e.stateNode,e.type,t))}}function Qm(e){dr?fr?fr.push(e):fr=[e]:dr=e}function Zm(){if(dr){var e=dr,t=fr;if(fr=dr=null,bd(e),t)for(e=0;e>>=0,e===0?32:31-(Qx(e)/Zx|0)|0}var ri=64,si=4194304;function Yr(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 Yi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=Yr(a):(i&=o,i!==0&&(r=Yr(i)))}else o=n&~s,o!==0?r=Yr(o):i!==0&&(r=Yr(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 Os(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-kt(t),e[t]=n}function nv(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=ts),Md=" ",Ld=!1;function xp(e,t){switch(e){case"keyup":return _v.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qn=!1;function Lv(e,t){switch(e){case"compositionend":return vp(t);case"keypress":return t.which!==32?null:(Ld=!0,Md);case"textInput":return e=t.data,e===Md&&Ld?null:e;default:return null}}function Av(e,t){if(qn)return e==="compositionend"||!Yu&&xp(e,t)?(e=gp(),Ti=Gu=nn=null,qn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)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=Id(n)}}function Sp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jp(){for(var e=window,t=Ui();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ui(e.document)}return t}function qu(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 $v(e){var t=jp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Sp(n.ownerDocument.documentElement,n)){if(r!==null&&qu(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=Vd(n,i);var o=Vd(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,Qn=null,wl=null,rs=null,kl=!1;function Od(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;kl||Qn==null||Qn!==Ui(r)||(r=Qn,"selectionStart"in r&&qu(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}),rs&&ks(rs,r)||(rs=r,r=Zi(wl,"onSelect"),0er||(e.current=Tl[er],Tl[er]=null,er--)}function se(e,t){er++,Tl[er]=e.current,e.current=t}var yn={},Ie=kn(yn),Ge=kn(!1),Vn=yn;function yr(e,t){var n=e.type.contextTypes;if(!n)return yn;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 Ke(e){return e=e.childContextTypes,e!=null}function eo(){oe(Ge),oe(Ie)}function Ud(e,t,n){if(Ie.current!==yn)throw Error(M(168));se(Ie,t),se(Ge,n)}function Ap(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(M(108,Vx(e)||"Unknown",s));return de({},n,r)}function to(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||yn,Vn=Ie.current,se(Ie,e),se(Ge,Ge.current),!0}function Gd(e,t,n){var r=e.stateNode;if(!r)throw Error(M(169));n?(e=Ap(e,t,Vn),r.__reactInternalMemoizedMergedChildContext=e,oe(Ge),oe(Ie),se(Ie,e)):oe(Ge),se(Ge,n)}var Ot=null,Io=!1,wa=!1;function Dp(e){Ot===null?Ot=[e]:Ot.push(e)}function e1(e){Io=!0,Dp(e)}function bn(){if(!wa&&Ot!==null){wa=!0;var e=0,t=J;try{var n=Ot;for(J=1;e>=o,s-=o,Ft=1<<32-kt(t)+s|n<j?(L=S,S=null):L=S.sibling;var _=h(p,S,v[j],b);if(_===null){S===null&&(S=L);break}e&&S&&_.alternate===null&&t(p,S),m=i(_,m,j),T===null?P=_:T.sibling=_,T=_,S=L}if(j===v.length)return n(p,S),ae&&Pn(p,j),P;if(S===null){for(;jj?(L=S,S=null):L=S.sibling;var F=h(p,S,_.value,b);if(F===null){S===null&&(S=L);break}e&&S&&F.alternate===null&&t(p,S),m=i(F,m,j),T===null?P=F:T.sibling=F,T=F,S=L}if(_.done)return n(p,S),ae&&Pn(p,j),P;if(S===null){for(;!_.done;j++,_=v.next())_=f(p,_.value,b),_!==null&&(m=i(_,m,j),T===null?P=_:T.sibling=_,T=_);return ae&&Pn(p,j),P}for(S=r(p,S);!_.done;j++,_=v.next())_=x(S,p,j,_.value,b),_!==null&&(e&&_.alternate!==null&&S.delete(_.key===null?j:_.key),m=i(_,m,j),T===null?P=_:T.sibling=_,T=_);return e&&S.forEach(function(H){return t(p,H)}),ae&&Pn(p,j),P}function k(p,m,v,b){if(typeof v=="object"&&v!==null&&v.type===Yn&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case ei:e:{for(var P=v.key,T=m;T!==null;){if(T.key===P){if(P=v.type,P===Yn){if(T.tag===7){n(p,T.sibling),m=s(T,v.props.children),m.return=p,p=m;break e}}else if(T.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Qt&&Yd(P)===T.type){n(p,T.sibling),m=s(T,v.props),m.ref=$r(p,T,v),m.return=p,p=m;break e}n(p,T);break}else t(p,T);T=T.sibling}v.type===Yn?(m=Dn(v.props.children,p.mode,b,v.key),m.return=p,p=m):(b=Ri(v.type,v.key,v.props,null,p.mode,b),b.ref=$r(p,m,v),b.return=p,p=b)}return o(p);case Xn:e:{for(T=v.key;m!==null;){if(m.key===T)if(m.tag===4&&m.stateNode.containerInfo===v.containerInfo&&m.stateNode.implementation===v.implementation){n(p,m.sibling),m=s(m,v.children||[]),m.return=p,p=m;break e}else{n(p,m);break}else t(p,m);m=m.sibling}m=Ea(v,p.mode,b),m.return=p,p=m}return o(p);case Qt:return T=v._init,k(p,m,T(v._payload),b)}if(Xr(v))return w(p,m,v,b);if(Vr(v))return y(p,m,v,b);di(p,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,m!==null&&m.tag===6?(n(p,m.sibling),m=s(m,v),m.return=p,p=m):(n(p,m),m=Ta(v,p.mode,b),m.return=p,p=m),o(p)):n(p,m)}return k}var vr=Op(!0),Fp=Op(!1),so=kn(null),io=null,rr=null,ec=null;function tc(){ec=rr=io=null}function nc(e){var t=so.current;oe(so),e._currentValue=t}function _l(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 mr(e,t){io=e,ec=rr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ue=!0),e.firstContext=null)}function ct(e){var t=e._currentValue;if(ec!==e)if(e={context:e,memoizedValue:t,next:null},rr===null){if(io===null)throw Error(M(308));rr=e,io.dependencies={lanes:0,firstContext:e}}else rr=rr.next=e;return t}var Nn=null;function rc(e){Nn===null?Nn=[e]:Nn.push(e)}function zp(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,Ut(e,r)}function Ut(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Zt=!1;function sc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Bp(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 $t(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function dn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Y&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Ut(e,n)}return s=r.interleaved,s===null?(t.next=t,rc(r)):(t.next=s.next,s.next=t),r.interleaved=t,Ut(e,n)}function Ni(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,Hu(e,n)}}function qd(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 oo(e,t,n,r){var s=e.updateQueue;Zt=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var u=a,c=u.next;u.next=null,o===null?i=c:o.next=c,o=u;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=u))}if(i!==null){var f=s.baseState;o=0,d=c=u=null,a=i;do{var h=a.lane,x=a.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:x,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,y=a;switch(h=t,x=n,y.tag){case 1:if(w=y.payload,typeof w=="function"){f=w.call(x,f,h);break e}f=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=y.payload,h=typeof w=="function"?w.call(x,f,h):w,h==null)break e;f=de({},f,h);break e;case 2:Zt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else x={eventTime:x,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=x,u=f):d=d.next=x,o|=h;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;h=a,a=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);zn|=o,e.lanes=o,e.memoizedState=f}}function Qd(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=ba.transition;ba.transition={};try{e(!1),t()}finally{J=n,ba.transition=r}}function sg(){return dt().memoizedState}function s1(e,t,n){var r=hn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ig(e))og(t,n);else if(n=zp(e,t,n,r),n!==null){var s=Be();bt(n,e,r,s),ag(n,t,r)}}function i1(e,t,n){var r=hn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ig(e))og(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,jt(a,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=zp(e,t,s,r),n!==null&&(s=Be(),bt(n,e,r,s),ag(n,t,r))}}function ig(e){var t=e.alternate;return e===ue||t!==null&&t===ue}function og(e,t){ss=lo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ag(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Hu(e,n)}}var uo={readContext:ct,useCallback:Me,useContext:Me,useEffect:Me,useImperativeHandle:Me,useInsertionEffect:Me,useLayoutEffect:Me,useMemo:Me,useReducer:Me,useRef:Me,useState:Me,useDebugValue:Me,useDeferredValue:Me,useTransition:Me,useMutableSource:Me,useSyncExternalStore:Me,useId:Me,unstable_isNewReconciler:!1},o1={readContext:ct,useCallback:function(e,t){return Tt().memoizedState=[e,t===void 0?null:t],e},useContext:ct,useEffect:Jd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Mi(4194308,4,Jp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Mi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Mi(4,2,e,t)},useMemo:function(e,t){var n=Tt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Tt();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=s1.bind(null,ue,e),[r.memoizedState,e]},useRef:function(e){var t=Tt();return e={current:e},t.memoizedState=e},useState:Zd,useDebugValue:fc,useDeferredValue:function(e){return Tt().memoizedState=e},useTransition:function(){var e=Zd(!1),t=e[0];return e=r1.bind(null,e[1]),Tt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ue,s=Tt();if(ae){if(n===void 0)throw Error(M(407));n=n()}else{if(n=t(),Pe===null)throw Error(M(349));Fn&30||Up(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Jd(Kp.bind(null,r,i,e),[e]),r.flags|=2048,Ns(9,Gp.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Tt(),t=Pe.identifierPrefix;if(ae){var n=zt,r=Ft;n=(r&~(1<<32-kt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ts++,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[js]=r,yg(e,t,!1,!1),t.stateNode=e;e:{switch(o=fl(n,r),n){case"dialog":ie("cancel",e),ie("close",e),s=r;break;case"iframe":case"object":case"embed":ie("load",e),s=r;break;case"video":case"audio":for(s=0;sbr&&(t.flags|=128,r=!0,Hr(i,!1),t.lanes=4194304)}else{if(!r)if(e=ao(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Hr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!ae)return Le(t),null}else 2*pe()-i.renderingStartTime>br&&n!==1073741824&&(t.flags|=128,r=!0,Hr(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=pe(),t.sibling=null,n=le.current,se(le,r?n&1|2:n&1),t):(Le(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?qe&1073741824&&(Le(t),t.subtreeFlags&6&&(t.flags|=8192)):Le(t),null;case 24:return null;case 25:return null}throw Error(M(156,t.tag))}function m1(e,t){switch(Zu(t),t.tag){case 1:return Ke(t.type)&&eo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wr(),oe(Ge),oe(Ie),ac(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return oc(t),null;case 13:if(oe(le),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(M(340));xr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return oe(le),null;case 4:return wr(),null;case 10:return nc(t.type._context),null;case 22:case 23:return xc(),null;case 24:return null;default:return null}}var hi=!1,Re=!1,p1=typeof WeakSet=="function"?WeakSet:Set,I=null;function sr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){he(e,t,r)}else n.current=null}function Fl(e,t,n){try{n()}catch(r){he(e,t,r)}}var df=!1;function g1(e,t){if(bl=qi,e=jp(),qu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,u=-1,c=0,d=0,f=e,h=null;t:for(;;){for(var x;f!==n||s!==0&&f.nodeType!==3||(a=o+s),f!==i||r!==0&&f.nodeType!==3||(u=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(x=f.firstChild)!==null;)h=f,f=x;for(;;){if(f===e)break t;if(h===n&&++c===s&&(a=o),h===i&&++d===r&&(u=o),(x=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=x}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Sl={focusedElem:e,selectionRange:n},qi=!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 w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var y=w.memoizedProps,k=w.memoizedState,p=t.stateNode,m=p.getSnapshotBeforeUpdate(t.elementType===t.type?y:yt(t.type,y),k);p.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(M(163))}}catch(b){he(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,I=e;break}I=t.return}return w=df,df=!1,w}function is(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&&Fl(t,n,i)}s=s.next}while(s!==r)}}function Fo(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 zl(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 wg(e){var t=e.alternate;t!==null&&(e.alternate=null,wg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[_t],delete t[js],delete t[Tl],delete t[Zv],delete t[Jv])),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 kg(e){return e.tag===5||e.tag===3||e.tag===4}function ff(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||kg(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 Bl(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=Ji));else if(r!==4&&(e=e.child,e!==null))for(Bl(e,t,n),e=e.sibling;e!==null;)Bl(e,t,n),e=e.sibling}function $l(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($l(e,t,n),e=e.sibling;e!==null;)$l(e,t,n),e=e.sibling}var Ee=null,xt=!1;function Yt(e,t,n){for(n=n.child;n!==null;)bg(e,t,n),n=n.sibling}function bg(e,t,n){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(Mo,n)}catch{}switch(n.tag){case 5:Re||sr(n,t);case 6:var r=Ee,s=xt;Ee=null,Yt(e,t,n),Ee=r,xt=s,Ee!==null&&(xt?(e=Ee,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ee.removeChild(n.stateNode));break;case 18:Ee!==null&&(xt?(e=Ee,n=n.stateNode,e.nodeType===8?va(e.parentNode,n):e.nodeType===1&&va(e,n),vs(e)):va(Ee,n.stateNode));break;case 4:r=Ee,s=xt,Ee=n.stateNode.containerInfo,xt=!0,Yt(e,t,n),Ee=r,xt=s;break;case 0:case 11:case 14:case 15:if(!Re&&(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)&&Fl(n,t,o),s=s.next}while(s!==r)}Yt(e,t,n);break;case 1:if(!Re&&(sr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){he(n,t,a)}Yt(e,t,n);break;case 21:Yt(e,t,n);break;case 22:n.mode&1?(Re=(r=Re)||n.memoizedState!==null,Yt(e,t,n),Re=r):Yt(e,t,n);break;default:Yt(e,t,n)}}function hf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new p1),t.forEach(function(r){var s=P1.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function mt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=o),r&=~i}if(r=s,r=pe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*x1(r/1960))-r,10e?16:e,rn===null)var r=!1;else{if(e=rn,rn=null,ho=0,Y&6)throw Error(M(331));var s=Y;for(Y|=4,I=e.current;I!==null;){var i=I,o=i.child;if(I.flags&16){var a=i.deletions;if(a!==null){for(var u=0;upe()-gc?An(e,0):pc|=n),Xe(e,t)}function _g(e,t){t===0&&(e.mode&1?(t=si,si<<=1,!(si&130023424)&&(si=4194304)):t=1);var n=Be();e=Ut(e,t),e!==null&&(Os(e,t,n),Xe(e,n))}function j1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),_g(e,n)}function P1(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(M(314))}r!==null&&r.delete(t),_g(e,n)}var Mg;Mg=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ge.current)Ue=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ue=!1,f1(e,t,n);Ue=!!(e.flags&131072)}else Ue=!1,ae&&t.flags&1048576&&Rp(t,ro,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Li(e,t),e=t.pendingProps;var s=yr(t,Ie.current);mr(t,n),s=uc(null,t,r,e,s,n);var i=cc();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,Ke(r)?(i=!0,to(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,sc(t),s.updater=Oo,t.stateNode=s,s._reactInternals=t,Ll(t,r,e,n),t=Rl(null,t,r,!0,i,n)):(t.tag=0,ae&&i&&Qu(t),Oe(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Li(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=C1(r),e=yt(r,e),s){case 0:t=Dl(null,t,r,e,n);break e;case 1:t=lf(null,t,r,e,n);break e;case 11:t=of(null,t,r,e,n);break e;case 14:t=af(null,t,r,yt(r.type,e),n);break e}throw Error(M(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:yt(r,s),Dl(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:yt(r,s),lf(e,t,r,s,n);case 3:e:{if(mg(t),e===null)throw Error(M(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Bp(e,t),oo(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=kr(Error(M(423)),t),t=uf(e,t,r,n,s);break e}else if(r!==s){s=kr(Error(M(424)),t),t=uf(e,t,r,n,s);break e}else for(Qe=cn(t.stateNode.containerInfo.firstChild),Ze=t,ae=!0,vt=null,n=Fp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(xr(),r===s){t=Gt(e,t,n);break e}Oe(e,t,r,n)}t=t.child}return t;case 5:return $p(t),e===null&&Nl(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,jl(r,s)?o=null:i!==null&&jl(r,i)&&(t.flags|=32),hg(e,t),Oe(e,t,o,n),t.child;case 6:return e===null&&Nl(t),null;case 13:return pg(e,t,n);case 4:return ic(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=vr(t,null,r,n):Oe(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:yt(r,s),of(e,t,r,s,n);case 7:return Oe(e,t,t.pendingProps,n),t.child;case 8:return Oe(e,t,t.pendingProps.children,n),t.child;case 12:return Oe(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,se(so,r._currentValue),r._currentValue=o,i!==null)if(jt(i.value,o)){if(i.children===s.children&&!Ge.current){t=Gt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=$t(-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),_l(i.return,n,t),a.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(M(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),_l(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}Oe(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,mr(t,n),s=ct(s),r=r(s),t.flags|=1,Oe(e,t,r,n),t.child;case 14:return r=t.type,s=yt(r,t.pendingProps),s=yt(r.type,s),af(e,t,r,s,n);case 15:return dg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:yt(r,s),Li(e,t),t.tag=1,Ke(r)?(e=!0,to(t)):e=!1,mr(t,n),lg(t,r,s),Ll(t,r,s,n),Rl(null,t,r,!0,e,n);case 19:return gg(e,t,n);case 22:return fg(e,t,n)}throw Error(M(156,t.tag))};function Lg(e,t){return ip(e,t)}function T1(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 at(e,t,n,r){return new T1(e,t,n,r)}function wc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function C1(e){if(typeof e=="function")return wc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Fu)return 11;if(e===zu)return 14}return 2}function mn(e,t){var n=e.alternate;return n===null?(n=at(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 Ri(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")wc(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Yn:return Dn(n.children,s,i,t);case Ou:o=8,s|=8;break;case nl:return e=at(12,n,t,s|2),e.elementType=nl,e.lanes=i,e;case rl:return e=at(13,n,t,s),e.elementType=rl,e.lanes=i,e;case sl:return e=at(19,n,t,s),e.elementType=sl,e.lanes=i,e;case $m:return Bo(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case zm:o=10;break e;case Bm:o=9;break e;case Fu:o=11;break e;case zu:o=14;break e;case Qt:o=16,r=null;break e}throw Error(M(130,e==null?e:typeof e,""))}return t=at(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function Dn(e,t,n,r){return e=at(7,e,r,t),e.lanes=n,e}function Bo(e,t,n,r){return e=at(22,e,r,t),e.elementType=$m,e.lanes=n,e.stateNode={isHidden:!1},e}function Ca(e,t,n){return e=at(6,e,null,t),e.lanes=n,e}function Ea(e,t,n){return t=at(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function E1(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=la(0),this.expirationTimes=la(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=la(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function kc(e,t,n,r,s,i,o,a,u){return e=new E1(e,t,n,a,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=at(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},sc(i),e}function N1(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ig)}catch(e){console.error(e)}}Ig(),Im.exports=tt;var Go=Im.exports;const wN=Sm(Go);var kf=Go;el.createRoot=kf.createRoot,el.hydrateRoot=kf.hydrateRoot;/** +`+i.stack}return{value:e,source:t,stack:s,digest:null}}function Pa(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Al(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var u1=typeof WeakMap=="function"?WeakMap:Map;function ug(e,t,n){n=$t(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){fo||(fo=!0,Hl=r),Al(e,t)},n}function cg(e,t,n){n=$t(-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(){Al(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Al(e,t),typeof r!="function"&&(fn===null?fn=new Set([this]):fn.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function nf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new u1;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=S1.bind(null,e,t,n),t.then(e,e))}function rf(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 sf(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=$t(-1,1),t.tag=2,dn(n,t,1))),n.lanes|=1),e)}var c1=Kt.ReactCurrentOwner,Ue=!1;function Oe(e,t,n,r){t.child=e===null?Fp(t,null,n,r):vr(t,e.child,n,r)}function of(e,t,n,r,s){n=n.render;var i=t.ref;return mr(t,s),r=uc(e,t,n,r,i,s),n=cc(),e!==null&&!Ue?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Gt(e,t,s)):(ae&&n&&Qu(t),t.flags|=1,Oe(e,t,r,s),t.child)}function af(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!wc(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,dg(e,t,i,r,s)):(e=Ri(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:ks,n(o,r)&&e.ref===t.ref)return Gt(e,t,s)}return t.flags|=1,e=mn(i,r),e.ref=t.ref,e.return=t,t.child=e}function dg(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(ks(i,r)&&e.ref===t.ref)if(Ue=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Ue=!0);else return t.lanes=e.lanes,Gt(e,t,s)}return Dl(e,t,n,r,s)}function fg(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},se(ir,qe),qe|=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,se(ir,qe),qe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,se(ir,qe),qe|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,se(ir,qe),qe|=r;return Oe(e,t,s,n),t.child}function hg(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Dl(e,t,n,r,s){var i=Ke(n)?Vn:Ie.current;return i=yr(t,i),mr(t,s),n=uc(e,t,n,r,i,s),r=cc(),e!==null&&!Ue?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Gt(e,t,s)):(ae&&r&&Qu(t),t.flags|=1,Oe(e,t,n,s),t.child)}function lf(e,t,n,r,s){if(Ke(n)){var i=!0;to(t)}else i=!1;if(mr(t,s),t.stateNode===null)Li(e,t),lg(t,n,r),Ll(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var u=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=ct(c):(c=Ke(n)?Vn:Ie.current,c=yr(t,c));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||u!==c)&&tf(t,o,r,c),Zt=!1;var h=t.memoizedState;o.state=h,oo(t,r,o,s),u=t.memoizedState,a!==r||h!==u||Ge.current||Zt?(typeof d=="function"&&(Ml(t,n,d,r),u=t.memoizedState),(a=Zt||ef(t,n,a,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=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Bp(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:yt(t.type,a),o.props=c,f=t.pendingProps,h=o.context,u=n.contextType,typeof u=="object"&&u!==null?u=ct(u):(u=Ke(n)?Vn:Ie.current,u=yr(t,u));var x=n.getDerivedStateFromProps;(d=typeof x=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||h!==u)&&tf(t,o,r,u),Zt=!1,h=t.memoizedState,o.state=h,oo(t,r,o,s);var w=t.memoizedState;a!==f||h!==w||Ge.current||Zt?(typeof x=="function"&&(Ml(t,n,x,r),w=t.memoizedState),(c=Zt||ef(t,n,c,r,h,w,u)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,w,u),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,w,u)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),o.props=r,o.state=w,o.context=u,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Rl(e,t,n,r,i,s)}function Rl(e,t,n,r,s,i){hg(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&Gd(t,n,!1),Gt(e,t,i);r=t.stateNode,c1.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=vr(t,e.child,null,i),t.child=vr(t,null,a,i)):Oe(e,t,a,i),t.memoizedState=r.state,s&&Gd(t,n,!0),t.child}function mg(e){var t=e.stateNode;t.pendingContext?Ud(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ud(e,t.context,!1),ic(e,t.containerInfo)}function uf(e,t,n,r,s){return xr(),Ju(s),t.flags|=256,Oe(e,t,n,r),t.child}var Il={dehydrated:null,treeContext:null,retryLane:0};function Vl(e){return{baseLanes:e,cachePool:null,transitions:null}}function pg(e,t,n){var r=t.pendingProps,s=le.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),se(le,s&1),e===null)return Nl(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=Bo(o,r,0,null),e=Dn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Vl(n),t.memoizedState=Il,e):hc(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return d1(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=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=mn(s,u),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=mn(a,i):(i=Dn(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?Vl(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=Il,r}return i=e.child,e=i.sibling,r=mn(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 hc(e,t){return t=Bo({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function fi(e,t,n,r){return r!==null&&Ju(r),vr(t,e.child,null,n),e=hc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function d1(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=Pa(Error(M(422))),fi(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=Bo({mode:"visible",children:r.children},s,0,null),i=Dn(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&vr(t,e.child,null,o),t.child.memoizedState=Vl(o),t.memoizedState=Il,i);if(!(t.mode&1))return fi(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(M(419)),r=Pa(i,r,void 0),fi(e,t,o,r)}if(a=(o&e.childLanes)!==0,Ue||a){if(r=Pe,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,Ut(e,s),bt(r,e,s,-1))}return vc(),r=Pa(Error(M(421))),fi(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=j1.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Qe=cn(s.nextSibling),Ze=t,ae=!0,vt=null,e!==null&&(it[ot++]=Ft,it[ot++]=zt,it[ot++]=On,Ft=e.id,zt=e.overflow,On=t),t=hc(t,r.children),t.flags|=4096,t)}function cf(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),_l(e.return,t,n)}function Ca(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 gg(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(Oe(e,t,r.children,n),r=le.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&&cf(e,n,t);else if(e.tag===19)cf(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(se(le,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&&ao(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Ca(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&&ao(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Ca(t,!0,n,null,i);break;case"together":Ca(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Li(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Gt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),zn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(M(153));if(t.child!==null){for(e=t.child,n=mn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=mn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function f1(e,t,n){switch(t.tag){case 3:mg(t),xr();break;case 5:$p(t);break;case 1:Ke(t.type)&&to(t);break;case 4:ic(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;se(so,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(se(le,le.current&1),t.flags|=128,null):n&t.child.childLanes?pg(e,t,n):(se(le,le.current&1),e=Gt(e,t,n),e!==null?e.sibling:null);se(le,le.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return gg(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),se(le,le.current),r)break;return null;case 22:case 23:return t.lanes=0,fg(e,t,n)}return Gt(e,t,n)}var yg,Ol,xg,vg;yg=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}};Ol=function(){};xg=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,_n(Lt.current);var i=null;switch(n){case"input":s=ol(e,s),r=ol(e,r),i=[];break;case"select":s=de({},s,{value:void 0}),r=de({},r,{value:void 0}),i=[];break;case"textarea":s=ul(e,s),r=ul(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ji)}dl(n,r);var o;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ms.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var u=r[c];if(a=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&u!==a&&(u!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&a[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,a=a?a.__html:void 0,u!=null&&a!==u&&(i=i||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(i=i||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ms.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&ie("scroll",e),i||a===u||(i=[])):(i=i||[]).push(c,u))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};vg=function(e,t,n,r){n!==r&&(t.flags|=4)};function Hr(e,t){if(!ae)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 Le(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 h1(e,t,n){var r=t.pendingProps;switch(Zu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Le(t),null;case 1:return Ke(t.type)&&eo(),Le(t),null;case 3:return r=t.stateNode,wr(),oe(Ge),oe(Ie),ac(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ci(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,vt!==null&&(Gl(vt),vt=null))),Ol(e,t),Le(t),null;case 5:oc(t);var s=_n(Cs.current);if(n=t.type,e!==null&&t.stateNode!=null)xg(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(M(166));return Le(t),null}if(e=_n(Lt.current),ci(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[_t]=t,r[js]=i,e=(t.mode&1)!==0,n){case"dialog":ie("cancel",r),ie("close",r);break;case"iframe":case"object":case"embed":ie("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[js]=r,yg(e,t,!1,!1),t.stateNode=e;e:{switch(o=fl(n,r),n){case"dialog":ie("cancel",e),ie("close",e),s=r;break;case"iframe":case"object":case"embed":ie("load",e),s=r;break;case"video":case"audio":for(s=0;sbr&&(t.flags|=128,r=!0,Hr(i,!1),t.lanes=4194304)}else{if(!r)if(e=ao(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Hr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!ae)return Le(t),null}else 2*pe()-i.renderingStartTime>br&&n!==1073741824&&(t.flags|=128,r=!0,Hr(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=pe(),t.sibling=null,n=le.current,se(le,r?n&1|2:n&1),t):(Le(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?qe&1073741824&&(Le(t),t.subtreeFlags&6&&(t.flags|=8192)):Le(t),null;case 24:return null;case 25:return null}throw Error(M(156,t.tag))}function m1(e,t){switch(Zu(t),t.tag){case 1:return Ke(t.type)&&eo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wr(),oe(Ge),oe(Ie),ac(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return oc(t),null;case 13:if(oe(le),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(M(340));xr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return oe(le),null;case 4:return wr(),null;case 10:return nc(t.type._context),null;case 22:case 23:return xc(),null;case 24:return null;default:return null}}var hi=!1,Re=!1,p1=typeof WeakSet=="function"?WeakSet:Set,I=null;function sr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){he(e,t,r)}else n.current=null}function Fl(e,t,n){try{n()}catch(r){he(e,t,r)}}var df=!1;function g1(e,t){if(bl=qi,e=jp(),qu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,u=-1,c=0,d=0,f=e,h=null;t:for(;;){for(var x;f!==n||s!==0&&f.nodeType!==3||(a=o+s),f!==i||r!==0&&f.nodeType!==3||(u=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(x=f.firstChild)!==null;)h=f,f=x;for(;;){if(f===e)break t;if(h===n&&++c===s&&(a=o),h===i&&++d===r&&(u=o),(x=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=x}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Sl={focusedElem:e,selectionRange:n},qi=!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 w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var y=w.memoizedProps,k=w.memoizedState,p=t.stateNode,m=p.getSnapshotBeforeUpdate(t.elementType===t.type?y:yt(t.type,y),k);p.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(M(163))}}catch(b){he(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,I=e;break}I=t.return}return w=df,df=!1,w}function is(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&&Fl(t,n,i)}s=s.next}while(s!==r)}}function Fo(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 zl(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 wg(e){var t=e.alternate;t!==null&&(e.alternate=null,wg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[_t],delete t[js],delete t[Cl],delete t[Zv],delete t[Jv])),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 kg(e){return e.tag===5||e.tag===3||e.tag===4}function ff(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||kg(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 Bl(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=Ji));else if(r!==4&&(e=e.child,e!==null))for(Bl(e,t,n),e=e.sibling;e!==null;)Bl(e,t,n),e=e.sibling}function $l(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($l(e,t,n),e=e.sibling;e!==null;)$l(e,t,n),e=e.sibling}var Ee=null,xt=!1;function Yt(e,t,n){for(n=n.child;n!==null;)bg(e,t,n),n=n.sibling}function bg(e,t,n){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(Mo,n)}catch{}switch(n.tag){case 5:Re||sr(n,t);case 6:var r=Ee,s=xt;Ee=null,Yt(e,t,n),Ee=r,xt=s,Ee!==null&&(xt?(e=Ee,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ee.removeChild(n.stateNode));break;case 18:Ee!==null&&(xt?(e=Ee,n=n.stateNode,e.nodeType===8?va(e.parentNode,n):e.nodeType===1&&va(e,n),vs(e)):va(Ee,n.stateNode));break;case 4:r=Ee,s=xt,Ee=n.stateNode.containerInfo,xt=!0,Yt(e,t,n),Ee=r,xt=s;break;case 0:case 11:case 14:case 15:if(!Re&&(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)&&Fl(n,t,o),s=s.next}while(s!==r)}Yt(e,t,n);break;case 1:if(!Re&&(sr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){he(n,t,a)}Yt(e,t,n);break;case 21:Yt(e,t,n);break;case 22:n.mode&1?(Re=(r=Re)||n.memoizedState!==null,Yt(e,t,n),Re=r):Yt(e,t,n);break;default:Yt(e,t,n)}}function hf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new p1),t.forEach(function(r){var s=P1.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function mt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=o),r&=~i}if(r=s,r=pe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*x1(r/1960))-r,10e?16:e,rn===null)var r=!1;else{if(e=rn,rn=null,ho=0,Y&6)throw Error(M(331));var s=Y;for(Y|=4,I=e.current;I!==null;){var i=I,o=i.child;if(I.flags&16){var a=i.deletions;if(a!==null){for(var u=0;upe()-gc?An(e,0):pc|=n),Xe(e,t)}function _g(e,t){t===0&&(e.mode&1?(t=si,si<<=1,!(si&130023424)&&(si=4194304)):t=1);var n=Be();e=Ut(e,t),e!==null&&(Os(e,t,n),Xe(e,n))}function j1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),_g(e,n)}function P1(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(M(314))}r!==null&&r.delete(t),_g(e,n)}var Mg;Mg=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ge.current)Ue=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ue=!1,f1(e,t,n);Ue=!!(e.flags&131072)}else Ue=!1,ae&&t.flags&1048576&&Rp(t,ro,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Li(e,t),e=t.pendingProps;var s=yr(t,Ie.current);mr(t,n),s=uc(null,t,r,e,s,n);var i=cc();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,Ke(r)?(i=!0,to(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,sc(t),s.updater=Oo,t.stateNode=s,s._reactInternals=t,Ll(t,r,e,n),t=Rl(null,t,r,!0,i,n)):(t.tag=0,ae&&i&&Qu(t),Oe(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Li(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=T1(r),e=yt(r,e),s){case 0:t=Dl(null,t,r,e,n);break e;case 1:t=lf(null,t,r,e,n);break e;case 11:t=of(null,t,r,e,n);break e;case 14:t=af(null,t,r,yt(r.type,e),n);break e}throw Error(M(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:yt(r,s),Dl(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:yt(r,s),lf(e,t,r,s,n);case 3:e:{if(mg(t),e===null)throw Error(M(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Bp(e,t),oo(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=kr(Error(M(423)),t),t=uf(e,t,r,n,s);break e}else if(r!==s){s=kr(Error(M(424)),t),t=uf(e,t,r,n,s);break e}else for(Qe=cn(t.stateNode.containerInfo.firstChild),Ze=t,ae=!0,vt=null,n=Fp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(xr(),r===s){t=Gt(e,t,n);break e}Oe(e,t,r,n)}t=t.child}return t;case 5:return $p(t),e===null&&Nl(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,jl(r,s)?o=null:i!==null&&jl(r,i)&&(t.flags|=32),hg(e,t),Oe(e,t,o,n),t.child;case 6:return e===null&&Nl(t),null;case 13:return pg(e,t,n);case 4:return ic(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=vr(t,null,r,n):Oe(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:yt(r,s),of(e,t,r,s,n);case 7:return Oe(e,t,t.pendingProps,n),t.child;case 8:return Oe(e,t,t.pendingProps.children,n),t.child;case 12:return Oe(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,se(so,r._currentValue),r._currentValue=o,i!==null)if(jt(i.value,o)){if(i.children===s.children&&!Ge.current){t=Gt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=$t(-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),_l(i.return,n,t),a.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(M(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),_l(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}Oe(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,mr(t,n),s=ct(s),r=r(s),t.flags|=1,Oe(e,t,r,n),t.child;case 14:return r=t.type,s=yt(r,t.pendingProps),s=yt(r.type,s),af(e,t,r,s,n);case 15:return dg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:yt(r,s),Li(e,t),t.tag=1,Ke(r)?(e=!0,to(t)):e=!1,mr(t,n),lg(t,r,s),Ll(t,r,s,n),Rl(null,t,r,!0,e,n);case 19:return gg(e,t,n);case 22:return fg(e,t,n)}throw Error(M(156,t.tag))};function Lg(e,t){return ip(e,t)}function C1(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 at(e,t,n,r){return new C1(e,t,n,r)}function wc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function T1(e){if(typeof e=="function")return wc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Fu)return 11;if(e===zu)return 14}return 2}function mn(e,t){var n=e.alternate;return n===null?(n=at(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 Ri(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")wc(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Yn:return Dn(n.children,s,i,t);case Ou:o=8,s|=8;break;case nl:return e=at(12,n,t,s|2),e.elementType=nl,e.lanes=i,e;case rl:return e=at(13,n,t,s),e.elementType=rl,e.lanes=i,e;case sl:return e=at(19,n,t,s),e.elementType=sl,e.lanes=i,e;case $m:return Bo(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case zm:o=10;break e;case Bm:o=9;break e;case Fu:o=11;break e;case zu:o=14;break e;case Qt:o=16,r=null;break e}throw Error(M(130,e==null?e:typeof e,""))}return t=at(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function Dn(e,t,n,r){return e=at(7,e,r,t),e.lanes=n,e}function Bo(e,t,n,r){return e=at(22,e,r,t),e.elementType=$m,e.lanes=n,e.stateNode={isHidden:!1},e}function Ta(e,t,n){return e=at(6,e,null,t),e.lanes=n,e}function Ea(e,t,n){return t=at(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function E1(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=la(0),this.expirationTimes=la(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=la(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function kc(e,t,n,r,s,i,o,a,u){return e=new E1(e,t,n,a,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=at(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},sc(i),e}function N1(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ig)}catch(e){console.error(e)}}Ig(),Im.exports=tt;var Go=Im.exports;const wN=Sm(Go);var kf=Go;el.createRoot=kf.createRoot,el.hydrateRoot=kf.hydrateRoot;/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. @@ -47,7 +47,7 @@ Error generating stack: `+i.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Ms(){return Ms=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Pc(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function R1(){return Math.random().toString(36).substr(2,8)}function Sf(e,t){return{usr:e.state,key:e.key,idx:t}}function Kl(e,t,n,r){return n===void 0&&(n=null),Ms({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Mr(t):t,{state:n,key:t&&t.key||r||R1()})}function go(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Mr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function I1(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=sn.Pop,u=null,c=d();c==null&&(c=0,o.replaceState(Ms({},o.state,{idx:c}),""));function d(){return(o.state||{idx:null}).idx}function f(){a=sn.Pop;let k=d(),p=k==null?null:k-c;c=k,u&&u({action:a,location:y.location,delta:p})}function h(k,p){a=sn.Push;let m=Kl(y.location,k,p);c=d()+1;let v=Sf(m,c),b=y.createHref(m);try{o.pushState(v,"",b)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;s.location.assign(b)}i&&u&&u({action:a,location:y.location,delta:1})}function x(k,p){a=sn.Replace;let m=Kl(y.location,k,p);c=d();let v=Sf(m,c),b=y.createHref(m);o.replaceState(v,"",b),i&&u&&u({action:a,location:y.location,delta:0})}function w(k){let p=s.location.origin!=="null"?s.location.origin:s.location.href,m=typeof k=="string"?k:go(k);return m=m.replace(/ $/,"%20"),ce(p,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,p)}let y={get action(){return a},get location(){return e(s,o)},listen(k){if(u)throw new Error("A history only accepts one active listener");return s.addEventListener(bf,f),u=k,()=>{s.removeEventListener(bf,f),u=null}},createHref(k){return t(s,k)},createURL:w,encodeLocation(k){let p=w(k);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:h,replace:x,go(k){return o.go(k)}};return y}var jf;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(jf||(jf={}));function V1(e,t,n){return n===void 0&&(n="/"),O1(e,t,n)}function O1(e,t,n,r){let s=typeof t=="string"?Mr(t):t,i=Sr(s.pathname||"/",n);if(i==null)return null;let o=Vg(e);F1(o);let a=null,u=q1(i);for(let c=0;a==null&&c{let u={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};u.relativePath.startsWith("/")&&(ce(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let c=pn([r,u.relativePath]),d=n.concat(u);i.children&&i.children.length>0&&(ce(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Vg(i.children,t,d,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:G1(c,i.index),routesMeta:d})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let u of Og(i.path))s(i,o,u)}),t}function Og(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=Og(r.join("/")),a=[];return a.push(...o.map(u=>u===""?i:[i,u].join("/"))),s&&a.push(...o),a.map(u=>e.startsWith("/")&&u===""?"/":u)}function F1(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:K1(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const z1=/^:[\w-]+$/,B1=3,$1=2,H1=1,W1=10,U1=-2,Pf=e=>e==="*";function G1(e,t){let n=e.split("/"),r=n.length;return n.some(Pf)&&(r+=U1),t&&(r+=$1),n.filter(s=>!Pf(s)).reduce((s,i)=>s+(z1.test(i)?B1:i===""?H1:W1),r)}function K1(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function X1(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a{let{paramName:h,isOptional:x}=d;if(h==="*"){let y=a[f]||"";o=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const w=a[f];return x&&!w?c[h]=void 0:c[h]=(w||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function Y1(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Pc(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,u)=>(r.push({paramName:a,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function q1(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Pc(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Sr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const Q1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Z1=e=>Q1.test(e);function J1(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Mr(e):e,i;if(n)if(Z1(n))i=n;else{if(n.includes("//")){let o=n;n=Fg(n),Pc(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?i=Tf(n.substring(1),"/"):i=Tf(n,t)}else i=t;return{pathname:i,search:nw(r),hash:rw(s)}}function Tf(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Na(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function ew(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Tc(e,t){let n=ew(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Cc(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Mr(e):(s=Ms({},e),ce(!s.pathname||!s.pathname.includes("?"),Na("?","pathname","search",s)),ce(!s.pathname||!s.pathname.includes("#"),Na("#","pathname","hash",s)),ce(!s.search||!s.search.includes("#"),Na("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;s.pathname=h.join("/")}a=f>=0?t[f]:"/"}let u=J1(s,a),c=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(c||d)&&(u.pathname+="/"),u}const Fg=e=>e.replace(/\/\/+/g,"/"),pn=e=>Fg(e.join("/")),tw=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),nw=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,rw=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function sw(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const zg=["post","put","patch","delete"];new Set(zg);const iw=["get",...zg];new Set(iw);/** + */function Ms(){return Ms=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Pc(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function R1(){return Math.random().toString(36).substr(2,8)}function Sf(e,t){return{usr:e.state,key:e.key,idx:t}}function Kl(e,t,n,r){return n===void 0&&(n=null),Ms({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Mr(t):t,{state:n,key:t&&t.key||r||R1()})}function go(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Mr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function I1(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=sn.Pop,u=null,c=d();c==null&&(c=0,o.replaceState(Ms({},o.state,{idx:c}),""));function d(){return(o.state||{idx:null}).idx}function f(){a=sn.Pop;let k=d(),p=k==null?null:k-c;c=k,u&&u({action:a,location:y.location,delta:p})}function h(k,p){a=sn.Push;let m=Kl(y.location,k,p);c=d()+1;let v=Sf(m,c),b=y.createHref(m);try{o.pushState(v,"",b)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;s.location.assign(b)}i&&u&&u({action:a,location:y.location,delta:1})}function x(k,p){a=sn.Replace;let m=Kl(y.location,k,p);c=d();let v=Sf(m,c),b=y.createHref(m);o.replaceState(v,"",b),i&&u&&u({action:a,location:y.location,delta:0})}function w(k){let p=s.location.origin!=="null"?s.location.origin:s.location.href,m=typeof k=="string"?k:go(k);return m=m.replace(/ $/,"%20"),ce(p,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,p)}let y={get action(){return a},get location(){return e(s,o)},listen(k){if(u)throw new Error("A history only accepts one active listener");return s.addEventListener(bf,f),u=k,()=>{s.removeEventListener(bf,f),u=null}},createHref(k){return t(s,k)},createURL:w,encodeLocation(k){let p=w(k);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:h,replace:x,go(k){return o.go(k)}};return y}var jf;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(jf||(jf={}));function V1(e,t,n){return n===void 0&&(n="/"),O1(e,t,n)}function O1(e,t,n,r){let s=typeof t=="string"?Mr(t):t,i=Sr(s.pathname||"/",n);if(i==null)return null;let o=Vg(e);F1(o);let a=null,u=q1(i);for(let c=0;a==null&&c{let u={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};u.relativePath.startsWith("/")&&(ce(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let c=pn([r,u.relativePath]),d=n.concat(u);i.children&&i.children.length>0&&(ce(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Vg(i.children,t,d,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:G1(c,i.index),routesMeta:d})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let u of Og(i.path))s(i,o,u)}),t}function Og(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=Og(r.join("/")),a=[];return a.push(...o.map(u=>u===""?i:[i,u].join("/"))),s&&a.push(...o),a.map(u=>e.startsWith("/")&&u===""?"/":u)}function F1(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:K1(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const z1=/^:[\w-]+$/,B1=3,$1=2,H1=1,W1=10,U1=-2,Pf=e=>e==="*";function G1(e,t){let n=e.split("/"),r=n.length;return n.some(Pf)&&(r+=U1),t&&(r+=$1),n.filter(s=>!Pf(s)).reduce((s,i)=>s+(z1.test(i)?B1:i===""?H1:W1),r)}function K1(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function X1(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a{let{paramName:h,isOptional:x}=d;if(h==="*"){let y=a[f]||"";o=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const w=a[f];return x&&!w?c[h]=void 0:c[h]=(w||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function Y1(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Pc(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,u)=>(r.push({paramName:a,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function q1(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Pc(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Sr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const Q1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Z1=e=>Q1.test(e);function J1(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Mr(e):e,i;if(n)if(Z1(n))i=n;else{if(n.includes("//")){let o=n;n=Fg(n),Pc(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?i=Cf(n.substring(1),"/"):i=Cf(n,t)}else i=t;return{pathname:i,search:nw(r),hash:rw(s)}}function Cf(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Na(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function ew(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Cc(e,t){let n=ew(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Tc(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Mr(e):(s=Ms({},e),ce(!s.pathname||!s.pathname.includes("?"),Na("?","pathname","search",s)),ce(!s.pathname||!s.pathname.includes("#"),Na("#","pathname","hash",s)),ce(!s.search||!s.search.includes("#"),Na("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;s.pathname=h.join("/")}a=f>=0?t[f]:"/"}let u=J1(s,a),c=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(c||d)&&(u.pathname+="/"),u}const Fg=e=>e.replace(/\/\/+/g,"/"),pn=e=>Fg(e.join("/")),tw=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),nw=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,rw=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function sw(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const zg=["post","put","patch","delete"];new Set(zg);const iw=["get",...zg];new Set(iw);/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. @@ -56,7 +56,7 @@ Error generating stack: `+i.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Ls(){return Ls=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),g.useCallback(function(c,d){if(d===void 0&&(d={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let f=Cc(c,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:pn([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,o,i,e])}const lw=g.createContext(null);function uw(e){let t=g.useContext(Dt).outlet;return t&&g.createElement(lw.Provider,{value:e},t)}function $s(){let{matches:e}=g.useContext(Dt),t=e[e.length-1];return t?t.params:{}}function qo(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=g.useContext(Xt),{matches:s}=g.useContext(Dt),{pathname:i}=rt(),o=JSON.stringify(Tc(s,r.v7_relativeSplatPath));return g.useMemo(()=>Cc(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function cw(e,t){return dw(e,t)}function dw(e,t,n,r){Lr()||ce(!1);let{navigator:s}=g.useContext(Xt),{matches:i}=g.useContext(Dt),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let u=o?o.pathnameBase:"/";o&&o.route;let c=rt(),d;if(t){var f;let k=typeof t=="string"?Mr(t):t;u==="/"||(f=k.pathname)!=null&&f.startsWith(u)||ce(!1),d=k}else d=c;let h=d.pathname||"/",x=h;if(u!=="/"){let k=u.replace(/^\//,"").split("/");x="/"+h.replace(/^\//,"").split("/").slice(k.length).join("/")}let w=V1(e,{pathname:x}),y=gw(w&&w.map(k=>Object.assign({},k,{params:Object.assign({},a,k.params),pathname:pn([u,s.encodeLocation?s.encodeLocation(k.pathname).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?u:pn([u,s.encodeLocation?s.encodeLocation(k.pathnameBase).pathname:k.pathnameBase])})),i,n,r);return t&&y?g.createElement(Xo.Provider,{value:{location:Ls({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:sn.Pop}},y):y}function fw(){let e=ww(),t=sw(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:s},n):null,null)}const hw=g.createElement(fw,null);class mw extends g.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?g.createElement(Dt.Provider,{value:this.props.routeContext},g.createElement($g.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function pw(e){let{routeContext:t,match:n,children:r}=e,s=g.useContext(Ko);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),g.createElement(Dt.Provider,{value:t},r)}function gw(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let d=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||ce(!1),o=o.slice(0,Math.min(o.length,d+1))}let u=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((d,f,h)=>{let x,w=!1,y=null,k=null;n&&(x=a&&f.route.id?a[f.route.id]:void 0,y=f.route.errorElement||hw,u&&(c<0&&h===0?(bw("route-fallback"),w=!0,k=null):c===h&&(w=!0,k=f.route.hydrateFallbackElement||null)));let p=t.concat(o.slice(0,h+1)),m=()=>{let v;return x?v=y:w?v=k:f.route.Component?v=g.createElement(f.route.Component,null):f.route.element?v=f.route.element:v=d,g.createElement(pw,{match:f,routeContext:{outlet:d,matches:p,isDataRoute:n!=null},children:v})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?g.createElement(mw,{location:n.location,revalidation:n.revalidation,component:y,error:x,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}var Wg=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Wg||{}),Ug=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Ug||{});function yw(e){let t=g.useContext(Ko);return t||ce(!1),t}function xw(e){let t=g.useContext(Bg);return t||ce(!1),t}function vw(e){let t=g.useContext(Dt);return t||ce(!1),t}function Gg(e){let t=vw(),n=t.matches[t.matches.length-1];return n.route.id||ce(!1),n.route.id}function ww(){var e;let t=g.useContext($g),n=xw(),r=Gg();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function kw(){let{router:e}=yw(Wg.UseNavigateStable),t=Gg(Ug.UseNavigateStable),n=g.useRef(!1);return Hg(()=>{n.current=!0}),g.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Ls({fromRouteId:t},i)))},[e,t])}const Cf={};function bw(e,t,n){Cf[e]||(Cf[e]=!0)}function Sw(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function jr(e){let{to:t,replace:n,state:r,relative:s}=e;Lr()||ce(!1);let{future:i,static:o}=g.useContext(Xt),{matches:a}=g.useContext(Dt),{pathname:u}=rt(),c=Yo(),d=Cc(t,Tc(a,i.v7_relativeSplatPath),u,s==="path"),f=JSON.stringify(d);return g.useEffect(()=>c(JSON.parse(f),{replace:n,state:r,relative:s}),[c,f,s,n,r]),null}function Ec(e){return uw(e.context)}function B(e){ce(!1)}function jw(e){let{basename:t="/",children:n=null,location:r,navigationType:s=sn.Pop,navigator:i,static:o=!1,future:a}=e;Lr()&&ce(!1);let u=t.replace(/^\/*/,"/"),c=g.useMemo(()=>({basename:u,navigator:i,static:o,future:Ls({v7_relativeSplatPath:!1},a)}),[u,a,i,o]);typeof r=="string"&&(r=Mr(r));let{pathname:d="/",search:f="",hash:h="",state:x=null,key:w="default"}=r,y=g.useMemo(()=>{let k=Sr(d,u);return k==null?null:{location:{pathname:k,search:f,hash:h,state:x,key:w},navigationType:s}},[u,d,f,h,x,w,s]);return y==null?null:g.createElement(Xt.Provider,{value:c},g.createElement(Xo.Provider,{children:n,value:y}))}function Pw(e){let{children:t,location:n}=e;return cw(Yl(t),n)}new Promise(()=>{});function Yl(e,t){t===void 0&&(t=[]);let n=[];return g.Children.forEach(e,(r,s)=>{if(!g.isValidElement(r))return;let i=[...t,s];if(r.type===g.Fragment){n.push.apply(n,Yl(r.props.children,i));return}r.type!==B&&ce(!1),!r.props.index||!r.props.children||ce(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Yl(r.props.children,i)),n.push(o)}),n}/** + */function Ls(){return Ls=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),g.useCallback(function(c,d){if(d===void 0&&(d={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let f=Tc(c,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:pn([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,o,i,e])}const lw=g.createContext(null);function uw(e){let t=g.useContext(Dt).outlet;return t&&g.createElement(lw.Provider,{value:e},t)}function $s(){let{matches:e}=g.useContext(Dt),t=e[e.length-1];return t?t.params:{}}function qo(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=g.useContext(Xt),{matches:s}=g.useContext(Dt),{pathname:i}=rt(),o=JSON.stringify(Cc(s,r.v7_relativeSplatPath));return g.useMemo(()=>Tc(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function cw(e,t){return dw(e,t)}function dw(e,t,n,r){Lr()||ce(!1);let{navigator:s}=g.useContext(Xt),{matches:i}=g.useContext(Dt),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let u=o?o.pathnameBase:"/";o&&o.route;let c=rt(),d;if(t){var f;let k=typeof t=="string"?Mr(t):t;u==="/"||(f=k.pathname)!=null&&f.startsWith(u)||ce(!1),d=k}else d=c;let h=d.pathname||"/",x=h;if(u!=="/"){let k=u.replace(/^\//,"").split("/");x="/"+h.replace(/^\//,"").split("/").slice(k.length).join("/")}let w=V1(e,{pathname:x}),y=gw(w&&w.map(k=>Object.assign({},k,{params:Object.assign({},a,k.params),pathname:pn([u,s.encodeLocation?s.encodeLocation(k.pathname).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?u:pn([u,s.encodeLocation?s.encodeLocation(k.pathnameBase).pathname:k.pathnameBase])})),i,n,r);return t&&y?g.createElement(Xo.Provider,{value:{location:Ls({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:sn.Pop}},y):y}function fw(){let e=ww(),t=sw(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:s},n):null,null)}const hw=g.createElement(fw,null);class mw extends g.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?g.createElement(Dt.Provider,{value:this.props.routeContext},g.createElement($g.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function pw(e){let{routeContext:t,match:n,children:r}=e,s=g.useContext(Ko);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),g.createElement(Dt.Provider,{value:t},r)}function gw(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let d=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||ce(!1),o=o.slice(0,Math.min(o.length,d+1))}let u=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((d,f,h)=>{let x,w=!1,y=null,k=null;n&&(x=a&&f.route.id?a[f.route.id]:void 0,y=f.route.errorElement||hw,u&&(c<0&&h===0?(bw("route-fallback"),w=!0,k=null):c===h&&(w=!0,k=f.route.hydrateFallbackElement||null)));let p=t.concat(o.slice(0,h+1)),m=()=>{let v;return x?v=y:w?v=k:f.route.Component?v=g.createElement(f.route.Component,null):f.route.element?v=f.route.element:v=d,g.createElement(pw,{match:f,routeContext:{outlet:d,matches:p,isDataRoute:n!=null},children:v})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?g.createElement(mw,{location:n.location,revalidation:n.revalidation,component:y,error:x,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}var Wg=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Wg||{}),Ug=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Ug||{});function yw(e){let t=g.useContext(Ko);return t||ce(!1),t}function xw(e){let t=g.useContext(Bg);return t||ce(!1),t}function vw(e){let t=g.useContext(Dt);return t||ce(!1),t}function Gg(e){let t=vw(),n=t.matches[t.matches.length-1];return n.route.id||ce(!1),n.route.id}function ww(){var e;let t=g.useContext($g),n=xw(),r=Gg();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function kw(){let{router:e}=yw(Wg.UseNavigateStable),t=Gg(Ug.UseNavigateStable),n=g.useRef(!1);return Hg(()=>{n.current=!0}),g.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Ls({fromRouteId:t},i)))},[e,t])}const Tf={};function bw(e,t,n){Tf[e]||(Tf[e]=!0)}function Sw(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function jr(e){let{to:t,replace:n,state:r,relative:s}=e;Lr()||ce(!1);let{future:i,static:o}=g.useContext(Xt),{matches:a}=g.useContext(Dt),{pathname:u}=rt(),c=Yo(),d=Tc(t,Cc(a,i.v7_relativeSplatPath),u,s==="path"),f=JSON.stringify(d);return g.useEffect(()=>c(JSON.parse(f),{replace:n,state:r,relative:s}),[c,f,s,n,r]),null}function Ec(e){return uw(e.context)}function B(e){ce(!1)}function jw(e){let{basename:t="/",children:n=null,location:r,navigationType:s=sn.Pop,navigator:i,static:o=!1,future:a}=e;Lr()&&ce(!1);let u=t.replace(/^\/*/,"/"),c=g.useMemo(()=>({basename:u,navigator:i,static:o,future:Ls({v7_relativeSplatPath:!1},a)}),[u,a,i,o]);typeof r=="string"&&(r=Mr(r));let{pathname:d="/",search:f="",hash:h="",state:x=null,key:w="default"}=r,y=g.useMemo(()=>{let k=Sr(d,u);return k==null?null:{location:{pathname:k,search:f,hash:h,state:x,key:w},navigationType:s}},[u,d,f,h,x,w,s]);return y==null?null:g.createElement(Xt.Provider,{value:c},g.createElement(Xo.Provider,{children:n,value:y}))}function Pw(e){let{children:t,location:n}=e;return cw(Yl(t),n)}new Promise(()=>{});function Yl(e,t){t===void 0&&(t=[]);let n=[];return g.Children.forEach(e,(r,s)=>{if(!g.isValidElement(r))return;let i=[...t,s];if(r.type===g.Fragment){n.push.apply(n,Yl(r.props.children,i));return}r.type!==B&&ce(!1),!r.props.index||!r.props.children||ce(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Yl(r.props.children,i)),n.push(o)}),n}/** * React Router DOM v6.30.4 * * 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 yo(){return yo=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 Ew(e,t){let n=ql(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(i=>{n.append(s,i)})}),n}const Nw=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],_w=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Mw="6";try{window.__reactRouterVersion=Mw}catch{}const Lw=g.createContext({isTransitioning:!1}),Aw="startTransition",Ef=Sx[Aw];function Dw(e){let{basename:t,children:n,future:r,window:s}=e,i=g.useRef();i.current==null&&(i.current=D1({window:s,v5Compat:!0}));let o=i.current,[a,u]=g.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},d=g.useCallback(f=>{c&&Ef?Ef(()=>u(f)):u(f)},[u,c]);return g.useLayoutEffect(()=>o.listen(d),[o,d]),g.useEffect(()=>Sw(r),[r]),g.createElement(jw,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const Rw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Iw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,W=g.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:u,to:c,preventScrollReset:d,viewTransition:f}=t,h=Kg(t,Nw),{basename:x}=g.useContext(Xt),w,y=!1;if(typeof c=="string"&&Iw.test(c)&&(w=c,Rw))try{let v=new URL(window.location.href),b=c.startsWith("//")?new URL(v.protocol+c):new URL(c),P=Sr(b.pathname,x);b.origin===v.origin&&P!=null?c=P+b.search+b.hash:y=!0}catch{}let k=ow(c,{relative:s}),p=Fw(c,{replace:o,state:a,target:u,preventScrollReset:d,relative:s,viewTransition:f});function m(v){r&&r(v),v.defaultPrevented||p(v)}return g.createElement("a",yo({},h,{href:w||k,onClick:y||i?r:m,ref:n,target:u}))}),Vw=g.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:s=!1,className:i="",end:o=!1,style:a,to:u,viewTransition:c,children:d}=t,f=Kg(t,_w),h=qo(u,{relative:f.relative}),x=rt(),w=g.useContext(Bg),{navigator:y,basename:k}=g.useContext(Xt),p=w!=null&&Bw(h)&&c===!0,m=y.encodeLocation?y.encodeLocation(h).pathname:h.pathname,v=x.pathname,b=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;s||(v=v.toLowerCase(),b=b?b.toLowerCase():null,m=m.toLowerCase()),b&&k&&(b=Sr(b,k)||b);const P=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let C=v===m||!o&&v.startsWith(m)&&v.charAt(P)==="/",S=b!=null&&(b===m||!o&&b.startsWith(m)&&b.charAt(m.length)==="/"),j={isActive:C,isPending:S,isTransitioning:p},L=C?r:void 0,_;typeof i=="function"?_=i(j):_=[i,C?"active":null,S?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let F=typeof a=="function"?a(j):a;return g.createElement(W,yo({},f,{"aria-current":L,className:_,ref:n,style:F,to:u,viewTransition:c}),typeof d=="function"?d(j):d)});var Ql;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ql||(Ql={}));var Nf;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Nf||(Nf={}));function Ow(e){let t=g.useContext(Ko);return t||ce(!1),t}function Fw(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,u=Yo(),c=rt(),d=qo(e,{relative:o});return g.useCallback(f=>{if(Cw(f,n)){f.preventDefault();let h=r!==void 0?r:go(c)===go(d);u(e,{replace:h,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[c,u,d,r,s,n,e,i,o,a])}function zw(e){let t=g.useRef(ql(e)),n=g.useRef(!1),r=rt(),s=g.useMemo(()=>Ew(r.search,n.current?null:t.current),[r.search]),i=Yo(),o=g.useCallback((a,u)=>{const c=ql(typeof a=="function"?a(s):a);n.current=!0,i("?"+c,u)},[i,s]);return[s,o]}function Bw(e,t){t===void 0&&(t={});let n=g.useContext(Lw);n==null&&ce(!1);let{basename:r}=Ow(Ql.useViewTransitionState),s=qo(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Sr(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Sr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Xl(s.pathname,o)!=null||Xl(s.pathname,i)!=null}const $w="modulepreload",Hw=function(e){return"/"+e},_f={},ee=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(n.map(u=>{if(u=Hw(u),u in _f)return;_f[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":$w,c||(f.as="script"),f.crossOrigin="",f.href=u,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((h,x)=>{f.addEventListener("load",h),f.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};function Ww(){const{pathname:e}=rt();return g.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"instant"})},[e]),null}const Uw='a, button, [role="button"], label, select, summary, [data-cursor="hover"], .cursor-pointer',Gw='input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]):not([type="file"]), textarea, [contenteditable="true"]';function Kw(){const e=g.useRef(null),t=g.useRef(null),n=g.useRef(null),r=g.useRef(null),s=g.useRef(null);return g.useEffect(()=>{const i=window.matchMedia("(pointer: fine)"),o=window.matchMedia("(prefers-reduced-motion: reduce)");if(!i.matches||o.matches)return;const a=e.current,u=t.current,c=n.current,d=r.current,f=s.current;if(!a||!u||!c||!d||!f)return;document.documentElement.classList.add("hifi-cursor-on");const h=-24*Math.PI/180,x=Math.cos(h),w=Math.sin(h);let y=-100,k=-100,p=0,m=2.4,v=2.4,b=16,P=6.5,C=16,S=6.5,j=!1,L,_=performance.now();const F=E=>{const T=Math.min((E-_)/1e3,.05);_=E,m+=(v-m)*Math.min(1,T*8),b+=(C-b)*Math.min(1,T*10),P+=(S-P)*Math.min(1,T*10),p+=m*T,u.style.transform=`translate3d(${y}px, ${k}px, 0)`,c.style.transform=`translate3d(${y}px, ${k}px, 0)`;const A=Math.cos(p)*b,z=Math.sin(p)*P;d.style.transform=`translate(${A*x-z*w}px, ${A*w+z*x}px)`,L=requestAnimationFrame(F)},H=E=>{a.dataset.state=E;const T=E==="hover";v=T?7:2.4,C=T?23:16,S=T?9.5:6.5},te=E=>{y=E.clientX,k=E.clientY,j||(j=!0,a.dataset.hidden="false")},N=E=>{const T=E.target;T instanceof Element&&(T.closest(Gw)?H("text"):T.closest(Uw)?H("hover"):H("default"))},D=()=>{a.dataset.down="true",f.style.left=`${y}px`,f.style.top=`${k}px`,f.classList.remove("is-live"),f.offsetWidth,f.classList.add("is-live")},$=()=>{a.dataset.down="false"},K=()=>{j=!1,a.dataset.hidden="true"};return document.addEventListener("mousemove",te,{passive:!0}),document.addEventListener("mouseover",N,{passive:!0}),document.addEventListener("mousedown",D,{passive:!0}),document.addEventListener("mouseup",$,{passive:!0}),document.documentElement.addEventListener("mouseleave",K),window.addEventListener("blur",K),L=requestAnimationFrame(F),()=>{cancelAnimationFrame(L),document.removeEventListener("mousemove",te),document.removeEventListener("mouseover",N),document.removeEventListener("mousedown",D),document.removeEventListener("mouseup",$),document.documentElement.removeEventListener("mouseleave",K),window.removeEventListener("blur",K),document.documentElement.classList.remove("hifi-cursor-on")}},[]),l.jsxs("div",{ref:e,className:"hifi-cursor","data-state":"default","data-hidden":"true","data-down":"false","aria-hidden":"true",children:[l.jsxs("div",{ref:n,className:"hifi-cursor__orbit",children:[l.jsx("div",{className:"hifi-cursor__ring"}),l.jsx("div",{ref:r,className:"hifi-cursor__sat"})]}),l.jsx("div",{ref:t,className:"hifi-cursor__core"}),l.jsx("div",{ref:s,className:"hifi-cursor__pulse"})]})}const Xw=`${"/".replace(/\/$/,"")}/api`;let Zl=0;const Jl=new Set,Mf=e=>{Zl+=e,Jl.forEach(t=>t(Zl))},Yw=()=>Zl,qw=e=>(Jl.add(e),()=>Jl.delete(e));async function Ur(e,t={}){Mf(1);try{return await Qw(e,t)}finally{Mf(-1)}}async function Qw(e,t){const n=await fetch(`${Xw}${e}`,{credentials:"include",headers:t.body instanceof FormData?{}:{"Content-Type":"application/json"},...t}),r=await n.text();let s=null;if(r)try{s=JSON.parse(r)}catch{}if(!n.ok)throw new Error((s==null?void 0:s.error)||`Fehler ${n.status}`);if(s===null&&r)throw new Error("Unerwartete Server-Antwort (kein gültiges JSON)");return s}const Z={get:(e,t)=>Ur(e,t),post:(e,t)=>Ur(e,{method:"POST",body:t instanceof FormData?t:JSON.stringify(t)}),put:(e,t)=>Ur(e,{method:"PUT",body:JSON.stringify(t)}),patch:(e,t)=>Ur(e,{method:"PATCH",body:JSON.stringify(t)}),delete:e=>Ur(e,{method:"DELETE"})};function Zw({children:e}){const[t,n]=g.useState({pathname:null,needsSetup:null}),r=rt(),s=t.needsSetup===!1;g.useEffect(()=>{if(s)return;let o=!1;return Z.get("/setup/status").then(a=>{o||n({pathname:r.pathname,needsSetup:a.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?l.jsx(jr,{to:"/",replace:!0}):!i||t.needsSetup===null?l.jsx("div",{className:"min-h-screen bg-white dark:bg-neutral-950"}):e:i&&t.needsSetup?l.jsx(jr,{to:"/setup",replace:!0}):e}/** + */function yo(){return yo=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 Ew(e,t){let n=ql(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(i=>{n.append(s,i)})}),n}const Nw=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],_w=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Mw="6";try{window.__reactRouterVersion=Mw}catch{}const Lw=g.createContext({isTransitioning:!1}),Aw="startTransition",Ef=Sx[Aw];function Dw(e){let{basename:t,children:n,future:r,window:s}=e,i=g.useRef();i.current==null&&(i.current=D1({window:s,v5Compat:!0}));let o=i.current,[a,u]=g.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},d=g.useCallback(f=>{c&&Ef?Ef(()=>u(f)):u(f)},[u,c]);return g.useLayoutEffect(()=>o.listen(d),[o,d]),g.useEffect(()=>Sw(r),[r]),g.createElement(jw,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const Rw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Iw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,W=g.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:u,to:c,preventScrollReset:d,viewTransition:f}=t,h=Kg(t,Nw),{basename:x}=g.useContext(Xt),w,y=!1;if(typeof c=="string"&&Iw.test(c)&&(w=c,Rw))try{let v=new URL(window.location.href),b=c.startsWith("//")?new URL(v.protocol+c):new URL(c),P=Sr(b.pathname,x);b.origin===v.origin&&P!=null?c=P+b.search+b.hash:y=!0}catch{}let k=ow(c,{relative:s}),p=Fw(c,{replace:o,state:a,target:u,preventScrollReset:d,relative:s,viewTransition:f});function m(v){r&&r(v),v.defaultPrevented||p(v)}return g.createElement("a",yo({},h,{href:w||k,onClick:y||i?r:m,ref:n,target:u}))}),Vw=g.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:s=!1,className:i="",end:o=!1,style:a,to:u,viewTransition:c,children:d}=t,f=Kg(t,_w),h=qo(u,{relative:f.relative}),x=rt(),w=g.useContext(Bg),{navigator:y,basename:k}=g.useContext(Xt),p=w!=null&&Bw(h)&&c===!0,m=y.encodeLocation?y.encodeLocation(h).pathname:h.pathname,v=x.pathname,b=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;s||(v=v.toLowerCase(),b=b?b.toLowerCase():null,m=m.toLowerCase()),b&&k&&(b=Sr(b,k)||b);const P=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let T=v===m||!o&&v.startsWith(m)&&v.charAt(P)==="/",S=b!=null&&(b===m||!o&&b.startsWith(m)&&b.charAt(m.length)==="/"),j={isActive:T,isPending:S,isTransitioning:p},L=T?r:void 0,_;typeof i=="function"?_=i(j):_=[i,T?"active":null,S?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let F=typeof a=="function"?a(j):a;return g.createElement(W,yo({},f,{"aria-current":L,className:_,ref:n,style:F,to:u,viewTransition:c}),typeof d=="function"?d(j):d)});var Ql;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ql||(Ql={}));var Nf;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Nf||(Nf={}));function Ow(e){let t=g.useContext(Ko);return t||ce(!1),t}function Fw(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,u=Yo(),c=rt(),d=qo(e,{relative:o});return g.useCallback(f=>{if(Tw(f,n)){f.preventDefault();let h=r!==void 0?r:go(c)===go(d);u(e,{replace:h,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[c,u,d,r,s,n,e,i,o,a])}function zw(e){let t=g.useRef(ql(e)),n=g.useRef(!1),r=rt(),s=g.useMemo(()=>Ew(r.search,n.current?null:t.current),[r.search]),i=Yo(),o=g.useCallback((a,u)=>{const c=ql(typeof a=="function"?a(s):a);n.current=!0,i("?"+c,u)},[i,s]);return[s,o]}function Bw(e,t){t===void 0&&(t={});let n=g.useContext(Lw);n==null&&ce(!1);let{basename:r}=Ow(Ql.useViewTransitionState),s=qo(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Sr(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Sr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Xl(s.pathname,o)!=null||Xl(s.pathname,i)!=null}const $w="modulepreload",Hw=function(e){return"/"+e},_f={},ee=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(n.map(u=>{if(u=Hw(u),u in _f)return;_f[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":$w,c||(f.as="script"),f.crossOrigin="",f.href=u,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((h,x)=>{f.addEventListener("load",h),f.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})};function Ww(){const{pathname:e}=rt();return g.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"instant"})},[e]),null}const Uw='a, button, [role="button"], label, select, summary, [data-cursor="hover"], .cursor-pointer',Gw='input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]):not([type="file"]), textarea, [contenteditable="true"]';function Kw(){const e=g.useRef(null),t=g.useRef(null),n=g.useRef(null),r=g.useRef(null),s=g.useRef(null);return g.useEffect(()=>{const i=window.matchMedia("(pointer: fine)"),o=window.matchMedia("(prefers-reduced-motion: reduce)");if(!i.matches||o.matches)return;const a=e.current,u=t.current,c=n.current,d=r.current,f=s.current;if(!a||!u||!c||!d||!f)return;document.documentElement.classList.add("hifi-cursor-on");const h=-24*Math.PI/180,x=Math.cos(h),w=Math.sin(h);let y=-100,k=-100,p=0,m=2.4,v=2.4,b=16,P=6.5,T=16,S=6.5,j=!1,L,_=performance.now();const F=E=>{const C=Math.min((E-_)/1e3,.05);_=E,m+=(v-m)*Math.min(1,C*8),b+=(T-b)*Math.min(1,C*10),P+=(S-P)*Math.min(1,C*10),p+=m*C,u.style.transform=`translate3d(${y}px, ${k}px, 0)`,c.style.transform=`translate3d(${y}px, ${k}px, 0)`;const A=Math.cos(p)*b,z=Math.sin(p)*P;d.style.transform=`translate(${A*x-z*w}px, ${A*w+z*x}px)`,L=requestAnimationFrame(F)},H=E=>{a.dataset.state=E;const C=E==="hover";v=C?7:2.4,T=C?23:16,S=C?9.5:6.5},te=E=>{y=E.clientX,k=E.clientY,j||(j=!0,a.dataset.hidden="false")},N=E=>{const C=E.target;C instanceof Element&&(C.closest(Gw)?H("text"):C.closest(Uw)?H("hover"):H("default"))},D=()=>{a.dataset.down="true",f.style.left=`${y}px`,f.style.top=`${k}px`,f.classList.remove("is-live"),f.offsetWidth,f.classList.add("is-live")},$=()=>{a.dataset.down="false"},K=()=>{j=!1,a.dataset.hidden="true"};return document.addEventListener("mousemove",te,{passive:!0}),document.addEventListener("mouseover",N,{passive:!0}),document.addEventListener("mousedown",D,{passive:!0}),document.addEventListener("mouseup",$,{passive:!0}),document.documentElement.addEventListener("mouseleave",K),window.addEventListener("blur",K),L=requestAnimationFrame(F),()=>{cancelAnimationFrame(L),document.removeEventListener("mousemove",te),document.removeEventListener("mouseover",N),document.removeEventListener("mousedown",D),document.removeEventListener("mouseup",$),document.documentElement.removeEventListener("mouseleave",K),window.removeEventListener("blur",K),document.documentElement.classList.remove("hifi-cursor-on")}},[]),l.jsxs("div",{ref:e,className:"hifi-cursor","data-state":"default","data-hidden":"true","data-down":"false","aria-hidden":"true",children:[l.jsxs("div",{ref:n,className:"hifi-cursor__orbit",children:[l.jsx("div",{className:"hifi-cursor__ring"}),l.jsx("div",{ref:r,className:"hifi-cursor__sat"})]}),l.jsx("div",{ref:t,className:"hifi-cursor__core"}),l.jsx("div",{ref:s,className:"hifi-cursor__pulse"})]})}const Xw=`${"/".replace(/\/$/,"")}/api`;let Zl=0;const Jl=new Set,Mf=e=>{Zl+=e,Jl.forEach(t=>t(Zl))},Yw=()=>Zl,qw=e=>(Jl.add(e),()=>Jl.delete(e));async function Ur(e,t={}){Mf(1);try{return await Qw(e,t)}finally{Mf(-1)}}async function Qw(e,t){const n=await fetch(`${Xw}${e}`,{credentials:"include",headers:t.body instanceof FormData?{}:{"Content-Type":"application/json"},...t}),r=await n.text();let s=null;if(r)try{s=JSON.parse(r)}catch{}if(!n.ok)throw new Error((s==null?void 0:s.error)||`Fehler ${n.status}`);if(s===null&&r)throw new Error("Unerwartete Server-Antwort (kein gültiges JSON)");return s}const Z={get:(e,t)=>Ur(e,t),post:(e,t)=>Ur(e,{method:"POST",body:t instanceof FormData?t:JSON.stringify(t)}),put:(e,t)=>Ur(e,{method:"PUT",body:JSON.stringify(t)}),patch:(e,t)=>Ur(e,{method:"PATCH",body:JSON.stringify(t)}),delete:e=>Ur(e,{method:"DELETE"})};function Zw({children:e}){const[t,n]=g.useState({pathname:null,needsSetup:null}),r=rt(),s=t.needsSetup===!1;g.useEffect(()=>{if(s)return;let o=!1;return Z.get("/setup/status").then(a=>{o||n({pathname:r.pathname,needsSetup:a.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?l.jsx(jr,{to:"/",replace:!0}):!i||t.needsSetup===null?l.jsx("div",{className:"min-h-screen bg-white dark:bg-neutral-950"}):e:i&&t.needsSetup?l.jsx(jr,{to:"/setup",replace:!0}):e}/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. @@ -165,7 +165,7 @@ 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 Tk=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Ck=U("download",Tk);/** + */const Ck=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Tk=U("download",Ck);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. @@ -290,14 +290,14 @@ 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 xb=[["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"}]],vb=U("zap",xb),Jg=g.createContext(null);function wb(){const e=new Date,t=e.getHours()+e.getMinutes()/60;return t>=6.5&&t<21?"light":"dark"}function kb({children:e}){const[t,n]=g.useState(()=>{const s=localStorage.getItem("hifi-theme");return s==="light"||s==="dark"?s:wb()});g.useEffect(()=>{document.documentElement.classList.toggle("dark",t==="dark"),localStorage.setItem("hifi-theme",t)},[t]);const r=()=>n(s=>s==="dark"?"light":"dark");return l.jsx(Jg.Provider,{value:{theme:t,toggleTheme:r},children:e})}function bb(){return g.useContext(Jg)}const Sb={nav:{openMenu:"Menü öffnen",closeMenu:"Menü schließen",close:"Schließen",adminPanel:"Zum Admin-Panel",vehicles:"Fahrzeuge",services:"Leistungen",gallery:"Galerie",contact:"Kontakt",whatsapp:"WhatsApp",shop:"Zum Shop",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"},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:{metaTitle:"Fahrzeug auswählen",metaDescription:"Wähle deine Fahrzeugmarke und dein Modell und entdecke passende Car-Hifi Sound-Pakete von HifiPlanet.",title:"Fahrzeug auswählen",intro:"Wähle zuerst deine Marke, dann dein Modell – wir zeigen dir direkt die passenden Sound-Pakete.",empty:"Es sind noch keine Marken hinterlegt."},brandPage:{metaTitleFallback:"Modell auswählen",metaDescription:e=>`Wähle dein ${e} Modell und entdecke passende Car-Hifi Sound-Pakete von HifiPlanet.`,loading:"Lädt…",breadcrumbVehicles:"Fahrzeuge",titleSuffix:"Modell wählen",empty:"Für diese Marke sind noch keine Modelle hinterlegt."},modelPage:{metaTitleFallback:"Sound-Pakete",metaTitle:(e,t)=>`${e} ${t} Sound-Pakete`,metaDescription:(e,t)=>`Car-Hifi Sound-Pakete für ${e} ${t} inkl. aktueller Preise – von HifiPlanet unverbindlich anfragen.`,loading:"Lädt…",breadcrumbVehicles:"Fahrzeuge",titleSuffix:"Sound-Pakete",empty:"Für dieses Modell sind noch keine Pakete hinterlegt.",totalPrice:"ab ca.",productLoading:"Produkt wird geladen…",requestContact:"Kontakt anfragen",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:{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:{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."}},jb={nav:{openMenu:"Open menu",closeMenu:"Close menu",close:"Close",adminPanel:"Go to admin panel",vehicles:"Vehicles",services:"Services",gallery:"Gallery",contact:"Contact",whatsapp:"WhatsApp",shop:"Visit shop",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"},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:{metaTitle:"Select your vehicle",metaDescription:"Choose your vehicle make and model and discover matching car-hifi sound packages from HifiPlanet.",title:"Select your vehicle",intro:"Choose your make first, then your model – we'll show you the matching sound packages right away.",empty:"No brands have been added yet."},brandPage:{metaTitleFallback:"Select a model",metaDescription:e=>`Choose your ${e} model and discover matching car-hifi sound packages from HifiPlanet.`,loading:"Loading…",breadcrumbVehicles:"Vehicles",titleSuffix:"Select a model",empty:"No models have been added for this brand yet."},modelPage:{metaTitleFallback:"Sound packages",metaTitle:(e,t)=>`${e} ${t} sound packages`,metaDescription:(e,t)=>`Car-hifi sound packages for the ${e} ${t} including current prices – get in touch with HifiPlanet, no obligation.`,loading:"Loading…",breadcrumbVehicles:"Vehicles",titleSuffix:"Sound packages",empty:"No packages have been added for this model yet.",totalPrice:"from approx.",productLoading:"Loading product…",requestContact:"Request contact",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:{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:{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."}},Ii={de:Sb,en:jb};function Pb(){const e=localStorage.getItem("hifi-lang");return e==="de"||e==="en"?e:(navigator.language||"de").toLowerCase().startsWith("de")?"de":"en"}function eu(e,t){return t.split(".").reduce((n,r)=>n==null?void 0:n[r],e)}const e0=g.createContext({language:"de",setLanguage:()=>{},toggleLanguage:()=>{},t:e=>{const t=eu(Ii.de,e);return t!==void 0?t:e}});function Rf({children:e}){const[t,n]=g.useState(Pb);g.useEffect(()=>{document.documentElement.setAttribute("lang",t),localStorage.setItem("hifi-lang",t)},[t]);const r=()=>n(i=>i==="de"?"en":"de"),s=i=>{const o=Ii[t]||Ii.de,a=eu(o,i);if(a!==void 0)return a;const u=eu(Ii.de,i);return u!==void 0?u:i};return l.jsx(e0.Provider,{value:{language:t,setLanguage:n,toggleLanguage:r,t:s},children:e})}function Te(){return g.useContext(e0)}function t0({overHero:e=!1,forceDark:t=!1}){const{theme:n,toggleTheme:r}=bb(),{t:s}=Te();return l.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"?l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"h-5 w-5",children:l.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"})}):l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"h-5 w-5",children:l.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 n0=g.createContext(null);function Tb({children:e}){const[t,n]=g.useState(null),[r,s]=g.useState(!0);g.useEffect(()=>{Z.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 Z.post("/auth/login",{username:d,password:f});return h.requires_2fa?{requires2fa:!0}:(n(h),{requires2fa:!1})},o=async d=>{const f=await Z.post("/auth/verify-2fa",{code:d});n(f)},a=async()=>{await Z.post("/auth/logout",{}),n(null)},u=async()=>{const d=await Z.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 l.jsx(n0.Provider,{value:{user:t,loading:r,login:i,verifyTwoFactor:o,logout:a,refreshUser:u,hasPermission:c},children:e})}function Hs(){return g.useContext(n0)}const Nc=g.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:[]}),Cb=Nc.Provider;function ht(){return g.useContext(Nc)}function _c(){const{hidden_areas:e}=g.useContext(Nc);return t=>(e||[]).includes(t)}const tu="/assets/logo-dark-R-ckaBhx.png",Eb="https://www.audio4cars.de/",If=e=>(e||"").replace(/[^\d+]/g,""),Vf=70,Nb=500;function _b({className:e}){return l.jsxs("svg",{viewBox:"0 0 3 2",className:e,"aria-hidden":"true",children:[l.jsx("rect",{width:"3",height:"0.667",y:"0",fill:"#000"}),l.jsx("rect",{width:"3",height:"0.667",y:"0.667",fill:"#D00"}),l.jsx("rect",{width:"3",height:"0.666",y:"1.334",fill:"#FFCE00"})]})}function Mb({className:e}){return l.jsxs("svg",{viewBox:"0 0 60 30",className:e,"aria-hidden":"true",children:[l.jsx("clipPath",{id:"fgb-t",children:l.jsx("path",{d:"M30,15 h30 v15 z v15 h-30 z h-30 v-15 z v-15 h30 z"})}),l.jsx("path",{d:"M0,0 v30 h60 v-30 z",fill:"#00247d"}),l.jsx("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#fff",strokeWidth:"6"}),l.jsx("path",{d:"M0,0 L60,30 M60,0 L0,30",clipPath:"url(#fgb-t)",stroke:"#cf142b",strokeWidth:"4"}),l.jsx("path",{d:"M30,0 v30 M0,15 h60",stroke:"#fff",strokeWidth:"10"}),l.jsx("path",{d:"M30,0 v30 M0,15 h60",stroke:"#cf142b",strokeWidth:"6"})]})}const Ma=[{code:"de",label:"Deutsch",Flag:_b},{code:"en",label:"English",Flag:Mb}];function Lb({overHero:e=!1}){const{language:t,setLanguage:n,t:r}=Te(),[s,i]=g.useState(!1),o=g.useRef(null),a=Ma.find(u=>u.code===t)||Ma[0];return g.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]),l.jsxs("div",{className:"relative",ref:o,children:[l.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:[l.jsx("span",{className:`block h-4 w-6 shrink-0 overflow-hidden rounded-[3px] ring-1 ${e?"ring-white/50":"ring-neutral-600"}`,children:l.jsx(a.Flag,{className:"h-full w-full"})}),l.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:l.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&&l.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:Ma.map(u=>l.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:[l.jsx("span",{className:"block h-4 w-6 shrink-0 overflow-hidden rounded-[3px] ring-1 ring-neutral-600",children:l.jsx(u.Flag,{className:"h-full w-full"})}),u.label]},u.code))})]})}function Ab(){const[e,t]=g.useState(!1),[n,r]=g.useState(!1),[s,i]=g.useState(!1),{user:o}=Hs(),{phone:a,whatsapp:u,logo_dark_path:c,has_downloads:d}=ht(),f=_c(),{t:h}=Te(),x=!f("page.vehicles"),w=!f("page.services"),y=!f("page.gallery"),k=d&&!f("page.downloads"),p=3+[x,w,y,k,a,u].filter(Boolean).length,v=rt().pathname==="/",[b,P]=g.useState(!v);g.useEffect(()=>{if(!v){P(!0);return}const H=()=>P(window.scrollY>24);return H(),window.addEventListener("scroll",H,{passive:!0}),()=>window.removeEventListener("scroll",H)},[v]);const C=v&&!b;g.useEffect(()=>{if(e){r(!0);let N;const D=requestAnimationFrame(()=>{N=requestAnimationFrame(()=>i(!0))});return()=>{cancelAnimationFrame(D),N&&cancelAnimationFrame(N)}}i(!1);const H=Nb+(p-1)*Vf,te=setTimeout(()=>r(!1),H);return()=>clearTimeout(te)},[e,p]);const S=()=>`transition-all duration-500 ease-out ${s?"opacity-100":"opacity-0"}`,j=H=>({transitionDelay:`${(s?H:p-1-H)*Vf}ms`,transform:s?"translateY(0)":"translateY(-140px)"}),L=o&&l.jsx(W,{to:"/admin","aria-label":h("nav.adminPanel"),title:h("nav.adminPanel"),className:`rounded-full p-2 transition ${C?"text-white hover:bg-white/10":"text-neutral-300 hover:bg-neutral-800"}`,children:l.jsx(zk,{className:"h-5 w-5"})});let _=0;const F=()=>j(_++);return l.jsxs("header",{className:`sticky top-0 z-30 border-b transition-colors duration-300 ${C?"border-transparent bg-transparent":"border-neutral-800 bg-neutral-950/90 backdrop-blur"}`,children:[l.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:[l.jsx("div",{className:"flex items-center justify-self-start",children:l.jsx("button",{onClick:()=>t(!0),"aria-label":h("nav.openMenu"),className:`rounded-md p-2 transition ${C?"text-white hover:bg-white/10":"text-neutral-300 hover:bg-neutral-800"}`,children:l.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:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h16"})})})}),l.jsx(W,{to:"/",className:"flex items-center justify-self-center rounded-lg px-2 py-1",children:l.jsx("img",{src:c||tu,alt:"HifiPlanet",className:"h-14 w-auto sm:h-16"})}),l.jsxs("div",{className:"flex items-center justify-self-end gap-1",children:[L,!e&&l.jsx(Lb,{overHero:C}),l.jsx(t0,{overHero:C,forceDark:!0})]})]}),n&&Go.createPortal(l.jsx("div",{className:"fixed inset-0 z-[100] overflow-y-auto text-left backdrop-blur-xl",style:{background:"linear-gradient(135deg, rgba(241,245,249,0.55) 0%, rgba(227,240,207,0.55) 50%, rgba(248,250,252,0.55) 100%)"},children:l.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:[l.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:[l.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:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6l12 12M18 6 6 18"})}),l.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide",children:h("nav.close")})]}),x&&l.jsx(W,{to:"/fahrzeuge",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${S()}`,style:F(),children:h("nav.vehicles")}),w&&l.jsx(W,{to:"/leistungen",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${S()}`,style:F(),children:h("nav.services")}),y&&l.jsx(W,{to:"/galerie",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${S()}`,style:F(),children:h("nav.gallery")}),l.jsx(W,{to:"/kontakt",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${S()}`,style:F(),children:h("nav.contact")}),k&&l.jsx(W,{to:"/downloads",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${S()}`,style:F(),children:h("nav.downloads")}),l.jsx("div",{className:`h-px w-16 bg-brand-500/60 ${S()}`,style:F()}),a&&l.jsxs("a",{href:`tel:${If(a)}`,className:`flex items-center gap-2 text-sm font-semibold uppercase tracking-wide text-neutral-600 hover:text-brand-600 ${S()}`,style:F(),children:[l.jsx(xo,{className:"h-4 w-4"}),a]}),u&&l.jsxs("a",{href:`https://wa.me/${If(u).replace(/^0/,"49").replace("+","")}`,target:"_blank",rel:"noopener noreferrer",className:`flex items-center gap-2 text-sm font-semibold uppercase tracking-wide text-neutral-600 hover:text-brand-600 ${S()}`,style:F(),children:[l.jsx(qk,{className:"h-4 w-4"}),h("nav.whatsapp")]}),l.jsxs("a",{href:Eb,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 ${S()}`,style:F(),children:[l.jsx(db,{className:"h-4 w-4"}),h("nav.shop")]})]})}),document.body)]})}const Of="hifiplanet-cookie-consent",r0={necessary:!0,external:!1,analytics:!1},s0=g.createContext({consent:r0,decided:!1,settingsOpen:!1,acceptAll:()=>{},rejectNonEssential:()=>{},saveCustom:()=>{},openSettings:()=>{},closeSettings:()=>{}});function Db({children:e}){const[t,n]=g.useState(r0),[r,s]=g.useState(!1),[i,o]=g.useState(!1);g.useEffect(()=>{try{const x=localStorage.getItem(Of);if(x){const w=JSON.parse(x);n({necessary:!0,external:!!w.external,analytics:!!w.analytics}),s(!0)}}catch{}},[]);const a=g.useCallback(x=>{n(x),s(!0),o(!1),localStorage.setItem(Of,JSON.stringify({...x,decidedAt:new Date().toISOString()}))},[]),u=g.useCallback(()=>a({necessary:!0,external:!0,analytics:!0}),[a]),c=g.useCallback(()=>a({necessary:!0,external:!1,analytics:!1}),[a]),d=g.useCallback(x=>a({necessary:!0,external:!!x.external,analytics:!!x.analytics}),[a]),f=g.useCallback(()=>o(!0),[]),h=g.useCallback(()=>o(!1),[]);return l.jsx(s0.Provider,{value:{consent:t,decided:r,settingsOpen:i,acceptAll:u,rejectNonEssential:c,saveCustom:d,openSettings:f,closeSettings:h},children:e})}function Ar(){return g.useContext(s0)}const Rb=["mon","tue","wed","thu","fri","sat","sun"],Ib=["sun","mon","tue","wed","thu","fri","sat"],La={mon:"Mo",tue:"Di",wed:"Mi",thu:"Do",fri:"Fr",sat:"Sa",sun:"So"};function Vb(e){const t=new Date,n=e==null?void 0:e[Ib[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,a]=n.close.split(":").map(Number);return r>=s*60+i&&r{const s=Ob(e==null?void 0:e[r])||t,i=n[n.length-1];i&&i.label===s?i.days=`${i.firstLabel}-${La[r]}`:n.push({key:r,days:La[r],firstLabel:La[r],label:s})}),n}const Fb=e=>(e||"").replace(/[^\d+]/g,"");function zb(){const{phone:e,contact_email:t,address_street:n,address_zip:r,address_city:s,business_hours:i,has_downloads:o}=ht(),a=_c(),u=o&&!a("page.downloads"),c=Vb(i),{openSettings:d}=Ar(),{pathname:f}=rt(),h=f==="/",{t:x}=Te(),w=[n,[r,s].filter(Boolean).join(" ")].filter(Boolean).join(", "),y=`https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent(w)}`,k=i0(i,x("footer.closed"));return l.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:[l.jsxs("div",{className:"mx-auto grid max-w-6xl gap-4 px-4 sm:grid-cols-3 sm:px-6",children:[l.jsxs("div",{className:"rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[l.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[l.jsx(Zg,{className:"h-4 w-4 text-brand-500"}),l.jsx("p",{className:"font-semibold text-neutral-900 dark:text-white",children:"HifiPlanet"})]}),n&&l.jsx("p",{children:n}),(r||s)&&l.jsx("p",{children:[r,s].filter(Boolean).join(" ")}),l.jsxs("a",{href:y,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:[l.jsx(nb,{className:"h-3.5 w-3.5"}),x("footer.routePlan")]})]}),l.jsxs("div",{className:"rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[l.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[l.jsx(xo,{className:"h-4 w-4 text-brand-500"}),l.jsx("p",{className:"font-semibold text-neutral-900 dark:text-white",children:x("footer.contactHeading")})]}),l.jsx("p",{children:l.jsx("a",{href:`tel:${Fb(e)}`,className:"inline-block py-1 hover:text-brand-500",children:e})}),l.jsx("p",{children:l.jsx("a",{href:`mailto:${t}`,className:"inline-block py-1 hover:text-brand-500",children:t})}),l.jsx(W,{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:x("footer.contactForm")})]}),l.jsxs("div",{className:"rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[l.jsxs("div",{className:"mb-3 flex items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Qg,{className:"h-4 w-4 text-brand-500"}),l.jsx("p",{className:"font-semibold text-neutral-900 dark:text-white",children:x("footer.hoursHeading")})]}),l.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:[l.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${c?"bg-green-500":"bg-neutral-400"}`}),x(c?"footer.open":"footer.closed")]})]}),l.jsx("dl",{className:"space-y-1.5",children:k.map(p=>l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsx("dt",{className:"text-neutral-500 dark:text-neutral-400",children:p.days}),l.jsx("dd",{className:"font-medium text-neutral-700 dark:text-neutral-200",children:p.label})]},p.key))})]})]}),l.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:l.jsxs("p",{className:"flex flex-wrap items-center justify-center gap-x-2 gap-y-1",children:[l.jsx("span",{children:x("footer.copyright")(new Date().getFullYear())}),l.jsx("span",{children:"·"}),l.jsx(W,{to:"/impressum",className:"hover:text-brand-500",children:x("footer.imprint")}),l.jsx("span",{children:"·"}),l.jsx(W,{to:"/datenschutz",className:"hover:text-brand-500",children:x("footer.privacy")}),l.jsx("span",{children:"·"}),l.jsx(W,{to:"/agb",className:"hover:text-brand-500",children:x("footer.terms")}),l.jsx("span",{children:"·"}),u&&l.jsxs(l.Fragment,{children:[l.jsx(W,{to:"/downloads",className:"hover:text-brand-500",children:x("footer.downloads")}),l.jsx("span",{children:"·"})]}),l.jsx("button",{type:"button",onClick:d,className:"hover:text-brand-500",children:x("footer.cookieSettings")})]})})]})}const Mc=g.createContext({});function xn(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const Bb=typeof window<"u",Ws=Bb?g.useLayoutEffect:g.useEffect,Qo=g.createContext(null);function Lc(e,t){e.indexOf(t)===-1&&e.push(t)}function vo(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Pt=(e,t,n)=>n>t?t:n{};const vn={},o0=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),a0=e=>typeof e=="object"&&e!==null,l0=e=>/^0[^.\s]+$/u.test(e);function u0(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ye=e=>e,Us=(...e)=>e.reduce((t,n)=>r=>n(t(r))),Pr=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class Dc{constructor(){this.subscriptions=[]}add(t){return Lc(this.subscriptions,t),()=>vo(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,lt=e=>e/1e3,Rc=(e,t)=>t?e*(1e3/t):0,c0=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,$b=1e-7,Hb=12;function Wb(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=c0(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>$b&&++aWb(i,0,1,e,n);return i=>i===0||i===1?i:c0(s(i),t,r)}const d0=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,f0=e=>t=>1-e(1-t),h0=Gs(.33,1.53,.69,.99),Ic=f0(h0),m0=d0(Ic),p0=e=>e>=1?1:(e*=2)<1?.5*Ic(e):.5*(2-Math.pow(2,-10*(e-1))),Vc=e=>1-Math.sin(Math.acos(e)),g0=f0(Vc),y0=d0(Vc),Ub=Gs(.42,0,1,1),Gb=Gs(0,0,.58,1),x0=Gs(.42,0,.58,1),Kb=e=>Array.isArray(e)&&typeof e[0]!="number",v0=e=>Array.isArray(e)&&typeof e[0]=="number",Xb={linear:Ye,easeIn:Ub,easeInOut:x0,easeOut:Gb,circIn:Vc,circInOut:y0,circOut:g0,backIn:Ic,backInOut:m0,backOut:h0,anticipate:p0},Yb=e=>typeof e=="string",Ff=e=>{if(v0(e)){Ac(e.length===4);const[t,n,r,s]=e;return Gs(t,n,r,s)}else if(Yb(e))return Xb[e];return e},gi=["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 a(c){i.has(c)&&(u.schedule(c),e()),c(o)}const u={schedule:(c,d=!1,f=!1)=>{const x=f&&r?t:n;return d&&i.add(c),x.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(a),t.clear(),r=!1,s&&(s=!1,u.process(c))}};return u}const Qb=40;function w0(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=gi.reduce((v,b)=>(v[b]=qb(i),v),{}),{setup:a,read:u,resolveKeyframes:c,preUpdate:d,update:f,preRender:h,render:x,postRender:w}=o,y=()=>{const v=vn.useManualTiming,b=v?s.timestamp:performance.now();n=!1,v||(s.delta=r?1e3/60:Math.max(Math.min(b-s.timestamp,Qb),1)),s.timestamp=b,s.isProcessing=!0,a.process(s),u.process(s),c.process(s),d.process(s),f.process(s),h.process(s),x.process(s),w.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(y))},k=()=>{n=!0,r=!0,s.isProcessing||e(y)};return{schedule:gi.reduce((v,b)=>{const P=o[b];return v[b]=(C,S=!1,j=!1)=>(n||k(),P.schedule(C,S,j)),v},{}),cancel:v=>{for(let b=0;b(Vi===void 0&&Fe.set(Se.isProcessing||vn.useManualTiming?Se.timestamp:performance.now()),Vi),set:e=>{Vi=e,queueMicrotask(Zb)}},k0=e=>t=>typeof t=="string"&&t.startsWith(e),b0=k0("--"),Jb=k0("var(--"),Oc=e=>Jb(e)?e2.test(e.split("/*")[0].trim()):!1,e2=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function zf(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Dr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},As={...Dr,transform:e=>Pt(0,1,e)},yi={...Dr,default:1},ls=e=>Math.round(e*1e5)/1e5,Fc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function t2(e){return e==null}const n2=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,zc=(e,t)=>n=>!!(typeof n=="string"&&n2.test(n)&&n.startsWith(e)||t&&!t2(n)&&Object.prototype.hasOwnProperty.call(n,t)),S0=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(Fc);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},r2=e=>Pt(0,255,e),Da={...Dr,transform:e=>Math.round(r2(e))},Mn={test:zc("rgb","red"),parse:S0("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Da.transform(e)+", "+Da.transform(t)+", "+Da.transform(n)+", "+ls(As.transform(r))+")"};function s2(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 nu={test:zc("#"),parse:s2,transform:Mn.transform},Ks=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),It=Ks("deg"),At=Ks("%"),V=Ks("px"),i2=Ks("vh"),o2=Ks("vw"),Bf={...At,parse:e=>At.parse(e)/100,transform:e=>At.transform(e*100)},or={test:zc("hsl","hue"),parse:S0("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+At.transform(ls(t))+", "+At.transform(ls(n))+", "+ls(As.transform(r))+")"},ge={test:e=>Mn.test(e)||nu.test(e)||or.test(e),parse:e=>Mn.test(e)?Mn.parse(e):or.test(e)?or.parse(e):nu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Mn.transform(e):or.transform(e),getAnimatableNone:e=>{const t=ge.parse(e);return t.alpha=0,ge.transform(t)}},a2=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function l2(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Fc))==null?void 0:t.length)||0)+(((n=e.match(a2))==null?void 0:n.length)||0)>0}const j0="number",P0="color",u2="var",c2="var(",$f="${}",d2=/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 Tr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(d2,u=>(ge.test(u)?(r.color.push(i),s.push(P0),n.push(ge.parse(u))):u.startsWith(c2)?(r.var.push(i),s.push(u2),n.push(u)):(r.number.push(i),s.push(j0),n.push(parseFloat(u))),++i,$f)).split($f);return{values:n,split:a,indexes:r,types:s}}function f2(e){return Tr(e).values}function T0({split:e,types:t}){const n=e.length;return r=>{let s="";for(let i=0;itypeof e=="number"?0:ge.test(e)?ge.getAnimatableNone(e):e,p2=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:m2(e);function g2(e){const t=Tr(e);return T0(t)(t.values.map((r,s)=>p2(r,t.split[s])))}const St={test:l2,parse:f2,createTransformer:h2,getAnimatableNone:g2};function Ra(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 y2({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,u=2*n-a;s=Ra(u,a,e+1/3),i=Ra(u,a,e),o=Ra(u,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function wo(e,t){return n=>n>0?t:e}const ne=(e,t,n)=>e+(t-e)*n,Ia=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},x2=[nu,Mn,or],v2=e=>x2.find(t=>t.test(e));function Hf(e){const t=v2(e);if(!t)return!1;let n=t.parse(e);return t===or&&(n=y2(n)),n}const Wf=(e,t)=>{const n=Hf(e),r=Hf(t);if(!n||!r)return wo(e,t);const s={...n};return i=>(s.red=Ia(n.red,r.red,i),s.green=Ia(n.green,r.green,i),s.blue=Ia(n.blue,r.blue,i),s.alpha=ne(n.alpha,r.alpha,i),Mn.transform(s))},ru=new Set(["none","hidden"]);function w2(e,t){return ru.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function k2(e,t){return n=>ne(e,t,n)}function Bc(e){return typeof e=="number"?k2:typeof e=="string"?Oc(e)?wo:ge.test(e)?Wf:j2:Array.isArray(e)?C0:typeof e=="object"?ge.test(e)?Wf:b2:wo}function C0(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>Bc(i)(i,t[o]));return i=>{for(let o=0;o{for(const i in r)n[i]=r[i](s);return n}}function S2(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s{const n=St.createTransformer(t),r=Tr(e),s=Tr(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?ru.has(e)&&!s.values.length||ru.has(t)&&!r.values.length?w2(e,t):Us(C0(S2(r,s),s.values),n):wo(e,t)};function E0(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ne(e,t,n):Bc(e)(e,t)}const P2=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>X.update(t,n),stop:()=>ft(t),now:()=>Se.isProcessing?Se.timestamp:Fe.now()}},N0=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i=ko?1/0:t}function T2(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min($c(r),ko);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:lt(s)}}const fe={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 su(e,t){return e*Math.sqrt(1-t*t)}const C2=12;function E2(e,t,n){let r=n;for(let s=1;s{const d=c*o,f=d*e,h=d-n,x=su(c,o),w=Math.exp(-f);return Va-h/x*w},i=c=>{const f=c*o*e,h=f*n+n,x=Math.pow(o,2)*Math.pow(c,2)*e,w=Math.exp(-f),y=su(Math.pow(c,2),o);return(-s(c)+Va>0?-1:1)*((h-x)*w)/y}):(s=c=>{const d=Math.exp(-c*e),f=(c-n)*e+1;return-Va+d*f},i=c=>{const d=Math.exp(-c*e),f=(n-c)*(e*e);return d*f});const a=5/e,u=E2(s,i,a);if(e=Je(e),isNaN(u))return{stiffness:fe.stiffness,damping:fe.damping,duration:e};{const c=Math.pow(u,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const _2=["duration","bounce"],M2=["stiffness","damping","mass"];function Uf(e,t){return t.some(n=>e[n]!==void 0)}function L2(e){let t={velocity:fe.velocity,stiffness:fe.stiffness,damping:fe.damping,mass:fe.mass,isResolvedFromDuration:!1,...e};if(!Uf(e,M2)&&Uf(e,_2))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*Pt(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:fe.mass,stiffness:s,damping:i}}else{const n=N2({...e,velocity:0});t={...t,...n,mass:fe.mass},t.isResolvedFromDuration=!0}return t}function bo(e=fe.visualDuration,t=fe.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:u,damping:c,mass:d,duration:f,velocity:h,isResolvedFromDuration:x}=L2({...n,velocity:-lt(n.velocity||0)}),w=h||0,y=c/(2*Math.sqrt(u*d)),k=o-i,p=lt(Math.sqrt(u/d)),m=Math.abs(k)<5;r||(r=m?fe.restSpeed.granular:fe.restSpeed.default),s||(s=m?fe.restDelta.granular:fe.restDelta.default);let v,b,P,C,S,j;if(y<1)P=su(p,y),C=(w+y*p*k)/P,v=_=>{const F=Math.exp(-y*p*_);return o-F*(C*Math.sin(P*_)+k*Math.cos(P*_))},S=y*p*C+k*P,j=y*p*k-C*P,b=_=>Math.exp(-y*p*_)*(S*Math.sin(P*_)+j*Math.cos(P*_));else if(y===1){v=F=>o-Math.exp(-p*F)*(k+(w+p*k)*F);const _=w+p*k;b=F=>Math.exp(-p*F)*(p*_*F-w)}else{const _=p*Math.sqrt(y*y-1);v=N=>{const D=Math.exp(-y*p*N),$=Math.min(_*N,300);return o-D*((w+y*p*k)*Math.sinh($)+_*k*Math.cosh($))/_};const F=(w+y*p*k)/_,H=y*p*F-k*_,te=y*p*k-F*_;b=N=>{const D=Math.exp(-y*p*N),$=Math.min(_*N,300);return D*(H*Math.sinh($)+te*Math.cosh($))}}const L={calculatedDuration:x&&f||null,velocity:_=>Je(b(_)),next:_=>{if(!x&&y<1){const H=Math.exp(-y*p*_),te=Math.sin(P*_),N=Math.cos(P*_),D=o-H*(C*te+k*N),$=Je(H*(S*te+j*N));return a.done=Math.abs($)<=r&&Math.abs(o-D)<=s,a.value=a.done?o:D,a}const F=v(_);if(x)a.done=_>=f;else{const H=Je(b(_));a.done=Math.abs(H)<=r&&Math.abs(o-F)<=s}return a.value=a.done?o:F,a},toString:()=>{const _=Math.min($c(L),ko),F=N0(H=>L.next(_*H).value,_,30);return _+"ms "+F},toTransition:()=>{}};return L}bo.applyToOptions=e=>{const t=T2(e,100,bo);return e.ease=t.ease,e.duration=Je(t.duration),e.type="keyframes",e};const A2=5;function _0(e,t,n){const r=Math.max(t-A2,0);return Rc(n-e(r),t-r)}function iu({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:u,restDelta:c=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},x=j=>a!==void 0&&ju,w=j=>a===void 0?u:u===void 0||Math.abs(a-j)-y*Math.exp(-j/r),v=j=>p+m(j),b=j=>{const L=m(j),_=v(j);h.done=Math.abs(L)<=c,h.value=h.done?p:_};let P,C;const S=j=>{x(h.value)&&(P=j,C=bo({keyframes:[h.value,w(h.value)],velocity:_0(v,j,h.value),damping:s,stiffness:i,restDelta:c,restSpeed:d}))};return S(0),{calculatedDuration:null,next:j=>{let L=!1;return!C&&P===void 0&&(L=!0,b(j),S(j)),P!==void 0&&j>=P?C.next(j-P):(!L&&b(j),h)}}}function D2(e,t,n){const r=[],s=n||vn.mix||E0,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 a=D2(t,r,s),u=a.length,c=d=>{if(o&&d1)for(;fc(Pt(e[0],e[i-1],d)):c}function R2(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Pr(0,t,r);e.push(ne(n,1,s))}}function M0(e){const t=[0];return R2(t,e.length-1),t}function I2(e,t){return e.map(n=>n*t)}function V2(e,t){return e.map(()=>t||x0).splice(0,e.length-1)}function us({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=Kb(r)?r.map(Ff):Ff(r),i={done:!1,value:t[0]},o=I2(n&&n.length===t.length?n:M0(t),e),a=Hc(o,t,{ease:Array.isArray(s)?s:V2(t,s)});return{calculatedDuration:e,next:u=>(i.value=a(u),i.done=u>=e,i)}}const O2=e=>e!==null;function Zo(e,{repeat:t,repeatType:n="loop"},r,s=1){const i=e.filter(O2),a=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const F2={decay:iu,inertia:iu,tween:us,keyframes:us,spring:bo};function L0(e){typeof e.type=="string"&&(e.type=F2[e.type])}class Wc{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 z2=e=>e/100;class Ds extends Wc{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!==Fe.now()&&this.tick(Fe.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;L0(t);const{type:n=us,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=t;let{keyframes:a}=t;const u=n||us;u!==us&&typeof a[0]!="number"&&(this.mixKeyframes=Us(z2,E0(a[0],a[1])),a=[0,100]);const c=u({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=$c(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:a,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:d,repeat:f,repeatType:h,repeatDelay:x,type:w,onUpdate:y,finalKeyframe:k}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const p=this.currentTime-c*(this.playbackSpeed>=0?1:-1),m=this.playbackSpeed>=0?p<0:p>s;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let v=this.currentTime,b=r;if(f){const j=Math.min(this.currentTime,s)/a;let L=Math.floor(j),_=j%1;!_&&j>=1&&(_=1),_===1&&L--,L=Math.min(L,f+1),!!(L%2)&&(h==="reverse"?(_=1-_,x&&(_-=x/a)):h==="mirror"&&(b=o)),v=Pt(0,1,_)*a}let P;m?(this.delayState.value=d[0],P=this.delayState):P=b.next(v),i&&!m&&(P.value=i(P.value));let{done:C}=P;!m&&u!==null&&(C=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return S&&w!==iu&&(P.value=Zo(d,this.options,k,this.speed)),y&&y(P.value),S&&this.finish(),P}then(t,n){return this.finished.then(t,n)}get duration(){return lt(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+lt(t)}get time(){return lt(this.currentTime)}set time(t){t=Je(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 _0(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(Fe.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=lt(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:t=P2,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(Fe.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 B2(e){for(let t=1;te*180/Math.PI,ou=e=>{const t=Ln(Math.atan2(e[1],e[0]));return au(t)},$2={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ou,rotateZ:ou,skewX:e=>Ln(Math.atan(e[1])),skewY:e=>Ln(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},au=e=>(e=e%360,e<0&&(e+=360),e),Gf=ou,Kf=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Xf=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),H2={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Kf,scaleY:Xf,scale:e=>(Kf(e)+Xf(e))/2,rotateX:e=>au(Ln(Math.atan2(e[6],e[5]))),rotateY:e=>au(Ln(Math.atan2(-e[2],e[0]))),rotateZ:Gf,rotate:Gf,skewX:e=>Ln(Math.atan(e[4])),skewY:e=>Ln(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function lu(e){return e.includes("scale")?1:0}function uu(e,t){if(!e||e==="none")return lu(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=H2,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=$2,s=a}if(!s)return lu(t);const i=r[t],o=s[1].split(",").map(U2);return typeof i=="function"?i(o):o[i]}const W2=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return uu(n,t)};function U2(e){return parseFloat(e.trim())}const Rr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ir=new Set([...Rr,"pathRotation"]),Yf=e=>e===Dr||e===V,G2=new Set(["x","y","z"]),K2=Rr.filter(e=>!G2.has(e));function X2(e){const t=[];return K2.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const on={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})=>uu(t,"x"),y:(e,{transform:t})=>uu(t,"y")};on.translateX=on.x;on.translateY=on.y;const Rn=new Set;let cu=!1,du=!1,fu=!1;function A0(){if(du){const e=Array.from(Rn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=X2(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}du=!1,cu=!1,Rn.forEach(e=>e.complete(fu)),Rn.clear()}function D0(){Rn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(du=!0)})}function Y2(){fu=!0,D0(),A0(),fu=!1}class Uc{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?(Rn.add(this),cu||(cu=!0,X.read(D0),X.resolveKeyframes(A0))):(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 a=r.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),s&&i===void 0&&s.set(t[0])}B2(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Rn.delete(this)}cancel(){this.state==="scheduled"&&(Rn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const q2=e=>e.startsWith("--");function R0(e,t,n){q2(t)?e.style.setProperty(t,n):e.style[t]=n}const Q2={};function Gc(e,t){const n=u0(e);return()=>Q2[t]??n()}const Kc=Gc(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),I0=Gc(()=>window.ViewTimeline!==void 0,"viewTimeline"),V0=Gc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Qr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,qf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Qr([0,.65,.55,1]),circOut:Qr([.55,0,1,.45]),backIn:Qr([.31,.01,.66,-.59]),backOut:Qr([.33,1.53,.69,.99])};function O0(e,t){if(e)return typeof e=="function"?V0()?N0(e,t):"ease-out":v0(e)?Qr(e):Array.isArray(e)?e.map(n=>O0(n,t)||qf.easeOut):qf[e]}function Z2(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:u}={},c=void 0){const d={[t]:n};u&&(d.offset=u);const f=O0(a,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 F0(e){return typeof e=="function"&&"applyToOptions"in e}function J2({type:e,...t}){return F0(e)&&V0()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class z0 extends Wc{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:a,onComplete:u}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,Ac(typeof t.type!="string");const c=J2(t);this.animation=Z2(n,r,s,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=Zo(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(d),R0(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 lt(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+lt(t)}get time(){return lt(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Je(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&&Kc()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),Ye):s(this)}}const B0={anticipate:p0,backInOut:m0,circInOut:y0};function eS(e){return e in B0}function tS(e){typeof e.ease=="string"&&eS(e.ease)&&(e.ease=B0[e.ease])}const Oa=10;class nS extends z0{constructor(t){tS(t),L0(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 a=new Ds({...o,autoplay:!1}),u=Math.max(Oa,Fe.now()-this.startTime),c=Pt(0,Oa,u-Oa),d=a.sample(u).value,{name:f}=this.options;i&&f&&R0(i,f,d),n.setWithVelocity(a.sample(Math.max(0,u-c)).value,d,c),a.stop()}}const Qf=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(St.test(e)||e==="0")&&!e.startsWith("url("));function rS(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nObject.hasOwnProperty.call(Element.prototype,"animate"));function uS(e){var f;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:i,type:o,keyframes:a}=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 lS()&&n&&($0.has(n)||aS.has(n)&&oS(a))&&(n!=="transform"||!d)&&!c&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const cS=40;class dS extends Wc{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:u,motionValue:c,element:d,...f}){var w;super(),this.stop=()=>{var y,k;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(k=this.keyframeResolver)==null||k.cancel()},this.createdAt=Fe.now();const h={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:u,motionValue:c,element:d,...f},x=(d==null?void 0:d.KeyframeResolver)||Uc;this.keyframeResolver=new x(a,(y,k,p)=>this.onKeyframesResolved(y,k,h,!p),u,c,d),(w=this.keyframeResolver)==null||w.scheduleResolve()}onKeyframesResolved(t,n,r,s){var p,m;this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:u,isHandoff:c,onUpdate:d}=r;this.resolvedAt=Fe.now();let f=!0;sS(t,i,o,a)||(f=!1,(vn.instantAnimations||!u)&&(d==null||d(Zo(t,r,n))),t[0]=t[t.length-1],hu(r),r.repeat=0);const x={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>cS?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},w=f&&!c&&uS(x),y=(m=(p=x.motionValue)==null?void 0:p.owner)==null?void 0:m.current;let k;if(w)try{k=new nS({...x,element:y})}catch{k=new Ds(x)}else k=new Ds(x);k.finished.then(()=>{this.notifyFinished()}).catch(Ye),this.pendingTimeline&&(this.stopTimeline=k.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=k}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Y2()),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 H0(e,t,n,r=0,s=1){const i=Array.from(e).sort((c,d)=>c.sortNodePosition(d)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:a-i*r}const Zf=30,fS=e=>!isNaN(parseFloat(e)),cs={current:void 0};class hS{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=Fe.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=Fe.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=fS(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 Dc);const r=this.events[t].add(n);return t==="change"?()=>{r(),X.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 cs.current&&cs.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Fe.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Zf)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Zf);return Rc(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 wt(e,t){return new hS(e,t)}function W0(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Xc(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?W0(n,e):n}const mS={type:"spring",stiffness:500,damping:25,restSpeed:10},pS=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),gS={type:"keyframes",duration:.8},yS={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},xS=(e,{keyframes:t})=>t.length>2?gS:Ir.has(e)?e.startsWith("scale")?pS(t[1]):mS:yS,vS=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function wS(e){for(const t in e)if(!vS.has(t))return!0;return!1}const Yc=(e,t,n,r={},s,i)=>o=>{const a=Xc(r,e)||{},u=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Je(u);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};wS(a)||Object.assign(d,xS(e,d)),d.duration&&(d.duration=Je(d.duration)),d.repeatDelay&&(d.repeatDelay=Je(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(hu(d),d.delay===0&&(f=!0)),(vn.instantAnimations||vn.skipAnimations||s!=null&&s.shouldSkipAnimations||a.skipAnimations)&&(f=!0,hu(d),d.delay=0),d.allowFlatten=!a.type&&!a.ease,f&&!i&&t.get()!==void 0){const h=Zo(d.keyframes,a);if(h!==void 0){X.update(()=>{d.onUpdate(h),d.onComplete()});return}}return a.isSync?new Ds(d):new dS(d)},kS=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function bS(e){const t=kS.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function U0(e,t,n=1){const[r,s]=bS(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return o0(o)?parseFloat(o):o}return Oc(s)?U0(s,t,n+1):s}function Jf(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function qc(e,t,n,r){if(typeof t=="function"){const[s,i]=Jf(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]=Jf(r);t=t(n!==void 0?n:e.custom,s,i)}return t}function In(e,t,n){const r=e.getProps();return qc(r,t,n!==void 0?n:r.custom,e)}const G0=new Set(["width","height","top","left","right","bottom",...Rr]),mu=e=>Array.isArray(e);function SS(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,wt(n))}function jS(e){return mu(e)?e[e.length-1]||0:e}function PS(e,t){const n=In(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=jS(i[o]);SS(e,o,a)}}const ke=e=>!!(e&&e.getVelocity);function TS(e){return!!(ke(e)&&e.add)}function pu(e,t){const n=e.getValue("willChange");if(TS(n))return n.add(t);if(!n&&vn.WillChange){const r=new vn.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Qc(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const CS="framerAppearId",K0="data-"+Qc(CS);function X0(e){return e.props[K0]}function ES({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Y0(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:o,...a}=t;const u=e.getDefaultTransition();i=i?W0(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],x=i==null?void 0:i.path;x&&x.animateVisualElement(e,a,i,n,f);for(const w in a){const y=e.getValue(w,e.latestValues[w]??null),k=a[w];if(k===void 0||h&&ES(h,w))continue;const p={delay:n,...Xc(i||{},w)};d&&(p.skipAnimations=!0);const m=y.get();if(m!==void 0&&!y.isAnimating()&&!Array.isArray(k)&&k===m&&!p.velocity){X.update(()=>y.set(k));continue}let v=!1;if(window.MotionHandoffAnimation){const C=X0(e);if(C){const S=window.MotionHandoffAnimation(C,w,X);S!==null&&(p.startTime=S,v=!0)}}pu(e,w);const b=c??e.shouldReduceMotion;y.start(Yc(w,y,k,b&&G0.has(w)?{type:!1}:p,e,v));const P=y.animation;P&&f.push(P)}if(o){const w=()=>X.update(()=>{o&&PS(e,o)});f.length?Promise.all(f).then(w):w()}return f}function gu(e,t,n={}){var u;const r=In(e,t,n.type==="exit"?(u=e.presenceContext)==null?void 0:u.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(Y0(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=s;return NS(e,t,c,d,f,h,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,d]=a==="beforeChildren"?[i,o]:[o,i];return c().then(()=>d())}else return Promise.all([i(),o(n.delay)])}function NS(e,t,n=0,r=0,s=0,i=1,o){const a=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),a.push(gu(u,t,{...o,delay:n+(typeof r=="function"?0:r)+H0(e.variantChildren,u,r,s,i)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(a)}function _S(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>gu(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=gu(e,t,n);else{const s=typeof t=="function"?In(e,t,n.custom):t;r=Promise.all(Y0(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const MS={test:e=>e==="auto",parse:e=>e},q0=e=>t=>t.test(e),Q0=[Dr,V,At,It,o2,i2,MS],eh=e=>Q0.find(q0(e));function LS(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||l0(e):!0}const AS=new Set(["brightness","contrast","saturate","opacity"]);function DS(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Fc)||[];if(!r)return e;const s=n.replace(r,"");let i=AS.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const RS=/\b([a-z-]*)\(.*?\)/gu,yu={...St,getAnimatableNone:e=>{const t=e.match(RS);return t?t.map(DS).join(" "):e}},xu={...St,getAnimatableNone:e=>{const t=St.parse(e);return St.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},th={...Dr,transform:Math.round},IS={rotate:It,pathRotation:It,rotateX:It,rotateY:It,rotateZ:It,scale:yi,scaleX:yi,scaleY:yi,scaleZ:yi,skew:It,skewX:It,skewY:It,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:As,originX:Bf,originY:Bf,originZ:V},So={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,top:V,right:V,bottom:V,left:V,inset:V,insetBlock:V,insetBlockStart:V,insetBlockEnd:V,insetInline:V,insetInlineStart:V,insetInlineEnd:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,paddingBlock:V,paddingBlockStart:V,paddingBlockEnd:V,paddingInline:V,paddingInlineStart:V,paddingInlineEnd:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,marginBlock:V,marginBlockStart:V,marginBlockEnd:V,marginInline:V,marginInlineStart:V,marginInlineEnd:V,fontSize:V,backgroundPositionX:V,backgroundPositionY:V,...IS,zIndex:th,fillOpacity:As,strokeOpacity:As,numOctaves:th},VS={...So,color:ge,backgroundColor:ge,outlineColor:ge,fill:ge,stroke:ge,borderColor:ge,borderTopColor:ge,borderRightColor:ge,borderBottomColor:ge,borderLeftColor:ge,filter:yu,WebkitFilter:yu,mask:xu,WebkitMask:xu},Z0=e=>VS[e],OS=new Set([yu,xu]);function J0(e,t){let n=Z0(e);return OS.has(n)||(n=St),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const FS=new Set(["auto","none","0"]);function zS(e,t,n){let r=0,s;for(;r{t.getValue(u).set(c)}),this.resolveNoneKeyframes()}}const Zc=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function ey(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 vu=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ds(e){return a0(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Cr,cancel:ty}=w0(queueMicrotask,!1),gt={x:!1,y:!1};function ny(){return gt.x||gt.y}function $S(e){return e==="x"||e==="y"?gt[e]?null:(gt[e]=!0,()=>{gt[e]=!1}):gt.x||gt.y?null:(gt.x=gt.y=!0,()=>{gt.x=gt.y=!1})}function ry(e,t){const n=ey(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function HS(e){return!(e.pointerType==="touch"||ny())}function WS(e,t,n={}){const[r,s,i]=ry(e,n);return r.forEach(o=>{let a=!1,u=!1,c;const d=()=>{o.removeEventListener("pointerleave",w)},f=k=>{c&&(c(k),c=void 0),d()},h=k=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),u&&(u=!1,f(k))},x=()=>{a=!0,window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",h,s)},w=k=>{if(k.pointerType!=="touch"){if(a){u=!0;return}f(k)}},y=k=>{if(!HS(k))return;u=!1;const p=t(o,k);typeof p=="function"&&(c=p,o.addEventListener("pointerleave",w,s))};o.addEventListener("pointerenter",y,s),o.addEventListener("pointerdown",x,s)}),i}const sy=(e,t)=>t?e===t?!0:sy(e,t.parentElement):!1,Jc=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,US=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function GS(e){return US.has(e.tagName)||e.isContentEditable===!0}const KS=new Set(["INPUT","SELECT","TEXTAREA"]);function XS(e){return KS.has(e.tagName)||e.isContentEditable===!0}const Oi=new WeakSet;function nh(e){return t=>{t.key==="Enter"&&e(t)}}function Fa(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const YS=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=nh(()=>{if(Oi.has(n))return;Fa(n,"down");const s=nh(()=>{Fa(n,"up")}),i=()=>Fa(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 rh(e){return Jc(e)&&!ny()}const sh=new WeakSet;function qS(e,t,n={}){const[r,s,i]=ry(e,n),o=a=>{const u=a.currentTarget;if(!rh(a)||sh.has(a))return;Oi.add(u),n.stopPropagation&&sh.add(a);const c=t(u,a),d={...s,capture:!0},f=(w,y)=>{window.removeEventListener("pointerup",h,d),window.removeEventListener("pointercancel",x,d),Oi.has(u)&&Oi.delete(u),rh(w)&&typeof c=="function"&&c(w,{success:y})},h=w=>{f(w,u===window||u===document||n.useGlobalTarget||sy(u,w.target))},x=w=>{f(w,!1)};window.addEventListener("pointerup",h,d),window.addEventListener("pointercancel",x,d)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),ds(a)&&(a.addEventListener("focus",c=>YS(c,s)),!GS(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function ed(e){return a0(e)&&"ownerSVGElement"in e}const Fi=new WeakMap;let qt;const iy=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:ed(r)&&"getBBox"in r?r.getBBox()[t]:r[n],QS=iy("inline","width","offsetWidth"),ZS=iy("block","height","offsetHeight");function JS({target:e,borderBoxSize:t}){var n;(n=Fi.get(e))==null||n.forEach(r=>{r(e,{get width(){return QS(e,t)},get height(){return ZS(e,t)}})})}function ej(e){e.forEach(JS)}function tj(){typeof ResizeObserver>"u"||(qt=new ResizeObserver(ej))}function nj(e,t){qt||tj();const n=ey(e);return n.forEach(r=>{let s=Fi.get(r);s||(s=new Set,Fi.set(r,s)),s.add(t),qt==null||qt.observe(r)}),()=>{n.forEach(r=>{const s=Fi.get(r);s==null||s.delete(t),s!=null&&s.size||qt==null||qt.unobserve(r)})}}const zi=new Set;let ar;function rj(){ar=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};zi.forEach(t=>t(e))},window.addEventListener("resize",ar)}function sj(e){return zi.add(e),ar||rj(),()=>{zi.delete(e),!zi.size&&typeof ar=="function"&&(window.removeEventListener("resize",ar),ar=void 0)}}function wu(e,t){return typeof e=="function"?sj(e):nj(e,t)}function oy(e,t){let n;const r=()=>{const{currentTime:s}=t,o=(s===null?0:s.value)/100;n!==o&&e(o),n=o};return X.preUpdate(r,!0),()=>ft(r)}function ij(e){return ed(e)&&e.tagName==="svg"}function oj(...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],a=Hc(s,i,o);return t?a(r):a}function aj(e,t,n={}){const r=e.get();let s=null,i=r,o;const a=typeof r=="string"?r.replace(/[\d.-]/g,""):void 0,u=()=>{s&&(s.stop(),s=null),e.animation=void 0},c=()=>{const f=ih(e.get()),h=ih(i);if(f===h){u();return}const x=s?s.getGeneratorVelocity():e.getVelocity();u(),s=new Ds({keyframes:[f,h],velocity:x,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=x=>h(za(x,a)),X.postRender(d)},u),ke(t)){let f=n.skipInitialAnimation===!0;const h=t.on("change",w=>{f?(f=!1,e.jump(za(w,a),!1)):e.set(za(w,a))}),x=e.on("destroy",h);return()=>{h(),x()}}return u}function za(e,t){return t?e+t:e}function ih(e){return typeof e=="number"?e:parseFloat(e)}const lj=[...Q0,ge,St],uj=e=>lj.find(q0(e)),oh=()=>({translate:0,scale:1,origin:0,originPoint:0}),lr=()=>({x:oh(),y:oh()}),ah=()=>({min:0,max:0}),xe=()=>({x:ah(),y:ah()}),cj=new WeakMap;function Jo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Rs(e){return typeof e=="string"||Array.isArray(e)}const td=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],nd=["initial",...td];function ea(e){return Jo(e.animate)||nd.some(t=>Rs(e[t]))}function ay(e){return!!(ea(e)||e.variants)}function dj(e,t,n){for(const r in t){const s=t[r],i=n[r];if(ke(s))e.addValue(r,s);else if(ke(i))e.addValue(r,wt(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,wt(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ku={current:null},ly={current:!1},fj=typeof window<"u";function hj(){if(ly.current=!0,!!fj)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ku.current=e.matches;e.addEventListener("change",t),t()}else ku.current=!1}const lh=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let jo={};function uy(e){jo=e}function mj(){return jo}class pj{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:o,visualState:a},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=Uc,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 x=Fe.now();this.renderScheduledAtthis.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(ly.current||hj(),this.shouldReduceMotion=ku.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(),ft(this.notifyUpdate),ft(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&&$0.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:u,ease:c,duration:d}=n.accelerate,f=new z0({element:this.current,name:t,keyframes:a,times:u,ease:c,duration:Je(d)}),h=o(f);this.valueSubscriptions.set(t,()=>{h(),f.cancel()});return}const r=Ir.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&X.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 jo){const n=jo[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):xe()}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=wt(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"&&(o0(r)||l0(r))?r=parseFloat(r):!uj(r)&&St.test(n)&&(r=J0(t,n)),this.setBaseTarget(t,ke(r)?r.get():r)),ke(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=qc(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&&!ke(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 Dc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Cr.render(this.render)}}class cy extends pj{constructor(){super(...arguments),this.KeyframeResolver=BS}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;ke(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Sn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function dy({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function gj({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function yj(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 Ba(e){return e===void 0||e===1}function bu({scale:e,scaleX:t,scaleY:n}){return!Ba(e)||!Ba(t)||!Ba(n)}function Cn(e){return bu(e)||fy(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function fy(e){return uh(e.x)||uh(e.y)}function uh(e){return e&&e!=="0%"}function Po(e,t,n){const r=e-n,s=t*r;return n+s}function ch(e,t,n,r,s){return s!==void 0&&(e=Po(e,s,r)),Po(e,n,r)+t}function Su(e,t=0,n=1,r,s){e.min=ch(e.min,t,n,r,s),e.max=ch(e.max,t,n,r,s)}function hy(e,{x:t,y:n}){Su(e.x,t.translate,t.scale,t.originPoint),Su(e.y,n.translate,n.scale,n.originPoint)}const dh=.999999999999,fh=1.0000000000001;function xj(e,t,n,r=!1){var a;const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let u=0;udh&&(t.x=1),t.ydh&&(t.y=1)}function Nt(e,t){e.min+=t,e.max+=t}function hh(e,t,n,r,s=.5){const i=ne(e.min,e.max,s);Su(e,t,n,i,r)}function mh(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Bi(e,t,n){const r=n??e;hh(e.x,mh(t.x,r.x),t.scaleX,t.scale,t.originX),hh(e.y,mh(t.y,r.y),t.scaleY,t.scale,t.originY)}function my(e,t){return dy(yj(e.getBoundingClientRect(),t))}function vj(e,t,n){const r=my(e,n),{scroll:s}=t;return s&&(Nt(r.x,s.offset.x),Nt(r.y,s.offset.y)),r}const wj={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},kj=Rr.length;function bj(e,t,n){let r="",s=!0;for(let o=0;o{if(!t.target)return e;if(typeof e=="string")if(V.test(e))e=parseFloat(e);else return e;const n=ph(e,t.target.x),r=ph(e,t.target.y);return`${n}% ${r}%`}},Sj={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=St.parse(e);if(s.length>5)return r;const i=St.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,u=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=u;const c=ne(a,u,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),i(s)}},ju={borderRadius:{...Gr,applyTo:[...Zc]},borderTopLeftRadius:Gr,borderTopRightRadius:Gr,borderBottomLeftRadius:Gr,borderBottomRightRadius:Gr,boxShadow:Sj};function gy(e,{layout:t,layoutId:n}){return Ir.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ju[e]||e==="opacity")}function sd(e,t,n){var o;const r=e.style,s=t==null?void 0:t.style,i={};if(!r)return i;for(const a in r)(ke(r[a])||s&&ke(s[a])||gy(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(i[a]=r[a]);return i}function jj(e){return window.getComputedStyle(e)}class Pj extends cy{constructor(){super(...arguments),this.type="html",this.renderInstance=py}readValueFromInstance(t,n){var r;if(Ir.has(n))return(r=this.projection)!=null&&r.isProjecting?lu(n):W2(t,n);{const s=jj(t),i=(b0(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return my(t,n)}build(t,n,r){rd(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return sd(t,n,r)}}const Tj={offset:"stroke-dashoffset",array:"stroke-dasharray"},Cj={offset:"strokeDashoffset",array:"strokeDasharray"};function Ej(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?Tj:Cj;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const Nj=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function yy(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...a},u,c,d){if(rd(e,a,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 x of Nj)f[x]!==void 0&&(h[x]=f[x],delete f[x]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),s!==void 0&&Ej(f,s,i,o,!1)}const xy=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"]),vy=e=>typeof e=="string"&&e.toLowerCase()==="svg";function _j(e,t,n,r){py(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(xy.has(s)?s:Qc(s),t.attrs[s])}function wy(e,t,n){const r=sd(e,t,n);for(const s in e)if(ke(e[s])||ke(t[s])){const i=Rr.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}class Mj extends cy{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=xe}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ir.has(n)){const r=Z0(n);return r&&r.default||0}return n=xy.has(n)?n:Qc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return wy(t,n,r)}build(t,n,r){yy(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){_j(t,n,r,s)}mount(t){this.isSVGTag=vy(t.tagName),super.mount(t)}}const Lj=nd.length;function ky(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ky(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})=>_S(e,n,r)))}function Ij(e){let t=Rj(e),n=gh(),r=!0,s=!1;const i=c=>(d,f)=>{var x;const h=In(e,f,c==="exit"?(x=e.presenceContext)==null?void 0:x.custom:void 0);if(h){const{transition:w,transitionEnd:y,...k}=h;d={...d,...k,...y}}return d};function o(c){t=c(e)}function a(c){const{props:d}=e,f=ky(e.parent)||{},h=[],x=new Set;let w={},y=1/0;for(let p=0;py&&P,_=!1;const F=Array.isArray(b)?b:[b];let H=F.reduce(i(m),{});C===!1&&(H={});const{prevResolvedValues:te={}}=v,N={...te,...H},D=E=>{L=!0,x.has(E)&&(_=!0,x.delete(E)),v.needsAnimating[E]=!0;const T=e.getValue(E);T&&(T.liveStyle=!1)};for(const E in N){const T=H[E],A=te[E];if(w.hasOwnProperty(E))continue;let z=!1;mu(T)&&mu(A)?z=!by(T,A)||j:z=T!==A,z?T!=null?D(E):x.add(E):T!==void 0&&x.has(E)?D(E):v.protectedKeys[E]=!0}v.prevProp=b,v.prevResolvedValues=H,v.isActive&&(w={...w,...H}),(r||s)&&e.blockInitialAnimation&&(L=!1);const $=S&&j;L&&(!$||_)&&h.push(...F.map(E=>{const T={type:m};if(typeof E=="string"&&(r||s)&&!$&&e.manuallyAnimateOnMount&&e.parent){const{parent:A}=e,z=In(A,E);if(A.enteringChildren&&z){const{delayChildren:q}=z.transition||{};T.delay=H0(A.enteringChildren,e,q)}}return{animation:E,options:T}}))}if(x.size){const p={};if(typeof d.initial!="boolean"){const m=In(e,Array.isArray(d.initial)?d.initial[0]:d.initial);m&&m.transition&&(p.transition=m.transition)}x.forEach(m=>{const v=e.getBaseTarget(m),b=e.getValue(m);b&&(b.liveStyle=!0),p[m]=v??null}),h.push({animation:p})}let k=!!h.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(k=!1),r=!1,s=!1,k?t(h):Promise.resolve()}function u(c,d){var h;if(n[c].isActive===d)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(x=>{var w;return(w=x.animationState)==null?void 0:w.setActive(c,d)}),n[c].isActive=d;const f=a(c);for(const x in n)n[x].protectedKeys={};return f}return{animateChanges:a,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=gh(),s=!0}}}function Vj(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!by(t,e):!1}function jn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function gh(){return{animate:jn(!0),whileInView:jn(),whileHover:jn(),whileTap:jn(),whileDrag:jn(),whileFocus:jn(),exit:jn()}}function Pu(e,t){e.min=t.min,e.max=t.max}function pt(e,t){Pu(e.x,t.x),Pu(e.y,t.y)}function yh(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Sy=1e-4,Oj=1-Sy,Fj=1+Sy,jy=.01,zj=0-jy,Bj=0+jy;function ze(e){return e.max-e.min}function $j(e,t,n){return Math.abs(e-t)<=n}function xh(e,t,n,r=.5){e.origin=r,e.originPoint=ne(t.min,t.max,e.origin),e.scale=ze(n)/ze(t),e.translate=ne(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Oj&&e.scale<=Fj||isNaN(e.scale))&&(e.scale=1),(e.translate>=zj&&e.translate<=Bj||isNaN(e.translate))&&(e.translate=0)}function fs(e,t,n,r){xh(e.x,t.x,n.x,r?r.originX:void 0),xh(e.y,t.y,n.y,r?r.originY:void 0)}function vh(e,t,n,r=0){const s=r?ne(n.min,n.max,r):n.min;e.min=s+t.min,e.max=e.min+ze(t)}function Hj(e,t,n,r){vh(e.x,t.x,n.x,r==null?void 0:r.x),vh(e.y,t.y,n.y,r==null?void 0:r.y)}function wh(e,t,n,r=0){const s=r?ne(n.min,n.max,r):n.min;e.min=t.min-s,e.max=e.min+ze(t)}function To(e,t,n,r){wh(e.x,t.x,n.x,r==null?void 0:r.x),wh(e.y,t.y,n.y,r==null?void 0:r.y)}function kh(e,t,n,r,s){return e-=t,e=Po(e,1/n,r),s!==void 0&&(e=Po(e,1/s,r)),e}function Wj(e,t=0,n=1,r=.5,s,i=e,o=e){if(At.test(t)&&(t=parseFloat(t),t=ne(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=ne(i.min,i.max,r);e===i&&(a-=t),e.min=kh(e.min,t,n,a,s),e.max=kh(e.max,t,n,a,s)}function bh(e,t,[n,r,s],i,o){Wj(e,t[n],t[r],t[s],t.scale,i,o)}const Uj=["x","scaleX","originX"],Gj=["y","scaleY","originY"];function Sh(e,t,n,r){bh(e.x,t,Uj,n?n.x:void 0,r?r.x:void 0),bh(e.y,t,Gj,n?n.y:void 0,r?r.y:void 0)}function jh(e){return e.translate===0&&e.scale===1}function Py(e){return jh(e.x)&&jh(e.y)}function Ph(e,t){return e.min===t.min&&e.max===t.max}function Kj(e,t){return Ph(e.x,t.x)&&Ph(e.y,t.y)}function Th(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Ty(e,t){return Th(e.x,t.x)&&Th(e.y,t.y)}function Ch(e){return ze(e.x)/ze(e.y)}function Eh(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Et(e){return[e("x"),e("y")]}function Xj(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:x,skewX:w,skewY:y}=n;c&&(r=`perspective(${c}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotate(${f}deg) `),h&&(r+=`rotateX(${h}deg) `),x&&(r+=`rotateY(${x}deg) `),w&&(r+=`skewX(${w}deg) `),y&&(r+=`skewY(${y}deg) `)}const a=e.x.scale*t.x,u=e.y.scale*t.y;return(a!==1||u!==1)&&(r+=`scale(${a}, ${u})`),r||"none"}const Yj=Zc.length,Nh=e=>typeof e=="string"?parseFloat(e):e,_h=e=>typeof e=="number"||V.test(e);function qj(e,t,n,r,s,i){s?(e.opacity=ne(0,n.opacity??1,Qj(r)),e.opacityExit=ne(t.opacity??1,0,Zj(r))):i&&(e.opacity=ne(t.opacity??1,n.opacity??1,r));for(let o=0;ort?1:n(Pr(e,t,r))}function Jj(e,t,n){const r=ke(e)?e:wt(e);return r.start(Yc("",r,t,n)),r.animation}function Is(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}const eP=(e,t)=>e.depth-t.depth;class tP{constructor(){this.children=[],this.isDirty=!1}add(t){Lc(this.children,t),this.isDirty=!0}remove(t){vo(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(eP),this.isDirty=!1,this.children.forEach(t)}}function nP(e,t){const n=Fe.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(ft(r),e(i-t))};return X.setup(r,!0),()=>ft(r)}function $i(e){return ke(e)?e.get():e}class rP{constructor(){this.members=[]}add(t){Lc(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&&(vo(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(vo(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 Hi={hasAnimatedSinceResize:!0,hasEverUpdated:!1},$a=["","X","Y","Z"],sP=1e3;let iP=0;function Ha(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ey(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=X0(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",X,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ey(r)}function Ny({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=iP++,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(lP),this.nodes.forEach(mP),this.nodes.forEach(pP),this.nodes.forEach(uP)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let u=0;uthis.root.updateBlockedByResize=!1;X.read(()=>{f=window.innerWidth}),e(o,()=>{const x=window.innerWidth;x!==f&&(f=x,this.root.updateBlockedByResize=!0,d&&d(),d=nP(h,250),Hi.hasAnimatedSinceResize&&(Hi.hasAnimatedSinceResize=!1,this.nodes.forEach(Dh)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:x})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||c.getDefaultTransition()||wP,{onLayoutAnimationStart:y,onLayoutAnimationComplete:k}=c.getProps(),p=!this.targetLayout||!Ty(this.targetLayout,x),m=!f&&h;if(this.options.layoutRoot||this.resumeFrom||m||f&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...Xc(w,"layout"),onPlay:y,onComplete:k};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(d,m,v.path)}else f||Dh(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=x})}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(),ft(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(gP),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&&Ey(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&&!ze(this.snapshot.measuredBox.x)&&!ze(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=C/1e3,j=P==null?void 0:P(S);j?(h.x.translate=j.x,h.x.scale=ne(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=ne(o.y.scale,1,S),h.y.origin=o.y.origin,h.y.originPoint=o.y.originPoint):(Rh(h.x,o.x,S),Rh(h.y,o.y,S)),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(To(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),xP(this.relativeTarget,this.relativeTargetOrigin,x,S),b&&Kj(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=xe()),pt(b,this.relativeTarget)),k&&(this.animationValues=f,qj(f,d,this.latestValues,S,v,m)),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 a,u,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(u=this.resumingFrom)==null?void 0:u.currentAnimation)==null||c.stop(),this.pendingAnimation&&(ft(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=X.update(()=>{Hi.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=wt(0)),this.motionValue.jump(0,!1),this.currentAnimation=Jj(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(sP),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:u,layout:c,latestValues:d}=o;if(!(!a||!u||!c)){if(this!==o&&this.layout&&c&&_y(this.options.animationType,this.layout.layoutBox,c.layoutBox)){u=this.target||xe();const f=ze(this.layout.layoutBox.x);u.x.min=o.target.x.min,u.x.max=u.x.min+f;const h=ze(this.layout.layoutBox.y);u.y.min=o.target.y.min,u.y.max=u.y.min+h}pt(a,u),Bi(a,d),fs(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new rP),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:u}={}){const c=this.getStack();c&&c.promote(this,u),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:u}=o;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(a=!0),!a)return;const c={};u.z&&Ha("z",o,c,this.animationValues);for(let d=0;d<$a.length;d++)Ha(`rotate${$a[d]}`,o,c,this.animationValues),Ha(`skew${$a[d]}`,o,c,this.animationValues);o.render();for(const d in c)o.setStaticValue(d,c[d]),this.animationValues&&(this.animationValues[d]=c[d]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=$i(a==null?void 0:a.pointerEvents)||"",o.transform=u?u(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=$i(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Cn(this.latestValues)&&(o.transform=u?u({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=c.animationValues||c.latestValues;this.applyTransformsToTarget();let f=Xj(this.projectionDeltaWithTransform,this.treeScale,d);u&&(f=u(d,f)),o.transform=f;const{x:h,y:x}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${x.origin*100}% 0`,c.animationValues?o.opacity=c===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=c===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const w in ju){if(d[w]===void 0)continue;const{correct:y,applyTo:k,isCSSVariable:p}=ju[w],m=f==="none"?d[w]:y(d[w],c);if(k){const v=k.length;for(let b=0;b{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Lh),this.root.sharedNodes.clear()}}}function oP(e){e.updateLayout()}function aP(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")Et(f=>{const h=o?t.measuredBox[f]:t.layoutBox[f],x=ze(h);h.min=r[f].min,h.max=h.min+x});else if(i==="x"||i==="y"){const f=i==="x"?"y":"x";Pu(o?t.measuredBox[f]:t.layoutBox[f],r[f])}else _y(i,t.layoutBox,r)&&Et(f=>{const h=o?t.measuredBox[f]:t.layoutBox[f],x=ze(r[f]);h.max=h.min+x,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+x)});const a=lr();fs(a,r,t.layoutBox);const u=lr();o?fs(u,e.applyTransform(s,!0),t.measuredBox):fs(u,r,t.layoutBox);const c=!Py(a);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:x}=f;if(h&&x){const w=e.options.layoutAnchor||void 0,y=xe();To(y,t.layoutBox,h.layoutBox,w);const k=xe();To(k,r,x.layoutBox,w),Ty(y,k)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=k,e.relativeTargetOrigin=y,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:u,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function lP(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 uP(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function cP(e){e.clearSnapshot()}function Lh(e){e.clearMeasurements()}function dP(e){e.isLayoutDirty=!0,e.updateLayout()}function Ah(e){e.isLayoutDirty=!1}function fP(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function hP(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Dh(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function mP(e){e.resolveTargetDelta()}function pP(e){e.calcProjection()}function gP(e){e.resetSkewAndRotation()}function yP(e){e.removeLeadSnapshot()}function Rh(e,t,n){e.translate=ne(t.translate,0,n),e.scale=ne(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ih(e,t,n,r){e.min=ne(t.min,n.min,r),e.max=ne(t.max,n.max,r)}function xP(e,t,n,r){Ih(e.x,t.x,n.x,r),Ih(e.y,t.y,n.y,r)}function vP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const wP={duration:.45,ease:[.4,0,.1,1]},Vh=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Oh=Vh("applewebkit/")&&!Vh("chrome/")?Math.round:Ye;function Fh(e){e.min=Oh(e.min),e.max=Oh(e.max)}function kP(e){Fh(e.x),Fh(e.y)}function _y(e,t,n){return e==="position"||e==="preserve-aspect"&&!$j(Ch(t),Ch(n),.2)}function bP(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const SP=Ny({attachResizeListener:(e,t)=>Is(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}),Wa={current:void 0},My=Ny({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Wa.current){const e=new SP({});e.mount(window),e.setOptions({layoutScroll:!0}),Wa.current=e}return Wa.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Xs=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function zh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function jP(...e){return t=>{let n=!1;const r=e.map(s=>{const i=zh(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s{const{width:x,height:w,top:y,left:k,right:p,bottom:m,direction:v}=u.current;if(t||i===!1||!a.current||!x||!w)return;const b=v==="rtl",P=n==="left"?b?`right: ${p}`:`left: ${k}`:b?`left: ${k}`:`right: ${p}`,C=r==="bottom"?`bottom: ${m}`:`top: ${y}`;a.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(` + */const xb=[["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"}]],vb=U("zap",xb),Jg=g.createContext(null);function wb(){const e=new Date,t=e.getHours()+e.getMinutes()/60;return t>=6.5&&t<21?"light":"dark"}function kb({children:e}){const[t,n]=g.useState(()=>{const s=localStorage.getItem("hifi-theme");return s==="light"||s==="dark"?s:wb()});g.useEffect(()=>{document.documentElement.classList.toggle("dark",t==="dark"),localStorage.setItem("hifi-theme",t)},[t]);const r=()=>n(s=>s==="dark"?"light":"dark");return l.jsx(Jg.Provider,{value:{theme:t,toggleTheme:r},children:e})}function bb(){return g.useContext(Jg)}const Sb={nav:{openMenu:"Menü öffnen",closeMenu:"Menü schließen",close:"Schließen",adminPanel:"Zum Admin-Panel",vehicles:"Fahrzeuge",services:"Leistungen",gallery:"Galerie",contact:"Kontakt",whatsapp:"WhatsApp",shop:"Zum Shop",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 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 (Kontaktseite). 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"},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:{metaTitle:"Fahrzeug auswählen",metaDescription:"Wähle deine Fahrzeugmarke und dein Modell und entdecke passende Car-Hifi Sound-Pakete von HifiPlanet.",title:"Fahrzeug auswählen",intro:"Wähle zuerst deine Marke, dann dein Modell – wir zeigen dir direkt die passenden Sound-Pakete.",empty:"Es sind noch keine Marken hinterlegt."},brandPage:{metaTitleFallback:"Modell auswählen",metaDescription:e=>`Wähle dein ${e} Modell und entdecke passende Car-Hifi Sound-Pakete von HifiPlanet.`,loading:"Lädt…",breadcrumbVehicles:"Fahrzeuge",titleSuffix:"Modell wählen",empty:"Für diese Marke sind noch keine Modelle hinterlegt."},modelPage:{metaTitleFallback:"Sound-Pakete",metaTitle:(e,t)=>`${e} ${t} Sound-Pakete`,metaDescription:(e,t)=>`Car-Hifi Sound-Pakete für ${e} ${t} inkl. aktueller Preise – von HifiPlanet unverbindlich anfragen.`,loading:"Lädt…",breadcrumbVehicles:"Fahrzeuge",titleSuffix:"Sound-Pakete",empty:"Für dieses Modell sind noch keine Pakete hinterlegt.",totalPrice:"ab ca.",productLoading:"Produkt wird geladen…",requestContact:"Kontakt anfragen",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:{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:{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."}},jb={nav:{openMenu:"Open menu",closeMenu:"Close menu",close:"Close",adminPanel:"Go to admin panel",vehicles:"Vehicles",services:"Services",gallery:"Gallery",contact:"Contact",whatsapp:"WhatsApp",shop:"Visit shop",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 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 (contact page). Loading it 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"},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:{metaTitle:"Select your vehicle",metaDescription:"Choose your vehicle make and model and discover matching car-hifi sound packages from HifiPlanet.",title:"Select your vehicle",intro:"Choose your make first, then your model – we'll show you the matching sound packages right away.",empty:"No brands have been added yet."},brandPage:{metaTitleFallback:"Select a model",metaDescription:e=>`Choose your ${e} model and discover matching car-hifi sound packages from HifiPlanet.`,loading:"Loading…",breadcrumbVehicles:"Vehicles",titleSuffix:"Select a model",empty:"No models have been added for this brand yet."},modelPage:{metaTitleFallback:"Sound packages",metaTitle:(e,t)=>`${e} ${t} sound packages`,metaDescription:(e,t)=>`Car-hifi sound packages for the ${e} ${t} including current prices – get in touch with HifiPlanet, no obligation.`,loading:"Loading…",breadcrumbVehicles:"Vehicles",titleSuffix:"Sound packages",empty:"No packages have been added for this model yet.",totalPrice:"from approx.",productLoading:"Loading product…",requestContact:"Request contact",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:{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:{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."}},Ii={de:Sb,en:jb};function Pb(){const e=localStorage.getItem("hifi-lang");return e==="de"||e==="en"?e:(navigator.language||"de").toLowerCase().startsWith("de")?"de":"en"}function eu(e,t){return t.split(".").reduce((n,r)=>n==null?void 0:n[r],e)}const e0=g.createContext({language:"de",setLanguage:()=>{},toggleLanguage:()=>{},t:e=>{const t=eu(Ii.de,e);return t!==void 0?t:e}});function Rf({children:e}){const[t,n]=g.useState(Pb);g.useEffect(()=>{document.documentElement.setAttribute("lang",t),localStorage.setItem("hifi-lang",t)},[t]);const r=()=>n(i=>i==="de"?"en":"de"),s=i=>{const o=Ii[t]||Ii.de,a=eu(o,i);if(a!==void 0)return a;const u=eu(Ii.de,i);return u!==void 0?u:i};return l.jsx(e0.Provider,{value:{language:t,setLanguage:n,toggleLanguage:r,t:s},children:e})}function Ce(){return g.useContext(e0)}function t0({overHero:e=!1,forceDark:t=!1}){const{theme:n,toggleTheme:r}=bb(),{t:s}=Ce();return l.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"?l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"h-5 w-5",children:l.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"})}):l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"h-5 w-5",children:l.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 n0=g.createContext(null);function Cb({children:e}){const[t,n]=g.useState(null),[r,s]=g.useState(!0);g.useEffect(()=>{Z.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 Z.post("/auth/login",{username:d,password:f});return h.requires_2fa?{requires2fa:!0}:(n(h),{requires2fa:!1})},o=async d=>{const f=await Z.post("/auth/verify-2fa",{code:d});n(f)},a=async()=>{await Z.post("/auth/logout",{}),n(null)},u=async()=>{const d=await Z.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 l.jsx(n0.Provider,{value:{user:t,loading:r,login:i,verifyTwoFactor:o,logout:a,refreshUser:u,hasPermission:c},children:e})}function Hs(){return g.useContext(n0)}const Nc=g.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:[]}),Tb=Nc.Provider;function ht(){return g.useContext(Nc)}function _c(){const{hidden_areas:e}=g.useContext(Nc);return t=>(e||[]).includes(t)}const tu="/assets/logo-dark-R-ckaBhx.png",Eb="https://www.audio4cars.de/",If=e=>(e||"").replace(/[^\d+]/g,""),Vf=70,Nb=500;function _b({className:e}){return l.jsxs("svg",{viewBox:"0 0 3 2",className:e,"aria-hidden":"true",children:[l.jsx("rect",{width:"3",height:"0.667",y:"0",fill:"#000"}),l.jsx("rect",{width:"3",height:"0.667",y:"0.667",fill:"#D00"}),l.jsx("rect",{width:"3",height:"0.666",y:"1.334",fill:"#FFCE00"})]})}function Mb({className:e}){return l.jsxs("svg",{viewBox:"0 0 60 30",className:e,"aria-hidden":"true",children:[l.jsx("clipPath",{id:"fgb-t",children:l.jsx("path",{d:"M30,15 h30 v15 z v15 h-30 z h-30 v-15 z v-15 h30 z"})}),l.jsx("path",{d:"M0,0 v30 h60 v-30 z",fill:"#00247d"}),l.jsx("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#fff",strokeWidth:"6"}),l.jsx("path",{d:"M0,0 L60,30 M60,0 L0,30",clipPath:"url(#fgb-t)",stroke:"#cf142b",strokeWidth:"4"}),l.jsx("path",{d:"M30,0 v30 M0,15 h60",stroke:"#fff",strokeWidth:"10"}),l.jsx("path",{d:"M30,0 v30 M0,15 h60",stroke:"#cf142b",strokeWidth:"6"})]})}const Ma=[{code:"de",label:"Deutsch",Flag:_b},{code:"en",label:"English",Flag:Mb}];function Lb({overHero:e=!1}){const{language:t,setLanguage:n,t:r}=Ce(),[s,i]=g.useState(!1),o=g.useRef(null),a=Ma.find(u=>u.code===t)||Ma[0];return g.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]),l.jsxs("div",{className:"relative",ref:o,children:[l.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:[l.jsx("span",{className:`block h-4 w-6 shrink-0 overflow-hidden rounded-[3px] ring-1 ${e?"ring-white/50":"ring-neutral-600"}`,children:l.jsx(a.Flag,{className:"h-full w-full"})}),l.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:l.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&&l.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:Ma.map(u=>l.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:[l.jsx("span",{className:"block h-4 w-6 shrink-0 overflow-hidden rounded-[3px] ring-1 ring-neutral-600",children:l.jsx(u.Flag,{className:"h-full w-full"})}),u.label]},u.code))})]})}function Ab(){const[e,t]=g.useState(!1),[n,r]=g.useState(!1),[s,i]=g.useState(!1),{user:o}=Hs(),{phone:a,whatsapp:u,logo_dark_path:c,has_downloads:d}=ht(),f=_c(),{t:h}=Ce(),x=!f("page.vehicles"),w=!f("page.services"),y=!f("page.gallery"),k=d&&!f("page.downloads"),p=3+[x,w,y,k,a,u].filter(Boolean).length,v=rt().pathname==="/",[b,P]=g.useState(!v);g.useEffect(()=>{if(!v){P(!0);return}const H=()=>P(window.scrollY>24);return H(),window.addEventListener("scroll",H,{passive:!0}),()=>window.removeEventListener("scroll",H)},[v]);const T=v&&!b;g.useEffect(()=>{if(e){r(!0);let N;const D=requestAnimationFrame(()=>{N=requestAnimationFrame(()=>i(!0))});return()=>{cancelAnimationFrame(D),N&&cancelAnimationFrame(N)}}i(!1);const H=Nb+(p-1)*Vf,te=setTimeout(()=>r(!1),H);return()=>clearTimeout(te)},[e,p]);const S=()=>`transition-all duration-500 ease-out ${s?"opacity-100":"opacity-0"}`,j=H=>({transitionDelay:`${(s?H:p-1-H)*Vf}ms`,transform:s?"translateY(0)":"translateY(-140px)"}),L=o&&l.jsx(W,{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:l.jsx(zk,{className:"h-5 w-5"})});let _=0;const F=()=>j(_++);return l.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:[l.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:[l.jsx("div",{className:"flex items-center justify-self-start",children:l.jsx("button",{onClick:()=>t(!0),"aria-label":h("nav.openMenu"),className:`rounded-md p-2 transition ${T?"text-white hover:bg-white/10":"text-neutral-300 hover:bg-neutral-800"}`,children:l.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:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h16"})})})}),l.jsx(W,{to:"/",className:"flex items-center justify-self-center rounded-lg px-2 py-1",children:l.jsx("img",{src:c||tu,alt:"HifiPlanet",className:"h-14 w-auto sm:h-16"})}),l.jsxs("div",{className:"flex items-center justify-self-end gap-1",children:[L,!e&&l.jsx(Lb,{overHero:T}),l.jsx(t0,{overHero:T,forceDark:!0})]})]}),n&&Go.createPortal(l.jsx("div",{className:"fixed inset-0 z-[100] overflow-y-auto text-left backdrop-blur-xl",style:{background:"linear-gradient(135deg, rgba(241,245,249,0.55) 0%, rgba(227,240,207,0.55) 50%, rgba(248,250,252,0.55) 100%)"},children:l.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:[l.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:[l.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:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6l12 12M18 6 6 18"})}),l.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide",children:h("nav.close")})]}),x&&l.jsx(W,{to:"/fahrzeuge",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${S()}`,style:F(),children:h("nav.vehicles")}),w&&l.jsx(W,{to:"/leistungen",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${S()}`,style:F(),children:h("nav.services")}),y&&l.jsx(W,{to:"/galerie",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${S()}`,style:F(),children:h("nav.gallery")}),l.jsx(W,{to:"/kontakt",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${S()}`,style:F(),children:h("nav.contact")}),k&&l.jsx(W,{to:"/downloads",onClick:()=>t(!1),className:`text-3xl font-extrabold tracking-tight text-neutral-900 hover:text-brand-600 ${S()}`,style:F(),children:h("nav.downloads")}),l.jsx("div",{className:`h-px w-16 bg-brand-500/60 ${S()}`,style:F()}),a&&l.jsxs("a",{href:`tel:${If(a)}`,className:`flex items-center gap-2 text-sm font-semibold uppercase tracking-wide text-neutral-600 hover:text-brand-600 ${S()}`,style:F(),children:[l.jsx(xo,{className:"h-4 w-4"}),a]}),u&&l.jsxs("a",{href:`https://wa.me/${If(u).replace(/^0/,"49").replace("+","")}`,target:"_blank",rel:"noopener noreferrer",className:`flex items-center gap-2 text-sm font-semibold uppercase tracking-wide text-neutral-600 hover:text-brand-600 ${S()}`,style:F(),children:[l.jsx(qk,{className:"h-4 w-4"}),h("nav.whatsapp")]}),l.jsxs("a",{href:Eb,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 ${S()}`,style:F(),children:[l.jsx(db,{className:"h-4 w-4"}),h("nav.shop")]})]})}),document.body)]})}const Of="hifiplanet-cookie-consent",r0={necessary:!0,external:!1,analytics:!1},s0=g.createContext({consent:r0,decided:!1,settingsOpen:!1,acceptAll:()=>{},rejectNonEssential:()=>{},saveCustom:()=>{},openSettings:()=>{},closeSettings:()=>{}});function Db({children:e}){const[t,n]=g.useState(r0),[r,s]=g.useState(!1),[i,o]=g.useState(!1);g.useEffect(()=>{try{const x=localStorage.getItem(Of);if(x){const w=JSON.parse(x);n({necessary:!0,external:!!w.external,analytics:!!w.analytics}),s(!0)}}catch{}},[]);const a=g.useCallback(x=>{n(x),s(!0),o(!1),localStorage.setItem(Of,JSON.stringify({...x,decidedAt:new Date().toISOString()}))},[]),u=g.useCallback(()=>a({necessary:!0,external:!0,analytics:!0}),[a]),c=g.useCallback(()=>a({necessary:!0,external:!1,analytics:!1}),[a]),d=g.useCallback(x=>a({necessary:!0,external:!!x.external,analytics:!!x.analytics}),[a]),f=g.useCallback(()=>o(!0),[]),h=g.useCallback(()=>o(!1),[]);return l.jsx(s0.Provider,{value:{consent:t,decided:r,settingsOpen:i,acceptAll:u,rejectNonEssential:c,saveCustom:d,openSettings:f,closeSettings:h},children:e})}function Ar(){return g.useContext(s0)}const Rb=["mon","tue","wed","thu","fri","sat","sun"],Ib=["sun","mon","tue","wed","thu","fri","sat"],La={mon:"Mo",tue:"Di",wed:"Mi",thu:"Do",fri:"Fr",sat:"Sa",sun:"So"};function Vb(e){const t=new Date,n=e==null?void 0:e[Ib[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,a]=n.close.split(":").map(Number);return r>=s*60+i&&r{const s=Ob(e==null?void 0:e[r])||t,i=n[n.length-1];i&&i.label===s?i.days=`${i.firstLabel}-${La[r]}`:n.push({key:r,days:La[r],firstLabel:La[r],label:s})}),n}const Fb=e=>(e||"").replace(/[^\d+]/g,"");function zb(){const{phone:e,contact_email:t,address_street:n,address_zip:r,address_city:s,business_hours:i,has_downloads:o}=ht(),a=_c(),u=o&&!a("page.downloads"),c=Vb(i),{openSettings:d}=Ar(),{pathname:f}=rt(),h=f==="/",{t:x}=Ce(),w=[n,[r,s].filter(Boolean).join(" ")].filter(Boolean).join(", "),y=`https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent(w)}`,k=i0(i,x("footer.closed"));return l.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:[l.jsxs("div",{className:"mx-auto grid max-w-6xl gap-4 px-4 sm:grid-cols-3 sm:px-6",children:[l.jsxs("div",{className:"rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[l.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[l.jsx(Zg,{className:"h-4 w-4 text-brand-500"}),l.jsx("p",{className:"font-semibold text-neutral-900 dark:text-white",children:"HifiPlanet"})]}),n&&l.jsx("p",{children:n}),(r||s)&&l.jsx("p",{children:[r,s].filter(Boolean).join(" ")}),l.jsxs("a",{href:y,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:[l.jsx(nb,{className:"h-3.5 w-3.5"}),x("footer.routePlan")]})]}),l.jsxs("div",{className:"rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[l.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[l.jsx(xo,{className:"h-4 w-4 text-brand-500"}),l.jsx("p",{className:"font-semibold text-neutral-900 dark:text-white",children:x("footer.contactHeading")})]}),l.jsx("p",{children:l.jsx("a",{href:`tel:${Fb(e)}`,className:"inline-block py-1 hover:text-brand-500",children:e})}),l.jsx("p",{children:l.jsx("a",{href:`mailto:${t}`,className:"inline-block py-1 hover:text-brand-500",children:t})}),l.jsx(W,{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:x("footer.contactForm")})]}),l.jsxs("div",{className:"rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:[l.jsxs("div",{className:"mb-3 flex items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Qg,{className:"h-4 w-4 text-brand-500"}),l.jsx("p",{className:"font-semibold text-neutral-900 dark:text-white",children:x("footer.hoursHeading")})]}),l.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:[l.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${c?"bg-green-500":"bg-neutral-400"}`}),x(c?"footer.open":"footer.closed")]})]}),l.jsx("dl",{className:"space-y-1.5",children:k.map(p=>l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsx("dt",{className:"text-neutral-500 dark:text-neutral-400",children:p.days}),l.jsx("dd",{className:"font-medium text-neutral-700 dark:text-neutral-200",children:p.label})]},p.key))})]})]}),l.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:l.jsxs("p",{className:"flex flex-wrap items-center justify-center gap-x-2 gap-y-1",children:[l.jsx("span",{children:x("footer.copyright")(new Date().getFullYear())}),l.jsx("span",{children:"·"}),l.jsx(W,{to:"/impressum",className:"hover:text-brand-500",children:x("footer.imprint")}),l.jsx("span",{children:"·"}),l.jsx(W,{to:"/datenschutz",className:"hover:text-brand-500",children:x("footer.privacy")}),l.jsx("span",{children:"·"}),l.jsx(W,{to:"/agb",className:"hover:text-brand-500",children:x("footer.terms")}),l.jsx("span",{children:"·"}),u&&l.jsxs(l.Fragment,{children:[l.jsx(W,{to:"/downloads",className:"hover:text-brand-500",children:x("footer.downloads")}),l.jsx("span",{children:"·"})]}),l.jsx("button",{type:"button",onClick:d,className:"hover:text-brand-500",children:x("footer.cookieSettings")})]})})]})}const Mc=g.createContext({});function xn(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const Bb=typeof window<"u",Ws=Bb?g.useLayoutEffect:g.useEffect,Qo=g.createContext(null);function Lc(e,t){e.indexOf(t)===-1&&e.push(t)}function vo(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Pt=(e,t,n)=>n>t?t:n{};const vn={},o0=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),a0=e=>typeof e=="object"&&e!==null,l0=e=>/^0[^.\s]+$/u.test(e);function u0(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ye=e=>e,Us=(...e)=>e.reduce((t,n)=>r=>n(t(r))),Pr=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class Dc{constructor(){this.subscriptions=[]}add(t){return Lc(this.subscriptions,t),()=>vo(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,lt=e=>e/1e3,Rc=(e,t)=>t?e*(1e3/t):0,c0=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,$b=1e-7,Hb=12;function Wb(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=c0(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>$b&&++aWb(i,0,1,e,n);return i=>i===0||i===1?i:c0(s(i),t,r)}const d0=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,f0=e=>t=>1-e(1-t),h0=Gs(.33,1.53,.69,.99),Ic=f0(h0),m0=d0(Ic),p0=e=>e>=1?1:(e*=2)<1?.5*Ic(e):.5*(2-Math.pow(2,-10*(e-1))),Vc=e=>1-Math.sin(Math.acos(e)),g0=f0(Vc),y0=d0(Vc),Ub=Gs(.42,0,1,1),Gb=Gs(0,0,.58,1),x0=Gs(.42,0,.58,1),Kb=e=>Array.isArray(e)&&typeof e[0]!="number",v0=e=>Array.isArray(e)&&typeof e[0]=="number",Xb={linear:Ye,easeIn:Ub,easeInOut:x0,easeOut:Gb,circIn:Vc,circInOut:y0,circOut:g0,backIn:Ic,backInOut:m0,backOut:h0,anticipate:p0},Yb=e=>typeof e=="string",Ff=e=>{if(v0(e)){Ac(e.length===4);const[t,n,r,s]=e;return Gs(t,n,r,s)}else if(Yb(e))return Xb[e];return e},gi=["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 a(c){i.has(c)&&(u.schedule(c),e()),c(o)}const u={schedule:(c,d=!1,f=!1)=>{const x=f&&r?t:n;return d&&i.add(c),x.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(a),t.clear(),r=!1,s&&(s=!1,u.process(c))}};return u}const Qb=40;function w0(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=gi.reduce((v,b)=>(v[b]=qb(i),v),{}),{setup:a,read:u,resolveKeyframes:c,preUpdate:d,update:f,preRender:h,render:x,postRender:w}=o,y=()=>{const v=vn.useManualTiming,b=v?s.timestamp:performance.now();n=!1,v||(s.delta=r?1e3/60:Math.max(Math.min(b-s.timestamp,Qb),1)),s.timestamp=b,s.isProcessing=!0,a.process(s),u.process(s),c.process(s),d.process(s),f.process(s),h.process(s),x.process(s),w.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(y))},k=()=>{n=!0,r=!0,s.isProcessing||e(y)};return{schedule:gi.reduce((v,b)=>{const P=o[b];return v[b]=(T,S=!1,j=!1)=>(n||k(),P.schedule(T,S,j)),v},{}),cancel:v=>{for(let b=0;b(Vi===void 0&&Fe.set(Se.isProcessing||vn.useManualTiming?Se.timestamp:performance.now()),Vi),set:e=>{Vi=e,queueMicrotask(Zb)}},k0=e=>t=>typeof t=="string"&&t.startsWith(e),b0=k0("--"),Jb=k0("var(--"),Oc=e=>Jb(e)?e2.test(e.split("/*")[0].trim()):!1,e2=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function zf(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Dr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},As={...Dr,transform:e=>Pt(0,1,e)},yi={...Dr,default:1},ls=e=>Math.round(e*1e5)/1e5,Fc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function t2(e){return e==null}const n2=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,zc=(e,t)=>n=>!!(typeof n=="string"&&n2.test(n)&&n.startsWith(e)||t&&!t2(n)&&Object.prototype.hasOwnProperty.call(n,t)),S0=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(Fc);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},r2=e=>Pt(0,255,e),Da={...Dr,transform:e=>Math.round(r2(e))},Mn={test:zc("rgb","red"),parse:S0("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Da.transform(e)+", "+Da.transform(t)+", "+Da.transform(n)+", "+ls(As.transform(r))+")"};function s2(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 nu={test:zc("#"),parse:s2,transform:Mn.transform},Ks=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),It=Ks("deg"),At=Ks("%"),V=Ks("px"),i2=Ks("vh"),o2=Ks("vw"),Bf={...At,parse:e=>At.parse(e)/100,transform:e=>At.transform(e*100)},or={test:zc("hsl","hue"),parse:S0("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+At.transform(ls(t))+", "+At.transform(ls(n))+", "+ls(As.transform(r))+")"},ge={test:e=>Mn.test(e)||nu.test(e)||or.test(e),parse:e=>Mn.test(e)?Mn.parse(e):or.test(e)?or.parse(e):nu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Mn.transform(e):or.transform(e),getAnimatableNone:e=>{const t=ge.parse(e);return t.alpha=0,ge.transform(t)}},a2=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function l2(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Fc))==null?void 0:t.length)||0)+(((n=e.match(a2))==null?void 0:n.length)||0)>0}const j0="number",P0="color",u2="var",c2="var(",$f="${}",d2=/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 Cr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(d2,u=>(ge.test(u)?(r.color.push(i),s.push(P0),n.push(ge.parse(u))):u.startsWith(c2)?(r.var.push(i),s.push(u2),n.push(u)):(r.number.push(i),s.push(j0),n.push(parseFloat(u))),++i,$f)).split($f);return{values:n,split:a,indexes:r,types:s}}function f2(e){return Cr(e).values}function C0({split:e,types:t}){const n=e.length;return r=>{let s="";for(let i=0;itypeof e=="number"?0:ge.test(e)?ge.getAnimatableNone(e):e,p2=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:m2(e);function g2(e){const t=Cr(e);return C0(t)(t.values.map((r,s)=>p2(r,t.split[s])))}const St={test:l2,parse:f2,createTransformer:h2,getAnimatableNone:g2};function Ra(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 y2({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,u=2*n-a;s=Ra(u,a,e+1/3),i=Ra(u,a,e),o=Ra(u,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function wo(e,t){return n=>n>0?t:e}const ne=(e,t,n)=>e+(t-e)*n,Ia=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},x2=[nu,Mn,or],v2=e=>x2.find(t=>t.test(e));function Hf(e){const t=v2(e);if(!t)return!1;let n=t.parse(e);return t===or&&(n=y2(n)),n}const Wf=(e,t)=>{const n=Hf(e),r=Hf(t);if(!n||!r)return wo(e,t);const s={...n};return i=>(s.red=Ia(n.red,r.red,i),s.green=Ia(n.green,r.green,i),s.blue=Ia(n.blue,r.blue,i),s.alpha=ne(n.alpha,r.alpha,i),Mn.transform(s))},ru=new Set(["none","hidden"]);function w2(e,t){return ru.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function k2(e,t){return n=>ne(e,t,n)}function Bc(e){return typeof e=="number"?k2:typeof e=="string"?Oc(e)?wo:ge.test(e)?Wf:j2:Array.isArray(e)?T0:typeof e=="object"?ge.test(e)?Wf:b2:wo}function T0(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>Bc(i)(i,t[o]));return i=>{for(let o=0;o{for(const i in r)n[i]=r[i](s);return n}}function S2(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s{const n=St.createTransformer(t),r=Cr(e),s=Cr(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?ru.has(e)&&!s.values.length||ru.has(t)&&!r.values.length?w2(e,t):Us(T0(S2(r,s),s.values),n):wo(e,t)};function E0(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ne(e,t,n):Bc(e)(e,t)}const P2=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>X.update(t,n),stop:()=>ft(t),now:()=>Se.isProcessing?Se.timestamp:Fe.now()}},N0=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i=ko?1/0:t}function C2(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min($c(r),ko);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:lt(s)}}const fe={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 su(e,t){return e*Math.sqrt(1-t*t)}const T2=12;function E2(e,t,n){let r=n;for(let s=1;s{const d=c*o,f=d*e,h=d-n,x=su(c,o),w=Math.exp(-f);return Va-h/x*w},i=c=>{const f=c*o*e,h=f*n+n,x=Math.pow(o,2)*Math.pow(c,2)*e,w=Math.exp(-f),y=su(Math.pow(c,2),o);return(-s(c)+Va>0?-1:1)*((h-x)*w)/y}):(s=c=>{const d=Math.exp(-c*e),f=(c-n)*e+1;return-Va+d*f},i=c=>{const d=Math.exp(-c*e),f=(n-c)*(e*e);return d*f});const a=5/e,u=E2(s,i,a);if(e=Je(e),isNaN(u))return{stiffness:fe.stiffness,damping:fe.damping,duration:e};{const c=Math.pow(u,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const _2=["duration","bounce"],M2=["stiffness","damping","mass"];function Uf(e,t){return t.some(n=>e[n]!==void 0)}function L2(e){let t={velocity:fe.velocity,stiffness:fe.stiffness,damping:fe.damping,mass:fe.mass,isResolvedFromDuration:!1,...e};if(!Uf(e,M2)&&Uf(e,_2))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*Pt(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:fe.mass,stiffness:s,damping:i}}else{const n=N2({...e,velocity:0});t={...t,...n,mass:fe.mass},t.isResolvedFromDuration=!0}return t}function bo(e=fe.visualDuration,t=fe.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:u,damping:c,mass:d,duration:f,velocity:h,isResolvedFromDuration:x}=L2({...n,velocity:-lt(n.velocity||0)}),w=h||0,y=c/(2*Math.sqrt(u*d)),k=o-i,p=lt(Math.sqrt(u/d)),m=Math.abs(k)<5;r||(r=m?fe.restSpeed.granular:fe.restSpeed.default),s||(s=m?fe.restDelta.granular:fe.restDelta.default);let v,b,P,T,S,j;if(y<1)P=su(p,y),T=(w+y*p*k)/P,v=_=>{const F=Math.exp(-y*p*_);return o-F*(T*Math.sin(P*_)+k*Math.cos(P*_))},S=y*p*T+k*P,j=y*p*k-T*P,b=_=>Math.exp(-y*p*_)*(S*Math.sin(P*_)+j*Math.cos(P*_));else if(y===1){v=F=>o-Math.exp(-p*F)*(k+(w+p*k)*F);const _=w+p*k;b=F=>Math.exp(-p*F)*(p*_*F-w)}else{const _=p*Math.sqrt(y*y-1);v=N=>{const D=Math.exp(-y*p*N),$=Math.min(_*N,300);return o-D*((w+y*p*k)*Math.sinh($)+_*k*Math.cosh($))/_};const F=(w+y*p*k)/_,H=y*p*F-k*_,te=y*p*k-F*_;b=N=>{const D=Math.exp(-y*p*N),$=Math.min(_*N,300);return D*(H*Math.sinh($)+te*Math.cosh($))}}const L={calculatedDuration:x&&f||null,velocity:_=>Je(b(_)),next:_=>{if(!x&&y<1){const H=Math.exp(-y*p*_),te=Math.sin(P*_),N=Math.cos(P*_),D=o-H*(T*te+k*N),$=Je(H*(S*te+j*N));return a.done=Math.abs($)<=r&&Math.abs(o-D)<=s,a.value=a.done?o:D,a}const F=v(_);if(x)a.done=_>=f;else{const H=Je(b(_));a.done=Math.abs(H)<=r&&Math.abs(o-F)<=s}return a.value=a.done?o:F,a},toString:()=>{const _=Math.min($c(L),ko),F=N0(H=>L.next(_*H).value,_,30);return _+"ms "+F},toTransition:()=>{}};return L}bo.applyToOptions=e=>{const t=C2(e,100,bo);return e.ease=t.ease,e.duration=Je(t.duration),e.type="keyframes",e};const A2=5;function _0(e,t,n){const r=Math.max(t-A2,0);return Rc(n-e(r),t-r)}function iu({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:u,restDelta:c=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},x=j=>a!==void 0&&ju,w=j=>a===void 0?u:u===void 0||Math.abs(a-j)-y*Math.exp(-j/r),v=j=>p+m(j),b=j=>{const L=m(j),_=v(j);h.done=Math.abs(L)<=c,h.value=h.done?p:_};let P,T;const S=j=>{x(h.value)&&(P=j,T=bo({keyframes:[h.value,w(h.value)],velocity:_0(v,j,h.value),damping:s,stiffness:i,restDelta:c,restSpeed:d}))};return S(0),{calculatedDuration:null,next:j=>{let L=!1;return!T&&P===void 0&&(L=!0,b(j),S(j)),P!==void 0&&j>=P?T.next(j-P):(!L&&b(j),h)}}}function D2(e,t,n){const r=[],s=n||vn.mix||E0,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 a=D2(t,r,s),u=a.length,c=d=>{if(o&&d1)for(;fc(Pt(e[0],e[i-1],d)):c}function R2(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Pr(0,t,r);e.push(ne(n,1,s))}}function M0(e){const t=[0];return R2(t,e.length-1),t}function I2(e,t){return e.map(n=>n*t)}function V2(e,t){return e.map(()=>t||x0).splice(0,e.length-1)}function us({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=Kb(r)?r.map(Ff):Ff(r),i={done:!1,value:t[0]},o=I2(n&&n.length===t.length?n:M0(t),e),a=Hc(o,t,{ease:Array.isArray(s)?s:V2(t,s)});return{calculatedDuration:e,next:u=>(i.value=a(u),i.done=u>=e,i)}}const O2=e=>e!==null;function Zo(e,{repeat:t,repeatType:n="loop"},r,s=1){const i=e.filter(O2),a=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const F2={decay:iu,inertia:iu,tween:us,keyframes:us,spring:bo};function L0(e){typeof e.type=="string"&&(e.type=F2[e.type])}class Wc{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 z2=e=>e/100;class Ds extends Wc{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!==Fe.now()&&this.tick(Fe.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;L0(t);const{type:n=us,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=t;let{keyframes:a}=t;const u=n||us;u!==us&&typeof a[0]!="number"&&(this.mixKeyframes=Us(z2,E0(a[0],a[1])),a=[0,100]);const c=u({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=$c(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:a,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:d,repeat:f,repeatType:h,repeatDelay:x,type:w,onUpdate:y,finalKeyframe:k}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const p=this.currentTime-c*(this.playbackSpeed>=0?1:-1),m=this.playbackSpeed>=0?p<0:p>s;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let v=this.currentTime,b=r;if(f){const j=Math.min(this.currentTime,s)/a;let L=Math.floor(j),_=j%1;!_&&j>=1&&(_=1),_===1&&L--,L=Math.min(L,f+1),!!(L%2)&&(h==="reverse"?(_=1-_,x&&(_-=x/a)):h==="mirror"&&(b=o)),v=Pt(0,1,_)*a}let P;m?(this.delayState.value=d[0],P=this.delayState):P=b.next(v),i&&!m&&(P.value=i(P.value));let{done:T}=P;!m&&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&&w!==iu&&(P.value=Zo(d,this.options,k,this.speed)),y&&y(P.value),S&&this.finish(),P}then(t,n){return this.finished.then(t,n)}get duration(){return lt(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+lt(t)}get time(){return lt(this.currentTime)}set time(t){t=Je(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 _0(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(Fe.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=lt(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:t=P2,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(Fe.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 B2(e){for(let t=1;te*180/Math.PI,ou=e=>{const t=Ln(Math.atan2(e[1],e[0]));return au(t)},$2={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ou,rotateZ:ou,skewX:e=>Ln(Math.atan(e[1])),skewY:e=>Ln(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},au=e=>(e=e%360,e<0&&(e+=360),e),Gf=ou,Kf=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Xf=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),H2={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Kf,scaleY:Xf,scale:e=>(Kf(e)+Xf(e))/2,rotateX:e=>au(Ln(Math.atan2(e[6],e[5]))),rotateY:e=>au(Ln(Math.atan2(-e[2],e[0]))),rotateZ:Gf,rotate:Gf,skewX:e=>Ln(Math.atan(e[4])),skewY:e=>Ln(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function lu(e){return e.includes("scale")?1:0}function uu(e,t){if(!e||e==="none")return lu(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=H2,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=$2,s=a}if(!s)return lu(t);const i=r[t],o=s[1].split(",").map(U2);return typeof i=="function"?i(o):o[i]}const W2=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return uu(n,t)};function U2(e){return parseFloat(e.trim())}const Rr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ir=new Set([...Rr,"pathRotation"]),Yf=e=>e===Dr||e===V,G2=new Set(["x","y","z"]),K2=Rr.filter(e=>!G2.has(e));function X2(e){const t=[];return K2.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const on={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})=>uu(t,"x"),y:(e,{transform:t})=>uu(t,"y")};on.translateX=on.x;on.translateY=on.y;const Rn=new Set;let cu=!1,du=!1,fu=!1;function A0(){if(du){const e=Array.from(Rn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=X2(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}du=!1,cu=!1,Rn.forEach(e=>e.complete(fu)),Rn.clear()}function D0(){Rn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(du=!0)})}function Y2(){fu=!0,D0(),A0(),fu=!1}class Uc{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?(Rn.add(this),cu||(cu=!0,X.read(D0),X.resolveKeyframes(A0))):(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 a=r.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),s&&i===void 0&&s.set(t[0])}B2(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Rn.delete(this)}cancel(){this.state==="scheduled"&&(Rn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const q2=e=>e.startsWith("--");function R0(e,t,n){q2(t)?e.style.setProperty(t,n):e.style[t]=n}const Q2={};function Gc(e,t){const n=u0(e);return()=>Q2[t]??n()}const Kc=Gc(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),I0=Gc(()=>window.ViewTimeline!==void 0,"viewTimeline"),V0=Gc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Qr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,qf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Qr([0,.65,.55,1]),circOut:Qr([.55,0,1,.45]),backIn:Qr([.31,.01,.66,-.59]),backOut:Qr([.33,1.53,.69,.99])};function O0(e,t){if(e)return typeof e=="function"?V0()?N0(e,t):"ease-out":v0(e)?Qr(e):Array.isArray(e)?e.map(n=>O0(n,t)||qf.easeOut):qf[e]}function Z2(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:u}={},c=void 0){const d={[t]:n};u&&(d.offset=u);const f=O0(a,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 F0(e){return typeof e=="function"&&"applyToOptions"in e}function J2({type:e,...t}){return F0(e)&&V0()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class z0 extends Wc{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:a,onComplete:u}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,Ac(typeof t.type!="string");const c=J2(t);this.animation=Z2(n,r,s,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=Zo(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(d),R0(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 lt(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+lt(t)}get time(){return lt(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Je(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&&Kc()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),Ye):s(this)}}const B0={anticipate:p0,backInOut:m0,circInOut:y0};function eS(e){return e in B0}function tS(e){typeof e.ease=="string"&&eS(e.ease)&&(e.ease=B0[e.ease])}const Oa=10;class nS extends z0{constructor(t){tS(t),L0(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 a=new Ds({...o,autoplay:!1}),u=Math.max(Oa,Fe.now()-this.startTime),c=Pt(0,Oa,u-Oa),d=a.sample(u).value,{name:f}=this.options;i&&f&&R0(i,f,d),n.setWithVelocity(a.sample(Math.max(0,u-c)).value,d,c),a.stop()}}const Qf=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(St.test(e)||e==="0")&&!e.startsWith("url("));function rS(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nObject.hasOwnProperty.call(Element.prototype,"animate"));function uS(e){var f;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:i,type:o,keyframes:a}=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 lS()&&n&&($0.has(n)||aS.has(n)&&oS(a))&&(n!=="transform"||!d)&&!c&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const cS=40;class dS extends Wc{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:u,motionValue:c,element:d,...f}){var w;super(),this.stop=()=>{var y,k;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(k=this.keyframeResolver)==null||k.cancel()},this.createdAt=Fe.now();const h={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:u,motionValue:c,element:d,...f},x=(d==null?void 0:d.KeyframeResolver)||Uc;this.keyframeResolver=new x(a,(y,k,p)=>this.onKeyframesResolved(y,k,h,!p),u,c,d),(w=this.keyframeResolver)==null||w.scheduleResolve()}onKeyframesResolved(t,n,r,s){var p,m;this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:u,isHandoff:c,onUpdate:d}=r;this.resolvedAt=Fe.now();let f=!0;sS(t,i,o,a)||(f=!1,(vn.instantAnimations||!u)&&(d==null||d(Zo(t,r,n))),t[0]=t[t.length-1],hu(r),r.repeat=0);const x={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>cS?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},w=f&&!c&&uS(x),y=(m=(p=x.motionValue)==null?void 0:p.owner)==null?void 0:m.current;let k;if(w)try{k=new nS({...x,element:y})}catch{k=new Ds(x)}else k=new Ds(x);k.finished.then(()=>{this.notifyFinished()}).catch(Ye),this.pendingTimeline&&(this.stopTimeline=k.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=k}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Y2()),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 H0(e,t,n,r=0,s=1){const i=Array.from(e).sort((c,d)=>c.sortNodePosition(d)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:a-i*r}const Zf=30,fS=e=>!isNaN(parseFloat(e)),cs={current:void 0};class hS{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=Fe.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=Fe.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=fS(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 Dc);const r=this.events[t].add(n);return t==="change"?()=>{r(),X.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 cs.current&&cs.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Fe.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Zf)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Zf);return Rc(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 wt(e,t){return new hS(e,t)}function W0(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Xc(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?W0(n,e):n}const mS={type:"spring",stiffness:500,damping:25,restSpeed:10},pS=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),gS={type:"keyframes",duration:.8},yS={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},xS=(e,{keyframes:t})=>t.length>2?gS:Ir.has(e)?e.startsWith("scale")?pS(t[1]):mS:yS,vS=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function wS(e){for(const t in e)if(!vS.has(t))return!0;return!1}const Yc=(e,t,n,r={},s,i)=>o=>{const a=Xc(r,e)||{},u=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Je(u);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};wS(a)||Object.assign(d,xS(e,d)),d.duration&&(d.duration=Je(d.duration)),d.repeatDelay&&(d.repeatDelay=Je(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(hu(d),d.delay===0&&(f=!0)),(vn.instantAnimations||vn.skipAnimations||s!=null&&s.shouldSkipAnimations||a.skipAnimations)&&(f=!0,hu(d),d.delay=0),d.allowFlatten=!a.type&&!a.ease,f&&!i&&t.get()!==void 0){const h=Zo(d.keyframes,a);if(h!==void 0){X.update(()=>{d.onUpdate(h),d.onComplete()});return}}return a.isSync?new Ds(d):new dS(d)},kS=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function bS(e){const t=kS.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function U0(e,t,n=1){const[r,s]=bS(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return o0(o)?parseFloat(o):o}return Oc(s)?U0(s,t,n+1):s}function Jf(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function qc(e,t,n,r){if(typeof t=="function"){const[s,i]=Jf(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]=Jf(r);t=t(n!==void 0?n:e.custom,s,i)}return t}function In(e,t,n){const r=e.getProps();return qc(r,t,n!==void 0?n:r.custom,e)}const G0=new Set(["width","height","top","left","right","bottom",...Rr]),mu=e=>Array.isArray(e);function SS(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,wt(n))}function jS(e){return mu(e)?e[e.length-1]||0:e}function PS(e,t){const n=In(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=jS(i[o]);SS(e,o,a)}}const ke=e=>!!(e&&e.getVelocity);function CS(e){return!!(ke(e)&&e.add)}function pu(e,t){const n=e.getValue("willChange");if(CS(n))return n.add(t);if(!n&&vn.WillChange){const r=new vn.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Qc(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const TS="framerAppearId",K0="data-"+Qc(TS);function X0(e){return e.props[K0]}function ES({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Y0(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:o,...a}=t;const u=e.getDefaultTransition();i=i?W0(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],x=i==null?void 0:i.path;x&&x.animateVisualElement(e,a,i,n,f);for(const w in a){const y=e.getValue(w,e.latestValues[w]??null),k=a[w];if(k===void 0||h&&ES(h,w))continue;const p={delay:n,...Xc(i||{},w)};d&&(p.skipAnimations=!0);const m=y.get();if(m!==void 0&&!y.isAnimating()&&!Array.isArray(k)&&k===m&&!p.velocity){X.update(()=>y.set(k));continue}let v=!1;if(window.MotionHandoffAnimation){const T=X0(e);if(T){const S=window.MotionHandoffAnimation(T,w,X);S!==null&&(p.startTime=S,v=!0)}}pu(e,w);const b=c??e.shouldReduceMotion;y.start(Yc(w,y,k,b&&G0.has(w)?{type:!1}:p,e,v));const P=y.animation;P&&f.push(P)}if(o){const w=()=>X.update(()=>{o&&PS(e,o)});f.length?Promise.all(f).then(w):w()}return f}function gu(e,t,n={}){var u;const r=In(e,t,n.type==="exit"?(u=e.presenceContext)==null?void 0:u.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(Y0(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=s;return NS(e,t,c,d,f,h,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,d]=a==="beforeChildren"?[i,o]:[o,i];return c().then(()=>d())}else return Promise.all([i(),o(n.delay)])}function NS(e,t,n=0,r=0,s=0,i=1,o){const a=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),a.push(gu(u,t,{...o,delay:n+(typeof r=="function"?0:r)+H0(e.variantChildren,u,r,s,i)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(a)}function _S(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>gu(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=gu(e,t,n);else{const s=typeof t=="function"?In(e,t,n.custom):t;r=Promise.all(Y0(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const MS={test:e=>e==="auto",parse:e=>e},q0=e=>t=>t.test(e),Q0=[Dr,V,At,It,o2,i2,MS],eh=e=>Q0.find(q0(e));function LS(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||l0(e):!0}const AS=new Set(["brightness","contrast","saturate","opacity"]);function DS(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Fc)||[];if(!r)return e;const s=n.replace(r,"");let i=AS.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const RS=/\b([a-z-]*)\(.*?\)/gu,yu={...St,getAnimatableNone:e=>{const t=e.match(RS);return t?t.map(DS).join(" "):e}},xu={...St,getAnimatableNone:e=>{const t=St.parse(e);return St.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},th={...Dr,transform:Math.round},IS={rotate:It,pathRotation:It,rotateX:It,rotateY:It,rotateZ:It,scale:yi,scaleX:yi,scaleY:yi,scaleZ:yi,skew:It,skewX:It,skewY:It,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:As,originX:Bf,originY:Bf,originZ:V},So={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,top:V,right:V,bottom:V,left:V,inset:V,insetBlock:V,insetBlockStart:V,insetBlockEnd:V,insetInline:V,insetInlineStart:V,insetInlineEnd:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,paddingBlock:V,paddingBlockStart:V,paddingBlockEnd:V,paddingInline:V,paddingInlineStart:V,paddingInlineEnd:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,marginBlock:V,marginBlockStart:V,marginBlockEnd:V,marginInline:V,marginInlineStart:V,marginInlineEnd:V,fontSize:V,backgroundPositionX:V,backgroundPositionY:V,...IS,zIndex:th,fillOpacity:As,strokeOpacity:As,numOctaves:th},VS={...So,color:ge,backgroundColor:ge,outlineColor:ge,fill:ge,stroke:ge,borderColor:ge,borderTopColor:ge,borderRightColor:ge,borderBottomColor:ge,borderLeftColor:ge,filter:yu,WebkitFilter:yu,mask:xu,WebkitMask:xu},Z0=e=>VS[e],OS=new Set([yu,xu]);function J0(e,t){let n=Z0(e);return OS.has(n)||(n=St),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const FS=new Set(["auto","none","0"]);function zS(e,t,n){let r=0,s;for(;r{t.getValue(u).set(c)}),this.resolveNoneKeyframes()}}const Zc=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function ey(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 vu=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ds(e){return a0(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Tr,cancel:ty}=w0(queueMicrotask,!1),gt={x:!1,y:!1};function ny(){return gt.x||gt.y}function $S(e){return e==="x"||e==="y"?gt[e]?null:(gt[e]=!0,()=>{gt[e]=!1}):gt.x||gt.y?null:(gt.x=gt.y=!0,()=>{gt.x=gt.y=!1})}function ry(e,t){const n=ey(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function HS(e){return!(e.pointerType==="touch"||ny())}function WS(e,t,n={}){const[r,s,i]=ry(e,n);return r.forEach(o=>{let a=!1,u=!1,c;const d=()=>{o.removeEventListener("pointerleave",w)},f=k=>{c&&(c(k),c=void 0),d()},h=k=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),u&&(u=!1,f(k))},x=()=>{a=!0,window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",h,s)},w=k=>{if(k.pointerType!=="touch"){if(a){u=!0;return}f(k)}},y=k=>{if(!HS(k))return;u=!1;const p=t(o,k);typeof p=="function"&&(c=p,o.addEventListener("pointerleave",w,s))};o.addEventListener("pointerenter",y,s),o.addEventListener("pointerdown",x,s)}),i}const sy=(e,t)=>t?e===t?!0:sy(e,t.parentElement):!1,Jc=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,US=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function GS(e){return US.has(e.tagName)||e.isContentEditable===!0}const KS=new Set(["INPUT","SELECT","TEXTAREA"]);function XS(e){return KS.has(e.tagName)||e.isContentEditable===!0}const Oi=new WeakSet;function nh(e){return t=>{t.key==="Enter"&&e(t)}}function Fa(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const YS=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=nh(()=>{if(Oi.has(n))return;Fa(n,"down");const s=nh(()=>{Fa(n,"up")}),i=()=>Fa(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 rh(e){return Jc(e)&&!ny()}const sh=new WeakSet;function qS(e,t,n={}){const[r,s,i]=ry(e,n),o=a=>{const u=a.currentTarget;if(!rh(a)||sh.has(a))return;Oi.add(u),n.stopPropagation&&sh.add(a);const c=t(u,a),d={...s,capture:!0},f=(w,y)=>{window.removeEventListener("pointerup",h,d),window.removeEventListener("pointercancel",x,d),Oi.has(u)&&Oi.delete(u),rh(w)&&typeof c=="function"&&c(w,{success:y})},h=w=>{f(w,u===window||u===document||n.useGlobalTarget||sy(u,w.target))},x=w=>{f(w,!1)};window.addEventListener("pointerup",h,d),window.addEventListener("pointercancel",x,d)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),ds(a)&&(a.addEventListener("focus",c=>YS(c,s)),!GS(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function ed(e){return a0(e)&&"ownerSVGElement"in e}const Fi=new WeakMap;let qt;const iy=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:ed(r)&&"getBBox"in r?r.getBBox()[t]:r[n],QS=iy("inline","width","offsetWidth"),ZS=iy("block","height","offsetHeight");function JS({target:e,borderBoxSize:t}){var n;(n=Fi.get(e))==null||n.forEach(r=>{r(e,{get width(){return QS(e,t)},get height(){return ZS(e,t)}})})}function ej(e){e.forEach(JS)}function tj(){typeof ResizeObserver>"u"||(qt=new ResizeObserver(ej))}function nj(e,t){qt||tj();const n=ey(e);return n.forEach(r=>{let s=Fi.get(r);s||(s=new Set,Fi.set(r,s)),s.add(t),qt==null||qt.observe(r)}),()=>{n.forEach(r=>{const s=Fi.get(r);s==null||s.delete(t),s!=null&&s.size||qt==null||qt.unobserve(r)})}}const zi=new Set;let ar;function rj(){ar=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};zi.forEach(t=>t(e))},window.addEventListener("resize",ar)}function sj(e){return zi.add(e),ar||rj(),()=>{zi.delete(e),!zi.size&&typeof ar=="function"&&(window.removeEventListener("resize",ar),ar=void 0)}}function wu(e,t){return typeof e=="function"?sj(e):nj(e,t)}function oy(e,t){let n;const r=()=>{const{currentTime:s}=t,o=(s===null?0:s.value)/100;n!==o&&e(o),n=o};return X.preUpdate(r,!0),()=>ft(r)}function ij(e){return ed(e)&&e.tagName==="svg"}function oj(...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],a=Hc(s,i,o);return t?a(r):a}function aj(e,t,n={}){const r=e.get();let s=null,i=r,o;const a=typeof r=="string"?r.replace(/[\d.-]/g,""):void 0,u=()=>{s&&(s.stop(),s=null),e.animation=void 0},c=()=>{const f=ih(e.get()),h=ih(i);if(f===h){u();return}const x=s?s.getGeneratorVelocity():e.getVelocity();u(),s=new Ds({keyframes:[f,h],velocity:x,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=x=>h(za(x,a)),X.postRender(d)},u),ke(t)){let f=n.skipInitialAnimation===!0;const h=t.on("change",w=>{f?(f=!1,e.jump(za(w,a),!1)):e.set(za(w,a))}),x=e.on("destroy",h);return()=>{h(),x()}}return u}function za(e,t){return t?e+t:e}function ih(e){return typeof e=="number"?e:parseFloat(e)}const lj=[...Q0,ge,St],uj=e=>lj.find(q0(e)),oh=()=>({translate:0,scale:1,origin:0,originPoint:0}),lr=()=>({x:oh(),y:oh()}),ah=()=>({min:0,max:0}),xe=()=>({x:ah(),y:ah()}),cj=new WeakMap;function Jo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Rs(e){return typeof e=="string"||Array.isArray(e)}const td=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],nd=["initial",...td];function ea(e){return Jo(e.animate)||nd.some(t=>Rs(e[t]))}function ay(e){return!!(ea(e)||e.variants)}function dj(e,t,n){for(const r in t){const s=t[r],i=n[r];if(ke(s))e.addValue(r,s);else if(ke(i))e.addValue(r,wt(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,wt(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ku={current:null},ly={current:!1},fj=typeof window<"u";function hj(){if(ly.current=!0,!!fj)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ku.current=e.matches;e.addEventListener("change",t),t()}else ku.current=!1}const lh=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let jo={};function uy(e){jo=e}function mj(){return jo}class pj{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:o,visualState:a},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=Uc,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 x=Fe.now();this.renderScheduledAtthis.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(ly.current||hj(),this.shouldReduceMotion=ku.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(),ft(this.notifyUpdate),ft(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&&$0.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:u,ease:c,duration:d}=n.accelerate,f=new z0({element:this.current,name:t,keyframes:a,times:u,ease:c,duration:Je(d)}),h=o(f);this.valueSubscriptions.set(t,()=>{h(),f.cancel()});return}const r=Ir.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&X.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 jo){const n=jo[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):xe()}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=wt(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"&&(o0(r)||l0(r))?r=parseFloat(r):!uj(r)&&St.test(n)&&(r=J0(t,n)),this.setBaseTarget(t,ke(r)?r.get():r)),ke(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=qc(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&&!ke(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 Dc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Tr.render(this.render)}}class cy extends pj{constructor(){super(...arguments),this.KeyframeResolver=BS}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;ke(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Sn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function dy({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function gj({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function yj(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 Ba(e){return e===void 0||e===1}function bu({scale:e,scaleX:t,scaleY:n}){return!Ba(e)||!Ba(t)||!Ba(n)}function Tn(e){return bu(e)||fy(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function fy(e){return uh(e.x)||uh(e.y)}function uh(e){return e&&e!=="0%"}function Po(e,t,n){const r=e-n,s=t*r;return n+s}function ch(e,t,n,r,s){return s!==void 0&&(e=Po(e,s,r)),Po(e,n,r)+t}function Su(e,t=0,n=1,r,s){e.min=ch(e.min,t,n,r,s),e.max=ch(e.max,t,n,r,s)}function hy(e,{x:t,y:n}){Su(e.x,t.translate,t.scale,t.originPoint),Su(e.y,n.translate,n.scale,n.originPoint)}const dh=.999999999999,fh=1.0000000000001;function xj(e,t,n,r=!1){var a;const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let u=0;udh&&(t.x=1),t.ydh&&(t.y=1)}function Nt(e,t){e.min+=t,e.max+=t}function hh(e,t,n,r,s=.5){const i=ne(e.min,e.max,s);Su(e,t,n,i,r)}function mh(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Bi(e,t,n){const r=n??e;hh(e.x,mh(t.x,r.x),t.scaleX,t.scale,t.originX),hh(e.y,mh(t.y,r.y),t.scaleY,t.scale,t.originY)}function my(e,t){return dy(yj(e.getBoundingClientRect(),t))}function vj(e,t,n){const r=my(e,n),{scroll:s}=t;return s&&(Nt(r.x,s.offset.x),Nt(r.y,s.offset.y)),r}const wj={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},kj=Rr.length;function bj(e,t,n){let r="",s=!0;for(let o=0;o{if(!t.target)return e;if(typeof e=="string")if(V.test(e))e=parseFloat(e);else return e;const n=ph(e,t.target.x),r=ph(e,t.target.y);return`${n}% ${r}%`}},Sj={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=St.parse(e);if(s.length>5)return r;const i=St.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,u=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=u;const c=ne(a,u,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),i(s)}},ju={borderRadius:{...Gr,applyTo:[...Zc]},borderTopLeftRadius:Gr,borderTopRightRadius:Gr,borderBottomLeftRadius:Gr,borderBottomRightRadius:Gr,boxShadow:Sj};function gy(e,{layout:t,layoutId:n}){return Ir.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ju[e]||e==="opacity")}function sd(e,t,n){var o;const r=e.style,s=t==null?void 0:t.style,i={};if(!r)return i;for(const a in r)(ke(r[a])||s&&ke(s[a])||gy(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(i[a]=r[a]);return i}function jj(e){return window.getComputedStyle(e)}class Pj extends cy{constructor(){super(...arguments),this.type="html",this.renderInstance=py}readValueFromInstance(t,n){var r;if(Ir.has(n))return(r=this.projection)!=null&&r.isProjecting?lu(n):W2(t,n);{const s=jj(t),i=(b0(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return my(t,n)}build(t,n,r){rd(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return sd(t,n,r)}}const Cj={offset:"stroke-dashoffset",array:"stroke-dasharray"},Tj={offset:"strokeDashoffset",array:"strokeDasharray"};function Ej(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?Cj:Tj;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const Nj=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function yy(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...a},u,c,d){if(rd(e,a,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 x of Nj)f[x]!==void 0&&(h[x]=f[x],delete f[x]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),s!==void 0&&Ej(f,s,i,o,!1)}const xy=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"]),vy=e=>typeof e=="string"&&e.toLowerCase()==="svg";function _j(e,t,n,r){py(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(xy.has(s)?s:Qc(s),t.attrs[s])}function wy(e,t,n){const r=sd(e,t,n);for(const s in e)if(ke(e[s])||ke(t[s])){const i=Rr.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}class Mj extends cy{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=xe}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ir.has(n)){const r=Z0(n);return r&&r.default||0}return n=xy.has(n)?n:Qc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return wy(t,n,r)}build(t,n,r){yy(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){_j(t,n,r,s)}mount(t){this.isSVGTag=vy(t.tagName),super.mount(t)}}const Lj=nd.length;function ky(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ky(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})=>_S(e,n,r)))}function Ij(e){let t=Rj(e),n=gh(),r=!0,s=!1;const i=c=>(d,f)=>{var x;const h=In(e,f,c==="exit"?(x=e.presenceContext)==null?void 0:x.custom:void 0);if(h){const{transition:w,transitionEnd:y,...k}=h;d={...d,...k,...y}}return d};function o(c){t=c(e)}function a(c){const{props:d}=e,f=ky(e.parent)||{},h=[],x=new Set;let w={},y=1/0;for(let p=0;py&&P,_=!1;const F=Array.isArray(b)?b:[b];let H=F.reduce(i(m),{});T===!1&&(H={});const{prevResolvedValues:te={}}=v,N={...te,...H},D=E=>{L=!0,x.has(E)&&(_=!0,x.delete(E)),v.needsAnimating[E]=!0;const C=e.getValue(E);C&&(C.liveStyle=!1)};for(const E in N){const C=H[E],A=te[E];if(w.hasOwnProperty(E))continue;let z=!1;mu(C)&&mu(A)?z=!by(C,A)||j:z=C!==A,z?C!=null?D(E):x.add(E):C!==void 0&&x.has(E)?D(E):v.protectedKeys[E]=!0}v.prevProp=b,v.prevResolvedValues=H,v.isActive&&(w={...w,...H}),(r||s)&&e.blockInitialAnimation&&(L=!1);const $=S&&j;L&&(!$||_)&&h.push(...F.map(E=>{const C={type:m};if(typeof E=="string"&&(r||s)&&!$&&e.manuallyAnimateOnMount&&e.parent){const{parent:A}=e,z=In(A,E);if(A.enteringChildren&&z){const{delayChildren:q}=z.transition||{};C.delay=H0(A.enteringChildren,e,q)}}return{animation:E,options:C}}))}if(x.size){const p={};if(typeof d.initial!="boolean"){const m=In(e,Array.isArray(d.initial)?d.initial[0]:d.initial);m&&m.transition&&(p.transition=m.transition)}x.forEach(m=>{const v=e.getBaseTarget(m),b=e.getValue(m);b&&(b.liveStyle=!0),p[m]=v??null}),h.push({animation:p})}let k=!!h.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(k=!1),r=!1,s=!1,k?t(h):Promise.resolve()}function u(c,d){var h;if(n[c].isActive===d)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(x=>{var w;return(w=x.animationState)==null?void 0:w.setActive(c,d)}),n[c].isActive=d;const f=a(c);for(const x in n)n[x].protectedKeys={};return f}return{animateChanges:a,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=gh(),s=!0}}}function Vj(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!by(t,e):!1}function jn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function gh(){return{animate:jn(!0),whileInView:jn(),whileHover:jn(),whileTap:jn(),whileDrag:jn(),whileFocus:jn(),exit:jn()}}function Pu(e,t){e.min=t.min,e.max=t.max}function pt(e,t){Pu(e.x,t.x),Pu(e.y,t.y)}function yh(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Sy=1e-4,Oj=1-Sy,Fj=1+Sy,jy=.01,zj=0-jy,Bj=0+jy;function ze(e){return e.max-e.min}function $j(e,t,n){return Math.abs(e-t)<=n}function xh(e,t,n,r=.5){e.origin=r,e.originPoint=ne(t.min,t.max,e.origin),e.scale=ze(n)/ze(t),e.translate=ne(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Oj&&e.scale<=Fj||isNaN(e.scale))&&(e.scale=1),(e.translate>=zj&&e.translate<=Bj||isNaN(e.translate))&&(e.translate=0)}function fs(e,t,n,r){xh(e.x,t.x,n.x,r?r.originX:void 0),xh(e.y,t.y,n.y,r?r.originY:void 0)}function vh(e,t,n,r=0){const s=r?ne(n.min,n.max,r):n.min;e.min=s+t.min,e.max=e.min+ze(t)}function Hj(e,t,n,r){vh(e.x,t.x,n.x,r==null?void 0:r.x),vh(e.y,t.y,n.y,r==null?void 0:r.y)}function wh(e,t,n,r=0){const s=r?ne(n.min,n.max,r):n.min;e.min=t.min-s,e.max=e.min+ze(t)}function Co(e,t,n,r){wh(e.x,t.x,n.x,r==null?void 0:r.x),wh(e.y,t.y,n.y,r==null?void 0:r.y)}function kh(e,t,n,r,s){return e-=t,e=Po(e,1/n,r),s!==void 0&&(e=Po(e,1/s,r)),e}function Wj(e,t=0,n=1,r=.5,s,i=e,o=e){if(At.test(t)&&(t=parseFloat(t),t=ne(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=ne(i.min,i.max,r);e===i&&(a-=t),e.min=kh(e.min,t,n,a,s),e.max=kh(e.max,t,n,a,s)}function bh(e,t,[n,r,s],i,o){Wj(e,t[n],t[r],t[s],t.scale,i,o)}const Uj=["x","scaleX","originX"],Gj=["y","scaleY","originY"];function Sh(e,t,n,r){bh(e.x,t,Uj,n?n.x:void 0,r?r.x:void 0),bh(e.y,t,Gj,n?n.y:void 0,r?r.y:void 0)}function jh(e){return e.translate===0&&e.scale===1}function Py(e){return jh(e.x)&&jh(e.y)}function Ph(e,t){return e.min===t.min&&e.max===t.max}function Kj(e,t){return Ph(e.x,t.x)&&Ph(e.y,t.y)}function Ch(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Cy(e,t){return Ch(e.x,t.x)&&Ch(e.y,t.y)}function Th(e){return ze(e.x)/ze(e.y)}function Eh(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Et(e){return[e("x"),e("y")]}function Xj(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:x,skewX:w,skewY:y}=n;c&&(r=`perspective(${c}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotate(${f}deg) `),h&&(r+=`rotateX(${h}deg) `),x&&(r+=`rotateY(${x}deg) `),w&&(r+=`skewX(${w}deg) `),y&&(r+=`skewY(${y}deg) `)}const a=e.x.scale*t.x,u=e.y.scale*t.y;return(a!==1||u!==1)&&(r+=`scale(${a}, ${u})`),r||"none"}const Yj=Zc.length,Nh=e=>typeof e=="string"?parseFloat(e):e,_h=e=>typeof e=="number"||V.test(e);function qj(e,t,n,r,s,i){s?(e.opacity=ne(0,n.opacity??1,Qj(r)),e.opacityExit=ne(t.opacity??1,0,Zj(r))):i&&(e.opacity=ne(t.opacity??1,n.opacity??1,r));for(let o=0;ort?1:n(Pr(e,t,r))}function Jj(e,t,n){const r=ke(e)?e:wt(e);return r.start(Yc("",r,t,n)),r.animation}function Is(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}const eP=(e,t)=>e.depth-t.depth;class tP{constructor(){this.children=[],this.isDirty=!1}add(t){Lc(this.children,t),this.isDirty=!0}remove(t){vo(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(eP),this.isDirty=!1,this.children.forEach(t)}}function nP(e,t){const n=Fe.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(ft(r),e(i-t))};return X.setup(r,!0),()=>ft(r)}function $i(e){return ke(e)?e.get():e}class rP{constructor(){this.members=[]}add(t){Lc(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&&(vo(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(vo(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 Hi={hasAnimatedSinceResize:!0,hasEverUpdated:!1},$a=["","X","Y","Z"],sP=1e3;let iP=0;function Ha(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ey(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=X0(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",X,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ey(r)}function Ny({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=iP++,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(lP),this.nodes.forEach(mP),this.nodes.forEach(pP),this.nodes.forEach(uP)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let u=0;uthis.root.updateBlockedByResize=!1;X.read(()=>{f=window.innerWidth}),e(o,()=>{const x=window.innerWidth;x!==f&&(f=x,this.root.updateBlockedByResize=!0,d&&d(),d=nP(h,250),Hi.hasAnimatedSinceResize&&(Hi.hasAnimatedSinceResize=!1,this.nodes.forEach(Dh)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:x})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||c.getDefaultTransition()||wP,{onLayoutAnimationStart:y,onLayoutAnimationComplete:k}=c.getProps(),p=!this.targetLayout||!Cy(this.targetLayout,x),m=!f&&h;if(this.options.layoutRoot||this.resumeFrom||m||f&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...Xc(w,"layout"),onPlay:y,onComplete:k};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(d,m,v.path)}else f||Dh(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=x})}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(),ft(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(gP),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&&Ey(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&&!ze(this.snapshot.measuredBox.x)&&!ze(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=P==null?void 0:P(S);j?(h.x.translate=j.x,h.x.scale=ne(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=ne(o.y.scale,1,S),h.y.origin=o.y.origin,h.y.originPoint=o.y.originPoint):(Rh(h.x,o.x,S),Rh(h.y,o.y,S)),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Co(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),xP(this.relativeTarget,this.relativeTargetOrigin,x,S),b&&Kj(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=xe()),pt(b,this.relativeTarget)),k&&(this.animationValues=f,qj(f,d,this.latestValues,S,v,m)),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 a,u,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(u=this.resumingFrom)==null?void 0:u.currentAnimation)==null||c.stop(),this.pendingAnimation&&(ft(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=X.update(()=>{Hi.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=wt(0)),this.motionValue.jump(0,!1),this.currentAnimation=Jj(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(sP),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:u,layout:c,latestValues:d}=o;if(!(!a||!u||!c)){if(this!==o&&this.layout&&c&&_y(this.options.animationType,this.layout.layoutBox,c.layoutBox)){u=this.target||xe();const f=ze(this.layout.layoutBox.x);u.x.min=o.target.x.min,u.x.max=u.x.min+f;const h=ze(this.layout.layoutBox.y);u.y.min=o.target.y.min,u.y.max=u.y.min+h}pt(a,u),Bi(a,d),fs(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new rP),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:u}={}){const c=this.getStack();c&&c.promote(this,u),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:u}=o;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(a=!0),!a)return;const c={};u.z&&Ha("z",o,c,this.animationValues);for(let d=0;d<$a.length;d++)Ha(`rotate${$a[d]}`,o,c,this.animationValues),Ha(`skew${$a[d]}`,o,c,this.animationValues);o.render();for(const d in c)o.setStaticValue(d,c[d]),this.animationValues&&(this.animationValues[d]=c[d]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=$i(a==null?void 0:a.pointerEvents)||"",o.transform=u?u(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=$i(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Tn(this.latestValues)&&(o.transform=u?u({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=c.animationValues||c.latestValues;this.applyTransformsToTarget();let f=Xj(this.projectionDeltaWithTransform,this.treeScale,d);u&&(f=u(d,f)),o.transform=f;const{x:h,y:x}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${x.origin*100}% 0`,c.animationValues?o.opacity=c===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=c===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const w in ju){if(d[w]===void 0)continue;const{correct:y,applyTo:k,isCSSVariable:p}=ju[w],m=f==="none"?d[w]:y(d[w],c);if(k){const v=k.length;for(let b=0;b{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Lh),this.root.sharedNodes.clear()}}}function oP(e){e.updateLayout()}function aP(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")Et(f=>{const h=o?t.measuredBox[f]:t.layoutBox[f],x=ze(h);h.min=r[f].min,h.max=h.min+x});else if(i==="x"||i==="y"){const f=i==="x"?"y":"x";Pu(o?t.measuredBox[f]:t.layoutBox[f],r[f])}else _y(i,t.layoutBox,r)&&Et(f=>{const h=o?t.measuredBox[f]:t.layoutBox[f],x=ze(r[f]);h.max=h.min+x,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+x)});const a=lr();fs(a,r,t.layoutBox);const u=lr();o?fs(u,e.applyTransform(s,!0),t.measuredBox):fs(u,r,t.layoutBox);const c=!Py(a);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:x}=f;if(h&&x){const w=e.options.layoutAnchor||void 0,y=xe();Co(y,t.layoutBox,h.layoutBox,w);const k=xe();Co(k,r,x.layoutBox,w),Cy(y,k)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=k,e.relativeTargetOrigin=y,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:u,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function lP(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 uP(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function cP(e){e.clearSnapshot()}function Lh(e){e.clearMeasurements()}function dP(e){e.isLayoutDirty=!0,e.updateLayout()}function Ah(e){e.isLayoutDirty=!1}function fP(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function hP(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Dh(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function mP(e){e.resolveTargetDelta()}function pP(e){e.calcProjection()}function gP(e){e.resetSkewAndRotation()}function yP(e){e.removeLeadSnapshot()}function Rh(e,t,n){e.translate=ne(t.translate,0,n),e.scale=ne(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ih(e,t,n,r){e.min=ne(t.min,n.min,r),e.max=ne(t.max,n.max,r)}function xP(e,t,n,r){Ih(e.x,t.x,n.x,r),Ih(e.y,t.y,n.y,r)}function vP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const wP={duration:.45,ease:[.4,0,.1,1]},Vh=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Oh=Vh("applewebkit/")&&!Vh("chrome/")?Math.round:Ye;function Fh(e){e.min=Oh(e.min),e.max=Oh(e.max)}function kP(e){Fh(e.x),Fh(e.y)}function _y(e,t,n){return e==="position"||e==="preserve-aspect"&&!$j(Th(t),Th(n),.2)}function bP(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const SP=Ny({attachResizeListener:(e,t)=>Is(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}),Wa={current:void 0},My=Ny({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Wa.current){const e=new SP({});e.mount(window),e.setOptions({layoutScroll:!0}),Wa.current=e}return Wa.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Xs=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function zh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function jP(...e){return t=>{let n=!1;const r=e.map(s=>{const i=zh(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s{const{width:x,height:w,top:y,left:k,right:p,bottom:m,direction:v}=u.current;if(t||i===!1||!a.current||!x||!w)return;const b=v==="rtl",P=n==="left"?b?`right: ${p}`:`left: ${k}`:b?`left: ${k}`:`right: ${p}`,T=r==="bottom"?`bottom: ${m}`:`top: ${y}`;a.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: ${x}px !important; height: ${w}px !important; ${P}px !important; - ${C}px !important; + ${T}px !important; } - `),()=>{var L;(L=a.current)==null||L.removeAttribute("data-motion-pop-id"),j.contains(S)&&j.removeChild(S)}},[t]),l.jsx(TP,{isPresent:t,childRef:a,sizeRef:u,pop:i,children:i===!1?e:g.cloneElement(e,{ref:f})})}const EP=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o,anchorX:a,anchorY:u,root:c})=>{const d=xn(NP),f=g.useId(),h=g.useRef(n),x=g.useRef(r);Ws(()=>{h.current=n,x.current=r});let w=!0,y=g.useMemo(()=>(w=!1,{id:f,initial:t,isPresent:n,custom:s,onExitComplete:k=>{d.set(k,!0);for(const p of d.values())if(!p)return;r&&r()},register:k=>(d.set(k,!1),()=>{var p;d.delete(k),!h.current&&!d.size&&((p=x.current)==null||p.call(x))})}),[n,d,r]);return i&&w&&(y={...y}),g.useMemo(()=>{d.forEach((k,p)=>d.set(p,!1))},[n]),g.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=l.jsx(CP,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:u,root:c,children:e}),l.jsx(Qo.Provider,{value:y,children:e})};function NP(){return new Map}function Ly(e=!0){const t=g.useContext(Qo);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=g.useId();g.useEffect(()=>{if(e)return s(i)},[e]);const o=g.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const xi=e=>e.key||"";function Bh(e){const t=[];return g.Children.forEach(e,n=>{g.isValidElement(n)&&t.push(n)}),t}const _P=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1,anchorX:a="left",anchorY:u="top",root:c})=>{const[d,f]=Ly(o),h=g.useMemo(()=>Bh(e),[e]),x=o&&!d?[]:h.map(xi),w=g.useRef(!0),y=g.useRef(h),k=xn(()=>new Map),p=g.useRef(new Set),[m,v]=g.useState(h),[b,P]=g.useState(h);Ws(()=>{w.current=!1,y.current=h;for(let j=0;j{const L=xi(j),_=o&&!d?!1:h===b||x.includes(L),F=()=>{if(p.current.has(L))return;if(k.has(L))p.current.add(L),k.set(L,!0);else return;let H=!0;k.forEach(te=>{te||(H=!1)}),H&&(S==null||S(),P(y.current),o&&(f==null||f()),r&&r())};return l.jsx(EP,{isPresent:_,initial:!w.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,root:c,onExitComplete:_?void 0:F,anchorX:a,anchorY:u,children:j},L)})})},Ay=g.createContext({strict:!1}),$h={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 Hh=!1;function MP(){if(Hh)return;const e={};for(const t in $h)e[t]={isEnabled:n=>$h[t].some(r=>!!n[r])};uy(e),Hh=!0}function Dy(){return MP(),mj()}function LP(e){const t=Dy();for(const n in e)t[n]={...t[n],...e[n]};uy(t)}const AP=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 Co(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||AP.has(e)}let Ry=e=>!Co(e);function DP(e){typeof e=="function"&&(Ry=t=>t.startsWith("on")?!Co(t):e(t))}try{DP(require("@emotion/is-prop-valid").default)}catch{}function RP(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||ke(e[s])||(Ry(s)||n===!0&&Co(s)||!t&&!Co(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const ta=g.createContext({});function IP(e,t){if(ea(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Rs(n)?n:void 0,animate:Rs(r)?r:void 0}}return e.inherit!==!1?t:{}}function VP(e){const{initial:t,animate:n}=IP(e,g.useContext(ta));return g.useMemo(()=>({initial:t,animate:n}),[Wh(t),Wh(n)])}function Wh(e){return Array.isArray(e)?e.join(" "):e}const id=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Iy(e,t,n){for(const r in t)!ke(t[r])&&!gy(r,n)&&(e[r]=t[r])}function OP({transformTemplate:e},t){return g.useMemo(()=>{const n=id();return rd(n,t,e),Object.assign({},n.vars,n.style)},[t])}function FP(e,t){const n=e.style||{},r={};return Iy(r,n,e),Object.assign(r,OP(e,t)),r}function zP(e,t){const n={},r=FP(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 Vy=()=>({...id(),attrs:{}});function BP(e,t,n,r){const s=g.useMemo(()=>{const i=Vy();return yy(i,t,vy(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Iy(i,e.style,e),s.style={...i,...s.style}}return s}const $P=["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 od(e){return typeof e!="string"||e.includes("-")?!1:!!($P.indexOf(e)>-1||/[A-Z]/u.test(e))}function HP(e,t,n,{latestValues:r},s,i=!1,o){const u=(o??od(e)?BP:zP)(t,r,s,e),c=RP(t,typeof e=="string",i),d=e!==g.Fragment?{...c,...u,ref:n}:{},{children:f}=t,h=g.useMemo(()=>ke(f)?f.get():f,[f]);return g.createElement(e,{...d,children:h})}function WP({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:UP(n,r,s,e),renderState:t()}}function UP(e,t,n,r){const s={},i=r(e,{});for(const h in i)s[h]=$i(i[h]);let{initial:o,animate:a}=e;const u=ea(e),c=ay(e);t&&c&&!u&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const f=d?a:o;if(f&&typeof f!="boolean"&&!Jo(f)){const h=Array.isArray(f)?f:[f];for(let x=0;x(t,n)=>{const r=g.useContext(ta),s=g.useContext(Qo),i=()=>WP(e,t,r,s);return n?i():xn(i)},GP=Oy({scrapeMotionValuesFromProps:sd,createRenderState:id}),KP=Oy({scrapeMotionValuesFromProps:wy,createRenderState:Vy}),XP=Symbol.for("motionComponentSymbol");function YP(e,t,n){const r=g.useRef(n);g.useInsertionEffect(()=>{r.current=n});const s=g.useRef(null);return g.useCallback(i=>{var a;i&&((a=e.onMount)==null||a.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 Fy=g.createContext({});function Kn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function qP(e,t,n,r,s,i){var v,b;const{visualElement:o}=g.useContext(ta),a=g.useContext(Ay),u=g.useContext(Qo),c=g.useContext(Xs),d=c.reducedMotion,f=c.skipAnimations,h=g.useRef(null),x=g.useRef(!1);r=r||a.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}),x.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const w=h.current,y=g.useContext(Fy);w&&!w.projection&&s&&(w.type==="html"||w.type==="svg")&&QP(h.current,n,s,y);const k=g.useRef(!1);g.useInsertionEffect(()=>{w&&k.current&&w.update(n,u)});const p=n[K0],m=g.useRef(!!p&&typeof window<"u"&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,p))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,p)));return Ws(()=>{x.current=!0,w&&(k.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),w.scheduleRenderMicrotask(),m.current&&w.animationState&&w.animationState.animateChanges())}),g.useEffect(()=>{w&&(!m.current&&w.animationState&&w.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var P;(P=window.MotionHandoffMarkAsComplete)==null||P.call(window,p)}),m.current=!1),w.enteringChildren=void 0)}),w}function QP(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:u,layoutRoot:c,layoutAnchor:d,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:zy(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&Kn(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:u,layoutRoot:c,layoutAnchor:d})}function zy(e){if(e)return e.options.allowProjection!==!1?e.projection:zy(e.parent)}function Ua(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&LP(r);const i=n?n==="svg":od(e),o=i?KP:GP;function a(c,d){let f;const h={...g.useContext(Xs),...c,layoutId:ZP(c)},{isStatic:x}=h,w=VP(c),y=o(c,x);if(!x&&typeof window<"u"){JP();const k=eT(h);f=k.MeasureLayout,w.visualElement=qP(e,y,h,s,k.ProjectionNode,i)}return l.jsxs(ta.Provider,{value:w,children:[f&&w.visualElement?l.jsx(f,{visualElement:w.visualElement,...h}):null,HP(e,c,YP(y,w.visualElement,d),y,x,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=g.forwardRef(a);return u[XP]=e,u}function ZP({layoutId:e}){const t=g.useContext(Mc).id;return t&&e!==void 0?t+"-"+e:e}function JP(e,t){g.useContext(Ay).strict}function eT(e){const t=Dy(),{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 tT(e,t){if(typeof Proxy>"u")return Ua;const n=new Map,r=(i,o)=>Ua(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,Ua(o,void 0,e,t)),n.get(o))})}const nT=(e,t)=>t.isSVG??od(e)?new Mj(t):new Pj(t,{allowProjection:e!==g.Fragment});class rT extends Sn{constructor(t){super(t),t.animationState||(t.animationState=Ij(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Jo(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 sT=0;class iT extends Sn{constructor(){super(...arguments),this.id=sT++,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:a}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){const u=In(this.node,o,a);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 oT={animation:{Feature:rT},exit:{Feature:iT}};function Ys(e){return{point:{x:e.pageX,y:e.pageY}}}const aT=e=>t=>Jc(t)&&e(t,Ys(t));function hs(e,t,n,r){return Is(e,t,aT(n),r)}const By=({current:e})=>e?e.ownerDocument.defaultView:null,Uh=(e,t)=>Math.abs(e-t);function lT(e,t){const n=Uh(e.x,t.x),r=Uh(e.y,t.y);return Math.sqrt(n**2+r**2)}const Gh=new Set(["auto","scroll"]);class $y{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){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=w=>{this.handleScroll(w.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=vi(this.lastRawMoveEventInfo,this.transformPagePoint));const w=Ga(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,k=lT(w.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!k)return;const{point:p}=w,{timestamp:m}=Se;this.history.push({...p,timestamp:m});const{onStart:v,onMove:b}=this.handlers;y||(v&&v(this.lastMoveEvent,w),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,w)},this.handlePointerMove=(w,y)=>{this.lastMoveEvent=w,this.lastRawMoveEventInfo=y,this.lastMoveEventInfo=vi(y,this.transformPagePoint),X.update(this.updatePoint,!0)},this.handlePointerUp=(w,y)=>{this.end();const{onEnd:k,onSessionEnd:p,resumeAnimation:m}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Ga(w.type==="pointercancel"?this.lastMoveEventInfo:vi(y,this.transformPagePoint),this.history);this.startEvent&&k&&k(w,v),p&&p(w,v)},!Jc(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const u=Ys(t),c=vi(u,this.transformPagePoint),{point:d}=c,{timestamp:f}=Se;this.history=[{...d,timestamp:f}];const{onSessionStart:h}=n;h&&h(t,Ga(c,this.history));const x={passive:!0,capture:!0};this.removeListeners=Us(hs(this.contextWindow,"pointermove",this.handlePointerMove,x),hs(this.contextWindow,"pointerup",this.handlePointerUp,x),hs(this.contextWindow,"pointercancel",this.handlePointerUp,x)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Gh.has(r.overflowX)||Gh.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),X.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ft(this.updatePoint)}}function vi(e,t){return t?{point:t(e.point)}:e}function Kh(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ga({point:e},t){return{point:e,delta:Kh(e,Hy(t)),offset:Kh(e,uT(t)),velocity:cT(t,.1)}}function uT(e){return e[0]}function Hy(e){return e[e.length-1]}function cT(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=Hy(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Je(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>Je(t)*2&&(r=e[1]);const i=lt(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 dT(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?ne(n,e,r.max):Math.min(e,n)),e}function Xh(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 fT(e,{top:t,left:n,bottom:r,right:s}){return{x:Xh(e.x,n,s),y:Xh(e.y,t,r)}}function Yh(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Pr(t.min,t.max-r,e.min):r>s&&(n=Pr(e.min,e.max-s,t.min)),Pt(0,1,n)}function pT(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 Tu=.35;function gT(e=Tu){return e===!1?e=0:e===!0&&(e=Tu),{x:qh(e,"left","right"),y:qh(e,"top","bottom")}}function qh(e,t,n){return{min:Qh(e,t),max:Qh(e,n)}}function Qh(e,t){return typeof e=="number"?e:e[t]||0}const yT=new WeakMap;class xT{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=xe(),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(Ys(f).point),this.stopAnimation()},o=(f,h)=>{const{drag:x,dragPropagation:w,onDragStart:y}=this.getProps();if(x&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=$S(x),!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),Et(p=>{let m=this.getAxisMotionValue(p).get()||0;if(At.test(m)){const{projection:v}=this.visualElement;if(v&&v.layout){const b=v.layout.layoutBox[p];b&&(m=ze(b)*(parseFloat(m)/100))}}this.originPoint[p]=m}),y&&X.update(()=>y(f,h),!1,!0),pu(this.visualElement,"transform");const{animationState:k}=this.visualElement;k&&k.setActive("whileDrag",!0)},a=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:x,dragDirectionLock:w,onDirectionLock:y,onDrag:k}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:p}=h;if(w&&this.currentDirection===null){this.currentDirection=wT(p),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,p),this.updateAxis("y",h.point,p),this.visualElement.render(),k&&X.update(()=>k(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 $y(t,{onSessionStart:i,onStart:o,onMove:a,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:a}=this.getProps();a&&X.postRender(()=>a(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||!wi(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=dT(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&&Kn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=fT(r.layoutBox,t):this.constraints=!1,this.elastic=gT(n),s!==this.constraints&&!Kn(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Et(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=pT(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Kn(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=vj(r,s.root,this.visualElement.getTransformPagePoint());let o=hT(s.layout.layoutBox,i);if(n){const a=n(gj(o));this.hasMutatedConstraints=!!a,a&&(o=dy(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),u=this.constraints||{},c=Et(d=>{if(!wi(d,n,this.currentDirection))return;let f=u&&u[d]||{};(o===!0||o===d)&&(f={min:0,max:0});const h=s?200:1e6,x=s?40:1e7,w={type:"inertia",velocity:r?t[d]:0,bounceStiffness:h,bounceDamping:x,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(d,w)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return pu(this.visualElement,t),r.start(Yc(t,r,0,n,this.visualElement,!1))}stopAnimation(){Et(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){Et(n=>{const{drag:r}=this.getProps();if(!wi(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],u=i.get()||0;i.set(t[n]-ne(o,a,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Kn(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Et(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const u=a.get();s[o]=mT({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(),Et(o=>{if(!wi(o,t,null))return;const a=this.getAxisMotionValue(o),{min:u,max:c}=this.constraints[o];a.set(ne(u,c,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;yT.set(this.visualElement,this);const t=this.visualElement.current,n=hs(t,"pointerdown",c=>{const{drag:d,dragListener:f=!0}=this.getProps(),h=c.target,x=h!==t&&XS(h);d&&f&&!x&&this.start(c)});let r;const s=()=>{const{dragConstraints:c}=this.getProps();Kn(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=vT(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),X.read(s);const a=Is(window,"resize",()=>this.scalePositionWithinConstraints()),u=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(Et(f=>{const h=this.getAxisMotionValue(f);h&&(this.originPoint[f]+=c[f].translate,h.set(h.get()+c[f].translate))}),this.visualElement.render())});return()=>{a(),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=Tu,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Zh(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function vT(e,t,n){const r=wu(e,Zh(n)),s=wu(t,Zh(n));return()=>{r(),s()}}function wi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function wT(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class kT extends Sn{constructor(t){super(t),this.removeGroupControls=Ye,this.removeListeners=Ye,this.controls=new xT(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ye}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 Ka=e=>(t,n)=>{e&&X.update(()=>e(t,n),!1,!0)};class bT extends Sn{constructor(){super(...arguments),this.removePointerDownListener=Ye}onPointerDown(t){this.session=new $y(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:Ka(t),onStart:Ka(n),onMove:Ka(r),onEnd:(i,o)=>{delete this.session,s&&X.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=hs(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 Xa=!1;class ST extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),Xa&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Hi.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}),Xa=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||X.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),Cr.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;Xa=!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 Wy(e){const[t,n]=Ly(),r=g.useContext(Mc);return l.jsx(ST,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(Fy),isPresent:t,safeToRemove:n})}const jT={pan:{Feature:bT},drag:{Feature:kT,ProjectionNode:My,MeasureLayout:Wy}};function Jh(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&&X.postRender(()=>i(t,Ys(t)))}class PT extends Sn{mount(){const{current:t}=this.node;t&&(this.unmount=WS(t,(n,r)=>(Jh(this.node,r,"Start"),s=>Jh(this.node,s,"End"))))}unmount(){}}class TT extends Sn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Us(Is(this.node.current,"focus",()=>this.onFocus()),Is(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function em(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&&X.postRender(()=>i(t,Ys(t)))}class CT extends Sn{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=qS(t,(s,i)=>(em(this.node,i,"Start"),(o,{success:a})=>em(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Cu=new WeakMap,Ya=new WeakMap,ET=e=>{const t=Cu.get(e.target);t&&t(e)},NT=e=>{e.forEach(ET)};function _T({root:e,...t}){const n=e||document;Ya.has(n)||Ya.set(n,{});const r=Ya.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(NT,{root:e,...t})),r[s]}function MT(e,t,n){const r=_T(t);return Cu.set(e,n),r.observe(e),()=>{Cu.delete(e),r.unobserve(e)}}const LT={some:0,all:1};class AT extends Sn{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:LT[s]},a=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(),x=d?f:h;x&&x(c)};this.stopObserver=MT(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(DT(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function DT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const RT={inView:{Feature:AT},tap:{Feature:CT},focus:{Feature:TT},hover:{Feature:PT}},IT={layout:{ProjectionNode:My,MeasureLayout:Wy}},VT={...oT,...RT,...jT,...IT},Bt=tT(VT,nT);function Eo(e){return typeof window>"u"?!1:e?I0():Kc()}const OT=50,tm=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),FT=()=>({time:0,x:tm(),y:tm()}),zT={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function nm(e,t,n,r){const s=n[t],{length:i,position:o}=zT[t],a=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=Pr(0,s.scrollLength,s.current);const c=r-u;s.velocity=c>OT?0:Rc(s.current-a,c)}function BT(e,t,n){nm(e,"x",t,n),nm(e,"y",t,n),t.time=n}function $T(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,a=r.parentNode;for(;!o;)a.tagName==="svg"&&(o=a),a=r.parentNode;r=o}else break;return n}const Eu={start:0,center:.5,end:1};function rm(e,t,n=0){let r=0;if(e in Eu&&(e=Eu[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 HT=[0,0];function WT(e,t,n,r){let s=Array.isArray(e)?e:HT,i=0,o=0;return typeof e=="number"?s=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?s=e.split(" "):s=[e,Eu[e]?e:"0"]),i=rm(s[0],n,r),o=rm(s[1],t),i-o}const Zr={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},UT={x:0,y:0};function GT(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function KT(e,t,n){const{offset:r=Zr.All}=n,{target:s=e,axis:i="y"}=n,o=i==="y"?"height":"width",a=s!==e?$T(s,e):UT,u=s===e?{width:e.scrollWidth,height:e.scrollHeight}:GT(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{XT(e,r.target,n),BT(e,n,s),(r.offset||r.target)&&KT(e,n,r)},notify:()=>t(n)}}const Gn=new WeakMap,sm=new WeakMap,qa=new WeakMap,im=new WeakMap,ki=new WeakMap,om=e=>e===document.scrollingElement?window:e;function Uy(e,{container:t=document.scrollingElement,trackContentSize:n=!1,...r}={}){if(!t)return Ye;let s=qa.get(t);s||(s=new Set,qa.set(t,s));const i=FT(),o=YT(t,e,i,r);if(s.add(o),!Gn.has(t)){const u=()=>{for(const h of s)h.measure(Se.timestamp);X.preUpdate(c)},c=()=>{for(const h of s)h.notify()},d=()=>X.read(u);Gn.set(t,d);const f=om(t);window.addEventListener("resize",d),t!==document.documentElement&&sm.set(t,wu(t,d)),f.addEventListener("scroll",d),d()}if(n&&!ki.has(t)){const u=Gn.get(t),c={width:t.scrollWidth,height:t.scrollHeight};im.set(t,c);const d=()=>{const h=t.scrollWidth,x=t.scrollHeight;(c.width!==h||c.height!==x)&&(u(),c.width=h,c.height=x)},f=X.read(d,!0);ki.set(t,f)}const a=Gn.get(t);return X.read(a,!1,!0),()=>{var f;ft(a);const u=qa.get(t);if(!u||(u.delete(o),u.size))return;const c=Gn.get(t);Gn.delete(t),c&&(om(t).removeEventListener("scroll",c),(f=sm.get(t))==null||f(),window.removeEventListener("resize",c));const d=ki.get(t);d&&(ft(d),ki.delete(t)),im.delete(t)}}const qT=[[Zr.Enter,"entry"],[Zr.Exit,"exit"],[Zr.Any,"cover"],[Zr.All,"contain"]],am={start:0,end:1};function QT(e){const t=e.trim().split(/\s+/);if(t.length!==2)return;const n=am[t[0]],r=am[t[1]];if(!(n===void 0||r===void 0))return[n,r]}function ZT(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=QT(n);if(!r)return;t.push(r)}else return;return t}function JT(e,t){const n=ZT(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 ad(e){if(!e)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[t,n]of qT)if(JT(e,t))return{rangeStart:`${n} 0%`,rangeEnd:`${n} 100%`}}const lm=new Map;function um(e){const t={value:0},n=Uy(r=>{t.value=r[e.axis].progress*100},e);return{currentTime:t,cancel:n}}function Gy({source:e,container:t,...n}){const{axis:r}=n;e&&(t=e);let s=lm.get(t);s||(s=new Map,lm.set(t,s));const i=n.target??"self";let o=s.get(i);o||(o={},s.set(i,o));const a=r+(n.offset??[]).join(",");return o[a]||(n.target&&Eo(n.target)?ad(n.offset)?o[a]=new ViewTimeline({subject:n.target,axis:r}):o[a]=um({container:t,...n}):Eo()?o[a]=new ScrollTimeline({source:t,axis:r}):o[a]=um({container:t,...n})),o[a]}function eC(e,t){const n=Gy(t),r=t.target?ad(t.offset):void 0,s=t.target?Eo(t.target)&&!!r:Eo();return e.attachTimeline({timeline:s?n:void 0,...r&&s&&{rangeStart:r.rangeStart,rangeEnd:r.rangeEnd},observe:i=>(i.pause(),oy(o=>{i.time=i.iterationDuration*o},n))})}function tC(e){return e&&(e.target||e.offset)}function nC(e){return e.length===2}function rC(e,t){return nC(e)||tC(t)?Uy(n=>{e(n[t.axis].progress,n)},t):oy(e,Gy(t))}function Ky(e,{axis:t="y",container:n=document.scrollingElement,...r}={}){if(!n)return Ye;const s={axis:t,container:n,...r};return typeof e=="function"?rC(e,s):eC(e,s)}const sC=()=>({scrollX:wt(0),scrollY:wt(0),scrollXProgress:wt(0),scrollYProgress:wt(0)}),ur=e=>e?!e.current:!1;function cm(e,t,n,r){return{factory:s=>{let i;const o=()=>{if(ur(n)||ur(r)){Cr.read(o);return}i=Ky(s,{...t,axis:e,container:(n==null?void 0:n.current)||void 0,target:(r==null?void 0:r.current)||void 0})};return Cr.read(o),()=>{ty(o),i==null||i()}},times:[0,1],keyframes:[0,1],ease:s=>s,duration:1}}function iC(e,t){return typeof window>"u"?!1:e?I0()&&!!ad(t):Kc()}function Xy({container:e,target:t,...n}={}){const r=xn(sC);iC(t,n.offset)&&(r.scrollXProgress.accelerate=cm("x",n,e,t),r.scrollYProgress.accelerate=cm("y",n,e,t));const s=g.useRef(null),i=g.useRef(!1),o=g.useCallback(()=>(s.current=Ky((a,{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 a;(a=s.current)==null||a.call(s)}),[e,t,JSON.stringify(n.offset)]);return Ws(()=>{if(i.current=!1,ur(e)||ur(t)){i.current=!0;return}else return o()},[o]),g.useEffect(()=>{if(!i.current)return;let a;const u=()=>{const c=ur(e),d=ur(t);!c&&!d&&(a=o())};return Cr.read(u),()=>{ty(u),a==null||a()}},[o]),r}function Yy(e){const t=xn(()=>wt(e)),{isStatic:n}=g.useContext(Xs);if(n){const[,r]=g.useState(e);g.useEffect(()=>t.on("change",r),[])}return t}function qy(e,t){const n=Yy(t()),r=()=>n.set(t());return r(),Ws(()=>{const s=()=>X.preRender(r,!1,!0),i=e.map(o=>o.on("change",s));return()=>{i.forEach(o=>o()),ft(r)}}),n}function oC(e){cs.current=[],e();const t=qy(cs.current,e);return cs.current=void 0,t}function Jt(e,t,n,r){if(typeof e=="function")return oC(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!="function")return aC(e,t,n,r);const o=typeof t=="function"?t:oj(t,n,r),a=Array.isArray(e)?dm(e,o):dm([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&&(a.accelerate={...u,times:t,keyframes:n,isTransformed:!0}),a}function dm(e,t){const n=xn(()=>[]);return qy(e,()=>{n.length=0;const r=e.length;for(let s=0;sObject.keys(n)),i=xn(()=>({}));for(const o of s)i[o]=Jt(e,t,n[o],r);return i}function lC(e,t={}){const{isStatic:n}=g.useContext(Xs),r=()=>ke(e)?e.get():e;if(n)return Jt(r);const s=Yy(r());return g.useInsertionEffect(()=>aj(s,e,t),[s,JSON.stringify(t)]),s}function uC(e,t={}){return lC(e,{type:"spring",...t})}function cC(){const{scrollYProgress:e}=Xy(),t=uC(e,{stiffness:200,damping:30,restDelta:.001});return l.jsx(Bt.div,{style:{scaleX:t},className:"fixed left-0 top-0 z-40 h-0.5 w-full origin-left bg-brand-500"})}const dC=()=>l.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:l.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 qs({message:e,fullScreen:t=!1}){const{t:n}=Te(),r=l.jsxs("div",{className:"mx-auto max-w-md text-center",children:[l.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:l.jsx(dC,{})}),l.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:n("maintenance.title")}),l.jsx("p",{className:"text-neutral-600 dark:text-neutral-300",children:e||n("maintenance.defaultMessage")})]});return t?l.jsxs("div",{className:"relative flex min-h-screen items-center justify-center bg-white px-4 dark:bg-neutral-950",children:[r,l.jsxs(W,{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:[l.jsx(Gk,{className:"h-4 w-4"}),n("maintenance.login")]})]}):l.jsx("div",{className:"mx-auto max-w-6xl px-4 py-20 sm:px-6",children:r})}const fm=l.jsx(l.Fragment,{children:'Wartungsmodus aktiv – Besucher sehen aktuell eine Wartungsmeldung. Du siehst diese Seite nur, weil du die Berechtigung "Wartungsmodus umgehen" hast.'});function Qs({inline:e=!1}){return e?l.jsx("div",{className:"mb-8 rounded-lg bg-amber-500 px-4 py-2 text-center text-xs font-semibold text-white",children:fm}):l.jsx("div",{className:"bg-amber-500 px-4 py-2 text-center text-xs font-semibold text-white",children:fm})}function fC({onClose:e}){const{consent:t,saveCustom:n}=Ar(),[r,s]=g.useState(t.external),[i,o]=g.useState(t.analytics),{t:a}=Te();return l.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center bg-black/50 p-4",onClick:e,children:l.jsxs("div",{className:"w-full max-w-md rounded-xl bg-white p-6 dark:bg-neutral-900",onClick:u=>u.stopPropagation(),children:[l.jsx("h2",{className:"mb-1 text-lg font-bold text-neutral-900 dark:text-white",children:a("cookieConsent.modalTitle")}),l.jsxs("p",{className:"mb-4 text-sm text-neutral-600 dark:text-neutral-300",children:[a("cookieConsent.modalIntro")," ",l.jsx(W,{to:"/datenschutz",className:"underline hover:text-brand-500",onClick:e,children:a("cookieConsent.privacyPolicy")}),"."]}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3 rounded-lg border border-neutral-200 p-3 dark:border-neutral-700",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-semibold text-neutral-800 dark:text-neutral-100",children:a("cookieConsent.necessaryTitle")}),l.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:a("cookieConsent.necessaryDesc")})]}),l.jsx("input",{type:"checkbox",checked:!0,disabled:!0,className:"mt-1 h-4 w-4 shrink-0"})]}),l.jsxs("div",{className:"flex items-start justify-between gap-3 rounded-lg border border-neutral-200 p-3 dark:border-neutral-700",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-semibold text-neutral-800 dark:text-neutral-100",children:a("cookieConsent.externalTitle")}),l.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:a("cookieConsent.externalDesc")})]}),l.jsx("input",{type:"checkbox",checked:r,onChange:u=>s(u.target.checked),className:"mt-1 h-4 w-4 shrink-0"})]}),l.jsxs("div",{className:"flex items-start justify-between gap-3 rounded-lg border border-neutral-200 p-3 dark:border-neutral-700",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-semibold text-neutral-800 dark:text-neutral-100",children:a("cookieConsent.analyticsTitle")}),l.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:a("cookieConsent.analyticsDesc")})]}),l.jsx("input",{type:"checkbox",checked:i,onChange:u=>o(u.target.checked),className:"mt-1 h-4 w-4 shrink-0"})]})]}),l.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[l.jsx("button",{type:"button",onClick:e,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:a("cookieConsent.cancel")}),l.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:a("cookieConsent.saveSelection")})]})]})})}function hC(){const{decided:e,settingsOpen:t,acceptAll:n,rejectNonEssential:r,openSettings:s,closeSettings:i}=Ar(),{t:o}=Te();return l.jsxs(l.Fragment,{children:[!e&&l.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:l.jsxs("div",{className:"mx-auto flex max-w-6xl flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[l.jsxs("p",{className:"text-sm text-neutral-600 dark:text-neutral-300",children:[o("cookieConsent.bannerText")," ",o("cookieConsent.moreInfo")," ",l.jsx(W,{to:"/datenschutz",className:"underline hover:text-brand-500",children:o("cookieConsent.privacyPolicy")}),"."]}),l.jsxs("div",{className:"flex flex-wrap gap-2 sm:shrink-0",children:[l.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")}),l.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")}),l.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&&l.jsx(fC,{onClose:i})]})}function mC(){const{consent:e}=Ar(),{ga_measurement_id:t}=ht(),n=g.useRef(!1);return g.useEffect(()=>{if(!t||!e.analytics||n.current)return;n.current=!0;const r=document.createElement("script");r.src=`https://www.googletagmanager.com/gtag/js?id=${t}`,r.async=!0,document.head.appendChild(r),window.dataLayer=window.dataLayer||[];function s(...i){window.dataLayer.push(i)}window.gtag=s,s("js",new Date),s("config",t,{anonymize_ip:!0})},[t,e.analytics]),null}const Qy=g.createContext({global:{enabled:!1,message:null},services:{enabled:!1,message:null},vehicles:{enabled:!1,message:null},bypass:!1}),pC=Qy.Provider;function na(){return g.useContext(Qy)}const ld=g.createContext({}),gC=ld.Provider;function $n(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 De(e){const t=g.useContext(ld);return $n(t,e)}function ud(){return g.useContext(ld)}const yC=[{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'}],cd=g.createContext({fonts:[],refresh:()=>{}}),Zy=cd.Provider;function Jy(){return g.useContext(cd).fonts}function SN(){return g.useContext(cd).refresh}function jN(){const e=Jy();return[...yC,...e.map(t=>({label:t.name,value:t.font_family}))]}function xC(e){const t=/\.([a-z0-9]+)$/i.exec(e||"");return t?t[1].toLowerCase():""}const vC={woff2:"woff2",woff:"woff",ttf:"truetype",otf:"opentype"};function ex(){const e=Jy();if(e.length===0)return null;const t=e.map(n=>{const r=vC[xC(n.file_path)]||"woff2";return`@font-face { font-family: "${n.font_family}"; src: url("${n.file_path}") format("${r}"); font-display: swap; }`}).join(` -`);return l.jsx("style",{children:t})}const wC=150,kC=300,bC=80,SC=5e3;function jC(){return l.jsx("div",{className:"fixed inset-0 z-[200] flex items-center justify-center bg-white dark:bg-neutral-950",children:l.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 PC({enabled:e,children:t}){const n=rt(),[r,s]=g.useState(!e),[i,o]=g.useState(!1),a=g.useRef(null);return g.useLayoutEffect(()=>{const u=a.current;if(!e||!u){s(!0),o(!1);return}s(!1),o(!1);let c=!1,d=0,f=null;const h=new Set,x=setTimeout(()=>{d=Date.now(),o(!0)},wC),w=()=>{s(!0),o(!1)},y=()=>{c=!0,clearTimeout(x),clearTimeout(f),clearTimeout(C),b.disconnect(),P()},k=()=>{if(c)return;y();const S=d?kC-(Date.now()-d):0;S>0?setTimeout(w,S):w()},p=()=>{clearTimeout(f),f=setTimeout(()=>{h.size===0&&Yw()===0&&k()},bC)},m=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)},v=S=>{var j;S.nodeType===1&&(S.tagName==="IMG"&&m(S),(j=S.querySelectorAll)==null||j.call(S,"img").forEach(m))},b=new MutationObserver(S=>{S.forEach(j=>j.addedNodes.forEach(v)),p()});b.observe(u,{childList:!0,subtree:!0});const P=qw(p),C=setTimeout(k,SC);return u.querySelectorAll("img").forEach(m),p(),()=>{c||y()}},[n.pathname,e]),l.jsxs("div",{className:"relative",children:[l.jsx("div",{ref:a,style:e?{visibility:r?"visible":"hidden"}:void 0,children:t}),e&&i&&l.jsx(jC,{})]})}const TC=[{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)"}]}],CC=TC[0].areas;function EC(e){if(!e)return null;const t=CC.find(n=>e===n.path||e.startsWith(`${n.path}/`));return t?t.key:null}function tx(e,t=[]){const n=EC(e);return!!n&&t.includes(n)}const NC={global:{enabled:!1,message:null},services:{enabled:!1,message:null},vehicles:{enabled:!1,message:null}},_C={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}},MC={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:_C,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:[]},LC=["/impressum","/datenschutz","/agb"];function AC(){const[e,t]=g.useState(null),[n,r]=g.useState(MC),[s,i]=g.useState(!1),[o,a]=g.useState({}),[u,c]=g.useState([]),{loading:d,hasPermission:f}=Hs(),h=rt();if(g.useEffect(()=>{Z.get("/maintenance").then(t).catch(()=>t(NC)),Z.get("/site-settings").then(r).catch(()=>{}).finally(()=>i(!0)),Z.get("/text-styles").then(a).catch(()=>{}),Z.get("/custom-fonts").then(c).catch(()=>{})},[]),g.useEffect(()=>{n.site_font?document.documentElement.style.setProperty("--site-font",n.site_font):document.documentElement.style.removeProperty("--site-font")},[n.site_font]),e===null||!s||d)return l.jsx("div",{className:"min-h-screen bg-white dark:bg-neutral-950"});const x=f("maintenance.bypass"),w=LC.includes(h.pathname);return e.global.enabled&&!x&&!w?l.jsx(Rf,{children:l.jsx(qs,{message:e.global.message,fullScreen:!0})}):l.jsx(Rf,{children:l.jsx(pC,{value:{...e,bypass:x},children:l.jsx(Cb,{value:n,children:l.jsx(gC,{value:o,children:l.jsx(Zy,{value:{fonts:u,refresh:()=>{}},children:l.jsxs("div",{className:"page-texture flex min-h-screen flex-col text-neutral-900 dark:text-neutral-100",children:[l.jsx(ex,{}),x&&e.global.enabled&&l.jsx(Qs,{}),l.jsx(cC,{}),l.jsx(Ab,{}),l.jsx("main",{className:"flex-1",children:l.jsx(PC,{enabled:h.pathname!=="/"&&!!n.page_loader_enabled,children:tx(h.pathname,n.hidden_areas)?l.jsx(jr,{to:"/",replace:!0}):l.jsx(Ec,{})})}),l.jsx(zb,{}),l.jsx(hC,{}),l.jsx(mC,{})]})})})})})})}const hm="/assets/logo-BNfZDkmN.png",DC={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"},RC=({path:e})=>l.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:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})});function IC(){const{logout:e,user:t,hasPermission:n}=Hs(),r=Yo(),[s,i]=g.useState(!1),[o,a]=g.useState(0),[u,c]=g.useState([]);g.useEffect(()=>{n("contact.manage")&&Z.get("/contact").then(y=>a(y.filter(k=>k.status==="new").length)).catch(()=>{})},[]);const d=()=>Z.get("/custom-fonts").then(c).catch(()=>{});g.useEffect(()=>{d()},[]);const f=[{title:null,links:[{to:"/admin",label:"Dashboard",icon:"home",end:!0},{to:"/admin/account",label:"Mein Konto",icon:"lock"}]},{title:"Fahrzeug-Katalog",links:[{to:"/admin/brands",label:"Marken",icon:"tag",permission:"brands.manage"},{to:"/admin/models",label:"Modelle",icon:"car",permission:"models.manage"},{to:"/admin/packages",label:"Pakete",icon:"box",permission:"packages.manage"}]},{title:"Website",links:[{to:"/admin/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",icon:"tag",permission:"content.manage"},{to:"/admin/downloads",label:"Downloads",icon:"download",permission:"downloads.manage"}]},{title:"Bildergalerie",links:[{to:"/admin/gallery-brands",label:"Marken",icon:"tag",permission:"gallery.manage"},{to:"/admin/gallery-projects",label:"Projekte",icon:"image",permission:"gallery.manage"}]},{title:"Kunden",links:[{to:"/admin/contact-requests",label:"Kontaktanfragen",icon:"mail",permission:"contact.manage",badge:o}]},{title:"Verwaltung",links:[{to:"/admin/users",label:"Benutzer",icon:"users",permission:"users.manage"},{to:"/admin/permission-groups",label:"Berechtigungsgruppen",icon:"shield",permission:"permission_groups.manage"},{to:"/admin/settings",label:"Einstellungen",icon:"sliders",permission:"settings.manage"}]}].map(y=>({...y,links:y.links.filter(k=>!k.permission||n(k.permission))})).filter(y=>y.links.length>0),h=async()=>{await e(),r("/admin/login")},x=({isActive:y})=>`flex items-center justify-between gap-2 rounded-md px-3 py-2 text-sm font-medium transition ${y?"bg-brand-500 text-white":"text-neutral-600 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-neutral-800"}`,w=({onNavigate:y})=>l.jsx("nav",{className:"space-y-5",children:f.map((k,p)=>l.jsxs("div",{children:[k.title&&l.jsx("p",{className:"mb-1.5 px-3 text-xs font-semibold uppercase tracking-wide text-neutral-400 dark:text-neutral-500",children:k.title}),l.jsx("div",{className:"space-y-1",children:k.links.map(m=>l.jsxs(Vw,{to:m.to,end:m.end,className:x,onClick:y,children:[l.jsxs("span",{className:"flex items-center gap-2.5",children:[l.jsx(RC,{path:DC[m.icon]}),m.label]}),!!m.badge&&l.jsx("span",{className:"rounded-full bg-red-500 px-2 py-0.5 text-xs font-bold text-white",children:m.badge})]},m.to))})]},p))});return l.jsx(Zy,{value:{fonts:u,refresh:d},children:l.jsxs("div",{className:"flex min-h-screen bg-neutral-50 text-neutral-900 dark:bg-neutral-950 dark:text-neutral-100",children:[l.jsx(ex,{}),l.jsxs("aside",{className:"hidden w-60 shrink-0 border-r border-neutral-200 p-4 dark:border-neutral-800 sm:block",children:[l.jsxs("div",{className:"mb-6 flex items-center gap-2 px-3",children:[l.jsxs(W,{to:"/",className:"rounded-lg px-2 py-1",children:[l.jsx("img",{src:hm,alt:"HifiPlanet",className:"h-7 w-auto dark:hidden"}),l.jsx("img",{src:tu,alt:"HifiPlanet",className:"hidden h-7 w-auto dark:block"})]}),l.jsx("span",{className:"text-sm font-semibold text-neutral-500 dark:text-neutral-400",children:"Admin"})]}),l.jsx(w,{})]}),l.jsxs("div",{className:"flex-1",children:[l.jsxs("header",{className:"border-b border-neutral-200 dark:border-neutral-800",children:[l.jsxs("div",{className:"flex items-center justify-between px-4 py-3 sm:px-6",children:[l.jsxs("div",{className:"flex items-center gap-2 sm:hidden",children:[l.jsx("button",{onClick:()=>i(y=>!y),"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:l.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:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h16"})})}),l.jsxs(W,{to:"/",className:"rounded-lg px-1.5 py-0.5",children:[l.jsx("img",{src:hm,alt:"HifiPlanet",className:"h-6 w-auto dark:hidden"}),l.jsx("img",{src:tu,alt:"HifiPlanet",className:"hidden h-6 w-auto dark:block"})]})]}),l.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":""]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(t0,{}),l.jsx("button",{onClick:h,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&&l.jsx("div",{className:"border-t border-neutral-200 px-4 py-3 dark:border-neutral-800 sm:hidden",children:l.jsx(w,{onNavigate:()=>i(!1)})})]}),l.jsx("main",{className:"p-4 sm:p-6",children:l.jsx(g.Suspense,{fallback:l.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}),children:l.jsx(Ec,{})})})]})]})})}function VC(){const{user:e,loading:t}=Hs();return t?l.jsx("div",{className:"flex min-h-screen items-center justify-center text-neutral-500",children:"Lädt…"}):e?l.jsx(Ec,{}):l.jsx(jr,{to:"/admin/login",replace:!0})}function Ae({permission:e,children:t}){const{hasPermission:n}=Hs();return(Array.isArray(e)?e:[e]).some(i=>n(i))?t:l.jsxs("div",{className:"rounded-xl border border-neutral-200 bg-white p-8 text-center dark:border-neutral-800 dark:bg-neutral-900",children:[l.jsx("h1",{className:"mb-2 text-lg font-bold text-neutral-900 dark:text-white",children:"Keine Berechtigung"}),l.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 Qa(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 OC(e){let t=document.head.querySelector('link[rel="canonical"]');t||(t=document.createElement("link"),t.setAttribute("rel","canonical"),document.head.appendChild(t)),t.setAttribute("href",`https://hifi-planet.de${e}`)}function st({title:e,description:t,path:n}){g.useEffect(()=>{e&&(document.title=`${e} | HifiPlanet`,Qa("og:title",`${e} | HifiPlanet`,"property")),t&&(Qa("description",t),Qa("og:description",t,"property")),n&&OC(n)},[e,t,n])}const FC=[.16,1,.3,1],mm={up:{y:40},left:{x:-56},right:{x:56}};function zC(e){return{hidden:{opacity:0,scale:.96,filter:"blur(8px)",...mm[e]||mm.up},visible:{opacity:1,scale:1,x:0,y:0,filter:"blur(0px)"}}}const BC={hidden:{x:"-130%"},visible:{x:"230%",transition:{duration:1.1,ease:"easeInOut",delay:.4}}};function be({children:e,direction:t="up",className:n="",index:r=0,shine:s=!1,style:i}){const o=Math.min(r*.09,.45);return l.jsxs(Bt.div,{className:n,style:{position:"relative",overflow:"hidden",...i},initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.25,margin:"-100px"},variants:zC(t),transition:{duration:.75,ease:FC,delay:o},children:[e,s&&l.jsx(Bt.div,{"aria-hidden":!0,variants:BC,className:"pointer-events-none absolute inset-y-0 -left-1/3 w-1/3 rotate-12 bg-gradient-to-r from-transparent via-white/40 to-transparent"})]})}function $C({items:e}){const[t,n]=g.useState(null);return l.jsx("div",{className:"divide-y divide-neutral-200 rounded-xl border border-neutral-200 bg-white dark:divide-neutral-800 dark:border-neutral-800 dark:bg-neutral-900",children:e.map((r,s)=>{const i=t===s;return l.jsxs("div",{children:[l.jsxs("button",{onClick:()=>n(i?null:s),className:"flex w-full items-center justify-between gap-4 px-5 py-4 text-left","aria-expanded":i,children:[l.jsx("span",{className:"font-medium text-neutral-900 dark:text-white",children:r.question}),l.jsx(Bt.svg,{animate:{rotate:i?180:0},transition:{duration:.2},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-5 w-5 shrink-0 text-neutral-500",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m6 9 6 6 6-6"})})]}),l.jsx(_P,{initial:!1,children:i&&l.jsx(Bt.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:l.jsx("p",{className:"px-5 pb-4 text-sm text-neutral-600 dark:text-neutral-300",children:r.answer})})})]},r.question)})})}function nx({count:e=5,className:t="h-4 w-4"}){return l.jsx("div",{className:"flex gap-0.5 text-amber-400",children:Array.from({length:e}).map((n,r)=>l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:t,children:l.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 HC=70;function WC({testimonials:e}){const t=g.useRef(null),n=g.useRef(null),r=g.useRef({pos:0,half:0,hovering:!1,dragging:!1,dragStartX:0,dragStartPos:0,lastTime:null,rafId:null}).current;g.useLayoutEffect(()=>{const i=n.current,o=window.matchMedia("(prefers-reduced-motion: reduce)").matches,a=()=>{i.style.transform=`translateX(${r.pos}px)`},u=m=>{if(r.half<=0)return m;for(;m>0;)m-=r.half;for(;m<=-r.half;)m+=r.half;return m},c=()=>{r.half=i.scrollWidth/2,r.pos===0?r.pos=-r.half:r.pos=u(r.pos),a()};c();const d=new ResizeObserver(c);d.observe(i);const f=m=>{r.lastTime===null&&(r.lastTime=m);const v=(m-r.lastTime)/1e3;r.lastTime=m,!r.dragging&&!r.hovering&&!o&&(r.pos=u(r.pos+HC*v),a()),r.rafId=requestAnimationFrame(f)};r.rafId=requestAnimationFrame(f);const h=t.current,x=()=>{r.hovering=!0},w=()=>{r.hovering=!1},y=m=>{r.dragging=!0,r.dragStartX=m.clientX,r.dragStartPos=r.pos,h.setPointerCapture(m.pointerId),h.classList.add("cursor-grabbing"),h.classList.remove("cursor-grab")},k=m=>{r.dragging&&(r.pos=u(r.dragStartPos+(m.clientX-r.dragStartX)),a())},p=m=>{r.dragging&&(r.dragging=!1,h.hasPointerCapture(m.pointerId)&&h.releasePointerCapture(m.pointerId),h.classList.remove("cursor-grabbing"),h.classList.add("cursor-grab"))};return h.addEventListener("pointerenter",x),h.addEventListener("pointerleave",w),h.addEventListener("pointerdown",y),h.addEventListener("pointermove",k),h.addEventListener("pointerup",p),h.addEventListener("pointercancel",p),()=>{cancelAnimationFrame(r.rafId),d.disconnect(),h.removeEventListener("pointerenter",x),h.removeEventListener("pointerleave",w),h.removeEventListener("pointerdown",y),h.removeEventListener("pointermove",k),h.removeEventListener("pointerup",p),h.removeEventListener("pointercancel",p)}},[e.length]);const s=[...e,...e];return l.jsx("div",{ref:t,className:"marquee-viewport cursor-grab touch-pan-y select-none overflow-hidden",children:l.jsx("div",{ref:n,className:"marquee-track flex w-max gap-5",children:s.map((i,o)=>l.jsx("div",{className:"w-64 shrink-0 sm:w-72 lg:w-80",children:l.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:[l.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:l.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"})}),l.jsx(nx,{className:"relative z-10 mb-3 h-4 w-4",count:i.rating||5}),l.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,'"']}),l.jsxs("div",{className:"relative z-10 mt-auto flex items-center gap-3",children:[i.photo?l.jsx("img",{src:i.photo,alt:"",referrerPolicy:"no-referrer",className:"h-9 w-9 shrink-0 rounded-full object-cover"}):l.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()}),l.jsx("p",{className:"text-sm font-semibold text-neutral-900 dark:text-white",children:i.name})]})]})},`${i.name}-${o}`))})})}function No(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 UC="/assets/gallery-dash2-CEVCErVK.webp",rx="/assets/gallery-amp-purple-CESAKuOf.webp",GC="/assets/gallery-speaker-CUXQZ49Q.webp",sx="/assets/gallery-subs-COSd4seJ.webp",ix="/assets/gallery-dash-Cg-7v9qo.webp",KC="/assets/hero-trunk-Dp4_JHDh.webp",XC="/assets/gallery-rear-8cIXPC7T.webp",YC="/assets/hero-highlight-Co4f1Kj5.webp",qC="/assets/youtube-hintergrund-BqSbCrLQ.mp4",bi={left:"text-left",center:"text-center",right:"text-right"},QC={left:"",center:"mx-auto",right:"ml-auto"},ZC={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 pm({label:e,url:t,className:n,style:r}){const{hidden_areas:s}=ht();return!e||!t||tx(t,s)?null:t.startsWith("/")?l.jsx(W,{to:t,className:n,style:r,children:e}):l.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:n,style:r,children:e})}const JC=[{src:sx,width:900,height:600},{src:rx,width:900,height:600},{src:GC,width:900,height:1200},{src:ix,width:900,height:814},{src:XC,width:900,height:1200},{src:KC,width:1920,height:1280}];function eE(){const{hero_image_path:e}=ht(),t=e||UC,{t:n,language:r}=Te(),s=_c(),i=!s("page.vehicles"),o=n("home.stats"),a=n("home.galleryAlts"),u=JC.map((R,O)=>({...R,alt:a[O]})),[c,d]=g.useState([]),[f,h]=g.useState({}),[x,w]=g.useState([]),y=R=>{const O=f[R]||ZC;return{eyebrow:O[`eyebrow_${r}`]||"",title:O[`title_${r}`]||"",bodyHtml:O[`body_html_${r}`]||"",align:O.text_align||"center",alignX:O.text_align_x,alignY:O.text_align_y,buttonLabel:O[`button_label_${r}`]||"",buttonUrl:O.button_url||"",fontFamily:O.font_family||void 0}},k=De("home_sections.hero.eyebrow"),p=De("home_sections.hero.title"),m=De("home_sections.youtube.eyebrow"),v=De("home_sections.youtube.title"),b=De("home_sections.youtube.button_label"),P=De("home_sections.craft.eyebrow"),C=De("home_sections.craft.title"),S=De("home_sections.advice.eyebrow"),j=De("home_sections.advice.title"),L=De("home_sections.insights.eyebrow"),_=De("home_sections.insights.title"),F=De("home_sections.more.eyebrow"),H=De("home_sections.more.title"),te=De("home_sections.more.button_label");g.useEffect(()=>{Z.get("/home-sections").then(h).catch(()=>{})},[]),g.useEffect(()=>{Z.get("/partners").then(w).catch(()=>{})},[]);const[N,D]=g.useState(null),$=N?N.reviews.filter(R=>R.review_text).map(R=>({name:R.author_name,text:R.review_text,rating:R.rating,photo:R.profile_photo_url})):n("home.testimonials");g.useEffect(()=>{Z.get("/faqs").then(R=>{d(R.map(O=>({question:r==="de"?O.question_de:O.question_en,answer:r==="de"?O.answer_de:O.answer_en})))}).catch(()=>{})},[r]),g.useEffect(()=>{Z.get("/google-reviews").then(R=>{R.rating!=null&&R.reviews.some(O=>O.review_text)&&D(R)}).catch(()=>{})},[]),st({title:n("home.metaTitle"),description:n("home.metaDescription"),path:"/"}),g.useEffect(()=>{if(c.length===0||s("home.faq"))return;const R=document.createElement("script");return R.type="application/ld+json",R.text=JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:c.map(O=>({"@type":"Question",name:O.question,acceptedAnswer:{"@type":"Answer",text:O.answer}}))}),document.head.appendChild(R),()=>document.head.removeChild(R)},[c]);const K=g.useRef(null);g.useEffect(()=>{const R=K.current;if(!R)return;const O=new IntersectionObserver(([me])=>{me.isIntersecting?(R.getAttribute("src")||(R.src=qC),R.play().catch(()=>{})):R.paused||R.pause()},{rootMargin:"300px 0px"});return O.observe(R),()=>O.disconnect()},[]);const E=g.useRef(null),{scrollYProgress:T}=Xy({target:E,offset:["start start","end start"]}),A=Jt(T,[0,1],["-6%","6%"]),z=Jt(T,[0,1],["0%","60%"]),q=Jt(T,[0,.8],[1,0]),Ce=Jt(T,[.5,1],[0,1]),Q=Jt(Ce,R=>R>.05?"auto":"none"),Ve=Jt(T,[.5,1],[16,0]);return l.jsxs("div",{children:[l.jsx(Bt.div,{style:{opacity:Ce,pointerEvents:Q,y:Ve},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:l.jsxs("div",{className:"mx-auto flex max-w-6xl items-center justify-between gap-3",children:[l.jsx("p",{className:"hidden text-sm font-medium text-neutral-600 dark:text-neutral-300 sm:block",children:n("home.stickyCta")}),l.jsxs("div",{className:"flex w-full gap-3 sm:w-auto",children:[i&&l.jsx(W,{to:"/fahrzeuge",className:"flex-1 rounded-md bg-brand-500 px-5 py-2.5 text-center text-sm font-semibold text-white shadow-sm transition hover:-translate-y-0.5 hover:bg-brand-600 sm:flex-none",children:n("home.selectVehicle")}),l.jsx(W,{to:"/kontakt",className:"flex-1 rounded-md border border-neutral-300 px-5 py-2.5 text-center text-sm font-semibold text-neutral-700 transition hover:-translate-y-0.5 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-800 sm:flex-none",children:n("home.getInTouch")})]})]})}),l.jsxs("section",{ref:E,className:"relative -mt-[89px] h-svh min-h-[560px] overflow-hidden sm:-mt-[97px]",children:[l.jsx(Bt.img,{style:{y:A,scale:1.15},src:t,alt:n("home.heroImageAlt"),className:"absolute inset-0 h-full w-full object-cover"}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-neutral-950 via-neutral-950/80 to-neutral-950/40"}),l.jsx(Bt.div,{style:{y:z,opacity:q},className:"absolute inset-0",children:l.jsx("div",{className:"absolute w-full max-w-2xl px-4 text-center sm:px-6",style:{...No(y("hero").alignX,y("hero").alignY,{x:50,y:50}),fontFamily:y("hero").fontFamily},children:l.jsxs(Bt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.7,ease:"easeOut"},children:[y("hero").eyebrow&&l.jsx("p",{className:"mb-3 text-sm font-semibold uppercase tracking-wide text-brand-400",style:k,children:y("hero").eyebrow}),l.jsx("h1",{className:"text-3xl font-extrabold tracking-tight text-white sm:text-5xl",style:p,children:y("hero").title}),l.jsx("div",{className:"legal-content mx-auto mt-4 max-w-2xl text-base text-neutral-200 sm:text-lg",dangerouslySetInnerHTML:{__html:y("hero").bodyHtml}}),l.jsxs("div",{className:"mt-8 flex flex-wrap items-center justify-center gap-3",children:[i&&l.jsx(W,{to:"/fahrzeuge",className:"rounded-md bg-brand-500 px-6 py-3 text-sm font-semibold text-white shadow-sm transition hover:-translate-y-0.5 hover:bg-brand-600 hover:shadow-lg",children:n("home.selectVehicle")}),l.jsx(W,{to:"/kontakt",className:"rounded-md border border-white/30 bg-white/10 px-6 py-3 text-sm font-semibold text-white backdrop-blur transition hover:-translate-y-0.5 hover:bg-white/20",children:n("home.getInTouch")})]})]})})})]}),!s("home.stats")&&l.jsx("section",{className:"border-b border-neutral-200 bg-neutral-950 py-8 dark:border-neutral-800",children:l.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:o.map((R,O)=>l.jsxs(be,{index:O,children:[l.jsx("p",{className:"text-2xl font-extrabold text-brand-400 sm:text-3xl",children:R.value}),l.jsx("p",{className:"text-sm text-neutral-400",children:R.label})]},R.label))})}),!s("home.partners")&&l.jsx("section",{className:"border-b border-neutral-200 py-8 dark:border-neutral-800",children:l.jsxs("div",{className:"mx-auto max-w-6xl px-4 sm:px-6",children:[l.jsx("p",{className:"mb-4 text-center text-xs font-semibold uppercase tracking-wide text-neutral-400",children:n("home.brandsHeading")}),l.jsx("div",{className:"flex flex-wrap items-center justify-center gap-x-8 gap-y-3",children:x.map((R,O)=>l.jsx(be,{index:O,children:R.logo_path?l.jsx("img",{src:R.logo_path,alt:R.name,className:"h-8 max-w-[8rem] object-contain opacity-70 grayscale transition hover:opacity-100 hover:grayscale-0"}):l.jsx("span",{className:"text-lg font-bold text-neutral-400 dark:text-neutral-600",children:R.name})},R.id))})]})}),!s("home.youtube")&&l.jsxs("section",{className:"relative min-h-[70vh] overflow-hidden sm:min-h-[85vh]",children:[l.jsx("video",{ref:K,loop:!0,muted:!0,playsInline:!0,preload:"none",poster:ix,className:"absolute inset-0 h-full w-full object-cover"}),l.jsx("div",{className:"absolute inset-0 bg-black/55"}),l.jsx("div",{className:"absolute w-full max-w-3xl px-4 text-center sm:px-6",style:{...No(y("youtube").alignX,y("youtube").alignY,{x:50,y:50}),fontFamily:y("youtube").fontFamily},children:l.jsxs(be,{children:[y("youtube").eyebrow&&l.jsx("p",{className:"mb-4 text-xs font-semibold uppercase tracking-[0.2em] text-neutral-200 sm:text-sm",style:m,children:y("youtube").eyebrow}),l.jsx("h2",{className:"text-3xl font-bold uppercase tracking-wide text-white sm:text-5xl",style:v,children:y("youtube").title}),l.jsx("div",{className:"legal-content mt-4 text-xs font-semibold uppercase tracking-wide text-neutral-200 sm:text-sm",dangerouslySetInnerHTML:{__html:y("youtube").bodyHtml}}),l.jsx(pm,{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:b})]})})]}),!s("home.craft")&&l.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:l.jsxs("div",{className:"mx-auto max-w-6xl space-y-16 overflow-hidden px-4 sm:px-6",children:[l.jsxs("div",{className:"grid items-center gap-8 md:grid-cols-2",children:[l.jsx(be,{direction:"left",shine:!0,className:"rounded-xl shadow-lg",children:l.jsx("img",{src:sx,alt:n("home.craftImageAlt"),width:900,height:600,className:"w-full rounded-xl object-cover",style:{maxHeight:380}})}),l.jsxs(be,{direction:"right",index:1,className:bi[y("craft").align],style:{fontFamily:y("craft").fontFamily},children:[y("craft").eyebrow&&l.jsx("p",{className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:P,children:y("craft").eyebrow}),l.jsx("h2",{className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",style:C,children:y("craft").title}),l.jsx("div",{className:"legal-content text-neutral-600 dark:text-neutral-300",dangerouslySetInnerHTML:{__html:y("craft").bodyHtml}})]})]}),l.jsxs("div",{className:"grid items-center gap-8 md:grid-cols-2",children:[l.jsxs(be,{direction:"left",className:`order-2 md:order-1 ${bi[y("advice").align]}`,style:{fontFamily:y("advice").fontFamily},children:[y("advice").eyebrow&&l.jsx("p",{className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:S,children:y("advice").eyebrow}),l.jsx("h2",{className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",style:j,children:y("advice").title}),l.jsx("div",{className:"legal-content text-neutral-600 dark:text-neutral-300",dangerouslySetInnerHTML:{__html:y("advice").bodyHtml}})]}),l.jsx(be,{direction:"right",index:1,shine:!0,className:"order-1 md:order-2 rounded-xl shadow-lg",children:l.jsx("img",{src:rx,alt:n("home.adviceImageAlt"),width:900,height:600,className:"w-full rounded-xl object-cover",style:{maxHeight:380}})})]})]})}),!s("home.insights")&&l.jsxs("section",{className:"mx-auto max-w-6xl px-4 py-16 sm:px-6",children:[l.jsxs(be,{className:`mb-8 ${bi[y("insights").align]}`,style:{fontFamily:y("insights").fontFamily},children:[y("insights").eyebrow&&l.jsx("p",{className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:L,children:y("insights").eyebrow}),l.jsx("h2",{className:"text-2xl font-bold text-neutral-900 dark:text-white",style:_,children:y("insights").title}),l.jsx("div",{className:"legal-content mt-2 text-neutral-600 dark:text-neutral-300",dangerouslySetInnerHTML:{__html:y("insights").bodyHtml}})]}),l.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:u.map((R,O)=>l.jsx(be,{index:O%3,shine:!0,className:"aspect-square overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:l.jsx("img",{src:R.src,alt:R.alt,width:R.width,height:R.height,loading:"lazy",className:"h-full w-full object-cover transition duration-300 hover:scale-105"})},R.src))})]}),!s("home.reviews")&&l.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:l.jsxs("div",{className:"mx-auto max-w-6xl px-4 sm:px-6",children:[l.jsxs(be,{className:"mb-10 text-center",children:[l.jsx("div",{className:"mb-2 flex items-center justify-center gap-2",children:l.jsx(nx,{className:"h-6 w-6",count:N?Math.round(N.rating):5})}),l.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")}),l.jsx("p",{className:"mt-1 text-neutral-600 dark:text-neutral-300",children:n("home.reviewsText")}),l.jsx("a",{href:"https://www.google.com/maps/search/?api=1&query=Hifi+Planet+Amorbach+Boxbrunner+Stra%C3%9Fe+20a",target:"_blank",rel:"noopener noreferrer",className:"mt-2 inline-block text-sm font-medium text-brand-600 hover:underline dark:text-brand-400",children:n("home.reviewsLink")})]}),l.jsx(be,{children:l.jsx(WC,{testimonials:$})})]})}),!s("home.more")&&l.jsx("section",{className:"mx-auto max-w-6xl overflow-hidden px-4 py-16 sm:px-6",children:l.jsxs("div",{className:"grid items-center gap-10 md:grid-cols-2",children:[l.jsx(be,{direction:"left",shine:!0,className:"overflow-hidden rounded-xl shadow-lg",children:l.jsx("img",{src:YC,alt:n("home.moreImageAlt"),width:1600,height:905,className:"h-full w-full object-cover",loading:"lazy"})}),l.jsxs(be,{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 ${bi[y("more").align]}`,style:{fontFamily:y("more").fontFamily},children:[y("more").eyebrow&&l.jsx("p",{className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:F,children:y("more").eyebrow}),l.jsx("h2",{className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",style:H,children:y("more").title}),l.jsx("div",{className:`legal-content mb-8 max-w-2xl text-neutral-600 dark:text-neutral-300 ${QC[y("more").align]}`,dangerouslySetInnerHTML:{__html:y("more").bodyHtml}}),l.jsx(pm,{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:te})]})]})}),!s("home.faq")&&l.jsx("section",{className:"border-t border-neutral-300 py-16 dark:border-neutral-700",children:l.jsxs("div",{className:"mx-auto max-w-3xl px-4 sm:px-6",children:[l.jsx(be,{className:"mb-8 text-center",children:l.jsx("h2",{className:"text-2xl font-bold text-neutral-900 dark:text-white",children:n("home.faqHeading")})}),l.jsx(be,{index:1,children:l.jsx($C,{items:c})})]})})]})}function tE(){const[e,t]=g.useState([]),[n,r]=g.useState(""),s=na(),{t:i}=Te(),o=ud(),{vehicle_tile_width:a,vehicle_tile_height:u}=ht(),c={width:`${a}px`,height:`${u}px`};return st({title:i("vehicleSelect.metaTitle"),description:i("vehicleSelect.metaDescription"),path:"/fahrzeuge"}),g.useEffect(()=>{s.vehicles.enabled&&!s.bypass||Z.get("/brands").then(t).catch(d=>r(d.message))},[s.vehicles.enabled,s.bypass]),s.vehicles.enabled&&!s.bypass?l.jsx(qs,{message:s.vehicles.message}):l.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[s.vehicles.enabled&&s.bypass&&l.jsx(Qs,{inline:!0}),l.jsx("h1",{className:"mb-2 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:i("vehicleSelect.title")}),l.jsx("p",{className:"mb-8 text-neutral-600 dark:text-neutral-300",children:i("vehicleSelect.intro")}),n&&l.jsx("p",{className:"text-red-600",children:n}),e.length===0&&!n&&l.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:i("vehicleSelect.empty")}),l.jsx("div",{className:"flex flex-wrap gap-4",children:e.map(d=>d.image_path?l.jsxs(W,{to:`/fahrzeuge/${d.slug}`,style:c,className:"group relative block shrink-0 overflow-hidden rounded-xl bg-neutral-900 shadow-sm transition hover:shadow-lg",children:[l.jsx("img",{src:d.image_path,alt:"",className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/10 to-transparent transition group-hover:from-black/95"}),l.jsx("span",{className:"absolute inset-x-0 bottom-0 p-4 text-center text-lg font-extrabold text-white",style:$n(o,`brands.${d.id}.name`),children:d.name})]},d.id):l.jsx(W,{to:`/fahrzeuge/${d.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:l.jsx("span",{style:$n(o,`brands.${d.id}.name`),children:d.name})},d.id))})]})}function nE(){const{brandSlug:e}=$s(),[t,n]=g.useState(null),[r,s]=g.useState(""),i=na(),{t:o}=Te(),a=ud(),u=De(t?`brands.${t.brand.id}.name`:""),{vehicle_tile_width:c,vehicle_tile_height:d}=ht(),f={width:`${c}px`,height:`${d}px`};return g.useEffect(()=>{i.vehicles.enabled&&!i.bypass||Z.get(`/brands/${e}/models`).then(n).catch(h=>s(h.message))},[e,i.vehicles.enabled,i.bypass]),st({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?l.jsx(qs,{message:i.vehicles.message}):r?l.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:r}):t?l.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[i.vehicles.enabled&&i.bypass&&l.jsx(Qs,{inline:!0}),l.jsxs("p",{className:"mb-1 text-sm text-neutral-500 dark:text-neutral-400",children:[l.jsx(W,{to:"/fahrzeuge",className:"hover:text-brand-500",children:o("brandPage.breadcrumbVehicles")})," / ",l.jsx("span",{style:u,children:t.brand.name})]}),l.jsxs("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:[l.jsx("span",{style:u,children:t.brand.name})," – ",o("brandPage.titleSuffix")]}),t.models.length===0&&l.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:o("brandPage.empty")}),l.jsx("div",{className:"flex flex-wrap gap-4",children:t.models.map(h=>h.image_path?l.jsxs(W,{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:[l.jsx("img",{src:h.image_path,alt:"",className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/10 to-transparent transition group-hover:from-black/95"}),l.jsx("span",{className:"absolute inset-x-0 bottom-0 p-4 text-center text-lg font-extrabold text-white",style:$n(a,`car_models.${h.id}.name`),children:h.name})]},h.id):l.jsx(W,{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:l.jsx("span",{style:$n(a,`car_models.${h.id}.name`),children:h.name})},h.id))})]}):l.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:o("brandPage.loading")})}function rE({text:e}){return e?e.split(/(\*\*[^*]+\*\*)/g).map((n,r)=>{const s=n.match(/^\*\*([^*]+)\*\*$/);return s?l.jsx("strong",{children:s[1]},r):l.jsx("span",{children:n},r)}):null}const gm="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==",sE="/assets/base-BKOm0Bib.webp",iE="/assets/clear-DZZMSrMX.webp",oE="/assets/drive-BE2W1yna.webp",aE="/assets/prime-BTVNe2Gb.webp",lE="/assets/elite_r-BRvz_pyr.webp",uE="/assets/apex-CFy2qup8.webp",cE="/assets/statement-pTO-wTPx.webp",dE="/assets/limitless-DDs0S_PU.webp",fE=(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)]},Za=(e,t,n)=>`rgb(${fE(e,t,n).join(", ")})`,ym=e=>e.map(([t,n,r,s,i,o])=>({bgTop:Za(t,n,r),border:Za(t,n,r+8),accent:Za(s,i,o),img:null})),xm={graphite:[{accent:"#b6b6b6",border:"#2a2a2a",bgTop:"#1c1c1c",img:sE},{accent:"#d3d3d3",border:"#2e2e2e",bgTop:"#212121",img:iE},{accent:"#8fb8bd",border:"#26383b",bgTop:"#16282b",img:oE},{accent:"#6fbf73",border:"#1f3a24",bgTop:"#122916",img:aE},{accent:"#63d34f",border:"#204a1c",bgTop:"#123312",img:lE},{accent:"#8bea3c",border:"#2b5518",bgTop:"#173a0f",img:uE},{accent:"#d9a83c",border:"#4a3a16",bgTop:"#33270d",img:cE},{accent:"#f2c14e",border:"#5a4718",bgTop:"#3d2f0c",img:dE}],"deep-blue":ym([[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":ym([[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]])},hE="#f2f2f2",mE="#8a8a8a",pE="#c4c4c4",vm=5,gE=3,yE={recommended:{Icon:hb,className:"bg-brand-500 text-white"},popular:{Icon:Ok,className:"bg-amber-400 text-neutral-950"},tip:{Icon:$k,className:"bg-sky-500 text-white"},coming_soon:{Icon:Qg,className:"bg-white text-neutral-900"},custom:{Icon:null,className:"bg-brand-500 text-white"}};function xE({pkg:e,tier:t,tierT:n,layout:r,bullets:s,formatPrice:i,contactUrl:o,t:a}){const[u,c]=g.useState(!1),[d,f]=g.useState(!1),h=g.useRef(null),x=s.length-vm,w=u?s:s.slice(0,vm);g.useLayoutEffect(()=>{const S=h.current;if(!S||u){f(!1);return}const j=()=>f([...S.querySelectorAll("[data-clamp]")].some(_=>_.scrollHeight>_.clientHeight+1));j();const L=new ResizeObserver(j);return L.observe(S),()=>L.disconnect()},[u,s.length,e.description]);const y=ud(),k=$n(y,`packages.${e.id}.description`),p=$n(y,`packages.${e.id}.price_text`),{package_card_height:m}=ht(),v=yE[e.badge],b=r!=="grid",P=e.badge==="custom"?e.badge_text:e.badge&&a(`modelPage.badges.${e.badge}`),C=t.img?null:{backgroundColor:t.accent,WebkitMaskImage:`url(${gm})`,maskImage:`url(${gm})`,maskMode:"luminance",WebkitMaskSize:"cover",maskSize:"cover",WebkitMaskPosition:"center",maskPosition:"center",WebkitMaskRepeat:"no-repeat",maskRepeat:"no-repeat"};return l.jsxs("div",{style:{borderColor:t.border,background:`linear-gradient(180deg, ${t.bgTop} 0%, #0b0b0b 55%, #080808 100%)`,...b?{gridRow:"span 4",gridTemplateRows:"subgrid",rowGap:0}:{minHeight:`${m}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?l.jsx("img",{src:t.img,alt:"","aria-hidden":"true",className:"pointer-events-none absolute inset-0 h-full w-full object-cover"}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"pointer-events-none absolute inset-0",style:{...C,opacity:.2+n*.45,filter:"blur(18px)"},"aria-hidden":"true"}),l.jsx("div",{className:"pointer-events-none absolute inset-0",style:{...C,opacity:.55+n*.45},"aria-hidden":"true"})]}),v&&P&&l.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 ${v.className}`,children:[v.Icon&&l.jsx(v.Icon,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),l.jsx("span",{className:"truncate",children:P})]}),l.jsxs("div",{className:"relative z-10 text-center",style:{padding:"34px 20px 0",gridRow:1},children:[l.jsx("div",{style:{fontFamily:"'Barlow Condensed', sans-serif",fontSize:"30px",letterSpacing:"3px",fontWeight:600,color:t.accent,textTransform:"uppercase",lineHeight:1.1},children:e.name}),l.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&&l.jsxs("div",{className:"relative z-10",style:{gridRow:2,padding:"18px 20px 14px",background:u?"linear-gradient(180deg, rgba(8,8,8,0.7) 0%, rgba(8,8,8,0.62) 94%, rgba(8,8,8,0) 100%)":"linear-gradient(180deg, rgba(8,8,8,0.55) 0%, rgba(8,8,8,0.48) 92%, rgba(8,8,8,0) 100%)"},children:[l.jsx("ul",{ref:h,className:"space-y-1.5 text-left",children:w.map((S,j)=>l.jsxs("li",{className:"flex items-start gap-2",style:{fontSize:"13px",color:pE,...S.fromDescription?k:null},children:[l.jsx(fk,{className:"mt-0.5 h-3.5 w-3.5 shrink-0",style:{color:t.accent}}),l.jsx("span",{"data-clamp":!0,className:"leading-snug",style:u?void 0:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:gE,overflow:"hidden"},children:S.fromDescription?l.jsx(rE,{text:S.text}):S.text})]},j))}),(u||x>0||d)&&l.jsxs("button",{type:"button",onClick:()=>c(S=>!S),className:"mt-2.5 flex items-center gap-1 hover:opacity-80",style:{fontSize:"13px",color:t.accent},children:[u?a("modelPage.lessBullets"):x>0?a("modelPage.moreBullets")(x):a("modelPage.showMore"),u?l.jsx(wk,{className:"h-3.5 w-3.5"}):l.jsx(mk,{className:"h-3.5 w-3.5"})]})]}),l.jsx("div",{className:"relative z-10 flex-1",style:{gridRow:3}}),l.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:l.jsxs("div",{className:"text-center",children:[!e.price_text&&l.jsx("div",{style:{fontSize:"13px",color:mE},children:a("modelPage.totalPrice")}),l.jsx("div",{style:{marginTop:"4px",fontFamily:"'Barlow Condensed', sans-serif",fontSize:"30px",fontWeight:600,letterSpacing:"1px",color:hE,...e.price_text?p:null},children:e.price_text||i(e.total_price)}),l.jsx(W,{to:o(e),className:"mt-4 inline-block rounded-md bg-brand-500 px-4 py-2 text-center text-sm font-semibold text-white shadow-lg shadow-brand-500/30 hover:bg-brand-400",children:a("modelPage.requestContact")}),e.video_url&&l.jsx("div",{className:"mt-3",children:l.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:[l.jsx(bk,{className:"h-4 w-4 text-red-500","aria-hidden":"true"}),a("modelPage.videoLink")]})})]})})]})}function vE(){const{brandSlug:e,modelSlug:t}=$s(),[n,r]=g.useState(null),[s,i]=g.useState(""),o=na(),{t:a,language:u}=Te(),{package_card_theme:c,package_card_layout:d,package_wheel_hint_interval:f,package_card_width:h,package_card_height:x}=ht(),w=xm[c]||xm.graphite,y=["grid","strip","coverflow"].includes(d)?d:"strip",k=Math.max(2,Number(f)||8)*1e3,p=g.useRef(null),m=g.useRef(null),v=g.useRef(null),[b,P]=g.useState(!1),C=N=>new Intl.NumberFormat(u==="de"?"de-DE":"en-US",{style:"currency",currency:"EUR"}).format(N);g.useEffect(()=>{o.vehicles.enabled&&!o.bypass||Z.get(`/models/${e}/${t}/packages`).then(r).catch(N=>i(N.message))},[e,t,o.vehicles.enabled,o.bypass]),g.useEffect(()=>{const N=p.current;if(y!=="coverflow"||!N)return;let D=0;const $=()=>{D=0;const T=N.scrollLeft+N.clientWidth/2;for(const A of N.children){const z=A.offsetLeft+A.offsetWidth/2,q=Math.max(-1,Math.min(1,(z-T)/(A.offsetWidth*1.4))),Ce=Math.abs(q);A.style.transform=`rotateY(${(-q*35).toFixed(2)}deg) scale(${(1-Ce*.13).toFixed(3)}) translateZ(${(-Ce*60).toFixed(1)}px)`,A.style.zIndex=String(100-Math.round(Ce*50))}},K=()=>{D||(D=requestAnimationFrame($))};$(),N.addEventListener("scroll",K,{passive:!0});const E=new ResizeObserver(K);return E.observe(N),()=>{N.removeEventListener("scroll",K),E.disconnect(),cancelAnimationFrame(D)}},[y,n]),g.useEffect(()=>{const N=p.current;if(y==="grid"||!N)return;const D=window.matchMedia("(pointer: coarse)").matches;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let K=[],E=0;const T=()=>{const z=Math.min(N.clientWidth*.4,160);K.push(setTimeout(()=>N.scrollTo({left:z,behavior:"smooth"}),500)),K.push(setTimeout(()=>N.scrollTo({left:0,behavior:"smooth"}),1250)),D||(K.push(setTimeout(()=>P(!0),450)),K.push(setTimeout(()=>P(!1),1700)))},A=new IntersectionObserver(([z])=>{z.isIntersecting&&(A.disconnect(),T(),E=setInterval(()=>{N.scrollLeft<=1&&T()},k))},{threshold:.35});return A.observe(N),()=>{A.disconnect(),clearInterval(E),K.forEach(clearTimeout)}},[y,n,k]),g.useEffect(()=>{const N=p.current;if(y==="grid"||!N)return;let D=0,$=0,K=!1,E=0,T=0;const A=()=>[...N.children].map(Q=>Q.offsetLeft+Q.offsetWidth/2),z=(Q,Ve)=>{let R=0,O=1/0;return Q.forEach((me,Rt)=>{const Zs=Math.abs(me-Ve);Zs{K=!1;const Q=A();if(!Q.length)return;const Ve=N.scrollLeft+N.clientWidth/2,R=z(Q,Ve);let O=R;R===E&&Math.abs(T)>4&&(O=T>0?Math.min(E+1,Q.length-1):Math.max(E-1,0));const me=N.scrollWidth-N.clientWidth,Rt=Math.max(0,Math.min(Q[O]-N.clientWidth/2,me));N.scrollTo({left:Rt,behavior:"smooth"}),clearTimeout($),$=setTimeout(()=>{N.style.scrollSnapType=""},450)},Ce=Q=>{if(Math.abs(Q.deltaX)>Math.abs(Q.deltaY))return;const Ve=N.scrollWidth-N.clientWidth;if(Ve<=1)return;const R=N.scrollLeft<=1,O=N.scrollLeft>=Ve-1;Q.deltaY<0&&R||Q.deltaY>0&&O||(Q.preventDefault(),K||(K=!0,T=0,E=z(A(),N.scrollLeft+N.clientWidth/2)),T+=Q.deltaY,N.style.scrollSnapType="none",N.scrollLeft+=Q.deltaY,clearTimeout(D),D=setTimeout(q,150))};return N.addEventListener("wheel",Ce,{passive:!1}),()=>{N.removeEventListener("wheel",Ce),clearTimeout(D),clearTimeout($)}},[y,n]),g.useEffect(()=>{const N=p.current,D=m.current,$=v.current;if(y==="grid"||!N||!D||!$)return;let K=0;const E=()=>{K=0;const O=N.scrollWidth-N.clientWidth;if(O<=1){D.style.opacity="0",D.style.pointerEvents="none";return}D.style.opacity="1",D.style.pointerEvents="auto";const me=D.clientWidth,Rt=Math.max(32,N.clientWidth/N.scrollWidth*me);$.style.width=`${Rt}px`,$.style.transform=`translateX(${(N.scrollLeft/O*(me-Rt)).toFixed(1)}px)`},T=()=>{K||(K=requestAnimationFrame(E))};E(),N.addEventListener("scroll",T,{passive:!0});const A=new ResizeObserver(T);A.observe(N);let z=!1,q=0;const Ce=O=>{const me=D.getBoundingClientRect(),Rt=$.clientWidth,Zs=Math.min(Math.max(O-me.left-q,0),me.width-Rt);N.scrollLeft=Zs/(me.width-Rt)*(N.scrollWidth-N.clientWidth)},Q=O=>{z=!0,D.setPointerCapture(O.pointerId),N.style.scrollSnapType="none";const me=$.getBoundingClientRect();q=O.clientX>=me.left&&O.clientX<=me.right?O.clientX-me.left:$.clientWidth/2,O.clientX>=me.left&&O.clientX<=me.right||Ce(O.clientX)},Ve=O=>{z&&Ce(O.clientX)},R=O=>{var me;z&&(z=!1,(me=D.hasPointerCapture)!=null&&me.call(D,O.pointerId)&&D.releasePointerCapture(O.pointerId),N.style.scrollSnapType="")};return D.addEventListener("pointerdown",Q),D.addEventListener("pointermove",Ve),D.addEventListener("pointerup",R),D.addEventListener("pointercancel",R),()=>{N.removeEventListener("scroll",T),A.disconnect(),cancelAnimationFrame(K),D.removeEventListener("pointerdown",Q),D.removeEventListener("pointermove",Ve),D.removeEventListener("pointerup",R),D.removeEventListener("pointercancel",R)}},[y,n]),st({title:n?a("modelPage.metaTitle")(n.model.brand_name,n.model.name):a("modelPage.metaTitleFallback"),description:n?a("modelPage.metaDescription")(n.model.brand_name,n.model.name):void 0,path:`/fahrzeuge/${e}/${t}`});const S=De(n?`car_models.${n.model.id}.name`:"");if(o.vehicles.enabled&&!o.bypass)return l.jsx(qs,{message:o.vehicles.message});if(s)return l.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:s});if(!n)return l.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:a("modelPage.loading")});const{model:j,packages:L}=n,_=new Map([...L].sort((N,D)=>N.total_price-D.total_price).map((N,D)=>[N.id,D])),F=N=>{const D=N.tier_count??L.length,$=N.tier_rank??_.get(N.id)??0,K=D<=1?0:$/(D-1),E=Math.round(K*(w.length-1));return{tier:w[E],tierT:K}},H=N=>[...N.products.map(D=>({text:D.name_override||D.scraped_name||a("modelPage.productLoading"),fromDescription:!1})),...(N.description||"").split(` -`).map(D=>D.trim()).filter(Boolean).map(D=>({text:D,fromDescription:!0}))],te=N=>`/kontakt?${new URLSearchParams({brand:j.brand_name,model:j.name,package:N.name,packageId:N.id,total:N.total_price}).toString()}`;return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"mx-auto max-w-6xl px-4 pt-12 sm:px-6",children:[o.vehicles.enabled&&o.bypass&&l.jsx(Qs,{inline:!0}),l.jsxs("p",{className:"mb-1 text-sm text-neutral-500 dark:text-neutral-400",children:[l.jsx(W,{to:"/fahrzeuge",className:"hover:text-brand-500",children:a("modelPage.breadcrumbVehicles")})," /"," ",l.jsx(W,{to:`/fahrzeuge/${e}`,className:"hover:text-brand-500",children:j.brand_name})," / ",l.jsx("span",{style:S,children:j.name})]}),l.jsxs("h1",{className:`text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl ${L.length?"mb-2":"mb-8"}`,children:[j.brand_name," ",l.jsx("span",{style:S,children:j.name})," – ",a("modelPage.titleSuffix")]}),L.length===0&&l.jsx("p",{className:"pb-12 text-neutral-500 dark:text-neutral-400",children:a("modelPage.empty")})]}),L.length>0&&l.jsx("section",{className:"py-10 sm:py-14",style:{fontFamily:"'Barlow', sans-serif"},children:l.jsxs("div",{className:y==="grid"?"mx-auto max-w-6xl px-4 sm:px-6":"relative mx-auto max-w-[1880px] px-4 sm:px-6",children:[l.jsx("div",{ref:y==="grid"?void 0:p,className:y==="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:y==="grid"?{gridTemplateColumns:`repeat(auto-fill, minmax(${h}px, 1fr))`,gridAutoRows:"1fr"}:{gridAutoFlow:"column",gridAutoColumns:`${h}px`,gridTemplateRows:"auto auto 1fr auto",minHeight:`${Number(x)+(y==="coverflow"?22:12)}px`,...y==="coverflow"?{perspective:"1200px",paddingLeft:`calc(50% - ${h/2}px)`,paddingRight:`calc(50% - ${h/2}px)`,paddingTop:"10px"}:null},children:L.map(N=>{const{tier:D,tierT:$}=F(N);return l.jsx(xE,{pkg:N,tier:D,tierT:$,layout:y,bullets:H(N),formatPrice:C,contactUrl:te,t:a},N.id)})}),y!=="grid"&&l.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 ${b?"opacity-100":"opacity-0"}`,"aria-hidden":"true",children:l.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:[l.jsx(gk,{className:"h-3.5 w-3.5 text-brand-400"}),l.jsx(Zk,{className:"h-4 w-4 text-brand-400"}),l.jsx(xk,{className:"h-3.5 w-3.5 text-brand-400"}),l.jsx("span",{children:a("modelPage.wheelHint")})]})}),y!=="grid"&&l.jsx("div",{ref:m,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:l.jsx("div",{ref:v,className:"absolute left-0 top-0 h-full rounded-full bg-brand-500 shadow-[0_0_10px_rgba(107,166,38,0.7)]",style:{width:"48px"}})})]})})]})}function wE(){const[e,t]=g.useState(null),[n,r]=g.useState(""),{t:s}=Te(),{gallery_card_text_x:i,gallery_card_text_y:o}=ht();return st({title:s("galleryOverview.metaTitle"),description:s("galleryOverview.metaDescription"),path:"/galerie"}),g.useEffect(()=>{Z.get("/gallery-brands").then(t).catch(a=>r(a.message))},[]),l.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[l.jsx("h1",{className:"mb-2 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:s("galleryOverview.title")}),l.jsx("p",{className:"mb-8 text-neutral-600 dark:text-neutral-300",children:s("galleryOverview.intro")}),n&&l.jsx("p",{className:"text-red-600",children:n}),!e&&!n&&l.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:s("galleryOverview.loading")}),e&&e.length===0&&l.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:s("galleryOverview.empty")}),l.jsx("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4",children:e==null?void 0:e.map(a=>l.jsxs(W,{to:`/galerie/${a.slug}`,className:"group relative block aspect-[4/3] overflow-hidden rounded-xl bg-neutral-900 shadow-sm transition hover:shadow-lg",children:[a.cover_image_path?l.jsx("img",{src:a.cover_image_path,alt:a.name,className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}):l.jsx("div",{className:"flex h-full w-full items-center justify-center bg-neutral-200 dark:bg-neutral-800"}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/10 to-transparent transition group-hover:from-black/95"}),l.jsx("span",{className:"absolute whitespace-nowrap p-4 text-lg font-extrabold text-white",style:No(i,o,{x:0,y:100}),children:a.name})]},a.id))})]})}function kE(){const{brandSlug:e}=$s(),[t,n]=g.useState(null),[r,s]=g.useState(""),{t:i}=Te(),{gallery_card_text_x:o,gallery_card_text_y:a}=ht();return g.useEffect(()=>{Z.get(`/gallery-brands/${e}/projects`).then(n).catch(u=>s(u.message))},[e]),st({title:t?i("galleryBrandPage.metaTitle")(t.brand.name):i("galleryBrandPage.metaTitleFallback"),description:t?i("galleryBrandPage.metaDescription")(t.brand.name):void 0,path:`/galerie/${e}`}),r?l.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:r}):t?l.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[l.jsxs("p",{className:"mb-1 text-sm text-neutral-500 dark:text-neutral-400",children:[l.jsx(W,{to:"/galerie",className:"hover:text-brand-500",children:i("galleryBrandPage.breadcrumbGallery")})," / ",t.brand.name]}),l.jsxs("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:[t.brand.name," – ",i("galleryBrandPage.titleSuffix")]}),t.projects.length===0&&l.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:i("galleryBrandPage.empty")}),l.jsx("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4",children:t.projects.map(u=>l.jsxs(W,{to:`/galerie/${e}/${u.slug}`,className:"group relative block aspect-[4/3] overflow-hidden rounded-xl bg-neutral-900 shadow-sm transition hover:shadow-lg",children:[u.cover_image_path?l.jsx("img",{src:u.cover_image_path,alt:u.name,className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}):l.jsx("div",{className:"flex h-full w-full items-center justify-center bg-neutral-200 dark:bg-neutral-800"}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/10 to-transparent transition group-hover:from-black/95"}),l.jsx("span",{className:"absolute whitespace-nowrap p-4 text-lg font-extrabold text-white",style:No(o,a,{x:0,y:100}),children:u.name})]},u.id))})]}):l.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:i("galleryBrandPage.loading")})}function bE({photos:e,index:t,onClose:n,onNavigate:r}){const{t:s}=Te();if(g.useEffect(()=>{if(t==null)return;const a=u=>{u.key==="Escape"&&n(),u.key==="ArrowRight"&&r(1),u.key==="ArrowLeft"&&r(-1)};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[t,n,r]),t==null)return null;const i=e[t],o=a=>a.stopPropagation();return Go.createPortal(l.jsxs("div",{className:"fixed inset-0 z-[200] flex items-center justify-center bg-black/90 p-4",onClick:n,children:[l.jsx("button",{onClick:a=>{o(a),n()},"aria-label":s("lightbox.close"),className:"absolute right-4 top-4 rounded-full p-2 text-white/80 hover:bg-white/10 hover:text-white",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-7 w-7",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6l12 12M18 6 6 18"})})}),e.length>1&&l.jsx("button",{onClick:a=>{o(a),r(-1)},"aria-label":s("lightbox.previous"),className:"absolute left-2 top-1/2 -translate-y-1/2 rounded-full p-2 text-white/80 hover:bg-white/10 hover:text-white sm:left-4",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-8 w-8",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m15 18-6-6 6-6"})})}),l.jsx("img",{src:i.image_path,alt:i.caption||"",onClick:o,className:"max-h-[85vh] max-w-full rounded-lg object-contain"}),e.length>1&&l.jsx("button",{onClick:a=>{o(a),r(1)},"aria-label":s("lightbox.next"),className:"absolute right-2 top-1/2 -translate-y-1/2 rounded-full p-2 text-white/80 hover:bg-white/10 hover:text-white sm:right-4",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-8 w-8",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9 18 6-6-6-6"})})}),i.caption&&l.jsx("p",{onClick:o,className:"absolute bottom-4 left-1/2 -translate-x-1/2 rounded-full bg-black/60 px-4 py-1.5 text-sm text-white",children:i.caption})]}),document.body)}function SE(){const{brandSlug:e,projectSlug:t}=$s(),[n,r]=g.useState(null),[s,i]=g.useState(""),[o,a]=g.useState(null),{t:u}=Te();g.useEffect(()=>{Z.get(`/gallery-brands/${e}/${t}/photos`).then(r).catch(d=>i(d.message))},[e,t]),st({title:n?`${n.project.name} – ${n.project.brand_name}`:u("galleryProjectPage.metaTitleFallback"),description:n?u("galleryProjectPage.metaDescription")(n.project.name):void 0,path:`/galerie/${e}/${t}`});const c=d=>{a(f=>{const h=n.photos.length;return(f+d+h)%h})};return s?l.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:s}):n?l.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[l.jsxs("p",{className:"mb-1 text-sm text-neutral-500 dark:text-neutral-400",children:[l.jsx(W,{to:"/galerie",className:"hover:text-brand-500",children:u("galleryProjectPage.breadcrumbGallery")})," /"," ",l.jsx(W,{to:`/galerie/${e}`,className:"hover:text-brand-500",children:n.project.brand_name})," / ",n.project.name]}),l.jsx("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:n.project.name}),n.photos.length===0&&l.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:u("galleryProjectPage.empty")}),l.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:n.photos.map((d,f)=>l.jsx(be,{index:f%6,shine:!0,className:"aspect-square overflow-hidden rounded-xl",children:l.jsx("button",{onClick:()=>a(f),className:"block h-full w-full","aria-label":d.caption||u("galleryProjectPage.enlargeImage"),children:l.jsx("img",{src:d.image_path,alt:d.caption||"",loading:"lazy",decoding:"async",className:"h-full w-full object-cover transition duration-300 hover:scale-105"})})},d.id))}),l.jsx(bE,{photos:n.photos,index:o,onClose:()=>a(null),onNavigate:c})]}):l.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:u("galleryProjectPage.loading")})}const jE={car:qg,caravan:ck,"car-front":ak,cog:Pk,zap:vb,boxes:ik,"shield-alert":ub,video:yb},PE=g.lazy(()=>ee(()=>import("./iconRegistry-DUWamfSa.js"),__vite__mapDeps([0,1,2])));function TE({name:e,className:t="h-6 w-6",...n}){if(!e)return null;const r=jE[e];return r?l.jsx(r,{className:t,...n}):l.jsx(g.Suspense,{fallback:l.jsx("span",{className:`inline-block ${t}`,"aria-hidden":"true"}),children:l.jsx(PE,{name:e,className:t,...n})})}function CE(){const[e,t]=g.useState([]),n=na(),{t:r}=Te();return g.useEffect(()=>{Z.get("/services").then(t).catch(()=>t([]))},[]),st({title:r("leistungen.metaTitle"),description:r("leistungen.metaDescription"),path:"/leistungen"}),n.services.enabled&&!n.bypass?l.jsx(qs,{message:n.services.message}):l.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[n.services.enabled&&n.bypass&&l.jsx(Qs,{inline:!0}),l.jsx("h1",{className:"mb-2 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:r("leistungen.title")}),l.jsx("p",{className:"mb-10 max-w-2xl text-neutral-600 dark:text-neutral-300",children:r("leistungen.intro")}),l.jsx("div",{className:"grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:e.map((s,i)=>l.jsxs(be,{index:i%3,shine:!0,className:"overflow-hidden rounded-xl border border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-900",children:[l.jsxs("div",{className:"relative aspect-[4/3]",children:[s.image_path&&l.jsx("img",{src:s.image_path,alt:s.title,className:"h-full w-full object-cover",loading:"lazy"}),l.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:l.jsx(TE,{name:s.icon_name,className:"h-6 w-6"})})]}),l.jsxs("div",{className:"p-6 pt-8",children:[l.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:s.title}),l.jsx("p",{className:"mb-3 text-sm text-neutral-600 dark:text-neutral-300",children:s.description}),l.jsxs(W,{to:s.cta_url||"/kontakt",className:"text-sm font-semibold text-brand-600 hover:underline dark:text-brand-400",children:[s.cta_label||r("leistungen.contact")," →"]})]})]},s.id))}),l.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:[l.jsx("h2",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:r("leistungen.notListedTitle")}),l.jsx("p",{className:"mb-5 text-neutral-600 dark:text-neutral-300",children:r("leistungen.notListedText")}),l.jsx(W,{to:"/kontakt",className:"inline-block rounded-md bg-brand-500 px-6 py-3 text-sm font-semibold text-white hover:bg-brand-600",children:r("leistungen.contact")})]})]})}function EE({name:e,description:t,className:n="",children:r}){const{consent:s,acceptAll:i,openSettings:o}=Ar();return s.external?r:l.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:[l.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.`}),l.jsxs("div",{className:"flex flex-wrap justify-center gap-2",children:[l.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"}),l.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 ox=e=>(e||"").replace(/[^\d+]/g,""),NE=e=>`https://wa.me/${ox(e).replace(/^0/,"49").replace("+","")}`,Wi={fontFamily:"'Michroma', sans-serif"};function _E({className:e}){return l.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:l.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 ME({path:e,className:t}){return l.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:l.jsx("path",{d:e})})}const LE={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 wm({formatted:e,color:t}){const[n,r]=e.split("€");return l.jsxs("span",{style:{...Wi,color:t},children:[n,l.jsx("span",{style:{fontFamily:"'Barlow', sans-serif"},children:"€"}),r]})}function Si({icon:e,label:t,name:n,type:r="text",required:s,value:i,onChange:o,placeholder:a}){return l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsx("label",{htmlFor:`kf-${n}`,className:"text-xs font-semibold uppercase tracking-[2px]",style:{color:"var(--kf-label)"},children:t}),l.jsxs("div",{className:"relative flex items-center",children:[l.jsx(e,{className:"pointer-events-none absolute left-[14px] h-[17px] w-[17px]",style:{color:"var(--kf-fieldicon)"}}),l.jsx("input",{id:`kf-${n}`,name:n,type:r,required:s,value:i,onChange:o,placeholder:a,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 AE(){const[e]=zw(),{phone:t,whatsapp:n,contact_email:r,address_street:s,address_zip:i,address_city:o,business_hours:a}=ht(),{t:u,language:c}=Te(),{consent:d}=Ar(),f=[s,[i,o].filter(Boolean).join(" ")].filter(Boolean).join(", "),h=encodeURIComponent(f),x=`https://www.google.com/maps/dir/?api=1&destination=${h}`,w=i0(a,u("footer.closed")),y=T=>new Intl.NumberFormat(c==="de"?"de-DE":"en-US",{style:"currency",currency:"EUR"}).format(T),[k,p]=g.useState({name:"",email:"",phone:"",vin:"",message:""}),[m,v]=g.useState("idle"),[b,P]=g.useState(""),[C,S]=g.useState([]),[j,L]=g.useState([]),_=e.get("packageId"),F=e.get("total")?Number(e.get("total")):null;g.useEffect(()=>{if(!_){S([]);return}Z.get(`/packages/${_}/upgrades`).then(S).catch(()=>S([]))},[_]);const H=T=>{L(A=>A.includes(T)?A.filter(z=>z!==T):[...A,T])},te=C.filter(T=>j.includes(T.id)).reduce((T,A)=>T+Number(A.price),0);st({title:u("contactPage.metaTitle"),description:u("contactPage.metaDescription"),path:"/kontakt"});const N={brand:e.get("brand")||"",model:e.get("model")||"",package:e.get("package")||""},D=!!(N.brand&&N.model&&N.package),$=T=>p(A=>({...A,[T.target.name]:T.target.value})),K=async T=>{T.preventDefault(),v("sending"),P("");try{await Z.post("/contact",{...k,brand_name:N.brand||null,model_name:N.model||null,package_name:N.package||null,product_name:e.get("product")||null,package_id:_||null,package_product_id:e.get("productId")||null,upgrade_ids:j}),v("sent"),p({name:"",email:"",phone:"",vin:"",message:""})}catch(A){P(A.message),v("idle")}},E=[{key:"premium",title:u("contactPage.featurePremiumTitle"),sub:u("contactPage.featurePremiumSub")},{key:"germany",title:u("contactPage.featureGermanyTitle"),sub:u("contactPage.featureGermanySub")},{key:"individual",title:u("contactPage.featureIndividualTitle"),sub:u("contactPage.featureIndividualSub")},{key:"experts",title:u("contactPage.featureExpertsTitle"),sub:u("contactPage.featureExpertsSub")}];return l.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:l.jsxs("div",{className:"relative z-10 mx-auto max-w-[1280px] pt-10 sm:pt-14",children:[l.jsx("div",{className:"mb-3 text-[13px] font-semibold uppercase tracking-[6px]",style:{color:"var(--kf-accent2)"},children:u("contactPage.heroEyebrow")}),l.jsxs("h1",{className:"text-[34px] leading-[1.08] sm:text-[46px] lg:text-[60px]",style:{...Wi,color:"var(--kf-text)"},children:[u("contactPage.heroTitlePre")," ",l.jsx("span",{style:{color:"var(--kf-accent2)"},children:u("contactPage.heroTitleAccent")})," ",u("contactPage.heroTitlePost")]}),l.jsx("p",{className:"mb-10 mt-5 max-w-[520px] text-lg leading-[1.55]",style:{color:"var(--kf-muted)"},children:u("contactPage.heroSubtitle")}),l.jsxs("div",{className:"grid grid-cols-1 items-start gap-10 min-[981px]:grid-cols-[minmax(0,1.35fr)_minmax(320px,1fr)]",children:[l.jsx("div",{children:l.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:[D&&l.jsxs("div",{className:"mb-8 rounded-xl border px-6 py-[22px]",style:{background:"var(--kf-pkgbg)",borderColor:"var(--kf-pkgbrd)"},children:[l.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:[l.jsx(sb,{className:"h-4 w-4"}),u("contactPage.packageBoxTitle")]}),l.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-5 gap-y-2 text-[15px]",children:[l.jsx("span",{style:{color:"var(--kf-label)"},children:u("contactPage.contextBrand")}),l.jsx("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:N.brand}),l.jsx("span",{style:{color:"var(--kf-label)"},children:u("contactPage.contextModel")}),l.jsx("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:N.model}),l.jsx("span",{style:{color:"var(--kf-label)"},children:u("contactPage.contextPackage")}),l.jsx("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:N.package})]}),l.jsxs("div",{className:"mt-3.5 flex items-baseline justify-between border-t pt-3.5",style:{borderColor:"var(--kf-pkgbrd)"},children:[l.jsx("span",{className:"text-[13px] font-semibold uppercase tracking-wide",style:{color:"var(--kf-muted)"},children:u("contactPage.packagePrice")}),l.jsx("span",{className:"text-xl",children:F!=null?l.jsx(wm,{formatted:y(F),color:"var(--kf-text)"}):"—"})]})]}),C.length>0&&l.jsxs("div",{className:"mb-8 rounded-xl border p-5",style:{background:"var(--kf-field)",borderColor:"var(--kf-fieldbrd)"},children:[l.jsx("div",{className:"mb-3 text-xs font-bold uppercase tracking-[2px]",style:{color:"var(--kf-accent2)"},children:u("contactPage.optionalUpgrades")}),l.jsx("div",{className:"space-y-2",children:C.map(T=>l.jsxs("label",{className:"flex cursor-pointer items-start gap-3 rounded-lg border p-3 text-sm",style:{borderColor:"var(--kf-fieldbrd)"},children:[l.jsx("input",{type:"checkbox",checked:j.includes(T.id),onChange:()=>H(T.id),className:"mt-0.5 h-4 w-4 rounded",style:{accentColor:"var(--kf-accent)"}}),l.jsxs("span",{className:"flex-1",children:[l.jsx("span",{className:"block font-semibold",style:{color:"var(--kf-text2)"},children:T.name}),T.description&&l.jsx("span",{className:"block text-xs",style:{color:"var(--kf-muted)"},children:T.description})]}),l.jsxs("span",{className:"font-semibold",style:{color:"var(--kf-accent2)"},children:["+",y(T.price)]})]},T.id))}),j.length>0&&F!=null&&l.jsxs("div",{className:"mt-3 flex items-baseline justify-between border-t pt-3 text-sm",style:{borderColor:"var(--kf-pkgbrd)"},children:[l.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide",style:{color:"var(--kf-muted)"},children:u("contactPage.totalWithUpgrades")}),l.jsx(wm,{formatted:y(F+te),color:"var(--kf-text)"})]})]}),l.jsx("h2",{className:"mb-8 text-xl",style:{...Wi,color:"var(--kf-text)"},children:u("contactPage.formTitle")}),m==="sent"&&l.jsxs("div",{className:"mb-6 rounded-[10px] border p-5",style:{borderColor:"var(--kf-accent)",background:"var(--kf-accentsoft)"},children:[l.jsx("div",{className:"text-base font-bold",style:{color:"var(--kf-accent2)"},children:u("contactPage.sentTitle")}),l.jsx("div",{className:"mt-1 text-sm",style:{color:"var(--kf-muted)"},children:u("contactPage.sentText")})]}),l.jsxs("form",{onSubmit:K,children:[l.jsxs("div",{className:"grid grid-cols-1 gap-6 min-[641px]:grid-cols-2",children:[l.jsx(Si,{icon:pb,label:u("contactPage.nameLabel"),name:"name",required:!0,value:k.name,onChange:$,placeholder:u("contactPage.namePlaceholder")}),l.jsx(Si,{icon:Df,label:u("contactPage.emailLabel"),name:"email",type:"email",required:!0,value:k.email,onChange:$,placeholder:u("contactPage.emailPlaceholder")}),l.jsx(Si,{icon:xo,label:u("contactPage.phoneLabel"),name:"phone",value:k.phone,onChange:$,placeholder:u("contactPage.phonePlaceholder")}),l.jsx(Si,{icon:qg,label:u("contactPage.vinLabel"),name:"vin",value:k.vin,onChange:$,placeholder:u("contactPage.vinPlaceholder")})]}),l.jsxs("div",{className:"mt-6 flex flex-col gap-2",children:[l.jsx("label",{htmlFor:"kf-message",className:"text-xs font-semibold uppercase tracking-[2px]",style:{color:"var(--kf-label)"},children:u("contactPage.messageLabel")}),l.jsx("textarea",{id:"kf-message",name:"message",rows:5,value:k.message,onChange:$,placeholder:u("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)"}})]}),b&&l.jsx("p",{className:"mt-4 text-sm text-red-600 dark:text-red-400",children:b}),l.jsxs("div",{className:"mt-8 flex flex-wrap items-center gap-5",children:[l.jsxs("button",{type:"submit",disabled:m==="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:[l.jsx(ab,{className:"h-[18px] w-[18px]"}),u(m==="sending"?"contactPage.sending":"contactPage.submit")]}),l.jsx("div",{className:"text-[13px]",style:{color:"var(--kf-label)"},children:u("contactPage.requiredHint")})]})]})]})}),l.jsxs("div",{className:"flex flex-col gap-6",children:[l.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:[l.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)"}}),l.jsx("h2",{className:"mb-7 text-[17px]",style:{...Wi,color:"var(--kf-text)"},children:u("contactPage.cardTitle")}),l.jsxs("div",{className:"flex flex-col gap-5",children:[l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("div",{className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full",style:{background:"var(--kf-accentsoft)"},children:l.jsx(xo,{className:"h-[18px] w-[18px]",style:{color:"var(--kf-accent2)"}})}),l.jsxs("div",{children:[l.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:u("contactPage.phone")}),l.jsx("a",{href:`tel:${ox(t)}`,className:"text-base font-semibold",style:{color:"var(--kf-text2)"},children:t})]})]}),l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("div",{className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full",style:{background:"var(--kf-accentsoft)"},children:l.jsx(Df,{className:"h-[18px] w-[18px]",style:{color:"var(--kf-accent2)"}})}),l.jsxs("div",{children:[l.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:u("contactPage.email")}),l.jsx("a",{href:`mailto:${r}`,className:"text-base font-semibold",style:{color:"var(--kf-text2)"},children:r})]})]}),l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("div",{className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full",style:{background:"var(--kf-accentsoft)"},children:l.jsx(Zg,{className:"h-[18px] w-[18px]",style:{color:"var(--kf-accent2)"}})}),l.jsxs("div",{children:[l.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:u("contactPage.address")}),l.jsxs("div",{className:"text-base font-semibold leading-[1.4]",style:{color:"var(--kf-text2)"},children:[s,l.jsx("br",{}),[i,o].filter(Boolean).join(" ")]})]})]}),n&&l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("div",{className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full",style:{background:"var(--kf-accentsoft)"},children:l.jsx(_E,{className:"h-[18px] w-[18px]",style:{color:"var(--kf-accent2)"}})}),l.jsxs("div",{children:[l.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:u("nav.whatsapp")}),l.jsx("a",{href:NE(n),className:"text-base font-semibold",style:{color:"var(--kf-text2)"},children:n})]})]})]}),l.jsxs("div",{className:"mt-7 border-t pt-6",style:{borderColor:"var(--kf-divider)"},children:[l.jsx("div",{className:"mb-3 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:u("contactPage.hours")}),l.jsx("div",{className:"grid grid-cols-[auto_1fr] gap-x-6 gap-y-2 text-[15px]",children:w.map(T=>l.jsxs("span",{style:{display:"contents"},children:[l.jsx("span",{style:{color:"var(--kf-label)"},children:T.days}),l.jsx("span",{children:T.label})]},T.key))})]})]}),l.jsxs("div",{className:"relative overflow-hidden rounded-2xl border",style:{background:"var(--kf-card)",borderColor:"var(--kf-cardbrd)",boxShadow:"var(--kf-shadow)"},children:[d.external&&l.jsxs("a",{href:x,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:[u("contactPage.mapOpenChip"),l.jsx(Nk,{className:"h-3.5 w-3.5",style:{color:"var(--kf-accent2)"}})]}),l.jsx(EE,{name:u("contactPage.mapEmbedName"),className:"h-[210px] w-full",children:l.jsx("div",{className:"h-[210px] overflow-hidden",children:l.jsx("iframe",{title:"HifiPlanet Amorbach – Standort",src:`https://www.google.com/maps?q=${h}&output=embed`,width:"100%",height:"290",style:{border:0,display:"block",marginTop:"-60px"},loading:"lazy",referrerPolicy:"no-referrer-when-downgrade"})})}),l.jsxs("a",{href:x,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:[u("contactPage.routePlan")," →"]})]})]})]}),l.jsx("div",{className:"mt-10 grid grid-cols-1 overflow-hidden rounded-2xl border min-[641px]:grid-cols-2 min-[901px]:grid-cols-4",style:{background:"var(--kf-card)",borderColor:"var(--kf-cardbrd)",boxShadow:"var(--kf-shadow2)"},children:E.map(T=>l.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:[l.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:l.jsx(ME,{path:LE[T.key],className:"h-[22px] w-[22px]"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[15px] font-bold",style:{color:"var(--kf-text)"},children:T.title}),l.jsx("div",{className:"mt-0.5 text-[13px]",style:{color:"var(--kf-muted)"},children:T.sub})]})]},T.key))})]})})}const Nu={audio:["mp3","wav","flac","m4a","aac","ogg","opus","aif","aiff","wma"],video:["mp4","mov","webm"],pdf:["pdf"],image:["jpg","jpeg","png","webp","gif"],archive:["zip","rar","7z"],document:["txt","rtf","doc","docx","xls","xlsx","odt","ods"]},PN=Object.values(Nu).flat(),DE=["mp3","wav","flac","m4a","aac","ogg","opus"],dd=e=>{const t=(e||"").lastIndexOf(".");return t===-1?"":e.slice(t+1).toLowerCase()},RE=e=>{const t=dd(e);return Object.keys(Nu).find(n=>Nu[n].includes(t))||"document"},IE=e=>DE.includes(dd(e)),VE=(e,t="de-DE")=>{const n=["B","KB","MB","GB"];let r=Number(e)||0,s=0;for(;r>=1024&&s=2?1:0}).format(r)} ${n[s]}`},OE={audio:eb,video:Rk,pdf:Af,image:Ak,archive:Mk,document:Af},_u="hifi-downloads-password",FE=()=>{try{return localStorage.getItem(_u)||""}catch{return""}},km=e=>{try{e?localStorage.setItem(_u,e):localStorage.removeItem(_u)}catch{}},bm=e=>Z.get("/downloads",e?{headers:{"X-Download-Password":encodeURIComponent(e)}}:void 0);function zE(){const[e,t]=g.useState(null),[n,r]=g.useState(!1),[s,i]=g.useState(""),[o,a]=g.useState(!1),[u,c]=g.useState(!1),[d,f]=g.useState(""),{t:h,language:x}=Te();g.useEffect(()=>{const y=FE();bm(y).then(k=>{k.locked?(y&&km(""),r(!0)):t(k.items)}).catch(k=>f(k.message))},[]);const w=async y=>{y.preventDefault(),c(!0),a(!1);try{const k=await bm(s);k.locked?a(!0):(km(s),r(!1),t(k.items))}catch(k){f(k.message)}finally{c(!1)}};return st({title:h("downloadsPage.metaTitle"),description:h("downloadsPage.metaDescription"),path:"/downloads"}),l.jsxs("div",{className:"mx-auto max-w-4xl px-4 py-12 sm:px-6",children:[l.jsx("h1",{className:"mb-2 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:h("downloadsPage.title")}),l.jsx("p",{className:"mb-10 max-w-2xl text-neutral-600 dark:text-neutral-300",children:h("downloadsPage.intro")}),d&&l.jsx("p",{className:"text-red-600",children:d}),!d&&!n&&e===null&&l.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:h("downloadsPage.loading")}),(e==null?void 0:e.length)===0&&l.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:h("downloadsPage.empty")}),n&&l.jsxs("form",{onSubmit:w,className:"max-w-md rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[l.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[l.jsx(Wk,{className:"h-5 w-5 text-brand-500","aria-hidden":"true"}),l.jsx("h2",{className:"font-semibold text-neutral-900 dark:text-white",children:h("downloadsPage.lockedTitle")})]}),l.jsx("p",{className:"mb-4 text-sm text-neutral-600 dark:text-neutral-300",children:h("downloadsPage.lockedText")}),l.jsx("label",{htmlFor:"downloads-password",className:"sr-only",children:h("downloadsPage.passwordLabel")}),l.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[l.jsx("input",{id:"downloads-password",type:"password",required:!0,autoComplete:"off",value:s,onChange:y=>i(y.target.value),placeholder:h("downloadsPage.passwordLabel"),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm text-neutral-900 dark:border-neutral-700 dark:bg-neutral-950 dark:text-white"}),l.jsx("button",{type:"submit",disabled:u,className:"shrink-0 rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:h(u?"downloadsPage.unlocking":"downloadsPage.unlock")})]}),o&&l.jsx("p",{className:"mt-2 text-sm text-red-600",role:"alert",children:h("downloadsPage.wrongPassword")})]}),l.jsx("div",{className:"space-y-4",children:e==null?void 0:e.map((y,k)=>{const p=OE[RE(y.file_name)];return l.jsx(be,{index:k%4,className:"rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:l.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start",children:[l.jsx("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-brand-500/10 text-brand-600 dark:text-brand-400",children:l.jsx(p,{className:"h-6 w-6","aria-hidden":"true"})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("h2",{className:"font-semibold text-neutral-900 dark:text-white",children:y.title}),y.description&&l.jsx("p",{className:"mt-1 whitespace-pre-line text-sm text-neutral-600 dark:text-neutral-300",children:y.description}),l.jsxs("p",{className:"mt-1 text-xs text-neutral-400",children:[dd(y.file_name).toUpperCase()," · ",VE(y.file_size,x==="de"?"de-DE":"en-US")]}),IE(y.file_name)&&l.jsx("audio",{controls:!0,preload:"none",src:y.file_path,className:"mt-3 w-full"})]}),l.jsxs("a",{href:y.file_path,download:y.file_name,className:"inline-flex shrink-0 items-center justify-center gap-2 rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:[l.jsx(Ck,{className:"h-4 w-4","aria-hidden":"true"}),h("downloadsPage.download")]})]})},y.id)})})]})}function BE(){const[e,t]=g.useState(null);return g.useEffect(()=>{Z.get("/legal-pages/impressum").then(t).catch(()=>{})},[]),st({title:(e==null?void 0:e.title)||"Impressum",description:"Impressum von HifiPlanet Amorbach gemäß § 5 DDG.",path:"/impressum"}),e?l.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-12 sm:px-6",children:[l.jsx("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:e.title}),l.jsx("div",{className:"legal-content text-sm text-neutral-600 dark:text-neutral-300",dangerouslySetInnerHTML:{__html:e.body_html}})]}):null}function $E(){const[e,t]=g.useState(null);return g.useEffect(()=>{Z.get("/legal-pages/datenschutz").then(t).catch(()=>{})},[]),st({title:(e==null?void 0:e.title)||"Datenschutzerklärung",description:"Datenschutzerklärung von HifiPlanet Amorbach gemäß Art. 13 DSGVO.",path:"/datenschutz"}),e?l.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-12 sm:px-6",children:[l.jsx("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:e.title}),l.jsx("div",{className:"legal-content text-sm text-neutral-600 dark:text-neutral-300",dangerouslySetInnerHTML:{__html:e.body_html}})]}):null}function HE(){const[e,t]=g.useState(null);return g.useEffect(()=>{Z.get("/legal-pages/agb").then(t).catch(()=>{})},[]),st({title:(e==null?void 0:e.title)||"AGB",description:"Allgemeine Geschäftsbedingungen von HifiPlanet Amorbach.",path:"/agb"}),e?l.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-12 sm:px-6",children:[l.jsx("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:e.title}),l.jsx("div",{className:"legal-content text-sm text-neutral-600 dark:text-neutral-300",dangerouslySetInnerHTML:{__html:e.body_html}})]}):null}const Ja="hifi-chunk-reload",re=e=>g.lazy(()=>e().then(t=>{try{sessionStorage.removeItem(Ja)}catch{}return t},t=>{let n=!0;try{n=!!sessionStorage.getItem(Ja),sessionStorage.setItem(Ja,"1")}catch{}if(n)throw t;return window.location.reload(),new Promise(()=>{})})),WE=re(()=>ee(()=>import("./SetupWizard-Cu-s4Wuc.js"),[])),UE=re(()=>ee(()=>import("./Login-Dc1nFqtx.js"),[])),GE=re(()=>ee(()=>import("./Dashboard-m6lX2kWI.js"),[])),KE=re(()=>ee(()=>import("./Brands-V9s4vz2i.js"),__vite__mapDeps([3,4,5]))),XE=re(()=>ee(()=>import("./Models-CyjYxQOO.js"),__vite__mapDeps([6,4,5]))),YE=re(()=>ee(()=>import("./GalleryBrands-CeGo7QXi.js"),__vite__mapDeps([7,4]))),qE=re(()=>ee(()=>import("./GalleryProjects-CfB-fA4x.js"),__vite__mapDeps([8,4]))),QE=re(()=>ee(()=>import("./GalleryPhotos-NPKQDZMi.js"),[])),ZE=re(()=>ee(()=>import("./Packages-6JjKaOj1.js"),__vite__mapDeps([9,5,2,1]))),JE=re(()=>ee(()=>import("./Services-BTvu0ymy.js"),__vite__mapDeps([10,4,0,1,2]))),eN=re(()=>ee(()=>import("./Faqs-CDIDxeRo.js"),[])),tN=re(()=>ee(()=>import("./Partners-BRwobp6H.js"),__vite__mapDeps([11,4]))),nN=re(()=>ee(()=>import("./Downloads-DCZm2dP9.js"),__vite__mapDeps([12,1]))),rN=re(()=>ee(()=>import("./HomeSections-BzNKNMho.js"),__vite__mapDeps([13,14,5]))),sN=re(()=>ee(()=>import("./ContactRequests-BcF_HxL3.js"),[])),iN=re(()=>ee(()=>import("./AccountSettings-CfY49TlQ.js"),[])),oN=re(()=>ee(()=>import("./AdminUsers-C1zi3a_m.js"),[])),aN=re(()=>ee(()=>import("./PermissionGroups-CW64DGq9.js"),[])),lN=re(()=>ee(()=>import("./SettingsLayout-C5JQlIqD.js"),[])),uN=re(()=>ee(()=>import("./WebsiteSettings-B7CzBT2R.js"),__vite__mapDeps([15,4]))),cN=re(()=>ee(()=>import("./LegalSettings-BnY85Lz7.js"),__vite__mapDeps([16,14]))),dN=re(()=>ee(()=>import("./UpdateSettings-CQNnNfsJ.js"),[])),fN=re(()=>ee(()=>import("./EmailSettings-VadOa5J3.js"),__vite__mapDeps([17,14]))),hN=re(()=>ee(()=>import("./DatabaseSettings-pQejbEjR.js"),[])),mN=re(()=>ee(()=>import("./ExportImportSettings-Bkwm__tE.js"),[])),pN=re(()=>ee(()=>import("./MaintenanceSettings-CFGyPBuq.js"),[])),gN=re(()=>ee(()=>import("./ResetSettings-Bm64tgsK.js"),[])),yN=l.jsx("div",{className:"min-h-screen bg-white dark:bg-neutral-950"});function xN(){const{packageId:e}=$s();return l.jsx(jr,{to:`/admin/packages?paket=${e}`,replace:!0})}function vN(){return l.jsxs(l.Fragment,{children:[l.jsx(Ww,{}),l.jsx(Kw,{}),l.jsx(Zw,{children:l.jsx(g.Suspense,{fallback:yN,children:l.jsxs(Pw,{children:[l.jsx(B,{path:"/setup",element:l.jsx(WE,{})}),l.jsxs(B,{element:l.jsx(AC,{}),children:[l.jsx(B,{path:"/",element:l.jsx(eE,{})}),l.jsx(B,{path:"/fahrzeuge",element:l.jsx(tE,{})}),l.jsx(B,{path:"/fahrzeuge/:brandSlug",element:l.jsx(nE,{})}),l.jsx(B,{path:"/fahrzeuge/:brandSlug/:modelSlug",element:l.jsx(vE,{})}),l.jsx(B,{path:"/galerie",element:l.jsx(wE,{})}),l.jsx(B,{path:"/galerie/:brandSlug",element:l.jsx(kE,{})}),l.jsx(B,{path:"/galerie/:brandSlug/:projectSlug",element:l.jsx(SE,{})}),l.jsx(B,{path:"/leistungen",element:l.jsx(CE,{})}),l.jsx(B,{path:"/kontakt",element:l.jsx(AE,{})}),l.jsx(B,{path:"/downloads",element:l.jsx(zE,{})}),l.jsx(B,{path:"/impressum",element:l.jsx(BE,{})}),l.jsx(B,{path:"/datenschutz",element:l.jsx($E,{})}),l.jsx(B,{path:"/agb",element:l.jsx(HE,{})})]}),l.jsx(B,{path:"/admin/login",element:l.jsx(UE,{})}),l.jsx(B,{path:"/admin",element:l.jsx(VC,{}),children:l.jsxs(B,{element:l.jsx(IC,{}),children:[l.jsx(B,{index:!0,element:l.jsx(GE,{})}),l.jsx(B,{path:"account",element:l.jsx(iN,{})}),l.jsx(B,{path:"brands",element:l.jsx(Ae,{permission:"brands.manage",children:l.jsx(KE,{})})}),l.jsx(B,{path:"models",element:l.jsx(Ae,{permission:"models.manage",children:l.jsx(XE,{})})}),l.jsx(B,{path:"gallery-brands",element:l.jsx(Ae,{permission:"gallery.manage",children:l.jsx(YE,{})})}),l.jsx(B,{path:"gallery-projects",element:l.jsx(Ae,{permission:"gallery.manage",children:l.jsx(qE,{})})}),l.jsx(B,{path:"gallery-projects/:projectId/photos",element:l.jsx(Ae,{permission:"gallery.manage",children:l.jsx(QE,{})})}),l.jsx(B,{path:"packages",element:l.jsx(Ae,{permission:"packages.manage",children:l.jsx(ZE,{})})}),l.jsx(B,{path:"packages/:packageId/*",element:l.jsx(xN,{})}),l.jsx(B,{path:"services",element:l.jsx(Ae,{permission:"services.manage",children:l.jsx(JE,{})})}),l.jsx(B,{path:"faqs",element:l.jsx(Ae,{permission:"content.manage",children:l.jsx(eN,{})})}),l.jsx(B,{path:"partners",element:l.jsx(Ae,{permission:"content.manage",children:l.jsx(tN,{})})}),l.jsx(B,{path:"downloads",element:l.jsx(Ae,{permission:"downloads.manage",children:l.jsx(nN,{})})}),l.jsx(B,{path:"home-sections",element:l.jsx(Ae,{permission:"content.manage",children:l.jsx(rN,{})})}),l.jsx(B,{path:"contact-requests",element:l.jsx(Ae,{permission:"contact.manage",children:l.jsx(sN,{})})}),l.jsx(B,{path:"users",element:l.jsx(Ae,{permission:"users.manage",children:l.jsx(oN,{})})}),l.jsx(B,{path:"permission-groups",element:l.jsx(Ae,{permission:"permission_groups.manage",children:l.jsx(aN,{})})}),l.jsxs(B,{path:"settings",element:l.jsx(Ae,{permission:"settings.manage",children:l.jsx(lN,{})}),children:[l.jsx(B,{index:!0,element:l.jsx(jr,{to:"website",replace:!0})}),l.jsx(B,{path:"website",element:l.jsx(uN,{})}),l.jsx(B,{path:"legal",element:l.jsx(cN,{})}),l.jsx(B,{path:"email",element:l.jsx(fN,{})}),l.jsx(B,{path:"database",element:l.jsx(hN,{})}),l.jsx(B,{path:"export-import",element:l.jsx(mN,{})}),l.jsx(B,{path:"maintenance",element:l.jsx(pN,{})}),l.jsx(B,{path:"update",element:l.jsx(Ae,{permission:"system.update",children:l.jsx(dN,{})})}),l.jsx(B,{path:"reset",element:l.jsx(gN,{})})]})]})})]})})})]})}el.createRoot(document.getElementById("root")).render(l.jsx(Dm.StrictMode,{children:l.jsx(Dw,{basename:"/".replace(/\/$/,"")||"/",children:l.jsx(kb,{children:l.jsx(Tb,{children:l.jsx(Db,{children:l.jsx(vN,{})})})})})}));export{qk as $,PN as A,ik as B,bk as C,TE as D,fk as E,gk as F,wk as G,Qg as H,Pk as I,Ck as J,Nk as K,W as L,Mk as M,jr as N,Ec as O,Ak as P,Rk as Q,Dm as R,TC as S,Af as T,Ok as U,zk as V,$k as W,Wk as X,Gk as Y,Df as Z,Zg as _,Z as a,Zk as a0,eb as a1,nb as a2,sb as a3,xo as a4,ab as a5,ub as a6,db as a7,hb as a8,pb as a9,yb as aa,vb as ab,rk as ac,kN as ad,nk as ae,Hs as b,Yo as c,tu as d,$s as e,Go as f,zw as g,mk as h,xk as i,l as j,VE as k,hm as l,Xw as m,jN as n,No as o,Vw as p,Jy as q,g as r,SN as s,Sm as t,st as u,wN as v,U as w,qg as x,ak as y,ck as z}; + `),()=>{var L;(L=a.current)==null||L.removeAttribute("data-motion-pop-id"),j.contains(S)&&j.removeChild(S)}},[t]),l.jsx(CP,{isPresent:t,childRef:a,sizeRef:u,pop:i,children:i===!1?e:g.cloneElement(e,{ref:f})})}const EP=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o,anchorX:a,anchorY:u,root:c})=>{const d=xn(NP),f=g.useId(),h=g.useRef(n),x=g.useRef(r);Ws(()=>{h.current=n,x.current=r});let w=!0,y=g.useMemo(()=>(w=!1,{id:f,initial:t,isPresent:n,custom:s,onExitComplete:k=>{d.set(k,!0);for(const p of d.values())if(!p)return;r&&r()},register:k=>(d.set(k,!1),()=>{var p;d.delete(k),!h.current&&!d.size&&((p=x.current)==null||p.call(x))})}),[n,d,r]);return i&&w&&(y={...y}),g.useMemo(()=>{d.forEach((k,p)=>d.set(p,!1))},[n]),g.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=l.jsx(TP,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:u,root:c,children:e}),l.jsx(Qo.Provider,{value:y,children:e})};function NP(){return new Map}function Ly(e=!0){const t=g.useContext(Qo);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=g.useId();g.useEffect(()=>{if(e)return s(i)},[e]);const o=g.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const xi=e=>e.key||"";function Bh(e){const t=[];return g.Children.forEach(e,n=>{g.isValidElement(n)&&t.push(n)}),t}const _P=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1,anchorX:a="left",anchorY:u="top",root:c})=>{const[d,f]=Ly(o),h=g.useMemo(()=>Bh(e),[e]),x=o&&!d?[]:h.map(xi),w=g.useRef(!0),y=g.useRef(h),k=xn(()=>new Map),p=g.useRef(new Set),[m,v]=g.useState(h),[b,P]=g.useState(h);Ws(()=>{w.current=!1,y.current=h;for(let j=0;j{const L=xi(j),_=o&&!d?!1:h===b||x.includes(L),F=()=>{if(p.current.has(L))return;if(k.has(L))p.current.add(L),k.set(L,!0);else return;let H=!0;k.forEach(te=>{te||(H=!1)}),H&&(S==null||S(),P(y.current),o&&(f==null||f()),r&&r())};return l.jsx(EP,{isPresent:_,initial:!w.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,root:c,onExitComplete:_?void 0:F,anchorX:a,anchorY:u,children:j},L)})})},Ay=g.createContext({strict:!1}),$h={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 Hh=!1;function MP(){if(Hh)return;const e={};for(const t in $h)e[t]={isEnabled:n=>$h[t].some(r=>!!n[r])};uy(e),Hh=!0}function Dy(){return MP(),mj()}function LP(e){const t=Dy();for(const n in e)t[n]={...t[n],...e[n]};uy(t)}const AP=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 To(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||AP.has(e)}let Ry=e=>!To(e);function DP(e){typeof e=="function"&&(Ry=t=>t.startsWith("on")?!To(t):e(t))}try{DP(require("@emotion/is-prop-valid").default)}catch{}function RP(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||ke(e[s])||(Ry(s)||n===!0&&To(s)||!t&&!To(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const ta=g.createContext({});function IP(e,t){if(ea(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Rs(n)?n:void 0,animate:Rs(r)?r:void 0}}return e.inherit!==!1?t:{}}function VP(e){const{initial:t,animate:n}=IP(e,g.useContext(ta));return g.useMemo(()=>({initial:t,animate:n}),[Wh(t),Wh(n)])}function Wh(e){return Array.isArray(e)?e.join(" "):e}const id=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Iy(e,t,n){for(const r in t)!ke(t[r])&&!gy(r,n)&&(e[r]=t[r])}function OP({transformTemplate:e},t){return g.useMemo(()=>{const n=id();return rd(n,t,e),Object.assign({},n.vars,n.style)},[t])}function FP(e,t){const n=e.style||{},r={};return Iy(r,n,e),Object.assign(r,OP(e,t)),r}function zP(e,t){const n={},r=FP(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 Vy=()=>({...id(),attrs:{}});function BP(e,t,n,r){const s=g.useMemo(()=>{const i=Vy();return yy(i,t,vy(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Iy(i,e.style,e),s.style={...i,...s.style}}return s}const $P=["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 od(e){return typeof e!="string"||e.includes("-")?!1:!!($P.indexOf(e)>-1||/[A-Z]/u.test(e))}function HP(e,t,n,{latestValues:r},s,i=!1,o){const u=(o??od(e)?BP:zP)(t,r,s,e),c=RP(t,typeof e=="string",i),d=e!==g.Fragment?{...c,...u,ref:n}:{},{children:f}=t,h=g.useMemo(()=>ke(f)?f.get():f,[f]);return g.createElement(e,{...d,children:h})}function WP({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:UP(n,r,s,e),renderState:t()}}function UP(e,t,n,r){const s={},i=r(e,{});for(const h in i)s[h]=$i(i[h]);let{initial:o,animate:a}=e;const u=ea(e),c=ay(e);t&&c&&!u&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const f=d?a:o;if(f&&typeof f!="boolean"&&!Jo(f)){const h=Array.isArray(f)?f:[f];for(let x=0;x(t,n)=>{const r=g.useContext(ta),s=g.useContext(Qo),i=()=>WP(e,t,r,s);return n?i():xn(i)},GP=Oy({scrapeMotionValuesFromProps:sd,createRenderState:id}),KP=Oy({scrapeMotionValuesFromProps:wy,createRenderState:Vy}),XP=Symbol.for("motionComponentSymbol");function YP(e,t,n){const r=g.useRef(n);g.useInsertionEffect(()=>{r.current=n});const s=g.useRef(null);return g.useCallback(i=>{var a;i&&((a=e.onMount)==null||a.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 Fy=g.createContext({});function Kn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function qP(e,t,n,r,s,i){var v,b;const{visualElement:o}=g.useContext(ta),a=g.useContext(Ay),u=g.useContext(Qo),c=g.useContext(Xs),d=c.reducedMotion,f=c.skipAnimations,h=g.useRef(null),x=g.useRef(!1);r=r||a.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}),x.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const w=h.current,y=g.useContext(Fy);w&&!w.projection&&s&&(w.type==="html"||w.type==="svg")&&QP(h.current,n,s,y);const k=g.useRef(!1);g.useInsertionEffect(()=>{w&&k.current&&w.update(n,u)});const p=n[K0],m=g.useRef(!!p&&typeof window<"u"&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,p))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,p)));return Ws(()=>{x.current=!0,w&&(k.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),w.scheduleRenderMicrotask(),m.current&&w.animationState&&w.animationState.animateChanges())}),g.useEffect(()=>{w&&(!m.current&&w.animationState&&w.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var P;(P=window.MotionHandoffMarkAsComplete)==null||P.call(window,p)}),m.current=!1),w.enteringChildren=void 0)}),w}function QP(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:u,layoutRoot:c,layoutAnchor:d,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:zy(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&Kn(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:u,layoutRoot:c,layoutAnchor:d})}function zy(e){if(e)return e.options.allowProjection!==!1?e.projection:zy(e.parent)}function Ua(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&LP(r);const i=n?n==="svg":od(e),o=i?KP:GP;function a(c,d){let f;const h={...g.useContext(Xs),...c,layoutId:ZP(c)},{isStatic:x}=h,w=VP(c),y=o(c,x);if(!x&&typeof window<"u"){JP();const k=eC(h);f=k.MeasureLayout,w.visualElement=qP(e,y,h,s,k.ProjectionNode,i)}return l.jsxs(ta.Provider,{value:w,children:[f&&w.visualElement?l.jsx(f,{visualElement:w.visualElement,...h}):null,HP(e,c,YP(y,w.visualElement,d),y,x,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=g.forwardRef(a);return u[XP]=e,u}function ZP({layoutId:e}){const t=g.useContext(Mc).id;return t&&e!==void 0?t+"-"+e:e}function JP(e,t){g.useContext(Ay).strict}function eC(e){const t=Dy(),{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 tC(e,t){if(typeof Proxy>"u")return Ua;const n=new Map,r=(i,o)=>Ua(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,Ua(o,void 0,e,t)),n.get(o))})}const nC=(e,t)=>t.isSVG??od(e)?new Mj(t):new Pj(t,{allowProjection:e!==g.Fragment});class rC extends Sn{constructor(t){super(t),t.animationState||(t.animationState=Ij(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Jo(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 sC=0;class iC extends Sn{constructor(){super(...arguments),this.id=sC++,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:a}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){const u=In(this.node,o,a);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 oC={animation:{Feature:rC},exit:{Feature:iC}};function Ys(e){return{point:{x:e.pageX,y:e.pageY}}}const aC=e=>t=>Jc(t)&&e(t,Ys(t));function hs(e,t,n,r){return Is(e,t,aC(n),r)}const By=({current:e})=>e?e.ownerDocument.defaultView:null,Uh=(e,t)=>Math.abs(e-t);function lC(e,t){const n=Uh(e.x,t.x),r=Uh(e.y,t.y);return Math.sqrt(n**2+r**2)}const Gh=new Set(["auto","scroll"]);class $y{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){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=w=>{this.handleScroll(w.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=vi(this.lastRawMoveEventInfo,this.transformPagePoint));const w=Ga(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,k=lC(w.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!k)return;const{point:p}=w,{timestamp:m}=Se;this.history.push({...p,timestamp:m});const{onStart:v,onMove:b}=this.handlers;y||(v&&v(this.lastMoveEvent,w),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,w)},this.handlePointerMove=(w,y)=>{this.lastMoveEvent=w,this.lastRawMoveEventInfo=y,this.lastMoveEventInfo=vi(y,this.transformPagePoint),X.update(this.updatePoint,!0)},this.handlePointerUp=(w,y)=>{this.end();const{onEnd:k,onSessionEnd:p,resumeAnimation:m}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Ga(w.type==="pointercancel"?this.lastMoveEventInfo:vi(y,this.transformPagePoint),this.history);this.startEvent&&k&&k(w,v),p&&p(w,v)},!Jc(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const u=Ys(t),c=vi(u,this.transformPagePoint),{point:d}=c,{timestamp:f}=Se;this.history=[{...d,timestamp:f}];const{onSessionStart:h}=n;h&&h(t,Ga(c,this.history));const x={passive:!0,capture:!0};this.removeListeners=Us(hs(this.contextWindow,"pointermove",this.handlePointerMove,x),hs(this.contextWindow,"pointerup",this.handlePointerUp,x),hs(this.contextWindow,"pointercancel",this.handlePointerUp,x)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Gh.has(r.overflowX)||Gh.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),X.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ft(this.updatePoint)}}function vi(e,t){return t?{point:t(e.point)}:e}function Kh(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ga({point:e},t){return{point:e,delta:Kh(e,Hy(t)),offset:Kh(e,uC(t)),velocity:cC(t,.1)}}function uC(e){return e[0]}function Hy(e){return e[e.length-1]}function cC(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=Hy(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Je(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>Je(t)*2&&(r=e[1]);const i=lt(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 dC(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?ne(n,e,r.max):Math.min(e,n)),e}function Xh(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 fC(e,{top:t,left:n,bottom:r,right:s}){return{x:Xh(e.x,n,s),y:Xh(e.y,t,r)}}function Yh(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Pr(t.min,t.max-r,e.min):r>s&&(n=Pr(e.min,e.max-s,t.min)),Pt(0,1,n)}function pC(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 Cu=.35;function gC(e=Cu){return e===!1?e=0:e===!0&&(e=Cu),{x:qh(e,"left","right"),y:qh(e,"top","bottom")}}function qh(e,t,n){return{min:Qh(e,t),max:Qh(e,n)}}function Qh(e,t){return typeof e=="number"?e:e[t]||0}const yC=new WeakMap;class xC{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=xe(),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(Ys(f).point),this.stopAnimation()},o=(f,h)=>{const{drag:x,dragPropagation:w,onDragStart:y}=this.getProps();if(x&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=$S(x),!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),Et(p=>{let m=this.getAxisMotionValue(p).get()||0;if(At.test(m)){const{projection:v}=this.visualElement;if(v&&v.layout){const b=v.layout.layoutBox[p];b&&(m=ze(b)*(parseFloat(m)/100))}}this.originPoint[p]=m}),y&&X.update(()=>y(f,h),!1,!0),pu(this.visualElement,"transform");const{animationState:k}=this.visualElement;k&&k.setActive("whileDrag",!0)},a=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:x,dragDirectionLock:w,onDirectionLock:y,onDrag:k}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:p}=h;if(w&&this.currentDirection===null){this.currentDirection=wC(p),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,p),this.updateAxis("y",h.point,p),this.visualElement.render(),k&&X.update(()=>k(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 $y(t,{onSessionStart:i,onStart:o,onMove:a,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:a}=this.getProps();a&&X.postRender(()=>a(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||!wi(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=dC(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&&Kn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=fC(r.layoutBox,t):this.constraints=!1,this.elastic=gC(n),s!==this.constraints&&!Kn(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Et(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=pC(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Kn(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=vj(r,s.root,this.visualElement.getTransformPagePoint());let o=hC(s.layout.layoutBox,i);if(n){const a=n(gj(o));this.hasMutatedConstraints=!!a,a&&(o=dy(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),u=this.constraints||{},c=Et(d=>{if(!wi(d,n,this.currentDirection))return;let f=u&&u[d]||{};(o===!0||o===d)&&(f={min:0,max:0});const h=s?200:1e6,x=s?40:1e7,w={type:"inertia",velocity:r?t[d]:0,bounceStiffness:h,bounceDamping:x,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(d,w)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return pu(this.visualElement,t),r.start(Yc(t,r,0,n,this.visualElement,!1))}stopAnimation(){Et(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){Et(n=>{const{drag:r}=this.getProps();if(!wi(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],u=i.get()||0;i.set(t[n]-ne(o,a,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Kn(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Et(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const u=a.get();s[o]=mC({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(),Et(o=>{if(!wi(o,t,null))return;const a=this.getAxisMotionValue(o),{min:u,max:c}=this.constraints[o];a.set(ne(u,c,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;yC.set(this.visualElement,this);const t=this.visualElement.current,n=hs(t,"pointerdown",c=>{const{drag:d,dragListener:f=!0}=this.getProps(),h=c.target,x=h!==t&&XS(h);d&&f&&!x&&this.start(c)});let r;const s=()=>{const{dragConstraints:c}=this.getProps();Kn(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=vC(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),X.read(s);const a=Is(window,"resize",()=>this.scalePositionWithinConstraints()),u=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(Et(f=>{const h=this.getAxisMotionValue(f);h&&(this.originPoint[f]+=c[f].translate,h.set(h.get()+c[f].translate))}),this.visualElement.render())});return()=>{a(),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=Cu,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Zh(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function vC(e,t,n){const r=wu(e,Zh(n)),s=wu(t,Zh(n));return()=>{r(),s()}}function wi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function wC(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class kC extends Sn{constructor(t){super(t),this.removeGroupControls=Ye,this.removeListeners=Ye,this.controls=new xC(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ye}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 Ka=e=>(t,n)=>{e&&X.update(()=>e(t,n),!1,!0)};class bC extends Sn{constructor(){super(...arguments),this.removePointerDownListener=Ye}onPointerDown(t){this.session=new $y(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:Ka(t),onStart:Ka(n),onMove:Ka(r),onEnd:(i,o)=>{delete this.session,s&&X.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=hs(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 Xa=!1;class SC extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),Xa&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Hi.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}),Xa=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||X.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),Tr.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;Xa=!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 Wy(e){const[t,n]=Ly(),r=g.useContext(Mc);return l.jsx(SC,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(Fy),isPresent:t,safeToRemove:n})}const jC={pan:{Feature:bC},drag:{Feature:kC,ProjectionNode:My,MeasureLayout:Wy}};function Jh(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&&X.postRender(()=>i(t,Ys(t)))}class PC extends Sn{mount(){const{current:t}=this.node;t&&(this.unmount=WS(t,(n,r)=>(Jh(this.node,r,"Start"),s=>Jh(this.node,s,"End"))))}unmount(){}}class CC extends Sn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Us(Is(this.node.current,"focus",()=>this.onFocus()),Is(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function em(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&&X.postRender(()=>i(t,Ys(t)))}class TC extends Sn{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=qS(t,(s,i)=>(em(this.node,i,"Start"),(o,{success:a})=>em(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Tu=new WeakMap,Ya=new WeakMap,EC=e=>{const t=Tu.get(e.target);t&&t(e)},NC=e=>{e.forEach(EC)};function _C({root:e,...t}){const n=e||document;Ya.has(n)||Ya.set(n,{});const r=Ya.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(NC,{root:e,...t})),r[s]}function MC(e,t,n){const r=_C(t);return Tu.set(e,n),r.observe(e),()=>{Tu.delete(e),r.unobserve(e)}}const LC={some:0,all:1};class AC extends Sn{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:LC[s]},a=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(),x=d?f:h;x&&x(c)};this.stopObserver=MC(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(DC(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function DC({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const RC={inView:{Feature:AC},tap:{Feature:TC},focus:{Feature:CC},hover:{Feature:PC}},IC={layout:{ProjectionNode:My,MeasureLayout:Wy}},VC={...oC,...RC,...jC,...IC},Bt=tC(VC,nC);function Eo(e){return typeof window>"u"?!1:e?I0():Kc()}const OC=50,tm=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),FC=()=>({time:0,x:tm(),y:tm()}),zC={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function nm(e,t,n,r){const s=n[t],{length:i,position:o}=zC[t],a=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=Pr(0,s.scrollLength,s.current);const c=r-u;s.velocity=c>OC?0:Rc(s.current-a,c)}function BC(e,t,n){nm(e,"x",t,n),nm(e,"y",t,n),t.time=n}function $C(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,a=r.parentNode;for(;!o;)a.tagName==="svg"&&(o=a),a=r.parentNode;r=o}else break;return n}const Eu={start:0,center:.5,end:1};function rm(e,t,n=0){let r=0;if(e in Eu&&(e=Eu[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 HC=[0,0];function WC(e,t,n,r){let s=Array.isArray(e)?e:HC,i=0,o=0;return typeof e=="number"?s=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?s=e.split(" "):s=[e,Eu[e]?e:"0"]),i=rm(s[0],n,r),o=rm(s[1],t),i-o}const Zr={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},UC={x:0,y:0};function GC(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function KC(e,t,n){const{offset:r=Zr.All}=n,{target:s=e,axis:i="y"}=n,o=i==="y"?"height":"width",a=s!==e?$C(s,e):UC,u=s===e?{width:e.scrollWidth,height:e.scrollHeight}:GC(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{XC(e,r.target,n),BC(e,n,s),(r.offset||r.target)&&KC(e,n,r)},notify:()=>t(n)}}const Gn=new WeakMap,sm=new WeakMap,qa=new WeakMap,im=new WeakMap,ki=new WeakMap,om=e=>e===document.scrollingElement?window:e;function Uy(e,{container:t=document.scrollingElement,trackContentSize:n=!1,...r}={}){if(!t)return Ye;let s=qa.get(t);s||(s=new Set,qa.set(t,s));const i=FC(),o=YC(t,e,i,r);if(s.add(o),!Gn.has(t)){const u=()=>{for(const h of s)h.measure(Se.timestamp);X.preUpdate(c)},c=()=>{for(const h of s)h.notify()},d=()=>X.read(u);Gn.set(t,d);const f=om(t);window.addEventListener("resize",d),t!==document.documentElement&&sm.set(t,wu(t,d)),f.addEventListener("scroll",d),d()}if(n&&!ki.has(t)){const u=Gn.get(t),c={width:t.scrollWidth,height:t.scrollHeight};im.set(t,c);const d=()=>{const h=t.scrollWidth,x=t.scrollHeight;(c.width!==h||c.height!==x)&&(u(),c.width=h,c.height=x)},f=X.read(d,!0);ki.set(t,f)}const a=Gn.get(t);return X.read(a,!1,!0),()=>{var f;ft(a);const u=qa.get(t);if(!u||(u.delete(o),u.size))return;const c=Gn.get(t);Gn.delete(t),c&&(om(t).removeEventListener("scroll",c),(f=sm.get(t))==null||f(),window.removeEventListener("resize",c));const d=ki.get(t);d&&(ft(d),ki.delete(t)),im.delete(t)}}const qC=[[Zr.Enter,"entry"],[Zr.Exit,"exit"],[Zr.Any,"cover"],[Zr.All,"contain"]],am={start:0,end:1};function QC(e){const t=e.trim().split(/\s+/);if(t.length!==2)return;const n=am[t[0]],r=am[t[1]];if(!(n===void 0||r===void 0))return[n,r]}function ZC(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=QC(n);if(!r)return;t.push(r)}else return;return t}function JC(e,t){const n=ZC(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 ad(e){if(!e)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[t,n]of qC)if(JC(e,t))return{rangeStart:`${n} 0%`,rangeEnd:`${n} 100%`}}const lm=new Map;function um(e){const t={value:0},n=Uy(r=>{t.value=r[e.axis].progress*100},e);return{currentTime:t,cancel:n}}function Gy({source:e,container:t,...n}){const{axis:r}=n;e&&(t=e);let s=lm.get(t);s||(s=new Map,lm.set(t,s));const i=n.target??"self";let o=s.get(i);o||(o={},s.set(i,o));const a=r+(n.offset??[]).join(",");return o[a]||(n.target&&Eo(n.target)?ad(n.offset)?o[a]=new ViewTimeline({subject:n.target,axis:r}):o[a]=um({container:t,...n}):Eo()?o[a]=new ScrollTimeline({source:t,axis:r}):o[a]=um({container:t,...n})),o[a]}function eT(e,t){const n=Gy(t),r=t.target?ad(t.offset):void 0,s=t.target?Eo(t.target)&&!!r:Eo();return e.attachTimeline({timeline:s?n:void 0,...r&&s&&{rangeStart:r.rangeStart,rangeEnd:r.rangeEnd},observe:i=>(i.pause(),oy(o=>{i.time=i.iterationDuration*o},n))})}function tT(e){return e&&(e.target||e.offset)}function nT(e){return e.length===2}function rT(e,t){return nT(e)||tT(t)?Uy(n=>{e(n[t.axis].progress,n)},t):oy(e,Gy(t))}function Ky(e,{axis:t="y",container:n=document.scrollingElement,...r}={}){if(!n)return Ye;const s={axis:t,container:n,...r};return typeof e=="function"?rT(e,s):eT(e,s)}const sT=()=>({scrollX:wt(0),scrollY:wt(0),scrollXProgress:wt(0),scrollYProgress:wt(0)}),ur=e=>e?!e.current:!1;function cm(e,t,n,r){return{factory:s=>{let i;const o=()=>{if(ur(n)||ur(r)){Tr.read(o);return}i=Ky(s,{...t,axis:e,container:(n==null?void 0:n.current)||void 0,target:(r==null?void 0:r.current)||void 0})};return Tr.read(o),()=>{ty(o),i==null||i()}},times:[0,1],keyframes:[0,1],ease:s=>s,duration:1}}function iT(e,t){return typeof window>"u"?!1:e?I0()&&!!ad(t):Kc()}function Xy({container:e,target:t,...n}={}){const r=xn(sT);iT(t,n.offset)&&(r.scrollXProgress.accelerate=cm("x",n,e,t),r.scrollYProgress.accelerate=cm("y",n,e,t));const s=g.useRef(null),i=g.useRef(!1),o=g.useCallback(()=>(s.current=Ky((a,{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 a;(a=s.current)==null||a.call(s)}),[e,t,JSON.stringify(n.offset)]);return Ws(()=>{if(i.current=!1,ur(e)||ur(t)){i.current=!0;return}else return o()},[o]),g.useEffect(()=>{if(!i.current)return;let a;const u=()=>{const c=ur(e),d=ur(t);!c&&!d&&(a=o())};return Tr.read(u),()=>{ty(u),a==null||a()}},[o]),r}function Yy(e){const t=xn(()=>wt(e)),{isStatic:n}=g.useContext(Xs);if(n){const[,r]=g.useState(e);g.useEffect(()=>t.on("change",r),[])}return t}function qy(e,t){const n=Yy(t()),r=()=>n.set(t());return r(),Ws(()=>{const s=()=>X.preRender(r,!1,!0),i=e.map(o=>o.on("change",s));return()=>{i.forEach(o=>o()),ft(r)}}),n}function oT(e){cs.current=[],e();const t=qy(cs.current,e);return cs.current=void 0,t}function Jt(e,t,n,r){if(typeof e=="function")return oT(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!="function")return aT(e,t,n,r);const o=typeof t=="function"?t:oj(t,n,r),a=Array.isArray(e)?dm(e,o):dm([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&&(a.accelerate={...u,times:t,keyframes:n,isTransformed:!0}),a}function dm(e,t){const n=xn(()=>[]);return qy(e,()=>{n.length=0;const r=e.length;for(let s=0;sObject.keys(n)),i=xn(()=>({}));for(const o of s)i[o]=Jt(e,t,n[o],r);return i}function lT(e,t={}){const{isStatic:n}=g.useContext(Xs),r=()=>ke(e)?e.get():e;if(n)return Jt(r);const s=Yy(r());return g.useInsertionEffect(()=>aj(s,e,t),[s,JSON.stringify(t)]),s}function uT(e,t={}){return lT(e,{type:"spring",...t})}function cT(){const{scrollYProgress:e}=Xy(),t=uT(e,{stiffness:200,damping:30,restDelta:.001});return l.jsx(Bt.div,{style:{scaleX:t},className:"fixed left-0 top-0 z-40 h-0.5 w-full origin-left bg-brand-500"})}const dT=()=>l.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:l.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 qs({message:e,fullScreen:t=!1}){const{t:n}=Ce(),r=l.jsxs("div",{className:"mx-auto max-w-md text-center",children:[l.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:l.jsx(dT,{})}),l.jsx("h1",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:n("maintenance.title")}),l.jsx("p",{className:"text-neutral-600 dark:text-neutral-300",children:e||n("maintenance.defaultMessage")})]});return t?l.jsxs("div",{className:"relative flex min-h-screen items-center justify-center bg-white px-4 dark:bg-neutral-950",children:[r,l.jsxs(W,{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:[l.jsx(Gk,{className:"h-4 w-4"}),n("maintenance.login")]})]}):l.jsx("div",{className:"mx-auto max-w-6xl px-4 py-20 sm:px-6",children:r})}const fm=l.jsx(l.Fragment,{children:'Wartungsmodus aktiv – Besucher sehen aktuell eine Wartungsmeldung. Du siehst diese Seite nur, weil du die Berechtigung "Wartungsmodus umgehen" hast.'});function Qs({inline:e=!1}){return e?l.jsx("div",{className:"mb-8 rounded-lg bg-amber-500 px-4 py-2 text-center text-xs font-semibold text-white",children:fm}):l.jsx("div",{className:"bg-amber-500 px-4 py-2 text-center text-xs font-semibold text-white",children:fm})}function fT({onClose:e}){const{consent:t,saveCustom:n}=Ar(),[r,s]=g.useState(t.external),[i,o]=g.useState(t.analytics),{t:a}=Ce();return l.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center bg-black/50 p-4",onClick:e,children:l.jsxs("div",{className:"w-full max-w-md rounded-xl bg-white p-6 dark:bg-neutral-900",onClick:u=>u.stopPropagation(),children:[l.jsx("h2",{className:"mb-1 text-lg font-bold text-neutral-900 dark:text-white",children:a("cookieConsent.modalTitle")}),l.jsxs("p",{className:"mb-4 text-sm text-neutral-600 dark:text-neutral-300",children:[a("cookieConsent.modalIntro")," ",l.jsx(W,{to:"/datenschutz",className:"underline hover:text-brand-500",onClick:e,children:a("cookieConsent.privacyPolicy")}),"."]}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3 rounded-lg border border-neutral-200 p-3 dark:border-neutral-700",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-semibold text-neutral-800 dark:text-neutral-100",children:a("cookieConsent.necessaryTitle")}),l.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:a("cookieConsent.necessaryDesc")})]}),l.jsx("input",{type:"checkbox",checked:!0,disabled:!0,className:"mt-1 h-4 w-4 shrink-0"})]}),l.jsxs("div",{className:"flex items-start justify-between gap-3 rounded-lg border border-neutral-200 p-3 dark:border-neutral-700",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-semibold text-neutral-800 dark:text-neutral-100",children:a("cookieConsent.externalTitle")}),l.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:a("cookieConsent.externalDesc")})]}),l.jsx("input",{type:"checkbox",checked:r,onChange:u=>s(u.target.checked),className:"mt-1 h-4 w-4 shrink-0"})]}),l.jsxs("div",{className:"flex items-start justify-between gap-3 rounded-lg border border-neutral-200 p-3 dark:border-neutral-700",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-semibold text-neutral-800 dark:text-neutral-100",children:a("cookieConsent.analyticsTitle")}),l.jsx("p",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:a("cookieConsent.analyticsDesc")})]}),l.jsx("input",{type:"checkbox",checked:i,onChange:u=>o(u.target.checked),className:"mt-1 h-4 w-4 shrink-0"})]})]}),l.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[l.jsx("button",{type:"button",onClick:e,className:"rounded-md border border-neutral-300 px-4 py-2 text-sm dark:border-neutral-700",children:a("cookieConsent.cancel")}),l.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:a("cookieConsent.saveSelection")})]})]})})}function hT(){const{decided:e,settingsOpen:t,acceptAll:n,rejectNonEssential:r,openSettings:s,closeSettings:i}=Ar(),{t:o}=Ce();return l.jsxs(l.Fragment,{children:[!e&&l.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:l.jsxs("div",{className:"mx-auto flex max-w-6xl flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[l.jsxs("p",{className:"text-sm text-neutral-600 dark:text-neutral-300",children:[o("cookieConsent.bannerText")," ",o("cookieConsent.moreInfo")," ",l.jsx(W,{to:"/datenschutz",className:"underline hover:text-brand-500",children:o("cookieConsent.privacyPolicy")}),"."]}),l.jsxs("div",{className:"flex flex-wrap gap-2 sm:shrink-0",children:[l.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")}),l.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")}),l.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&&l.jsx(fT,{onClose:i})]})}function mT(){const{consent:e}=Ar(),{ga_measurement_id:t}=ht(),n=g.useRef(!1);return g.useEffect(()=>{if(!t||!e.analytics||n.current)return;n.current=!0;const r=document.createElement("script");r.src=`https://www.googletagmanager.com/gtag/js?id=${t}`,r.async=!0,document.head.appendChild(r),window.dataLayer=window.dataLayer||[];function s(...i){window.dataLayer.push(i)}window.gtag=s,s("js",new Date),s("config",t,{anonymize_ip:!0})},[t,e.analytics]),null}const Qy=g.createContext({global:{enabled:!1,message:null},services:{enabled:!1,message:null},vehicles:{enabled:!1,message:null},bypass:!1}),pT=Qy.Provider;function na(){return g.useContext(Qy)}const ld=g.createContext({}),gT=ld.Provider;function $n(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 De(e){const t=g.useContext(ld);return $n(t,e)}function ud(){return g.useContext(ld)}const yT=[{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'}],cd=g.createContext({fonts:[],refresh:()=>{}}),Zy=cd.Provider;function Jy(){return g.useContext(cd).fonts}function SN(){return g.useContext(cd).refresh}function jN(){const e=Jy();return[...yT,...e.map(t=>({label:t.name,value:t.font_family}))]}function xT(e){const t=/\.([a-z0-9]+)$/i.exec(e||"");return t?t[1].toLowerCase():""}const vT={woff2:"woff2",woff:"woff",ttf:"truetype",otf:"opentype"};function ex(){const e=Jy();if(e.length===0)return null;const t=e.map(n=>{const r=vT[xT(n.file_path)]||"woff2";return`@font-face { font-family: "${n.font_family}"; src: url("${n.file_path}") format("${r}"); font-display: swap; }`}).join(` +`);return l.jsx("style",{children:t})}const wT=150,kT=300,bT=80,ST=5e3;function jT(){return l.jsx("div",{className:"fixed inset-0 z-[200] flex items-center justify-center bg-white dark:bg-neutral-950",children:l.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 PT({enabled:e,children:t}){const n=rt(),[r,s]=g.useState(!e),[i,o]=g.useState(!1),a=g.useRef(null);return g.useLayoutEffect(()=>{const u=a.current;if(!e||!u){s(!0),o(!1);return}s(!1),o(!1);let c=!1,d=0,f=null;const h=new Set,x=setTimeout(()=>{d=Date.now(),o(!0)},wT),w=()=>{s(!0),o(!1)},y=()=>{c=!0,clearTimeout(x),clearTimeout(f),clearTimeout(T),b.disconnect(),P()},k=()=>{if(c)return;y();const S=d?kT-(Date.now()-d):0;S>0?setTimeout(w,S):w()},p=()=>{clearTimeout(f),f=setTimeout(()=>{h.size===0&&Yw()===0&&k()},bT)},m=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)},v=S=>{var j;S.nodeType===1&&(S.tagName==="IMG"&&m(S),(j=S.querySelectorAll)==null||j.call(S,"img").forEach(m))},b=new MutationObserver(S=>{S.forEach(j=>j.addedNodes.forEach(v)),p()});b.observe(u,{childList:!0,subtree:!0});const P=qw(p),T=setTimeout(k,ST);return u.querySelectorAll("img").forEach(m),p(),()=>{c||y()}},[n.pathname,e]),l.jsxs("div",{className:"relative",children:[l.jsx("div",{ref:a,style:e?{visibility:r?"visible":"hidden"}:void 0,children:t}),e&&i&&l.jsx(jT,{})]})}const CT=[{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)"}]}],TT=CT[0].areas;function ET(e){if(!e)return null;const t=TT.find(n=>e===n.path||e.startsWith(`${n.path}/`));return t?t.key:null}function tx(e,t=[]){const n=ET(e);return!!n&&t.includes(n)}const NT={global:{enabled:!1,message:null},services:{enabled:!1,message:null},vehicles:{enabled:!1,message:null}},_T={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}},MT={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:_T,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:[]},LT=["/impressum","/datenschutz","/agb"];function AT(){const[e,t]=g.useState(null),[n,r]=g.useState(MT),[s,i]=g.useState(!1),[o,a]=g.useState({}),[u,c]=g.useState([]),{loading:d,hasPermission:f}=Hs(),h=rt();if(g.useEffect(()=>{Z.get("/maintenance").then(t).catch(()=>t(NT)),Z.get("/site-settings").then(r).catch(()=>{}).finally(()=>i(!0)),Z.get("/text-styles").then(a).catch(()=>{}),Z.get("/custom-fonts").then(c).catch(()=>{})},[]),g.useEffect(()=>{n.site_font?document.documentElement.style.setProperty("--site-font",n.site_font):document.documentElement.style.removeProperty("--site-font")},[n.site_font]),e===null||!s||d)return l.jsx("div",{className:"min-h-screen bg-white dark:bg-neutral-950"});const x=f("maintenance.bypass"),w=LT.includes(h.pathname);return e.global.enabled&&!x&&!w?l.jsx(Rf,{children:l.jsx(qs,{message:e.global.message,fullScreen:!0})}):l.jsx(Rf,{children:l.jsx(pT,{value:{...e,bypass:x},children:l.jsx(Tb,{value:n,children:l.jsx(gT,{value:o,children:l.jsx(Zy,{value:{fonts:u,refresh:()=>{}},children:l.jsxs("div",{className:"page-texture flex min-h-screen flex-col text-neutral-900 dark:text-neutral-100",children:[l.jsx(ex,{}),x&&e.global.enabled&&l.jsx(Qs,{}),l.jsx(cT,{}),l.jsx(Ab,{}),l.jsx("main",{className:"flex-1",children:l.jsx(PT,{enabled:h.pathname!=="/"&&!!n.page_loader_enabled,children:tx(h.pathname,n.hidden_areas)?l.jsx(jr,{to:"/",replace:!0}):l.jsx(Ec,{})})}),l.jsx(zb,{}),l.jsx(hT,{}),l.jsx(mT,{})]})})})})})})}const hm="/assets/logo-BNfZDkmN.png",DT={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"},RT=({path:e})=>l.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:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})});function IT(){const{logout:e,user:t,hasPermission:n}=Hs(),r=Yo(),[s,i]=g.useState(!1),[o,a]=g.useState(0),[u,c]=g.useState([]);g.useEffect(()=>{n("contact.manage")&&Z.get("/contact").then(y=>a(y.filter(k=>k.status==="new").length)).catch(()=>{})},[]);const d=()=>Z.get("/custom-fonts").then(c).catch(()=>{});g.useEffect(()=>{d()},[]);const f=[{title:null,links:[{to:"/admin",label:"Dashboard",icon:"home",end:!0},{to:"/admin/account",label:"Mein Konto",icon:"lock"}]},{title:"Fahrzeug-Katalog",links:[{to:"/admin/brands",label:"Marken",icon:"tag",permission:"brands.manage"},{to:"/admin/models",label:"Modelle",icon:"car",permission:"models.manage"},{to:"/admin/packages",label:"Pakete",icon:"box",permission:"packages.manage"}]},{title:"Website",links:[{to:"/admin/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",icon:"tag",permission:"content.manage"},{to:"/admin/downloads",label:"Downloads",icon:"download",permission:"downloads.manage"}]},{title:"Bildergalerie",links:[{to:"/admin/gallery-brands",label:"Marken",icon:"tag",permission:"gallery.manage"},{to:"/admin/gallery-projects",label:"Projekte",icon:"image",permission:"gallery.manage"}]},{title:"Kunden",links:[{to:"/admin/contact-requests",label:"Kontaktanfragen",icon:"mail",permission:"contact.manage",badge:o}]},{title:"Verwaltung",links:[{to:"/admin/users",label:"Benutzer",icon:"users",permission:"users.manage"},{to:"/admin/permission-groups",label:"Berechtigungsgruppen",icon:"shield",permission:"permission_groups.manage"},{to:"/admin/settings",label:"Einstellungen",icon:"sliders",permission:"settings.manage"}]}].map(y=>({...y,links:y.links.filter(k=>!k.permission||n(k.permission))})).filter(y=>y.links.length>0),h=async()=>{await e(),r("/admin/login")},x=({isActive:y})=>`flex items-center justify-between gap-2 rounded-md px-3 py-2 text-sm font-medium transition ${y?"bg-brand-500 text-white":"text-neutral-600 hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-neutral-800"}`,w=({onNavigate:y})=>l.jsx("nav",{className:"space-y-5",children:f.map((k,p)=>l.jsxs("div",{children:[k.title&&l.jsx("p",{className:"mb-1.5 px-3 text-xs font-semibold uppercase tracking-wide text-neutral-400 dark:text-neutral-500",children:k.title}),l.jsx("div",{className:"space-y-1",children:k.links.map(m=>l.jsxs(Vw,{to:m.to,end:m.end,className:x,onClick:y,children:[l.jsxs("span",{className:"flex items-center gap-2.5",children:[l.jsx(RT,{path:DT[m.icon]}),m.label]}),!!m.badge&&l.jsx("span",{className:"rounded-full bg-red-500 px-2 py-0.5 text-xs font-bold text-white",children:m.badge})]},m.to))})]},p))});return l.jsx(Zy,{value:{fonts:u,refresh:d},children:l.jsxs("div",{className:"flex min-h-screen bg-neutral-50 text-neutral-900 dark:bg-neutral-950 dark:text-neutral-100",children:[l.jsx(ex,{}),l.jsxs("aside",{className:"hidden w-60 shrink-0 border-r border-neutral-200 p-4 dark:border-neutral-800 sm:block",children:[l.jsxs("div",{className:"mb-6 flex items-center gap-2 px-3",children:[l.jsxs(W,{to:"/",className:"rounded-lg px-2 py-1",children:[l.jsx("img",{src:hm,alt:"HifiPlanet",className:"h-7 w-auto dark:hidden"}),l.jsx("img",{src:tu,alt:"HifiPlanet",className:"hidden h-7 w-auto dark:block"})]}),l.jsx("span",{className:"text-sm font-semibold text-neutral-500 dark:text-neutral-400",children:"Admin"})]}),l.jsx(w,{})]}),l.jsxs("div",{className:"flex-1",children:[l.jsxs("header",{className:"border-b border-neutral-200 dark:border-neutral-800",children:[l.jsxs("div",{className:"flex items-center justify-between px-4 py-3 sm:px-6",children:[l.jsxs("div",{className:"flex items-center gap-2 sm:hidden",children:[l.jsx("button",{onClick:()=>i(y=>!y),"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:l.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:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h16"})})}),l.jsxs(W,{to:"/",className:"rounded-lg px-1.5 py-0.5",children:[l.jsx("img",{src:hm,alt:"HifiPlanet",className:"h-6 w-auto dark:hidden"}),l.jsx("img",{src:tu,alt:"HifiPlanet",className:"hidden h-6 w-auto dark:block"})]})]}),l.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":""]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(t0,{}),l.jsx("button",{onClick:h,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&&l.jsx("div",{className:"border-t border-neutral-200 px-4 py-3 dark:border-neutral-800 sm:hidden",children:l.jsx(w,{onNavigate:()=>i(!1)})})]}),l.jsx("main",{className:"p-4 sm:p-6",children:l.jsx(g.Suspense,{fallback:l.jsx("p",{className:"text-sm text-neutral-400",children:"Lädt…"}),children:l.jsx(Ec,{})})})]})]})})}function VT(){const{user:e,loading:t}=Hs();return t?l.jsx("div",{className:"flex min-h-screen items-center justify-center text-neutral-500",children:"Lädt…"}):e?l.jsx(Ec,{}):l.jsx(jr,{to:"/admin/login",replace:!0})}function Ae({permission:e,children:t}){const{hasPermission:n}=Hs();return(Array.isArray(e)?e:[e]).some(i=>n(i))?t:l.jsxs("div",{className:"rounded-xl border border-neutral-200 bg-white p-8 text-center dark:border-neutral-800 dark:bg-neutral-900",children:[l.jsx("h1",{className:"mb-2 text-lg font-bold text-neutral-900 dark:text-white",children:"Keine Berechtigung"}),l.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 Qa(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 OT(e){let t=document.head.querySelector('link[rel="canonical"]');t||(t=document.createElement("link"),t.setAttribute("rel","canonical"),document.head.appendChild(t)),t.setAttribute("href",`https://hifi-planet.de${e}`)}function st({title:e,description:t,path:n}){g.useEffect(()=>{e&&(document.title=`${e} | HifiPlanet`,Qa("og:title",`${e} | HifiPlanet`,"property")),t&&(Qa("description",t),Qa("og:description",t,"property")),n&&OT(n)},[e,t,n])}const FT=[.16,1,.3,1],mm={up:{y:40},left:{x:-56},right:{x:56}};function zT(e){return{hidden:{opacity:0,scale:.96,filter:"blur(8px)",...mm[e]||mm.up},visible:{opacity:1,scale:1,x:0,y:0,filter:"blur(0px)"}}}const BT={hidden:{x:"-130%"},visible:{x:"230%",transition:{duration:1.1,ease:"easeInOut",delay:.4}}};function be({children:e,direction:t="up",className:n="",index:r=0,shine:s=!1,style:i}){const o=Math.min(r*.09,.45);return l.jsxs(Bt.div,{className:n,style:{position:"relative",overflow:"hidden",...i},initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.25,margin:"-100px"},variants:zT(t),transition:{duration:.75,ease:FT,delay:o},children:[e,s&&l.jsx(Bt.div,{"aria-hidden":!0,variants:BT,className:"pointer-events-none absolute inset-y-0 -left-1/3 w-1/3 rotate-12 bg-gradient-to-r from-transparent via-white/40 to-transparent"})]})}function $T({items:e}){const[t,n]=g.useState(null);return l.jsx("div",{className:"divide-y divide-neutral-200 rounded-xl border border-neutral-200 bg-white dark:divide-neutral-800 dark:border-neutral-800 dark:bg-neutral-900",children:e.map((r,s)=>{const i=t===s;return l.jsxs("div",{children:[l.jsxs("button",{onClick:()=>n(i?null:s),className:"flex w-full items-center justify-between gap-4 px-5 py-4 text-left","aria-expanded":i,children:[l.jsx("span",{className:"font-medium text-neutral-900 dark:text-white",children:r.question}),l.jsx(Bt.svg,{animate:{rotate:i?180:0},transition:{duration:.2},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-5 w-5 shrink-0 text-neutral-500",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m6 9 6 6 6-6"})})]}),l.jsx(_P,{initial:!1,children:i&&l.jsx(Bt.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:l.jsx("p",{className:"px-5 pb-4 text-sm text-neutral-600 dark:text-neutral-300",children:r.answer})})})]},r.question)})})}function nx({count:e=5,className:t="h-4 w-4"}){return l.jsx("div",{className:"flex gap-0.5 text-amber-400",children:Array.from({length:e}).map((n,r)=>l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:t,children:l.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 HT=70;function WT({testimonials:e}){const t=g.useRef(null),n=g.useRef(null),r=g.useRef({pos:0,half:0,hovering:!1,dragging:!1,dragStartX:0,dragStartPos:0,lastTime:null,rafId:null}).current;g.useLayoutEffect(()=>{const i=n.current,o=window.matchMedia("(prefers-reduced-motion: reduce)").matches,a=()=>{i.style.transform=`translateX(${r.pos}px)`},u=m=>{if(r.half<=0)return m;for(;m>0;)m-=r.half;for(;m<=-r.half;)m+=r.half;return m},c=()=>{r.half=i.scrollWidth/2,r.pos===0?r.pos=-r.half:r.pos=u(r.pos),a()};c();const d=new ResizeObserver(c);d.observe(i);const f=m=>{r.lastTime===null&&(r.lastTime=m);const v=(m-r.lastTime)/1e3;r.lastTime=m,!r.dragging&&!r.hovering&&!o&&(r.pos=u(r.pos+HT*v),a()),r.rafId=requestAnimationFrame(f)};r.rafId=requestAnimationFrame(f);const h=t.current,x=()=>{r.hovering=!0},w=()=>{r.hovering=!1},y=m=>{r.dragging=!0,r.dragStartX=m.clientX,r.dragStartPos=r.pos,h.setPointerCapture(m.pointerId),h.classList.add("cursor-grabbing"),h.classList.remove("cursor-grab")},k=m=>{r.dragging&&(r.pos=u(r.dragStartPos+(m.clientX-r.dragStartX)),a())},p=m=>{r.dragging&&(r.dragging=!1,h.hasPointerCapture(m.pointerId)&&h.releasePointerCapture(m.pointerId),h.classList.remove("cursor-grabbing"),h.classList.add("cursor-grab"))};return h.addEventListener("pointerenter",x),h.addEventListener("pointerleave",w),h.addEventListener("pointerdown",y),h.addEventListener("pointermove",k),h.addEventListener("pointerup",p),h.addEventListener("pointercancel",p),()=>{cancelAnimationFrame(r.rafId),d.disconnect(),h.removeEventListener("pointerenter",x),h.removeEventListener("pointerleave",w),h.removeEventListener("pointerdown",y),h.removeEventListener("pointermove",k),h.removeEventListener("pointerup",p),h.removeEventListener("pointercancel",p)}},[e.length]);const s=[...e,...e];return l.jsx("div",{ref:t,className:"marquee-viewport cursor-grab touch-pan-y select-none overflow-hidden",children:l.jsx("div",{ref:n,className:"marquee-track flex w-max gap-5",children:s.map((i,o)=>l.jsx("div",{className:"w-64 shrink-0 sm:w-72 lg:w-80",children:l.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:[l.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:l.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"})}),l.jsx(nx,{className:"relative z-10 mb-3 h-4 w-4",count:i.rating||5}),l.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,'"']}),l.jsxs("div",{className:"relative z-10 mt-auto flex items-center gap-3",children:[i.photo?l.jsx("img",{src:i.photo,alt:"",referrerPolicy:"no-referrer",className:"h-9 w-9 shrink-0 rounded-full object-cover"}):l.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()}),l.jsx("p",{className:"text-sm font-semibold text-neutral-900 dark:text-white",children:i.name})]})]})},`${i.name}-${o}`))})})}function No(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 UT="/assets/gallery-dash2-CEVCErVK.webp",rx="/assets/gallery-amp-purple-CESAKuOf.webp",GT="/assets/gallery-speaker-CUXQZ49Q.webp",sx="/assets/gallery-subs-COSd4seJ.webp",ix="/assets/gallery-dash-Cg-7v9qo.webp",KT="/assets/hero-trunk-Dp4_JHDh.webp",XT="/assets/gallery-rear-8cIXPC7T.webp",YT="/assets/hero-highlight-Co4f1Kj5.webp",qT="/assets/youtube-hintergrund-BqSbCrLQ.mp4",bi={left:"text-left",center:"text-center",right:"text-right"},QT={left:"",center:"mx-auto",right:"ml-auto"},ZT={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 pm({label:e,url:t,className:n,style:r}){const{hidden_areas:s}=ht();return!e||!t||tx(t,s)?null:t.startsWith("/")?l.jsx(W,{to:t,className:n,style:r,children:e}):l.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:n,style:r,children:e})}const JT=[{src:sx,width:900,height:600},{src:rx,width:900,height:600},{src:GT,width:900,height:1200},{src:ix,width:900,height:814},{src:XT,width:900,height:1200},{src:KT,width:1920,height:1280}];function eE(){const{hero_image_path:e}=ht(),t=e||UT,{t:n,language:r}=Ce(),s=_c(),i=!s("page.vehicles"),o=n("home.stats"),a=n("home.galleryAlts"),u=JT.map((R,O)=>({...R,alt:a[O]})),[c,d]=g.useState([]),[f,h]=g.useState({}),[x,w]=g.useState([]),y=R=>{const O=f[R]||ZT;return{eyebrow:O[`eyebrow_${r}`]||"",title:O[`title_${r}`]||"",bodyHtml:O[`body_html_${r}`]||"",align:O.text_align||"center",alignX:O.text_align_x,alignY:O.text_align_y,buttonLabel:O[`button_label_${r}`]||"",buttonUrl:O.button_url||"",fontFamily:O.font_family||void 0}},k=De("home_sections.hero.eyebrow"),p=De("home_sections.hero.title"),m=De("home_sections.youtube.eyebrow"),v=De("home_sections.youtube.title"),b=De("home_sections.youtube.button_label"),P=De("home_sections.craft.eyebrow"),T=De("home_sections.craft.title"),S=De("home_sections.advice.eyebrow"),j=De("home_sections.advice.title"),L=De("home_sections.insights.eyebrow"),_=De("home_sections.insights.title"),F=De("home_sections.more.eyebrow"),H=De("home_sections.more.title"),te=De("home_sections.more.button_label");g.useEffect(()=>{Z.get("/home-sections").then(h).catch(()=>{})},[]),g.useEffect(()=>{Z.get("/partners").then(w).catch(()=>{})},[]);const[N,D]=g.useState(null),$=N?N.reviews.filter(R=>R.review_text).map(R=>({name:R.author_name,text:R.review_text,rating:R.rating,photo:R.profile_photo_url})):n("home.testimonials");g.useEffect(()=>{Z.get("/faqs").then(R=>{d(R.map(O=>({question:r==="de"?O.question_de:O.question_en,answer:r==="de"?O.answer_de:O.answer_en})))}).catch(()=>{})},[r]),g.useEffect(()=>{Z.get("/google-reviews").then(R=>{R.rating!=null&&R.reviews.some(O=>O.review_text)&&D(R)}).catch(()=>{})},[]),st({title:n("home.metaTitle"),description:n("home.metaDescription"),path:"/"}),g.useEffect(()=>{if(c.length===0||s("home.faq"))return;const R=document.createElement("script");return R.type="application/ld+json",R.text=JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:c.map(O=>({"@type":"Question",name:O.question,acceptedAnswer:{"@type":"Answer",text:O.answer}}))}),document.head.appendChild(R),()=>document.head.removeChild(R)},[c]);const K=g.useRef(null);g.useEffect(()=>{const R=K.current;if(!R)return;const O=new IntersectionObserver(([me])=>{me.isIntersecting?(R.getAttribute("src")||(R.src=qT),R.play().catch(()=>{})):R.paused||R.pause()},{rootMargin:"300px 0px"});return O.observe(R),()=>O.disconnect()},[]);const E=g.useRef(null),{scrollYProgress:C}=Xy({target:E,offset:["start start","end start"]}),A=Jt(C,[0,1],["-6%","6%"]),z=Jt(C,[0,1],["0%","60%"]),q=Jt(C,[0,.8],[1,0]),Te=Jt(C,[.5,1],[0,1]),Q=Jt(Te,R=>R>.05?"auto":"none"),Ve=Jt(C,[.5,1],[16,0]);return l.jsxs("div",{children:[l.jsx(Bt.div,{style:{opacity:Te,pointerEvents:Q,y:Ve},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:l.jsxs("div",{className:"mx-auto flex max-w-6xl items-center justify-between gap-3",children:[l.jsx("p",{className:"hidden text-sm font-medium text-neutral-600 dark:text-neutral-300 sm:block",children:n("home.stickyCta")}),l.jsxs("div",{className:"flex w-full gap-3 sm:w-auto",children:[i&&l.jsx(W,{to:"/fahrzeuge",className:"flex-1 rounded-md bg-brand-500 px-5 py-2.5 text-center text-sm font-semibold text-white shadow-sm transition hover:-translate-y-0.5 hover:bg-brand-600 sm:flex-none",children:n("home.selectVehicle")}),l.jsx(W,{to:"/kontakt",className:"flex-1 rounded-md border border-neutral-300 px-5 py-2.5 text-center text-sm font-semibold text-neutral-700 transition hover:-translate-y-0.5 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-800 sm:flex-none",children:n("home.getInTouch")})]})]})}),l.jsxs("section",{ref:E,className:"relative -mt-[89px] h-svh min-h-[560px] overflow-hidden sm:-mt-[97px]",children:[l.jsx(Bt.img,{style:{y:A,scale:1.15},src:t,alt:n("home.heroImageAlt"),className:"absolute inset-0 h-full w-full object-cover"}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-neutral-950 via-neutral-950/80 to-neutral-950/40"}),l.jsx(Bt.div,{style:{y:z,opacity:q},className:"absolute inset-0",children:l.jsx("div",{className:"absolute w-full max-w-2xl px-4 text-center sm:px-6",style:{...No(y("hero").alignX,y("hero").alignY,{x:50,y:50}),fontFamily:y("hero").fontFamily},children:l.jsxs(Bt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.7,ease:"easeOut"},children:[y("hero").eyebrow&&l.jsx("p",{className:"mb-3 text-sm font-semibold uppercase tracking-wide text-brand-400",style:k,children:y("hero").eyebrow}),l.jsx("h1",{className:"text-3xl font-extrabold tracking-tight text-white sm:text-5xl",style:p,children:y("hero").title}),l.jsx("div",{className:"legal-content mx-auto mt-4 max-w-2xl text-base text-neutral-200 sm:text-lg",dangerouslySetInnerHTML:{__html:y("hero").bodyHtml}}),l.jsxs("div",{className:"mt-8 flex flex-wrap items-center justify-center gap-3",children:[i&&l.jsx(W,{to:"/fahrzeuge",className:"rounded-md bg-brand-500 px-6 py-3 text-sm font-semibold text-white shadow-sm transition hover:-translate-y-0.5 hover:bg-brand-600 hover:shadow-lg",children:n("home.selectVehicle")}),l.jsx(W,{to:"/kontakt",className:"rounded-md border border-white/30 bg-white/10 px-6 py-3 text-sm font-semibold text-white backdrop-blur transition hover:-translate-y-0.5 hover:bg-white/20",children:n("home.getInTouch")})]})]})})})]}),!s("home.stats")&&l.jsx("section",{className:"border-b border-neutral-200 bg-neutral-950 py-8 dark:border-neutral-800",children:l.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:o.map((R,O)=>l.jsxs(be,{index:O,children:[l.jsx("p",{className:"text-2xl font-extrabold text-brand-400 sm:text-3xl",children:R.value}),l.jsx("p",{className:"text-sm text-neutral-400",children:R.label})]},R.label))})}),!s("home.partners")&&l.jsx("section",{className:"border-b border-neutral-200 py-8 dark:border-neutral-800",children:l.jsxs("div",{className:"mx-auto max-w-6xl px-4 sm:px-6",children:[l.jsx("p",{className:"mb-4 text-center text-xs font-semibold uppercase tracking-wide text-neutral-400",children:n("home.brandsHeading")}),l.jsx("div",{className:"flex flex-wrap items-center justify-center gap-x-8 gap-y-3",children:x.map((R,O)=>l.jsx(be,{index:O,children:R.logo_path?l.jsx("img",{src:R.logo_path,alt:R.name,className:"h-8 max-w-[8rem] object-contain opacity-70 grayscale transition hover:opacity-100 hover:grayscale-0"}):l.jsx("span",{className:"text-lg font-bold text-neutral-400 dark:text-neutral-600",children:R.name})},R.id))})]})}),!s("home.youtube")&&l.jsxs("section",{className:"relative min-h-[70vh] overflow-hidden sm:min-h-[85vh]",children:[l.jsx("video",{ref:K,loop:!0,muted:!0,playsInline:!0,preload:"none",poster:ix,className:"absolute inset-0 h-full w-full object-cover"}),l.jsx("div",{className:"absolute inset-0 bg-black/55"}),l.jsx("div",{className:"absolute w-full max-w-3xl px-4 text-center sm:px-6",style:{...No(y("youtube").alignX,y("youtube").alignY,{x:50,y:50}),fontFamily:y("youtube").fontFamily},children:l.jsxs(be,{children:[y("youtube").eyebrow&&l.jsx("p",{className:"mb-4 text-xs font-semibold uppercase tracking-[0.2em] text-neutral-200 sm:text-sm",style:m,children:y("youtube").eyebrow}),l.jsx("h2",{className:"text-3xl font-bold uppercase tracking-wide text-white sm:text-5xl",style:v,children:y("youtube").title}),l.jsx("div",{className:"legal-content mt-4 text-xs font-semibold uppercase tracking-wide text-neutral-200 sm:text-sm",dangerouslySetInnerHTML:{__html:y("youtube").bodyHtml}}),l.jsx(pm,{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:b})]})})]}),!s("home.craft")&&l.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:l.jsxs("div",{className:"mx-auto max-w-6xl space-y-16 overflow-hidden px-4 sm:px-6",children:[l.jsxs("div",{className:"grid items-center gap-8 md:grid-cols-2",children:[l.jsx(be,{direction:"left",shine:!0,className:"rounded-xl shadow-lg",children:l.jsx("img",{src:sx,alt:n("home.craftImageAlt"),width:900,height:600,className:"w-full rounded-xl object-cover",style:{maxHeight:380}})}),l.jsxs(be,{direction:"right",index:1,className:bi[y("craft").align],style:{fontFamily:y("craft").fontFamily},children:[y("craft").eyebrow&&l.jsx("p",{className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:P,children:y("craft").eyebrow}),l.jsx("h2",{className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",style:T,children:y("craft").title}),l.jsx("div",{className:"legal-content text-neutral-600 dark:text-neutral-300",dangerouslySetInnerHTML:{__html:y("craft").bodyHtml}})]})]}),l.jsxs("div",{className:"grid items-center gap-8 md:grid-cols-2",children:[l.jsxs(be,{direction:"left",className:`order-2 md:order-1 ${bi[y("advice").align]}`,style:{fontFamily:y("advice").fontFamily},children:[y("advice").eyebrow&&l.jsx("p",{className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:S,children:y("advice").eyebrow}),l.jsx("h2",{className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",style:j,children:y("advice").title}),l.jsx("div",{className:"legal-content text-neutral-600 dark:text-neutral-300",dangerouslySetInnerHTML:{__html:y("advice").bodyHtml}})]}),l.jsx(be,{direction:"right",index:1,shine:!0,className:"order-1 md:order-2 rounded-xl shadow-lg",children:l.jsx("img",{src:rx,alt:n("home.adviceImageAlt"),width:900,height:600,className:"w-full rounded-xl object-cover",style:{maxHeight:380}})})]})]})}),!s("home.insights")&&l.jsxs("section",{className:"mx-auto max-w-6xl px-4 py-16 sm:px-6",children:[l.jsxs(be,{className:`mb-8 ${bi[y("insights").align]}`,style:{fontFamily:y("insights").fontFamily},children:[y("insights").eyebrow&&l.jsx("p",{className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:L,children:y("insights").eyebrow}),l.jsx("h2",{className:"text-2xl font-bold text-neutral-900 dark:text-white",style:_,children:y("insights").title}),l.jsx("div",{className:"legal-content mt-2 text-neutral-600 dark:text-neutral-300",dangerouslySetInnerHTML:{__html:y("insights").bodyHtml}})]}),l.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:u.map((R,O)=>l.jsx(be,{index:O%3,shine:!0,className:"aspect-square overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:l.jsx("img",{src:R.src,alt:R.alt,width:R.width,height:R.height,loading:"lazy",className:"h-full w-full object-cover transition duration-300 hover:scale-105"})},R.src))})]}),!s("home.reviews")&&l.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:l.jsxs("div",{className:"mx-auto max-w-6xl px-4 sm:px-6",children:[l.jsxs(be,{className:"mb-10 text-center",children:[l.jsx("div",{className:"mb-2 flex items-center justify-center gap-2",children:l.jsx(nx,{className:"h-6 w-6",count:N?Math.round(N.rating):5})}),l.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")}),l.jsx("p",{className:"mt-1 text-neutral-600 dark:text-neutral-300",children:n("home.reviewsText")}),l.jsx("a",{href:"https://www.google.com/maps/search/?api=1&query=Hifi+Planet+Amorbach+Boxbrunner+Stra%C3%9Fe+20a",target:"_blank",rel:"noopener noreferrer",className:"mt-2 inline-block text-sm font-medium text-brand-600 hover:underline dark:text-brand-400",children:n("home.reviewsLink")})]}),l.jsx(be,{children:l.jsx(WT,{testimonials:$})})]})}),!s("home.more")&&l.jsx("section",{className:"mx-auto max-w-6xl overflow-hidden px-4 py-16 sm:px-6",children:l.jsxs("div",{className:"grid items-center gap-10 md:grid-cols-2",children:[l.jsx(be,{direction:"left",shine:!0,className:"overflow-hidden rounded-xl shadow-lg",children:l.jsx("img",{src:YT,alt:n("home.moreImageAlt"),width:1600,height:905,className:"h-full w-full object-cover",loading:"lazy"})}),l.jsxs(be,{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 ${bi[y("more").align]}`,style:{fontFamily:y("more").fontFamily},children:[y("more").eyebrow&&l.jsx("p",{className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:F,children:y("more").eyebrow}),l.jsx("h2",{className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",style:H,children:y("more").title}),l.jsx("div",{className:`legal-content mb-8 max-w-2xl text-neutral-600 dark:text-neutral-300 ${QT[y("more").align]}`,dangerouslySetInnerHTML:{__html:y("more").bodyHtml}}),l.jsx(pm,{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:te})]})]})}),!s("home.faq")&&l.jsx("section",{className:"border-t border-neutral-300 py-16 dark:border-neutral-700",children:l.jsxs("div",{className:"mx-auto max-w-3xl px-4 sm:px-6",children:[l.jsx(be,{className:"mb-8 text-center",children:l.jsx("h2",{className:"text-2xl font-bold text-neutral-900 dark:text-white",children:n("home.faqHeading")})}),l.jsx(be,{index:1,children:l.jsx($T,{items:c})})]})})]})}function tE(){const[e,t]=g.useState([]),[n,r]=g.useState(""),s=na(),{t:i}=Ce(),o=ud(),{vehicle_tile_width:a,vehicle_tile_height:u}=ht(),c={width:`${a}px`,height:`${u}px`};return st({title:i("vehicleSelect.metaTitle"),description:i("vehicleSelect.metaDescription"),path:"/fahrzeuge"}),g.useEffect(()=>{s.vehicles.enabled&&!s.bypass||Z.get("/brands").then(t).catch(d=>r(d.message))},[s.vehicles.enabled,s.bypass]),s.vehicles.enabled&&!s.bypass?l.jsx(qs,{message:s.vehicles.message}):l.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[s.vehicles.enabled&&s.bypass&&l.jsx(Qs,{inline:!0}),l.jsx("h1",{className:"mb-2 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:i("vehicleSelect.title")}),l.jsx("p",{className:"mb-8 text-neutral-600 dark:text-neutral-300",children:i("vehicleSelect.intro")}),n&&l.jsx("p",{className:"text-red-600",children:n}),e.length===0&&!n&&l.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:i("vehicleSelect.empty")}),l.jsx("div",{className:"flex flex-wrap gap-4",children:e.map(d=>d.image_path?l.jsxs(W,{to:`/fahrzeuge/${d.slug}`,style:c,className:"group relative block shrink-0 overflow-hidden rounded-xl bg-neutral-900 shadow-sm transition hover:shadow-lg",children:[l.jsx("img",{src:d.image_path,alt:"",className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/10 to-transparent transition group-hover:from-black/95"}),l.jsx("span",{className:"absolute inset-x-0 bottom-0 p-4 text-center text-lg font-extrabold text-white",style:$n(o,`brands.${d.id}.name`),children:d.name})]},d.id):l.jsx(W,{to:`/fahrzeuge/${d.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:l.jsx("span",{style:$n(o,`brands.${d.id}.name`),children:d.name})},d.id))})]})}function nE(){const{brandSlug:e}=$s(),[t,n]=g.useState(null),[r,s]=g.useState(""),i=na(),{t:o}=Ce(),a=ud(),u=De(t?`brands.${t.brand.id}.name`:""),{vehicle_tile_width:c,vehicle_tile_height:d}=ht(),f={width:`${c}px`,height:`${d}px`};return g.useEffect(()=>{i.vehicles.enabled&&!i.bypass||Z.get(`/brands/${e}/models`).then(n).catch(h=>s(h.message))},[e,i.vehicles.enabled,i.bypass]),st({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?l.jsx(qs,{message:i.vehicles.message}):r?l.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:r}):t?l.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[i.vehicles.enabled&&i.bypass&&l.jsx(Qs,{inline:!0}),l.jsxs("p",{className:"mb-1 text-sm text-neutral-500 dark:text-neutral-400",children:[l.jsx(W,{to:"/fahrzeuge",className:"hover:text-brand-500",children:o("brandPage.breadcrumbVehicles")})," / ",l.jsx("span",{style:u,children:t.brand.name})]}),l.jsxs("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:[l.jsx("span",{style:u,children:t.brand.name})," – ",o("brandPage.titleSuffix")]}),t.models.length===0&&l.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:o("brandPage.empty")}),l.jsx("div",{className:"flex flex-wrap gap-4",children:t.models.map(h=>h.image_path?l.jsxs(W,{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:[l.jsx("img",{src:h.image_path,alt:"",className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/10 to-transparent transition group-hover:from-black/95"}),l.jsx("span",{className:"absolute inset-x-0 bottom-0 p-4 text-center text-lg font-extrabold text-white",style:$n(a,`car_models.${h.id}.name`),children:h.name})]},h.id):l.jsx(W,{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:l.jsx("span",{style:$n(a,`car_models.${h.id}.name`),children:h.name})},h.id))})]}):l.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:o("brandPage.loading")})}function rE({text:e}){return e?e.split(/(\*\*[^*]+\*\*)/g).map((n,r)=>{const s=n.match(/^\*\*([^*]+)\*\*$/);return s?l.jsx("strong",{children:s[1]},r):l.jsx("span",{children:n},r)}):null}const gm="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==",sE="/assets/base-BKOm0Bib.webp",iE="/assets/clear-DZZMSrMX.webp",oE="/assets/drive-BE2W1yna.webp",aE="/assets/prime-BTVNe2Gb.webp",lE="/assets/elite_r-BRvz_pyr.webp",uE="/assets/apex-CFy2qup8.webp",cE="/assets/statement-pTO-wTPx.webp",dE="/assets/limitless-DDs0S_PU.webp",fE=(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)]},Za=(e,t,n)=>`rgb(${fE(e,t,n).join(", ")})`,ym=e=>e.map(([t,n,r,s,i,o])=>({bgTop:Za(t,n,r),border:Za(t,n,r+8),accent:Za(s,i,o),img:null})),xm={graphite:[{accent:"#b6b6b6",border:"#2a2a2a",bgTop:"#1c1c1c",img:sE},{accent:"#d3d3d3",border:"#2e2e2e",bgTop:"#212121",img:iE},{accent:"#8fb8bd",border:"#26383b",bgTop:"#16282b",img:oE},{accent:"#6fbf73",border:"#1f3a24",bgTop:"#122916",img:aE},{accent:"#63d34f",border:"#204a1c",bgTop:"#123312",img:lE},{accent:"#8bea3c",border:"#2b5518",bgTop:"#173a0f",img:uE},{accent:"#d9a83c",border:"#4a3a16",bgTop:"#33270d",img:cE},{accent:"#f2c14e",border:"#5a4718",bgTop:"#3d2f0c",img:dE}],"deep-blue":ym([[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":ym([[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]])},hE="#f2f2f2",mE="#8a8a8a",pE="#c4c4c4",vm=5,gE=3,yE={recommended:{Icon:hb,className:"bg-brand-500 text-white"},popular:{Icon:Ok,className:"bg-amber-400 text-neutral-950"},tip:{Icon:$k,className:"bg-sky-500 text-white"},coming_soon:{Icon:Qg,className:"bg-white text-neutral-900"},custom:{Icon:null,className:"bg-brand-500 text-white"}};function xE({pkg:e,tier:t,tierT:n,layout:r,bullets:s,formatPrice:i,contactUrl:o,t:a}){const[u,c]=g.useState(!1),[d,f]=g.useState(!1),h=g.useRef(null),x=s.length-vm,w=u?s:s.slice(0,vm);g.useLayoutEffect(()=>{const S=h.current;if(!S||u){f(!1);return}const j=()=>f([...S.querySelectorAll("[data-clamp]")].some(_=>_.scrollHeight>_.clientHeight+1));j();const L=new ResizeObserver(j);return L.observe(S),()=>L.disconnect()},[u,s.length,e.description]);const y=ud(),k=$n(y,`packages.${e.id}.description`),p=$n(y,`packages.${e.id}.price_text`),{package_card_height:m}=ht(),v=yE[e.badge],b=r!=="grid",P=e.badge==="custom"?e.badge_text:e.badge&&a(`modelPage.badges.${e.badge}`),T=t.img?null:{backgroundColor:t.accent,WebkitMaskImage:`url(${gm})`,maskImage:`url(${gm})`,maskMode:"luminance",WebkitMaskSize:"cover",maskSize:"cover",WebkitMaskPosition:"center",maskPosition:"center",WebkitMaskRepeat:"no-repeat",maskRepeat:"no-repeat"};return l.jsxs("div",{style:{borderColor:t.border,background:`linear-gradient(180deg, ${t.bgTop} 0%, #0b0b0b 55%, #080808 100%)`,...b?{gridRow:"span 4",gridTemplateRows:"subgrid",rowGap:0}:{minHeight:`${m}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?l.jsx("img",{src:t.img,alt:"","aria-hidden":"true",className:"pointer-events-none absolute inset-0 h-full w-full object-cover"}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"pointer-events-none absolute inset-0",style:{...T,opacity:.2+n*.45,filter:"blur(18px)"},"aria-hidden":"true"}),l.jsx("div",{className:"pointer-events-none absolute inset-0",style:{...T,opacity:.55+n*.45},"aria-hidden":"true"})]}),v&&P&&l.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 ${v.className}`,children:[v.Icon&&l.jsx(v.Icon,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),l.jsx("span",{className:"truncate",children:P})]}),l.jsxs("div",{className:"relative z-10 text-center",style:{padding:"34px 20px 0",gridRow:1},children:[l.jsx("div",{style:{fontFamily:"'Barlow Condensed', sans-serif",fontSize:"30px",letterSpacing:"3px",fontWeight:600,color:t.accent,textTransform:"uppercase",lineHeight:1.1},children:e.name}),l.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&&l.jsxs("div",{className:"relative z-10",style:{gridRow:2,padding:"18px 20px 14px",background:u?"linear-gradient(180deg, rgba(8,8,8,0.7) 0%, rgba(8,8,8,0.62) 94%, rgba(8,8,8,0) 100%)":"linear-gradient(180deg, rgba(8,8,8,0.55) 0%, rgba(8,8,8,0.48) 92%, rgba(8,8,8,0) 100%)"},children:[l.jsx("ul",{ref:h,className:"space-y-1.5 text-left",children:w.map((S,j)=>l.jsxs("li",{className:"flex items-start gap-2",style:{fontSize:"13px",color:pE,...S.fromDescription?k:null},children:[l.jsx(fk,{className:"mt-0.5 h-3.5 w-3.5 shrink-0",style:{color:t.accent}}),l.jsx("span",{"data-clamp":!0,className:"leading-snug",style:u?void 0:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:gE,overflow:"hidden"},children:S.fromDescription?l.jsx(rE,{text:S.text}):S.text})]},j))}),(u||x>0||d)&&l.jsxs("button",{type:"button",onClick:()=>c(S=>!S),className:"mt-2.5 flex items-center gap-1 hover:opacity-80",style:{fontSize:"13px",color:t.accent},children:[u?a("modelPage.lessBullets"):x>0?a("modelPage.moreBullets")(x):a("modelPage.showMore"),u?l.jsx(wk,{className:"h-3.5 w-3.5"}):l.jsx(mk,{className:"h-3.5 w-3.5"})]})]}),l.jsx("div",{className:"relative z-10 flex-1",style:{gridRow:3}}),l.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:l.jsxs("div",{className:"text-center",children:[!e.price_text&&l.jsx("div",{style:{fontSize:"13px",color:mE},children:a("modelPage.totalPrice")}),l.jsx("div",{style:{marginTop:"4px",fontFamily:"'Barlow Condensed', sans-serif",fontSize:"30px",fontWeight:600,letterSpacing:"1px",color:hE,...e.price_text?p:null},children:e.price_text||i(e.total_price)}),l.jsx(W,{to:o(e),className:"mt-4 inline-block rounded-md bg-brand-500 px-4 py-2 text-center text-sm font-semibold text-white shadow-lg shadow-brand-500/30 hover:bg-brand-400",children:a("modelPage.requestContact")}),e.video_url&&l.jsx("div",{className:"mt-3",children:l.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:[l.jsx(bk,{className:"h-4 w-4 text-red-500","aria-hidden":"true"}),a("modelPage.videoLink")]})})]})})]})}function vE(){const{brandSlug:e,modelSlug:t}=$s(),[n,r]=g.useState(null),[s,i]=g.useState(""),o=na(),{t:a,language:u}=Ce(),{package_card_theme:c,package_card_layout:d,package_wheel_hint_interval:f,package_card_width:h,package_card_height:x}=ht(),w=xm[c]||xm.graphite,y=["grid","strip","coverflow"].includes(d)?d:"strip",k=Math.max(2,Number(f)||8)*1e3,p=g.useRef(null),m=g.useRef(null),v=g.useRef(null),[b,P]=g.useState(!1),T=N=>new Intl.NumberFormat(u==="de"?"de-DE":"en-US",{style:"currency",currency:"EUR"}).format(N);g.useEffect(()=>{o.vehicles.enabled&&!o.bypass||Z.get(`/models/${e}/${t}/packages`).then(r).catch(N=>i(N.message))},[e,t,o.vehicles.enabled,o.bypass]),g.useEffect(()=>{const N=p.current;if(y!=="coverflow"||!N)return;let D=0;const $=()=>{D=0;const C=N.scrollLeft+N.clientWidth/2;for(const A of N.children){const z=A.offsetLeft+A.offsetWidth/2,q=Math.max(-1,Math.min(1,(z-C)/(A.offsetWidth*1.4))),Te=Math.abs(q);A.style.transform=`rotateY(${(-q*35).toFixed(2)}deg) scale(${(1-Te*.13).toFixed(3)}) translateZ(${(-Te*60).toFixed(1)}px)`,A.style.zIndex=String(100-Math.round(Te*50))}},K=()=>{D||(D=requestAnimationFrame($))};$(),N.addEventListener("scroll",K,{passive:!0});const E=new ResizeObserver(K);return E.observe(N),()=>{N.removeEventListener("scroll",K),E.disconnect(),cancelAnimationFrame(D)}},[y,n]),g.useEffect(()=>{const N=p.current;if(y==="grid"||!N)return;const D=window.matchMedia("(pointer: coarse)").matches;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let K=[],E=0;const C=()=>{const z=Math.min(N.clientWidth*.4,160);K.push(setTimeout(()=>N.scrollTo({left:z,behavior:"smooth"}),500)),K.push(setTimeout(()=>N.scrollTo({left:0,behavior:"smooth"}),1250)),D||(K.push(setTimeout(()=>P(!0),450)),K.push(setTimeout(()=>P(!1),1700)))},A=new IntersectionObserver(([z])=>{z.isIntersecting&&(A.disconnect(),C(),E=setInterval(()=>{N.scrollLeft<=1&&C()},k))},{threshold:.35});return A.observe(N),()=>{A.disconnect(),clearInterval(E),K.forEach(clearTimeout)}},[y,n,k]),g.useEffect(()=>{const N=p.current;if(y==="grid"||!N)return;let D=0,$=0,K=!1,E=0,C=0;const A=()=>[...N.children].map(Q=>Q.offsetLeft+Q.offsetWidth/2),z=(Q,Ve)=>{let R=0,O=1/0;return Q.forEach((me,Rt)=>{const Zs=Math.abs(me-Ve);Zs{K=!1;const Q=A();if(!Q.length)return;const Ve=N.scrollLeft+N.clientWidth/2,R=z(Q,Ve);let O=R;R===E&&Math.abs(C)>4&&(O=C>0?Math.min(E+1,Q.length-1):Math.max(E-1,0));const me=N.scrollWidth-N.clientWidth,Rt=Math.max(0,Math.min(Q[O]-N.clientWidth/2,me));N.scrollTo({left:Rt,behavior:"smooth"}),clearTimeout($),$=setTimeout(()=>{N.style.scrollSnapType=""},450)},Te=Q=>{if(Math.abs(Q.deltaX)>Math.abs(Q.deltaY))return;const Ve=N.scrollWidth-N.clientWidth;if(Ve<=1)return;const R=N.scrollLeft<=1,O=N.scrollLeft>=Ve-1;Q.deltaY<0&&R||Q.deltaY>0&&O||(Q.preventDefault(),K||(K=!0,C=0,E=z(A(),N.scrollLeft+N.clientWidth/2)),C+=Q.deltaY,N.style.scrollSnapType="none",N.scrollLeft+=Q.deltaY,clearTimeout(D),D=setTimeout(q,150))};return N.addEventListener("wheel",Te,{passive:!1}),()=>{N.removeEventListener("wheel",Te),clearTimeout(D),clearTimeout($)}},[y,n]),g.useEffect(()=>{const N=p.current,D=m.current,$=v.current;if(y==="grid"||!N||!D||!$)return;let K=0;const E=()=>{K=0;const O=N.scrollWidth-N.clientWidth;if(O<=1){D.style.opacity="0",D.style.pointerEvents="none";return}D.style.opacity="1",D.style.pointerEvents="auto";const me=D.clientWidth,Rt=Math.max(32,N.clientWidth/N.scrollWidth*me);$.style.width=`${Rt}px`,$.style.transform=`translateX(${(N.scrollLeft/O*(me-Rt)).toFixed(1)}px)`},C=()=>{K||(K=requestAnimationFrame(E))};E(),N.addEventListener("scroll",C,{passive:!0});const A=new ResizeObserver(C);A.observe(N);let z=!1,q=0;const Te=O=>{const me=D.getBoundingClientRect(),Rt=$.clientWidth,Zs=Math.min(Math.max(O-me.left-q,0),me.width-Rt);N.scrollLeft=Zs/(me.width-Rt)*(N.scrollWidth-N.clientWidth)},Q=O=>{z=!0,D.setPointerCapture(O.pointerId),N.style.scrollSnapType="none";const me=$.getBoundingClientRect();q=O.clientX>=me.left&&O.clientX<=me.right?O.clientX-me.left:$.clientWidth/2,O.clientX>=me.left&&O.clientX<=me.right||Te(O.clientX)},Ve=O=>{z&&Te(O.clientX)},R=O=>{var me;z&&(z=!1,(me=D.hasPointerCapture)!=null&&me.call(D,O.pointerId)&&D.releasePointerCapture(O.pointerId),N.style.scrollSnapType="")};return D.addEventListener("pointerdown",Q),D.addEventListener("pointermove",Ve),D.addEventListener("pointerup",R),D.addEventListener("pointercancel",R),()=>{N.removeEventListener("scroll",C),A.disconnect(),cancelAnimationFrame(K),D.removeEventListener("pointerdown",Q),D.removeEventListener("pointermove",Ve),D.removeEventListener("pointerup",R),D.removeEventListener("pointercancel",R)}},[y,n]),st({title:n?a("modelPage.metaTitle")(n.model.brand_name,n.model.name):a("modelPage.metaTitleFallback"),description:n?a("modelPage.metaDescription")(n.model.brand_name,n.model.name):void 0,path:`/fahrzeuge/${e}/${t}`});const S=De(n?`car_models.${n.model.id}.name`:"");if(o.vehicles.enabled&&!o.bypass)return l.jsx(qs,{message:o.vehicles.message});if(s)return l.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:s});if(!n)return l.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:a("modelPage.loading")});const{model:j,packages:L}=n,_=new Map([...L].sort((N,D)=>N.total_price-D.total_price).map((N,D)=>[N.id,D])),F=N=>{const D=N.tier_count??L.length,$=N.tier_rank??_.get(N.id)??0,K=D<=1?0:$/(D-1),E=Math.round(K*(w.length-1));return{tier:w[E],tierT:K}},H=N=>[...N.products.map(D=>({text:D.name_override||D.scraped_name||a("modelPage.productLoading"),fromDescription:!1})),...(N.description||"").split(` +`).map(D=>D.trim()).filter(Boolean).map(D=>({text:D,fromDescription:!0}))],te=N=>`/kontakt?${new URLSearchParams({brand:j.brand_name,model:j.name,package:N.name,packageId:N.id,total:N.total_price}).toString()}`;return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"mx-auto max-w-6xl px-4 pt-12 sm:px-6",children:[o.vehicles.enabled&&o.bypass&&l.jsx(Qs,{inline:!0}),l.jsxs("p",{className:"mb-1 text-sm text-neutral-500 dark:text-neutral-400",children:[l.jsx(W,{to:"/fahrzeuge",className:"hover:text-brand-500",children:a("modelPage.breadcrumbVehicles")})," /"," ",l.jsx(W,{to:`/fahrzeuge/${e}`,className:"hover:text-brand-500",children:j.brand_name})," / ",l.jsx("span",{style:S,children:j.name})]}),l.jsxs("h1",{className:`text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl ${L.length?"mb-2":"mb-8"}`,children:[j.brand_name," ",l.jsx("span",{style:S,children:j.name})," – ",a("modelPage.titleSuffix")]}),L.length===0&&l.jsx("p",{className:"pb-12 text-neutral-500 dark:text-neutral-400",children:a("modelPage.empty")})]}),L.length>0&&l.jsx("section",{className:"py-10 sm:py-14",style:{fontFamily:"'Barlow', sans-serif"},children:l.jsxs("div",{className:y==="grid"?"mx-auto max-w-6xl px-4 sm:px-6":"relative mx-auto max-w-[1880px] px-4 sm:px-6",children:[l.jsx("div",{ref:y==="grid"?void 0:p,className:y==="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:y==="grid"?{gridTemplateColumns:`repeat(auto-fill, minmax(${h}px, 1fr))`,gridAutoRows:"1fr"}:{gridAutoFlow:"column",gridAutoColumns:`${h}px`,gridTemplateRows:"auto auto 1fr auto",minHeight:`${Number(x)+(y==="coverflow"?22:12)}px`,...y==="coverflow"?{perspective:"1200px",paddingLeft:`calc(50% - ${h/2}px)`,paddingRight:`calc(50% - ${h/2}px)`,paddingTop:"10px"}:null},children:L.map(N=>{const{tier:D,tierT:$}=F(N);return l.jsx(xE,{pkg:N,tier:D,tierT:$,layout:y,bullets:H(N),formatPrice:T,contactUrl:te,t:a},N.id)})}),y!=="grid"&&l.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 ${b?"opacity-100":"opacity-0"}`,"aria-hidden":"true",children:l.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:[l.jsx(gk,{className:"h-3.5 w-3.5 text-brand-400"}),l.jsx(Zk,{className:"h-4 w-4 text-brand-400"}),l.jsx(xk,{className:"h-3.5 w-3.5 text-brand-400"}),l.jsx("span",{children:a("modelPage.wheelHint")})]})}),y!=="grid"&&l.jsx("div",{ref:m,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:l.jsx("div",{ref:v,className:"absolute left-0 top-0 h-full rounded-full bg-brand-500 shadow-[0_0_10px_rgba(107,166,38,0.7)]",style:{width:"48px"}})})]})})]})}function wE(){const[e,t]=g.useState(null),[n,r]=g.useState(""),{t:s}=Ce(),{gallery_card_text_x:i,gallery_card_text_y:o}=ht();return st({title:s("galleryOverview.metaTitle"),description:s("galleryOverview.metaDescription"),path:"/galerie"}),g.useEffect(()=>{Z.get("/gallery-brands").then(t).catch(a=>r(a.message))},[]),l.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[l.jsx("h1",{className:"mb-2 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:s("galleryOverview.title")}),l.jsx("p",{className:"mb-8 text-neutral-600 dark:text-neutral-300",children:s("galleryOverview.intro")}),n&&l.jsx("p",{className:"text-red-600",children:n}),!e&&!n&&l.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:s("galleryOverview.loading")}),e&&e.length===0&&l.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:s("galleryOverview.empty")}),l.jsx("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4",children:e==null?void 0:e.map(a=>l.jsxs(W,{to:`/galerie/${a.slug}`,className:"group relative block aspect-[4/3] overflow-hidden rounded-xl bg-neutral-900 shadow-sm transition hover:shadow-lg",children:[a.cover_image_path?l.jsx("img",{src:a.cover_image_path,alt:a.name,className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}):l.jsx("div",{className:"flex h-full w-full items-center justify-center bg-neutral-200 dark:bg-neutral-800"}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/10 to-transparent transition group-hover:from-black/95"}),l.jsx("span",{className:"absolute whitespace-nowrap p-4 text-lg font-extrabold text-white",style:No(i,o,{x:0,y:100}),children:a.name})]},a.id))})]})}function kE(){const{brandSlug:e}=$s(),[t,n]=g.useState(null),[r,s]=g.useState(""),{t:i}=Ce(),{gallery_card_text_x:o,gallery_card_text_y:a}=ht();return g.useEffect(()=>{Z.get(`/gallery-brands/${e}/projects`).then(n).catch(u=>s(u.message))},[e]),st({title:t?i("galleryBrandPage.metaTitle")(t.brand.name):i("galleryBrandPage.metaTitleFallback"),description:t?i("galleryBrandPage.metaDescription")(t.brand.name):void 0,path:`/galerie/${e}`}),r?l.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:r}):t?l.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[l.jsxs("p",{className:"mb-1 text-sm text-neutral-500 dark:text-neutral-400",children:[l.jsx(W,{to:"/galerie",className:"hover:text-brand-500",children:i("galleryBrandPage.breadcrumbGallery")})," / ",t.brand.name]}),l.jsxs("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:[t.brand.name," – ",i("galleryBrandPage.titleSuffix")]}),t.projects.length===0&&l.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:i("galleryBrandPage.empty")}),l.jsx("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4",children:t.projects.map(u=>l.jsxs(W,{to:`/galerie/${e}/${u.slug}`,className:"group relative block aspect-[4/3] overflow-hidden rounded-xl bg-neutral-900 shadow-sm transition hover:shadow-lg",children:[u.cover_image_path?l.jsx("img",{src:u.cover_image_path,alt:u.name,className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}):l.jsx("div",{className:"flex h-full w-full items-center justify-center bg-neutral-200 dark:bg-neutral-800"}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/10 to-transparent transition group-hover:from-black/95"}),l.jsx("span",{className:"absolute whitespace-nowrap p-4 text-lg font-extrabold text-white",style:No(o,a,{x:0,y:100}),children:u.name})]},u.id))})]}):l.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:i("galleryBrandPage.loading")})}function bE({photos:e,index:t,onClose:n,onNavigate:r}){const{t:s}=Ce();if(g.useEffect(()=>{if(t==null)return;const a=u=>{u.key==="Escape"&&n(),u.key==="ArrowRight"&&r(1),u.key==="ArrowLeft"&&r(-1)};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[t,n,r]),t==null)return null;const i=e[t],o=a=>a.stopPropagation();return Go.createPortal(l.jsxs("div",{className:"fixed inset-0 z-[200] flex items-center justify-center bg-black/90 p-4",onClick:n,children:[l.jsx("button",{onClick:a=>{o(a),n()},"aria-label":s("lightbox.close"),className:"absolute right-4 top-4 rounded-full p-2 text-white/80 hover:bg-white/10 hover:text-white",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-7 w-7",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6l12 12M18 6 6 18"})})}),e.length>1&&l.jsx("button",{onClick:a=>{o(a),r(-1)},"aria-label":s("lightbox.previous"),className:"absolute left-2 top-1/2 -translate-y-1/2 rounded-full p-2 text-white/80 hover:bg-white/10 hover:text-white sm:left-4",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-8 w-8",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m15 18-6-6 6-6"})})}),l.jsx("img",{src:i.image_path,alt:i.caption||"",onClick:o,className:"max-h-[85vh] max-w-full rounded-lg object-contain"}),e.length>1&&l.jsx("button",{onClick:a=>{o(a),r(1)},"aria-label":s("lightbox.next"),className:"absolute right-2 top-1/2 -translate-y-1/2 rounded-full p-2 text-white/80 hover:bg-white/10 hover:text-white sm:right-4",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-8 w-8",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9 18 6-6-6-6"})})}),i.caption&&l.jsx("p",{onClick:o,className:"absolute bottom-4 left-1/2 -translate-x-1/2 rounded-full bg-black/60 px-4 py-1.5 text-sm text-white",children:i.caption})]}),document.body)}function SE(){const{brandSlug:e,projectSlug:t}=$s(),[n,r]=g.useState(null),[s,i]=g.useState(""),[o,a]=g.useState(null),{t:u}=Ce();g.useEffect(()=>{Z.get(`/gallery-brands/${e}/${t}/photos`).then(r).catch(d=>i(d.message))},[e,t]),st({title:n?`${n.project.name} – ${n.project.brand_name}`:u("galleryProjectPage.metaTitleFallback"),description:n?u("galleryProjectPage.metaDescription")(n.project.name):void 0,path:`/galerie/${e}/${t}`});const c=d=>{a(f=>{const h=n.photos.length;return(f+d+h)%h})};return s?l.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:s}):n?l.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[l.jsxs("p",{className:"mb-1 text-sm text-neutral-500 dark:text-neutral-400",children:[l.jsx(W,{to:"/galerie",className:"hover:text-brand-500",children:u("galleryProjectPage.breadcrumbGallery")})," /"," ",l.jsx(W,{to:`/galerie/${e}`,className:"hover:text-brand-500",children:n.project.brand_name})," / ",n.project.name]}),l.jsx("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:n.project.name}),n.photos.length===0&&l.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:u("galleryProjectPage.empty")}),l.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:n.photos.map((d,f)=>l.jsx(be,{index:f%6,shine:!0,className:"aspect-square overflow-hidden rounded-xl",children:l.jsx("button",{onClick:()=>a(f),className:"block h-full w-full","aria-label":d.caption||u("galleryProjectPage.enlargeImage"),children:l.jsx("img",{src:d.image_path,alt:d.caption||"",loading:"lazy",decoding:"async",className:"h-full w-full object-cover transition duration-300 hover:scale-105"})})},d.id))}),l.jsx(bE,{photos:n.photos,index:o,onClose:()=>a(null),onNavigate:c})]}):l.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:u("galleryProjectPage.loading")})}const jE={car:qg,caravan:ck,"car-front":ak,cog:Pk,zap:vb,boxes:ik,"shield-alert":ub,video:yb},PE=g.lazy(()=>ee(()=>import("./iconRegistry-BKlgDlOd.js"),__vite__mapDeps([0,1,2])));function CE({name:e,className:t="h-6 w-6",...n}){if(!e)return null;const r=jE[e];return r?l.jsx(r,{className:t,...n}):l.jsx(g.Suspense,{fallback:l.jsx("span",{className:`inline-block ${t}`,"aria-hidden":"true"}),children:l.jsx(PE,{name:e,className:t,...n})})}function TE(){const[e,t]=g.useState([]),n=na(),{t:r}=Ce();return g.useEffect(()=>{Z.get("/services").then(t).catch(()=>t([]))},[]),st({title:r("leistungen.metaTitle"),description:r("leistungen.metaDescription"),path:"/leistungen"}),n.services.enabled&&!n.bypass?l.jsx(qs,{message:n.services.message}):l.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[n.services.enabled&&n.bypass&&l.jsx(Qs,{inline:!0}),l.jsx("h1",{className:"mb-2 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:r("leistungen.title")}),l.jsx("p",{className:"mb-10 max-w-2xl text-neutral-600 dark:text-neutral-300",children:r("leistungen.intro")}),l.jsx("div",{className:"grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:e.map((s,i)=>l.jsxs(be,{index:i%3,shine:!0,className:"overflow-hidden rounded-xl border border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-900",children:[l.jsxs("div",{className:"relative aspect-[4/3]",children:[s.image_path&&l.jsx("img",{src:s.image_path,alt:s.title,className:"h-full w-full object-cover",loading:"lazy"}),l.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:l.jsx(CE,{name:s.icon_name,className:"h-6 w-6"})})]}),l.jsxs("div",{className:"p-6 pt-8",children:[l.jsx("h2",{className:"mb-2 font-semibold text-neutral-900 dark:text-white",children:s.title}),l.jsx("p",{className:"mb-3 text-sm text-neutral-600 dark:text-neutral-300",children:s.description}),l.jsxs(W,{to:s.cta_url||"/kontakt",className:"text-sm font-semibold text-brand-600 hover:underline dark:text-brand-400",children:[s.cta_label||r("leistungen.contact")," →"]})]})]},s.id))}),l.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:[l.jsx("h2",{className:"mb-2 text-xl font-bold text-neutral-900 dark:text-white",children:r("leistungen.notListedTitle")}),l.jsx("p",{className:"mb-5 text-neutral-600 dark:text-neutral-300",children:r("leistungen.notListedText")}),l.jsx(W,{to:"/kontakt",className:"inline-block rounded-md bg-brand-500 px-6 py-3 text-sm font-semibold text-white hover:bg-brand-600",children:r("leistungen.contact")})]})]})}function EE({name:e,description:t,className:n="",children:r}){const{consent:s,acceptAll:i,openSettings:o}=Ar();return s.external?r:l.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:[l.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.`}),l.jsxs("div",{className:"flex flex-wrap justify-center gap-2",children:[l.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"}),l.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 ox=e=>(e||"").replace(/[^\d+]/g,""),NE=e=>`https://wa.me/${ox(e).replace(/^0/,"49").replace("+","")}`,Wi={fontFamily:"'Michroma', sans-serif"};function _E({className:e}){return l.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:l.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 ME({path:e,className:t}){return l.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:l.jsx("path",{d:e})})}const LE={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 wm({formatted:e,color:t}){const[n,r]=e.split("€");return l.jsxs("span",{style:{...Wi,color:t},children:[n,l.jsx("span",{style:{fontFamily:"'Barlow', sans-serif"},children:"€"}),r]})}function Si({icon:e,label:t,name:n,type:r="text",required:s,value:i,onChange:o,placeholder:a}){return l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsx("label",{htmlFor:`kf-${n}`,className:"text-xs font-semibold uppercase tracking-[2px]",style:{color:"var(--kf-label)"},children:t}),l.jsxs("div",{className:"relative flex items-center",children:[l.jsx(e,{className:"pointer-events-none absolute left-[14px] h-[17px] w-[17px]",style:{color:"var(--kf-fieldicon)"}}),l.jsx("input",{id:`kf-${n}`,name:n,type:r,required:s,value:i,onChange:o,placeholder:a,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 AE(){const[e]=zw(),{phone:t,whatsapp:n,contact_email:r,address_street:s,address_zip:i,address_city:o,business_hours:a}=ht(),{t:u,language:c}=Ce(),{consent:d}=Ar(),f=[s,[i,o].filter(Boolean).join(" ")].filter(Boolean).join(", "),h=encodeURIComponent(f),x=`https://www.google.com/maps/dir/?api=1&destination=${h}`,w=i0(a,u("footer.closed")),y=C=>new Intl.NumberFormat(c==="de"?"de-DE":"en-US",{style:"currency",currency:"EUR"}).format(C),[k,p]=g.useState({name:"",email:"",phone:"",vin:"",message:""}),[m,v]=g.useState("idle"),[b,P]=g.useState(""),[T,S]=g.useState([]),[j,L]=g.useState([]),_=e.get("packageId"),F=e.get("total")?Number(e.get("total")):null;g.useEffect(()=>{if(!_){S([]);return}Z.get(`/packages/${_}/upgrades`).then(S).catch(()=>S([]))},[_]);const H=C=>{L(A=>A.includes(C)?A.filter(z=>z!==C):[...A,C])},te=T.filter(C=>j.includes(C.id)).reduce((C,A)=>C+Number(A.price),0);st({title:u("contactPage.metaTitle"),description:u("contactPage.metaDescription"),path:"/kontakt"});const N={brand:e.get("brand")||"",model:e.get("model")||"",package:e.get("package")||""},D=!!(N.brand&&N.model&&N.package),$=C=>p(A=>({...A,[C.target.name]:C.target.value})),K=async C=>{C.preventDefault(),v("sending"),P("");try{await Z.post("/contact",{...k,brand_name:N.brand||null,model_name:N.model||null,package_name:N.package||null,product_name:e.get("product")||null,package_id:_||null,package_product_id:e.get("productId")||null,upgrade_ids:j}),v("sent"),p({name:"",email:"",phone:"",vin:"",message:""})}catch(A){P(A.message),v("idle")}},E=[{key:"premium",title:u("contactPage.featurePremiumTitle"),sub:u("contactPage.featurePremiumSub")},{key:"germany",title:u("contactPage.featureGermanyTitle"),sub:u("contactPage.featureGermanySub")},{key:"individual",title:u("contactPage.featureIndividualTitle"),sub:u("contactPage.featureIndividualSub")},{key:"experts",title:u("contactPage.featureExpertsTitle"),sub:u("contactPage.featureExpertsSub")}];return l.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:l.jsxs("div",{className:"relative z-10 mx-auto max-w-[1280px] pt-10 sm:pt-14",children:[l.jsx("div",{className:"mb-3 text-[13px] font-semibold uppercase tracking-[6px]",style:{color:"var(--kf-accent2)"},children:u("contactPage.heroEyebrow")}),l.jsxs("h1",{className:"text-[34px] leading-[1.08] sm:text-[46px] lg:text-[60px]",style:{...Wi,color:"var(--kf-text)"},children:[u("contactPage.heroTitlePre")," ",l.jsx("span",{style:{color:"var(--kf-accent2)"},children:u("contactPage.heroTitleAccent")})," ",u("contactPage.heroTitlePost")]}),l.jsx("p",{className:"mb-10 mt-5 max-w-[520px] text-lg leading-[1.55]",style:{color:"var(--kf-muted)"},children:u("contactPage.heroSubtitle")}),l.jsxs("div",{className:"grid grid-cols-1 items-start gap-10 min-[981px]:grid-cols-[minmax(0,1.35fr)_minmax(320px,1fr)]",children:[l.jsx("div",{children:l.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:[D&&l.jsxs("div",{className:"mb-8 rounded-xl border px-6 py-[22px]",style:{background:"var(--kf-pkgbg)",borderColor:"var(--kf-pkgbrd)"},children:[l.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:[l.jsx(sb,{className:"h-4 w-4"}),u("contactPage.packageBoxTitle")]}),l.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-5 gap-y-2 text-[15px]",children:[l.jsx("span",{style:{color:"var(--kf-label)"},children:u("contactPage.contextBrand")}),l.jsx("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:N.brand}),l.jsx("span",{style:{color:"var(--kf-label)"},children:u("contactPage.contextModel")}),l.jsx("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:N.model}),l.jsx("span",{style:{color:"var(--kf-label)"},children:u("contactPage.contextPackage")}),l.jsx("span",{className:"font-semibold",style:{color:"var(--kf-text2)"},children:N.package})]}),l.jsxs("div",{className:"mt-3.5 flex items-baseline justify-between border-t pt-3.5",style:{borderColor:"var(--kf-pkgbrd)"},children:[l.jsx("span",{className:"text-[13px] font-semibold uppercase tracking-wide",style:{color:"var(--kf-muted)"},children:u("contactPage.packagePrice")}),l.jsx("span",{className:"text-xl",children:F!=null?l.jsx(wm,{formatted:y(F),color:"var(--kf-text)"}):"—"})]})]}),T.length>0&&l.jsxs("div",{className:"mb-8 rounded-xl border p-5",style:{background:"var(--kf-field)",borderColor:"var(--kf-fieldbrd)"},children:[l.jsx("div",{className:"mb-3 text-xs font-bold uppercase tracking-[2px]",style:{color:"var(--kf-accent2)"},children:u("contactPage.optionalUpgrades")}),l.jsx("div",{className:"space-y-2",children:T.map(C=>l.jsxs("label",{className:"flex cursor-pointer items-start gap-3 rounded-lg border p-3 text-sm",style:{borderColor:"var(--kf-fieldbrd)"},children:[l.jsx("input",{type:"checkbox",checked:j.includes(C.id),onChange:()=>H(C.id),className:"mt-0.5 h-4 w-4 rounded",style:{accentColor:"var(--kf-accent)"}}),l.jsxs("span",{className:"flex-1",children:[l.jsx("span",{className:"block font-semibold",style:{color:"var(--kf-text2)"},children:C.name}),C.description&&l.jsx("span",{className:"block text-xs",style:{color:"var(--kf-muted)"},children:C.description})]}),l.jsxs("span",{className:"font-semibold",style:{color:"var(--kf-accent2)"},children:["+",y(C.price)]})]},C.id))}),j.length>0&&F!=null&&l.jsxs("div",{className:"mt-3 flex items-baseline justify-between border-t pt-3 text-sm",style:{borderColor:"var(--kf-pkgbrd)"},children:[l.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide",style:{color:"var(--kf-muted)"},children:u("contactPage.totalWithUpgrades")}),l.jsx(wm,{formatted:y(F+te),color:"var(--kf-text)"})]})]}),l.jsx("h2",{className:"mb-8 text-xl",style:{...Wi,color:"var(--kf-text)"},children:u("contactPage.formTitle")}),m==="sent"&&l.jsxs("div",{className:"mb-6 rounded-[10px] border p-5",style:{borderColor:"var(--kf-accent)",background:"var(--kf-accentsoft)"},children:[l.jsx("div",{className:"text-base font-bold",style:{color:"var(--kf-accent2)"},children:u("contactPage.sentTitle")}),l.jsx("div",{className:"mt-1 text-sm",style:{color:"var(--kf-muted)"},children:u("contactPage.sentText")})]}),l.jsxs("form",{onSubmit:K,children:[l.jsxs("div",{className:"grid grid-cols-1 gap-6 min-[641px]:grid-cols-2",children:[l.jsx(Si,{icon:pb,label:u("contactPage.nameLabel"),name:"name",required:!0,value:k.name,onChange:$,placeholder:u("contactPage.namePlaceholder")}),l.jsx(Si,{icon:Df,label:u("contactPage.emailLabel"),name:"email",type:"email",required:!0,value:k.email,onChange:$,placeholder:u("contactPage.emailPlaceholder")}),l.jsx(Si,{icon:xo,label:u("contactPage.phoneLabel"),name:"phone",value:k.phone,onChange:$,placeholder:u("contactPage.phonePlaceholder")}),l.jsx(Si,{icon:qg,label:u("contactPage.vinLabel"),name:"vin",value:k.vin,onChange:$,placeholder:u("contactPage.vinPlaceholder")})]}),l.jsxs("div",{className:"mt-6 flex flex-col gap-2",children:[l.jsx("label",{htmlFor:"kf-message",className:"text-xs font-semibold uppercase tracking-[2px]",style:{color:"var(--kf-label)"},children:u("contactPage.messageLabel")}),l.jsx("textarea",{id:"kf-message",name:"message",rows:5,value:k.message,onChange:$,placeholder:u("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)"}})]}),b&&l.jsx("p",{className:"mt-4 text-sm text-red-600 dark:text-red-400",children:b}),l.jsxs("div",{className:"mt-8 flex flex-wrap items-center gap-5",children:[l.jsxs("button",{type:"submit",disabled:m==="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:[l.jsx(ab,{className:"h-[18px] w-[18px]"}),u(m==="sending"?"contactPage.sending":"contactPage.submit")]}),l.jsx("div",{className:"text-[13px]",style:{color:"var(--kf-label)"},children:u("contactPage.requiredHint")})]})]})]})}),l.jsxs("div",{className:"flex flex-col gap-6",children:[l.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:[l.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)"}}),l.jsx("h2",{className:"mb-7 text-[17px]",style:{...Wi,color:"var(--kf-text)"},children:u("contactPage.cardTitle")}),l.jsxs("div",{className:"flex flex-col gap-5",children:[l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("div",{className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full",style:{background:"var(--kf-accentsoft)"},children:l.jsx(xo,{className:"h-[18px] w-[18px]",style:{color:"var(--kf-accent2)"}})}),l.jsxs("div",{children:[l.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:u("contactPage.phone")}),l.jsx("a",{href:`tel:${ox(t)}`,className:"text-base font-semibold",style:{color:"var(--kf-text2)"},children:t})]})]}),l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("div",{className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full",style:{background:"var(--kf-accentsoft)"},children:l.jsx(Df,{className:"h-[18px] w-[18px]",style:{color:"var(--kf-accent2)"}})}),l.jsxs("div",{children:[l.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:u("contactPage.email")}),l.jsx("a",{href:`mailto:${r}`,className:"text-base font-semibold",style:{color:"var(--kf-text2)"},children:r})]})]}),l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("div",{className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full",style:{background:"var(--kf-accentsoft)"},children:l.jsx(Zg,{className:"h-[18px] w-[18px]",style:{color:"var(--kf-accent2)"}})}),l.jsxs("div",{children:[l.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:u("contactPage.address")}),l.jsxs("div",{className:"text-base font-semibold leading-[1.4]",style:{color:"var(--kf-text2)"},children:[s,l.jsx("br",{}),[i,o].filter(Boolean).join(" ")]})]})]}),n&&l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("div",{className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full",style:{background:"var(--kf-accentsoft)"},children:l.jsx(_E,{className:"h-[18px] w-[18px]",style:{color:"var(--kf-accent2)"}})}),l.jsxs("div",{children:[l.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:u("nav.whatsapp")}),l.jsx("a",{href:NE(n),className:"text-base font-semibold",style:{color:"var(--kf-text2)"},children:n})]})]})]}),l.jsxs("div",{className:"mt-7 border-t pt-6",style:{borderColor:"var(--kf-divider)"},children:[l.jsx("div",{className:"mb-3 text-[11px] font-semibold uppercase tracking-[3px]",style:{color:"var(--kf-accent2)"},children:u("contactPage.hours")}),l.jsx("div",{className:"grid grid-cols-[auto_1fr] gap-x-6 gap-y-2 text-[15px]",children:w.map(C=>l.jsxs("span",{style:{display:"contents"},children:[l.jsx("span",{style:{color:"var(--kf-label)"},children:C.days}),l.jsx("span",{children:C.label})]},C.key))})]})]}),l.jsxs("div",{className:"relative overflow-hidden rounded-2xl border",style:{background:"var(--kf-card)",borderColor:"var(--kf-cardbrd)",boxShadow:"var(--kf-shadow)"},children:[d.external&&l.jsxs("a",{href:x,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:[u("contactPage.mapOpenChip"),l.jsx(Nk,{className:"h-3.5 w-3.5",style:{color:"var(--kf-accent2)"}})]}),l.jsx(EE,{name:u("contactPage.mapEmbedName"),className:"h-[210px] w-full",children:l.jsx("div",{className:"h-[210px] overflow-hidden",children:l.jsx("iframe",{title:"HifiPlanet Amorbach – Standort",src:`https://www.google.com/maps?q=${h}&output=embed`,width:"100%",height:"290",style:{border:0,display:"block",marginTop:"-60px"},loading:"lazy",referrerPolicy:"no-referrer-when-downgrade"})})}),l.jsxs("a",{href:x,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:[u("contactPage.routePlan")," →"]})]})]})]}),l.jsx("div",{className:"mt-10 grid grid-cols-1 overflow-hidden rounded-2xl border min-[641px]:grid-cols-2 min-[901px]:grid-cols-4",style:{background:"var(--kf-card)",borderColor:"var(--kf-cardbrd)",boxShadow:"var(--kf-shadow2)"},children:E.map(C=>l.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:[l.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:l.jsx(ME,{path:LE[C.key],className:"h-[22px] w-[22px]"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[15px] font-bold",style:{color:"var(--kf-text)"},children:C.title}),l.jsx("div",{className:"mt-0.5 text-[13px]",style:{color:"var(--kf-muted)"},children:C.sub})]})]},C.key))})]})})}const Nu={audio:["mp3","wav","flac","m4a","aac","ogg","opus","aif","aiff","wma"],video:["mp4","mov","webm"],pdf:["pdf"],image:["jpg","jpeg","png","webp","gif"],archive:["zip","rar","7z"],document:["txt","rtf","doc","docx","xls","xlsx","odt","ods"]},PN=Object.values(Nu).flat(),DE=["mp3","wav","flac","m4a","aac","ogg","opus"],dd=e=>{const t=(e||"").lastIndexOf(".");return t===-1?"":e.slice(t+1).toLowerCase()},RE=e=>{const t=dd(e);return Object.keys(Nu).find(n=>Nu[n].includes(t))||"document"},IE=e=>DE.includes(dd(e)),VE=(e,t="de-DE")=>{const n=["B","KB","MB","GB"];let r=Number(e)||0,s=0;for(;r>=1024&&s=2?1:0}).format(r)} ${n[s]}`},OE={audio:eb,video:Rk,pdf:Af,image:Ak,archive:Mk,document:Af},_u="hifi-downloads-password",FE=()=>{try{return localStorage.getItem(_u)||""}catch{return""}},km=e=>{try{e?localStorage.setItem(_u,e):localStorage.removeItem(_u)}catch{}},bm=e=>Z.get("/downloads",e?{headers:{"X-Download-Password":encodeURIComponent(e)}}:void 0);function zE(){const[e,t]=g.useState(null),[n,r]=g.useState(!1),[s,i]=g.useState(""),[o,a]=g.useState(!1),[u,c]=g.useState(!1),[d,f]=g.useState(""),{t:h,language:x}=Ce();g.useEffect(()=>{const y=FE();bm(y).then(k=>{k.locked?(y&&km(""),r(!0)):t(k.items)}).catch(k=>f(k.message))},[]);const w=async y=>{y.preventDefault(),c(!0),a(!1);try{const k=await bm(s);k.locked?a(!0):(km(s),r(!1),t(k.items))}catch(k){f(k.message)}finally{c(!1)}};return st({title:h("downloadsPage.metaTitle"),description:h("downloadsPage.metaDescription"),path:"/downloads"}),l.jsxs("div",{className:"mx-auto max-w-4xl px-4 py-12 sm:px-6",children:[l.jsx("h1",{className:"mb-2 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:h("downloadsPage.title")}),l.jsx("p",{className:"mb-10 max-w-2xl text-neutral-600 dark:text-neutral-300",children:h("downloadsPage.intro")}),d&&l.jsx("p",{className:"text-red-600",children:d}),!d&&!n&&e===null&&l.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:h("downloadsPage.loading")}),(e==null?void 0:e.length)===0&&l.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:h("downloadsPage.empty")}),n&&l.jsxs("form",{onSubmit:w,className:"max-w-md rounded-xl border border-neutral-200 bg-white p-6 dark:border-neutral-800 dark:bg-neutral-900",children:[l.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[l.jsx(Wk,{className:"h-5 w-5 text-brand-500","aria-hidden":"true"}),l.jsx("h2",{className:"font-semibold text-neutral-900 dark:text-white",children:h("downloadsPage.lockedTitle")})]}),l.jsx("p",{className:"mb-4 text-sm text-neutral-600 dark:text-neutral-300",children:h("downloadsPage.lockedText")}),l.jsx("label",{htmlFor:"downloads-password",className:"sr-only",children:h("downloadsPage.passwordLabel")}),l.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[l.jsx("input",{id:"downloads-password",type:"password",required:!0,autoComplete:"off",value:s,onChange:y=>i(y.target.value),placeholder:h("downloadsPage.passwordLabel"),className:"w-full rounded-md border border-neutral-300 bg-white px-3 py-2 text-sm text-neutral-900 dark:border-neutral-700 dark:bg-neutral-950 dark:text-white"}),l.jsx("button",{type:"submit",disabled:u,className:"shrink-0 rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600 disabled:opacity-50",children:h(u?"downloadsPage.unlocking":"downloadsPage.unlock")})]}),o&&l.jsx("p",{className:"mt-2 text-sm text-red-600",role:"alert",children:h("downloadsPage.wrongPassword")})]}),l.jsx("div",{className:"space-y-4",children:e==null?void 0:e.map((y,k)=>{const p=OE[RE(y.file_name)];return l.jsx(be,{index:k%4,className:"rounded-xl border border-neutral-200 bg-white p-5 dark:border-neutral-800 dark:bg-neutral-900",children:l.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start",children:[l.jsx("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-brand-500/10 text-brand-600 dark:text-brand-400",children:l.jsx(p,{className:"h-6 w-6","aria-hidden":"true"})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("h2",{className:"font-semibold text-neutral-900 dark:text-white",children:y.title}),y.description&&l.jsx("p",{className:"mt-1 whitespace-pre-line text-sm text-neutral-600 dark:text-neutral-300",children:y.description}),l.jsxs("p",{className:"mt-1 text-xs text-neutral-400",children:[dd(y.file_name).toUpperCase()," · ",VE(y.file_size,x==="de"?"de-DE":"en-US")]}),IE(y.file_name)&&l.jsx("audio",{controls:!0,preload:"none",src:y.file_path,className:"mt-3 w-full"})]}),l.jsxs("a",{href:y.file_path,download:y.file_name,className:"inline-flex shrink-0 items-center justify-center gap-2 rounded-md bg-brand-500 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-600",children:[l.jsx(Tk,{className:"h-4 w-4","aria-hidden":"true"}),h("downloadsPage.download")]})]})},y.id)})})]})}function BE(){const[e,t]=g.useState(null);return g.useEffect(()=>{Z.get("/legal-pages/impressum").then(t).catch(()=>{})},[]),st({title:(e==null?void 0:e.title)||"Impressum",description:"Impressum von HifiPlanet Amorbach gemäß § 5 DDG.",path:"/impressum"}),e?l.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-12 sm:px-6",children:[l.jsx("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:e.title}),l.jsx("div",{className:"legal-content text-sm text-neutral-600 dark:text-neutral-300",dangerouslySetInnerHTML:{__html:e.body_html}})]}):null}function $E(){const[e,t]=g.useState(null);return g.useEffect(()=>{Z.get("/legal-pages/datenschutz").then(t).catch(()=>{})},[]),st({title:(e==null?void 0:e.title)||"Datenschutzerklärung",description:"Datenschutzerklärung von HifiPlanet Amorbach gemäß Art. 13 DSGVO.",path:"/datenschutz"}),e?l.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-12 sm:px-6",children:[l.jsx("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:e.title}),l.jsx("div",{className:"legal-content text-sm text-neutral-600 dark:text-neutral-300",dangerouslySetInnerHTML:{__html:e.body_html}})]}):null}function HE(){const[e,t]=g.useState(null);return g.useEffect(()=>{Z.get("/legal-pages/agb").then(t).catch(()=>{})},[]),st({title:(e==null?void 0:e.title)||"AGB",description:"Allgemeine Geschäftsbedingungen von HifiPlanet Amorbach.",path:"/agb"}),e?l.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-12 sm:px-6",children:[l.jsx("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:e.title}),l.jsx("div",{className:"legal-content text-sm text-neutral-600 dark:text-neutral-300",dangerouslySetInnerHTML:{__html:e.body_html}})]}):null}const Ja="hifi-chunk-reload",re=e=>g.lazy(()=>e().then(t=>{try{sessionStorage.removeItem(Ja)}catch{}return t},t=>{let n=!0;try{n=!!sessionStorage.getItem(Ja),sessionStorage.setItem(Ja,"1")}catch{}if(n)throw t;return window.location.reload(),new Promise(()=>{})})),WE=re(()=>ee(()=>import("./SetupWizard-CnDw-GC8.js"),[])),UE=re(()=>ee(()=>import("./Login-DQGVfomx.js"),[])),GE=re(()=>ee(()=>import("./Dashboard-HhIWPkCY.js"),[])),KE=re(()=>ee(()=>import("./Brands-Dox0FZUh.js"),__vite__mapDeps([3,4,5]))),XE=re(()=>ee(()=>import("./Models-ii45_Sg2.js"),__vite__mapDeps([6,4,5]))),YE=re(()=>ee(()=>import("./GalleryBrands-CmjBzT9Y.js"),__vite__mapDeps([7,4]))),qE=re(()=>ee(()=>import("./GalleryProjects-DyPMRVIE.js"),__vite__mapDeps([8,4]))),QE=re(()=>ee(()=>import("./GalleryPhotos-D63_2-5i.js"),[])),ZE=re(()=>ee(()=>import("./Packages-Dpbb0BQ5.js"),__vite__mapDeps([9,5,2,1]))),JE=re(()=>ee(()=>import("./Services-BS6wXqv9.js"),__vite__mapDeps([10,4,0,1,2]))),eN=re(()=>ee(()=>import("./Faqs-YTy7XkGr.js"),[])),tN=re(()=>ee(()=>import("./Partners-XxA2Rj_b.js"),__vite__mapDeps([11,4]))),nN=re(()=>ee(()=>import("./Downloads-_Z8wR0YD.js"),__vite__mapDeps([12,1]))),rN=re(()=>ee(()=>import("./HomeSections-DhyhYK-h.js"),__vite__mapDeps([13,14,5]))),sN=re(()=>ee(()=>import("./ContactRequests-zg1QMKCt.js"),[])),iN=re(()=>ee(()=>import("./AccountSettings-2nhdohvL.js"),[])),oN=re(()=>ee(()=>import("./AdminUsers-lCCgLSlC.js"),[])),aN=re(()=>ee(()=>import("./PermissionGroups-B2LgV5x6.js"),[])),lN=re(()=>ee(()=>import("./SettingsLayout-DBaO9_MT.js"),[])),uN=re(()=>ee(()=>import("./WebsiteSettings-B0cs1m83.js"),__vite__mapDeps([15,4]))),cN=re(()=>ee(()=>import("./LegalSettings-EsPW5ccC.js"),__vite__mapDeps([16,14]))),dN=re(()=>ee(()=>import("./UpdateSettings-QieYS0cn.js"),[])),fN=re(()=>ee(()=>import("./EmailSettings-BmNJuhHH.js"),__vite__mapDeps([17,14]))),hN=re(()=>ee(()=>import("./DatabaseSettings-G32NG4hK.js"),[])),mN=re(()=>ee(()=>import("./ExportImportSettings-DeVHjr9k.js"),[])),pN=re(()=>ee(()=>import("./MaintenanceSettings-Bv_S6G54.js"),[])),gN=re(()=>ee(()=>import("./ResetSettings-BPp-Ruq2.js"),[])),yN=l.jsx("div",{className:"min-h-screen bg-white dark:bg-neutral-950"});function xN(){const{packageId:e}=$s();return l.jsx(jr,{to:`/admin/packages?paket=${e}`,replace:!0})}function vN(){return l.jsxs(l.Fragment,{children:[l.jsx(Ww,{}),l.jsx(Kw,{}),l.jsx(Zw,{children:l.jsx(g.Suspense,{fallback:yN,children:l.jsxs(Pw,{children:[l.jsx(B,{path:"/setup",element:l.jsx(WE,{})}),l.jsxs(B,{element:l.jsx(AT,{}),children:[l.jsx(B,{path:"/",element:l.jsx(eE,{})}),l.jsx(B,{path:"/fahrzeuge",element:l.jsx(tE,{})}),l.jsx(B,{path:"/fahrzeuge/:brandSlug",element:l.jsx(nE,{})}),l.jsx(B,{path:"/fahrzeuge/:brandSlug/:modelSlug",element:l.jsx(vE,{})}),l.jsx(B,{path:"/galerie",element:l.jsx(wE,{})}),l.jsx(B,{path:"/galerie/:brandSlug",element:l.jsx(kE,{})}),l.jsx(B,{path:"/galerie/:brandSlug/:projectSlug",element:l.jsx(SE,{})}),l.jsx(B,{path:"/leistungen",element:l.jsx(TE,{})}),l.jsx(B,{path:"/kontakt",element:l.jsx(AE,{})}),l.jsx(B,{path:"/downloads",element:l.jsx(zE,{})}),l.jsx(B,{path:"/impressum",element:l.jsx(BE,{})}),l.jsx(B,{path:"/datenschutz",element:l.jsx($E,{})}),l.jsx(B,{path:"/agb",element:l.jsx(HE,{})})]}),l.jsx(B,{path:"/admin/login",element:l.jsx(UE,{})}),l.jsx(B,{path:"/admin",element:l.jsx(VT,{}),children:l.jsxs(B,{element:l.jsx(IT,{}),children:[l.jsx(B,{index:!0,element:l.jsx(GE,{})}),l.jsx(B,{path:"account",element:l.jsx(iN,{})}),l.jsx(B,{path:"brands",element:l.jsx(Ae,{permission:"brands.manage",children:l.jsx(KE,{})})}),l.jsx(B,{path:"models",element:l.jsx(Ae,{permission:"models.manage",children:l.jsx(XE,{})})}),l.jsx(B,{path:"gallery-brands",element:l.jsx(Ae,{permission:"gallery.manage",children:l.jsx(YE,{})})}),l.jsx(B,{path:"gallery-projects",element:l.jsx(Ae,{permission:"gallery.manage",children:l.jsx(qE,{})})}),l.jsx(B,{path:"gallery-projects/:projectId/photos",element:l.jsx(Ae,{permission:"gallery.manage",children:l.jsx(QE,{})})}),l.jsx(B,{path:"packages",element:l.jsx(Ae,{permission:"packages.manage",children:l.jsx(ZE,{})})}),l.jsx(B,{path:"packages/:packageId/*",element:l.jsx(xN,{})}),l.jsx(B,{path:"services",element:l.jsx(Ae,{permission:"services.manage",children:l.jsx(JE,{})})}),l.jsx(B,{path:"faqs",element:l.jsx(Ae,{permission:"content.manage",children:l.jsx(eN,{})})}),l.jsx(B,{path:"partners",element:l.jsx(Ae,{permission:"content.manage",children:l.jsx(tN,{})})}),l.jsx(B,{path:"downloads",element:l.jsx(Ae,{permission:"downloads.manage",children:l.jsx(nN,{})})}),l.jsx(B,{path:"home-sections",element:l.jsx(Ae,{permission:"content.manage",children:l.jsx(rN,{})})}),l.jsx(B,{path:"contact-requests",element:l.jsx(Ae,{permission:"contact.manage",children:l.jsx(sN,{})})}),l.jsx(B,{path:"users",element:l.jsx(Ae,{permission:"users.manage",children:l.jsx(oN,{})})}),l.jsx(B,{path:"permission-groups",element:l.jsx(Ae,{permission:"permission_groups.manage",children:l.jsx(aN,{})})}),l.jsxs(B,{path:"settings",element:l.jsx(Ae,{permission:"settings.manage",children:l.jsx(lN,{})}),children:[l.jsx(B,{index:!0,element:l.jsx(jr,{to:"website",replace:!0})}),l.jsx(B,{path:"website",element:l.jsx(uN,{})}),l.jsx(B,{path:"legal",element:l.jsx(cN,{})}),l.jsx(B,{path:"email",element:l.jsx(fN,{})}),l.jsx(B,{path:"database",element:l.jsx(hN,{})}),l.jsx(B,{path:"export-import",element:l.jsx(mN,{})}),l.jsx(B,{path:"maintenance",element:l.jsx(pN,{})}),l.jsx(B,{path:"update",element:l.jsx(Ae,{permission:"system.update",children:l.jsx(dN,{})})}),l.jsx(B,{path:"reset",element:l.jsx(gN,{})})]})]})})]})})})]})}el.createRoot(document.getElementById("root")).render(l.jsx(Dm.StrictMode,{children:l.jsx(Dw,{basename:"/".replace(/\/$/,"")||"/",children:l.jsx(kb,{children:l.jsx(Cb,{children:l.jsx(Db,{children:l.jsx(vN,{})})})})})}));export{qk as $,PN as A,ik as B,bk as C,CE as D,fk as E,gk as F,wk as G,Qg as H,Pk as I,Tk as J,Nk as K,W as L,Mk as M,jr as N,Ec as O,Ak as P,Rk as Q,Dm as R,CT as S,Af as T,Ok as U,zk as V,$k as W,Wk as X,Gk as Y,Df as Z,Zg as _,Z as a,Zk as a0,eb as a1,nb as a2,sb as a3,xo as a4,ab as a5,ub as a6,db as a7,hb as a8,pb as a9,yb as aa,vb as ab,rk as ac,kN as ad,nk as ae,Hs as b,Yo as c,tu as d,$s as e,Go as f,zw as g,mk as h,xk as i,l as j,VE as k,hm as l,Xw as m,jN as n,No as o,Vw as p,Jy as q,g as r,SN as s,Sm as t,st as u,wN as v,U as w,qg as x,ak as y,ck as z}; diff --git a/hifi/assets/trash-2-fu7u5OTF.js b/hifi/assets/trash-2-D2g7JxqJ.js similarity index 97% rename from hifi/assets/trash-2-fu7u5OTF.js rename to hifi/assets/trash-2-D2g7JxqJ.js index 965f69e..3b1851c 100644 --- a/hifi/assets/trash-2-fu7u5OTF.js +++ b/hifi/assets/trash-2-D2g7JxqJ.js @@ -1,4 +1,4 @@ -import{w as c}from"./index-QV-Szw5n.js";/** +import{w as c}from"./index-D7JbPKAF.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 e844368..50ed05e 100644 --- a/hifi/index.html +++ b/hifi/index.html @@ -40,7 +40,7 @@ "sameAs": ["https://www.youtube.com/@hifiplanet2812"] } - +