@polycyphers/bim 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));let c=require("react");c=s(c,1);let l=require("dompurify");l=s(l,1);let u=require("react/jsx-runtime"),d=require("@polycyphers/license");var f={studio:`Open studio`,pricing:`Pricing`,start:`Start with your sketch`,eyebrow:`FROM YOUR FIRST IDEA`,hero:`Room for a better idea.`,intro:`Turn a sketch into thoughtful layouts. Explore the possibilities, refine the details, and take your chosen plan into BIM.`,try:`Explore a real example`,upload:`Upload a sketch`,steps:[`Your sketch`,`Measured footprint`,`Layout proposals`,`Your BIM model`],workspace:`Apartment concept`,example:`Reference project · site-confirmed geometry`,measure:`Measurements`,proposals:`Proposals`,refine:`Refine`,download:`Download`,back:`All projects`,generate:`Generate layouts`,generating:`Checking your layout…`,area:`Wall-axis area`,net:`Clear net area`,perimeter:`Perimeter`,recommended:`Recommended`,checks:`Rule checks`,schedule:`Room schedule`,tradeoffs:`The trade-offs`,send:`Preview edit`,chat:`What would you like to change?`,hint:`Try: “Make the bedroom 3.20 wide”`,save:`Apply measurements`,undo:`Undo`,delete:`Delete project data`,export:`Build & download model`,loading:`Loading…`,select:`Choose this layout`,warning:`Needs review`,pass:`Checked`,notes:`Source notes`,confirm:`Confirm the measurements before generating. The engine checks geometry; a sketch is not a survey.`,empty:`A little information. Better possibilities.`,emptyBody:`Upload a sketch for a local preview, then enter and confirm your measured walls and room programme. The engine checks every dimension.`,privacy:`Private project storage · configurable retention`,disclaimer:`Concept proposal, not a construction drawing; verify with a licensed architect/engineer.`,free:`Your configured free allowance is shown below.`,paid:`Project pricing is shown below.`,paidBody:`A project includes its layout proposals, chat refinements and BIM export, within the configured fair-use caps.`,before:`A sketch, with potential.`,after:`A plan, with purpose.`,downloadNote:`IFC4, DWG and DXF use the same checked scene. Revit and BIMcollab Zoom acceptance remains subject to actual viewer testing.`,language:`Language`,status:`Status`,width:`Width`,depth:`Depth`,signin:`Sign in`,email:`Email`,password:`Password`,account:`Account`,cancel:`Cancel`,close:`Close`},p={en:f,de:{...f,studio:`Studio öffnen`,pricing:`Preise`,start:`Mit Ihrer Skizze starten`,eyebrow:`VON DER ERSTEN IDEE`,hero:`Raum für eine bessere Idee.`,intro:`Aus Ihrer Skizze werden durchdachte Grundrisse. Vergleichen, verfeinern und als BIM-Konzept herunterladen.`,try:`Beispiel erkunden`,upload:`Skizze hochladen`,steps:[`Ihre Skizze`,`Gemessener Umriss`,`Grundrissvorschläge`,`Ihr BIM-Modell`],measure:`Maße`,proposals:`Vorschläge`,refine:`Verfeinern`,download:`Herunterladen`,generate:`Grundrisse erstellen`,save:`Maße anwenden`,checks:`Regelprüfung`,schedule:`Raumbuch`,tradeoffs:`Abwägungen`,send:`Änderung prüfen`,chat:`Was möchten Sie ändern?`,recommended:`Empfohlen`,select:`Grundriss wählen`,undo:`Rückgängig`,delete:`Projektdaten löschen`,export:`Modell erstellen und laden`,area:`Wandachsfläche`,net:`Lichte Nettofläche`,perimeter:`Umfang`,signin:`Anmelden`,email:`E-Mail`,password:`Passwort`,cancel:`Abbrechen`,close:`Schließen`},fr:{...f,studio:`Ouvrir le studio`,pricing:`Tarifs`,start:`Commencez par votre croquis`,eyebrow:`DE VOTRE PREMIÈRE IDÉE`,hero:`Place à une meilleure idée.`,intro:`Transformez un croquis en plans réfléchis. Comparez, affinez et emportez votre concept en BIM.`,try:`Explorer un exemple réel`,upload:`Importer un croquis`,steps:[`Votre croquis`,`Contour mesuré`,`Propositions`,`Votre modèle BIM`],measure:`Mesures`,proposals:`Propositions`,refine:`Affiner`,download:`Télécharger`,generate:`Générer les plans`,save:`Appliquer les mesures`,checks:`Règles vérifiées`,schedule:`Tableau des pièces`,tradeoffs:`Les compromis`,send:`Vérifier la modification`,chat:`Que souhaitez-vous modifier ?`,recommended:`Recommandé`,select:`Choisir ce plan`,undo:`Annuler`,delete:`Supprimer les données du projet`,export:`Créer et télécharger le modèle`,area:`Surface aux axes`,net:`Surface nette`,perimeter:`Périmètre`,signin:`Se connecter`,email:`E-mail`,password:`Mot de passe`,cancel:`Annuler`,close:`Fermer`},ar:{...f,studio:`فتح الاستوديو`,pricing:`الأسعار`,start:`ابدأ برسمك`,eyebrow:`من فكرتك الأولى`,hero:`مساحة لفكرة أفضل.`,intro:`حوّل رسمك إلى مخططات مدروسة. قارن الخيارات، حسّن التفاصيل، وحمّل نموذج BIM الذي تختاره.`,try:`استكشف مثالاً حقيقياً`,upload:`ارفع رسماً`,steps:[`رسمك`,`الأبعاد المؤكدة`,`مقترحات التخطيط`,`نموذج BIM`],measure:`الأبعاد`,proposals:`المقترحات`,refine:`تعديل`,download:`تحميل`,generate:`إنشاء المخططات`,save:`تطبيق الأبعاد`,checks:`فحص القواعد`,schedule:`جدول الغرف`,tradeoffs:`المفاضلات`,send:`معاينة التعديل`,chat:`ماذا تريد أن تعدّل؟`,recommended:`موصى به`,select:`اختر هذا المخطط`,undo:`تراجع`,delete:`حذف بيانات المشروع`,export:`إنشاء النموذج وتحميله`,area:`مساحة محاور الجدران`,net:`المساحة الصافية`,perimeter:`المحيط`,signin:`تسجيل الدخول`,email:`البريد الإلكتروني`,password:`كلمة المرور`,cancel:`إلغاء`,close:`إغلاق`}};Object.assign(p.de,{workspace:`Wohnungskonzept`,example:`Referenzprojekt · vor Ort bestätigte Geometrie`,back:`Alle Projekte`,generating:`Grundriss wird geprüft…`,hint:`Zum Beispiel: „Schlafzimmer 3,20 m breit machen“`,loading:`Laden…`,warning:`Prüfung erforderlich`,pass:`Geprüft`,notes:`Quellenhinweise`,confirm:`Maße vor der Erstellung bestätigen. Die Geometrieprüfung ersetzt kein Aufmaß.`,empty:`Wenige Angaben. Bessere Möglichkeiten.`,emptyBody:`Skizze lokal ansehen, dann gemessene Wände und Raumprogramm eingeben und prüfen. Die Engine kontrolliert jede Abmessung.`,privacy:`Privater Projektspeicher · konfigurierbare Aufbewahrung`,disclaimer:`Konzeptvorschlag, keine Ausführungszeichnung; durch zugelassene Architekten oder Ingenieure prüfen lassen.`,free:`Ihr konfiguriertes Freikontingent steht unten.`,paid:`Der Projektpreis steht unten.`,paidBody:`Ein Projekt umfasst Vorschläge, Chat-Änderungen und BIM-Export innerhalb der angezeigten Nutzungslimits.`,before:`Eine Skizze mit Potenzial.`,after:`Ein Plan mit Perspektive.`,downloadNote:`IFC4, DWG und DXF verwenden dieselbe geprüfte Szene. Die Freigabe für Revit und BIMcollab Zoom erfordert tatsächliche Viewer-Tests.`,language:`Sprache`,status:`Status`,width:`Breite`,depth:`Tiefe`,account:`Konto`}),Object.assign(p.fr,{workspace:`Concept d’appartement`,example:`Projet de référence · géométrie confirmée sur site`,back:`Tous les projets`,generating:`Vérification du plan…`,hint:`Exemple : « Donner 3,20 m de largeur à la chambre »`,loading:`Chargement…`,warning:`À vérifier`,pass:`Vérifié`,notes:`Notes sur les sources`,confirm:`Confirmez les dimensions avant de générer. Le contrôle géométrique ne remplace pas un relevé.`,empty:`Quelques informations. De meilleures possibilités.`,emptyBody:`Affichez un aperçu local du croquis, puis saisissez et vérifiez les murs mesurés et le programme. Le moteur contrôle chaque dimension.`,privacy:`Stockage privé · durée de conservation configurable`,disclaimer:`Proposition conceptuelle, non destinée à la construction ; à vérifier avec un architecte ou ingénieur habilité.`,free:`Votre quota gratuit configuré figure ci-dessous.`,paid:`Le tarif du projet figure ci-dessous.`,paidBody:`Un projet comprend les propositions, les modifications par chat et l’export BIM dans les limites affichées.`,before:`Un croquis prometteur.`,after:`Un plan qui prend forme.`,downloadNote:`IFC4, DWG et DXF utilisent la même scène vérifiée. La compatibilité avec Revit et BIMcollab Zoom reste soumise à des essais réels.`,language:`Langue`,status:`État`,width:`Largeur`,depth:`Profondeur`,account:`Compte`}),Object.assign(p.ar,{workspace:`تصوّر شقة`,example:`مشروع مرجعي · هندسة مؤكدة ميدانياً`,back:`كل المشاريع`,generating:`جارٍ فحص المخطط…`,hint:`مثال: «اجعل عرض غرفة النوم 3.20 م»`,loading:`جارٍ التحميل…`,warning:`يحتاج إلى مراجعة`,pass:`تم الفحص`,notes:`ملاحظات المصادر`,confirm:`أكّد الأبعاد قبل الإنشاء. فحص الهندسة لا يحل محل الرفع الميداني.`,empty:`معلومات قليلة. خيارات أفضل.`,emptyBody:`عاين الرسم محلياً، ثم أدخل أبعاد الجدران المقاسة وبرنامج الغرف وراجعها. يفحص المحرك كل بُعد.`,privacy:`تخزين خاص للمشروع · مدة احتفاظ قابلة للضبط`,disclaimer:`مقترح تصوّري وليس مخططاً تنفيذياً؛ يجب مراجعته مع مهندس أو معماري مرخّص.`,free:`تظهر حصتك المجانية المضبوطة أدناه.`,paid:`يظهر سعر المشروع أدناه.`,paidBody:`يشمل المشروع المقترحات وتعديلات المحادثة وتصدير BIM ضمن الحدود المعروضة.`,before:`رسم يحمل إمكانات.`,after:`مخطط واضح الهدف.`,downloadNote:`تستخدم IFC4 وDWG وDXF المشهد المفحوص نفسه. يبقى اعتماد Revit وBIMcollab Zoom رهن اختبار فعلي.`,language:`اللغة`,status:`الحالة`,width:`العرض`,depth:`العمق`,account:`الحساب`});var m={de:{"New project":`Neues Projekt`,"Enter measurements":`Maße eingeben`,"Resume saved project":`Gespeichertes Projekt öffnen`,"Measured footprint":`Gemessener Umriss`,"Length (m)":`Länge (m)`,"Bearing (°)":`Richtung (°)`,Wall:`Wand`,Exterior:`Außenwand`,"Party · no openings":`Brand-/Nachbarwand · keine Öffnungen`,"Add wall":`Wand hinzufügen`,"Remove last wall":`Letzte Wand entfernen`,"Room programme":`Raumprogramm`,"Bedroom width":`Schlafzimmerbreite`,"Bedroom depth":`Schlafzimmertiefe`,"Bathroom width":`Badbreite`,"Bathroom depth":`Badtiefe`,"Hall width":`Flurbreite`,"Wardrobe length":`Schranklänge`,"Balcony depth (0 for none)":`Balkontiefe (0 ohne Balkon)`,"Balcony sliding door width":`Breite der Balkonschiebetür`,"Entrance wall":`Eingangswand`,"Balcony wall":`Balkonwand`,"Choose a wall":`Wand wählen`,"Main view wall":`Wand zur Hauptaussicht`,"No preference":`Keine Präferenz`,"Clear ceiling height (m)":`Lichte Raumhöhe (m)`,Country:`Land`,"Check footprint & generate":`Umriss prüfen und erstellen`,"Attach sketch":`Skizze anhängen`,"Choose sketch image":`Skizzenbild wählen`,"Unsaved edit preview":`Nicht gespeicherte Änderungsvorschau`,"Apply as new version":`Als neue Version übernehmen`,"Discard preview":`Vorschau verwerfen`,"Create a verified account":`Verifiziertes Konto erstellen`,"Verify your email":`E-Mail bestätigen`,"Verification token":`Bestätigungscode`,"Send verification email":`Bestätigungs-E-Mail senden`,"Verify & set password":`Bestätigen und Passwort setzen`,"Create account":`Konto erstellen`,"Verify email":`E-Mail bestätigen`,"Sign in":`Anmelden`,"Value provenance & discrepancies":`Werteherkunft und Abweichungen`,"Discrepancy report":`Abweichungsbericht`},fr:{"New project":`Nouveau projet`,"Enter measurements":`Saisir les mesures`,"Resume saved project":`Reprendre le projet`,"Measured footprint":`Contour mesuré`,"Length (m)":`Longueur (m)`,"Bearing (°)":`Orientation (°)`,Wall:`Mur`,Exterior:`Extérieur`,"Party · no openings":`Mitoyen · sans ouverture`,"Add wall":`Ajouter un mur`,"Remove last wall":`Retirer le dernier mur`,"Room programme":`Programme des pièces`,"Bedroom width":`Largeur de chambre`,"Bedroom depth":`Profondeur de chambre`,"Bathroom width":`Largeur de salle de bains`,"Bathroom depth":`Profondeur de salle de bains`,"Hall width":`Largeur du dégagement`,"Wardrobe length":`Longueur du placard`,"Balcony depth (0 for none)":`Profondeur du balcon (0 sans balcon)`,"Balcony sliding door width":`Largeur de baie coulissante`,"Entrance wall":`Mur de l’entrée`,"Balcony wall":`Mur du balcon`,"Choose a wall":`Choisir un mur`,"Main view wall":`Mur vers la vue principale`,"No preference":`Sans préférence`,"Clear ceiling height (m)":`Hauteur libre (m)`,Country:`Pays`,"Check footprint & generate":`Vérifier le contour et générer`,"Attach sketch":`Joindre le croquis`,"Choose sketch image":`Choisir le croquis`,"Unsaved edit preview":`Aperçu non enregistré`,"Apply as new version":`Appliquer comme nouvelle version`,"Discard preview":`Abandonner l’aperçu`,"Create a verified account":`Créer un compte vérifié`,"Verify your email":`Vérifier votre e-mail`,"Verification token":`Code de vérification`,"Send verification email":`Envoyer l’e-mail de vérification`,"Verify & set password":`Vérifier et définir le mot de passe`,"Create account":`Créer un compte`,"Verify email":`Vérifier l’e-mail`,"Sign in":`Se connecter`,"Value provenance & discrepancies":`Origine des valeurs et écarts`,"Discrepancy report":`Rapport des écarts`},ar:{"New project":`مشروع جديد`,"Enter measurements":`أدخل الأبعاد`,"Resume saved project":`استئناف المشروع المحفوظ`,"Measured footprint":`المحيط المقاس`,"Length (m)":`الطول (م)`,"Bearing (°)":`الاتجاه (°)`,Wall:`الجدار`,Exterior:`خارجي`,"Party · no openings":`مشترك · بلا فتحات`,"Add wall":`إضافة جدار`,"Remove last wall":`حذف آخر جدار`,"Room programme":`برنامج الغرف`,"Bedroom width":`عرض غرفة النوم`,"Bedroom depth":`عمق غرفة النوم`,"Bathroom width":`عرض الحمام`,"Bathroom depth":`عمق الحمام`,"Hall width":`عرض الممر`,"Wardrobe length":`طول الخزانة`,"Balcony depth (0 for none)":`عمق الشرفة (0 بدون شرفة)`,"Balcony sliding door width":`عرض باب الشرفة المنزلق`,"Entrance wall":`جدار المدخل`,"Balcony wall":`جدار الشرفة`,"Choose a wall":`اختر جداراً`,"Main view wall":`جدار الإطلالة الرئيسية`,"No preference":`بلا تفضيل`,"Clear ceiling height (m)":`ارتفاع السقف الصافي (م)`,Country:`البلد`,"Check footprint & generate":`فحص المحيط وإنشاء المقترحات`,"Attach sketch":`إرفاق الرسم`,"Choose sketch image":`اختيار صورة الرسم`,"Unsaved edit preview":`معاينة تعديل غير محفوظ`,"Apply as new version":`تطبيق كإصدار جديد`,"Discard preview":`إلغاء المعاينة`,"Create a verified account":`إنشاء حساب موثّق`,"Verify your email":`تأكيد البريد الإلكتروني`,"Verification token":`رمز التحقق`,"Send verification email":`إرسال رسالة التحقق`,"Verify & set password":`تأكيد وتعيين كلمة المرور`,"Create account":`إنشاء حساب`,"Verify email":`تأكيد البريد`,"Sign in":`تسجيل الدخول`,"Value provenance & discrepancies":`مصادر القيم والفروقات`,"Discrepancy report":`تقرير الفروقات`}};Object.assign(m.de,{"Plan your next space":`Ihren nächsten Raum planen`,"Apartment layout":`Wohnungsgrundriss`,"House extension":`Hausanbau`,Renovation:`Renovierung`,"Account options":`Kontooptionen`,"Account actions":`Kontoaktionen`,"Delete project content":`Projektinhalte löschen`,"Sign out":`Abmelden`,"Before image upload":`Vor dem Bild-Upload`,"I have permission to use this image for this project.":`Ich darf dieses Bild für dieses Projekt verwenden.`,"I understand the AI image-processing disclosure above.":`Ich habe den obigen Hinweis zur KI-Bildverarbeitung verstanden.`,"What would you like to create?":`Was möchten Sie erstellen?`,"Upload for scanning":`Zur Sicherheitsprüfung hochladen`,"Remove local image":`Lokales Bild entfernen`,"What should the sketch reader focus on?":`Worauf soll die Skizzenanalyse achten?`,"Read saved sketch with AI · observations only":`Gespeicherte Skizze mit KI lesen · nur Beobachtungen`,"Recognized outline · estimated":`Erkannter Umriss · geschätzt`,"Preview recognized outline":`Erkannten Umriss ansehen`,"Local estimated preview only. The saved project is unchanged.":`Nur lokale Schätzvorschau. Das gespeicherte Projekt bleibt unverändert.`,"Sketch observations to confirm":`Zu prüfende Skizzenbeobachtungen`,"Required layout checks passed":`Erforderliche Grundrissprüfungen bestanden`,"Reference sources remain visible below.":`Referenzquellen stehen weiterhin unten.`,"Project billing":`Projektabrechnung`,"Continue to Stripe":`Weiter zu Stripe`,"Refresh project quote":`Projektangebot aktualisieren`,"View project price":`Projektpreis ansehen`,"Purchases are not enabled in this environment.":`Käufe sind in dieser Umgebung deaktiviert.`,"2D concept drawings":`2D-Konzeptzeichnungen`,"Prepare PDF / editable DXF / SVG":`PDF / bearbeitbares DXF / SVG vorbereiten`,Room:`Raum`,"Axis m²":`Achsfläche m²`,"Net m²":`Netto m²`,Total:`Summe`,Hide:`Ausblenden`,"Saved project files · download without a new export":`Gespeicherte Projektdateien · ohne neuen Export laden`,"Use saved sketch":`Gespeicherte Skizze verwenden`,"Allow optional visit and paywall analytics":`Optionale Besuchs- und Bezahlschrankenanalyse erlauben`,"Delete all project content?":`Alle Projektinhalte löschen?`,"Delete my project content":`Meine Projektinhalte löschen`,Cancel:`Abbrechen`,"Every supplied value and its source":`Alle angegebenen Werte und ihre Quellen`,"No discrepancies reported by the engine.":`Keine Abweichungen von der Engine gemeldet.`,"Discrepancy report unavailable.":`Abweichungsbericht nicht verfügbar.`,Value:`Wert`,"Origin / evidence":`Herkunft / Nachweis`,Source:`Quelle`,estimated:`geschätzt`,"user-given":`Nutzereingabe`,measured:`gemessen`,calculated:`berechnet`,unconfirmed:`unbestätigt`,"reviewed evidence":`geprüfter Nachweis`,unlabelled:`ohne Herkunft`,Unknown:`Unbekannt`,"Requested dimensions. Every value is checked by the shared engine.":`Gewünschte Maße. Jeder Wert wird von der gemeinsamen Engine geprüft.`,"I confirm these measured dimensions and angle assumptions.":`Ich bestätige diese gemessenen Maße und Winkelannahmen.`,"Your measurements define the plan.":`Ihre Maße bestimmen den Plan.`,"Local image preview. No dimensions are inferred from this display.":`Lokale Bildvorschau. Aus dieser Anzeige werden keine Maße abgeleitet.`,"Attach your sketch for reference. There is no sample footprint hidden behind this form.":`Skizze als Referenz anhängen. Hinter diesem Formular liegt kein versteckter Beispielumriss.`,"The service scans and normalizes the image before storing it. Selecting a file alone does not send it to an AI provider. “Read saved sketch” sends the sanitized image to Anthropic Claude only when you request that step. EU storage is separate from inference location; provider region and data-processing terms require service configuration.":`Der Dienst prüft und normalisiert das Bild vor der Speicherung. Die Dateiauswahl allein sendet es nicht an einen KI-Anbieter. Erst die angeforderte Skizzenanalyse übermittelt das bereinigte Bild an Anthropic Claude. EU-Speicherung bestimmt nicht den Ort der KI-Verarbeitung; Anbieterregion und Datenschutzbedingungen müssen konfiguriert werden.`,"Reading sends this sanitized image to Anthropic Claude. EU storage and provider inference location are separate; provider data-processing terms must be configured by the service.":`Die Analyse sendet dieses bereinigte Bild an Anthropic Claude. EU-Speicherung und KI-Verarbeitungsort sind getrennt; der Dienst muss die Datenschutzbedingungen konfigurieren.`,"This requests removal of your projects, sketches and generated files in this service. Account identity, billing and required anti-abuse records are retained. Pending accounting may delay completion; we show the service's result.":`Damit wird die Löschung Ihrer Projekte, Skizzen und erzeugten Dateien in diesem Dienst angefordert. Kontoidentität, Abrechnungsdaten und notwendige Missbrauchsschutzdaten bleiben erhalten. Offene Abrechnung kann den Abschluss verzögern; das Ergebnis des Dienstes wird angezeigt.`}),Object.assign(m.fr,{"Plan your next space":`Préparez votre prochain espace`,"Apartment layout":`Plan d’appartement`,"House extension":`Extension de maison`,Renovation:`Rénovation`,"Account options":`Options du compte`,"Account actions":`Actions du compte`,"Delete project content":`Supprimer le contenu des projets`,"Sign out":`Se déconnecter`,"Before image upload":`Avant l’envoi de l’image`,"I have permission to use this image for this project.":`Je dispose de l’autorisation d’utiliser cette image pour ce projet.`,"I understand the AI image-processing disclosure above.":`J’ai compris les informations ci-dessus sur le traitement des images par IA.`,"What would you like to create?":`Que souhaitez-vous créer ?`,"Upload for scanning":`Envoyer pour contrôle de sécurité`,"Remove local image":`Retirer l’image locale`,"What should the sketch reader focus on?":`Sur quoi la lecture du croquis doit-elle porter ?`,"Read saved sketch with AI · observations only":`Lire le croquis enregistré par IA · observations seules`,"Recognized outline · estimated":`Contour reconnu · estimé`,"Preview recognized outline":`Prévisualiser le contour reconnu`,"Local estimated preview only. The saved project is unchanged.":`Aperçu estimé local uniquement. Le projet enregistré est inchangé.`,"Sketch observations to confirm":`Observations du croquis à confirmer`,"Required layout checks passed":`Contrôles requis du plan réussis`,"Reference sources remain visible below.":`Les sources de référence restent visibles ci-dessous.`,"Project billing":`Facturation du projet`,"Continue to Stripe":`Continuer vers Stripe`,"Refresh project quote":`Actualiser le devis du projet`,"View project price":`Voir le prix du projet`,"Purchases are not enabled in this environment.":`Les achats ne sont pas activés dans cet environnement.`,"2D concept drawings":`Dessins conceptuels 2D`,"Prepare PDF / editable DXF / SVG":`Préparer PDF / DXF modifiable / SVG`,Room:`Pièce`,"Axis m²":`Surface aux axes m²`,"Net m²":`Nette m²`,Total:`Total`,Hide:`Masquer`,"Saved project files · download without a new export":`Fichiers enregistrés · télécharger sans nouvel export`,"Use saved sketch":`Utiliser le croquis enregistré`,"Allow optional visit and paywall analytics":`Autoriser les statistiques facultatives de visite et de paiement`,"Delete all project content?":`Supprimer tout le contenu des projets ?`,"Delete my project content":`Supprimer le contenu de mes projets`,Cancel:`Annuler`,"Every supplied value and its source":`Chaque valeur fournie et sa source`,"No discrepancies reported by the engine.":`Aucun écart signalé par le moteur.`,"Discrepancy report unavailable.":`Rapport des écarts indisponible.`,Value:`Valeur`,"Origin / evidence":`Origine / preuve`,Source:`Source`,estimated:`estimé`,"user-given":`fourni par l’utilisateur`,measured:`mesuré`,calculated:`calculé`,unconfirmed:`non confirmé`,"reviewed evidence":`preuve vérifiée`,unlabelled:`sans origine`,Unknown:`Inconnu`,"Requested dimensions. Every value is checked by the shared engine.":`Dimensions demandées. Chaque valeur est contrôlée par le moteur partagé.`,"I confirm these measured dimensions and angle assumptions.":`Je confirme ces dimensions mesurées et hypothèses d’angles.`,"Your measurements define the plan.":`Vos mesures définissent le plan.`,"Local image preview. No dimensions are inferred from this display.":`Aperçu local de l’image. Aucune dimension n’est déduite de cet affichage.`,"Attach your sketch for reference. There is no sample footprint hidden behind this form.":`Joignez votre croquis comme référence. Aucun contour exemple n’est caché dans ce formulaire.`,"The service scans and normalizes the image before storing it. Selecting a file alone does not send it to an AI provider. “Read saved sketch” sends the sanitized image to Anthropic Claude only when you request that step. EU storage is separate from inference location; provider region and data-processing terms require service configuration.":`Le service contrôle et normalise l’image avant stockage. La sélection d’un fichier ne l’envoie pas à un fournisseur d’IA. Seule la lecture explicitement demandée transmet l’image assainie à Anthropic Claude. Le stockage dans l’UE ne détermine pas le lieu d’inférence ; la région du fournisseur et les conditions de traitement doivent être configurées.`,"Reading sends this sanitized image to Anthropic Claude. EU storage and provider inference location are separate; provider data-processing terms must be configured by the service.":`La lecture transmet cette image assainie à Anthropic Claude. Le stockage dans l’UE et le lieu d’inférence sont distincts ; le service doit configurer les conditions de traitement.`,"This requests removal of your projects, sketches and generated files in this service. Account identity, billing and required anti-abuse records are retained. Pending accounting may delay completion; we show the service's result.":`Cette demande concerne les projets, croquis et fichiers générés dans ce service. L’identité du compte, la facturation et les données anti-abus nécessaires sont conservées. Une comptabilisation en attente peut retarder la suppression ; le résultat du service sera affiché.`}),Object.assign(m.ar,{"Plan your next space":`خطّط لمساحتك القادمة`,"Apartment layout":`تخطيط شقة`,"House extension":`توسعة منزل`,Renovation:`تجديد`,"Account options":`خيارات الحساب`,"Account actions":`إجراءات الحساب`,"Delete project content":`حذف محتوى المشاريع`,"Sign out":`تسجيل الخروج`,"Before image upload":`قبل رفع الصورة`,"I have permission to use this image for this project.":`لدي إذن باستخدام هذه الصورة لهذا المشروع.`,"I understand the AI image-processing disclosure above.":`أفهم توضيح معالجة الصورة بالذكاء الاصطناعي أعلاه.`,"What would you like to create?":`ماذا تريد إنشاءه؟`,"Upload for scanning":`رفع للفحص الأمني`,"Remove local image":`إزالة الصورة المحلية`,"What should the sketch reader focus on?":`على ماذا يجب أن تركز قراءة الرسم؟`,"Read saved sketch with AI · observations only":`قراءة الرسم المحفوظ بالذكاء الاصطناعي · ملاحظات فقط`,"Recognized outline · estimated":`المحيط المستخرج · تقديري`,"Preview recognized outline":`معاينة المحيط المستخرج`,"Local estimated preview only. The saved project is unchanged.":`معاينة تقديرية محلية فقط. المشروع المحفوظ لم يتغير.`,"Sketch observations to confirm":`ملاحظات الرسم المطلوب مراجعتها`,"Required layout checks passed":`اجتازت اختبارات التخطيط المطلوبة`,"Reference sources remain visible below.":`تبقى المصادر المرجعية ظاهرة أدناه.`,"Project billing":`فواتير المشروع`,"Continue to Stripe":`المتابعة إلى Stripe`,"Refresh project quote":`تحديث عرض سعر المشروع`,"View project price":`عرض سعر المشروع`,"Purchases are not enabled in this environment.":`عمليات الشراء غير مفعّلة في هذه البيئة.`,"2D concept drawings":`رسومات تصوّرية ثنائية الأبعاد`,"Prepare PDF / editable DXF / SVG":`إعداد PDF / DXF قابل للتحرير / SVG`,Room:`الغرفة`,"Axis m²":`مساحة المحاور م²`,"Net m²":`الصافي م²`,Total:`المجموع`,Hide:`إخفاء`,"Saved project files · download without a new export":`ملفات المشروع المحفوظة · تحميل دون تصدير جديد`,"Use saved sketch":`استخدام الرسم المحفوظ`,"Allow optional visit and paywall analytics":`السماح بتحليلات الزيارة والدفع الاختيارية`,"Delete all project content?":`حذف محتوى جميع المشاريع؟`,"Delete my project content":`حذف محتوى مشاريعي`,Cancel:`إلغاء`,"Every supplied value and its source":`كل قيمة واردة ومصدرها`,"No discrepancies reported by the engine.":`لم يبلغ المحرك عن اختلافات.`,"Discrepancy report unavailable.":`تقرير الفروقات غير متاح.`,Value:`القيمة`,"Origin / evidence":`المصدر / الدليل`,Source:`المرجع`,estimated:`تقديري`,"user-given":`أدخله المستخدم`,measured:`مقاس`,calculated:`محسوب`,unconfirmed:`غير مؤكّد`,"reviewed evidence":`دليل مُراجع`,unlabelled:`بلا مصدر`,Unknown:`غير معروف`,"Requested dimensions. Every value is checked by the shared engine.":`الأبعاد المطلوبة. يفحص المحرك المشترك كل قيمة.`,"I confirm these measured dimensions and angle assumptions.":`أؤكّد هذه الأبعاد المقاسة وافتراضات الزوايا.`,"Your measurements define the plan.":`أبعادك تحدد المخطط.`,"Local image preview. No dimensions are inferred from this display.":`معاينة محلية للصورة. لا تُستنتج أبعاد من هذا العرض.`,"Attach your sketch for reference. There is no sample footprint hidden behind this form.":`أرفق رسمك كمرجع. لا يوجد محيط نموذجي مخفي خلف هذا النموذج.`,"The service scans and normalizes the image before storing it. Selecting a file alone does not send it to an AI provider. “Read saved sketch” sends the sanitized image to Anthropic Claude only when you request that step. EU storage is separate from inference location; provider region and data-processing terms require service configuration.":`يفحص النظام الصورة ويوحّد تنسيقها قبل التخزين. اختيار الملف وحده لا يرسله إلى مزوّد ذكاء اصطناعي. تُرسل الصورة المنقّحة إلى Anthropic Claude فقط عند طلب قراءة الرسم المحفوظ. التخزين الأوروبي مستقل عن موقع المعالجة؛ يجب ضبط منطقة المزوّد وشروط معالجة البيانات.`,"Reading sends this sanitized image to Anthropic Claude. EU storage and provider inference location are separate; provider data-processing terms must be configured by the service.":`ترسل القراءة هذه الصورة المنقّحة إلى Anthropic Claude. التخزين الأوروبي وموقع المعالجة مستقلان؛ يجب أن يضبط النظام شروط معالجة البيانات.`,"This requests removal of your projects, sketches and generated files in this service. Account identity, billing and required anti-abuse records are retained. Pending accounting may delay completion; we show the service's result.":`يطلب هذا حذف المشاريع والرسوم والملفات الناتجة في هذه الخدمة. تبقى هوية الحساب والفواتير وسجلات مكافحة الإساءة الضرورية محفوظة. قد تؤخر المحاسبة المعلّقة الإتمام؛ نعرض نتيجة الخدمة.`}),Object.assign(m.de,{"Verifying component license…":`Komponentenlizenz wird geprüft…`,"A valid component license is required":`Eine gültige Komponentenlizenz ist erforderlich`,"The studio stays closed until its installation license and signed revocation status are verified.":`Das Studio bleibt geschlossen, bis Installationslizenz und signierter Sperrstatus geprüft sind.`,"Check license again":`Lizenz erneut prüfen`,"License management":`Lizenzverwaltung`}),Object.assign(m.fr,{"Verifying component license…":`Vérification de la licence du composant…`,"A valid component license is required":`Une licence valide du composant est requise`,"The studio stays closed until its installation license and signed revocation status are verified.":`Le studio reste fermé tant que la licence d’installation et son état de révocation signé ne sont pas vérifiés.`,"Check license again":`Vérifier à nouveau la licence`,"License management":`Gestion des licences`}),Object.assign(m.ar,{"Verifying component license…":`جارٍ التحقق من ترخيص المكوّن…`,"A valid component license is required":`يلزم ترخيص صالح للمكوّن`,"The studio stays closed until its installation license and signed revocation status are verified.":`يبقى الاستوديو مغلقاً حتى التحقق من ترخيص التثبيت وحالة الإلغاء الموقّعة.`,"Check license again":`إعادة فحص الترخيص`,"License management":`إدارة التراخيص`}),Object.assign(m.de,{"No layout proposal is available":`Kein Grundrissvorschlag verfügbar`,"Your measurements are retained. Review the engine findings and measurements before trying again.":`Ihre Maße bleiben erhalten. Prüfen Sie die Hinweise der Engine und die Maße vor einem neuen Versuch.`,"Review measurements":`Maße überprüfen`}),Object.assign(m.fr,{"No layout proposal is available":`Aucune proposition de plan disponible`,"Your measurements are retained. Review the engine findings and measurements before trying again.":`Vos mesures sont conservées. Vérifiez les observations du moteur et les mesures avant de réessayer.`,"Review measurements":`Vérifier les mesures`}),Object.assign(m.ar,{"No layout proposal is available":`لا يتوفر مقترح مخطط`,"Your measurements are retained. Review the engine findings and measurements before trying again.":`تبقى أبعادك محفوظة. راجع ملاحظات المحرك والأبعاد قبل المحاولة مجدداً.`,"Review measurements":`مراجعة الأبعاد`}),Object.assign(m.de,{"Saved as a new version. Earlier versions are unchanged.":`Als neue Version gespeichert. Frühere Versionen bleiben unverändert.`,"Hide version history":`Versionsverlauf ausblenden`,"Version history & compare":`Versionsverlauf und Vergleich`,"Saved versions":`Gespeicherte Versionen`,"History and comparison are read-only. Restoring creates a new version after the service checks the current version.":`Verlauf und Vergleich sind schreibgeschützt. Eine Wiederherstellung erstellt nach Prüfung der aktuellen Version eine neue Version.`,"Earlier version":`Frühere Version`,"Later version":`Spätere Version`,"Compare saved versions":`Gespeicherte Versionen vergleichen`,"Restore earlier version":`Frühere Version wiederherstellen`,"Footprint area change":`Änderung der Grundfläche`,"Engine comparison of saved inputs. Source measurements retain their uncertainty.":`Engine-Vergleich gespeicherter Eingaben. Die Ausgangsmaße behalten ihre Unsicherheit.`,"Selected layout":`Gewählter Grundriss`,"Changed inputs":`Geänderte Eingaben`,"No input changes reported.":`Keine geänderten Eingaben gemeldet.`}),Object.assign(m.fr,{"Saved as a new version. Earlier versions are unchanged.":`Enregistré comme nouvelle version. Les versions précédentes restent inchangées.`,"Hide version history":`Masquer l’historique`,"Version history & compare":`Historique et comparaison`,"Saved versions":`Versions enregistrées`,"History and comparison are read-only. Restoring creates a new version after the service checks the current version.":`L’historique et la comparaison sont en lecture seule. La restauration crée une nouvelle version après contrôle de la version actuelle.`,"Earlier version":`Version précédente`,"Later version":`Version suivante`,"Compare saved versions":`Comparer les versions enregistrées`,"Restore earlier version":`Restaurer la version précédente`,"Footprint area change":`Variation de surface du contour`,"Engine comparison of saved inputs. Source measurements retain their uncertainty.":`Comparaison des entrées enregistrées par le moteur. Les mesures sources conservent leur incertitude.`,"Selected layout":`Plan sélectionné`,"Changed inputs":`Entrées modifiées`,"No input changes reported.":`Aucune modification des entrées signalée.`}),Object.assign(m.ar,{"Saved as a new version. Earlier versions are unchanged.":`حُفظ كنسخة جديدة. تبقى النسخ السابقة دون تغيير.`,"Hide version history":`إخفاء سجل النسخ`,"Version history & compare":`سجل النسخ والمقارنة`,"Saved versions":`النسخ المحفوظة`,"History and comparison are read-only. Restoring creates a new version after the service checks the current version.":`السجل والمقارنة للقراءة فقط. تنشئ الاستعادة نسخة جديدة بعد تحقق النظام من النسخة الحالية.`,"Earlier version":`النسخة السابقة`,"Later version":`النسخة اللاحقة`,"Compare saved versions":`مقارنة النسخ المحفوظة`,"Restore earlier version":`استعادة النسخة السابقة`,"Footprint area change":`تغيّر مساحة المحيط`,"Engine comparison of saved inputs. Source measurements retain their uncertainty.":`مقارنة المحرك للمدخلات المحفوظة. تبقى أبعاد المصدر غير مؤكدة.`,"Selected layout":`المخطط المختار`,"Changed inputs":`المدخلات المتغيّرة`,"No input changes reported.":`لم تُسجّل تغييرات في المدخلات.`});function h(e,t){return e===`en`?t:m[e][t]??t}function g({language:e,version:t,busy:n,preview:r,open:i,versions:a,comparison:o,left:s,right:c,onToggle:l,onLeftChange:d,onRightChange:f,onCompare:p,onRestore:m}){let g=a?.some(e=>e.version===s),_=a?.some(e=>e.version===c);return(0,u.jsxs)(`section`,{className:`paper version-history`,children:[(0,u.jsx)(`button`,{className:`outline`,disabled:n,"aria-expanded":i,"aria-controls":`bim-version-history`,onClick:l,children:h(e,i?`Hide version history`:`Version history & compare`)}),i&&a&&(0,u.jsxs)(`div`,{id:`bim-version-history`,children:[(0,u.jsx)(`h3`,{children:h(e,`Saved versions`)}),(0,u.jsx)(`p`,{children:h(e,`History and comparison are read-only. Restoring creates a new version after the service checks the current version.`)}),(0,u.jsx)(`ul`,{children:a.map(t=>(0,u.jsxs)(`li`,{children:[(0,u.jsxs)(`strong`,{children:[`v`,t.version]}),` · `,new Date(t.createdAtUtc).toLocaleString(e),t.selectedProposalId?` · `+t.selectedProposalId:``,t.note?` · `+t.note:``]},t.version))}),(0,u.jsxs)(`div`,{className:`actions`,children:[(0,u.jsxs)(`label`,{className:`field`,children:[h(e,`Earlier version`),(0,u.jsx)(`select`,{disabled:n,value:s,onChange:e=>d(Number(e.target.value)),children:a.map(e=>(0,u.jsxs)(`option`,{value:e.version,children:[`v`,e.version]},e.version))})]}),(0,u.jsxs)(`label`,{className:`field`,children:[h(e,`Later version`),(0,u.jsx)(`select`,{disabled:n,value:c,onChange:e=>f(Number(e.target.value)),children:a.map(e=>(0,u.jsxs)(`option`,{value:e.version,children:[`v`,e.version]},e.version))})]}),(0,u.jsx)(`button`,{className:`outline`,disabled:n||s===c||!g||!_,onClick:p,children:h(e,`Compare saved versions`)}),(0,u.jsx)(`button`,{className:`outline`,disabled:n||r||s===t||!g,onClick:m,children:h(e,`Restore earlier version`)})]}),o&&(0,u.jsxs)(`article`,{className:`comparison-summary`,role:`status`,children:[(0,u.jsxs)(`h4`,{children:[`v`,o.leftVersion,` → v`,o.rightVersion]}),o.areaDeltaM2!=null&&(0,u.jsxs)(`p`,{children:[h(e,`Footprint area change`),`: `,o.areaDeltaM2.toLocaleString(e,{maximumFractionDigits:4}),` m² `,(0,u.jsxs)(`small`,{className:`value-tag`,children:[h(e,`calculated`),` · `,h(e,`unconfirmed`)]})]}),(0,u.jsx)(`p`,{children:h(e,`Engine comparison of saved inputs. Source measurements retain their uncertainty.`)}),(0,u.jsxs)(`p`,{children:[h(e,`Selected layout`),`: `,o.leftProposalId??`—`,` → `,o.rightProposalId??`—`]}),(0,u.jsx)(`h4`,{children:h(e,`Changed inputs`)}),o.changedInputs.length?(0,u.jsx)(`ul`,{children:o.changedInputs.map((e,t)=>(0,u.jsx)(`li`,{children:e},t))}):(0,u.jsx)(`p`,{children:h(e,`No input changes reported.`)})]})]})]})}var _=`0.1.2`;(0,d.disableTelemetry)();var v=`bim`,y=_,ee=`https://licenseapi.polycyphers.com/api/license/revoked.json`,b=`polycyphers-revocation-list`,x=1048576,te=86400,ne=6e4,S=``,re=0,C=`not_set`,w=null,T=null,E=new Set;function ie(e){(0,d.setBrand)(e===`karamentreprises`?`karament`:null)}function D(e){let t=typeof e==`string`?e.trim():``;if(t!==S){S=t,re++,w=null,C=t?`checking`:`not_set`;for(let e of E)try{e()}catch{}}}function O(){D(``)}function ae(e){return E.add(e),()=>{E.delete(e)}}function oe(){return w?Date.now()>=w.expires?`expired`:Date.now()<w.until?w.status:`checking`:C}function se(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function k(e,t=256){return typeof e==`string`&&e.length>0&&e.length<=t&&!/[\u0000-\u001f\u007f]/.test(e)}function A(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>0}function ce(e){if(e.length>32768||!/^[-_A-Za-z0-9]+\.[-_A-Za-z0-9]+$/.test(e))return null;try{let t=Uint8Array.from(atob(e.split(`.`)[0].replace(/-/g,`+`).replace(/_/g,`/`)),e=>e.charCodeAt(0)),n=JSON.parse(new TextDecoder(`utf-8`,{fatal:!0}).decode(t));return se(n)?n:null}catch{return null}}function j(e){if(e===`*`)return!0;let t=e.split(`.`),n=y.split(`.`);return t.length<=3&&t.every((e,t)=>e===`x`||e===`*`||/^\d+$/.test(e)&&e===n[t])}function le(e){if(!k(e,253))return!1;let t=e.toLowerCase().replace(/^\*\./,``).replace(/^\./,``);return/^\[[0-9a-f:]+\]$/.test(t)||t.split(`.`).every(e=>/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/.test(e))}function ue(e,t){let n=e.toLowerCase();return n===t?!0:n.startsWith(`*.`)?t.endsWith(n.slice(1))&&t.length>n.length-1:n.startsWith(`.`)?t===n.slice(1)||t.endsWith(n):!1}async function de(e){if(!e.ok)throw Error(`License service unavailable`);let t=e.headers.get(`content-length`);if(t&&(!/^\d+$/.test(t)||Number(t)>x))throw Error(`License response too large`);if(!e.body)throw Error(`License response missing`);let n=e.body.getReader(),r=0,i=[];try{for(;;){let e=await n.read();if(e.done)break;if(r+=e.value.byteLength,r>x)throw Error(`License response too large`);i.push(e.value)}}finally{await n.cancel().catch(()=>{}),n.releaseLock()}let a=new Uint8Array(r),o=0;for(let e of i)a.set(e,o),o+=e.byteLength;return JSON.parse(new TextDecoder(`utf-8`,{fatal:!0}).decode(a))}async function fe(e,t){let n=new AbortController,r=setTimeout(()=>n.abort(),8e3);try{let r=await de(await fetch(ee,{credentials:`omit`,cache:`no-store`,redirect:`error`,signal:n.signal}));if(!se(r)||typeof r.token!=`string`||r.token.length>x||!A(r.iat)||!Array.isArray(r.revoked)||r.revoked.length>1e5||!r.revoked.every(e=>k(e,128)))throw Error(`Invalid revocation envelope`);let i=r.revoked,a=await(0,d.verifySystemMessage)(r.token,b,t);if(!a.ok)throw Error(`Invalid signed revocation list`);let o=a.payload;if(!A(o.iat)||!A(o.exp)||o.exp<=t||o.exp<=o.iat||o.exp-o.iat>te||o.iat>t+60||t-o.iat>te||o.iat!==r.iat||!Array.isArray(o.revoked)||o.revoked.length!==r.revoked.length||!o.revoked.every((e,t)=>k(e,128)&&e===i[t]))throw Error(`Stale or inconsistent revocation list`);return{revoked:r.revoked.includes(e),expires:Math.min(o.exp,o.iat+te)*1e3}}finally{clearTimeout(r)}}async function pe(e=!1){let t=oe();if(!e&&t===`licensed`)return t;if(!S)return`not_set`;if(T?.epoch===re)return T.promise;let n=re,r=S,i=(async()=>{let e=`invalid_signature`,t=null;try{let n=ce(r);if(!n||!k(n.sub))return`invalid_signature`;let i=Math.floor(Date.now()/1e3),a=await(0,d.verifySystemMessage)(r,n.sub,i);if(!a.ok)return a.status;let o=a.payload;if(!k(o.sub)||!k(o.jti,128)||!A(o.iat)||!A(o.exp)||o.iat>i+60||o.exp<=o.iat)return`invalid_signature`;if(![`pro`,`team`,`enterprise`,`internal`].includes(String(o.tier)))return`wrong_tier`;if(o.exp<=i)return`expired`;if(!Array.isArray(o.pkg)||!o.pkg.length||o.pkg.length>32||!o.pkg.every(e=>k(e,128))||!o.pkg.includes(`bim`)||o.pkg.includes(`Polycyphers.Bim`))return`wrong_package`;if(typeof o.ver!=`string`||o.ver.length>64||!j(o.ver))return`wrong_version`;let s=typeof location>`u`?``:location.hostname.toLowerCase();if(!s||!Array.isArray(o.dom)||!o.dom.length||o.dom.length>64||!o.dom.every(le)||!o.dom.some(e=>ue(e,s)))return`wrong_domain`;let c=await fe(o.jti,i);if(c.revoked)return`revoked`;let l=Math.min(o.exp*1e3,c.expires);return o.exp*1e3<=Date.now()?`expired`:l<=Date.now()?`unavailable`:(e=`licensed`,t={until:Math.min(l,Date.now()+ne),expires:l,status:e},e)}catch{return`unavailable`}finally{n===re&&(w=t,C=t?.status??`unavailable`)}})();T={epoch:n,promise:i};try{let e=await i;return n===re?(C=e,e):oe()}finally{T?.promise===i&&(T=null)}}function me(e,t){if(typeof e.priceMinorUnits!=`number`||!Number.isFinite(e.priceMinorUnits)||typeof e.currency!=`string`)return null;try{let n=new Intl.NumberFormat(t,{style:`currency`,currency:e.currency}),r=n.resolvedOptions().maximumFractionDigits??2;return n.format(e.priceMinorUnits/10**r)}catch{return null}}function he(e){return typeof e.freeProposalGenerations==`number`&&typeof e.freeBimExports==`number`?{proposals:e.freeProposalGenerations,exports:e.freeBimExports}:null}function ge(e){return`polycyphers.bim.project.v1:`+encodeURIComponent(e)}function _e(e,t){try{let n=e.getItem(ge(t));return n&&/^[a-f0-9]{32}$/i.test(n)?n:null}catch{return null}}function ve(e,t,n){try{n&&/^[a-f0-9]{32}$/i.test(n)?e.setItem(ge(t),n):e.removeItem(ge(t))}catch{}}function ye(e){return{footprint:{edges:Array.from({length:4},(e,t)=>({id:`W`+(t+1),startVertexId:`V`+(t+1),endVertexId:`V`+((t+1)%4+1),lengthM:NaN,bearingDegrees:null,direction:`Any`,wallType:`exterior`}))},programme:{bedroomWidthM:NaN,bedroomDepthM:NaN,bathroomWidthM:NaN,bathroomDepthM:NaN,hallWidthM:NaN,wardrobeLengthM:NaN,balconyDepthM:NaN,slidingDoorWidthM:NaN,balconyEdgeId:``,entranceEdgeId:``,source:`User-entered project programme; dimensions require engine validation`},buildUps:null,viewEdgeId:``,country:`unspecified`,language:e}}function be(e){if(e.footprint.edges.length<3||e.footprint.edges.some(e=>!Number.isFinite(e.lengthM)||e.lengthM<=0||e.bearingDegrees!==null&&!Number.isFinite(e.bearingDegrees)))return`Enter every measured wall length. Leave an unknown bearing blank.`;if(e.programme){let t=e.programme;if([t.bedroomWidthM,t.bedroomDepthM,t.bathroomWidthM,t.bathroomDepthM,t.hallWidthM,t.wardrobeLengthM,t.slidingDoorWidthM].some(e=>!Number.isFinite(e)||e<=0)||!Number.isFinite(t.balconyDepthM)||t.balconyDepthM<0||!t.entranceEdgeId||!t.balconyEdgeId)return`Complete the room programme and choose the entrance and balcony walls.`}return null}function xe(e,t){return!!e&&!!t&&e.isChanged&&e.expectedVersion===t.version&&e.snapshot.projectId===t.projectId}function Se(e){let t=e?.toLowerCase().split(/[-_]/)[0];return t===`de`||t===`fr`||t===`ar`?t:`en`}function M(e,t,n){return n.some(e=>e.toLowerCase()===t.toLowerCase())?`estimated`:e.valueOrigins?e.valueOrigins.userGivenPaths.some(e=>e.toLowerCase()===t.toLowerCase())?`user-given`:`estimated`:t.startsWith(`programme.`)?e.programme?.source.startsWith(`User-entered`)?`user-given`:`estimated`:t.startsWith(`buildUps.`)?`estimated`:`user-given`}function N(e,t,n){let r=e.valueOrigins?.userGivenPaths??[...e.footprint.edges.flatMap((e,t)=>[...Number.isFinite(e.lengthM)?[`footprint.edges[${t}].lengthM`]:[],...e.bearingDegrees==null?[]:[`footprint.edges[${t}].bearingDegrees`]]),...Object.entries(e.programme??{}).filter(([,e])=>typeof e==`number`&&Number.isFinite(e)).map(([e])=>`programme.`+e)].filter(t=>M(e,t,n)===`user-given`);return{...e,valueOrigins:{userGivenPaths:[...r.filter(e=>e.toLowerCase()!==t.toLowerCase()),t]}}}var Ce=(0,c.createContext)(`baulynq`),we=()=>location.pathname===`/verify-email`||location.pathname===`/verify`,P=()=>crypto.randomUUID().replaceAll(`-`,``);function Te(){let e=(0,c.useContext)(Ce);return(0,u.jsxs)(`span`,{className:`brand`,children:[(0,u.jsx)(`svg`,{viewBox:`0 0 28 28`,"aria-hidden":`true`,children:(0,u.jsx)(`path`,{d:`M4 23V5h13v7h7v11H4m7 0V12h6m0 0V5`})}),(0,u.jsxs)(`strong`,{children:[e===`karamentreprises`?`Karamentreprises`:`BauLynq`,(0,u.jsx)(`span`,{children:e===`karamentreprises`?`BIM`:`Vision`})]})]})}function Ee(){return(0,u.jsx)(`span`,{"aria-hidden":`true`,children:`↗`})}function De(){return(0,u.jsxs)(`svg`,{viewBox:`0 0 450 340`,role:`img`,"aria-label":`Illustrative hand sketch of the reference footprint`,children:[(0,u.jsx)(`defs`,{children:(0,u.jsx)(`pattern`,{id:`sketchgrid`,width:`16`,height:`16`,patternUnits:`userSpaceOnUse`,children:(0,u.jsx)(`path`,{d:`M16 0H0V16`,fill:`none`,stroke:`#e9e4d8`,strokeWidth:`.5`})})}),(0,u.jsx)(`rect`,{width:`450`,height:`340`,fill:`url(#sketchgrid)`}),(0,u.jsxs)(`g`,{transform:`translate(66 53) rotate(-4 140 110)`,fill:`none`,stroke:`#77776e`,strokeWidth:`2.2`,strokeLinecap:`round`,children:[(0,u.jsx)(`path`,{d:`M12 233L255 235l-1-37 56 1-2-159-19-17L18 22Z`}),(0,u.jsx)(`path`,{d:`M13 232L17 21l272 4 19 14 2 160-55-2v36Z`,opacity:`.4`}),(0,u.jsx)(`path`,{d:`M129 232V115h178M130 154h74v77`,strokeDasharray:`5 7`}),(0,u.jsx)(`path`,{d:`M324 70v72m-5-7 5 8 5-8`,stroke:`#328577`})]}),(0,u.jsxs)(`g`,{fontFamily:`monospace`,fontSize:`15`,fill:`#72756e`,transform:`rotate(-4 200 170)`,children:[(0,u.jsxs)(`text`,{x:`145`,y:`62`,children:[`8.34`,(0,u.jsx)(`tspan`,{fontSize:`7`,children:` [user-given]`})]}),(0,u.jsxs)(`text`,{x:`165`,y:`318`,children:[`7.40`,(0,u.jsx)(`tspan`,{fontSize:`7`,children:` [user-given]`})]}),(0,u.jsxs)(`text`,{x:`21`,y:`172`,transform:`rotate(-90 21 172)`,children:[`6.40`,(0,u.jsx)(`tspan`,{fontSize:`7`,children:` [user-given]`})]}),(0,u.jsxs)(`text`,{x:`387`,y:`153`,transform:`rotate(90 387 153)`,children:[`4.81`,(0,u.jsx)(`tspan`,{fontSize:`7`,children:` [user-given]`})]}),(0,u.jsxs)(`text`,{x:`307`,y:`282`,children:[`1.70`,(0,u.jsx)(`tspan`,{fontSize:`7`,children:` [user-given]`})]})]}),(0,u.jsx)(`text`,{x:`29`,y:`32`,fontFamily:`monospace`,fontSize:`10`,fill:`#928f83`,children:`OWN ILLUSTRATION · USER-GIVEN / UNCONFIRMED`})]})}function Oe(e={}){let t=e.brand??`baulynq`,n=Se(e.language??e.initialInput?.language??(typeof navigator>`u`?`en`:navigator.language)),[r,i]=(0,c.useState)(`checking`),[a,o]=(0,c.useState)(0);(0,c.useEffect)(()=>{let e=!0,n=!1,r=!1;ie(t);let a=async()=>{if(n)r=!0;else{n=!0;try{let t=await pe(!0);e&&i(t)}catch{e&&i(`unavailable`)}finally{n=!1,r&&e&&(r=!1,a())}}};a();let o=ae(()=>{e&&i(`checking`),a()}),s=setInterval(()=>{a()},3e4),c=setInterval(()=>{let t=oe();e&&t!==`licensed`&&i(t)},1e3);return()=>{e=!1,clearInterval(s),clearInterval(c),o()}},[t,a]);let s=(0,c.useCallback)(async(t,n)=>{let r=await pe(),a=oe();if(r!==`licensed`||a!==`licensed`)throw i(a),new DOMException(`A valid component license is required.`,`AbortError`);return e.transport?e.transport(t,n):fetch(`/v1`+t,n)},[e.transport]),l=r===`licensed`;return(0,u.jsx)(Ce.Provider,{value:t,children:l?(0,u.jsx)(ke,{...e,transport:s},e.embedded?e.workspaceKey??`unscoped`:`public`):(0,u.jsxs)(`section`,{className:`bim-studio bim-license-gate`,dir:n===`ar`?`rtl`:`ltr`,"aria-label":`Component licensing`,children:[(0,u.jsx)(Te,{}),(0,u.jsx)(`h1`,{children:h(n,r===`checking`?`Verifying component license…`:`A valid component license is required`)}),(0,u.jsxs)(`p`,{children:[t===`karamentreprises`?`Karamentreprises BIM`:`BauLynq Vision`,` · `,r]}),(0,u.jsx)(`p`,{children:h(n,`The studio stays closed until its installation license and signed revocation status are verified.`)}),r!==`checking`&&(0,u.jsx)(`button`,{className:`outline`,onClick:()=>o(e=>e+1),children:h(n,`Check license again`)}),(0,u.jsxs)(`a`,{href:t===`karamentreprises`?`https://packages.karamentreprises.com/bim`:`https://packages.polycyphers.com/bim`,children:[h(n,`License management`),` ↗`]})]})})}function ke({embedded:e=!1,transport:t,initialInput:n,workspaceKey:r,language:i,onStateChange:a,brand:o=`baulynq`}={}){let[s,d]=(0,c.useState)(()=>Se(i??n?.language??(typeof navigator>`u`?`en`:navigator.language))),[f,m]=(0,c.useState)(e||location.pathname===`/studio`?`studio`:`home`),[_,v]=(0,c.useState)(`measure`),[y,ee]=(0,c.useState)(null),[b,x]=(0,c.useState)(n??null),[te,ne]=(0,c.useState)(`A`),[S,re]=(0,c.useState)(!1),[C,w]=(0,c.useState)(``),[T,E]=(0,c.useState)(``),[ie,D]=(0,c.useState)(``),[O,ae]=(0,c.useState)(null),[se,k]=(0,c.useState)(null),[A,ce]=(0,c.useState)(null),[j,le]=(0,c.useState)(``),[ue,de]=(0,c.useState)(!e&&we()),[fe,pe]=(0,c.useState)(``),[ge,M]=(0,c.useState)(``),[N,Ce]=(0,c.useState)({}),[Oe,ke]=(0,c.useState)(!1),[I,Ne]=(0,c.useState)(we()?`verify`:`login`),[Pe,Fe]=(0,c.useState)(()=>we()?new URLSearchParams(location.search).get(`token`)??``:``),[Ie,Le]=(0,c.useState)(),[Re,ze]=(0,c.useState)(null),[L,R]=(0,c.useState)(null),[z,Be]=(0,c.useState)(null),[Ve,He]=(0,c.useState)(``),[B,Ue]=(0,c.useState)(null),[We,Ge]=(0,c.useState)([]),[Ke,qe]=(0,c.useState)(!1),[Je,Ye]=(0,c.useState)(!1),[Xe,Ze]=(0,c.useState)(!1),[Qe,$e]=(0,c.useState)(null),[et,tt]=(0,c.useState)(null),[nt,rt]=(0,c.useState)(null),[it,at]=(0,c.useState)(!1),[ot,st]=(0,c.useState)(1),[ct,lt]=(0,c.useState)(1),[ut,dt]=(0,c.useState)(!1),[ft,pt]=(0,c.useState)(!1),[mt,ht]=(0,c.useState)(!1),[V,gt]=(0,c.useState)(null),[_t,vt]=(0,c.useState)(!1),[yt,bt]=(0,c.useState)([]),[xt,St]=(0,c.useState)([]),[Ct,wt]=(0,c.useState)(!1),[Tt,Et]=(0,c.useState)([]),[Dt,Ot]=(0,c.useState)(),kt=(0,c.useRef)(null),At=(0,c.useRef)(!1),jt=(0,c.useRef)(!0),H=(0,c.useRef)(0),Mt=(0,c.useRef)(``),Nt=(0,c.useRef)(void 0),Pt=(0,c.useRef)(r),U=p[s],W=r??Ie,Ft=(0,c.useRef)(a),It=ut||!!T.trim()||!!L||!!z&&!B||_t;(0,c.useEffect)(()=>{Ft.current=a},[a]),(0,c.useEffect)(()=>{Ft.current?.({busy:S,hasUnsavedChanges:It})},[S,It]),(0,c.useEffect)(()=>()=>{Ft.current?.({busy:!1,hasUnsavedChanges:!1})},[]),(0,c.useEffect)(()=>{tt(null),rt(null),st(Math.max(1,(y?.version??1)-1)),lt(y?.version??1),y||at(!1)},[y?.projectId,y?.version]);let G=L?.snapshot??y,K=G?.proposals.find(e=>e.id===te)??G?.proposals[0],Lt=me(N,s),Rt=he(N),zt=typeof N.checkoutAvailable==`boolean`?N.checkoutAvailable:N.checkoutEnabled===!0,q=[`paidRegenerations`,`chatRefinementsPerProject`,`exportsPerPaidProject`].every(e=>typeof N[e]==`number`&&Number.isInteger(N[e])&&Number(N[e])>=0)?{regenerations:Number(N.paidRegenerations),chat:Number(N.chatRefinementsPerProject),exports:Number(N.exportsPerPaidProject)}:null;(0,c.useEffect)(()=>(jt.current=!0,()=>{jt.current=!1,H.current++}),[]);function J(e){let t=oe();if(!jt.current||e!==H.current||t!==`licensed`)throw new DOMException(`The verified session changed.`,`AbortError`)}async function Bt(n,r){let i=H.current;J(i);let a=new Headers(r?.headers).get(`Authorization`);if(!e&&n!==`/session`&&a&&a!==`Bearer `+Mt.current)throw new DOMException(`The verified session changed.`,`AbortError`);let o=await(t?t(n,r):fetch(`/v1`+n,r));if(n!==`/config`&&J(i),!e&&o.status===401&&!n.startsWith(`/account/`))throw Ht(),Ne(`login`),de(!0),w(`Sign in with a verified account to continue.`),new DOMException(`The verified session expired.`,`AbortError`);return o}function Vt(){dt(!1),ht(!1),w(``),D(``),pt(!1),$e(null),Ge([]),Et([]),Ot(void 0),gt(null),vt(!1),bt([]),qe(!1),Ye(!1),E(``),ee(null),St([]),x(null),R(null),Be(null),ce(null),k(null),ae(null),Ue(null),ze(null),Ze(!1)}function Ht(){(y||Nt.current)&&Vt(),H.current++,Mt.current=``,Nt.current=void 0,le(``),Le(void 0)}async function Y(t,n,r){let i=H.current,a=await Bt(t,{method:r??(n?`POST`:`GET`),headers:{...n?{"Content-Type":`application/json`}:{},...!e&&j?{Authorization:`Bearer `+j}:{}},body:n?JSON.stringify(n):void 0});if(!a.ok){let n=`The service is temporarily unavailable.`;try{let e=await a.json();n=e.detail??e.title??e.error??n}catch{}throw J(i),a.status===401&&(e||(Ht(),t.startsWith(`/account/`)||Ne(`login`),de(!0)),n=e?`Your app session needs attention. Sign in again through your app.`:`Sign in with a verified account to continue.`),a.status===402&&Ut(`paywall`),Error(n)}let o=a.status===204?null:await a.json();return J(i),o}async function Ut(t,n=Ct){if(!(e||N.analyticsEnabled!==!0))try{await Bt(`/analytics/events`,{method:`POST`,headers:{"Content-Type":`application/json`,...j?{Authorization:`Bearer `+j}:{}},body:JSON.stringify({eventId:P(),kind:t,consentGranted:n})})}catch{}}function Wt(e){wt(e),Ut(`visit`,e)}(0,c.useEffect)(()=>{i!==void 0&&d(Se(i))},[i]),(0,c.useEffect)(()=>{e||(document.documentElement.lang=s,document.documentElement.dir=s===`ar`?`rtl`:`ltr`)},[s,e]),(0,c.useEffect)(()=>{let e=!0;return Bt(`/config`).then(e=>e.ok?e.json():Promise.reject()).then(t=>{e&&Ce(t)}).catch(()=>{}),()=>{e=!1}},[t]),(0,c.useEffect)(()=>{!e&&we()&&history.replaceState({},``,location.pathname)},[e]),(0,c.useEffect)(()=>{if(!z){He(``);return}let e=URL.createObjectURL(z);return He(e),()=>URL.revokeObjectURL(e)},[z]),(0,c.useEffect)(()=>{e&&Pt.current!==r&&(H.current++,Vt(),Pt.current=r)},[r,e]),(0,c.useEffect)(()=>{if(!W)return;let e=_e(localStorage,W);if(ze(e),!e||b||y)return;let t=!0;return Y(`/projects/`+e).then(e=>{t&&(X(e),v(e.input.isDraft?`measure`:`proposals`))}).catch(e=>{t&&w(e instanceof Error?e.message:`Could not resume the project.`)}),()=>{t=!1}},[W]);function X(e){J(H.current),$e(e.reconciliation),Ze(!1),e.input.isDraft||(dt(!1),vt(!1)),e.input.isDraft||bt([]),ee(e),x(e.input.isDraft?b??ye(s):e.input),ne(e.selectedProposalId??e.proposals.find(e=>e.recommended)?.id??`A`),ce(null),k(null),ae(null),R(null),W&&(ve(localStorage,W,e.projectId),ze(e.projectId))}async function Z(e){if(!At.current){At.current=!0,re(!0),w(``);try{await e()}catch(e){e instanceof DOMException&&e.name===`AbortError`||w(e instanceof Error?e.message:`Please try again.`)}finally{At.current=!1,re(!1)}}}function Q(t){ht(!1),m(t),e||history.pushState({},``,t===`home`?`/`:`/studio`),window.scrollTo(0,0)}function Gt(e=!1){dt(!1),e||Be(null),qe(!1),Ye(!1),Ge([]),Et([]),Ot(void 0),gt(null),vt(!1),bt([]),E(``),ee(null),St([]),x(ye(s)),R(null),ce(null),k(null),ae(null),Ze(!1),$e(null),Ue(null),v(`measure`),Q(`studio`)}async function Kt(){N.mode===`local-demo`?(Q(`studio`),await Z(async()=>{let e=await Y(`/reference?language=`+s);x(e),dt(!1),Ze(!1),v(`measure`),D(`Reference example loaded. Review its site-confirmed dimensions before generating.`)})):Gt()}async function qt(t,n){let r=H.current;if(!Ke||!Je)throw Error(`Review the image permissions and AI disclosure before upload.`);let i=new FormData;i.append(`file`,n),i.append(`rightsAcknowledged`,`true`),i.append(`aiProcessingAcknowledged`,`true`);let a=await Bt(`/projects/${t.projectId}/uploads`,{method:`POST`,headers:!e&&j?{Authorization:`Bearer `+j}:{},body:i});if(!a.ok){let e=`Upload failed.`;try{let t=await a.json();e=t.detail??t.title??t.error??e}catch{}throw J(r),Error(e)}let o=await a.json();J(r),Ue(o.upload.id),D(`Sketch stored privately. Reading produces observations to confirm, never unchecked dimensions.`)}async function Jt(){b&&await Z(async()=>{let e=be(b);if(e)throw Error(e);if(z&&!B&&(!Ke||!Je))throw Error(`Review the image permissions and AI disclosure, or remove the local image.`);if(!Xe)throw Error(`Confirm the measured dimensions and bearings before generating.`);let t={...b,language:s},n=await Y(`/footprints/reconcile`,t.footprint);if($e(n),n.status!==`Unique`)throw Error(n.findings.map(e=>e.message).join(` `)||`The footprint needs another confirmed measurement.`);let r=y?await Y(`/projects/${y.projectId}/edits`,{expectedVersion:y.version,operationId:P(),edit:{replaceInput:t,note:`Confirmed measurements`}}):await Y(`/projects`,{projectId:P(),operationId:P(),input:t});X(r),v(r.input.isDraft?`measure`:`proposals`),z&&!B&&await qt(r,z)})}async function Yt(){T.trim()&&y&&await Z(async()=>{let e=await Y(`/projects/${y.projectId}/chat`,{expectedVersion:y.version,operationId:P(),message:T});R(e.preview),D(e.reply),E(``),v(`refine`)})}async function Xt(){if(!xe(L,y)||!L||!y)return;let e=L;await Z(async()=>{X(await Y(`/projects/${y.projectId}/edits`,{expectedVersion:e.expectedVersion,operationId:P(),edit:e.edit})),D(`Preview applied as a new saved version.`)})}async function Zt(e){y&&!L&&await Z(async()=>{X(await Y(`/projects/${y.projectId}/edits`,{expectedVersion:y.version,operationId:P(),edit:{selectProposalId:e.id,note:`Selected layout `+e.id}}))})}async function Qt(){y&&(it?at(!1):await Z(async()=>{let e=await Y(`/projects/${y.projectId}/history`);tt(e),at(!0)}))}async function $t(){y&&et?.some(e=>e.version===ot)&&et.some(e=>e.version===ct)&&await Z(async()=>{rt(await Y(`/projects/${y.projectId}/compare?left=${ot}&right=${ct}`))})}async function en(){y&&ot!==y.version&&!L&&et?.some(e=>e.version===ot)&&await Z(async()=>{X(await Y(`/projects/${y.projectId}/undo`,{expectedVersion:y.version,targetVersion:ot,operationId:P()})),D(h(s,`Saved as a new version. Earlier versions are unchanged.`))})}async function tn(){y&&!e&&await Z(async()=>{let e=await Y(`/account/quote`,{projectId:y.projectId});if(e.projectId!==y.projectId||!e.quoteId||me({priceMinorUnits:e.priceMinorUnits,currency:e.currency},s)===null||!Number.isFinite(Date.parse(e.expiresAtUtc)))throw Error(`A valid project quote was not supplied.`);ae(e)})}async function nn(){y&&O&&!e&&zt&&q&&await Z(async()=>{if(O.projectId!==y.projectId||Date.parse(O.expiresAtUtc)<=Date.now())throw Error(`This quote expired. Refresh the project quote before purchase.`);let e=await Y(`/account/checkout`,{projectId:y.projectId,requestId:P(),quoteId:O.quoteId}),t=new URL(e.url);if(t.protocol!==`https:`||t.hostname!==`checkout.stripe.com`||t.username||t.password)throw Error(`The checkout address was not accepted.`);window.location.assign(t.href)})}function rn(){Vt(),H.current++,Mt.current=``,Nt.current=void 0,w(``),le(``),Le(void 0),M(``),pe(``),Fe(``),D(`Signed out. Your saved project stays private and can resume after sign-in.`)}async function an(){y&&K&&!L&&await Z(async()=>{k(await Y(`/projects/${y.projectId}/drawings`,{expectedVersion:y.version,operationId:P(),proposalId:K.id})),D(`2D concept drawings prepared. This does not spend the BIM model export.`)})}async function on(){y&&K&&!L&&await Z(async()=>{let e=await Y(`/projects/${y.projectId}/exports`,{expectedVersion:y.version,operationId:P(),proposalId:K.id});ce(e),v(`download`)})}async function sn(t,n=A){n&&y&&await Z(async()=>{let r=H.current,i=await Bt(`/projects/${y.projectId}/objects/${n.files[t].id}`,{headers:!e&&j?{Authorization:`Bearer `+j}:{}});if(!i.ok)throw Error(`Download unavailable.`);let a=await i.blob();J(r);let s=URL.createObjectURL(a),c=document.createElement(`a`);c.href=s,c.download=`${o===`karamentreprises`?`karamentreprises`:`baulynq`}-${n.proposalId}-v${n.version}.${t}`,c.click(),setTimeout(()=>URL.revokeObjectURL(s),1e3)})}async function cn(e){![`image/png`,`image/jpeg`,`image/webp`].includes(e.type)||e.size>8388608?w(`Choose a PNG, JPEG or WebP up to 8 MB.`):(Be(e),Ue(null),qe(!1),Ye(!1),y?(v(`measure`),D(`Local preview only. Review permissions and AI disclosure before uploading the image.`)):(b||Gt(!0),v(`measure`),D(`Local sketch preview only. Review permissions, then scan and store it privately before asking AI to read observations. No measured footprint is required for that step.`)))}async function ln(){z&&await Z(async()=>{let e=y;e||(e=await Y(`/drafts`,{projectId:P(),operationId:P()}),X(e),v(`measure`)),await qt(e,z)})}async function un(){y&&B&&await Z(async()=>{let e=await Y(`/projects/${y.projectId}/read-sketch`,{expectedVersion:y.version,operationId:P(),objectId:B,intent:T||`Read the sketch measurements and identify uncertainties.`});Et(e.observations),Ot(e.values),gt(e.candidate??null),vt(!1),Ge(e.questions),D(`Recognized values remain estimated. Preview the outline, check labels and assumptions, then explicitly adopt reviewed measurements.`),v(`measure`)})}async function dn(){y&&await Z(async()=>{let e=await Y(`/projects/${y.projectId}`,void 0,`DELETE`);ee(null),St([]),x(null),ce(null),k(null),ae(null),R(null),dt(!1),Be(null),Ue(null),Ge([]),Et([]),Ot(void 0),gt(null),vt(!1),bt([]),$e(null),W&&ve(localStorage,W,null),ze(null),D(e.dataErased===!0?`Service reports project data erased. ${e.accountingPending?`Accounting cleanup is still pending.`:`Accounting cleanup completed.`}`:`Deletion accepted; data erasure is still pending. The service will continue cleanup.`)})}async function fn(){!e&&j&&await Z(async()=>{let e=await Y(`/account/data`,void 0,`DELETE`);Ct&&(await Ut(`visit`,!1),wt(!1)),Vt(),H.current++,W&&ve(localStorage,W,null),v(`measure`),D((e.dataErased?`Service reports project content erased.`:`Content deletion accepted; erasure is still pending.`)+` `+(e.accountingPending?`Accounting cleanup is still pending. `:``)+`Account identity, billing and required anti-abuse metadata are retained.`)})}async function pn(){await Z(async()=>{let e=H.current;if(I===`signup`){await Y(`/account/signup`,{email:fe}),D(`Check your email for the verification link. No session is created until ownership is verified.`),Ne(`verify`),M(``);return}let t=await Y(I===`verify`?`/account/verification/complete`:`/account/login`,I===`verify`?{token:Pe,password:ge}:{email:fe,password:ge});if(M(``),Fe(``),!t.token){Ne(`login`),D(`Email verified. Sign in to continue.`);return}let n=await Bt(`/session`,{headers:{Authorization:`Bearer `+t.token}});if(!n.ok)throw Error(`The verified workspace could not be loaded.`);let r=await n.json();if(J(e),typeof r.workspaceKey!=`string`||!r.workspaceKey||r.workspaceKey.length>512)throw Error(`The verified workspace could not be loaded.`);Nt.current&&Nt.current!==r.workspaceKey&&Vt(),H.current++,Mt.current=t.token,Nt.current=r.workspaceKey,le(t.token),Le(r.workspaceKey),de(!1),D(`Signed in. This session stays in memory only.`)})}function mn(){V?.input&&(dt(!0),x({...b??ye(s),footprint:V.input}),$e(V.reconciliation),bt(V.input.edges.flatMap((e,t)=>[`footprint.edges[${t}].lengthM`,...e.bearingDegrees==null?[]:[`footprint.edges[${t}].bearingDegrees`]])),vt(!0),Ze(!1),R(null),v(`measure`),D(`Recognized outline is a local estimated preview. No project version or proposal was changed. Review every length, bearing and wall type before adoption.`))}function hn(e){Ue(e),v(`measure`),D(`Saved sanitized sketch selected. Reading it with AI is a separate explicit action.`)}async function gn(t,n){y&&await Z(async()=>{let r=H.current,i=await Bt(`/projects/${y.projectId}/objects/${n.objectId}`,{headers:!e&&j?{Authorization:`Bearer `+j}:{}});if(!i.ok)throw Error(`Saved file is unavailable or expired.`);let a=await i.blob();J(r);let s=URL.createObjectURL(a),c=document.createElement(`a`);c.href=s,c.download=`${o===`karamentreprises`?`karamentreprises`:`baulynq`}-${t.kind}${t.version?`-v`+t.version:``}.${n.format}`,c.click(),setTimeout(()=>URL.revokeObjectURL(s),1e3)})}(0,c.useEffect)(()=>{if(!y)return;let e=!0;return Y(`/projects/${y.projectId}/artifacts`).then(t=>{e&&St(Array.isArray(t)?t:[])}).catch(()=>{e&&St([])}),()=>{e=!1}},[y?.projectId,y?.version,B]);let $=_===`measure`?Qe?.values:K?.values??G?.reconciliation.values??Qe?.values,_n=K?.findings.reduce((e,t)=>(e[t.status]=(e[t.status]??0)+1,e),{})??{};return(0,u.jsxs)(`div`,{className:`bim-studio`,dir:s===`ar`?`rtl`:`ltr`,children:[!e&&(0,u.jsxs)(`header`,{children:[(0,u.jsx)(`a`,{className:`logo`,href:`/`,onClick:e=>{e.preventDefault(),Q(`home`)},children:(0,u.jsx)(Te,{})}),(0,u.jsxs)(`nav`,{children:[(0,u.jsx)(`a`,{href:`/#pricing`,onClick:()=>f!==`home`&&Q(`home`),children:U.pricing}),(0,u.jsx)(`select`,{"aria-label":U.language,value:s,onChange:e=>d(e.target.value),children:[`en`,`de`,`fr`,`ar`].map(e=>(0,u.jsx)(`option`,{value:e,children:e.toUpperCase()},e))}),(0,u.jsx)(`button`,{className:`quiet account-action`,disabled:S,onClick:()=>j?Q(`studio`):de(!0),children:j?U.account:U.signin}),j&&(0,u.jsxs)(`div`,{className:`account-options`,children:[(0,u.jsx)(`button`,{className:`quiet`,"aria-label":h(s,`Account options`),"aria-expanded":mt,"aria-controls":`bim-account-actions`,disabled:S,onClick:()=>ht(!mt),children:`⋯`}),mt&&(0,u.jsxs)(`div`,{id:`bim-account-actions`,role:`group`,"aria-label":h(s,`Account actions`),className:`account-actions`,onKeyDown:e=>{e.key===`Escape`&&(ht(!1),e.currentTarget.parentElement?.querySelector(`button`)?.focus())},children:[(0,u.jsx)(`button`,{className:`quiet full`,disabled:S,onClick:()=>{ht(!1),pt(!0)},children:h(s,`Delete project content`)}),(0,u.jsx)(`button`,{className:`quiet full`,disabled:S,onClick:rn,children:h(s,`Sign out`)})]})]}),(0,u.jsxs)(`button`,{className:`ink`,onClick:()=>Q(`studio`),children:[U.studio,(0,u.jsx)(Ee,{})]})]})]}),f===`home`?(0,u.jsxs)(`main`,{className:`landing`,children:[(0,u.jsxs)(`section`,{className:`hero`,children:[(0,u.jsxs)(`span`,{className:`eyebrow`,children:[U.eyebrow,` `,(0,u.jsx)(`span`,{children:`01 — VISION`})]}),(0,u.jsx)(`h1`,{children:U.hero}),(0,u.jsx)(`p`,{children:U.intro}),(0,u.jsxs)(`div`,{className:`actions`,children:[(0,u.jsxs)(`button`,{className:`ink large`,onClick:()=>Q(`studio`),children:[U.start,(0,u.jsx)(Ee,{})]}),N.mode===`local-demo`?(0,u.jsxs)(`button`,{className:`textbtn`,onClick:Kt,children:[U.try,` →`]}):(0,u.jsxs)(`button`,{className:`textbtn`,onClick:()=>Gt(),children:[h(s,`Enter measurements`),` →`]})]}),(0,u.jsxs)(`div`,{className:`proof`,children:[(0,u.jsx)(`span`,{className:`dot`}),`Your measurements. Checked geometry. One shared engine.`]})]}),(0,u.jsxs)(`section`,{className:`transformation`,children:[(0,u.jsxs)(`article`,{className:`sketch-card`,children:[(0,u.jsxs)(`div`,{className:`card-title`,children:[(0,u.jsx)(`span`,{children:`01 / SKETCH`}),(0,u.jsx)(`span`,{children:`THE STARTING POINT`})]}),(0,u.jsx)(De,{}),(0,u.jsx)(`h3`,{children:U.before})]}),(0,u.jsx)(`div`,{className:`flow-arrow`,children:`→`}),(0,u.jsxs)(`article`,{className:`plan-card`,children:[(0,u.jsxs)(`div`,{className:`card-title`,children:[(0,u.jsx)(`span`,{children:`02 / POSSIBILITIES`}),(0,u.jsx)(`span`,{className:`teal`,children:`CHECKED BY THE ENGINE`})]}),(0,u.jsx)(`div`,{className:`mini-plan`,children:(0,u.jsx)(`img`,{src:`/reference-plan.svg`,alt:`Engine-generated reference layout A with checked dimensions`})}),(0,u.jsx)(`h3`,{children:U.after}),N.mode===`local-demo`?(0,u.jsxs)(`button`,{className:`textbtn`,onClick:Kt,children:[U.try,` ↗`]}):(0,u.jsxs)(`button`,{className:`textbtn`,onClick:()=>Gt(),children:[h(s,`Enter measurements`),` ↗`]})]})]}),(0,u.jsx)(`section`,{className:`process`,children:U.steps.map((e,t)=>(0,u.jsxs)(`div`,{children:[(0,u.jsxs)(`span`,{children:[`0`,t+1]}),(0,u.jsx)(`h3`,{children:e}),(0,u.jsx)(`p`,{children:[`A drawing or photo, with dimensions.`,`Confirm dimensions and fixed constraints.`,`Compare different ways to use your space.`,`Take the chosen concept into your BIM workflow.`][t]})]},e))}),(0,u.jsxs)(`section`,{className:`use-case-links`,children:[(0,u.jsx)(`h2`,{children:h(s,`Plan your next space`)}),(0,u.jsxs)(`a`,{href:`/apartment-layout/`,children:[h(s,`Apartment layout`),` ↗`]}),(0,u.jsxs)(`a`,{href:`/house-extension/`,children:[h(s,`House extension`),` ↗`]}),(0,u.jsxs)(`a`,{href:`/renovation/`,children:[h(s,`Renovation`),` ↗`]})]}),(0,u.jsxs)(`section`,{className:`price-section`,id:`pricing`,children:[(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`span`,{className:`eyebrow`,children:`A CLEAR START`}),(0,u.jsxs)(`h2`,{children:[`A small project.`,(0,u.jsx)(`br`,{}),`A useful next step.`]}),(0,u.jsx)(`p`,{children:`Free access is included in KEHBIMVISION and BauLynq BIM, within each app’s AI usage limits.`})]}),(0,u.jsxs)(`article`,{className:`price-card`,children:[(0,u.jsx)(`span`,{className:`eyebrow`,children:o===`karamentreprises`?`KARAMENTREPRISES BIM`:`BAULYNQ VISION`}),(0,u.jsx)(`h2`,{children:Lt??`Pricing opens with the service`}),(0,u.jsx)(`small`,{children:`Base pricing. Your project quote is shown before purchase.`}),(0,u.jsx)(`p`,{children:Rt?`${Rt.proposals} free proposal generations · ${Rt.exports} BIM exports`:`The local preview does not accept payments.`}),(0,u.jsx)(`p`,{children:`One project includes proposals, refinements and its model export.`}),q&&(0,u.jsxs)(`p`,{children:[`After the initial proposal request: `,q.regenerations,` regenerations · `,q.chat,` chat refinements · `,q.exports,` `,q.exports===1?`BIM export`:`BIM exports`,` per paid project.`]}),(0,u.jsxs)(`button`,{className:`ink`,onClick:()=>Q(`studio`),children:[U.start,(0,u.jsx)(Ee,{})]})]})]}),(0,u.jsxs)(`footer`,{children:[(0,u.jsx)(Te,{}),(0,u.jsx)(`span`,{children:U.disclaimer})]})]}):(0,u.jsxs)(`main`,{className:`studio`,children:[(0,u.jsxs)(`aside`,{className:`rail`,children:[(0,u.jsx)(`span`,{className:`eyebrow`,children:`WORKSPACE`}),(0,u.jsx)(`h2`,{children:U.workspace}),(0,u.jsxs)(`span`,{className:`project-status`,children:[(0,u.jsx)(`span`,{className:`dot`}),N.mode===`local-demo`?`Local reference preview`:`Private project`]}),(0,u.jsx)(`div`,{className:`stage-nav`,children:[`measure`,`proposals`,`refine`,`download`].map((e,t)=>(0,u.jsxs)(`button`,{className:_===e?`active`:``,disabled:S,onClick:()=>v(e),children:[(0,u.jsxs)(`span`,{children:[`0`,t+1]}),U[e]]},e))}),(0,u.jsxs)(`div`,{className:`rail-bottom`,children:[(0,u.jsx)(`p`,{children:U.privacy}),typeof N.retentionDays==`number`&&(0,u.jsxs)(`p`,{children:[`Retention: `,N.retentionDays,` days, as configured by the service.`]}),y&&(0,u.jsx)(`button`,{className:`quiet danger`,onClick:dn,children:U.delete})]})]}),(0,u.jsxs)(`section`,{className:`workspace`,children:[(0,u.jsxs)(`div`,{className:`workspace-heading`,children:[(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`span`,{className:`eyebrow`,children:y?`VERSION ${y.version} / ${y.projectId.slice(0,8)}`:`YOUR NEXT SPACE`}),(0,u.jsx)(`h1`,{children:U[_]})]}),(0,u.jsxs)(`div`,{className:`workspace-controls`,children:[e&&(0,u.jsx)(`select`,{"aria-label":U.language,value:s,onChange:e=>d(e.target.value),children:[`en`,`de`,`fr`,`ar`].map(e=>(0,u.jsx)(`option`,{value:e,children:e.toUpperCase()},e))}),(0,u.jsx)(`button`,{className:`quiet`,disabled:S,onClick:()=>Gt(),children:h(s,`New project`)}),y&&(0,u.jsx)(`button`,{className:`quiet compact-delete`,"aria-label":`Delete current project`,disabled:S,onClick:dn,children:U.delete}),y&&(0,u.jsxs)(`button`,{className:`outline`,disabled:S||!!L||y.version<2,onClick:()=>Z(async()=>{X(await Y(`/projects/${y.projectId}/undo`,{expectedVersion:y.version,targetVersion:y.version-1,operationId:P()}))}),children:[`↶ `,U.undo]})]})]}),C&&(0,u.jsxs)(`div`,{role:`alert`,className:`alert`,children:[o===`karamentreprises`?C.replace(/Polycyphers/gi,`Karamentreprises`):C,(0,u.jsx)(`button`,{"aria-label":U.close,onClick:()=>w(``),children:`×`})]}),ie&&(0,u.jsxs)(`div`,{role:`status`,className:`notice`,children:[ie,(0,u.jsx)(`button`,{"aria-label":U.close,onClick:()=>D(``),children:`×`})]}),L&&(0,u.jsx)(`section`,{className:`notice preview-banner`,role:`status`,children:(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`strong`,{children:h(s,`Unsaved edit preview`)}),(0,u.jsxs)(`p`,{children:[`Review the recomputed plan, schedule and rule findings below. Your saved version `,y?.version,` is unchanged.`]}),(0,u.jsx)(`button`,{className:`ink`,disabled:S||!xe(L,y),onClick:Xt,children:h(s,`Apply as new version`)}),(0,u.jsx)(`button`,{className:`outline`,disabled:S,onClick:()=>R(null),children:h(s,`Discard preview`)})]})}),!y&&!b?(0,u.jsxs)(`div`,{className:`empty`,children:[(0,u.jsx)(`span`,{className:`empty-icon`,children:`⌑`}),(0,u.jsx)(`h2`,{children:U.empty}),(0,u.jsx)(`p`,{children:U.emptyBody}),(0,u.jsxs)(`div`,{className:`actions`,children:[(0,u.jsxs)(`button`,{className:`ink large`,disabled:S,onClick:()=>kt.current?.click(),children:[U.upload,(0,u.jsx)(Ee,{})]}),(0,u.jsx)(`button`,{className:`outline`,disabled:S,onClick:()=>Gt(),children:h(s,`Enter measurements`)})]}),Re&&(0,u.jsx)(`button`,{className:`outline`,disabled:S,onClick:()=>Z(async()=>{let e=await Y(`/projects/`+Re);X(e),v(e.input.isDraft?`measure`:`proposals`)}),children:h(s,`Resume saved project`)}),N.mode===`local-demo`&&(0,u.jsx)(`button`,{className:`textbtn`,disabled:S,onClick:Kt,children:U.try})]}):_===`measure`&&b?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(je,{language:s,input:b,setInput:x,onChange:e=>{dt(!0),Ze(!1),R(null),$e(t=>e===`footprint.diagonals`&&t?{status:`Unvalidated`,findings:[],suggestedDiagonal:t.suggestedDiagonal}:null),e&&bt(t=>t.filter(t=>t!==e))},estimatedFields:yt,confirmed:Xe,setConfirmed:Ze,onGenerate:Jt,busy:S,onUpload:()=>kt.current?.click(),imageUrl:Ve,geometry:Qe}),z&&!B&&(0,u.jsxs)(`section`,{className:`paper consent-panel`,children:[(0,u.jsx)(`h3`,{children:h(s,`Before image upload`)}),(0,u.jsx)(`p`,{children:h(s,`The service scans and normalizes the image before storing it. Selecting a file alone does not send it to an AI provider. “Read saved sketch” sends the sanitized image to Anthropic Claude only when you request that step. EU storage is separate from inference location; provider region and data-processing terms require service configuration.`)}),(0,u.jsxs)(`label`,{className:`confirmation`,children:[(0,u.jsx)(`input`,{type:`checkbox`,checked:Ke,onChange:e=>qe(e.target.checked)}),h(s,`I have permission to use this image for this project.`)]}),(0,u.jsxs)(`label`,{className:`confirmation`,children:[(0,u.jsx)(`input`,{type:`checkbox`,checked:Je,onChange:e=>Ye(e.target.checked)}),h(s,`I understand the AI image-processing disclosure above.`)]}),(0,u.jsxs)(`label`,{className:`field`,children:[h(s,`What would you like to create?`),(0,u.jsx)(`textarea`,{"aria-label":`Sketch brief`,value:T,maxLength:8e3,placeholder:`Room wishes, entrance and view, fixed walls, country…`,onChange:e=>E(e.target.value)})]}),(0,u.jsx)(`button`,{className:`ink`,disabled:S||!Ke||!Je,onClick:ln,children:h(s,`Upload for scanning`)}),(0,u.jsx)(`button`,{className:`quiet`,onClick:()=>{Be(null),qe(!1),Ye(!1)},children:h(s,`Remove local image`)})]}),B&&(0,u.jsxs)(`section`,{className:`paper consent-panel`,children:[(0,u.jsx)(`p`,{children:h(s,`Reading sends this sanitized image to Anthropic Claude. EU storage and provider inference location are separate; provider data-processing terms must be configured by the service.`)}),(0,u.jsxs)(`label`,{className:`field`,children:[h(s,`What should the sketch reader focus on?`),(0,u.jsx)(`textarea`,{"aria-label":`Saved sketch brief`,value:T,maxLength:8e3,onChange:e=>E(e.target.value)})]}),(0,u.jsx)(`button`,{className:`outline`,disabled:S,onClick:un,children:h(s,`Read saved sketch with AI · observations only`)})]}),V&&(0,u.jsxs)(`section`,{className:`paper candidate-panel`,children:[(0,u.jsx)(`h3`,{children:h(s,`Recognized outline · estimated`)}),(0,u.jsx)(`p`,{children:V.input?`${V.input.edges.length} linked boundary edges · geometry ${V.status}`:`The reader did not return a complete, valid outline. Enter or correct measurements manually.`}),(0,u.jsx)(`p`,{children:`Lengths use explicit labels only. Image coordinates do not establish physical scale. Bearings and wall types remain assumptions to review.`}),(0,u.jsx)(`button`,{className:`outline`,disabled:S||!V.input||_t,onClick:mn,children:h(s,`Preview recognized outline`)}),_t&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`p`,{children:h(s,`Local estimated preview only. The saved project is unchanged.`)}),(0,u.jsx)(Me,{candidate:V})]}),(0,u.jsx)(Ae,{report:V.values,language:s})]}),(Tt.length>0||We.length>0)&&(0,u.jsxs)(`article`,{className:`paper findings`,children:[(0,u.jsx)(`h3`,{children:h(s,`Sketch observations to confirm`)}),(0,u.jsx)(`p`,{children:`AI readings are estimated and unconfirmed. Compare them with your image and site measurements; enter the reviewed values in the footprint form. No value is applied automatically.`}),Tt.map((e,t)=>(0,u.jsxs)(`section`,{children:[(0,u.jsxs)(`strong`,{children:[e.kind,e.edgeId?` · `+e.edgeId:``]}),e.value!=null&&(0,u.jsxs)(`p`,{children:[e.value,` `,e.unit??`unit unknown`,` `,(0,u.jsx)(`span`,{className:`value-tag origin-estimated`,children:`estimated · unconfirmed`})]}),(0,u.jsx)(`p`,{children:e.evidence})]},t)),We.map((e,t)=>(0,u.jsx)(`p`,{children:e},t)),Dt&&(0,u.jsx)(Ae,{report:Dt,language:s})]})]}):K?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(`div`,{className:`metrics`,children:[(0,u.jsxs)(`div`,{children:[(0,u.jsxs)(`span`,{children:[U.area,` `,(0,u.jsx)(F,{language:s,report:$,path:`centerlineAreaM2`})]}),(0,u.jsxs)(`strong`,{children:[K.centerlineAreaM2.toFixed(2),(0,u.jsx)(`small`,{children:`m²`})]})]}),(0,u.jsxs)(`div`,{children:[(0,u.jsxs)(`span`,{children:[U.net,` `,(0,u.jsx)(F,{language:s,report:$,path:`netAreaM2`})]}),(0,u.jsxs)(`strong`,{children:[K.netAreaM2.toFixed(2),(0,u.jsx)(`small`,{children:`m²`})]})]}),(0,u.jsxs)(`div`,{children:[(0,u.jsxs)(`span`,{children:[U.perimeter,` `,(0,u.jsx)(F,{language:s,report:$,path:`perimeterM`})]}),(0,u.jsxs)(`strong`,{children:[G?.reconciliation.solutions[0]?.perimeterM.toFixed(2),(0,u.jsx)(`small`,{children:`m`})]})]}),(0,u.jsxs)(`div`,{className:`metric-note`,children:[K.hasRequiredConflicts?U.warning:h(s,`Required layout checks passed`),(0,u.jsx)(`span`,{children:h(s,`Reference sources remain visible below.`)})]})]}),(0,u.jsxs)(`div`,{className:`drawing-layout`,children:[(0,u.jsxs)(`article`,{className:`drawing paper`,children:[(0,u.jsxs)(`div`,{className:`drawing-top`,children:[(0,u.jsxs)(`span`,{children:[`LAYOUT `,K.id]}),(0,u.jsx)(`span`,{children:L?`UNSAVED EDIT PREVIEW`:`ENGINE-CHECKED CONCEPT`}),(0,u.jsx)(`span`,{children:`METRES / CONCEPT`})]}),(0,u.jsx)(`div`,{className:`engine-svg`,dangerouslySetInnerHTML:{__html:l.default.sanitize(K.svg,{USE_PROFILES:{svg:!0,svgFilters:!0}})}}),(0,u.jsxs)(`div`,{className:`drawing-bottom`,children:[(0,u.jsx)(`span`,{children:o===`karamentreprises`?`KARAMENTREPRISES BIM`:`BAULYNQ VISION`}),(0,u.jsxs)(`span`,{children:[L?`PREVIEW / `:``,`v`,G?.version,` · `,s.toUpperCase()]})]})]}),(0,u.jsxs)(`aside`,{className:`proposal-panel`,children:[(0,u.jsx)(`span`,{className:`eyebrow`,children:`FIND YOUR FIT`}),G?.proposals.map(e=>(0,u.jsxs)(`button`,{className:`proposal-card `+(te===e.id?`selected`:``),disabled:S,onClick:()=>{te!==e.id&&(ne(e.id),ce(null),k(null))},children:[(0,u.jsx)(`span`,{className:`proposal-letter`,children:e.id}),(0,u.jsxs)(`div`,{children:[e.recommended&&(0,u.jsx)(`small`,{className:`badge`,children:U.recommended}),(0,u.jsx)(`h3`,{children:e.title}),(0,u.jsx)(`p`,{children:e.tradeOffs[0]})]})]},e.id)),(0,u.jsxs)(`button`,{className:`ink full`,disabled:S||!!L,onClick:()=>Zt(K),children:[U.select,(0,u.jsx)(Ee,{})]}),!e&&y&&(0,u.jsxs)(`section`,{className:`project-price`,children:[(0,u.jsx)(`h3`,{children:h(s,`Project billing`)}),(0,u.jsx)(`p`,{children:`One project includes proposals, refinements and its BIM model within the configured caps. Free allowances are checked by the service.`}),q?(0,u.jsxs)(`p`,{className:`quota-disclosure`,children:[`After the initial proposal request: `,q.regenerations,` regenerations · `,q.chat,` chat refinements · `,q.exports,` `,q.exports===1?`BIM export`:`BIM exports`,` per paid project.`]}):(0,u.jsx)(`p`,{children:`Project usage limits are unavailable. Checkout stays disabled until they can be shown.`}),O?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`strong`,{children:me({priceMinorUnits:O.priceMinorUnits,currency:O.currency},s)}),(0,u.jsxs)(`p`,{children:[`Quote valid until `,new Date(O.expiresAtUtc).toLocaleString(s),`.`]}),(0,u.jsx)(`button`,{className:`ink full`,disabled:S||!zt||!q,onClick:nn,children:h(s,`Continue to Stripe`)}),(0,u.jsx)(`button`,{className:`textbtn`,disabled:S,onClick:tn,children:h(s,`Refresh project quote`)})]}):(0,u.jsx)(`button`,{className:`outline full`,disabled:S||!zt,onClick:tn,children:h(s,`View project price`)}),!zt&&(0,u.jsx)(`small`,{children:h(s,`Purchases are not enabled in this environment.`)}),(0,u.jsx)(`small`,{children:`A checkout return is not proof of payment; downloads use the service's verified entitlement.`})]}),(0,u.jsxs)(`section`,{className:`drawing-downloads`,children:[(0,u.jsx)(`h3`,{children:h(s,`2D concept drawings`)}),(0,u.jsx)(`button`,{className:`outline full`,disabled:S||!!L,onClick:an,children:h(s,`Prepare PDF / editable DXF / SVG`)}),se&&Object.keys(se.files).map(e=>(0,u.jsxs)(`button`,{className:`quiet`,onClick:()=>sn(e,se),children:[e.toUpperCase(),` ↓`]},e)),(0,u.jsx)(`small`,{children:`Separate from the BIM model export. PDF is included when the service has PDF rendering configured.`})]}),(0,u.jsxs)(`div`,{className:`tradeoffs`,children:[(0,u.jsx)(`h3`,{children:U.tradeoffs}),K.tradeOffs.map((e,t)=>(0,u.jsx)(`p`,{children:e},t))]}),_===`download`?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`h3`,{children:U.download}),A?Object.keys(A.files).map(e=>(0,u.jsxs)(`button`,{className:`outline full`,onClick:()=>sn(e),children:[e.toUpperCase(),` ↓`]},e)):(0,u.jsxs)(`button`,{className:`ink full`,disabled:S||!!L||K.hasRequiredConflicts,onClick:on,children:[U.export,(0,u.jsx)(Ee,{})]}),(0,u.jsx)(`small`,{children:A?.viewerVerification??U.downloadNote})]}):(0,u.jsxs)(`div`,{className:`chat`,children:[(0,u.jsx)(`h3`,{children:U.chat}),(0,u.jsx)(`textarea`,{"aria-label":U.chat,placeholder:U.hint,value:T,maxLength:8e3,onChange:e=>E(e.target.value)}),(0,u.jsxs)(`button`,{className:`outline full`,disabled:S||!T.trim(),onClick:Yt,children:[U.send,` →`]})]})]})]}),(0,u.jsxs)(`div`,{className:`detail-grid`,children:[(0,u.jsxs)(`article`,{className:`paper schedule`,children:[(0,u.jsx)(`h3`,{children:U.schedule}),(0,u.jsxs)(`table`,{children:[(0,u.jsx)(`thead`,{children:(0,u.jsxs)(`tr`,{children:[(0,u.jsx)(`th`,{children:h(s,`Room`)}),(0,u.jsx)(`th`,{children:`W × D`}),(0,u.jsx)(`th`,{children:h(s,`Axis m²`)}),(0,u.jsx)(`th`,{children:h(s,`Net m²`)})]})}),(0,u.jsx)(`tbody`,{children:K.schedule.map(e=>(0,u.jsxs)(`tr`,{children:[(0,u.jsx)(`td`,{children:e.name}),(0,u.jsxs)(`td`,{children:[e.widthM.toFixed(2),` × `,e.depthM.toFixed(2),(0,u.jsx)(F,{language:s,report:$,path:`${e.roomId}.widthM`}),(0,u.jsx)(F,{language:s,report:$,path:`${e.roomId}.depthM`})]}),(0,u.jsxs)(`td`,{children:[e.centerlineAreaM2.toFixed(2),(0,u.jsx)(F,{language:s,report:$,path:`${e.roomId}.centerlineAreaM2`})]}),(0,u.jsxs)(`td`,{children:[e.netAreaM2.toFixed(2),(0,u.jsx)(F,{language:s,report:$,path:`${e.roomId}.netAreaM2`})]})]},e.roomId))}),(0,u.jsx)(`tfoot`,{children:(0,u.jsxs)(`tr`,{children:[(0,u.jsx)(`th`,{children:h(s,`Total`)}),(0,u.jsx)(`td`,{}),(0,u.jsxs)(`th`,{children:[K.centerlineAreaM2.toFixed(2),(0,u.jsx)(F,{language:s,report:$,path:`centerlineAreaM2`})]}),(0,u.jsxs)(`th`,{children:[K.netAreaM2.toFixed(2),(0,u.jsx)(F,{language:s,report:$,path:`netAreaM2`})]})]})})]})]}),(0,u.jsxs)(`article`,{className:`paper check-summary`,children:[(0,u.jsx)(`h3`,{children:U.checks}),(0,u.jsx)(`div`,{className:`check-counts`,children:Object.entries(_n).map(([e,t])=>(0,u.jsxs)(`span`,{children:[(0,u.jsx)(`strong`,{children:t}),e]},e))}),(0,u.jsxs)(`button`,{className:`textbtn`,onClick:()=>ke(!Oe),children:[Oe?h(s,`Hide`):U.notes,` `,Oe?`−`:`+`]}),(0,u.jsx)(`p`,{children:`Reference-only entries are disclosed, never presented as passed checks. Country statutory certification is not inferred.`})]})]}),Oe&&(0,u.jsx)(`article`,{className:`paper findings`,children:K.findings.map((e,t)=>(0,u.jsxs)(`details`,{children:[(0,u.jsxs)(`summary`,{children:[(0,u.jsx)(`span`,{className:`status `+e.status,children:e.status}),(0,u.jsx)(`code`,{children:e.ruleId}),(0,u.jsx)(`span`,{children:e.subjectId})]}),(0,u.jsx)(`p`,{children:e.measurement}),e.fix&&(0,u.jsx)(`p`,{children:e.fix}),(0,u.jsx)(`small`,{children:e.source})]},t))}),(0,u.jsx)(`p`,{className:`disclaimer`,children:U.disclaimer})]}):G?(0,u.jsxs)(`section`,{className:`paper findings`,role:`status`,children:[(0,u.jsx)(`h2`,{children:h(s,`No layout proposal is available`)}),(0,u.jsx)(`p`,{children:h(s,`Your measurements are retained. Review the engine findings and measurements before trying again.`)}),(0,u.jsxs)(`p`,{children:[h(s,`Status`),`: `,G.reconciliation.status]}),G.reconciliation.findings.map((e,t)=>(0,u.jsx)(`p`,{children:e.message},t)),(0,u.jsx)(`button`,{className:`outline`,disabled:S,onClick:()=>v(`measure`),children:h(s,`Review measurements`)}),(0,u.jsx)(`p`,{className:`disclaimer`,children:U.disclaimer})]}):null,y&&(0,u.jsx)(g,{language:s,version:y.version,busy:S,preview:!!L,open:it,versions:et,comparison:nt,left:ot,right:ct,onToggle:Qt,onLeftChange:e=>{st(e),rt(null)},onRightChange:e=>{lt(e),rt(null)},onCompare:$t,onRestore:en}),(G||Qe)&&(0,u.jsx)(Ae,{report:$,language:s})]}),(0,u.jsx)(`input`,{hidden:!0,type:`file`,ref:kt,accept:`image/png,image/jpeg,image/webp`,onChange:e=>{let t=e.target.files?.[0];t&&cn(t),e.target.value=``}})]}),S&&(0,u.jsxs)(`div`,{className:`working`,role:`status`,children:[(0,u.jsx)(`span`,{className:`spinner`}),U.generating]}),f===`studio`&&y&&xt.length>0&&(0,u.jsx)(`section`,{className:`paper saved-files`,children:(0,u.jsxs)(`details`,{children:[(0,u.jsx)(`summary`,{children:h(s,`Saved project files · download without a new export`)}),xt.map(e=>(0,u.jsxs)(`article`,{children:[(0,u.jsxs)(`strong`,{children:[e.kind,e.version?` · v`+e.version:``,e.proposalId?` · `+e.proposalId:``]}),e.files.map(t=>(0,u.jsxs)(`button`,{className:`quiet`,disabled:S,onClick:()=>gn(e,t),children:[t.format.toUpperCase(),` ↓`]},t.objectId)),e.kind===`upload`&&e.files.find(e=>[`png`,`jpeg`,`webp`].includes(e.format))&&(0,u.jsx)(`button`,{className:`outline`,disabled:S,onClick:()=>hn(e.files.find(e=>[`png`,`jpeg`,`webp`].includes(e.format)).objectId),children:h(s,`Use saved sketch`)})]},e.artifactId))]})}),!e&&N.analyticsEnabled===!0&&(0,u.jsxs)(`aside`,{className:`analytics-choice`,children:[(0,u.jsxs)(`label`,{children:[(0,u.jsx)(`input`,{type:`checkbox`,checked:Ct,onChange:e=>Wt(e.target.checked)}),` Allow optional visit and paywall analytics`]}),(0,u.jsx)(`small`,{children:`We send event type only, without drawings, dimensions, prompts, URLs or account IDs. Uncheck to withdraw consent and request deletion of this browser's client observations.`})]}),!e&&j&&ft&&(0,u.jsx)(`div`,{className:`modal-backdrop`,children:(0,u.jsxs)(`section`,{className:`modal paper`,role:`alertdialog`,"aria-modal":`true`,"aria-labelledby":`content-deletion-title`,children:[(0,u.jsx)(`h2`,{id:`content-deletion-title`,children:h(s,`Delete all project content?`)}),(0,u.jsx)(`p`,{children:h(s,`This requests removal of your projects, sketches and generated files in this service. Account identity, billing and required anti-abuse records are retained. Pending accounting may delay completion; we show the service's result.`)}),(0,u.jsx)(`button`,{className:`outline full danger`,disabled:S,onClick:fn,children:h(s,`Delete my project content`)}),(0,u.jsx)(`button`,{className:`quiet full`,disabled:S,onClick:()=>pt(!1),children:h(s,`Cancel`)})]})}),!e&&ue&&(0,u.jsx)(`div`,{className:`modal-backdrop`,children:(0,u.jsxs)(`form`,{className:`modal paper`,onSubmit:e=>{e.preventDefault(),pn()},children:[(0,u.jsx)(`button`,{type:`button`,className:`close`,"aria-label":U.close,onClick:()=>de(!1),children:`×`}),(0,u.jsx)(Te,{}),(0,u.jsx)(`h2`,{children:I===`signup`?h(s,`Create a verified account`):I===`verify`?h(s,`Verify your email`):U.signin}),C&&(0,u.jsx)(`p`,{role:`alert`,children:o===`karamentreprises`?C.replace(/Polycyphers/gi,`Karamentreprises`):C}),ie&&(0,u.jsx)(`p`,{role:`status`,children:ie}),I!==`verify`&&(0,u.jsxs)(`label`,{className:`field`,children:[U.email,(0,u.jsx)(`input`,{type:`email`,autoComplete:`email`,required:!0,value:fe,onChange:e=>pe(e.target.value)})]}),I===`verify`&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`p`,{children:`Open the verification link sent to your email, or paste its token below. Verification happens only when you submit this form.`}),(0,u.jsxs)(`label`,{className:`field`,children:[h(s,`Verification token`),(0,u.jsx)(`input`,{autoComplete:`off`,required:!0,value:Pe,onChange:e=>Fe(e.target.value)})]})]}),I!==`signup`&&(0,u.jsxs)(`label`,{className:`field`,children:[U.password,(0,u.jsx)(`input`,{type:`password`,autoComplete:I===`verify`?`new-password`:`current-password`,minLength:I===`verify`?10:void 0,required:!0,value:ge,onChange:e=>M(e.target.value)})]}),(0,u.jsx)(`button`,{className:`ink full`,disabled:S,children:I===`signup`?h(s,`Send verification email`):I===`verify`?h(s,`Verify & set password`):U.signin}),(0,u.jsxs)(`div`,{className:`account-modes`,children:[(0,u.jsx)(`button`,{type:`button`,className:`textbtn`,onClick:()=>Ne(`login`),children:h(s,`Sign in`)}),(0,u.jsx)(`button`,{type:`button`,className:`textbtn`,onClick:()=>Ne(`signup`),children:h(s,`Create account`)}),(0,u.jsx)(`button`,{type:`button`,className:`textbtn`,onClick:()=>Ne(`verify`),children:h(s,`Verify email`)})]}),typeof N.verificationCompletionUrl==`string`&&(0,u.jsxs)(`p`,{children:[`Verification destination: `,N.verificationCompletionUrl]})]})})]})}function F({report:e,path:t,language:n=`en`}){let r=e?.values.find(e=>e.path===t)??e?.values.find(e=>e.path.endsWith(`.`+t));return(0,u.jsxs)(`small`,{className:`value-tag `+(r?.origin??`missing`),title:r?.source??`No provenance supplied for this displayed value.`,children:[h(n,r?.origin??`unlabelled`),` · `,h(n,r?.origin!==`estimated`&&r?.confirmed===!0?`reviewed evidence`:`unconfirmed`)]})}function Ae({report:e,language:t}){let n=t;return(0,u.jsxs)(`section`,{className:`paper provenance`,children:[(0,u.jsx)(`h3`,{children:h(t,`Value provenance & discrepancies`)}),(0,u.jsx)(`p`,{children:e?.notice??`No provenance report was supplied. Values are unconfirmed; do not treat them as measured or verified.`}),(0,u.jsx)(`h4`,{children:h(t,`Discrepancy report`)}),e?e.discrepancies.length?e.discrepancies.map(e=>(0,u.jsxs)(`article`,{children:[(0,u.jsxs)(`strong`,{children:[e.kind,` · `,e.subject]}),(0,u.jsx)(`p`,{children:e.message}),e.appliedFix&&(0,u.jsxs)(`p`,{children:[`Applied fix: `,e.appliedFix]}),e.question&&(0,u.jsxs)(`p`,{children:[`Measurement needed: `,e.question]}),e.ruleId&&(0,u.jsx)(`code`,{children:e.ruleId})]},e.id)):(0,u.jsx)(`p`,{children:h(n,`No discrepancies reported by the engine.`)}):(0,u.jsx)(`p`,{children:h(n,`Discrepancy report unavailable.`)}),(0,u.jsxs)(`details`,{children:[(0,u.jsx)(`summary`,{children:h(n,`Every supplied value and its source`)}),(0,u.jsxs)(`table`,{children:[(0,u.jsx)(`thead`,{children:(0,u.jsxs)(`tr`,{children:[(0,u.jsx)(`th`,{children:h(n,`Value`)}),(0,u.jsx)(`th`,{children:h(n,`Origin / evidence`)}),(0,u.jsx)(`th`,{children:h(n,`Source`)})]})}),(0,u.jsx)(`tbody`,{children:e?.values.map(t=>(0,u.jsxs)(`tr`,{children:[(0,u.jsxs)(`td`,{children:[(0,u.jsx)(`code`,{children:t.path}),(0,u.jsx)(`br`,{}),t.value,` `,t.unit]}),(0,u.jsx)(`td`,{children:(0,u.jsx)(F,{language:n,report:e,path:t.path})}),(0,u.jsxs)(`td`,{children:[t.source,t.inputPaths.length>0&&(0,u.jsxs)(`small`,{children:[`Inputs: `,t.inputPaths.join(`, `)]})]})]},t.path))})]})]})]})}function je({input:e,setInput:t,onChange:n,estimatedFields:r,confirmed:i,setConfirmed:a,onGenerate:o,busy:s,onUpload:c,imageUrl:l,geometry:d,language:f}){let p=f,m=(e,i)=>{i&&(e=N(e,i,r)),t(e),n(i)},g=e.programme,_=[[`bedroomWidthM`,`Bedroom width`],[`bedroomDepthM`,`Bedroom depth`],[`bathroomWidthM`,`Bathroom width`],[`bathroomDepthM`,`Bathroom depth`],[`hallWidthM`,`Hall width`],[`wardrobeLengthM`,`Wardrobe length`],[`balconyDepthM`,`Balcony depth (0 for none)`],[`slidingDoorWidthM`,`Balcony sliding door width`]];function v(t){let n=e.footprint.edges,r=(t?[...n,{id:``,startVertexId:``,endVertexId:``,lengthM:NaN,bearingDegrees:null,direction:`Any`,wallType:`exterior`}]:n.slice(0,-1)).map((e,t,n)=>({...e,id:`W`+(t+1),startVertexId:`V`+(t+1),endVertexId:`V`+((t+1)%n.length+1)}));m({...e,footprint:{edges:r}})}return(0,u.jsxs)(`section`,{className:`measure-layout`,children:[(0,u.jsx)(`article`,{className:`paper form-card`,children:(0,u.jsxs)(`fieldset`,{disabled:s,style:{border:0,padding:0,minWidth:0},children:[(0,u.jsx)(`h2`,{children:h(p,`Measured footprint`)}),(0,u.jsx)(`p`,{children:`Enter walls in boundary order, counterclockwise. Bearings: 0° east, 90° north. Leave unknown angles blank; the solver may request one diagonal. These are your measurements, not generated dimensions.`}),(0,u.jsx)(`div`,{className:`edge-table`,children:e.footprint.edges.map((t,n)=>(0,u.jsxs)(`div`,{className:`edge-row`,children:[(0,u.jsxs)(`strong`,{children:[t.id,` `,(0,u.jsxs)(`small`,{children:[t.startVertexId,` → `,t.endVertexId]})]}),(0,u.jsxs)(`label`,{children:[h(p,`Length (m)`),` `,(0,u.jsxs)(`small`,{children:[h(p,M(e,`footprint.edges[${n}].lengthM`,r)),` · `,h(p,`unconfirmed`)]}),(0,u.jsx)(`input`,{"aria-label":`${t.id} length`,type:`number`,min:`0`,step:`any`,value:Number.isFinite(t.lengthM)?t.lengthM:``,onChange:t=>m({...e,footprint:{...e.footprint,edges:e.footprint.edges.map((e,r)=>r===n?{...e,lengthM:t.target.value===``?NaN:Number(t.target.value)}:e)}},`footprint.edges[${n}].lengthM`)})]}),(0,u.jsxs)(`label`,{children:[h(p,`Bearing (°)`),` `,(0,u.jsxs)(`small`,{children:[h(p,M(e,`footprint.edges[${n}].bearingDegrees`,r)),` · `,h(p,`unconfirmed`)]}),(0,u.jsx)(`input`,{"aria-label":`${t.id} bearing`,type:`number`,step:`0.01`,placeholder:h(p,`Unknown`),value:t.bearingDegrees??``,onChange:t=>m({...e,footprint:{...e.footprint,edges:e.footprint.edges.map((e,r)=>r===n?{...e,bearingDegrees:t.target.value===``?null:Number(t.target.value)}:e)}},`footprint.edges[${n}].bearingDegrees`)})]}),(0,u.jsxs)(`label`,{children:[h(p,`Wall`),(0,u.jsxs)(`select`,{"aria-label":`${t.id} wall type`,value:t.wallType,onChange:t=>m({...e,footprint:{...e.footprint,edges:e.footprint.edges.map((e,r)=>r===n?{...e,wallType:t.target.value}:e)}}),children:[(0,u.jsx)(`option`,{value:`exterior`,children:h(p,`Exterior`)}),(0,u.jsx)(`option`,{value:`party`,children:h(p,`Party · no openings`)})]})]})]},t.id))}),g?.source.startsWith(`User-entered`)&&(0,u.jsxs)(`div`,{className:`actions`,children:[(0,u.jsx)(`button`,{className:`outline`,disabled:e.footprint.edges.length>=64,onClick:()=>v(!0),children:h(p,`Add wall`)}),(0,u.jsx)(`button`,{className:`quiet`,disabled:e.footprint.edges.length<=3,onClick:()=>v(!1),children:h(p,`Remove last wall`)})]}),d?.suggestedDiagonal&&(0,u.jsxs)(`label`,{className:`field`,children:[`Diagonal `,d.suggestedDiagonal.startVertexId,` → `,d.suggestedDiagonal.endVertexId,` (m)`,(0,u.jsx)(`small`,{children:d.suggestedDiagonal.reason}),(0,u.jsx)(`input`,{type:`number`,min:`0`,step:`any`,value:e.footprint.diagonals?.[0]?.lengthM??``,onChange:t=>m({...e,footprint:{...e.footprint,diagonals:t.target.value?[{startVertexId:d.suggestedDiagonal.startVertexId,endVertexId:d.suggestedDiagonal.endVertexId,lengthM:Number(t.target.value)}]:[]}},`footprint.diagonals`)})]}),(0,u.jsxs)(`details`,{open:!!g,children:[(0,u.jsx)(`summary`,{children:h(p,`Room programme`)}),g?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`p`,{children:h(p,`Requested dimensions. Every value is checked by the shared engine.`)}),(0,u.jsx)(`div`,{className:`programme-grid`,children:_.map(([t,n])=>(0,u.jsxs)(`label`,{className:`field`,children:[h(p,n),` (m)`,(0,u.jsxs)(`small`,{children:[h(p,M(e,`programme.${t}`,r)),` · `,h(p,`unconfirmed`)]}),(0,u.jsx)(`input`,{type:`number`,min:`0`,step:`0.01`,value:Number.isFinite(g[t])?g[t]:``,onChange:n=>m({...e,programme:{...g,[t]:n.target.value===``?NaN:Number(n.target.value)}},`programme.${t}`)})]},t))}),[`entranceEdgeId`,`balconyEdgeId`].map(t=>(0,u.jsxs)(`label`,{className:`field`,children:[h(p,t===`entranceEdgeId`?`Entrance wall`:`Balcony wall`),(0,u.jsxs)(`select`,{value:g[t],onChange:n=>m({...e,programme:{...g,[t]:n.target.value}}),children:[(0,u.jsx)(`option`,{value:``,children:h(p,`Choose a wall`)}),e.footprint.edges.map(e=>(0,u.jsx)(`option`,{children:e.id},e.id))]})]},t))]}):(0,u.jsxs)(`p`,{children:[`This example uses engine concept programme assumptions. They remain estimated until replaced with your own dimensions. `,(0,u.jsx)(`button`,{className:`textbtn`,onClick:()=>m({...e,programme:ye(e.language).programme}),children:`Enter my own room dimensions`})]})]}),(0,u.jsxs)(`label`,{className:`field`,children:[h(p,`Main view wall`),(0,u.jsxs)(`select`,{value:e.viewEdgeId,onChange:t=>m({...e,viewEdgeId:t.target.value}),children:[(0,u.jsx)(`option`,{value:``,children:h(p,`No preference`)}),e.footprint.edges.map(e=>(0,u.jsx)(`option`,{children:e.id},e.id))]})]}),(0,u.jsxs)(`label`,{className:`field`,children:[h(p,`Clear ceiling height (m)`),(0,u.jsxs)(`small`,{children:[h(p,M(e,`buildUps.clearCeilingHeightM`,r)),` · `,h(p,`unconfirmed`)]}),(0,u.jsx)(`input`,{type:`number`,step:`0.01`,min:`0`,value:Number(e.buildUps?.clearCeilingHeightM??2.8),onChange:t=>m({...e,buildUps:{...e.buildUps,clearCeilingHeightM:Number(t.target.value)}},`buildUps.clearCeilingHeightM`)})]}),(0,u.jsx)(`p`,{children:`Other wall/slab build-ups remain labelled concept placeholders from the shared engine.`}),(0,u.jsxs)(`label`,{className:`field`,children:[h(p,`Country`),(0,u.jsxs)(`select`,{value:e.country,onChange:t=>m({...e,country:t.target.value}),children:[(0,u.jsx)(`option`,{children:`unspecified`}),(0,u.jsx)(`option`,{children:`Lebanon`}),(0,u.jsx)(`option`,{children:`Germany`})]})]}),(0,u.jsxs)(`label`,{className:`confirmation`,children:[(0,u.jsx)(`input`,{type:`checkbox`,checked:i,onChange:e=>a(e.target.checked)}),h(p,`I confirm these measured dimensions and angle assumptions.`)]}),(0,u.jsx)(`button`,{className:`ink full`,disabled:s||!i,onClick:o,children:h(p,`Check footprint & generate`)}),(0,u.jsx)(`button`,{className:`outline full`,onClick:c,children:h(p,`Attach sketch`)})]})}),(0,u.jsx)(`aside`,{className:`paper measure-sketch`,children:l?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`img`,{className:`uploaded-preview`,src:l,alt:`Your selected sketch, local preview`}),(0,u.jsx)(`p`,{children:h(p,`Local image preview. No dimensions are inferred from this display.`)})]}):(0,u.jsxs)(`div`,{className:`empty`,children:[(0,u.jsx)(`h3`,{children:h(p,`Your measurements define the plan.`)}),(0,u.jsx)(`p`,{children:h(p,`Attach your sketch for reference. There is no sample footprint hidden behind this form.`)}),(0,u.jsx)(`button`,{className:`outline`,disabled:s,onClick:c,children:h(p,`Choose sketch image`)})]})})]})}function Me({candidate:e}){let t=e.reconciliation?.status===`Unique`?e.reconciliation.solutions[0]?.vertices:null,n=new Map;for(let t of e.values.values){let e=/^sketch\.topology\.vertices\.([A-Za-z0-9_-]+)\.(x|y)$/.exec(t.path);if(e){let r=n.get(e[1])??{x:NaN,y:NaN};r[e[2]]=t.value,n.set(e[1],r)}}let r=t?.length?t.map(e=>({id:e.id,x:e.position.x,y:-e.position.y})):e.input?.edges.map(e=>({id:e.startVertexId,...n.get(e.startVertexId)})).filter(e=>Number.isFinite(e.x)&&Number.isFinite(e.y))??[];if(r.length<3||r.length!==e.input?.edges.length)return null;let i=Math.min(...r.map(e=>e.x)),a=Math.min(...r.map(e=>e.y)),o=Math.max(...r.map(e=>e.x))-i,s=Math.max(...r.map(e=>e.y))-a,c=Math.min(560/Math.max(o,1e-6),300/Math.max(s,1e-6)),l=r.map(e=>({id:e.id,x:40+(e.x-i)*c,y:40+(e.y-a)*c}));return(0,u.jsxs)(`figure`,{className:`recognized-outline`,children:[(0,u.jsxs)(`svg`,{viewBox:`0 0 640 390`,role:`img`,"aria-label":`Unconfirmed recognized outline preview`,children:[(0,u.jsx)(`polygon`,{points:l.map(e=>`${e.x},${e.y}`).join(` `),fill:`rgba(41,124,112,.07)`,stroke:`#286e62`,strokeWidth:`2`}),l.map((t,n)=>{let r=l[(n+1)%l.length],i=e.input?.edges.find(e=>e.startVertexId===t.id);return(0,u.jsxs)(`g`,{children:[(0,u.jsx)(`circle`,{cx:t.x,cy:t.y,r:`3`,fill:`#286e62`}),(0,u.jsx)(`text`,{x:t.x+5,y:t.y-7,fontSize:`10`,children:t.id}),i&&(0,u.jsxs)(`text`,{x:(t.x+r.x)/2+5,y:(t.y+r.y)/2+12,fontSize:`11`,children:[i.id,` · `,i.lengthM.toFixed(2),` m [estimated]`]})]},t.id)})]}),(0,u.jsxs)(`figcaption`,{children:[t?.length?`Deterministic closure preview from estimated inputs.`:`Image-space outline estimate; no physical scale.`,` Original recognized outline; form edits are checked when you request reconciliation.`]})]})}exports.BIM_PACKAGE_ID=v,exports.BIM_PACKAGE_VERSION=y,exports.BimStudio=Oe,exports.checkBimLicense=pe,exports.clearLicense=O,Object.defineProperty(exports,"disableTelemetry",{enumerable:!0,get:function(){return d.disableTelemetry}}),Object.defineProperty(exports,"enableTelemetry",{enumerable:!0,get:function(){return d.enableTelemetry}}),exports.setLicense=D;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));let c=require("react");c=s(c,1);let l=require("dompurify");l=s(l,1);let u=require("react/jsx-runtime"),d=require("@polycyphers/license");var f={studio:`Open studio`,pricing:`Pricing`,start:`Start with your sketch`,eyebrow:`FROM YOUR FIRST IDEA`,hero:`Room for a better idea.`,intro:`Turn a sketch into thoughtful layouts. Explore the possibilities, refine the details, and take your chosen plan into BIM.`,try:`Explore a real example`,upload:`Upload a sketch`,steps:[`Your sketch`,`Measured footprint`,`Layout proposals`,`Your BIM model`],workspace:`Apartment concept`,example:`Reference project · site-confirmed geometry`,measure:`Measurements`,proposals:`Proposals`,refine:`Refine`,download:`Download`,back:`All projects`,generate:`Generate layouts`,generating:`Checking your layout…`,area:`Wall-axis area`,net:`Clear net area`,perimeter:`Perimeter`,recommended:`Recommended`,checks:`Rule checks`,schedule:`Room schedule`,tradeoffs:`The trade-offs`,send:`Preview edit`,chat:`What would you like to change?`,hint:`Try: “Make the bedroom 3.20 wide”`,save:`Apply measurements`,undo:`Undo`,delete:`Delete project data`,export:`Build & download model`,loading:`Loading…`,select:`Choose this layout`,warning:`Needs review`,pass:`Checked`,notes:`Source notes`,confirm:`Confirm the measurements before generating. The engine checks geometry; a sketch is not a survey.`,empty:`A little information. Better possibilities.`,emptyBody:`Upload a sketch for a local preview, then enter and confirm your measured walls and room programme. The engine checks every dimension.`,privacy:`Private project storage · configurable retention`,disclaimer:`Concept proposal, not a construction drawing; verify with a licensed architect/engineer.`,free:`Your configured free allowance is shown below.`,paid:`Project pricing is shown below.`,paidBody:`A project includes its layout proposals, chat refinements and BIM export, within the configured fair-use caps.`,before:`A sketch, with potential.`,after:`A plan, with purpose.`,downloadNote:`IFC4, DWG and DXF use the same checked scene. Revit and BIMcollab Zoom acceptance remains subject to actual viewer testing.`,language:`Language`,status:`Status`,width:`Width`,depth:`Depth`,signin:`Sign in`,email:`Email`,password:`Password`,account:`Account`,cancel:`Cancel`,close:`Close`},p={en:f,de:{...f,studio:`Studio öffnen`,pricing:`Preise`,start:`Mit Ihrer Skizze starten`,eyebrow:`VON DER ERSTEN IDEE`,hero:`Raum für eine bessere Idee.`,intro:`Aus Ihrer Skizze werden durchdachte Grundrisse. Vergleichen, verfeinern und als BIM-Konzept herunterladen.`,try:`Beispiel erkunden`,upload:`Skizze hochladen`,steps:[`Ihre Skizze`,`Gemessener Umriss`,`Grundrissvorschläge`,`Ihr BIM-Modell`],measure:`Maße`,proposals:`Vorschläge`,refine:`Verfeinern`,download:`Herunterladen`,generate:`Grundrisse erstellen`,save:`Maße anwenden`,checks:`Regelprüfung`,schedule:`Raumbuch`,tradeoffs:`Abwägungen`,send:`Änderung prüfen`,chat:`Was möchten Sie ändern?`,recommended:`Empfohlen`,select:`Grundriss wählen`,undo:`Rückgängig`,delete:`Projektdaten löschen`,export:`Modell erstellen und laden`,area:`Wandachsfläche`,net:`Lichte Nettofläche`,perimeter:`Umfang`,signin:`Anmelden`,email:`E-Mail`,password:`Passwort`,cancel:`Abbrechen`,close:`Schließen`},fr:{...f,studio:`Ouvrir le studio`,pricing:`Tarifs`,start:`Commencez par votre croquis`,eyebrow:`DE VOTRE PREMIÈRE IDÉE`,hero:`Place à une meilleure idée.`,intro:`Transformez un croquis en plans réfléchis. Comparez, affinez et emportez votre concept en BIM.`,try:`Explorer un exemple réel`,upload:`Importer un croquis`,steps:[`Votre croquis`,`Contour mesuré`,`Propositions`,`Votre modèle BIM`],measure:`Mesures`,proposals:`Propositions`,refine:`Affiner`,download:`Télécharger`,generate:`Générer les plans`,save:`Appliquer les mesures`,checks:`Règles vérifiées`,schedule:`Tableau des pièces`,tradeoffs:`Les compromis`,send:`Vérifier la modification`,chat:`Que souhaitez-vous modifier ?`,recommended:`Recommandé`,select:`Choisir ce plan`,undo:`Annuler`,delete:`Supprimer les données du projet`,export:`Créer et télécharger le modèle`,area:`Surface aux axes`,net:`Surface nette`,perimeter:`Périmètre`,signin:`Se connecter`,email:`E-mail`,password:`Mot de passe`,cancel:`Annuler`,close:`Fermer`},ar:{...f,studio:`فتح الاستوديو`,pricing:`الأسعار`,start:`ابدأ برسمك`,eyebrow:`من فكرتك الأولى`,hero:`مساحة لفكرة أفضل.`,intro:`حوّل رسمك إلى مخططات مدروسة. قارن الخيارات، حسّن التفاصيل، وحمّل نموذج BIM الذي تختاره.`,try:`استكشف مثالاً حقيقياً`,upload:`ارفع رسماً`,steps:[`رسمك`,`الأبعاد المؤكدة`,`مقترحات التخطيط`,`نموذج BIM`],measure:`الأبعاد`,proposals:`المقترحات`,refine:`تعديل`,download:`تحميل`,generate:`إنشاء المخططات`,save:`تطبيق الأبعاد`,checks:`فحص القواعد`,schedule:`جدول الغرف`,tradeoffs:`المفاضلات`,send:`معاينة التعديل`,chat:`ماذا تريد أن تعدّل؟`,recommended:`موصى به`,select:`اختر هذا المخطط`,undo:`تراجع`,delete:`حذف بيانات المشروع`,export:`إنشاء النموذج وتحميله`,area:`مساحة محاور الجدران`,net:`المساحة الصافية`,perimeter:`المحيط`,signin:`تسجيل الدخول`,email:`البريد الإلكتروني`,password:`كلمة المرور`,cancel:`إلغاء`,close:`إغلاق`}};Object.assign(p.de,{workspace:`Wohnungskonzept`,example:`Referenzprojekt · vor Ort bestätigte Geometrie`,back:`Alle Projekte`,generating:`Grundriss wird geprüft…`,hint:`Zum Beispiel: „Schlafzimmer 3,20 m breit machen“`,loading:`Laden…`,warning:`Prüfung erforderlich`,pass:`Geprüft`,notes:`Quellenhinweise`,confirm:`Maße vor der Erstellung bestätigen. Die Geometrieprüfung ersetzt kein Aufmaß.`,empty:`Wenige Angaben. Bessere Möglichkeiten.`,emptyBody:`Skizze lokal ansehen, dann gemessene Wände und Raumprogramm eingeben und prüfen. Die Engine kontrolliert jede Abmessung.`,privacy:`Privater Projektspeicher · konfigurierbare Aufbewahrung`,disclaimer:`Konzeptvorschlag, keine Ausführungszeichnung; durch zugelassene Architekten oder Ingenieure prüfen lassen.`,free:`Ihr konfiguriertes Freikontingent steht unten.`,paid:`Der Projektpreis steht unten.`,paidBody:`Ein Projekt umfasst Vorschläge, Chat-Änderungen und BIM-Export innerhalb der angezeigten Nutzungslimits.`,before:`Eine Skizze mit Potenzial.`,after:`Ein Plan mit Perspektive.`,downloadNote:`IFC4, DWG und DXF verwenden dieselbe geprüfte Szene. Die Freigabe für Revit und BIMcollab Zoom erfordert tatsächliche Viewer-Tests.`,language:`Sprache`,status:`Status`,width:`Breite`,depth:`Tiefe`,account:`Konto`}),Object.assign(p.fr,{workspace:`Concept d’appartement`,example:`Projet de référence · géométrie confirmée sur site`,back:`Tous les projets`,generating:`Vérification du plan…`,hint:`Exemple : « Donner 3,20 m de largeur à la chambre »`,loading:`Chargement…`,warning:`À vérifier`,pass:`Vérifié`,notes:`Notes sur les sources`,confirm:`Confirmez les dimensions avant de générer. Le contrôle géométrique ne remplace pas un relevé.`,empty:`Quelques informations. De meilleures possibilités.`,emptyBody:`Affichez un aperçu local du croquis, puis saisissez et vérifiez les murs mesurés et le programme. Le moteur contrôle chaque dimension.`,privacy:`Stockage privé · durée de conservation configurable`,disclaimer:`Proposition conceptuelle, non destinée à la construction ; à vérifier avec un architecte ou ingénieur habilité.`,free:`Votre quota gratuit configuré figure ci-dessous.`,paid:`Le tarif du projet figure ci-dessous.`,paidBody:`Un projet comprend les propositions, les modifications par chat et l’export BIM dans les limites affichées.`,before:`Un croquis prometteur.`,after:`Un plan qui prend forme.`,downloadNote:`IFC4, DWG et DXF utilisent la même scène vérifiée. La compatibilité avec Revit et BIMcollab Zoom reste soumise à des essais réels.`,language:`Langue`,status:`État`,width:`Largeur`,depth:`Profondeur`,account:`Compte`}),Object.assign(p.ar,{workspace:`تصوّر شقة`,example:`مشروع مرجعي · هندسة مؤكدة ميدانياً`,back:`كل المشاريع`,generating:`جارٍ فحص المخطط…`,hint:`مثال: «اجعل عرض غرفة النوم 3.20 م»`,loading:`جارٍ التحميل…`,warning:`يحتاج إلى مراجعة`,pass:`تم الفحص`,notes:`ملاحظات المصادر`,confirm:`أكّد الأبعاد قبل الإنشاء. فحص الهندسة لا يحل محل الرفع الميداني.`,empty:`معلومات قليلة. خيارات أفضل.`,emptyBody:`عاين الرسم محلياً، ثم أدخل أبعاد الجدران المقاسة وبرنامج الغرف وراجعها. يفحص المحرك كل بُعد.`,privacy:`تخزين خاص للمشروع · مدة احتفاظ قابلة للضبط`,disclaimer:`مقترح تصوّري وليس مخططاً تنفيذياً؛ يجب مراجعته مع مهندس أو معماري مرخّص.`,free:`تظهر حصتك المجانية المضبوطة أدناه.`,paid:`يظهر سعر المشروع أدناه.`,paidBody:`يشمل المشروع المقترحات وتعديلات المحادثة وتصدير BIM ضمن الحدود المعروضة.`,before:`رسم يحمل إمكانات.`,after:`مخطط واضح الهدف.`,downloadNote:`تستخدم IFC4 وDWG وDXF المشهد المفحوص نفسه. يبقى اعتماد Revit وBIMcollab Zoom رهن اختبار فعلي.`,language:`اللغة`,status:`الحالة`,width:`العرض`,depth:`العمق`,account:`الحساب`});var m={de:{"New project":`Neues Projekt`,"Enter measurements":`Maße eingeben`,"Resume saved project":`Gespeichertes Projekt öffnen`,"Measured footprint":`Gemessener Umriss`,"Length (m)":`Länge (m)`,"Bearing (°)":`Richtung (°)`,Wall:`Wand`,Exterior:`Außenwand`,"Party · no openings":`Brand-/Nachbarwand · keine Öffnungen`,"Add wall":`Wand hinzufügen`,"Remove last wall":`Letzte Wand entfernen`,"Room programme":`Raumprogramm`,"Bedroom width":`Schlafzimmerbreite`,"Bedroom depth":`Schlafzimmertiefe`,"Bathroom width":`Badbreite`,"Bathroom depth":`Badtiefe`,"Hall width":`Flurbreite`,"Wardrobe length":`Schranklänge`,"Balcony depth (0 for none)":`Balkontiefe (0 ohne Balkon)`,"Balcony sliding door width":`Breite der Balkonschiebetür`,"Entrance wall":`Eingangswand`,"Balcony wall":`Balkonwand`,"Choose a wall":`Wand wählen`,"Main view wall":`Wand zur Hauptaussicht`,"No preference":`Keine Präferenz`,"Clear ceiling height (m)":`Lichte Raumhöhe (m)`,Country:`Land`,"Check footprint & generate":`Umriss prüfen und erstellen`,"Attach sketch":`Skizze anhängen`,"Choose sketch image":`Skizzenbild wählen`,"Unsaved edit preview":`Nicht gespeicherte Änderungsvorschau`,"Apply as new version":`Als neue Version übernehmen`,"Discard preview":`Vorschau verwerfen`,"Create a verified account":`Verifiziertes Konto erstellen`,"Verify your email":`E-Mail bestätigen`,"Verification token":`Bestätigungscode`,"Send verification email":`Bestätigungs-E-Mail senden`,"Verify & set password":`Bestätigen und Passwort setzen`,"Create account":`Konto erstellen`,"Verify email":`E-Mail bestätigen`,"Sign in":`Anmelden`,"Value provenance & discrepancies":`Werteherkunft und Abweichungen`,"Discrepancy report":`Abweichungsbericht`},fr:{"New project":`Nouveau projet`,"Enter measurements":`Saisir les mesures`,"Resume saved project":`Reprendre le projet`,"Measured footprint":`Contour mesuré`,"Length (m)":`Longueur (m)`,"Bearing (°)":`Orientation (°)`,Wall:`Mur`,Exterior:`Extérieur`,"Party · no openings":`Mitoyen · sans ouverture`,"Add wall":`Ajouter un mur`,"Remove last wall":`Retirer le dernier mur`,"Room programme":`Programme des pièces`,"Bedroom width":`Largeur de chambre`,"Bedroom depth":`Profondeur de chambre`,"Bathroom width":`Largeur de salle de bains`,"Bathroom depth":`Profondeur de salle de bains`,"Hall width":`Largeur du dégagement`,"Wardrobe length":`Longueur du placard`,"Balcony depth (0 for none)":`Profondeur du balcon (0 sans balcon)`,"Balcony sliding door width":`Largeur de baie coulissante`,"Entrance wall":`Mur de l’entrée`,"Balcony wall":`Mur du balcon`,"Choose a wall":`Choisir un mur`,"Main view wall":`Mur vers la vue principale`,"No preference":`Sans préférence`,"Clear ceiling height (m)":`Hauteur libre (m)`,Country:`Pays`,"Check footprint & generate":`Vérifier le contour et générer`,"Attach sketch":`Joindre le croquis`,"Choose sketch image":`Choisir le croquis`,"Unsaved edit preview":`Aperçu non enregistré`,"Apply as new version":`Appliquer comme nouvelle version`,"Discard preview":`Abandonner l’aperçu`,"Create a verified account":`Créer un compte vérifié`,"Verify your email":`Vérifier votre e-mail`,"Verification token":`Code de vérification`,"Send verification email":`Envoyer l’e-mail de vérification`,"Verify & set password":`Vérifier et définir le mot de passe`,"Create account":`Créer un compte`,"Verify email":`Vérifier l’e-mail`,"Sign in":`Se connecter`,"Value provenance & discrepancies":`Origine des valeurs et écarts`,"Discrepancy report":`Rapport des écarts`},ar:{"New project":`مشروع جديد`,"Enter measurements":`أدخل الأبعاد`,"Resume saved project":`استئناف المشروع المحفوظ`,"Measured footprint":`المحيط المقاس`,"Length (m)":`الطول (م)`,"Bearing (°)":`الاتجاه (°)`,Wall:`الجدار`,Exterior:`خارجي`,"Party · no openings":`مشترك · بلا فتحات`,"Add wall":`إضافة جدار`,"Remove last wall":`حذف آخر جدار`,"Room programme":`برنامج الغرف`,"Bedroom width":`عرض غرفة النوم`,"Bedroom depth":`عمق غرفة النوم`,"Bathroom width":`عرض الحمام`,"Bathroom depth":`عمق الحمام`,"Hall width":`عرض الممر`,"Wardrobe length":`طول الخزانة`,"Balcony depth (0 for none)":`عمق الشرفة (0 بدون شرفة)`,"Balcony sliding door width":`عرض باب الشرفة المنزلق`,"Entrance wall":`جدار المدخل`,"Balcony wall":`جدار الشرفة`,"Choose a wall":`اختر جداراً`,"Main view wall":`جدار الإطلالة الرئيسية`,"No preference":`بلا تفضيل`,"Clear ceiling height (m)":`ارتفاع السقف الصافي (م)`,Country:`البلد`,"Check footprint & generate":`فحص المحيط وإنشاء المقترحات`,"Attach sketch":`إرفاق الرسم`,"Choose sketch image":`اختيار صورة الرسم`,"Unsaved edit preview":`معاينة تعديل غير محفوظ`,"Apply as new version":`تطبيق كإصدار جديد`,"Discard preview":`إلغاء المعاينة`,"Create a verified account":`إنشاء حساب موثّق`,"Verify your email":`تأكيد البريد الإلكتروني`,"Verification token":`رمز التحقق`,"Send verification email":`إرسال رسالة التحقق`,"Verify & set password":`تأكيد وتعيين كلمة المرور`,"Create account":`إنشاء حساب`,"Verify email":`تأكيد البريد`,"Sign in":`تسجيل الدخول`,"Value provenance & discrepancies":`مصادر القيم والفروقات`,"Discrepancy report":`تقرير الفروقات`}};Object.assign(m.de,{"Plan your next space":`Ihren nächsten Raum planen`,"Apartment layout":`Wohnungsgrundriss`,"House extension":`Hausanbau`,Renovation:`Renovierung`,"Account options":`Kontooptionen`,"Account actions":`Kontoaktionen`,"Delete project content":`Projektinhalte löschen`,"Sign out":`Abmelden`,"Before image upload":`Vor dem Bild-Upload`,"I have permission to use this image for this project.":`Ich darf dieses Bild für dieses Projekt verwenden.`,"I understand the AI image-processing disclosure above.":`Ich habe den obigen Hinweis zur KI-Bildverarbeitung verstanden.`,"What would you like to create?":`Was möchten Sie erstellen?`,"Upload for scanning":`Zur Sicherheitsprüfung hochladen`,"Remove local image":`Lokales Bild entfernen`,"What should the sketch reader focus on?":`Worauf soll die Skizzenanalyse achten?`,"Read saved sketch with AI · observations only":`Gespeicherte Skizze mit KI lesen · nur Beobachtungen`,"Recognized outline · estimated":`Erkannter Umriss · geschätzt`,"Preview recognized outline":`Erkannten Umriss ansehen`,"Local estimated preview only. The saved project is unchanged.":`Nur lokale Schätzvorschau. Das gespeicherte Projekt bleibt unverändert.`,"Sketch observations to confirm":`Zu prüfende Skizzenbeobachtungen`,"Required layout checks passed":`Erforderliche Grundrissprüfungen bestanden`,"Reference sources remain visible below.":`Referenzquellen stehen weiterhin unten.`,"Project billing":`Projektabrechnung`,"Continue to Stripe":`Weiter zu Stripe`,"Refresh project quote":`Projektangebot aktualisieren`,"View project price":`Projektpreis ansehen`,"Purchases are not enabled in this environment.":`Käufe sind in dieser Umgebung deaktiviert.`,"2D concept drawings":`2D-Konzeptzeichnungen`,"Prepare PDF / editable DXF / SVG":`PDF / bearbeitbares DXF / SVG vorbereiten`,Room:`Raum`,"Axis m²":`Achsfläche m²`,"Net m²":`Netto m²`,Total:`Summe`,Hide:`Ausblenden`,"Saved project files · download without a new export":`Gespeicherte Projektdateien · ohne neuen Export laden`,"Use saved sketch":`Gespeicherte Skizze verwenden`,"Allow optional visit and paywall analytics":`Optionale Besuchs- und Bezahlschrankenanalyse erlauben`,"Delete all project content?":`Alle Projektinhalte löschen?`,"Delete my project content":`Meine Projektinhalte löschen`,Cancel:`Abbrechen`,"Every supplied value and its source":`Alle angegebenen Werte und ihre Quellen`,"No discrepancies reported by the engine.":`Keine Abweichungen von der Engine gemeldet.`,"Discrepancy report unavailable.":`Abweichungsbericht nicht verfügbar.`,Value:`Wert`,"Origin / evidence":`Herkunft / Nachweis`,Source:`Quelle`,estimated:`geschätzt`,"user-given":`Nutzereingabe`,measured:`gemessen`,calculated:`berechnet`,unconfirmed:`unbestätigt`,"reviewed evidence":`geprüfter Nachweis`,unlabelled:`ohne Herkunft`,Unknown:`Unbekannt`,"Requested dimensions. Every value is checked by the shared engine.":`Gewünschte Maße. Jeder Wert wird von der gemeinsamen Engine geprüft.`,"I confirm these measured dimensions and angle assumptions.":`Ich bestätige diese gemessenen Maße und Winkelannahmen.`,"Your measurements define the plan.":`Ihre Maße bestimmen den Plan.`,"Local image preview. No dimensions are inferred from this display.":`Lokale Bildvorschau. Aus dieser Anzeige werden keine Maße abgeleitet.`,"Attach your sketch for reference. There is no sample footprint hidden behind this form.":`Skizze als Referenz anhängen. Hinter diesem Formular liegt kein versteckter Beispielumriss.`,"The service scans and normalizes the image before storing it. Selecting a file alone does not send it to an AI provider. “Read saved sketch” sends the sanitized image to Anthropic Claude only when you request that step. EU storage is separate from inference location; provider region and data-processing terms require service configuration.":`Der Dienst prüft und normalisiert das Bild vor der Speicherung. Die Dateiauswahl allein sendet es nicht an einen KI-Anbieter. Erst die angeforderte Skizzenanalyse übermittelt das bereinigte Bild an Anthropic Claude. EU-Speicherung bestimmt nicht den Ort der KI-Verarbeitung; Anbieterregion und Datenschutzbedingungen müssen konfiguriert werden.`,"Reading sends this sanitized image to Anthropic Claude. EU storage and provider inference location are separate; provider data-processing terms must be configured by the service.":`Die Analyse sendet dieses bereinigte Bild an Anthropic Claude. EU-Speicherung und KI-Verarbeitungsort sind getrennt; der Dienst muss die Datenschutzbedingungen konfigurieren.`,"This requests removal of your projects, sketches and generated files in this service. Account identity, billing and required anti-abuse records are retained. Pending accounting may delay completion; we show the service's result.":`Damit wird die Löschung Ihrer Projekte, Skizzen und erzeugten Dateien in diesem Dienst angefordert. Kontoidentität, Abrechnungsdaten und notwendige Missbrauchsschutzdaten bleiben erhalten. Offene Abrechnung kann den Abschluss verzögern; das Ergebnis des Dienstes wird angezeigt.`}),Object.assign(m.fr,{"Plan your next space":`Préparez votre prochain espace`,"Apartment layout":`Plan d’appartement`,"House extension":`Extension de maison`,Renovation:`Rénovation`,"Account options":`Options du compte`,"Account actions":`Actions du compte`,"Delete project content":`Supprimer le contenu des projets`,"Sign out":`Se déconnecter`,"Before image upload":`Avant l’envoi de l’image`,"I have permission to use this image for this project.":`Je dispose de l’autorisation d’utiliser cette image pour ce projet.`,"I understand the AI image-processing disclosure above.":`J’ai compris les informations ci-dessus sur le traitement des images par IA.`,"What would you like to create?":`Que souhaitez-vous créer ?`,"Upload for scanning":`Envoyer pour contrôle de sécurité`,"Remove local image":`Retirer l’image locale`,"What should the sketch reader focus on?":`Sur quoi la lecture du croquis doit-elle porter ?`,"Read saved sketch with AI · observations only":`Lire le croquis enregistré par IA · observations seules`,"Recognized outline · estimated":`Contour reconnu · estimé`,"Preview recognized outline":`Prévisualiser le contour reconnu`,"Local estimated preview only. The saved project is unchanged.":`Aperçu estimé local uniquement. Le projet enregistré est inchangé.`,"Sketch observations to confirm":`Observations du croquis à confirmer`,"Required layout checks passed":`Contrôles requis du plan réussis`,"Reference sources remain visible below.":`Les sources de référence restent visibles ci-dessous.`,"Project billing":`Facturation du projet`,"Continue to Stripe":`Continuer vers Stripe`,"Refresh project quote":`Actualiser le devis du projet`,"View project price":`Voir le prix du projet`,"Purchases are not enabled in this environment.":`Les achats ne sont pas activés dans cet environnement.`,"2D concept drawings":`Dessins conceptuels 2D`,"Prepare PDF / editable DXF / SVG":`Préparer PDF / DXF modifiable / SVG`,Room:`Pièce`,"Axis m²":`Surface aux axes m²`,"Net m²":`Nette m²`,Total:`Total`,Hide:`Masquer`,"Saved project files · download without a new export":`Fichiers enregistrés · télécharger sans nouvel export`,"Use saved sketch":`Utiliser le croquis enregistré`,"Allow optional visit and paywall analytics":`Autoriser les statistiques facultatives de visite et de paiement`,"Delete all project content?":`Supprimer tout le contenu des projets ?`,"Delete my project content":`Supprimer le contenu de mes projets`,Cancel:`Annuler`,"Every supplied value and its source":`Chaque valeur fournie et sa source`,"No discrepancies reported by the engine.":`Aucun écart signalé par le moteur.`,"Discrepancy report unavailable.":`Rapport des écarts indisponible.`,Value:`Valeur`,"Origin / evidence":`Origine / preuve`,Source:`Source`,estimated:`estimé`,"user-given":`fourni par l’utilisateur`,measured:`mesuré`,calculated:`calculé`,unconfirmed:`non confirmé`,"reviewed evidence":`preuve vérifiée`,unlabelled:`sans origine`,Unknown:`Inconnu`,"Requested dimensions. Every value is checked by the shared engine.":`Dimensions demandées. Chaque valeur est contrôlée par le moteur partagé.`,"I confirm these measured dimensions and angle assumptions.":`Je confirme ces dimensions mesurées et hypothèses d’angles.`,"Your measurements define the plan.":`Vos mesures définissent le plan.`,"Local image preview. No dimensions are inferred from this display.":`Aperçu local de l’image. Aucune dimension n’est déduite de cet affichage.`,"Attach your sketch for reference. There is no sample footprint hidden behind this form.":`Joignez votre croquis comme référence. Aucun contour exemple n’est caché dans ce formulaire.`,"The service scans and normalizes the image before storing it. Selecting a file alone does not send it to an AI provider. “Read saved sketch” sends the sanitized image to Anthropic Claude only when you request that step. EU storage is separate from inference location; provider region and data-processing terms require service configuration.":`Le service contrôle et normalise l’image avant stockage. La sélection d’un fichier ne l’envoie pas à un fournisseur d’IA. Seule la lecture explicitement demandée transmet l’image assainie à Anthropic Claude. Le stockage dans l’UE ne détermine pas le lieu d’inférence ; la région du fournisseur et les conditions de traitement doivent être configurées.`,"Reading sends this sanitized image to Anthropic Claude. EU storage and provider inference location are separate; provider data-processing terms must be configured by the service.":`La lecture transmet cette image assainie à Anthropic Claude. Le stockage dans l’UE et le lieu d’inférence sont distincts ; le service doit configurer les conditions de traitement.`,"This requests removal of your projects, sketches and generated files in this service. Account identity, billing and required anti-abuse records are retained. Pending accounting may delay completion; we show the service's result.":`Cette demande concerne les projets, croquis et fichiers générés dans ce service. L’identité du compte, la facturation et les données anti-abus nécessaires sont conservées. Une comptabilisation en attente peut retarder la suppression ; le résultat du service sera affiché.`}),Object.assign(m.ar,{"Plan your next space":`خطّط لمساحتك القادمة`,"Apartment layout":`تخطيط شقة`,"House extension":`توسعة منزل`,Renovation:`تجديد`,"Account options":`خيارات الحساب`,"Account actions":`إجراءات الحساب`,"Delete project content":`حذف محتوى المشاريع`,"Sign out":`تسجيل الخروج`,"Before image upload":`قبل رفع الصورة`,"I have permission to use this image for this project.":`لدي إذن باستخدام هذه الصورة لهذا المشروع.`,"I understand the AI image-processing disclosure above.":`أفهم توضيح معالجة الصورة بالذكاء الاصطناعي أعلاه.`,"What would you like to create?":`ماذا تريد إنشاءه؟`,"Upload for scanning":`رفع للفحص الأمني`,"Remove local image":`إزالة الصورة المحلية`,"What should the sketch reader focus on?":`على ماذا يجب أن تركز قراءة الرسم؟`,"Read saved sketch with AI · observations only":`قراءة الرسم المحفوظ بالذكاء الاصطناعي · ملاحظات فقط`,"Recognized outline · estimated":`المحيط المستخرج · تقديري`,"Preview recognized outline":`معاينة المحيط المستخرج`,"Local estimated preview only. The saved project is unchanged.":`معاينة تقديرية محلية فقط. المشروع المحفوظ لم يتغير.`,"Sketch observations to confirm":`ملاحظات الرسم المطلوب مراجعتها`,"Required layout checks passed":`اجتازت اختبارات التخطيط المطلوبة`,"Reference sources remain visible below.":`تبقى المصادر المرجعية ظاهرة أدناه.`,"Project billing":`فواتير المشروع`,"Continue to Stripe":`المتابعة إلى Stripe`,"Refresh project quote":`تحديث عرض سعر المشروع`,"View project price":`عرض سعر المشروع`,"Purchases are not enabled in this environment.":`عمليات الشراء غير مفعّلة في هذه البيئة.`,"2D concept drawings":`رسومات تصوّرية ثنائية الأبعاد`,"Prepare PDF / editable DXF / SVG":`إعداد PDF / DXF قابل للتحرير / SVG`,Room:`الغرفة`,"Axis m²":`مساحة المحاور م²`,"Net m²":`الصافي م²`,Total:`المجموع`,Hide:`إخفاء`,"Saved project files · download without a new export":`ملفات المشروع المحفوظة · تحميل دون تصدير جديد`,"Use saved sketch":`استخدام الرسم المحفوظ`,"Allow optional visit and paywall analytics":`السماح بتحليلات الزيارة والدفع الاختيارية`,"Delete all project content?":`حذف محتوى جميع المشاريع؟`,"Delete my project content":`حذف محتوى مشاريعي`,Cancel:`إلغاء`,"Every supplied value and its source":`كل قيمة واردة ومصدرها`,"No discrepancies reported by the engine.":`لم يبلغ المحرك عن اختلافات.`,"Discrepancy report unavailable.":`تقرير الفروقات غير متاح.`,Value:`القيمة`,"Origin / evidence":`المصدر / الدليل`,Source:`المرجع`,estimated:`تقديري`,"user-given":`أدخله المستخدم`,measured:`مقاس`,calculated:`محسوب`,unconfirmed:`غير مؤكّد`,"reviewed evidence":`دليل مُراجع`,unlabelled:`بلا مصدر`,Unknown:`غير معروف`,"Requested dimensions. Every value is checked by the shared engine.":`الأبعاد المطلوبة. يفحص المحرك المشترك كل قيمة.`,"I confirm these measured dimensions and angle assumptions.":`أؤكّد هذه الأبعاد المقاسة وافتراضات الزوايا.`,"Your measurements define the plan.":`أبعادك تحدد المخطط.`,"Local image preview. No dimensions are inferred from this display.":`معاينة محلية للصورة. لا تُستنتج أبعاد من هذا العرض.`,"Attach your sketch for reference. There is no sample footprint hidden behind this form.":`أرفق رسمك كمرجع. لا يوجد محيط نموذجي مخفي خلف هذا النموذج.`,"The service scans and normalizes the image before storing it. Selecting a file alone does not send it to an AI provider. “Read saved sketch” sends the sanitized image to Anthropic Claude only when you request that step. EU storage is separate from inference location; provider region and data-processing terms require service configuration.":`يفحص النظام الصورة ويوحّد تنسيقها قبل التخزين. اختيار الملف وحده لا يرسله إلى مزوّد ذكاء اصطناعي. تُرسل الصورة المنقّحة إلى Anthropic Claude فقط عند طلب قراءة الرسم المحفوظ. التخزين الأوروبي مستقل عن موقع المعالجة؛ يجب ضبط منطقة المزوّد وشروط معالجة البيانات.`,"Reading sends this sanitized image to Anthropic Claude. EU storage and provider inference location are separate; provider data-processing terms must be configured by the service.":`ترسل القراءة هذه الصورة المنقّحة إلى Anthropic Claude. التخزين الأوروبي وموقع المعالجة مستقلان؛ يجب أن يضبط النظام شروط معالجة البيانات.`,"This requests removal of your projects, sketches and generated files in this service. Account identity, billing and required anti-abuse records are retained. Pending accounting may delay completion; we show the service's result.":`يطلب هذا حذف المشاريع والرسوم والملفات الناتجة في هذه الخدمة. تبقى هوية الحساب والفواتير وسجلات مكافحة الإساءة الضرورية محفوظة. قد تؤخر المحاسبة المعلّقة الإتمام؛ نعرض نتيجة الخدمة.`}),Object.assign(m.de,{"Verifying component license…":`Komponentenlizenz wird geprüft…`,"A valid component license is required":`Eine gültige Komponentenlizenz ist erforderlich`,"The studio stays closed until its installation license and signed revocation status are verified.":`Das Studio bleibt geschlossen, bis Installationslizenz und signierter Sperrstatus geprüft sind.`,"Check license again":`Lizenz erneut prüfen`,"License management":`Lizenzverwaltung`}),Object.assign(m.fr,{"Verifying component license…":`Vérification de la licence du composant…`,"A valid component license is required":`Une licence valide du composant est requise`,"The studio stays closed until its installation license and signed revocation status are verified.":`Le studio reste fermé tant que la licence d’installation et son état de révocation signé ne sont pas vérifiés.`,"Check license again":`Vérifier à nouveau la licence`,"License management":`Gestion des licences`}),Object.assign(m.ar,{"Verifying component license…":`جارٍ التحقق من ترخيص المكوّن…`,"A valid component license is required":`يلزم ترخيص صالح للمكوّن`,"The studio stays closed until its installation license and signed revocation status are verified.":`يبقى الاستوديو مغلقاً حتى التحقق من ترخيص التثبيت وحالة الإلغاء الموقّعة.`,"Check license again":`إعادة فحص الترخيص`,"License management":`إدارة التراخيص`}),Object.assign(m.de,{"No layout proposal is available":`Kein Grundrissvorschlag verfügbar`,"Your measurements are retained. Review the engine findings and measurements before trying again.":`Ihre Maße bleiben erhalten. Prüfen Sie die Hinweise der Engine und die Maße vor einem neuen Versuch.`,"Review measurements":`Maße überprüfen`}),Object.assign(m.fr,{"No layout proposal is available":`Aucune proposition de plan disponible`,"Your measurements are retained. Review the engine findings and measurements before trying again.":`Vos mesures sont conservées. Vérifiez les observations du moteur et les mesures avant de réessayer.`,"Review measurements":`Vérifier les mesures`}),Object.assign(m.ar,{"No layout proposal is available":`لا يتوفر مقترح مخطط`,"Your measurements are retained. Review the engine findings and measurements before trying again.":`تبقى أبعادك محفوظة. راجع ملاحظات المحرك والأبعاد قبل المحاولة مجدداً.`,"Review measurements":`مراجعة الأبعاد`}),Object.assign(m.de,{"Saved as a new version. Earlier versions are unchanged.":`Als neue Version gespeichert. Frühere Versionen bleiben unverändert.`,"Hide version history":`Versionsverlauf ausblenden`,"Version history & compare":`Versionsverlauf und Vergleich`,"Saved versions":`Gespeicherte Versionen`,"History and comparison are read-only. Restoring creates a new version after the service checks the current version.":`Verlauf und Vergleich sind schreibgeschützt. Eine Wiederherstellung erstellt nach Prüfung der aktuellen Version eine neue Version.`,"Earlier version":`Frühere Version`,"Later version":`Spätere Version`,"Compare saved versions":`Gespeicherte Versionen vergleichen`,"Restore earlier version":`Frühere Version wiederherstellen`,"Footprint area change":`Änderung der Grundfläche`,"Engine comparison of saved inputs. Source measurements retain their uncertainty.":`Engine-Vergleich gespeicherter Eingaben. Die Ausgangsmaße behalten ihre Unsicherheit.`,"Selected layout":`Gewählter Grundriss`,"Changed inputs":`Geänderte Eingaben`,"No input changes reported.":`Keine geänderten Eingaben gemeldet.`}),Object.assign(m.fr,{"Saved as a new version. Earlier versions are unchanged.":`Enregistré comme nouvelle version. Les versions précédentes restent inchangées.`,"Hide version history":`Masquer l’historique`,"Version history & compare":`Historique et comparaison`,"Saved versions":`Versions enregistrées`,"History and comparison are read-only. Restoring creates a new version after the service checks the current version.":`L’historique et la comparaison sont en lecture seule. La restauration crée une nouvelle version après contrôle de la version actuelle.`,"Earlier version":`Version précédente`,"Later version":`Version suivante`,"Compare saved versions":`Comparer les versions enregistrées`,"Restore earlier version":`Restaurer la version précédente`,"Footprint area change":`Variation de surface du contour`,"Engine comparison of saved inputs. Source measurements retain their uncertainty.":`Comparaison des entrées enregistrées par le moteur. Les mesures sources conservent leur incertitude.`,"Selected layout":`Plan sélectionné`,"Changed inputs":`Entrées modifiées`,"No input changes reported.":`Aucune modification des entrées signalée.`}),Object.assign(m.ar,{"Saved as a new version. Earlier versions are unchanged.":`حُفظ كنسخة جديدة. تبقى النسخ السابقة دون تغيير.`,"Hide version history":`إخفاء سجل النسخ`,"Version history & compare":`سجل النسخ والمقارنة`,"Saved versions":`النسخ المحفوظة`,"History and comparison are read-only. Restoring creates a new version after the service checks the current version.":`السجل والمقارنة للقراءة فقط. تنشئ الاستعادة نسخة جديدة بعد تحقق النظام من النسخة الحالية.`,"Earlier version":`النسخة السابقة`,"Later version":`النسخة اللاحقة`,"Compare saved versions":`مقارنة النسخ المحفوظة`,"Restore earlier version":`استعادة النسخة السابقة`,"Footprint area change":`تغيّر مساحة المحيط`,"Engine comparison of saved inputs. Source measurements retain their uncertainty.":`مقارنة المحرك للمدخلات المحفوظة. تبقى أبعاد المصدر غير مؤكدة.`,"Selected layout":`المخطط المختار`,"Changed inputs":`المدخلات المتغيّرة`,"No input changes reported.":`لم تُسجّل تغييرات في المدخلات.`}),Object.assign(m.de,{"Pending inputs are saved privately. They are not an accepted result.":`Ausstehende Eingaben sind privat gespeichert. Sie sind noch kein bestätigtes Ergebnis.`,"This paid project reached its configured limit. Another purchase will not extend its allowance.":`Dieses bezahlte Projekt hat seine festgelegte Grenze erreicht. Ein weiterer Kauf erweitert das Kontingent nicht.`}),Object.assign(m.fr,{"Pending inputs are saved privately. They are not an accepted result.":`Les données en attente sont enregistrées en privé. Elles ne constituent pas encore un résultat accepté.`,"This paid project reached its configured limit. Another purchase will not extend its allowance.":`Ce projet payé a atteint sa limite configurée. Un nouvel achat n’augmentera pas son quota.`}),Object.assign(m.ar,{"Pending inputs are saved privately. They are not an accepted result.":`حُفظت المدخلات المعلقة بشكل خاص. وهي ليست نتيجة معتمدة بعد.`,"This paid project reached its configured limit. Another purchase will not extend its allowance.":`وصل هذا المشروع المدفوع إلى الحد المحدد. لن تزيد عملية شراء أخرى حصته.`});function h(e,t){return e===`en`?t:m[e][t]??t}function ee({language:e,version:t,busy:n,preview:r,open:i,versions:a,comparison:o,left:s,right:c,onToggle:l,onLeftChange:d,onRightChange:f,onCompare:p,onRestore:m}){let ee=a?.some(e=>e.version===s),te=a?.some(e=>e.version===c);return(0,u.jsxs)(`section`,{className:`paper version-history`,children:[(0,u.jsx)(`button`,{className:`outline`,disabled:n,"aria-expanded":i,"aria-controls":`bim-version-history`,onClick:l,children:h(e,i?`Hide version history`:`Version history & compare`)}),i&&a&&(0,u.jsxs)(`div`,{id:`bim-version-history`,children:[(0,u.jsx)(`h3`,{children:h(e,`Saved versions`)}),(0,u.jsx)(`p`,{children:h(e,`History and comparison are read-only. Restoring creates a new version after the service checks the current version.`)}),(0,u.jsx)(`ul`,{children:a.map(t=>(0,u.jsxs)(`li`,{children:[(0,u.jsxs)(`strong`,{children:[`v`,t.version]}),` · `,new Date(t.createdAtUtc).toLocaleString(e),t.selectedProposalId?` · `+t.selectedProposalId:``,t.note?` · `+t.note:``]},t.version))}),(0,u.jsxs)(`div`,{className:`actions`,children:[(0,u.jsxs)(`label`,{className:`field`,children:[h(e,`Earlier version`),(0,u.jsx)(`select`,{disabled:n,value:s,onChange:e=>d(Number(e.target.value)),children:a.map(e=>(0,u.jsxs)(`option`,{value:e.version,children:[`v`,e.version]},e.version))})]}),(0,u.jsxs)(`label`,{className:`field`,children:[h(e,`Later version`),(0,u.jsx)(`select`,{disabled:n,value:c,onChange:e=>f(Number(e.target.value)),children:a.map(e=>(0,u.jsxs)(`option`,{value:e.version,children:[`v`,e.version]},e.version))})]}),(0,u.jsx)(`button`,{className:`outline`,disabled:n||s===c||!ee||!te,onClick:p,children:h(e,`Compare saved versions`)}),(0,u.jsx)(`button`,{className:`outline`,disabled:n||r||s===t||!ee,onClick:m,children:h(e,`Restore earlier version`)})]}),o&&(0,u.jsxs)(`article`,{className:`comparison-summary`,role:`status`,children:[(0,u.jsxs)(`h4`,{children:[`v`,o.leftVersion,` → v`,o.rightVersion]}),o.areaDeltaM2!=null&&(0,u.jsxs)(`p`,{children:[h(e,`Footprint area change`),`: `,o.areaDeltaM2.toLocaleString(e,{maximumFractionDigits:4}),` m² `,(0,u.jsxs)(`small`,{className:`value-tag`,children:[h(e,`calculated`),` · `,h(e,`unconfirmed`)]})]}),(0,u.jsx)(`p`,{children:h(e,`Engine comparison of saved inputs. Source measurements retain their uncertainty.`)}),(0,u.jsxs)(`p`,{children:[h(e,`Selected layout`),`: `,o.leftProposalId??`—`,` → `,o.rightProposalId??`—`]}),(0,u.jsx)(`h4`,{children:h(e,`Changed inputs`)}),o.changedInputs.length?(0,u.jsx)(`ul`,{children:o.changedInputs.map((e,t)=>(0,u.jsx)(`li`,{children:e},t))}):(0,u.jsx)(`p`,{children:h(e,`No input changes reported.`)})]})]})]})}var te=()=>({schemaVersion:1,units:`m`,vertices:[],boundaryVertexIds:[],walls:[],rooms:[],openings:[]}),ne=e=>({value:e,origin:`user-given`,source:`Explicitly entered in existing-plan review.`}),g=()=>({value:NaN,origin:`estimated`,source:`Unspecified; enter a known value before review.`}),_=e=>e.values.values.filter(t=>(t.origin===`measured`||t.origin===`user-given`)&&(!e.requiredReviewPaths||e.requiredReviewPaths.includes(t.path))).map(e=>e.path),re=e=>[...e.vertices.flatMap(e=>[e.x,e.y]),...e.walls.map(e=>e.thickness),...e.openings.flatMap(e=>[e.offset,e.width])].every(e=>Number.isFinite(e.value));function v(e){let t=new Map,n=(e,n)=>{let r=e+`:`+n,i=t.get(r);return i||(i=crypto.randomUUID().replaceAll(`-`,``),t.set(r,i)),i},r=e=>e?{value:e.value,origin:`estimated`,source:e.source}:g();return{schemaVersion:1,units:e.units,vertices:e.vertices.map(e=>({id:n(`v`,e.id),x:r(e.x),y:r(e.y)})),boundaryVertexIds:e.boundaryVertexIds.map(e=>n(`v`,e)),walls:e.walls.map(e=>({...e,id:n(`w`,e.id),startVertexId:n(`v`,e.startVertexId),endVertexId:n(`v`,e.endVertexId),thickness:r(e.thickness)})),rooms:e.rooms.map(e=>({...e,id:n(`r`,e.id),vertexIds:e.vertexIds.map(e=>n(`v`,e))})),openings:e.openings.map(e=>({...e,id:n(`o`,e.id),hostWallId:n(`w`,e.hostWallId),offset:r(e.offset),width:r(e.width),height:null,sill:null}))}}var ie={en:`Preserve an existing plan,Enter known coordinates and review boundaries before export. Optional image observations remain unconfirmed and cannot establish physical scale.,Load saved plan,Corners,Add corner,Use corners as outer boundary,Walls,Add wall,Start,End,Thickness,Rooms,Add room,Name,Corner numbers in boundary order,Openings,Add opening,Host wall,Position,Width,Height,Sill,Review geometry,Save reviewed plan,I checked these user-given values against my source. Estimates remain unconfirmed.,Export reviewed plan,Saved revision,Restore revision,Restore,Remove,Download,Unsaved changes,Type`.split(`,`),de:`Bestehenden Plan erhalten,Bekannte Koordinaten und Grenzen vor dem Export prüfen. Optionale Bildbeobachtungen bleiben unbestätigt und bestätigen keinen physischen Maßstab.,Plan laden,Ecken,Ecke hinzufügen,Ecken als Außenumriss verwenden,Wände,Wand hinzufügen,Anfang,Ende,Dicke,Räume,Raum hinzufügen,Name,Eckennummern in Umrissreihenfolge,Öffnungen,Öffnung hinzufügen,Wand,Position,Breite,Höhe,Brüstung,Geometrie prüfen,Geprüften Plan speichern,Ich habe die Nutzerangaben mit meiner Quelle verglichen. Schätzwerte bleiben unbestätigt.,Geprüften Plan exportieren,Gespeicherte Version,Version wiederherstellen,Wiederherstellen,Entfernen,Herunterladen,Ungespeicherte Änderungen,Art`.split(`,`),fr:`Conserver un plan existant,Saisir les coordonnées connues et vérifier les limites avant export. Les observations d’image restent non confirmées et ne valident aucune échelle physique.,Charger le plan,Sommets,Ajouter un sommet,Utiliser comme contour extérieur,Murs,Ajouter un mur,Début,Fin,Épaisseur,Pièces,Ajouter une pièce,Nom,Numéros des sommets dans l’ordre du contour,Ouvertures,Ajouter une ouverture,Mur support,Position,Largeur,Hauteur,Allège,Vérifier la géométrie,Enregistrer le plan vérifié,J’ai vérifié ces valeurs avec ma source. Les estimations restent non confirmées.,Exporter le plan vérifié,Version enregistrée,Restaurer la version,Restaurer,Supprimer,Télécharger,Modifications non enregistrées,Type`.split(`,`),ar:`الحفاظ على مخطط قائم,أدخل الإحداثيات المعروفة وراجع الحدود قبل التصدير. تبقى ملاحظات الصورة غير مؤكدة ولا تثبت مقياساً فعلياً.,تحميل المخطط,الزوايا,إضافة زاوية,استخدام الزوايا كحدود خارجية,الجدران,إضافة جدار,البداية,النهاية,السماكة,الغرف,إضافة غرفة,الاسم,أرقام الزوايا بترتيب الحدود,الفتحات,إضافة فتحة,الجدار,الموضع,العرض,الارتفاع,العتبة,فحص الهندسة,حفظ المخطط المراجع,راجعت القيم المقدمة مع مصدري. تبقى التقديرات غير مؤكدة.,تصدير المخطط المراجع,الإصدار المحفوظ,استعادة الإصدار,استعادة,إزالة,تنزيل,تغييرات غير محفوظة,النوع`.split(`,`)},ae=()=>crypto.randomUUID().replaceAll(`-`,``);function y({projectId:e,projectVersion:t,language:n,api:r,onState:i,onDownload:a,disabled:o=!1,sourceObjectId:s,imageUrl:d,pendingDraft:f,persistPending:p,onPendingSaved:m,registerPendingSaver:h,loadSavedOnMount:ee=!1}){let[y,oe]=(0,c.useState)(()=>f?.graph??te()),[b,se]=(0,c.useState)(f?.baseDigitizationRevision??0),[x,S]=(0,c.useState)(null),[C,w]=(0,c.useState)(!!f?.graph),[T,E]=(0,c.useState)(!1),[D,O]=(0,c.useState)(``),[ce,k]=(0,c.useState)(!1),[le,A]=(0,c.useState)(null),[j,ue]=(0,c.useState)(1),[de,fe]=(0,c.useState)([`svg`,`dxf`]),[pe,me]=(0,c.useState)(!1),[he,ge]=(0,c.useState)(50),[M,N]=(0,c.useState)(f?.sourceObjectId??s),[_e,ve]=(0,c.useState)(!1),[P,F]=(0,c.useState)(null),[ye,be]=(0,c.useState)(null),[I,xe]=(0,c.useState)(``),[Se,Ce]=(0,c.useState)(``),[we,Te]=(0,c.useState)(``),[Ee,De]=(0,c.useState)(()=>f?.graph?JSON.stringify(f.graph):null),L=(0,c.useRef)(0),R=(0,c.useRef)(!0),Oe=(0,c.useRef)(!1),z=(0,c.useRef)(r),ke=(0,c.useRef)(i);z.current=r,ke.current=i;let B=o,V=ie[n],Ae=`/projects/${e}/digitization`,H=(0,c.useRef)(t),U=(0,c.useRef)({g:y,revision:b,source:M,dirty:C,persistPending:p,onPendingSaved:m});U.current={g:y,revision:b,source:M,dirty:C,persistPending:p,onPendingSaved:m};async function je(){let t=U.current;if(!t.persistPending||!t.dirty&&t.revision>0)return null;if(!re(t.g))throw Error(`Enter known numeric values before preserving this draft or checkout. Missing values are never replaced with zero.`);let n=L.current,r=await t.persistPending({workflow:`existing-plan`,graph:t.g,sourceObjectId:t.source,baseDigitizationRevision:t.revision},H.current,e);if(!R.current||n!==L.current)throw new DOMException(`The pending workspace changed.`,`AbortError`);return H.current=r.version,De(JSON.stringify(t.g)),t.onPendingSaved?.(r),r}(0,c.useEffect)(()=>(h?.(je),()=>h?.(null)),[h]),(0,c.useEffect)(()=>(R.current=!0,()=>{R.current=!1,L.current++,ke.current({busy:!1,hasUnsavedChanges:!1})}),[]),(0,c.useEffect)(()=>{ke.current({busy:T,hasUnsavedChanges:C&&JSON.stringify(y)!==Ee})},[T,C,y,Ee]),(0,c.useEffect)(()=>{t!==H.current&&(H.current=t,L.current++,S(null),k(!1),A(null),f?.graph&&(oe(f.graph),De(JSON.stringify(f.graph)),se(f.baseDigitizationRevision??0),w(!0)))},[t]),(0,c.useEffect)(()=>{L.current++,b>0&&M!==s&&w(!0),N(s),F(null),be(null),ve(!1),k(!1),S(null),A(null)},[s]),(0,c.useEffect)(()=>{if(!f?.graph&&!ee)return;let e=L.current;z.current(Ae).then(t=>{R.current&&e===L.current&&t&&Number.isInteger(t.revision)&&(f?.graph?t.revision<=U.current.revision||(L.current++,se(t.revision),S(null),k(!1),A(null),O(`The saved plan changed. Your pending observations are restored; review them again before saving.`)):G(t))}).catch(()=>{})},[]);function W(e){L.current++,oe(e),w(!0),S(null),A(null),k(!1)}async function Me(e,t){let n=L.current,r=await z.current(e,t);if(!R.current||n!==L.current)throw new DOMException(`The reviewed workspace changed.`,`AbortError`);return r}async function Ne(e){if(!(Oe.current||B)){Oe.current=!0,E(!0),O(``);try{await e()}catch(e){R.current&&!(e instanceof DOMException&&e.name===`AbortError`)&&O(e instanceof Error?e.message:String(e))}finally{Oe.current=!1,R.current&&E(!1)}}}function G(e){R.current&&(N(e.sourceObjectId??s),F(null),be(null),ve(!1),oe(e.graph),se(e.revision),S({...e.review,svg:e.svg??e.review.svg,pricingNotice:e.pricingNotice??e.review.pricingNotice}),w(!1),De(null),k(!1),A(null),fe(e.availableFormats??[`svg`,`dxf`]),me(!1))}let K=(e,t,n=!1)=>(0,u.jsx)(`button`,{type:`button`,className:`outline`,disabled:T||B||n,onClick:t,children:e});function q(e,t,n){return(0,u.jsxs)(`label`,{className:`field`,children:[e,` (`,y.units,`)`,(0,u.jsx)(`input`,{type:`number`,step:`any`,value:!Number.isFinite(t.value)||t.origin===`estimated`?``:t.value,placeholder:t.origin===`estimated`&&Number.isFinite(t.value)?String(t.value):void 0,onChange:e=>{let t=e.currentTarget.valueAsNumber;n(Number.isFinite(t)?ne(t):{value:NaN,origin:`estimated`,source:`Unspecified; enter a known value before review.`})}}),(0,u.jsxs)(`small`,{children:[t.origin,t.origin===`estimated`&&Number.isFinite(t.value)?`: `+t.value:``,` · `,t.source]})]})}function Pe(e,t,n){return(0,u.jsxs)(`label`,{className:`field`,children:[e,(0,u.jsxs)(`select`,{value:t,onChange:e=>n(e.target.value),children:[(0,u.jsx)(`option`,{value:``,children:`—`}),y.vertices.map((e,t)=>(0,u.jsx)(`option`,{value:e.id,children:t+1},e.id))]})]})}return(0,u.jsxs)(`details`,{className:`digitization-review paper`,children:[(0,u.jsxs)(`summary`,{children:[V[0],` `,C&&(0,u.jsx)(`small`,{children:V[31]})]}),(0,u.jsxs)(`fieldset`,{disabled:T||B,style:{border:0,padding:0,minWidth:0},children:[(0,u.jsx)(`p`,{children:V[1]}),(0,u.jsxs)(`label`,{children:[{en:`Input units`,de:`Eingabeeinheit`,fr:`Unité des données`,ar:`وحدات الإدخال`}[n],(0,u.jsx)(`select`,{disabled:T||B,value:y.units,onChange:e=>W({...y,units:e.target.value}),children:[`m`,`cm`,`mm`].map(e=>(0,u.jsx)(`option`,{children:e},e))})]}),K(V[2],()=>void Ne(async()=>{let e=await Me(Ae);e?G(e):O({en:`No saved existing plan yet.`,de:`Noch kein bestehender Plan gespeichert.`,fr:`Aucun plan existant enregistré.`,ar:`لا يوجد مخطط قائم محفوظ بعد.`}[n])}),C),b>0&&(0,u.jsxs)(`p`,{children:[V[26],` `,b]}),M&&(0,u.jsxs)(`section`,{children:[(0,u.jsxs)(`label`,{children:[(0,u.jsx)(`input`,{type:`checkbox`,checked:_e,disabled:T||B,onChange:e=>ve(e.target.checked)}),{en:`Send this saved image to Anthropic for unconfirmed image-coordinate observations. This does not establish physical scale.`,de:`Gespeichertes Bild an Anthropic für unbestätigte Bildkoordinaten senden. Dies bestätigt keinen Maßstab.`,fr:`Envoyer cette image à Anthropic pour des observations non confirmées. Aucune échelle physique ne sera confirmée.`,ar:`إرسال الصورة المحفوظة إلى Anthropic لملاحظات غير مؤكدة. هذا لا يحدد مقياساً فعلياً.`}[n]]}),K({en:`Read image observations`,de:`Bildbeobachtungen lesen`,fr:`Lire les observations de l’image`,ar:`قراءة ملاحظات الصورة`}[n],()=>void Ne(async()=>{let e=await Me(Ae+`/recognize`,{expectedProjectVersion:H.current,expectedRevision:b,operationId:ae(),sourceObjectId:M,intent:`Identify existing boundaries, walls, rooms and openings as unconfirmed image coordinates only.`,allowAiProcessing:!0});R.current&&(F(e),be(null),xe(``),Ce(``),Te(``))}),!_e),P&&(0,u.jsxs)(`div`,{role:`status`,children:[(0,u.jsx)(`p`,{children:{en:`Estimated image tracing only. Physical calibration and reviewed measurements are still required; no metric plan was adopted.`,de:`Nur geschätzte Bildkonturen. Physische Kalibrierung und geprüfte Maße fehlen; kein metrischer Plan wurde übernommen.`,fr:`Tracé estimatif uniquement. Calibration et mesures vérifiées restent nécessaires ; aucun plan métrique adopté.`,ar:`تتبع تقديري للصورة فقط. ما زالت المعايرة والقياسات المراجعة مطلوبة؛ لم يتم اعتماد مخطط متري.`}[n]}),P.questions.map((e,t)=>(0,u.jsx)(`p`,{children:e},t)),P.candidate&&(0,u.jsxs)(`svg`,{"aria-label":`Unconfirmed image-coordinate tracing`,viewBox:`0 0 ${P.candidate.imageWidthPx} ${P.candidate.imageHeightPx}`,style:{width:`100%`,maxHeight:350},children:[d&&M===s&&(0,u.jsx)(`image`,{href:d,width:P.candidate.imageWidthPx,height:P.candidate.imageHeightPx}),` `,P.candidate.walls.map(e=>{let t=P.candidate.vertices.find(t=>t.id===e.startVertexId),n=P.candidate.vertices.find(t=>t.id===e.endVertexId);return t&&n?(0,u.jsx)(`line`,{x1:t.xPx,y1:t.yPx,x2:n.xPx,y2:n.yPx,stroke:`#397e70`,strokeWidth:`2`},e.id):null}),P.candidate.vertices.map(e=>(0,u.jsxs)(`g`,{children:[(0,u.jsx)(`circle`,{cx:e.xPx,cy:e.yPx,r:Math.max(3,P.candidate.imageWidthPx/120),fill:e.id===I||e.id===Se?`#bd641c`:`#397e70`}),(0,u.jsx)(`text`,{x:e.xPx+5,y:e.yPx-5,fontSize:Math.max(8,P.candidate.imageWidthPx/60),fill:`#1f2b28`,children:e.id})]},e.id))]})]})]}),P?.candidate&&(0,u.jsxs)(`section`,{children:[(0,u.jsx)(`h3`,{children:{en:`Calibration preview — not confirmed dimensions`,de:`Kalibrierungsvorschau — keine bestätigten Maße`,fr:`Aperçu calibré — mesures non confirmées`,ar:`معاينة المعايرة — قياسات غير مؤكدة`}[n]}),(0,u.jsx)(`p`,{children:{en:`Choose two endpoints and enter their known distance in metres. The selected start point is the coordinate origin. Uniform scaling assumes a rectified image; perspective remains uncorrected.`,de:`Zwei Endpunkte und ihren bekannten Abstand in Metern angeben. Der Anfang ist der Ursprung. Gleichmäßige Skalierung setzt ein entzerrtes Bild voraus; Perspektive bleibt unkorrigiert.`,fr:`Choisir deux points et saisir leur distance connue en mètres. Le début est l’origine. Une image rectifiée est supposée ; la perspective reste non corrigée.`,ar:`اختر نقطتين وأدخل المسافة المعروفة بالأمتار. نقطة البداية هي الأصل. يفترض التحجيم صورة مصححة؛ المنظور يبقى دون تصحيح.`}[n]}),[[`start`,I,xe],[`end`,Se,Ce]].map(([e,t,n])=>(0,u.jsxs)(`label`,{children:[e===`start`?V[8]:V[9],(0,u.jsxs)(`select`,{disabled:T||B,value:t,onChange:e=>{n(e.target.value),L.current++,be(null)},children:[(0,u.jsx)(`option`,{value:``,children:`—`}),P.candidate.vertices.map(e=>(0,u.jsx)(`option`,{value:e.id,children:e.id},e.id))]})]},e)),(0,u.jsxs)(`label`,{children:[{en:`Known distance (m)`,de:`Bekannter Abstand (m)`,fr:`Distance connue (m)`,ar:`المسافة المعروفة (م)`}[n],(0,u.jsx)(`input`,{type:`number`,min:`0`,step:`any`,disabled:T||B,value:we,onChange:e=>{Te(e.target.value),L.current++,be(null)}})]}),K({en:`Preview calibrated suggestions`,de:`Kalibrierte Vorschläge anzeigen`,fr:`Afficher les suggestions calibrées`,ar:`عرض اقتراحات المعايرة`}[n],()=>void Ne(async()=>{let e=await Me(Ae+`/calibrate`,{expectedProjectVersion:H.current,expectedRevision:b,candidate:P.candidate,sourceObjectId:M,calibration:{startVertexId:I,endVertexId:Se,originVertexId:I,knownLength:ne(Number(we)),units:`m`}});R.current&&be(e)}),!I||!Se||I===Se||!Number.isFinite(Number(we))||Number(we)<=0),ye&&(0,u.jsxs)(`div`,{role:`status`,children:[ye.findings.map((e,t)=>(0,u.jsxs)(`p`,{children:[e.code,`: `,e.message]},t)),ye.questions.map((e,t)=>(0,u.jsx)(`p`,{children:e},t)),ye.draft&&K({en:`Start review from unconfirmed suggestions`,de:`Unbestätigte Vorschläge einzeln prüfen`,fr:`Vérifier les suggestions non confirmées`,ar:`بدء مراجعة الاقتراحات غير المؤكدة`}[n],()=>W(v(ye.draft)),C)]})]}),(0,u.jsxs)(`fieldset`,{disabled:T||B,children:[(0,u.jsx)(`legend`,{children:V[3]}),y.vertices.map((e,t)=>(0,u.jsxs)(`article`,{children:[(0,u.jsx)(`strong`,{children:t+1}),q(`X`,e.x,t=>W({...y,vertices:y.vertices.map(n=>n.id===e.id?{...n,x:t}:n)})),q(`Y`,e.y,t=>W({...y,vertices:y.vertices.map(n=>n.id===e.id?{...n,y:t}:n)})),K(V[29],()=>W({...y,vertices:y.vertices.filter(t=>t.id!==e.id)}))]},e.id)),K(V[4],()=>W({...y,vertices:[...y.vertices,{id:ae(),x:g(),y:g()}]})),K(V[5],()=>W({...y,boundaryVertexIds:y.vertices.map(e=>e.id)}),y.vertices.length<3)]}),(0,u.jsxs)(`fieldset`,{disabled:T||B,children:[(0,u.jsx)(`legend`,{children:V[6]}),y.walls.map(e=>(0,u.jsxs)(`article`,{children:[Pe(V[8],e.startVertexId,t=>W({...y,walls:y.walls.map(n=>n.id===e.id?{...n,startVertexId:t}:n)})),Pe(V[9],e.endVertexId,t=>W({...y,walls:y.walls.map(n=>n.id===e.id?{...n,endVertexId:t}:n)})),q(V[10],e.thickness,t=>W({...y,walls:y.walls.map(n=>n.id===e.id?{...n,thickness:t}:n)})),(0,u.jsxs)(`label`,{children:[V[32],(0,u.jsx)(`select`,{value:e.type,onChange:t=>W({...y,walls:y.walls.map(n=>n.id===e.id?{...n,type:t.target.value}:n)}),children:[`exterior`,`party`,`interior`].map(e=>(0,u.jsx)(`option`,{children:e},e))})]}),K(V[29],()=>W({...y,walls:y.walls.filter(t=>t.id!==e.id)}))]},e.id)),K(V[7],()=>W({...y,walls:[...y.walls,{id:ae(),startVertexId:``,endVertexId:``,thickness:g(),type:`interior`}]}))]}),(0,u.jsxs)(`fieldset`,{disabled:T||B,children:[(0,u.jsx)(`legend`,{children:V[11]}),y.rooms.map(e=>(0,u.jsxs)(`article`,{children:[(0,u.jsxs)(`label`,{children:[V[13],(0,u.jsx)(`input`,{value:e.name,onChange:t=>W({...y,rooms:y.rooms.map(n=>n.id===e.id?{...n,name:t.target.value}:n)})})]}),(0,u.jsxs)(`label`,{children:[{en:`Room use`,de:`Raumnutzung`,fr:`Usage de la pièce`,ar:`استخدام الغرفة`}[n],(0,u.jsx)(`input`,{value:e.function,onChange:t=>W({...y,rooms:y.rooms.map(n=>n.id===e.id?{...n,function:t.target.value}:n)})})]}),(0,u.jsxs)(`label`,{children:[V[14],(0,u.jsx)(`input`,{value:e.vertexIds.map(e=>y.vertices.findIndex(t=>t.id===e)+1).join(`,`),onChange:t=>W({...y,rooms:y.rooms.map(n=>n.id===e.id?{...n,vertexIds:t.target.value.split(`,`).map(e=>y.vertices[Number(e.trim())-1]?.id??``)}:n)})})]}),K(V[29],()=>W({...y,rooms:y.rooms.filter(t=>t.id!==e.id)}))]},e.id)),K(V[12],()=>W({...y,rooms:[...y.rooms,{id:ae(),name:``,function:`unspecified`,vertexIds:[]}]}))]}),(0,u.jsxs)(`fieldset`,{disabled:T||B,children:[(0,u.jsx)(`legend`,{children:V[15]}),y.openings.map(e=>(0,u.jsxs)(`article`,{children:[(0,u.jsxs)(`label`,{children:[V[32],(0,u.jsxs)(`select`,{value:e.kind,onChange:t=>W({...y,openings:y.openings.map(n=>n.id===e.id?{...n,kind:t.target.value}:n)}),children:[(0,u.jsx)(`option`,{children:`door`}),(0,u.jsx)(`option`,{children:`window`})]})]}),(0,u.jsxs)(`label`,{children:[{en:`Opening operation`,de:`Öffnungsart`,fr:`Fonctionnement`,ar:`طريقة الفتح`}[n],(0,u.jsx)(`select`,{value:e.operation,onChange:t=>W({...y,openings:y.openings.map(n=>n.id===e.id?{...n,operation:t.target.value}:n)}),children:[`unknown`,`hinged-left`,`hinged-right`,`sliding`,`fixed`].map(e=>(0,u.jsx)(`option`,{children:e},e))})]}),(0,u.jsxs)(`label`,{children:[V[17],(0,u.jsxs)(`select`,{value:e.hostWallId,onChange:t=>W({...y,openings:y.openings.map(n=>n.id===e.id?{...n,hostWallId:t.target.value}:n)}),children:[(0,u.jsx)(`option`,{value:``,children:`—`}),y.walls.map((e,t)=>(0,u.jsx)(`option`,{value:e.id,children:t+1},e.id))]})]}),[`offset`,`width`,`height`,`sill`].map((t,n)=>(0,u.jsx)(c.default.Fragment,{children:q(V[18+n],e[t]??g(),n=>W({...y,openings:y.openings.map(r=>r.id===e.id?{...r,[t]:(t===`height`||t===`sill`)&&!Number.isFinite(n.value)?null:n}:r)}))},t)),K(V[29],()=>W({...y,openings:y.openings.filter(t=>t.id!==e.id)}))]},e.id)),K(V[16],()=>W({...y,openings:[...y.openings,{id:ae(),kind:`door`,hostWallId:``,offset:g(),width:g(),height:null,sill:null,operation:`unknown`}]}))]}),K(V[22],()=>void Ne(async()=>{let e=await Me(Ae+`/review`,{expectedProjectVersion:H.current,expectedRevision:b,graph:y,sourceObjectId:M});R.current&&(S(e),k(!1))}),!re(y)),x&&(0,u.jsxs)(`section`,{"aria-live":`polite`,children:[x.pricingNotice&&(0,u.jsx)(`p`,{children:x.pricingNotice}),x.svg&&(0,u.jsx)(`div`,{className:`engine-svg`,dangerouslySetInnerHTML:{__html:l.default.sanitize(x.svg,{USE_PROFILES:{svg:!0,svgFilters:!0}})}}),(0,u.jsx)(`ul`,{children:x.findings.map((e,t)=>(0,u.jsxs)(`li`,{children:[(0,u.jsx)(`strong`,{children:e.code}),` `,e.message,` `,e.suggestedAction]},t))}),(0,u.jsxs)(`details`,{children:[(0,u.jsx)(`summary`,{children:V[22]}),x.values.values.map(e=>(0,u.jsxs)(`p`,{children:[e.path,`: `,e.value,` `,e.unit,` [`,e.origin,`]`]},e.path)),x.values.discrepancies.map(e=>(0,u.jsxs)(`p`,{children:[e.message,` `,e.question]},e.id))]}),(0,u.jsxs)(`label`,{children:[(0,u.jsx)(`input`,{type:`checkbox`,disabled:T||B,checked:ce,onChange:e=>k(e.target.checked)}),V[24]]}),K(V[23],()=>void Ne(async()=>{await je(),G(await Me(Ae,{expectedProjectVersion:H.current,expectedRevision:b,operationId:ae(),graph:y,sourceObjectId:M,reviewContentHash:x.contentHash,reviewedValuePaths:_(x)}))}),!ce||!x.geometryValidated||!C&&b>0&&x.canExport||(x.requiredReviewPaths?.some(e=>!_(x).includes(e))??!1))]}),de.includes(`pdf`)&&(0,u.jsxs)(`label`,{children:[`PDF`,(0,u.jsx)(`input`,{type:`checkbox`,disabled:T||B,checked:pe,onChange:e=>{me(e.target.checked),A(null)}}),(0,u.jsxs)(`select`,{"aria-label":`PDF scale / paper`,disabled:T||B,value:he,onChange:e=>{ge(Number(e.target.value)),A(null)},children:[(0,u.jsx)(`option`,{value:50,children:`1:50 · A2`}),(0,u.jsx)(`option`,{value:100,children:`1:100 · A3`})]}),(0,u.jsx)(`small`,{children:`100% · 1:100: compact labels`})]}),K(V[25],()=>void Ne(async()=>{let e=await Me(Ae+`/exports`,{expectedProjectVersion:H.current,expectedRevision:b,operationId:ae(),formats:pe?[`svg`,`dxf`,`pdf`]:[`svg`,`dxf`],scaleDenominator:he,paperSize:he===50?`A2`:`A3`});R.current&&A(e)}),C||!x?.canExport||b<1),b>1&&(0,u.jsxs)(`label`,{children:[V[27],(0,u.jsx)(`input`,{type:`number`,min:`1`,max:b-1,value:j,onChange:e=>ue(e.target.valueAsNumber)}),K(V[28],()=>void Ne(async()=>G(await Me(Ae+`/undo`,{expectedProjectVersion:H.current,expectedRevision:b,targetRevision:j,operationId:ae()}))),C)]}),le&&Object.keys(le.files).map(e=>(0,u.jsx)(c.default.Fragment,{children:K(V[30]+` `+e.toUpperCase(),()=>a(e,le),C)},e)),D&&(0,u.jsx)(`p`,{role:`alert`,children:D}),(0,u.jsx)(`p`,{children:`Concept proposal, not a construction drawing; verify with a licensed architect/engineer.`})]})]})}var oe=`0.1.4`;(0,d.disableTelemetry)();var b=`bim`,se=oe,x=`https://licenseapi.polycyphers.com/api/license/revoked.json`,S=`polycyphers-revocation-list`,C=1048576,w=86400,T=6e4,E=``,D=0,O=`not_set`,ce=null,k=null,le=new Set;function A(e){(0,d.setBrand)(e===`karamentreprises`?`karament`:null)}function j(e){let t=typeof e==`string`?e.trim():``;if(t!==E){E=t,D++,ce=null,O=t?`checking`:`not_set`;for(let e of le)try{e()}catch{}}}function ue(){j(``)}function de(e){return le.add(e),()=>{le.delete(e)}}function fe(){return ce?Date.now()>=ce.expires?`expired`:Date.now()<ce.until?ce.status:`checking`:O}function pe(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function me(e,t=256){return typeof e==`string`&&e.length>0&&e.length<=t&&!/[\u0000-\u001f\u007f]/.test(e)}function he(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>0}function ge(e){if(e.length>32768||!/^[-_A-Za-z0-9]+\.[-_A-Za-z0-9]+$/.test(e))return null;try{let t=Uint8Array.from(atob(e.split(`.`)[0].replace(/-/g,`+`).replace(/_/g,`/`)),e=>e.charCodeAt(0)),n=JSON.parse(new TextDecoder(`utf-8`,{fatal:!0}).decode(t));return pe(n)?n:null}catch{return null}}function M(e){if(e===`*`)return!0;let t=e.split(`.`),n=se.split(`.`);return t.length<=3&&t.every((e,t)=>e===`x`||e===`*`||/^\d+$/.test(e)&&e===n[t])}function N(e){if(!me(e,253))return!1;let t=e.toLowerCase().replace(/^\*\./,``).replace(/^\./,``);return/^\[[0-9a-f:]+\]$/.test(t)||t.split(`.`).every(e=>/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/.test(e))}function _e(e,t){let n=e.toLowerCase();return n===t?!0:n.startsWith(`*.`)?t.endsWith(n.slice(1))&&t.length>n.length-1:n.startsWith(`.`)?t===n.slice(1)||t.endsWith(n):!1}async function ve(e){if(!e.ok)throw Error(`License service unavailable`);let t=e.headers.get(`content-length`);if(t&&(!/^\d+$/.test(t)||Number(t)>C))throw Error(`License response too large`);if(!e.body)throw Error(`License response missing`);let n=e.body.getReader(),r=0,i=[];try{for(;;){let e=await n.read();if(e.done)break;if(r+=e.value.byteLength,r>C)throw Error(`License response too large`);i.push(e.value)}}finally{await n.cancel().catch(()=>{}),n.releaseLock()}let a=new Uint8Array(r),o=0;for(let e of i)a.set(e,o),o+=e.byteLength;return JSON.parse(new TextDecoder(`utf-8`,{fatal:!0}).decode(a))}async function P(e,t){let n=new AbortController,r=setTimeout(()=>n.abort(),8e3);try{let r=await ve(await fetch(x,{credentials:`omit`,cache:`no-store`,redirect:`error`,signal:n.signal}));if(!pe(r)||typeof r.token!=`string`||r.token.length>C||!he(r.iat)||!Array.isArray(r.revoked)||r.revoked.length>1e5||!r.revoked.every(e=>me(e,128)))throw Error(`Invalid revocation envelope`);let i=r.revoked,a=await(0,d.verifySystemMessage)(r.token,S,t);if(!a.ok)throw Error(`Invalid signed revocation list`);let o=a.payload;if(!he(o.iat)||!he(o.exp)||o.exp<=t||o.exp<=o.iat||o.exp-o.iat>w||o.iat>t+60||t-o.iat>w||o.iat!==r.iat||!Array.isArray(o.revoked)||o.revoked.length!==r.revoked.length||!o.revoked.every((e,t)=>me(e,128)&&e===i[t]))throw Error(`Stale or inconsistent revocation list`);return{revoked:r.revoked.includes(e),expires:Math.min(o.exp,o.iat+w)*1e3}}finally{clearTimeout(r)}}async function F(e=!1){let t=fe();if(!e&&t===`licensed`)return t;if(!E)return`not_set`;if(k?.epoch===D)return k.promise;let n=D,r=E,i=(async()=>{let e=`invalid_signature`,t=null;try{let n=ge(r);if(!n||!me(n.sub))return`invalid_signature`;let i=Math.floor(Date.now()/1e3),a=await(0,d.verifySystemMessage)(r,n.sub,i);if(!a.ok)return a.status;let o=a.payload;if(!me(o.sub)||!me(o.jti,128)||!he(o.iat)||!he(o.exp)||o.iat>i+60||o.exp<=o.iat)return`invalid_signature`;if(![`pro`,`team`,`enterprise`,`internal`].includes(String(o.tier)))return`wrong_tier`;if(o.exp<=i)return`expired`;if(!Array.isArray(o.pkg)||!o.pkg.length||o.pkg.length>32||!o.pkg.every(e=>me(e,128))||!o.pkg.includes(`bim`)||o.pkg.includes(`Polycyphers.Bim`))return`wrong_package`;if(typeof o.ver!=`string`||o.ver.length>64||!M(o.ver))return`wrong_version`;let s=typeof location>`u`?``:location.hostname.toLowerCase();if(!s||!Array.isArray(o.dom)||!o.dom.length||o.dom.length>64||!o.dom.every(N)||!o.dom.some(e=>_e(e,s)))return`wrong_domain`;let c=await P(o.jti,i);if(c.revoked)return`revoked`;let l=Math.min(o.exp*1e3,c.expires);return o.exp*1e3<=Date.now()?`expired`:l<=Date.now()?`unavailable`:(e=`licensed`,t={until:Math.min(l,Date.now()+T),expires:l,status:e},e)}catch{return`unavailable`}finally{n===D&&(ce=t,O=t?.status??`unavailable`)}})();k={epoch:n,promise:i};try{let e=await i;return n===D?(O=e,e):fe()}finally{k?.promise===i&&(k=null)}}function ye(e,t){if(typeof e.priceMinorUnits!=`number`||!Number.isFinite(e.priceMinorUnits)||typeof e.currency!=`string`)return null;try{let n=new Intl.NumberFormat(t,{style:`currency`,currency:e.currency}),r=n.resolvedOptions().maximumFractionDigits??2;return n.format(e.priceMinorUnits/10**r)}catch{return null}}function be(e){return typeof e.freeProposalGenerations==`number`&&typeof e.freeBimExports==`number`?{proposals:e.freeProposalGenerations,exports:e.freeBimExports}:null}function I(e){return`polycyphers.bim.project.v1:`+encodeURIComponent(e)}function xe(e,t){try{let n=e.getItem(I(t));return n&&/^[a-f0-9]{32}$/i.test(n)?n:null}catch{return null}}function Se(e,t,n){try{n&&/^[a-f0-9]{32}$/i.test(n)?e.setItem(I(t),n):e.removeItem(I(t))}catch{}}function Ce(e){return{footprint:{edges:Array.from({length:4},(e,t)=>({id:`W`+(t+1),startVertexId:`V`+(t+1),endVertexId:`V`+((t+1)%4+1),lengthM:NaN,bearingDegrees:null,direction:`Any`,wallType:`exterior`}))},programme:{bedroomWidthM:NaN,bedroomDepthM:NaN,bathroomWidthM:NaN,bathroomDepthM:NaN,hallWidthM:NaN,wardrobeLengthM:NaN,balconyDepthM:NaN,slidingDoorWidthM:NaN,balconyEdgeId:``,entranceEdgeId:``,source:`User-entered project programme; dimensions require engine validation`},buildUps:null,viewEdgeId:``,country:`unspecified`,language:e}}function we(e){if(e.footprint.edges.length<3||e.footprint.edges.some(e=>!Number.isFinite(e.lengthM)||e.lengthM<=0||e.bearingDegrees!==null&&!Number.isFinite(e.bearingDegrees)))return`Enter every measured wall length. Leave an unknown bearing blank.`;if(e.programme){let t=e.programme;if([t.bedroomWidthM,t.bedroomDepthM,t.bathroomWidthM,t.bathroomDepthM,t.hallWidthM,t.wardrobeLengthM,t.slidingDoorWidthM].some(e=>!Number.isFinite(e)||e<=0)||!Number.isFinite(t.balconyDepthM)||t.balconyDepthM<0||!t.entranceEdgeId||!t.balconyEdgeId)return`Complete the room programme and choose the entrance and balcony walls.`}return null}function Te(e,t){return!!e&&!!t&&e.isChanged&&e.expectedVersion===t.version&&e.snapshot.projectId===t.projectId}function Ee(e){let t=e?.toLowerCase().split(/[-_]/)[0];return t===`de`||t===`fr`||t===`ar`?t:`en`}function De(e,t,n){return n.some(e=>e.toLowerCase()===t.toLowerCase())?`estimated`:e.valueOrigins?e.valueOrigins.userGivenPaths.some(e=>e.toLowerCase()===t.toLowerCase())?`user-given`:`estimated`:t.startsWith(`programme.`)?e.programme?.source.startsWith(`User-entered`)?`user-given`:`estimated`:t.startsWith(`buildUps.`)?`estimated`:`user-given`}function L(e,t,n){let r=e.valueOrigins?.userGivenPaths??[...e.footprint.edges.flatMap((e,t)=>[...Number.isFinite(e.lengthM)?[`footprint.edges[${t}].lengthM`]:[],...e.bearingDegrees==null?[]:[`footprint.edges[${t}].bearingDegrees`]]),...Object.entries(e.programme??{}).filter(([,e])=>typeof e==`number`&&Number.isFinite(e)).map(([e])=>`programme.`+e)].filter(t=>De(e,t,n)===`user-given`);return{...e,valueOrigins:{userGivenPaths:[...r.filter(e=>e.toLowerCase()!==t.toLowerCase()),t]}}}var R=(0,c.createContext)(`baulynq`),Oe=()=>location.pathname===`/verify-email`||location.pathname===`/verify`,z=()=>crypto.randomUUID().replaceAll(`-`,``);function ke(){let e=(0,c.useContext)(R);return(0,u.jsxs)(`span`,{className:`brand`,children:[(0,u.jsx)(`svg`,{viewBox:`0 0 28 28`,"aria-hidden":`true`,children:(0,u.jsx)(`path`,{d:`M4 23V5h13v7h7v11H4m7 0V12h6m0 0V5`})}),(0,u.jsxs)(`strong`,{children:[e===`karamentreprises`?`Karamentreprises`:`BauLynq`,(0,u.jsx)(`span`,{children:e===`karamentreprises`?`BIM`:`Vision`})]})]})}function B(){return(0,u.jsx)(`span`,{"aria-hidden":`true`,children:`↗`})}function V(){return(0,u.jsxs)(`svg`,{viewBox:`0 0 450 340`,role:`img`,"aria-label":`Illustrative hand sketch of the reference footprint`,children:[(0,u.jsx)(`defs`,{children:(0,u.jsx)(`pattern`,{id:`sketchgrid`,width:`16`,height:`16`,patternUnits:`userSpaceOnUse`,children:(0,u.jsx)(`path`,{d:`M16 0H0V16`,fill:`none`,stroke:`#e9e4d8`,strokeWidth:`.5`})})}),(0,u.jsx)(`rect`,{width:`450`,height:`340`,fill:`url(#sketchgrid)`}),(0,u.jsxs)(`g`,{transform:`translate(66 53) rotate(-4 140 110)`,fill:`none`,stroke:`#77776e`,strokeWidth:`2.2`,strokeLinecap:`round`,children:[(0,u.jsx)(`path`,{d:`M12 233L255 235l-1-37 56 1-2-159-19-17L18 22Z`}),(0,u.jsx)(`path`,{d:`M13 232L17 21l272 4 19 14 2 160-55-2v36Z`,opacity:`.4`}),(0,u.jsx)(`path`,{d:`M129 232V115h178M130 154h74v77`,strokeDasharray:`5 7`}),(0,u.jsx)(`path`,{d:`M324 70v72m-5-7 5 8 5-8`,stroke:`#328577`})]}),(0,u.jsxs)(`g`,{fontFamily:`monospace`,fontSize:`15`,fill:`#72756e`,transform:`rotate(-4 200 170)`,children:[(0,u.jsxs)(`text`,{x:`145`,y:`62`,children:[`8.34`,(0,u.jsx)(`tspan`,{fontSize:`7`,children:` [user-given]`})]}),(0,u.jsxs)(`text`,{x:`165`,y:`318`,children:[`7.40`,(0,u.jsx)(`tspan`,{fontSize:`7`,children:` [user-given]`})]}),(0,u.jsxs)(`text`,{x:`21`,y:`172`,transform:`rotate(-90 21 172)`,children:[`6.40`,(0,u.jsx)(`tspan`,{fontSize:`7`,children:` [user-given]`})]}),(0,u.jsxs)(`text`,{x:`387`,y:`153`,transform:`rotate(90 387 153)`,children:[`4.81`,(0,u.jsx)(`tspan`,{fontSize:`7`,children:` [user-given]`})]}),(0,u.jsxs)(`text`,{x:`307`,y:`282`,children:[`1.70`,(0,u.jsx)(`tspan`,{fontSize:`7`,children:` [user-given]`})]})]}),(0,u.jsx)(`text`,{x:`29`,y:`32`,fontFamily:`monospace`,fontSize:`10`,fill:`#928f83`,children:`OWN ILLUSTRATION · USER-GIVEN / UNCONFIRMED`})]})}function Ae(e={}){let t=e.brand??`baulynq`,n=Ee(e.language??e.initialInput?.language??(typeof navigator>`u`?`en`:navigator.language)),[r,i]=(0,c.useState)(`checking`),[a,o]=(0,c.useState)(0);(0,c.useEffect)(()=>{let e=!0,n=!1,r=!1;A(t);let a=async()=>{if(n)r=!0;else{n=!0;try{let t=await F(!0);e&&i(t)}catch{e&&i(`unavailable`)}finally{n=!1,r&&e&&(r=!1,a())}}};a();let o=de(()=>{e&&i(`checking`),a()}),s=setInterval(()=>{a()},3e4),c=setInterval(()=>{let t=fe();e&&t!==`licensed`&&i(t)},1e3);return()=>{e=!1,clearInterval(s),clearInterval(c),o()}},[t,a]);let s=(0,c.useCallback)(async(t,n)=>{let r=await F(),a=fe();if(r!==`licensed`||a!==`licensed`)throw i(a),new DOMException(`A valid component license is required.`,`AbortError`);return e.transport?e.transport(t,n):fetch(`/v1`+t,n)},[e.transport]),l=r===`licensed`;return(0,u.jsx)(R.Provider,{value:t,children:l?(0,u.jsx)(H,{...e,transport:s},e.embedded?e.workspaceKey??`unscoped`:`public`):(0,u.jsxs)(`section`,{className:`bim-studio bim-license-gate`,dir:n===`ar`?`rtl`:`ltr`,"aria-label":`Component licensing`,children:[(0,u.jsx)(ke,{}),(0,u.jsx)(`h1`,{children:h(n,r===`checking`?`Verifying component license…`:`A valid component license is required`)}),(0,u.jsxs)(`p`,{children:[t===`karamentreprises`?`Karamentreprises BIM`:`BauLynq Vision`,` · `,r]}),(0,u.jsx)(`p`,{children:h(n,`The studio stays closed until its installation license and signed revocation status are verified.`)}),r!==`checking`&&(0,u.jsx)(`button`,{className:`outline`,onClick:()=>o(e=>e+1),children:h(n,`Check license again`)}),(0,u.jsxs)(`a`,{href:t===`karamentreprises`?`https://packages.karamentreprises.com/bim`:`https://packages.polycyphers.com/bim`,children:[h(n,`License management`),` ↗`]})]})})}function H({enableExistingPlanReview:e=!1,embedded:t=!1,transport:n,initialInput:r,workspaceKey:i,language:a,onStateChange:o,brand:s=`baulynq`}={}){let[d,f]=(0,c.useState)(()=>Ee(a??r?.language??(typeof navigator>`u`?`en`:navigator.language))),[m,te]=(0,c.useState)(t||location.pathname===`/studio`?`studio`:`home`),[ne,g]=(0,c.useState)(`measure`),[_,re]=(0,c.useState)(null),[v,ie]=(0,c.useState)(r??null),[ae,oe]=(0,c.useState)(`A`),[b,se]=(0,c.useState)(!1),[x,S]=(0,c.useState)(``),[C,w]=(0,c.useState)(``),[T,E]=(0,c.useState)(``),[D,O]=(0,c.useState)(null),[ce,k]=(0,c.useState)(null),[le,A]=(0,c.useState)(null),[j,ue]=(0,c.useState)(``),[de,pe]=(0,c.useState)(!t&&Oe()),[me,he]=(0,c.useState)(``),[ge,M]=(0,c.useState)(``),[N,_e]=(0,c.useState)({}),[ve,P]=(0,c.useState)(!1),[F,I]=(0,c.useState)(Oe()?`verify`:`login`),[De,L]=(0,c.useState)(()=>Oe()?new URLSearchParams(location.search).get(`token`)??``:``),[R,Ae]=(0,c.useState)(),[H,Ne]=(0,c.useState)(null),[G,K]=(0,c.useState)(null),[q,Pe]=(0,c.useState)(null),[Fe,Ie]=(0,c.useState)(``),[Le,Re]=(0,c.useState)(null),[ze,Be]=(0,c.useState)([]),[Ve,He]=(0,c.useState)(!1),[Ue,We]=(0,c.useState)(!1),[Ge,Ke]=(0,c.useState)(!1),[qe,Je]=(0,c.useState)(null),[Ye,Xe]=(0,c.useState)(null),[Ze,Qe]=(0,c.useState)(null),[$e,et]=(0,c.useState)(!1),[tt,nt]=(0,c.useState)(1),[rt,it]=(0,c.useState)(1),[at,ot]=(0,c.useState)(!1),[st,ct]=(0,c.useState)(!1),[lt,ut]=(0,c.useState)(!1),[dt,ft]=(0,c.useState)(null),[pt,mt]=(0,c.useState)(!1),[ht,gt]=(0,c.useState)([]),[_t,vt]=(0,c.useState)([]),[yt,bt]=(0,c.useState)(null),xt=(0,c.useRef)(null),St=(0,c.useCallback)(e=>{xt.current=e},[]),[Ct,wt]=(0,c.useState)(!1),[Tt,Et]=(0,c.useState)([]),[Dt,Ot]=(0,c.useState)(),kt=(0,c.useRef)(null),At=(0,c.useRef)(!1),jt=(0,c.useRef)(!0),J=(0,c.useRef)(0),Mt=(0,c.useRef)(``),Nt=(0,c.useRef)(void 0),Pt=(0,c.useRef)(i),Y=p[d],Ft=i??R,[It,Lt]=(0,c.useState)(!1),[Rt,zt]=(0,c.useState)({busy:!1,hasUnsavedChanges:!1}),Bt=(0,c.useCallback)(e=>zt(e),[]),Vt=(0,c.useRef)(o),Ht=Rt.hasUnsavedChanges||at||!!C.trim()||!!G||!!q&&!Le||pt;(0,c.useEffect)(()=>{Vt.current=o},[o]),(0,c.useEffect)(()=>{Vt.current?.({busy:b||Rt.busy,hasUnsavedChanges:Ht})},[b,Rt.busy,Ht]),(0,c.useEffect)(()=>()=>{Vt.current?.({busy:!1,hasUnsavedChanges:!1})},[]),(0,c.useEffect)(()=>{Xe(null),Qe(null),nt(Math.max(1,(_?.version??1)-1)),it(_?.version??1),_||et(!1)},[_?.projectId,_?.version]);let Ut=G?.snapshot??_,X=Ut?.proposals.find(e=>e.id===ae)??Ut?.proposals[0],Wt=ye(N,d),Gt=be(N),Kt=typeof N.checkoutAvailable==`boolean`?N.checkoutAvailable:N.checkoutEnabled===!0,qt=[`paidRegenerations`,`chatRefinementsPerProject`,`exportsPerPaidProject`].every(e=>typeof N[e]==`number`&&Number.isInteger(N[e])&&Number(N[e])>=0)?{regenerations:Number(N.paidRegenerations),chat:Number(N.chatRefinementsPerProject),exports:Number(N.exportsPerPaidProject)}:null;(0,c.useEffect)(()=>(jt.current=!0,()=>{jt.current=!1,J.current++}),[]);function Jt(e){let t=fe();if(!jt.current||e!==J.current||t!==`licensed`)throw new DOMException(`The verified session changed.`,`AbortError`)}async function Yt(e,r){let i=J.current;Jt(i);let a=new Headers(r?.headers).get(`Authorization`);if(!t&&e!==`/session`&&a&&a!==`Bearer `+Mt.current)throw new DOMException(`The verified session changed.`,`AbortError`);let o=await(n?n(e,r):fetch(`/v1`+e,r));if(e!==`/config`&&Jt(i),!t&&o.status===401&&!e.startsWith(`/account/`))throw Zt(),I(`login`),pe(!0),S(`Sign in with a verified account to continue.`),new DOMException(`The verified session expired.`,`AbortError`);return o}function Xt(){bt(null),xt.current=null,Lt(!1),zt({busy:!1,hasUnsavedChanges:!1}),ot(!1),ut(!1),S(``),E(``),ct(!1),Je(null),Be([]),Et([]),Ot(void 0),ft(null),mt(!1),gt([]),He(!1),We(!1),w(``),re(null),vt([]),ie(null),K(null),Pe(null),A(null),k(null),O(null),Re(null),Ne(null),Ke(!1)}function Zt(){(_||Nt.current)&&Xt(),J.current++,Mt.current=``,Nt.current=void 0,ue(``),Ae(void 0)}async function Z(e,n,r){let i=J.current,a=await Yt(e,{method:r??(n?`POST`:`GET`),headers:{...n?{"Content-Type":`application/json`}:{},...!t&&j?{Authorization:`Bearer `+j}:{}},body:n?JSON.stringify(n):void 0});if(!a.ok){let n=`The service is temporarily unavailable.`,r={};try{let e=await a.json();e&&typeof e==`object`&&!Array.isArray(e)&&(r=e),n=String(r.detail??r.title??r.error??n)}catch{}Jt(i),a.status===401&&(t||(Zt(),e.startsWith(`/account/`)||I(`login`),pe(!0)),n=t?`Your app session needs attention. Sign in again through your app.`:`Sign in with a verified account to continue.`);let o=/^\/projects\/([a-f0-9]{32})\//.exec(e)?.[1];throw!t&&a.status===402&&r.code===`project_quota_exceeded`&&o&&[`operation_cap`,`free_tier_unavailable`,`provider_cost_cap`].includes(String(r.reason))&&typeof r.projectPaid==`boolean`&&typeof r.canPurchase==`boolean`&&(bt({projectId:o,projectPaid:r.projectPaid,canPurchase:r.canPurchase,reason:String(r.reason)}),r.canPurchase&&!r.projectPaid&&Qt(`paywall`)),Error(n)}let o=a.status===204?null:await a.json();return Jt(i),o}async function Qt(e,n=Ct){if(!(t||N.analyticsEnabled!==!0))try{await Yt(`/analytics/events`,{method:`POST`,headers:{"Content-Type":`application/json`,...j?{Authorization:`Bearer `+j}:{}},body:JSON.stringify({eventId:z(),kind:e,consentGranted:n})})}catch{}}function $t(e){wt(e),Qt(`visit`,e)}(0,c.useEffect)(()=>{a!==void 0&&f(Ee(a))},[a]),(0,c.useEffect)(()=>{t||(document.documentElement.lang=d,document.documentElement.dir=d===`ar`?`rtl`:`ltr`)},[d,t]),(0,c.useEffect)(()=>{let e=!0;return Yt(`/config`).then(e=>e.ok?e.json():Promise.reject()).then(t=>{e&&_e(t)}).catch(()=>{}),()=>{e=!1}},[n]),(0,c.useEffect)(()=>{!t&&Oe()&&history.replaceState({},``,location.pathname)},[t]),(0,c.useEffect)(()=>{if(!q){Ie(``);return}let e=URL.createObjectURL(q);return Ie(e),()=>URL.revokeObjectURL(e)},[q]),(0,c.useEffect)(()=>{t&&Pt.current!==i&&(J.current++,Xt(),Pt.current=i)},[i,t]),(0,c.useEffect)(()=>{if(!Ft)return;let e=xe(localStorage,Ft);if(Ne(e),!e||v||_)return;let t=!0;return Z(`/projects/`+e).then(e=>{t&&(Q(e),g(e.input.isDraft?`measure`:`proposals`))}).catch(e=>{t&&S(e instanceof Error?e.message:`Could not resume the project.`)}),()=>{t=!1}},[Ft]);function Q(t){yt?.projectId!==t.projectId&&bt(null),Jt(J.current),Je(t.reconciliation),Ke(!1),t.input.isDraft||(ot(!1),mt(!1)),t.input.isDraft||gt([]),re(t),ie(t.pendingDraft?.input?{...t.pendingDraft.input,isDraft:!1}:t.input.isDraft?v??Ce(d):t.input),Lt(e&&(t.pendingDraft?.workflow??t.workflow)===`existing-plan`),t.pendingDraft&&(t.pendingDraft.input&&ot(!1),Re(t.pendingDraft.sourceObjectId??null),w(t.pendingDraft.brief??``)),oe(t.selectedProposalId??t.proposals.find(e=>e.recommended)?.id??`A`),A(null),k(null),O(null),K(null),Ft&&(Se(localStorage,Ft,t.projectId),Ne(t.projectId))}async function $(e){if(!(At.current||Rt.busy)){At.current=!0,se(!0),S(``);try{await e()}catch(e){e instanceof DOMException&&e.name===`AbortError`||S(e instanceof Error?e.message:`Please try again.`)}finally{At.current=!1,se(!1)}}}function en(e){ut(!1),te(e),t||history.pushState({},``,e===`home`?`/`:`/studio`),window.scrollTo(0,0)}function tn(e=!1){Rt.busy||Rt.hasUnsavedChanges||(bt(null),xt.current=null,Lt(!1),ot(!1),e||Pe(null),He(!1),We(!1),Be([]),Et([]),Ot(void 0),ft(null),mt(!1),gt([]),w(``),re(null),vt([]),ie(Ce(d)),K(null),A(null),k(null),O(null),Ke(!1),Je(null),Re(null),g(`measure`),en(`studio`))}async function nn(){N.mode===`local-demo`?(en(`studio`),await $(async()=>{let e=await Z(`/reference?language=`+d);ie(e),ot(!1),Ke(!1),g(`measure`),E(`Reference example loaded. Review its site-confirmed dimensions before generating.`)})):tn()}async function rn(e,n){let r=J.current;if(!Ve||!Ue)throw Error(`Review the image permissions and AI disclosure before upload.`);let i=new FormData;i.append(`file`,n),i.append(`rightsAcknowledged`,`true`),i.append(`aiProcessingAcknowledged`,`true`);let a=await Yt(`/projects/${e.projectId}/uploads`,{method:`POST`,headers:!t&&j?{Authorization:`Bearer `+j}:{},body:i});if(!a.ok){let e=`Upload failed.`;try{let t=await a.json();e=t.detail??t.title??t.error??e}catch{}throw Jt(r),Error(e)}let o=await a.json();return Jt(r),Re(o.upload.id),E(`Sketch stored privately. Reading produces observations to confirm, never unchecked dimensions.`),o.upload.id}async function an(e,t=_?.version??0,n=_?.projectId??z()){if(e.input){let t=we(e.input);if(t)throw Error(t)}let r=await Z(`/drafts`,{projectId:n,operationId:z(),expectedVersion:t,pendingDraft:{...e,brief:C}});if(r.projectId!==n||r.version!==t+1||r.pendingDraft?.workflow!==e.workflow)throw Error(`Pending work could not be saved by this service. Checkout and generation are stopped; keep this page open.`);return r}function on(e){Q(e),g(`measure`)}async function sn(){v&&await $(async()=>{let e=we(v);if(e)throw Error(e);if(q&&!Le&&(!Ve||!Ue))throw Error(`Review the image permissions and AI disclosure, or remove the local image.`);if(!Ge)throw Error(`Confirm the measured dimensions and bearings before generating.`);let n={...v,isDraft:!1,language:d},r=await Z(`/footprints/reconcile`,n.footprint);if(Je(r),r.status!==`Unique`)throw Error(r.findings.map(e=>e.message).join(` `)||`The footprint needs another confirmed measurement.`);let i=_,a=Le;t||(i=await an({workflow:`manual`,input:n,sourceObjectId:a??void 0},i?.version??0,i?.projectId??z()),Q(i),Je(r),q&&!a&&(a=await rn(i,q),i=await an({workflow:`manual`,input:n,sourceObjectId:a},i.version,i.projectId),Q(i),Je(r)));let o=i?await Z(`/projects/${i.projectId}/edits`,{expectedVersion:i.version,operationId:z(),edit:{replaceInput:n,note:`Confirmed measurements`}}):await Z(`/projects`,{projectId:z(),operationId:z(),input:n});Q(o),bt(null),g(o.input.isDraft?`measure`:`proposals`),q&&!a&&await rn(o,q)})}async function cn(){C.trim()&&_&&await $(async()=>{let e=await Z(`/projects/${_.projectId}/chat`,{expectedVersion:_.version,operationId:z(),message:C});K(e.preview),E(e.reply),w(``),g(`refine`)})}async function ln(){if(!Te(G,_)||!G||!_)return;let e=G;await $(async()=>{Q(await Z(`/projects/${_.projectId}/edits`,{expectedVersion:e.expectedVersion,operationId:z(),edit:e.edit})),E(`Preview applied as a new saved version.`)})}async function un(e){_&&!G&&await $(async()=>{Q(await Z(`/projects/${_.projectId}/edits`,{expectedVersion:_.version,operationId:z(),edit:{selectProposalId:e.id,note:`Selected layout `+e.id}}))})}async function dn(){_&&($e?et(!1):await $(async()=>{let e=await Z(`/projects/${_.projectId}/history`);Xe(e),et(!0)}))}async function fn(){_&&Ye?.some(e=>e.version===tt)&&Ye.some(e=>e.version===rt)&&await $(async()=>{Qe(await Z(`/projects/${_.projectId}/compare?left=${tt}&right=${rt}`))})}async function pn(){_&&tt!==_.version&&!G&&Ye?.some(e=>e.version===tt)&&await $(async()=>{Q(await Z(`/projects/${_.projectId}/undo`,{expectedVersion:_.version,targetVersion:tt,operationId:z()})),E(h(d,`Saved as a new version. Earlier versions are unchanged.`))})}function mn(){return(0,u.jsxs)(`section`,{className:`project-price`,children:[(0,u.jsx)(`h3`,{children:h(d,`Project billing`)}),(0,u.jsx)(`p`,{children:It?{en:`This workflow produces reviewed 2D files, not automatic BIM reconstruction. Saves use the configured project generation allowance; check the quote and limits before purchase.`,de:`Dieser Ablauf erstellt geprüfte 2D-Dateien, keine automatische BIM-Rekonstruktion. Speichern nutzt das Generierungskontingent; Angebot und Grenzen vor dem Kauf prüfen.`,fr:`Ce parcours produit des fichiers 2D vérifiés, sans reconstruction BIM automatique. L’enregistrement utilise le quota du projet ; vérifier le devis et les limites avant achat.`,ar:`ينتج هذا المسار ملفات ثنائية الأبعاد مراجعة، وليس إعادة بناء BIM تلقائية. يستخدم الحفظ حصة المشروع؛ راجع السعر والحدود قبل الشراء.`}[d]:`One project includes proposals, refinements and its BIM model within the configured caps. Free allowances are checked by the service.`}),qt?(0,u.jsxs)(`p`,{className:`quota-disclosure`,children:[`After the initial proposal request: `,qt.regenerations,` regenerations · `,qt.chat,` chat refinements · `,qt.exports,` `,qt.exports===1?`BIM export`:`BIM exports`,` per paid project.`]}):(0,u.jsx)(`p`,{children:`Project usage limits are unavailable. Checkout stays disabled until they can be shown.`}),yt!==null&&yt.projectId===_?.projectId&&yt.projectPaid?(0,u.jsx)(`p`,{role:`status`,children:h(d,`This paid project reached its configured limit. Another purchase will not extend its allowance.`)}):D?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`strong`,{children:ye({priceMinorUnits:D.priceMinorUnits,currency:D.currency},d)}),(0,u.jsxs)(`p`,{children:[`Quote valid until `,new Date(D.expiresAtUtc).toLocaleString(d),`.`]}),(0,u.jsx)(`button`,{className:`ink full`,disabled:b||!Kt||!qt,onClick:gn,children:h(d,`Continue to Stripe`)}),(0,u.jsx)(`button`,{className:`textbtn`,disabled:b,onClick:hn,children:h(d,`Refresh project quote`)})]}):(0,u.jsx)(`button`,{className:`outline full`,disabled:b||!Kt,onClick:hn,children:h(d,`View project price`)}),!Kt&&(0,u.jsx)(`small`,{children:h(d,`Purchases are not enabled in this environment.`)}),(0,u.jsx)(`small`,{children:`A checkout return is not proof of payment; downloads use the service's verified entitlement.`})]})}async function hn(){_&&!t&&await $(async()=>{let e=await Z(`/account/quote`,{projectId:_.projectId});if(e.projectId!==_.projectId||!e.quoteId||ye({priceMinorUnits:e.priceMinorUnits,currency:e.currency},d)===null||!Number.isFinite(Date.parse(e.expiresAtUtc)))throw Error(`A valid project quote was not supplied.`);O(e)})}async function gn(){_&&D&&!t&&Kt&&qt&&(yt?.projectId!==_.projectId||!yt.projectPaid)&&await $(async()=>{let e=D;if(q&&!Le)throw Error(`Scan and save the selected image before checkout so it can be restored after payment.`);if(e.projectId!==_.projectId||Date.parse(e.expiresAtUtc)<=Date.now())throw Error(`This quote expired. Refresh the project quote before purchase.`);let t=_;if(It){let e=xt.current;if(!e)throw Error(`The existing-plan editor is not ready to preserve your latest work. Checkout is stopped; keep this page open.`);t=await e()??t}else v&&(t=await an({workflow:`manual`,input:v,sourceObjectId:Le??void 0},t.version,t.projectId),Q(t));if(Date.parse(e.expiresAtUtc)<=Date.now())throw Error(`This quote expired. Refresh the project quote before purchase.`);let n=await Z(`/account/checkout`,{projectId:t.projectId,requestId:z(),quoteId:e.quoteId}),r=new URL(n.url);if(r.protocol!==`https:`||r.hostname!==`checkout.stripe.com`||r.username||r.password)throw Error(`The checkout address was not accepted.`);window.location.assign(r.href)})}function _n(){Xt(),J.current++,Mt.current=``,Nt.current=void 0,S(``),ue(``),Ae(void 0),M(``),he(``),L(``),E(`Signed out. Your saved project stays private and can resume after sign-in.`)}async function vn(){_&&X&&!G&&await $(async()=>{k(await Z(`/projects/${_.projectId}/drawings`,{expectedVersion:_.version,operationId:z(),proposalId:X.id})),E(`2D concept drawings prepared. This does not spend the BIM model export.`)})}async function yn(){_&&X&&!G&&await $(async()=>{let e=await Z(`/projects/${_.projectId}/exports`,{expectedVersion:_.version,operationId:z(),proposalId:X.id});A(e),g(`download`)})}async function bn(e,n=le){n&&_&&await $(async()=>{let r=J.current,i=await Yt(`/projects/${_.projectId}/objects/${n.files[e].id}`,{headers:!t&&j?{Authorization:`Bearer `+j}:{}});if(!i.ok)throw Error(`Download unavailable.`);let a=await i.blob();Jt(r);let o=URL.createObjectURL(a),c=document.createElement(`a`);c.href=o,c.download=`${s===`karamentreprises`?`karamentreprises`:`baulynq`}-${n.proposalId}-v${n.version}.${e}`,c.click(),setTimeout(()=>URL.revokeObjectURL(o),1e3)})}async function xn(e){Rt.busy||At.current||(![`image/png`,`image/jpeg`,`image/webp`].includes(e.type)||e.size>8388608?S(`Choose a PNG, JPEG or WebP up to 8 MB.`):(Pe(e),Re(null),He(!1),We(!1),_?(g(`measure`),E(`Local preview only. Review permissions and AI disclosure before uploading the image.`)):(v||tn(!0),g(`measure`),E(`Local sketch preview only. Review permissions, then scan and store it privately before asking AI to read observations. No measured footprint is required for that step.`))))}async function Sn(){Ht||await $(async()=>{Q(await Z(`/drafts`,{projectId:z(),operationId:z()})),Lt(!0),g(`measure`),en(`studio`)})}function Cn(){return(0,u.jsxs)(`section`,{className:`paper consent-panel`,children:[(0,u.jsx)(`h3`,{children:h(d,`Before image upload`)}),(0,u.jsx)(`p`,{children:h(d,`The service scans and normalizes the image before storing it. Selecting a file alone does not send it to an AI provider. “Read saved sketch” sends the sanitized image to Anthropic Claude only when you request that step. EU storage is separate from inference location; provider region and data-processing terms require service configuration.`)}),(0,u.jsxs)(`label`,{className:`confirmation`,children:[(0,u.jsx)(`input`,{type:`checkbox`,disabled:b,checked:Ve,onChange:e=>He(e.target.checked)}),h(d,`I have permission to use this image for this project.`)]}),(0,u.jsxs)(`label`,{className:`confirmation`,children:[(0,u.jsx)(`input`,{type:`checkbox`,disabled:b,checked:Ue,onChange:e=>We(e.target.checked)}),h(d,`I understand the AI image-processing disclosure above.`)]}),(0,u.jsxs)(`label`,{className:`field`,children:[h(d,`What would you like to create?`),(0,u.jsx)(`textarea`,{"aria-label":`Sketch brief`,disabled:b,value:C,maxLength:8e3,placeholder:`Room wishes, entrance and view, fixed walls, country…`,onChange:e=>w(e.target.value)})]}),(0,u.jsx)(`button`,{className:`ink`,disabled:b||!Ve||!Ue,onClick:wn,children:h(d,`Upload for scanning`)}),(0,u.jsx)(`button`,{className:`quiet`,disabled:b,onClick:()=>{Pe(null),He(!1),We(!1)},children:h(d,`Remove local image`)})]})}async function wn(){q&&await $(async()=>{let e=_;e||(e=await Z(`/drafts`,{projectId:z(),operationId:z()}),Q(e),g(`measure`)),await rn(e,q)})}async function Tn(){_&&Le&&await $(async()=>{let e=await Z(`/projects/${_.projectId}/read-sketch`,{expectedVersion:_.version,operationId:z(),objectId:Le,intent:C||`Read the sketch measurements and identify uncertainties.`});Et(e.observations),Ot(e.values),ft(e.candidate??null),mt(!1),Be(e.questions),E(`Recognized values remain estimated. Preview the outline, check labels and assumptions, then explicitly adopt reviewed measurements.`),g(`measure`)})}async function En(){_&&await $(async()=>{let e=await Z(`/projects/${_.projectId}`,void 0,`DELETE`);re(null),vt([]),ie(null),A(null),k(null),O(null),K(null),ot(!1),Pe(null),Re(null),Be([]),Et([]),Ot(void 0),ft(null),mt(!1),gt([]),Je(null),Ft&&Se(localStorage,Ft,null),Ne(null),E(e.dataErased===!0?`Service reports project data erased. ${e.accountingPending?`Accounting cleanup is still pending.`:`Accounting cleanup completed.`}`:`Deletion accepted; data erasure is still pending. The service will continue cleanup.`)})}async function Dn(){!t&&j&&await $(async()=>{let e=await Z(`/account/data`,void 0,`DELETE`);Ct&&(await Qt(`visit`,!1),wt(!1)),Xt(),J.current++,Ft&&Se(localStorage,Ft,null),g(`measure`),E((e.dataErased?`Service reports project content erased.`:`Content deletion accepted; erasure is still pending.`)+` `+(e.accountingPending?`Accounting cleanup is still pending. `:``)+`Account identity, billing and required anti-abuse metadata are retained.`)})}async function On(){await $(async()=>{let e=J.current;if(F===`signup`){await Z(`/account/signup`,{email:me}),E(`Check your email for the verification link. No session is created until ownership is verified.`),I(`verify`),M(``);return}let t=await Z(F===`verify`?`/account/verification/complete`:`/account/login`,F===`verify`?{token:De,password:ge}:{email:me,password:ge});if(M(``),L(``),!t.token){I(`login`),E(`Email verified. Sign in to continue.`);return}let n=await Yt(`/session`,{headers:{Authorization:`Bearer `+t.token}});if(!n.ok)throw Error(`The verified workspace could not be loaded.`);let r=await n.json();if(Jt(e),typeof r.workspaceKey!=`string`||!r.workspaceKey||r.workspaceKey.length>512)throw Error(`The verified workspace could not be loaded.`);Nt.current&&Nt.current!==r.workspaceKey&&Xt(),J.current++,Mt.current=t.token,Nt.current=r.workspaceKey,ue(t.token),Ae(r.workspaceKey),pe(!1),E(`Signed in. This session stays in memory only.`)})}function kn(){dt?.input&&(ot(!0),ie({...v??Ce(d),footprint:dt.input}),Je(dt.reconciliation),gt(dt.input.edges.flatMap((e,t)=>[`footprint.edges[${t}].lengthM`,...e.bearingDegrees==null?[]:[`footprint.edges[${t}].bearingDegrees`]])),mt(!0),Ke(!1),K(null),g(`measure`),E(`Recognized outline is a local estimated preview. No project version or proposal was changed. Review every length, bearing and wall type before adoption.`))}function An(e){Pe(null),Ie(``),Re(e),g(`measure`),E(`Saved sanitized sketch selected. Reading it with AI is a separate explicit action.`)}async function jn(e,n){_&&await $(async()=>{let r=J.current,i=await Yt(`/projects/${_.projectId}/objects/${n.objectId}`,{headers:!t&&j?{Authorization:`Bearer `+j}:{}});if(!i.ok)throw Error(`Saved file is unavailable or expired.`);let a=await i.blob();Jt(r);let o=URL.createObjectURL(a),c=document.createElement(`a`);c.href=o,c.download=`${s===`karamentreprises`?`karamentreprises`:`baulynq`}-${e.kind}${e.version?`-v`+e.version:``}.${n.format}`,c.click(),setTimeout(()=>URL.revokeObjectURL(o),1e3)})}(0,c.useEffect)(()=>{if(!_)return;let e=!0;return Z(`/projects/${_.projectId}/artifacts`).then(t=>{e&&vt(Array.isArray(t)?t:[])}).catch(()=>{e&&vt([])}),()=>{e=!1}},[_?.projectId,_?.version,Le]);let Mn=ne===`measure`?qe?.values:X?.values??Ut?.reconciliation.values??qe?.values,Nn=X?.findings.reduce((e,t)=>(e[t.status]=(e[t.status]??0)+1,e),{})??{};return(0,u.jsxs)(`div`,{className:`bim-studio`,dir:d===`ar`?`rtl`:`ltr`,children:[!t&&(0,u.jsxs)(`header`,{children:[(0,u.jsx)(`a`,{className:`logo`,href:`/`,onClick:e=>{e.preventDefault(),en(`home`)},children:(0,u.jsx)(ke,{})}),(0,u.jsxs)(`nav`,{children:[(0,u.jsx)(`a`,{href:`/#pricing`,onClick:()=>m!==`home`&&en(`home`),children:Y.pricing}),(0,u.jsx)(`select`,{"aria-label":Y.language,value:d,onChange:e=>f(e.target.value),children:[`en`,`de`,`fr`,`ar`].map(e=>(0,u.jsx)(`option`,{value:e,children:e.toUpperCase()},e))}),(0,u.jsx)(`button`,{className:`quiet account-action`,disabled:b,onClick:()=>j?en(`studio`):pe(!0),children:j?Y.account:Y.signin}),j&&(0,u.jsxs)(`div`,{className:`account-options`,children:[(0,u.jsx)(`button`,{className:`quiet`,"aria-label":h(d,`Account options`),"aria-expanded":lt,"aria-controls":`bim-account-actions`,disabled:b,onClick:()=>ut(!lt),children:`⋯`}),lt&&(0,u.jsxs)(`div`,{id:`bim-account-actions`,role:`group`,"aria-label":h(d,`Account actions`),className:`account-actions`,onKeyDown:e=>{e.key===`Escape`&&(ut(!1),e.currentTarget.parentElement?.querySelector(`button`)?.focus())},children:[(0,u.jsx)(`button`,{className:`quiet full`,disabled:b,onClick:()=>{ut(!1),ct(!0)},children:h(d,`Delete project content`)}),(0,u.jsx)(`button`,{className:`quiet full`,disabled:b,onClick:_n,children:h(d,`Sign out`)})]})]}),(0,u.jsxs)(`button`,{className:`ink`,onClick:()=>en(`studio`),children:[Y.studio,(0,u.jsx)(B,{})]})]})]}),m===`home`?(0,u.jsxs)(`main`,{className:`landing`,children:[(0,u.jsxs)(`section`,{className:`hero`,children:[(0,u.jsxs)(`span`,{className:`eyebrow`,children:[Y.eyebrow,` `,(0,u.jsx)(`span`,{children:`01 — VISION`})]}),(0,u.jsx)(`h1`,{children:Y.hero}),(0,u.jsx)(`p`,{children:Y.intro}),(0,u.jsxs)(`div`,{className:`actions`,children:[(0,u.jsxs)(`button`,{className:`ink large`,onClick:()=>en(`studio`),children:[Y.start,(0,u.jsx)(B,{})]}),N.mode===`local-demo`?(0,u.jsxs)(`button`,{className:`textbtn`,onClick:nn,children:[Y.try,` →`]}):(0,u.jsxs)(`button`,{className:`textbtn`,onClick:()=>tn(),children:[h(d,`Enter measurements`),` →`]})]}),(0,u.jsxs)(`div`,{className:`proof`,children:[(0,u.jsx)(`span`,{className:`dot`}),`Your measurements. Checked geometry. One shared engine.`]})]}),(0,u.jsxs)(`section`,{className:`transformation`,children:[(0,u.jsxs)(`article`,{className:`sketch-card`,children:[(0,u.jsxs)(`div`,{className:`card-title`,children:[(0,u.jsx)(`span`,{children:`01 / SKETCH`}),(0,u.jsx)(`span`,{children:`THE STARTING POINT`})]}),(0,u.jsx)(V,{}),(0,u.jsx)(`h3`,{children:Y.before})]}),(0,u.jsx)(`div`,{className:`flow-arrow`,children:`→`}),(0,u.jsxs)(`article`,{className:`plan-card`,children:[(0,u.jsxs)(`div`,{className:`card-title`,children:[(0,u.jsx)(`span`,{children:`02 / POSSIBILITIES`}),(0,u.jsx)(`span`,{className:`teal`,children:`CHECKED BY THE ENGINE`})]}),(0,u.jsx)(`div`,{className:`mini-plan`,children:(0,u.jsx)(`img`,{src:`/reference-plan.svg`,alt:`Engine-generated reference layout A with checked dimensions`})}),(0,u.jsx)(`h3`,{children:Y.after}),N.mode===`local-demo`?(0,u.jsxs)(`button`,{className:`textbtn`,onClick:nn,children:[Y.try,` ↗`]}):(0,u.jsxs)(`button`,{className:`textbtn`,onClick:()=>tn(),children:[h(d,`Enter measurements`),` ↗`]})]})]}),(0,u.jsx)(`section`,{className:`process`,children:Y.steps.map((e,t)=>(0,u.jsxs)(`div`,{children:[(0,u.jsxs)(`span`,{children:[`0`,t+1]}),(0,u.jsx)(`h3`,{children:e}),(0,u.jsx)(`p`,{children:[`A drawing or photo, with dimensions.`,`Confirm dimensions and fixed constraints.`,`Compare different ways to use your space.`,`Take the chosen concept into your BIM workflow.`][t]})]},e))}),(0,u.jsxs)(`section`,{className:`use-case-links`,children:[(0,u.jsx)(`h2`,{children:h(d,`Plan your next space`)}),(0,u.jsxs)(`a`,{href:`/apartment-layout/`,children:[h(d,`Apartment layout`),` ↗`]}),(0,u.jsxs)(`a`,{href:`/house-extension/`,children:[h(d,`House extension`),` ↗`]}),(0,u.jsxs)(`a`,{href:`/renovation/`,children:[h(d,`Renovation`),` ↗`]})]}),(0,u.jsxs)(`section`,{className:`price-section`,id:`pricing`,children:[(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`span`,{className:`eyebrow`,children:`A CLEAR START`}),(0,u.jsxs)(`h2`,{children:[`A small project.`,(0,u.jsx)(`br`,{}),`A useful next step.`]}),(0,u.jsx)(`p`,{children:`Free access is included in KEHBIMVISION and BauLynq BIM, within each app’s AI usage limits.`})]}),(0,u.jsxs)(`article`,{className:`price-card`,children:[(0,u.jsx)(`span`,{className:`eyebrow`,children:s===`karamentreprises`?`KARAMENTREPRISES BIM`:`BAULYNQ VISION`}),(0,u.jsx)(`h2`,{children:Wt??`Pricing opens with the service`}),(0,u.jsx)(`small`,{children:`Base pricing. Your project quote is shown before purchase.`}),(0,u.jsx)(`p`,{children:Gt?`${Gt.proposals} free proposal generations · ${Gt.exports} BIM exports`:`The local preview does not accept payments.`}),(0,u.jsx)(`p`,{children:`One project includes proposals, refinements and its model export.`}),qt&&(0,u.jsxs)(`p`,{children:[`After the initial proposal request: `,qt.regenerations,` regenerations · `,qt.chat,` chat refinements · `,qt.exports,` `,qt.exports===1?`BIM export`:`BIM exports`,` per paid project.`]}),(0,u.jsxs)(`button`,{className:`ink`,onClick:()=>en(`studio`),children:[Y.start,(0,u.jsx)(B,{})]})]})]}),(0,u.jsxs)(`footer`,{children:[(0,u.jsx)(ke,{}),(0,u.jsx)(`span`,{children:Y.disclaimer})]})]}):(0,u.jsxs)(`main`,{className:`studio`,children:[(0,u.jsxs)(`aside`,{className:`rail`,children:[(0,u.jsx)(`span`,{className:`eyebrow`,children:`WORKSPACE`}),(0,u.jsx)(`h2`,{children:Y.workspace}),(0,u.jsxs)(`span`,{className:`project-status`,children:[(0,u.jsx)(`span`,{className:`dot`}),N.mode===`local-demo`?`Local reference preview`:`Private project`]}),(0,u.jsx)(`div`,{className:`stage-nav`,children:[`measure`,`proposals`,`refine`,`download`].map((e,t)=>(0,u.jsxs)(`button`,{className:ne===e?`active`:``,disabled:b,onClick:()=>g(e),children:[(0,u.jsxs)(`span`,{children:[`0`,t+1]}),Y[e]]},e))}),(0,u.jsxs)(`div`,{className:`rail-bottom`,children:[(0,u.jsx)(`p`,{children:Y.privacy}),typeof N.retentionDays==`number`&&(0,u.jsxs)(`p`,{children:[`Retention: `,N.retentionDays,` days, as configured by the service.`]}),_&&(0,u.jsx)(`button`,{className:`quiet danger`,onClick:En,children:Y.delete})]})]}),(0,u.jsxs)(`section`,{className:`workspace`,children:[(0,u.jsxs)(`div`,{className:`workspace-heading`,children:[(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`span`,{className:`eyebrow`,children:_?`VERSION ${_.version} / ${_.projectId.slice(0,8)}`:`YOUR NEXT SPACE`}),(0,u.jsx)(`h1`,{children:Y[ne]})]}),(0,u.jsxs)(`div`,{className:`workspace-controls`,children:[t&&(0,u.jsx)(`select`,{"aria-label":Y.language,value:d,onChange:e=>f(e.target.value),children:[`en`,`de`,`fr`,`ar`].map(e=>(0,u.jsx)(`option`,{value:e,children:e.toUpperCase()},e))}),(0,u.jsx)(`button`,{className:`quiet`,disabled:b,onClick:()=>tn(),children:h(d,`New project`)}),_&&(0,u.jsx)(`button`,{className:`quiet compact-delete`,"aria-label":`Delete current project`,disabled:b,onClick:En,children:Y.delete}),_&&(0,u.jsxs)(`button`,{className:`outline`,disabled:b||!!G||_.version<2,onClick:()=>$(async()=>{Q(await Z(`/projects/${_.projectId}/undo`,{expectedVersion:_.version,targetVersion:_.version-1,operationId:z()}))}),children:[`↶ `,Y.undo]})]})]}),x&&(0,u.jsxs)(`div`,{role:`alert`,className:`alert`,children:[s===`karamentreprises`?x.replace(/Polycyphers/gi,`Karamentreprises`):x,(0,u.jsx)(`button`,{"aria-label":Y.close,onClick:()=>S(``),children:`×`})]}),T&&(0,u.jsxs)(`div`,{role:`status`,className:`notice`,children:[T,(0,u.jsx)(`button`,{"aria-label":Y.close,onClick:()=>E(``),children:`×`})]}),G&&(0,u.jsx)(`section`,{className:`notice preview-banner`,role:`status`,children:(0,u.jsxs)(`div`,{children:[(0,u.jsx)(`strong`,{children:h(d,`Unsaved edit preview`)}),(0,u.jsxs)(`p`,{children:[`Review the recomputed plan, schedule and rule findings below. Your saved version `,_?.version,` is unchanged.`]}),(0,u.jsx)(`button`,{className:`ink`,disabled:b||!Te(G,_),onClick:ln,children:h(d,`Apply as new version`)}),(0,u.jsx)(`button`,{className:`outline`,disabled:b,onClick:()=>K(null),children:h(d,`Discard preview`)})]})}),!_&&!v?(0,u.jsxs)(`div`,{className:`empty`,children:[(0,u.jsx)(`span`,{className:`empty-icon`,children:`⌑`}),(0,u.jsx)(`h2`,{children:Y.empty}),(0,u.jsx)(`p`,{children:Y.emptyBody}),(0,u.jsxs)(`div`,{className:`actions`,children:[(0,u.jsxs)(`button`,{className:`ink large`,disabled:b,onClick:()=>kt.current?.click(),children:[Y.upload,(0,u.jsx)(B,{})]}),(0,u.jsx)(`button`,{className:`outline`,disabled:b,onClick:()=>tn(),children:h(d,`Enter measurements`)})]}),H&&(0,u.jsx)(`button`,{className:`outline`,disabled:b,onClick:()=>$(async()=>{let e=await Z(`/projects/`+H);Q(e),g(e.input.isDraft?`measure`:`proposals`)}),children:h(d,`Resume saved project`)}),N.mode===`local-demo`&&(0,u.jsx)(`button`,{className:`textbtn`,disabled:b,onClick:nn,children:Y.try})]}):It?(0,u.jsxs)(`section`,{className:`paper consent-panel`,children:[(0,u.jsx)(`h2`,{children:{en:`Review an existing plan`,de:`Bestehenden Plan prüfen`,fr:`Vérifier un plan existant`,ar:`مراجعة مخطط قائم`}[d]}),(0,u.jsx)(`p`,{children:{en:`Preserve the supplied geometry. Image observations never become confirmed metric dimensions automatically.`,de:`Die vorgegebene Geometrie bleibt erhalten. Bildbeobachtungen werden nie automatisch zu bestätigten metrischen Maßen.`,fr:`Conserver la géométrie fournie. Les observations d’image ne deviennent jamais automatiquement des mesures métriques confirmées.`,ar:`احفظ الهندسة المقدمة. لا تتحول ملاحظات الصورة تلقائياً إلى قياسات مترية مؤكدة.`}[d]}),(0,u.jsx)(`button`,{className:`outline`,disabled:b||Rt.busy,onClick:()=>kt.current?.click(),children:Y.upload}),Fe&&(0,u.jsx)(`img`,{src:Fe,alt:`Local source image preview`,style:{maxWidth:`100%`,maxHeight:350}}),q&&!Le&&Cn()]}):ne===`measure`&&v?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(W,{language:d,input:v,setInput:ie,onChange:e=>{ot(!0),Ke(!1),K(null),Je(t=>e===`footprint.diagonals`&&t?{status:`Unvalidated`,findings:[],suggestedDiagonal:t.suggestedDiagonal}:null),e&&gt(t=>t.filter(t=>t!==e))},estimatedFields:ht,confirmed:Ge,setConfirmed:Ke,onGenerate:sn,busy:b,onUpload:()=>kt.current?.click(),imageUrl:Fe,geometry:qe}),q&&!Le&&Cn(),Le&&(0,u.jsxs)(`section`,{className:`paper consent-panel`,children:[(0,u.jsx)(`p`,{children:h(d,`Reading sends this sanitized image to Anthropic Claude. EU storage and provider inference location are separate; provider data-processing terms must be configured by the service.`)}),(0,u.jsxs)(`label`,{className:`field`,children:[h(d,`What should the sketch reader focus on?`),(0,u.jsx)(`textarea`,{"aria-label":`Saved sketch brief`,disabled:b||Rt.busy,value:C,maxLength:8e3,onChange:e=>w(e.target.value)})]}),(0,u.jsx)(`button`,{className:`outline`,disabled:b,onClick:Tn,children:h(d,`Read saved sketch with AI · observations only`)})]}),dt&&(0,u.jsxs)(`section`,{className:`paper candidate-panel`,children:[(0,u.jsx)(`h3`,{children:h(d,`Recognized outline · estimated`)}),(0,u.jsx)(`p`,{children:dt.input?`${dt.input.edges.length} linked boundary edges · geometry ${dt.status}`:`The reader did not return a complete, valid outline. Enter or correct measurements manually.`}),(0,u.jsx)(`p`,{children:`Lengths use explicit labels only. Image coordinates do not establish physical scale. Bearings and wall types remain assumptions to review.`}),(0,u.jsx)(`button`,{className:`outline`,disabled:b||!dt.input||pt,onClick:kn,children:h(d,`Preview recognized outline`)}),pt&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`p`,{children:h(d,`Local estimated preview only. The saved project is unchanged.`)}),(0,u.jsx)(Me,{candidate:dt})]}),(0,u.jsx)(je,{report:dt.values,language:d})]}),(Tt.length>0||ze.length>0)&&(0,u.jsxs)(`article`,{className:`paper findings`,children:[(0,u.jsx)(`h3`,{children:h(d,`Sketch observations to confirm`)}),(0,u.jsx)(`p`,{children:`AI readings are estimated and unconfirmed. Compare them with your image and site measurements; enter the reviewed values in the footprint form. No value is applied automatically.`}),Tt.map((e,t)=>(0,u.jsxs)(`section`,{children:[(0,u.jsxs)(`strong`,{children:[e.kind,e.edgeId?` · `+e.edgeId:``]}),e.value!=null&&(0,u.jsxs)(`p`,{children:[e.value,` `,e.unit??`unit unknown`,` `,(0,u.jsx)(`span`,{className:`value-tag origin-estimated`,children:`estimated · unconfirmed`})]}),(0,u.jsx)(`p`,{children:e.evidence})]},t)),ze.map((e,t)=>(0,u.jsx)(`p`,{children:e},t)),Dt&&(0,u.jsx)(je,{report:Dt,language:d})]})]}):X?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(`div`,{className:`metrics`,children:[(0,u.jsxs)(`div`,{children:[(0,u.jsxs)(`span`,{children:[Y.area,` `,(0,u.jsx)(U,{language:d,report:Mn,path:`centerlineAreaM2`})]}),(0,u.jsxs)(`strong`,{children:[X.centerlineAreaM2.toFixed(2),(0,u.jsx)(`small`,{children:`m²`})]})]}),(0,u.jsxs)(`div`,{children:[(0,u.jsxs)(`span`,{children:[Y.net,` `,(0,u.jsx)(U,{language:d,report:Mn,path:`netAreaM2`})]}),(0,u.jsxs)(`strong`,{children:[X.netAreaM2.toFixed(2),(0,u.jsx)(`small`,{children:`m²`})]})]}),(0,u.jsxs)(`div`,{children:[(0,u.jsxs)(`span`,{children:[Y.perimeter,` `,(0,u.jsx)(U,{language:d,report:Mn,path:`perimeterM`})]}),(0,u.jsxs)(`strong`,{children:[Ut?.reconciliation.solutions[0]?.perimeterM.toFixed(2),(0,u.jsx)(`small`,{children:`m`})]})]}),(0,u.jsxs)(`div`,{className:`metric-note`,children:[X.hasRequiredConflicts?Y.warning:h(d,`Required layout checks passed`),(0,u.jsx)(`span`,{children:h(d,`Reference sources remain visible below.`)})]})]}),(0,u.jsxs)(`div`,{className:`drawing-layout`,children:[(0,u.jsxs)(`article`,{className:`drawing paper`,children:[(0,u.jsxs)(`div`,{className:`drawing-top`,children:[(0,u.jsxs)(`span`,{children:[`LAYOUT `,X.id]}),(0,u.jsx)(`span`,{children:G?`UNSAVED EDIT PREVIEW`:`ENGINE-CHECKED CONCEPT`}),(0,u.jsx)(`span`,{children:`METRES / CONCEPT`})]}),(0,u.jsx)(`div`,{className:`engine-svg`,dangerouslySetInnerHTML:{__html:l.default.sanitize(X.svg,{USE_PROFILES:{svg:!0,svgFilters:!0}})}}),(0,u.jsxs)(`div`,{className:`drawing-bottom`,children:[(0,u.jsx)(`span`,{children:s===`karamentreprises`?`KARAMENTREPRISES BIM`:`BAULYNQ VISION`}),(0,u.jsxs)(`span`,{children:[G?`PREVIEW / `:``,`v`,Ut?.version,` · `,d.toUpperCase()]})]})]}),(0,u.jsxs)(`aside`,{className:`proposal-panel`,children:[(0,u.jsx)(`span`,{className:`eyebrow`,children:`FIND YOUR FIT`}),Ut?.proposals.map(e=>(0,u.jsxs)(`button`,{className:`proposal-card `+(ae===e.id?`selected`:``),disabled:b,onClick:()=>{ae!==e.id&&(oe(e.id),A(null),k(null))},children:[(0,u.jsx)(`span`,{className:`proposal-letter`,children:e.id}),(0,u.jsxs)(`div`,{children:[e.recommended&&(0,u.jsx)(`small`,{className:`badge`,children:Y.recommended}),(0,u.jsx)(`h3`,{children:e.title}),(0,u.jsx)(`p`,{children:e.tradeOffs[0]})]})]},e.id)),(0,u.jsxs)(`button`,{className:`ink full`,disabled:b||!!G,onClick:()=>un(X),children:[Y.select,(0,u.jsx)(B,{})]}),!t&&_&&mn(),(0,u.jsxs)(`section`,{className:`drawing-downloads`,children:[(0,u.jsx)(`h3`,{children:h(d,`2D concept drawings`)}),(0,u.jsx)(`button`,{className:`outline full`,disabled:b||!!G,onClick:vn,children:h(d,`Prepare PDF / editable DXF / SVG`)}),ce&&Object.keys(ce.files).map(e=>(0,u.jsxs)(`button`,{className:`quiet`,onClick:()=>bn(e,ce),children:[e.toUpperCase(),` ↓`]},e)),(0,u.jsx)(`small`,{children:`Separate from the BIM model export. PDF is included when the service has PDF rendering configured.`})]}),(0,u.jsxs)(`div`,{className:`tradeoffs`,children:[(0,u.jsx)(`h3`,{children:Y.tradeoffs}),X.tradeOffs.map((e,t)=>(0,u.jsx)(`p`,{children:e},t))]}),ne===`download`?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`h3`,{children:Y.download}),le?Object.keys(le.files).map(e=>(0,u.jsxs)(`button`,{className:`outline full`,onClick:()=>bn(e),children:[e.toUpperCase(),` ↓`]},e)):(0,u.jsxs)(`button`,{className:`ink full`,disabled:b||!!G||X.hasRequiredConflicts,onClick:yn,children:[Y.export,(0,u.jsx)(B,{})]}),(0,u.jsx)(`small`,{children:le?.viewerVerification??Y.downloadNote})]}):(0,u.jsxs)(`div`,{className:`chat`,children:[(0,u.jsx)(`h3`,{children:Y.chat}),(0,u.jsx)(`textarea`,{"aria-label":Y.chat,disabled:b||Rt.busy,placeholder:Y.hint,value:C,maxLength:8e3,onChange:e=>w(e.target.value)}),(0,u.jsxs)(`button`,{className:`outline full`,disabled:b||!C.trim(),onClick:cn,children:[Y.send,` →`]})]})]})]}),(0,u.jsxs)(`div`,{className:`detail-grid`,children:[(0,u.jsxs)(`article`,{className:`paper schedule`,children:[(0,u.jsx)(`h3`,{children:Y.schedule}),(0,u.jsxs)(`table`,{children:[(0,u.jsx)(`thead`,{children:(0,u.jsxs)(`tr`,{children:[(0,u.jsx)(`th`,{children:h(d,`Room`)}),(0,u.jsx)(`th`,{children:`W × D`}),(0,u.jsx)(`th`,{children:h(d,`Axis m²`)}),(0,u.jsx)(`th`,{children:h(d,`Net m²`)})]})}),(0,u.jsx)(`tbody`,{children:X.schedule.map(e=>(0,u.jsxs)(`tr`,{children:[(0,u.jsx)(`td`,{children:e.name}),(0,u.jsxs)(`td`,{children:[e.widthM.toFixed(2),` × `,e.depthM.toFixed(2),(0,u.jsx)(U,{language:d,report:Mn,path:`${e.roomId}.widthM`}),(0,u.jsx)(U,{language:d,report:Mn,path:`${e.roomId}.depthM`})]}),(0,u.jsxs)(`td`,{children:[e.centerlineAreaM2.toFixed(2),(0,u.jsx)(U,{language:d,report:Mn,path:`${e.roomId}.centerlineAreaM2`})]}),(0,u.jsxs)(`td`,{children:[e.netAreaM2.toFixed(2),(0,u.jsx)(U,{language:d,report:Mn,path:`${e.roomId}.netAreaM2`})]})]},e.roomId))}),(0,u.jsx)(`tfoot`,{children:(0,u.jsxs)(`tr`,{children:[(0,u.jsx)(`th`,{children:h(d,`Total`)}),(0,u.jsx)(`td`,{}),(0,u.jsxs)(`th`,{children:[X.centerlineAreaM2.toFixed(2),(0,u.jsx)(U,{language:d,report:Mn,path:`centerlineAreaM2`})]}),(0,u.jsxs)(`th`,{children:[X.netAreaM2.toFixed(2),(0,u.jsx)(U,{language:d,report:Mn,path:`netAreaM2`})]})]})})]})]}),(0,u.jsxs)(`article`,{className:`paper check-summary`,children:[(0,u.jsx)(`h3`,{children:Y.checks}),(0,u.jsx)(`div`,{className:`check-counts`,children:Object.entries(Nn).map(([e,t])=>(0,u.jsxs)(`span`,{children:[(0,u.jsx)(`strong`,{children:t}),e]},e))}),(0,u.jsxs)(`button`,{className:`textbtn`,onClick:()=>P(!ve),children:[ve?h(d,`Hide`):Y.notes,` `,ve?`−`:`+`]}),(0,u.jsx)(`p`,{children:`Reference-only entries are disclosed, never presented as passed checks. Country statutory certification is not inferred.`})]})]}),ve&&(0,u.jsx)(`article`,{className:`paper findings`,children:X.findings.map((e,t)=>(0,u.jsxs)(`details`,{children:[(0,u.jsxs)(`summary`,{children:[(0,u.jsx)(`span`,{className:`status `+e.status,children:e.status}),(0,u.jsx)(`code`,{children:e.ruleId}),(0,u.jsx)(`span`,{children:e.subjectId})]}),(0,u.jsx)(`p`,{children:e.measurement}),e.fix&&(0,u.jsx)(`p`,{children:e.fix}),(0,u.jsx)(`small`,{children:e.source})]},t))}),(0,u.jsx)(`p`,{className:`disclaimer`,children:Y.disclaimer})]}):Ut?(0,u.jsxs)(`section`,{className:`paper findings`,role:`status`,children:[(0,u.jsx)(`h2`,{children:h(d,`No layout proposal is available`)}),(0,u.jsx)(`p`,{children:h(d,`Your measurements are retained. Review the engine findings and measurements before trying again.`)}),(0,u.jsxs)(`p`,{children:[h(d,`Status`),`: `,Ut.reconciliation.status]}),Ut.reconciliation.findings.map((e,t)=>(0,u.jsx)(`p`,{children:e.message},t)),(0,u.jsx)(`button`,{className:`outline`,disabled:b,onClick:()=>g(`measure`),children:h(d,`Review measurements`)}),(0,u.jsx)(`p`,{className:`disclaimer`,children:Y.disclaimer})]}):null,e&&!_&&(0,u.jsx)(`button`,{className:`outline`,disabled:b||Ht,onClick:()=>void Sn(),children:{en:`Preserve an existing plan`,de:`Bestehenden Plan erhalten`,fr:`Conserver un plan existant`,ar:`الحفاظ على مخطط قائم`}[d]}),e&&_&&(0,u.jsx)(`div`,{className:`actions`,children:(0,u.jsx)(`button`,{className:`outline`,disabled:b||Rt.busy||Ht,"aria-pressed":It,onClick:()=>Lt(!It),children:{en:`Existing plan / layout design`,de:`Bestandsplan / Entwurf`,fr:`Plan existant / conception`,ar:`مخطط قائم / تصميم`}[d]})}),_&&!X&&!t&&mn(),_?.pendingDraft&&(0,u.jsx)(`p`,{role:`status`,children:h(d,`Pending inputs are saved privately. They are not an accepted result.`)}),e&&_&&It&&(0,u.jsx)(y,{projectId:_.projectId,projectVersion:_.version,pendingDraft:_.pendingDraft??void 0,loadSavedOnMount:_.workflow===`existing-plan`&&!_.pendingDraft?.graph,persistPending:t?void 0:an,onPendingSaved:t?void 0:on,registerPendingSaver:t?void 0:St,language:d,disabled:b,sourceObjectId:Le??void 0,imageUrl:Fe||void 0,api:Z,onState:Bt,onDownload:(e,t)=>void bn(e,t)},_.projectId),_&&(0,u.jsx)(ee,{language:d,version:_.version,busy:b,preview:!!G,open:$e,versions:Ye,comparison:Ze,left:tt,right:rt,onToggle:dn,onLeftChange:e=>{nt(e),Qe(null)},onRightChange:e=>{it(e),Qe(null)},onCompare:fn,onRestore:pn}),(Ut||qe)&&(0,u.jsx)(je,{report:Mn,language:d})]}),(0,u.jsx)(`input`,{hidden:!0,type:`file`,ref:kt,accept:`image/png,image/jpeg,image/webp`,onChange:e=>{let t=e.target.files?.[0];t&&xn(t),e.target.value=``}})]}),b&&(0,u.jsxs)(`div`,{className:`working`,role:`status`,children:[(0,u.jsx)(`span`,{className:`spinner`}),Y.generating]}),m===`studio`&&_&&_t.length>0&&(0,u.jsx)(`section`,{className:`paper saved-files`,children:(0,u.jsxs)(`details`,{children:[(0,u.jsx)(`summary`,{children:h(d,`Saved project files · download without a new export`)}),_t.map(e=>(0,u.jsxs)(`article`,{children:[(0,u.jsxs)(`strong`,{children:[e.kind,e.version?` · v`+e.version:``,e.proposalId?` · `+e.proposalId:``]}),e.files.map(t=>(0,u.jsxs)(`button`,{className:`quiet`,disabled:b,onClick:()=>jn(e,t),children:[t.format.toUpperCase(),` ↓`]},t.objectId)),e.kind===`upload`&&e.files.find(e=>[`png`,`jpeg`,`webp`].includes(e.format))&&(0,u.jsx)(`button`,{className:`outline`,disabled:b,onClick:()=>An(e.files.find(e=>[`png`,`jpeg`,`webp`].includes(e.format)).objectId),children:h(d,`Use saved sketch`)})]},e.artifactId))]})}),!t&&N.analyticsEnabled===!0&&(0,u.jsxs)(`aside`,{className:`analytics-choice`,children:[(0,u.jsxs)(`label`,{children:[(0,u.jsx)(`input`,{type:`checkbox`,checked:Ct,onChange:e=>$t(e.target.checked)}),` Allow optional visit and paywall analytics`]}),(0,u.jsx)(`small`,{children:`We send event type only, without drawings, dimensions, prompts, URLs or account IDs. Uncheck to withdraw consent and request deletion of this browser's client observations.`})]}),!t&&j&&st&&(0,u.jsx)(`div`,{className:`modal-backdrop`,children:(0,u.jsxs)(`section`,{className:`modal paper`,role:`alertdialog`,"aria-modal":`true`,"aria-labelledby":`content-deletion-title`,children:[(0,u.jsx)(`h2`,{id:`content-deletion-title`,children:h(d,`Delete all project content?`)}),(0,u.jsx)(`p`,{children:h(d,`This requests removal of your projects, sketches and generated files in this service. Account identity, billing and required anti-abuse records are retained. Pending accounting may delay completion; we show the service's result.`)}),(0,u.jsx)(`button`,{className:`outline full danger`,disabled:b,onClick:Dn,children:h(d,`Delete my project content`)}),(0,u.jsx)(`button`,{className:`quiet full`,disabled:b,onClick:()=>ct(!1),children:h(d,`Cancel`)})]})}),!t&&de&&(0,u.jsx)(`div`,{className:`modal-backdrop`,children:(0,u.jsxs)(`form`,{className:`modal paper`,onSubmit:e=>{e.preventDefault(),On()},children:[(0,u.jsx)(`button`,{type:`button`,className:`close`,"aria-label":Y.close,onClick:()=>pe(!1),children:`×`}),(0,u.jsx)(ke,{}),(0,u.jsx)(`h2`,{children:F===`signup`?h(d,`Create a verified account`):F===`verify`?h(d,`Verify your email`):Y.signin}),x&&(0,u.jsx)(`p`,{role:`alert`,children:s===`karamentreprises`?x.replace(/Polycyphers/gi,`Karamentreprises`):x}),T&&(0,u.jsx)(`p`,{role:`status`,children:T}),F!==`verify`&&(0,u.jsxs)(`label`,{className:`field`,children:[Y.email,(0,u.jsx)(`input`,{type:`email`,autoComplete:`email`,required:!0,value:me,onChange:e=>he(e.target.value)})]}),F===`verify`&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`p`,{children:`Open the verification link sent to your email, or paste its token below. Verification happens only when you submit this form.`}),(0,u.jsxs)(`label`,{className:`field`,children:[h(d,`Verification token`),(0,u.jsx)(`input`,{autoComplete:`off`,required:!0,value:De,onChange:e=>L(e.target.value)})]})]}),F!==`signup`&&(0,u.jsxs)(`label`,{className:`field`,children:[Y.password,(0,u.jsx)(`input`,{type:`password`,autoComplete:F===`verify`?`new-password`:`current-password`,minLength:F===`verify`?10:void 0,required:!0,value:ge,onChange:e=>M(e.target.value)})]}),(0,u.jsx)(`button`,{className:`ink full`,disabled:b,children:F===`signup`?h(d,`Send verification email`):F===`verify`?h(d,`Verify & set password`):Y.signin}),(0,u.jsxs)(`div`,{className:`account-modes`,children:[(0,u.jsx)(`button`,{type:`button`,className:`textbtn`,onClick:()=>I(`login`),children:h(d,`Sign in`)}),(0,u.jsx)(`button`,{type:`button`,className:`textbtn`,onClick:()=>I(`signup`),children:h(d,`Create account`)}),(0,u.jsx)(`button`,{type:`button`,className:`textbtn`,onClick:()=>I(`verify`),children:h(d,`Verify email`)})]}),typeof N.verificationCompletionUrl==`string`&&(0,u.jsxs)(`p`,{children:[`Verification destination: `,N.verificationCompletionUrl]})]})})]})}function U({report:e,path:t,language:n=`en`}){let r=e?.values.find(e=>e.path===t)??e?.values.find(e=>e.path.endsWith(`.`+t));return(0,u.jsxs)(`small`,{className:`value-tag `+(r?.origin??`missing`),title:r?.source??`No provenance supplied for this displayed value.`,children:[h(n,r?.origin??`unlabelled`),` · `,h(n,r?.origin!==`estimated`&&r?.confirmed===!0?`reviewed evidence`:`unconfirmed`)]})}function je({report:e,language:t}){let n=t;return(0,u.jsxs)(`section`,{className:`paper provenance`,children:[(0,u.jsx)(`h3`,{children:h(t,`Value provenance & discrepancies`)}),(0,u.jsx)(`p`,{children:e?.notice??`No provenance report was supplied. Values are unconfirmed; do not treat them as measured or verified.`}),(0,u.jsx)(`h4`,{children:h(t,`Discrepancy report`)}),e?e.discrepancies.length?e.discrepancies.map(e=>(0,u.jsxs)(`article`,{children:[(0,u.jsxs)(`strong`,{children:[e.kind,` · `,e.subject]}),(0,u.jsx)(`p`,{children:e.message}),e.appliedFix&&(0,u.jsxs)(`p`,{children:[`Applied fix: `,e.appliedFix]}),e.question&&(0,u.jsxs)(`p`,{children:[`Measurement needed: `,e.question]}),e.ruleId&&(0,u.jsx)(`code`,{children:e.ruleId})]},e.id)):(0,u.jsx)(`p`,{children:h(n,`No discrepancies reported by the engine.`)}):(0,u.jsx)(`p`,{children:h(n,`Discrepancy report unavailable.`)}),(0,u.jsxs)(`details`,{children:[(0,u.jsx)(`summary`,{children:h(n,`Every supplied value and its source`)}),(0,u.jsxs)(`table`,{children:[(0,u.jsx)(`thead`,{children:(0,u.jsxs)(`tr`,{children:[(0,u.jsx)(`th`,{children:h(n,`Value`)}),(0,u.jsx)(`th`,{children:h(n,`Origin / evidence`)}),(0,u.jsx)(`th`,{children:h(n,`Source`)})]})}),(0,u.jsx)(`tbody`,{children:e?.values.map(t=>(0,u.jsxs)(`tr`,{children:[(0,u.jsxs)(`td`,{children:[(0,u.jsx)(`code`,{children:t.path}),(0,u.jsx)(`br`,{}),t.value,` `,t.unit]}),(0,u.jsx)(`td`,{children:(0,u.jsx)(U,{language:n,report:e,path:t.path})}),(0,u.jsxs)(`td`,{children:[t.source,t.inputPaths.length>0&&(0,u.jsxs)(`small`,{children:[`Inputs: `,t.inputPaths.join(`, `)]})]})]},t.path))})]})]})]})}function W({input:e,setInput:t,onChange:n,estimatedFields:r,confirmed:i,setConfirmed:a,onGenerate:o,busy:s,onUpload:c,imageUrl:l,geometry:d,language:f}){let p=f,m=(e,i)=>{i&&(e=L(e,i,r)),t(e),n(i)},ee=e.programme,te=[[`bedroomWidthM`,`Bedroom width`],[`bedroomDepthM`,`Bedroom depth`],[`bathroomWidthM`,`Bathroom width`],[`bathroomDepthM`,`Bathroom depth`],[`hallWidthM`,`Hall width`],[`wardrobeLengthM`,`Wardrobe length`],[`balconyDepthM`,`Balcony depth (0 for none)`],[`slidingDoorWidthM`,`Balcony sliding door width`]];function ne(t){let n=e.footprint.edges,r=(t?[...n,{id:``,startVertexId:``,endVertexId:``,lengthM:NaN,bearingDegrees:null,direction:`Any`,wallType:`exterior`}]:n.slice(0,-1)).map((e,t,n)=>({...e,id:`W`+(t+1),startVertexId:`V`+(t+1),endVertexId:`V`+((t+1)%n.length+1)}));m({...e,footprint:{edges:r}})}return(0,u.jsxs)(`section`,{className:`measure-layout`,children:[(0,u.jsx)(`article`,{className:`paper form-card`,children:(0,u.jsxs)(`fieldset`,{disabled:s,style:{border:0,padding:0,minWidth:0},children:[(0,u.jsx)(`h2`,{children:h(p,`Measured footprint`)}),(0,u.jsx)(`p`,{children:`Enter walls in boundary order, counterclockwise. Bearings: 0° east, 90° north. Leave unknown angles blank; the solver may request one diagonal. These are your measurements, not generated dimensions.`}),(0,u.jsx)(`div`,{className:`edge-table`,children:e.footprint.edges.map((t,n)=>(0,u.jsxs)(`div`,{className:`edge-row`,children:[(0,u.jsxs)(`strong`,{children:[t.id,` `,(0,u.jsxs)(`small`,{children:[t.startVertexId,` → `,t.endVertexId]})]}),(0,u.jsxs)(`label`,{children:[h(p,`Length (m)`),` `,(0,u.jsxs)(`small`,{children:[h(p,De(e,`footprint.edges[${n}].lengthM`,r)),` · `,h(p,`unconfirmed`)]}),(0,u.jsx)(`input`,{"aria-label":`${t.id} length`,type:`number`,min:`0`,step:`any`,value:Number.isFinite(t.lengthM)?t.lengthM:``,onChange:t=>m({...e,footprint:{...e.footprint,edges:e.footprint.edges.map((e,r)=>r===n?{...e,lengthM:t.target.value===``?NaN:Number(t.target.value)}:e)}},`footprint.edges[${n}].lengthM`)})]}),(0,u.jsxs)(`label`,{children:[h(p,`Bearing (°)`),` `,(0,u.jsxs)(`small`,{children:[h(p,De(e,`footprint.edges[${n}].bearingDegrees`,r)),` · `,h(p,`unconfirmed`)]}),(0,u.jsx)(`input`,{"aria-label":`${t.id} bearing`,type:`number`,step:`0.01`,placeholder:h(p,`Unknown`),value:t.bearingDegrees??``,onChange:t=>m({...e,footprint:{...e.footprint,edges:e.footprint.edges.map((e,r)=>r===n?{...e,bearingDegrees:t.target.value===``?null:Number(t.target.value)}:e)}},`footprint.edges[${n}].bearingDegrees`)})]}),(0,u.jsxs)(`label`,{children:[h(p,`Wall`),(0,u.jsxs)(`select`,{"aria-label":`${t.id} wall type`,value:t.wallType,onChange:t=>m({...e,footprint:{...e.footprint,edges:e.footprint.edges.map((e,r)=>r===n?{...e,wallType:t.target.value}:e)}}),children:[(0,u.jsx)(`option`,{value:`exterior`,children:h(p,`Exterior`)}),(0,u.jsx)(`option`,{value:`party`,children:h(p,`Party · no openings`)})]})]})]},t.id))}),ee?.source.startsWith(`User-entered`)&&(0,u.jsxs)(`div`,{className:`actions`,children:[(0,u.jsx)(`button`,{className:`outline`,disabled:e.footprint.edges.length>=64,onClick:()=>ne(!0),children:h(p,`Add wall`)}),(0,u.jsx)(`button`,{className:`quiet`,disabled:e.footprint.edges.length<=3,onClick:()=>ne(!1),children:h(p,`Remove last wall`)})]}),d?.suggestedDiagonal&&(0,u.jsxs)(`label`,{className:`field`,children:[`Diagonal `,d.suggestedDiagonal.startVertexId,` → `,d.suggestedDiagonal.endVertexId,` (m)`,(0,u.jsx)(`small`,{children:d.suggestedDiagonal.reason}),(0,u.jsx)(`input`,{type:`number`,min:`0`,step:`any`,value:e.footprint.diagonals?.[0]?.lengthM??``,onChange:t=>m({...e,footprint:{...e.footprint,diagonals:t.target.value?[{startVertexId:d.suggestedDiagonal.startVertexId,endVertexId:d.suggestedDiagonal.endVertexId,lengthM:Number(t.target.value)}]:[]}},`footprint.diagonals`)})]}),(0,u.jsxs)(`details`,{open:!!ee,children:[(0,u.jsx)(`summary`,{children:h(p,`Room programme`)}),ee?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`p`,{children:h(p,`Requested dimensions. Every value is checked by the shared engine.`)}),(0,u.jsx)(`div`,{className:`programme-grid`,children:te.map(([t,n])=>(0,u.jsxs)(`label`,{className:`field`,children:[h(p,n),` (m)`,(0,u.jsxs)(`small`,{children:[h(p,De(e,`programme.${t}`,r)),` · `,h(p,`unconfirmed`)]}),(0,u.jsx)(`input`,{type:`number`,min:`0`,step:`0.01`,value:Number.isFinite(ee[t])?ee[t]:``,onChange:n=>m({...e,programme:{...ee,[t]:n.target.value===``?NaN:Number(n.target.value)}},`programme.${t}`)})]},t))}),[`entranceEdgeId`,`balconyEdgeId`].map(t=>(0,u.jsxs)(`label`,{className:`field`,children:[h(p,t===`entranceEdgeId`?`Entrance wall`:`Balcony wall`),(0,u.jsxs)(`select`,{value:ee[t],onChange:n=>m({...e,programme:{...ee,[t]:n.target.value}}),children:[(0,u.jsx)(`option`,{value:``,children:h(p,`Choose a wall`)}),e.footprint.edges.map(e=>(0,u.jsx)(`option`,{children:e.id},e.id))]})]},t))]}):(0,u.jsxs)(`p`,{children:[`This example uses engine concept programme assumptions. They remain estimated until replaced with your own dimensions. `,(0,u.jsx)(`button`,{className:`textbtn`,onClick:()=>m({...e,programme:Ce(e.language).programme}),children:`Enter my own room dimensions`})]})]}),(0,u.jsxs)(`label`,{className:`field`,children:[h(p,`Main view wall`),(0,u.jsxs)(`select`,{value:e.viewEdgeId,onChange:t=>m({...e,viewEdgeId:t.target.value}),children:[(0,u.jsx)(`option`,{value:``,children:h(p,`No preference`)}),e.footprint.edges.map(e=>(0,u.jsx)(`option`,{children:e.id},e.id))]})]}),(0,u.jsxs)(`label`,{className:`field`,children:[h(p,`Clear ceiling height (m)`),(0,u.jsxs)(`small`,{children:[h(p,De(e,`buildUps.clearCeilingHeightM`,r)),` · `,h(p,`unconfirmed`)]}),(0,u.jsx)(`input`,{type:`number`,step:`0.01`,min:`0`,value:Number(e.buildUps?.clearCeilingHeightM??2.8),onChange:t=>m({...e,buildUps:{...e.buildUps,clearCeilingHeightM:Number(t.target.value)}},`buildUps.clearCeilingHeightM`)})]}),(0,u.jsx)(`p`,{children:`Other wall/slab build-ups remain labelled concept placeholders from the shared engine.`}),(0,u.jsxs)(`label`,{className:`field`,children:[h(p,`Country`),(0,u.jsxs)(`select`,{value:e.country,onChange:t=>m({...e,country:t.target.value}),children:[(0,u.jsx)(`option`,{children:`unspecified`}),(0,u.jsx)(`option`,{children:`Lebanon`}),(0,u.jsx)(`option`,{children:`Germany`})]})]}),(0,u.jsxs)(`label`,{className:`confirmation`,children:[(0,u.jsx)(`input`,{type:`checkbox`,checked:i,onChange:e=>a(e.target.checked)}),h(p,`I confirm these measured dimensions and angle assumptions.`)]}),(0,u.jsx)(`button`,{className:`ink full`,disabled:s||!i,onClick:o,children:h(p,`Check footprint & generate`)}),(0,u.jsx)(`button`,{className:`outline full`,onClick:c,children:h(p,`Attach sketch`)})]})}),(0,u.jsx)(`aside`,{className:`paper measure-sketch`,children:l?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`img`,{className:`uploaded-preview`,src:l,alt:`Your selected sketch, local preview`}),(0,u.jsx)(`p`,{children:h(p,`Local image preview. No dimensions are inferred from this display.`)})]}):(0,u.jsxs)(`div`,{className:`empty`,children:[(0,u.jsx)(`h3`,{children:h(p,`Your measurements define the plan.`)}),(0,u.jsx)(`p`,{children:h(p,`Attach your sketch for reference. There is no sample footprint hidden behind this form.`)}),(0,u.jsx)(`button`,{className:`outline`,disabled:s,onClick:c,children:h(p,`Choose sketch image`)})]})})]})}function Me({candidate:e}){let t=e.reconciliation?.status===`Unique`?e.reconciliation.solutions[0]?.vertices:null,n=new Map;for(let t of e.values.values){let e=/^sketch\.topology\.vertices\.([A-Za-z0-9_-]+)\.(x|y)$/.exec(t.path);if(e){let r=n.get(e[1])??{x:NaN,y:NaN};r[e[2]]=t.value,n.set(e[1],r)}}let r=t?.length?t.map(e=>({id:e.id,x:e.position.x,y:-e.position.y})):e.input?.edges.map(e=>({id:e.startVertexId,...n.get(e.startVertexId)})).filter(e=>Number.isFinite(e.x)&&Number.isFinite(e.y))??[];if(r.length<3||r.length!==e.input?.edges.length)return null;let i=Math.min(...r.map(e=>e.x)),a=Math.min(...r.map(e=>e.y)),o=Math.max(...r.map(e=>e.x))-i,s=Math.max(...r.map(e=>e.y))-a,c=Math.min(560/Math.max(o,1e-6),300/Math.max(s,1e-6)),l=r.map(e=>({id:e.id,x:40+(e.x-i)*c,y:40+(e.y-a)*c}));return(0,u.jsxs)(`figure`,{className:`recognized-outline`,children:[(0,u.jsxs)(`svg`,{viewBox:`0 0 640 390`,role:`img`,"aria-label":`Unconfirmed recognized outline preview`,children:[(0,u.jsx)(`polygon`,{points:l.map(e=>`${e.x},${e.y}`).join(` `),fill:`rgba(41,124,112,.07)`,stroke:`#286e62`,strokeWidth:`2`}),l.map((t,n)=>{let r=l[(n+1)%l.length],i=e.input?.edges.find(e=>e.startVertexId===t.id);return(0,u.jsxs)(`g`,{children:[(0,u.jsx)(`circle`,{cx:t.x,cy:t.y,r:`3`,fill:`#286e62`}),(0,u.jsx)(`text`,{x:t.x+5,y:t.y-7,fontSize:`10`,children:t.id}),i&&(0,u.jsxs)(`text`,{x:(t.x+r.x)/2+5,y:(t.y+r.y)/2+12,fontSize:`11`,children:[i.id,` · `,i.lengthM.toFixed(2),` m [estimated]`]})]},t.id)})]}),(0,u.jsxs)(`figcaption`,{children:[t?.length?`Deterministic closure preview from estimated inputs.`:`Image-space outline estimate; no physical scale.`,` Original recognized outline; form edits are checked when you request reconciliation.`]})]})}exports.BIM_PACKAGE_ID=b,exports.BIM_PACKAGE_VERSION=se,exports.BimStudio=Ae,exports.checkBimLicense=F,exports.clearLicense=ue,Object.defineProperty(exports,"disableTelemetry",{enumerable:!0,get:function(){return d.disableTelemetry}}),Object.defineProperty(exports,"enableTelemetry",{enumerable:!0,get:function(){return d.enableTelemetry}}),exports.setLicense=j;