PageSourceSearch

https://livinglines.app/static/js/3473.491dd70f.chunk.js

js livinglines.app collected 2026-10-07 13:36:55 UTC 26,742 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkranking=self.webpackChunkranking||[]).push([[3473],{393(e,s,l){l.d(s,{D:()=>a});function a(e){return Array.isArray(e)&&e.length?e.map((e,s)=>{var l;const a=e.x,n=e.y;if(!Array.isArray(a)||!a.length||!Array.isArray(n)||!n.length)return null;const t=Math.min(a.length,n.length),i=80*a[0],r=80*n[0],c=[];for(let h=0;h<t;h++)c.push([80*a[h]-i,80*n[h]-r]);const o=c.map(e=>e[0]),d=c.map(e=>e[1]),m=Math.max(...o)-Math.min(...o),u=Math.max(...d)-Math.min(...d);return{id:String(e.id||s),type:"freedraw",x:i,y:r,width:m,height:u,angle:0,strokeColor:"#1e1e1e",backgroundColor:"transparent",fillStyle:"solid",strokeWidth:1,strokeStyle:"solid",roughness:1,roundness:null,opacity:100,points:c,pressures:new Array(t).fill(.5),simulatePressure:!1,lastCommittedPoint:null!==(l=c[c.length-1])&&void 0!==l?l:null,version:1,versionNonce:s,seed:s,isDeleted:!1,groupIds:[],frameId:null,boundElements:[],updated:1,link:null,locked:!1}}).filter(Boolean):[]}},2265(e,s,l){l.r(s),l.d(s,{default:()=>S});var a=l(9379),n=l(9950),t=l(6577),i=l(4577),r=l(5887),c=l(2875),o=l(9613),d=l(2735),m=l(7901),u=(l(3565),l(4414));const h=e=>{let{textbooks:s,activeTextbook:l,onSelectTextbook:a,onCreateTextbook:t,onDeleteTextbook:i,storageKey:r="selectedTextbookId"}=e;const[h,p]=(0,n.useState)(!1),[x,b]=(0,n.useState)(""),[_,j]=(0,n.useState)(null),[v,g]=(0,n.useState)(!1),[N]=(0,n.useState)(window.innerWidth<768),f=(0,n.useRef)(!1);(0,n.useEffect)(()=>{if(s.length)if(f.current)l&&(0,m.ni)(r,l.id);else{const e=(0,m.$E)(r),n=s.find(s=>s.id===e)||s[0];l&&l.id===n.id||a(n),f.current=!0}},[s,l,a,r]),(0,n.useEffect)(()=>{l&&!h&&g(!0)},[l,h]);const k=()=>{x.trim()&&(t(x.trim()),b(""),p(!1))},y=e=>{const s=(0,o.gn)(d,{seed:e,size:80,scale:80,radius:10,backgroundColor:["d1d4f9"],backgroundType:["gradientLinear"],backgroundRotation:[0,360],color:["c0aede","d1d4f9","b6e3f4","ffd5dc","ffdfbf"]}).toString();return"data:image/svg+xml;utf8,".concat(encodeURIComponent(s))};return N?(0,u.jsxs)("div",{className:"mobile-classes-container",children:[(0,u.jsxs)("div",{className:"mobile-classes-scroller",children:[s.map(e=>(0,u.jsxs)("button",{className:"mobile-class-item ".concat((null===l||void 0===l?void 0:l.id)===e.id?"active":""),onClick:()=>a(e),children:[(0,u.jsx)("img",{src:y(e.title),className:"mobile-class-avatar",alt:e.title}),(0,u.jsx)("span",{className:"mobile-class-name",children:e.title})]},e.id)),(0,u.jsx)("button",{className:"mobile-add-class",onClick:()=>p(!0),children:(0,u.jsx)(c.OiG,{})})]}),h&&(0,u.jsx)("div",{className:"mobile-create-modal",children:(0,u.jsxs)("div",{className:"modal-content",children:[(0,u.jsx)("button",{className:"close-modal",onClick:()=>p(!1),children:(0,u.jsx)(c.QCr,{})}),(0,u.jsx)("h3",{children:"Neues Lehrwerk erstellen"}),(0,u.jsx)("input",{type:"text",value:x,onChange:e=>b(e.target.value),placeholder:"Titel (z. B. Mathematik 7)",autoFocus:!0,maxLength:40}),(0,u.jsx)("button",{className:"create-button",onClick:k,disabled:!x.trim(),children:"Erstellen"})]})})]}):(0,u.jsxs)("div",{className:"classes-sidebar ".concat(v?"collapsed":""),children:[(0,u.jsxs)("div",{className:"sidebar-header",children:[!v&&(0,u.jsx)("h2",{children:"Lehrwerke"}),(0,u.jsx)("button",{className:"collapse-button",onClick:()=>g(e=>!e),"aria-label":v?"Aufklappen":"Einklappen",children:v?(0,u.jsx)(c.X6T,{}):(0,u.jsx)(c._Jj,{})})]}),(0,u.jsxs)("div",{className:"class-list-container",children:[s.map(e=>(0,u.jsxs)("div",{className:"class-card ".concat((null===l||void 0===l?void 0:l.id)===e.id?"active":""),onClick:()=>a(e),children:[(0,u.jsx)("img",{src:y(e.title),className:"class-avatar",alt:e.title}),(0,u.jsxs)("div",{className:"class-content",children:[(0,u.jsx)("h3",{className:"class-name",children:e.title}),!v&&(0,u.jsx)("div",{className:"class-actions",children:(0,u.jsx)("button",{className:"delete-class-button",onClick:s=>{s.stopPropagation(),j(e)},children:(0,u.jsx)(c.qbC,{})})})]})]},e.id)),!v&&(h?(0,u.jsxs)("div",{className:"class-card creating",children:[(0,u.jsx)("button",{className:"close-create-button",onClick:()=>p(!1),"aria-label":"Abbrechen",children:(0,u.jsx)(c.QCr,{size:12})}),(0,u.jsxs)("form",{className:"class-content",onSubmit:e=>{e.preventDefault(),k()},children:[(0,u.jsx)("div",{className:"class-avatar",onClick:k,"aria-label":"Erstellen",children:(0,u.jsx)(c.OiG,{})}),(0,u.jsx)("input",{type:"text",value:x,onChange:e=>b(e.target.value),placeholder:"Titel (z. B. Mathematik 7)",autoF
1ocus:!0,maxLength:40})]})]}):(0,u.jsxs)("button",{className:"new-class-button",onClick:()=>p(!0),children:[(0,u.jsx)(c.OiG,{})," Neues Lehrwerk"]}))]}),_&&(0,u.jsx)("div",{className:"delete-confirmation-modal",children:(0,u.jsxs)("div",{className:"modal-content",children:[(0,u.jsxs)("h3",{children:["\u201e",_.title,'" l\xf6schen?']}),(0,u.jsxs)("div",{className:"modal-actions",children:[(0,u.jsx)("button",{className:"cancel-delete",onClick:()=>j(null),children:"Abbrechen"}),(0,u.jsx)("button",{className:"confirm-delete",onClick:()=>{i(_.id),j(null)},children:"L\xf6schen"})]})]})})]})};var p=l(9163),x=l(2994),b=l(757);const _=e=>{let{activeTextbook:s,publisherId:l}=e;const a=(0,x.Zp)(),[t,o]=(0,n.useState)(null),[d,m]=(0,n.useState)(!1),[h,_]=(0,n.useState)(!1),j=(0,n.useRef)(null),v=()=>{null!==t&&void 0!==t&&t.url&&(navigator.clipboard.writeText(t.url),_(!0),r.Ay.success("Link kopiert"),setTimeout(()=>_(!1),2e3))};return s?(0,u.jsxs)("div",{className:"textbook-details",children:[(0,u.jsxs)("div",{className:"textbook-details__header",children:[(0,u.jsx)("h2",{className:"textbook-details__title",children:s.title}),s.description&&(0,u.jsx)("p",{className:"textbook-details__desc",children:s.description})]}),(0,u.jsx)(b.A,{classId:null,textbookId:s.id,teacherId:l,mode:"publisher",onPublishSheet:async e=>{try{const s=await(0,i.Pu)(e.id);o({url:s.url,token:s.public_token}),m(!1),_(!1)}catch(s){r.Ay.error("Fehler beim Erstellen des Links.")}},onTestPublisherSheet:async e=>{try{var s;const l=null!==(s=e.public_token)&&void 0!==s?s:(await(0,i.Pu)(e.id)).public_token;a("/s/".concat(l,"?from=publisher"))}catch(l){r.Ay.error("Fehler beim \xd6ffnen der Sch\xfcleransicht.")}}}),t&&(0,u.jsx)("div",{className:"publish-modal-overlay",onClick:()=>o(null),children:(0,u.jsxs)("div",{className:"publish-modal",onClick:e=>e.stopPropagation(),children:[(0,u.jsx)("button",{className:"publish-modal__close",onClick:()=>o(null),children:(0,u.jsx)(c.QCr,{})}),(0,u.jsx)("h3",{className:"publish-modal__title",children:"\xdcbungsblatt teilen"}),(0,u.jsx)("p",{className:"publish-modal__subtitle",children:"Sch\xfcler k\xf6nnen diesen Link oder QR-Code direkt aufrufen."}),(0,u.jsxs)("div",{className:"publish-modal__link-row",children:[(0,u.jsx)("span",{className:"publish-modal__url",children:t.url}),(0,u.jsx)("button",{className:"publish-modal__copy ".concat(h?"publish-modal__copy--done":""),onClick:v,children:h?(0,u.jsx)(c.CMH,{}):(0,u.jsx)(c.paH,{})})]}),(0,u.jsxs)("div",{className:"publish-modal__actions",children:[(0,u.jsxs)("button",{className:"publish-modal__qr-toggle",onClick:()=>m(e=>!e),children:[(0,u.jsx)(c.Acq,{})," QR-Code ",d?"ausblenden":"anzeigen"]}),(0,u.jsxs)("button",{className:"publish-modal__share-btn",onClick:v,children:[(0,u.jsx)(c.AnD,{})," Link kopieren"]})]}),d&&(0,u.jsxs)("div",{className:"publish-modal__qr",children:[(0,u.jsx)("div",{ref:j,children:(0,u.jsx)(p.X,{value:t.url,size:200})}),(0,u.jsxs)("div",{className:"publish-modal__qr-footer",children:[(0,u.jsx)("p",{className:"publish-modal__qr-hint",children:"Mit der Kamera-App scannen"}),(0,u.jsxs)("button",{className:"publish-modal__qr-download",onClick:()=>{var e;const s=null===(e=j.current)||void 0===e?void 0:e.querySelector("canvas");if(!s)return;const l=document.createElement("a");l.href=s.toDataURL("image/png"),l.download="qr-".concat(t.token,".png"),l.click()},children:[(0,u.jsx)(c.WCW,{})," PNG herunterladen"]})]})]})]})})]}):(0,u.jsx)("div",{className:"textbook-details textbook-details--empty",children:(0,u.jsx)("p",{children:"W\xe4hle oder erstelle ein Lehrwerk"})})};var j=l(8327);function v(e){let{isOpen:s,onClose:l,publisher:t,currentUser:o}=e;
1const[d,m]=(0,n.useState)([]),[h,p]=(0,n.useState)(!1),[x,b]=(0,n.useState)(!1),[_,v]=(0,n.useState)(null),[g,N]=(0,n.useState)(""),[f,k]=(0,n.useState)([]),[y,C]=(0,n.useState)(!1),[w,S]=(0,n.useState)([]),[A,L]=(0,n.useState)("editor"),E=t.id,T=o.id,M=async()=>{p(!0);try{const e=await(0,i.SK)(E,T);m(e)}catch(e){r.Ay.error("Mitarbeitende konnten nicht geladen werden")}finally{p(!1)}};(0,n.useEffect)(()=>{s&&M()},[s,E]),(0,n.useEffect)(()=>{if(!x)return N(""),k([]),void S([]);if(g.trim().length<2)return void k([]);C(!0);const e=setTimeout(async()=>{try{const e=await(0,i.nW)(E,g,T);k(Array.isArray(e)?e:[])}catch(e){k([])}finally{C(!1)}},250);return()=>clearTimeout(e)},[g,x]);const P=e=>d.some(s=>s.user_id===e);if(!s)return null;const R=f.filter(e=>!P(e.id)),z=f.filter(e=>P(e.id));return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:"mp-overlay",onClick:l,children:(0,u.jsxs)("div",{className:"mp-modal",onClick:e=>e.stopPropagation(),children:[(0,u.jsxs)("div",{className:"mp-modal__header",children:[(0,u.jsx)("h3",{children:"Mitarbeitende"}),(0,u.jsxs)("div",{className:"mp-modal__header-actions",children:[(0,u.jsxs)("button",{className:"mp__add-btn",onClick:()=>b(!0),children:[(0,u.jsx)(c.NPy,{})," Hinzuf\xfcgen"]}),(0,u.jsx)("button",{className:"mp-modal__close",onClick:l,"aria-label":"Schlie\xdfen",children:(0,u.jsx)(c.QCr,{})})]})]}),(0,u.jsxs)("div",{className:"mp-modal__body",children:[h&&(0,u.jsx)("p",{className:"mp__hint",children:"Wird geladen..."}),!h&&0===d.length&&(0,u.jsx)("p",{className:"mp__hint",children:"Keine Mitarbeitenden gefunden."}),d.length>0&&(0,u.jsx)("div",{className:"mp__list",children:d.map(e=>(0,u.jsxs)("div",{className:"mp__item",children:[(0,u.jsx)(j.A,{seed:e.avatar_seed||e.email,size:32}),(0,u.jsxs)("div",{className:"mp__info",children:[(0,u.jsxs)("span",{className:"mp__name",children:[e.name||"\u2014",e.user_id===T&&" (Ich)"]}),(0,u.jsx)("span",{className:"mp__email",children:e.email||"\u2014"})]}),(0,u.jsxs)("div",{className:"mp__actions",children:[(0,u.jsxs)("label",{className:"mp__role-toggle",children:[(0,u.jsx)("input",{type:"checkbox",checked:"admin"===e.role,onChange:()=>(async e=>{if(e.user_id===T)return;const s="admin"===e.role?"editor":"admin",l=r.Ay.loading("Rolle wird aktualisiert...");try{await(0,i.Mk)(E,e.user_id,s,T),r.Ay.success("Rolle aktualisiert",{id:l}),m(l=>l.map(l=>l.user_id===e.user_id?(0,a.A)((0,a.A)({},l),{},{role:s}):l))}catch(n){r.Ay.error("Fehler beim Aktualisieren der Rolle",{id:l})}})(e),disabled:e.user_id===T}),(0,u.jsx)("span",{className:"mp__slider"}),(0,u.jsx)("span",{className:"mp__role-label",children:"admin"===e.role?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(c.SMR,{})," Admin"]}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(c.F7,{})," Editor"]})})]}),(0,u.jsx)("button",{className:"mp__remove-btn",onClick:()=>v(e),disabled:e.user_id===T,title:"Entfernen",children:(0,u.jsx)(c._qB,{})})]})]},e.user_id))})]})]})}),x&&(0,u.jsx)("div",{className:"mp-overlay mp-overlay--top",onClick:()=>b(!1),children:(0,u.jsxs)("div",{className:"mp-modal mp-modal--sm",onClick:e=>e.stopPropagation(),children:[(0,u.jsxs)("div",{className:"mp-modal__header",children:[(0,u.jsxs)("h3",{children:[(0,u.jsx)(c.NPy,{})," Mitarbeitende hinzuf\xfcgen"]}),(0,u.jsx)("button",{className:"mp-modal__close",onClick:()=>b(!1),children:(0,u.jsx)(c.QCr,{})})]}),(0,u.jsxs)("div",{className:"mp-modal__body",children:[(0,u.jsx)("label",{className:"mp-modal__label",children:"Rolle"}),(0,u.jsxs)("div",{className:"mp-modal__role-row",children:[(0,u.jsxs)("button",{className:"mp-modal__role-btn ".concat("editor"===A?"active":""),onClick:()=>L("editor"),children:[(0,u.jsx)(c.F7,{})," Editor"]}),(0,u.jsxs)("button",{className:"mp-modal__role-btn ".concat("admin"===A?"active":""),onClick:()=>L("admin"),children:[(0,u.jsx)(c.SMR,{})," Admin"]})]}),(0,u.jsx)("label",{className:"mp-modal__label",children:"Account-Suche"}),(0,u.jsx)("input",{className:"mp-modal__input",type:"text",placeholder:"Name oder E-Mail eingeben",value:g,onChange:e=>N(e.target.value),autoFocus:!0}),y&&(0,u.jsx)("p",{className:"mp__hint",children:"Suche..."}),g.trim().length>=2&&!y&&(0,u.jsxs)("div",{className:"mp-modal__suggestions",children:[0===R.length&&0===z.length&&(0,u.jsx)("p",{className:"mp__hint mp__hint--padded",children:"Keine Accounts gefunden."}),[...R,...z].map(e=>{const s=P(e.id),l=(a=e.id,w.some(e=>e.id===a));var a;return(0,u.jsxs)("button",{className:"mp-modal__suggestion ".concat(l?"selected":""," ").concat(s?"disabled":""),disabled:s,onClick:()=>{s||S(l?w.filter(s=>s.id!==e.id):[...w,e])},children:[(0,u.jsx)(j.A,{seed:e.avatar_seed||e.email,size:26}),(0,u.jsxs)("span",{className:"mp-modal__sug-info",children:[(0,u.jsx)("span",{className:"mp-modal__sug-name",children:e.name||"\u2014"}),(0,u.jsx)("span",{className:"mp-modal__sug-email",children:e.email||"\u2014"})]}),s&&(0,u.jsx)("span",{className:"mp-modal__sug-note",children:"bereits Mitglied"})]},e.id)})]}),w.length>0&&(0,u.jsx)("div",{className:"mp-modal__chips",children:w.map(e=>(0,u.jsxs)("button",{className:"mp-modal__chip",onClick:()=>S(w.filter(s=>s.id!==e.id)),children:[(0,u.jsx)(j.A,{seed:e.avatar_seed||e.email,size:18}),e.name||e.email," ",(0,u.jsx)("span",{children:"\xd7"})]},e.id))})]}),(0,u.jsxs)("div",{className:"mp-modal__footer",children:[(0,u.jsx)("button",{className:"mp-modal__cancel",onClick:()=>b(!1),children:"Abbrechen"}),(0,u.jsxs)("button",{className:"mp-modal__confirm",onClick:async()=>
1{if(0===w.length)return void r.Ay.error("Bitte mindestens einen Account ausw\xe4hlen");const e=r.Ay.loading("Mitarbeitende werden hinzugef\xfcgt..."),s=await Promise.allSettled(w.map(e=>(0,i.yR)(E,e.id,A,T)));r.Ay.dismiss(e);const l=s.filter(e=>"fulfilled"===e.status).length,a=s.length-l;l>0&&r.Ay.success("".concat(l," Mitarbeitende hinzugef\xfcgt")),a>0&&r.Ay.error("".concat(a," konnten nicht hinzugef\xfcgt werden")),l>0&&(b(!1),M())},disabled:0===w.length,children:[(0,u.jsx)(c.NPy,{})," Hinzuf\xfcgen",w.length>0?" (".concat(w.length,")"):""]})]})]})}),_&&(0,u.jsx)("div",{className:"mp-overlay mp-overlay--top",onClick:()=>v(null),children:(0,u.jsxs)("div",{className:"mp-modal mp-modal--xs",onClick:e=>e.stopPropagation(),children:[(0,u.jsxs)("div",{className:"mp-modal__header",children:[(0,u.jsx)("h3",{children:"Mitarbeitende/n entfernen"}),(0,u.jsx)("button",{className:"mp-modal__close",onClick:()=>v(null),children:(0,u.jsx)(c.QCr,{})})]}),(0,u.jsxs)("p",{className:"mp-modal__confirm-text",children:["Soll ",(0,u.jsx)("strong",{children:_.name||_.email})," aus dem Verlag entfernt werden?"]}),(0,u.jsxs)("div",{className:"mp-modal__footer",children:[(0,u.jsx)("button",{className:"mp-modal__cancel",onClick:()=>v(null),children:"Abbrechen"}),(0,u.jsx)("button",{className:"mp-modal__danger",onClick:async()=>{if(!_)return;const e=r.Ay.loading("".concat(_.name||"Mitarbeitende/r"," wird entfernt..."));try{await(0,i.xS)(E,_.user_id,T),r.Ay.success("Mitarbeitende/r entfernt",{id:e}),m(e=>e.filter(e=>e.user_id!==_.user_id))}catch(s){r.Ay.error("Fehler beim Entfernen",{id:e})}finally{v(null)}},children:"Entfernen"})]})]})})]})}var g=l(1946);function N(e){return e.replace(/<script[\s\S]*?<\/script>/gi,"").replace(/\son\w+="[^"]*"/gi,"")}function f(e){let{isOpen:s,publisherId:l,onClose:a}=e;const[t,r]=(0,n.useState)(""),[o,d]=(0,n.useState)("#4f46e5"),[m,h]=(0,n.useState)("#6d28d9"),[p,x]=(0,n.useState)(!1),[b,_]=(0,n.useState)(!1),[j,v]=(0,n.use
1State)(!1),g=(0,n.useRef)(null);if((0,n.useEffect)(()=>{s&&l&&!b&&(0,i.UT)(l).then(e=>{e.logo_svg&&r(e.logo_svg),e.primary_color&&d(e.primary_color),e.secondary_color&&h(e.secondary_color),_(!0)}).catch(()=>_(!0))},[s,l,b]),(0,n.useEffect)(()=>{s||_(!1)},[s]),!s)return null;const f=e=>{if(!e||"image/svg+xml"!==e.type)return;const s=new FileReader;s.onload=e=>r(N(e.target.result)),s.readAsText(e)},k=t.trim()?N(t.trim()):null;return(0,u.jsx)("div",{className:"bm-overlay",onClick:a,children:(0,u.jsxs)("div",{className:"bm",onClick:e=>e.stopPropagation(),children:[(0,u.jsxs)("header",{className:"bm__header",children:[(0,u.jsxs)("div",{className:"bm__title-row",children:[(0,u.jsx)(c.lV_,{className:"bm__title-icon"}),(0,u.jsx)("h2",{className:"bm__title",children:"Branding"})]}),(0,u.jsx)("button",{className:"bm__close",onClick:a,"aria-label":"Schlie\xdfen",children:(0,u.jsx)(c.QCr,{})})]}),(0,u.jsxs)("div",{className:"bm__body",children:[(0,u.jsxs)("section",{className:"bm__section",children:[(0,u.jsx)("label",{className:"bm__label",children:"Logo"}),(0,u.jsxs)("div",{className:"bm__logo-row",children:[(0,u.jsxs)("div",{className:"bm__drop-zone".concat(j?" bm__drop-zone--over":""),onClick:()=>{var e;return null===(e=g.current)||void 0===e?void 0:e.click()},onDragOver:e=>{e.preventDefault(),v(!0)},onDragLeave:()=>v(!1),onDrop:e=>{e.preventDefault(),v(!1),f(e.dataTransfer.files[0])},children:[(0,u.jsx)(c.HVe,{className:"bm__drop-icon"}),(0,u.jsx)("span",{className:"bm__drop-text",children:"SVG hochladen"}),(0,u.jsx)("span",{className:"bm__drop-hint",children:"oder hierher ziehen"}),(0,u.jsx)("input",{ref:g,type:"file",accept:".svg,image/svg+xml",className:"bm__file-input",onChange:e=>f(e.target.files[0])})]}),(0,u.jsx)("div",{className:"bm__logo-preview",children:k?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:"bm__logo-preview__svg",dangerouslySetInnerHTML:{__html:k}}),(0,u.jsx)("button",{className:"bm__logo-remove",onClick:()=>r(""),title:"Entfernen",children:(0,u.jsx)(c.qbC,{})})]}):(0,u.jsx)("span",{className:"bm__logo-preview__empty",children:"Vorschau"})})]})]}),(0,u.jsxs)("section",{className:"bm__section",children:[(0,u.jsx)("label",{className:"bm__label",children:"Farben"}),(0,u.jsxs)("div",{className:"bm__colors-row",children:[(0,u.jsxs)("div",{className:"bm__color-item",children:[(0,u.jsx)("input",{type:"color",className:"bm__color-input",value:o,onChange:e=>d(e.target.value)}),(0,u.jsx)("span",{className:"bm__color-label",children:"Prim\xe4r"}),(0,u.jsx)("span",{className:"bm__color-hex",children:o})]}),(0,u.jsxs)("div",{className:"bm__color-item",children:[(0,u.jsx)("input",{type:"color",className:"bm__color-input",value:m,onChange:e=>h(e.target.value)}),(0,u.jsx)("span",{className:"bm__color-label",children:"Sekund\xe4r"}),(0,u.jsx)("span",{className:"bm__color-hex",children:m})]})]}),(0,u.jsx)("div",{className:"bm__color-preview",style:{background:"linear-gradient(135deg, ".concat(o," 0%, ").concat(m," 100%)")},children:(0,u.jsx)("span",{children:"Vorschau Hero-Gradient"})})]})]}),(0,u.jsxs)("footer",{className:"bm__footer",children:[(0,u.jsx)("button",{className:"bm__cancel",onClick:a,children:"Abbrechen"}),(0,u.jsx)("button",{className:"bm__save",onClick:async()=>{x(!0);try{await(0,i.Dr)(l,{logoSvg:t.trim()||null,primaryColor:o,secondaryColor:m}),a()}finally{x(!1)}},disabled:p,children:p?"Speichern\u2026":"Speichern"})]})]})})}function k(e){return function(e){const s=e.replace("#","").match(/.{2}/g).map(e=>{const s=parseInt(e,16)/255;return s<=.03928?s/12.92:((s+.055)/1.055)**2.4});return.2126*s[0]+.7152*s[1]+.0722*s[2]}(e)>.179?"#111827":"#ffffff"}const y=e=>{let{publisher:s,currentUser:l,memberRole:a,onShowMembers:r,onLogout:o}=e;
1const[d,m]=(0,n.useState)(!1),[h,p]=(0,n.useState)(!1),[b,_]=(0,n.useState)(!1),[v,N]=(0,n.useState)(null),[y,C]=(0,n.useState)(null),[w,S]=(0,n.useState)(null),A=(0,n.useRef)(null),{updateProfile:L}=(0,t.A)(),E=l||s,T=()=>{null!==s&&void 0!==s&&s.id&&(0,i.UT)(s.id).then(e=>{N(e.logo_svg||null),C(e.primary_color||null),S(e.secondary_color||null)}).catch(()=>{})};return(0,n.useEffect)(()=>{T()},[null===s||void 0===s?void 0:s.id]),(0,n.useEffect)(()=>{if(!b)return;const e=e=>{A.current&&!A.current.contains(e.target)&&_(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[b]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("header",{className:"publisher-header",style:y?{backgroundColor:y,color:k(y)}:{},children:[(0,u.jsx)("div",{className:"publisher-header__left",children:(0,u.jsx)(x.N_,{to:"/",className:"ll-logo-link","aria-label":"LivingLines Startseite",children:v?(0,u.jsx)("div",{className:"ll-logo--svg",dangerouslySetInnerHTML:{__html:v}}):(0,u.jsx)("div",{className:"ll-logo-circle",children:(0,u.jsx)("img",{src:"/logo192.png",alt:"LivingLines",className:"ll-logo"})})})}),(0,u.jsxs)("div",{className:"publisher-header__right",children:[(0,u.jsx)("span",{className:"publisher-badge",style:w?{backgroundColor:w,color:k(w),borderColor:"transparent"}:{},children:"Verlag"}),(0,u.jsxs)("div",{className:"avatar-area",ref:A,children:[(0,u.jsx)("button",{className:"avatar-button",onClick:()=>_(e=>!e),"aria-label":"Profil",children:(0,u.jsx)(j.A,{seed:E.avatar_seed,size:36})}),b&&(0,u.jsxs)("div",{className:"profile-dropdown",children:[(0,u.jsx)("div",{className:"dropdown-header",children:(0,u.jsxs)("div",{className:"dropdown-header__text",children:[(0,u.jsx)("p",{className:"dropdown-name",children:E.name}),E.email&&(0,u.jsx)("p",{className:"dropdown-email",children:E.email})]})}),(0,u.jsx)("div",{className:"dropdown-divider"}),"admin"===a&&(0,u.jsxs)("button",{className:"dropdown-item",onClick:()=>{null===r||void 0===r||r(),_(!1)},children:[(0,u.jsx)(c.YXz,{})," Mitarbeitende"]}),(0,u.jsxs)("button",{className:"dropdown-item",onClick:()=>{p(!0),_(!1)},children:[(0,u.jsx)(c.lV_,{})," Branding"]}),(0,u.jsxs)("button",{className:"dropdown-item",onClick:()=>{m(!0),_(!1)},children:[(0,u.jsx)(c.aBc,{})," Profil bearbeiten"]}),(0,u.jsxs)(x.N_,{to:"/teacher",className:"dropdown-item",onClick:()=>_(!1),children:[(0,u.jsx)(c.$hd,{})," Zur Lehreransicht"]}),(0,u.jsx)("div",{className:"dropdown-divider"}),(0,u.jsxs)("button",{className:"dropdown-item dropdown-item--danger",onClick:()=>{_(!1),o()},children:[(0,u.jsx)(c.axc,{})," Abmelden"]})]})]})]})]}),(0,u.jsx)(g.A,{isOpen:d,user:E,onClose:()=>m(!1),onSave:async e=>{"success"===(await L(e)).status&&m(!1)}}),(0,u.jsx)(f,{isOpen:h,publisherId:null===s||void 0===s?void 0:s.id,onClose:()=>{p(!1),T()}})]})},C=e=>{let{publisher:s,currentUser:l,memberRole:a,onLogout:t}=e;const[c,o]=(0,n.useState)([]),[d,p]=(0,n.useState)(null),[x,b]=(0,n.useState)(!1);(0,n.useEffect)(()=>{(async()=>{const e=r.Ay.loading("Lehrwerke werden geladen...");try{const l=await(0,i._l)(s.id);if(o(l),l.length>0){const e=(0,m.$E)("selectedTextbookId"),s=l.find(s=>s.id===e);p(s||l[0])}r.Ay.dismiss(e)}catch(l){r.Ay.error("Fehler beim Laden der Lehrwerke",{id:e})}})()},[s.id]);return(0,u.jsxs)("div",{className:"publisher-dashboard",children:[(0,u.jsx)(y,{publisher:s,currentUser:l,memberRole:a,onShowMembers:"admin"===a?()=>b(!0):null,onLogout:t}),(0,u.jsxs)("div",{className:"publisher-content",children:[(0,u.jsx)(h,{textbooks:c,activeTextbook:d,onSelectTextbook:e=>{p(e),(0,m.ni)("selectedTextbookId",e.id)},onCreateTextbook:async e=>{const l=r.Ay.loading("\u201e".concat(e,'" wird erstellt...'));try{const a=await(0,i.Jn)(s.id,e);o(e=>[...e,a]),p(a),r.Ay.success("Lehrwerk \u201e".concat(e,'" erstellt'),{id:l})}catch(a){r.Ay.error("Fehler beim Erstellen des Lehrwerks",{id:l})}},onDeleteTextbook:async e=>{const l=r.Ay.loading("Lehrwerk wird gel\xf6scht...");try{await(0,i.KC)(e,s.id);const a=c.filter(s=>s.id!==e);o(a),(null===d||void 0===d?void 0:d.id)===e&&p(a[0]||null),r.Ay.success("Lehrwerk gel\xf6scht",{id:l})}catch(a){r.Ay.error("Fehler beim L\xf6schen",{id:l})}}}),(0,u.jsx)(_,{activeTextbook:d,publisherId:s.id})]}),(0,u.jsx)(v,{isOpen:x,onClose:()=>b(!1),publisher:s,currentUser:l})]})};var w=l(3053);function S(){const{currentUser:e,handleLogout:s}
1=(0,t.A)(),[l,r]=(0,n.useState)(null),[c,o]=(0,n.useState)(null),[d,m]=(0,n.useState)(null);if((0,n.useEffect)(()=>{null!==e&&void 0!==e&&e.id&&(0,i.VR)(e.id).then(e=>{let{publisher:s,role:l}=e;r(s),o(l)}).catch(()=>m("Kein Verlag gefunden."))},[null===e||void 0===e?void 0:e.id]),d)return(0,u.jsx)("div",{style:{display:"flex",height:"100vh",alignItems:"center",justifyContent:"center",color:"#6b7280"},children:d});if(!l)return(0,u.jsx)("div",{style:{display:"flex",height:"100vh",alignItems:"center",justifyContent:"center"},children:(0,u.jsx)(w.A,{})});const h=(0,a.A)((0,a.A)({},l),{},{avatar_seed:e.avatar_seed,email:e.email});return(0,u.jsx)(C,{publisher:h,currentUser:e,memberRole:c,onLogout:s})}},4577(e,s,l){l.d(s,{Dr:()=>y,Jn:()=>v,KC:()=>g,Mk:()=>x,Pu:()=>N,SK:()=>h,UT:()=>k,VR:()=>u,_l:()=>j,iS:()=>f,nW:()=>_,xS:()=>b,yR:()=>p});var a=l(9379),n=l(486),t=l(7901);const i=()=>(0,n.Qqt)().httpUrl,r=()=>{const e=(0,t.$E)("token");return e?{Authorization:"Bearer ".concat(e)}:{}},c=e=>fetch("".concat(i()).concat(e)).then(async e=>{if(!e.ok)throw Object.assign(new Error(await e.text()),{status:e.status});return e.json()}),o=(e,s)=>fetch("".concat(i()).concat(e),{method:"POST",headers:(0,a.A)({"Content-Type":"application/json"},r()),body:JSON.stringify(s)}).then(async e=>{if(!e.ok)throw Object.assign(new Error(await e.text()),{status:e.status});return e.json()}),d=(e,s)=>fetch("".concat(i()).concat(e),{method:"PUT",headers:(0,a.A)({"Content-Type":"application/json"},r()),body:JSON.stringify(s)}).then(async e=>{if(!e.ok)throw Object.assign(new Error(await e.text()),{status:e.status});return e.json()}),m=e=>fetch("".concat(i()).concat(e),{method:"DELETE",headers:r()}).then(async e=>{if(!e.ok)throw Object.assign(new Error(await e.text()),{status:e.status});return e.json()}),u=e=>c("/publisher/me?user_id=".concat(e)),h=(e,s)=>c("/publisher/".concat(e,"/members?user_id=").concat(s)),p=(e,s,l,a)=>o("/publisher/".concat(e,"/members?user_id=").concat(a),{user_id:s,role:l}),x=(e,s,l,a)=>d("/publisher/".concat(e,"/members/").concat(s,"?user_id=").concat(a),{user_id:s,role:l}),b=(e,s,l)=>m("/publisher/".concat(e,"/members/").concat(s,"?user_id=").concat(l)),_=function(e,s,l){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10;if(!s||s.trim().length<2)return Promise.resolve([]);const n=new URLSearchParams({publisher_id:e,user_id:l,query:s.trim(),limit:String(a)});return c("/publisher/accounts/search?".concat(n))},j=e=>c("/publisher/textbooks?publisher_id=".concat(e)),v=function(e,s){return o("/publisher/textbooks",{publisher_id:e,title:s,description:arguments.length>2&&void 0!==arguments[2]?arguments[2]:null})},g=(e,s)=>m("/publisher/textbooks/".concat(e,"?publisher_id=").concat(s)),N=e=>o("/publisher/sheets/".concat(e,"/publish"),{}),f=e=>c("/s/".concat(e)),k=e=>c("/publisher/settings?publisher_id=".concat(e)),y=(e,s)=>{let{logoSvg:l,primaryColor:a,secondaryColor:n}=s;return d("/publisher/settings",{publisher_id:e,logo_svg:null!==l&&void 0!==l?l:null,primary_color:null!==a&&void 0!==a?a:null,secondary_color:null!==n&&void 0!==n?n:null})}}}]);

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.