{"id":20,"date":"2026-08-04T23:13:12","date_gmt":"2026-08-04T23:13:12","guid":{"rendered":"https:\/\/etrainers.net\/?page_id=20"},"modified":"2026-08-05T01:15:30","modified_gmt":"2026-08-05T01:15:30","slug":"report","status":"publish","type":"page","link":"https:\/\/etrainers.net\/?page_id=20","title":{"rendered":"Report"},"content":{"rendered":"\n<!DOCTYPE html>\n\n<html lang=\"en\">\n\n<head>\n\n<meta charset=\"UTF-8\">\n\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n\n<title>Leader Lens 360 | Report Generator | eTrainers.org<\/title>\n\n<style>\n\n  @import url('https:\/\/fonts.googleapis.com\/css2?family=Inter:wght@400;500;600;700;800&display=swap');\n\n  * { box-sizing: border-box; margin: 0; padding: 0; }\n\n  body { font-family: 'Inter', Arial, sans-serif; background: #0f172a; color: #e2e8f0; padding: 20px; }\n\n  .container { max-width: 860px; margin: auto; }\n\n  .header { background: linear-gradient(135deg, #3b82f6, #8b5cf6); border-radius: 16px; padding: 32px; text-align: center; margin-bottom: 24px; }\n\n  .header .badge { display: inline-block; background: rgba(255,255,255,0.15); border-radius: 20px; padding: 5px 14px; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px; }\n\n  .header h1 { font-size: 28px; font-weight: 700; margin-bottom: 6px; }\n\n  .header p { font-size: 14px; opacity: 0.85; }\n\n  .card { background: #1e293b; border-radius: 14px; padding: 24px; margin-bottom: 20px; border: 1px solid #334155; }\n\n  .section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; background: linear-gradient(135deg, #3b82f6, #8b5cf6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 14px; }\n\n  label { display: block; font-size: 13px; color: #94a3b8; margin-bottom: 5px; margin-top: 12px; }\n\n  input[type=text], input[type=email] { width: 100%; padding: 11px 14px; border-radius: 8px; background: #0f172a; color: #e2e8f0; border: 1px solid #334155; font-size: 14px; }\n\n  input:focus { outline: none; border-color: #3b82f6; }\n\n  .btn { display: inline-block; width: 100%; padding: 14px; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; transition: opacity 0.2s; margin-top: 14px; }\n\n  .btn-primary { background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: #fff; }\n\n  .btn-primary:hover { opacity: 0.9; }\n\n  .btn-outline { background: transparent; border: 1px solid #334155; color: #94a3b8; }\n\n  #statusMsg { margin-top: 14px; padding: 14px; border-radius: 8px; text-align: center; font-size: 14px; display: none; }\n\n  .success { background: rgba(34,197,94,0.15); border: 1px solid #22c55e; color: #86efac; }\n\n  .error { background: rgba(239,68,68,0.15); border: 1px solid #ef4444; color: #fca5a5; }\n\n  .notice { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.3); border-radius: 8px; padding: 12px 16px; font-size: 13px; color: #93c5fd; margin-top: 12px; }\n\n  \/* TOGGLE *\/\n\n  .toggle-bar { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }\n\n  .toggle-btn { padding: 8px 16px; border-radius: 8px; border: 1px solid #334155; background: #1e293b; color: #94a3b8; font-size: 13px; cursor: pointer; transition: all 0.2s; }\n\n  .toggle-btn.active { background: linear-gradient(135deg,#3b82f6,#8b5cf6); color: #fff; border-color: transparent; }\n\n  \/* SCORE DISPLAY *\/\n\n  .overall-score-card { text-align: center; background: linear-gradient(135deg,#1e293b,#0f172a); border: 1px solid #3b82f6; border-radius: 14px; padding: 28px; margin-bottom: 20px; }\n\n  .overall-num { font-size: 56px; font-weight: 800; background: linear-gradient(135deg,#3b82f6,#8b5cf6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }\n\n  .overall-label { font-size: 13px; color: #94a3b8; margin-top: 4px; }\n\n  .confidence-pill { display: inline-block; border-radius: 20px; padding: 4px 14px; font-size: 12px; font-weight: 600; margin-top: 10px; }\n\n  .conf-high { background: rgba(34,197,94,0.2); color: #86efac; border: 1px solid #22c55e; }\n\n  .conf-med  { background: rgba(234,179,8,0.2); color: #fde047; border: 1px solid #eab308; }\n\n  .conf-low  { background: rgba(239,68,68,0.2); color: #fca5a5; border: 1px solid #ef4444; }\n\n  \/* EXEC SUMMARY *\/\n\n  .exec-card { background: linear-gradient(135deg,#1e293b,#0f172a); border: 1px solid #3b82f6; border-radius: 14px; padding: 24px; margin-bottom: 20px; }\n\n  .exec-card h3 { font-size: 15px; font-weight: 700; color: #93c5fd; margin-bottom: 12px; }\n\n  .exec-card p { font-size: 14px; color: #cbd5e1; line-height: 1.75; }\n\n  \/* INSIGHT CARDS *\/\n\n  .insight-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }\n\n  .insight-card { background: #1e293b; border-radius: 12px; padding: 18px; border: 1px solid #334155; }\n\n  .insight-card .label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #64748b; margin-bottom: 8px; }\n\n  .insight-card .value { font-size: 14px; color: #cbd5e1; line-height: 1.6; }\n\n  .insight-card.highlight { border-color: #8b5cf6; }\n\n  \/* START HERE *\/\n\n  .start-here { background: linear-gradient(135deg,#0f2251,#1e1035); border: 1px solid #3b82f6; border-radius: 14px; padding: 24px; margin-bottom: 20px; }\n\n  .start-here .sh-badge { display: inline-block; background: linear-gradient(135deg,#3b82f6,#8b5cf6); border-radius: 20px; padding: 4px 14px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px; }\n\n  .start-here h2 { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 8px; }\n\n  .start-here .domain-why { font-size: 13px; color: #93c5fd; margin-bottom: 14px; }\n\n  .start-here .obj-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: #64748b; margin-bottom: 8px; }\n\n  .start-here ul { list-style: none; padding: 0; }\n\n  .start-here ul li { font-size: 13px; color: #cbd5e1; padding: 6px 0 6px 22px; position: relative; border-bottom: 1px solid rgba(255,255,255,0.05); }\n\n  .start-here ul li:before { content: \"\u2192\"; position: absolute; left: 0; color: #3b82f6; }\n\n  \/* COMP BARS *\/\n\n  .comp-row { margin-bottom: 14px; }\n\n  .comp-row .comp-name { font-size: 13px; font-weight: 600; color: #e2e8f0; margin-bottom: 6px; display: flex; justify-content: space-between; }\n\n  .comp-row .comp-name .score-val { font-size: 12px; color: #94a3b8; }\n\n  .bar-outer { background: #0f172a; border-radius: 6px; height: 8px; }\n\n  .bar-inner { height: 8px; border-radius: 6px; transition: width 0.6s; }\n\n  .bar-red    { background: linear-gradient(90deg,#ef4444,#f97316); }\n\n  .bar-yellow { background: linear-gradient(90deg,#eab308,#f59e0b); }\n\n  .bar-green  { background: linear-gradient(90deg,#22c55e,#10b981); }\n\n  .bar-blue   { background: linear-gradient(90deg,#3b82f6,#8b5cf6); }\n\n  .gap-tag { font-size: 10px; border-radius: 10px; padding: 2px 8px; margin-left: 6px; }\n\n  .gap-blind { background: rgba(239,68,68,0.2); color: #fca5a5; border: 1px solid #ef4444; }\n\n  .gap-hidden { background: rgba(34,197,94,0.2); color: #86efac; border: 1px solid #22c55e; }\n\n  \/* LEARNING PATH *\/\n\n  .lp-item { background: #0f172a; border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; border: 1px solid #334155; display: flex; align-items: center; gap: 14px; }\n\n  .lp-rank { font-size: 20px; font-weight: 800; color: #334155; min-width: 28px; }\n\n  .lp-info .lp-course { font-size: 14px; font-weight: 600; color: #e2e8f0; }\n\n  .lp-info .lp-domain { font-size: 12px; color: #64748b; margin-top: 2px; }\n\n  \/* COMMENTS *\/\n\n  .comment-block { background: #0f172a; border-radius: 10px; padding: 14px; border-left: 3px solid #3b82f6; margin-bottom: 10px; }\n\n  .comment-block .cb-role { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #64748b; margin-bottom: 4px; }\n\n  .comment-block .cb-text { font-size: 13px; color: #cbd5e1; line-height: 1.6; }\n\n  \/* SSC *\/\n\n  .ssc-block { background: #0f172a; border-radius: 10px; padding: 16px; border: 1px solid #334155; }\n\n  .ssc-block p { font-size: 14px; color: #cbd5e1; line-height: 1.7; white-space: pre-wrap; }\n\n  \/* PRINT *\/\n\n  .print-btn { background: #334155; color: #e2e8f0; border: none; border-radius: 8px; padding: 10px 20px; font-size: 13px; cursor: pointer; margin-right: 8px; margin-top: 10px; }\n\n  .print-btn:hover { background: #475569; }\n\n  @media print { .no-print { display: none !important; } body { background: #fff; color: #000; } .card, .exec-card, .start-here, .insight-card { border: 1px solid #ccc !important; } }\n\n  @media (max-width: 600px) { .insight-row { grid-template-columns: 1fr; } }\n\n  \/* FOOTER *\/\n\n  .footer { text-align: center; font-size: 12px; color: #475569; margin-top: 30px; padding-top: 20px; border-top: 1px solid #1e293b; }\n\n  \/* REPORT SECTION *\/\n\n  #reportSection { display: none; }\n\n<\/style>\n\n<\/head>\n\n<body>\n\n<div class=\"container\">\n\n \n\n  <!-- HEADER -->\n\n  <div class=\"header\">\n\n    <div class=\"badge\">eTrainers.org | Premium Assessment<\/div>\n\n    <h1>Leader Lens 360\u2122<\/h1>\n\n    <p>AI-Powered Leadership Insight &amp; Development Report<\/p>\n\n  <\/div>\n\n \n\n  <!-- REQUEST FORM -->\n\n  <div id=\"requestSection\">\n\n    <div class=\"card\">\n\n      <div class=\"section-title\">Request Your Report<\/div>\n\n      <p style=\"font-size:14px;color:#cbd5e1;margin-bottom:4px;\">Enter your name exactly as you entered it on the self-assessment, and the email address where you&#8217;d like to receive your report.<\/p>\n\n      <label>Your Full Name<\/label>\n\n      <input type=\"text\" id=\"reqName\" placeholder=\"Enter your full name (must match self-assessment)\">\n\n      <label>Your Email Address<\/label>\n\n      <input type=\"email\" id=\"reqEmail\" placeholder=\"Enter your email address\">\n\n      <button class=\"btn btn-primary\" onclick=\"requestReport()\">Generate &amp; Email My Report<\/button>\n\n      <div id=\"statusMsg\"><\/div>\n\n      <div class=\"notice\">\ud83d\udcca Your report will be generated from all submitted rater feedback and emailed to you immediately.<\/div>\n\n    <\/div>\n\n \n\n    <!-- DEMO TOGGLE -->\n\n    <div class=\"card no-print\">\n\n      <div class=\"section-title\">Preview Sample Report<\/div>\n\n      <p style=\"font-size:13px;color:#94a3b8;margin-bottom:14px;\">See what your Leader Lens 360\u2122 report looks like by viewing a sample populated report below.<\/p>\n\n      <button class=\"btn btn-outline\" onclick=\"showDemo()\">\ud83d\udc41 View Sample Report<\/button>\n\n    <\/div>\n\n  <\/div>\n\n \n\n  <!-- FULL REPORT SECTION -->\n\n  <div id=\"reportSection\">\n\n \n\n    <div class=\"no-print\" style=\"margin-bottom:16px;display:flex;align-items:center;gap:10px;flex-wrap:wrap;\">\n\n      <button class=\"print-btn\" onclick=\"window.print()\">\ud83d\udda8 Print \/ Save as PDF<\/button>\n\n      <button class=\"print-btn\" onclick=\"hideReport()\">\u2190 Back<\/button>\n\n      <div class=\"toggle-bar\" id=\"toggleBar\">\n\n        <button class=\"toggle-btn active\" onclick=\"setView('all')\">All Feedback<\/button>\n\n        <button class=\"toggle-btn\" onclick=\"setView('manager')\">Manager<\/button>\n\n        <button class=\"toggle-btn\" onclick=\"setView('peer')\">Peer \/ DR<\/button>\n\n        <button class=\"toggle-btn\" onclick=\"setView('client')\">Client<\/button>\n\n      <\/div>\n\n    <\/div>\n\n \n\n    <!-- NAME + OVERALL -->\n\n    <div class=\"overall-score-card\">\n\n      <div style=\"font-size:13px;color:#94a3b8;margin-bottom:4px;\">Leader Lens 360\u2122 Competency Report<\/div>\n\n      <div style=\"font-size:18px;font-weight:700;margin-bottom:4px;\" id=\"reportName\">\u2014<\/div>\n\n      <div class=\"overall-num\" id=\"reportScore\">\u2014<\/div>\n\n      <div class=\"overall-label\">Overall Competency Score (out of 5.0)<\/div>\n\n      <div id=\"reportConfidence\"><\/div>\n\n    <\/div>\n\n \n\n    <!-- EXECUTIVE SUMMARY -->\n\n    <div class=\"exec-card\">\n\n      <h3>\ud83e\udde0 Executive Summary<\/h3>\n\n      <p id=\"execSummary\">\u2014<\/p>\n\n    <\/div>\n\n \n\n    <!-- INSIGHT ROW -->\n\n    <div class=\"insight-row\">\n\n      <div class=\"insight-card highlight\">\n\n        <div class=\"label\">\ud83d\udd0d Perception Gap<\/div>\n\n        <div class=\"value\" id=\"gapInsight\">\u2014<\/div>\n\n      <\/div>\n\n      <div class=\"insight-card highlight\">\n\n        <div class=\"label\">\ud83c\udf10 Client vs Internal<\/div>\n\n        <div class=\"value\" id=\"clientInsight\">\u2014<\/div>\n\n      <\/div>\n\n    <\/div>\n\n \n\n    <!-- START HERE -->\n\n    <div class=\"start-here\" id=\"startHereBlock\">\n\n      <div class=\"sh-badge\">\ud83d\ude80 Start Here<\/div>\n\n      <h2 id=\"shCourse\">\u2014<\/h2>\n\n      <div class=\"domain-why\" id=\"shWhy\">\u2014<\/div>\n\n      <div class=\"obj-title\">What You&#8217;ll Learn<\/div>\n\n      <ul id=\"shObjectives\"><\/ul>\n\n    <\/div>\n\n \n\n    <!-- COMPETENCY SCORES -->\n\n    <div class=\"card\">\n\n      <div class=\"section-title\">\ud83d\udcca Competency Breakdown<\/div>\n\n      <div id=\"compBars\"><\/div>\n\n    <\/div>\n\n \n\n    <!-- WHAT OTHERS ARE SAYING -->\n\n    <div class=\"card\" id=\"commentsBlock\">\n\n      <div class=\"section-title\">\ud83d\udcac What Others Are Saying<\/div>\n\n      <div id=\"commentsArea\"><\/div>\n\n    <\/div>\n\n \n\n    <!-- ACTIONABLE FEEDBACK -->\n\n    <div class=\"card\" id=\"sscBlock\">\n\n      <div class=\"section-title\">\ud83d\udde3 Actionable Feedback<\/div>\n\n      <p style=\"font-size:12px;color:#64748b;margin-bottom:10px;\">Start \u00b7 Stop \u00b7 Continue responses from raters<\/p>\n\n      <div id=\"sscArea\"><\/div>\n\n    <\/div>\n\n \n\n    <!-- LEARNING PATH -->\n\n    <div class=\"card\">\n\n      <div class=\"section-title\">\ud83d\udcc8 Recommended Learning Path<\/div>\n\n      <p style=\"font-size:13px;color:#94a3b8;margin-bottom:14px;\">Courses prioritized by development need<\/p>\n\n      <div id=\"learningPath\"><\/div>\n\n    <\/div>\n\n \n\n  <\/div>\n\n \n\n<\/div>\n\n \n\n<div class=\"footer\">\n\n  \u00a9 2026 eTrainers.org | Leader Lens 360\u2122 | All rights reserved.<br>\n\n  Identify blind spots, align perceptions, and receive a personalized learning path in minutes.\n\n<\/div>\n\n \n\n<script>\n\nconst GS_URL = 'https:\/\/script.google.com\/macros\/s\/AKfycbyYCbivyFf5dCeM90tUj8eqr3bnSJQr89DN5PN_2z8irrV2lycD752_Y51vY4eIkpOA\/exec';\n \n\n\/\/ ============================================================\n\n\/\/ COURSE + OBJECTIVES MAP\n\n\/\/ ============================================================\n\nconst COURSE_MAP = {\n\n  \"Leadership & Influence\": {\n\n    course: \"High Road Leadership\",\n\n    objectives: [\n\n      \"Apply the principles of high-road leadership to build trust and credibility\",\n\n      \"Develop a leadership approach that creates positive influence across the organization\",\n\n      \"Identify and overcome the barriers that prevent leaders from taking the high road\"\n\n    ]\n\n  },\n\n  \"Communication & Feedback\": {\n\n    course: \"Delivering Constructive Criticism\",\n\n    objectives: [\n\n      \"Recognize when and how to deliver constructive criticism effectively\",\n\n      \"Use structured feedback techniques to promote growth and improvement\",\n\n      \"Manage emotional responses during difficult feedback conversations\"\n\n    ]\n\n  },\n\n  \"Coaching & Development\": {\n\n    course: \"Coaching and Mentoring\",\n\n    objectives: [\n\n      \"Distinguish between coaching and mentoring and apply each appropriately\",\n\n      \"Use effective questioning and listening to guide team member development\",\n\n      \"Create personalized development plans to support long-term growth\"\n\n    ]\n\n  },\n\n  \"Emotional Intelligence\": {\n\n    course: \"Leading with Emotional Intelligence\",\n\n    objectives: [\n\n      \"Define and develop the five components of emotional intelligence in leadership\",\n\n      \"Apply self-awareness and empathy to strengthen key leadership relationships\",\n\n      \"Use emotional intelligence to navigate conflict and inspire team performance\"\n\n    ]\n\n  },\n\n  \"Accountability & Ownership\": {\n\n    course: \"Accountability in the Workplace\",\n\n    objectives: [\n\n      \"Define accountability and distinguish it from responsibility\",\n\n      \"Use the cycle of accountability to set clear expectations and follow through\",\n\n      \"Build a culture of ownership and results-focused behavior on your team\"\n\n    ]\n\n  },\n\n  \"Change & Adaptability\": {\n\n    course: \"Change Management\",\n\n    objectives: [\n\n      \"Identify the steps required to prepare and implement a change strategy\",\n\n      \"Apply the WIFM principle to help others navigate organizational transitions\",\n\n      \"Develop a communications plan that aligns people with facts and emotions\"\n\n    ]\n\n  },\n\n  \"Conflict Resolution\": {\n\n    course: \"Conflict Resolution\",\n\n    objectives: [\n\n      \"Understand the root causes of workplace conflict and how to address them\",\n\n      \"Apply proven conflict resolution strategies to restore productive relationships\",\n\n      \"Develop a conflict resolution approach suited to your leadership style\"\n\n    ]\n\n  },\n\n  \"Inclusion & Collaboration\": {\n\n    course: \"Diversity, Equity, and Inclusion\",\n\n    objectives: [\n\n      \"Define DEI and explain its impact on team performance and culture\",\n\n      \"Recognize unconscious bias and its effects on decision-making and inclusion\",\n\n      \"Practice inclusive communication to foster belonging in your team\"\n\n    ]\n\n  },\n\n  \"Team Effectiveness\": {\n\n    course: \"High Performance Teams (Remote)\",\n\n    objectives: [\n\n      \"Define the characteristics of a high-performing team\",\n\n      \"Use proven strategies to build trust and collaboration across your team\",\n\n      \"Lead effective meetings and leverage individual strengths for shared results\"\n\n    ]\n\n  },\n\n  \"Strategic Thinking\": {\n\n    course: \"Business Acumen\",\n\n    objectives: [\n\n      \"Develop the ability to observe the big picture and assess business impact\",\n\n      \"Apply financial literacy to make more informed leadership decisions\",\n\n      \"Strengthen critical thinking skills to evaluate organizational risk and opportunity\"\n\n    ]\n\n  }\n\n};\n\n \n\nconst COMP_NAMES = Object.keys(COURSE_MAP);\n\n \n\n\/\/ ============================================================\n\n\/\/ SCORING ENGINE\n\n\/\/ ============================================================\n\nfunction computeReport(data) {\n\n  \/\/ data = array of response objects: { raterType, scores: [{competency, score, comment}], ssc }\n\n  const self   = data.filter(d => d.raterType === 'self');\n\n  const mgr    = data.filter(d => d.raterType === 'manager');\n\n  const client = data.filter(d => d.raterType === 'client');\n\n  const other  = data.filter(d => d.raterType === 'peer' || d.raterType === 'direct_report');\n\n \n\n  const avg = arr => arr.length ? arr.reduce((a,b)=>a+b,0)\/arr.length : null;\n\n \n\n  const compResults = COMP_NAMES.map(name => {\n\n    const get = (arr) => {\n\n      const vals = arr.flatMap(d => d.scores.filter(s=>s.competency===name).map(s=>s.score));\n\n      return avg(vals);\n\n    };\n\n    const selfScore   = get(self);\n\n    const mgrScore    = get(mgr);\n\n    const clientScore = get(client);\n\n    const otherScore  = get(other);\n\n \n\n    const othersAll = [mgrScore, clientScore, otherScore].filter(v=>v!==null);\n\n    const othersAvg = othersAll.length ? avg(othersAll) : selfScore;\n\n    const internalAll = [mgrScore, otherScore].filter(v=>v!==null);\n\n    const internalAvg = internalAll.length ? avg(internalAll) : null;\n\n \n\n    const weightedScore = (selfScore !== null && othersAvg !== null)\n\n      ? (selfScore * 0.3 + othersAvg * 0.7)\n\n      : (selfScore || othersAvg || 3);\n\n \n\n    const gap = (selfScore !== null && othersAvg !== null) ? selfScore - othersAvg : 0;\n\n \n\n    \/\/ Priority: low score + high gap + agreement\n\n    const stdVals = [mgrScore, clientScore, otherScore].filter(v=>v!==null);\n\n    let agreement = 1;\n\n    if (stdVals.length > 1) {\n\n      const mn = avg(stdVals);\n\n      const sd = Math.sqrt(stdVals.reduce((a,b)=>a+Math.pow(b-mn,2),0)\/stdVals.length);\n\n      agreement = sd < 0.5 ? 1 : sd < 1 ? 0.5 : 0.2;\n\n    }\n\n    const priority = (5 - weightedScore) * 0.5 + Math.abs(gap) * 0.3 + agreement * 0.2;\n\n \n\n    return {\n\n      name, selfScore, mgrScore, clientScore, otherScore,\n\n      othersAvg, internalAvg, weightedScore, gap, priority,\n\n      course: COURSE_MAP[name].course,\n\n      objectives: COURSE_MAP[name].objectives\n\n    };\n\n  });\n\n \n\n  const overallScore = avg(compResults.map(c=>c.weightedScore));\n\n  const sorted = [...compResults].sort((a,b)=>b.priority-a.priority);\n\n  const topPriority = sorted[0];\n\n\n  \/\/ Strengths = top 3 weighted score\n\n  const byScore = [...compResults].sort((a,b)=>b.weightedScore-a.weightedScore);\n\n  const strengths = byScore.slice(0,3).map(c=>c.name);\n\n  const risks = sorted.slice(0,2).map(c=>c.name);\n\n \n\n  \/\/ Self vs others gap\n\n  const maxGap = [...compResults].sort((a,b)=>Math.abs(b.gap)-Math.abs(a.gap))[0];\n\n \n\n  \/\/ Client vs internal\n\n  const hasClient = compResults.some(c=>c.clientScore!==null);\n\n  const clientAvgAll = hasClient ? avg(compResults.filter(c=>c.clientScore).map(c=>c.clientScore)) : null;\n\n  const internalAvgAll = hasClient ? avg(compResults.filter(c=>c.internalAvg).map(c=>c.internalAvg)) : null;\n\n \n\n  \/\/ Confidence\n\n  const raterCount = [mgr,client,other].filter(a=>a.length>0).length;\n\n  const confidence = raterCount >= 3 ? 'High' : raterCount >= 2 ? 'Medium' : 'Low';\n\n \n\n  return {\n\n    compResults, overallScore, topPriority, sorted,\n\n    strengths, risks, maxGap, hasClient,\n\n    clientAvgAll, internalAvgAll, confidence, raterCount,\n\n    data\n\n  };\n\n}\n\n \n\n\/\/ ============================================================\n\n\/\/ EXECUTIVE SUMMARY\n\n\/\/ ============================================================\n\nfunction buildExecSummary(r) {\n\n  const { strengths, risks, maxGap, overallScore } = r;\n\n  const s = strengths.slice(0,2).join(' and ');\n\n  const ri = risks[0];\n\n  let gapLine = '';\n\n  if (Math.abs(maxGap.gap) > 0.7) {\n\n    gapLine = maxGap.gap > 0\n\n      ? ` A notable perception gap exists in ${maxGap.name} \u2014 self-perception is higher than others' experience, suggesting a blind spot worth exploring.`\n\n      : ` In ${maxGap.name}, others see greater strength than you may recognize \u2014 a hidden asset worth leveraging.`;\n\n  }\n\n  return `This leader demonstrates clear strengths in ${s}, earning consistent recognition across rater groups. The overall competency score of ${overallScore.toFixed(1)}\/5.0 reflects a solid foundation with meaningful development opportunities.${gapLine} The highest-priority development area is ${ri} \u2014 addressing this will strengthen both team effectiveness and leadership credibility. The recommended learning path below provides a direct path to close these gaps and accelerate growth.`;\n\n}\n\n \n\n\/\/ ============================================================\n\n\/\/ GAP INSIGHT\n\n\/\/ ============================================================\n\nfunction buildGapInsight(r) {\n\n  const { maxGap } = r;\n\n  if (!maxGap || Math.abs(maxGap.gap) < 0.3) return 'Self-perception is well aligned with others across most competency areas.';\n\n  if (maxGap.gap > 0.7) return `In <strong>${maxGap.name}<\/strong>, your self-rating is ${maxGap.gap.toFixed(1)} points higher than others' ratings \u2014 a potential blind spot and priority development area.`;\n\n  if (maxGap.gap < -0.7) return `Others rate your <strong>${maxGap.name}<\/strong> higher than you rate yourself \u2014 this is a hidden strength. Build on it with intention.`;\n\n  return `Minor perception differences exist in <strong>${maxGap.name}<\/strong>. Continue seeking feedback to stay calibrated.`;\n\n}\n\n \n\n\/\/ ============================================================\n\n\/\/ CLIENT INSIGHT\n\n\/\/ ============================================================\n\nfunction buildClientInsight(r) {\n\n  if (!r.hasClient) return 'No client data available for this report.';\n\n  const diff = r.clientAvgAll - r.internalAvgAll;\n\n  if (diff > 0.7) return 'Clients perceive stronger leadership effectiveness than internal stakeholders \u2014 suggesting excellent external presence with potential opportunity to align internal relationships.';\n\n  if (diff < -0.7) return 'Internal stakeholders rate this leader higher than clients \u2014 an opportunity to align external delivery with the strength others see internally.';\n\n  return 'Client and internal perceptions are well aligned, indicating consistent leadership presence across audiences.';\n\n}\n\n \n\n\/\/ ============================================================\n\n\/\/ RENDER REPORT\n\n\/\/ ============================================================\n\nlet currentView = 'all';\n\nlet currentReport = null;\n\n \n\nfunction renderReport(report, name) {\n\n  currentReport = report;\n\n  document.getElementById('reportName').textContent = name;\n\n  document.getElementById('reportScore').textContent = report.overallScore.toFixed(1);\n\n \n\n  const confClass = {High:'conf-high',Medium:'conf-med',Low:'conf-low'}[report.confidence];\n\n  document.getElementById('reportConfidence').innerHTML =\n\n    `<span class=\"confidence-pill ${confClass}\">Confidence: ${report.confidence}<\/span>`;\n\n \n\n  document.getElementById('execSummary').innerHTML = buildExecSummary(report);\n\n  document.getElementById('gapInsight').innerHTML = buildGapInsight(report);\n\n  document.getElementById('clientInsight').innerHTML = buildClientInsight(report);\n\n \n\n  \/\/ Start Here\n\n  const tp = report.topPriority;\n\n  document.getElementById('shCourse').textContent = tp.course;\n\n  document.getElementById('shWhy').textContent =\n\n    `${tp.name} scored lowest with a ${tp.weightedScore.toFixed(1)}\/5.0 weighted score and shows the highest development priority based on rater agreement.`;\n\n  document.getElementById('shObjectives').innerHTML =\n\n    tp.objectives.map(o => `<li>${o}<\/li>`).join('');\n\n \n\n  renderComps(report, 'all');\n\n  renderComments(report, 'all');\n\n  renderLearningPath(report);\n\n \n\n  document.getElementById('requestSection').style.display = 'none';\n\n  document.getElementById('reportSection').style.display = 'block';\n\n  window.scrollTo(0,0);\n\n}\n\n \n\nfunction renderComps(report, view) {\n\n  const el = document.getElementById('compBars');\n\n  el.innerHTML = '';\n\n  report.compResults.forEach(c => {\n\n    let score;\n\n    if (view === 'manager') score = c.mgrScore;\n\n    else if (view === 'client') score = c.clientScore;\n\n    else if (view === 'peer') score = c.otherScore;\n\n    else score = c.weightedScore;\n\n    if (!score) score = c.weightedScore;\n\n \n\n    const pct = (score \/ 5) * 100;\n\n    const barClass = pct >= 70 ? 'bar-green' : pct >= 50 ? 'bar-yellow' : 'bar-red';\n\n    const gapTag = view === 'all' && Math.abs(c.gap) > 0.7\n\n      ? `<span class=\"gap-tag ${c.gap > 0 ? 'gap-blind':'gap-hidden'}\">${c.gap > 0 ? '\u25b2 Blind Spot':'\u25bc Hidden Strength'}<\/span>`\n\n      : '';\n\n \n\n    el.innerHTML += `\n\n      <div class=\"comp-row\">\n\n        <div class=\"comp-name\">\n\n          <span>${c.name}${gapTag}<\/span>\n\n          <span class=\"score-val\">${score.toFixed(1)}\/5<\/span>\n\n        <\/div>\n\n        <div class=\"bar-outer\"><div class=\"bar-inner ${barClass}\" style=\"width:${pct}%\"><\/div><\/div>\n\n      <\/div>`;\n\n  });\n\n}\n\n \n\nfunction renderComments(report, view) {\n\n  const el = document.getElementById('commentsArea');\n\n  el.innerHTML = '';\n\n  const topComp = report.topPriority.name;\n\n  const relevantResponses = report.data.filter(d => {\n\n    if (view !== 'all') {\n\n      if (view === 'peer' && d.raterType !== 'peer' && d.raterType !== 'direct_report') return false;\n\n      if (view === 'manager' && d.raterType !== 'manager') return false;\n\n      if (view === 'client' && d.raterType !== 'client') return false;\n\n    }\n\n    return true;\n\n  });\n\n \n\n  let shown = 0;\n\n  relevantResponses.forEach(d => {\n\n    d.scores.filter(s => s.competency === topComp && s.comment).forEach(s => {\n\n      el.innerHTML += `\n\n        <div class=\"comment-block\">\n\n          <div class=\"cb-role\">${d.raterType.replace('_',' ')} \u2014 ${s.competency}<\/div>\n\n          <div class=\"cb-text\">${s.comment}<\/div>\n\n        <\/div>`;\n\n      shown++;\n\n    });\n\n  });\n\n  if (!shown) el.innerHTML = '<p style=\"font-size:13px;color:#64748b;\">No comments submitted for the top priority area.<\/p>';\n\n}\n\n \n\nfunction renderLearningPath(report) {\n\n  const el = document.getElementById('learningPath');\n\n  el.innerHTML = '';\n\n  report.sorted.slice(0,5).forEach((c,i) => {\n\n    el.innerHTML += `\n\n      <div class=\"lp-item\">\n\n        <div class=\"lp-rank\">#${i+1}<\/div>\n\n        <div class=\"lp-info\">\n\n          <div class=\"lp-course\">${c.course}<\/div>\n\n          <div class=\"lp-domain\">${c.name} \u2014 Score: ${c.weightedScore.toFixed(1)}\/5<\/div>\n\n        <\/div>\n\n      <\/div>`;\n\n  });\n\n}\n\n \n\nfunction setView(v) {\n\n  currentView = v;\n\n  document.querySelectorAll('.toggle-btn').forEach(b => b.classList.remove('active'));\n\n  event.target.classList.add('active');\n\n  if (currentReport) {\n\n    renderComps(currentReport, v);\n\n    renderComments(currentReport, v);\n\n  }\n\n}\n\n \n\n\/\/ ============================================================\n\n\/\/ DEMO MODE (sample data)\n\n\/\/ ============================================================\n\nfunction showDemo() {\n\n  const demoData = [\n\n    {\n\n      raterType: 'self',\n\n      scores: [\n\n        {competency:\"Leadership & Influence\",score:4,comment:\"I work hard to lead with integrity.\"},\n\n        {competency:\"Communication & Feedback\",score:4,comment:\"\"},\n\n        {competency:\"Coaching & Development\",score:3,comment:\"\"},\n\n        {competency:\"Emotional Intelligence\",score:4,comment:\"\"},\n\n        {competency:\"Accountability & Ownership\",score:5,comment:\"Always follow through.\"},\n\n        {competency:\"Change & Adaptability\",score:3,comment:\"\"},\n\n        {competency:\"Conflict Resolution\",score:4,comment:\"\"},\n\n        {competency:\"Inclusion & Collaboration\",score:4,comment:\"\"},\n\n        {competency:\"Team Effectiveness\",score:3,comment:\"\"},\n\n        {competency:\"Strategic Thinking\",score:4,comment:\"\"}\n\n      ],\n\n      ssc: \"Start: delegation. Stop: micromanaging. Continue: 1:1s.\"\n\n    },\n\n    {\n\n      raterType: 'manager',\n\n      scores: [\n\n        {competency:\"Leadership & Influence\",score:4,comment:\"Inspires confidence in the team.\"},\n\n        {competency:\"Communication & Feedback\",score:3,comment:\"Could be clearer with feedback delivery.\"},\n\n        {competency:\"Coaching & Development\",score:3,comment:\"\"},\n\n        {competency:\"Emotional Intelligence\",score:4,comment:\"\"},\n\n        {competency:\"Accountability & Ownership\",score:5,comment:\"Extremely reliable.\"},\n\n        {competency:\"Change & Adaptability\",score:2,comment:\"Struggles during transitions.\"},\n\n        {competency:\"Conflict Resolution\",score:3,comment:\"\"},\n\n        {competency:\"Inclusion & Collaboration\",score:4,comment:\"\"},\n\n        {competency:\"Team Effectiveness\",score:3,comment:\"\"},\n\n        {competency:\"Strategic Thinking\",score:3,comment:\"\"}\n\n      ],\n\n      ssc: \"Start: proactive communication. Stop: waiting for direction. Continue: team recognition.\"\n\n    },\n\n    {\n\n      raterType: 'peer',\n\n      scores: [\n\n        {competency:\"Leadership & Influence\",score:3,comment:\"\"},\n\n        {competency:\"Communication & Feedback\",score:2,comment:\"Feedback often unclear or delayed.\"},\n\n        {competency:\"Coaching & Development\",score:3,comment:\"\"},\n\n        {competency:\"Emotional Intelligence\",score:3,comment:\"\"},\n\n        {competency:\"Accountability & Ownership\",score:4,comment:\"\"},\n\n        {competency:\"Change & Adaptability\",score:2,comment:\"Resistant when things change.\"},\n\n        {competency:\"Conflict Resolution\",score:3,comment:\"\"},\n\n        {competency:\"Inclusion & Collaboration\",score:4,comment:\"\"},\n\n        {competency:\"Team Effectiveness\",score:3,comment:\"\"},\n\n        {competency:\"Strategic Thinking\",score:3,comment:\"\"}\n\n      ],\n\n      ssc: \"Start: more open dialogue. Stop: working in silos. Continue: being collaborative.\"\n\n    },\n\n    {\n\n      raterType: 'client',\n\n      scores: [\n\n        {competency:\"Leadership & Influence\",score:5,comment:\"Very professional and inspiring.\"},\n\n        {competency:\"Communication & Feedback\",score:4,comment:\"Clear and responsive externally.\"},\n\n        {competency:\"Coaching & Development\",score:4,comment:\"\"},\n\n        {competency:\"Emotional Intelligence\",score:4,comment:\"\"},\n\n        {competency:\"Accountability & Ownership\",score:5,comment:\"Delivers on every promise.\"},\n\n        {competency:\"Change & Adaptability\",score:4,comment:\"\"},\n\n        {competency:\"Conflict Resolution\",score:4,comment:\"\"},\n\n        {competency:\"Inclusion & Collaboration\",score:5,comment:\"\"},\n\n        {competency:\"Team Effectiveness\",score:4,comment:\"\"},\n\n        {competency:\"Strategic Thinking\",score:4,comment:\"\"}\n\n      ],\n\n      ssc: \"Continue: responsiveness. Continue: professionalism.\"\n\n    }\n\n  ];\n\n \n\n  \/\/ Render SSC\n\n  const sscEl = document.getElementById('sscArea');\n\n  sscEl.innerHTML = '';\n\n  demoData.filter(d=>d.ssc).forEach(d => {\n\n    sscEl.innerHTML += `\n\n      <div class=\"comment-block\">\n\n        <div class=\"cb-role\">${d.raterType.replace('_',' ')}<\/div>\n\n        <div class=\"cb-text\">${d.ssc}<\/div>\n\n      <\/div>`;\n\n  });\n\n \n\n  const report = computeReport(demoData);\n\n  renderReport(report, 'Sample Leader (Demo)');\n\n}\n\n \n\n\/\/ ============================================================\n\n\/\/ REQUEST REPORT (live \u2014 Apps Script)\n\n\/\/ ============================================================\n\nasync function requestReport() {\n\n  const name = document.getElementById('reqName').value.trim();\n\n  const email = document.getElementById('reqEmail').value.trim();\n\n  if (!name || !email) { alert('Please enter your name and email.'); return; }\n\n \n\n  const msg = document.getElementById('statusMsg');\n\n  msg.style.display = 'block';\n\n \n\n if (!GS_URL) {\nmsg.className = 'error';\nmsg.innerHTML = 'Email service not configured.';\nreturn;\n}\n\n \n\n  const btn = document.querySelector('#requestSection .btn-primary');\n\n  btn.textContent = 'Generating...';\n\n  btn.disabled = true;\n\n  msg.className = '';\n\n  msg.innerHTML = '\u23f3 Aggregating your feedback and generating report...';\n\n \n\n  try {\n\n    await fetch(GS_URL, {\n\n      method: 'POST', mode: 'no-cors',\n\n      headers: {'Content-Type':'application\/json'},\n\n      body: JSON.stringify({\n\n        type: 'requestReport',\n\n        participantName: name,\n\n        participantEmail: email,\n\n        assessmentType: 'Leader Lens 360'\n\n      })\n\n    });\n\n    msg.className = 'success';\n\n    msg.innerHTML = '\u2705 Your report has been generated and emailed to <strong>' + email + '<\/strong>. Please check your inbox (and spam folder).';\n\n    btn.textContent = '\u2705 Report Requested';\n\n  } catch(e) {\n\n    msg.className = 'error';\n\n    msg.innerHTML = '\u26a0 There was a problem. Please try again.';\n\n    btn.textContent = 'Generate & Email My Report';\n\n    btn.disabled = false;\n\n  }\n\n}\n\n \n\nfunction hideReport() {\n\n  document.getElementById('reportSection').style.display = 'none';\n\n  document.getElementById('requestSection').style.display = 'block';\n\n  window.scrollTo(0,0);\n\n}\n\n<\/script>\n\n<\/body>\n\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>Leader Lens 360 | Report Generator | eTrainers.org eTrainers.org | Premium Assessment Leader Lens 360\u2122 AI-Powered Leadership Insight &amp; Development Report Request Your Report Enter your name exactly as you entered it on the self-assessment, and the email address where you&#8217;d like to receive your report. Your Full Name Your Email Address Generate &amp; Email [&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-20","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/etrainers.net\/index.php?rest_route=\/wp\/v2\/pages\/20","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/etrainers.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/etrainers.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/etrainers.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/etrainers.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=20"}],"version-history":[{"count":2,"href":"https:\/\/etrainers.net\/index.php?rest_route=\/wp\/v2\/pages\/20\/revisions"}],"predecessor-version":[{"id":28,"href":"https:\/\/etrainers.net\/index.php?rest_route=\/wp\/v2\/pages\/20\/revisions\/28"}],"wp:attachment":[{"href":"https:\/\/etrainers.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=20"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}