feat: Add preset shift templates, admin SMTP settings, test email dispatch, and email verification opt-out option

This commit is contained in:
Richard committed 2026-07-31 10:26:55 +02:00
1 parent 6ffcc58a4c
commit 7c377937ea
26 files changed
+1389 -597

No files matched your search

+9 -4
View File
@@ -374,9 +374,14 @@ class EventTemplateViewSet(viewsets.ModelViewSet):
max_participants=shift_data.get('max_participants', 1) max_participants=shift_data.get('max_participants', 1)
) )
skill_ids = shift_data.get('required_skill_ids', [])
skill_names = shift_data.get('required_skill_names', []) skill_names = shift_data.get('required_skill_names', [])
if skill_names: if skill_ids:
matching_skills = Skill.objects.filter(name__in=skill_names) shift.required_skills.set(Skill.objects.filter(id__in=skill_ids))
shift.required_skills.set(matching_skills) elif skill_names:
shift.required_skills.set(Skill.objects.filter(name__in=skill_names))
return Response(EventSerializer(event).data, status=status.HTTP_201_CREATED) return Response({
'message': f'Veranstaltung "{event.title}" wurde erfolgreich aus der Vorlage erstellt.',
'event_id': event.id
}, status=status.HTTP_201_CREATED)
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,27 @@
# Generated by Django 6.0.7 on 2026-07-31 08:22
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0004_user_is_email_verified_alter_user_is_approved_and_more'),
]
operations = [
migrations.CreateModel(
name='SMTPSetting',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('is_active', models.BooleanField(default=False, help_text='SMTP-Versand aktivieren')),
('host', models.CharField(default='smtp.example.com', max_length=255)),
('port', models.IntegerField(default=587)),
('username', models.CharField(blank=True, default='', max_length=255)),
('password', models.CharField(blank=True, default='', max_length=255)),
('use_tls', models.BooleanField(default=True)),
('use_ssl', models.BooleanField(default=False)),
('from_email', models.EmailField(default='noreply@schichtplaner.local', max_length=254)),
],
),
]
@@ -0,0 +1,18 @@
# Generated by Django 6.0.7 on 2026-07-31 08:23
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0005_smtpsetting'),
]
operations = [
migrations.AddField(
model_name='registrationrestrictionsetting',
name='require_email_verification',
field=models.BooleanField(default=True, help_text='E-Mail Bestätigungslink für neue Konten erforderlich'),
),
]
+20 -1
View File
@@ -39,6 +39,7 @@ class RegistrationDomainRule(models.Model):
class RegistrationRestrictionSetting(models.Model): class RegistrationRestrictionSetting(models.Model):
is_restriction_enabled = models.BooleanField(default=False) is_restriction_enabled = models.BooleanField(default=False)
require_admin_approval = models.BooleanField(default=False, help_text="Neue Registrierungen müssen von einem Admin freigeschaltet werden") require_admin_approval = models.BooleanField(default=False, help_text="Neue Registrierungen müssen von einem Admin freigeschaltet werden")
require_email_verification = models.BooleanField(default=True, help_text="E-Mail Bestätigungslink für neue Konten erforderlich")
@classmethod @classmethod
def get_solo(cls): def get_solo(cls):
@@ -46,7 +47,25 @@ class RegistrationRestrictionSetting(models.Model):
return obj return obj
def __str__(self): def __str__(self):
return f"Domain-Einschränkung: {self.is_restriction_enabled}, Admin-Freischaltung: {self.require_admin_approval}" return f"Domain-Einschränkung: {self.is_restriction_enabled}, Admin-Freischaltung: {self.require_admin_approval}, E-Mail-Pflicht: {self.require_email_verification}"
class SMTPSetting(models.Model):
is_active = models.BooleanField(default=False, help_text="SMTP-Versand aktivieren")
host = models.CharField(max_length=255, default="smtp.example.com")
port = models.IntegerField(default=587)
username = models.CharField(max_length=255, blank=True, default="")
password = models.CharField(max_length=255, blank=True, default="")
use_tls = models.BooleanField(default=True)
use_ssl = models.BooleanField(default=False)
from_email = models.EmailField(default="noreply@schichtplaner.local")
@classmethod
def get_solo(cls):
obj, _ = cls.objects.get_or_create(pk=1)
return obj
def __str__(self):
return f"SMTP {self.host}:{self.port} ({'Aktiv' if self.is_active else 'Inaktiv'})"
class EmailVerificationToken(models.Model): class EmailVerificationToken(models.Model):
token = models.UUIDField(default=uuid.uuid4, unique=True, editable=False) token = models.UUIDField(default=uuid.uuid4, unique=True, editable=False)
+7 -2
View File
@@ -1,6 +1,6 @@
from rest_framework import serializers from rest_framework import serializers
from django.contrib.auth import get_user_model from django.contrib.auth import get_user_model
from .models import RegistrationDomainRule, RegistrationRestrictionSetting from .models import RegistrationDomainRule, RegistrationRestrictionSetting, SMTPSetting
from apps.events.models import Skill from apps.events.models import Skill
User = get_user_model() User = get_user_model()
@@ -77,4 +77,9 @@ class RegistrationDomainRuleSerializer(serializers.ModelSerializer):
class RegistrationRestrictionSettingSerializer(serializers.ModelSerializer): class RegistrationRestrictionSettingSerializer(serializers.ModelSerializer):
class Meta: class Meta:
model = RegistrationRestrictionSetting model = RegistrationRestrictionSetting
fields = ['is_restriction_enabled', 'require_admin_approval'] fields = ['is_restriction_enabled', 'require_admin_approval', 'require_email_verification']
class SMTPSettingSerializer(serializers.ModelSerializer):
class Meta:
model = SMTPSetting
fields = ['is_active', 'host', 'port', 'username', 'password', 'use_tls', 'use_ssl', 'from_email']
+47 -1
View File
@@ -2,7 +2,7 @@ from django.test import TestCase
from django.contrib.auth import get_user_model from django.contrib.auth import get_user_model
from rest_framework.test import APIClient from rest_framework.test import APIClient
from rest_framework import status from rest_framework import status
from .models import RegistrationDomainRule, RegistrationRestrictionSetting, EmailVerificationToken from .models import RegistrationDomainRule, RegistrationRestrictionSetting, EmailVerificationToken, SMTPSetting
from apps.events.models import Event, TaskArea, Shift, ShiftSignup from apps.events.models import Event, TaskArea, Shift, ShiftSignup
User = get_user_model() User = get_user_model()
@@ -74,6 +74,30 @@ class UserRegistrationTests(TestCase):
self.assertEqual(res_login_ok.status_code, status.HTTP_200_OK) self.assertEqual(res_login_ok.status_code, status.HTTP_200_OK)
self.assertIn('token', res_login_ok.data) self.assertIn('token', res_login_ok.data)
def test_email_verification_opt_out(self):
# Set require_email_verification to False (Opt-Out)
setting = RegistrationRestrictionSetting.get_solo()
setting.require_email_verification = False
setting.save()
# Register user with Opt-Out
res_reg = self.client.post('/api/users/register/', {
'username': 'optout_user',
'email': 'optout@example.com',
'password': 'password123',
'display_name': 'Opt-Out User'
})
self.assertEqual(res_reg.status_code, status.HTTP_201_CREATED)
self.assertIn('token', res_reg.data)
self.assertFalse(res_reg.data.get('requires_verification'))
# Immediate login works
res_login = self.client.post('/api/users/login/', {
'username': 'optout_user',
'password': 'password123'
})
self.assertEqual(res_login.status_code, status.HTTP_200_OK)
def test_guest_shift_claiming_on_registration(self): def test_guest_shift_claiming_on_registration(self):
# Create event, task area, shift # Create event, task area, shift
event = Event.objects.create(title="Test Event", start_date="2026-08-01", end_date="2026-08-02") event = Event.objects.create(title="Test Event", start_date="2026-08-01", end_date="2026-08-02")
@@ -169,3 +193,25 @@ class UserRegistrationTests(TestCase):
self.assertIsNotNone(signup.user) self.assertIsNotNone(signup.user)
self.assertEqual(signup.user.username, 'erika_muster') self.assertEqual(signup.user.username, 'erika_muster')
self.assertIsNone(signup.guest_name) self.assertIsNone(signup.guest_name)
def test_smtp_settings_configuration(self):
admin = User.objects.create_superuser(username='smtp_admin', email='smtp@test.com', password='password123')
self.client.force_authenticate(user=admin)
# GET SMTP setting
res_get = self.client.get('/api/users/smtp-setting/')
self.assertEqual(res_get.status_code, status.HTTP_200_OK)
self.assertFalse(res_get.data['is_active'])
# UPDATE SMTP setting
res_post = self.client.post('/api/users/smtp-setting/', {
'is_active': True,
'host': 'smtp.mailtrap.io',
'port': 2525,
'username': 'test_user',
'password': 'test_password',
'from_email': 'noreply@test.de'
}, format='json')
self.assertEqual(res_post.status_code, status.HTTP_200_OK)
self.assertTrue(res_post.data['is_active'])
self.assertEqual(res_post.data['host'], 'smtp.mailtrap.io')
+4 -1
View File
@@ -4,7 +4,8 @@ from .views import (
RegisterView, VerifyEmailView, LoginView, MeView, RegisterView, VerifyEmailView, LoginView, MeView,
RegistrationDomainRuleViewSet, RegistrationRestrictionSettingView, RegistrationDomainRuleViewSet, RegistrationRestrictionSettingView,
PendingUsersView, ApproveUserView, AdminUserViewSet, PendingUsersView, ApproveUserView, AdminUserViewSet,
GenerateClaimLinkView, ClaimInfoView GenerateClaimLinkView, ClaimInfoView,
SMTPSettingView, TestSMTPEmailView
) )
router = DefaultRouter() router = DefaultRouter()
@@ -17,6 +18,8 @@ urlpatterns = [
path('login/', LoginView.as_view(), name='login'), path('login/', LoginView.as_view(), name='login'),
path('me/', MeView.as_view(), name='me'), path('me/', MeView.as_view(), name='me'),
path('restriction-setting/', RegistrationRestrictionSettingView.as_view(), name='restriction-setting'), path('restriction-setting/', RegistrationRestrictionSettingView.as_view(), name='restriction-setting'),
path('smtp-setting/', SMTPSettingView.as_view(), name='smtp-setting'),
path('smtp-setting/test/', TestSMTPEmailView.as_view(), name='smtp-setting-test'),
path('pending/', PendingUsersView.as_view(), name='pending-users'), path('pending/', PendingUsersView.as_view(), name='pending-users'),
path('<int:user_id>/approve/', ApproveUserView.as_view(), name='approve-user'), path('<int:user_id>/approve/', ApproveUserView.as_view(), name='approve-user'),
path('signups/<int:signup_id>/generate-claim-link/', GenerateClaimLinkView.as_view(), name='generate-claim-link'), path('signups/<int:signup_id>/generate-claim-link/', GenerateClaimLinkView.as_view(), name='generate-claim-link'),
+139 -6
View File
@@ -3,15 +3,67 @@ from rest_framework.response import Response
from rest_framework.authtoken.models import Token from rest_framework.authtoken.models import Token
from django.contrib.auth import authenticate, get_user_model from django.contrib.auth import authenticate, get_user_model
from django.shortcuts import get_object_or_404 from django.shortcuts import get_object_or_404
from .models import RegistrationDomainRule, RegistrationRestrictionSetting, GuestClaimToken, EmailVerificationToken from django.core.mail import get_connection, EmailMultiAlternatives
from .models import RegistrationDomainRule, RegistrationRestrictionSetting, GuestClaimToken, EmailVerificationToken, SMTPSetting
from .serializers import ( from .serializers import (
UserSerializer, AdminUserSerializer, RegisterSerializer, UserSerializer, AdminUserSerializer, RegisterSerializer,
RegistrationDomainRuleSerializer, RegistrationRestrictionSettingSerializer RegistrationDomainRuleSerializer, RegistrationRestrictionSettingSerializer, SMTPSettingSerializer
) )
from apps.events.models import ShiftSignup from apps.events.models import ShiftSignup
User = get_user_model() User = get_user_model()
def send_verification_email_to_user(user, v_token_str, request_host=None):
smtp = SMTPSetting.get_solo()
host_str = request_host or 'localhost:3000'
verify_url = f"http://{host_str}/?verify_email={v_token_str}"
subject = "E-Mail-Adresse bestätigen — Veranstaltungsschichtplaner"
text_content = f"Hallo {user.get_display_name()},\n\nbitte bestätige deine E-Mail-Adresse durch Aufruf des folgenden Links:\n{verify_url}\n\nVielen Dank!"
html_content = f"""
<div style="font-family: sans-serif; padding: 20px; line-height: 1.6; color: #1f2937;">
<h2 style="color: #4f46e5;">Willkommen beim Schichtplaner!</h2>
<p>Hallo <strong>{user.get_display_name()}</strong>,</p>
<p>vielen Dank für deine Registrierung. Bitte bestätige deine E-Mail-Adresse durch Klick auf den folgenden Button:</p>
<p style="margin: 25px 0;">
<a href="{verify_url}" style="background: #4f46e5; color: #ffffff; padding: 12px 24px; text-decoration: none; border-radius: 6px; font-weight: bold; display: inline-block;">
E-Mail-Adresse Bestätigen
</a>
</p>
<p style="color: #6b7280; font-size: 12px;">Oder kopiere diesen Link in deinen Browser:<br><a href="{verify_url}">{verify_url}</a></p>
</div>
"""
print("==================================================")
print(f"[E-MAIL BESTÄTIGUNG]: {verify_url}")
print("==================================================")
if smtp.is_active and smtp.host:
try:
connection = get_connection(
host=smtp.host,
port=smtp.port,
username=smtp.username,
password=smtp.password,
use_tls=smtp.use_tls,
use_ssl=smtp.use_ssl,
fail_silently=False,
)
msg = EmailMultiAlternatives(
subject=subject,
body=text_content,
from_email=smtp.from_email or 'noreply@schichtplaner.local',
to=[user.email],
connection=connection
)
msg.attach_alternative(html_content, "text/html")
msg.send()
return True, "E-Mail erfolgreich versendet."
except Exception as e:
return False, f"SMTP-Fehler: {str(e)}"
return True, "Bestätigungslink in Konsole ausgegeben."
class AdminUserViewSet(viewsets.ModelViewSet): class AdminUserViewSet(viewsets.ModelViewSet):
queryset = User.objects.all().order_by('-date_joined') queryset = User.objects.all().order_by('-date_joined')
serializer_class = AdminUserSerializer serializer_class = AdminUserSerializer
@@ -70,10 +122,15 @@ class RegisterView(views.APIView):
signup.save() signup.save()
assigned_count += 1 assigned_count += 1
if setting.require_email_verification:
user.is_approved = False
user.is_email_verified = False
user.is_active = True
user.save()
v_token = EmailVerificationToken.objects.create(user=user) v_token = EmailVerificationToken.objects.create(user=user)
print("==================================================") req_host = request.get_host()
print(f"[E-MAIL BESTÄTIGUNG]: http://localhost:3000/?verify_email={v_token.token}") send_verification_email_to_user(user, str(v_token.token), request_host=req_host)
print("==================================================")
return Response({ return Response({
'requires_verification': True, 'requires_verification': True,
@@ -82,6 +139,32 @@ class RegisterView(views.APIView):
'message': 'Konto erfolgreich erstellt! Bitte bestätige deine E-Mail-Adresse über den Link in der Bestätigungs-E-Mail oder warte auf die Admin-Freischaltung.' 'message': 'Konto erfolgreich erstellt! Bitte bestätige deine E-Mail-Adresse über den Link in der Bestätigungs-E-Mail oder warte auf die Admin-Freischaltung.'
}, status=status.HTTP_201_CREATED) }, status=status.HTTP_201_CREATED)
# Opt-Out: Email verification not required!
user.is_email_verified = True
if setting.require_admin_approval:
user.is_approved = False
user.is_active = False
user.save()
return Response({
'requires_approval': True,
'claimed_shifts_count': assigned_count,
'message': 'Konto erfolgreich registriert! Ein Administrator muss dein Konto vor der ersten Anmeldung freischalten.'
}, status=status.HTTP_201_CREATED)
user.is_approved = True
user.is_active = True
user.save()
token, _ = Token.objects.get_or_create(user=user)
user_data = UserSerializer(user).data
return Response({
'token': token.key,
'user': user_data,
'claimed_shifts_count': assigned_count,
'message': f'Konto erfolgreich erstellt! {assigned_count} Gast-Schichten wurden deinem Konto zugewiesen.' if assigned_count > 0 else 'Konto erfolgreich erstellt!'
}, status=status.HTTP_201_CREATED)
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
class VerifyEmailView(views.APIView): class VerifyEmailView(views.APIView):
@@ -218,6 +301,7 @@ class RegistrationRestrictionSettingView(views.APIView):
return Response({ return Response({
'is_restriction_enabled': setting.is_restriction_enabled, 'is_restriction_enabled': setting.is_restriction_enabled,
'require_admin_approval': setting.require_admin_approval, 'require_admin_approval': setting.require_admin_approval,
'require_email_verification': setting.require_email_verification,
'active_domains': active_domains 'active_domains': active_domains
}) })
@@ -227,12 +311,61 @@ class RegistrationRestrictionSettingView(views.APIView):
setting.is_restriction_enabled = request.data['is_restriction_enabled'] setting.is_restriction_enabled = request.data['is_restriction_enabled']
if 'require_admin_approval' in request.data: if 'require_admin_approval' in request.data:
setting.require_admin_approval = request.data['require_admin_approval'] setting.require_admin_approval = request.data['require_admin_approval']
if 'require_email_verification' in request.data:
setting.require_email_verification = request.data['require_email_verification']
setting.save() setting.save()
return Response({ return Response({
'is_restriction_enabled': setting.is_restriction_enabled, 'is_restriction_enabled': setting.is_restriction_enabled,
'require_admin_approval': setting.require_admin_approval 'require_admin_approval': setting.require_admin_approval,
'require_email_verification': setting.require_email_verification
}) })
class SMTPSettingView(views.APIView):
permission_classes = [permissions.IsAdminUser]
def get(self, request):
setting = SMTPSetting.get_solo()
return Response(SMTPSettingSerializer(setting).data)
def post(self, request):
setting = SMTPSetting.get_solo()
serializer = SMTPSettingSerializer(setting, data=request.data, partial=True)
if serializer.is_valid():
serializer.save()
return Response(serializer.data)
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
class TestSMTPEmailView(views.APIView):
permission_classes = [permissions.IsAdminUser]
def post(self, request):
smtp = SMTPSetting.get_solo()
target_email = request.data.get('email') or request.user.email
if not target_email:
return Response({'error': 'E-Mail-Adresse erforderlich.'}, status=status.HTTP_400_BAD_REQUEST)
try:
connection = get_connection(
host=smtp.host,
port=smtp.port,
username=smtp.username,
password=smtp.password,
use_tls=smtp.use_tls,
use_ssl=smtp.use_ssl,
fail_silently=False,
)
msg = EmailMultiAlternatives(
subject="Test E-Mail — SMTP Konfiguration",
body=f"Hallo,\n\ndies ist eine Test-E-Mail zur Überprüfung der SMTP-Einstellungen für {request.user.get_display_name()}.",
from_email=smtp.from_email or 'noreply@schichtplaner.local',
to=[target_email],
connection=connection
)
msg.send()
return Response({'message': f'Test E-Mail erfolgreich an {target_email} gesendet!'})
except Exception as e:
return Response({'error': f'SMTP-Verbindungsfehler: {str(e)}'}, status=status.HTTP_400_BAD_REQUEST)
class PendingUsersView(views.APIView): class PendingUsersView(views.APIView):
permission_classes = [permissions.IsAdminUser] permission_classes = [permissions.IsAdminUser]
-267
View File
@@ -1,267 +0,0 @@
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const s of l)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(l){const s={};return l.integrity&&(s.integrity=l.integrity),l.referrerPolicy&&(s.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?s.credentials="include":l.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(l){if(l.ep)return;l.ep=!0;const s=n(l);fetch(l.href,s)}})();function dd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pa={exports:{}},Ll={},La={exports:{}},B={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var kr=Symbol.for("react.element"),fd=Symbol.for("react.portal"),md=Symbol.for("react.fragment"),pd=Symbol.for("react.strict_mode"),hd=Symbol.for("react.profiler"),xd=Symbol.for("react.provider"),gd=Symbol.for("react.context"),yd=Symbol.for("react.forward_ref"),vd=Symbol.for("react.suspense"),wd=Symbol.for("react.memo"),kd=Symbol.for("react.lazy"),yo=Symbol.iterator;function Nd(e){return e===null||typeof e!="object"?null:(e=yo&&e[yo]||e["@@iterator"],typeof e=="function"?e:null)}var za={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ma=Object.assign,Aa={};function Ln(e,t,n){this.props=e,this.context=t,this.refs=Aa,this.updater=n||za}Ln.prototype.isReactComponent={};Ln.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ln.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Da(){}Da.prototype=Ln.prototype;function Ni(e,t,n){this.props=e,this.context=t,this.refs=Aa,this.updater=n||za}var Si=Ni.prototype=new Da;Si.constructor=Ni;Ma(Si,Ln.prototype);Si.isPureReactComponent=!0;var vo=Array.isArray,Ra=Object.prototype.hasOwnProperty,ji={current:null},Oa={key:!0,ref:!0,__self:!0,__source:!0};function Ia(e,t,n){var r,l={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)Ra.call(t,r)&&!Oa.hasOwnProperty(r)&&(l[r]=t[r]);var a=arguments.length-2;if(a===1)l.children=n;else if(1<a){for(var u=Array(a),d=0;d<a;d++)u[d]=arguments[d+2];l.children=u}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)l[r]===void 0&&(l[r]=a[r]);return{$$typeof:kr,type:e,key:s,ref:o,props:l,_owner:ji.current}}function Sd(e,t){return{$$typeof:kr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function _i(e){return typeof e=="object"&&e!==null&&e.$$typeof===kr}function jd(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var wo=/\/+/g;function ts(e,t){return typeof e=="object"&&e!==null&&e.key!=null?jd(""+e.key):t.toString(36)}function Wr(e,t,n,r,l){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case kr:case fd:o=!0}}if(o)return o=e,l=l(o),e=r===""?"."+ts(o,0):r,vo(l)?(n="",e!=null&&(n=e.replace(wo,"$&/")+"/"),Wr(l,t,n,"",function(d){return d})):l!=null&&(_i(l)&&(l=Sd(l,n+(!l.key||o&&o.key===l.key?"":(""+l.key).replace(wo,"$&/")+"/")+e)),t.push(l)),1;if(o=0,r=r===""?".":r+":",vo(e))for(var a=0;a<e.length;a++){s=e[a];var u=r+ts(s,a);o+=Wr(s,t,n,u,l)}else if(u=Nd(e),typeof u=="function")for(e=u.call(e),a=0;!(s=e.next()).done;)s=s.value,u=r+ts(s,a++),o+=Wr(s,t,n,u,l);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Pr(e,t,n){if(e==null)return e;var r=[],l=0;return Wr(e,r,"","",function(s){return t.call(n,s,l++)}),r}function _d(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ee={current:null},Gr={transition:null},bd={ReactCurrentDispatcher:Ee,ReactCurrentBatchConfig:Gr,ReactCurrentOwner:ji};function $a(){throw Error("act(...) is not supported in production builds of React.")}B.Children={map:Pr,forEach:function(e,t,n){Pr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Pr(e,function(){t++}),t},toArray:function(e){return Pr(e,function(t){return t})||[]},only:function(e){if(!_i(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};B.Component=Ln;B.Fragment=md;B.Profiler=hd;B.PureComponent=Ni;B.StrictMode=pd;B.Suspense=vd;B.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=bd;B.act=$a;B.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Ma({},e.props),l=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=ji.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)Ra.call(t,u)&&!Oa.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&a!==void 0?a[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){a=Array(u);for(var d=0;d<u;d++)a[d]=arguments[d+2];r.children=a}return{$$typeof:kr,type:e.type,key:l,ref:s,props:r,_owner:o}};B.createContext=function(e){return e={$$typeof:gd,_currentValue:e,_currentValue2:e,_threadCount:0,ProviderLine truncated
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Cd=j,Td=Symbol.for("react.element"),Pd=Symbol.for("react.fragment"),Ld=Object.prototype.hasOwnProperty,zd=Cd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Md={key:!0,ref:!0,__self:!0,__source:!0};function Fa(e,t,n){var r,l={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)Ld.call(t,r)&&!Md.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:Td,type:e,key:s,ref:o,props:l,_owner:zd.current}}Ll.Fragment=Pd;Ll.jsx=Fa;Ll.jsxs=Fa;Pa.exports=Ll;var i=Pa.exports,Es={},Va={exports:{}},Ie={},Ua={exports:{}},Ba={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(T,O){var L=T.length;T.push(O);e:for(;0<L;){var q=L-1>>>1,se=T[q];if(0<l(se,O))T[q]=O,T[L]=se,L=q;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var O=T[0],L=T.pop();if(L!==O){T[0]=L;e:for(var q=0,se=T.length,et=se>>>1;q<et;){var ge=2*(q+1)-1,ye=T[ge],me=ge+1,ot=T[me];if(0>l(ye,L))me<se&&0>l(ot,ye)?(T[q]=ot,T[me]=L,q=me):(T[q]=ye,T[ge]=L,q=ge);else if(me<se&&0>l(ot,L))T[q]=ot,T[me]=L,q=me;else break e}}return O}function l(T,O){var L=T.sortIndex-O.sortIndex;return L!==0?L:T.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var u=[],d=[],h=1,g=null,x=3,k=!1,y=!1,v=!1,R=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(T){for(var O=n(d);O!==null;){if(O.callback===null)r(d);else if(O.startTime<=T)r(d),O.sortIndex=O.expirationTime,t(u,O);else break;O=n(d)}}function w(T){if(v=!1,m(T),!y)if(n(u)!==null)y=!0,H(S);else{var O=n(d);O!==null&&Se(w,O.startTime-T)}}function S(T,O){y=!1,v&&(v=!1,f(E),E=-1),k=!0;var L=x;try{for(m(O),g=n(u);g!==null&&(!(g.expirationTime>O)||T&&!ee());){var q=g.callback;if(typeof q=="function"){g.callback=null,x=g.priorityLevel;var se=q(g.expirationTime<=O);O=e.unstable_now(),typeof se=="function"?g.callback=se:g===n(u)&&r(u),m(O)}else r(u);g=n(u)}if(g!==null)var et=!0;else{var ge=n(d);ge!==null&&Se(w,ge.startTime-O),et=!1}return et}finally{g=null,x=L,k=!1}}var b=!1,N=null,E=-1,U=5,M=-1;function ee(){return!(e.unstable_now()-M<U)}function D(){if(N!==null){var T=e.unstable_now();M=T;var O=!0;try{O=N(!0,T)}finally{O?I():(b=!1,N=null)}}else b=!1}var I;if(typeof c=="function")I=function(){c(D)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,W=V.port2;V.port1.onmessage=D,I=function(){W.postMessage(null)}}else I=function(){R(D,0)};function H(T){N=T,b||(b=!0,I())}function Se(T,O){E=R(function(){T(e.unstable_now())},O)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(T){T.callback=null},e.unstable_continueExecution=function(){y||k||(y=!0,H(S))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(T){switch(x){case 1:case 2:case 3:var O=3;break;default:O=x}var L=x;x=O;try{return T()}finally{x=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,O){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var L=x;x=T;try{return O()}finally{x=L}},e.unstable_scheduleCallback=function(T,O,L){var q=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?q+L:q):L=q,T){case 1:var se=-1;break;case 2:se=250;break;case 5:se=1073741823;break;case 4:se=1e4;break;default:se=5e3}return se=L+se,T={id:h++,callback:O,priorityLevel:T,startTime:L,expirationTime:se,sortIndex:-1},L>q?(T.sortIndex=L,t(d,T),n(u)===null&&T===n(d)&&(v?(f(E),E=-1):v=!0,Se(w,L-q))):(T.sortIndex=se,t(u,T),y||k||(y=!0,H(S))),T},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(T){var O=x;return function(){var L=x;x=O;try{return T.apply(this,arguments)}finally{x=L}}}})(Ba);Ua.exports=Ba;var Ad=Ua.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Dd=j,Oe=Ad;function _(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Ha=new Set,nr={};function nn(e,t){jn(e,t),jn(e+"Capture",t)}function jn(e,t){for(nr[e]=t,e=0;e<t.length;e++)Ha.add(t[e])}var mt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cs=Object.prototype.hasOwnProperty,Rd=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ko={},No={};function Od(e){return Cs.call(No,e)?!0:Cs.call(ko,e)?!1:Rd.test(e)?No[e]=!0:(ko[e]=!0,!1)}function Id(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function $d(e,t,n,r){if(t===null||typeof t>"u"||Id(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ce(e,t,n,r,l,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xe[e]=new Ce(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xe[t]=new Ce(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xe[e]=new Ce(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xe[e]=new Ce(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){xe[e]=new Ce(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xe[e]=new Ce(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xe[e]=new Ce(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xe[e]=new Ce(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xe[e]=new Ce(e,5,!1,e.toLowerCase(),null,!1,!1)});var bi=/[\-:]([a-z])/g;function Ei(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(bi,Ei);xe[t]=new Ce(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(bi,Ei);xe[t]=new Ce(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(bi,Ei);xe[t]=new Ce(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xe[e]=new Ce(e,1,!1,e.toLowerCase(),null,!1,!1)});xe.xlinkHref=new Ce("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xe[e]=new Ce(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ci(e,t,n,r){var l=xe.hasOwnProperty(t)?xe[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!==" Line truncated
`+ns+e}var rs=!1;function ls(e,t){if(!e||rs)return"";rs=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var l=d.stack.split(`
`),s=r.stack.split(`
`),o=l.length-1,a=s.length-1;1<=o&&0<=a&&l[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(l[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||l[o]!==s[a]){var u=`
`+l[o].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=o&&0<=a);break}}}finally{rs=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Un(e):""}function Fd(e){switch(e.tag){case 5:return Un(e.type);case 16:return Un("Lazy");case 13:return Un("Suspense");case 19:return Un("SuspenseList");case 0:case 2:case 15:return e=ls(e.type,!1),e;case 11:return e=ls(e.type.render,!1),e;case 1:return e=ls(e.type,!0),e;default:return""}}function zs(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 on:return"Fragment";case sn:return"Portal";case Ts:return"Profiler";case Ti:return"StrictMode";case Ps:return"Suspense";case Ls:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ka:return(e.displayName||"Context")+".Consumer";case Qa:return(e._context.displayName||"Context")+".Provider";case Pi:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Li:return t=e.displayName||null,t!==null?t:zs(e.type)||"Memo";case wt:t=e._payload,e=e._init;try{return zs(e(t))}catch{}}return null}function Vd(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 zs(t);case 8:return t===Ti?"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 At(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ga(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ud(e){var t=Ga(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 l=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function zr(e){e._valueTracker||(e._valueTracker=Ud(e))}function Ya(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ga(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function il(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 Ms(e,t){var n=t.checked;return le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function jo(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=At(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 qa(e,t){t=t.checked,t!=null&&Ci(e,"checked",t,!1)}function As(e,t){qa(e,t);var n=At(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")?Ds(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ds(e,t.type,At(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function _o(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 Ds(e,t,n){(t!=="number"||il(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Bn=Array.isArray;function yn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+At(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Rs(e,t){if(t.dan Line truncated
`).replace(Xf,"")}function Fr(e,t,n){if(t=Go(t),Go(e)!==t&&n)throw Error(_(425))}function pl(){}var Ys=null,qs=null;function Zs(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Js=typeof setTimeout=="function"?setTimeout:void 0,em=typeof clearTimeout=="function"?clearTimeout:void 0,Yo=typeof Promise=="function"?Promise:void 0,tm=typeof queueMicrotask=="function"?queueMicrotask:typeof Yo<"u"?function(e){return Yo.resolve(null).then(e).catch(nm)}:Js;function nm(e){setTimeout(function(){throw e})}function gs(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),or(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);or(t)}function Tt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function qo(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Mn=Math.random().toString(36).slice(2),lt="__reactFiber$"+Mn,fr="__reactProps$"+Mn,pt="__reactContainer$"+Mn,Xs="__reactEvents$"+Mn,rm="__reactListeners$"+Mn,lm="__reactHandles$"+Mn;function Ht(e){var t=e[lt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pt]||n[lt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=qo(e);e!==null;){if(n=e[lt])return n;e=qo(e)}return t}e=n,n=e.parentNode}return null}function jr(e){return e=e[lt]||e[pt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function dn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(_(33))}function Rl(e){return e[fr]||null}var ei=[],fn=-1;function Ot(e){return{current:e}}function X(e){0>fn||(e.current=ei[fn],ei[fn]=null,fn--)}function Z(e,t){fn++,ei[fn]=e.current,e.current=t}var Dt={},Ne=Ot(Dt),Le=Ot(!1),Yt=Dt;function _n(e,t){var n=e.type.contextTypes;if(!n)return Dt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},s;for(s in n)l[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function ze(e){return e=e.childContextTypes,e!=null}function hl(){X(Le),X(Ne)}function Zo(e,t,n){if(Ne.current!==Dt)throw Error(_(168));Z(Ne,t),Z(Le,n)}function Iu(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(_(108,Vd(e)||"Unknown",l));return le({},n,r)}function xl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Dt,Yt=Ne.current,Z(Ne,e),Z(Le,Le.current),!0}function Jo(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=Iu(e,t,Yt),r.__reactInternalMemoizedMergedChildContext=e,X(Le),X(Ne),Z(Ne,e)):X(Le),Z(Le,n)}var ut=null,Ol=!1,ys=!1;function $u(e){ut===null?ut=[e]:ut.push(e)}function sm(e){Ol=!0,$u(e)}function It(){if(!ys&&ut!==null){ys=!0;var e=0,t=G;try{var n=ut;for(G=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ut=null,Ol=!1}catch(l){throw ut!==null&&(ut=ut.slice(e+1)),cu(Mi,It),l}finally{G=t,ys=!1}}return null}var mn=[],pn=0,gl=null,yl=0,Ve=[],Ue=0,qt=null,ct=1,dt="";function Vt(e,t){mn[pn++]=yl,mn[pn++]=gl,gl=e,yl=t}function Fu(e,t,n){Ve[Ue++]=ct,Ve[Ue++]=dt,Ve[Ue++]=qt,qt=e;var r=ct;e=dt;var l=32-Ze(r)-1;r&=~(1<<l),n+=1;var s=32-Ze(t)+l;if(30<s){var o=l-l%5;s=(r&(1<<o)-1).toString(32),r>>=o,l-=o,ct=1<<32-Ze(t)+l|n<<l|r,dt=s+e}else ct=1<<s|n<<l|r,dt=e}function Ui(e){e.return!==null&&(Vt(e,1),Fu(e,1,0))}function Bi(e){for(;e===gl;)gl=mn[--pn],mn[pn]=null,yl=mn[--pn],mn[pn]=null;for(;e===qt;)qt=Ve[--Ue],Ve[Ue]=null,dt=Ve[--Ue],Ve[Ue]=null,ct=Ve[--Ue],Ve[Ue]=null}var Re=null,De=null,te=!1,qe=null;function Vu(e,t){var n=Be(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Xo(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Re=e,De=Tt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Re=e,De=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=qt!==null?{id:ct,overflow:dt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Be(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Re=e,De=null,!0):!1;default:return!1}}function ti(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ni(e){if(te){var t=De;if(t){var n=t;if(!Xo(e,t)){if(ti(e))throw Error(_(418));t=Tt(n.nextSibling);var r=Re;t&&Xo(e,t)?Vu(r,n):(e.flags=e.flags&-4097|2,te=!1,Re=e)}}else{if(ti(e))throw Error(_(418));e.flags=e.flags&-4097|2,te=!1,Re=e}}}function ea(e){for(e=e.return;e!==null Line truncated
Error generating stack: `+s.message+`
`+s.stack}return{value:e,source:t,stack:l,digest:null}}function Ss(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ii(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var pm=typeof WeakMap=="function"?WeakMap:Map;function pc(e,t,n){n=ft(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){bl||(bl=!0,xi=r),ii(e,t)},n}function hc(e,t,n){n=ft(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){ii(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){ii(e,t),typeof r!="function"&&(Lt===null?Lt=new Set([this]):Lt.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function aa(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new pm;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Cm.bind(null,e,t,n),t.then(e,e))}function ua(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 ca(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,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=ft(-1,1),t.tag=2,Pt(n,t,1))),n.lanes|=1),e)}var hm=gt.ReactCurrentOwner,Pe=!1;function _e(e,t,n,r){t.child=e===null?Hu(t,null,n,r):En(t,e.child,n,r)}function da(e,t,n,r,l){n=n.render;var s=t.ref;return Nn(t,l),r=eo(e,t,n,r,s,l),n=to(),e!==null&&!Pe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,xt(e,t,l)):(te&&n&&Ui(t),t.flags|=1,_e(e,t,r,l),t.child)}function fa(e,t,n,r,l){if(e===null){var s=n.type;return typeof s=="function"&&!fo(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,xc(e,t,s,r,l)):(e=ll(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&l)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:ur,n(o,r)&&e.ref===t.ref)return xt(e,t,l)}return t.flags|=1,e=Mt(s,r),e.ref=t.ref,e.return=t,t.child=e}function xc(e,t,n,r,l){if(e!==null){var s=e.memoizedProps;if(ur(s,r)&&e.ref===t.ref)if(Pe=!1,t.pendingProps=r=s,(e.lanes&l)!==0)e.flags&131072&&(Pe=!0);else return t.lanes=e.lanes,xt(e,t,l)}return oi(e,t,n,r,l)}function gc(e,t,n){var r=t.pendingProps,l=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Z(gn,Ae),Ae|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Z(gn,Ae),Ae|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Z(gn,Ae),Ae|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Z(gn,Ae),Ae|=r;return _e(e,t,l,n),t.child}function yc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function oi(e,t,n,r,l){var s=ze(n)?Yt:Ne.current;return s=_n(t,s),Nn(t,l),n=eo(e,t,n,r,s,l),r=to(),e!==null&&!Pe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,xt(e,t,l)):(te&&r&&Ui(t),t.flags|=1,_e(e,t,n,l),t.child)}function ma(e,t,n,r,l){if(ze(n)){var s=!0;xl(t)}else s=!1;if(Nn(t,l),t.stateNode===null)tl(e,t),mc(t,n,r),si(t,n,r,l),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var u=o.context,d=n.contextType;typeof d=="object"&&d!==null?d=Qe(d):(d=ze(n)?Yt:Ne.current,d=_n(t,d));var h=n.getDerivedStateFromProps,g=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function";g||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||u!==d)&&oa(t,o,r,d),kt=!1;var x=t.memoizedState;o.state=x,kl(t,r,o,l),u=t.memoizedState,a!==r||x!==u||Le.current||kt?(typeof h=="function"&&(li(t,n,h,r),u=t.memoizedState),(a=kt||ia(t,n,a,r,x,u,d))?(g||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=d,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Ku(e,t),a=t.memoizedProps,d=t.type===t.elementType?a:Ge(t.type,a),o.props=d,g=t.pendingProps,x=o.context,u=n.contextType,typeof u=="object"&&u!==null?u=Qe(u):(u=ze(n)?Yt:Ne.current,u=_n(t,u));var k=n.getDerivedStateFromProps;(h=typeof k=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==g||x!==u)&&oa(t,o,r,u),kt=!1,x=t.memoizedState,o.state=x,kl(t,r,o,l);var y=t.memoizedState Line truncated
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Fm=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Uc=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var Vm={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Um=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:l="",children:s,iconNode:o,...a},u)=>j.createElement("svg",{ref:u,...Vm,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Uc("lucide",l),...a},[...o.map(([d,h])=>j.createElement(d,h)),...Array.isArray(s)?s:[s]]));/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const F=(e,t)=>{const n=j.forwardRef(({className:r,...l},s)=>j.createElement(Um,{ref:s,iconNode:t,className:Uc(`lucide-${Fm(e)}`,r),...l}));return n.displayName=`${e}`,n};/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Bc=F("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Hc=F("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Bm=F("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ea=F("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const br=F("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Hm=F("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Qm=F("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Er=F("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const en=F("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vr=F("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Km=F("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Qc=F("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Wm=F("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ca=F("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Wl=F("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Gm=F("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ym=F("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qm=F("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const go=F("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Zm=F("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Jm=F("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Xm=F("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wr=F("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ep=F("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const tn=F("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const tp=F("Printer",[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Kc=F("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ta=F("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const np=F("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rp=F("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Wc=F("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Gc=F("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lp=F("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sp=F("TableProperties",[["path",{d:"M15 3v18",key:"14nvp0"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Bt=F("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Pl=F("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ip=F("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wi=F("UserX",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sl=F("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const op=F("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Yc=F("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function ap({branding:e,user:t,activeTab:n,onChangeTab:r,themeMode:l,onChangeThemeMode:s,onLogout:o,onOpenAuth:a,onOpenCreateEvent:u,onOpenTemplates:d,onOpenProfile:h,onOpenAdmin:g,pwaInstallPrompt:x,onInstallPwa:k}){const y=(e==null?void 0:e.primary_color)||"var(--brand-primary)",v=()=>{s(l==="dark"?"light":l==="light"?"auto":"dark")};return i.jsxs("header",{className:"bg-surface border-b border-grid sticky top-0 z-40",children:[i.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-16 flex items-center justify-between gap-4",children:[i.jsxs("div",{className:"flex items-center space-x-3 shrink-0",children:[i.jsx("div",{onClick:()=>r("home"),style:{backgroundColor:y},className:"w-8 h-8 rounded-sm flex items-center justify-center text-white font-bold cursor-pointer shadow-sm",children:e!=null&&e.logo_url?i.jsx("img",{src:e.logo_url,alt:"Logo",className:"w-4 h-4 object-contain"}):i.jsx(br,{className:"w-4 h-4"})}),i.jsxs("div",{onClick:()=>r("home"),className:"cursor-pointer",children:[i.jsx("h1",{className:"font-serif text-base font-bold tracking-tight text-main leading-none",children:(e==null?void 0:e.app_name)||"Schichtplaner"}),i.jsx("div",{className:"text-[10px] font-mono text-muted mt-1 uppercase tracking-wider flex items-center gap-1.5",children:t?i.jsxs("span",{className:"text-emerald-500 font-semibold",children:["[ ",t.display_name||t.username," ]"]}):i.jsx("span",{className:"text-amber-500 font-semibold",children:"[ GAST-MODUS ]"})})]})]}),i.jsxs("nav",{className:"hidden md:flex items-center gap-2",children:[i.jsxs("button",{onClick:()=>r("home"),className:`px-3 py-1.5 rounded-sm text-xs font-mono transition flex items-center gap-1.5 border ${n==="home"?"bg-surface-hover text-main font-bold border-grid":"text-muted hover:text-main border-transparent"}`,children:[i.jsx(Ca,{className:"w-3.5 h-3.5"})," Startseite"]}),i.jsxs("button",{onClick:()=>r("calendar"),className:`px-3 py-1.5 rounded-sm text-xs font-mono transition flex items-center gap-1.5 border ${n==="calendar"?"bg-surface-hover text-main font-bold border-grid":"text-muted hover:text-main border-transparent"}`,children:[i.jsx(Ea,{className:"w-3.5 h-3.5"})," Kalender"]}),((t==null?void 0:t.is_admin_user)||(t==null?void 0:t.is_staff)||(t==null?void 0:t.is_superuser))&&i.jsxs("button",{onClick:()=>r("admin"),className:`px-3 py-1.5 rounded-sm text-xs font-mono transition flex items-center gap-1.5 border ${n==="admin"?"bg-surface-hover text-main font-bold border-grid":"text-muted hover:text-main border-transparent"}`,children:[i.jsx(Ta,{className:"w-3.5 h-3.5 text-indigo-400"})," Admin"]})]}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("button",{onClick:v,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1.5",title:`Design-Modus: ${l.toUpperCase()}`,children:l==="dark"?i.jsxs(i.Fragment,{children:[i.jsx(Jm,{className:"w-3.5 h-3.5 text-indigo-400"}),i.jsx("span",{className:"hidden lg:inline text-[11px] font-bold",children:"DARK"})]}):l==="light"?i.jsxs(i.Fragment,{children:[i.jsx(lp,{className:"w-3.5 h-3.5 text-amber-500"}),i.jsx("span",{className:"hidden lg:inline text-[11px] font-bold",children:"LIGHT"})]}):i.jsxs(i.Fragment,{children:[i.jsx(Zm,{className:"w-3.5 h-3.5 text-blue-500"}),i.jsx("span",{className:"hidden lg:inline text-[11px] font-bold",children:"AUTO"})]})}),x&&i.jsxs("button",{onClick:k,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-emerald-500/10 text-emerald-500 border border-emerald-500/20 hover:bg-emerald-500/20 transition flex items-center gap-1",children:[i.jsx(Gc,{className:"w-3 h-3"})," PWA"]}),t?i.jsxs(i.Fragment,{children:[i.jsxs("button",{onClick:u,style:{backgroundColor:y},className:"h-8 px-3 rounded-sm text-xs font-mono font-bold text-white transition flex items-center gap-1 shadow-sm hover:brightness-110",children:[i.jsx(tn,{className:"w-3.5 h-3.5"})," Event"]}),i.jsxs("button",{onClick:d,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-subtle hover:bg-surface-hover text-main border border-grid transition hidden sm:flex items-center gap-1",title:"Vorlagen",children:[i.jsx(Wl,{className:"w-3.5 h-3.5 text-muted"})," Vorlagen"]}),i.jsxs("button",{onClick:h,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1",title:"Profil & Namen ändern",children:[i.jsx(wr,{className:"w-3.5 h-3.5 text-amber-500"})," Profil"]}),(t.is_admin_user||t.is_staff||t.is_superuser)&&i.jsxs("button",{onClick:()=>r("admin"),className:`h-8 px-2.5 rounded-sm text-xs font-mono transition flex items-center gap-1 border ${n==="admin"?"bg-indigo-500/20 text-indigo-300 border-indigo-500/40 font-bold":"bg-indigo-500/10 hover:bg-indigo-500/20 text-indigo-400 border-indigo-500/30"}`,title:"Admin-Zentrale",children:[i.jsx(Ta,{Line truncated
Offene Angebote, DIY-Kultur & engagierte Schichten.`})]}),v&&i.jsxs("div",{className:"hallmark-panel rounded-sm p-4 border border-grid space-y-3",children:[i.jsx("h4",{className:"font-serif text-sm font-bold uppercase tracking-wide text-main border-b border-grid pb-2",children:(o==null?void 0:o.support_box_title)||"❤️ Unterstützen"}),i.jsx("p",{className:"text-[11px] text-muted whitespace-pre-line",children:(o==null?void 0:o.support_box_text)||"Hilf mit als Helfer*in an der Bar, beim Essen kochen oder beim Auf- & Abbau."})]})]})]})]})}function pp({events:e,onSelectEvent:t,branding:n}){const[r,l]=j.useState(new Date),[s,o]=j.useState(null),a=r.getFullYear(),u=r.getMonth(),d=["JANUAR","FEBRUAR","MÄRZ","APRIL","MAI","JUNI","JULI","AUGUST","SEPTEMBER","OKTOBER","NOVEMBER","DEZEMBER"],h=()=>l(new Date(a,u-1,1)),g=()=>l(new Date(a,u+1,1)),x=()=>l(new Date),k=new Date(a,u,1).getDay(),y=k===0?6:k-1,v=new Date(a,u+1,0).getDate(),R=m=>{const w=String(u+1).padStart(2,"0"),S=String(m).padStart(2,"0");return`${a}-${w}-${S}`},f=m=>{const w=R(m);return e.filter(S=>w>=S.start_date&&w<=S.end_date)},c=(n==null?void 0:n.primary_color)||"var(--brand-primary)";return i.jsxs("div",{className:"space-y-6 max-w-5xl mx-auto animate-in fade-in duration-200",children:[i.jsxs("div",{className:"hallmark-panel rounded-sm p-6 sm:p-8 border border-grid flex flex-col sm:flex-row sm:items-center justify-between gap-4 font-mono",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-sm bg-subtle text-main border border-grid flex items-center justify-center font-bold",children:i.jsx(br,{className:"w-4 h-4 text-amber-500"})}),i.jsxs("div",{children:[i.jsxs("h2",{className:"font-serif text-3xl sm:text-4xl font-bold uppercase tracking-tight text-main leading-none",children:[d[u]," ",a]}),i.jsx("p",{className:"text-[10px] text-muted uppercase tracking-widest mt-1",children:"— INITIATIVE E.V. TERMIN- & SCHICHTÜBERSICHT —"})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("button",{onClick:x,className:"px-3.5 py-1.5 rounded-sm text-xs font-mono font-bold bg-surface hover:bg-surface-hover text-main border border-grid transition",children:"[ HEUTE ]"}),i.jsx("button",{onClick:h,className:"p-1.5 rounded-sm text-muted hover:text-main bg-surface border border-grid transition",title:"Vorheriger Monat",children:i.jsx(Hm,{className:"w-4 h-4"})}),i.jsx("button",{onClick:g,className:"p-1.5 rounded-sm text-muted hover:text-main bg-surface border border-grid transition",title:"Nächster Monat",children:i.jsx(Qm,{className:"w-4 h-4"})})]})]}),i.jsxs("div",{className:"hallmark-panel rounded-sm border border-grid overflow-hidden",children:[i.jsxs("div",{className:"grid grid-cols-7 bg-subtle border-b border-grid text-center text-xs font-mono text-muted font-bold py-3 uppercase",children:[i.jsx("div",{children:"MO"}),i.jsx("div",{children:"DI"}),i.jsx("div",{children:"MI"}),i.jsx("div",{children:"DO"}),i.jsx("div",{children:"FR"}),i.jsx("div",{children:"SA"}),i.jsx("div",{children:"SO"})]}),i.jsxs("div",{className:"grid grid-cols-7 auto-rows-fr divide-x divide-y divide-grid bg-surface text-xs font-mono",children:[Array.from({length:y}).map((m,w)=>i.jsx("div",{className:"min-h-[100px] sm:min-h-[110px] p-2 bg-subtle/50 text-muted opacity-30"},`offset-${w}`)),Array.from({length:v}).map((m,w)=>{const S=w+1,b=f(S),N=new Date().getFullYear()===a&&new Date().getMonth()===u&&new Date().getDate()===S;return i.jsxs("div",{className:`min-h-[100px] sm:min-h-[110px] p-2 flex flex-col justify-between transition ${N?"bg-surface-hover/80 font-bold":"hover:bg-surface-hover/50"}`,children:[i.jsxs("div",{className:"flex items-center justify-between mb-1",children:[i.jsx("span",{className:`w-5 h-5 rounded-sm flex items-center justify-center font-mono text-xs ${N?"bg-main text-paper font-bold shadow-sm":"text-muted"}`,children:S}),b.length>0&&i.jsxs("span",{className:"text-[9px] font-mono text-muted",children:[b.length," ",b.length===1?"Event":"Events"]})]}),i.jsx("div",{className:"space-y-1.5 overflow-y-auto max-h-[70px] no-scrollbar",children:b.map(E=>{const U=(s==null?void 0:s.id)===E.id;return i.jsx("button",{onClick:()=>o(E),style:{backgroundColor:U?c:`${c}15`,borderColor:`${c}40`,color:U?"#ffffff":c},className:`w-full text-left px-2 py-1 rounded-sm text-[10px] font-mono font-bold border truncate block hover:brightness-110 transition shadow-sm ${E.is_active===!1?"opacity-50 line-through":""}`,children:E.title},`evt-${E.id}`)})})]},`day-${S}`)})]})]}),s&&i.jsxs("div",{className:"hallmark-panel rounded-sm p-6 border border-grid flex flex-col sm:flex-row sm:items-center justify-between gap-4 font-mono animate-in fade-in duration-200",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted",children:[i.jsxs("span",{className:"flex items-center gap-1 bg-subtle px-2 py-0.5 rounded-sm border border-grid font-bold text-ma Line truncated
Offene Angebote, DIY-Kultur & engagierte Schichten.`),[Ft,Jl]=j.useState((e==null?void 0:e.show_support_box)??!0),[Tr,Xl]=j.useState((e==null?void 0:e.support_box_title)||"❤️ Unterstützen"),[C,z]=j.useState((e==null?void 0:e.support_box_text)||"Hilf mit als Helfer*in an der Bar, beim Essen kochen oder beim Auf- & Abbau."),[Y,tt]=j.useState(!1);j.useEffect(()=>{K()},[]);const K=async()=>{u(!0),h("");try{try{const p=await $("/users/manage-users/");y(p.results||p)}catch{}try{const p=await $("/users/pending/");c(p.results||p)}catch{}try{const p=await $("/users/restriction-setting/");w(p.is_restriction_enabled),b(p.require_admin_approval);const A=await $("/users/domain-rules/");E(A.results||A)}catch{}try{const p=await $("/events/");D(p.results||p)}catch{}try{const p=await $("/templates/");V(p.results||p)}catch{}}catch(p){h(p.message||"Laden der Admin-Daten fehlgeschlagen.")}finally{u(!1)}},je=p=>{x(p),setTimeout(()=>x(""),4e3)},qc=async p=>{try{const A=await $(`/users/manage-users/${p.id}/`,{method:"PATCH",body:JSON.stringify({is_admin_user:!p.is_admin_user})});y(k.map(Fe=>Fe.id===p.id?A:Fe)),je(`Admin-Rechte für ${p.username} aktualisiert.`)}catch(A){h(A.message||"Fehler beim Aktualisieren.")}},Zc=async p=>{try{const A=await $(`/users/manage-users/${p.id}/`,{method:"PATCH",body:JSON.stringify({is_active:!p.is_active})});y(k.map(Fe=>Fe.id===p.id?A:Fe)),je(`Status für ${p.username} auf ${A.is_active?"AKTIV":"DEAKTIVIERT"} gesetzt.`)}catch(A){h(A.message||"Fehler beim Aktualisieren.")}},Jc=async p=>{if(window.confirm(`Benutzer ${p.username} wirklich löschen?`))try{await $(`/users/manage-users/${p.id}/`,{method:"DELETE"}),y(k.filter(A=>A.id!==p.id)),je(`Benutzer ${p.username} gelöscht.`)}catch(A){h(A.message||"Löschen fehlgeschlagen.")}},Xc=async p=>{try{const A=await $(`/users/${p}/approve/`,{method:"POST"});c(f.filter(Fe=>Fe.id!==p)),K(),je(A.message||"Nutzer freigeschaltet!")}catch(A){h(A.message||"Freischaltung fehlgeschlagen.")}},ed=async p=>{try{const A=await $(`/users/${p}/approve/`,{method:"DELETE"});c(f.filter(Fe=>Fe.id!==p)),je(A.message||"Registrierung abgelehnt.")}catch(A){h(A.message||"Ablehnen fehlgeschlagen.")}},td=async()=>{try{const p=await $("/users/restriction-setting/",{method:"POST",body:JSON.stringify({require_admin_approval:!S})});b(p.require_admin_approval),je(`Admin-Freischaltung ist jetzt ${p.require_admin_approval?"AKTIV":"INAKTIV"}`)}catch(p){h(p.message||"Fehler beim Umschalten.")}},nd=async()=>{try{const p=await $("/users/restriction-setting/",{method:"POST",body:JSON.stringify({is_restriction_enabled:!m})});w(p.is_restriction_enabled),je(`Domain-Beschränkung ist jetzt ${p.is_restriction_enabled?"AKTIV":"INAKTIV"}`)}catch(p){h(p.message||"Fehler beim Umschalten.")}},rd=async p=>{if(p.preventDefault(),!!U.trim())try{const A=await $("/users/domain-rules/",{method:"POST",body:JSON.stringify({domain:U.trim(),is_active:!0})});E([...N,A]),M(""),je("Domain hinzugefügt!")}catch(A){h(A.message||"Fehler beim Hinzufügen der Domain.")}},ld=async p=>{try{await $(`/users/domain-rules/${p}/`,{method:"DELETE"}),E(N.filter(A=>A.id!==p)),je("Domain entfernt.")}catch(A){h(A.message||"Löschen fehlgeschlagen.")}},sd=async p=>{if(p.preventDefault(),!!W.trim())try{await $("/skills/",{method:"POST",body:JSON.stringify({name:W.trim(),description:Se.trim(),color:O})}),H(""),T(""),l(),je("Qualifikation angelegt!")}catch(A){h(A.message||"Fehler beim Anlegen.")}},id=async p=>{if(window.confirm("Qualifikation wirklich löschen?"))try{await $(`/skills/${p}/`,{method:"DELETE"}),l(),je("Qualifikation gelöscht.")}catch(A){h(A.message||"Löschen fehlgeschlagen.")}},od=async p=>{try{const A=await $(`/events/${p.id}/`,{method:"PATCH",body:JSON.stringify({is_active:p.is_active===!1})});D(ee.map(Fe=>Fe.id===p.id?A:Fe)),n(),je(`Status für "${p.title}" aktualisiert.`)}catch(A){h(A.message||"Fehler beim Umschalten.")}},ad=async p=>{if(window.confirm("Veranstaltung mit allen Schichten wirklich löschen?"))try{await $(`/events/${p}/`,{method:"DELETE"}),D(ee.filter(A=>A.id!==p)),n(),je("Veranstaltung gelöscht.")}catch(A){h(A.message||"Löschen fehlgeschlagen.")}},ud=async p=>{if(window.confirm("Vorlage wirklich löschen?"))try{await $(`/templates/${p}/`,{method:"DELETE"}),V(I.filter(A=>A.id!==p)),je("Vorlage gelöscht.")}catch(A){h(A.message||"Löschen fehlgeschlagen.")}},cd=async p=>{p.preventDefault(),tt(!0),h("");try{await $("/branding/",{method:"POST",body:JSON.stringify({app_name:q,logo_url:et,primary_color:ye,custom_banner_text:ot,show_community_info_box:$t,community_info_title:Cr,community_info_text:yt,show_support_box:Ft,support_box_title:Tr,support_box_text:C})}),je("Branding & Einstellungen erfolgreich gespeichert!"),t()}catch(A){h(A.message||"Speichern fehlgeschlagen.")}finally{tt(!1)}},es=k.filter(p=>p.username.toLowerCase().includes(v.toLowerCase())||p.email.toLowerCase().includes(v.toLowerCase())||p.display_name&&p.display_name.toLowerCase().includes(v.toLowerCase()));return i.jsxs("div",{className Line truncated
+272
View File
@@ -0,0 +1,272 @@
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const i of l)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(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(l){if(l.ep)return;l.ep=!0;const i=n(l);fetch(l.href,i)}})();function Id(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ru={exports:{}},Ml={},lu={exports:{}},Q={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Sr=Symbol.for("react.element"),$d=Symbol.for("react.portal"),Fd=Symbol.for("react.fragment"),Vd=Symbol.for("react.strict_mode"),Ud=Symbol.for("react.profiler"),Bd=Symbol.for("react.provider"),Hd=Symbol.for("react.context"),Qd=Symbol.for("react.forward_ref"),Wd=Symbol.for("react.suspense"),Kd=Symbol.for("react.memo"),Gd=Symbol.for("react.lazy"),Bo=Symbol.iterator;function qd(e){return e===null||typeof e!="object"?null:(e=Bo&&e[Bo]||e["@@iterator"],typeof e=="function"?e:null)}var su={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},iu=Object.assign,ou={};function Ln(e,t,n){this.props=e,this.context=t,this.refs=ou,this.updater=n||su}Ln.prototype.isReactComponent={};Ln.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ln.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function au(){}au.prototype=Ln.prototype;function _i(e,t,n){this.props=e,this.context=t,this.refs=ou,this.updater=n||su}var Ei=_i.prototype=new au;Ei.constructor=_i;iu(Ei,Ln.prototype);Ei.isPureReactComponent=!0;var Ho=Array.isArray,uu=Object.prototype.hasOwnProperty,Ci={current:null},cu={key:!0,ref:!0,__self:!0,__source:!0};function du(e,t,n){var r,l={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)uu.call(t,r)&&!cu.hasOwnProperty(r)&&(l[r]=t[r]);var a=arguments.length-2;if(a===1)l.children=n;else if(1<a){for(var u=Array(a),d=0;d<a;d++)u[d]=arguments[d+2];l.children=u}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)l[r]===void 0&&(l[r]=a[r]);return{$$typeof:Sr,type:e,key:i,ref:o,props:l,_owner:Ci.current}}function Yd(e,t){return{$$typeof:Sr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ti(e){return typeof e=="object"&&e!==null&&e.$$typeof===Sr}function Zd(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Qo=/\/+/g;function ss(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Zd(""+e.key):t.toString(36)}function Yr(e,t,n,r,l){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Sr:case $d:o=!0}}if(o)return o=e,l=l(o),e=r===""?"."+ss(o,0):r,Ho(l)?(n="",e!=null&&(n=e.replace(Qo,"$&/")+"/"),Yr(l,t,n,"",function(d){return d})):l!=null&&(Ti(l)&&(l=Yd(l,n+(!l.key||o&&o.key===l.key?"":(""+l.key).replace(Qo,"$&/")+"/")+e)),t.push(l)),1;if(o=0,r=r===""?".":r+":",Ho(e))for(var a=0;a<e.length;a++){i=e[a];var u=r+ss(i,a);o+=Yr(i,t,n,u,l)}else if(u=qd(e),typeof u=="function")for(e=u.call(e),a=0;!(i=e.next()).done;)i=i.value,u=r+ss(i,a++),o+=Yr(i,t,n,u,l);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Mr(e,t,n){if(e==null)return e;var r=[],l=0;return Yr(e,r,"","",function(i){return t.call(n,i,l++)}),r}function Jd(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ee={current:null},Zr={transition:null},Xd={ReactCurrentDispatcher:Ee,ReactCurrentBatchConfig:Zr,ReactCurrentOwner:Ci};function fu(){throw Error("act(...) is not supported in production builds of React.")}Q.Children={map:Mr,forEach:function(e,t,n){Mr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Mr(e,function(){t++}),t},toArray:function(e){return Mr(e,function(t){return t})||[]},only:function(e){if(!Ti(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Q.Component=Ln;Q.Fragment=Fd;Q.Profiler=Ud;Q.PureComponent=_i;Q.StrictMode=Vd;Q.Suspense=Wd;Q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xd;Q.act=fu;Q.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=iu({},e.props),l=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Ci.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)uu.call(t,u)&&!cu.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&a!==void 0?a[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){a=Array(u);for(var d=0;d<u;d++)a[d]=arguments[d+2];r.children=a}return{$$typeof:Sr,type:e.type,key:l,ref:i,props:r,_owner:o}};Q.createContext=function(e){return e={$$typeof:Hd,_currentValue:e,_currentValue2:e,_threadCount:0,ProviderLine truncated
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var tf=k,nf=Symbol.for("react.element"),rf=Symbol.for("react.fragment"),lf=Object.prototype.hasOwnProperty,sf=tf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,of={key:!0,ref:!0,__self:!0,__source:!0};function mu(e,t,n){var r,l={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)lf.call(t,r)&&!of.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:nf,type:e,key:i,ref:o,props:l,_owner:sf.current}}Ml.Fragment=rf;Ml.jsx=mu;Ml.jsxs=mu;ru.exports=Ml;var s=ru.exports,zs={},pu={exports:{}},$e={},hu={exports:{}},xu={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(P,I){var S=P.length;P.push(I);e:for(;0<S;){var R=S-1>>>1,H=P[R];if(0<l(H,I))P[R]=I,P[S]=H,S=R;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var I=P[0],S=P.pop();if(S!==I){P[0]=S;e:for(var R=0,H=P.length,J=H>>>1;R<J;){var Y=2*(R+1)-1,K=P[Y],de=Y+1,et=P[de];if(0>l(K,S))de<H&&0>l(et,K)?(P[R]=et,P[de]=S,R=de):(P[R]=K,P[Y]=S,R=Y);else if(de<H&&0>l(et,S))P[R]=et,P[de]=S,R=de;else break e}}return I}function l(P,I){var S=P.sortIndex-I.sortIndex;return S!==0?S:P.id-I.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=[],d=[],h=1,g=null,x=3,N=!1,y=!1,v=!1,O=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(P){for(var I=n(d);I!==null;){if(I.callback===null)r(d);else if(I.startTime<=P)r(d),I.sortIndex=I.expirationTime,t(u,I);else break;I=n(d)}}function w(P){if(v=!1,m(P),!y)if(n(u)!==null)y=!0,W(j);else{var I=n(d);I!==null&&he(w,I.startTime-P)}}function j(P,I){y=!1,v&&(v=!1,f(C),C=-1),N=!0;var S=x;try{for(m(I),g=n(u);g!==null&&(!(g.expirationTime>I)||P&&!le());){var R=g.callback;if(typeof R=="function"){g.callback=null,x=g.priorityLevel;var H=R(g.expirationTime<=I);I=e.unstable_now(),typeof H=="function"?g.callback=H:g===n(u)&&r(u),m(I)}else r(u);g=n(u)}if(g!==null)var J=!0;else{var Y=n(d);Y!==null&&he(w,Y.startTime-I),J=!1}return J}finally{g=null,x=S,N=!1}}var _=!1,E=null,C=-1,U=5,A=-1;function le(){return!(e.unstable_now()-A<U)}function L(){if(E!==null){var P=e.unstable_now();A=P;var I=!0;try{I=E(!0,P)}finally{I?M():(_=!1,E=null)}}else _=!1}var M;if(typeof c=="function")M=function(){c(L)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,q=F.port2;F.port1.onmessage=L,M=function(){q.postMessage(null)}}else M=function(){O(L,0)};function W(P){E=P,_||(_=!0,M())}function he(P,I){C=O(function(){P(e.unstable_now())},I)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_continueExecution=function(){y||N||(y=!0,W(j))},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(P){switch(x){case 1:case 2:case 3:var I=3;break;default:I=x}var S=x;x=I;try{return P()}finally{x=S}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(P,I){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var S=x;x=P;try{return I()}finally{x=S}},e.unstable_scheduleCallback=function(P,I,S){var R=e.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?R+S:R):S=R,P){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=S+H,P={id:h++,callback:I,priorityLevel:P,startTime:S,expirationTime:H,sortIndex:-1},S>R?(P.sortIndex=S,t(d,P),n(u)===null&&P===n(d)&&(v?(f(C),C=-1):v=!0,he(w,S-R))):(P.sortIndex=H,t(u,P),y||N||(y=!0,W(j))),P},e.unstable_shouldYield=le,e.unstable_wrapCallback=function(P){var I=x;return function(){var S=x;x=I;try{return P.apply(this,arguments)}finally{x=S}}}})(xu);hu.exports=xu;var af=hu.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var uf=k,Ie=af;function b(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var gu=new Set,lr={};function nn(e,t){Sn(e,t),Sn(e+"Capture",t)}function Sn(e,t){for(lr[e]=t,e=0;e<t.length;e++)gu.add(t[e])}var mt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ls=Object.prototype.hasOwnProperty,cf=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Wo={},Ko={};function df(e){return Ls.call(Ko,e)?!0:Ls.call(Wo,e)?!1:cf.test(e)?Ko[e]=!0:(Wo[e]=!0,!1)}function ff(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function mf(e,t,n,r){if(t===null||typeof t>"u"||ff(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ce(e,t,n,r,l,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var we={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){we[e]=new Ce(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];we[t]=new Ce(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){we[e]=new Ce(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){we[e]=new Ce(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){we[e]=new Ce(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){we[e]=new Ce(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){we[e]=new Ce(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){we[e]=new Ce(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){we[e]=new Ce(e,5,!1,e.toLowerCase(),null,!1,!1)});var Pi=/[\-:]([a-z])/g;function zi(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Pi,zi);we[t]=new Ce(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Pi,zi);we[t]=new Ce(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Pi,zi);we[t]=new Ce(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){we[e]=new Ce(e,1,!1,e.toLowerCase(),null,!1,!1)});we.xlinkHref=new Ce("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){we[e]=new Ce(e,1,!1,e.toLowerCase(),null,!0,!0)});function Li(e,t,n,r){var l=we.hasOwnProperty(t)?we[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!==" Line truncated
`+is+e}var os=!1;function as(e,t){if(!e||os)return"";os=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var l=d.stack.split(`
`),i=r.stack.split(`
`),o=l.length-1,a=i.length-1;1<=o&&0<=a&&l[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(l[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||l[o]!==i[a]){var u=`
`+l[o].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=o&&0<=a);break}}}finally{os=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Hn(e):""}function pf(e){switch(e.tag){case 5:return Hn(e.type);case 16:return Hn("Lazy");case 13:return Hn("Suspense");case 19:return Hn("SuspenseList");case 0:case 2:case 15:return e=as(e.type,!1),e;case 11:return e=as(e.type.render,!1),e;case 1:return e=as(e.type,!0),e;default:return""}}function Rs(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 on:return"Fragment";case sn:return"Portal";case Ms:return"Profiler";case Mi:return"StrictMode";case As:return"Suspense";case Ds:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case vu:return(e.displayName||"Context")+".Consumer";case yu:return(e._context.displayName||"Context")+".Provider";case Ai:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Di:return t=e.displayName||null,t!==null?t:Rs(e.type)||"Memo";case Nt:t=e._payload,e=e._init;try{return Rs(e(t))}catch{}}return null}function hf(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 Rs(t);case 8:return t===Mi?"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 Rt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ku(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function xf(e){var t=ku(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 l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.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 Dr(e){e._valueTracker||(e._valueTracker=xf(e))}function Nu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ku(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ul(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 Os(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function qo(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Rt(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 ju(e,t){t=t.checked,t!=null&&Li(e,"checked",t,!1)}function Is(e,t){ju(e,t);var n=Rt(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")?$s(e,t.type,n):t.hasOwnProperty("defaultValue")&&$s(e,t.type,Rt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Yo(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 $s(e,t,n){(t!=="number"||ul(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Qn=Array.isArray;function yn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Rt(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Fs(e,t){if(t.dan Line truncated
`).replace(_m,"")}function Br(e,t,n){if(t=va(t),va(e)!==t&&n)throw Error(b(425))}function gl(){}var Xs=null,ei=null;function ti(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ni=typeof setTimeout=="function"?setTimeout:void 0,Em=typeof clearTimeout=="function"?clearTimeout:void 0,wa=typeof Promise=="function"?Promise:void 0,Cm=typeof queueMicrotask=="function"?queueMicrotask:typeof wa<"u"?function(e){return wa.resolve(null).then(e).catch(Tm)}:ni;function Tm(e){setTimeout(function(){throw e})}function ks(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),ur(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);ur(t)}function zt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function ka(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var An=Math.random().toString(36).slice(2),rt="__reactFiber$"+An,pr="__reactProps$"+An,pt="__reactContainer$"+An,ri="__reactEvents$"+An,Pm="__reactListeners$"+An,zm="__reactHandles$"+An;function Qt(e){var t=e[rt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pt]||n[rt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ka(e);e!==null;){if(n=e[rt])return n;e=ka(e)}return t}e=n,n=e.parentNode}return null}function Er(e){return e=e[rt]||e[pt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function dn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(b(33))}function Il(e){return e[pr]||null}var li=[],fn=-1;function $t(e){return{current:e}}function re(e){0>fn||(e.current=li[fn],li[fn]=null,fn--)}function te(e,t){fn++,li[fn]=e.current,e.current=t}var Ot={},Se=$t(Ot),ze=$t(!1),Zt=Ot;function bn(e,t){var n=e.type.contextTypes;if(!n)return Ot;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Le(e){return e=e.childContextTypes,e!=null}function yl(){re(ze),re(Se)}function Na(e,t,n){if(Se.current!==Ot)throw Error(b(168));te(Se,t),te(ze,n)}function dc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(b(108,hf(e)||"Unknown",l));return ae({},n,r)}function vl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ot,Zt=Se.current,te(Se,e),te(ze,ze.current),!0}function ja(e,t,n){var r=e.stateNode;if(!r)throw Error(b(169));n?(e=dc(e,t,Zt),r.__reactInternalMemoizedMergedChildContext=e,re(ze),re(Se),te(Se,e)):re(ze),te(ze,n)}var ut=null,$l=!1,Ns=!1;function fc(e){ut===null?ut=[e]:ut.push(e)}function Lm(e){$l=!0,fc(e)}function Ft(){if(!Ns&&ut!==null){Ns=!0;var e=0,t=X;try{var n=ut;for(X=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ut=null,$l=!1}catch(l){throw ut!==null&&(ut=ut.slice(e+1)),Ou(Oi,Ft),l}finally{X=t,Ns=!1}}return null}var mn=[],pn=0,wl=null,kl=0,Ve=[],Ue=0,Jt=null,ct=1,dt="";function Bt(e,t){mn[pn++]=kl,mn[pn++]=wl,wl=e,kl=t}function mc(e,t,n){Ve[Ue++]=ct,Ve[Ue++]=dt,Ve[Ue++]=Jt,Jt=e;var r=ct;e=dt;var l=32-Ze(r)-1;r&=~(1<<l),n+=1;var i=32-Ze(t)+l;if(30<i){var o=l-l%5;i=(r&(1<<o)-1).toString(32),r>>=o,l-=o,ct=1<<32-Ze(t)+l|n<<l|r,dt=i+e}else ct=1<<i|n<<l|r,dt=e}function Wi(e){e.return!==null&&(Bt(e,1),mc(e,1,0))}function Ki(e){for(;e===wl;)wl=mn[--pn],mn[pn]=null,kl=mn[--pn],mn[pn]=null;for(;e===Jt;)Jt=Ve[--Ue],Ve[Ue]=null,dt=Ve[--Ue],Ve[Ue]=null,ct=Ve[--Ue],Ve[Ue]=null}var Oe=null,Re=null,se=!1,Ye=null;function pc(e,t){var n=Be(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Sa(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Oe=e,Re=zt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Oe=e,Re=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Jt!==null?{id:ct,overflow:dt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Be(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Oe=e,Re=null,!0):!1;default:return!1}}function si(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ii(e){if(se){var t=Re;if(t){var n=t;if(!Sa(e,t)){if(si(e))throw Error(b(418));t=zt(n.nextSibling);var r=Oe;t&&Sa(e,t)?pc(r,n):(e.flags=e.flags&-4097|2,se=!1,Oe=e)}}else{if(si(e))throw Error(b(418));e.flags=e.flags&-4097|2,se=!1,Oe=e}}}function ba(e){for(e=e.re Line truncated
Error generating stack: `+i.message+`
`+i.stack}return{value:e,source:t,stack:l,digest:null}}function Es(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ci(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Vm=typeof WeakMap=="function"?WeakMap:Map;function Vc(e,t,n){n=ft(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Tl||(Tl=!0,wi=r),ci(e,t)},n}function Uc(e,t,n){n=ft(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){ci(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){ci(e,t),typeof r!="function"&&(Mt===null?Mt=new Set([this]):Mt.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Ma(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Vm;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=tp.bind(null,e,t,n),t.then(e,e))}function Aa(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 Da(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,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=ft(-1,1),t.tag=2,Lt(n,t,1))),n.lanes|=1),e)}var Um=yt.ReactCurrentOwner,Pe=!1;function be(e,t,n,r){t.child=e===null?gc(t,null,n,r):En(t,e.child,n,r)}function Ra(e,t,n,r,l){n=n.render;var i=t.ref;return Nn(t,l),r=lo(e,t,n,r,i,l),n=so(),e!==null&&!Pe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,xt(e,t,l)):(se&&n&&Wi(t),t.flags|=1,be(e,t,r,l),t.child)}function Oa(e,t,n,r,l){if(e===null){var i=n.type;return typeof i=="function"&&!xo(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Bc(e,t,i,r,l)):(e=ol(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&l)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:dr,n(o,r)&&e.ref===t.ref)return xt(e,t,l)}return t.flags|=1,e=Dt(i,r),e.ref=t.ref,e.return=t,t.child=e}function Bc(e,t,n,r,l){if(e!==null){var i=e.memoizedProps;if(dr(i,r)&&e.ref===t.ref)if(Pe=!1,t.pendingProps=r=i,(e.lanes&l)!==0)e.flags&131072&&(Pe=!0);else return t.lanes=e.lanes,xt(e,t,l)}return di(e,t,n,r,l)}function Hc(e,t,n){var r=t.pendingProps,l=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},te(gn,De),De|=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,te(gn,De),De|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,te(gn,De),De|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,te(gn,De),De|=r;return be(e,t,l,n),t.child}function Qc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function di(e,t,n,r,l){var i=Le(n)?Zt:Se.current;return i=bn(t,i),Nn(t,l),n=lo(e,t,n,r,i,l),r=so(),e!==null&&!Pe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,xt(e,t,l)):(se&&r&&Wi(t),t.flags|=1,be(e,t,n,l),t.child)}function Ia(e,t,n,r,l){if(Le(n)){var i=!0;vl(t)}else i=!1;if(Nn(t,l),t.stateNode===null)ll(e,t),Fc(t,n,r),ui(t,n,r,l),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var u=o.context,d=n.contextType;typeof d=="object"&&d!==null?d=Qe(d):(d=Le(n)?Zt:Se.current,d=bn(t,d));var h=n.getDerivedStateFromProps,g=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function";g||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||u!==d)&&La(t,o,r,d),jt=!1;var x=t.memoizedState;o.state=x,Sl(t,r,o,l),u=t.memoizedState,a!==r||x!==u||ze.current||jt?(typeof h=="function"&&(ai(t,n,h,r),u=t.memoizedState),(a=jt||za(t,n,a,r,x,u,d))?(g||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=d,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,vc(e,t),a=t.memoizedProps,d=t.type===t.elementType?a:Ge(t.type,a),o.props=d,g=t.pendingProps,x=o.context,u=n.contextType,typeof u=="object"&&u!==null?u=Qe(u):(u=Le(n)?Zt:Se.current,u=bn(t,u));var N=n.getDerivedStateFromProps;(h=typeof N=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==g||x!==u)&&La(t,o,r,u),jt=!1,x=t.memoizedState,o.state=x,Sl(t,r,o,l);var y=t.memoizedS Line truncated
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),hd=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var pp={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hp=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:l="",children:i,iconNode:o,...a},u)=>k.createElement("svg",{ref:u,...pp,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:hd("lucide",l),...a},[...o.map(([d,h])=>k.createElement(d,h)),...Array.isArray(i)?i:[i]]));/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const V=(e,t)=>{const n=k.forwardRef(({className:r,...l},i)=>k.createElement(hp,{ref:i,iconNode:t,className:hd(`lucide-${mp(e)}`,r),...l}));return n.displayName=`${e}`,n};/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xd=V("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gd=V("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xp=V("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ja=V("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Tr=V("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gp=V("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yp=V("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const zn=V("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gt=V("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kr=V("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vp=V("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yd=V("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wp=V("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Xa=V("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Nr=V("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kp=V("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Np=V("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Si=V("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ko=V("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jp=V("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Sp=V("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const eu=V("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jr=V("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bp=V("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const it=V("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _p=V("Printer",[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vd=V("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ep=V("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const tu=V("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Cp=V("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Tp=V("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wd=V("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kd=V("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Pp=V("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const zp=V("TableProperties",[["path",{d:"M15 3v18",key:"14nvp0"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Yt=V("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Nd=V("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Lp=V("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nu=V("UserX",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const al=V("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Mp=V("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
* @license lucide-react v0.424.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jd=V("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Ap({branding:e,user:t,activeTab:n,onChangeTab:r,themeMode:l,onChangeThemeMode:i,onLogout:o,onOpenAuth:a,onOpenCreateEvent:u,onOpenTemplates:d,onOpenProfile:h,onOpenAdmin:g,pwaInstallPrompt:x,onInstallPwa:N}){const y=(e==null?void 0:e.primary_color)||"var(--brand-primary)",v=()=>{i(l==="dark"?"light":l==="light"?"auto":"dark")};return s.jsxs("header",{className:"bg-surface border-b border-grid sticky top-0 z-40",children:[s.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-16 flex items-center justify-between gap-4",children:[s.jsxs("div",{className:"flex items-center space-x-3 shrink-0",children:[s.jsx("div",{onClick:()=>r("home"),style:{backgroundColor:y},className:"w-8 h-8 rounded-sm flex items-center justify-center text-white font-bold cursor-pointer shadow-sm",children:e!=null&&e.logo_url?s.jsx("img",{src:e.logo_url,alt:"Logo",className:"w-4 h-4 object-contain"}):s.jsx(Tr,{className:"w-4 h-4"})}),s.jsxs("div",{onClick:()=>r("home"),className:"cursor-pointer",children:[s.jsx("h1",{className:"font-serif text-base font-bold tracking-tight text-main leading-none",children:(e==null?void 0:e.app_name)||"Schichtplaner"}),s.jsx("div",{className:"text-[10px] font-mono text-muted mt-1 uppercase tracking-wider flex items-center gap-1.5",children:t?s.jsxs("span",{className:"text-emerald-500 font-semibold",children:["[ ",t.display_name||t.username," ]"]}):s.jsx("span",{className:"text-amber-500 font-semibold",children:"[ GAST-MODUS ]"})})]})]}),s.jsxs("nav",{className:"hidden md:flex items-center gap-2",children:[s.jsxs("button",{onClick:()=>r("home"),className:`px-3 py-1.5 rounded-sm text-xs font-mono transition flex items-center gap-1.5 border ${n==="home"?"bg-surface-hover text-main font-bold border-grid":"text-muted hover:text-main border-transparent"}`,children:[s.jsx(Xa,{className:"w-3.5 h-3.5"})," Startseite"]}),s.jsxs("button",{onClick:()=>r("calendar"),className:`px-3 py-1.5 rounded-sm text-xs font-mono transition flex items-center gap-1.5 border ${n==="calendar"?"bg-surface-hover text-main font-bold border-grid":"text-muted hover:text-main border-transparent"}`,children:[s.jsx(Ja,{className:"w-3.5 h-3.5"})," Kalender"]}),((t==null?void 0:t.is_admin_user)||(t==null?void 0:t.is_staff)||(t==null?void 0:t.is_superuser))&&s.jsxs("button",{onClick:()=>r("admin"),className:`px-3 py-1.5 rounded-sm text-xs font-mono transition flex items-center gap-1.5 border ${n==="admin"?"bg-surface-hover text-main font-bold border-grid":"text-muted hover:text-main border-transparent"}`,children:[s.jsx(tu,{className:"w-3.5 h-3.5 text-indigo-400"})," Admin"]})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("button",{onClick:v,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1.5",title:`Design-Modus: ${l.toUpperCase()}`,children:l==="dark"?s.jsxs(s.Fragment,{children:[s.jsx(Sp,{className:"w-3.5 h-3.5 text-indigo-400"}),s.jsx("span",{className:"hidden lg:inline text-[11px] font-bold",children:"DARK"})]}):l==="light"?s.jsxs(s.Fragment,{children:[s.jsx(Pp,{className:"w-3.5 h-3.5 text-amber-500"}),s.jsx("span",{className:"hidden lg:inline text-[11px] font-bold",children:"LIGHT"})]}):s.jsxs(s.Fragment,{children:[s.jsx(jp,{className:"w-3.5 h-3.5 text-blue-500"}),s.jsx("span",{className:"hidden lg:inline text-[11px] font-bold",children:"AUTO"})]})}),x&&s.jsxs("button",{onClick:N,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-emerald-500/10 text-emerald-500 border border-emerald-500/20 hover:bg-emerald-500/20 transition flex items-center gap-1",children:[s.jsx(kd,{className:"w-3 h-3"})," PWA"]}),t?s.jsxs(s.Fragment,{children:[s.jsxs("button",{onClick:u,style:{backgroundColor:y},className:"h-8 px-3 rounded-sm text-xs font-mono font-bold text-white transition flex items-center gap-1 shadow-sm hover:brightness-110",children:[s.jsx(it,{className:"w-3.5 h-3.5"})," Event"]}),s.jsxs("button",{onClick:d,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-subtle hover:bg-surface-hover text-main border border-grid transition hidden sm:flex items-center gap-1",title:"Vorlagen",children:[s.jsx(Nr,{className:"w-3.5 h-3.5 text-muted"})," Vorlagen"]}),s.jsxs("button",{onClick:h,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1",title:"Profil & Namen ändern",children:[s.jsx(jr,{className:"w-3.5 h-3.5 text-amber-500"})," Profil"]}),(t.is_admin_user||t.is_staff||t.is_superuser)&&s.jsxs("button",{onClick:()=>r("admin"),className:`h-8 px-2.5 rounded-sm text-xs font-mono transition flex items-center gap-1 border ${n==="admin"?"bg-indigo-500/20 text-indigo-300 border-indigo-500/40 font-bold":"bg-indigo-500/10 hover:bg-indigo-500/20 text-indigo-400 border-indigo-500/30"}`,title:"Admin-Zentrale",children:[s.jsx(tu,{Line truncated
Offene Angebote, DIY-Kultur & engagierte Schichten.`})]}),v&&s.jsxs("div",{className:"hallmark-panel rounded-sm p-4 border border-grid space-y-3",children:[s.jsx("h4",{className:"font-serif text-sm font-bold uppercase tracking-wide text-main border-b border-grid pb-2",children:(o==null?void 0:o.support_box_title)||"❤️ Unterstützen"}),s.jsx("p",{className:"text-[11px] text-muted whitespace-pre-line",children:(o==null?void 0:o.support_box_text)||"Hilf mit als Helfer*in an der Bar, beim Essen kochen oder beim Auf- & Abbau."})]})]})]})]})}function Fp({events:e,onSelectEvent:t,branding:n}){const[r,l]=k.useState(new Date),[i,o]=k.useState(null),a=r.getFullYear(),u=r.getMonth(),d=["JANUAR","FEBRUAR","MÄRZ","APRIL","MAI","JUNI","JULI","AUGUST","SEPTEMBER","OKTOBER","NOVEMBER","DEZEMBER"],h=()=>l(new Date(a,u-1,1)),g=()=>l(new Date(a,u+1,1)),x=()=>l(new Date),N=new Date(a,u,1).getDay(),y=N===0?6:N-1,v=new Date(a,u+1,0).getDate(),O=m=>{const w=String(u+1).padStart(2,"0"),j=String(m).padStart(2,"0");return`${a}-${w}-${j}`},f=m=>{const w=O(m);return e.filter(j=>w>=j.start_date&&w<=j.end_date)},c=(n==null?void 0:n.primary_color)||"var(--brand-primary)";return s.jsxs("div",{className:"space-y-6 max-w-5xl mx-auto animate-in fade-in duration-200",children:[s.jsxs("div",{className:"hallmark-panel rounded-sm p-6 sm:p-8 border border-grid flex flex-col sm:flex-row sm:items-center justify-between gap-4 font-mono",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-sm bg-subtle text-main border border-grid flex items-center justify-center font-bold",children:s.jsx(Tr,{className:"w-4 h-4 text-amber-500"})}),s.jsxs("div",{children:[s.jsxs("h2",{className:"font-serif text-3xl sm:text-4xl font-bold uppercase tracking-tight text-main leading-none",children:[d[u]," ",a]}),s.jsx("p",{className:"text-[10px] text-muted uppercase tracking-widest mt-1",children:"— INITIATIVE E.V. TERMIN- & SCHICHTÜBERSICHT —"})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{onClick:x,className:"px-3.5 py-1.5 rounded-sm text-xs font-mono font-bold bg-surface hover:bg-surface-hover text-main border border-grid transition",children:"[ HEUTE ]"}),s.jsx("button",{onClick:h,className:"p-1.5 rounded-sm text-muted hover:text-main bg-surface border border-grid transition",title:"Vorheriger Monat",children:s.jsx(gp,{className:"w-4 h-4"})}),s.jsx("button",{onClick:g,className:"p-1.5 rounded-sm text-muted hover:text-main bg-surface border border-grid transition",title:"Nächster Monat",children:s.jsx(yp,{className:"w-4 h-4"})})]})]}),s.jsxs("div",{className:"hallmark-panel rounded-sm border border-grid overflow-hidden",children:[s.jsxs("div",{className:"grid grid-cols-7 bg-subtle border-b border-grid text-center text-xs font-mono text-muted font-bold py-3 uppercase",children:[s.jsx("div",{children:"MO"}),s.jsx("div",{children:"DI"}),s.jsx("div",{children:"MI"}),s.jsx("div",{children:"DO"}),s.jsx("div",{children:"FR"}),s.jsx("div",{children:"SA"}),s.jsx("div",{children:"SO"})]}),s.jsxs("div",{className:"grid grid-cols-7 auto-rows-fr divide-x divide-y divide-grid bg-surface text-xs font-mono",children:[Array.from({length:y}).map((m,w)=>s.jsx("div",{className:"min-h-[100px] sm:min-h-[110px] p-2 bg-subtle/50 text-muted opacity-30"},`offset-${w}`)),Array.from({length:v}).map((m,w)=>{const j=w+1,_=f(j),E=new Date().getFullYear()===a&&new Date().getMonth()===u&&new Date().getDate()===j;return s.jsxs("div",{className:`min-h-[100px] sm:min-h-[110px] p-2 flex flex-col justify-between transition ${E?"bg-surface-hover/80 font-bold":"hover:bg-surface-hover/50"}`,children:[s.jsxs("div",{className:"flex items-center justify-between mb-1",children:[s.jsx("span",{className:`w-5 h-5 rounded-sm flex items-center justify-center font-mono text-xs ${E?"bg-main text-paper font-bold shadow-sm":"text-muted"}`,children:j}),_.length>0&&s.jsxs("span",{className:"text-[9px] font-mono text-muted",children:[_.length," ",_.length===1?"Event":"Events"]})]}),s.jsx("div",{className:"space-y-1.5 overflow-y-auto max-h-[70px] no-scrollbar",children:_.map(C=>{const U=(i==null?void 0:i.id)===C.id;return s.jsx("button",{onClick:()=>o(C),style:{backgroundColor:U?c:`${c}15`,borderColor:`${c}40`,color:U?"#ffffff":c},className:`w-full text-left px-2 py-1 rounded-sm text-[10px] font-mono font-bold border truncate block hover:brightness-110 transition shadow-sm ${C.is_active===!1?"opacity-50 line-through":""}`,children:C.title},`evt-${C.id}`)})})]},`day-${j}`)})]})]}),i&&s.jsxs("div",{className:"hallmark-panel rounded-sm p-6 border border-grid flex flex-col sm:flex-row sm:items-center justify-between gap-4 font-mono animate-in fade-in duration-200",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted",children:[s.jsxs("span",{className:"flex items-center gap-1 bg-subtle px-2 py-0.5 rounded-sm border border-grid font-bold text-ma Line truncated
Offene Angebote, DIY-Kultur & engagierte Schichten.`),[Ut,Xl]=k.useState((e==null?void 0:e.show_support_box)??!0),[T,D]=k.useState((e==null?void 0:e.support_box_title)||"❤️ Unterstützen"),[ee,ot]=k.useState((e==null?void 0:e.support_box_text)||"Hilf mit als Helfer*in an der Bar, beim Essen kochen oder beim Auf- & Abbau."),[Z,No]=k.useState(!1),[Dn,jo]=k.useState(!1),[So,bo]=k.useState("smtp.beispiel.de"),[_o,Eo]=k.useState(587),[Co,To]=k.useState(""),[Po,zo]=k.useState(""),[Lo,es]=k.useState(!0),[Mo,ts]=k.useState(!1),[Ao,Do]=k.useState("noreply@schichtplaner.de"),[Ro,Sd]=k.useState(""),[ns,bd]=k.useState(!1),[Oo,Io]=k.useState(!1),[$o,Fo]=k.useState(!1);k.useEffect(()=>{Vo()},[]);const Vo=async()=>{u(!0);try{try{const p=await $("/users/manage-users/");y(p.results||p)}catch{}try{const p=await $("/users/pending/");c(p.results||p)}catch{}try{const p=await $("/users/restriction-setting/");w(p.is_restriction_enabled),_(p.require_admin_approval),C(p.require_email_verification??!0)}catch{}try{const p=await $("/users/domain-rules/");A(p.results||p)}catch{}try{const p=await $("/events/");F(p.results||p)}catch{}try{const p=await $("/templates/");W(p.results||p)}catch{}try{const p=await $("/users/smtp-setting/");p&&(jo(p.is_active??!1),bo(p.host||""),Eo(p.port||587),To(p.username||""),zo(p.password||""),es(p.use_tls??!0),ts(p.use_ssl??!1),Do(p.from_email||""))}catch{}}catch(p){h(p.message||"Laden der Admin-Daten fehlgeschlagen.")}finally{u(!1)}},Ae=p=>{x(p),setTimeout(()=>x(""),4e3)},_d=async p=>{try{const B=await $(`/users/manage-users/${p.id}/`,{method:"PATCH",body:JSON.stringify({is_admin_user:!p.is_admin_user})});y(N.map(wt=>wt.id===p.id?B:wt)),Ae(`Admin-Rechte für ${p.username} aktualisiert.`)}catch(B){h(B.message||"Fehler beim Aktualisieren.")}},Ed=async p=>{try{const B=await $(`/users/manage-users/${p.id}/`,{method:"PATCH",body:JSON.stringify({is_approved:!p.is_approved})});y(N.map(wt=>wt.id===p.id?B:wt)),Ae(`Freischalt-Status für ${p.username} aktualisiert.`)}catch(B){h(B.message||"Fehler beim Aktualisieren.")}},Cd=async p=>{try{await $(`/users/${p}/approve/`,{method:"POST"}),c(f.filter(B=>B.id!==p)),Vo(),Ae("Benutzer erfolgreich freigeschaltet.")}catch(B){h(B.message||"Freischalten fehlgeschlagen.")}},Td=async p=>{try{await $(`/users/${p}/approve/`,{method:"DELETE"}),c(f.filter(B=>B.id!==p)),Ae("Benutzer abgelehnt und gelöscht.")}catch(B){h(B.message||"Ablehnen fehlgeschlagen.")}},rs=async(p,B)=>{try{const ls=await $("/users/restriction-setting/",{method:"POST",body:JSON.stringify({is_restriction_enabled:p==="restriction"?B:m,require_admin_approval:p==="approval"?B:j,require_email_verification:p==="email_verify"?B:E})});w(ls.is_restriction_enabled),_(ls.require_admin_approval),C(ls.require_email_verification),Ae("Sicherheitseinstellungen aktualisiert.")}catch(wt){h(wt.message||"Aktualisierung fehlgeschlagen.")}},Pd=async p=>{if(p.preventDefault(),!!le.trim())try{const B=await $("/users/domain-rules/",{method:"POST",body:JSON.stringify({domain:le})});A([...U,B]),L(""),Ae(`Domain-Regel "${B.domain}" hinzugefügt.`)}catch(B){h(B.message||"Fehler beim Hinzufügen.")}},zd=async p=>{try{await $(`/users/domain-rules/${p}/`,{method:"DELETE"}),A(U.filter(B=>B.id!==p)),Ae("Domain-Regel entfernt.")}catch(B){h(B.message||"Fehler beim Löschen.")}},Ld=async p=>{if(p.preventDefault(),!!he.trim())try{await $("/skills/",{method:"POST",body:JSON.stringify({name:he,description:I,color:R})}),P(""),S(""),l(),Ae("Qualifikation angelegt.")}catch(B){h(B.message||"Fehler beim Anlegen.")}},Md=async p=>{try{await $(`/skills/${p}/`,{method:"DELETE"}),l(),Ae("Qualifikation gelöscht.")}catch(B){h(B.message||"Fehler beim Löschen.")}},Ad=async p=>{try{await $(`/templates/${p}/`,{method:"DELETE"}),W(q.filter(B=>B.id!==p)),Ae("Vorlage gelöscht.")}catch(B){h(B.message||"Fehler beim Löschen.")}},Dd=async p=>{p.preventDefault(),No(!0);try{await $("/branding/",{method:"POST",body:JSON.stringify({app_name:J,logo_url:K,primary_color:et,custom_banner_text:zr,show_community_info_box:Vt,community_info_title:vt,community_info_text:Lr,show_support_box:Ut,support_box_title:T,support_box_text:ee})}),t(),Ae("Branding-Einstellungen erfolgreich gespeichert!")}catch(B){h(B.message||"Speichern des Brandings fehlgeschlagen.")}finally{No(!1)}},Rd=async p=>{p.preventDefault(),Io(!0);try{await $("/users/smtp-setting/",{method:"POST",body:JSON.stringify({is_active:Dn,host:So,port:parseInt(_o)||587,username:Co,password:Po,use_tls:Lo,use_ssl:Mo,from_email:Ao})}),Ae("✅ SMTP-Einstellungen erfolgreich gespeichert!")}catch(B){h(B.message||"Speichern der SMTP-Einstellungen fehlgeschlagen.")}finally{Io(!1)}},Od=async()=>{Fo(!0);try{const p=await $("/users/smtp-setting/test/",{method:"POST",body:JSON.stringify({email:Ro})});Ae(`✅ ${p.message||"Test-E-Mail erfolgreich gesendet!"}`)}catch(p){h(p.message||"Test-E-Mail fehlgeschlagen.")}finally{Fo(!1)}},Uo=N.filter(p=>p.username.toLowerCase().includes(v.toLowerCase())||p.email.toLowerCase().includes(v.toLower Line truncated
+1
View File
@@ -0,0 +1 @@
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-6{bottom:1.5rem}.left-3{left:.75rem}.left-3\.5{left:.875rem}.right-3{right:.75rem}.riLine truncated
-1
View File
@@ -1 +0,0 @@
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-6{bottom:1.5rem}.left-3{left:.75rem}.left-3\.5{left:.875rem}.right-3{right:.75rem}.riLine truncated
+2 -2
View File
@@ -11,8 +11,8 @@
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap" rel="stylesheet">
<title>Schichtplaner — Veranstaltungsschichtpläne</title> <title>Schichtplaner — Veranstaltungsschichtpläne</title>
<script type="module" crossorigin src="/assets/index-BHd9ZwUB.js"></script> <script type="module" crossorigin src="/assets/index-COhsF1I-.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-VOnznzhX.css"> <link rel="stylesheet" crossorigin href="/assets/index-DyS9UMYS.css">
</head> </head>
<body class="bg-paper text-main font-sans antialiased min-h-screen"> <body class="bg-paper text-main font-sans antialiased min-h-screen">
<div id="root"></div> <div id="root"></div>
+2
View File
@@ -469,6 +469,8 @@ export default function App() {
<TemplatesPage <TemplatesPage
onBack={() => setActiveTab('schedule')} onBack={() => setActiveTab('schedule')}
onInstantiateTemplate={handleInstantiateTemplate} onInstantiateTemplate={handleInstantiateTemplate}
user={user}
skills={skills}
/> />
) : ( ) : (
<div className="space-y-6"> <div className="space-y-6">
File diff suppressed because it is too large. Load diff
+48 -1
View File
@@ -2,6 +2,7 @@
/* Hallmark · component: EventEditorPage · genre: editorial · theme: Atelier (Dark & Light) · studied-DNA: https://inihaus.de */ /* Hallmark · component: EventEditorPage · genre: editorial · theme: Atelier (Dark & Light) · studied-DNA: https://inihaus.de */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { ArrowLeft, Calendar, Layers, Plus, Trash2, Edit3, CheckCircle2, AlertCircle } from 'lucide-react'; import { ArrowLeft, Calendar, Layers, Plus, Trash2, Edit3, CheckCircle2, AlertCircle } from 'lucide-react';
import { apiFetch } from '../api/client';
export default function EventEditorPage({ eventToEdit, skills, onBack, onSubmit }) { export default function EventEditorPage({ eventToEdit, skills, onBack, onSubmit }) {
const [title, setTitle] = useState(eventToEdit?.title || ''); const [title, setTitle] = useState(eventToEdit?.title || '');
@@ -369,7 +370,7 @@ export default function EventEditorPage({ eventToEdit, skills, onBack, onSubmit
</div> </div>
{/* Action Controls */} {/* Action Controls */}
<div className="hallmark-panel rounded-sm p-4 border border-grid flex items-center justify-between font-mono text-xs"> <div className="hallmark-panel rounded-sm p-4 border border-grid flex flex-wrap items-center justify-between gap-3 font-mono text-xs">
<button <button
type="button" type="button"
onClick={onBack} onClick={onBack}
@@ -377,6 +378,51 @@ export default function EventEditorPage({ eventToEdit, skills, onBack, onSubmit
> >
Abbrechen Abbrechen
</button> </button>
<div className="flex items-center gap-2">
<button
type="button"
disabled={submitting}
onClick={async () => {
if (!title.trim()) {
setError('Bitte gib einen Titel an.');
return;
}
setSubmitting(true);
try {
await apiFetch('/templates/', {
method: 'POST',
body: JSON.stringify({
name: title,
description: description || `Vorlage mit ${taskAreas.length} Aufgabenbereichen`,
template_data: {
task_areas: taskAreas.map(ta => ({
name: ta.name,
description: ta.description,
shifts: (ta.shifts || []).map(s => ({
title: s.title,
start_time: s.start_time,
end_time: s.end_time,
max_participants: s.max_participants,
required_skill_ids: s.required_skill_ids
}))
}))
}
})
});
alert(`✅ Vorlage "${title}" inklusive aller voreingestellten Schichten erfolgreich gespeichert!`);
} catch (err) {
setError(err.message || 'Speichern der Vorlage fehlgeschlagen.');
} finally {
setSubmitting(false);
}
}}
className="px-4 py-2.5 rounded-sm text-xs font-mono font-bold bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 hover:bg-indigo-500/20 transition flex items-center gap-1.5"
title="Diese Konfiguration mit allen Schichten als Vorlage abspeichern"
>
<Layers className="w-4 h-4" /> ALS VORLAGE SPEICHERN
</button>
<button <button
type="submit" type="submit"
disabled={submitting} disabled={submitting}
@@ -387,6 +433,7 @@ export default function EventEditorPage({ eventToEdit, skills, onBack, onSubmit
{submitting ? 'Speichern...' : eventToEdit ? 'Änderungen Speichern' : 'Veranstaltung Jetzt Erstellen'} {submitting ? 'Speichern...' : eventToEdit ? 'Änderungen Speichern' : 'Veranstaltung Jetzt Erstellen'}
</button> </button>
</div> </div>
</div>
</form> </form>
</div> </div>
); );
+291 -7
View File
@@ -1,10 +1,10 @@
/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V5 */ /* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V5 */
/* Hallmark · component: TemplatesPage · genre: editorial · theme: Atelier (Dark & Light) · studied-DNA: https://inihaus.de */ /* Hallmark · component: TemplatesPage · genre: editorial · theme: Atelier (Dark & Light) · studied-DNA: https://inihaus.de */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { ArrowLeft, Layers, Play, CheckCircle2, AlertCircle, Plus, Trash2 } from 'lucide-react'; import { ArrowLeft, Layers, Play, CheckCircle2, AlertCircle, Plus, Trash2, Clock, Users, Award } from 'lucide-react';
import { apiFetch } from '../api/client'; import { apiFetch } from '../api/client';
export default function TemplatesPage({ onBack, onInstantiateTemplate }) { export default function TemplatesPage({ onBack, onInstantiateTemplate, user, skills }) {
const [templates, setTemplates] = useState([]); const [templates, setTemplates] = useState([]);
const [loading, setLoading] = useState(true); const [loading, setLoading] = useState(true);
const [error, setError] = useState(''); const [error, setError] = useState('');
@@ -17,6 +17,21 @@ export default function TemplatesPage({ onBack, onInstantiateTemplate }) {
const [location, setLocation] = useState(''); const [location, setLocation] = useState('');
const [submitting, setSubmitting] = useState(false); const [submitting, setSubmitting] = useState(false);
// State for creating a new template with preset shifts
const [showCreateTemplate, setShowCreateTemplate] = useState(false);
const [newTplName, setNewTplName] = useState('');
const [newTplDesc, setNewTplDesc] = useState('');
const [newTplTaskAreas, setNewTplTaskAreas] = useState([
{
name: 'Tresendienst',
description: 'Getränkeausschank und Bar',
shifts: [
{ title: 'Frühschicht', start_time: '18:00', end_time: '22:00', max_participants: 2, required_skill_ids: [] },
{ title: 'Spätschicht', start_time: '22:00', end_time: '02:00', max_participants: 3, required_skill_ids: [] }
]
}
]);
useEffect(() => { useEffect(() => {
fetchTemplates(); fetchTemplates();
}, []); }, []);
@@ -57,6 +72,72 @@ export default function TemplatesPage({ onBack, onInstantiateTemplate }) {
} }
}; };
const handleCreateTemplate = async (e) => {
e.preventDefault();
if (!newTplName.trim()) {
setError('Bitte gib einen Vorlagen-Namen an.');
return;
}
setSubmitting(true);
try {
const payload = {
name: newTplName,
description: newTplDesc,
template_data: {
task_areas: newTplTaskAreas.map(ta => ({
name: ta.name,
description: ta.description,
shifts: (ta.shifts || []).map(s => ({
title: s.title,
start_time: s.start_time,
end_time: s.end_time,
max_participants: s.max_participants,
required_skill_ids: s.required_skill_ids
}))
}))
}
};
await apiFetch('/templates/', {
method: 'POST',
body: JSON.stringify(payload)
});
setShowCreateTemplate(false);
setNewTplName('');
setNewTplDesc('');
fetchTemplates();
} catch (err) {
setError(err.message || 'Erstellen der Vorlage fehlgeschlagen.');
} finally {
setSubmitting(false);
}
};
const addTplTaskArea = () => {
setNewTplTaskAreas([
...newTplTaskAreas,
{
name: 'Neuer Bereich',
description: '',
shifts: [{ title: 'Schicht 1', start_time: '14:00', end_time: '18:00', max_participants: 2, required_skill_ids: [] }]
}
]);
};
const addTplShift = (taIdx) => {
const updated = [...newTplTaskAreas];
updated[taIdx].shifts.push({
title: `Schicht ${updated[taIdx].shifts.length + 1}`,
start_time: '18:00',
end_time: '22:00',
max_participants: 2,
required_skill_ids: []
});
setNewTplTaskAreas(updated);
};
return ( return (
<div className="space-y-6 max-w-4xl mx-auto animate-in fade-in duration-200 font-sans"> <div className="space-y-6 max-w-4xl mx-auto animate-in fade-in duration-200 font-sans">
{/* Navigation Header */} {/* Navigation Header */}
@@ -74,7 +155,8 @@ export default function TemplatesPage({ onBack, onInstantiateTemplate }) {
</div> </div>
{/* Page Title Panel */} {/* Page Title Panel */}
<div className="hallmark-panel rounded-sm p-6 sm:p-8 border border-grid space-y-2"> <div className="hallmark-panel rounded-sm p-6 sm:p-8 border border-grid space-y-4">
<div className="flex items-center justify-between gap-3">
<div className="flex items-center gap-3"> <div className="flex items-center gap-3">
<div className="w-10 h-10 rounded-sm bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 flex items-center justify-center font-bold"> <div className="w-10 h-10 rounded-sm bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 flex items-center justify-center font-bold">
<Layers className="w-5 h-5" /> <Layers className="w-5 h-5" />
@@ -84,10 +166,21 @@ export default function TemplatesPage({ onBack, onInstantiateTemplate }) {
Veranstaltungs-Vorlagen Zentrale Veranstaltungs-Vorlagen Zentrale
</h2> </h2>
<p className="text-xs text-muted font-mono mt-0.5"> <p className="text-xs text-muted font-mono mt-0.5">
Erstelle neue Veranstaltungen im Handumdrehen aus vorgefertigten Struktur-Vorlagen Erstelle neue Veranstaltungen mit voreingestellten Schichten und Aufgabenbereichen
</p> </p>
</div> </div>
</div> </div>
{user && (
<button
onClick={() => setShowCreateTemplate(!showCreateTemplate)}
className="px-3.5 py-2 rounded-sm text-xs font-mono font-bold bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 hover:bg-indigo-500/20 transition flex items-center gap-1.5 shrink-0"
>
<Plus className="w-4 h-4" />
{showCreateTemplate ? 'Schließen' : 'Neue Vorlage Erstellen'}
</button>
)}
</div>
</div> </div>
{error && ( {error && (
@@ -97,6 +190,171 @@ export default function TemplatesPage({ onBack, onInstantiateTemplate }) {
</div> </div>
)} )}
{/* Creator Form for new Template with Preset Shifts */}
{showCreateTemplate && (
<form onSubmit={handleCreateTemplate} className="hallmark-panel rounded-sm p-6 border border-grid space-y-4 font-mono text-xs animate-in fade-in duration-200">
<h3 className="font-serif text-lg font-bold uppercase text-indigo-400 border-b border-grid pb-2 flex items-center justify-between">
<span>Neue Vorlage mit voreingestellten Schichten anlegen</span>
<button
type="button"
onClick={addTplTaskArea}
className="text-xs font-mono font-bold bg-indigo-500/20 text-indigo-300 px-3 py-1 rounded-sm border border-indigo-500/30 flex items-center gap-1"
>
<Plus className="w-3.5 h-3.5" /> Bereich Hinzufügen
</button>
</h3>
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
<div className="sm:col-span-2">
<label className="block text-main mb-1 font-bold">Vorlagen Name</label>
<input
type="text"
required
placeholder="z. B. Standard Kneipenabend / Bar-Event"
value={newTplName}
onChange={(e) => setNewTplName(e.target.value)}
className="w-full px-3.5 py-2 rounded-sm input-field text-sm font-bold"
/>
</div>
<div className="sm:col-span-2">
<label className="block text-main mb-1 font-bold">Beschreibung (optional)</label>
<input
type="text"
placeholder="z. B. Inklusive 2 Barschichten und Aufbau"
value={newTplDesc}
onChange={(e) => setNewTplDesc(e.target.value)}
className="w-full px-3.5 py-2 rounded-sm input-field text-xs"
/>
</div>
</div>
{/* Task Areas & Preset Shifts Builder */}
<div className="space-y-4 pt-2">
{newTplTaskAreas.map((ta, taIdx) => (
<div key={taIdx} className="p-4 rounded-sm bg-subtle border border-grid space-y-3">
<div className="flex items-center justify-between gap-2">
<input
type="text"
required
placeholder="Bereichs-Name (z. B. Bar)"
value={ta.name}
onChange={(e) => {
const updated = [...newTplTaskAreas];
updated[taIdx].name = e.target.value;
setNewTplTaskAreas(updated);
}}
className="flex-1 px-3 py-1 rounded-sm input-field text-xs font-bold"
/>
<button
type="button"
onClick={() => {
setNewTplTaskAreas(newTplTaskAreas.filter((_, i) => i !== taIdx));
}}
className="text-muted hover:text-red-400 p-1"
>
<Trash2 className="w-4 h-4" />
</button>
</div>
<div className="pl-3 border-l-2 border-grid space-y-2">
<div className="flex items-center justify-between text-muted text-[11px] font-bold">
<span>Voreingestellte Schichten</span>
<button
type="button"
onClick={() => addTplShift(taIdx)}
className="text-indigo-400 hover:underline flex items-center gap-1"
>
<Plus className="w-3 h-3" /> Schicht hinzufügen
</button>
</div>
{ta.shifts.map((sh, sIdx) => (
<div key={sIdx} className="p-2.5 rounded-sm bg-surface border border-grid grid grid-cols-1 sm:grid-cols-12 gap-2 items-center text-xs">
<input
type="text"
placeholder="Schichtname"
value={sh.title}
onChange={(e) => {
const updated = [...newTplTaskAreas];
updated[taIdx].shifts[sIdx].title = e.target.value;
setNewTplTaskAreas(updated);
}}
className="sm:col-span-4 px-2 py-1 rounded-sm input-field text-xs"
/>
<input
type="text"
placeholder="Start (18:00)"
value={sh.start_time}
onChange={(e) => {
const updated = [...newTplTaskAreas];
updated[taIdx].shifts[sIdx].start_time = e.target.value;
setNewTplTaskAreas(updated);
}}
className="sm:col-span-2 px-2 py-1 rounded-sm input-field text-xs"
/>
<input
type="text"
placeholder="Ende (22:00)"
value={sh.end_time}
onChange={(e) => {
const updated = [...newTplTaskAreas];
updated[taIdx].shifts[sIdx].end_time = e.target.value;
setNewTplTaskAreas(updated);
}}
className="sm:col-span-2 px-2 py-1 rounded-sm input-field text-xs"
/>
<div className="sm:col-span-3 flex items-center gap-1">
<span className="text-[10px] text-muted">Plätze:</span>
<input
type="number"
min="1"
value={sh.max_participants}
onChange={(e) => {
const updated = [...newTplTaskAreas];
updated[taIdx].shifts[sIdx].max_participants = parseInt(e.target.value) || 1;
setNewTplTaskAreas(updated);
}}
className="w-full px-2 py-1 rounded-sm input-field text-xs font-bold"
/>
</div>
<button
type="button"
onClick={() => {
const updated = [...newTplTaskAreas];
updated[taIdx].shifts = updated[taIdx].shifts.filter((_, i) => i !== sIdx);
setNewTplTaskAreas(updated);
}}
className="sm:col-span-1 p-1 text-muted hover:text-red-400 text-center"
>
<Trash2 className="w-3.5 h-3.5 mx-auto" />
</button>
</div>
))}
</div>
</div>
))}
</div>
<div className="pt-3 flex justify-end gap-2 border-t border-grid">
<button
type="button"
onClick={() => setShowCreateTemplate(false)}
className="px-4 py-2 rounded-sm text-xs font-semibold text-muted hover:bg-surface-hover transition border border-grid"
>
Abbrechen
</button>
<button
type="submit"
disabled={submitting}
style={{ backgroundColor: 'var(--brand-primary)' }}
className="px-5 py-2 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 shadow-sm flex items-center gap-1.5"
>
<CheckCircle2 className="w-4 h-4" /> Vorlage Speichern
</button>
</div>
</form>
)}
{/* Templates Grid */} {/* Templates Grid */}
<div className="space-y-4 font-mono text-xs"> <div className="space-y-4 font-mono text-xs">
<h3 className="font-serif text-lg font-bold uppercase text-main">Verfügbare Vorlagen</h3> <h3 className="font-serif text-lg font-bold uppercase text-main">Verfügbare Vorlagen</h3>
@@ -105,7 +363,7 @@ export default function TemplatesPage({ onBack, onInstantiateTemplate }) {
<div className="hallmark-panel p-8 text-center text-muted">Lade Vorlagen...</div> <div className="hallmark-panel p-8 text-center text-muted">Lade Vorlagen...</div>
) : templates.length === 0 ? ( ) : templates.length === 0 ? (
<div className="hallmark-panel p-8 text-center text-muted italic"> <div className="hallmark-panel p-8 text-center text-muted italic">
[ Noch keine Vorlagen gespeichert. Du kannst in der Admin-Zentrale Vorlagen anlegen. ] [ Noch keine Vorlagen gespeichert. Klicke oben auf "Neue Vorlage Erstellen" um Vorlagen mit voreingestellten Schichten anzulegen. ]
</div> </div>
) : ( ) : (
<div className="grid grid-cols-1 md:grid-cols-2 gap-4"> <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
@@ -113,7 +371,7 @@ export default function TemplatesPage({ onBack, onInstantiateTemplate }) {
<div <div
key={tpl.id} key={tpl.id}
onClick={() => handleSelectTemplate(tpl)} onClick={() => handleSelectTemplate(tpl)}
className={`hallmark-panel p-5 rounded-sm border cursor-pointer transition space-y-2 ${ className={`hallmark-panel p-5 rounded-sm border cursor-pointer transition space-y-3 ${
selectedTemplate?.id === tpl.id selectedTemplate?.id === tpl.id
? 'bg-indigo-500/10 border-indigo-500 shadow-md' ? 'bg-indigo-500/10 border-indigo-500 shadow-md'
: 'bg-surface border-grid hover:border-muted' : 'bg-surface border-grid hover:border-muted'
@@ -127,7 +385,33 @@ export default function TemplatesPage({ onBack, onInstantiateTemplate }) {
</span> </span>
)} )}
</div> </div>
{tpl.description && <p className="text-xs font-sans text-muted">{tpl.description}</p>} {tpl.description && <p className="text-xs font-sans text-muted">{tpl.description}</p>}
{/* Render Preset Task Areas & Preset Shifts */}
{tpl.template_data?.task_areas && tpl.template_data.task_areas.length > 0 && (
<div className="space-y-2 pt-2 border-t border-grid text-[11px]">
<div className="font-bold text-muted uppercase text-[10px]">📌 Voreingestellte Schichten:</div>
{tpl.template_data.task_areas.map((ta, idx) => (
<div key={idx} className="bg-subtle p-2 rounded-sm border border-grid space-y-1">
<div className="font-bold text-main flex items-center justify-between">
<span>{ta.name}</span>
<span className="text-[10px] text-muted font-normal">{ta.shifts?.length || 0} Schichten</span>
</div>
<div className="flex flex-wrap gap-1">
{(ta.shifts || []).map((sh, sIdx) => (
<span key={sIdx} className="px-2 py-0.5 rounded-sm bg-surface border border-grid text-[10px] flex items-center gap-1 font-mono">
<Clock className="w-3 h-3 text-muted shrink-0" />
<strong className="text-main">{sh.title}</strong>
<span className="text-muted">({sh.start_time}-{sh.end_time}, {sh.max_participants} Plätze)</span>
</span>
))}
</div>
</div>
))}
</div>
)}
<div className="text-[10px] text-muted pt-2 border-t border-grid flex items-center justify-between"> <div className="text-[10px] text-muted pt-2 border-t border-grid flex items-center justify-between">
<span>Erstellt von: <strong>{tpl.created_by_name || 'Admin'}</strong></span> <span>Erstellt von: <strong>{tpl.created_by_name || 'Admin'}</strong></span>
<span className="text-indigo-400 font-bold">Klick zum Auswählen</span> <span className="text-indigo-400 font-bold">Klick zum Auswählen</span>
@@ -153,7 +437,7 @@ export default function TemplatesPage({ onBack, onInstantiateTemplate }) {
required required
value={title} value={title}
onChange={(e) => setTitle(e.target.value)} onChange={(e) => setTitle(e.target.value)}
className="w-full px-3.5 py-2 rounded-sm input-field text-sm" className="w-full px-3.5 py-2 rounded-sm input-field text-sm font-bold"
/> />
</div> </div>