PageSourceSearch

https://liberdamedia.de/assets/chunk-h2-B1ZCx7BI.js

js liberdamedia.de collected 2026-10-06 15:27:26 UTC 229,687 bytes, 1,245 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunk-h2-CXq5u8p7.js","assets/app-h2-CaMDwLtx.js","assets/asset-h2-D2ICURTh.css","assets/chunk-h2-zbiB7OA4.js","assets/chunk-h2-C-_Lf-Vr.js","assets/chunk-h2-DFANrooV.js","assets/chunk-h2-DItr2wol.js","assets/chunk-h2-4fto3uHG.js","assets/chunk-h2-DtAWvrZ8.js","assets/chunk-h2-BUFQVpEH.js","assets/chunk-h2-DQ3Rezfs.js","assets/chunk-h2-BbiqXcli.js","assets/chunk-h2-tL4rpmNv.js","assets/chunk-h2-0ZZTf1TM.js","assets/chunk-h2-Co7KlMgj.js","assets/chunk-h2-B85UIU1G.js","assets/chunk-h2-BfWem0Iu.js","assets/chunk-h2-uNE4VCd8.js","assets/chunk-h2-CYJaTVvb.js","assets/chunk-h2-86TbWscO.js","assets/chunk-h2-YL9Fg1_1.js","assets/chunk-h2-BYJfVZjl.js","assets/chunk-h2-BChkfxf1.js","assets/chunk-h2-BfPIzGjB.js","assets/chunk-h2-BVr1rs5q.js","assets/chunk-h2-BJ2Z-M58.js","assets/chunk-h2-t36DQXcU.js","assets/chunk-h2-BnlG2grR.js","assets/chunk-h2-VgFbgV8D.js","assets/asset-h2-xdpd7k7M.css","assets/chunk-h2-BTduS5Rh.js","assets/chunk-h2-CX-3Nm72.js","assets/chunk-h2-B7hveERD.js","assets/chunk-h2-CcmbjmSj.js","assets/chunk-h2-DeNHcAD4.js","assets/asset-h2-tReiEzqy.css","assets/chunk-h2-C_HEmSgO.js","assets/chunk-h2-G4U56Vgv.js","assets/chunk-h2-C7Wa-1FM.js","assets/chunk-h2-DleuWAXj.js","assets/chunk-h2-l1t1zFEz.js","assets/chunk-h2-C04bTt4H.js","assets/chunk-h2-DCADjnpI.js","assets/chunk-h2-DJi0WWXe.js","assets/chunk-h2-CIpe016p.js","assets/chunk-h2-DjKsMVvs.js","assets/chunk-h2-D6cgktSm.js","assets/chunk-h2-BkdPFeEG.js","assets/chunk-h2-DnOzX2Lt.js","assets/chunk-h2-BIA8scch.js","assets/chunk-h2-eGXKevlS.js","assets/chunk-h2-C7CUFV-A.js","assets/chunk-h2-Dvh5WSaK.js","assets/chunk-h2-Bof9GlKE.js","assets/chunk-h2-BSgWmPDF.js","assets/chunk-h2-Dsn45ySM.js","assets/asset-h2-n52jnmu1.css","assets/chunk-h2-CBQcCsu_.js","assets/chunk-h2-8gexJsUN.js","assets/chunk-h2-BOoWBfXN.js","assets/chunk-h2-CUs_SD2O.js","assets/chunk-h2-DrWfk_ua.js","assets/chunk-h2-D3CexasR.js","assets/chunk-h2-DfSSh66O.js","assets/chunk-h2-DvYfw_xT.js","assets/chunk-h2-C_rAmcgi.js","assets/asset-h2-BTo8hBjM.css"])))=>i.map(i=>d[i]);
2import{r as a,A as C,a as A,j as e,k as Rn,f as Cs,u as Ms,e as Es,h as Ts,_ as Ur}from"./app-h2-CaMDwLtx.js";import{H as Ps,C as As,d as Bs}from"./chunk-h2-BnlG2grR.js";import{a as Ks}from"./chunk-h2-CX-3Nm72.js";import{a as Mt}from"./chunk-h2-t36DQXcU.js";import{Z as Sr}from"./chunk-h2-DLZPHKGO.js";import{z as Pn,a as Dr,b as Ls,C as Hr}from"./chunk-h2-CE-Z5hGM.js";import"./chunk-h2-VgFbgV8D.js";import"./chunk-h2-BJ2Z-M58.js";import"./chunk-h2-BTduS5Rh.js";import"./chunk-h2-B7hveERD.js";import"./chunk-h2-DFANrooV.js";import"./chunk-h2-CcmbjmSj.js";import"./chunk-h2-DeNHcAD4.js";const Is=25*1024*1024,Cr={jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png"};function Zr(r){var m;const i=((m=r.name.split(".").pop())==null?void 0:m.toLowerCase())||"";if(!Cr[i])throw new Error("Bitte JPG oder PNG auswählen.");if(!r.size)throw new Error("Die Datei ist leer.");if(r.size>Is)throw new Error("Das Bild ist größer als 25 MB.");return Cr[i]}function Fs(r){return Array.from(r).includes("Files")}function Os(r,i,m){const f=Zr(r);return new Promise((g,d)=>{const x=m.xhr?m.xhr():new XMLHttpRequest;x.open("POST",`${m.api}/api/socialstudio/media-import?kunde=${encodeURIComponent(i)}&datei=${encodeURIComponent(r.name)}`);for(const[v,N]of Object.entries(m.headers))v.toLowerCase()!=="content-type"&&x.setRequestHeader(v,N);x.setRequestHeader("Content-Type",f),x.timeout=18e4,x.upload.onprogress=v=>{v.lengthComputable&&m.onProgress(Math.min(100,Math.round(v.loaded/v.total*100)))},x.onload=()=>{var N;let v;try{v=JSON.parse(x.responseText)}catch{d(new Error("Antwort unklar. Bitte erst die Mediathek prüfen, bevor du erneut hochlädst."));return}x.status>=200&&x.status<300&&v.ok===!0&&typeof((N=v.media)==null?void 0:N.path)=="string"&&v.media.path.trim()?g(v):d(new Error(v.error||"Upload nicht bestätigt. Bitte erst die Mediathek prüfen."))},x.onabort=x.onerror=x.ontimeout=()=>d(new Error("Verbindung unterbrochen. Bitte erst die Mediathek prüfen, bevor du erneut hochlädst.")),x.send(r)})}function Rs({kunde:r,onUploaded:i,children:m}
2){const[f,g]=a.useState(!1),[d,x]=a.useState([]),[v,N]=a.useState(""),[M,y]=a.useState(!1),W=a.useRef(0),K=a.useRef(0),U=a.useRef(!1),D=a.useRef(null),X=a.useRef(!0);a.useEffect(()=>(X.current=!0,()=>{X.current=!1}),[]),a.useEffect(()=>{if(!r)return;const p=new AbortController;return fetch(`${C}/api/socialstudio/media-import?kunde=${encodeURIComponent(r)}`,{headers:A(),signal:p.signal}).then(S=>S.json()).then(S=>{S.ok&&N(S.folder||"")}).catch(()=>{}),()=>p.abort()},[r]);async function J(p){if(U.current||!r||!p.length)return;U.current=!0,y(!0),g(!1),W.current=0;const S=p.map(O=>({file:O,id:++K.current}));x(O=>[...O,...S.map(({file:E,id:ne})=>({id:ne,name:E.name,state:"waiting",progress:0}))]);const k=(O,E)=>X.current&&x(ne=>ne.map(re=>re.id===O?{...re,...E}:re));try{for(const{file:O,id:E}of S){if(!X.current)break;try{Zr(O),k(E,{state:"uploading"});const ne=await Os(O,r,{api:C,headers:A(),onProgress:re=>k(E,{progress:re,state:re===100?"saving":"uploading"})});X.current&&(k(E,{state:"done",progress:100}),ne.folder&&N(ne.folder),i())}catch(ne){k(E,{state:"error",error:ne instanceof Error?ne.message:"Upload fehlgeschlagen."})}}}finally{U.current=!1,X.current&&y(!1)}}function ee(p){return Fs(p.dataTransfer.types)}return e.jsxs("div",{className:"sm-import"+(f?" sm-import-hover":""),onDragEnter:p=>{ee(p)&&(p.preventDefault(),W.current++,g(!0))},onDragLeave:p=>{ee(p)&&(W.current=Math.max(0,W.current-1),W.current||g(!1))},onDragOver:p=>{ee(p)&&(p.preventDefault(),p.dataTransfer.dropEffect=M||!r?"none":"copy")},onDrop:p=>{ee(p)&&(p.preventDefault(),p.stopPropagation(),g(!1),W.current=0,J(Array.from(p.dataTransfer.files)))},children:[e.jsxs("div",{className:"sm-import-bar",children:[e.jsx("button",{type:"button",disabled:M||!r,onClick:()=>{var p;return(p=D.current)==null?void 0:p.click()},children:"Bilder importieren"}),e.jsx("small",{children:"Hierher ziehen · Originalqualität"}),e.jsx("input",{ref:D,type:"file",multiple:!0,accept:".jpg,.jpeg,.png",hidden:!0,onChange:p=>{J(Array.from(p.target.files||[])),p.target.value=""}})]}),v&&e.jsxs("small",{className:"sm-import-folder",children:["Ablage: ",v]}),!!d.length&&e.jsx("div",{className:"sm-import-items","aria-live":"polite",children:d.map(p=>e.jsxs("div",{children:[e.jsx("span",{children:p.name}),e.jsx("small",{children:p.state==="done"?"In Dropbox gespeichert":p.state==="saving"?"Wird in Dropbox gespeichert …":p.state==="uploading"?`${p.progress} % übertragen`:p.state==="error"?p.error:"Wartet …"}),p.state==="uploading"&&e.jsx("progress",{value:p.progress,max:100})]}
2,p.id))}),f&&e.jsx("div",{className:"sm-import-drop",children:M?"Upload läuft …":"Bilder hier ablegen"}),m]})}function Us(r){let i=!1,m;const f=new AbortController;async function g(){try{const d=await r.load(f.signal);if(i||r.onStatus(d))return}catch{if(i)return;r.onError()}i||(m=setTimeout(g,r.interval??5e3))}return g(),()=>{i=!0,f.abort(),m!==void 0&&clearTimeout(m)}}const Mr={x:0,y:0,width:1,height:1};function Hs({originalSrc:r,value:i,onChange:m,disabled:f=!1}){const[g,d]=a.useState(!1),[x,v]=a.useState(i||Mr),[N,M]=a.useState({w:0,h:0}),[y,W]=a.useState(!1),K=a.useRef(null);a.useEffect(()=>{var S,k;if(!g)return;const p=document.activeElement;return(k=(S=K.current)==null?void 0:S.querySelector("button"))==null||k.focus(),()=>p==null?void 0:p.focus()},[g]);const U=a.useRef(null);function D(p){const S=p.currentTarget.getBoundingClientRect();return{x:Math.max(0,Math.min(1,(p.clientX-S.left)/S.width)),y:Math.max(0,Math.min(1,(p.clientY-S.top)/S.height))}}function X(p){let S=1,k=N.w/(N.h*p);k>1&&(k=1,S=N.h*p/N.w),v({x:(1-S)/2,y:(1-k)/2,width:S,height:k})}function J(p,S){Number.isFinite(S)&&v(k=>{const O={...k,[p]:Math.max(p==="width"||p==="height"?.01:0,Math.min(1,S))};return O.width=Math.min(O.width,1-O.x),O.height=Math.min(O.height,1-O.y),O})}const ee=N.w>0&&Math.floor(x.width*N.w)>=1&&Math.floor(x.height*N.h)>=1;return e.jsxs("div",{className:"pz-crop",onClick:p=>p.stopPropagation(),onPointerDown:p=>p.stopPropagation(),children:[e.jsx("button",{type:"button",disabled:f,onClick:()=>{v(i||Mr),M({w:0,h:0}),W(!1),d(!g)},children:i?"Bildausschnitt ändern":"Bild zuschneiden"}),g&&Rn.createPortal(e.jsx("div",{className:"pz-crop-backdrop",onClick:p=>p.stopPropagation(),children:e.jsxs("section",{ref:K,role:"dialog","aria-modal":"true","aria-label":"Bildausschnitt",className:"pz-crop-editor",onKeyDown:p=>{var S;if(p.key==="Escape"&&(p.stopPropagation(),d(!1)),p.key==="Tab"){const k=Array.from(((S=K.current)==null?void 0:S.querySelectorAll("button:not(:disabled),input:not(:disabled)"))||[]),O=k[0],E=k[k.length-1];p.shiftKey&&document.activeElement===O?(p.preventDefault(),E==null||E.focus()):!p.shiftKey&&document.activeElement===E&&(p.preventDefault(),O==null||O.focus())}},children:[e.jsx("p",{children:"Ziehe den gewünschten Ausschnitt im Originalbild auf. Das Original bleibt erhalten."}),y?e.jsx("p",{role:"alert",children:"Originalbild konnte nicht geladen werden. Bitte erneut öffnen."}):e.jsxs("div",{className:"pz-crop-stage",onPointerDown:p=>{f||!N.w||(p.currentTarget.setPointerCapture(p.pointerId),U.current=D(p))},onPointerMove:p=>{if(!U.current)return;const S=D(p),k=U.current;v({x:Math.min(k.x,S.x),y:Math.min(k.y,S.y),width:Math.abs(k.x-S.x),height:Math.abs(k.y-S.y)})},onPointerUp:()=>{U.current=null},onPointerCancel:()=>{U.current=null},children:[e.jsx("img",{src:r,alt:"Originalbild zum Zuschneiden",draggable:!1,onLoad:p=>M({w:p.currentTarget.naturalWidth,h:p.currentTarget.naturalHeight}),onError:()=>W(!0)}),!!N.w&&e.jsx("div",{className:"pz-crop-selection",style:{left:`${x.x*100}%`,top:`${x.y*100}%`,width:`${x.width*100}%`,height:`${x.height*100}%`}})]}),!y&&!!N.w&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"pz-crop-actions",children:[[1,"1:1"],[4/5,"4:5"],[9/16,"9:16"],[16/9,"16:9"]].map(([p,S])=>e.jsx("button",{type:"button",disabled:f,onClick:()=>X(Number(p)),children:S},S))}),e.jsx("div",{className:"pz-crop-fields",children:[["x","Links"],["y","Oben"],["width","Breite"],["height","Höhe"]].map(([p,S])=>e.jsxs("label",{children:[S," (%)",e.jsx("input",{type:"number",min:p==="width"||p==="height"?1:0,max:100,step:.1,disabled:f,value:Number((x[p]*100).toFixed(1)),onChange:k=>J(p,Number(k.target.value)/100)})]},p))}),e.jsxs("small",{children:[Math.floor(x.width*N.w)," × ",Math.floor(x.height*N.h)," Pixel · kein Hochskalieren"]})]}),e.jsxs("div",{className:"pz-crop-actions",children:[e.jsx("button",{type:"button",onClick:()=>d(!1),children:"Abbrechen"}),e.jsx("button",{type:"button",disabled:f,onClick:()=>{m(null),d(!1)},children:"Original verwenden"}),e.jsx("button",{type:"button",disabled:f||!ee||y,onClick:()=>{m(x),d(!1)},children:"Ausschnitt übernehmen"})]})]})}),document.body)]})}function ht(r){const i=String(r||""),m=i.match(/(?:^|[^\d])(\d{4})[-.](\d{2})[-.](\d{2})(?=$|[^\d])/),f=!m&&i.match(/(?:^|[^\d])(\d{2})\.(\d{2})\.(\d{4})(?=$|[^\d])/),g=m?[Number(m[1]),Number(m[2]),Number(m[3])]:f?[Number(f[3]),Number(f[2]),Number(f[1])]:null;if(!g)return"";const[d,x,v]=g,N=new Date(Date.UTC(d,x-1,v));return N.getUTCFullYear()!==d||N.getUTCMonth()!==x-1||N.getUTCDate()!==v?"":`${d}${String(x).padStart(2,"0")}${String(v).padStart(2,"0")}`}function Zs(r,i){return i.datum.localeCompare(r.datum)||r.projekt.localeCompare(i.projekt,"de",{numeric:!0})}
2function Ws(r,i,m,f){const[g,d]=a.useState([]),[x,v]=a.useState(!1),[N,M]=a.useState("");return a.useEffect(()=>{if(d([]),M(""),r.trim().length<3){v(!1);return}const y=new AbortController;v(!0);const W=window.setTimeout(async()=>{try{const K=await fetch(`${C}${i}${i.includes("?")?"&":"?"}q=${encodeURIComponent(r.trim())}`,{headers:A(),signal:y.signal}),U=await K.json();if(!K.ok||U.error)throw new Error(U.message||U.error||"Suche momentan nicht verfügbar.");y.signal.aborted||d(Array.isArray(U[m])?U[m]:[])}catch(K){y.signal.aborted||M(K instanceof Error?K.message:"Suche momentan nicht verfügbar.")}finally{y.signal.aborted||v(!1)}},f);return()=>{window.clearTimeout(W),y.abort()}},[r,i,m,f]),{items:g,busy:x,error:N}}function Vs({authors:r,onAuthors:i,onMention:m,instagram:f}){const[g,d]=a.useState(""),[x,v]=a.useState(""),N=Ws(g.replace(/^@/,""),"/api/socialstudio/profile-search?platform=instagram","profiles",900);return e.jsxs("div",{className:"sc-option",children:[e.jsxs("label",{children:["Instagram-Profile suchen",e.jsx("input",{value:g,placeholder:"Name oder @Benutzername …",autoComplete:"off",onChange:M=>{d(M.target.value),v("")}})]}),e.jsx("small",{children:"Vorschläge mit Profilvorschau ab drei Zeichen."}),N.busy&&e.jsx("small",{role:"status",children:"Profile werden gesucht …"}),N.error&&e.jsx("small",{role:"alert",children:N.error}),x&&e.jsx("small",{role:"status",children:x}),e.jsxs("div",{className:"sc-results",children:[N.items.map(M=>e.jsxs("div",{className:"sc-profile",children:[M.image?e.jsx("img",{src:M.image,alt:"",referrerPolicy:"no-referrer",onError:y=>{y.currentTarget.style.visibility="hidden"}}):e.jsx("span",{className:"sc-avatar",children:"@"}),e.jsxs("span",{children:[e.jsxs("strong",{children:["@",M.username,M.verified?" ✓":""]}),e.jsx("small",{children:M.name})]}),e.jsxs("div",{className:"sc-actions",children:[e.jsx("button",{type:"button",onClick:()=>{m(M.username),v(`@${M.username} im Text ergänzt.`)},children:"Erwähnen"}),f&&e.jsx("button",{type:"button",disabled:r.some(y=>y.toLowerCase()===M.username.toLowerCase())||r.length>=3,onClick:()=>{i([...r,M.username]),v(`@${M.username} als Co-Autor ausgewählt.`)},children:"Co-Autor"})]})]},M.username)),!N.busy&&!N.error&&g.trim().replace(/^@/,"").length>=3&&!N.items.length&&e.jsx("small",{children:"Keine Profile gefunden. Du kannst @Benutzernamen auch direkt in den Text schreiben."})]}),f&&e.jsxs(e.Fragment,{children:[e.jsx("small",{children:"Co-Autoren erhalten bei Veröffentlichung eine Instagram-Einladung. Bis zu drei Profile."}),e.jsx("div",{className:"sc-authors",children:r.map(M=>e.jsxs("button",{type:"button",onClick:()=>i(r.filter(y=>y!==M)),"aria-label":`Co-Autor ${M} entfernen`,children:["@",M," ×"]},M))})]})]})}function Gs(r,i,m,f,g,d=Date.now()){return m.length?Number.isFinite(i.getTime())?r==="schedule"&&i.getTime()<d+6e4?"Bitte mindestens eine Minute in der Zukunft planen.":r==="schedule"&&f&&!g?"Bitte die öffentliche Veröffentlichung für YouTube/TikTok bestätigen.":"":"Bitte ein gültiges Datum wählen.":"Bitte mindestens ein Konto auswählen."}function Er(r,i,m,f){const g=Array.isArray(r==null?void 0:r.ergebnisse)?r.ergebnisse:[],d=Array.isArray(r==null?void 0:r.fehler)?r.fehler.map(String):[];r!=null&&r.error&&d.push(String(r.error));const x=[...new Set([...Array.isArray(r==null?void 0:r.warnungen)?r.warnungen:[],r==null?void 0:r.warnung,...g.map(y=>y==null?void 0:y.warnung)].filter(y=>typeof y=="string"&&y.trim()).map(y=>y.trim()))],v=(r==null?void 0:r.status)==="queued"||g.some(y=>(y==null?void 0:y.uebergeben)||(y==null?void 0:y.status)==="queued"),N=i&&(r==null?void 0:r.ok)===!0&&!(r!=null&&r.requiresReview)&&!v&&!d.length&&(r==null?void 0:r.status)===(f==="schedule"?"scheduled":"draft")&&g.length===m.length&&new Set(g.map(y=>y==null?void 0:y.kanalId)).size===m.length&&m.every(y=>g.some(W=>(W==null?void 0:W.kanalId)===y&&W.ok===!0)),M=!!(r!=null&&r.requiresReview)||!v&&!N&&(g.some(y=>y==null?void 0:y.ok)||(r==null?void 0:r.ok)===!0);return!N&&!v&&!d.length&&d.push("Keine vollständige Bestätigung erhalten. Bitte den Status in Postiz prüfen."),{...r,ergebnisse:g,fehler:d,warnungen:x,complete:N,queued:v,requiresReview:M,modus:f}}const Tr=r=>String(r||"").toLowerCase().replace(/[^a-z0-9äöüß]+/g,"");function $t(r,i){const m=Tr(r),f=Tr(i);return!m||!f?!1:m===f?!0:m.length<3||f.length<3?!1:m.startsWith(f)||f.startsWith(m)}const Jt=r=>String(r).padStart(2,"0"),qs=r=>r.getFullYear()+"-"+Jt(r.getMonth()+1)+"-"+Jt(r.getDate())+"T"+Jt(r.getHours())+":"+Jt(r.getMinutes()),_s=r=>r.plattform==="instagram"?"Instagram · @"+(r.username||r.name):"Facebook · "+r.name;function $s({kunde:r,pfade:i,text:m,datum:f,koautoren:g,titelbildPfad:d,onSchliessen:x,onFertig:v}
2){const[N,M]=a.useState(!0),[y,W]=a.useState(!1),[K,U]=a.useState(""),[D,X]=a.useState([]),[J,ee]=a.useState([]),[p,S]=a.useState(!1),[k,O]=a.useState(m||""),[E,ne]=a.useState((g||[]).map(b=>"@"+String(b).replace(/^@/,"")).join(", ")),[re,Je]=a.useState(""),[Y,ve]=a.useState([]),[Ie,Ye]=a.useState(!1),[ie,Qe]=a.useState(null),[le,Et]=a.useState(!1),[ut,gt]=a.useState(qs(f&&f.getTime()>Date.now()+12e4?f:new Date(Date.now()+15*6e4))),[we,mt]=a.useState(!1),[Xe,ge]=a.useState(""),xt=a.useRef(0);a.useEffect(()=>{const b=B=>{B.key==="Escape"&&!we&&(B.stopImmediatePropagation(),x())};return window.addEventListener("keydown",b,!0),()=>window.removeEventListener("keydown",b,!0)},[x,we]),a.useEffect(()=>{let b=!1;return(async()=>{try{const R=await(await fetch(C+"/api/socialstudio/meta/status",{headers:A()})).json().catch(()=>null);if(b)return;if(!R)throw new Error("Keine Antwort");W(!!R.aktiv),U(String(R.hinweis||R.fehler||""));const Q=Array.isArray(R.konten)?R.konten:[];X(Q),ee(Q.filter(me=>$t(me.name,r)||$t(me.username||"",r)).map(me=>me.id))}catch(B){b||U("Meta-Zugang ließ sich nicht prüfen: "+String(B&&B.message||B))}b||M(!1)})(),()=>{b=!0}},[r]),a.useEffect(()=>{window.clearTimeout(xt.current);const b=re.trim();if(b.length<2||!y){ve([]);return}xt.current=window.setTimeout(async()=>{Ye(!0);try{const R=await(await fetch(C+"/api/socialstudio/meta/orte?q="+encodeURIComponent(b),{headers:A()})).json().catch(()=>null);ve(R&&Array.isArray(R.orte)?R.orte:[]),R&&R.ok===!1&&ge(String(R.error||"Standortsuche fehlgeschlagen."))}catch{ve([])}Ye(!1)},400)},[re,y]);const je=a.useMemo(()=>D.filter(b=>$t(b.name,r)||$t(b.username||"",r)),[D,r]),Un=p||!je.length?D:je,ft=E.split(/[\s,;]+/).map(b=>b.trim().replace(/^@/,"")).filter(Boolean),ye=D.some(b=>b.plattform==="instagram"&&J.includes(b.id)),tn=D.some(b=>b.plattform==="facebook"&&J.includes(b.id)),et=i.filter(b=>/\.(png|gif|webp|heic)$/i.test(b)),Tt=i.filter(b=>/\.(mp4|mov|m4v)$/i.test(b)),ze=[];ye&&et.length&&ze.push("Instagram nimmt Bilder nur als JPG ("+et.length+" Datei"+(et.length>1?"en":"")+" nicht JPG)."),ye&&ft.length>3&&ze.push("Instagram: höchstens 3 Co-Autoren."),tn&&Tt.length&&i.length>1&&ze.push("Facebook: Ein Video nur einzeln, nicht zusammen mit weiteren Medien."),i.length>10&&ze.push("Höchstens 10 Medien je Beitrag.");async function Ne(){if(ge(""),!J.length){ge("Bitte mindestens ein Konto wählen.");return}const b=new Date(ut);if(!le&&(isNaN(b.getTime())||b.getTime()<Date.now()+6e4)){ge("Bitte einen Zeitpunkt mindestens eine Minute in der Zukunft wählen.");return}mt(!0);try{const B=await fetch(C+"/api/socialstudio/meta/beitrag",{method:"POST",headers:A({"Content-Type":"application/json"}),body:JSON.stringify({kunde:r,ziele:J,pfade:i,text:k,ortId:ie?ie.id:"",ortName:ie?ie.name:"",koautoren:ft,titelbildPfad:d&&/\.jpe?g$/i.test(d)?d:"",sofort:le,datum:le?"":b.toISOString()})}),R=await B.json().catch(()=>null);if(!B.ok||!R||!R.ok)throw new Error(String(R&&R.error||"Das Einplanen hat nicht geklappt."));const Q=le?"jetzt":b.toLocaleString("de-DE",{weekday:"short",day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"});v("Über Meta eingeplant ("+R.ids.length+(R.ids.length===1?" Konto":" Konten")+", "+Q+")"+(ie?" · 📍 "+ie.name:"")+".")}catch(B){ge(String(B&&B.message||B)),mt(!1)}}return Rn.createPortal(e.jsxs("div",{className:"md-ov",onClick:()=>{we||x()},role:"dialog","aria-modal":"true","aria-label":"Direkt über Meta veröffentlichen",children:[e.jsxs("div",{className:"md-box",onClick:b=>b.stopPropagation(),children:[e.jsxs("div",{className:"md-kopf",children:[e.jsxs("div",{children:[e.jsx("div",{className:"md-titel",children:"Direkt über Meta veröffentlichen"}),e.jsxs("div",{className:"md-sub",children:["Ohne Postiz, mit echtem Standort und Instagram-Co-Autoren · ",i.length," Medi",i.length===1?"um":"en"]})]}),e.jsx("button",{type:"button",className:"md-zu",onClick:x,disabled:we,"aria-label":"Schließen",children:"✕"})]}),N?e.jsx("div",{className:"md-leer",children:"Meta-Zugang wird geprüft …"}):y?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"md-feld",children:[e.jsxs("div",{className:"md-label",children:["Konten ",je.length?"von "+r:""]}),!D.length&&e.jsx("div",{className:"md-klein",children:"Dem Systemnutzer ist noch keine Seite zugewiesen."}),e.jsx("div",{className:"md-konten",children:Un.map(b=>e.jsxs("label",{className:"md-konto"+(J.includes(b.id)?" an":""),children:[e.jsx("input",{type:"checkbox",checked:J.includes(b.id),onChange:B=>ee(R=>B.target.checked?R.concat(b.id):R.filter(Q=>Q!==b.id))}),_s(b)]},b.id))}),je.length>0&&D.length>je.length&&e.jsx("button",{type:"button",className:"md-link",onClick:()=>S(b=>!b),children:p?"Nur Konten dieses Kunden":"Alle Konten zeigen ("+D.length+")"})]}),e.jsxs("div",{className:"md-feld",children:[e.jsx("div",{className:"md-label",children:"Text"}),e.jsx("textarea",{className:"md-text",rows:6,value:k,onChange:b=>O(b.target.value)})]}),e.jsxs("div",{className:"md-feld",children:[e.jsx("div",{className:"md-label",children:"Standort"}),ie?e.jsxs("div",{className:"md-ort-gewaehlt",children:["📍 ",e.jsx("b",{children:ie.name})," ",e.jsx("span",{children:ie.ort}),e.jsx("button",{type:"button",className:"md-link",onClick:()=>Qe(null),children:"entfernen"})]}):e.jsxs(e.Fragment,{children:[e.jsx("input",{className:"md-eingabe",placeholder:"Ort suchen, z. B. „Bielefeld Altstadt“ oder Firmenname",value:re,onChange:b=>Je(b.target.value)}),Ie&&e.jsx("div",{className:"md-klein",children:"Suche …"}),!!Y.length&&e.jsx("div",{className:"md-orte",children:Y.map(b=>e.jsxs("button",{type:"button",className:"md-ort",onClick:()=>{Qe(b),ve([]),Je("")},children:[e.jsx("b",{children:b.name}),e.jsx("span",{children:b.ort})]},b.id))}),!Ie&&re.trim().length>=2&&!Y.length&&e.jsx("div",{className:"md-klein",children:"Kein Ort mit Adresse gefunden."})]})]}),ye&&e.jsxs("div",{className:"md-feld",children:[e.jsx("div",{className:"md-label",children:"Co-Autoren (Instagram, höchstens 3)"}),e.jsx("input",{className:"md-eingabe",placeholder:"@konto1, @konto2",value:E,onChange:b=>ne(b.target.value)})]}),e.jsxs("div",{className:"md-feld",children:[e.jsx("div",{className:"md-label",children:"Zeitpunkt"}),e.jsxs("div",{className:"md-zeit",children:[e.jsxs("label",{children:[e.jsx("input",{type:"radio",checked:!le,onChange:()=>Et(!1)})," geplant",e.jsx("input",{type:"datetime-local",className:"md-eingabe md-datum",value:ut,disabled:le,onChange:b=>gt(b.target.value)})]}),e.jsxs("label",{children:[e.jsx("input",{type:"radio",checked:le,onChange:()=>Et(!0)})," sofort veröffentlichen"]})]})]}),ze.map(b=>e.jsx("div",{className:"md-warnung",children:b},b)),Xe&&e.jsx("div",{className:"md-fehler",role:"alert",children:Xe}),e.jsxs("div",{className:"md-fuss",children:[e.jsx("button",{type:"button",className:"md-still",onClick:x,disabled:we,children:"Abbrechen"}),e.jsx("button",{type:"button",className:"md-haupt",onClick:Ne,disabled:we||!J.length||ze.length>0,children:we?"Wird eingeplant …":le?"Jetzt über Meta veröffentlichen":"Über Meta einplanen"})]})]}):e.jsxs("div",{className:"md-leer",children:[K||"Der Meta-Zugang ist noch nicht eingerichtet.",e.jsx("div",{className:"md-klein",children:"Sobald der Systemnutzer-Token hinterlegt ist, lässt sich hier direkt über die Meta-App posten. Bis dahin bitte wie gewohnt über „Planen“ (Postiz)."})]})]}),e.jsx("style",{children:".md-ov{position:fixed;inset:0;z-index:250;background:rgba(6,4,3,.82);display:flex;align-items:center;justify-content:center;padding:20px}.md-box{width:min(620px,100%);max-height:92vh;overflow-y:auto;background:#151214;border:1px solid rgba(255,255,255,.1);border-radius:18px;padding:20px;color:#fff;box-shadow:0 20px 60px rgba(0,0,0,.55)}.md-kopf{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.md-titel{font-size:17px;font-weight:650}.md-sub{font-size:12.5px;color:rgba(255,255,255,.55);margin-top:3px}.md-zu{flex:none;width:32px;height:32px;border-radius:50%;border:1px solid rgba(255,255,255,.15);background:rgba(255,255,255,.06);color:#fff;cursor:pointer}.md-leer{padding:18px 4px;color:rgba(255,255,255,.75);font-size:14px;line-height:1.5}.md-klein{font-size:12.5px;color:rgba(255,255,255,.5);margin-top:6px}.md-feld{margin-bottom:14px}.md-label{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:rgba(255,255,255,.45);margin-bottom:7px}.md-konten{display:flex;flex-direction:column;gap:6px}.md-konto{display:flex;align-items:center;gap:9px;padding:8px 11px;border-radius:10px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);font-size:13.5px;cursor:pointer}
2.md-konto.an{border-color:rgba(242,147,60,.6);background:rgba(242,147,60,.08)}.md-link{background:none;border:0;color:#f2933c;font:inherit;font-size:12.5px;cursor:pointer;padding:6px 0}.md-text,.md-eingabe{width:100%;box-sizing:border-box;font:inherit;font-size:14px;color:#fff;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.13);border-radius:10px;padding:9px 11px}.md-text{resize:vertical;line-height:1.5}.md-datum{width:auto;margin-left:8px;color-scheme:dark}.md-orte{display:flex;flex-direction:column;margin-top:6px;border:1px solid rgba(255,255,255,.1);border-radius:10px;overflow:hidden}.md-ort{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;padding:8px 11px;background:rgba(255,255,255,.03);border:0;border-bottom:1px solid rgba(255,255,255,.06);color:#fff;font:inherit;font-size:13.5px;cursor:pointer}.md-ort:hover{background:rgba(242,147,60,.1)}.md-ort span,.md-ort-gewaehlt span{font-size:12px;color:rgba(255,255,255,.55)}.md-ort-gewaehlt{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:14px}.md-zeit{display:flex;flex-direction:column;gap:8px;font-size:14px}.md-zeit label{display:flex;align-items:center;gap:8px}.md-warnung{margin:8px 0;padding:9px 12px;border-radius:10px;background:rgba(232,193,74,.1);border:1px solid rgba(232,193,74,.35);color:#fbe9b7;font-size:13px}.md-fehler{margin:8px 0;padding:9px 12px;border-radius:10px;background:rgba(255,117,117,.1);border:1px solid rgba(255,117,117,.35);color:#ffd2d2;font-size:13px}.md-fuss{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}.md-still,.md-haupt{border-radius:10px;padding:9px 15px;font:inherit;font-size:13.5px;font-weight:600;cursor:pointer;border:1px solid transparent}.md-still{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.13);color:rgba(255,255,255,.85)}.md-haupt{background:#f2933c;color:#1a1207}.md-haupt:disabled,.md-still:disabled{opacity:.55;cursor:default}"})]}),document.body)}const Js=a.lazy(()=>Ur(()=>import("./chunk-h2-CXq5u8p7.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]))),Ys=a.lazy(()=>Ur(()=>import("./chunk-h2-Co7KlMgj.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,8,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,12,52,53,54,55,13,10,9,56,57,58,59,60,61,62,63,64,65,66]))),An=(Hr.find(r=>r.id==="adsmanager")||{url:"https://adsmanager.facebook.com/adsmanager/manage/campaigns"}).url;function Pr(r){const i=Bs(r);return(i?"/content-hub/"+encodeURIComponent(i):"/content-hub")+"?tab=postings"}function Wr(r,i){return i&&i.sig?r+"&sig="+encodeURIComponent(i.sig)+"&exp="+i.exp:r}const ke=(r,i)=>Wr(C+"/api/media/thumb?path="+encodeURIComponent(r.path||"")+(i?"&sz=lg":"&sz=sm"),r),In=r=>Wr(C+"/api/media/play?path="+encodeURIComponent(r.path||""),r);function ce(r){return String(r||"").replace(/\breel\s*\d+\s*-\s*/gi,"").replace(/^\s*[-–]\s*/,"").replace(/\s{2,}/g," ").trim()||String(r||"")}function Ar(r){return/^\d{8}$/.test(r)?new Date(Number(r.slice(0,4)),Number(r.slice(4,6))-1,Number(r.slice(6,8))).toLocaleDateString("de-DE",{day:"2-digit",month:"2-digit",year:"2-digit"}):""}function Br(r){const i={},m=[];for(const g of r||[]){const d=g.project||"Allgemein";i[d]||(i[d]={projekt:d,items:[],cover:null,nBild:0,nVideo:0,datum:""},m.push(d));const x=i[d];x.items.push(g),g.type==="video"?x.nVideo++:x.nBild++;const v=ht(g.path)||ht(g.project||"");v>x.datum&&(x.datum=v)}const f=m.map(g=>{var x;const d=i[g];return d.items.sort((v,N)=>(v.type==="video"?0:1)-(N.type==="video"?0:1)),(x=d.items[0])!=null&&x.path&&(d.cover=ke(d.items[0],!0)),d});return f.sort(Zs),f}function Bn(r,i){const m=r.filter(x=>x.type==="video"),f=r.filter(x=>x.type!=="video"),g=m.length?m:f,d=g.filter(x=>i[x.path]).length;return{drin:d,gesamt:g.length,istVideo:m.length>0,nBild:f.length,nVideo:m.length,prozent:g.length?Math.round(d/g.length*100):0}}function Kr({m:r,online:i,gewaehlt:m,imBlick:f,aufWahl:g,aufVorschau:d,hatText:x,textLaeuft:v,aufText:N}){const[M,y]=a.useState(!1),[W,K]=a.useState("3 / 4"),U=(D,X)=>{if(!D||!X)return;const J=D/X,ee=[[9/16,"9 / 16"],[4/5,"4 / 5"],[1,"1 / 1"],[16/9,"16 / 9"]];let p=ee[0];for(const S of ee)Math.abs(S[0]-J)<Math.abs(p[0]-J)&&(p=S);K(p[1])};return e.jsxs("div",{className:"ss-kachel"+(m?" ss-kachel-gewaehlt":"")+(i?" ss-kachel-online":"")+(f?" ss-kachel-blick":""),style:{aspectRatio:W},title:ce(r.name),tabIndex:0,onKeyDown:D=>{D.target===D.currentTarget&&(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),d==null||d(r))},onClick:D=>
2{if((D.shiftKey||D.metaKey||D.ctrlKey)&&g){g(r,D);return}d==null||d(r)},children:[r.path&&!M?e.jsx("img",{src:ke(r),alt:"",loading:"lazy",onError:()=>y(!0),onLoad:D=>U(D.currentTarget.naturalWidth,D.currentTarget.naturalHeight)}):e.jsx("div",{className:"ss-kachel-leer",children:r.type==="video"?"Video":"Bild"}),r.type==="video"&&e.jsx("span",{className:"ss-kachel-video","aria-hidden":"true",children:"▶"}),g&&e.jsx("button",{type:"button",className:"ss-kachel-haken"+(i?" ss-kachel-haken-an":""),title:i?"Nicht mehr als online führen":"Als online markieren","aria-pressed":i,onClick:D=>{D.stopPropagation(),g(r,D)},children:i?"✓":""}),N&&e.jsx("button",{type:"button",className:"ss-kachel-text"+(x?" hat":"")+(v?" laeuft":""),title:x?"Beitragstext ansehen":"Beitragstext aus dem Video erzeugen",onClick:D=>{D.stopPropagation(),v||N(r)},children:v?e.jsx("svg",{viewBox:"0 0 24 24",width:"13",height:"13",className:"rp-dreh",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",children:e.jsx("path",{d:"M12 3a9 9 0 1 0 9 9"})}):e.jsxs("svg",{viewBox:"0 0 24 24",width:"13",height:"13",fill:"currentColor","aria-hidden":"true",children:[e.jsx("path",{d:"M12 2.6l1.9 5.2 5.2 1.9-5.2 1.9L12 16.8l-1.9-5.2-5.2-1.9 5.2-1.9z"}),e.jsx("path",{d:"M18.4 15.1l.9 2.4 2.4.9-2.4.9-.9 2.4-.9-2.4-2.4-.9 2.4-.9z",opacity:".75"})]})}),e.jsxs("div",{className:"ss-kachel-fuss",children:[e.jsx("span",{className:"ss-punkt"+(i?" ss-punkt-an":""),"aria-hidden":"true"}),e.jsx("span",{className:"ss-kachel-name",children:ce(r.name)})]})]})}function Lr({m:r,online:i,setzeStatus:m,aufBeitrag:f,aufAnsehen:g}){return e.jsx("aside",{className:"ss-vorschau-tafel",children:r?e.jsxs(e.Fragment,{children:[r.type==="video"?e.jsx("video",{src:In(r),poster:ke(r,!0),controls:!0,playsInline:!0,preload:"metadata"},r.path):e.jsxs("button",{type:"button",className:"ss-vorschau-bild",onClick:()=>g==null?void 0:g(r),"aria-label":ce(r.name)+" im Vollbild öffnen",children:[e.jsx("img",{src:ke(r,!0),alt:ce(r.name)}),e.jsx("span",{children:"Vollbild ↗"})]}),e.jsx("div",{className:"ss-vorschau-name",children:ce(r.name)}),e.jsxs("div",{className:"ss-vorschau-art",children:[r.type==="video"?"Video":"Foto",r.project?" · "+r.project:""]}),e.jsxs("div",{className:"ss-vorschau-art",children:[e.jsx("span",{className:"ss-punkt"+(i[r.path]?" ss-punkt-an":""),"aria-hidden":"true"}),i[r.path]?" online":" noch nicht online"]}),f&&e.jsxs("button",{type:"button",className:"ss-vorschau-beitrag",onClick:()=>f(r),children:[e.jsx("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round","aria-hidden":"true",children:e.jsx("path",{d:"M12 5v14M5 12h14"})}),"Beitrag erstellen"]})]}):e.jsxs("div",{className:"ss-vorschau-leer",children:["Ein Medium anklicken, um es hier groß zu sehen.",e.jsx("br",{}),"Umschalt- oder Cmd-Klick wählt mehrere aus."]})})}const Qs=r=>C+"/api/media/play?path="+encodeURIComponent(r.pfad)+(r.sig?"&sig="+encodeURIComponent(r.sig)+"&exp="+r.exp:"");function Xs({a:r,zu:i}){const[m,f]=a.useState(!1);return a.useEffect(()=>{const g=d=>{d.key==="Escape"&&(d.stopImmediatePropagation(),i())};return window.addEventListener("keydown",g,!0),()=>window.removeEventListener("keydown",g,!0)},[i]),Rn.createPortal(e.jsxs("div",{className:"mv-ov",onClick:i,role:"dialog","aria-modal":"true","aria-label":r.name||"Vorschau",children:[e.jsxs("div",{className:"mv-box",onClick:g=>g.stopPropagation(),children:[e.jsxs("div",{className:"mv-kopf",children:[e.jsx("span",{className:"mv-name",children:r.name}),e.jsx("button",{type:"button",className:"mv-zu",onClick:i,"aria-label":"Schließen",children:"✕"})]}),m?e.jsx("div",{className:"mv-fehler",children:r.video?"Das Video lässt sich hier nicht abspielen — Format nicht unterstützt oder die Freigabe ist abgelaufen (Seite neu laden). Sonst bitte in Dropbox öffnen.":"Das Foto lässt sich gerade nicht laden. Bitte die Seite neu laden."}):r.video?e.jsx("video",{src:r.src,poster:r.poster||void 0,controls:!0,autoPlay:!0,playsInline:!0,onError:()=>f(!0)},r.src):e.jsx("img",{src:r.src,alt:"",onError:()=>f(!0)})]}),e.jsx("style",{children:".mv-ov{position:fixed;inset:0;z-index:300;background:rgba(4,3,2,.86);
2display:flex;align-items:center;justify-content:center;padding:24px}.mv-box{display:flex;flex-direction:column;gap:10px;max-width:min(92vw,1100px);max-height:92vh}.mv-kopf{display:flex;align-items:center;gap:12px;color:#fff;font-size:13.5px;font-weight:600}.mv-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mv-zu{flex:none;width:32px;height:32px;border-radius:50%;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.08);color:#fff;font-size:14px;cursor:pointer}.mv-zu:hover{background:rgba(255,255,255,.18)}.mv-box video,.mv-box img{display:block;max-width:100%;max-height:calc(92vh - 50px);border-radius:12px;background:#000;object-fit:contain}.mv-fehler{padding:40px 28px;border-radius:12px;background:rgba(255,255,255,.06);color:rgba(255,255,255,.8);font-size:14px}"})]}),document.body)}const Xt=(r,i)=>C+"/api/media/thumb?sz="+(i?"lg":"sm")+"&path="+encodeURIComponent(r.pfad)+(r.sig?"&sig="+encodeURIComponent(r.sig)+"&exp="+r.exp:""),Ir=["Mo","Di","Mi","Do","Fr","Sa","So"];function Yt(r){return String(r||"").toLowerCase().replace(/[^a-z0-9äöüß]+/g,"")}function Qt(r,i,m={}){const f=m[String(r||"").trim().toLowerCase()];if(f&&Yt(f)===Yt(i)||!r||!i)return!0;const g=Yt(r),d=Yt(i);return!g||!d||g===d?!0:g.length<3||d.length<3?!1:g.indexOf(d)===0||d.indexOf(g)===0}function dt(r){const i=new Date(r.getFullYear(),r.getMonth(),r.getDate());return i.setDate(i.getDate()-(i.getDay()+6)%7),i}function pe(r){const i=typeof r=="string"?new Date(r):r;return isNaN(i.getTime())?"":i.getFullYear()+"-"+String(i.getMonth()+1).padStart(2,"0")+"-"+String(i.getDate()).padStart(2,"0")}function Vr(r){const i=new Date(r);return isNaN(i.getTime())?"":String(i.getHours()).padStart(2,"0")+":"+String(i.getMinutes()).padStart(2,"0")}const Fn={DRAFT:{text:"Entwurf",farbe:"rgba(255,255,255,.35)"},QUEUE:{text:"Eingeplant",farbe:"#f2933c"},PUBLISHED:{text:"Veröffentlicht",farbe:"#6ea8ff"},ERROR:{text:"Fehlgeschlagen",farbe:"#ff7a6b"}};function ea({p:r,onOeffnen:i}){const m=Fn[String(r.status||"").toUpperCase()]||{text:r.status||"—",farbe:"rgba(255,255,255,.3)"},f=r.medien&&r.medien[0]?Xt(r.medien[0]):r.bild&&!/\.(mp4|mov|m4v|webm)(\?|$)/i.test(r.bild)?r.bild:"";return e.jsxs("div",{className:"rp-post"+(i?" rp-post-klick":""),title:r.text,role:i?"button":void 0,tabIndex:i?0:void 0,onClick:i?g=>{g.stopPropagation(),i(r)}:void 0,onKeyDown:i?g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),i(r))}:void 0,children:[e.jsxs("div",{className:"rp-post-kopf",children:[e.jsx("span",{className:"rp-zeit",children:Vr(r.datum)}),e.jsx("span",{className:"rp-punkt",style:{background:m.farbe},"aria-hidden":"true"}),e.jsx("span",{className:"rp-status",children:m.text})]}),f?e.jsx("img",{className:"rp-post-bild",src:f,alt:"",loading:"lazy",onError:g=>{g.currentTarget.style.display="none"}}):null,e.jsx("div",{className:"rp-post-text",children:r.text||"(ohne Text)"}),r.freigabe?e.jsx("div",{className:"rp-post-freigabe "+(r.freigabe.status==="freigegeben"?"ok":"aenderung"),title:r.freigabe.kommentar||void 0,children:r.freigabe.status==="freigegeben"?"✓ Kunde hat freigegeben":"✎ Kunde wünscht Änderung"}):null,e.jsx("div",{className:"rp-post-kanal",children:r.kanal||r.plattform||""})]})}function ta(r){const i=new Date().getHours()*60+new Date().getMinutes(),m=r?", "+String(r).split(" ")[0]:"";return i>=300&&i<600?"Guten Morgen"+m:i>=600&&i<690?"Hallo"+m:i>=690&&i<1020?"Willkommen"+m:i>=1020&&i<1320?"Guten Abend"+m:"Gute Nacht"+m}const Kn=r=>{const i=String(r||"").toLowerCase();return i==="instagram"?"Instagram":i==="tiktok"?"TikTok":i==="youtube"?"YouTube":i==="facebook"?"Facebook":i==="linkedin"?"LinkedIn":i?i.charAt(0).toUpperCase()+i.slice(1):"ohne Plattform"},Ln=(r,i)=>r?C+"/api/socialstudio/thumb?id="+encodeURIComponent(r):On(i),On=r=>r?/^https?:\/\/(app\.)?liberdamedia\.de\//i.test(r)||r.indexOf("/api/proxy-image")>=0?r:C+"/api/proxy-image?url="+encodeURIComponent(r):"",Fr=r=>r>=1e6?(r/1e6).toFixed(1).replace(".",",")+" Mio.":r>=1e3?(r/1e3).toFixed(1).replace(".",",")+" Tsd.":String(r||0),Le=r=>new Intl.NumberFormat("de-DE").format(Math.round(r||0)),na=r=>new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR",maximumFractionDigits:0}).format(r||0),ra=r=>new Intl.NumberFormat("de-DE",{style:"currency",currency:"EUR",minimumFractionDigits:2,maximumFractionDigits:2}).format(r||0);function Gr(r){const i=String(r||"").toLowerCase();return i.indexOf("insta")>=0?"instagram":i.indexOf("face")>=0?"facebook":i.indexOf("tiktok")>=0?"tiktok":i.indexOf("you")>
2=0?"youtube":i.indexOf("linked")>=0?"linkedin":"sonst"}function ct({plattform:r}){const i=Gr(r),m={instagram:"linear-gradient(45deg,#f9ce34 0%,#ee2a7b 48%,#6228d7 100%)",facebook:"#1877f2",tiktok:"#000",youtube:"#ff0000",linkedin:"#fff",sonst:"rgba(255,255,255,.22)"},f=i==="linkedin"?"#0a66c2":"#fff";return e.jsx("span",{className:"rp-profil-platt",style:{background:m[i],color:f},children:e.jsxs("svg",{viewBox:"0 0 24 24",width:"11",height:"11","aria-hidden":"true",children:[i==="instagram"&&e.jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"2.2",children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"5.4"}),e.jsx("circle",{cx:"12",cy:"12",r:"4.2"}),e.jsx("circle",{cx:"17.4",cy:"6.6",r:"1.1",fill:"currentColor",stroke:"none"})]}),i==="facebook"&&e.jsx("path",{fill:"currentColor",d:"M13.5 21v-8h2.7l.4-3.1h-3.1V7.9c0-.9.25-1.5 1.55-1.5H16.7V3.6c-.3-.04-1.3-.13-2.47-.13-2.44 0-4.11 1.49-4.11 4.23v2.2H7.4V13h2.72v8z"}),i==="tiktok"&&e.jsx("path",{fill:"currentColor",d:"M16.6 2.9c.5 2 1.9 3.5 3.9 3.8v2.9c-1.5.1-2.9-.3-4.2-1.1v5.9c0 4.1-3.6 7-7.2 5.7-2.3-.8-3.8-3-3.8-5.4 0-3.5 3.3-6.1 6.7-5.4v3c-1.5-.4-3 .7-3 2.3 0 1.3 1 2.4 2.3 2.4 1.4 0 2.4-1 2.4-2.6V2.9z"}),i==="youtube"&&e.jsx("path",{fill:"currentColor",d:"M21.6 7.2c-.2-.9-.9-1.6-1.8-1.8C18.2 5 12 5 12 5s-6.2 0-7.8.4c-.9.2-1.6.9-1.8 1.8C2 8.8 2 12 2 12s0 3.2.4 4.8c.2.9.9 1.6 1.8 1.8C5.8 19 12 19 12 19s6.2 0 7.8-.4c.9-.2 1.6-.9 1.8-1.8.4-1.6.4-4.8.4-4.8s0-3.2-.4-4.8M10 15.1V8.9l5.2 3.1z"}),i==="linkedin"&&e.jsx("path",{fill:"currentColor",d:"M6.9 20.4H3.4V9h3.5zM5.15 7.5A2.03 2.03 0 1 1 5.15 3.4a2.03 2.03 0 0 1 0 4.1M20.6 20.4h-3.5v-5.55c0-1.32-.03-3.02-1.84-3.02-1.84 0-2.12 1.44-2.12 2.92v5.65H9.65V9H13v1.56h.05a3.7 3.7 0 0 1 3.32-1.82c3.55 0 4.2 2.34 4.2 5.38z"}),i==="sonst"&&e.jsx("circle",{cx:"12",cy:"12",r:"5",fill:"currentColor"})]})})}function Or({art:r}){const i={width:17,height:17,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};return r==="start"?e.jsxs("svg",{...i,children:[e.jsx("path",{d:"M3 10.5L12 3l9 7.5"}),e.jsx("path",{d:"M5 9.5V21h14V9.5"})]}):r==="plan"?e.jsxs("svg",{...i,children:[e.jsx("rect",{x:"3",y:"5",width:"18",height:"16",rx:"2.5"}),e.jsx("path",{d:"M3 10h18M8 3v4M16 3v4"})]}):r==="medien"?e.jsxs("svg",{...i,children:[e.jsx("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2.5"}),e.jsx("path",{d:"M10 9.5l5 2.5-5 2.5z"})]}):r==="auswertung"?e.jsx("svg",{...i,children:e.jsx("path",{d:"M4 19V9M10 19V5M16 19v-7M22 19H2"})}):r==="analytics"?e.jsxs("svg",{...i,children:[e.jsx("path",{d:"M3 17l5-6 4 4 6-8"}),e.jsx("path",{d:"M3 21h18"})]}):r==="ideen"?e.jsxs("svg",{...i,children:[e.jsx("path",{d:"M9 18h6M10 21h4"}),e.jsx("path",{d:"M12 3a6 6 0 0 0-3.5 10.9c.4.3.5.7.5 1.1h6c0-.4.1-.8.5-1.1A6 6 0 0 0 12 3z"})]}):r==="gespeichert"?e.jsx("svg",{...i,children:e.jsx("path",{d:"M6 3h12v18l-6-4-6 4z"})}):r==="untertitel"?e.jsxs("svg",{...i,children:[e.jsx("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2.5"}),e.jsx("path",{d:"M7 14h4M13 14h4"})]}):r==="dashboard"?e.jsxs("svg",{...i,children:[e.jsx("path",{d:"M10 6L4 12l6 6"}),e.jsx("path",{d:"M4 12h12a4 4 0 0 1 4 4v3"})]}):r==="inbox"?e.jsxs("svg",{...i,children:[e.jsx("path",{d:"M3 13l2.5-7.5A2 2 0 0 1 7.4 4h9.2a2 2 0 0 1 1.9 1.5L21 13"}),e.jsx("path",{d:"M3 13v5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-5h-5l-1.5 2.5h-5L8 13z"})]}):r==="programme"?e.jsxs("svg",{...i,children:[e.jsx("rect",{x:"3.5",y:"3.5",width:"7",height:"7",rx:"1.8"}),e.jsx("rect",{x:"13.5",y:"3.5",width:"7",height:"7",rx:"1.8"}),e.jsx("rect",{x:"3.5",y:"13.5",width:"7",height:"7",rx:"1.8"}),e.jsx("rect",{x:"13.5",y:"13.5",width:"7",height:"7",rx:"1.8"})]}):e.jsx("svg",{...i,children:e.jsx("circle",{cx:"12",cy:"12",r:"7"})})}const en=[{id:"hp",titel:"High Performer"},{id:"anz",titel:"Werbeanzeigen"},{id:"neu",titel:"Neue Content Pieces"},{id:"vorlauf",titel:"Content geplant bis"},{id:"wettbewerb",titel:"Was die anderen machen"},{id:"fertig",titel:"Kürzlich abgeschlossene Projekte"},{id:"kalender",titel:"Kalender"}];function Rr(r){const i=en.map(d=>d.id);let m=[],f=["kalender"],g=[];try{const d=JSON.parse(localStorage.getItem(r)||"null");d&&Array.isArray(d.reihe)&&(m=d.reihe.filter(x=>i.indexOf(x)>=0)),d&&Array.isArray(d.halb)&&(g=d.halb.filter(x=>
2i.includes(x))),d&&Array.isArray(d.aus)&&(f=d.aus.filter(x=>i.indexOf(x)>=0))}catch{}for(const d of i)m.indexOf(d)<0&&m.push(d);return{reihe:[...new Set(m)],aus:f,halb:g}}const pt=[{key:"start",label:"Startseite",nav:!0,kunde:!1},{key:"plan",label:"Posting-Kalender",nav:!0,kunde:!0},{key:"medien",label:"Medien",nav:!0,kunde:!0},{key:"inbox",label:"Inbox",nav:!0,kunde:!1},{key:"ideen",label:"Posting-Empfehlungen",nav:!0,kunde:!0},{key:"gespeichert",label:"Gespeicherter Content",nav:!0,kunde:!1},{key:"programme",label:"Programme",nav:!0,kunde:!1},{key:"auswertung",label:"Auswertung",nav:!1,kunde:!0},{key:"analytics",label:"Analytics",nav:!1,kunde:!0},{key:"untertitel",label:"Untertitel-Studio",nav:!1,kunde:!1}];function Da(){var fr,br,kr,vr,wr,jr,yr,zr;const r=Cs(),[i,m]=a.useState([]),[f,g]=a.useState({}),[d,x]=a.useState(""),[v,N]=a.useState([]),[M,y]=a.useState(0),W=a.useRef(0),[K,U]=a.useState({}),[D,X]=a.useState(!1),[J,ee]=a.useState(""),[p,S]=a.useState(""),[k,O]=a.useState("start"),[E,ne]=a.useState(()=>dt(new Date)),[re,Je]=a.useState([]),[Y,ve]=a.useState([]),[Ie,Ye]=a.useState(!1),[ie,Qe]=a.useState(""),[le,Et]=a.useState(new Set),[ut,gt]=a.useState([]),[we,mt]=a.useState(""),[Xe,ge]=a.useState([]),[xt,je]=a.useState(0),[Un,ft]=a.useState(""),[ye,tn]=a.useState([]),[et,Tt]=a.useState(!0);a.useEffect(()=>{fetch(C+"/api/socialstudio/uebersicht",{headers:A()}).then(t=>t.json()).then(t=>{tn(t&&t.kunden||[]),Tt(!1)}).catch(()=>Tt(!1))},[]);const[ze,Ne]=a.useState(0),b=a.useRef(!1),[B,R]=a.useState(()=>{try{return localStorage.getItem("ss-plan-ansicht")==="monat"?"monat":"woche"}catch{return"woche"}});a.useEffect(()=>{try{localStorage.setItem("ss-plan-ansicht",B)}catch{}},[B]);const[Q,me]=a.useState(()=>{const t=new Date;return new Date(t.getFullYear(),t.getMonth(),1)});a.useEffect(()=>{if(k!=="plan")return;const t=B==="monat"?dt(Q).getTime():E.getTime(),n=t+(B==="monat"?42:7)*864e5;let s=!1;Ye(!0),Qe("");const o=b.current;return b.current=!1,fetch(C+"/api/socialstudio/plan?von="+t+"&bis="+n+(o?"&frisch=1&refresh=1":""),{headers:A()}).then(l=>l.json()).then(l=>{s||(!l||l.ok===!1?(Qe(String(l&&l.error||"Der Plan ließ sich nicht laden.")),Je([]),ve([])):(Je(l.posts||[]),ve(l.kanaele||[])),Ye(!1))}).catch(()=>{s||(Qe("Der Plan ließ sich nicht laden."),Je([]),ve([]),Ye(!1))}),()=>{s=!0}},[k,E,ze,B,Q]),a.useEffect(()=>{if(k!=="plan"||!d){gt([]);return}let t=!1;return fetch(C+"/api/socialstudio/zeiten?kunde="+encodeURIComponent(d),{headers:A()}).then(n=>n.json()).then(n=>{t||(gt(n&&n.empfehlung||[]),mt(String(n&&n.hinweis||"")))}).catch(()=>{t||(gt([]),mt(""))}),()=>{t=!0}},[k,d]);const[Hn,nn]=a.useState("");a.useEffect(()=>{if(k!=="plan"||!d){ge([]),je(0),ft(""),nn("");return}let t=!1;const n=d+"|"+E.getTime();return fetch(C+"/api/socialstudio/vorschlag?kunde="+encodeURIComponent(d)+"&von="+E.getTime(),{headers:A()}).then(s=>s.json()).then(s=>{t||(ge(s&&s.vorschlag||[]),je(s&&s.proWoche||0),ft(String(s&&s.hinweis||"")),nn(n))}).catch(()=>{t||(ge([]),nn(n))}),()=>{t=!0}},[k,d,E]);const[Se,rn]=a.useState("projekte"),[bt,qr]=a.useState(""),[tt,_r]=a.useState("alle"),[nt,$r]=a.useState(!1),[kt,vt]=a.useState(null),[sa,sn]=a.useState(new Set),De=Ms(),[Zn,aa]=a.useState(()=>{try{return localStorage.getItem("ss-menu")==="zu"}catch{return!1}});a.useEffect(()=>{try{localStorage.setItem("ss-menu",Zn?"zu":"auf")}catch{}},[Zn]);const wt=Es();a.useEffect(()=>{const t=new URLSearchParams(wt.search),n=t.get("tab")||"start";if(pt.some(s=>s.key===n)){O(n);return}O("start"),t.delete("tab"),r({pathname:wt.pathname,search:t.toString()?"?"+t.toString():""},{replace:!0})},[wt.search]);const Fe=t=>{O(t);const n=new URLSearchParams(window.location.search);t==="start"?n.delete("tab"):n.set("tab",t),r({pathname:"/social-studio",search:n.toString()?"?"+n.toString():""},{replace:!0})};a.useEffect(()=>{const t=new URLSearchParams(wt.search).get("kunde")||"";t&&t!==d&&x(t)},[wt.search]),a.useEffect(()=>{if(!d)return;const t=new URLSearchParams(window.location.search);t.get("kunde")!==d&&(t.set("kunde",d),r({pathname:"/social-studio",search:"?"+t.toString()},{replace:!0}))},[d]);const[Jr,Yr]=a.useState([]),[Qr,Xr]=a.useState([]),[es,ts]=a.useState(void 0),[ia,la]=a.use
2State(30),[oa,da]=a.useState(""),[ca,pa]=a.useState(new Set),[Wn,ns]=a.useState([]),[an,rs]=a.useState([]),[Ce,Vn]=a.useState(null),[ss,ln]=a.useState(!1),[_,on]=a.useState(null),[as,dn]=a.useState(!1),[Gn,Pt]=a.useState(""),[cn,qn]=a.useState(!0),[pn,is]=a.useState([]),[hn,un]=a.useState("projekte"),[Oe,jt]=a.useState(null),[yt,Me]=a.useState([]),[Re,At]=a.useState([]),[Bt,ls]=a.useState(!0),[V,zt]=a.useState({}),[Ee,Kt]=a.useState(""),[_n,rt]=a.useState(""),[$n,Nt]=a.useState(""),[Lt,Jn]=a.useState(!1),[se,Te]=a.useState(null),St=f[d.trim().toLowerCase()]||d,[ha,Yn]=a.useState("");a.useEffect(()=>{if(!d){Yn("");return}fetch(C+"/api/socialstudio/kundenort?kunde="+encodeURIComponent(d),{headers:A()}).then(t=>t.json()).then(t=>{t&&t.ok&&Yn(String(t.ort||""))}).catch(()=>{})},[d]);const[Ue,Qn]=a.useState(null);a.useEffect(()=>{let t=!0;if(zt({}),!d){zt({});return}return fetch(C+"/api/socialstudio/medientexte?kunde="+encodeURIComponent(St),{headers:A()}).then(n=>n.json()).then(n=>{t&&n&&n.ok&&zt(n.texte||{})}).catch(()=>{}),()=>{t=!1}},[d,St]);async function It(t,n){Kt(t.path),rt(""),Nt("");try{const s=await fetch(C+"/api/socialstudio/medientext-erzeugen",{method:"POST",headers:A({"Content-Type":"application/json"}),body:JSON.stringify({pfad:t.path,kunde:d,projekt:t.projekt||"",plattform:"instagram",neu:!!n}
2)}),o=await s.json().catch(()=>null);if(s.status===428){Nt(String(o&&o.error||"Kundensprache fehlt.")),Kt("");return}if(!o||!o.ok){rt(String(o&&o.error||"Der Text ließ sich nicht erzeugen.")),Kt("");return}zt(l=>({...l,[t.path]:{text:String(o.text||""),quellen:o.quellen||[]}})),Te({pfad:t.path,name:t.name})}catch(s){rt(String(s&&s.message||s))}Kt("")}async function os(){Jn(!0);try{const n=await(await fetch(C+"/api/socialstudio/kundensprache",{method:"POST",headers:A({"Content-Type":"application/json"}),body:JSON.stringify({kunde:d})})).json().catch(()=>null);!n||!n.ok?rt(String(n&&n.error||"Die Analyse ist nicht durchgelaufen.")):Nt("")}catch(t){rt(String(t&&t.message||t))}Jn(!1)}const gn=a.useRef(""),[mn,st]=a.useState(""),[xn,fn]=a.useState([]),[ds,Xn]=a.useState(!1),Ft=a.useCallback(()=>{d&&fetch(C+"/api/socialstudio/textentwurf?kunde="+encodeURIComponent(d),{headers:A()}).then(t=>t.json()).then(t=>{t&&t.ok&&fn(t.entwuerfe||[])}).catch(()=>{})},[d]),[c,T]=a.useState(null),bn=(fr=c==null?void 0:c.ergebnis)!=null&&fr.queued?c.ergebnis.jobId:null;a.useEffect(()=>{if(!bn||!c)return;const t=c.kanalIds.slice(),n=c.ergebnis.modus;return Us({load:async s=>{const o=await fetch(C+"/api/socialstudio/publish-status?jobId="+encodeURIComponent(bn),{headers:A(),signal:s}),l=await o.json();if(!o.ok||!l.ok)throw new Error("Status nicht verfügbar");return l},onStatus:s=>{if(s.result){const o=Er(s.result,!0,t,n);return o.complete?(b.current=!0,At([]),Ne(l=>l+1),T(l=>o.warnungen.length&&l?{...l,laeuft:!1,ergebnis:o}:null),ue(n==="schedule"?"Beitrag zur automatischen Veröffentlichung eingeplant.":"Entwurf gespeichert. Er wird nicht automatisch veröffentlicht."),window.setTimeout(()=>ue(""),7e3)):T(l=>l&&{...l,ergebnis:{...o,queued:!1,requiresReview:!0}}),!0}return["done","error","needs-review"].includes(s.state)?(T(o=>o&&{...o,ergebnis:{...o.ergebnis,queued:!1,requiresReview:!0,status:s.state,fehler:[s.message||"Keine vollständige Planungsbestätigung. Bitte in Postiz prüfen."]}}),!0):(T(o=>o&&{...o,ergebnis:{...o.ergebnis,progress:Number(s.progress)||0,progressMessage:s.message||"Medien werden vorbereitet/hochgeladen …"}}),!1)},onError:()=>T(s=>s&&{...s,ergebnis:{...s.ergebnis,progressMessage:"Status momentan nicht erreichbar. Wird erneut geprüft …"}})})},[bn]);async function er(t){if(!c||c.laeuft||c.ergebnis)return;const n=c.kanalIds.some(o=>{var l;return/^(youtube|tiktok)/.test(((l=Y.find(h=>h.id===o))==null?void 0:l.plattform)||"")}),s=Gs(t,c.datum,c.kanalIds,n,!!c.publicConfirmed);if(s){T(o=>o&&{...o,validationError:s});return}T(o=>o&&{...o,laeuft:!0,validationError:""});try{const o=await fetch(C+"/api/socialstudio/entwurf",{method:"POST",headers:A({"Content-Type":"application/json"}),body:JSON.stringify({kunde:d,modus:t,publicConfirmed:!!c.publicConfirmed,kanalIds:c.kanalIds,pfade:c.pfade,text:c.text,texte:c.texte,crops:Object.fromEntries(Object.entries(c.crops||{}).filter(([j])=>c.pfade.includes(j))),coauthors:c.personen,commentsEnabled:c.commentsEnabled!==!1,titelbildPfad:c.titelbildPfad||"",datum:c.datum.toISOString()})}),l=await o.json(),h=Er(l,o.ok,c.kanalIds,t);h.complete?(b.current=!0,At([]),Ne(j=>j+1),T(j=>h.warnungen.length&&j?{...j,laeuft:!1,ergebnis:h}:null),ue(t==="schedule"?"Beitrag zur automatischen Veröffentlichung eingeplant.":"Entwurf gespeichert. Er wird nicht automatisch veröffentlicht."),window.setTimeout(()=>ue(""),7e3)):(T(j=>j&&{...j,laeuft:!1,ergebnis:h}),(h.queued||h.ergebnisse.some(j=>j==null?void 0:j.ok))&&Ne(j=>j+1))}catch{T(o=>o&&{...o,laeuft:!1,ergebnis:{requiresReview:!0,fehler:["Keine sichere Antwort erhalten. Bitte zuerst in Postiz prüfen; nicht erneut senden."],ergebnisse:[]}})}}const kn=a.useMemo(()=>{const t=new Set(Y.filter(l=>Qt(l.kunde,d,f)).map(l=>l.id)),n=new Set(re.filter(l=>!l.kanalId||t.has(l.kanalId)).map(l=>{const h=new Date(l.datum);return pe(h)+"|"+h.getHours()}
2)),s=(Xe||[]).map(l=>({...l,d:new Date(l.datum)})).filter(l=>!isNaN(l.d.getTime())&&l.d.getTime()>Date.now()).sort((l,h)=>l.d.getTime()-h.d.getTime()),o=s.find(l=>!n.has(pe(l.d)+"|"+l.d.getHours()))||null;return{bloecke:s,frei:o,empf:s[0]||null}},[Y,re,Xe,d,f]);async function cs(){if(kn.frei)return new Date(kn.frei.d);const t=dt(new Date);for(const s of[t,new Date(t.getTime()+7*864e5)])if(!(s.getTime()===E.getTime()||!d))try{const l=await(await fetch(C+"/api/socialstudio/vorschlag?kunde="+encodeURIComponent(d)+"&von="+s.getTime(),{headers:A()})).json(),h=(l&&l.vorschlag||[]).map(j=>new Date(j.datum)).filter(j=>!isNaN(j.getTime())&&j.getTime()>Date.now()).sort((j,L)=>j.getTime()-L.getTime())[0];if(h)return h}catch{}const n=new Date(Date.now()+864e5);return n.setHours(18,0,0,0),n}async function ps(t,n){const s=await cs();T({pfade:t,datum:s,kanalIds:Y.filter(o=>Qt(o.kunde,d,f)&&!o.deaktiviert&&!le.has(o.id)).map(o=>o.id),text:n||V[t[0]]&&V[t[0]].text||"",schritt:1,texte:{},personen:[],commentsEnabled:!0,laeuft:!1,ergebnis:null}),Ft()}const[vn,wn]=a.useState(null);function jn(t,n){t.length&&(At(t),wn({pfade:t,text:n}),k!=="plan"&&Fe("plan"))}a.useEffect(()=>{if(!vn||k!=="plan"||Ie)return;if(ie){wn(null);return}if(!Y.length||d&&Hn!==d+"|"+E.getTime())return;const t=vn;wn(null),ps(t.pfade,t.text)},[vn,k,Ie,ie,Y,Hn,d,E]);const[Ot,Dt]=a.useState(null),[yn,tr]=a.useState(""),[at,zn]=a.useState(()=>new Date),[Ct,Nn]=a.useState(!1),[nr,Rt]=a.useState("");function rr(t){Dt(t),tr(t.volltext||t.text||""),zn(new Date(t.datum)),Rt("")}async function hs(){if(Ot){Nn(!0),Rt("");try{const n=await(await fetch(C+"/api/socialstudio/entwurf-aendern",{method:"POST",headers:A({"Content-Type":"application/json"}),body:JSON.stringify({id:Ot.id,text:yn,datum:at.toISOString()})})).json().catch(()=>null);if(!n||!n.ok){Rt(String(n&&n.error||"Das Speichern hat nicht geklappt.")),Nn(!1);return}Dt(null),ue(n.warnung?String(n.warnung):"Entwurf geändert."),window.setTimeout(()=>ue(""),n.warnung?9e3:3500),Ne(s=>s+1)}catch(t){Rt(String(t&&t.message||t))}Nn(!1)}}const[us,gs]=a.useState(()=>typeof window<"u"?window.innerHeight:900),ms=a.useMemo(()=>{const t=new Date(E.getTime()+5184e5);return E.toLocaleDateString("de-DE",{day:"2-digit",month:"short"})+" – "+t.toLocaleDateString("de-DE",{day:"2-digit",month:"short",year:"numeric"})},[E]);a.useEffect(()=>{const t=()=>gs(window.innerHeight);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]);const[oe,xs]=a.useState(null),[Sn,fs]=a.useState(""),[sr,bs]=a.useState([]),He=De!=null&&De.email?"ss-start-layout:v2:"+De.email.trim().toLowerCase():"",[ar,ks]=a.useState(""),[he,it]=a.useState(()=>Rr("")),[Pe,ir]=a.useState(!1),[vs,Dn]=a.useState(!1),[Ut,Cn]=a.useState(""),{perms:ws}=Ts(),lr=Ks(De,ws,"kalender");a.useEffect(()=>{it(Rr(He)),ks(He)},[He]),a.useEffect(()=>{if(He&&ar===He)try{localStorage.setItem(He,JSON.stringify(he))}catch{}},[he,He,ar]);const Ze=t=>({onDragOver:n=>{Pe&&Ut&&n.preventDefault()},onDrop:n=>{if(!Pe||!Ut)return;n.preventDefault();const s=Ut;Cn(""),it(o=>{if(s===t)return o;const l=o.reihe.filter(h=>h!==s);return l.splice(l.indexOf(t),0,s),{...o,reihe:l}})}}),or=(t,n)=>it(s=>{const o=s.reihe.slice(),l=o.indexOf(t),h=l+n;if(l<0||h<0||h>=o.length)return s;const j=o[l];return o[l]=o[h],o[h]=j,{...s,reihe:o}}),dr=t=>it(n=>({...n,aus:n.aus.indexOf(t)>=0?n.aus.filter(s=>s!==t):n.aus.concat([t])})),js=()=>{const t={hp:!0,anz:!!oe&&!Sn,neu:pn.length>0,vorlauf:!0,wettbewerb:an.length>0,fertig:!0};return he.reihe.find(n=>(Pe||he.aus.indexOf(n)<0)&&(Pe||t[n]))||""},We=t=>"ss-widget"+(he.aus.indexOf(t)>=0?" ss-widget-aus":"")+(Pe?" ss-widget-edit":"")+(Ut===t?" is-dragging":"")+(js()===t?" ss-widget-erst":""),Ve=t=>({order:he.reihe.indexOf(t),gridColumn:he.halb.includes(t)?"span 1":"1 / -1"}),xe=t=>he.aus.indexOf(t)<0,Ge=t=>{if(!Pe)return null;const n=en.find(l=>l.id===t),s=he.reihe.indexOf(t),o=he.aus.indexOf(t)>=0;return e.jsxs("div",{className:"ss-widget-leiste",children:[e.jsxs("span",{draggable:!0,onDragStart:l=>{Cn(t),l.dataTransfer.setData("text/plain",t),l.dataTransfer.effectAllowed="move"},onDragEnd:()=>Cn(""),className:"ss-widget-titel",style:{cursor:"grab"},title:"Mit der Maus verschieben",children:["⠿ ",n?n.titel:t,o?" · ausgeblendet":""]}),e.jsx("button",{type:"button",onClick:()=>it(l=>({...l,halb:l.halb.includes(t)?l.halb.filter(h=>h!==t):[...l.halb,t]})),children:he.halb.includes(t)?"Volle Breite":"Halbe Breite"}),e.jsx("button",{type:"button",disabled:s<=0,onClick:()=>or(t,-1),"aria-label":"Nach oben",title:"Nach oben",children:"↑"}),e.jsx("button",{type:"button",disabled:s>=he.reihe.length-1,onClick:()=>or(t,1),"aria-label":"Nach unten",title:"Nach unten",children:"↓"}),e.jsx("button",{type:"button",onClick:()=>dr(t),children:o?"Einblenden":"Ausblenden"})]})},cr=a.useMemo(()=>{const t=ye.filter(n=>n.tage!=null).sort((n,s)=>n.tage-s.tage)[0];return!t||t.tage==null?"":t.firma+(t.tage<0?" (überfällig)":" ("+t.tage+" Tage)")},[ye]),Ht=ta(De==null?void 0:De.fullName),[pr,hr]=a.useState("");a.useEffect(()=>{hr("");let t=0;const n=setInterval(()=>{t+=1,hr(Ht.slice(0,t)),t>=Ht.length&&clearInterval(n)},42);return()=>clearInterval(n)},[Ht]);
2const[Ae,Mn]=a.useState(null),[ur,Be]=a.useState(null),[ys,En]=a.useState(!1),lt=t=>({src:t.type==="video"?In(t):ke(t,!0),poster:t.type==="video"?ke(t,!0):"",video:t.type==="video",name:ce(t.name)}),[Zt,ue]=a.useState(""),Wt=a.useRef(""),[gr,ua]=a.useState(!1),[zs,Ns]=a.useState(""),[mr,Ss]=a.useState(!1);a.useEffect(()=>{fetch(C+"/api/socialstudio/kunden"+(gr?"?alle=1":""),{headers:A()}).then(t=>t.json()).then(t=>{const n=t&&t.kunden||[];m(n),g((t==null?void 0:t.parentCustomers)||{}),Ns(String(t&&t.hinweis||"")),x(s=>s&&n.includes(s)?s:n[0]||"")}).catch(()=>ee("Die Kundenliste ließ sich nicht laden."))},[gr]),a.useEffect(()=>{let t=!0;if(vt(null),sn(new Set),!d){N([]),U({}),S("");return}X(!0),ee(""),N([]),S(""),fetch(C+"/api/content/status?kunde="+encodeURIComponent(St),{headers:A()}).then(s=>s.json()).then(s=>t&&U(s&&s.online||{})).catch(()=>{t&&U({})});const n=M>W.current;return W.current=M,fetch(C+"/api/media/list?kunde="+encodeURIComponent(St)+(n?"&refresh=1":""),{headers:A()}).then(s=>s.json()).then(s=>{t&&(X(!1),s&&s.media?N(s.media):ee(s&&s.error||"Für diesen Kunden liegen keine Medien in der Dropbox."),S(d))}).catch(()=>{t&&(X(!1),ee("Die Medien ließen sich nicht laden."),S(d))}),()=>{t=!1}},[d,St,M]),a.useEffect(()=>{fetch(C+"/api/socialstudio/start",{headers:A()}).then(t=>t.json()).then(t=>{qn(!1),!(!t||!t.ok)&&(Yr(t.top7||[]),Xr(t.top30||[]),ts(Array.isArray(t.top90)?t.top90:void 0),ns(t.projekte||[]),rs(t.wettbewerb||[]))}).catch(()=>qn(!1))},[]),a.useEffect(()=>{k!=="ideen"||!d||(ln(!0),Vn(null),fetch(C+"/api/socialstudio/empfehlungen?kunde="+encodeURIComponent(d),{headers:A()}).then(t=>t.json()).then(t=>{ln(!1),t&&t.ok&&Vn(t)}).catch(()=>ln(!1)))},[k,d]),a.useEffect(()=>{if(k!=="auswertung"||!d){on(null),Pt("");return}let t=!1;return dn(!0),on(null),Pt(""),fetch(C+"/api/socialstudio/auswertung?kunde="+encodeURIComponent(d),{headers:A()}).then(n=>n.json()).then(n=>{t||(dn(!1),n&&n.ok?on(n):Pt(String(n&&n.error||"Die Auswertung ließ sich nicht laden.")))}).catch(()=>{t||(dn(!1),Pt("Die Auswertung ließ sich nicht laden."))}),()=>{t=!0}},[k,d]),a.useEffect(()=>{k==="start"&&fetch(C+"/api/socialstudio/anzeigen",{headers:A()}).then(t=>t.json()).then(t=>{if(!t||!t.ok)return;xs(t.totals||null),fs(String(t.hinweis||""));const n=[];for(const s of Array.isArray(t.laufend)?t.laufend:[]){const o=String(s&&s.kunde||"").trim();o&&n.indexOf(o)<0&&n.push(o)}bs(n)}).catch(()=>{})},[k]),a.useEffect(()=>{k==="start"&&fetch(C+"/api/socialstudio/neue?limit=60",{headers:A()}).then(t=>t.json()).then(t=>{t&&t.ok&&is(t.stuecke||[])}).catch(()=>{})},[k]);const qe=a.useMemo(()=>Br(v),[v]),[Vt,Tn]=a.useState(null);a.useEffect(()=>{!Vt||k!=="medien"||D||p!==d||(qe.some(t=>t.projekt===Vt)&&(rn("projekte"),vt(Vt)),Tn(null))},[Vt,k,D,p,d,qe]);const Gt=a.useMemo(()=>{const t=bt.trim().toLowerCase();return v.filter(n=>tt==="video"&&n.type!=="video"||tt==="bild"&&n.type==="video"||nt&&K[n.path]?!1:t?(String(n.name||"")+" "+String(n.project||"")).toLowerCase().includes(t):!0)},[v,bt,tt,nt,K]),qt=a.useMemo(()=>{if(!bt.trim()&&tt==="alle"&&!nt)return qe;const t=new Set(Gt.map(n=>n.path));return Br(v.filter(n=>t.has(n.path)))},[qe,Gt,v,bt,tt,nt]),_e=a.useMemo(()=>{const t=Gt.slice();return t.sort((n,s)=>{const o=ht(n.path)||ht(n.project||""),l=ht(s.path)||ht(s.project||"");return o!==l?l.localeCompare(o):String(n.name).localeCompare(String(s.name),"de",{numeric:!0})||n.path.localeCompare(s.path)}),t},[Gt]);function xr(t,n){var l;const s=Se==="einzeln"?_e:kt?((l=qt.find(h=>h.projekt===kt))==null?void 0:l.items)||[]:_e,o=!K[t.path];if(n.shiftKey&&Wt.current){const h=s.findIndex(L=>L.path===Wt.current),j=s.findIndex(L=>L.path===t.path);if(h>=0&&j>=0){const[L,$]=h<j?[h,j]:[j,h];ot(s.slice(L,$+1).map($e=>$e.path),o),Wt.current=t.path;return}}Wt.current=t.path,ot([t.path],o)}async function ot(t,n){if(t.length){U(s=>{const o={...s};for(const l of t)n?o[l]=Date.now():delete o[l];return o});try{await fetch(C+"/api/content/status",{method:"POST",headers:A({"Content-Type":"application/json"}),body:JSON.stringify({kunde:d,paths:t,online:n})}
2),ue(t.length+(t.length===1?" Medium ":" Medien ")+(n?"als online markiert.":"zurückgesetzt.")),window.setTimeout(()=>ue(""),2600)}catch{ue("Der Status ließ sich nicht speichern.")}}}return a.useMemo(()=>{const t=v.filter(s=>s.type==="video").length,n=v.filter(s=>K[s.path]).length;return{gesamt:v.length,videos:t,bilder:v.length-t,drin:n}},[v,K]),e.jsxs("div",{className:"ss-root",children:[e.jsx("div",{className:"ss-kopf",children:e.jsx("div",{className:"ss-kopf-links",children:e.jsx("h1",{className:"ss-titel",children:(pt.find(t=>t.key===k)||pt[0]).label})})}),e.jsxs("div",{className:"ss-layout"+(((br=pt.find(t=>t.key===k))==null?void 0:br.kunde)===!1?" ss-layout-ohne-kunde":""),children:[e.jsxs("aside",{className:"ss-side",children:[e.jsxs("nav",{className:"ss-nav","aria-label":"Marketing Cockpit",children:[e.jsxs("a",{href:"/dashboard",className:"ss-nav-punkt ss-nav-zurueck",title:"Zurück zum Dashboard",onClick:t=>{t.preventDefault(),r("/dashboard")},children:[e.jsx("span",{className:"ss-nav-zeichen",children:e.jsx(Or,{art:"dashboard"})}),e.jsx("span",{className:"ss-nav-text",children:"Dashboard"})]}),pt.filter(t=>t.nav).map(t=>e.jsxs("button",{type:"button","aria-current":k===t.key?"page":void 0,title:t.label,className:"ss-nav-punkt"+(k===t.key?" ss-nav-an":""),onClick:()=>Fe(t.key),children:[e.jsx("span",{className:"ss-nav-zeichen",children:e.jsx(Or,{art:t.key})}),e.jsx("span",{className:"ss-nav-text",children:t.label})]},t.key))]}),e.jsxs("div",{className:"ss-kundenwahl",style:((kr=pt.find(t=>t.key===k))==null?void 0:kr.kunde)===!1?{display:"none"}:void 0,children:[e.jsx("div",{className:"ss-side-kopf",children:e.jsx("span",{className:"ss-side-titel",children:"Kunde"})}),e.jsxs("div",{className:"ss-side-liste",children:[(mr?i:i.slice(0,15).concat(d&&i.indexOf(d)>=15?[d]:[])).map(t=>e.jsxs("button",{type:"button",className:"ss-side-zeile"+(d===t?" ss-side-zeile-an":""),onClick:()=>x(t),children:[e.jsx("span",{className:"ss-side-logo",children:e.jsx(Mt,{client:t,initials:t.replace(/[^A-Za-zÄÖÜäöü ]/g,"").trim().split(/\s+/).slice(0,2).map(n=>n[0]||"").join("").toUpperCase()||"?",imgClassName:"ss-side-logo-img",phClassName:"ss-side-logo-ini"})}),e.jsx("span",{className:"ss-side-name",children:t})]},t)),!i.length&&e.jsx("div",{className:"ss-leer",children:zs||"Kundenliste wird geladen…"}),i.length>15&&e.jsx("button",{type:"button",className:"ss-side-mehr",onClick:()=>Ss(t=>!t),children:mr?"Weniger anzeigen":"Mehr anzeigen ("+(i.length-15)+")"})]}),e.jsxs("a",{className:"ss-konfig",href:"https://platform.postiz.com/launches",target:"_blank",rel:"noreferrer",children:[e.jsxs("svg",{viewBox:"0 0 24 24",width:"13",height:"13",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"3"}),e.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.6a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]}),"Konfiguration"]})]})]}),e.jsxs("main",{className:"ss-haupt",children:[k==="medien"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"ss-werkzeug",children:[e.jsxs("div",{className:"ss-umschalt",role:"tablist","aria-label":"Ansicht",children:[e.jsx("button",{type:"button",role:"tab","aria-selected":Se==="projekte",className:"ss-tab"+(Se==="projekte"?" ss-tab-an":""),onClick:()=>{rn("projekte"),sn(new Set)},children:"Projekte"}),e.jsx("button",{type:"button",role:"tab","aria-selected":Se==="einzeln",className:"ss-tab"+(Se==="einzeln"?" ss-tab-an":""),onClick:()=>{rn("einzeln"),vt(null),sn(new Set)}
2,children:"Alle Medien"})]}),e.jsx("input",{className:"ss-suche",placeholder:"Projekt oder Dateiname suchen…",value:bt,onChange:t=>qr(t.target.value)}),e.jsxs("div",{className:"ss-filter",children:[[["alle","alles"],["video","nur Videos"],["bild","nur Fotos"]].map(([t,n])=>e.jsx("button",{type:"button",className:"ss-filter-knopf"+(tt===t?" ss-filter-an":""),onClick:()=>_r(t),children:n},t)),e.jsx("button",{type:"button",className:"ss-filter-knopf"+(nt?" ss-filter-an":""),onClick:()=>$r(!nt),children:"noch offen"})]})]}),Zt&&e.jsx("div",{className:"ss-meldung",children:Zt}),J&&e.jsx("div",{className:"ss-fehler",children:J}),D&&e.jsx("div",{className:"ss-leer",children:"Medien werden geladen…"}),!D&&Se==="projekte"&&!kt&&e.jsxs("div",{className:"ss-projekte",children:[qt.map(t=>{const n=Bn(t.items,K),s=n.gesamt&&n.drin===n.gesamt?"#3ecf9a":n.drin?"#e8c14a":"rgba(255,255,255,.28)";return e.jsxs("button",{type:"button",className:"ss-projekt",onClick:()=>vt(t.projekt),children:[e.jsxs("span",{className:"ss-projekt-bild"+(n.gesamt&&n.drin===n.gesamt?" ss-projekt-fertig":""),children:[t.cover?e.jsx("img",{src:t.cover,alt:"",loading:"lazy"}):e.jsx("span",{className:"ss-kachel-leer",children:"ohne Bild"}),n.gesamt>0&&n.drin===n.gesamt?e.jsx("span",{className:"ss-projekt-haken","aria-label":"alles online",children:e.jsx("svg",{viewBox:"0 0 24 24",width:"26",height:"26",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("path",{d:"M4 12.5l5.2 5.2L20 7"})})}):null]}),e.jsxs("span",{className:"ss-projekt-text",children:[e.jsx("span",{className:"ss-projekt-name",children:t.projekt}),e.jsxs("span",{className:"ss-projekt-meta",children:[t.nVideo?t.nVideo+" Videos":"",t.nVideo&&t.nBild?" · ":"",t.nBild?t.nBild+" Fotos":"",t.datum?" · "+Ar(t.datum):""]}),e.jsxs("span",{className:"ss-projekt-stand",children:[e.jsx("span",{className:"ss-punkt",style:{background:s},"aria-hidden":"true"}),n.gesamt?n.drin+" von "+n.gesamt+" online":"nichts zu zeigen",e.jsx("span",{className:"ss-balken",children:e.jsx("i",{style:{width:n.prozent+"%",background:s}})})]})]})]},t.projekt)}),!qt.length&&e.jsx("div",{className:"ss-leer",children:"Nichts gefunden."})]}),!D&&Se==="projekte"&&kt&&(()=>{const t=qt.find(s=>s.projekt===kt);if(!t)return e.jsx("div",{className:"ss-leer",children:"Dieses Projekt ist gerade ausgefiltert."});const n=Bn(t.items,K);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"ss-zurueck",children:[e.jsx("button",{type:"button",className:"ss-knopf ss-knopf-still",onClick:()=>vt(null),children:"← Alle Projekte"}),e.jsx("span",{className:"ss-zurueck-name",children:t.projekt}),e.jsxs("span",{className:"ss-zurueck-meta",children:[n.drin," von ",n.gesamt," online"]}),e.jsxs("span",{className:"ss-zurueck-akt",children:[e.jsx("button",{type:"button",className:"ss-knopf ss-knopf-still",onClick:()=>ot(t.items.map(s=>s.path),!0),children:"alle online"}),e.jsx("button",{type:"button",className:"ss-knopf ss-knopf-still",onClick:()=>ot(t.items.map(s=>s.path),!1),children:"alle zurücksetzen"})]})]}),e.jsxs("div",{className:"ss-mit-vorschau",children:[e.jsx("div",{className:"ss-raster",children:t.items.map(s=>e.jsx(Kr,{m:s,online:!!K[s.path],gewaehlt:!1,imBlick:(Ae==null?void 0:Ae.path)===s.path,hatText:!!V[s.path],textLaeuft:Ee===s.path,aufText:o=>V[o.path]?Te({pfad:o.path,name:ce(o.name)}):It({path:o.path,name:ce(o.name),projekt:o.project||""}),aufWahl:xr,aufVorschau:Mn},s.path))}),e.jsx(Lr,{m:Ae,online:K,setzeStatus:ot,aufAnsehen:s=>Be(lt(s)),aufBeitrag:s=>jn([s.path],V[s.path]&&V[s.path].text||"")})]})]})})(),!D&&Se==="einzeln"&&e.jsxs("div",{className:"ss-mit-vorschau",children:[e.jsxs("div",{className:"ss-raster",children:[_e.map(t=>e.jsx(Kr,{m:t,online:!!K[t.path],gewaehlt:!1,imBlick:(Ae==null?void 0:Ae.path)===t.path,hatText:!!V[t.path],textLaeuft:Ee===t.path,aufText:n=>V[n.path]?Te({pfad:n.path,name:ce(n.name)}):It({path:n.path,name:ce(n.name),projekt:n.project||""}),aufWahl:xr,aufVorschau:Mn},t.path)),!_e.length&&e.jsx("div",{className:"ss-leer",children:"Nichts gefunden."})]}),e.jsx(Lr,{m:Ae,online:K,setzeStatus:ot,aufAnsehen:t=>Be(lt(t)),aufBeitrag:t=>jn([t.path],V[t.path]&&V[t.path].text||"")})]})]}),k==="start"&&e.jsxs("div",{className:"ss-start ss-start-widgets",children:[e.jsxs("div",{className:"ss-hero-offen",children:[e.jsx("div",{className:"ss-hero-licht","aria-hidden":"true"}),e.jsxs("div",{className:"ss-hero-links",children:[e.jsxs("h2",{className:"ss-gruss-titel",children:[pr||" ",pr.length<Ht.length&&e.jsx("span",{className:"ss-caret","aria-hidden":"true"})]}),e.jsxs("p",{className:"ss-gruss-text",children:[new Date().toLocaleDateString("de-DE",{weekday:"long",day:"numeric",month:"long"})," · ",i.length," ",i.length===1?"Kunde":"Kunden"," in Pflege",cr?" · knapp: "+cr:""]})]})]}),e.jsxs("section",{...Ze("hp"),className:We("hp"),style:Ve("hp"),children:[Ge("hp"),xe("hp")&&e.jsx(e.Fragment,{children:e.jsx(Ps,{data:{top7:Jr,top30:Qr,top90:es},loading:cn})})]}),e.jsxs("section",{...Ze("anz"),className:We("anz"),style:Ve("anz"),children:[Ge("anz"),xe("anz")&&e.jsxs(e.Fragment,{children:[oe&&!Sn&&oe.mode!=="live"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"ss-abschnitt",children:[e.jsxs("div",{className:"ss-anz-eyebrow",children:[e.jsx("span",{className:"ss-anz-dot ss-anz-dot-still","aria-hidden":"true"}),"Werbeanzeigen aller Kunden"]}),e.jsx("h2",{className:"ss-anz-titel",children:"Aktuell läuft keine Anzeige"})]}),e.jsx("div",{className:"ss-anz-leer",children:e.jsxs("button",{type:"button",className:"ss-anz-planen",onClick:()=>Pn(An),children:["Jetzt nächste Anzeige planen ",e.jsx("span",{"aria-hidden":"true",children:"→"})]})})]}),oe&&oe.mode==="live"&&!Sn&&(()=>{const t=oe.clicks>0?oe.spend/oe.clicks:0,n=[{l:"Ausgaben",v:na(oe.spend)},{l:"Webseiten-Klicks",v:Le(oe.clicks)},{l:"Impressionen",v:Le(oe.impressions)},{l:"Reichweite",v:Le(oe.reach)},{l:"Preis pro Klick",v:t>0?ra(t):"—"}];return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"ss-abschnitt",children:[e.jsxs("div",{className:"ss-anz-eyebrow",children:[e.jsx("span",{className:"ss-anz-dot","aria-hidden":"true"}),"Werbeanzeigen aller Kunden · live"]}),e.jsxs("h2",{className:"ss-anz-titel",children:[oe.live," ",oe.live===1?"Anzeige läuft":"Anzeigen laufen"," gerade"]}),!!sr.length&&e.jsx("div",{className:"ss-anz-kunden",children:sr.map(s=>e.jsxs("span",{className:"ss-anz-kunde",children:[e.jsx("span",{className:"ss-anz-kunde-logo",children:e.jsx(Mt,{client:s,initials:s.replace(/[^A-Za-z
2ÄÖÜäöü ]/g,"").trim().split(/\s+/).slice(0,2).map(o=>o[0]||"").join("").toUpperCase()||"?",imgClassName:"ss-side-logo-img",phClassName:"ss-side-logo-ini"})}),s]},s))})]}),e.jsxs("div",{className:"ss-anz-raster",children:[n.map(s=>e.jsxs("div",{className:"ss-anz-kachel",children:[e.jsx("div",{className:"ss-anz-kl",children:s.l}),e.jsx("div",{className:"ss-anz-kv",children:s.v})]},s.l)),e.jsxs("a",{className:"ss-anz-kachel ss-anz-kachel-link",href:An,target:"_blank",rel:"noreferrer",onClick:s=>{s.preventDefault(),Pn(An)},children:[e.jsx("div",{className:"ss-anz-kl",children:"Mehr"}),e.jsxs("div",{className:"ss-anz-kv ss-anz-kv-link",children:[e.jsx("span",{className:"ss-meta-ico","aria-hidden":"true",children:e.jsx("svg",{viewBox:"0 0 24 24",width:"15",height:"15",fill:"currentColor",children:e.jsx("path",{d:"M6.9 5.2c-2.2 0-3.6 2.3-3.6 5 0 2.8 1.4 4.7 3.2 4.7 1.5 0 2.5-1.1 3.9-3.5l1-1.8c.3-.6.7-1.2 1-1.8.5.9 1.1 2 1.6 3l.8 1.5c1.4 2.4 2.3 2.6 3.3 2.6 2 0 3.2-1.9 3.2-4.9 0-2.9-1.5-5-3.6-5-1.4 0-2.5.9-3.8 3.1-.9-1.5-1.7-2.4-2.5-2.9-.9-.7-1.7-1-2.6-1zm0 1.9c.6 0 1.2.3 1.9 1 .4.4.9 1 1.4 1.9l-.5.9c-1.3 2.2-1.8 2.7-2.5 2.7-.8 0-1.5-1.1-1.5-2.9 0-2.1.8-3.6 1.2-3.6zm10.3 0c.5 0 1.4 1.4 1.4 3.5 0 1.9-.6 3-1.4 3-.6 0-1.1-.4-2.1-2.1l-.9-1.6c1-1.9 1.9-2.8 3-2.8z"})})}),"Ad Manager ",e.jsx("span",{className:"ss-anz-pfeil","aria-hidden":"true",children:"→"})]})]})]})]})})()]})]}),e.jsxs("section",{...Ze("neu"),className:We("neu"),style:Ve("neu"),children:[Ge("neu"),xe("neu")&&!!pn.length&&(()=>{const t=[],n={};for(const s of pn){const o=s.kunde+"|"+(s.projekt||"");n[o]==null&&(n[o]=t.length,t.push({schl:o,kunde:s.kunde,projekt:s.projekt||"",stuecke:[]})),t[n[o]].stuecke.push(s)}return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"ss-abschnitt",children:[e.jsx("h2",{className:"ss-h2",children:"Neue Content Pieces"}),e.jsx("p",{className:"ss-lead",children:"Seit dem letzten Durchlauf neu in den Kundenordnern (geprüft um 6 und 14 Uhr) und noch nicht eingeplant."})]}),e.jsx("div",{className:"ss-bahn",children:t.map(s=>{const o=s.stuecke.find(l=>l.art==="video")||s.stuecke[0];return e.jsx("button",{type:"button",className:"ss-top ss-neu ss-neu-ordner",title:(s.projekt||"Ohne Projekt")+(s.kunde?" · "+s.kunde:""),onClick:()=>{s.kunde&&x(s.kunde),s.projekt&&Tn(s.projekt),Fe("medien")},children:e.jsxs("span",{className:"ss-top-bild",children:[e.jsx("img",{src:C+"/api/media/thumb?sz=sm&path="+encodeURIComponent(o.pfad)+(o.sig?"&sig="+encodeURIComponent(o.sig)+"&exp="+o.exp:""),alt:"",loading:"lazy",onError:l=>{l.currentTarget.style.display="none"}}),s.kunde?e.jsx("span",{className:"ss-top-logo",children:e.jsx(Mt,{client:s.kunde,initials:s.kunde.replace(/[^A-Za-zÄÖÜäöü ]/g,"").trim().split(/\s+/).slice(0,2).map(l=>l[0]||"").join("").toUpperCase()||"?",imgClassName:"ss-side-logo-img",phClassName:"ss-side-logo-ini"})}):null,e.jsxs("span",{className:"ss-neu-zahl",children:[e.jsx("svg",{viewBox:"0 0 24 24",width:"11",height:"11",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M3 6.5A2.5 2.5 0 0 1 5.5 4h3.6c.6 0 1.2.25 1.6.7l1.3 1.3h6.5A2.5 2.5 0 0 1 21 8.5v9A2.5 2.5 0 0 1 18.5 20h-13A2.5 2.5 0 0 1 3 17.5z"})}),s.stuecke.length," neu"]}),e.jsxs("span",{className:"ss-top-unten",children:[e.jsx("span",{className:"ss-top-konto2",children:s.projekt||"Ohne Projekt"}),e.jsx("span",{className:"ss-top-meta2",children:s.kunde})]})]})},s.schl)})})]})})()]}),e.jsxs("section",{...Ze("vorlauf"),className:We("vorlauf"),style:Ve("vorlauf"),children:[Ge("vorlauf"),xe("vorlauf")&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"ss-abschnitt",children:e.jsx("h2",{className:"ss-h2",children:"Content geplant bis"})}),et&&e.jsx("div",{className:"ss-leer",children:"wird geladen…"}),e.jsxs("div",{className:"ss-vorlauf",children:[ye.map(t=>{const n=t.tage,s=n==null?0:Math.max(0,Math.min(100,Math.round(n/60*100))),o=n==null?"rgba(255,255,255,.22)":n<=7?"#e04b3c":n<=30?"#e8c14a":"#3ecf9a",l=n==null?"kein Datum hinterlegt":n<0?"seit "+Math.abs(n)+" Tagen abgelaufen":n===0?"läuft heute aus":"noch "+n+(n===1?" Tag":" Tage"),h=String(t.setName||"").trim(),j=!!h&&h.toLowerCase()!==String(t.firma||"").trim().toLowerCase(),L=t.seiten||[];return e.jsxs("button",{type:"button",className:"ss-vorlauf-zeile",onClick:()=>{x(t.firma),Fe("plan")},title:"Posting-Kalender dieses Kunden öffnen",children:[e.jsx("span",{className:"ss-vorlauf-logo",children:e.jsx(Mt,{client:t.firma,initials:t.firma.replace(/[^A-Za-z
2ÄÖÜäöü ]/g,"").trim().split(/\s+/).slice(0,2).map($=>$[0]||"").join("").toUpperCase()||"?",imgClassName:"ss-side-logo-img",phClassName:"ss-side-logo-ini"})}),e.jsxs("span",{className:"ss-vorlauf-mitte",children:[e.jsxs("span",{className:"ss-vorlauf-name",children:[t.firma,j?e.jsx("span",{className:"ss-vorlauf-set",children:h}):null]}),e.jsx("span",{className:"ss-balken ss-balken-breit",children:e.jsx("i",{style:{width:Math.max(3,s)+"%",background:o}})})]}),e.jsxs("span",{className:"ss-vorlauf-rechts",children:[e.jsx("span",{className:"ss-vorlauf-tage",style:{color:o},children:l}),e.jsxs("span",{className:"ss-vorlauf-takt",children:[t.proWoche?t.proWoche+" Beiträge/Woche":"Takt nicht hinterlegt",t.bis?" · bis "+new Date(t.bis+"T12:00:00").toLocaleDateString("de-DE",{day:"numeric",month:"short"}):"",L.length?" · "+L.length+(L.length===1?" Seite":" Seiten"):"",e.jsx("span",{role:"button",tabIndex:0,className:"ss-vorlauf-zahn",title:"„Content läuft bis“ in der Kundenakte pflegen",onClick:$=>{$.stopPropagation(),r(Pr(t.firma))},onKeyDown:$=>{($.key==="Enter"||$.key===" ")&&($.stopPropagation(),r(Pr(t.firma)))},children:e.jsxs("svg",{viewBox:"0 0 24 24",width:"13",height:"13",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"3"}),e.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.6a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]})})]})]})]},t.firma+"|"+(t.setId||""))}),!et&&!ye.length&&e.jsx("div",{className:"ss-leer",children:'Kein Kunde hat „Content eingeplant bis" in der Kundenakte gesetzt.'})]})]})]}),e.jsxs("section",{...Ze("wettbewerb"),className:We("wettbewerb"),style:Ve("wettbewerb"),children:[Ge("wettbewerb"),xe("wettbewerb")&&e.jsx(e.Fragment,{children:!!an.length&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"ss-abschnitt",children:[e.jsx("h2",{className:"ss-h2",children:"Was die anderen machen"}),e.jsx("p",{className:"ss-lead",children:"Die jüngsten Beiträge der beobachteten Wettbewerber."})]}),e.jsx("div",{className:"ss-bahn",children:an.map(t=>e.jsxs("a",{className:"ss-top",href:t.link||void 0,target:"_blank",rel:"noreferrer",title:(t.firma||t.konto)+(t.gegen?" · Wettbewerber von "+t.gegen:""),children:[e.jsxs("span",{className:"ss-top-bild",children:[t.bild?e.jsxs(e.Fragment,{children:[e.jsx("img",{src:Ln(t.id,t.bild),alt:"",loading:"lazy",onError:n=>{const s=n.currentTarget;s.style.display="none";const o=s.parentElement&&s.parentElement.querySelector(".ss-top-ohne");o&&(o.style.display="flex")}}),e.jsx("span",{className:"ss-top-ohne","aria-hidden":"true",children:"Bild nicht mehr verfügbar"})]}):e.jsx("span",{className:"ss-top-leer",children:"kein Bild"}),t.thema?e.jsx("span",{className:"ss-top-thema",children:t.thema}):null]}),e.jsxs("span",{className:"ss-top-fuss",children:[e.jsx("span",{className:"ss-top-konto",children:t.firma||"@"+t.konto}),e.jsxs("span",{className:"ss-top-meta",children:[t.gegen?"gegen "+t.gegen:"@"+t.konto,t.wann?" · "+new Date(t.wann+(t.wann.length<=10?"T12:00:00":"")).toLocaleDateString("de-DE",{day:"numeric",month:"short"}):""]})]})]},t.id))})]})})]}),e.jsxs("section",{...Ze("fertig"),className:We("fertig"),style:Ve("fertig"),children:[Ge("fertig"),xe("fertig")&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"ss-abschnitt",children:e.jsx("h2",{className:"ss-h2",children:"Kürzlich abgeschlossene Projekte"})}),cn?e.jsx("div",{className:"ss-bahn",children:Array.from({length:7}).map((t,n)=>e.jsx("div",{className:"ss-skel ss-skel-quad"},n))}):null,!cn&&e.jsxs("div",{className:"ss-bahn",children:[Wn.map(t=>e.jsx("button",{type:"button",className:"ss-proj",onClick:()=>{t.kunde&&x(t.kunde),Tn(t.name),Fe("medien")},title:t.name+(t.kunde?" · "+t.kunde:""),children:e.jsxs("span",{className:"ss-proj-bild",children:[t.bild?e.
2jsx("img",{src:On(t.bild),alt:"",loading:"lazy"}):e.jsx("span",{className:"ss-top-leer",children:t.kunde||"Projekt"}),t.kunde?e.jsx("span",{className:"ss-top-logo",children:e.jsx(Mt,{client:t.kunde,initials:t.kunde.replace(/[^A-Za-zÄÖÜäöü ]/g,"").trim().split(/\s+/).slice(0,2).map(n=>n[0]||"").join("").toUpperCase()||"?",imgClassName:"ss-side-logo-img",phClassName:"ss-side-logo-ini"})}):null,e.jsx("span",{className:"ss-top-unten",children:e.jsx("span",{className:"ss-proj-name2",children:t.name})})]})},t.id)),!Wn.length&&e.jsx("div",{className:"ss-leer",children:"Noch kein Projekt als abgeschlossen markiert."})]})]})]}),lr&&e.jsxs("section",{...Ze("kalender"),className:We("kalender"),style:Ve("kalender"),children:[Ge("kalender"),xe("kalender")&&e.jsx(As,{})]}),Pe&&vs&&e.jsxs("div",{className:"ss-widget-library",style:{order:-1,gridColumn:"1 / -1"},children:[e.jsx("h2",{children:"Bausteine hinzufügen"}),en.filter(t=>t.id!=="kalender"||lr).map(t=>e.jsxs("button",{type:"button",disabled:xe(t.id),onClick:()=>{dr(t.id),Dn(!1)},children:[t.titel,xe(t.id)?" ✓":" +"]},t.id))]}),e.jsx("div",{className:"ss-start-fuss",children:Pe?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"ss-knopf ss-knopf-still",onClick:()=>it({reihe:en.map(t=>t.id),aus:["kalender"],halb:[]}),children:"Zurücksetzen"}),e.jsx("button",{type:"button",className:"ss-knopf",onClick:()=>Dn(t=>!t),children:"+ Baustein hinzufügen"}),e.jsx("button",{type:"button",className:"ss-knopf",onClick:()=>{ir(!1),Dn(!1)},children:"Fertig"})]}):e.jsxs("button",{type:"button",className:"ss-anordnen",onClick:()=>ir(!0),title:"Abschnitte anordnen und ausblenden",children:[e.jsxs("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("path",{d:"M4 7h10M4 12h16M4 17h7"}),e.jsx("path",{d:"M18 4l3 3-3 3"})]}),"Startseite anordnen"]})})]}),k==="analytics"&&e.jsxs("div",{className:"ss-start",children:[e.jsxs("div",{className:"ss-abschnitt",children:[e.jsx("h2",{className:"ss-h2",children:"Analytics"}),e.jsx("p",{className:"ss-lead",children:'Die Auswertung von Postiz liegt bei Postiz. Ihre Schnittstelle gibt keine Kennzahlen heraus, deshalb führt dieser Weg direkt dorthin. Unsere eigenen Zahlen — Aufrufe, Likes, Kommentare je Plattform — stehen unter „Auswertung".'})]}),e.jsxs("div",{className:"ss-pe",children:[e.jsxs("a",{className:"ss-pe-karte",href:"https://platform.postiz.com/analytics",target:"_blank",rel:"noreferrer",children:[e.jsx("span",{className:"ss-pe-titel",children:"Postiz Analytics öffnen"}),e.jsx("span",{className:"ss-pe-text",children:"Reichweite und Interaktionen je Kanal, direkt bei Postiz."})]}),e.jsxs("button",{className:"ss-pe-karte",type:"button",onClick:()=>Fe("auswertung"),children:[e.jsx("span",{className:"ss-pe-titel",children:"Eigene Auswertung"}),e.jsx("span",{className:"ss-pe-text",children:"Aufrufe je Plattform aus unserer Messung — belegbar bis zum Beitrag."})]})]})]}),k==="ideen"&&e.jsxs("div",{className:"ss-start",children:[e.jsxs("div",{className:"ss-abschnitt",children:[e.jsxs("h2",{className:"ss-h2",children:["Empfehlungen für ",d||"…"]}),e.jsx("p",{className:"ss-lead",children:"Gerechnet, nicht geraten: alle Zahlen unten stammen aus den zugeordneten Beiträgen und aus dem Wettbewerbs-Radar. Diese Seite ist rein intern."})]}),!d&&e.jsx("div",{className:"ss-leer",children:"Links einen Kunden wählen."}),ss&&e.jsx("div",{className:"ss-kachelreihe",children:Array.from({length:4}).map((t,n)=>e.jsx("div",{className:"ss-skel ss-skel-quad"},n))}),Ce&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"ss-vorschlaege",children:[Ce.vorschlaege.map((t,n)=>e.jsxs("div",{className:"ss-vor ss-vor-"+t.art,children:[e.jsxs("div",{className:"ss-vor-kopf",children:[e.jsx("span",{className:"ss-vor-marke","aria-hidden":"true"}),e.jsx("span",{className:"ss-vor-titel",children:t.titel})]}),e.jsx("p",{className:"ss-vor-text",children:t.text}),e.jsx("p",{className:"ss-vor-tat",children:t.tat})]},n)),!Ce.vorschlaege.length&&e.jsxs("div",{className:"ss-leer",children:["Noch zu wenig eingeordnetes Material für einen belastbaren Vorschlag.",Ce.beitraege.fremd?"":" Für diesen Kunden ist kein Wettbewerber im Radar hinterlegt."]})]}),!!(Ce.wiederverwerten||[]).length&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"ss-abschnitt",children:e.jsx("h2",{className:"ss-h2",children:"Wiederverwerten"})}),e.jsx("div",{className:"ss-bahn",children:(Ce.wiederverwerten||[]).map(t=>e.jsxs("a",{className:"ss-top",href:t.link||void 0,target:"_blank",rel:"noreferrer",children:[e.jsx("button",{type:"button",className:"ss-top-plus",title:"Wieder einplanen",onClick:n=>{n.preventDefault(),n.stopPropagation(),Qn({text:String(t.text||""),projekt:String(t.projekt||"")}),t.projekt&&(un("projekte"),jt(t.projekt),Me([])),Fe("plan"),window.scrollTo({top:0})},children:"+"}
2),e.jsxs("span",{className:"ss-top-bild",children:[t.bild?e.jsxs(e.Fragment,{children:[e.jsx("img",{src:Ln(t.id,t.bild),alt:"",loading:"lazy",onError:n=>{const s=n.currentTarget;s.style.display="none";const o=s.parentElement&&s.parentElement.querySelector(".ss-top-ohne");o&&(o.style.display="flex")}}),e.jsx("span",{className:"ss-top-ohne","aria-hidden":"true",children:"Bild nicht mehr verfügbar"})]}):e.jsx("span",{className:"ss-top-leer",children:"kein Bild"}),t.thema?e.jsx("span",{className:"ss-top-thema",children:t.thema}):null,e.jsxs("span",{className:"ss-top-unten",children:[e.jsx("span",{className:"ss-top-zahl2",children:Fr(t.aufrufe||t.likes)}),e.jsxs("span",{className:"ss-top-meta2",children:[t.aufrufe?"Aufrufe":"Likes"," · vor ",Math.round(t.tageHer/30)," Monaten"]})]})]})]},t.id))})]}),e.jsxs("div",{className:"ss-abschnitt",children:[e.jsx("h2",{className:"ss-h2",children:"Was in 30 Tagen gut lief"}),e.jsx("p",{className:"ss-lead",children:"Die stärksten eigenen Beiträge dieses Kunden."})]}),e.jsxs("div",{className:"ss-kachelreihe",children:[Ce.gutGelaufen.map(t=>e.jsx("a",{className:"ss-top",href:t.link||void 0,target:"_blank",rel:"noreferrer",children:e.jsxs("span",{className:"ss-top-bild",children:[t.bild?e.jsxs(e.Fragment,{children:[e.jsx("img",{src:Ln(t.id,t.bild),alt:"",loading:"lazy",onError:n=>{const s=n.currentTarget;s.style.display="none";const o=s.parentElement&&s.parentElement.querySelector(".ss-top-ohne");o&&(o.style.display="flex")}}),e.jsx("span",{className:"ss-top-ohne","aria-hidden":"true",children:"Bild nicht mehr verfügbar"})]}):e.jsx("span",{className:"ss-top-leer",children:"kein Bild"}),t.thema?e.jsx("span",{className:"ss-top-thema",children:t.thema}):null,e.jsxs("span",{className:"ss-top-unten",children:[e.jsx("span",{className:"ss-top-zahl2",children:Fr(t.aufrufe||t.likes)}),e.jsxs("span",{className:"ss-top-meta2",children:[t.aufrufe?"Aufrufe":"Likes"," · @",t.konto]})]})]})},t.id)),!Ce.gutGelaufen.length&&e.jsx("div",{className:"ss-leer",children:"In 30 Tagen kein zugeordneter Beitrag."})]})]})]}),k==="plan"&&(()=>{const t=Y.filter(w=>Qt(w.kunde,d,f)),n=new Set(t.map(w=>w.id)),s=re.filter(w=>(!w.kanalId||n.has(w.kanalId))&&!le.has(w.kanalId)),o=Array.from({length:7},(w,H)=>new Date(E.getTime()+H*864e5)),l=pe(new Date),h={};for(const w of s){const H=pe(w.datum);H&&(h[H]=h[H]||[]).push(w)}for(const w of Object.keys(h))h[w].sort((H,Z)=>String(H.datum).localeCompare(String(Z.datum)));const j={};for(const w of Xe){const H=pe(w.datum);H&&(j[H]=j[H]||[]).push({stunde:w.stunde,grund:w.grund})}const L=new Date(E.getTime()+6*864e5);E.toLocaleDateString("de-DE",{day:"2-digit",month:"short"})+""+L.toLocaleDateString("de-DE",{day:"2-digit",month:"short",year:"numeric"});const $=re.filter(w=>!w.kanalId||n.has(w.kanalId)),$e=$.filter(w=>{const H=pe(w.datum);return!!H&&H>=pe(E)&&H<=pe(L)}).length,Ds=$.filter(w=>{const H=new Date(w.datum);return H.getFullYear()===Q.getFullYear()&&H.getMonth()===Q.getMonth()}).length;return e.jsxs("div",{className:"rp",children:[Zt&&e.jsx("div",{className:"ss-meldung",children:Zt}),Ue&&e.jsxs("div",{className:"ss-uebernahme",children:[e.jsx("b",{children:"Wieder einplanen:"}),e.jsxs("span",{children:["Text steht",Ue.projekt?e.jsxs(e.Fragment,{children:[" — Material aus ",e.jsx("b",{children:Ue.projekt})," links auswählen"]}
2):null," ","und in den Kalender ziehen."]}),e.jsx("button",{type:"button",title:"Übernahme verwerfen",onClick:()=>Qn(null),children:"✕"})]}),e.jsxs("div",{className:"rp-oben",children:[e.jsxs("div",{className:"rp-oben-links",children:[e.jsx("span",{className:"rp-oben-titel",children:"Plattform wählen"}),e.jsxs("div",{className:"rp-profile rp-profile-oben",children:[t.map(w=>e.jsxs("button",{type:"button",title:w.name+" · "+w.plattform.replace("-standalone","")+(w.deaktiviert?" · In Postiz deaktiviert – vorhandene Beiträge bleiben sichtbar":""),className:"rp-profil"+(le.has(w.id)?" rp-profil-aus":""),onClick:()=>Et(H=>{const Z=new Set(H);return Z.has(w.id)?Z.delete(w.id):Z.add(w.id),Z}),children:[e.jsxs("span",{className:"rp-profil-bild",children:[w.bild?e.jsx("img",{src:w.bild,alt:w.name}):e.jsx("i",{"aria-hidden":"true"}),e.jsx(ct,{plattform:w.plattform})]}),w.deaktiviert&&e.jsx("span",{className:"rp-profil-inaktiv",children:"Inaktiv"}),e.jsxs("span",{className:"rp-profil-sr",children:[w.name," · ",w.plattform.replace("-standalone","")]})]},w.id)),e.jsx("a",{className:"rp-profil-neu",href:"https://platform.postiz.com/launches",target:"_blank",rel:"noreferrer",title:"Kanal bei Postiz hinzufügen",children:e.jsx("svg",{viewBox:"0 0 24 24",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:e.jsx("path",{d:"M12 5v14M5 12h14"})})})]})]}),e.jsxs("div",{className:"rp-oben-mitte",children:[e.jsxs("div",{className:"rp-ansicht",role:"tablist","aria-label":"Ansicht",children:[e.jsx("button",{type:"button",role:"tab","aria-selected":B==="woche",className:"rp-ansicht-knopf"+(B==="woche"?" an":""),onClick:()=>R("woche"),children:"Woche"}),e.jsx("button",{type:"button",role:"tab","aria-selected":B==="monat",className:"rp-ansicht-knopf"+(B==="monat"?" an":""),onClick:()=>{const w=new Date(E.getFullYear(),E.getMonth(),E.getDate()+3);me(new Date(w.getFullYear(),w.getMonth(),1)),R("monat")},children:"Monat"})]}),B==="woche"?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"rp-spanne-oben",children:ms}),e.jsxs("div",{className:"rp-blaettern",children:[e.jsx("button",{type:"button",className:"rp-pfeil","aria-label":"Woche zurück",onClick:()=>ne(new Date(E.getTime()-7*864e5)),children:"‹"}),e.jsx("button",{type:"button",className:"rp-heute",onClick:()=>ne(dt(new Date)),children:"Diese Woche"}),e.jsx("button",{type:"button",className:"rp-pfeil","aria-label":"Woche vor",onClick:()=>ne(new Date(E.getTime()+7*864e5)),children:"›"})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"rp-spanne-oben",children:Q.toLocaleDateString("de-DE",{month:"long",year:"numeric"})}),e.jsxs("div",{className:"rp-blaettern",children:[e.jsx("button",{type:"button",className:"rp-pfeil","aria-label":"Monat zurück",onClick:()=>me(new Date(Q.getFullYear(),Q.getMonth()-1,1)),children:"‹"}),e.jsx("button",{type:"button",className:"rp-heute",onClick:()=>{const w=new Date;me(new Date(w.getFullYear(),w.getMonth(),1))},children:"Dieser Monat"}),e.jsx("button",{type:"button",className:"rp-pfeil","aria-label":"Monat vor",onClick:()=>me(new Date(Q.getFullYear(),Q.getMonth()+1,1)),children:"›"})]})]})]}),e.jsxs("div",{className:"rp-oben-rechts",children:[e.jsx("button",{type:"button",className:"rp-heute",disabled:Ie,onClick:()=>{b.current=!0,Ne(w=>w+1)},children:Ie?"Wird geladen …":"Mit Postiz abgleichen"}),e.jsxs("span",{className:"rp-soll",children:["Soll: ",e.jsx("b",{children:xt>0?xt:"—"})," ",B==="monat"?"pro Woche":"Beiträge"]}),B==="monat"?e.jsxs("span",{className:"rp-ist",children:["Ist: ",e.jsx("b",{children:Ds})," im Monat"]}):e.jsxs("span",{className:"rp-ist",children:["Ist: ",e.jsx("b",{children:$e})," ",$e===1?"Beitrag":"Beiträge"]})]})]}),ie?e.jsx("div",{className:"ss-fehler",children:ie}):null,e.jsxs("div",{className:"rp-arbeit",children:[e.jsx("div",{className:"rp-galerie",children:e.jsxs(Rs,{kunde:d,onUploaded:()=>y(w=>w+1),children:[e.jsxs("div",{className:"rp-gal-kopf",children:[e.jsx("button",{type:"button",className:"rp-gal-reiter"+(hn==="projekte"?" an":""),onClick:()=>{un("projekte"),jt(null),Me([])},children:"Projekte"}),e.jsx("button",{type:"button",className:"rp-gal-reiter"+(hn==="alle"?" an":""),onClick:()=>{un("alle"),jt(null),Me([])},children:"Alle"})]}),Bt&&e.jsxs("div",{className:"rp-gal-filter",children:[e.jsx("span",{children:"nur unbenutzt"}),e.jsx("button",{type:"button","aria-label":"Filter entfernen",onClick:()=>ls(!1),children:"✕"})]}),(()=>{var F;const w=(u,z)=>e.jsxs("button",{type:"button",className:"rp-gal-kachel"+(Re.indexOf(u.path)>=0?" gewaehlt":""),title:ce(u.name),draggable:!0,onDragStart:P=>{const I=Re.indexOf(u.path)>=0?Re:[u.path];P.dataTransfer.setData("text/lm-medien",JSON.stringify(I)),P.dataTransfer.effectAllowed="copy"},onClick:P=>{const I=z.map(q=>q.path);At(q=>{if(P.shiftKey&&gn.current){const ae=I.indexOf(gn.current),de=I.indexOf(u.path);if(ae>=0&&de>=0){const[Ke,_t]=ae<de?[ae,de]:[de,ae],be=q.slice();for(const Nr of I.slice(Ke,_t+1))be.indexOf(Nr)<0&&be.push(Nr);return be}}return gn.current=u.path,q.indexOf(u.path)>=0?q.filter(ae=>ae!==u.path):q.concat([u.path])})},onDoubleClick:()=>{Mn(u),Be(lt(u))},children:[e.jsx("img",{src:ke(u),alt:"",loading:"lazy",onError:P=>{P.currentTarget.style.display="none"}}),e.jsx("span",{role:"button",tabIndex:0,className:"rp-gal-play"+(u.type==="video"?" ist-video":""),title:u.type==="video"?"Video ansehen":"Foto groß ansehen",onClick:P=>{P.stopPropagation(),Be(lt(u))},onDoubleClick:P=>P.stopPropagation(),onKeyDown:P=>{P.key==="Enter"&&(P.stopPropagation(),Be(lt(u)))},children:u.type==="video"?e.jsx("svg",{viewBox:"0 0 24 24",width:"11",height:"11",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M8 5.5v13l11-6.5z"})}):e.jsx("svg",{viewBox:"0 0 24 24",width:"11",height:"11",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round","aria-hidden":"true",children:e.jsx("path",{d:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"})})}),K[u.path]?e.jsx("span",{className:"rp-gal-haken","aria-label":"schon online",children:"✓"}):null,Re.indexOf(u.path)>=0?e.jsx("span",{className:"rp-gal-wahl",children:Re.indexOf(u.path)+1}):null,e.jsx("span",{role:"button",tabIndex:0,className:"rp-gal-text"+(V[u.path]?" hat":"")+(Ee===u.path?" laeuft":""),title:V[u.path]?"Beitragstext ansehen":"Beitragstext aus dem Video erzeugen",onClick:P=>{P.stopPropagation(),!Ee&&(V[u.path]?Te({pfad:u.path,name:ce(u.name)}
2):It({path:u.path,name:ce(u.name),projekt:Oe||u.project}))},onKeyDown:P=>{P.key==="Enter"&&(P.stopPropagation(),P.currentTarget.click())},children:Ee===u.path?e.jsx("svg",{viewBox:"0 0 24 24",width:"12",height:"12",className:"rp-dreh",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",children:e.jsx("path",{d:"M12 3a9 9 0 1 0 9 9"})}):e.jsxs("svg",{viewBox:"0 0 24 24",width:"12",height:"12",fill:"currentColor","aria-hidden":"true",children:[e.jsx("path",{d:"M12 2.6l1.9 5.2 5.2 1.9-5.2 1.9L12 16.8l-1.9-5.2-5.2-1.9 5.2-1.9z"}),e.jsx("path",{d:"M18.4 15.1l.9 2.4 2.4.9-2.4.9-.9 2.4-.9-2.4-2.4-.9 2.4-.9z",opacity:".75"})]})})]},u.path);if(D)return e.jsx("div",{className:"rp-gal-raster",children:Array.from({length:8}).map((u,z)=>e.jsx("div",{className:"ss-skel ss-skel-hoch"},z))});if(hn==="alle"){const u=_e.filter(z=>Bt?!K[z.path]:!0);return e.jsxs("div",{className:"rp-gal-raster",children:[u.map(z=>w(z,u)),!_e.length&&e.jsx("div",{className:"ss-leer",children:"Nichts gefunden."})]})}if(!Oe)return e.jsxs("div",{className:"rp-gal-liste",children:[qe.map(u=>e.jsxs("button",{type:"button",className:"rp-gal-proj",onClick:()=>{jt(u.projekt),Me([])},children:[e.jsx("span",{className:"rp-gal-proj-bild",children:u.cover?e.jsx("img",{src:u.cover,alt:"",loading:"lazy"}):null}),e.jsxs("span",{className:"rp-gal-proj-tx",children:[e.jsx("span",{className:"rp-gal-proj-n",children:u.projekt}),u.datum&&e.jsx("small",{children:Ar(u.datum)}),(()=>{const z=Bn(u.items,K),P=z.gesamt&&z.drin===z.gesamt?"#3ecf9a":z.drin?"#e8c14a":"rgba(255,255,255,.28)";return e.jsxs("span",{className:"rp-gal-proj-zeile",children:[e.jsx("span",{className:"rp-gal-proj-m",children:z.gesamt?z.drin+" von "+z.gesamt+" online":"nichts zu zeigen"}),e.jsx("span",{className:"rp-gal-proj-bar",children:e.jsx("i",{style:{width:z.prozent+"%",background:P}})})]})})()]})]},u.projekt)),!qe.length&&e.jsx("div",{className:"ss-leer",children:"Für diesen Kunden liegt nichts in der Dropbox."})]});const H=(((F=qe.find(u=>u.projekt===Oe))==null?void 0:F.items)||[]).filter(u=>Bt?!K[u.path]:!0),Z=yt.length,fe={},G=[];for(const u of H){const z=String(u.ordner||"").split("/").filter(Boolean);let P=!0;for(let ae=0;ae<Z;ae++)if(String(z[ae]||"").toLowerCase()!==yt[ae].toLowerCase()){P=!1;break}if(!P)continue;if(z.length<=Z){G.push(u);continue}const I=z[Z].toLowerCase(),q=fe[I]||(fe[I]={name:z[Z],anzahl:0,cover:null});q.anzahl++,(!q.cover||q.cover.type!=="video"&&u.type==="video")&&(q.cover=u)}const te=Object.values(fe).sort((u,z)=>u.name.localeCompare(z.name,"de",{numeric:!0}));return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"rp-gal-pfad",children:[e.jsx("button",{type:"button",onClick:()=>{jt(null),Me([])},children:"Projekte"}),e.jsx("span",{"aria-hidden":"true",children:"›"}),e.jsx("button",{type:"button",className:Z===0?"an":"",onClick:()=>Me([]),children:Oe}),yt.map((u,z)=>e.jsxs("span",{className:"rp-gal-pfad-teil",children:[e.jsx("span",{"aria-hidden":"true",children:"›"}),e.jsx("button",{type:"button",className:z===Z-1?"an":"",onClick:()=>Me(yt.slice(0,z+1)),children:u})]},z+"|"+u))]}),e.jsxs("div",{className:"rp-gal-bereich",children:[!!te.length&&e.jsx("div",{className:"rp-gal-ordner",children:te.map(u=>e.jsxs("button",{type:"button",className:"rp-gal-proj",onClick:()=>Me(yt.concat([u.name])),children:[e.jsxs("span",{className:"rp-gal-proj-bild rp-gal-ordner-bild",children:[u.cover?e.jsx("img",{src:ke(u.cover),alt:"",loading:"lazy",onError:z=>{z.currentTarget.style.display="none"}}):null,e.jsx("span",{className:"rp-gal-ordner-zeichen","aria-hidden":"true",children:e.jsx("svg",{viewBox:"0 0 24 24",width:"13",height:"13",fill:"currentColor",children:e.jsx("path",{d:"M3 6.5A2.5 2.5 0 0 1 5.5 4h3.6c.6 0 1.2.25 1.6.7l1.3 1.3h6.5A2.5 2.5 0 0 1 21 8.5v9A2.5 2.5 0 0 1 18.5 20h-13A2.5 2.5 0 0 1 3 17.5z"})})})]}),e.jsxs("span",{className:"rp-gal-proj-tx",children:[e.jsx("span",{className:"rp-gal-proj-n",children:u.name}),e.jsxs("span",{className:"rp-gal-proj-m",children:[u.anzahl," ",u.anzahl===1?"Medium":"Medien"]})]})]},u.name))}),!!G.length&&e.jsx("div",{className:"rp-gal-raster rp-gal-raster-frei",children:G.map(u=>w(u,G))}),!te.length&&!G.length&&e.jsx("div",{className:"ss-leer",children:Bt?"Hier ist schon alles benutzt.":"Dieser Ordner ist leer."})]})]})})()]},d)}),B==="monat"?(()=>{const w=dt(Q),H=Array.from({length:42},(G,te)=>new Date(w.getFullYear(),w.getMonth(),w.getDate()+te)),Z=G=>{const te=ut.filter(F=>F.tag===G).sort((F,u)=>u.schnitt-F.schnitt)[0];return te?te.stunde:12},fe=G=>{ne(dt(G)),R("woche")};return e.jsxs("div",{className:"rp-monat",children:[e.jsx("div",{className:"rp-monat-kopf",children:Ir.map(G=>e.jsx("div",{className:"rp-monat-wt",children:G},G))}),e.jsx("div",{className:"rp-monat-raster",children:H.map(G=>
2{const te=pe(G),F=h[te]||[],u="m|"+te;return e.jsxs("div",{className:"rp-monat-tag"+(G.getMonth()===Q.getMonth()?"":" rp-monat-fremd")+(te===l?" rp-monat-heute":"")+(mn===u?" rp-kal-ziel":""),onDragOver:z=>{z.dataTransfer.types.indexOf("text/lm-medien")<0||(z.preventDefault(),z.dataTransfer.dropEffect="copy",st(u))},onDragLeave:()=>st(z=>z===u?"":z),onDrop:z=>{z.preventDefault(),st("");let P=[];try{P=JSON.parse(z.dataTransfer.getData("text/lm-medien")||"[]")}catch{P=[]}if(!P.length)return;const I=new Date(G);I.setHours(Z((G.getDay()+6)%7),0,0,0),T({pfade:P,datum:I,kanalIds:t.filter(q=>!q.deaktiviert&&!le.has(q.id)).map(q=>q.id),text:Ue&&Ue.text||V[P[0]]&&V[P[0]].text||"",schritt:1,texte:{},personen:[],commentsEnabled:!0,laeuft:!1,ergebnis:null}),Ft()},children:[e.jsx("button",{type:"button",className:"rp-monat-zahl",title:"Diese Woche öffnen",onClick:()=>fe(G),children:G.getDate()}),e.jsxs("div",{className:"rp-monat-posts",children:[F.slice(0,4).map(z=>{const P=Fn[String(z.status||"").toUpperCase()]||{text:z.status||"—",farbe:"rgba(255,255,255,.3)"};return e.jsxs("button",{type:"button",className:"rp-monat-post",title:z.text,onClick:()=>rr(z),children:[e.jsx("span",{className:"rp-punkt",style:{background:P.farbe},"aria-hidden":"true"}),e.jsx("span",{className:"rp-monat-zeit",children:Vr(z.datum)}),e.jsx("span",{className:"rp-monat-platt",children:e.jsx(ct,{plattform:z.plattform})}),e.jsx("span",{className:"rp-monat-text",children:z.text||"(ohne Text)"})]},z.id)}),F.length>4&&e.jsxs("button",{type:"button",className:"rp-monat-mehr",onClick:()=>fe(G),children:["+ ",F.length-4," weitere"]})]})]},te)})})]})})():(()=>{const Z=Math.max(34,Math.floor((us-210)/17)),fe=Array.from({length:17},(F,u)=>6+u),G=F=>{const u=new Date(F),z=u.getHours()+u.getMinutes()/60;return Math.max(0,Math.min(Math.max(z,6),23)-6)*Z},te={};for(const F of ut)(te[F.tag]=te[F.tag]||[]).push(F);return e.jsxs("div",{className:"rp-kal",children:[e.jsxs("div",{className:"rp-kal-kopf",children:[e.jsx("div",{className:"rp-kal-ecke"}),o.map(F=>{const u=pe(F);return e.jsxs("div",{className:"rp-kal-tag"+(u===l?" rp-kal-tag-heute":""),children:[e.jsx("span",{className:"rp-tag-name",children:Ir[(F.getDay()+6)%7]}),e.jsx("span",{className:"rp-tag-zahl",children:F.getDate()})]},u)})]}),e.jsxs("div",{className:"rp-kal-koerper",style:{height:17*Z+"px"},children:[e.jsx("div",{className:"rp-kal-stunden",children:fe.map(F=>e.jsx("div",{className:"rp-kal-stunde",style:{height:Z+"px"},children:e.jsxs("span",{children:[String(F).padStart(2,"0"),":00"]})},F))}),o.map(F=>{const u=pe(F),z=(F.getDay()+6)%7,P=h[u]||[];return e.jsxs("div",{className:"rp-kal-spalte"+(u===l?" rp-kal-spalte-heute":""),children:[fe.map(I=>e.jsx("div",{className:"rp-kal-linie",style:{height:Z+"px"},children:[0,15,30,45].map(q=>{const ae=u+"|"+I+"|"+q;return e.jsx("div",{className:"rp-kal-viertel"+(mn===ae?" rp-kal-ziel":""),style:{height:Z/4+"px"},onDragOver:de=>{de.dataTransfer.types.indexOf("text/lm-medien")<0||(de.preventDefault(),de.dataTransfer.dropEffect="copy",st(ae))},onDragLeave:()=>st(de=>de===ae?"":de),onDrop:de=>{de.preventDefault(),st("");let Ke=[];try{Ke=JSON.parse(de.dataTransfer.getData("text/lm-medien")||"[]")}catch{Ke=[]}if(!Ke.length)return;const _t=new Date(F);_t.setHours(I,q,0,0),T({pfade:Ke,datum:_t,kanalIds:t.filter(be=>!be.deaktiviert&&!le.has(be.id)).map(be=>be.id),text:Ue&&Ue.text||V[Ke[0]]&&V[Ke[0]].text||"",schritt:1,texte:{},personen:[],commentsEnabled:!0,laeuft:!1,ergebnis:null}),Ft()},children:mn===ae&&e.jsxs("span",{className:"rp-kal-viertel-zeit",children:[String(I).padStart(2,"0"),":",String(q).padStart(2,"0")]})},q)})},I)),(te[z]||[]).map(I=>e.jsx("div",{className:"rp-kal-best",style:{top:(I.stunde-6)*Z+"px",height:Z+"px"},title:"Beste Zeit: ⌀ "+I.schnitt.toLocaleString("de-DE")+" Aufrufe aus "+I.anzahl+" Beiträgen"},"b"+I.stunde)),(j[u]||[]).map(I=>e.jsxs("div",{className:"rp-kal-vor",title:I.grund,style:{top:(I.stunde-6)*Z+"px"},children:[e.jsxs("svg",{viewBox:"0 0 24 24",width:"11",height:"11",fill:"currentColor","aria-hidden":"true",className:"rp-funkel",children:[e.jsx("path",{d:"M12 2.6l1.9 5.2 5.2 1.9-5.2 1.9L12 16.8l-1.9-5.2-5.2-1.9 5.2-1.9z"}),e.jsx("path",{d:"M18.4 15.1l.9 2.4 2.4.9-2.4.9-.9 2.4-.9-2.4-2.4-.9 2.4-.9z",opacity:".75"})]}),String(I.stunde).padStart(2,"0"),":00"]},"v"+I.stunde)),P.map(I=>
2e.jsx("div",{className:"rp-kal-post",style:{top:G(I.datum)+"px"},children:e.jsx(ea,{p:I,onOeffnen:rr})},I.id))]},u)})]})]})})()]})]})})(),k==="inbox"&&e.jsx("div",{className:"ss-start",children:e.jsx(Dr,{titel:"Inbox",unter:"Nachrichten und Kommentare beantwortet das Community Management direkt auf der Plattform.",ziele:Ls})}),k==="programme"&&e.jsx("div",{className:"ss-start",children:e.jsx(Dr,{titel:"Programme",unter:"Alle Werkzeuge für Social Media an einer Stelle.",ziele:Hr})}),k==="untertitel"&&e.jsx("div",{className:"ss-fremd",children:e.jsx(a.Suspense,{fallback:e.jsx("div",{className:"ss-leer",children:"Untertitel-Studio wird geladen…"}),children:e.jsx(Js,{})})}),k==="gespeichert"&&e.jsx("div",{className:"ss-fremd",children:e.jsx(a.Suspense,{fallback:e.jsx("div",{className:"ss-leer",children:"Gespeicherter Content wird geladen…"}),children:e.jsx(Ys,{nurTab:"saved",eingebettet:!0})})}),k==="auswertung"&&e.jsxs("div",{className:"ss-start",children:[e.jsxs("div",{className:"ss-abschnitt",children:[e.jsxs("h2",{className:"ss-h2",children:["Auswertung für ",d||"…"]}),e.jsxs("p",{className:"ss-lead",children:["Zwei getrennte Quellen, bewusst nicht verrechnet: die Beitragsliste kommt aus Postiz, die Aufruf- und Interaktionszahlen aus unserer eigenen Messung — ",e.jsx("b",{children:"nicht"})," aus Postiz. Postiz gibt zu einem einzelnen Beitrag überhaupt keine Kennzahl heraus, deshalb steht hier keine Zahl an der einzelnen Zeile."]})]}),!d&&e.jsx("div",{className:"ss-leer",children:"Links einen Kunden wählen."}),Gn&&e.jsx("div",{className:"ss-fehler",children:Gn}),as&&e.jsx("div",{className:"ss-leer",children:"Auswertung wird geladen…"}),_&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"aw-kopf",children:[e.jsxs("span",{className:"aw-zeitraum",children:[_.zeitraum.tage," Tage ·"," ",new Date(_.zeitraum.von+"T12:00:00").toLocaleDateString("de-DE",{day:"numeric",month:"short"})," – ",new Date(_.zeitraum.bis+"T12:00:00").toLocaleDateString("de-DE",{day:"numeric",month:"short",year:"numeric"})]}),e.jsxs("span",{className:"aw-zaehler",children:[e.jsx("b",{children:_.zaehler.veroeffentlicht})," veröffentlicht"]}),e.jsxs("span",{className:"aw-zaehler aw-zaehler-still",children:[e.jsx("b",{children:_.zaehler.entwurf})," Entwürfe"]}),e.jsxs("span",{className:"aw-zaehler aw-zaehler-still",children:[e.jsx("b",{children:_.zaehler.uebrige})," übrige"]}),e.jsxs("span",{className:"aw-zaehler aw-zaehler-still",children:[_.kanaele.length," ",_.kanaele.length===1?"Kanal":"Kanäle"," in Postiz"]})]}),_.hinweis?e.jsx("p",{className:"aw-hinweis",children:_.hinweis}):null,e.jsxs("div",{className:"ss-abschnitt",children:[e.jsx("h2",{className:"ss-h2",children:"Je Plattform"}),e.jsx("p",{className:"ss-lead",children:"Links Postiz (was geplant und veröffentlicht wurde), rechts die eigene Messung desselben Zeitraums. Für LinkedIn, Threads und X messen wir nichts — dort bleibt die rechte Seite leer."})]}),e.jsxs("div",{className:"aw-tab",children:[e.jsxs("div",{className:"aw-zeile aw-zeile-kopf",children:[e.jsx("span",{children:"Plattform"}),e.jsx("span",{children:"Postiz"}),e.jsx("span",{className:"aw-eng",children:"Beiträge"}),e.jsx("span",{children:"Aufrufe"}),e.jsx("span",{className:"aw-eng",children:"Likes"}),e.jsx("span",{className:"aw-eng",children:"Kommentare"})]}),_.jePlattform.map(t=>e.jsxs("div",{className:"aw-zeile",children:[e.jsx("span",{className:"aw-pf",children:Kn(t.plattform)}),e.jsx("span",{className:"aw-z",children:Le(t.postizVeroeffentlicht)}),t.zahlen?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"aw-z aw-eng",children:Le(t.zahlen.beitraege)}),e.jsx("span",{className:"aw-z",children:Le(t.zahlen.aufrufe)}),e.jsx("span",{className:"aw-z aw-eng",children:Le(t.zahlen.likes)}),e.jsx("span",{className:"aw-z aw-eng",children:Le(t.zahlen.kommentare)})]}):e.jsx("span",{className:"aw-ohne",children:"nicht gemessen"})]},t.plattform||"ohne")),!_.jePlattform.length&&e.jsx("div",{className:"ss-leer",children:"Für diesen Kunden ist in Postiz kein Kanal hinterlegt."})]}),_.konten.length?e.jsxs("p",{className:"aw-fuss",children:["Gemessene Konten: ",_.konten.join(", "),". Doppelt erfasste Beiträge und Wettbewerber-Konten sind ausgeschlossen; je Beitrag zählt der höchste Messwert, nicht die Summe der Messpunkte."]}):null,e.jsxs("div",{className:"ss-abschnitt",children:[e.jsx("h2",{className:"ss-h2",children:"Veröffentlichte Beiträge"}),e.jsx("p",{className:"ss-lead",children:"Nur, was Postiz selbst als veröffentlicht führt. Zahlen stehen hier bewusst keine: zu diesen Zeilen gibt es keine, die belegbar wäre."})]}),e.jsxs("div",{className:"aw-liste",children:[_.beitraege.map(t=>e.jsxs("div",{className:"aw-post",children:[e.jsx("span",{className:"aw-post-bild",children:t.bild?e.
2jsxs(e.Fragment,{children:[e.jsx("img",{src:On(t.bild),alt:"",loading:"lazy",onError:n=>{const s=n.currentTarget;s.style.display="none";const o=s.parentElement&&s.parentElement.querySelector(".ss-top-ohne");o&&(o.style.display="flex")}}),e.jsx("span",{className:"ss-top-ohne","aria-hidden":"true",children:"Bild nicht mehr verfügbar"})]}):e.jsx("span",{className:"ss-top-leer",children:"kein Bild"})}),e.jsxs("span",{className:"aw-post-mitte",children:[e.jsx("span",{className:"aw-post-text",children:t.text||"(ohne Text)"}),e.jsxs("span",{className:"aw-post-meta",children:[t.datum?new Date(t.datum).toLocaleDateString("de-DE",{day:"numeric",month:"short",year:"numeric"}):"ohne Datum",t.plattform?" · "+Kn(t.plattform):"",t.kanal?" · "+t.kanal:""]})]})]},t.id)),!_.beitraege.length&&e.jsx("div",{className:"ss-leer",children:"In diesem Zeitraum hat Postiz keinen veröffentlichten Beitrag."})]}),e.jsxs("p",{className:"aw-fuss",children:["Herkunft — Beiträge: ",_.quelle.beitraege==="postiz"?"Postiz":"keine Quelle"," ·"," ","Zahlen: ",_.quelle.zahlen==="d1"?"eigene Messung":"keine Quelle"," ·"," ","je einzelnem Beitrag: keine Zahlen verfügbar."]})]})]})]})]}),ur&&e.jsx(Xs,{a:ur,zu:()=>Be(null)}),ys&&c&&e.jsx($s,{kunde:d,pfade:c.pfade,text:c.text,datum:c.datum,koautoren:c.personen||[],titelbildPfad:c.titelbildPfad||"",onSchliessen:()=>En(!1),onFertig:t=>{En(!1),T(null),b.current=!0,Ne(n=>n+1),ue(t),window.setTimeout(()=>ue(""),7e3)}}),Ot&&(()=>{const t=Ot,n=Fn[String(t.status||"").toUpperCase()]||{text:t.status||"—",farbe:"rgba(255,255,255,.3)"},s=Y.find(h=>h.id===t.kanalId),o=String(t.status||"").toUpperCase()==="DRAFT",l=t.bearbeitbar?"":o?t.imCockpit?"Der Entwurf wurde in Postiz geändert — bitte dort weiter bearbeiten.":"Dieser Entwurf wurde nicht im Cockpit angelegt — seine Medien kennt nur Postiz. Bitte dort bearbeiten.":"Nur Entwürfe lassen sich hier bearbeiten.";return e.jsx("div",{className:"be-ov",onClick:()=>{Ct||Dt(null)},children:e.jsxs("div",{className:"mt-modal bt-modal",onClick:h=>h.stopPropagation(),children:[e.jsxs("div",{className:"mt-kopf",children:[e.jsxs("div",{className:"bt-kopf-links",children:[e.jsxs("span",{className:"rp-profil-bild bt-kanal-bild",children:[s&&s.bild?e.jsx("img",{src:s.bild,alt:""}):e.jsx("i",{"aria-hidden":"true"}),e.jsx(ct,{plattform:t.plattform})]}),e.jsxs("div",{children:[e.jsx("div",{className:"be-titel",children:t.kanal||Kn(t.plattform)||"Beitrag"}),e.jsxs("div",{className:"be-sub",children:[e.jsx("span",{className:"rp-punkt bt-punkt",style:{background:n.farbe},"aria-hidden":"true"}),n.text," · ",new Date(t.datum).toLocaleString("de-DE",{weekday:"short",day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"})]})]})]}),e.jsx("button",{type:"button",className:"be-zu",onClick:()=>Dt(null),disabled:Ct,children:"✕"})]}),!!(t.medien&&t.medien.length)&&e.jsx("div",{className:"bt-medien",children:t.medien.map(h=>e.jsxs("button",{type:"button",className:"bt-medium",title:h.art==="video"?"Video ansehen":"Foto groß ansehen",onClick:()=>Be({src:h.art==="video"?Qs(h):Xt(h,!0),poster:h.art==="video"?Xt(h,!0):"",video:h.art==="video",name:ce(String(h.pfad.split("/").pop()||""))}),children:[e.jsx("img",{src:Xt(h),alt:"",loading:"lazy",onError:j=>{j.currentTarget.style.display="none"}}),h.art==="video"?e.jsx("span",{className:"bt-medium-video","aria-hidden":"true",children:"▶"}):null]},h.pfad))}),t.freigabe&&e.jsxs("div",{className:"bt-freigabe "+(t.freigabe.status==="freigegeben"?"ok":"aenderung"),children:[e.jsx("b",{children:t.freigabe.status==="freigegeben"?"✓ Vom Kunden freigegeben":"✎ Der Kunde wünscht eine Änderung"}),t.freigabe.am?" · "+new Date(t.freigabe.am).toLocaleString("de-DE",{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"}):"",t.freigabe.von?" · "+t.freigabe.von:"",t.freigabe.kommentar?e.jsxs("div",{className:"bt-freigabe-text",children:["„",t.freigabe.kommentar,"“"]}):null]}),t.bearbeitbar?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"be-wann",children:[e.jsx("input",{type:"date",value:pe(at),onChange:h=>{if(!h.target.value)return;const[j,L,$]=h.target.value.split("-").map(Number),$e=new Date(at);
2$e.setFullYear(j,L-1,$),zn($e)}}),e.jsx(Sr,{value:String(at.getHours()).padStart(2,"0")+":"+String(at.getMinutes()).padStart(2,"0"),ariaLabel:"Uhrzeit",onChange:h=>{if(!h)return;const[j,L]=h.split(":").map(Number),$=new Date(at);$.setHours(j||0,L||0,0,0),zn($)}})]}),e.jsx("textarea",{className:"mt-feld",value:yn,onChange:h=>tr(h.target.value)})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"bt-text",children:t.volltext||t.text||"(ohne Text)"}),e.jsx("p",{className:"mt-text mt-leise",children:l})]}),nr&&e.jsx("div",{className:"ss-fehler",children:nr}),e.jsxs("div",{className:"mt-fuss",children:[e.jsx("button",{type:"button",className:"ss-knopf ss-knopf-still",onClick:()=>Pn("https://platform.postiz.com/launches"),children:"In Postiz öffnen"}),e.jsx("button",{type:"button",className:"ss-knopf ss-knopf-still",onClick:()=>Dt(null),disabled:Ct,children:"Schließen"}),t.bearbeitbar&&e.jsx("button",{type:"button",className:"ss-knopf",onClick:hs,disabled:Ct||!yn.trim(),children:Ct?"Wird gespeichert…":"Speichern"})]})]})})})(),se&&e.jsx("div",{className:"be-ov",onClick:()=>Te(null),children:e.jsxs("div",{className:"mt-modal",onClick:t=>t.stopPropagation(),children:[e.jsxs("div",{className:"mt-kopf",children:[e.jsxs("div",{children:[e.jsx("div",{className:"be-titel",children:"Beitragstext"}),e.jsx("div",{className:"be-sub",children:se.name})]}),e.jsx("button",{type:"button",className:"be-zu",onClick:()=>Te(null),children:"✕"})]}),(((vr=V[se.pfad])==null?void 0:vr.quellen)||[]).length>0&&e.jsxs("div",{className:"mt-quellen",children:["Grundlage: ",(((wr=V[se.pfad])==null?void 0:wr.quellen)||[]).map(t=>({transkript:"gesprochener Text",standbild:"Standbild",projektakte:"Projektakte",dateimetadaten:"Beschreibung aus der Exportdatei"})[t]||t).join(" · ")]}),e.jsx("textarea",{className:"mt-feld",value:((jr=V[se.pfad])==null?void 0:jr.text)||"",onChange:t=>zt(n=>{var s;return{...n,[se.pfad]:{text:t.target.value,quellen:((s=n[se.pfad])==null?void 0:s.quellen)||[]}}})}),e.jsxs("div",{className:"mt-fuss",children:[e.jsx("button",{type:"button",className:"ss-knopf ss-knopf-still",disabled:!!Ee,onClick:()=>It({path:se.pfad,name:se.name,projekt:Oe||""},!0),children:Ee?"Erzeuge …":"Neu erzeugen"}),e.jsx("button",{type:"button",className:"ss-knopf ss-knopf-still",onClick:async()=>{var t;try{await fetch(C+"/api/socialstudio/medientext",{method:"POST",headers:A({"Content-Type":"application/json"}),body:JSON.stringify({pfad:se.pfad,kunde:d,projekt:Oe||"",text:((t=V[se.pfad])==null?void 0:t.text)||""})})}catch{}Te(null)},children:"Speichern"}),e.jsx("button",{type:"button",className:"ss-knopf",disabled:!!Ee||!(((yr=V[se.pfad])==null?void 0:yr.text)||"").trim(),onClick:()=>{var s;const t=((s=V[se.pfad])==null?void 0:s.text)||"",n=Re.indexOf(se.pfad)>=0?Re.slice():[se.pfad];fetch(C+"/api/socialstudio/medientext",{method:"POST",headers:A({"Content-Type":"application/json"}),body:JSON.stringify({pfad:se.pfad,kunde:d,projekt:Oe||"",text:t})}).catch(()=>{}),Te(null),jn(n,t)},children:"Einplanen"})]})]})}),$n&&e.jsx("div",{className:"be-ov",onClick:()=>!Lt&&Nt(""),children:e.jsxs("div",{className:"mt-modal mt-schmal",onClick:t=>t.stopPropagation(),children:[e.jsx("div",{className:"be-titel",children:"Kundensprache fehlt"}),e.jsx("p",{className:"mt-text",children:$n}),e.jsx("p",{className:"mt-text mt-leise",children:"Die Analyse liest die eigenen veröffentlichten Beiträge dieses Kunden — je Plattform getrennt, damit Abweichungen zwischen Instagram, TikTok, Facebook und LinkedIn sichtbar bleiben."}),e.jsxs("div",{className:"mt-fuss",children:[e.jsx("button",{type:"button",className:"ss-knopf ss-knopf-still",disabled:Lt,onClick:()=>Nt(""),children:"Abbrechen"}),e.jsx("button",{type:"button",className:"ss-knopf",disabled:Lt,onClick:os,children:Lt?"Analysiere …":"Kundensprache jetzt analysieren"})]})]})}),_n&&e.jsxs("div",{className:"mt-fehler",role:"status",children:[_n,e.jsx("button",{type:"button",onClick:()=>rt(""),children:"✕"})]}),c&&e.jsx("div",{className:"be-ov",onClick:()=>{c.laeuft||T(null)},children:e.jsxs("div",{className:"be-huelle",onClick:t=>t.stopPropagation(),children:[e.jsxs("div",{className:"be-modal",children:[e.jsxs("div",{className:"be-kopf",children:[e.jsxs("div",{children:[e.jsx("div",{className:"be-titel",children:"Beitrag erstellen"}),e.jsxs("div",{className:"be-sub",children:[c.pfade.length," ",c.pfade.length===1?"Medium":"Medien",c.ergebnis?"":" · Schritt "+c.schritt+" von 2"]}),!c.ergebnis&&e.jsxs("div",{className:"be-wann",children:[e.jsx("input",{type:"date",value:pe(c.datum),onChange:t=>T(n=>{if(!n||!t.target.value)return n;const[s,o,l]=t.target.value.split("-").map(Number),h=new Date(n.datum);return h.setFullYear(s,o-1,l),{...n,datum:h}})}),e.jsx(Sr,{value:String(c.datum.getHours()).padStart(2,"0")+":"+String(c.datum.getMinutes()).padStart(2,"0"),ariaLabel:"Uhrzeit",onChange:t=>T(n=>{if(!n||!t)return n;const[s,o]=t.split(":").map(Number),l=new Date(n.datum);return l.setHours(s||0,o||0,0,0),{...n,datum:l}})}),(()=>{const{bloecke:t,frei:n,empf:s}=kn,o=(l,h)=>
2{if(!l)return null;const j=c.datum.getTime()===l.d.getTime();return e.jsxs("button",{type:"button",className:"be-block"+(j?" an":""),title:l.grund||"",onClick:()=>T(L=>L&&{...L,datum:new Date(l.d)}),children:[h,e.jsxs("span",{className:"be-block-wann",children:[l.d.toLocaleDateString("de-DE",{weekday:"short",day:"numeric",month:"short"})," ",String(l.d.getHours()).padStart(2,"0"),":",String(l.d.getMinutes()).padStart(2,"0")]})]})};return t.length?e.jsxs("div",{className:"be-bloecke",children:[o(n,"Nächster freier Block"),s&&(!n||n.datum!==s.datum)?o(s,"Empfohlener Block"):null]}):null})(),e.jsx("div",{className:"be-viertel",children:[0,45].map(t=>e.jsxs("button",{type:"button",className:c.datum.getMinutes()===t?"an":"",onClick:()=>T(n=>{if(!n)return n;const s=new Date(n.datum);return s.setMinutes(t,0,0),{...n,datum:s}}),children:[":",String(t).padStart(2,"0")]},t))})]})]}),e.jsx("button",{type:"button",className:"be-zu",onClick:()=>T(null),disabled:c.laeuft,children:"✕"})]}),e.jsx("div",{className:"be-kanaele",children:Y.filter(t=>!t.deaktiviert&&Qt(t.kunde,d,f)).map(t=>{const n=c.kanalIds.indexOf(t.id)>=0;return e.jsx("button",{type:"button",className:"be-kanal"+(n?" an":""),title:t.name+" · "+t.plattform.replace("-standalone",""),onClick:()=>T(s=>s&&{...s,kanalIds:n?s.kanalIds.filter(o=>o!==t.id):s.kanalIds.concat([t.id])}),children:e.jsxs("span",{className:"rp-profil-bild",children:[t.bild?e.jsx("img",{src:t.bild,alt:""}):e.jsx("i",{"aria-hidden":"true"}),e.jsx(ct,{plattform:t.plattform})]})},t.id)})}),c.schritt===2?e.jsx("div",{className:"be-anpassen",children:c.kanalIds.map(t=>{const n=Y.find(o=>o.id===t);if(!n)return null;const s=c.texte[t]??"";return e.jsxs("div",{className:"be-anp",children:[e.jsxs("div",{className:"be-anp-kopf",children:[e.jsxs("span",{className:"rp-profil-bild",children:[n.bild?e.jsx("img",{src:n.bild,alt:""}):e.jsx("i",{"aria-hidden":"true"}),e.jsx(ct,{plattform:n.plattform})]}),e.jsx("span",{className:"be-anp-name",children:n.name}),s?e.jsx("button",{type:"button",className:"be-anp-reset",onClick:()=>T(o=>{if(!o)return o;const l={...o.texte};return delete l[t],{...o,texte:l}}),children:"zurücksetzen"}):e.jsx("span",{className:"be-anp-gleich",children:"wie der gemeinsame Text"})]}),e.jsx("textarea",{rows:5,value:s||c.text,placeholder:"Text für diesen Kanal…",onChange:o=>T(l=>l&&{...l,texte:{...l.texte,[t]:o.target.value}})})]},t)})}):e.jsxs("div",{className:"be-koerper",children:[e.jsx("div",{className:"be-medien",children:c.pfade.map((t,n)=>{var o;const s=_e.find(l=>l.path===t)||v.find(l=>l.path===t);return e.jsxs("div",{className:"be-medium",draggable:!0,onDragStart:l=>{l.dataTransfer.setData("text/lm-sort",String(n)),l.dataTransfer.effectAllowed="move"},onDragOver:l=>{l.dataTransfer.types.indexOf("text/lm-sort")>=0&&(l.preventDefault(),l.dataTransfer.dropEffect="move")},onDrop:l=>{l.preventDefault();const h=Number(l.dataTransfer.getData("text/lm-sort"));!isFinite(h)||h===n||T(j=>{if(!j)return j;const L=j.pfade.slice(),[$]=L.splice(h,1);return L.splice(n,0,$),{...j,pfade:L}})},children:[s?e.jsx("img",{src:ke(s),alt:"",draggable:!1}):null,s?e.jsx("button",{type:"button",className:"be-medium-play"+(s.type==="video"?" ist-video":""),title:s.type==="video"?"Video ansehen":"Foto groß ansehen",onClick:()=>Be(lt(s)),children:s.type==="video"?e.jsx("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M8 5.5v13l11-6.5z"})}):e.jsx("svg",{viewBox:"0 0 24 24",width:"12",height:"12",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round","aria-hidden":"true",children:e.jsx("path",{d:"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"})})}):null,s&&s.type!=="video"&&e.jsx(Hs,{originalSrc:In(s),value:(o=c.crops)==null?void 0:o[t],disabled:c.laeuft,onChange:l=>T(h=>{if(!h)return h;const j={...h.crops};return l?j[t]=l:delete j[t],{...h,crops:j}})}),e.jsx("span",{className:"be-medium-nr",children:n+1}),e.jsx("button",{type:"button",className:"be-medium-x","aria-label":"Entfernen",onClick:()=>T(l=>l&&{...l,pfade:l.pfade.filter(h=>h!==t),titelbildPfad:l.titelbildPfad===t?"":l.titelbildPfad}),children:"✕"}),e.jsx("button",{type:"button",className:"be-medium-tb"+(c.titelbildPfad===t?" be-medium-tb-an":""),title:c.titelbildPfad===t?"Ist das Titelbild — klicken zum Zurücknehmen":"Als Titelbild verwenden",onClick:()=>T(l=>l&&{...l,titelbildPfad:l.titelbildPfad===t?"":t}),children:c.titelbildPfad===t?"★":"☆"})]},t)})}),e.jsxs("div",{className:"be-text",children:[e.jsx("textarea",{placeholder:"Bildunterschrift schreiben…",rows:9,value:c.text,onChange:t=>T(n=>n&&{...n,text:t.target.value})}),e.jsxs("div",{className:"be-extra",children:[e.jsx("small",{style:{gridColumn:"1 / -1",color:"var(--ink-3)"},children:"Native Standortmarkierung über Postiz derzeit nicht verfügbar."}),e.jsx(Vs,{authors:c.personen,instagram:c.kanalIds.some(t=>{var n;return/^instagram/.test(((n=Y.find(s=>
2s.id===t))==null?void 0:n.plattform)||"")}),onAuthors:t=>T(n=>n&&{...n,personen:t}),onMention:t=>T(n=>{if(!n)return n;const s="@"+t;return n.text.split(/\s+/).some(l=>l.toLowerCase()===s.toLowerCase())?n:{...n,text:n.text+(n.text&&!/\s$/.test(n.text)?" ":"")+s+" "}})}),c.kanalIds.some(t=>{var n;return/^tiktok/.test(((n=Y.find(s=>s.id===t))==null?void 0:n.plattform)||"")})&&e.jsxs("label",{className:"sc-comments",children:[e.jsx("input",{type:"checkbox",checked:c.commentsEnabled!==!1,onChange:t=>T(n=>n&&{...n,commentsEnabled:t.target.checked})}),"Kommentare auf TikTok erlauben"]})]}),e.jsx("div",{className:"be-hinweis",children:"„Entwurf speichern“ veröffentlicht nichts. „Planen“ veröffentlicht automatisch zum gewählten Zeitpunkt. Größere Medien werden zunächst auf dem Mac mini vorbereitet; diese Übergabe ist noch keine bestätigte Planung."})]})]}),!c.ergebnis&&c.kanalIds.some(t=>{var n;return/^(youtube|tiktok)/.test(((n=Y.find(s=>s.id===t))==null?void 0:n.plattform)||"")})&&e.jsxs("label",{className:"be-hinweis",children:[e.jsx("input",{type:"checkbox",checked:!!c.publicConfirmed,disabled:c.laeuft,onChange:t=>T(n=>n&&{...n,publicConfirmed:t.target.checked})}),"Ich möchte die ausgewählten YouTube-/TikTok-Beiträge zum gewählten Zeitpunkt automatisch öffentlich veröffentlichen. Die Plattform prüft die Verfügbarkeit."]}),c.validationError&&e.jsx("div",{role:"alert",className:"be-hinweis",children:c.validationError}),c.ergebnis?e.jsxs("div",{className:"be-ergebnis",role:"status","aria-live":"polite",children:[!!((zr=c.ergebnis.warnungen)!=null&&zr.length)&&e.jsxs("div",{role:"alert",children:[c.ergebnis.complete&&e.jsx("p",{children:"Der Beitrag wurde in Postiz angelegt. Bitte nicht erneut senden."}),c.ergebnis.warnungen.map((t,n)=>e.jsx("p",{children:t},n))]}),c.ergebnis.queued&&e.jsxs("p",{children:[c.ergebnis.progressMessage||"Medien werden vorbereitet/hochgeladen …",c.ergebnis.progress>0?" · "+Math.round(c.ergebnis.progress)+" %":"",e.jsx("br",{}),"Die Planungsbestätigung wird automatisch geprüft."]}),c.ergebnis.requiresReview&&e.jsx("p",{children:"Übertragung unklar oder teilweise erfolgreich. Vor erneutem Senden zuerst in Postiz prüfen."}),c.ergebnis.status&&e.jsxs("p",{children:["Status: ",c.ergebnis.status]}),(c.ergebnis.ergebnisse||[]).map(t=>e.jsxs("div",{className:"be-zeile"+(t.ok?" ok":" fehl"),children:[e.jsx("span",{className:"ss-punkt"+(t.ok?" ss-punkt-an":""),"aria-hidden":"true"}),e.jsx("span",{children:t.kanal||t.kanalId}),e.jsx("span",{className:"be-grund",children:t.grund||(t.uebergeben||t.status==="queued"?"Medien werden vorbereitet/hochgeladen":t.ok?c.ergebnis.modus==="schedule"?"Planung bestätigt":"Entwurf gespeichert":"Übertragung fehlgeschlagen")})]},t.kanalId)),(c.ergebnis.fehler||[]).map((t,n)=>e.jsxs("div",{className:"be-zeile fehl",children:[e.jsx("span",{className:"ss-punkt"}),e.jsx("span",{children:t})]},"f"+n))]}):null,e.jsxs("div",{className:"be-fuss",children:[e.jsx("button",{type:"button",className:"ss-knopf ss-knopf-still",onClick:()=>T(null),disabled:c.laeuft,children:c.ergebnis?"Schließen":"Abbrechen"}),!c.ergebnis&&c.schritt===2&&e.jsx("button",{type:"button",className:"ss-knopf ss-knopf-still",disabled:c.laeuft,onClick:()=>T(t=>t&&{...t,schritt:1}),children:"Zurück"}),!c.ergebnis&&c.schritt===1&&c.kanalIds.length>1&&e.jsxs("button",{type:"button",className:"ss-knopf ss-knopf-still",disabled:c.laeuft||!c.kanalIds.length,onClick:()=>T(t=>{if(!t)return t;const n={...t.texte};for(const s of t.kanalIds){if(n[s])continue;const o=Y.find(L=>L.id===s);if(!o)continue;const l=Gr(o.plattform),h=xn.filter(L=>(L.plattformen||[]).indexOf(l)>=0);if(!h.length)continue;const j=h.map(L=>L.text).join(`
3
4`);n[s]=t.text?t.text.replace(/\s*$/,"")+`
5
6`+j:j}return{...t,schritt:2,texte:n}}),children:["Je Plattform anpassen (",c.kanalIds.length,")"]}),!c.ergebnis&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"ss-knopf ss-knopf-still",disabled:c.laeuft||!c.kanalIds.length,onClick:()=>er("draft"),children:"Entwurf speichern"}),e.jsx("button",{type:"button",className:"ss-knopf",disabled:c.laeuft||!c.kanalIds.length,onClick:()=>er("schedule"),children:c.laeuft?"Wird übertragen…":"Planen"}),e.jsx("button",{type:"button",className:"ss-knopf ss-knopf-still",disabled:c.laeuft||!c.pfade.length,title:"Ohne Postiz über die eigene Meta-App – mit echtem Standort und Instagram-Co-Autoren",onClick:()=>En(!0),children:"Direkt über Meta …"})]})]})]}),e.jsxs("aside",{className:"be-texte",children:[e.jsxs("div",{className:"be-texte-kopf",children:[e.jsx("span",{className:"be-texte-titel",children:"Gespeicherte Texte"}),e.jsx("button",{type:"button",className:"be-texte-neu",disabled:!c.text.trim()||ds,title:"Den aktuellen Text speichern",onClick:async()=>{Xn(!0);try{await fetch(C+"/api/socialstudio/textentwurf",{method:"POST",headers:A({"Content-Type":"application/json"}),body:JSON.stringify({kunde:d,text:c.text})}),Ft()}catch{}Xn(!1)},children:"+"})]}),e.jsxs("div",{className:"be-texte-liste",children:[xn.map(t=>e.jsxs("div",{className:"be-txt",children:[e.jsxs("button",{type:"button",className:"be-txt-haupt",title:"An den Text anhängen",onClick:()=>T(n=>n&&{...n,text:n.text?n.text.replace(/\s*$/,"")+`
7
8`+t.text:t.text}),children:[e.jsx("span",{className:"be-txt-titel",children:t.titel}),e.jsx("span",{className:"be-txt-vor",children:t.text.slice(0,90)})]}),e.jsxs("div",{className:"be-txt-plat",children:[["instagram","facebook","tiktok","youtube","linkedin"].map(n=>{const s=(t.plattformen||[]).indexOf(n)>=0;return e.jsx("button",{type:"button",className:"be-txt-p"+(s?" an":""),title:s?"Nicht mehr Standard für "+n:"Standard für "+n+" — wird beim Anpassen automatisch angehängt",onClick:async()=>{const o=s?(t.plattformen||[]).filter(l=>l!==n):(t.plattformen||[]).concat([n]);fn(l=>l.map(h=>h.id===t.id?{...h,plattformen:o}:h));try{await fetch(C+"/api/socialstudio/textentwurf",{method:"POST",headers:A({"Content-Type":"application/json"}),body:JSON.stringify({id:t.id,plattformen:o})})}catch{}},children:e.jsx(ct,{plattform:n})},n)}),e.jsx("button",{type:"button",className:"be-txt-weg",title:"Löschen",onClick:async()=>{fn(n=>n.filter(s=>s.id!==t.id));try{await fetch(C+"/api/socialstudio/textentwurf?id="+encodeURIComponent(t.id),{method:"DELETE",headers:A()})}catch{}},children:"✕"})]})]},t.id)),!xn.length&&e.jsx("div",{className:"be-texte-leer",children:"Noch kein Text gespeichert. Schreib einen und leg ihn mit + ab — Hashtag-Blöcke, Standardhinweise, der immer gleiche Abbinder."})]})]})]})}),e.jsx("style",{children:`
9        /* ── Eigene Farbwelt (Dima 01.09.2026) ─────────────────────────
10           Das Studio ist ab jetzt die Startseite der Marketing-Leute und
11           bekommt deshalb eine eigene: warmes Rot-Orange-Gelb statt des
12           dunkelgruenen Dashboards. Der Wechsel ist keine Laune — wer sich
13           hier einloggt, soll am ersten Blick erkennen, wo er ist.
14           Die drei Warnstufen laufen jetzt ueber die WAERME: Gold ruhig,
15           Orange knapp, Rot ueberfaellig. Heisser heisst dringender — das
16           traegt ohne eine zweite Farbfamilie neben dem Akzent. */
17        .ss-root { --bg:#0c0705; --bg-2:#150c08; --card:rgba(255,255,255,.035);
18          --line:rgba(255,255,255,.08); --line-2:rgba(255,255,255,.14);
19          --ink:rgba(255,255,255,.93); --ink-2:rgba(255,255,255,.54);
19 --ink-3:rgba(255,255,255,.33);
20          --akzent:#f2933c; --heiss:#e04b3c; --warm:#f2933c; --ruhig:#d9a441;
21          /* „Online" bleibt GRUEN (Dima 01.09.2026). Der Akzent faerbt die
22             Oberflaeche, aber ein Zustand ist keine Zierde: gruen heisst hier
23             wie ueberall im Haus „erledigt / ist draussen". In Orange sah ein
24             erledigtes Medium aus wie eine Auswahl. */
25          --online:#3ecf9a;
26          /* Volle Fensterbreite (Dima 01.09.2026). Die Seite lebt von
27             Bildreihen und einem Wochenkalender — beide gewinnen mit jedem
28             Pixel. Ein Deckel liess auf breiten Schirmen Rand stehen, den
29             niemand haben wollte. */
30          min-height: 100vh; background: var(--bg); color: var(--ink);
31          max-width: none; margin: 0; padding: 10px 24px 24px;
32          font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
33          /* KEIN overflow hier (01.09.2026): auch der Wert clip macht aus
34             dem Element einen Scroll-Container, und damit klebt die linke
35             Spalte nicht mehr — sie scrollte mit. Noetig war es ohnehin nur
36             wegen des Leuchtens, das ueber den Rand hinausragte; das liegt
37             inzwischen fest am Fenster und kann nicht mehr ausscheren. */
38          position: relative; isolation: isolate; }
39        /* Das Licht aus der Vorlage: ein weiches, warmes Leuchten hinter dem
40           Kopf. Bewusst NUR hier — im Dashboard bleiben gelbe Schleier
41           verboten, dort ist Dunkelgruen die Marke. */
42        /* Das Leuchten lag mit -10 % links und rechts ausserhalb der Seite —
43           daher liess sich seitlich aus dem Bildschirm scrollen. Es bleibt
44           jetzt in der Seite; die Weichzeichnung traegt den Rest. */
45        /* Das Licht spannt sich ueber das GANZE Fenster, auch hinter die
46           Menueleiste links (Dima 01.09.2026). Deshalb fixed statt absolute:
47           die Seite selbst beginnt erst rechts von der Leiste, ein Element in
48           ihrem Fluss kann links davon nichts faerben. */
49        .ss-root::before { content: ""; position: fixed; top: -180px; left: 0; width: 100vw; height: 620px;
50          z-index: -1; pointer-events: none;
51          background:
52            radial-gradient(46% 60% at 22% 30%, rgba(224,75,60,.20), transparent 70%),
53            radial-gradient(40% 55% at 62% 12%, rgba(242,147,60,.17), transparent 72%),
54            radial-gradient(30% 45% at 86% 40%, rgba(232,193,74,.10), transparent 75%);
55          filter: blur(12px); }
56        /* Damit das Licht auch durch die Leiste scheint, traegt die Seite
57           selbst keinen deckenden Grund mehr — der Grundton liegt als zweite
58           feste Schicht dahinter, ebenfalls ueber die volle Fensterbreite. */
59        .ss-root { background: transparent; }
60        .ss-root::after { content: ""; position: fixed; inset: 0; width: 100vw;
61          background: var(--bg); z-index: -2; pointer-events: none; }
62        .ss-root ::selection { background: rgba(242,147,60,.26); }
63
64        /* 🐞 Der klebende Kopf hatte einen deckenden Grund und lag damit als
65           schwarzer Balken ueber dem warmen Licht der Seite (Dima 01.09.2026:
66           „warum ist die titelzeile schwarz hinterlegt?"). Er klebt weiter,
67           aber ohne eigene Flaeche: die Unschaerfe allein genuegt, damit der
68           Text lesbar bleibt, wenn Inhalt darunter durchlaeuft. */
69        .ss-kopf { position: sticky; top: 0; z-index: 20;
70          display: flex; align-items: center; justify-content: space-between; gap: 20px;
71          padding: 10px 0 12px; margin-bottom: 18px;
72          border-bottom: 1px solid var(--line);
73          background: transparent;
74          backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
75          -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 84%, transparent 100%);
76          mask-image: linear-gradient(180deg, #000 0%, #000 84%, transparent 100%); }
77        .ss-kopf-links { display: flex; flex-direction: column; gap: 2px; }
78        .ss-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: rgba(255,255,255,.36); }
79        .ss-titel { margin: 0; font-size: 27px; font-weight: 600; letter-spacing: -.02em; }
80
81        /* Tabs als Text mit gruener Unterlinie — keine Knopfgruppe (Hausregel). */
82        .ss-tabs, .ss-umschalt { display: flex; align-items: center; gap: 4px; }
83        .ss-tab { background: none; border: none; font-family: inherit; font-size: 13px; font-weight: 600;
84          color: rgba(255,255,255,.5); padding: 7px 10px; cursor: pointer; border-bottom: 2px solid transparent; }
85        .ss-tab:hover { color: var(--ink); }
86        .ss-tab-an { color: var(--ink); border-bottom-color: var(--akzent); }
87
88        .ss-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 22px;
89          align-items: start; transition: grid-template-columns .18s ease; }
90        .ss-layout:has(.ss-side-schmal) { grid-template-columns: 52px minmax(0, 1fr); }
91        /* Ab 1024 px fuehrt die Cockpit-Leiste (Glasleiste wie im Dashboard, components/CockpitMenue.tsx)
92           durch das Studio — das Menue in der Spalte faellt dort weg, es bleibt nur die Kundenliste.
93           Reiter ohne Kunden (Startseite, Inbox, Gespeichert, Programme) brauchen die Spalte gar nicht.
94           Unter 1024 px gibt es die Glasleiste nicht; dort bleibt das Menue in der Spalte. */
95        /* Seit dem Abend des 01.10. sitzt auch die Kundenwahl in der Leiste (Dima: „dann haben wir den ganzen
96           bereich der postings kalender seite frei") — ab 1024 px faellt die Spalte ganz weg. */
97        @media (min-width: 1024px) {
98          .ss-layout, .ss-layout:has(.ss-side-schmal) { grid-template-columns: minmax(0, 1fr); }
99          .ss-layout > .ss-side { display: none; }
100        }
101        @media (max-width: 900px) { .ss-layout { grid-template-columns: minmax(0, 1fr); } }
102        @media (max-width: 900px) { .ss-layout { grid-template-columns: minmax(0, 1fr); } }
103
104        /* ── Startseite: Begruessung, High Performer, fertige Projekte ── */
105        /* Der Kopf ist der Startseiten-Kopf des Dashboards, in dieser
106           Farbwelt: grosser Verlaufstitel, ein Satz Inhalt darunter, offener
107           Aufbau ohne Kasten. Hinter dem Titel liegt nur Licht, kein Bild —
108           der Text steht dadurch immer auf ruhigem Grund. */
109        /* „Wie lange reicht der Content" ist eine Leseliste, keine Tabelle —
110           ueber die volle Breite standen Name und Zahl zwei Handbreit
111           auseinander. Auf Lesebreite gebracht. */
112        .ss-vorlauf { max-width: 860px; margin-bottom: 20px; }
113        /* Eingebundene Seiten: die Seitenraender des Studios zuruecknehmen,
114           damit sie nicht doppelt liegen. */
115        .ss-fremd { margin: -10px -24px 0; }
116        @media (max-width: 700px) { .ss-fremd { margin: -10px -14px 0; } }
117
118        /* ── Werbe-Kennzahlen ───────────────────────────────────────────
119           Aufbau 1:1 wie .hpt* im Kundendashboard (Eyebrow mit Punkt, grosse
120           Titelzeile, Kachelraster), Farben aus den Variablen dieser Seite.
121           Gruen bleibt der Zustandspunkt „laeuft" — es ist im Haus die Farbe
122           fuer aktiv, nicht Teil der warmen Oberflaeche. */
123        .ss-anz-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11px;
124          font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
125          color: var(--ink-2); margin-bottom: 8px; }
126        .ss-anz-dot { flex: none; width: 7px; height: 7px; border-radius: 50%;
127          background: var(--online); box-shadow: 0 0 8px rgba(62,207,154,.6); }
128        .ss-anz-dot-still { background: rgba(255,255,255,.35); box-shadow: none; }
129        .ss-anz-titel { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.02em;
130          color: var(--ink); line-height: 1.15; }
131        @media (min-width: 768px) { .ss-anz-titel { font-size: 26px; } }
132        .ss-anz-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
133          gap: 12px; margin: 18px 0 20px; }
134        /* Mobil ein sauberes 2-Spalten-Raster statt einer unebenen letzten
135           Kachel ueber die volle Breite. */
136        @media (max-width: 767px) { .ss-anz-raster { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
137        .ss-anz-kachel { border: 1px solid var(--line-2); border-radius: 16px; padding: 16px 17px 17px;
138          background: linear-gradient(160deg, rgba(255,255,255,.05), rgba(255,255,255,.012) 55%), rgba(21,12,8,.5);
139          box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
140        @media (max-width: 767px) { .ss-anz-kachel { padding: 14px 14px 15px; } }
141        .ss-anz-kl { font-size: 10.5px; font-weight: 700; letter-spacing: .055em; text-transform: uppercase;
142          color: var(--ink-2); margin-bottom: 9px; }
143        .ss-anz-kv { font-size: 25px; font-weight: 800; color: var(--ink); letter-spacing: -.02em;
144          line-height: 1; font-variant-numeric: tabular-nums; }
145        @media (max-width: 767px) { .ss-anz-kv { font-size: 22px; } }
146        /* Die Monitoring-Kachel sitzt im selben Raster, traegt aber Linkverhalten. */
147        .ss-anz-kachel-link { display: flex; flex-direction: column; justify-content: flex-start;
148          text-decoration: none; color: inherit; transition: background .18s, border-color .18s; }
149        .ss-anz-kachel-link:hover { border-color: rgba(242,147,60,.42);
150          background: linear-gradient(160deg, rgba(255,255,255,.09), rgba(255,255,255,.03) 55%), rgba(21,12,8,.5); }
151        .ss-anz-kv-link { font-size: 19px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
152        .ss-anz-pfeil { display: inline-block; color: var(--ink-3); transition: transform .18s; }
153        .ss-anz-kachel-link:hover .ss-anz-pfeil { transform: translateX(3px); color: var(--akzent); }
154
155        /* Welche Kunden gerade werben, und der Weg zur naechsten Anzeige,
156           wenn keine laeuft (Dima 01.10.2026). */
157        .ss-anz-kunden { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
158        .ss-anz-kunde { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 4px;
159          border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.035);
160          font-size: 12.5px; font-weight: 600; color: var(--ink); }
161        .ss-anz-kunde-logo { flex: none; width: 22px; height: 22px; border-radius: 50%; overflow: hidden;
162          display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.08); }
163        .ss-anz-leer { margin: 14px 0 22px; }
164        .ss-anz-planen { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px;
165          border-radius: 12px; border: 1px solid rgba(242,147,60,.45); background: rgba(242,147,60,.14);
166          color: #fff; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
167          transition: background .15s, border-color .15s; }
168        .ss-anz-planen:hover { background: rgba(242,147,60,.24); border-color: rgba(242,147,60,.7); }
169
170        /* Startseite anordnen (Dima 01.10.2026): die Reihenfolge setzt CSS-order, den Abstand traegt der Abschnitt.
171           Der oberste sichtbare Abschnitt (Klasse ss-widget-erst) steht ohne Abstand unter dem Gruss. */
172        .ss-start-widgets { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
173        .ss-start-widgets > .ss-hero-offen, .ss-start-fuss { grid-column: 1 / -1; }
174        .ss-widget { min-width: 0; }
175        .ss-widget-leiste { flex-wrap: wrap; }
176        .ss-widget-library { padding: 20px; border: 1px solid var(--line); border-radius: 16px; }
177        .ss-widget-library button { margin: 8px; padding: 12px; border-radius: 12px; background: var(--bg-2); color: var(--ink); border: 1px solid var(--line); }
178        @media (max-width: 700px) { .ss-start-widgets { grid-template-columns: minmax(0,1fr); } .ss-widget { grid-column: 1 / -1 !important; } }
179        .ss-start-widgets > .ss-hero-offen { order: -1; }
180        .ss-widget { margin-top: 88px; min-width: 0; }
181        .ss-widget:empty { display: none; }
182        .ss-widget-erst { margin-top: 0; }
183        .ss-widget > .ss-abschnitt:first-child,
184        .ss-widget > .ss-widget-leiste + .ss-abschnitt { margin-top: 0; }
185        .ss-widget-aus:not(.ss-widget-edit) { display: none; }
186        .ss-widget-edit { margin-top: 18px; padding: 12px 14px 4px; border: 1px dashed var(--line-2); border-radius: 16px; }
187        .ss-widget-edit.ss-widget-erst { margin-top: 0; }
188        .ss-widget-edit.ss-widget-aus { opacity: .55; padding-bottom: 12px; }
189        .ss-widget-leiste { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
190        .ss-widget-aus .ss-widget-leiste { margin-bottom: 0; }
191        .ss-widget-titel { margin-right: auto; font-size: 11px; font-weight: 700; letter-spacing: .1em;
192          text-transform: uppercase; color: var(--ink-2); }
193        .ss-widget-leiste button { min-width: 30px; height: 28px; padding: 0 10px; border-radius: 8px;
194          border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--ink-2);
195          font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
196        .ss-widget-leiste button:hover:not(:disabled) { color: var(--ink); border-color: var(--line-2); }
197        .ss-widget-leiste button:disabled { opacity: .35; cursor: default; }
198        .ss-start-fuss { order: 1000; display: flex; justify-content: center; gap: 8px; margin: 72px 0 24px; }
199        .ss-anordnen { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 10px;
200          border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--ink-2);
201          font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
202        .ss-anordnen:hover { color: var(--ink); border-color: var(--line-2); }
203        /* Neue Content Pieces als Ordner: Zahl der neuen Stuecke oben rechts im Bild. */
204        .ss-neu-zahl { position: absolute; right: 8px; top: 8px; z-index: 2; display: inline-flex; align-items: center;
205          gap: 5px; padding: 3px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; color: #fff;
206          background: rgba(0,0,0,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
207
208        .ss-vorlauf-zahn { display: inline-flex; align-items: center; margin-left: 8px;
209          color: var(--ink-3); cursor: pointer; vertical-align: -2px; }
210        .ss-vorlauf-zahn:hover { color: var(--akzent); }
211
212        /* Offener Kopf statt Bildkachel (Dima 01.09.2026). Masse und Aufbau
213           sind das Gegenstueck zu .al-hero--open / .al-heroGold / .al-title /
214           .al-caret / .al-heroLede im Dashboard — nur das Licht ist warm
215           statt gold, weil diese Seite ihre eigene Farbwelt hat.
216           Die Datei /ss-wallpaper.jpg bleibt liegen, wird hier aber nicht
217           mehr geladen. */
218        .ss-hero-offen { position: relative; margin: 0 0 40px; }
219        @media (min-width: 768px) { .ss-hero-offen { margin-bottom: 56px; } }
220        .ss-hero-licht { position: absolute; left: -160px; top: -150px; width: 780px; height: 520px;
221          max-width: 130%; z-index: 0; pointer-events: none;
222          background:
223            radial-gradient(42% 48% at 33% 40%, rgba(255,180,94,.17) 0%, rgba(242,147,
22360,.05) 36%, transparent 62%),
224            radial-gradient(66% 62% at 26% 32%, rgba(224,75,60,.07) 0%, transparent 60%); }
225        .ss-hero-links { position: relative; z-index: 2; padding: 6px 2px 0; max-width: 940px; }
226        /* min-height haelt die Zeile ruhig, waehrend sich der Gruss tippt —
227           ohne sie springt alles darunter mit jedem Zeichen. */
228        .ss-gruss-titel { margin: 0 0 8px; font-size: 32px; line-height: .98; letter-spacing: -.035em;
229          font-weight: 680; min-height: 1.05em;
230          background: linear-gradient(168deg, #fff4e6 0%, #ffdfb8 30%, #f3f0eb 64%, #d9d6d1 100%);
231          -webkit-background-clip: text; background-clip: text;
232          color: transparent; -webkit-text-fill-color: transparent;
233          text-shadow: 0 6px 60px rgba(242,147,60,.14); }
234        @media (min-width: 768px) { .ss-gruss-titel { font-size: 44px; margin: 0 0 12px; } }
235        @media (min-width: 1024px) { .ss-gruss-titel { font-size: 64px; } }
236        /* -webkit-text-fill-color noetig: der Cursor steht IM Verlaufstitel und
237           wuerde dessen transparente Fuellung erben. */
238        .ss-caret { display: inline-block; width: 3px; height: .78em; margin-left: 5px;
239          vertical-align: -.04em; border-radius: 2px; background: #ffb45e;
240          -webkit-text-fill-color: #ffb45e; box-shadow: 0 0 12px rgba(255,180,94,.85);
241          animation: ss-blink 1s steps(1) infinite; }
242        @keyframes ss-blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
243        @media (prefers-reduced-motion: reduce) { .ss-caret { animation: none; } }
244        .ss-gruss-text { margin: 22px 0 0; font-size: 16px; line-height: 1.55;
245          color: rgba(255,255,255,.6); font-weight: 400; }
246        @media (min-width: 768px) { .ss-gruss-text { font-size: 19px; } }
247
248        /* Der Zeitraum-Umschalter stand direkt auf der ersten Kachel — der
249           Kopf braucht seinen eigenen Fuss. */
250        .ss-abschnitt-kopf { display: flex; align-items: flex-end; justify-content: space-between;
251          gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
252        .ss-um-knopf { background: none; border: 1px solid var(--line); border-radius: 999px;
253          font-family: inherit; font-size: 11.5px; font-weight: 600; color: var(--ink-2);
254          padding: 5px 12px; cursor: pointer; }
255        .ss-um-knopf:hover { color: var(--ink); border-color: var(--line-2); }
256        .ss-um-an { color: #1a0e07; background: var(--akzent); border-color: transparent; }
257
258        /* Sechs Beitraege, sieben Projekte — beide Reihen laufen ueber dieselbe
259           Rasterklasse, damit die Seite EINE Spaltenlogik hat. */
260        /* Mehr Luft zwischen den Abschnitten (Dima 01.09.2026). Die
261           Startseite hat jetzt vier eigenstaendige Bloecke; mit 30 px dazwischen
262           lasen sie sich als eine lange Bahn. */
263        .ss-start .ss-abschnitt { margin-top: 88px; }
264        /* Der ERSTE Abschnitt einer Seite braucht keinen Vorlauf — der Kopf
265           steht direkt darueber. Galt bisher nur nach dem Begruessungsbild. */
266        .ss-start > .ss-abschnitt:first-child { margin-top: 0; }
267        .ss-start > .ss-hero-offen + .ss-abschnitt { margin-top: 0; }
268        /* Eine Reihe, seitlich zu schieben (Dima 01.09.2026). Zwanzig Kacheln
269           als Galerie waren drei Reihen hoch und schoben alles darunter aus dem
270           Bild; als Bahn bleibt die Startseite ueberschaubar und man blaettert
271           nur, wenn man will. Sieben passen sichtbar hinein, das achte lugt
272           hervor — so sieht man, dass es weitergeht. */
273        .ss-bahn { display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden;
274          margin-bottom: 54px; padding-bottom: 8px;
275          scroll-snap-type: x proximity; scrollbar-width: thin;
276          scrollbar-color: rgba(255,255,255,.18) transparent; }
277        .ss-bahn > * { flex: 0 0 calc((100% - 6 * 12px) / 7); scroll-snap-align: start; }
278        .ss-bahn-teil { min-height: 1px; }
279        .ss-bahn::-webkit-scrollbar { height: 8px; }
280        .ss-bahn::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 4px; }
281        .ss-bahn::-webkit-scrollbar-track { background: transparent; }
282        @media (max-width: 1400px) { .ss-bahn > * { flex-basis: calc((100% - 3 * 12px) / 4); } }
283        @media (max-width: 900px)  { .ss-bahn > * { flex-basis: calc((100% - 12px) / 2); } }
284
285        .ss-kachelreihe { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; margin-bottom: 54px; }
286        .ss-reihe-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
287        @media (max-width: 1400px) { .ss-kachelreihe, .ss-reihe-7 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
288        @media (max-width: 900px)  { .ss-kachelreihe, .ss-reihe-7 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
289
290        .ss-top { display: flex; flex-direction: column; gap: 7px; text-decoration: none; color: inherit; }
291        .ss-top-bild { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 12px;
292          overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); }
293        .ss-top-bild > img { width: 100%; height: 100%; object-fit: cover; display: block;
294          transition: transform .3s ease; }
295        /* Nur das Motiv waechst beim Ueberfahren, das Kundenzeichen nicht —
296           es ist eine Marke, kein Bildinhalt. Ohne die zweite Regel zoege der
297           allgemeine Bild-Waehler es mit. (Keine Backticks hier — der Block
298           steht in einem Template-Literal.) */
299        .ss-top:hover .ss-top-bild > img { transform: scale(1.035); }
300        .ss-top:hover .ss-top-logo img { transform: scale(1.8); }
301        .ss-top-leer { display: flex; align-items: center; justify-content: center; height: 100%;
302          font-size: 11px; color: var(--ink-3); text-align: center; padding: 6px; }
303        /* Sichtbar erst, wenn das Bild wirklich nicht mehr existiert (siehe
304           onError). Steht bewusst UNTER der Zahl im Verlauf, damit die Kachel
305           ihre Aussage behaelt. */
306        .ss-top-ohne { display: none; position: absolute; inset: 0; align-items: center;
307          justify-content: center; text-align: center; padding: 10px;
308          font-size: 11px; line-height: 1.4; color: rgba(255,255,255,.34); }
309        /* Die Zahl liegt auf dem Bild, nicht daneben: sie ist der Grund, warum
310           die Kachel hier steht. Verlauf statt Kasten, damit helle Motive sie
311           nicht schlucken. */
312        .ss-top-x { position: absolute; top: 7px; right: 7px; z-index: 3;
313          border: none; border-radius: 999px; cursor: pointer; font-family: inherit;
314          font-size: 11px; font-weight: 600; line-height: 1; padding: 6px 8px;
315          background: rgba(12,7,5,.62); color: rgba(255,255,255,.82);
316          backdrop-filter: blur(6px); opacity: 0; transition: opacity .14s, background .14s; }
317        .ss-top:hover .ss-top-x { opacity: 1; }
318        .ss-top-x:hover { background: rgba(224,75,60,.9); color: #fff; }
319        /* Die Rueckfrage bleibt sichtbar, auch wenn die Maus die Kachel
320           verlaesst — sonst verschwindet die Frage vor der Antwort. */
321        .ss-top-x-fragt { opacity: 1; background: rgba(224,75,60,.92); color: #fff; }
322        .ss-neu { background: none; border: none; padding: 0; font-family: inherit;
323          text-align: left; cursor: pointer; }
324        .ss-top-logo { position: absolute; top: 8px; left: 8px; width: 24px; height: 24px;
325          border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center;
326          background: rgba(255,255,255,.14); backdrop-filter: blur(6px);
327          box-shadow: 0 2px 8px rgba(0,0,0,.35); z-index: 2; }
328        /* Angaben IM Bild: unter der Kachel rissen sie die Reihe auseinander,
329           und bei 20 Kacheln entstanden zwei Textzeilen je Reihe, die niemand
330           liest. Der Verlauf haelt sie auch auf hellen Motiven lesbar. */
331        .ss-top-unten { position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 9px 8px;
332          display: flex; flex-direction: column;
333          background: linear-gradient(to top, rgba(12,7,5,.9) 0%, rgba(12,7,5,.6) 52%, transparent 100%); }
334        .ss-top-zahl2 { font-size: 16px; font-weight: 700; letter-spacing: -.015em; color: #fff; line-height: 1.2; }
335        .ss-top-konto2 { font-size: 11.5px; font-weight: 600; color: rgba(255,255,255,.9);
336          overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
337        .ss-top-meta2 { font-size: 10.5px; color: rgba(255,255,255,.55);
338          overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
339        .ss-top-zahl { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 9px 7px;
340          font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: #fff;
341          background: linear-gradient(to top, rgba(12,7,5,.86), transparent); }
342        /* Die Einordnung liegt oben auf dem Bild statt darunter: sie ist die
343           Antwort auf „worueber reden die?" und soll ohne Lesen der Zeile
344           darunter ankommen. */
345        .ss-top-thema { position: absolute; top: 7px; left: 7px; right: 7px;
346          font-size: 10px; font-weight: 600; color: rgba(255,255,255,.92);
347          background: rgba(12,7,5,.62); backdrop-filter: blur(6px);
348          padding: 3px 7px; border-radius: 6px;
349          overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
350        .ss-top-fuss { display: flex; flex-direction: column; gap: 1px; padding: 0 2px; }
351        .ss-top-konto { font-size: 12px; font-weight: 600; color: var(--ink);
352          overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
353        .ss-top-meta { font-size: 11px; color: var(--ink-3); }
354
355        .ss-proj { display: flex; flex-direction: column; gap: 6px; background: none; border: none;
356          padding: 0; font-family: inherit; text-align: left; cursor: pointer; }
357        .ss-proj-bild { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: 12px;
358          overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); }
359        .ss-proj-name2 { font-size: 12.5px; font-weight: 600; color: #fff; line-height: 1.3;
360          display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
361        .ss-proj-bild img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
362        .ss-proj:hover .ss-proj-bild { border-color: rgba(242,147,
36260,.4); }
363        .ss-proj:hover .ss-proj-bild > img { transform: scale(1.04); }
364        .ss-proj:hover .ss-proj-bild .ss-top-logo img { transform: scale(1.8); }
365        .ss-proj-name { font-size: 12px; font-weight: 600; color: var(--ink);
366          overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
367        .ss-proj-kunde { font-size: 11px; color: var(--ink-3); padding: 0 2px;
368          overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
369
370        .ss-skel { border-radius: 12px;
371          background: linear-gradient(90deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.085) 50%, rgba(255,255,255,.04) 100%);
372          background-size: 220% 100%; animation: ss-puls 1.5s ease-in-out infinite; }
373        .ss-skel-hoch { aspect-ratio: 9 / 16; }
374        .ss-skel-quad { aspect-ratio: 1 / 1; }
375        @keyframes ss-puls { 0% { background-position: 120% 0; opacity: .6; }
376          50% { opacity: 1; } 100% { background-position: -20% 0; opacity: .6; } }
377        @media (prefers-reduced-motion: reduce) { .ss-skel { animation: none; } }
378
379        /* ── Empfehlungen ───────────────────────────────────────────────
380           Die Vorschlaege stehen als Karten oben, weil sie das Ergebnis sind;
381           die Zahlen darunter sind der Beleg, nicht die Botschaft. */
382        .ss-vorschlaege { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
383          gap: 12px; margin-bottom: 40px; }
384        @media (max-width: 1100px) { .ss-vorschlaege { grid-template-columns: minmax(0, 1fr); } }
385        .ss-vor { border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px;
386          background: rgba(255,255,255,.028); }
387        .ss-vor-kopf { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
388        .ss-vor-marke { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
389        .ss-vor-luecke .ss-vor-marke { background: var(--warm); }
390        .ss-vor-stark .ss-vor-marke { background: var(--online); }
391        .ss-vor-schwach .ss-vor-marke { background: var(--heiss); }
392        .ss-vor-titel { font-size: 13.5px; font-weight: 650; }
393        .ss-vor-text { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
394        .ss-vor-tat { margin: 7px 0 0; font-size: 12.5px; color: var(--ink); line-height: 1.5; }
395
396        .ss-themen { display: flex; flex-direction: column; max-width: 860px; }
397        .ss-thema { display: grid; grid-template-columns: 190px minmax(0, 1fr) 54px 68px;
398          align-items: center; gap: 12px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
399        @media (max-width: 760px) { .ss-thema { grid-template-columns: minmax(0, 1fr) 54px; }
400          .ss-thema-balken, .ss-thema-median { display: none; } }
401        .ss-thema-name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
402        /* Zwei Balken untereinander statt nebeneinander: so vergleicht das
403           Auge die LAENGE, nicht die Farbe. */
404        .ss-thema-balken { display: flex; flex-direction: column; gap: 3px; }
405        .ss-thema-balken i { display: block; height: 4px; border-radius: 2px; min-width: 2px; }
406        .ss-thema-wir { background: var(--akzent); }
407        .ss-thema-sie { background: rgba(255,255,255,.24); }
408        .ss-thema-zahl { font-size: 11.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; }
409        .ss-thema-median { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; text-align: right; }
410
411        /* ── Linke Spalte: Menue oben, Kunde unten ─────────────────────── */
412        /* Die Kundenliste sitzt unten (Dima 01.09.2026): margin-top auto
413           schiebt sie ans Ende der Spalte, egal wie lang das Menue ist. */
414        /* Die Kundenliste haengt unten in der Spalte (Dima 01.09.2026:
415           „die kunden unten anpinnen"): die Spalte spannt sich ueber die
416           Fensterhoehe, margin-top: auto am Kundenblock schiebt ihn ans
417           Ende. Menue oben, Kunde unten — dazwischen Luft, kein Fuellwerk. */
418        /* 110px waren zu wenig: Kopf, Seitenrand und der 60-px-Fuss der Seite
419           summieren sich auf gut 170 — die Spalte schob die Seite um 40 px
420           ueber den Rand, und alles scrollte doch. */
421        /* height statt min-height: nur mit einer FESTEN Hoehe schiebt
422           margin-top: auto den Kundenblock wirklich ans untere Ende — bei
423           min-height waechst die Spalte einfach mit dem Inhalt und der Block
424           bleibt in der Mitte haengen (Dima 01.09.2026: „bitte unten andocken"). */
425        .ss-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 18px;
426          height: calc(100vh - 110px); }
427        .ss-nav { display: flex; flex-direction: column; gap: 1px; }
428        .ss-klapp { align-self: flex-start; width: 26px; height: 26px; border-radius: 8px;
429          border: 1px solid var(--line); background: none; color: var(--ink-3);
430          display: flex; align-items: center; justify-content: center; cursor: pointer; }
431        .ss-klapp:hover { color: var(--ink); border-color: var(--line-2); }
432        .ss-nav-punkt { display: flex; align-items: center; gap: 10px;
433          text-align: left; background: none; border: none; font-family: inherit;
434          font-size: 13.5px; font-weight: 500; color: rgba(255,255,255,.5); padding: 9px 12px;
435          border-radius: 9px; cursor: pointer; transition: color .14s, background .14s; }
436        .ss-nav-zeichen { flex: none; display: flex; }
437        .ss-nav-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
438        /* Eingeklappt bleiben nur die Zeichen — und die Kundenlogos. Alles
439           Uebrige verschwindet, statt auf 52 px umzubrechen. */
440        .ss-side-schmal .ss-nav-text,
441        .ss-side-schmal .ss-side-name,
442        .ss-side-schmal .ss-side-titel,
443        .ss-side-schmal .ss-side-schalter,
444        .ss-side-schmal .ss-leer { display: none; }
445        .ss-side-schmal .ss-nav-punkt { justify-content: center; padding: 9px 0; }
446        .ss-side-schmal .ss-side-zeile { justify-content: center; padding: 5px 0; }
447        .ss-side-schmal .ss-side-kopf { padding-bottom: 0; }
448        .ss-nav-punkt:hover { color: var(--ink); background: rgba(255,255,255,.04); }
449        /* Der gewaehlte Punkt traegt KEINE Farbe (Dima 01.09.2026), sondern
450           nur Helligkeit: fett, reinweiss, mit einem feinen Schein. Dieselbe
451           Geste wie in der Ordnerleiste des Datei-Explorers — der Akzent
452           gehoert zu Handlungen, nicht zur Ortsangabe. */
453        .ss-nav-an { color: #fff; font-weight: 700; background: none;
454          text-shadow: 0 0 16px rgba(255,255,255,.4); }
455        .ss-nav-an .ss-nav-zeichen { color: #fff;
456          filter: drop-shadow(0 0 8px rgba(255,255,255,.35)); }
457        /* Rücksprung ins Dashboard (Dima 01.10.2026): ein Link, kein Reiter —
458           durch eine feine Linie von der Cockpit-Liste abgesetzt. */
459        .ss-nav-zurueck { text-decoration: none; margin-bottom: 6px; position: relative; }
460        .ss-nav-zurueck::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -4px;
461          height: 1px; background: var(--line); }
462
463        /* Kundenliste haengt am UNTEREN Ende der Spalte (Dima 01.09.2026). */
464        .ss-kundenwahl { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; }
465        .ss-konfig { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 7px 9px;
466          border-radius: 9px; font-size: 12.5px; color: var(--ink-3); text-decoration: none; }
467        .ss-konfig:hover { color: var(--ink); background: rgba(255,255,255,.04); }
468        .ss-kopf-plan { display: flex; align-items: center; gap: 16px; flex: none; }
469        .ss-kundenwahl-oben { display: flex; align-items: center; gap: 10px; flex: none; }
470        .ss-kundenwahl-oben .ss-kw-logo { flex: none; width: 30px; height: 30px; border-radius: 50%;
471          overflow: hidden; display: flex; align-items: center; justify-content: center;
472          background: rgba(255,255,255,.08); }
473        .ss-kw-zeile { display: flex; align-items: center; gap: 9px; }
474        .ss-kw-select { min-width: 220px; max-width: 340px; background: rgba(255,255,255,.05);
475          border: 1px solid var(--line); border-radius: 10px; color: var(--ink);
476          font-family: inherit; font-size: 14px; font-weight: 550; padding: 10px 12px; cursor: pointer;
477          appearance: none; -webkit-appearance: none;
478          background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,.45) 50%), linear-gradient(135deg, rgba(255,255,255,.45) 50%, transparent 50%);
479          background-position: calc(100% - 15px) 51%, calc(100% - 10px) 51%;
480          background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 26px; }
481        .ss-kw-select:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
482        .ss-kw-select option { background: #150c08; color: #fff; }
483
484        .ss-side-kopf { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 8px; }
485        .ss-side-kopf-2 { margin-top: 18px; }
486        .ss-side-schalter { background: none; border: none; font-family: inherit; font-size: 10.5px; font-weight: 600;
487          color: rgba(255,255,255,.38); cursor: pointer; padding: 2px 0; white-space: nowrap; }
488        .ss-side-schalter:hover { color: var(--akzent); }
489        .ss-side-titel { font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: rgba(255,255,255,.36); }
490        /* Fuenf Kunden sichtbar, der Rest per Scrollen (Dima 01.09.2026) —
491           dreizehn Namen schoben Menue und Kalender auseinander. */
492        /* Sechs Kunden sichtbar; die Liste laeuft nach unten ins Dunkle aus,
493           damit man sieht, dass es weitergeht (Dima 01.09.2026). Der Verlauf
494           liegt als Maske auf der Liste — ein aufgesetzter Schleier wuerde die
495           letzte Zeile unklickbar machen. */
496        /* 01.10.2026: kein Scrollkasten mehr (Dima: „hier die kundenliste komplett anzeigen. bzw 15 kunden und
497           dann erst mehr anzeigen") — die Liste zeigt 15, der Rest kommt ueber „Mehr anzeigen". Reicht die Hoehe
498           der Spalte nicht, scrollt die Spalte selbst (.ss-side), nicht ein Kasten darin. */
499        .ss-side-liste { display: flex; flex-direction: column; }
500        .ss-side { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
501        .ss-side-mehr { align-self: flex-start; margin: 4px 0 0 9px; padding: 4px 0; background: none; border: none;
502          font-family: inherit; font-size: 12px; font-weight: 600; color: var(--akzent); cursor: pointer; }
503        .ss-side-mehr:hover { text-decoration: underline; }
504        .ss-side-liste::-webkit-scrollbar { width: 6px; }
505        .ss-side-liste::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 3px; }
506        .ss-side-zeile { display: flex; align-items: center; gap: 10px; width: 100%; padding: 5px 9px;
507          border: none; border-radius: 9px; background: none; font-family: inherit; font-size: 12.5px;
508          color: var(--ink); cursor: pointer; text-align: left; opacity: .55; }
509        .ss-side-zeile:hover { background: rgba(255,255,255,.04); }
510        .ss-side-zeile-an { opacity: 1; background: rgba(255,255,255,.05); }
511        /* Kunden-Zeichen als KREIS, randlos, bildfuellend (Dima 01.09.2026).
512           Der Rahmen machte aus jedem Favicon eine gerahmte Briefmarke, und
513           object-fit contain liess es in einem Kasten schweben; cover fuellt
514           den Kreis, was ueber den Rand geht schneidet der Kreis ab.
515           ACHTUNG: in diesem Block sind Backticks verboten — er steht in
516           einem Template-Literal und wuerde die Datei zerreissen. */
517        .ss-side-logo { flex: none; width: 22px; height: 22px; border-radius: 50%; overflow: hidden;
518          display: flex; align-items: center; justify-content: center;
519          background: rgba(255,255,255,.08); }
520        /* Das Favicon ist quadratisch mit eigenem Rand — in einem Kreis blieb
521           davon ein Quadrat mit Luft ringsum. 150 % ueberzeichnen es, der
522           Kreis schneidet den Rand ab: das Zeichen fuellt die Flaeche.
523           (Dima 01.09.2026: „nicht quadrat im kreis sondern hochskaliert".) */
524        .ss-side-logo-img { width: 100%; height: 100%; object-fit: cover; display: block;
525          transform: scale(1.8); }
526        .ss-side-logo-ini { font-size: 8.5px; font-weight: 700; letter-spacing: .02em; color: rgba(255,255,255,.6); }
527        .ss-side-zeile-an .ss-side-logo { box-shadow: 0 0 0 1.5px rgba(242,147,60,.5); }
528        .ss-side-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
529        .ss-stand-zeile { display: flex; align-items: center; justify-content: space-between;
530          padding: 5px 9px; font-size: 12px; color: var(--ink-2); }
531        .ss-stand-zeile b { color: var(--ink); font-variant-numeric: tabular-nums; }
532
533        .ss-werkzeug { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
534        .ss-suche { flex: 1 1 240px; min-width: 0; background: var(--card); border: 1px solid var(--line);
535          border-radius: 10px; padding: 9px 12px; color: var(--ink); font-family: inherit; font-size: 13px; }
536        .ss-suche:focus { outline: none; border-color: var(--line-2); }
537        .ss-filter { display: flex; gap: 6px; flex-wrap: wrap; }
538        .ss-filter-knopf { background: none; border: 1px solid var(--line); border-radius: 9px;
539          padding: 7px 11px; font-family: inherit; font-size: 12px; font-weight: 600;
540          color: rgba(255,255,255,.5); cursor: pointer; }
541        .ss-filter-knopf:hover { color: var(--ink); border-color: var(--line-2); }
542        .ss-filter-an { color: var(--akzent);
542 border-color: rgba(242,147,60,.32); background: rgba(242,147,60,.1); }
543
544        /* Sieben Projekte nebeneinander (Dima 01.09.2026). Feste Spaltenzahl
545           statt auto-fill: „sieben" ist die Ansage, nicht „so viele wie
546           passen". Unterhalb von 1500px wird zurueckgestuft, sonst sind die
547           Vorschaubilder briefmarkengross. */
548        .ss-projekte { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; }
549        @media (max-width: 1500px) { .ss-projekte { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
550        @media (max-width: 1100px) { .ss-projekte { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
551        @media (max-width: 700px)  { .ss-projekte { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
552        /* Quadratisch und offen wie auf der Dashboard-Startseite (Dima
553           01.09.2026): das Bild traegt, der Text steht darunter im Freien.
554           Der Kasten drumherum machte aus einer Bildreihe eine Karteikarte. */
555        .ss-projekt { display: flex; flex-direction: column; text-align: left; padding: 0; cursor: pointer;
556          background: none; border: none; overflow: visible;
557          font-family: inherit; color: var(--ink); }
558        .ss-projekt-bild { position: relative; display: block; aspect-ratio: 1 / 1;
559          background: rgba(0,0,0,.3); border-radius: 14px; overflow: hidden;
560          border: 1px solid var(--line); }
561        .ss-projekt:hover .ss-projekt-bild { border-color: var(--line-2); }
562        .ss-projekt-bild img { transition: transform .3s ease; }
563        .ss-projekt:hover .ss-projekt-bild img { transform: scale(1.035); }
564        .ss-projekt-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
565        .ss-projekt-fertig::after { content: ""; position: absolute; inset: 0;
566          background: rgba(62,207,154,.32); pointer-events: none; }
567        .ss-projekt-haken { position: absolute; inset: 0; display: flex; align-items: center;
568          justify-content: center; color: #fff; pointer-events: none;
569          filter: drop-shadow(0 2px 8px rgba(0,0,0,.4)); }
570        .ss-projekt-text { display: flex; flex-direction: column; gap: 5px; padding: 9px 2px 0; }
571        .ss-projekt-name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
572        .ss-projekt-meta { font-size: 11.5px; color: var(--ink-3); }
573        .ss-projekt-stand { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-2); }
574        .ss-punkt { flex: none; width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.28); }
575        .ss-punkt-an { background: var(--online); }
576        .ss-balken { flex: 1 1 auto; height: 2px; border-radius: 2px; background: rgba(255,255,255,.07); overflow: hidden; }
577        .ss-balken i { display: block; height: 100%; border-radius: 2px; }
578
579        /* ───────── Redaktionsplan ───────── */
580        .rp { display: flex; flex-direction: column; gap: 14px; }
581        /* Blaettern, „Diese Woche" und die Spanne stehen mittig ueber dem
582           Kalender (Dima 01.09.2026) — sie gehoeren zum Raster darunter, nicht
583           an den linken Rand. Die Beitragszahl haengt rechts, ohne die Mitte
584           zu verschieben. */
585        /* ── Redaktionsplan: drei Spalten wie bei Later ─────────────────
586           links die Steuerung, in der Mitte der Vorrat, rechts der Kalender.
587           Der Kalender bekommt die volle Fensterhoehe und scrollt in sich —
588           vorher endete er nach 17 Zeilen mitten im Tag. */
589        /* Zwei Spalten: Vorrat und Kalender. Die dritte (Steuerung) ist
590           entfallen — Zeitraum, Takt und Blaettern stehen jetzt im Seitenkopf,
591           die Kanaele in der Zeile darueber. */
592        /* Galerie schmaler (Dima 01.10.2026: „den mittleren bereich mit projekte & alle schmaler machen. der ist
593           weniger relevant als der kalender") — 340 statt 500 px, die Kacheln laufen in drei Spalten. */
594        .rp-arbeit { display: grid; grid-template-columns: 340px minmax(0, 1fr);
595          gap: 18px; align-items: start; }
596        @media (max-width: 1000px) { .rp-arbeit { grid-template-columns: minmax(0, 1fr); }
597          .rp-galerie { display: none; } }
598        /* Die Kanalzeile steht ueber Galerie und Kalender, nicht in der linken
599           Spalte — sie gilt fuer beide. */
600        .rp-profile-oben { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; align-items: center; }
601        .rp-profil-neu { flex: none; width: 38px; height: 38px; border-radius: 50%;
602          border: 1.5px dashed var(--line-2); color: var(--ink-3);
603          display: flex; align-items: center; justify-content: center;
604          text-decoration: none; transition: color .14s, border-color .14s; }
605        .rp-profil-neu:hover { color: var(--akzent); border-color: var(--akzent); }
606        /* Eine Zeile ueber der Arbeitsflaeche: links die Plattformwahl, in der
607           Mitte die Woche (ueber dem Kalender), rechts Soll und Ist. */
608        .rp-oben { display: grid; grid-template-columns: 340px minmax(0, 1fr) auto;
609          gap: 18px; align-items: end; margin-bottom: 14px; }
610        @media (max-width: 1000px) { .rp-oben { grid-template-columns: minmax(0, 1fr); gap: 10px; } }
611        .rp-oben-links { display: flex; flex-direction: column; gap: 7px; }
612        .rp-oben-titel { font-size: 10px; font-weight: 700; letter-spacing: .13em;
613          text-transform: uppercase; color: var(--ink-3); }
614        .rp-oben-mitte { display: flex; align-items: center; gap: 12px; }
615        .rp-oben-rechts { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
616        .rp-spanne-oben { font-size: 12.5px; font-weight: 600; color: var(--ink); }
617        /* Fortschritt je Projekt: wie viel davon schon online ist. */
618        /* Der Balken steht NEBEN dem Text und haengt am rechten Rand
619           (Dima 01.09.2026) — untereinander wuchs jede Zeile um eine Stufe,
620           und die Liste wurde doppelt so hoch. */
621        .rp-gal-proj-zeile { display: flex; align-items: center; gap: 10px; }
622        /* Feste Breite (Dima 01.09.2026): mit flex:1 war der Balken bei kurzen
623           Projektnamen doppelt so lang wie bei langen — dann vergleicht das
624           Auge Laengen, die nichts bedeuten. */
625        .rp-gal-proj-bar { flex: none; width: 84px; margin-left: auto; height: 3px;
626          border-radius: 2px; background: rgba(255,255,255,.09); overflow: hidden; }
627        .rp-gal-proj-bar i { display: block; height: 100%; border-radius: 2px; }
628        .rp-spanne-oben { font-size: 12.5px; font-weight: 600; color: var(--ink); }
629        .ss-meta-ico { display: inline-flex; align-items: center; color: #0866ff; margin-right: 5px; }
630        .ss-anz-kv-link { display: inline-flex; align-items: center; }
631
632        /* Nur die Galerie scrollt (Dima 01.09.2026). Alles andere — Menue,
633           Kundenliste, Steuerung, Kalender — steht fest. Dafuer bekommt die
634           Galerie eine feste Hoehe statt einer Obergrenze: als reine
635           max-height waere sie kuerzer als der Kalender und die SEITE wuerde
636           scrollen, sobald die Liste laenger wird. */
637        .rp-galerie { display: flex; flex-direction: column; gap: 10px;
638          height: calc(100vh - 190px); overflow: hidden; }
639        /* Ein Schalter mit zwei Feldern statt zweier loser Knoepfe: so ist zu
640           sehen, dass es EINE Entscheidung ist und welche Seite gilt
641           (Dima 01.09.2026: „alle tab muss sichtbarer sein"). */
642        .rp-gal-kopf { display: flex; gap: 3px; flex: none; padding: 3px;
643          background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 10px; }
644        .rp-gal-reiter { flex: 1; background: none; border: none; border-radius: 8px;
645          font-family: inherit; font-size: 12.5px; font-weight: 600;
646          color: var(--ink-2); padding: 7px 8px; cursor: pointer; transition: background .14s, color .14s; }
647        .rp-gal-reiter:hover { color: var(--ink); }
648        .rp-gal-reiter.an { color: #1a0e07; background: var(--akzent); }
649        .rp-gal-zurueck { flex: none; background: none; border: none; font-family: inherit;
650          font-size: 11.5px; color: var(--ink-2); cursor: pointer; text-align: left; padding: 0 2px; }
651        .rp-gal-liste { display: flex; flex-direction: column; gap: 6px; overflow-y: auto;
652          min-height: 0; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
653        .rp-gal-proj { display: flex; align-items: center; gap: 9px; width: 100%;
654          background: none; border: 1px solid var(--line); border-radius: 10px;
655          padding: 6px; font-family: inherit; color: inherit; text-align: left; cursor: pointer; }
656        .rp-gal-proj:hover { border-color: rgba(242,147,60,.4); }
657        .rp-gal-proj-bild { flex: none; width: 34px; height: 44px; border-radius: 7px;
658          overflow: hidden; background: rgba(0,0,0,.35); }
659        .rp-gal-proj-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
660        .rp-gal-proj-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
661        .rp-gal-proj-n { font-size: 12px; font-weight: 600; overflow: hidden;
662          text-overflow: ellipsis; white-space: nowrap; }
663        .rp-gal-proj-m { font-size: 10.5px; color: var(--ink-3); }
664        /* Feste Zeilenhoehe statt „so hoch wie der Inhalt": mit aspect-ratio
665           allein staffelten sich die Kacheln versetzt, sobald ein Bild fehlte
666           oder spaeter kam (Dima 01.09.2026: „nicht shufflen"). grid-auto-rows
667           legt jede Zeile vorher fest — das Raster steht, bevor das erste Bild
668           da ist. */
669        .rp-gal-raster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
670          grid-auto-rows: 104px; gap: 6px; overflow-y: auto; align-content: start; min-height: 0;
671          scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
672        .rp-gal-kachel { position: relative; height: 104px; border-radius: 8px;
673          overflow: hidden; background: rgba(0,0,0,.35); border: 1px solid var(--line);
674          padding: 0; cursor: pointer; }
675        .rp-gal-kachel img { width: 100%; height: 100%; object-fit: cover; display: block; }
676        .rp-gal-kachel:hover { border-color: rgba(242,147,60,.5); }
677        /* ── Auswahl, Ziehen, Beitrag erstellen ─────────────────────────── */
678        .rp-gal-filter { display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
679          padding: 4px 6px 4px 11px; border-radius: 999px; font-size: 11.5px;
680          background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--ink-2); flex: none; }
681        .rp-gal-filter button { background: none; border: none; color: var(--ink-3);
682          font-size: 10px; cursor: pointer; padding: 2px 4px; border-radius: 50%; }
683        .rp-gal-filter button:hover { color: var(--ink); background: rgba(255,255,255,.1); }
684        .rp-gal-kachel.gewaehlt { border-color: var(--akzent); box-shadow: 0 0 0 2px rgba(242,147,60,.5); }
685        /* Ordneransicht in der Galerie (Dima 01.10.2026): Pfad oben, Unterordner als Zeilen, Medien als Kacheln. */
686        .rp-gal-pfad { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
687          font-size: 11.5px; color: var(--ink-3); }
688        .rp-gal-pfad-teil { display: inline-flex; align-items: center; gap: 4px; }
689        .rp-gal-pfad button { background: none; border: none; padding: 2px 4px; border-radius: 6px; font-family: inherit;
690          font-size: 11.5px; color: var(--ink-2); cursor: pointer; max-width: 220px; overflow: hidden;
691          text-overflow: ellipsis; white-space: nowrap; }
692        .rp-gal-pfad button:hover { color: var(--ink); background: rgba(255,255,255,.06); }
693        .rp-gal-pfad button.an { color: var(--ink); font-weight: 600; }
694        .rp-gal-bereich { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
695          scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
696        .rp-gal-ordner { display: flex; flex-direction: column; gap: 6px; }
697        .rp-gal-ordner-bild { position: relative; }
698        .rp-gal-ordner-zeichen { position: absolute; right: 2px; bottom: 2px; width: 18px; height: 18px; border-radius: 5px;
699          display: flex; align-items: center; justify-content: center; color: #1a0e07; background: var(--akzent); }
700        .rp-gal-raster.rp-gal-raster-frei { overflow: visible; flex: none; }
701        .rp-gal-wahl { position: absolute; left: 4px; top: 4px; min-width: 16px; height: 16px;
702          padding: 0 4px; border-radius: 999px; background: var(--akzent); color: #1a0e07;
703          font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
704        /* Das Ziel unter dem Zeiger leuchtet auf — sonst raet man, in welcher
705           Stunde man gerade loslassen wuerde. */
706        .rp-kal-ziel { background: rgba(242,147,60,.22); box-shadow: inset 0 0 0 1px var(--akzent); }
707
708        .be-ov { position: fixed; inset: 0; z-index: 80; background: rgba(6,4,3,.8);
709          backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; padding: 24px; }
710        .be-huelle { display: flex; align-items: stretch; gap: 14px; width: 100%; max-width: 1220px; }
711        @media (max-width: 1100px) { .be-huelle { flex-direction: column; max-width: 860px; } }
712        .be-modal { flex: 1; min-width: 0; background: #171110; border: 1px solid var(--line-2);
713          border-radius: 18px; box-shadow: 0 40px 90px -25px rgba(0,0,0,.85);
714          max-height: 88vh; overflow-y: auto; }
715        /* Eigenes Fenster, nicht eingeklappt: die Texte sind der Grund, warum
716           man hier selten von Hand tippt. */
717        .be-texte { flex: none; width: 320px; display: flex; flex-direction: column;
718          background: #171110; border: 1px solid var(--line-2); border-radius: 18px;
719          box-shadow: 0 40px 90px -25px rgba(0,0,0,.85); max-height: 88vh; overflow: hidden; }
720        @media (max-width: 1100px) { .be-texte { width: auto; max-height: 40vh; } }
721        .be-texte-kopf { display: flex; align-items: center; justify-content: space-between;
722          gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
723        .be-texte-titel { font-size: 13.5px; font-weight: 650; }
724        .be-texte-neu { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2);
725          background: none; color: var(--ink-2); font-size: 14px; line-height: 1; cursor: pointer; }
726        .be-texte-neu:hover:not(:disabled) { color: var(--akzent); border-color: var(--akzent); }
727        .be-texte-neu:disabled { opacity: .35; cursor: default; }
728        .be-texte-liste { flex: 1; min-height: 0; overflow-y: auto; padding: 10px;
729          display: flex; flex-direction: column; gap: 8px; }
730        .be-texte-leer { font-size: 12px; color: var(--ink-3); line-height: 1.55; padding: 10px 8px; }
731        .be-txt { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
732        .be-txt:hover { border-color: var(--line-2); }
733        .be-txt-haupt { display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left;
734          background: none; border: none; font-family: inherit; color: inherit;
735          padding: 9px 11px 7px; cursor: pointer; }
736        .be-txt-titel { font-size: 12.5px; font-weight: 600; overflow: hidden;
737          text-overflow: ellipsis; white-space: nowrap; }
738        .be-txt-vor { font-size: 11px; color: var(--ink-3); line-height: 1.4;
739          display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
740        .be-txt-plat { display: flex; align-items: center; gap: 4px; padding: 0 9px 8px; }
741        .be-txt-p { width: 26px; height: 26px; padding: 0; border-radius: 50%;
742          display: flex; align-items: center; justify-content: center;
743          border: 1px solid transparent; background: none; cursor: pointer; }
744        /* Das Plattform-Zeichen ist anderswo eine Marke AUF einem Profilbild und
745           deshalb absolut gesetzt — hier steht es fuer sich. */
746        .be-txt-p .rp-profil-platt { position: static; box-shadow: none;
746 width: 20px; height: 20px; }
747        .be-txt-p:not(.an) .rp-profil-platt { filter: grayscale(1); opacity: .45; }
748        .be-txt-p:hover .rp-profil-platt { filter: none; opacity: 1; }
749        .be-txt-p.an { border-color: var(--akzent); background: rgba(242,147,60,.16); }
750        .be-txt-weg { margin-left: auto; background: none; border: none; color: var(--ink-3);
751          font-size: 11px; cursor: pointer; padding: 2px 4px; }
752        .be-txt-weg:hover { color: #e04b3c; }
753        .be-kopf { display: flex; align-items: flex-start; justify-content: space-between;
754          gap: 16px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
755        .be-titel { font-size: 17px; font-weight: 650; }
756        .be-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
757        .be-zu { background: none; border: none; color: var(--ink-3); font-size: 16px; cursor: pointer; }
758        .be-zu:hover { color: var(--ink); }
759        .rp-profil-inaktiv { display: block; font-size: 9px; line-height: 1.3; color: var(--ink-2); margin-top: 3px; }
760        .be-kanaele { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 22px;
761          border-bottom: 1px solid var(--line); }
762        .be-kanal { background: none; border: none; padding: 0; cursor: pointer; opacity: .38;
763          transition: opacity .14s; }
764        .be-kanal.an { opacity: 1; }
765        .be-koerper { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; padding: 18px 22px; }
766        @media (max-width: 700px) { .be-koerper { grid-template-columns: minmax(0, 1fr); } }
767        .be-medien { display: flex; flex-wrap: wrap; gap: 6px; align-content: start; }
768        .be-medium { width: 104px; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden;
769          background: rgba(0,0,0,.35); border: 1px solid var(--line); }
770        .be-medium { position: relative; cursor: grab; }
771        .be-medium:active { cursor: grabbing; }
772        .be-medium img { width: 100%; height: 100%; object-fit: cover; display: block; }
773        .be-medium-tb { position: absolute; left: 5px; bottom: 5px; width: 22px; height: 22px;
774          border-radius: 50%; border: none; cursor: pointer; padding: 0; line-height: 1;
775          font-size: 13px; color: rgba(255,255,255,.75); background: rgba(10,14,12,.6);
776          -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: all .15s; }
777        .be-medium-tb:hover { color: #fff; background: rgba(10,14,12,.85); }
778        .be-medium-tb-an { color: #ffd400; background: rgba(10,14,12,.85); }
779        .be-medium-nr { position: absolute; left: 5px; top: 5px; min-width: 17px; height: 17px;
780          padding: 0 5px; border-radius: 999px; background: rgba(12,7,5,.7); color: #fff;
781          font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
782        .be-medium-x { position: absolute; right: 4px; top: 4px; width: 18px; height: 18px;
783          border: none; border-radius: 50%; background: rgba(12,7,5,.7); color: rgba(255,255,255,.85);
784          font-size: 10px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .14s; }
785        .be-medium:hover .be-medium-x { opacity: 1; }
786        .be-medium-x:hover { background: rgba(224,75,60,.9); color: #fff; }
787        .be-mehr { width: 104px; aspect-ratio: 9 / 16; border-radius: 10px; display: flex;
788          align-items: center; justify-content: center; font-size: 15px; font-weight: 700;
789          color: var(--ink-2); background: rgba(255,255,255,.05); }
790        .be-text textarea { width: 100%; background: rgba(255,255,255,.04); border: 1px solid var(--line);
791          border-radius: 12px; color: var(--ink); font-family: inherit; font-size: 13.5px;
792          line-height: 1.6; padding: 12px 14px; resize: vertical; outline: none; }
793        .be-text textarea:focus { border-color: var(--akzent); }
794        .be-vorlagen { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 9px; }
795        .be-vorlage { display: inline-flex; align-items: center; gap: 5px; max-width: 220px;
796          background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 999px;
797          font-family: inherit; font-size: 11.5px; color: var(--ink-2); padding: 5px 11px;
798          cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
799        .be-vorlage:hover { color: var(--ink); border-color: var(--akzent); }
800        .be-vorlage-alle { color: var(--akzent); font-weight: 700; }
801        .be-textfuss { display: flex; gap: 8px; margin-top: 9px; }
802        .be-merken { background: none; border: 1px solid var(--line); border-radius: 8px;
803          font-family: inherit; font-size: 11.5px; color: var(--ink-2); padding: 5px 10px; cursor: pointer; }
804        .be-merken:hover:not(:disabled) { color: var(--ink); border-color: var(--line-2); }
805        .be-merken:disabled { opacity: .4; cursor: default; }
806        .be-anpassen { display: flex; flex-direction: column; gap: 14px; padding: 18px 22px; }
807        .be-anp-kopf { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
808        .be-anp-name { font-size: 12.5px; font-weight: 600; }
809        .be-anp-gleich { font-size: 11px; color: var(--ink-3); margin-left: auto; }
810        .be-anp-reset { margin-left: auto; background: none; border: none; font-family: inherit;
811          font-size: 11px; color: var(--akzent); cursor: pointer; text-decoration: underline; }
812        .be-anp textarea { width: 100%; background: rgba(255,255,255,.04); border: 1px solid var(--line);
813          border-radius: 10px; color: var(--ink); font-family: inherit; font-size: 13px;
814          line-height: 1.55; padding: 10px 12px; resize: vertical; outline: none; }
815        .be-anp textarea:focus { border-color: var(--akzent); }
816        .be-hinweis { font-size: 11.5px; color: var(--ink-3); margin-top: 9px; line-height: 1.5; }
817        .be-ergebnis { padding: 0 22px 8px; display: flex; flex-direction: column; gap: 5px; }
818        .be-zeile { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
819        .be-zeile .be-grund { color: var(--ink-3); margin-left: auto; text-align: right; }
820        .be-fuss { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 18px;
821          border-top: 1px solid var(--line); }
822
823        .rp-gal-haken { position: absolute; top: 4px; right: 4px; width: 15px; height: 15px;
824          border-radius: 50%; background: var(--online); color: #06231a; font-size: 9px;
825          font-weight: 800; display: flex; align-items: center; justify-content: center; }
826
827        .rp-leiste { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
828        .rp-leiste .rp-zahl { display: flex; flex-direction: column;
829          align-items: flex-start; gap: 1px; text-align: left; }
830        .rp-soll { font-size: 12.5px; color: var(--ink-2); }
831        .rp-ist { font-size: 12.5px; color: var(--ink-3); }
832        .rp-soll b, .rp-ist b { color: var(--ink); font-variant-numeric: tabular-nums; }
833        .rp-blaettern { display: flex; align-items: center; gap: 4px; }
834        .rp-pfeil { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line);
835          background: none; color: var(--ink-2); font-size: 16px; line-height: 1; cursor: pointer; font-family: inherit; }
836        .rp-pfeil:hover { color: var(--ink); border-color: var(--line-2); }
837        .rp-heute { background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 11px;
838          font-family: inherit; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.5); cursor: pointer; }
839        .rp-heute:hover { color: var(--akzent);
839 border-color: rgba(242,147,60,.32); }
840        .rp-spanne { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
841        .rp-zahl { margin-left: auto; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
842
843        .rp-profile { display: flex; gap: 6px; flex-wrap: wrap; }
844        /* Nur noch das Logo, gross genug zum Erkennen; die Plattform sitzt
845           als kleines Zeichen unten rechts darauf. Der Name bleibt fuer
846           Vorlese-Programme und als Titel erhalten — er ist nur nicht mehr
847           gedruckt. */
848        .rp-profil { display: block; position: relative; padding: 0; border: none;
849          background: none; font-family: inherit; cursor: pointer; line-height: 0; }
850        .rp-profil-bild { position: relative; display: block; width: 38px; height: 38px; }
851        .rp-profil img, .rp-profil i { width: 38px; height: 38px; border-radius: 50%;
852          object-fit: cover; display: block; background: rgba(255,255,255,.1); }
853        .rp-profil-platt { position: absolute; right: -3px; bottom: -3px;
854          width: 18px; height: 18px; border-radius: 50%;
855          display: flex; align-items: center; justify-content: center;
856          box-shadow: 0 0 0 2px var(--bg); }
857        .ss-root .rp-profil-sr { position: absolute; width: 1px; height: 1px; overflow: hidden;
858          clip-path: inset(50%); white-space: nowrap; }
859        .rp-profil-aus { opacity: .32; }
860        .rp-profil-aus .rp-profil-platt { filter: grayscale(1); }
861
862        /* ── Stundenkalender ──────────────────────────────────────────── */
863        /* Randlos bis an die Fensterkante: der Kalender ist der Inhalt dieser
864           Seite, nicht eine Karte darauf. */
865        .rp-kal { border: 1px solid var(--line); border-radius: 12px;
866          overflow: auto; background: rgba(0,0,0,.16); }
867        @media (max-width: 900px) { .rp-kal { max-height: none; } }
868        .rp-kal-kopf { display: grid; grid-template-columns: 54px repeat(7, minmax(0, 1fr));
869          border-bottom: 1px solid var(--line); }
870        .rp-kal-ecke { border-right: 1px solid var(--line); }
871        .rp-kal-tag { display: flex; align-items: baseline; justify-content: space-between;
872          padding: 9px 10px; border-right: 1px solid var(--line); }
873        .rp-kal-tag:last-child { border-right: none; }
874        .rp-kal-tag-heute { background: rgba(242,147,60,.08); }
875        .rp-kal-koerper { position: relative; display: grid; grid-template-columns: 54px repeat(7, minmax(0, 1fr)); }
876        .rp-kal-stunden { border-right: 1px solid var(--line); }
877        .rp-kal-stunde { position: relative; }
878        .rp-kal-stunde span { position: absolute; top: -6px; right: 8px; font-size: 10px;
879          color: var(--ink-3); font-variant-numeric: tabular-nums; }
880        .rp-kal-spalte { position: relative; border-right: 1px solid var(--line); }
881        .rp-kal-spalte:last-child { border-right: none; }
882        .rp-kal-spalte-heute { background: rgba(242,147,60,.035); }
883        .rp-kal-linie { border-bottom: 1px solid rgba(255,255,255,.045); }
884        /* Viertelstunden: unsichtbar, bis etwas darueber schwebt. Sonst haette
885           das Raster viermal so viele Linien und waere nicht mehr lesbar. */
886        /* ── Beitragstext am Medium ───────────────────────────────────── */
887        .ss-top-plus { position: absolute; top: 8px; right: 8px; z-index: 3; width: 28px; height: 28px;
888          border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer;
889          font-size: 17px; line-height: 1; color: #fff; border: 1px solid rgba(255,255,255,.24);
890          background: rgba(14,20,17,.55); backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px);
891          opacity: 0; transform: translateY(-3px); transition: opacity .14s, transform .14s, background .14s; }
892        .ss-top:hover .ss-top-plus, .ss-top-plus:focus-visible { opacity: 1; transform: none; }
893        .ss-top-plus:hover { background: var(--akzent); border-color: var(--akzent); color: #1a1207; }
894        .ss-uebernahme { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 14px;
895          border-radius: 11px; font-size: 13px; border: 1px solid var(--akzent);
896          background: rgba(242,147,60,.12); }
897        .ss-uebernahme b { font-weight: 600; }
898        .ss-uebernahme button { margin-left: auto; background: none; border: 0; color: inherit;
899          cursor: pointer; opacity: .7; font-size: 13px; }
900        .rp-gal-play { position: absolute; left: 5px; bottom: 5px; width: 24px; height: 24px; border-radius: 50%;
901          display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer;
902          background: rgba(10,8,6,.55); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(6px);
903          opacity: 0; transition: opacity .14s, background .14s; }
904        .rp-gal-play.ist-video { opacity: .9; }
905        .rp-gal-kachel:hover .rp-gal-play, .rp-gal-play:focus-visible { opacity: 1; }
906        .rp-gal-play:hover { background: var(--akzent); border-color: var(--akzent); color: #1a1207; }
907        .rp-gal-play svg { margin-left: 1px; }
908        .be-medium-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 34px; height: 34px;
909          border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff;
910          background: rgba(10,8,6,.55); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(6px);
911          opacity: 0; transition: opacity .14s, background .14s; }
912        .be-medium-play.ist-video { opacity: .9; }
913        .be-medium:hover .be-medium-play, .be-medium-play:focus-visible { opacity: 1; }
914        .be-medium-play:hover { background: var(--akzent); border-color: var(--akzent); color: #1a1207; }
915        .rp-gal-text { position: absolute; right: 5px; top: 5px; width: 24px; height: 24px; border-radius: 50%;
916          display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff;
917          border: 1px solid rgba(255,255,255,.22); background: rgba(14,20,17,.6);
918          backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
919          opacity: 0; transform: translateY(-3px); transition: opacity .14s, transform .14s, background .14s; }
920        .rp-gal-kachel:hover .rp-gal-text, .rp-gal-text:focus-visible { opacity: 1; transform: none; }
921        .rp-gal-text.hat { opacity: 1; transform: none; background: var(--akzent); border-color: var(--akzent); color: #1a1207; }
922        .rp-gal-text:hover { background: var(--akzent); border-color: var(--akzent); color: #1a1207; }
923        .rp-gal-text.laeuft { opacity: 1; transform: none; }
924        .rp-dreh { animation: rpDreh 1s linear infinite; }
925        @keyframes rpDreh { to { transform: rotate(360deg); } }
926
927        .mt-modal { width: min(680px, 94vw); max-height: 88vh; overflow: auto; display: flex; flex-direction: column;
928          gap: 12px; padding: 20px; border-radius: 16px; background: #171110;
929          border: 1px solid var(--line-2); box-shadow: 0 24px 60px rgba(0,0,0,.5); }
930        .mt-schmal { width: min(470px, 94vw); }
931        /* Beitrag ansehen/bearbeiten (Dima 01.10.2026) */
932        .bt-modal { width: min(640px, 94vw); }
933        .bt-kopf-links { display: flex; align-items: center; gap: 12px; min-width: 0; }
934        .bt-kanal-bild { flex: none; }
935        .bt-kanal-bild img, .bt-kanal-bild i { width: 38px; height: 38px; border-radius: 50%; object-fit: cover;
936          display: block; background: rgba(255,255,255,.1); }
937        .bt-punkt { display: inline-block; margin-right: 6px; vertical-align: 1px; }
938        .bt-medien { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
939        .bt-medium { position: relative; flex: none; width: 96px; height: 120px; border-radius: 9px; overflow: hidden;
940          background: rgba(0,0,0,.35); border: 1px solid var(--line); padding: 0; font: inherit; cursor: pointer;
941          transition: border-color .14s; }
942        .bt-medium:hover, .bt-medium:focus-visible { border-color: var(--akzent); }
943        .bt-medium img { width: 100%; height: 100%; object-fit: cover; display: block; }
944        .bt-medium-video { position: absolute; left: 6px; bottom: 6px; font-size: 10px; color: #fff;
945          text-shadow: 0 1px 4px rgba(0,0,0,.6); }
946        .bt-text { white-space: pre-wrap; font-size: 13.5px; line-height: 1.6; max-height: 320px; overflow-y: auto;
947          padding: 12px 14px; border-radius: 11px; border: 1px solid var(--line); background: rgba(255,255,255,.03); }
948        .mt-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
949        .mt-quellen { font-size: 11.5px; color: var(--ink-3); }
950        .mt-feld { min-height: 240px; resize: vertical; font: inherit; font-size: 13.5px; line-height: 1.6;
951          padding: 12px 14px; border-radius: 11px; color: inherit;
952          border: 1px solid var(--line); background: rgba(255,255,255,.04); }
953        .mt-feld:focus { outline: none; border-color: var(--akzent); }
954        .mt-fuss { display: flex; gap: 8px; justify-content: flex-end; }
955        .mt-text { margin: 0; font-size: 13px; line-height: 1.6; }
956        .mt-leise { color: var(--ink-3); font-size: 12.5px; }
957        .mt-fehler { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 95;
958          display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 11px 15px; border-radius: 11px;
959          border: 1px solid rgba(226,110,90,.4); background: rgba(40,18,15,.96); color: #ffd9d1;
960          box-shadow: 0 14px 40px rgba(0,0,0,.45); }
961        .mt-fehler button { background: none; border: 0; color: inherit; cursor: pointer; font-size: 13px; opacity: .7; }
962        .be-wann { display: flex; align-items: center; gap: 7px; margin-top: 7px; flex-wrap: wrap; }
963        .be-wann input[type="date"], .be-wann > span, .be-wann input[type="time"] {
964          font-size: 12.5px; padding: 5px 8px; border-radius: 8px; color: inherit;
965          border: 1px solid var(--line); background: rgba(255,255,255,.05);
966          font-variant-numeric: tabular-nums; }
967        .be-extra { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
968        .be-extra-feld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
969        .be-extra-feld > span { font-size: 11.5px; color: var(--ink-2); }
970        .be-extra-feld input { font-size: 13px; padding: 8px 11px; border-radius: 9px; color: inherit;
971          border: 1px solid var(--line); background: rgba(255,255,255,.04); }
972        .be-extra-feld input:focus { outline: none; border-color: var(--akzent); }
973        .be-extra-feld > em { font-size: 10.5px; font-style: normal;
973 color: var(--ink-3); line-height: 1.4; }
974        @media (max-width: 720px) { .be-extra { grid-template-columns: 1fr; } }
975        .be-bloecke { display: flex; gap: 6px; flex-wrap: wrap; }
976        .be-block { display: inline-flex; align-items: baseline; gap: 7px; font-size: 11.5px; padding: 5px 9px;
977          border-radius: 8px; cursor: pointer; color: inherit; border: 1px solid var(--line);
978          background: rgba(255,255,255,.04); }
979        .be-block:hover { border-color: var(--line-2); }
980        .be-block.an { border-color: var(--akzent); background: rgba(242,147,60,.16); }
981        .be-block-wann { font-size: 11px; opacity: .62; font-variant-numeric: tabular-nums; }
982        .be-viertel { display: flex; gap: 3px; }
983        .be-viertel button { font-size: 11.5px; padding: 5px 7px; border-radius: 7px; cursor: pointer;
984          color: inherit; border: 1px solid var(--line); background: rgba(255,255,255,.04);
985          font-variant-numeric: tabular-nums; }
986        .be-viertel button.an { background: var(--akzent); border-color: var(--akzent); color: #1a1207; font-weight: 600; }
987        .rp-kal-viertel { position: relative; }
988        .rp-kal-viertel.rp-kal-ziel { background: rgba(242,147,60,.24); box-shadow: inset 0 0 0 1px var(--akzent); }
989        .rp-kal-viertel-zeit { position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
990          font-size: 9.5px; font-weight: 600; color: #1a1207; background: var(--akzent);
991          padding: 1px 4px; border-radius: 4px; pointer-events: none; font-variant-numeric: tabular-nums; }
992        /* Beste Zeiten als graues Band IM Raster statt als Leiste darueber
993           (Dima 01.09.2026) — sie gehoeren dorthin, wo geplant wird. */
994        .rp-kal-best { position: absolute; left: 0; right: 0; background: rgba(255,255,255,.075);
995          border-top: 1px solid rgba(255,255,255,.13); border-bottom: 1px solid rgba(255,255,255,.13);
996          pointer-events: auto; }
997        .rp-kal-vor { position: absolute; left: 4px; right: 4px; height: 26px; display: flex;
998          align-items: center; gap: 5px; padding: 0 7px; border-radius: 7px; font-size: 10.5px;
999          color: var(--akzent); border: 1px dashed rgba(242,147,60,.45);
1000          background: rgba(242,147,60,.07); white-space: nowrap; overflow: hidden;
1001          font-variant-numeric: tabular-nums; }
1002        .rp-funkel { flex: none; }
1003        .rp-zahl-ist { display: block; font-style: normal; font-size: 10.5px;
1004          color: var(--ink-3); margin-top: 2px; }
1005        .rp-kal-post { position: absolute; left: 4px; right: 4px; z-index: 2; }
1006        .rp-post-klick { cursor: pointer; transition: border-color .14s; }
1007        .rp-post-freigabe { font-size: 10.5px; font-weight: 700; }
1008        .rp-post-freigabe.ok { color: #3ecf9a; }
1009        .rp-post-freigabe.aenderung { color: #e8c14a; }
1010        .bt-freigabe { font-size: 12.5px; padding: 10px 12px; border-radius: 11px; line-height: 1.5; }
1011        .bt-freigabe.ok { color: #c9f5e4; background: rgba(62,207,154,.10); border: 1px solid rgba(62,207,154,.3); }
1012        .bt-freigabe.aenderung { color: #fbe9b7; background: rgba(232,193,74,.10); border: 1px solid rgba(232,193,74,.3); }
1013        .bt-freigabe-text { margin-top: 4px; white-space: pre-wrap; }
1014        .rp-post-klick:hover, .rp-post-klick:focus-visible { border-color: rgba(242,147,60,.55); outline: none; }
1015
1016        /* ── Monatsuebersicht (Dima 01.10.2026) ─────────────────────────── */
1017        .rp-ansicht { display: flex; gap: 2px; padding: 2px; border-radius: 9px; border: 1px solid var(--line);
1018          background: rgba(255,255,255,.04); }
1019        .rp-ansicht-knopf { background: none; border: none; border-radius: 7px; padding: 5px 11px; font-family: inherit;
1020          font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
1021        .rp-ansicht-knopf:hover { color: var(--ink); }
1022        .rp-ansicht-knopf.an { color: #1a0e07; background: var(--akzent); }
1023        .rp-monat { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: rgba(0,0,0,.16); }
1024        .rp-monat-kopf { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
1025        .rp-monat-wt { padding: 8px 10px; font-size: 10px; font-weight: 700; letter-spacing: .12em;
1026          text-transform: uppercase; color: var(--ink-3); }
1027        .rp-monat-raster { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(118px, auto); }
1028        .rp-monat-tag { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 6px;
1029          border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
1030        .rp-monat-tag:nth-child(7n) { border-right: none; }
1031        .rp-monat-tag:nth-last-child(-n+7) { border-bottom: none; }
1032        .rp-monat-fremd { background: rgba(0,0,0,.18); }
1033        .rp-monat-fremd .rp-monat-zahl { opacity: .45; }
1034        .rp-monat-heute { background: rgba(242,147,60,.08); }
1035        .rp-monat-heute .rp-monat-zahl { color: var(--akzent); }
1036        .rp-monat-zahl { align-self: flex-end; background: none; border: none; padding: 1px 5px; border-radius: 6px;
1037          font-family: inherit; font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer;
1038          font-variant-numeric: tabular-nums; }
1039        .rp-monat-zahl:hover { background: rgba(255,255,255,.07); color: var(--ink); }
1040        .rp-monat-posts { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
1041        .rp-monat-post { display: flex; align-items: center; gap: 5px; min-width: 0; width: 100%; padding: 3px 5px;
1042          border-radius: 6px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: inherit;
1043          font-family: inherit; font-size: 10.5px; text-align: left; cursor: pointer; }
1044        .rp-monat-post:hover { border-color: rgba(242,147,60,.45); }
1045        .rp-monat-zeit { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
1046        .rp-monat-platt { flex: none; display: inline-flex; }
1047        .rp-monat-platt .rp-profil-platt { position: static; width: 14px; height: 14px; box-shadow: none; }
1048        .rp-monat-platt .rp-profil-platt svg { width: 8px; height: 8px; }
1049        .rp-monat-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
1050        .rp-monat-mehr { align-self: flex-start; background: none; border: none; padding: 1px 4px; font-family: inherit;
1051          font-size: 10.5px; color: var(--ink-3); cursor: pointer; }
1052        .rp-monat-mehr:hover { color: var(--akzent); }
1053        @media (max-width: 900px) { .rp-kal-kopf, .rp-kal-koerper { grid-template-columns: 44px repeat(7, minmax(0, 1fr)); }
1054          .rp-kal-tag { padding: 7px 5px; font-size: 11px; } }
1055
1056        .rp-woche { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: start; }
1057        @media (max-width: 1000px) { .rp-woche { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
1058        .rp-tag { display: flex; flex-direction: column; min-height: 150px;
1059          background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
1060        .rp-tag-heute { border-color: rgba(242,147,60,.4); }
1061        .rp-tag-kopf { display: flex; align-items: baseline; gap: 6px; padding: 8px 10px 6px;
1062          border-bottom: 1px solid var(--line); }
1063        .rp-tag-name { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
1064        .rp-tag-zahl { margin-left: auto; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); }
1065        .rp-tag-heute .rp-tag-zahl { color: var(--akzent); }
1066        .rp-tag-inhalt { display: flex; flex-direction: column; gap: 6px; padding: 8px; }
1067        .rp-tag-leer { font-size: 12px; color: rgba(255,255,255,.16); text-align: center; padding: 10px 0; }
1068
1069        .rp-post { display: flex; flex-direction: column; gap: 5px; padding: 8px;
1070          border-radius: 9px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
1071        .rp-post-kopf { display: flex; align-items: center; gap: 6px; }
1072        .rp-zeit { font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
1073        .rp-punkt { flex: none; width: 6px; height: 6px; border-radius: 50%; }
1074        .rp-status { font-size: 10.5px; color: var(--ink-3); }
1075        .rp-post-bild { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 6px; display: block; background: rgba(0,0,0,.3); }
1076        .rp-post-text { font-size: 11.5px; line-height: 1.35; color: var(--ink-2);
1077          display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
1078        .rp-post-kanal { font-size: 10.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1079        .rp-zeiten { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
1080        .rp-zeiten-titel { font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); }
1081        .rp-zeit-tipp { display: inline-flex; align-items: baseline; gap: 7px; padding: 4px 10px;
1082          border: 1px solid var(--line); border-radius: 9px; font-size: 12px; font-weight: 600;
1083          font-variant-numeric: tabular-nums; }
1084        .rp-zeit-tipp em { font-style: normal; font-weight: 400; font-size: 10.5px; color: var(--ink-3); }
1085        .rp-zeiten-hinweis { font-size: 11.5px; color: var(--ink-3); }
1086        .rp-vor { display: flex; align-items: baseline; gap: 7px; padding: 7px 8px;
1087          border: 1px dashed rgba(242,147,60,.34); border-radius: 9px; background: rgba(242,147,60,.045); }
1088        .rp-vor .rp-zeit { color: rgba(242,147,60,.85); }
1089        .rp-vor-text { font-size: 10.5px; color: var(--ink-3); }
1090        .rp-tag-tipp { font-size: 11px; color: rgba(242,147,60,.5); text-align: center; padding: 10px 0; }
1091        .rp-fuss { margin: 0; font-size: 11.5px; color: var(--ink-3); max-width: 62ch; }
1092
1093        .ss-vorschau-bild { position:relative; padding:0; border:0; background:transparent; cursor:zoom-in; color:inherit; }
1094        .ss-vorschau-bild span { position:absolute; right:10px; bottom:10px; padding:7px 10px; background:#101815dd; border-radius:8px; font-size:12px; }
1095        .ss-mit-vorschau { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
1096        @media (max-width: 1100px) { .ss-mit-vorschau { grid-template-columns: minmax(0, 1fr); } .ss-mit-vorschau .ss-vorschau-tafel { grid-row:1; position:relative; top:auto; } }
1097        .ss-vorschau-tafel { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 6px;
1098          padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
1099        .ss-vorschau-tafel img, .ss-vorschau-tafel video { width: 100%; max-height: 420px; object-fit: contain;
1100          border-radius: 10px; background: #000; display: block; }
1101        .ss-vorschau-name { font-size: 13px; font-weight: 600; margin-top: 5px; word-break: break-word; }
1102        .ss-vorschau-art { font-size: 11.5px; color: var(--ink-3); }
1103        /* „Beitrag erstellen" aus der Vorschau (Dima 01.10.2026) — orange wie jede Handlung im Haus. */
1104        .ss-vorschau-beitrag { margin-top: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
1105          padding: 9px 14px; border-radius: 10px; border: 1px solid rgba(242,147,60,.45); background: rgba(242,147,60,.14);
1106          color: #fff; font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
1107          transition: background .15s, border-color .15s; }
1108        .ss-vorschau-beitrag:hover { background: rgba(242,147,60,.24); border-color: rgba(242,147,60,.7); }
1109        .ss-vorschau-akt { display: flex; gap: 6px; margin-top: 8px; }
1110        .ss-vorschau-leer { font-size: 12px; line-height: 1.6; color: var(--ink-3); padding: 22px 6px; text-align: center; }
1111        .ss-kachel-blick { border-color: rgba(255,255,255,.55); }
1112        .ss-kachel-haken { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 6px;
1113          border: 1.5px solid rgba(255,255,255,.35); background: rgba(4,10,8,.6); color: #06231a;
1114          font-family: inherit; font-size: 11px; font-weight: 700; line-height: 1; cursor: pointer; opacity: 0; }
1115        .ss-kachel:hover .ss-kachel-haken, .ss-kachel-gewaehlt .ss-kachel-haken { opacity: 1; }
1116        .ss-kachel-haken-an { background: var(--online); border-color: var(--online); opacity: 1; }
1117        /* Beitragstext: runder Glasknopf unter dem Haken. Liegt ein Text vor,
1118           bleibt er sichtbar — das ist die Auskunft „hier ist vorbereitet". */
1119        .ss-kachel-text { position: absolute; top: 32px; right: 6px; width: 26px; height: 26px; border-radius: 50%;
1120          display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff;
1121          border: 1px solid rgba(255,255,255,.22); background: rgba(14,20,17,.6);
1122          backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
1123          opacity: 0; transform: translateY(-3px); transition: opacity .14s, transform .14s, background .14s; }
1124        .ss-kachel:hover .ss-kachel-text, .ss-kachel-text:focus-visible { opacity: 1; transform: none; }
1125        .ss-kachel-text.hat { opacity: 1; transform: none; background: var(--akzent); border-color: var(--akzent); color: #1a1207; }
1126        .ss-kachel-text.laeuft { opacity: 1; transform: none; }
1127        .ss-kachel-text:hover { background: var(--akzent); border-color: var(--akzent); color: #1a1207; }
1128        .ss-raster { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px;
1129          align-items: start; }
1130        @media (max-width: 1400px) { .ss-raster { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
1131        @media (max-width: 1000px) { .ss-raster { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
1132        @media (max-width: 700px)  { .ss-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
1133        /* Das Seitenverhaeltnis kommt aus dem geladenen Vorschaub
1133ild und wird
1134           auf 9:16 / 4:5 / 1:1 / 16:9 gerundet — sonst steht die Reihe krumm.
1135           Bis das Bild da ist, gilt 3:4 als ruhiger Platzhalter. */
1136        .ss-kachel { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden;
1137          background: rgba(0,0,0,.32); border: 1px solid var(--line); cursor: pointer; }
1138        .ss-kachel:hover { border-color: var(--line-2); }
1139        .ss-kachel img { width: 100%; height: 100%; object-fit: cover; display: block; }
1140        .ss-kachel-gewaehlt { border-color: var(--akzent); box-shadow: 0 0 0 1px var(--akzent) inset; }
1141        .ss-kachel-online img { opacity: .55; }
1142        .ss-kachel-leer { display: flex; align-items: center; justify-content: center; height: 100%;
1143          font-size: 11px; color: var(--ink-3); }
1144        .ss-kachel-video { position: absolute; top: 7px; left: 8px; font-size: 10px; color: rgba(255,255,255,.8); }
1145        .ss-kachel-lupe { position: absolute; top: 6px; right: 6px; padding: 4px 8px; border-radius: 7px;
1146          border: 1px solid rgba(255,255,255,.18); background: rgba(4,10,8,.72); color: rgba(255,255,255,.8);
1147          font-family: inherit; font-size: 10.5px; cursor: pointer; opacity: 0; }
1148        .ss-kachel:hover .ss-kachel-lupe { opacity: 1; }
1149        .ss-kachel-fuss { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 6px;
1150          padding: 7px 9px; background: linear-gradient(to top, rgba(4,10,8,.92), transparent); font-size: 10.5px; }
1151        .ss-kachel-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255,255,255,.85); }
1152
1153        .ss-wahlleiste { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
1154          padding: 10px 13px; border-radius: 12px; background: rgba(242,147,60,.08); border: 1px solid rgba(242,147,60,.22); }
1155        .ss-wahl-zahl { font-size: 12.5px; font-weight: 600; color: var(--akzent); margin-right: 4px; }
1156        .ss-knopf { padding: 7px 12px; border-radius: 9px; font-family: inherit; font-size: 12px; font-weight: 600;
1157          cursor: pointer; background: rgba(242,147,60,.13); border: 1px solid rgba(242,147,60,.32); color: var(--akzent); }
1158        .ss-knopf:hover { background: rgba(242,147,60,.2); }
1159        .ss-knopf-still { background: rgba(255,255,255,.04); border-color: var(--line); color: rgba(255,255,255,.65); }
1160        .ss-knopf-still:hover { background: rgba(255,255,255,.08); color: #fff; }
1161
1162        .ss-zurueck { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
1163        .ss-zurueck-name { font-size: 14px; font-weight: 600; }
1164        .ss-zurueck-meta { font-size: 12px; color: var(--ink-3); }
1165        .ss-zurueck-akt { display: flex; gap: 6px; margin-left: auto; }
1166
1167        .ss-leer, .ss-meldung, .ss-fehler { font-size: 12.5px; padding: 12px 14px; border-radius: 11px; margin-bottom: 12px; }
1168        .ss-leer { color: var(--ink-3); }
1169        .ss-meldung { color: var(--akzent); background: rgba(242,147,60,.08); border: 1px solid rgba(242,147,60,.22); }
1170        .ss-fehler { color: #ef6d64; background: rgba(224,87,79,.08); border: 1px solid rgba(224,87,79,.24); }
1171
1172        .ss-h2 { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
1173        .ss-lead { font-size: 12.5px; line-height: 1.6; color: var(--ink-2); margin: 0 0 16px; max-width: 620px; }
1174        .ss-vorlauf { display: flex; flex-direction: column; }
1175        .ss-vorlauf-zeile { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 10px;
1176          border: none; border-radius: 11px; background: none; font-family: inherit; color: var(--ink);
1177          cursor: pointer; text-align: left; }
1178        .ss-vorlauf-zeile + .ss-vorlauf-zeile { border-top: 1px solid rgba(255,255,255,.055); }
1179        .ss-vorlauf-zeile:hover { background: rgba(255,255,255,.04); }
1180        .ss-vorlauf-logo { flex: none; width: 28px; height: 28px; border-radius: 50%; overflow: hidden;
1181          display: flex; align-items: center; justify-content: center;
1182          background: rgba(255,255,255,.08); }
1183        .ss-vorlauf-mitte { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
1184        .ss-vorlauf-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1185        /* Der Auftrittsname steht neben der Firma, aber leiser: die Firma ist
1186           die Ordnung, der Auftritt die Zeile. */
1187        .ss-vorlauf-set { margin-left: 8px; font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
1188        .ss-vorlauf-set::before { content: "· "; }
1189        /* Schmal ist in der Zeile kein Platz fuer beides nebeneinander — dann
1190           steht der Auftritt unter der Firma, statt vom Abschneiden gefressen
1191           zu werden. Nur Zeilen MIT Auftritt duerfen umbrechen, sonst aendert
1192           sich das Bild auch dort, wo es nichts zu zeigen gibt. */
1193        @media (max-width: 760px) {
1194          .ss-vorlauf-name:has(.ss-vorlauf-set) { white-space: normal; }
1195          .ss-vorlauf-set { display: block; margin-left: 0; }
1196          .ss-vorlauf-set::before { content: none; } }
1197        .ss-balken-breit { height: 3px; }
1198        .ss-vorlauf-rechts { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
1199        .ss-vorlauf-tage { font-size: 12px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
1200        .ss-vorlauf-takt { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
1201        /* ── Auswertung ─────────────────────────────────────────────────
1202           Zwei Quellen nebeneinander, nichts verrechnet. Die Tabelle traegt
1203           deshalb zwei Bloecke: „Postiz" links, eigene Messung rechts. */
1204        .aw-kopf { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap;
1205          padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
1206        .aw-zeitraum { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
1207        .aw-zaehler { font-size: 12.5px; color: var(--ink-2); }
1208        .aw-zaehler b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 700; }
1209        .aw-zaehler-still { color: var(--ink-3); }
1210        .aw-zaehler-still b { color: var(--ink-2); }
1211        .aw-hinweis { margin: 14px 0 0; font-size: 12px; line-height: 1.6; color: var(--ink-3); max-width: 76ch; }
1212        .aw-fuss { margin: 10px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--ink-3); max-width: 76ch; }
1213        .aw-tab { display: flex; flex-direction: column; max-width: 860px; }
1214        .aw-zeile { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(5, minmax(0, 1fr));
1215          align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
1216        .aw-zeile-kopf { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
1217          color: var(--ink-3); border-bottom-color: var(--line-2); }
1218        .aw-zeile-kopf span + span { text-align: right; }
1219        .aw-pf { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1220        .aw-z { font-size: 12.5px; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
1221        /* „nicht gemessen" steht fuer VIER leere Spalten — als einzelne Zelle
1222           saehe es aus, als fehlte nur die Beitragszahl. */
1223        .aw-ohne { grid-column: 3 / -1; font-size: 11.5px; color: var(--ink-3); text-align: right; }
1224        /* Schmal bleiben Plattform, Postiz und Aufrufe — genau drei Spalten,
1225           deshalb passt „grid-column: 3 / -1" oben fuer beide Breiten. */
1226        @media (max-width: 760px) { .aw-zeile { grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); }
1227          .aw-eng { display: none; } }
1228        .aw-liste { display: flex; flex-direction: column; max-width: 860px; }
1229        .aw-post { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px;
1230          align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); }
1231        .aw-post-bild { display: block; width: 52px; height: 52px; border-radius: 9px; overflow: hidden;
1232          background: var(--bg-2); border: 1px solid var(--line); }
1233        .aw-post-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
1234        .aw-post-mitte { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
1235        .aw-post-text { font-size: 12.5px; line-height: 1.4; color: var(--ink);
1236          display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
1237        .aw-post-meta { font-size: 11px; color: var(--ink-3); }
1238
1239        .ss-ovl { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center;
1240          padding: 24px; background: rgba(4,9,7,.62); }
1241        .ss-vorschau { max-width: min(760px, 92vw); max-height: 88vh; display: flex; flex-direction: column; gap: 10px;
1242          background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 16px; padding: 14px; }
1243        .ss-vorschau-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
1244        .ss-vorschau img, .ss-vorschau video { max-width: 100%; max-height: 74vh; border-radius: 10px; display: block; }
1245      `})]})}
1245export{Da as default};

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.