PageSourceSearch

https://livinglines.app/static/js/842.9c10ba24.chunk.js

js livinglines.app collected 2026-10-07 13:38:02 UTC 41,713 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkranking=self.webpackChunkranking||[]).push([[842],{2009(e,t,s){s.d(t,{A:()=>U});var n=s(9379),a=s(197),i=s(9950),l=s(4304),r=s(5887),o=s(3325),c=(s(6368),s(2875)),d=s(6577),u=s(4464),h=s(418),m=s(3922),v=s(3530),x=s(264),p=s(895),k=s(8327),j=s(5161),g=s(4076),b=s(486),f=s(393),N=s(6898),y=s(4414);const w=e=>{if(!e)return"";try{return new Date(e).toLocaleString("de-DE",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"})}catch(t){return""}},A=e=>{let{taskId:t,studentId:s,finalScene:a}=e;const[l,r]=(0,i.useState)([]),[o,d]=(0,i.useState)(0),[u,h]=(0,i.useState)({}),[m,v]=(0,i.useState)(!1),x=!!a;(0,i.useEffect)(()=>{if(!t||!s)return void r([]);let e=!1;return h({}),(0,b.apK)(t,s).then(t=>{if(e)return;const s=Array.isArray(t)?t:[];r(s),d(Math.max(0,s.length-1))}).catch(()=>{e||r([])}),()=>{e=!0}},[t,s]);const k=(0,i.useMemo)(()=>{const e=l.map(e=>(0,n.A)((0,n.A)({},e),{},{kind:"step"}));if(!x)return e;const t=e.pop();return e.push((0,n.A)((0,n.A)({},t||{}),{},{id:"final",kind:"final"})),e},[l,x]),j=Math.min(o,Math.max(0,k.length-1)),g=k[j],A=(0,i.useCallback)(e=>{e&&"step"===e.kind&&e.has_scene&&h(t=>void 0!==t[e.id]?t:(v(!0),(0,b.agV)(e.id).then(t=>{const s=(0,f.D)(null===t||void 0===t?void 0:t.scene_elements);h(t=>(0,n.A)((0,n.A)({},t),{},{[e.id]:{elements:s}}))}).catch(()=>h(t=>(0,n.A)((0,n.A)({},t),{},{[e.id]:null}))).finally(()=>v(!1)),(0,n.A)((0,n.A)({},t),{},{[e.id]:void 0})))},[]);if((0,i.useEffect)(()=>{A(g)},[g,A]),!k.length)return null;const S="final"===(null===g||void 0===g?void 0:g.kind),_=S?a:u[null===g||void 0===g?void 0:g.id],C=j>0,E=j<k.length-1;return(0,y.jsxs)("div",{className:"student-task-section",children:[(0,y.jsx)("div",{className:"student-task-section-title",children:"Bearbeitung"}),(0,y.jsxs)("div",{className:"work-viewer",children:[(0,y.jsxs)("div",{className:"work-viewer__stage",children:[k.length>1&&(0,y.jsx)("button",{type:"button",className:"work-viewer__nav work-viewer__nav--prev",onClick:()=>d(j-1),disabled:!C,"aria-label":"Vorheriger Schritt",children:(0,y.jsx)(c._Jj,{})}),(0,y.jsx)("div",{className:"work-viewer__canvas student-task-canvas-frame",children:_?(0,y.jsx)(N.default,{scene:_,className:"student-task-canvas-content"},null===g||void 0===g?void 0:g.id):(0,y.jsx)("div",{className:"work-viewer__placeholder",children:m?"Lade Schritt \u2026":"F\xfcr diesen Schritt liegt keine Zeichnung vor."})}),k.length>1&&(0,y.jsx)("button",{type:"button",className:"work-viewer__nav work-viewer__nav--next",onClick:()=>d(j+1),disabled:!E,"aria-label":"N\xe4chster Schritt",children:(0,y.jsx)(c.X6T,{})})]}),k.length>1&&(0,y.jsxs)("div",{className:"work-viewer__bar",children:[(0,y.jsx)("div",{className:"work-viewer__dots",children:k.map((e,t)=>(0,y.jsx)("button",{type:"button",className:["work-viewer__dot",t===j?"active":"","final"===e.kind?"final":"",e.is_correct?"correct":""].filter(Boolean).join(" "),onClick:()=>d(t),"aria-label":"final"===e.kind?"Endstand":"Schritt ".concat(t+1)},e.id))}),(0,y.jsxs)("span",{className:"work-viewer__label",children:[S?"Endstand":"Schritt ".concat(j+1," von ").concat(k.length-(x?1:0)),(null===g||void 0===g?void 0:g.created_at)&&(0,y.jsx)("span",{className:"work-viewer__time",children:w(g.created_at)})]})]}),((null===g||void 0===g?void 0:g.headline)||(null===g||void 0===g?void 0:g.short_tip))&&(0,y.jsxs)("div",{className:"work-viewer__feedback",children:[g.headline&&(0,y.jsx)("div",{className:"work-viewer__feedback-headline",children:(0,y.jsx)(p.A,{content:g.headline})}),g.short_tip&&(0,y.jsx)("div",{className:"work-viewer__feedback-text",children:(0,y.jsx)(p.A,{content:g.short_tip})}),g.detailed_tip&&g.detailed_tip!==g.short_tip&&(0,y.jsx)("div",{className:"work-viewer__feedback-text work-viewer__feedback-text--muted",children:(0,y.jsx)(p.A,{content:g.detailed_tip})})]})]})]})};var S=s(3986),_=s(7119),C=s(2135),E=s(1359),M=s(6376),B=s(2747);const T=["sortKey","sort","onSort","children","className"],L=(e,t)=>t>0?Math.round(e/t*100):0,z=e=>String.fromCharCode(97+e),I={name:"asc"},W=e=>{let t=null===e||void 0===e?void 0:e.prompt_items;if("string"===typeof t)try{t=JSON.parse(t)}catch(s){return[]}return Array.isArray(t)?t:t&&"object"===typeof t?[t]:[]},D=e=>{let{item:t}=e;
1if("shape3d"===t.type)return(0,y.jsx)("div",{className:"task-hover-graphic",children:(0,y.jsx)(E.u,{item:t})});const s=C.Z[t.type];if(!s)return null;const a=(0,n.A)({},t);"numberLine"===t.type&&(a.width=a.width||200,a.height=a.height||60),"chart"===t.type&&Object.assign(a,{width:220,height:150,showTooltip:!1});const i="coordinate"===t.type?{width:180,height:140,withViewport:!1}:{};return(0,y.jsx)("div",{className:"task-hover-graphic type-".concat(t.type),children:(0,y.jsx)(s,(0,n.A)({item:a,plotConfig:t.plot},i))})},O=e=>{let{task:t,className:s}=e;const n=W(t).filter(e=>e&&"object"===typeof e&&e.type&&"text"!==e.type);return 0===n.length?null:(0,y.jsx)("span",{className:s,children:n.map((e,t)=>(0,y.jsx)(M.A,{children:(0,y.jsx)(D,{item:e})},t))})},F=e=>{let{hover:t}=e;const s=(0,i.useRef)(null),[n,a]=(0,i.useState)(null),{task:l,label:r,rect:o}=t;(0,i.useLayoutEffect)(()=>{const e=s.current;if(!e)return;const{width:t,height:n}=e.getBoundingClientRect();let i=o.left+o.width/2-t/2;i=Math.max(8,Math.min(i,window.innerWidth-t-8));let l=o.bottom+8;l+n>window.innerHeight-8&&(l=Math.max(8,o.top-n-8)),a({left:i,top:l})},[o,l]);const c=W(l).filter(e=>!e||"object"!==typeof e||!e.type||"text"===e.type),d="sketch"===(0,g.hY)(l);return(0,_.createPortal)((0,y.jsxs)("div",{ref:s,className:"sheet-class-table-hover",style:n?{left:n.left,top:n.top}:{left:-9999,top:0},role:"tooltip",children:[(0,y.jsx)("div",{className:"task-hover-label",children:r}),(0,y.jsx)(O,{task:l,className:"task-hover-graphics"}),(0,y.jsx)("div",{className:"task-hover-description",children:(0,y.jsx)(p.A,{content:l.description||"\u2014"})}),c.map((e,t)=>{var s,n,a;return(0,y.jsx)("div",{className:"task-hover-text",children:(0,y.jsx)(p.A,{content:String(null!==(s=null!==(n=null!==(a=null===e||void 0===e?void 0:e.text)&&void 0!==a?a:null===e||void 0===e?void 0:e.label)&&void 0!==n?n:e)&&void 0!==s?s:"")})},t)}),!d&&(0,y.jsx)("div",{className:"task-hover-preview",children:(0,y.jsx)(M.A,{children:(0,y.jsx)(B.Ay,{exercise:l,mode:"task",size:"compact"})})})]}),document.body)},K=e=>{let{sortKey:t,sort:s,onSort:a,children:i,className:l=""}=e,r=(0,S.A)(e,T);const o=s.key===t;return(0,y.jsxs)("button",(0,n.A)((0,n.A)({type:"button",className:"sort-header ".concat(o?"is-active":""," ").concat(l),onClick:()=>a(t)},r),{},{children:[i,(0,y.jsx)("span",{className:"sort-caret","aria-hidden":"true",children:o&&"asc"===s.dir?"\u25b2":"\u25bc"})]}))},P=e=>{var t;let{sheet:s,classStudents:l=[],studentEntries:r=[],onClose:o,onCellClick:d,closeOnEscape:u=!0}=e;const[h,v]=(0,i.useState)({key:"solved",dir:"desc"}),[x,j]=(0,i.useState)(null),[g,b]=(0,i.useState)(null),[f,N]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(!u)return;const e=e=>{"Escape"===e.key&&o()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[o,u]);const w=(0,i.useMemo)(()=>((null===s||void 0===s?void 0:s.sessions)||[]).filter(e=>(e.tasks||[]).length>0),[s]),A=(0,i.useMemo)(()=>w.flatMap(e=>e.tasks),[w]),S=(0,i.useMemo)(()=>{const e=new Map;return w.forEach((t,s)=>t.tasks.forEach((n,a)=>{e.set(n.id,"".concat(t.name||"Abschnitt ".concat(s+1)," \xb7 ").concat(z(a)))})),e},[w]),_="full"===(null!==g&&void 0!==g?g:A.length<=8?"full":"compact"),C=(0,i.useMemo)(()=>{const e=new Map;return r.forEach(t=>e.set("".concat(t.student_id,":").concat(t.task_id),t)),e},[r]),E=(0,i.useMemo)(()=>(0,a.j_)(r),[r]),M=(0,i.useMemo)(()=>{const e=l.map(e=>{const t=A.filter(t=>(0,a.qg)(C.get("".concat(e.id,":").concat(t.id)))).length,s=A.reduce((t,s)=>t+(0,a.YK)(C.get("".concat(e.id,":").concat(s.id))).hints,0),n=A.some(t=>"not-attempted"!==(0,a.YK)(C.get("".concat(e.id,":").concat(t.id))).status);return{student:e,solved:t,hints:s,active:n,rate:L(t,A.length)}}),t="asc"===h.dir?1:-1,s=e=>"solved"===h.key?1e3*e.solved-e.hints:(e=>{var t;const s=(0,a.YK)(e);return(0,a.qg)(e)?5-Math.min(s.hints,9)/10:null!==(t={"in-work":3,wrong:2,error:1}[s.status])&&void 0!==t?t:0})(C.get("".concat(e.student.id,":").concat(h.key)));return e.sort((e,n)=>"name"===h.key?t*(0,a.Sq)(e.student,n.student):t*(s(e)-s(n))||(0,a.Sq)(e.student,n.student))},[l,A,C,h]),B=M.filter(e=>e.active),T=M.filter(e=>!e.active),W=f?[...B,...T]:B,D=e=>{v(t=>t.key===e?{key:e,dir:"asc"===t.dir?"desc":"asc"}:{key:e,dir:I[e]||"desc"})},P=(e,t)=>{j({task:t,label:S.get(t.id),rect:e.currentTarget.getBoundingClientRect()})},R=A.map(e=>L(W.filter(t=>{let{student:s}=t;return(0,a.qg)(C.get("".concat(s.id,":").concat(e.id)))}).length,W.length)),q=L(W.reduce((e,t)=>
1e+t.solved,0),W.length*A.length);return(0,y.jsxs)("div",{className:"modal-overlay sheet-class-table-modal",style:{"--sheet-color":null!==(t=s.color)&&void 0!==t?t:m.k},onMouseDown:e=>e.target===e.currentTarget&&o(),children:[(0,y.jsxs)("div",{className:"modal-content sheet-class-table-content",children:[(0,y.jsx)("button",{className:"close-button",onClick:o,"aria-label":"Schlie\xdfen",children:(0,y.jsx)(c.QCr,{size:18})}),(0,y.jsxs)("div",{className:"sheet-class-table-header",children:[(0,y.jsxs)("h3",{children:["Klassentabelle ",(0,y.jsx)("span",{className:"sheet-class-table-beta",children:"Beta"})]}),(0,y.jsx)("div",{className:"sheet-class-table-sub",children:s.title}),A.length>0&&(0,y.jsxs)("div",{className:"sheet-class-table-mode",role:"group","aria-label":"Spaltenansicht",children:[(0,y.jsx)("button",{type:"button",className:_?"":"is-active",onClick:()=>b("compact"),children:"a, b, c"}),(0,y.jsx)("button",{type:"button",className:_?"is-active":"",onClick:()=>b("full"),children:"Aufgaben"})]})]}),0===M.length||0===A.length?(0,y.jsx)("div",{className:"sheet-class-table-empty",children:"Noch keine Sch\xfcler:innen oder Aufgaben vorhanden."}):(0,y.jsx)("div",{className:"sheet-class-table-scroll",onScroll:()=>j(null),children:(0,y.jsxs)("table",{className:"sheet-class-table".concat(_?" is-full":""),children:[(0,y.jsxs)("thead",{children:[(0,y.jsxs)("tr",{children:[(0,y.jsx)("th",{rowSpan:2,className:"col-name",children:(0,y.jsx)(K,{sortKey:"name",sort:h,onSort:D,children:"Name"})}),(0,y.jsx)("th",{rowSpan:2,className:"col-sum",children:(0,y.jsx)(K,{sortKey:"solved",sort:h,onSort:D,children:"Gel\xf6st"})}),(0,y.jsx)("th",{rowSpan:2,className:"col-rate",children:"in %"}),w.map((e,t)=>(0,y.jsx)("th",{colSpan:e.tasks.length,className:"col-session",title:e.name,children:e.name||"Abschnitt ".concat(t+1)},e.id))]}),(0,y.jsx)("tr",{children:w.map(e=>e.tasks.map((e,t)=>(0,y.jsx)("th",{className:"col-task ".concat(0===t?"is-group-start":""),children:(0,y.jsx)(K,(0,n.A)((0,n.A)({sortKey:e.id,sort:h,onSort:D,className:"is-task"},_?{}:{onMouseEnter:t=>P(t,e),onMouseLeave:()=>j(null),onFocus:t=>P(t,e),onBlur:()=>j(null)}),{},{children:_?(0,y.jsxs)("span",{className:"task-head",children:[(0,y.jsx)("span",{className:"task-head-letter",children:z(t)}),(0,y.jsxs)("span",{className:"task-head-body",children:[(0,y.jsx)(O,{task:e,className:"task-head-graphics"}),(0,y.jsx)("span",{className:"task-head-text",children:(0,y.jsx)(p.A,{content:e.description||"\u2014"})})]})]}):z(t)}))},e.id)))})]}),(0,y.jsxs)("tbody",{children:[W.map(e=>{let{student:t,solved:s,rate:n,active:i}=e;return(0,y.jsxs)("tr",{className:i?"":"is-inactive",children:[(0,y.jsx)("th",{scope:"row",className:"col-name",children:(0,y.jsxs)("span",{className:"student-cell",children:[(0,y.jsx)(k.A,{seed:t.avatar_seed,size:24}),(0,y.jsx)("span",{className:"student-cell-name",children:(0,a.bS)(t)})]})}),(0,y.jsxs)("td",{className:"col-sum",children:[s,"/",A.length]}),(0,y.jsx)("td",{className:"col-rate",children:(0,y.jsx)("div",{className:"rate-bar",style:{"--rate":"".concat(n,"%")},children:(0,y.jsxs)("span",{children:[n,"%"]})})}),w.map(e=>e.tasks.map((s,n)=>{const i=(l=t.id,r=s.id,C.get("".concat(l,":").concat(r))||null);var l,r;const o=(0,a.YK)(i,E.get(s.id)),c="not-attempted"===o.status;return(0,y.jsx)("td",{className:"col-task ".concat(0===n?"is-group-start":""),children:(0,y.jsx)("button",{type:"button",className:"task-cell ".concat(c?"is-empty":""," ").concat(o.ring?"is-many-hints":""),style:c?void 0:{background:o.color,color:o.textColor},title:"".concat((0,a.bS)(t)," \xb7 ").concat(z(n),": ").concat(o.label),disabled:c,onClick:()=>null===d||void 0===d?void 0:d({student:t,task:s,session:e,progressEntry:i}),children:c?"":o.symbol})},s.id)}))]},t.id)}),T.length>0&&(0,y.jsxs)("tr",{className:"inactive-summary",children:[(0,y.jsx)("th",{scope:"row",className:"col-name",children:(0,y.jsxs)("button",{type:"button",className:"inactive-toggle",onClick:()=>N(e=>!e),"aria-expanded":f,children:[(0,y.jsx)("span",{className:"avatar-stack",children:T.slice(0,4).map(e=>{let{student:t}=e;return(0,y.jsx)(k.A,{seed:t.avatar_seed,size:22},t.id)})}),(0,y.jsxs)("span",{children:[T.length," ohne Bearbeitung"]}),f?(0,y.jsx)(c.Ucs,{}):(0,y.jsx)(c.Vr3,{})]})}),(0,y.jsx)("td",{colSpan:2+A.length,className:"inactive-names",children:f?"Einklappen":T.map(e=>{let{student:t}=e;return(0,a.bS)(t)}).join(", ")})]})]}),(0,y.jsx)("tfoot",{children:(0,y.jsxs)("tr",{children:[(0,y.jsx)("th",{scope:"row",className:"col-name",children:"Klasse"}),(0,y.jsx)("td",{className:"col-sum"}),(0,y.jsxs)("td",{className:"col-rate",children:[q,"%"]}),R.map((e,t)=>(0,y.jsxs)("td",{className:"col-task col-task-rate",children:[e,"%"]},A[t].id))]})})]})}),(0,y.jsxs)("div",{className:"sheet-class-table-legend",children:[(0,y.jsxs)("span",{children:[(0,y.jsx)("i",{style:{background:a.Rf.solved}})," Gel\xf6st"]}),(0,y.jsxs)("span",{children:[(0,y.jsx)("i",{style:{background:a.Rf.corrected}})," Mit Tipp gel\xf6st"]}),(0,y.jsxs)("span",{children:[(0,y.jsx)("i",{style:{background:a.Rf.wrong}})," Falsch"]}
1),(0,y.jsxs)("span",{children:[(0,y.jsx)("i",{style:{background:a.Rf.inWork}})," In Arbeit"]}),(0,y.jsxs)("span",{children:[(0,y.jsx)("i",{className:"is-empty"})," Nicht begonnen"]}),(0,y.jsxs)("span",{children:[(0,y.jsx)("i",{className:"is-many-hints"})," Auff\xe4llig viele Tipps"]}),(0,y.jsx)("span",{className:"legend-hint",children:"Spaltenkopf anklicken zum Sortieren \xb7 \xfcber a, b, c \u2026 fahren zeigt die Aufgabe"})]}),(0,y.jsxs)("div",{className:"sheet-class-table-credit",children:["Ansicht entstanden in Mitwirkung von Christoph Russ,"," ",(0,y.jsx)("a",{href:"https://www.msifeuerbach.at/",target:"_blank",rel:"noopener noreferrer",children:"MSI Feuerbach"})]})]}),x&&(0,y.jsx)(F,{hover:x})]})},R="livinglines.sheetWorkView",q=[{key:"compact",icon:c.YXz,label:"K\xf6pfe",title:"Nur K\xf6pfe"},{key:"work",icon:c.Mbp,label:"Bearbeitungen",title:"Bearbeitungen (bei wenig Platz seitlich scrollen)"}],V="livinglines.sheetWorkViewBetaToast",Y=()=>{try{const e=window.localStorage.getItem(R);return q.some(t=>t.key===e)?e:"auto"}catch(e){return"auto"}},U=e=>{var t,s,f,N,w,S,_,C,E,M,B,T,L,z,I,W;let{isOpen:D,sheet:O,readOnly:F=!0,onClose:K,onDistribute:U,onEdit:Z,onDelete:Q,onMarkDraft:J,onTest:$,onShareLink:H,onDuplicate:G,onExportWord:X,sessionProgress:ee={},studentEntries:te=[],teacherEntries:se=[],classStudents:ne=[],classTeachers:ae=[],selectedSessionId:ie=null,onSessionSelect:le,showStudentProgress:re=!1,showTeacherProgress:oe=!1,classId:ce=null}=e;const{currentUser:de}=(0,d.A)(),ue=(null===de||void 0===de?void 0:de.isAdmin)||!1,he=(0,i.useId)(),[me,ve]=(0,i.useState)(null),[xe,pe]=(0,i.useState)(null),[ke,je]=(0,i.useState)(!1),[ge,be]=(0,i.useState)(!1),[fe,Ne]=(0,i.useState)(Y),ye=e=>{const t=fe===e?"auto":e;Ne(t);try{"auto"===t?window.localStorage.removeItem(R):window.localStorage.setItem(R,t)}catch(s){}},we=Boolean(re&&ce&&ne.length>0),Ae=(0,i.useMemo)(()=>{const e=new Set(((null===O||void 0===O?void 0:O.sessions)||[]).flatMap(e=>(e.tasks||[]).map(e=>e.id)));return[...te,...oe?se:[]].some(t=>e.has(t.task_id)&&"not-attempted"!==((0,x.S)(t.status)||"not-attempted"))},[O,te,se,oe]),[Se,_e]=(0,i.useState)(!1),[Ce,Ee]=(0,i.useState)(!1);(0,i.useEffect)(()=>{_e(!1),Ee(!1),je(!1),be(!1)},[D,null===O||void 0===O?void 0:O.id,ce]);const Me=()=>{Se||"compact"!==fe||ye("compact"),Se||(()=>{try{return"1"===window.sessionStorage.getItem(V)}catch(e){return!1}})()||((()=>{try{window.sessionStorage.setItem(V,"1")}catch(e){}})(),(0,r.Ay)(e=>(0,y.jsxs)("span",{className:"beta-feedback-toast",children:[(0,y.jsxs)("span",{children:[(0,y.jsx)("strong",{children:"Neue Ansicht (Beta)"})," \u2013 sag uns gern, wie du sie findest."]}),(0,y.jsx)("button",{type:"button",onClick:()=>{r.Ay.dismiss(e.id),Ee(!0)},children:"Feedback geben"})]}),{icon:"\ud83e\uddea",duration:9e3})),_e(e=>!e)},Be=we&&Ae,Te=Be&&Se,Le=(0,i.useRef)(null);(0,i.useEffect)(()=>{if(!ke)return;const e=e=>{Le.current&&!Le.current.contains(e.target)&&je(!1)},t=e=>{"Escape"===e.key&&je(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[ke]);const[ze,Ie]=(0,i.useState)([]),[We,De]=(0,i.useState)({}),Oe=(0,i.useRef)({});(0,i.useEffect)(()=>{var e,t;if(null===me||void 0===me||null===(e=me.task)||void 0===e||!e.id||null===me||void 0===me||null===(t=me.student)||void 0===t||!t.id)return void Ie([]);let s=!1;return(0,b.xWT)(me.task.id,me.student.id).then(e=>{s||Ie(Array.isArray(e)?e:[])}).catch(()=>{s||Ie([])}),()=>{s=!0}},[null===me||void 0===me||null===(t=me.task)||void 0===t?void 0:t.id,null===me||void 0===me||null===(s=me.student)||void 0===s?void 0:s.id]),(0,i.useEffect)(()=>{var e;const t=null===me||void 0===me||null===(e=me.student)||void 0===e?void 0:e.id;if(!t)return;if(Oe.current[t])return;let s=!1;return(0,b.tyu)(t).then(e=>{if(s||!Array.isArray(e))return;const a={};e.forEach(e=>{null!==e&&void 0!==e&&e.task_id&&(a[e.task_id]=e)}),Oe.current=(0,n.A)((0,n.A)({},Oe.current),{},{[t]:a}),De(e=>(0,n.A)((0,n.A)({},e),{},{[t]:a}))}).catch(()=>{}),()=>{s=!0}},[null===me||void 0===me||null===(f=me.student)||void 0===f?void 0:f.id]);const Fe=e=>{if(!e)return"";if("string"===typeof e)return e;const t=e.type||"",s=Array.isArray(e.children)?e.children:[];if("SymbolNode"===t){var n;const t=(null===e||void 0===e||null===(n=e.trace_group)||void 0===n?void 0:n.label)||(null===e||void 0===e?void 0:e.label)||"";return"noise"===t?"":t}if("FracNode"===t){const e=Fe(s[0]),t=Fe(s[1]);return"\\frac{".concat(e,"}{").concat(t,"}")}if("SupNode"===t){const e=Fe(s[0]),t=Fe(s[1]);return"".concat(e,"^{").concat(t,"}")}if("SubNode"===t){const e=Fe(s[0]),t=Fe(s[1]);return"".concat(e,"_{").concat(t,"}")}if("SubSupNode"===t){const e=Fe(s[0]),t=Fe(s[1]),n=Fe(s[2]);return"".concat(e,"_{").concat(t,"}^{").concat(n,"}")}if("SqrtNode"===t){const e=Fe(s[0]);return"\\sqrt{".concat(e,"}")}
1return"LineNode"===t?s.map(Fe).filter(Boolean).join(" \\\\ "):"RowNode"===t||s.length?s.map(Fe).join(""):""},Ke=e=>{const t=(e=>{if(!e)return null;if("string"===typeof e)try{return JSON.parse(e)}catch(t){return null}return e})(e);return t&&"object"===typeof t?"LineNode"===t.type&&Array.isArray(t.children)?t.children.map(Fe).map(e=>e.trim()).filter(Boolean):Array.isArray(t.lines)?t.lines.map(Fe).filter(Boolean):t.children?t.children.map(Fe).filter(Boolean):[]:[]},Pe=(0,i.useMemo)(()=>{var e,t,s,a,i,l;if((null===me||void 0===me||!me.progressEntry)&&(null===me||void 0===me||null===(e=me.student)||void 0===e||!e.id))return null;const r=null===(t=We[null===me||void 0===me||null===(s=me.student)||void 0===s?void 0:s.id])||void 0===t?void 0:t[null===me||void 0===me||null===(a=me.task)||void 0===a?void 0:a.id];return r?(0,n.A)((0,n.A)({},null!==(l=me.progressEntry)&&void 0!==l?l:{}),r):null!==(i=null===me||void 0===me?void 0:me.progressEntry)&&void 0!==i?i:null},[me,We]),Re=(0,i.useMemo)(()=>me?Ke(null===Pe||void 0===Pe?void 0:Pe.last_graph):[],[me,Pe]),qe=e=>{const t=String(e||"").trim();return t?t.startsWith("$")?t:"$$".concat(t,"$$"):""},Ve=null===Pe||void 0===Pe?void 0:Pe.scene_json,Ye=!!(Ue=Ve)&&(Array.isArray(Ue)?Ue.length>0:!!Array.isArray(Ue.elements)&&Ue.elements.length>0);var Ue;const Ze=null!==(N=null===Pe||void 0===Pe?void 0:Pe.task_state)&&void 0!==N?N:null,Qe=me&&(0,x.S)(null===Pe||void 0===Pe?void 0:Pe.status)||"not-attempted",Je=(null===Pe||void 0===Pe?void 0:Pe.skip_feedback_reason)||"",$e=(null===Pe||void 0===Pe?void 0:Pe.skip_feedback_note)||"",He="teacher"===(null===me||void 0===me||null===(w=me.student)||void 0===w?void 0:w.role)||"admin"===(null===me||void 0===me||null===(S=me.student)||void 0===S?void 0:S.role),Ge="sketch"===(me?(0,g.hY)(me.task):"sketch"),Xe=(null===Pe||void 0===Pe?void 0:Pe.attempts)||0,et=(null===Pe||void 0===Pe?void 0:Pe.used_hint)||!1,tt=(null===Pe||void 0===Pe?void 0:Pe.points)||0,st=(null===Pe||void 0===Pe?void 0:Pe.updated_at)||(null===Pe||void 0===Pe?void 0:Pe.created_at)||null,nt=(0,a.YK)(Pe||(null===me||void 0===me?void 0:me.progressEntry)),at=nt.color.slice(1),it=(0,i.useMemo)(()=>{var e,t,s;if(null===me||void 0===me||null===(e=me.task)||void 0===e||!e.id)return[];const n="teacher"===(null===me||void 0===me||null===(t=me.student)||void 0===t?void 0:t.role)||"admin"===(null===me||void 0===me||null===(s=me.student)||void 0===s?void 0:s.role),i=n?ae:ne,l=n?se:te;if(!Array.isArray(i)||!Array.isArray(l))return[];const r=me.task.id,o=new Map;return l.forEach(e=>{(null===e||void 0===e?void 0:e.task_id)===r&&o.set(e.student_id,e)}),i.map(e=>{const t=o.get(e.id);return{student:e,progressEntry:t||null,status:(0,x.S)(null===t||void 0===t?void 0:t.status)||"not-attempted"}}).filter(e=>"not-attempted"!==e.status).sort((e,t)=>(0,a.Sq)(e.student,t.student))},[me,ne,ae,te,se]),lt=(0,i.useMemo)(()=>{var e;return null!==me&&void 0!==me&&null!==(e=me.student)&&void 0!==e&&e.id?it.findIndex(e=>{var t;return(null===(t=e.student)||void 0===t?void 0:t.id)===me.student.id}):-1},[it,me]),rt=lt>0,ot=lt>=0&&lt<it.length-1,ct=e=>{if(lt<0)return;const t=it["next"===e?lt+1:lt-1];t&&ve(e=>(0,n.A)((0,n.A)({},e),{},{student:t.student,progressEntry:t.progressEntry}))};if(!D||!O)return null;const dt=Te?(0,y.jsx)("span",{className:"sheet-work-view".concat("auto"===fe?" is-auto":""),role:"group","aria-label":"Ansicht der Bearbeitungen",title:"auto"===fe?"Automatisch: Bearbeitungen, solange genug Platz ist":void 0,children:q.map(e=>{const t=fe===e.key;return(0,y.jsxs)("button",{type:"button",className:t?"is-active":"","aria-pressed":t,title:"".concat(e.title,t?" \u2013 fixiert. Erneut klicken f\xfcr automatisch":" fixieren (sonst automatisch je nach Platz)"),onClick:()=>ye(e.key),children:[(0,y.jsx)(e.icon,{})," ",e.label]},e.key)})}):null;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("div",{className:"modal-overlay sheet-detail-modal",style:{"--sheet-color":null!==(_=O.color)&&void 0!==_?_:m.k},children:(0,y.jsxs)("div",{className:"modal-content sheet-detail-content ".concat("draft"===O.status?"is-draft":""),children:[(0,y.jsx)("button",{className:"close-button",onClick:K,children:(0,y.jsx)(c.QCr,{size:20})}
1),(0,y.jsxs)("div",{className:"sheet-detail-header ".concat("draft"===O.status?"is-draft":""),children:[(0,y.jsxs)("div",{className:"sheet-title-row",children:[(0,y.jsx)("h2",{children:O.title}),"draft"===O.status&&(0,y.jsxs)("span",{className:"sheet-draft-badge",children:[(0,y.jsx)(c.JhU,{})," Entwurf"]})]}),(0,y.jsxs)("div",{className:"sheet-meta",children:[O.time_estimate&&(0,y.jsx)("span",{className:"time-estimate",children:(0,h.fU)(O.time_estimate)}),O.created_at&&(0,y.jsxs)("span",{className:"created-date",children:["Erstellt am: ",(0,h.Yq)(O.created_at)]})]}),!F&&(()=>{const e="draft"===O.status,t=[e&&$&&{key:"test",icon:(0,y.jsx)(c.mFx,{}),label:"Als Sch\xfcler testen",onClick:()=>$(O),mobileOnly:!0},H&&{key:"share",icon:(0,y.jsx)(c.AnD,{}),label:"Teilen",onClick:()=>H(O),mobileOnly:!0},!e&&J&&{key:"draft",icon:(0,y.jsx)(c.i3g,{}),label:"Zu Entwurf",onClick:()=>J(O),mobileOnly:!0},re&&ce&&ne.length>0&&{key:"class-table",icon:(0,y.jsx)(c.ist,{}),label:"Klassentabelle (Beta)",onClick:()=>be(!0)},Be&&{key:"inline-work",icon:(0,y.jsx)(c.kQE,{}),label:Se?"Bearbeitungen ausblenden":"Bearbeitungen direkt anzeigen (Beta)",onClick:Me},G&&{key:"duplicate",icon:(0,y.jsx)(c.paH,{}),label:"Kopie anlegen",onClick:()=>G(O)},X&&{key:"word",icon:(0,y.jsx)(c.WLb,{}),label:"Als Word exportieren",onClick:()=>X(O)},Q&&{key:"delete",icon:(0,y.jsx)(c.qbC,{}),label:"L\xf6schen",danger:!0,onClick:()=>Q(O)}].filter(Boolean);return(0,y.jsxs)("div",{className:"sheet-actions",children:[e&&U&&(0,y.jsxs)("button",{className:"btn is-primary",onClick:()=>U(O),title:"Verteilen",children:[(0,y.jsx)(c.l1U,{})," ",(0,y.jsx)("span",{children:"Verteilen"})]}),!e&&J&&(0,y.jsxs)("button",{className:"btn is-neutral is-overflow-mobile",onClick:()=>J(O),title:"Zur\xfcck zu Entwurf",children:[(0,y.jsx)(c.i3g,{})," ",(0,y.jsx)("span",{children:"Zu Entwurf"})]}),Z&&(0,y.jsxs)("button",{className:"btn is-neutral",onClick:()=>Z(O),title:"Bearbeiten",children:[(0,y.jsx)(c.QCN,{})," ",(0,y.jsx)("span",{children:"Bearbeiten"})]}),$&&(0,y.jsxs)("button",{className:"btn is-neutral ".concat(e?"is-overflow-mobile":""),onClick:()=>$(O),title:"Als Sch\xfcler testen",children:[(0,y.jsx)(c.mFx,{})," ",(0,y.jsx)("span",{children:"Testen"})]}),H&&(0,y.jsxs)("button",{className:"btn is-neutral is-overflow-mobile",onClick:()=>H(O),title:"Link kopieren, um das Blatt an andere Lehrkr\xe4fte weiterzugeben",children:[(0,y.jsx)(c.AnD,{})," ",(0,y.jsx)("span",{children:"Teilen"})]}),t.length>0&&(0,y.jsxs)("div",{className:"sheet-actions__more",ref:Le,children:[(0,y.jsx)("button",{className:"btn is-neutral is-icon ".concat(ke?"is-open":""),onClick:()=>je(e=>!e),"aria-haspopup":"menu","aria-expanded":ke,title:"Weitere Aktionen",children:(0,y.jsx)(c.HFM,{})}),ke&&(0,y.jsx)("div",{className:"sheet-actions-menu",role:"menu",children:t.map(e=>(0,y.jsxs)("button",{role:"menuitem",className:"".concat(e.danger?"is-danger":""," ").concat(e.mobileOnly?"is-mobile-only":""),onClick:()=>{je(!1),e.onClick()},children:[e.icon," ",(0,y.jsx)("span",{children:e.label})]},e.key))})]})]})})()]}),(0,y.jsx)("div",{className:"sheet-detail-body",children:(0,y.jsx)(v.A,{selectedSessions:O.sessions||[],handleRemoveSession:()=>{},moveSessionUp:()=>{},moveSessionDown:()=>{},readOnly:!0,sessionProgress:ee,studentEntries:te,teacherEntries:se,classStudents:ne,classTeachers:ae,onSessionClick:e=>null===le||void 0===le?void 0:le((null===e||void 0===e?void 0:e.id)||null),selectedSessionId:ie,showStudentProgress:re,showTeacherProgress:oe,classId:ce,workView:we&&Se?fe:"compact",legendAside:dt,onStudentTaskClick:e=>{var t,s;const a=("teacher"===(null===e||void 0===e||null===(t=e.student)||void 0===t?void 0:t.role)||"admin"===(null===e||void 0===e||null===(s=e.student)||void 0===s?void 0:s.role)?se:te).find(t=>t.student_id===e.student.id&&t.task_id===e.task.id);ve((0,n.A)((0,n.A)({},e),{},{progressEntry:a||null,sheetTitle:O.title}))}})})]})}),me&&(0,y.jsx)("div",{className:"modal-overlay student-task-modal",children:(0,y.jsxs)("div",{className:"student-task-wrapper",children:[rt&&(0,y.jsx)("button",{type:"button",className:"student-task-nav student-task-nav--prev",onClick:()=>ct("prev"),"aria-label":"Vorherige Bearbeitung",children:(0,y.jsx)(c._Jj,{})}),ot&&(0,y.jsx)("button",{type:"button",className:"student-task-nav student-task-nav--next",onClick:()=>ct("next"),"aria-label":"N\xe4chste Bearbeitung",children:(0,y.jsx)(c.X6T,{})}),(0,y.jsxs)("div",{className:"modal-content student-task-content status-".concat(Qe),children:[(0,y.jsx)("button",{className:"close-button",onClick:()=>ve(null),children:(0,y.jsx)(c.QCr,{size:18})}),(0,y.jsxs)("div",{className:"student-task-scroll",children:[(0,y.jsxs)("div",{className:"student-task-header",children:[(0,y.jsxs)("div",{className:"student-task-header-main",children:[(0,y.jsxs)("div",{className:"student-task-title-row",children:[(0,y.jsx)("div",{className:"student-task-avatar",children:(0,y.jsx)(k.A,{seed:null===(C=me.student)||void 0===C?void 0:C.avatar_seed,size:34,backgroundColor:at})}),(0,y.jsx)("div",{className:"student-task-title",children:(null===(E=me.student)||void 0===E?void 0:E.name)||(null===(M=me.student)||void 0===M?void 0:M.email)||("teacher"===(null===(B=me.student)||void 0===B?void 0:B.role)||"admin"===(null===(T=me.student)||void 0===T?void 0:T.role)?"Lehrkraft":"Sch\xfcler")})]}),(0,y.jsxs)("div",{className:"student-task-meta",children:[(0,y.jsx)("span",{children:me.sheetTitle||"\xdcbungsblatt"}),(null===(L=me.session)||void 0===L?void 0:L.name)&&me.session.name!==me.sheetTitle&&(0,y.jsx)("span",{children:me.session.name}),He&&(0,y.jsx)("span",{className:"student-task-role-badge",children:"Lehrkraft"})]})]}),(0,y.jsxs)("div",{className:"student-task-header-stats",children:[(0,y.jsxs)("div",{className:"student-task-status-pill status-".concat(Qe),children:[(0,y.jsx)("span",{className:"student-task-status-dot status-".concat(Qe)}),(0,y.jsxs)("span",{className:"student-task-status-text",children:[nt.symbol," ",nt.label]})]}),(0,y.jsx)("div",{className:"student-task-date",children:st?(0,h.Yq)(st):"\u2014"}),me.task&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)("button",{type:"button",className:"student-task-grid-btn",onClick:()=>{const{task:e,session:t}=me;ve(null),pe({exercise:e,session:t})},"data-tooltip-id":he,"data-tooltip-content":"Alle Bearbeitungen anzeigen",children:[(0,y.jsx)(c.x7F,{}),(0,y.jsx)("span",{children:"\xdcbersicht"})]}),(0,y.jsx)(l.m_,{id:he,place:"top"})]})]})]}),(0,y.jsxs)("div",{className:"student-task-body",children:[(0,y.jsxs)("div",{className:"student-task-section",children:[(0,y.jsx)("div",{className:"student-task-section-title",children:"Aufgabe"}),(0,y.jsx)("div",{className:"student-task-section-content",children:(0,y.jsx)(p.A,{content:(null===(z=me.task)||void 0===z?void 0:z.description)||"\u2014"})})]}),"error"===Qe&&(Je||$e)&&(0,y.jsxs)("div",{className:"student-task-section is-warning",children:[(0,y.jsx)("div",{className:"student-task-section-title",children:"Feedback gemeldet"}),(0,y.jsxs)("div",{className:"student-task-section-content",children:[Je&&(0,y.jsxs)("div",{className:"student-task-feedback-reason",children:["Grund: ",Je]}),$e&&(0,y.jsx)("div",{className:"student-task-feedback-note",children:$e})]})]}),ue&&Re.length>0&&(0,y.jsxs)("div",{className:"student-task-section",children:[(0,y.jsx)("div",{className:"student-task-section-title",children:"Erkannt"}),(0,y.jsx)("div",{className:"student-task-section-content student-task-lines",children:Re.map((e,t)=>(0,y.jsx)("div",{className:"student-task-line",children:(0,y.jsx)(p.A,{content:qe(e)})},"line-".concat(t)))})]}),Ye||Ge?(0,y.jsx)(A,{taskId:null===(I=me.task)||void 0===I?void 0:I.id,studentId:null===(W=me.student)||void 0===W?void 0:W.id,finalSce
1ne:Ye?Ve:null}):"not-attempted"!==Qe?(0,y.jsxs)("div",{className:"student-task-section",children:[(0,y.jsx)("div",{className:"student-task-section-title",children:"Bearbeitung"}),(0,y.jsx)("div",{className:"student-task-section-content student-task-state-body",children:(0,y.jsx)(j.A,{exercise:me.task,taskState:Ze,size:"normal"})}),(Xe>1||et||tt>0)&&(0,y.jsxs)("div",{className:"student-task-type-stats student-task-type-stats--inline",children:[Xe>1&&(0,y.jsxs)("span",{className:"stat-chip",children:[Xe," Versuche"]}),et&&(0,y.jsx)("span",{className:"stat-chip",children:"Hinweis genutzt"}),tt>0&&(0,y.jsxs)("span",{className:"stat-chip",children:[tt," Pkt."]})]})]}):null,ze.length>0&&(0,y.jsxs)("div",{className:"student-task-section",children:[(0,y.jsx)("div",{className:"student-task-section-title",children:"Diagnostik"}),(0,y.jsx)("div",{className:"student-task-section-content student-task-diagnostic",children:ze.map(e=>(0,y.jsxs)("div",{className:"diagnostic-entry",children:[(0,y.jsx)("span",{className:"diagnostic-dot ".concat(e.is_correct?"is-correct":"is-wrong")}),(0,y.jsx)("span",{className:"diagnostic-text",children:e.diagnosis}),(0,y.jsx)("span",{className:"diagnostic-date",children:(0,h.Yq)(e.created_at)})]},e.id))})]})]})]})]})]})}),(0,y.jsx)(o.A,{isOpen:Ce,onClose:()=>Ee(!1),source:"other",userId:null===de||void 0===de?void 0:de.id,context:{role:"teacher",feature:"sheet_inline_work_beta",sheet_id:O.id},title:"Feedback zur Beta-Ansicht",prompt:"Wie findest du die Bearbeitungen direkt in den Aufgaben? Was hilft dir, was st\xf6rt?"}),ge&&(0,y.jsx)(P,{sheet:O,classStudents:ne,studentEntries:te,onClose:()=>be(!1),closeOnEscape:!me,onCellClick:e=>{let{student:t,task:s,session:n,progressEntry:a}=e;ve({student:t,task:s,session:n,progressEntry:a,sheetTitle:O.title})}}),xe&&(e=>{const t=(null===(e=xe.session)||void 0===e?void 0:e.tasks)||[],s=t.findIndex(e=>{var t;return e.id===(null===(t=xe.exercise)||void 0===t?void 0:t.id)});return(0,y.jsx)(u.A,{isOpen:!0,exercise:xe.exercise,session:xe.session,onClose:()=>pe(null),classStudents:ne,studentEntries:te,classTeachers:ae,teacherEntries:se,classId:ce,hasPrev:s>0,hasNext:s>=0&&s<t.length-1,onPrev:()=>s>0&&pe(e=>(0,n.A)((0,n.A)({},e),{},{exercise:t[s-1]})),onNext:()=>s<t.length-1&&pe(e=>(0,n.A)((0,n.A)({},e),{},{exercise:t[s+1]})),onCardClick:e=>{let{student:t,progressEntry:s,task:n,session:a}=e;const i="teacher"===(null===t||void 0===t?void 0:t.role)||"admin"===(null===t||void 0===t?void 0:t.role),l=s||(i?se:te).find(e=>e.student_id===t.id&&e.task_id===n.id)||null;ve({student:t,task:n,session:a,progressEntry:l,sheetTitle:O.title})}})})()]})}},2116(e,t,s){s.d(t,{A:()=>u});s(9950);var n=s(8287),a=s(418),i=s(2875),l=s(3922),r=s(4076),o=s(5674),c=s(4304),d=s(4414);const u=e=>{let{sheet:t,onSheetClicked:s,onSessionClick:u,actions:h=[],sessionProgress:m={},origin:v,originLabel:x,originDetail:p,alwaysShowActions:k=!1,dateLabel:j=null}=e;if(!t)return(0,d.jsx)("div",{className:"sheet-card empty",children:"No sheet data available"});return(0,d.jsxs)("div",{className:"sheet-card ".concat("draft"===t.status?"draft":""),style:{"--sheet-color":t.color||l.k},onClick:()=>{s&&s(t)},children:[(0,d.jsxs)("div",{className:"sheet-header",children:[(0,d.jsx)("div",{className:"sheet-title",children:t.title}),"draft"===t.status&&(0,d.jsxs)("span",{className:"sheet-status draft",children:[(0,d.jsx)(i.JhU,{className:"status-icon"}),(0,d.jsx)("span",{className:"draft-text",children:"Entwurf"})]}),(()=>{if(!x)return null;const e={teacher:(0,d.jsx)(i.$hd,{}),personal:(0,d.jsx)(i.T_n,{}),self:(0,d.jsx)(i.xvZ,{}),shared:(0,d.jsx)(i.AnD,{}),unknown:(0,d.jsx)(i.gZZ,{})};return(0,d.jsxs)("div",{className:"sheet-origin-badge origin-".concat(v||"unknown"),children:[(0,d.jsx)("div",{className:"sheet-origin-icon",children:e[v]||e.unknown}),(0,d.jsx)("span",{className:"sheet-origin-label",children:x})]})})()]}),(0,d.jsx)("div",{className:"sheet-content",children:(()=>{var e,s;if(null===t||void 0===t||null===(e=t.sessions)||void 0===e||!e.length)return null;const a=1===t.sessions.length&&t.title&&(null===(s=t.sessions[0])||void 0===s?void 0:s.name)&&t.title.trim()===t.sessions[0].name.trim();return t.sessions.map(e=>{var t;if(null===e||void 0===e||null===(t=e.tasks)||void 0===t||!t.length)return null;const s=m[e.id]||{},l=Object.values(s).some(e=>Array.isArray(e)&&e.length>0),c=(e=>{var t,s,n,a,i,l,r;if(null===e||void 0===e||null===(t=e.tasks)||void 0===t||!t.length)return!1;const o=m[e.id]||{},c=e.tasks.length,d=(null===(s=o.correct)||void 0===s?void 0:s.length)||0,u=(null===(n=o.corrected)||void 0===n?void 0:n.length)||0,h=(null===(a=o.wrong)||void 0===a?void 0:a.length)||0,v=(null===(i=o.error)||void 0===i?void 0:i.length)||0,x=(null===(l=o.notAttempted)||void 0===l?void 0:l.length)||0,p=(null===(r=o.inWork)||void 0===r?void 0:r.length)||0;return d+u===c&&0===h+v+x+p})(e),h=e.tasks||[],v=(0,r.sQ)(h);return(0,d.jsxs)("div",{className:"session-preview ".concat(c?"complete":""),onClick:t=>{t.stopPropagation(),u&&u(e.id)},children:[!a&&(0,d.jsxs)("div",{className:"session-name",children:[e.name,c&&(0,d.jsx)(i.CMH,{className:"complete-icon"})]}),(0,d.jsx)("div",{className:"session-summary",children:(0,d.jsx)(o.A,{entr
1ies:v})}),(0,d.jsx)("div",{className:"exercise-preview","aria-hidden":"true"}),l&&(0,d.jsx)("div",{className:"session-progress",children:(0,d.jsx)(n.A,{progress:s})})]},e.id)}).filter(Boolean)})()}),(j||t.time_estimate)&&(0,d.jsxs)("div",{className:"sheet-card-footer",children:[t.time_estimate&&(0,d.jsx)("span",{className:"footer-time",children:(0,a.fU)(t.time_estimate)}),j&&(0,d.jsx)("span",{className:"footer-date",children:j})]}),h.length>0&&(0,d.jsxs)("div",{className:"sheet-actions ".concat(k?"show-always":""),children:[h.map((e,s)=>(0,d.jsx)("button",{className:"".concat(e.className||""),"data-tooltip-id":"exercise-card-tooltip","data-tooltip-content":e.title,"data-tooltip-place":"top",onClick:s=>{s.stopPropagation(),e.onClick(t)},children:e.icon},s)),(0,d.jsx)(c.m_,{id:"exercise-card-tooltip",place:"top",positionStrategy:"fixed",delayShow:400})]})]},t.id)}},3325(e,t,s){s.d(t,{A:()=>o});var n=s(9379),a=s(9950),i=s(2875),l=s(486),r=s(4414);const o=e=>{let{isOpen:t,onClose:s,source:o="profile_menu",userId:c=null,context:d=null,title:u="Dein Feedback",prompt:h="Was l\xe4uft gut, was fehlt dir, was st\xf6rt dich?",withRating:m=!1}=e;const[v,x]=(0,a.useState)(""),[p,k]=(0,a.useState)(null),[j,g]=(0,a.useState)("idle"),b=(0,a.useRef)(null);if((0,a.useEffect)(()=>{t&&(x(""),k(null),g("idle"))},[t]),(0,a.useEffect)(()=>{t&&b.current&&b.current.focus()},[t]),(0,a.useEffect)(()=>{if(!t)return;const e=e=>{"Escape"===e.key&&s()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t,s]),!t)return null;const f=v.trim().length>0||null!==p;return(0,r.jsx)("div",{className:"feedback-modal-overlay",onClick:s,children:(0,r.jsxs)("div",{className:"feedback-modal",role:"dialog","aria-modal":"true","aria-label":u,onClick:e=>e.stopPropagation(),children:[(0,r.jsx)("button",{className:"feedback-close",onClick:s,"aria-label":"Schlie\xdfen",children:(0,r.jsx)(i.QCr,{})}),"sent"===j?(0,r.jsxs)("div",{className:"feedback-thanks",children:[(0,r.jsx)("span",{className:"feedback-thanks__icon",children:"\u2705"}),(0,r.jsx)("p",{children:"Danke! Dein Feedback ist angekommen."})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h3",{className:"feedback-title",children:u}),(0,r.jsx)("p",{className:"feedback-prompt",children:h}),m&&(0,r.jsx)("div",{className:"feedback-rating",role:"radiogroup","aria-label":"Bewertung",children:[1,2,3,4,5].map(e=>(0,r.jsx)("button",{type:"button",role:"radio","aria-checked":p===e,"aria-label":"".concat(e," von 5"),className:"feedback-star ".concat(null!==p&&e<=p?"filled":""),onClick:()=>k(e===p?null:e),children:(0,r.jsx)(i.gt3,{})},e))}),(0,r.jsx)("textarea",{ref:b,className:"feedback-textarea",value:v,onChange:e=>x(e.target.value),placeholder:"Schreib einfach frei heraus \u2026",maxLength:4e3,rows:5}),"error"===j&&(0,r.jsx)("p",{className:"feedback-error",children:"Das hat leider nicht geklappt. Bitte versuch es sp\xe4ter noch einmal."}),(0,r.jsxs)("div",{className:"feedback-actions",children:[(0,r.jsx)("button",{className:"feedback-cancel",onClick:s,children:"Nicht jetzt"}),(0,r.jsxs)("button",{className:"feedback-submit",onClick:async()=>{if(f&&"sending"!==j){g("sending");try{await(0,l.Wzw)({message:v.trim()||null,rating:p,source:o,user_id:c||null,context:(0,n.A)((0,n.A)({},d||{}),{},{path:window.location.pathname})}),g("sent"),setTimeout(s,1400)}catch(e){g("error")}}},disabled:!f||"sending"===j,children:[(0,r.jsx)(i.Cer,{}),"sending"===j?"Senden \u2026":"Absenden"]})]})]})]})})}},3922(e,t,s){function n(){const e=Math.round(75*Math.random())+180,t=Math.round(75*Math.random())+180,s=Math.round(75*Math.random())+180,n=Math.round(.8*e+51),a=Math.round(.8*t+51),i=Math.round(.8*s+51);return"#".concat(((1<<24)+(n<<16)+(a<<8)+i).toString(16).slice(1))}s.d(t,{O:()=>n,k:()=>a});const a="#d4c4fb"},6368(){},8287(e,t,s){s.d(t,{A:()=>r});var n=s(9950),a=s(7818),i=s(4304),l=s(4414);const r=e=>{let{progress:t={}}=e;const{t:s}=(0,a.Bd)("exercises"),r=(0,n.useId)(),o={correct:t.correct||[],corrected:t.corrected||[],wrong:t.wrong||[],notAttempted:t.notAttempted||[],inWork:t.inWork||[],error:t.error||[]},c=Object.values(o).reduce((e,t)=>
1e+t.length,0),d=e=>c>0?Math.round(e/c*100):0;return(0,l.jsx)("div",{className:"progress-summary",children:(0,l.jsxs)("div",{className:"progress-container",children:[(0,l.jsxs)("div",{className:"progress-bar",children:[o.correct.length>0&&(0,l.jsx)("div",{className:"progress-segment correct",style:{width:"".concat(d(o.correct.length),"%")},"data-tooltip-id":r,"data-tooltip-content":s("exercise.progress.firstTry",{count:o.correct.length})}),o.corrected.length>0&&(0,l.jsx)("div",{className:"progress-segment corrected",style:{width:"".concat(d(o.corrected.length),"%")},"data-tooltip-id":r,"data-tooltip-content":s("exercise.progress.corrected",{count:o.corrected.length})}),o.wrong.length>0&&(0,l.jsx)("div",{className:"progress-segment wrong",style:{width:"".concat(d(o.wrong.length),"%")},"data-tooltip-id":r,"data-tooltip-content":s("exercise.progress.wrong",{count:o.wrong.length})}),o.inWork.length>0&&(0,l.jsx)("div",{className:"progress-segment in-work",style:{width:"".concat(d(o.inWork.length),"%")},"data-tooltip-id":r,"data-tooltip-content":s("exercise.progress.inWork",{count:o.inWork.length})}),o.error.length>0&&(0,l.jsx)("div",{className:"progress-segment error",style:{width:"".concat(d(o.error.length),"%")},"data-tooltip-id":r,"data-tooltip-content":s("exercise.progress.error",{count:o.error.length})}),o.notAttempted.length>0&&(0,l.jsx)("div",{className:"progress-segment not-attempted",style:{width:"".concat(d(o.notAttempted.length),"%")},"data-tooltip-id":r,"data-tooltip-content":s("exercise.progress.notAttempted",{count:o.notAttempted.length})})]}),(0,l.jsx)(i.m_,{id:r,place:"top",effect:"solid",className:"progress-tooltip",clickable:!0})]})})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.