{
  "format": "tdplugin/1",
  "manifest": {
    "id": "tangodown.activity-clock",
    "name": "Aktivitätsuhr",
    "name_en": "Activity clock",
    "version": "1.2",
    "description": "Öffentliches Konto → zu welchen Stunden und Wochentagen es aktiv ist (Diagramm in der Notiz) und aus der längsten Ruhephase ein Hinweis auf die Zeitzone – unter der Annahme, dass die Person nachts schläft. Quellen ohne Anmeldung: Bluesky, Mastodon (große öffentliche Server), GitHub (öffentliche Aktivität), Telegram-Kanäle (Web-Vorschau), YouTube (letzte Uploads, Kanal-ID nötig) und Hacker News. Gesendet wird nur der Kontoname an die jeweilige Plattform. Ein Hinweis, keine Feststellung.",
    "description_en": "Public account → at which hours and weekdays it is active (chart in the note) and, from the longest quiet period, a hint at the time zone – assuming the person sleeps at night. Sources without login: Bluesky, Mastodon (large public servers), GitHub (public activity), Telegram channels (web preview), YouTube (latest uploads, channel ID required) and Hacker News. Only the account name is sent to the respective platform. A lead, not a finding.",
    "author": "TangoDown",
    "inputs": [
      "account",
      "username",
      "link"
    ],
    "kind": "js",
    "main": "main.js",
    "timeout": 90,
    "icon": "⏰",
    "icon_svg": "icon.svg",
    "permissions": {
      "net": [
        "public.api.bsky.app",
        "api.github.com",
        "t.me",
        "www.youtube.com",
        "hn.algolia.com",
        "mastodon.social",
        "mastodon.online",
        "mstdn.social",
        "mastodon.world",
        "chaos.social",
        "troet.cafe",
        "norden.social",
        "social.bund.de",
        "det.social",
        "nrw.social",
        "muenchen.social",
        "berlin.social",
        "hachyderm.io",
        "infosec.exchange",
        "fosstodon.org"
      ]
    },
    "data_as_of": "2026-11"
  },
  "files": {
    "LICENSE.txt": "MIT License\n\nCopyright (c) 2026 Lars Stahl (TangoDown)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n",
    "README.md": "# Aktivitätsuhr\n\n*English below.*\n\nRechtsklick auf ein **Konto** oder einen **Benutzernamen** → **⏰ Aktivitätsuhr**.\n\n## Was es tut\n\n- Sammelt die **Zeitstempel öffentlicher Beiträge bzw. Aktivitäten** eines Kontos – ohne Anmeldung:\n  - **Bluesky** (bis 500 Einträge), **Mastodon** (große öffentliche Server, bis 320 Beiträge), **GitHub** (öffentliche Aktivität der letzten 90 Tage), **Telegram-Kanäle** (Web-Vorschau, ~100 Beiträge), **YouTube** (letzte 15 Uploads; Kanal-ID `UC…` nötig – über „Konto-IDs“), **Hacker News** (bis 500 Beiträge).\n- **Notiz:** Stunden-Diagramm (UTC), Wochentage, Wochenend-Anteil, Spitzenstunde.\n- **Längste Ruhephase** (5–9 Stunden mit den wenigsten Einträgen) und daraus ein **Zeitzonen-Hinweis als Spanne** – unter der Annahme, dass die Person ungefähr zwischen 22 und 9 Uhr schläft.\n- Felder am Konto: *aktivitaet_ruhephase*, *aktivitaet_zeitzone*, *aktivitaet_basis* (Anzahl, Quelle, Zeitraum).\n\n**Nur ein Name (z.B. „zuck“)?** Dann bietet das Plugin die passenden Plattformen zur Auswahl an (Bluesky, Mastodon, GitHub, Telegram, Hacker News) – die Wahl trägt Plattform und Kennung ins Element ein. **Facebook, Instagram, X, TikTok, LinkedIn** gehen nicht: Dort sind Beiträge mit Uhrzeit nur angemeldet sichtbar, automatisches Auslesen ist nicht erlaubt.\n\n## Grenzen – ehrlich\n\n- **Ein Hinweis, keine Feststellung.** Geplante Beiträge, Schichtarbeit, Reisen, Umzüge, mehrere Personen am Konto oder Automatik verfälschen das Bild.\n- Eine Zeitzonen-Aussage gibt es nur bei **mindestens etwa 50 Zeitstempeln** und einer **deutlichen Ruhephase** (unter 8 % der Einträge) – sonst steht „keine klare Ruhephase“ da.\n- YouTube-Uploads sind oft geplant – dort gibt es grundsätzlich keine Zeitzonen-Aussage.\n- **Nicht möglich:** Facebook, Instagram, X/Twitter, TikTok (keine öffentliche Schnittstelle ohne Anmeldung), Reddit (sperrt automatische Abrufe derzeit). Mastodon nur auf den im Plugin freigegebenen Servern.\n\n## Rechte und Datenschutz\n\n- **Netz:** nur `public.api.bsky.app`, `api.github.com`, `t.me`, `www.youtube.com`, `hn.algolia.com` und große Mastodon-Server. Gesendet wird nur der **Kontoname** an die jeweilige Plattform.\n- **Keine Anmeldung, keine Schlüssel, keine Dateien.** GitHub erlaubt ohne Schlüssel 60 Abfragen je Stunde.\n- Dieses Plugin ist kein Angebot der genannten Plattformen.\n\n## Lizenz\n\nMIT – siehe `LICENSE.txt`.\n\n---\n\n# Activity clock\n\nRight-click an **account** or **username** → **⏰ Aktivitätsuhr**.\n\n## What it does\n\n- Collects the **timestamps of public posts or activity** of an account – without login:\n  - **Bluesky** (up to 500 entries), **Mastodon** (large public servers, up to 320 posts), **GitHub** (public activity of the last 90 days), **Telegram channels** (web preview, ~100 posts), **YouTube** (last 15 uploads; channel ID `UC…` required – via \"Account IDs\"), **Hacker News** (up to 500 posts).\n- **Note:** hourly chart (UTC), weekdays, weekend share, peak hour.\n- **Longest quiet period** (5–9 hours with the fewest entries) and from it a **time zone hint as a range** – assuming the person sleeps roughly between 22:00 and 09:00.\n- Properties on the account: *aktivitaet_ruhephase*, *aktivitaet_zeitzone*, *aktivitaet_basis* (count, source, period).\n\n**Only a name (e.g. \"zuck\")?** Then the plugin offers the matching platforms as a choice (Bluesky, Mastodon, GitHub, Telegram, Hacker News) – the choice writes platform and handle into the element. **Facebook, Instagram, X, TikTok, LinkedIn** are not possible: posts with times are only visible when signed in there, and automated reading is not allowed.\n\n## Limits – honestly\n\n- **A lead, not a finding.** Scheduled posts, shift work, travel, moves, several people on one account or automation distort the picture.\n- A time zone statement is only given with **at least about 50 timestamps** and a **clear quiet period** (below 8 % of entries) – otherwise it says \"no clear quiet period\".\n- YouTube uploads are often scheduled – never a time zone statement there.\n- **Not possible:** Facebook, Instagram, X/Twitter, TikTok (no public interface without login), Reddit (currently blocks automated requests). Mastodon only on the servers enabled in the plugin.\n\n## Rights and privacy\n\n- **Network:** only `public.api.bsky.app`, `api.github.com`, `t.me`, `www.youtube.com`, `hn.algolia.com` and large Mastodon servers. Only the **account name** is sent to the respective platform.\n- **No login, no keys, no files.** GitHub allows 60 requests per hour without a key.\n- This plugin is not a service of the platforms named.\n\n## License\n\nMIT – see `LICENSE.txt`.\n",
    "icon.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\r\n  <rect x=\"0.5\" y=\"0.5\" width=\"23\" height=\"23\" rx=\"5\" fill=\"#13203a\"/>\r\n  <circle cx=\"12\" cy=\"12.5\" r=\"7\" fill=\"none\" stroke=\"#60a5fa\" stroke-width=\"1.6\"/>\r\n  <path d=\"M12 8.5v4l3 2\" fill=\"none\" stroke=\"#fbbf24\" stroke-width=\"1.6\" stroke-linecap=\"round\"/>\r\n  <path d=\"M6.5 4.5l-2 2M17.5 4.5l2 2\" stroke=\"#60a5fa\" stroke-width=\"1.6\" stroke-linecap=\"round\"/>\r\n</svg>\r\n",
    "main.js": "// Aktivitätsuhr – Plugin für TangoDown. Lizenz: MIT (siehe LICENSE.txt).\n// Sammelt die Zeitstempel öffentlicher Beiträge bzw. Aktivitäten eines Kontos (Bluesky, Mastodon, GitHub, Telegram-Kanal,\n// YouTube, Hacker News) und zeigt, zu welchen Stunden und Wochentagen es aktiv ist. Aus der längsten Ruhephase folgt ein\n// HINWEIS auf die Zeitzone – unter der Annahme, dass die Person nachts schläft. Ohne Anmeldung.\n\nconst MASTO = ['mastodon.social', 'mastodon.online', 'mstdn.social', 'mastodon.world', 'chaos.social', 'troet.cafe', 'norden.social', 'social.bund.de', 'det.social', 'nrw.social', 'muenchen.social', 'berlin.social', 'hachyderm.io', 'infosec.exchange', 'fosstodon.org']\nlet EN = false\nconst T = (de, en) => (EN ? en : de)\nconst J = { Accept: 'application/json' }\nconst WD = () => (EN ? ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] : ['Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So'])\n\nfunction detect(input) {\n  const p = input.props || {}\n  const plat = String(p.plattform || '').toLowerCase()\n  const vals = [p.url, input.value, input.label, p.handle].map((x) => String(x || '').trim()).filter(Boolean)\n  for (const v of vals) {\n    let m\n    if ((m = /(?:t|telegram)\\.me\\/(?:s\\/)?([A-Za-z][A-Za-z0-9_]{3,31})\\b/i.exec(v))) return { plat: 'telegram', id: m[1] }\n    if ((m = /bsky\\.app\\/profile\\/([^/?#\\s]+)/i.exec(v))) return { plat: 'bluesky', id: m[1] }\n    if ((m = /github\\.com\\/([A-Za-z0-9-]{1,39})(?:[/?#]|$)/i.exec(v)) && !/^(orgs|topics|search|features)$/i.test(m[1])) return { plat: 'github', id: m[1] }\n    if ((m = /youtube\\.com\\/channel\\/(UC[A-Za-z0-9_-]{22})/i.exec(v))) return { plat: 'youtube', id: m[1] }\n    if ((m = /news\\.ycombinator\\.com\\/user\\?id=([A-Za-z0-9_-]+)/i.exec(v))) return { plat: 'hn', id: m[1] }\n    if ((m = /reddit\\.com\\/(?:u|user)\\/([A-Za-z0-9_-]+)/i.exec(v))) return { plat: 'reddit', id: m[1] }\n    if ((m = /^@?([A-Za-z0-9_.]+)@([a-z0-9.-]+\\.[a-z]{2,})$/i.exec(v))) return { plat: 'mastodon', id: m[1], host: m[2].toLowerCase() }\n    if ((m = /^https?:\\/\\/([a-z0-9.-]+\\.[a-z]{2,})\\/@([A-Za-z0-9_.]+)\\b/i.exec(v)) && !/youtube|bsky/.test(m[1])) return { plat: 'mastodon', id: m[2], host: m[1].toLowerCase() }\n  }\n  const h = String(p.handle || input.label || input.value || '').replace(/^[a-z ]+\\s*[·:|-]\\s*/i, '').replace(/^@/, '').trim()\n  const uc = String(p.konto_id || p.kanal_id || '').trim()\n  if (plat.includes('youtube') && /^UC[A-Za-z0-9_-]{22}$/.test(uc)) return { plat: 'youtube', id: uc }\n  if (plat.includes('youtube')) return { plat: 'youtube', id: '' }\n  if (plat.includes('github')) return { plat: 'github', id: h }\n  if (plat.includes('hacker')) return { plat: 'hn', id: h }\n  if (plat.includes('reddit')) return { plat: 'reddit', id: h }\n  if (plat.includes('telegram')) return { plat: 'telegram', id: h }\n  if (plat.includes('bluesky')) return { plat: 'bluesky', id: h }\n  // Bluesky-Namen sind Domains – in Feld, Wert oder Bezeichnung\n  const dom = [p.handle, input.value, input.label].map((x) => String(x || '').replace(/^[a-z ]+\\s*[·:|-]\\s*/i, '').replace(/^@/, '').trim()).find((x) => /^[a-z0-9-]+(\\.[a-z0-9-]+)+$/i.test(x))\n  if (dom) return { plat: 'bluesky', id: dom.toLowerCase() }\n  return null\n}\n\n/* ---------- Zeitstempel je Plattform ---------- */\nasync function bluesky(id) {\n  const out = []\n  let cursor = ''\n  for (let pg = 0; pg < 5; pg++) {\n    const r = await td.fetch(`https://public.api.bsky.app/xrpc/app.bsky.feed.getAuthorFeed?actor=${encodeURIComponent(id)}&limit=100&filter=posts_with_replies${cursor ? `&cursor=${encodeURIComponent(cursor)}` : ''}`, { headers: J })\n    if (r.status === 400) return { missing: T(`Bluesky kennt „${id}“ nicht`, `Bluesky does not know \"${id}\"`) }\n    if (!r.ok) break\n    const j = r.json()\n    for (const f of j.feed || []) { const t = f.reason ? f.reason.indexedAt : f.post?.record?.createdAt; if (t) out.push(t) }\n    if (!j.cursor) break\n    cursor = j.cursor\n  }\n  return { label: `Bluesky · ${id}`, P: 'Bluesky', times: out, what: T('Beiträge, Antworten und Reposts', 'posts, replies and reposts') }\n}\nasync function mastodon(id, host) {\n  if (!MASTO.includes(host)) return { missing: T(`Mastodon-Server „${host}“ ist in diesem Plugin nicht freigegeben. Abfragbar: ${MASTO.join(', ')}`, `Mastodon server \"${host}\" is not enabled. Supported: ${MASTO.join(', ')}`) }\n  const lk = await td.fetch(`https://${host}/api/v1/accounts/lookup?acct=${encodeURIComponent(id)}`, { headers: J })\n  if (!lk.ok) return { missing: T(`Konto @${id}@${host} nicht gefunden`, `Account @${id}@${host} not found`) }\n  const acc = lk.json(), out = []\n  let max = ''\n  for (let pg = 0; pg < 8; pg++) {\n    const r = await td.fetch(`https://${host}/api/v1/accounts/${acc.id}/statuses?limit=40${max ? `&max_id=${max}` : ''}`, { headers: J })\n    if (!r.ok) break\n    const j = r.json()\n    if (!Array.isArray(j) || !j.length) break\n    for (const s of j) out.push(s.created_at)\n    max = j[j.length - 1].id\n  }\n  return { label: `Mastodon · ${acc.acct}@${host}`, P: 'Mastodon', times: out, what: T('Beiträge und Boosts', 'posts and boosts') }\n}\nasync function github(id) {\n  const out = []\n  for (let pg = 1; pg <= 3; pg++) {\n    const r = await td.fetch(`https://api.github.com/users/${encodeURIComponent(id)}/events/public?per_page=100&page=${pg}`, { headers: { Accept: 'application/vnd.github+json' } })\n    if (r.status === 404) return { missing: T(`GitHub-Konto „${id}“ nicht gefunden`, `GitHub account \"${id}\" not found`) }\n    if (r.status === 403 || r.status === 429) { if (!out.length) throw new Error(T('GitHub: Abfragegrenze erreicht (60 je Stunde ohne Schlüssel) – später erneut', 'GitHub: rate limit reached (60 per hour without key) – try later')); break }\n    if (!r.ok) break\n    const j = r.json()\n    if (!Array.isArray(j) || !j.length) break\n    for (const e of j) out.push(e.created_at)\n    if (j.length < 100) break\n  }\n  return { label: `GitHub · ${id}`, P: 'GitHub', times: out, what: T('öffentliche Aktivitäten der letzten 90 Tage (Commits, Issues, Kommentare …)', 'public activity of the last 90 days (commits, issues, comments …)') }\n}\nasync function telegram(id) {\n  const out = []\n  let before = ''\n  for (let pg = 0; pg < 5; pg++) {\n    const r = await td.fetch(`https://t.me/s/${id}${before ? `?before=${before}` : ''}`, { headers: { Accept: 'text/html' } })\n    if (!r.ok || !r.text) break\n    const ts = [...r.text.matchAll(/<time datetime=\"([^\"]+)\"/g)].map((m) => m[1])\n    if (!ts.length) { if (pg === 0) return { missing: T(`„${id}“ hat keine öffentliche Telegram-Vorschau`, `\"${id}\" has no public Telegram preview`) }; break }\n    out.push(...ts)\n    const b = /data-before=\"(\\d+)\"/.exec(r.text)?.[1]\n    if (!b || b === before) break\n    before = b\n  }\n  return { label: `Telegram · ${id}`, P: 'Telegram', times: [...new Set(out)], what: T('Kanalbeiträge (bei Kanälen mit mehreren Autoren oder geplanten Beiträgen weniger aussagekräftig)', 'channel posts (less meaningful for channels with several authors or scheduled posts)') }\n}\nasync function youtube(id) {\n  if (!id) return { missing: T('YouTube braucht die Kanal-ID (UC…): mit „Konto-IDs“ ermitteln oder die Adresse youtube.com/channel/UC… angeben', 'YouTube needs the channel ID (UC…): determine it with \"Account IDs\" or give the address youtube.com/channel/UC…') }\n  const r = await td.fetch(`https://www.youtube.com/feeds/videos.xml?channel_id=${id}`, { headers: { Accept: 'application/atom+xml' } })\n  if (r.status === 404) return { missing: T(`YouTube-Kanal ${id} nicht gefunden`, `YouTube channel ${id} not found`) }\n  if (!r.ok) throw new Error('YouTube HTTP ' + r.status)\n  const name = /<author>\\s*<name>([^<]*)/.exec(r.text)?.[1] || id\n  const times = [...r.text.matchAll(/<entry>[\\s\\S]*?<published>([^<]+)<\\/published>/g)].map((m) => m[1])\n  return { label: `YouTube · ${name}`, P: 'YouTube', times, what: T('Veröffentlichungszeiten der letzten 15 Videos (oft geplant – wenig aussagekräftig für Schlafenszeiten)', 'publication times of the last 15 videos (often scheduled – of little use for sleeping times)') }\n}\nasync function hn(id) {\n  const r = await td.fetch(`https://hn.algolia.com/api/v1/search_by_date?tags=author_${encodeURIComponent(id)}&hitsPerPage=500`, { headers: J })\n  if (!r.ok) throw new Error('Hacker News HTTP ' + r.status)\n  const times = (r.json().hits || []).map((h) => new Date(h.created_at_i * 1000).toISOString())\n  if (!times.length) return { missing: T(`Keine Beiträge von „${id}“ bei Hacker News`, `No posts by \"${id}\" on Hacker News`) }\n  return { label: `Hacker News · ${id}`, P: 'Hacker News', times, what: T('Beiträge und Kommentare', 'stories and comments') }\n}\n\n/* ---------- Auswertung ---------- */\nconst BARS = '▁▂▃▄▅▆▇█'\nfunction analyse(times) {\n  const ts = times.map((t) => Date.parse(t)).filter((x) => Number.isFinite(x)).sort((a, b) => a - b)\n  const h = Array(24).fill(0), w = Array(7).fill(0)\n  for (const x of ts) { const d = new Date(x); h[d.getUTCHours()]++; w[(d.getUTCDay() + 6) % 7]++ }\n  // längste Ruhephase (zyklisch): Fenster von 5–9 Stunden mit den wenigsten Einträgen, bei Gleichstand das längste\n  let best = { start: 0, len: 6, sum: Infinity }\n  for (let len = 5; len <= 9; len++) for (let s = 0; s < 24; s++) {\n    let sum = 0\n    for (let k = 0; k < len; k++) sum += h[(s + k) % 24]\n    const per = sum / len\n    if (per < best.sum / best.len - 1e-9 || (Math.abs(per - best.sum / best.len) < 1e-9 && len > best.len)) best = { start: s, len, sum }\n  }\n  const quietShare = ts.length ? best.sum / ts.length : 1\n  const mid = (best.start + best.len / 2) % 24 // Mitte der Ruhephase in UTC\n  // Annahme: Schlafmitte zwischen etwa 2 und 6:30 Uhr Ortszeit (Frühaufsteher bis Nachteule) → Spanne der Verschiebung\n  const wrap = (o) => (o > 12 ? o - 24 : o < -11 ? o + 24 : o)\n  const lo = wrap(Math.ceil(2 - mid)), hi = wrap(Math.floor(6.5 - mid))\n  return { n: ts.length, first: ts[0], last: ts[ts.length - 1], h, w, quiet: best, quietShare, lo, hi, off: wrap(Math.round(4 - mid)) }\n}\nconst utc = (o) => `UTC${o >= 0 ? '+' : '−'}${Math.abs(o)}`\nconst ZONES = { '-8': 'Pazifik (USA)', '-7': 'Rocky Mountains', '-6': 'Zentral-USA, Mexiko', '-5': 'Ostküste USA', '-4': 'Ostküste USA (Sommer), Karibik', '-3': 'Brasilien, Argentinien', '0': 'UK, Portugal, Westafrika', '1': 'Mitteleuropa (Winter)', '2': 'Mitteleuropa (Sommer), Osteuropa', '3': 'Moskau, Türkei, Ostafrika', '4': 'Golfstaaten', '5': 'Pakistan', '6': 'Bangladesch', '7': 'Thailand, Vietnam', '8': 'China, Singapur', '9': 'Japan, Korea', '10': 'Ostaustralien' }\nconst ZONES_EN = { '-8': 'Pacific (US)', '-7': 'Mountain (US)', '-6': 'Central US, Mexico', '-5': 'US East Coast', '-4': 'US East Coast (summer), Caribbean', '-3': 'Brazil, Argentina', '0': 'UK, Portugal, West Africa', '1': 'Central Europe (winter)', '2': 'Central Europe (summer), Eastern Europe', '3': 'Moscow, Turkey, East Africa', '4': 'Gulf states', '5': 'Pakistan', '6': 'Bangladesh', '7': 'Thailand, Vietnam', '8': 'China, Singapore', '9': 'Japan, Korea', '10': 'Eastern Australia' }\n\nasync function transformInner(input) {\n  EN = input.lang === 'en'\n  const props = input.props || {}\n  const d = detect(input)\n  if (!d) {\n    // Plattformen, die Beiträge und Zeitstempel nur mit Anmeldung zeigen – bewusst nicht unterstützt (kein Auslesen hinter dem Login)\n    const all = [input.label, input.value, ...Object.values(input.props || {})].join(' ')\n    const closed = /(facebook\\.com|fb\\.com|instagram\\.com|threads\\.net|linkedin\\.com|tiktok\\.com|(^|[\\s/.])x\\.com|twitter\\.com|snapchat\\.com)/i.exec(all) || /^(Facebook|Instagram|Threads|LinkedIn|TikTok|X|Twitter|Snapchat)\\s*·/i.exec(String(input.label || ''))\n    if (closed) return { entities: [], message: T(`${closed[0].replace(/[\\s·/]/g, '')}: nicht unterstützt – Beiträge mit Zeit nur angemeldet sichtbar, Auslesen dort nicht erlaubt. Tipp: Profil im TangoDown-Browser ansehen. Geht: Bluesky, Mastodon, GitHub, Telegram, YouTube, Hacker News.`, `${closed[0].replace(/[\\s·/]/g, '')}: not supported – posts with times only visible when signed in, reading not allowed there. Tip: view the profile in the TangoDown browser. Works: Bluesky, Mastodon, GitHub, Telegram, YouTube, Hacker News.`) }\n    // Bloßer Name: nicht raten, welche Plattform – zur Auswahl stellen (die Wahl trägt Plattform und Kennung ein, dann neuer Lauf)\n    const h = String(input.label || input.value || '').replace(/^@/, '').trim()\n    if (/^[A-Za-z0-9_.-]{2,39}$/.test(h)) {\n      const ch = [\n        { label: `Bluesky · ${h.includes('.') ? h : `${h}.bsky.social`}`, hint: T('Bluesky-Name (oft name.bsky.social oder eigene Domain)', 'Bluesky handle (often name.bsky.social or own domain)'), props: { plattform: 'Bluesky', handle: h.includes('.') ? h : `${h}.bsky.social` } },\n        { label: `Mastodon · @${h}@mastodon.social`, hint: T('größter Mastodon-Server – andere Server: @name@server im Feld „handle“', 'largest Mastodon server – other servers: @name@server in the \"handle\" property'), props: { plattform: 'Mastodon', handle: `${h}@mastodon.social` } },\n        { label: `GitHub · ${h}`, hint: T('öffentliche Aktivität (Commits, Issues …)', 'public activity (commits, issues …)'), props: { plattform: 'GitHub', handle: h } },\n        ...(/^[A-Za-z][A-Za-z0-9_]{4,31}$/.test(h) ? [{ label: `Telegram · t.me/${h}`, hint: T('nur öffentliche Kanäle', 'public channels only'), props: { plattform: 'Telegram', handle: h } }] : []),\n        { label: `Hacker News · ${h}`, hint: T('Kommentare und Beiträge', 'comments and posts'), props: { plattform: 'Hacker News', handle: h } }\n      ]\n      return { entities: [], choices: ch, message: T(`„${h}“: Plattform wählen (Facebook, Instagram, X, TikTok gehen nicht – nur angemeldet)`, `\"${h}\": choose the platform (Facebook, Instagram, X, TikTok not possible – sign-in only)`) }\n    }\n    return { entities: [], message: T('Kein Konto erkannt – Profiladresse ins Feld „Profil-URL“ (z.B. bsky.app/profile/…, github.com/name, t.me/kanal) oder Plattform + „Handle“; Bezeichnung darf frei bleiben. Facebook, Instagram, X, TikTok nicht (nur angemeldet)', 'No account recognised – put the profile address in \"Profil-URL\" (e.g. bsky.app/profile/…, github.com/name, t.me/channel) or platform + \"Handle\"; the label can stay free. Not Facebook, Instagram, X, TikTok (sign-in only)') }\n  }\n  if (d.plat === 'reddit') return { entities: [], message: T('Reddit sperrt automatische Abrufe ohne Anmeldung derzeit (HTTP 429) – nicht auswertbar', 'Reddit currently blocks automated requests without login (HTTP 429) – cannot be analysed') }\n  const r = d.plat === 'bluesky' ? await bluesky(d.id) : d.plat === 'mastodon' ? await mastodon(d.id, d.host) : d.plat === 'github' ? await github(d.id) : d.plat === 'telegram' ? await telegram(d.id) : d.plat === 'youtube' ? await youtube(d.id) : await hn(d.id)\n  if (r.missing) return { entities: [], message: r.missing }\n  const a = analyse(r.times)\n  if (a.n < 10) return { entities: [], message: T(`${r.label}: nur ${a.n} Zeitstempel – zu wenig für eine Aktivitätsuhr`, `${r.label}: only ${a.n} timestamps – too few for an activity clock`) }\n  const max = Math.max(...a.h)\n  const bars = a.h.map((x) => BARS[Math.min(7, Math.floor((x / (max || 1)) * 7.999))]).join('')\n  const q = a.quiet\n  const qEnd = (q.start + q.len) % 24\n  const reliable = a.n >= 50 && a.quietShare <= 0.08 && !/YouTube/.test(r.P)\n  const zoneHint = reliable\n    ? T(`passt zu Ortszeit etwa ${utc(a.lo)} bis ${utc(a.hi)}${ZONES[String(a.off)] ? ` (Mitte z.B. ${ZONES[String(a.off)]})` : ''} – wenn die Person ungefähr zwischen 22 und 9 Uhr schläft`, `fits local time of about ${utc(a.lo)} to ${utc(a.hi)}${ZONES_EN[String(a.off)] ? ` (middle e.g. ${ZONES_EN[String(a.off)]})` : ''} – if the person sleeps roughly between 22:00 and 09:00`)\n    : T('keine klare Ruhephase – keine Zeitzonen-Aussage (zu wenig Daten, Schichtarbeit, mehrere Personen, geplante Beiträge oder Bot)', 'no clear quiet period – no time zone statement (too little data, shift work, several people, scheduled posts or bot)')\n  const wd = WD(), wmax = Math.max(...a.w)\n  const weekend = (a.w[5] + a.w[6]) / a.n\n  const self = {\n    aktivitaet_ruhephase: T(`${String(q.start).padStart(2, '0')}–${String(qEnd).padStart(2, '0')} Uhr UTC (${Math.round(a.quietShare * 100)} % der Einträge)`, `${String(q.start).padStart(2, '0')}–${String(qEnd).padStart(2, '0')} UTC (${Math.round(a.quietShare * 100)} % of entries)`),\n    aktivitaet_zeitzone: zoneHint,\n    aktivitaet_basis: T(`${a.n} Zeitstempel (${r.P}), ${a.first ? new Date(a.first).toISOString().slice(0, 10) : '?'} – ${a.last ? new Date(a.last).toISOString().slice(0, 10) : '?'}, Abruf ${new Date().toISOString().slice(0, 10)}`, `${a.n} timestamps (${r.P}), ${a.first ? new Date(a.first).toISOString().slice(0, 10) : '?'} – ${a.last ? new Date(a.last).toISOString().slice(0, 10) : '?'}, retrieved ${new Date().toISOString().slice(0, 10)}`)\n  }\n  for (const k of Object.keys(self)) if (String(props[k] || '') === self[k]) delete self[k]\n  const note = [\n    `${T('Aktivitätsuhr', 'Activity clock')} · ${r.label} · ${a.n} ${T('Zeitstempel', 'timestamps')}: ${r.what}`,\n    '',\n    T('Stunden (UTC) 00 … 23:', 'Hours (UTC) 00 … 23:'),\n    `  ${bars}`,\n    `  0     6     12    18   23`,\n    `  ${T('Spitze', 'peak')}: ${a.h.indexOf(max)}–${(a.h.indexOf(max) + 1) % 24} ${T('Uhr UTC', 'UTC')} (${max})`,\n    '',\n    `${T('Wochentage', 'Weekdays')}: ${wd.map((x, i) => `${x} ${BARS[Math.min(7, Math.floor((a.w[i] / (wmax || 1)) * 7.999))]} ${a.w[i]}`).join(' · ')} · ${T('Wochenende', 'weekend')} ${Math.round(weekend * 100)} %`,\n    '',\n    `${T('Längste Ruhephase', 'Longest quiet period')}: ${self.aktivitaet_ruhephase || T('wie bisher', 'unchanged')}`,\n    `${T('Zeitzonen-Hinweis', 'Time zone hint')}: ${zoneHint}`,\n    '',\n    T('Hinweis: Ein Hinweis, keine Feststellung. Geplante Beiträge, Schichtarbeit, Reisen, mehrere Personen am Konto oder Automatik verfälschen das Bild. Für eine Aussage braucht es mindestens etwa 50 Zeitstempel und eine deutliche Ruhephase (unter 8 % der Einträge).', 'Note: a lead, not a finding. Scheduled posts, shift work, travel, several people on one account or automation distort the picture. A statement needs at least about 50 timestamps and a clear quiet period (below 8 % of entries).'),\n    T(`Quelle: öffentliche Daten von ${r.P}, ohne Anmeldung. Dieses Plugin ist kein Angebot von ${r.P}.`, `Source: public data from ${r.P}, without login. This plugin is not a ${r.P} service.`)\n  ].join('\\n')\n  return { entities: [{ type: input.type || 'account', label: input.label || r.label, props: self }], note, message: reliable ? T(`⏰ ${r.label}: Ruhephase ${self.aktivitaet_ruhephase || ''} → etwa ${utc(a.lo)} bis ${utc(a.hi)} (Hinweis)`, `⏰ ${r.label}: quiet period ${self.aktivitaet_ruhephase || ''} → about ${utc(a.lo)} to ${utc(a.hi)} (lead)`) : T(`⏰ ${r.label}: ${a.n} Zeitstempel ausgewertet – keine klare Ruhephase`, `⏰ ${r.label}: ${a.n} timestamps analysed – no clear quiet period`) }\n}\n\n/* ---------- Widerspruch Plattform-Feld ↔ ausgewertetes Konto melden (z.B. Plattform „X“, Profil-URL zeigt auf Telegram) ---------- */\nconst PLAT_NAME = { telegram: 'Telegram', bluesky: 'Bluesky', mastodon: 'Mastodon', github: 'GitHub', youtube: 'YouTube', hn: 'Hacker News', reddit: 'Reddit' }\nasync function transform(input) {\n  EN = input.lang === 'en'\n  const r = await transformInner(input)\n  if (r.note && r.note.length > 4900) r.note = r.note.slice(0, 4800).replace(/\\n[^\\n]*$/, '') + '\\n… ' + T('(gekürzt – die vollständige Liste steht als Elemente im Graphen)', '(shortened – the full list is in the graph as elements)')\n  const p = input.props || {}\n  const field = String(p.plattform || '').trim()\n  const d = (() => { try { return detect(input) } catch { return null } })()\n  if (!field || !d || !d.plat || !PLAT_NAME[d.plat]) return r\n  const want = field.toLowerCase(), got = PLAT_NAME[d.plat].toLowerCase()\n  if (want.includes(got) || (d.plat === 'hn' && /hacker/.test(want))) return r\n  const warn = T(`⚠ Plattform-Feld sagt „${field}“, ausgewertet wurde aber ${PLAT_NAME[d.plat]} (aus Profil-URL bzw. Handle) – prüfen, ob das wirklich dasselbe Konto ist.`, `⚠ The platform property says \"${field}\", but ${PLAT_NAME[d.plat]} was analysed (from profile URL or handle) – check whether this really is the same account.`)\n  return { ...r, message: `${warn.slice(0, 120)} · ${r.message || ''}`.slice(0, 300), note: (r.note ? `${warn}\\n\\n${r.note}` : warn).slice(0, 5000) }\n}\n",
    "pruefung.json": "{\n  \"format\": \"tangodown-pruefung/1\",\n  \"checkVersion\": 1,\n  \"id\": \"tangodown.activity-clock\",\n  \"version\": \"1.2\",\n  \"at\": \"2026-11-25T11:57:09.370Z\",\n  \"dataAsOf\": \"2026-11\",\n  \"rights\": {\n    \"kind\": \"js\",\n    \"net\": [\n      \"public.api.bsky.app\",\n      \"api.github.com\",\n      \"t.me\",\n      \"www.youtube.com\",\n      \"hn.algolia.com\",\n      \"mastodon.social\",\n      \"mastodon.online\",\n      \"mstdn.social\",\n      \"mastodon.world\",\n      \"chaos.social\",\n      \"troet.cafe\",\n      \"norden.social\",\n      \"social.bund.de\",\n      \"det.social\",\n      \"nrw.social\",\n      \"muenchen.social\",\n      \"berlin.social\",\n      \"hachyderm.io\",\n      \"infosec.exchange\",\n      \"fosstodon.org\"\n    ],\n    \"secrets\": [],\n    \"files\": false\n  },\n  \"counts\": {\n    \"warn\": 0,\n    \"info\": 0\n  },\n  \"findings\": []\n}"
  }
}