{"id":929,"date":"2026-08-06T16:21:37","date_gmt":"2026-08-06T16:21:37","guid":{"rendered":"https:\/\/freewebtools.co.in\/?page_id=929"},"modified":"2026-08-06T16:24:09","modified_gmt":"2026-08-06T16:24:09","slug":"abc","status":"publish","type":"page","link":"https:\/\/freewebtools.co.in\/index.php\/abc\/","title":{"rendered":"LESSON PLAN GEN"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no\">\n    <title>Enterprise Lesson Plan Builder &#038; Engine<\/title>\n    \n    <!-- Client-side PDF Generation Engine -->\n    <script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/html2pdf.js\/0.10.1\/html2pdf.bundle.min.js\" defer><\/script>\n    <!-- Client-side DOCX Export Engine -->\n    <script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/docx\/8.5.0\/docx.min.js\" defer><\/script>\n    <script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/FileSaver.js\/2.0.5\/FileSaver.min.js\" defer><\/script>\n\n    <style>\n        \/* ==========================================================================\n           1. CSS Custom Properties & Document Setup\n           ========================================================================== *\/\n        :root {\n            --border-color: #000000;\n            --header-bg: #f2f2f2;\n            --heading-bg: #ffeb3b;\n            --font-family: \"Times New Roman\", Times, serif;\n            --primary-accent: #0f172a;\n            --toolbar-bg: #ffffff;\n            --toolbar-border: #e2e8f0;\n            --btn-hover: #f1f5f9;\n            --primary-blue: #2563eb;\n            --focus-ring: rgba(37, 99, 235, 0.25);\n        }\n\n        @page {\n            size: A4 portrait;\n            margin: 10mm;\n        }\n\n        * {\n            box-sizing: border-box;\n            margin: 0;\n            padding: 0;\n            -webkit-tap-highlight-color: transparent;\n        }\n\n        body {\n            font-family: var(--font-family);\n            color: #000000;\n            background-color: #f1f5f9;\n            line-height: 1.3;\n            padding-top: 65px;\n            overflow-x: hidden;\n            width: 100vw;\n        }\n\n        \/* ==========================================================================\n           2. Enterprise Sticky Toolbar\n           ========================================================================== *\/\n        .app-toolbar {\n            position: fixed;\n            top: 0;\n            left: 0;\n            right: 0;\n            height: 56px;\n            background: var(--toolbar-bg);\n            border-bottom: 1px solid var(--toolbar-border);\n            display: flex;\n            align-items: center;\n            justify-content: space-between;\n            padding: 0 12px;\n            z-index: 1000;\n            box-shadow: 0 1px 3px rgba(0,0,0,0.05);\n            font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;\n            overflow-x: auto;\n            white-space: nowrap;\n            -webkit-overflow-scrolling: touch;\n        }\n\n        .app-toolbar::-webkit-scrollbar {\n            display: none;\n        }\n\n        .toolbar-group {\n            display: flex;\n            align-items: center;\n            gap: 4px;\n            flex-shrink: 0;\n        }\n\n        .toolbar-divider {\n            width: 1px;\n            height: 24px;\n            background: #cbd5e1;\n            margin: 0 4px;\n            flex-shrink: 0;\n        }\n\n        .tool-btn {\n            background: transparent;\n            border: 1px solid transparent;\n            border-radius: 6px;\n            padding: 8px 10px;\n            font-size: 13px;\n            font-weight: 500;\n            color: #334155;\n            cursor: pointer;\n            display: inline-flex;\n            align-items: center;\n            gap: 6px;\n            transition: background 0.1s ease, border-color 0.1s ease;\n            min-height: 38px;\n            min-width: 38px;\n            justify-content: center;\n            flex-shrink: 0;\n        }\n\n        .tool-btn svg {\n            width: 16px;\n            height: 16px;\n            stroke: currentColor;\n            stroke-width: 2;\n            fill: none;\n            flex-shrink: 0;\n        }\n\n        .tool-btn:hover, .tool-btn:focus-visible {\n            background: var(--btn-hover);\n            border-color: #cbd5e1;\n            color: #0f172a;\n            outline: 2px solid var(--primary-blue);\n            outline-offset: 1px;\n        }\n\n        .tool-btn.primary {\n            background: var(--primary-blue);\n            color: #ffffff;\n            border-color: var(--primary-blue);\n        }\n\n        .tool-btn.primary:hover, .tool-btn.primary:focus-visible {\n            background: #1d4ed8;\n        }\n\n        .tool-btn:disabled {\n            opacity: 0.4;\n            cursor: not-allowed;\n            outline: none;\n        }\n\n        \/* ==========================================================================\n           3. Layout Workspace & Engine Panel\n           ========================================================================== *\/\n        .workspace {\n            max-width: 210mm;\n            width: 100%;\n            margin: 12px auto;\n            display: flex;\n            flex-direction: column;\n            gap: 16px;\n            padding: 0 10px;\n        }\n\n        .engine-container {\n            background: #ffffff;\n            padding: 16px;\n            border-radius: 8px;\n            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);\n            font-family: sans-serif;\n            border: 1px solid #e2e8f0;\n            width: 100%;\n        }\n\n        .engine-header {\n            display: flex;\n            flex-wrap: wrap;\n            justify-content: space-between;\n            align-items: center;\n            margin-bottom: 12px;\n            border-bottom: 1px solid #e2e8f0;\n            padding-bottom: 10px;\n            gap: 8px;\n        }\n\n        .engine-title {\n            font-size: 13pt;\n            font-weight: bold;\n            color: var(--primary-accent);\n        }\n\n        .config-form-grid {\n            display: grid;\n            grid-template-columns: repeat(3, 1fr);\n            gap: 10px;\n        }\n\n        .form-group {\n            display: flex;\n            flex-direction: column;\n            gap: 4px;\n            min-width: 0;\n        }\n\n        .form-group.full-span {\n            grid-column: span 3;\n        }\n\n        .form-group label {\n            font-size: 10.5px;\n            font-weight: 700;\n            color: #475569;\n            text-transform: uppercase;\n        }\n\n        .form-control {\n            font-family: sans-serif;\n            font-size: 14px;\n            padding: 8px 10px;\n            border: 1px solid #cbd5e1;\n            border-radius: 6px;\n            outline: none;\n            transition: border-color 0.15s, box-shadow 0.15s;\n            width: 100%;\n            background: #fff;\n            min-height: 40px;\n        }\n\n        .form-control:focus-visible {\n            border-color: var(--primary-blue);\n            box-shadow: 0 0 0 2px var(--focus-ring);\n        }\n\n        .form-control:invalid:not(:placeholder-shown) {\n            border-color: #ef4444;\n            box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);\n        }\n\n        \/* ==========================================================================\n           4. Printable Sheet Preview & Table Architecture\n           ========================================================================== *\/\n        .page-preview-wrapper {\n            width: 100%;\n            overflow-x: auto;\n            -webkit-overflow-scrolling: touch;\n            background: transparent;\n            padding-bottom: 10px;\n        }\n\n        .page-container {\n            width: 210mm;\n            min-height: 297mm;\n            padding: 12mm;\n            background: #ffffff;\n            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);\n            border-radius: 4px;\n            box-sizing: border-box;\n            margin: 0 auto;\n            flex-shrink: 0;\n        }\n\n        table.lesson-plan-table {\n            width: 100%;\n            border-collapse: collapse;\n            border: 1.5px solid var(--border-color);\n            table-layout: fixed;\n        }\n\n        table.lesson-plan-table tr {\n            page-break-inside: avoid;\n            break-inside: avoid;\n        }\n\n        table.lesson-plan-table th,\n        table.lesson-plan-table td {\n            border: 1px solid var(--border-color);\n            padding: 6px 8px;\n            vertical-align: middle;\n            font-size: 11pt;\n            word-wrap: break-word;\n            overflow-wrap: break-word;\n        }\n\n        .text-center { text-align: center; }\n        .text-left { text-align: left; }\n        .text-right { text-align: right; }\n        .font-bold { font-weight: bold; }\n        .uppercase { text-transform: uppercase; }\n\n        .header-title { font-size: 14pt; font-weight: bold; }\n        .sub-header-title { font-size: 12pt; font-weight: bold; }\n\n        .section-heading-row {\n            page-break-after: avoid;\n            break-after: avoid;\n        }\n        .section-heading-row td {\n            background-color: var(--heading-bg) !important;\n            font-weight: bold;\n            text-align: center;\n            font-size: 11pt;\n            letter-spacing: 0.05em;\n            text-transform: uppercase;\n        }\n\n        .lp-input {\n            width: 100%;\n            border: none;\n            background: transparent;\n            font-family: inherit;\n            font-size: inherit;\n            font-weight: inherit;\n            color: inherit;\n            padding: 0;\n            outline: none;\n            resize: none;\n        }\n\n        .lp-select {\n            width: 100%;\n            border: 1px solid transparent;\n            background: transparent;\n            font-family: inherit;\n            font-size: inherit;\n            font-weight: bold;\n            text-align: center;\n            cursor: pointer;\n            outline: none;\n            padding: 4px 2px;\n            min-height: 32px;\n        }\n\n        .lp-select:hover, .lp-select:focus-visible {\n            background-color: #eff6ff;\n            border-color: var(--primary-blue);\n            border-radius: 4px;\n            outline: none;\n        }\n\n        .lp-input:focus-visible {\n            background-color: #eff6ff;\n            box-shadow: 0 0 0 1px var(--primary-blue);\n            border-radius: 4px;\n            padding: 2px;\n        }\n\n        textarea.lp-input {\n            min-height: 24px;\n            line-height: 1.3;\n        }\n\n        .preview-logo-container {\n            display: flex;\n            align-items: center;\n            justify-content: center;\n            margin-bottom: 6px;\n        }\n\n        .preview-logo {\n            max-height: 50px;\n            max-width: 150px;\n            object-fit: contain;\n            display: none;\n        }\n\n        .row-actions {\n            display: flex;\n            gap: 4px;\n            justify-content: center;\n            align-items: center;\n        }\n\n        .act-btn {\n            border: none;\n            background: #f1f5f9;\n            color: #475569;\n            width: 28px;\n            height: 28px;\n            border-radius: 4px;\n            cursor: pointer;\n            font-size: 12px;\n            display: inline-flex;\n            align-items: center;\n            justify-content: center;\n            transition: background 0.1s, color 0.1s;\n            flex-shrink: 0;\n        }\n\n        .act-btn:hover, .act-btn:focus-visible {\n            background-color: #cbd5e1;\n            color: #0f172a;\n            outline: 2px solid var(--primary-blue);\n        }\n\n        .act-btn.danger:hover, .act-btn.danger:focus-visible {\n            background-color: #ef4444;\n            color: #ffffff;\n        }\n\n        \/* ==========================================================================\n           5. Modal Dialog Architecture\n           ========================================================================== *\/\n        .modal-overlay {\n            position: fixed;\n            top: 0; left: 0; right: 0; bottom: 0;\n            background: rgba(0,0,0,0.5);\n            display: none;\n            align-items: center;\n            justify-content: center;\n            z-index: 2000;\n            padding: 16px;\n        }\n        .modal-content {\n            background: #ffffff;\n            padding: 20px;\n            border-radius: 8px;\n            width: 100%;\n            max-width: 400px;\n            font-family: sans-serif;\n            box-shadow: 0 10px 25px rgba(0,0,0,0.15);\n        }\n        .modal-header {\n            font-size: 16px;\n            font-weight: bold;\n            margin-bottom: 16px;\n            display: flex;\n            justify-content: space-between;\n            align-items: center;\n        }\n\n        \/* ==========================================================================\n           6. Responsive Breakpoints\n           ========================================================================== *\/\n        @media (max-width: 1024px) {\n            .config-form-grid { grid-template-columns: repeat(2, 1fr); }\n            .form-group.full-span { grid-column: span 2; }\n        }\n\n        @media (max-width: 768px) {\n            body { padding-top: 52px; }\n            .config-form-grid { grid-template-columns: 1fr; }\n            .form-group.full-span { grid-column: span 1; }\n            .workspace { padding: 0 6px; gap: 10px; }\n            .engine-container { padding: 12px; }\n            .page-container {\n                transform: scale(0.92);\n                transform-origin: top left;\n                margin-bottom: -100px;\n            }\n        }\n\n        @media (max-width: 480px) {\n            .page-container {\n                transform: scale(0.72);\n                margin-bottom: -220px;\n            }\n        }\n\n        \/* ==========================================================================\n           7. Enterprise Print & PDF Export Stylesheet\n           ========================================================================== *\/\n        @page {\n            size: A4 portrait;\n            margin: 12mm;\n        }\n\n        @media print {\n            * {\n                -webkit-print-color-adjust: exact !important;\n                print-color-adjust: exact !important;\n                color-adjust: exact !important;\n            }\n            body {\n                background: none !important;\n                padding-top: 0 !important;\n                width: 100% !important;\n                font-size: 10.5pt !important;\n            }\n            .app-toolbar, .engine-container, .modal-overlay, .action-col, .action-cell, .row-actions {\n                display: none !important;\n            }\n            .workspace {\n                margin: 0 !important;\n                max-width: 100% !important;\n                padding: 0 !important;\n            }\n            .page-preview-wrapper {\n                overflow: visible !important;\n                padding: 0 !important;\n            }\n            .page-container {\n                padding: 0 !important;\n                margin: 0 !important;\n                box-shadow: none !important;\n                width: 100% !important;\n                transform: none !important;\n                min-height: auto !important;\n            }\n            table.lesson-plan-table thead {\n                display: table-header-group !important;\n            }\n            table.lesson-plan-table tfoot {\n                display: table-footer-group !important;\n                page-break-inside: avoid !important;\n            }\n            table.lesson-plan-table tr {\n                page-break-inside: avoid !important;\n            }\n            .section-heading-row {\n                page-break-after: avoid !important;\n                page-break-inside: avoid !important;\n            }\n            .lp-input, .lp-select {\n                background: transparent !important;\n                box-shadow: none !important;\n                border: none !important;\n                appearance: none !important;\n            }\n            .section-heading-row td {\n                background-color: #ffeb3b !important;\n            }\n            tfoot tr td {\n                height: 55px !important;\n                vertical-align: bottom !important;\n                border-top: 1.5px solid #000000 !important;\n            }\n        }\n    <\/style>\n<\/head>\n<body>\n\n    <!-- Accessible Sticky Toolbar -->\n    <header class=\"app-toolbar\" role=\"toolbar\" aria-label=\"Lesson Plan Document Controls\">\n        <div class=\"toolbar-group\">\n            <button class=\"tool-btn\" onclick=\"LessonPlanApp.newPlan()\" aria-label=\"Create New Lesson Plan\" title=\"New Lesson Plan\">\n                <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\"><\/path><polyline points=\"14 2 14 8 20 8\"><\/polyline><line x1=\"12\" y1=\"18\" x2=\"12\" y2=\"12\"><\/line><line x1=\"9\" y1=\"15\" x2=\"15\" y2=\"15\"><\/line><\/svg>\n                <span>New<\/span>\n            <\/button>\n            <button class=\"tool-btn\" onclick=\"LessonPlanApp.openFilePrompt()\" aria-label=\"Open Lesson Plan JSON file\" title=\"Open JSON\">\n                <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z\"><\/path><\/svg>\n                <span>Open<\/span>\n            <\/button>\n            <input type=\"file\" id=\"fileInput\" style=\"display:none\" accept=\".json\" aria-hidden=\"true\" onchange=\"LessonPlanApp.handleFileOpen(event)\">\n            <button class=\"tool-btn primary\" onclick=\"LessonPlanApp.saveFile()\" aria-label=\"Save Lesson Plan JSON file\" title=\"Save JSON\">\n                <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z\"><\/path><polyline points=\"17 21 17 13 7 13 7 21\"><\/polyline><polyline points=\"7 3 7 8 15 8\"><\/polyline><\/svg>\n                <span>Save<\/span>\n            <\/button>\n        <\/div>\n\n        <div class=\"toolbar-group\">\n            <button class=\"tool-btn\" id=\"undoBtn\" onclick=\"LessonPlanApp.undo()\" disabled aria-label=\"Undo last action\" title=\"Undo\">\n                <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M3 7v6h6\"><\/path><path d=\"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13\"><\/path><\/svg>\n            <\/button>\n            <button class=\"tool-btn\" id=\"redoBtn\" onclick=\"LessonPlanApp.redo()\" disabled aria-label=\"Redo last action\" title=\"Redo\">\n                <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M21 7v6h-6\"><\/path><path d=\"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7\"><\/path><\/svg>\n            <\/button>\n        <\/div>\n\n        <div class=\"toolbar-group\">\n            <button class=\"tool-btn\" onclick=\"LessonPlanApp.exportPDF()\" aria-label=\"Export high-resolution PDF document\" title=\"Export PDF\">\n                <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\"><\/path><polyline points=\"14 2 14 8 20 8\"><\/polyline><line x1=\"12\" y1=\"18\" x2=\"12\" y2=\"12\"><\/line><line x1=\"9\" y1=\"15\" x2=\"15\" y2=\"15\"><\/line><\/svg>\n                <span>PDF<\/span>\n            <\/button>\n            <button class=\"tool-btn\" onclick=\"LessonPlanApp.exportDOCX()\" aria-label=\"Export editable Word document\" title=\"Export Word\">\n                <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1-2.5-2.5Z\"><\/path><path d=\"M6 6h10\"><\/path><path d=\"M6 10h10\"><\/path><path d=\"M6 14h6\"><\/path><\/svg>\n                <span>Word<\/span>\n            <\/button>\n            <button class=\"tool-btn\" onclick=\"window.print()\" aria-label=\"Print document\" title=\"Print\">\n                <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><polyline points=\"6 9 6 2 18 2 18 9\"><\/polyline><path d=\"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2\"><\/path><rect x=\"6\" y=\"14\" width=\"12\" height=\"8\"><\/rect><\/svg>\n            <\/button>\n            <div class=\"toolbar-divider\" aria-hidden=\"true\"><\/div>\n            <button class=\"tool-btn\" onclick=\"LessonPlanApp.openSettings()\" aria-label=\"Open builder settings\" title=\"Settings\">\n                <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><circle cx=\"12\" cy=\"12\" r=\"3\"><\/circle><path d=\"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06-.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z\"><\/path><\/svg>\n            <\/button>\n        <\/div>\n    <\/header>\n\n    <!-- Main Workspace Container -->\n    <main class=\"workspace\">\n\n        <!-- Configuration Form Panel -->\n        <section class=\"engine-container\" aria-labelledby=\"configHeading\">\n            <div class=\"engine-header\">\n                <h1 id=\"configHeading\" class=\"engine-title\">Lesson Plan Configuration<\/h1>\n                <div style=\"display: flex; gap: 6px;\">\n                    <button class=\"tool-btn\" onclick=\"LessonPlanApp.addRow('topic')\" aria-label=\"Add new topic row\">+ Topic<\/button>\n                    <button class=\"tool-btn\" style=\"background:#fef08a;\" onclick=\"LessonPlanApp.addRow('heading')\" aria-label=\"Add section heading\">+ Heading<\/button>\n                <\/div>\n            <\/div>\n\n            <form class=\"config-form-grid\" id=\"configForm\" onsubmit=\"return false;\">\n                <div class=\"form-group\">\n                    <label for=\"cfgInstitute\">College \/ Institute<\/label>\n                    <input type=\"text\" id=\"cfgInstitute\" class=\"form-control\" value=\"[INSTITUTE NAME]\" required oninput=\"LessonPlanApp.handleConfigInput()\">\n                <\/div>\n                <div class=\"form-group\">\n                    <label for=\"cfgDepartment\">Department<\/label>\n                    <input type=\"text\" id=\"cfgDepartment\" class=\"form-control\" value=\"[DEPARTMENT NAME]\" required oninput=\"LessonPlanApp.handleConfigInput()\">\n                <\/div>\n                <div class=\"form-group\">\n                    <label for=\"cfgSemester\">Semester<\/label>\n                    <input type=\"text\" id=\"cfgSemester\" class=\"form-control\" value=\"V\" required oninput=\"LessonPlanApp.handleConfigInput()\">\n                <\/div>\n                <div class=\"form-group\">\n                    <label for=\"cfgBranch\">Branch<\/label>\n                    <input type=\"text\" id=\"cfgBranch\" class=\"form-control\" value=\"Computer Science &#038; Engineering\" required oninput=\"LessonPlanApp.handleConfigInput()\">\n                <\/div>\n                <div class=\"form-group\">\n                    <label for=\"cfgSubject\">Subject<\/label>\n                    <input type=\"text\" id=\"cfgSubject\" class=\"form-control\" value=\"Theory of Computation\" required oninput=\"LessonPlanApp.handleConfigInput()\">\n                <\/div>\n                <div class=\"form-group\">\n                    <label for=\"cfgSubjectCode\">Subject Code<\/label>\n                    <input type=\"text\" id=\"cfgSubjectCode\" class=\"form-control\" value=\"CS-502\" required oninput=\"LessonPlanApp.handleConfigInput()\">\n                <\/div>\n                <div class=\"form-group\">\n                    <label for=\"cfgFaculty\">Faculty Name<\/label>\n                    <input type=\"text\" id=\"cfgFaculty\" class=\"form-control\" value=\"Prof. Alex Smith\" required oninput=\"LessonPlanApp.handleConfigInput()\">\n                <\/div>\n                <div class=\"form-group\">\n                    <label for=\"cfgUniversity\">University<\/label>\n                    <input type=\"text\" id=\"cfgUniversity\" class=\"form-control\" value=\"State Technical University\" required oninput=\"LessonPlanApp.handleConfigInput()\">\n                <\/div>\n                <div class=\"form-group\">\n                    <label for=\"cfgSession\">Session<\/label>\n                    <input type=\"text\" id=\"cfgSession\" class=\"form-control\" value=\"2026-2027\" required oninput=\"LessonPlanApp.handleConfigInput()\">\n                <\/div>\n                <div class=\"form-group full-span\">\n                    <label for=\"cfgLogo\">Logo Upload<\/label>\n                    <input type=\"file\" id=\"cfgLogo\" class=\"form-control\" accept=\"image\/*\" aria-label=\"Upload Institution Logo\" onchange=\"LessonPlanApp.handleLogoUpload(event)\">\n                <\/div>\n            <\/form>\n        <\/section>\n\n        <!-- Printable Document Sheet Preview -->\n        <div class=\"page-preview-wrapper\" role=\"region\" aria-label=\"Printable Sheet Preview\">\n            <div class=\"page-container\" id=\"pdfExportArea\">\n                <table class=\"lesson-plan-table\" id=\"lessonPlanTable\">\n                    <thead>\n                        <tr>\n                            <th colspan=\"5\" class=\"text-center header-title uppercase\" style=\"padding: 10px;\">\n                                <div class=\"preview-logo-container\"><img id=\"previewLogoImg\" class=\"preview-logo\" alt=\"Institution Logo\"><\/div>\n                                <span id=\"prevInstitute\">[INSTITUTE NAME]<\/span>\n                            <\/th>\n                        <\/tr>\n                        <tr>\n                            <th colspan=\"5\" class=\"text-center sub-header-title uppercase\" style=\"padding: 8px;\">\n                                DEPARTMENT OF <span id=\"prevDepartment\">[DEPARTMENT NAME]<\/span>\n                            <\/th>\n                        <\/tr>\n                        <tr>\n                            <th colspan=\"5\" class=\"text-center sub-header-title uppercase\" style=\"padding: 8px; background-color: var(--header-bg);\">\n                                LESSON PLAN\n                            <\/th>\n                        <\/tr>\n                        <tr>\n                            <td colspan=\"3\" class=\"text-left font-bold\">\n                                Semester: <span id=\"prevSemester\">V<\/span> &nbsp;&nbsp;|&nbsp;&nbsp; Branch: <span id=\"prevBranch\">Computer Science &#038; Engineering<\/span>\n                            <\/td>\n                            <td colspan=\"2\" class=\"text-left font-bold\">\n                                Subject: <span id=\"prevSubject\">Theory of Computation<\/span> (<span id=\"prevSubjectCode\">CS-502<\/span>)\n                            <\/td>\n                        <\/tr>\n                        <tr>\n                            <td colspan=\"3\" class=\"text-left font-bold\">\n                                Faculty Name: <span id=\"prevFaculty\">Prof. Alex Smith<\/span>\n                            <\/td>\n                            <td colspan=\"2\" class=\"text-left font-bold\">\n                                University: <span id=\"prevUniversity\">State Technical University<\/span> &nbsp;&nbsp;|&nbsp;&nbsp; Session: <span id=\"prevSession\">2026-2027<\/span>\n                            <\/td>\n                        <\/tr>\n                        <tr style=\"background-color: var(--header-bg);\">\n                            <th class=\"text-center font-bold\" scope=\"col\" style=\"width: 15%;\">Module<\/th>\n                            <th class=\"text-center font-bold\" scope=\"col\" style=\"width: 15%;\">Lecture Number<\/th>\n                            <th class=\"text-center font-bold\" scope=\"col\" style=\"width: 42%;\">Topic<\/th>\n                            <th class=\"text-center font-bold\" scope=\"col\" style=\"width: 18%;\">Date<\/th>\n                            <th class=\"text-center font-bold action-col\" scope=\"col\" style=\"width: 10%;\">Actions<\/th>\n                        <\/tr>\n                    <\/thead>\n                    <tbody id=\"tableBody\"><\/tbody>\n                    <tfoot>\n                        <tr>\n                            <td colspan=\"2\" class=\"text-left font-bold\" style=\"height: 60px; vertical-align: bottom;\">\n                                Faculty Signature:\n                            <\/td>\n                            <td colspan=\"3\" class=\"text-right font-bold\" style=\"height: 60px; vertical-align: bottom;\">\n                                HOD Signature:\n                            <\/td>\n                        <\/tr>\n                    <\/tfoot>\n                <\/table>\n            <\/div>\n        <\/div>\n\n    <\/main>\n\n    <!-- Settings Modal -->\n    <div class=\"modal-overlay\" id=\"settingsModal\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"settingsTitle\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <span id=\"settingsTitle\">Builder Settings<\/span>\n                <button class=\"tool-btn\" onclick=\"LessonPlanApp.closeSettings()\" aria-label=\"Close Settings\">\u2715<\/button>\n            <\/div>\n            <p style=\"font-size: 13px; color: #475569; margin-bottom: 12px;\">Configure global document preferences and engine parameters.<\/p>\n            <div class=\"form-group\" style=\"margin-bottom: 12px;\">\n                <label for=\"settingPageSize\">Default Page Size<\/label>\n                <select id=\"settingPageSize\" class=\"form-control\" onchange=\"LessonPlanApp.handleSettingsChange()\">\n                    <option value=\"A4 Portrait\">A4 Portrait<\/option>\n                    <option value=\"Letter Portrait\">Letter Portrait<\/option>\n                <\/select>\n            <\/div>\n            <div class=\"form-group\">\n                <label for=\"settingFont\">Default Font Family<\/label>\n                <select id=\"settingFont\" class=\"form-control\" onchange=\"LessonPlanApp.handleSettingsChange()\">\n                    <option value=\"Times New Roman\">Times New Roman<\/option>\n                    <option value=\"Arial\">Arial<\/option>\n                    <option value=\"Calibri\">Calibri<\/option>\n                <\/select>\n            <\/div>\n            <div style=\"margin-top: 20px; text-align: right;\">\n                <button class=\"tool-btn primary\" onclick=\"LessonPlanApp.closeSettings()\">Save Settings<\/button>\n            <\/div>\n        <\/div>\n    <\/div>\n\n    <!-- Production Modular Enterprise Engine -->\n    <script>\n        const LessonPlanApp = (function() {\n            'use strict';\n\n            let state = {\n                settings: {\n                    pageSize: \"A4 Portrait\",\n                    fontFamily: \"Times New Roman\"\n                },\n                config: {\n                    institute: \"[INSTITUTE NAME]\",\n                    department: \"[DEPARTMENT NAME]\",\n                    semester: \"V\",\n                    branch: \"Computer Science & Engineering\",\n                    subject: \"Theory of Computation\",\n                    subjectCode: \"CS-502\",\n                    faculty: \"Prof. Alex Smith\",\n                    university: \"State Technical University\",\n                    session: \"2026-2027\",\n                    logo: \"\"\n                },\n                rows: [\n                    { type: \"heading\", text: \"Introduction\" },\n                    { type: \"topic\", module: \"1\", topic: \"Basic Mathematical Preliminaries & Alphabets\", date: \"\" },\n                    { type: \"topic\", module: \"1\", topic: \"Strings, Languages & Grammars\", date: \"\" },\n                    { type: \"heading\", text: \"Regular Languages\" },\n                    { type: \"topic\", module: \"2\", topic: \"Finite Automata: DFA & NFA\", date: \"\" },\n                    { type: \"topic\", module: \"2\", topic: \"Regular Expressions & Regular Languages\", date: \"\" },\n                    { type: \"heading\", text: \"Context Free Languages\" },\n                    { type: \"topic\", module: \"3\", topic: \"Context-Free Grammars & Derivation Trees\", date: \"\" },\n                    { type: \"topic\", module: \"3\", topic: \"Pushdown Automata (PDA)\", date: \"\" },\n                    { type: \"heading\", text: \"Turing Machine\" },\n                    { type: \"topic\", module: \"4\", topic: \"Turing Machine Model & Formal Definition\", date: \"\" },\n                    { type: \"topic\", module: \"4\", topic: \"Undecidability & Halting Problem\", date: \"\" }\n                ]\n            };\n\n            let undoStack = [];\n            let redoStack = [];\n            let autoSaveTimer = null;\n\n            function escapeHtml(str) {\n                if (typeof str !== 'string') return '';\n                return str.replace(\/[&<>\"']\/g, function(m) {\n                    return {\n                        '&': '&amp;',\n                        '<': '&lt;',\n                        '>': '&gt;',\n                        '\"': '&quot;',\n                        \"'\": '&#039;'\n                    }[m];\n                });\n            }\n\n            function pushState() {\n                undoStack.push(JSON.stringify(state));\n                if (undoStack.length > 50) undoStack.shift();\n                redoStack = [];\n                updateUndoRedoUI();\n                scheduleAutoSave();\n            }\n\n            function updateUndoRedoUI() {\n                const undoBtn = document.getElementById('undoBtn');\n                const redoBtn = document.getElementById('redoBtn');\n                if (undoBtn) undoBtn.disabled = undoStack.length === 0;\n                if (redoBtn) redoBtn.disabled = redoStack.length === 0;\n            }\n\n            function scheduleAutoSave() {\n                if (autoSaveTimer) clearTimeout(autoSaveTimer);\n                autoSaveTimer = setTimeout(() => {\n                    try {\n                        localStorage.setItem('lp_enterprise_state', JSON.stringify(state));\n                    } catch (e) {\n                        console.error('AutoSave failed:', e);\n                    }\n                }, 1000);\n            }\n\n            function loadAutoSave() {\n                try {\n                    const saved = localStorage.getItem('lp_enterprise_state');\n                    if (saved) {\n                        state = JSON.parse(saved);\n                    }\n                } catch (e) {\n                    console.error('Failed to load auto-save state:', e);\n                }\n            }\n\n            function syncConfigToDOM() {\n                document.getElementById('cfgInstitute').value = state.config.institute || '';\n                document.getElementById('cfgDepartment').value = state.config.department || '';\n                document.getElementById('cfgSemester').value = state.config.semester || '';\n                document.getElementById('cfgBranch').value = state.config.branch || '';\n                document.getElementById('cfgSubject').value = state.config.subject || '';\n                document.getElementById('cfgSubjectCode').value = state.config.subjectCode || '';\n                document.getElementById('cfgFaculty').value = state.config.faculty || '';\n                document.getElementById('cfgUniversity').value = state.config.university || '';\n                document.getElementById('cfgSession').value = state.config.session || '';\n\n                document.getElementById('prevInstitute').textContent = state.config.institute || '';\n                document.getElementById('prevDepartment').textContent = state.config.department || '';\n                document.getElementById('prevSemester').textContent = state.config.semester || '';\n                document.getElementById('prevBranch').textContent = state.config.branch || '';\n                document.getElementById('prevSubject').textContent = state.config.subject || '';\n                document.getElementById('prevSubjectCode').textContent = state.config.subjectCode || '';\n                document.getElementById('prevFaculty').textContent = state.config.faculty || '';\n                document.getElementById('prevUniversity').textContent = state.config.university || '';\n                document.getElementById('prevSession').textContent = state.config.session || '';\n\n                const logoImg = document.getElementById('previewLogoImg');\n                if (state.config.logo) {\n                    logoImg.src = state.config.logo;\n                    logoImg.style.display = 'block';\n                } else {\n                    logoImg.style.display = 'none';\n                    logoImg.src = '';\n                }\n\n                if (state.settings) {\n                    document.getElementById('settingPageSize').value = state.settings.pageSize || 'A4 Portrait';\n                    document.getElementById('settingFont').value = state.settings.fontFamily || 'Times New Roman';\n                    document.body.style.fontFamily = state.settings.fontFamily || 'Times New Roman';\n                }\n            }\n\n            function renderTable() {\n                const tbody = document.getElementById('tableBody');\n                tbody.innerHTML = '';\n\n                let lecCounter = 1;\n\n                state.rows.forEach((row, index) => {\n                    const tr = document.createElement('tr');\n\n                    if (row.type === 'heading') {\n                        tr.className = 'section-heading-row';\n                        tr.innerHTML = `\n                            <td colspan=\"4\">\n                                <input type=\"text\" class=\"lp-input text-center font-bold uppercase\" \n                                    value=\"${escapeHtml(row.text)}\" \n                                    aria-label=\"Section Heading Text\"\n                                    onchange=\"LessonPlanApp.updateRow(${index}, 'text', this.value)\">\n                            <\/td>\n                            <td class=\"action-cell text-center\">\n                                <div class=\"row-actions\">\n                                    <button class=\"act-btn\" onclick=\"LessonPlanApp.moveRow(${index}, -1)\" title=\"Move Up\" ${index === 0 ? 'disabled' : ''}>\u2191<\/button>\n                                    <button class=\"act-btn\" onclick=\"LessonPlanApp.moveRow(${index}, 1)\" title=\"Move Down\" ${index === state.rows.length - 1 ? 'disabled' : ''}>\u2193<\/button>\n                                    <button class=\"act-btn danger\" onclick=\"LessonPlanApp.deleteRow(${index})\" title=\"Delete Section\">\u2715<\/button>\n                                <\/div>\n                            <\/td>\n                        `;\n                    } else {\n                        const currentLec = lecCounter++;\n                        const moduleOptions = ['1','2','3','4','5','6','7','8','9','10'].map(m => \n                            `<option value=\"${m}\" ${String(row.module) === String(m) ? 'selected' : ''}>Module ${m}<\/option>`\n                        ).join('');\n\n                        tr.innerHTML = `\n                            <td class=\"text-center\">\n                                <select class=\"lp-select\" aria-label=\"Select Module Number\" onchange=\"LessonPlanApp.updateRow(${index}, 'module', this.value)\">\n                                    ${moduleOptions}\n                                <\/select>\n                            <\/td>\n                            <td class=\"text-center font-bold\">Lec-${currentLec}<\/td>\n                            <td>\n                                <textarea class=\"lp-input\" rows=\"1\" aria-label=\"Topic Description\"\n                                    oninput=\"LessonPlanApp.autoGrow(this)\"\n                                    onchange=\"LessonPlanApp.updateRow(${index}, 'topic', this.value)\">${escapeHtml(row.topic)}<\/textarea>\n                            <\/td>\n                            <td class=\"text-center\">\n                                <input type=\"date\" class=\"lp-input text-center\" value=\"${escapeHtml(row.date || '')}\" \n                                    aria-label=\"Lesson Date\"\n                                    onchange=\"LessonPlanApp.updateRow(${index}, 'date', this.value)\">\n                            <\/td>\n                            <td class=\"action-cell text-center\">\n                                <div class=\"row-actions\">\n                                    <button class=\"act-btn\" onclick=\"LessonPlanApp.moveRow(${index}, -1)\" title=\"Move Up\" ${index === 0 ? 'disabled' : ''}>\u2191<\/button>\n                                    <button class=\"act-btn\" onclick=\"LessonPlanApp.moveRow(${index}, 1)\" title=\"Move Down\" ${index === state.rows.length - 1 ? 'disabled' : ''}>\u2193<\/button>\n                                    <button class=\"act-btn danger\" onclick=\"LessonPlanApp.deleteRow(${index})\" title=\"Delete Row\">\u2715<\/button>\n                                <\/div>\n                            <\/td>\n                        `;\n                    }\n\n                    tbody.appendChild(tr);\n                });\n\n                \/\/ Trigger autoGrow on all textareas after render\n                setTimeout(() => {\n                    document.querySelectorAll('textarea.lp-input').forEach(ta => LessonPlanApp.autoGrow(ta));\n                }, 0);\n            }\n\n            return {\n                init: function() {\n                    loadAutoSave();\n                    syncConfigToDOM();\n                    renderTable();\n                    updateUndoRedoUI();\n                },\n\n                handleConfigInput: function() {\n                    pushState();\n                    state.config.institute = document.getElementById('cfgInstitute').value;\n                    state.config.department = document.getElementById('cfgDepartment').value;\n                    state.config.semester = document.getElementById('cfgSemester').value;\n                    state.config.branch = document.getElementById('cfgBranch').value;\n                    state.config.subject = document.getElementById('cfgSubject').value;\n                    state.config.subjectCode = document.getElementById('cfgSubjectCode').value;\n                    state.config.faculty = document.getElementById('cfgFaculty').value;\n                    state.config.university = document.getElementById('cfgUniversity').value;\n                    state.config.session = document.getElementById('cfgSession').value;\n\n                    syncConfigToDOM();\n                },\n\n                handleLogoUpload: function(event) {\n                    const file = event.target.files[0];\n                    if (file) {\n                        const reader = new FileReader();\n                        reader.onload = function(e) {\n                            pushState();\n                            state.config.logo = e.target.result;\n                            syncConfigToDOM();\n                        };\n                        reader.readAsDataURL(file);\n                    }\n                },\n\n                addRow: function(type) {\n                    pushState();\n                    if (type === 'heading') {\n                        state.rows.push({ type: \"heading\", text: \"NEW SECTION HEADING\" });\n                    } else {\n                        const lastTopic = [...state.rows].reverse().find(r => r.type === 'topic');\n                        const mod = lastTopic ? lastTopic.module : \"1\";\n                        state.rows.push({ type: \"topic\", module: mod, topic: \"New Lesson Topic Description\", date: \"\" });\n                    }\n                    renderTable();\n                },\n\n                updateRow: function(index, key, value) {\n                    pushState();\n                    if (state.rows[index]) {\n                        state.rows[index][key] = value;\n                        if (key === 'module') {\n                            renderTable();\n                        } else {\n                            scheduleAutoSave();\n                        }\n                    }\n                },\n\n                deleteRow: function(index) {\n                    pushState();\n                    state.rows.splice(index, 1);\n                    renderTable();\n                },\n\n                moveRow: function(index, direction) {\n                    const targetIndex = index + direction;\n                    if (targetIndex >= 0 && targetIndex < state.rows.length) {\n                        pushState();\n                        const temp = state.rows[index];\n                        state.rows[index] = state.rows[targetIndex];\n                        state.rows[targetIndex] = temp;\n                        renderTable();\n                    }\n                },\n\n                autoGrow: function(element) {\n                    element.style.height = 'auto';\n                    element.style.height = (element.scrollHeight) + 'px';\n                },\n\n                undo: function() {\n                    if (undoStack.length > 0) {\n                        redoStack.push(JSON.stringify(state));\n                        state = JSON.parse(undoStack.pop());\n                        syncConfigToDOM();\n                        renderTable();\n                        updateUndoRedoUI();\n                        scheduleAutoSave();\n                    }\n                },\n\n                redo: function() {\n                    if (redoStack.length > 0) {\n                        undoStack.push(JSON.stringify(state));\n                        state = JSON.parse(redoStack.pop());\n                        syncConfigToDOM();\n                        renderTable();\n                        updateUndoRedoUI();\n                        scheduleAutoSave();\n                    }\n                },\n\n                newPlan: function() {\n                    if (confirm(\"Are you sure you want to create a new lesson plan? Unsaved changes will be reset.\")) {\n                        pushState();\n                        state.rows = [\n                            { type: \"heading\", text: \"MODULE 1: OVERVIEW\" },\n                            { type: \"topic\", module: \"1\", topic: \"Initial Topic Overview\", date: \"\" }\n                        ];\n                        syncConfigToDOM();\n                        renderTable();\n                    }\n                },\n\n                saveFile: function() {\n                    const dataStr = \"data:text\/json;charset=utf-8,\" + encodeURIComponent(JSON.stringify(state, null, 2));\n                    const downloadAnchor = document.createElement('a');\n                    const filename = `Lesson_Plan_${state.config.subjectCode || 'Export'}.json`;\n                    downloadAnchor.setAttribute(\"href\", dataStr);\n                    downloadAnchor.setAttribute(\"download\", filename);\n                    document.body.appendChild(downloadAnchor);\n                    downloadAnchor.click();\n                    downloadAnchor.remove();\n                },\n\n                openFilePrompt: function() {\n                    document.getElementById('fileInput').click();\n                },\n\n                handleFileOpen: function(event) {\n                    const file = event.target.files[0];\n                    if (file) {\n                        const reader = new FileReader();\n                        reader.onload = function(e) {\n                            try {\n                                const parsed = JSON.parse(e.target.result);\n                                if (parsed && parsed.config && Array.isArray(parsed.rows)) {\n                                    pushState();\n                                    state = parsed;\n                                    syncConfigToDOM();\n                                    renderTable();\n                                } else {\n                                    alert(\"Invalid lesson plan file structure.\");\n                                }\n                            } catch (err) {\n                                alert(\"Failed to parse JSON file.\");\n                            }\n                        };\n                        reader.readAsText(file);\n                    }\n                },\n\n                exportPDF: function() {\n                    if (typeof html2pdf === 'undefined') {\n                        alert(\"PDF generation engine is loading. Please try again in a few seconds.\");\n                        return;\n                    }\n\n                    const element = document.getElementById('pdfExportArea');\n                    const opt = {\n                        margin: 10,\n                        filename: `Lesson_Plan_${state.config.subjectCode || 'Document'}.pdf`,\n                        image: { type: 'jpeg', quality: 0.98 },\n                        html2canvas: { scale: 2, useCORS: true, logging: false },\n                        jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' }\n                    };\n\n                    \/\/ Temporarily hide action columns before generating PDF\n                    document.querySelectorAll('.action-col, .action-cell').forEach(el => el.style.display = 'none');\n\n                    html2pdf().set(opt).from(element).save().then(() => {\n                        document.querySelectorAll('.action-col, .action-cell').forEach(el => el.style.display = '');\n                    }).catch(err => {\n                        console.error('PDF generation error:', err);\n                        document.querySelectorAll('.action-col, .action-cell').forEach(el => el.style.display = '');\n                    });\n                },\n\n                exportDOCX: function() {\n                    if (typeof docx === 'undefined' || typeof saveAs === 'undefined') {\n                        alert(\"Word generation engine is loading. Please try again in a few seconds.\");\n                        return;\n                    }\n\n                    const { Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell, WidthType, AlignmentType, ShadingType } = docx;\n\n                    const tableRows = [];\n\n                    \/\/ Header Rows\n                    tableRows.push(\n                        new TableRow({\n                            children: [\n                                new TableCell({\n                                    columnSpan: 4,\n                                    children: [new Paragraph({ text: state.config.institute || '', bold: true, alignment: AlignmentType.CENTER })]\n                                })\n                            ]\n                        }),\n                        new TableRow({\n                            children: [\n                                new TableCell({\n                                    columnSpan: 4,\n                                    children: [new Paragraph({ text: `DEPARTMENT OF ${state.config.department || ''}`, bold: true, alignment: AlignmentType.CENTER })]\n                                })\n                            ]\n                        }),\n                        new TableRow({\n                            children: [\n                                new TableCell({\n                                    columnSpan: 4,\n                                    shading: { fill: \"F2F2F2\", type: ShadingType.CLEAR },\n                                    children: [new Paragraph({ text: \"LESSON PLAN\", bold: true, alignment: AlignmentType.CENTER })]\n                                })\n                            ]\n                        }),\n                        new TableRow({\n                            children: [\n                                new TableCell({\n                                    columnSpan: 2,\n                                    children: [new Paragraph({ text: `Semester: ${state.config.semester}  |  Branch: ${state.config.branch}`, bold: true })]\n                                }),\n                                new TableCell({\n                                    columnSpan: 2,\n                                    children: [new Paragraph({ text: `Subject: ${state.config.subject} (${state.config.subjectCode})`, bold: true })]\n                                })\n                            ]\n                        }),\n                        new TableRow({\n                            children: [\n                                new TableCell({\n                                    columnSpan: 2,\n                                    children: [new Paragraph({ text: `Faculty Name: ${state.config.faculty}`, bold: true })]\n                                }),\n                                new TableCell({\n                                    columnSpan: 2,\n                                    children: [new Paragraph({ text: `University: ${state.config.university}  |  Session: ${state.config.session}`, bold: true })]\n                                })\n                            ]\n                        }),\n                        \/\/ Table Column Titles\n                        new TableRow({\n                            children: [\n                                new TableCell({ width: { size: 15, type: WidthType.PERCENTAGE }, shading: { fill: \"F2F2F2\", type: ShadingType.CLEAR }, children: [new Paragraph({ text: \"Module\", bold: true, alignment: AlignmentType.CENTER })] }),\n                                new TableCell({ width: { size: 20, type: WidthType.PERCENTAGE }, shading: { fill: \"F2F2F2\", type: ShadingType.CLEAR }, children: [new Paragraph({ text: \"Lecture Number\", bold: true, alignment: AlignmentType.CENTER })] }),\n                                new TableCell({ width: { size: 45, type: WidthType.PERCENTAGE }, shading: { fill: \"F2F2F2\", type: ShadingType.CLEAR }, children: [new Paragraph({ text: \"Topic\", bold: true, alignment: AlignmentType.CENTER })] }),\n                                new TableCell({ width: { size: 20, type: WidthType.PERCENTAGE }, shading: { fill: \"F2F2F2\", type: ShadingType.CLEAR }, children: [new Paragraph({ text: \"Date\", bold: true, alignment: AlignmentType.CENTER })] })\n                            ]\n                        })\n                    );\n\n                    \/\/ Content Rows\n                    let lecCount = 1;\n                    state.rows.forEach(r => {\n                        if (r.type === 'heading') {\n                            tableRows.push(\n                                new TableRow({\n                                    children: [\n                                        new TableCell({\n                                            columnSpan: 4,\n                                            shading: { fill: \"FFEB3B\", type: ShadingType.CLEAR },\n                                            children: [new Paragraph({ text: r.text.toUpperCase(), bold: true, alignment: AlignmentType.CENTER })]\n                                        })\n                                    ]\n                                })\n                            );\n                        } else {\n                            tableRows.push(\n                                new TableRow({\n                                    children: [\n                                        new TableCell({ children: [new Paragraph({ text: `Module ${r.module}`, alignment: AlignmentType.CENTER })] }),\n                                        new TableCell({ children: [new Paragraph({ text: `Lec-${lecCount++}`, bold: true, alignment: AlignmentType.CENTER })] }),\n                                        new TableCell({ children: [new Paragraph({ text: r.topic || '' })] }),\n                                        new TableCell({ children: [new Paragraph({ text: r.date || '', alignment: AlignmentType.CENTER })] })\n                                    ]\n                                })\n                            );\n                        }\n                    });\n\n                    \/\/ Footer Signatures\n                    tableRows.push(\n                        new TableRow({\n                            children: [\n                                new TableCell({ columnSpan: 2, children: [new Paragraph({ text: \"\\n\\nFaculty Signature:\", bold: true })] }),\n                                new TableCell({ columnSpan: 2, children: [new Paragraph({ text: \"\\n\\nHOD Signature:\", bold: true, alignment: AlignmentType.RIGHT })] })\n                            ]\n                        })\n                    );\n\n                    const doc = new Document({\n                        sections: [{\n                            properties: {},\n                            children: [\n                                new Table({\n                                    width: { size: 100, type: WidthType.PERCENTAGE },\n                                    rows: tableRows\n                                })\n                            ]\n                        }]\n                    });\n\n                    Packer.toBlob(doc).then(blob => {\n                        saveAs(blob, `Lesson_Plan_${state.config.subjectCode || 'Document'}.docx`);\n                    }).catch(err => {\n                        console.error('Word export error:', err);\n                    });\n                },\n\n                openSettings: function() {\n                    document.getElementById('settingsModal').style.display = 'flex';\n                },\n\n                closeSettings: function() {\n                    document.getElementById('settingsModal').style.display = 'none';\n                },\n\n                handleSettingsChange: function() {\n                    pushState();\n                    state.settings.pageSize = document.getElementById('settingPageSize').value;\n                    state.settings.fontFamily = document.getElementById('settingFont').value;\n                    document.body.style.fontFamily = state.settings.fontFamily;\n                }\n            };\n        })();\n\n        document.addEventListener('DOMContentLoaded', function() {\n            LessonPlanApp.init();\n        });\n    <\/script>\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>Enterprise Lesson Plan Builder &#038; Engine New Open Save PDF Word Lesson Plan Configuration + Topic + Heading College \/ Institute Department Semester Branch Subject Subject Code Faculty Name University Session Logo Upload [INSTITUTE NAME] DEPARTMENT OF [DEPARTMENT NAME] LESSON PLAN Semester: V &nbsp;&nbsp;|&nbsp;&nbsp; Branch: Computer Science &#038; Engineering Subject: Theory of Computation (CS-502) Faculty [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-929","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/freewebtools.co.in\/index.php\/wp-json\/wp\/v2\/pages\/929","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/freewebtools.co.in\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/freewebtools.co.in\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/freewebtools.co.in\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/freewebtools.co.in\/index.php\/wp-json\/wp\/v2\/comments?post=929"}],"version-history":[{"count":2,"href":"https:\/\/freewebtools.co.in\/index.php\/wp-json\/wp\/v2\/pages\/929\/revisions"}],"predecessor-version":[{"id":931,"href":"https:\/\/freewebtools.co.in\/index.php\/wp-json\/wp\/v2\/pages\/929\/revisions\/931"}],"wp:attachment":[{"href":"https:\/\/freewebtools.co.in\/index.php\/wp-json\/wp\/v2\/media?parent=929"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}