Files
alrahma_sunday_school_api/apps/dashboard/.next/static/chunks/2bgxpcz4-nnl5.js
T
2026-06-11 03:22:12 -04:00

1 line
48 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94327,e=>{"use strict";let t="http://localhost:4000/api/v1";async function a(e,a){let o,n="u">typeof FormData&&a?.body instanceof FormData,i={...a?.headers??{}};n||(i["Content-Type"]="application/json");let r=await fetch(`${t}${e}`,{...a,headers:i,credentials:"include"});try{o=await r.json()}catch{throw Error(`HTTP ${r.status}: ${r.statusText}`)}if(!r.ok){let e=Error(o?.message??o?.error??`Request failed with status ${r.status}`);throw e.code=o?.error,e.statusCode=r.status,e}return o?.data??o}e.s(["API_BASE",0,t,"EMPLOYEE_PROFILE_KEY",0,"employee_profile","apiFetch",0,a])},56322,4858,e=>{"use strict";var t=e.i(43476),a=e.i(71645);let o="rentaldrivego-language",n="rentaldrivego-language",i="rentaldrivego-theme";function r(e){if(!e)return null;try{let t=(e.split(".")[1]??"").replace(/-/g,"+").replace(/_/g,"/"),a=t.padEnd(4*Math.ceil(t.length/4),"="),o=JSON.parse(atob(a));return"string"==typeof o.sub&&o.sub?o.sub:null}catch{return null}}function l(e){let t=r(null);return t?`${e}:${t}`:e}function s(e){let t=r(null);return t?`${e}--${t}`:e}function c(e){return"u"<typeof document?null:document.cookie.split(";").map(e=>e.trim()).find(t=>t.startsWith(`${e}=`))?.slice(e.length+1)??null}function d(e,t){"u">typeof document&&(document.cookie=`${e}=${t}; path=/; max-age=31536000; samesite=lax`)}function u(e){let t=c(s(e));return t||window.localStorage.getItem(l(e))}function m(e,t=[]){let a=c(s(e));if(a)return a;let o=c(e);if(o)return o;for(let a of[l(e),e,...t]){let e=window.localStorage.getItem(a);if(e)return e}return null}function p(e,t,a=[]){let o=l(e),n=s(e);for(let i of(d(e,t),n!==e&&d(n,t),window.localStorage.setItem(o,t),window.localStorage.setItem(e,t),a))window.localStorage.setItem(i,t)}e.s(["SHARED_LANGUAGE_COOKIE",0,o,"SHARED_LANGUAGE_KEY",0,n,"SHARED_THEME_KEY",0,i,"readCurrentUserScopedPreference",0,u,"readScopedPreference",0,m,"writeScopedPreference",0,p],4858);var h=e.i(94327);let g={en:{nav:{dashboard:"Dashboard",fleet:"Fleet",reservations:"Booking",onlineReservations:"Online Reservations",customers:"Customers",offers:"Offers",team:"Team",reports:"Reports",subscription:"Subscription",billing:"Customer Billing",contracts:"Contracts",notifications:"Notifications",settings:"Settings",reviews:"Reviews",complaints:"Complaints"},titles:{"/":"Dashboard","/fleet":"Fleet Management","/reservations":"Booking","/reservations/new":"Book Car","/online-reservations":"Online Reservations","/customers":"Customers","/offers":"Offers","/team":"Team","/reports":"Reports","/subscription":"Subscription","/billing":"Customer Billing","/contracts":"Contracts","/notifications":"Notifications","/settings":"Settings"},notifications:"Notifications",noNewNotifications:"No new notifications",unreadNotifications:e=>`${e} unread notification${e>1?"s":""}`,signOut:"Sign out",workspaceUser:"Workspace user",localAuth:"Local authentication",language:"Language",theme:"Theme",light:"Light",dark:"Dark",fleet:{statusLabels:{AVAILABLE:"Available",RESERVED:"Reserved",READY:"Ready for pickup",RENTED:"On rent",RETURNED:"Returned",NEEDS_CLEANING:"Needs cleaning",MAINTENANCE:"Maintenance",DAMAGE_REVIEW:"Damage review",OUT_OF_SERVICE:"Out of service"},logMaintenance:"Log Maintenance",maintenanceSubtitle:e=>`${e} has been set to maintenance. Add details below.`,maintenanceTypeRequired:"Please enter a maintenance type.",failedToSave:"Failed to save maintenance log.",typeLabel:"Type *",typePlaceholder:"e.g. Oil change, Tire rotation, Brake service…",description:"Description",descriptionPlaceholder:"Optional details…",date:"Date *",nextDueDate:"Next Due Date",cost:"Cost (MAD)",odometer:"Odometer (km)",skip:"Skip",saveLog:"Save Log",saving:"Saving…",addNewVehicle:"Add New Vehicle",makeMissing:"Please select or enter a make.",modelMissing:"Please select or enter a model.",plateMissing:"Please enter a license plate.",rateMissing:"Please enter a valid daily rate.",failedToAdd:"Failed to add vehicle. Please check all fields and try again.",make:"Make *",selectMake:"Select make…",other:"Other…",typeMake:"Type make…",model:"Model *",selectModel:"Select model…",typeModel:"Type model…",year:"Year *",category:"Category",dailyRate:"Daily Rate (MAD) *",licensePlate:"License Plate *",vin:"VIN",color:"Color",select:"Select…",typeColor:"Type color…",seats:"Seats",transmission:"Transmission",manual:"Manual",automatic:"Automatic",fuelType:"Fuel Type",pickupLocations:"Pick-up locations",pickupLocationsPlaceholder:"e.g. Casablanca Airport, Casablanca Downtown",dropoffLocations:"Drop-off locations",dropoffLocationsPlaceholder:"e.g. Rabat Downtown, Marrakech Center",locationHint:"Separate multiple locations with commas.",allowDifferentDropoff:"Allow different drop-off location",dropoffLocationsRequired:"Please add at least one drop-off location when different drop-off is enabled.",sameDropoffOnly:"Same drop-off only",differentDropoffAvailable:"Different drop-off available",photosLabel:"Photos (up to 10)",clickToAddPhotos:"Click to add photos",addMorePhotos:"Add more photos",cancel:"Cancel",adding:"Adding…",addVehicle:"Add Vehicle",heading:"Fleet",vehicleCount:e=>`${e} vehicle${1!==e?"s":""} total`,searchPlaceholder:"Search make, model, plate…",categoryLabels:{ECONOMY:"Economy",COMPACT:"Compact",MIDSIZE:"Midsize",FULLSIZE:"Full-size",SUV:"SUV",LUXURY:"Luxury",VAN:"Van",TRUCK:"Truck"},fuelTypeLabels:{GASOLINE:"Gasoline",DIESEL:"Diesel",ELECTRIC:"Electric",HYBRID:"Hybrid"},allStatuses:"All statuses",allCategories:"All categories",allVisibility:"All visibility",published:"Published",unpublished:"Unpublished",colVehicle:"Vehicle",colCategory:"Category",colStatus:"Status",colDailyRate:"Daily Rate",colPublished:"Published",colActions:"Actions",noPhoto:"No photo",perDay:"/day",noVehicles:"No vehicles yet. Add your first vehicle to get started.",noMatch:"No vehicles match your filters."},vehicleDetail:{tabDetails:"Details",tabMaintenance:"Maintenance",tabCalendar:"Calendar",editBtn:"Edit",cancelBtn:"Cancel",saveBtn:"Save",savingBtn:"Saving…",uploadingPhotosBtn:"Uploading photos…",loadingVehicle:"Loading vehicle…",photosHeading:"Photos",noPhotosYet:"No photos uploaded yet.",clickToAddPhotos:"Click to add photos",addMorePhotos:e=>`Add more photos (${e}/10)`,maxPhotosReached:"Maximum 10 photos reached.",newPhotoBadge:"New",vehicleDetailsHeading:"Vehicle details",labelCategory:"Category",labelDailyRate:"Daily rate",labelStatus:"Status",labelSeats:"Seats",labelTransmission:"Transmission",labelFuelType:"Fuel type",labelColor:"Color",labelOdometer:"Odometer",labelNotes:"Notes",makeLabel:"Make *",selectMake:"Select make…",other:"Other…",typeMake:"Type make…",modelLabel:"Model *",selectModel:"Select model…",typeModel:"Type model…",yearLabel:"Year *",dailyRateLabel:"Daily Rate (MAD) *",licensePlateLabel:"License Plate *",vinLabel:"VIN",statusLabel:"Status",colorLabel:"Color",selectColor:"Select color…",typeColor:"Type color…",seatsLabel:"Seats",transmissionLabel:"Transmission",fuelTypeLabel:"Fuel Type",odometerLabel:"Odometer (km)",notesLabel:"Notes",optionalNotes:"Optional notes…",optional:"Optional…",makeRequired:"Make is required.",modelRequired:"Model is required.",plateRequired:"License plate is required.",rateInvalid:"Please enter a valid daily rate.",failedSave:"Failed to save changes.",maintenanceIntro:"Track routine maintenance for this vehicle. Click Log on any item to record a service.",logBtn:"Log",statusNone:"Not logged",statusOverdue:"Overdue",statusDueSoon:"Due soon",statusOk:"Up to date",noRecord:"No record yet",lastPrefix:"Last:",atKm:e=>`at ${e} km`,duePrefix:"· Due:",orSep:"or",kmLeft:e=>`${e} km left`,overdueByKm:"overdue by km",serviceDateLabel:"Service Date *",odometerAtService:"Odometer at service (km)",nextDueDateLabel:"Next due date",nextDueKmLabel:"Next due at (km)",costLabel:"Cost (MAD)",maintenanceNotesLabel:"Notes",saveLabel:"Save",savingLabel:"Saving…",dateRequired:"Service date is required.",routineTypes:{"Oil Change":"Oil Change","Technical Inspection":"Technical Inspection","Vehicle Registration":"Vehicle Registration","Car Tax":"Car Tax","Tire Rotation":"Tire Rotation","Brake Inspection":"Brake Inspection","Air Filter":"Air Filter","Cabin Filter":"Cabin Filter","Battery Check":"Battery Check","Belt / Chain Service":"Belt / Chain Service","Coolant Flush":"Coolant Flush","Transmission Service":"Transmission Service"}},calendar:{heading:"Availability Calendar",blockDates:"Block dates",clickSecondDay:e=>`Click a second day to set the block end date (selected: ${e})`,cancelSelection:"cancel",legendReserved:"Reserved",legendMaintenance:"Maintenance",legendBlocked:"Blocked",legendAvailable:"Available",failedLoad:"Failed to load calendar",moreDays:e=>`+${e} more`,reservationsThisMonth:"Reservations this month",blocksAndMaintenance:"Blocks & maintenance",removeBlockConfirm:"Remove this block?",failedDeleteBlock:"Failed to delete block",modalTitle:"Block vehicle dates",blockTypeLabel:"Block type",manualBlock:"Manual block",maintenanceBlock:"Maintenance",startDate:"Start date",endDate:"End date (exclusive)",reasonLabel:"Reason",optional:"(optional)",reasonPlaceholderManual:"e.g. Reserved for VIP, company event…",reasonPlaceholderMaintenance:"e.g. Oil change, tire rotation…",datesRequired:"Start and end dates are required.",endAfterStart:"End date must be after start date.",failedCreateBlock:"Failed to create block",cancel:"Cancel",saveBlock:"Save block",saving:"Saving…",removeBlock:"Remove block",dayHeaders:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},dashboardPage:{failedToLoad:"Failed to load dashboard",forbidden:"You do not have permission to access this page. A Manager role or higher is required.",kpiTotalBookings:"Total Bookings",kpiActiveVehicles:"Active Vehicles",kpiMonthlyRevenue:"Monthly Revenue",kpiTotalCustomers:"Total Customers",vsLastMonth:"vs last month",bookingSources:"Booking Sources",barBookings:"Bookings",barRevenue:"Revenue (MAD)",noBookingData:"No booking data available yet",quickStats:"Quick Stats",noData:"No data yet",recentReservations:"Recent Reservations",viewAll:"View all →",colBookingNum:"Booking #",colCustomer:"Customer",colVehicle:"Vehicle",colDates:"Dates",colStatus:"Status",colTotal:"Total",noReservations:"No reservations yet. Once customers book vehicles, they'll appear here.",trialEnds:e=>`You're on a free trial. Trial ends ${e}.`,trialActive:"You're on a free trial.",pastDueMsg:"Your payment is past due. Please update your billing information.",suspendedMsg:"Your account has been suspended. Please contact support or renew your subscription.",manageBilling:"Manage subscription →",statusLabels:{CONFIRMED:"Confirmed",PENDING:"Pending",ACTIVE:"Active",COMPLETED:"Completed",CANCELLED:"Cancelled"}},reservations:{heading:"Booking",subtitle:"All booking sources, including dashboard, public site, and marketplace.",colCustomer:"Customer",colVehicle:"Vehicle",colDates:"Dates",colSource:"Source",colStatus:"Status",colTotal:"Total",noReservations:"No reservations yet.",loadingReservation:"Loading reservation…",failedToLoad:"Failed to load reservation",confirmReservation:"Confirm reservation",checkInVehicle:"Check in vehicle",checkOutVehicle:"Check out vehicle",working:"Working…",failedConfirm:"Failed to confirm reservation",failedCheckIn:"Failed to check in reservation",failedCheckOut:"Failed to check out reservation",sectionCustomer:"Customer",noPhone:"No phone provided",licenseLabel:"License:",notCaptured:"Not captured",flaggedBadge:"Flagged",sectionVehicle:"Vehicle",sectionCharges:"Charges",chargeDiscount:"Discount",chargeInsurance:"Insurance",chargeAdditionalDrivers:"Additional drivers",chargePricingAdjustments:"Pricing adjustments",chargeGrandTotal:"Grand total",appliedInsurance:"Applied insurance",pricingRulesApplied:"Pricing rules applied",sectionAdditionalDrivers:"Additional drivers",driverLicenseLabel:"License:",driverChargeLabel:"Charge:",approveBtn:"Approve",approvedBadge:"Approved",noApprovalNeeded:"No approval needed",noAdditionalDrivers:"No additional drivers were added to this reservation.",failedApproveDriver:"Failed to approve additional driver",sectionInspectionSummary:"Inspection summary",checkInInspectionLabel:"Check-in inspection",checkOutInspectionLabel:"Check-out inspection",savedBadge:"Saved",pendingBadge:"Pending",inspectionCardTitle:e=>"CHECKIN"===e?"Check-in inspection":"Check-out inspection",inspectionSubtitle:"Mark existing and newly discovered damage directly on the vehicle diagram.",saveInspection:"Save inspection",savingInspection:"Saving…",failedSaveInspection:"Failed to save inspection",diagramHelp:"Click anywhere on the diagram to add a damage marker with the selected type and severity.",mileageLabel:"Mileage",fuelLevelLabel:"Fuel level",fuelLevels:{FULL:"Full",SEVEN_EIGHTHS:"7/8",THREE_QUARTERS:"3/4",FIVE_EIGHTHS:"5/8",HALF:"1/2",THREE_EIGHTHS:"3/8",QUARTER:"1/4",ONE_EIGHTH:"1/8",EMPTY:"Empty"},generalConditionLabel:"General condition",employeeNotesLabel:"Employee notes",customerAcknowledged:"Customer acknowledged this inspection",damageMarkersHeading:"Damage markers",removeMarker:"Remove",noMarkers:"No damage markers saved yet.",damageTypeLabels:{SCRATCH:"Scratch",DENT:"Dent",CRACK:"Crack",CHIP:"Chip",MISSING:"Missing",STAIN:"Stain",OTHER:"Other"},severityLabels:{MINOR:"Minor",MODERATE:"Moderate",MAJOR:"Major"}}},fr:{nav:{dashboard:"Tableau de bord",fleet:"Flotte",reservations:"Réservations",onlineReservations:"Réservations en ligne",customers:"Clients",offers:"Offres",team:"Équipe",reports:"Rapports",subscription:"Abonnement",billing:"Facturation clients",contracts:"Contrats",notifications:"Notifications",settings:"Paramètres",reviews:"Avis",complaints:"Plaintes"},titles:{"/":"Tableau de bord","/fleet":"Gestion de flotte","/reservations":"Réservations","/reservations/new":"Réserver une voiture","/online-reservations":"Réservations en ligne","/customers":"Clients","/offers":"Offres","/team":"Équipe","/reports":"Rapports","/subscription":"Abonnement","/billing":"Facturation clients","/contracts":"Contrats","/notifications":"Notifications","/settings":"Paramètres"},notifications:"Notifications",noNewNotifications:"Aucune nouvelle notification",unreadNotifications:e=>`${e} notification${e>1?"s":""} non lue${e>1?"s":""}`,signOut:"Déconnexion",workspaceUser:"Utilisateur espace",localAuth:"Authentification locale",language:"Langue",theme:"Mode",light:"Clair",dark:"Sombre",fleet:{statusLabels:{AVAILABLE:"Disponible",RESERVED:"Réservé",READY:"Prêt pour remise",RENTED:"En location",RETURNED:"Rendu",NEEDS_CLEANING:"Nettoyage requis",MAINTENANCE:"Maintenance",DAMAGE_REVIEW:"Révision dommages",OUT_OF_SERVICE:"Hors service"},logMaintenance:"Journal de maintenance",maintenanceSubtitle:e=>`${e} a \xe9t\xe9 mis en maintenance. Ajoutez les d\xe9tails ci-dessous.`,maintenanceTypeRequired:"Veuillez saisir un type de maintenance.",failedToSave:"Échec de la sauvegarde du journal de maintenance.",typeLabel:"Type *",typePlaceholder:"ex. Vidange, Rotation des pneus, Freins…",description:"Description",descriptionPlaceholder:"Détails optionnels…",date:"Date *",nextDueDate:"Prochaine échéance",cost:"Coût (MAD)",odometer:"Kilométrage (km)",skip:"Ignorer",saveLog:"Enregistrer",saving:"Enregistrement…",addNewVehicle:"Ajouter un véhicule",makeMissing:"Veuillez sélectionner ou saisir une marque.",modelMissing:"Veuillez sélectionner ou saisir un modèle.",plateMissing:"Veuillez saisir un numéro de plaque.",rateMissing:"Veuillez saisir un tarif journalier valide.",failedToAdd:"Échec de l'ajout du véhicule. Vérifiez tous les champs.",make:"Marque *",selectMake:"Sélectionner la marque…",other:"Autre…",typeMake:"Saisir la marque…",model:"Modèle *",selectModel:"Sélectionner le modèle…",typeModel:"Saisir le modèle…",year:"Année *",category:"Catégorie",dailyRate:"Tarif journalier (MAD) *",licensePlate:"Plaque d'immatriculation *",vin:"VIN",color:"Couleur",select:"Sélectionner…",typeColor:"Saisir la couleur…",seats:"Places",transmission:"Transmission",manual:"Manuelle",automatic:"Automatique",fuelType:"Carburant",pickupLocations:"Lieux de départ",pickupLocationsPlaceholder:"ex. Aéroport de Casablanca, Centre-ville de Casablanca",dropoffLocations:"Lieux de retour",dropoffLocationsPlaceholder:"ex. Centre-ville de Rabat, Centre de Marrakech",locationHint:"Séparez plusieurs lieux par des virgules.",allowDifferentDropoff:"Autoriser un lieu de retour différent",dropoffLocationsRequired:"Ajoutez au moins un lieu de retour lorsque le retour différent est activé.",sameDropoffOnly:"Retour au même lieu uniquement",differentDropoffAvailable:"Retour différent disponible",photosLabel:"Photos (jusqu'à 10)",clickToAddPhotos:"Cliquer pour ajouter des photos",addMorePhotos:"Ajouter d'autres photos",cancel:"Annuler",adding:"Ajout…",addVehicle:"Ajouter le véhicule",heading:"Flotte",vehicleCount:e=>`${e} v\xe9hicule${1!==e?"s":""} au total`,searchPlaceholder:"Rechercher marque, modèle, plaque…",categoryLabels:{ECONOMY:"Économique",COMPACT:"Compacte",MIDSIZE:"Intermédiaire",FULLSIZE:"Grande berline",SUV:"SUV",LUXURY:"Luxe",VAN:"Van",TRUCK:"Camionnette"},fuelTypeLabels:{GASOLINE:"Essence",DIESEL:"Diesel",ELECTRIC:"Électrique",HYBRID:"Hybride"},allStatuses:"Tous les statuts",allCategories:"Toutes les catégories",allVisibility:"Toute visibilité",published:"Publié",unpublished:"Non publié",colVehicle:"Véhicule",colCategory:"Catégorie",colStatus:"Statut",colDailyRate:"Tarif journalier",colPublished:"Publié",colActions:"Actions",noPhoto:"Pas de photo",perDay:"/jour",noVehicles:"Aucun véhicule. Ajoutez votre premier véhicule pour commencer.",noMatch:"Aucun véhicule ne correspond aux filtres."},vehicleDetail:{tabDetails:"Détails",tabMaintenance:"Entretien",tabCalendar:"Calendrier",editBtn:"Modifier",cancelBtn:"Annuler",saveBtn:"Enregistrer",savingBtn:"Enregistrement…",uploadingPhotosBtn:"Envoi des photos…",loadingVehicle:"Chargement du véhicule…",photosHeading:"Photos",noPhotosYet:"Aucune photo ajoutée.",clickToAddPhotos:"Cliquer pour ajouter des photos",addMorePhotos:e=>`Ajouter des photos (${e}/10)`,maxPhotosReached:"10 photos maximum atteintes.",newPhotoBadge:"Nouveau",vehicleDetailsHeading:"Détails du véhicule",labelCategory:"Catégorie",labelDailyRate:"Tarif journalier",labelStatus:"Statut",labelSeats:"Places",labelTransmission:"Transmission",labelFuelType:"Carburant",labelColor:"Couleur",labelOdometer:"Kilométrage",labelNotes:"Notes",makeLabel:"Marque *",selectMake:"Sélectionner la marque…",other:"Autre…",typeMake:"Saisir la marque…",modelLabel:"Modèle *",selectModel:"Sélectionner le modèle…",typeModel:"Saisir le modèle…",yearLabel:"Année *",dailyRateLabel:"Tarif journalier (MAD) *",licensePlateLabel:"Plaque d'immatriculation *",vinLabel:"VIN",statusLabel:"Statut",colorLabel:"Couleur",selectColor:"Sélectionner la couleur…",typeColor:"Saisir la couleur…",seatsLabel:"Places",transmissionLabel:"Transmission",fuelTypeLabel:"Carburant",odometerLabel:"Kilométrage (km)",notesLabel:"Notes",optionalNotes:"Notes optionnelles…",optional:"Optionnel…",makeRequired:"La marque est requise.",modelRequired:"Le modèle est requis.",plateRequired:"La plaque d'immatriculation est requise.",rateInvalid:"Veuillez saisir un tarif journalier valide.",failedSave:"Échec de l'enregistrement.",maintenanceIntro:"Suivez l'entretien de ce véhicule. Cliquez sur Saisir pour enregistrer une intervention.",logBtn:"Saisir",statusNone:"Non enregistré",statusOverdue:"En retard",statusDueSoon:"Bientôt dû",statusOk:"À jour",noRecord:"Aucune intervention",lastPrefix:"Dernier :",atKm:e=>`\xe0 ${e} km`,duePrefix:"· Échéance :",orSep:"ou",kmLeft:e=>`${e} km restants`,overdueByKm:"dépassé (km)",serviceDateLabel:"Date du service *",odometerAtService:"Kilométrage lors du service (km)",nextDueDateLabel:"Prochaine échéance (date)",nextDueKmLabel:"Prochaine échéance (km)",costLabel:"Coût (MAD)",maintenanceNotesLabel:"Notes",saveLabel:"Enregistrer",savingLabel:"Enregistrement…",dateRequired:"La date du service est requise.",routineTypes:{"Oil Change":"Vidange d'huile","Technical Inspection":"Contrôle technique","Vehicle Registration":"Carte grise","Car Tax":"Vignette automobile","Tire Rotation":"Rotation des pneus","Brake Inspection":"Contrôle des freins","Air Filter":"Filtre à air","Cabin Filter":"Filtre habitacle","Battery Check":"Vérification batterie","Belt / Chain Service":"Courroie / Chaîne","Coolant Flush":"Liquide de refroidissement","Transmission Service":"Entretien transmission"}},calendar:{heading:"Calendrier de disponibilité",blockDates:"Bloquer des dates",clickSecondDay:e=>`Cliquez sur un second jour pour d\xe9finir la fin du blocage (s\xe9lectionn\xe9 : ${e})`,cancelSelection:"annuler",legendReserved:"Réservé",legendMaintenance:"Maintenance",legendBlocked:"Bloqué",legendAvailable:"Disponible",failedLoad:"Échec du chargement du calendrier",moreDays:e=>`+${e} de plus`,reservationsThisMonth:"Réservations ce mois-ci",blocksAndMaintenance:"Blocages & maintenance",removeBlockConfirm:"Supprimer ce blocage ?",failedDeleteBlock:"Échec de la suppression du blocage",modalTitle:"Bloquer les dates du véhicule",blockTypeLabel:"Type de blocage",manualBlock:"Blocage manuel",maintenanceBlock:"Maintenance",startDate:"Date de début",endDate:"Date de fin (exclusive)",reasonLabel:"Raison",optional:"(optionnel)",reasonPlaceholderManual:"ex. Réservé pour VIP, événement…",reasonPlaceholderMaintenance:"ex. Vidange, rotation des pneus…",datesRequired:"Les dates de début et de fin sont requises.",endAfterStart:"La date de fin doit être après la date de début.",failedCreateBlock:"Échec de la création du blocage",cancel:"Annuler",saveBlock:"Enregistrer",saving:"Enregistrement…",removeBlock:"Supprimer le blocage",dayHeaders:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"]},dashboardPage:{failedToLoad:"Échec du chargement du tableau de bord",forbidden:"Vous n'avez pas la permission d'accéder à cette page. Un rôle Gestionnaire ou supérieur est requis.",kpiTotalBookings:"Total des réservations",kpiActiveVehicles:"Véhicules actifs",kpiMonthlyRevenue:"Revenus du mois",kpiTotalCustomers:"Total des clients",vsLastMonth:"vs mois dernier",bookingSources:"Sources de réservation",barBookings:"Réservations",barRevenue:"Revenus (MAD)",noBookingData:"Aucune donnée de réservation disponible",quickStats:"Statistiques rapides",noData:"Aucune donnée",recentReservations:"Réservations récentes",viewAll:"Voir tout →",colBookingNum:"Réservation #",colCustomer:"Client",colVehicle:"Véhicule",colDates:"Dates",colStatus:"Statut",colTotal:"Total",noReservations:"Aucune réservation pour l'instant. Les réservations clients apparaîtront ici.",trialEnds:e=>`Vous \xeates en p\xe9riode d'essai. Fin de l'essai le ${e}.`,trialActive:"Vous êtes en période d'essai.",pastDueMsg:"Votre paiement est en retard. Veuillez mettre à jour vos informations de facturation.",suspendedMsg:"Votre compte a été suspendu. Veuillez contacter le support ou renouveler votre abonnement.",manageBilling:"Gérer labonnement →",statusLabels:{CONFIRMED:"Confirmé",PENDING:"En attente",ACTIVE:"Actif",COMPLETED:"Terminé",CANCELLED:"Annulé"}},reservations:{heading:"Réservations",subtitle:"Toutes les sources de réservation : tableau de bord, site public et marketplace.",colCustomer:"Client",colVehicle:"Véhicule",colDates:"Dates",colSource:"Source",colStatus:"Statut",colTotal:"Total",noReservations:"Aucune réservation pour le moment.",loadingReservation:"Chargement de la réservation…",failedToLoad:"Échec du chargement de la réservation",confirmReservation:"Confirmer la réservation",checkInVehicle:"Enregistrer le départ",checkOutVehicle:"Enregistrer le retour",working:"En cours…",failedConfirm:"Échec de la confirmation de la réservation",failedCheckIn:"Échec de l'enregistrement du départ",failedCheckOut:"Échec de l'enregistrement du retour",sectionCustomer:"Client",noPhone:"Aucun téléphone renseigné",licenseLabel:"Permis :",notCaptured:"Non saisi",flaggedBadge:"Signalé",sectionVehicle:"Véhicule",sectionCharges:"Facturation",chargeDiscount:"Remise",chargeInsurance:"Assurance",chargeAdditionalDrivers:"Conducteurs supplémentaires",chargePricingAdjustments:"Ajustements tarifaires",chargeGrandTotal:"Total général",appliedInsurance:"Assurance appliquée",pricingRulesApplied:"Règles tarifaires appliquées",sectionAdditionalDrivers:"Conducteurs supplémentaires",driverLicenseLabel:"Permis :",driverChargeLabel:"Frais :",approveBtn:"Approuver",approvedBadge:"Approuvé",noApprovalNeeded:"Pas d'approbation requise",noAdditionalDrivers:"Aucun conducteur supplémentaire ajouté à cette réservation.",failedApproveDriver:"Échec de l'approbation du conducteur supplémentaire",sectionInspectionSummary:"Résumé des inspections",checkInInspectionLabel:"Inspection de départ",checkOutInspectionLabel:"Inspection de retour",savedBadge:"Enregistré",pendingBadge:"En attente",inspectionCardTitle:e=>"CHECKIN"===e?"Inspection de départ":"Inspection de retour",inspectionSubtitle:"Signalez les dommages existants et nouvellement découverts sur le schéma du véhicule.",saveInspection:"Enregistrer l'inspection",savingInspection:"Enregistrement…",failedSaveInspection:"Échec de l'enregistrement de l'inspection",diagramHelp:"Cliquez n'importe où sur le schéma pour ajouter un marqueur de dommage avec le type et la gravité sélectionnés.",mileageLabel:"Kilométrage",fuelLevelLabel:"Niveau de carburant",fuelLevels:{FULL:"Plein",SEVEN_EIGHTHS:"7/8",THREE_QUARTERS:"3/4",FIVE_EIGHTHS:"5/8",HALF:"1/2",THREE_EIGHTHS:"3/8",QUARTER:"1/4",ONE_EIGHTH:"1/8",EMPTY:"Vide"},generalConditionLabel:"État général",employeeNotesLabel:"Notes de l'employé",customerAcknowledged:"Le client a reconnu cette inspection",damageMarkersHeading:"Marqueurs de dommages",removeMarker:"Supprimer",noMarkers:"Aucun marqueur de dommage enregistré.",damageTypeLabels:{SCRATCH:"Rayure",DENT:"Bosse",CRACK:"Fissure",CHIP:"Éclat",MISSING:"Manquant",STAIN:"Tache",OTHER:"Autre"},severityLabels:{MINOR:"Léger",MODERATE:"Modéré",MAJOR:"Majeur"}}},ar:{nav:{dashboard:"لوحة التحكم",fleet:"الأسطول",reservations:"الحجوزات",onlineReservations:"الحجوزات الإلكترونية",customers:"العملاء",offers:"العروض",team:"الفريق",reports:"التقارير",subscription:"الاشتراك",billing:"فوترة العملاء",contracts:"العقود",notifications:"الإشعارات",settings:"الإعدادات",reviews:"التقييمات",complaints:"الشكاوى"},titles:{"/":"لوحة التحكم","/fleet":"إدارة الأسطول","/reservations":"الحجوزات","/reservations/new":"حجز سيارة","/online-reservations":"الحجوزات الإلكترونية","/customers":"العملاء","/offers":"العروض","/team":"الفريق","/reports":"التقارير","/subscription":"الاشتراك","/billing":"فوترة العملاء","/contracts":"العقود","/notifications":"الإشعارات","/settings":"الإعدادات"},notifications:"الإشعارات",noNewNotifications:"لا توجد إشعارات جديدة",unreadNotifications:e=>`${e} إشعار غير مقروء`,signOut:"تسجيل الخروج",workspaceUser:"مستخدم مساحة العمل",localAuth:"مصادقة محلية",language:"اللغة",theme:"الوضع",light:"فاتح",dark:"داكن",fleet:{statusLabels:{AVAILABLE:"متاح",RESERVED:"محجوز",READY:"جاهز للتسليم",RENTED:"قيد التأجير",RETURNED:"مُعاد",NEEDS_CLEANING:"يحتاج تنظيف",MAINTENANCE:"صيانة",DAMAGE_REVIEW:"مراجعة أضرار",OUT_OF_SERVICE:"خارج الخدمة"},logMaintenance:"تسجيل الصيانة",maintenanceSubtitle:e=>`تم تعيين ${e} في وضع الصيانة. أضف التفاصيل أدناه.`,maintenanceTypeRequired:"الرجاء إدخال نوع الصيانة.",failedToSave:"فشل حفظ سجل الصيانة.",typeLabel:"النوع *",typePlaceholder:"مثال: تغيير الزيت، تدوير الإطارات، خدمة الفرامل…",description:"الوصف",descriptionPlaceholder:"تفاصيل اختيارية…",date:"التاريخ *",nextDueDate:"تاريخ الاستحقاق التالي",cost:"التكلفة (درهم)",odometer:"عداد المسافة (كم)",skip:"تخطي",saveLog:"حفظ السجل",saving:"جارٍ الحفظ…",addNewVehicle:"إضافة مركبة جديدة",makeMissing:"الرجاء اختيار أو إدخال الماركة.",modelMissing:"الرجاء اختيار أو إدخال الطراز.",plateMissing:"الرجاء إدخال رقم اللوحة.",rateMissing:"الرجاء إدخال سعر يومي صحيح.",failedToAdd:"فشل إضافة المركبة. يرجى التحقق من جميع الحقول.",make:"الماركة *",selectMake:"اختر الماركة…",other:"أخرى…",typeMake:"اكتب الماركة…",model:"الطراز *",selectModel:"اختر الطراز…",typeModel:"اكتب الطراز…",year:"السنة *",category:"الفئة",dailyRate:"السعر اليومي (درهم) *",licensePlate:"رقم اللوحة *",vin:"رقم الهيكل",color:"اللون",select:"اختر…",typeColor:"اكتب اللون…",seats:"المقاعد",transmission:"ناقل الحركة",manual:"يدوي",automatic:"أوتوماتيكي",fuelType:"نوع الوقود",pickupLocations:"مواقع الاستلام",pickupLocationsPlaceholder:"مثال: مطار الدار البيضاء، وسط الدار البيضاء",dropoffLocations:"مواقع الإرجاع",dropoffLocationsPlaceholder:"مثال: وسط الرباط، مركز مراكش",locationHint:"افصل بين المواقع المتعددة بفواصل.",allowDifferentDropoff:"السماح بموقع إرجاع مختلف",dropoffLocationsRequired:"أضف موقع إرجاع واحداً على الأقل عند تفعيل الإرجاع المختلف.",sameDropoffOnly:"الإرجاع في نفس الموقع فقط",differentDropoffAvailable:"الإرجاع المختلف متاح",photosLabel:"الصور (حتى 10)",clickToAddPhotos:"انقر لإضافة صور",addMorePhotos:"إضافة المزيد من الصور",cancel:"إلغاء",adding:"جارٍ الإضافة…",addVehicle:"إضافة المركبة",heading:"الأسطول",vehicleCount:e=>`${e} مركبة إجمالاً`,searchPlaceholder:"بحث عن الماركة، الطراز، اللوحة…",categoryLabels:{ECONOMY:"اقتصادية",COMPACT:"مدمجة",MIDSIZE:"متوسطة",FULLSIZE:"كبيرة",SUV:"دفع رباعي",LUXURY:"فاخرة",VAN:"فان",TRUCK:"شاحنة"},fuelTypeLabels:{GASOLINE:"بنزين",DIESEL:"ديزل",ELECTRIC:"كهربائي",HYBRID:"هجين"},allStatuses:"جميع الحالات",allCategories:"جميع الفئات",allVisibility:"جميع الرؤية",published:"منشور",unpublished:"غير منشور",colVehicle:"المركبة",colCategory:"الفئة",colStatus:"الحالة",colDailyRate:"السعر اليومي",colPublished:"النشر",colActions:"الإجراءات",noPhoto:"لا توجد صورة",perDay:"/يوم",noVehicles:"لا توجد مركبات. أضف مركبتك الأولى للبدء.",noMatch:"لا توجد مركبات تطابق المرشحات."},vehicleDetail:{tabDetails:"التفاصيل",tabMaintenance:"الصيانة",tabCalendar:"التقويم",editBtn:"تعديل",cancelBtn:"إلغاء",saveBtn:"حفظ",savingBtn:"جارٍ الحفظ…",uploadingPhotosBtn:"جارٍ رفع الصور…",loadingVehicle:"جارٍ تحميل المركبة…",photosHeading:"الصور",noPhotosYet:"لم يتم إضافة أي صور.",clickToAddPhotos:"انقر لإضافة صور",addMorePhotos:e=>`إضافة المزيد من الصور (${e}/10)`,maxPhotosReached:"تم الوصول إلى الحد الأقصى (10 صور).",newPhotoBadge:"جديد",vehicleDetailsHeading:"تفاصيل المركبة",labelCategory:"الفئة",labelDailyRate:"السعر اليومي",labelStatus:"الحالة",labelSeats:"المقاعد",labelTransmission:"ناقل الحركة",labelFuelType:"نوع الوقود",labelColor:"اللون",labelOdometer:"عداد المسافة",labelNotes:"الملاحظات",makeLabel:"الماركة *",selectMake:"اختر الماركة…",other:"أخرى…",typeMake:"اكتب الماركة…",modelLabel:"الطراز *",selectModel:"اختر الطراز…",typeModel:"اكتب الطراز…",yearLabel:"السنة *",dailyRateLabel:"السعر اليومي (درهم) *",licensePlateLabel:"رقم اللوحة *",vinLabel:"رقم الهيكل",statusLabel:"الحالة",colorLabel:"اللون",selectColor:"اختر اللون…",typeColor:"اكتب اللون…",seatsLabel:"المقاعد",transmissionLabel:"ناقل الحركة",fuelTypeLabel:"نوع الوقود",odometerLabel:"عداد المسافة (كم)",notesLabel:"الملاحظات",optionalNotes:"ملاحظات اختيارية…",optional:"اختياري…",makeRequired:"الماركة مطلوبة.",modelRequired:"الطراز مطلوب.",plateRequired:"رقم اللوحة مطلوب.",rateInvalid:"يرجى إدخال سعر يومي صحيح.",failedSave:"فشل الحفظ.",maintenanceIntro:"تتبع صيانة هذه المركبة. انقر على سجّل لأي عنصر لتسجيل الخدمة.",logBtn:"سجّل",statusNone:"غير مسجل",statusOverdue:"متأخر",statusDueSoon:"قريباً",statusOk:"محدّث",noRecord:"لا يوجد سجل",lastPrefix:"آخر:",atKm:e=>`عند ${e} كم`,duePrefix:"· الموعد:",orSep:"أو",kmLeft:e=>`${e} كم متبقية`,overdueByKm:"تجاوز المسافة",serviceDateLabel:"تاريخ الخدمة *",odometerAtService:"قراءة العداد عند الخدمة (كم)",nextDueDateLabel:"تاريخ الخدمة القادمة",nextDueKmLabel:"المسافة عند الخدمة القادمة (كم)",costLabel:"التكلفة (درهم)",maintenanceNotesLabel:"الملاحظات",saveLabel:"حفظ",savingLabel:"جارٍ الحفظ…",dateRequired:"تاريخ الخدمة مطلوب.",routineTypes:{"Oil Change":"تغيير الزيت","Technical Inspection":"الفحص التقني","Vehicle Registration":"تسجيل المركبة","Car Tax":"الضريبة السنوية","Tire Rotation":"تدوير الإطارات","Brake Inspection":"فحص الفرامل","Air Filter":"فلتر الهواء","Cabin Filter":"فلتر المقصورة","Battery Check":"فحص البطارية","Belt / Chain Service":"خدمة السير / السلسلة","Coolant Flush":"تغيير سائل التبريد","Transmission Service":"خدمة ناقل الحركة"}},calendar:{heading:"تقويم التوفر",blockDates:"حجب التواريخ",clickSecondDay:e=>`انقر على يوم ثانٍ لتحديد نهاية الحجب (المختار: ${e})`,cancelSelection:"إلغاء",legendReserved:"محجوز",legendMaintenance:"صيانة",legendBlocked:"محجوب",legendAvailable:"متاح",failedLoad:"فشل تحميل التقويم",moreDays:e=>`+${e} أكثر`,reservationsThisMonth:"الحجوزات هذا الشهر",blocksAndMaintenance:"الحجب والصيانة",removeBlockConfirm:"حذف هذا الحجب؟",failedDeleteBlock:"فشل حذف الحجب",modalTitle:"حجب تواريخ المركبة",blockTypeLabel:"نوع الحجب",manualBlock:"حجب يدوي",maintenanceBlock:"صيانة",startDate:"تاريخ البداية",endDate:"تاريخ النهاية (غير شامل)",reasonLabel:"السبب",optional:"(اختياري)",reasonPlaceholderManual:"مثال: محجوز لشخص مميز، فعالية…",reasonPlaceholderMaintenance:"مثال: تغيير الزيت، تدوير الإطارات…",datesRequired:"تواريخ البداية والنهاية مطلوبة.",endAfterStart:"يجب أن يكون تاريخ النهاية بعد تاريخ البداية.",failedCreateBlock:"فشل إنشاء الحجب",cancel:"إلغاء",saveBlock:"حفظ",saving:"جارٍ الحفظ…",removeBlock:"حذف الحجب",dayHeaders:["أحد","اثن","ثلا","أرب","خمي","جمع","سبت"]},dashboardPage:{failedToLoad:"فشل تحميل لوحة التحكم",forbidden:"ليس لديك صلاحية الوصول إلى هذه الصفحة. يلزم دور المدير أو أعلى.",kpiTotalBookings:"إجمالي الحجوزات",kpiActiveVehicles:"المركبات النشطة",kpiMonthlyRevenue:"الإيرادات الشهرية",kpiTotalCustomers:"إجمالي العملاء",vsLastMonth:"مقارنة بالشهر الماضي",bookingSources:"مصادر الحجز",barBookings:"الحجوزات",barRevenue:"الإيرادات (درهم)",noBookingData:"لا توجد بيانات حجز متاحة بعد",quickStats:"إحصائيات سريعة",noData:"لا توجد بيانات",recentReservations:"الحجوزات الأخيرة",viewAll:"عرض الكل ←",colBookingNum:"الحجز #",colCustomer:"العميل",colVehicle:"المركبة",colDates:"التواريخ",colStatus:"الحالة",colTotal:"الإجمالي",noReservations:"لا توجد حجوزات بعد. ستظهر الحجوزات هنا عند قيام العملاء بالحجز.",trialEnds:e=>`أنت في فترة تجريبية. تنتهي في ${e}.`,trialActive:"أنت في فترة تجريبية مجانية.",pastDueMsg:"دفعتك متأخرة. يرجى تحديث معلومات الفوترة.",suspendedMsg:"تم تعليق حسابك. يرجى التواصل مع الدعم أو تجديد اشتراكك.",manageBilling:"إدارة الاشتراك ←",statusLabels:{CONFIRMED:"مؤكد",PENDING:"قيد الانتظار",ACTIVE:"نشط",COMPLETED:"مكتمل",CANCELLED:"ملغى"}},reservations:{heading:"الحجوزات",subtitle:"جميع مصادر الحجز: لوحة التحكم، الموقع العام، والسوق الإلكتروني.",colCustomer:"العميل",colVehicle:"المركبة",colDates:"التواريخ",colSource:"المصدر",colStatus:"الحالة",colTotal:"الإجمالي",noReservations:"لا توجد حجوزات بعد.",loadingReservation:"جارٍ تحميل الحجز…",failedToLoad:"فشل تحميل الحجز",confirmReservation:"تأكيد الحجز",checkInVehicle:"تسجيل الاستلام",checkOutVehicle:"تسجيل الإرجاع",working:"جارٍ التنفيذ…",failedConfirm:"فشل تأكيد الحجز",failedCheckIn:"فشل تسجيل الاستلام",failedCheckOut:"فشل تسجيل الإرجاع",sectionCustomer:"العميل",noPhone:"لم يُدخل رقم هاتف",licenseLabel:"الرخصة:",notCaptured:"غير مُسجّل",flaggedBadge:"مُبلَّغ عنه",sectionVehicle:"المركبة",sectionCharges:"الرسوم",chargeDiscount:"الخصم",chargeInsurance:"التأمين",chargeAdditionalDrivers:"السائقون الإضافيون",chargePricingAdjustments:"تعديلات التسعير",chargeGrandTotal:"الإجمالي الكلي",appliedInsurance:"التأمين المطبق",pricingRulesApplied:"قواعد التسعير المطبقة",sectionAdditionalDrivers:"السائقون الإضافيون",driverLicenseLabel:"الرخصة:",driverChargeLabel:"الرسوم:",approveBtn:"موافقة",approvedBadge:"مُوافَق عليه",noApprovalNeeded:"لا يحتاج موافقة",noAdditionalDrivers:"لم يتم إضافة سائقين إضافيين لهذا الحجز.",failedApproveDriver:"فشلت الموافقة على السائق الإضافي",sectionInspectionSummary:"ملخص الفحص",checkInInspectionLabel:"فحص الاستلام",checkOutInspectionLabel:"فحص الإرجاع",savedBadge:"محفوظ",pendingBadge:"معلّق",inspectionCardTitle:e=>"CHECKIN"===e?"فحص الاستلام":"فحص الإرجاع",inspectionSubtitle:"حدد الأضرار الموجودة والمكتشفة حديثاً مباشرة على مخطط المركبة.",saveInspection:"حفظ الفحص",savingInspection:"جارٍ الحفظ…",failedSaveInspection:"فشل حفظ الفحص",diagramHelp:"انقر في أي مكان على المخطط لإضافة علامة ضرر بالنوع والخطورة المحددين.",mileageLabel:"عداد المسافة",fuelLevelLabel:"مستوى الوقود",fuelLevels:{FULL:"ممتلئ",SEVEN_EIGHTHS:"7/8",THREE_QUARTERS:"3/4",FIVE_EIGHTHS:"5/8",HALF:"1/2",THREE_EIGHTHS:"3/8",QUARTER:"1/4",ONE_EIGHTH:"1/8",EMPTY:"فارغ"},generalConditionLabel:"الحالة العامة",employeeNotesLabel:"ملاحظات الموظف",customerAcknowledged:"وافق العميل على هذا الفحص",damageMarkersHeading:"علامات الضرر",removeMarker:"حذف",noMarkers:"لا توجد علامات ضرر محفوظة.",damageTypeLabels:{SCRATCH:"خدش",DENT:"انبعاج",CRACK:"تشقق",CHIP:"تقشر",MISSING:"مفقود",STAIN:"بقعة",OTHER:"أخرى"},severityLabels:{MINOR:"طفيف",MODERATE:"متوسط",MAJOR:"شديد"}}}},v=(0,a.createContext)(null),b="dashboard-language";function f(e){return"fr"===e||"ar"===e||"en"===e?e:"en"}function k(){let e=(0,a.useContext)(v);if(!e)throw Error("useDashboardI18n must be used within DashboardI18nProvider");return e}e.s(["DashboardI18nProvider",0,function({children:e,initialLanguage:r="en"}){let[l,s]=(0,a.useState)(r),[c,d]=(0,a.useState)("light"),h=(0,a.useRef)(!1),k=(0,a.useRef)(!0);function C(e){e!==l&&("u">typeof document&&(document.documentElement.lang=e,document.documentElement.dir="ar"===e?"rtl":"ltr",p(n,e,[b]),document.cookie=`${o}=${e}; path=/; max-age=31536000; samesite=lax`,document.cookie=`${b}=${e}; path=/; max-age=31536000; samesite=lax`),s(e))}function L(e){e!==c&&("u">typeof document&&(document.documentElement.classList.remove("light","dark"),document.documentElement.classList.add("light"===e?"light":"dark"),document.documentElement.style.colorScheme="light"===e?"light":"dark",document.body.dataset.theme=e,p(i,e,["dashboard-theme"])),d(e))}(0,a.useEffect)(()=>{let e=m(n,[b]);if(null!==e){let t=f(e);t!==l&&s(t)}else{let e=function(){if("u"<typeof navigator)return null;for(let e of Array.from(navigator.languages??[navigator.language])){let t=e.split("-")[0].toLowerCase();if("fr"===t||"ar"===t||"en"===t)return t}return null}();e&&e!==l&&s(e)}},[]),(0,a.useEffect)(()=>{let e=m(i,["dashboard-theme"]);if("light"===e||"dark"===e){e!==c&&d(e);return}window.matchMedia("(prefers-color-scheme: dark)").matches&&"dark"!==c&&d("dark")},[]),(0,a.useEffect)(()=>{if(document.documentElement.lang=l,document.documentElement.dir="ar"===l?"rtl":"ltr",k.current){k.current=!1;return}p(n,l,[b]),document.cookie=`${o}=${l}; path=/; max-age=31536000; samesite=lax`,document.cookie=`${b}=${l}; path=/; max-age=31536000; samesite=lax`},[l]),(0,a.useEffect)(()=>{if(!h.current){h.current=!0;return}document.documentElement.classList.remove("light","dark"),document.documentElement.classList.add("light"===c?"light":"dark"),document.documentElement.style.colorScheme="light"===c?"light":"dark",document.body.dataset.theme=c,p(i,c,["dashboard-theme"])},[c]),(0,a.useEffect)(()=>{function e(){let e=u(n),t=u(i);if(e){let t=f(e);t!==l&&s(t)}else{let e=m(n,[b]),t=e?f(e):l;t!==l&&s(t),p(n,t,[b])}"light"===t||"dark"===t?t!==c&&d(t):p(i,c,["dashboard-theme"])}return window.addEventListener("rentaldrivego:auth-changed",e),()=>window.removeEventListener("rentaldrivego:auth-changed",e)},[l,c]);let E=(0,a.useMemo)(()=>({language:l,setLanguage:C,theme:c,setTheme:L,dict:g[l]}),[l,c]);return(0,t.jsx)(v.Provider,{value:E,children:e})},"DashboardLanguageSwitcher",0,function(){let{language:e,setLanguage:o}=k(),[n,i]=(0,a.useState)(!1),[r,l]=(0,a.useState)(!1),s=(0,a.useRef)(null);if((0,a.useEffect)(()=>{l(window.self!==window.top)},[]),(0,a.useEffect)(()=>{if(n)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e);function e(e){s.current&&!s.current.contains(e.target)&&i(!1)}},[n]),r)return null;let c={en:{flag:"🇺🇸",shortLabel:"EN"},fr:{flag:"🇫🇷",shortLabel:"FR"},ar:{flag:"🇲🇦",shortLabel:"AR"}},d=c[e];return(0,t.jsxs)("div",{ref:s,className:"relative flex-1",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>i(e=>!e),className:"flex w-full items-center justify-between gap-1.5 rounded-xl border border-stone-200/80 bg-white/95 px-3 py-2 text-xs font-semibold text-stone-700 shadow-sm transition hover:bg-stone-50 dark:border-blue-800 dark:bg-blue-950/85 dark:text-stone-200 dark:hover:bg-blue-900/40",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("span",{"aria-hidden":"true",children:d.flag}),(0,t.jsx)("span",{children:d.shortLabel})]}),(0,t.jsx)("svg",{className:`h-3 w-3 text-stone-400 transition-transform dark:text-stone-500 ${n?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),n&&(0,t.jsx)("div",{className:"absolute bottom-full left-0 mb-1.5 w-full overflow-hidden rounded-xl border border-stone-200/80 bg-white shadow-lg dark:border-blue-800 dark:bg-blue-950",children:["en","fr","ar"].map(a=>{let n=c[a],r=a===e;return(0,t.jsxs)("button",{type:"button",onClick:()=>{o(a),(0,h.apiFetch)("/auth/employee/me/language",{method:"PATCH",body:JSON.stringify({language:a})}).catch(()=>{}),i(!1)},className:`flex w-full items-center gap-2 px-3 py-2 text-xs font-semibold transition-colors ${r?"bg-blue-900 text-white dark:bg-orange-500 dark:text-white":"text-stone-700 hover:bg-stone-100 dark:text-stone-200 dark:hover:bg-blue-900/40"}`,children:[(0,t.jsx)("span",{"aria-hidden":"true",children:n.flag}),(0,t.jsx)("span",{children:n.shortLabel})]},a)})})]})},"DashboardThemeSwitcher",0,function(){let{theme:e,setTheme:o,dict:n}=k(),[i,r]=(0,a.useState)(!1),[l,s]=(0,a.useState)(!1),c=(0,a.useRef)(null);return((0,a.useEffect)(()=>{s(window.self!==window.top)},[]),(0,a.useEffect)(()=>{if(i)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e);function e(e){c.current&&!c.current.contains(e.target)&&r(!1)}},[i]),l)?null:(0,t.jsxs)("div",{ref:c,className:"relative flex-1",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>r(e=>!e),className:"flex w-full items-center justify-between gap-1.5 rounded-xl border border-stone-200/80 bg-white/95 px-3 py-2 text-xs font-semibold text-stone-700 shadow-sm transition hover:bg-stone-50 dark:border-blue-800 dark:bg-blue-950/85 dark:text-stone-200 dark:hover:bg-blue-900/40",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:["light"===e?(0,t.jsx)("svg",{className:"h-3.5 w-3.5 text-orange-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"})}):(0,t.jsx)("svg",{className:"h-3.5 w-3.5 text-blue-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"})}),(0,t.jsx)("span",{children:"light"===e?n.light:n.dark})]}),(0,t.jsx)("svg",{className:`h-3 w-3 text-stone-400 transition-transform dark:text-stone-500 ${i?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),i&&(0,t.jsx)("div",{className:"absolute bottom-full left-0 mb-1.5 w-full overflow-hidden rounded-xl border border-stone-200/80 bg-white shadow-lg dark:border-blue-800 dark:bg-blue-950",children:["light","dark"].map(a=>{let i=a===e;return(0,t.jsxs)("button",{type:"button",onClick:()=>{o(a),r(!1)},className:`flex w-full items-center gap-2 px-3 py-2 text-xs font-semibold transition-colors ${i?"bg-blue-900 text-white dark:bg-orange-500 dark:text-white":"text-stone-700 hover:bg-stone-100 dark:text-stone-200 dark:hover:bg-blue-900/40"}`,children:["light"===a?(0,t.jsx)("svg",{className:"h-3.5 w-3.5 text-orange-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"})}):(0,t.jsx)("svg",{className:"h-3.5 w-3.5 text-blue-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"})}),(0,t.jsx)("span",{children:"light"===a?n.light:n.dark})]},a)})})]})},"useDashboardI18n",0,k],56322)}]);