// ==UserScript==
// @name Letterboxd Plus
// @name:ru Letterboxd Plus
// @name:es Letterboxd Plus
// @name:pt-BR Letterboxd Plus
// @name:de Letterboxd Plus
// @name:fr Letterboxd Plus
// @name:zh-CN Letterboxd Plus
// @namespace https://github.com/NemoKing1210/letterboxd-plus
// @version 0.6.2
// @author NemoKing1210
// @description Adds external ratings and enhanced cast cards to Letterboxd
// @description:ru Добавляет в Letterboxd внешние рейтинги и карточки актёров
// @description:es Añade valoraciones externas y fichas del reparto a Letterboxd
// @description:pt-BR Adiciona avaliações externas e cartões do elenco ao Letterboxd
// @description:de Ergänzt Letterboxd um externe Wertungen und Besetzungskarten
// @description:fr Ajoute des notes externes et des fiches de distribution à Letterboxd
// @description:zh-CN 为 Letterboxd 添加外部评分和增强演员卡片
// @license MIT
// @icon https://letterboxd.com/favicon.ico
// @homepage https://github.com/NemoKing1210/letterboxd-plus
// @homepageURL https://github.com/NemoKing1210/letterboxd-plus
// @source https://github.com/NemoKing1210/letterboxd-plus.git
// @supportURL https://github.com/NemoKing1210/letterboxd-plus/issues
// @downloadURL https://raw.githubusercontent.com/NemoKing1210/letterboxd-plus/main/letterboxd-plus.user.js
// @updateURL https://raw.githubusercontent.com/NemoKing1210/letterboxd-plus/main/letterboxd-plus.user.js
// @match https://letterboxd.com/*
// @match https://www.letterboxd.com/*
// @tag letterboxd
// @tag movies
// @tag ratings
// @connect www.rottentomatoes.com
// @connect rottentomatoes.com
// @connect backend.metacritic.com
// @grant GM_addStyle
// @grant GM_deleteValue
// @grant GM_getValue
// @grant GM_listValues
// @grant GM_registerMenuCommand
// @grant GM_setValue
// @grant GM_xmlhttpRequest
// @run-at document-idle
// @noframes
// ==/UserScript==
(e=>{if(typeof GM_addStyle=="function"){GM_addStyle(e);return}const t=document.createElement("style");t.textContent=e,document.head.append(t)})(' :root{--lbp-bg: #14181c;--lbp-panel: #1f252b;--lbp-panel-2: #2c3440;--lbp-text: #f3f6f8;--lbp-muted: #9ab;--lbp-green: #00e054;--lbp-blue: #40bcf4;--lbp-orange: #ff8000;--lbp-line: rgba(255, 255, 255, .1)}html.lbp-modal-open{overflow:hidden}.lbp-rating{box-sizing:border-box;margin:0 0 28px;padding:0}.lbp-rating__header{align-items:center;border-bottom:1px solid #456;display:flex;gap:7px;justify-content:space-between}.lbp-rating__favicon{display:block;flex:0 0 auto;height:16px;margin-bottom:5px;object-fit:contain;width:16px}.lbp-rating__header .section-heading{border-bottom:0;flex:1 1 auto;margin-bottom:0;padding-bottom:5px}.lbp-rating__body{padding-top:10px}.lbp-rating__link{color:inherit;display:block;text-decoration:none}.lbp-rating__score{align-items:center;background:#242c34;border-radius:3px;display:grid;gap:12px;grid-template-columns:58px minmax(0,1fr);min-height:50px;padding:8px 10px;transition:background-color .15s ease}.lbp-rating__score+.lbp-rating__score{border-top:1px solid #14181c}.lbp-rating__link:hover .lbp-rating__score,.lbp-rating__link:focus-visible .lbp-rating__score{background:#303840}.lbp-rating__link:focus-visible{outline:2px solid var(--lbp-blue);outline-offset:2px}.lbp-rating__value{color:#fff;font-size:20px;font-variant-numeric:tabular-nums;font-weight:700;letter-spacing:-.035em}.lbp-rating__score--critics .lbp-rating__value{border-left:3px solid var(--lbp-orange);padding-left:8px}.lbp-rating__score--audience .lbp-rating__value{border-left:3px solid var(--lbp-green);padding-left:8px}.lbp-rating__score--metascore .lbp-rating__value,.lbp-rating__score--user-score .lbp-rating__value{border-left:3px solid #789;padding-left:8px}.lbp-rating__score--average .lbp-rating__value{border-left:3px solid var(--lbp-blue);padding-left:8px}.lbp-rating__score--positive .lbp-rating__value{border-left-color:var(--lbp-green)}.lbp-rating__score--mixed .lbp-rating__value{border-left-color:#fc0}.lbp-rating__score--negative .lbp-rating__value{border-left-color:#e54b4b}.lbp-rating__meta{display:flex;flex-direction:column;min-width:0}.lbp-rating__meta strong{color:#c8d4dc;font-size:11px;line-height:1.25}.lbp-rating__meta small{color:#789;font-size:10px;line-height:1.3;margin-top:2px}.lbp-rating__body.is-loading{cursor:progress}.lbp-rating__skeleton{pointer-events:none}.lbp-rating__skeleton-value,.lbp-rating__skeleton-copy span{animation:lbp-shimmer 1.25s ease-in-out infinite;background:linear-gradient(90deg,#303943 20%,#3d4853,#303943 80%);background-size:220% 100%;border-radius:2px;display:block}.lbp-rating__skeleton-value{border-left:3px solid #3d4853;height:20px;margin-left:0;width:45px}.lbp-rating__skeleton-copy{display:grid;gap:7px}.lbp-rating__skeleton-copy span:first-child{height:9px;width:min(110px,72%)}.lbp-rating__skeleton-copy span:last-child{height:7px;width:min(76px,50%)}.lbp-rating__body.is-empty{color:#789;font-size:11px;line-height:1.45}@keyframes lbp-shimmer{0%{background-position:100% 0}to{background-position:-100% 0}}.lbp-cast-list--enhanced{display:grid;gap:8px;grid-template-columns:repeat(auto-fill,minmax(145px,1fr))}.lbp-cast-list--enhanced .lbp-cast-card.text-slug{align-items:center;background:#242c34;border-radius:3px;color:#c8d4dc;display:grid;float:none;gap:9px;grid-template-columns:46px minmax(0,1fr);margin:0;min-height:64px;overflow:hidden;padding:0 8px 0 0;text-decoration:none;transition:background-color .15s ease}.lbp-cast-list--enhanced .lbp-cast-card:hover,.lbp-cast-list--enhanced .lbp-cast-card:focus-visible{background:#303840;color:#fff;outline:2px solid var(--lbp-green);outline-offset:2px}.lbp-cast-card__portrait{align-self:stretch;background:radial-gradient(circle at 50% 34%,#566574 0 15%,transparent 16%),radial-gradient(ellipse at 50% 105%,#566574 0 42%,transparent 43%),#303943;display:block;min-height:64px;overflow:hidden;position:relative}.lbp-cast-card[data-lbp-portrait-state=loading] .lbp-cast-card__portrait:after{animation:lbp-shimmer 1.25s ease-in-out infinite;background:linear-gradient(90deg,transparent 20%,rgba(255,255,255,.1) 50%,transparent 80%);background-size:220% 100%;content:"";inset:0;position:absolute}.lbp-cast-card__portrait img{height:100%;inset:0;object-fit:cover;opacity:0;position:absolute;transition:opacity .18s ease,transform .18s ease;width:100%}.lbp-cast-card[data-lbp-portrait-state=loaded] .lbp-cast-card__portrait img{opacity:1}.lbp-cast-card:hover .lbp-cast-card__portrait img{transform:scale(1.035)}.lbp-cast-card__copy{display:flex;flex-direction:column;min-width:0}.lbp-cast-card__copy strong{color:inherit;font-size:11px;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lbp-cast-card__copy small{color:#789;display:-webkit-box;font-size:9px;line-height:1.3;margin-top:3px;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}.lbp-cast-list--enhanced>.lbp-cast-show-all{grid-column:1 / -1}.lbp-cast-list--enhanced>.lbp-cast-show-all{cursor:pointer;justify-self:start}.lbp-cast-list--enhanced>button.lbp-cast-show-all{appearance:none;border:0;font:inherit}.lbp-cast-list--enhanced:not(.lbp-cast-list--expanded) .lbp-cast-card--extra{display:none}.lbp-cast-list--enhanced>#cast-overflow{grid-column:1 / -1}.lbp-cast-list--enhanced.lbp-cast-list--expanded>#cast-overflow{display:grid!important;gap:8px;grid-template-columns:repeat(auto-fill,minmax(145px,1fr))}.lbp-settings-backdrop{align-items:center;background:#000000d1;display:flex;inset:0;justify-content:center;opacity:0;padding:18px;position:fixed;transition:opacity .18s ease;z-index:1000000}.lbp-settings-backdrop.is-open{opacity:1}.lbp-settings{background:#2c3440;border:1px solid #445566;border-radius:4px;box-shadow:0 18px 50px #000000b8;color:var(--lbp-text);display:flex;flex-direction:column;font:14px/1.45 Graphik Web,Arial,Helvetica,sans-serif;max-height:min(88vh,720px);opacity:0;overflow:hidden;transform:translateY(12px) scale(.985);transition:opacity .2s ease,transform .2s ease;width:min(720px,100%)}.lbp-settings-backdrop.is-open .lbp-settings{opacity:1;transform:none}.lbp-settings__header{background:#14181c;border-bottom:1px solid #456;padding:21px 24px 18px;position:relative}.lbp-settings__eyebrow,.lbp-settings__kicker{color:#9ab;display:block;font-size:10px;font-weight:800;letter-spacing:.14em;margin:0 0 5px;text-transform:uppercase}.lbp-settings h2,.lbp-settings h3,.lbp-settings p{margin-top:0}.lbp-settings h2{color:#fff;font-size:22px;letter-spacing:-.02em;line-height:1.1;margin-bottom:0}.lbp-settings h3{color:#fff;font-size:18px;letter-spacing:-.015em;margin-bottom:18px}.lbp-settings__close{align-items:center;appearance:none;background:transparent;border:0;border-radius:3px;color:var(--lbp-muted);cursor:pointer;display:flex;font-size:20px;height:32px;justify-content:center;line-height:1;position:absolute;right:19px;top:19px;width:32px}.lbp-settings__close:hover,.lbp-settings__close:focus-visible{color:#fff;outline:2px solid rgba(64,188,244,.55)}.lbp-settings__layout{display:flex;flex:1 1 auto;flex-direction:column;min-height:0}.lbp-settings__tabs{background:#242b33;border-bottom:1px solid #456;display:flex;flex:0 0 auto;flex-direction:row;gap:0;overflow-x:auto;padding:0 16px}.lbp-settings__tabs button{align-items:center;appearance:none;background:transparent;border:0;border-radius:0;color:var(--lbp-muted);cursor:pointer;display:inline-flex;font:inherit;font-size:12px;font-weight:700;justify-content:center;padding:13px 14px 11px;text-align:center;text-transform:uppercase}.lbp-settings__tabs button:hover{background:#ffffff09;color:#fff}.lbp-settings__tabs button.is-active{background:transparent;box-shadow:inset 0 -3px var(--lbp-green);color:#fff}.lbp-settings__tabs button:focus-visible{outline:2px solid rgba(64,188,244,.55);outline-offset:-2px}.lbp-settings__tab-badge{align-items:center;background:#3a4652;border-radius:999px;color:#b7c4cf;display:inline-flex;font-size:9px;font-variant-numeric:tabular-nums;justify-content:center;margin-left:5px;min-width:17px;padding:1px 5px}.lbp-settings__tabs button.is-active .lbp-settings__tab-badge{background:#00e05426;color:var(--lbp-green)}.lbp-settings__content{min-height:260px;overflow:auto;padding:25px 24px 28px}.lbp-settings__content [role=tabpanel][hidden]{display:none}.lbp-settings__intro{color:var(--lbp-muted);font-size:12px;line-height:1.5;margin:-8px 0 16px;max-width:540px}.lbp-settings__card,.lbp-field,.lbp-settings__about{background:#242b33;border:1px solid #3d4854;border-radius:3px}.lbp-setting-row{align-items:center;display:flex;gap:20px;justify-content:space-between;padding:15px 16px}.lbp-setting-row+.lbp-setting-row{border-top:1px solid #3d4854}.lbp-setting-row__copy,.lbp-field{display:flex;flex-direction:column}.lbp-setting-row strong,.lbp-field>span:first-child{color:#f3f6f8;font-size:13px}.lbp-setting-row small,.lbp-field small{color:var(--lbp-muted);font-size:11px;margin-top:3px}.lbp-switch{appearance:none;background:#3a434c;border:0;border-radius:999px;cursor:pointer;flex:0 0 auto;height:24px;padding:3px;transition:background-color .18s ease;width:42px}.lbp-switch span{background:#d8e1e8;border-radius:50%;box-shadow:0 2px 5px #00000059;display:block;height:18px;transition:transform .2s ease;width:18px}.lbp-switch.is-on{background:var(--lbp-green)}.lbp-switch.is-on span{transform:translate(18px)}.lbp-switch:focus-visible{outline:2px solid var(--lbp-blue);outline-offset:2px}.lbp-field{padding:16px}.lbp-field+.lbp-field{margin-top:12px}.lbp-field__input{align-items:center;color:var(--lbp-muted);display:flex;gap:8px;margin-top:14px}.lbp-field input,.lbp-field select{background:#0f1317;border:1px solid #456;border-radius:5px;color:#fff;font:inherit;padding:8px 10px}.lbp-field input{width:82px}.lbp-field select{margin-top:14px;width:100%}.lbp-field input:focus,.lbp-field select:focus{border-color:var(--lbp-blue);box-shadow:0 0 0 3px #40bcf41f;outline:none}.lbp-cache-meter{background:#1d2329;border:1px solid #3d4854;border-radius:3px;margin-bottom:12px;padding:16px}.lbp-cache-meter__head{align-items:baseline;display:flex;gap:16px;justify-content:space-between;margin-bottom:11px}.lbp-cache-meter__percent{color:#fff;font-size:22px;font-variant-numeric:tabular-nums;font-weight:700;letter-spacing:-.03em}.lbp-cache-meter__used{color:var(--lbp-muted);font-size:11px;font-variant-numeric:tabular-nums}.lbp-cache-meter__bar{background:#11161a;border:1px solid #3d4854;border-radius:999px;display:flex;height:10px;overflow:hidden}.lbp-cache-meter__segment{display:block;flex:0 0 auto;min-width:0}.lbp-cache-meter__segment.is-active{background:var(--lbp-green)}.lbp-cache-meter__segment.is-expired{background:var(--lbp-orange)}.lbp-cache-meter__legend{display:grid;gap:6px;grid-template-columns:repeat(2,minmax(0,1fr));margin-top:12px}.lbp-cache-meter__legend span{align-items:center;color:#b7c4cf;display:flex;font-size:11px;gap:7px;min-width:0}.lbp-cache-meter__legend i{border-radius:2px;display:inline-block;flex:0 0 auto;height:8px;width:8px}.lbp-cache-meter__legend i.is-active{background:var(--lbp-green)}.lbp-cache-meter__legend i.is-expired{background:var(--lbp-orange)}.lbp-cache-meter>p{border-top:1px solid #313b44;color:#789;font-size:10px;line-height:1.45;margin:13px 0 0;padding-top:11px}.lbp-cache-actions{align-items:center;display:flex;gap:12px;margin-top:12px}.lbp-cache-actions__clear{appearance:none;background:#37414c;border:1px solid #52606d;border-radius:3px;color:#fff;cursor:pointer;flex:0 0 auto;font:inherit;font-size:11px;font-weight:700;padding:8px 12px}.lbp-cache-actions__clear:hover,.lbp-cache-actions__clear:focus-visible{background:#45515d;border-color:#71808d;outline:none}.lbp-cache-actions>span{color:var(--lbp-muted);font-size:10px;line-height:1.4}.lbp-cache-status{color:var(--lbp-green);font-size:11px;min-height:1.4em;margin:8px 0 0!important}.lbp-about{display:grid;gap:12px}.lbp-about__card{background:#242b33;border:1px solid #3d4854;border-radius:3px;padding:18px}.lbp-about__brand{align-items:center;display:flex;gap:11px}.lbp-about__brand>strong{color:#fff;font-size:16px;letter-spacing:-.015em}.lbp-about__mark{display:flex;gap:5px}.lbp-about__mark i{border-radius:50%;display:block;height:13px;width:13px}.lbp-about__mark i:nth-child(1){background:var(--lbp-orange)}.lbp-about__mark i:nth-child(2){background:var(--lbp-green)}.lbp-about__mark i:nth-child(3){background:var(--lbp-blue)}.lbp-about__description{color:#c8d4dc;font-size:12px;line-height:1.55;margin:14px 0 0!important;max-width:520px}.lbp-about__chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:13px}.lbp-about__chips span{background:#333d47;border:1px solid #465360;border-radius:999px;color:#9ab;font-size:9px;font-variant-numeric:tabular-nums;font-weight:700;letter-spacing:.04em;padding:3px 8px;text-transform:uppercase}.lbp-about__repo{align-items:center;background:#1b2127;border:1px solid #3d4854;border-radius:3px;color:inherit;display:grid;gap:10px;grid-template-columns:auto minmax(0,1fr) auto;margin-top:14px;padding:11px 12px;text-decoration:none;transition:background-color .15s ease,border-color .15s ease}.lbp-about__repo:hover,.lbp-about__repo:focus-visible{background:#202830;border-color:#607080;outline:none}.lbp-about__repo-icon{align-items:center;background:#f4f6f8;border-radius:50%;color:#14181c;display:inline-flex;font-size:8px;font-weight:900;height:26px;justify-content:center;width:26px}.lbp-about__repo>span:nth-child(2){display:flex;flex-direction:column;min-width:0}.lbp-about__repo strong{color:var(--lbp-blue);font-size:12px}.lbp-about__repo small{color:#789;font-size:10px;margin-top:2px}.lbp-about__repo b{color:#789;font-size:14px}.lbp-about__label{color:#789;font-size:9px;font-weight:800;letter-spacing:.12em;margin:0 0 12px!important;text-transform:uppercase}.lbp-about__author{align-items:center;display:flex;gap:13px}.lbp-about__author>a{flex:0 0 auto;line-height:0}.lbp-about__author img{background:#333d47;border:2px solid #536170;border-radius:50%;display:block;height:56px;object-fit:cover;width:56px}.lbp-about__author>span{align-items:flex-start;display:flex;flex-direction:column;min-width:0}.lbp-about__author-name{color:#fff;font-size:14px;font-weight:700;text-decoration:none}.lbp-about__author-name:hover,.lbp-about__author-name:focus-visible{color:var(--lbp-blue);outline:none}.lbp-about__author small{color:#789;font-size:10px;margin-top:1px}.lbp-about__email{color:var(--lbp-blue);font-size:10px;margin-top:5px;text-decoration:none;word-break:break-all}.lbp-about__email:hover{text-decoration:underline}.lbp-settings__footer{align-items:center;background:#242b33;border-top:1px solid #456;display:flex;gap:8px;justify-content:flex-end;padding:14px 18px}.lbp-settings__footer button{appearance:none;background:var(--lbp-panel-2);border:1px solid var(--lbp-line);border-radius:3px;color:#c8d4dc;cursor:pointer;font:inherit;font-size:12px;font-weight:700;padding:9px 14px}.lbp-settings__footer button:hover,.lbp-settings__footer button:focus-visible{border-color:#789;color:#fff;outline:none}.lbp-settings__footer button.is-primary{background:var(--lbp-green);border-color:transparent;color:#07160c}@media(max-width:620px){.lbp-settings__tabs{padding:8px 10px}.lbp-settings__tabs button{flex:0 0 auto}.lbp-settings__tabs button.is-active{box-shadow:inset 0 -2px var(--lbp-blue)}.lbp-settings__content{padding:22px 18px 26px}.lbp-cache-meter__legend{grid-template-columns:1fr}.lbp-cache-actions{align-items:flex-start;flex-direction:column}}@media(prefers-reduced-motion:reduce){.lbp-settings-backdrop,.lbp-settings,.lbp-switch span,.lbp-rating__skeleton,.lbp-cast-card,.lbp-cast-card__portrait:after,.lbp-cast-card__portrait img{animation:none!important;transition:none!important}} ');
(function () {
'use strict';
var e=(()=>"undefined"!=typeof GM_deleteValue?GM_deleteValue:void 0)(),t=(()=>"undefined"!=typeof GM_getValue?GM_getValue:void 0)(),a=(()=>"undefined"!=typeof GM_listValues?GM_listValues:void 0)(),n=(()=>"undefined"!=typeof GM_registerMenuCommand?GM_registerMenuCommand:void 0)(),r=(()=>"undefined"!=typeof GM_setValue?GM_setValue:void 0)(),o=(()=>"undefined"!=typeof GM_xmlhttpRequest?GM_xmlhttpRequest:void 0)();const i="0.6.2",c="data-lbp-root",s="lbp_settings",l="lbp_rt_v1:",u="https://www.rottentomatoes.com",d="https://www.metacritic.com",m="https://backend.metacritic.com",p=12e3,b=5242880,g="NemoKing",h="https://github.com/NemoKing1210",v="nemoking1210@gmail.com",f=Object.freeze({uiLocale:"auto",showRottenTomatoes:true,showAudienceScore:true,showMetacritic:true,showMetacriticUserScore:true,enhanceCast:true,cacheHours:24}),y=Object.freeze(["en","ru","es","pt-BR","de","fr","zh-CN"]),w=Object.freeze({en:"English",ru:"Русский",es:"Español","pt-BR":"Português (Brasil)",de:"Deutsch",fr:"Français","zh-CN":"简体中文"}),S=Object.freeze({en:"🇬🇧",ru:"🇷🇺",es:"🇪🇸","pt-BR":"🇧🇷",de:"🇩🇪",fr:"🇫🇷","zh-CN":"🇨🇳"}),C={en:{menuSettings:"Letterboxd Plus settings",openSettingsTitle:"Open Letterboxd Plus settings",settingsTitle:"Settings",closeSettings:"Close settings",settingsSections:"Settings sections",tabGeneral:"General",tabFilm:"Film page",tabCache:"Cache",tabAbout:"About",generalTitle:"Keep external data quick",uiLanguage:"Interface language",uiLanguageHint:"Auto follows your browser language. English is used as fallback.",uiLanguageAuto:"Auto (browser language)",cacheDuration:"Cache duration",cacheHint:"Use 0 to fetch a fresh rating on every page load.",hours:"hours",cacheTitle:"Manage stored external ratings",cacheDescription:"Cached ratings make repeat visits instant and reduce requests to external providers.",cacheFilled:"{percent}% filled",cacheUsed:"{used} of {limit}",cacheActive:"{count} active ratings",cacheExpired:"{count} expired entries",cacheActiveLabel:"Active",cacheExpiredLabel:"Expired",cacheSoftLimitHint:"The meter uses a conservative advisory budget. Your userscript manager may allow more storage.",clearCache:"Clear cache",cacheClearHint:"Removes saved ratings only. Your settings will be kept.",cacheCleared:"{count} cache entries removed.",cacheAlreadyEmpty:"The rating cache is already empty.",filmTitle:"Choose what appears in the sidebar",rottenTomatoes:"Rotten Tomatoes",rottenTomatoesHint:"Show the Tomatometer beside Letterboxd ratings.",popcornmeter:"Popcornmeter",popcornmeterHint:"Include the audience score beneath the critic score.",metacritic:"Metacritic",metacriticHint:"Show Metascore beside Letterboxd ratings.",metascore:"Metascore",metacriticUserScore:"User Score",metacriticUserScoreHint:"Include the Metacritic user score beneath Metascore.",enhancedCast:"Enhanced cast",enhancedCastHint:"Show actor portraits, names, and roles in the Cast section.",showAllCast:"Show all cast",aboutTitle:"A compact companion for Letterboxd",aboutDescription:"Letterboxd Plus adds useful film context without changing the way Letterboxd feels.",viewSource:"View source on GitHub ↗",aboutLicense:"MIT License",aboutRepository:"GitHub repository",aboutRepositoryHint:"Source code, releases, and issue tracker",aboutAuthor:"Author",cancel:"Cancel",saveReload:"Save and reload",certifiedFresh:"Certified Fresh",tomatometer:"Tomatometer",criticReviews:"{count} reviews",audienceRatings:"{count} ratings",userRatings:"{count} user ratings",averageRating:"Average rating",averageRatingScore:"Combined score",averageRatingCount:"{count} ratings included",noCount:"No count available",notRated:"Not rated yet",ratingNotFound:"Rating not found on Rotten Tomatoes.",ratingUnavailable:"Rotten Tomatoes is temporarily unavailable. Reload to try again.",metacriticRatingNotFound:"Rating not found on Metacritic.",metacriticRatingUnavailable:"Metacritic is temporarily unavailable. Reload to try again."},ru:{menuSettings:"Настройки Letterboxd Plus",openSettingsTitle:"Открыть настройки Letterboxd Plus",settingsTitle:"Настройки",closeSettings:"Закрыть настройки",settingsSections:"Разделы настроек",tabGeneral:"Общие",tabFilm:"Страница фильма",tabCache:"Кэш",tabAbout:"О проекте",generalTitle:"Быстрый доступ к внешним данным",uiLanguage:"Язык интерфейса",uiLanguageHint:"Автоматически используется язык браузера. Если он не поддерживается — английский.",uiLanguageAuto:"Авто (язык браузера)",cacheDuration:"Срок хранения кэша",cacheHint:"Укажите 0, чтобы загружать свежий рейтинг при каждом открытии страницы.",hours:"часов",cacheTitle:"Управление сохранёнными рейтингами",cacheDescription:"Кэш ускоряет повторное открытие страниц и сокращает запросы к внешним источникам.",cacheFilled:"Заполнено на {percent}%",cacheUsed:"{used} из {limit}",cacheActive:"Актуальных рейтингов: {count}",cacheExpired:"Устаревших записей: {count}",cacheActiveLabel:"Актуальные",cacheExpiredLabel:"Устаревшие",cacheSoftLimitHint:"Шкала использует рекомендуемый безопасный лимит. Менеджер userscript может разрешать больше места.",clearCache:"Очистить кэш",cacheClearHint:"Удаляет только сохранённые рейтинги. Настройки останутся без изменений.",cacheCleared:"Удалено записей кэша: {count}.",cacheAlreadyEmpty:"Кэш рейтингов уже пуст.",filmTitle:"Выберите данные для боковой панели",rottenTomatoes:"Rotten Tomatoes",rottenTomatoesHint:"Показывать Tomatometer рядом с рейтингами Letterboxd.",popcornmeter:"Popcornmeter",popcornmeterHint:"Показывать зрительский рейтинг под оценкой критиков.",metacritic:"Metacritic",metacriticHint:"Показывать Metascore рядом с рейтингами Letterboxd.",metascore:"Metascore",metacriticUserScore:"User Score",metacriticUserScoreHint:"Показывать пользовательскую оценку под Metascore.",enhancedCast:"Расширенный Cast",enhancedCastHint:"Показывать портреты, имена и роли актёров в разделе Cast.",showAllCast:"Показать всех актёров",aboutTitle:"Компактное дополнение для Letterboxd",aboutDescription:"Letterboxd Plus добавляет полезные сведения о фильмах, сохраняя привычный интерфейс Letterboxd.",viewSource:"Исходный код на GitHub ↗",aboutLicense:"Лицензия MIT",aboutRepository:"Репозиторий GitHub",aboutRepositoryHint:"Исходный код, релизы и сообщения об ошибках",aboutAuthor:"Автор",cancel:"Отмена",saveReload:"Сохранить и перезагрузить",certifiedFresh:"Сертифицировано Fresh",tomatometer:"Tomatometer",criticReviews:"{count} рецензий",audienceRatings:"{count} оценок",userRatings:"{count} пользовательских оценок",averageRating:"Средний рейтинг",averageRatingScore:"Итоговая оценка",averageRatingCount:"Учтено оценок: {count}",noCount:"Количество недоступно",notRated:"Оценки пока нет",ratingNotFound:"Рейтинг на Rotten Tomatoes не найден.",ratingUnavailable:"Rotten Tomatoes временно недоступен. Перезагрузите страницу, чтобы повторить попытку.",metacriticRatingNotFound:"Рейтинг на Metacritic не найден.",metacriticRatingUnavailable:"Metacritic временно недоступен. Перезагрузите страницу, чтобы повторить попытку."},es:{menuSettings:"Ajustes de Letterboxd Plus",openSettingsTitle:"Abrir los ajustes de Letterboxd Plus",settingsTitle:"Ajustes",closeSettings:"Cerrar ajustes",settingsSections:"Secciones de ajustes",tabGeneral:"General",tabFilm:"Página de película",tabCache:"Caché",tabAbout:"Acerca de",generalTitle:"Mantén rápidos los datos externos",uiLanguage:"Idioma de la interfaz",uiLanguageHint:"Auto usa el idioma del navegador. El inglés se utiliza como alternativa.",uiLanguageAuto:"Auto (idioma del navegador)",cacheDuration:"Duración de la caché",cacheHint:"Usa 0 para obtener una valoración nueva en cada carga.",hours:"horas",cacheTitle:"Gestiona las valoraciones guardadas",cacheDescription:"La caché acelera las visitas repetidas y reduce las solicitudes a proveedores externos.",cacheFilled:"{percent}% ocupado",cacheUsed:"{used} de {limit}",cacheActive:"{count} valoraciones activas",cacheExpired:"{count} entradas caducadas",cacheActiveLabel:"Activas",cacheExpiredLabel:"Caducadas",cacheSoftLimitHint:"El medidor usa un límite recomendado conservador. Tu gestor puede permitir más espacio.",clearCache:"Vaciar caché",cacheClearHint:"Solo elimina valoraciones guardadas. Mantiene tus ajustes.",cacheCleared:"Se eliminaron {count} entradas de caché.",cacheAlreadyEmpty:"La caché de valoraciones ya está vacía.",filmTitle:"Elige qué aparece en la barra lateral",rottenTomatoes:"Rotten Tomatoes",rottenTomatoesHint:"Muestra Tomatometer junto a las valoraciones de Letterboxd.",popcornmeter:"Popcornmeter",popcornmeterHint:"Incluye la valoración del público bajo la de la crítica.",metacritic:"Metacritic",metacriticHint:"Muestra Metascore junto a las valoraciones de Letterboxd.",metascore:"Metascore",metacriticUserScore:"Puntuación de usuarios",metacriticUserScoreHint:"Incluye la puntuación de usuarios bajo Metascore.",enhancedCast:"Reparto ampliado",enhancedCastHint:"Muestra retratos, nombres y papeles en la sección de reparto.",showAllCast:"Mostrar todo el reparto",aboutTitle:"Un complemento compacto para Letterboxd",aboutDescription:"Letterboxd Plus añade contexto útil sin cambiar la esencia de Letterboxd.",viewSource:"Ver código en GitHub ↗",aboutLicense:"Licencia MIT",aboutRepository:"Repositorio de GitHub",aboutRepositoryHint:"Código fuente, versiones e incidencias",aboutAuthor:"Autor",cancel:"Cancelar",saveReload:"Guardar y recargar",certifiedFresh:"Certified Fresh",tomatometer:"Tomatometer",criticReviews:"{count} reseñas",audienceRatings:"{count} valoraciones",userRatings:"{count} valoraciones de usuarios",averageRating:"Valoración media",averageRatingScore:"Puntuación combinada",averageRatingCount:"{count} valoraciones incluidas",noCount:"Cantidad no disponible",notRated:"Aún sin valoración",ratingNotFound:"No se encontró la valoración en Rotten Tomatoes.",ratingUnavailable:"Rotten Tomatoes no está disponible temporalmente. Recarga para intentarlo de nuevo.",metacriticRatingNotFound:"No se encontró la valoración en Metacritic.",metacriticRatingUnavailable:"Metacritic no está disponible temporalmente. Recarga para intentarlo de nuevo."},"pt-BR":{menuSettings:"Configurações do Letterboxd Plus",openSettingsTitle:"Abrir configurações do Letterboxd Plus",settingsTitle:"Configurações",closeSettings:"Fechar configurações",settingsSections:"Seções de configurações",tabGeneral:"Geral",tabFilm:"Página do filme",tabCache:"Cache",tabAbout:"Sobre",generalTitle:"Mantenha os dados externos rápidos",uiLanguage:"Idioma da interface",uiLanguageHint:"Automático segue o idioma do navegador. Inglês é usado como alternativa.",uiLanguageAuto:"Automático (idioma do navegador)",cacheDuration:"Duração do cache",cacheHint:"Use 0 para buscar uma avaliação nova a cada carregamento.",hours:"horas",cacheTitle:"Gerencie as avaliações salvas",cacheDescription:"O cache acelera visitas repetidas e reduz solicitações a provedores externos.",cacheFilled:"{percent}% ocupado",cacheUsed:"{used} de {limit}",cacheActive:"{count} avaliações ativas",cacheExpired:"{count} entradas expiradas",cacheActiveLabel:"Ativas",cacheExpiredLabel:"Expiradas",cacheSoftLimitHint:"O medidor usa um limite recomendado conservador. Seu gerenciador pode permitir mais espaço.",clearCache:"Limpar cache",cacheClearHint:"Remove apenas avaliações salvas. Suas configurações serão mantidas.",cacheCleared:"{count} entradas de cache removidas.",cacheAlreadyEmpty:"O cache de avaliações já está vazio.",filmTitle:"Escolha o que aparece na barra lateral",rottenTomatoes:"Rotten Tomatoes",rottenTomatoesHint:"Mostra o Tomatometer ao lado das avaliações do Letterboxd.",popcornmeter:"Popcornmeter",popcornmeterHint:"Inclui a nota do público abaixo da nota da crítica.",metacritic:"Metacritic",metacriticHint:"Mostra o Metascore ao lado das avaliações do Letterboxd.",metascore:"Metascore",metacriticUserScore:"Nota dos usuários",metacriticUserScoreHint:"Inclui a nota dos usuários abaixo do Metascore.",enhancedCast:"Elenco ampliado",enhancedCastHint:"Mostra retratos, nomes e papéis na seção de elenco.",showAllCast:"Mostrar todo o elenco",aboutTitle:"Um complemento compacto para o Letterboxd",aboutDescription:"Letterboxd Plus adiciona contexto útil sem mudar a experiência do Letterboxd.",viewSource:"Ver código no GitHub ↗",aboutLicense:"Licença MIT",aboutRepository:"Repositório no GitHub",aboutRepositoryHint:"Código-fonte, versões e relatos de problemas",aboutAuthor:"Autor",cancel:"Cancelar",saveReload:"Salvar e recarregar",certifiedFresh:"Certified Fresh",tomatometer:"Tomatometer",criticReviews:"{count} críticas",audienceRatings:"{count} avaliações",userRatings:"{count} avaliações de usuários",averageRating:"Avaliação média",averageRatingScore:"Nota combinada",averageRatingCount:"{count} avaliações incluídas",noCount:"Contagem indisponível",notRated:"Ainda sem avaliação",ratingNotFound:"Avaliação não encontrada no Rotten Tomatoes.",ratingUnavailable:"Rotten Tomatoes está temporariamente indisponível. Recarregue para tentar novamente.",metacriticRatingNotFound:"Avaliação não encontrada no Metacritic.",metacriticRatingUnavailable:"Metacritic está temporariamente indisponível. Recarregue para tentar novamente."},de:{menuSettings:"Letterboxd-Plus-Einstellungen",openSettingsTitle:"Letterboxd-Plus-Einstellungen öffnen",settingsTitle:"Einstellungen",closeSettings:"Einstellungen schließen",settingsSections:"Einstellungsbereiche",tabGeneral:"Allgemein",tabFilm:"Filmseite",tabCache:"Cache",tabAbout:"Über",generalTitle:"Externe Daten schnell verfügbar halten",uiLanguage:"Oberflächensprache",uiLanguageHint:"Automatisch übernimmt die Browsersprache. Englisch dient als Fallback.",uiLanguageAuto:"Automatisch (Browsersprache)",cacheDuration:"Cache-Dauer",cacheHint:"Mit 0 wird die Bewertung bei jedem Laden neu abgerufen.",hours:"Stunden",cacheTitle:"Gespeicherte Bewertungen verwalten",cacheDescription:"Der Cache beschleunigt wiederholte Besuche und reduziert Anfragen an externe Anbieter.",cacheFilled:"{percent}% belegt",cacheUsed:"{used} von {limit}",cacheActive:"{count} aktive Bewertungen",cacheExpired:"{count} abgelaufene Einträge",cacheActiveLabel:"Aktiv",cacheExpiredLabel:"Abgelaufen",cacheSoftLimitHint:"Die Anzeige nutzt ein konservatives Richtbudget. Der Userscript-Manager kann mehr Speicher erlauben.",clearCache:"Cache leeren",cacheClearHint:"Entfernt nur gespeicherte Bewertungen. Einstellungen bleiben erhalten.",cacheCleared:"{count} Cache-Einträge entfernt.",cacheAlreadyEmpty:"Der Bewertungscache ist bereits leer.",filmTitle:"Inhalte der Seitenleiste auswählen",rottenTomatoes:"Rotten Tomatoes",rottenTomatoesHint:"Tomatometer neben den Letterboxd-Bewertungen anzeigen.",popcornmeter:"Popcornmeter",popcornmeterHint:"Publikumswertung unter der Kritikerwertung anzeigen.",metacritic:"Metacritic",metacriticHint:"Metascore neben den Letterboxd-Bewertungen anzeigen.",metascore:"Metascore",metacriticUserScore:"Nutzerwertung",metacriticUserScoreHint:"Nutzerwertung unter dem Metascore anzeigen.",enhancedCast:"Erweiterte Besetzung",enhancedCastHint:"Zeigt Porträts, Namen und Rollen im Besetzungsbereich.",showAllCast:"Gesamte Besetzung anzeigen",aboutTitle:"Eine kompakte Ergänzung für Letterboxd",aboutDescription:"Letterboxd Plus ergänzt nützliche Filminformationen, ohne Letterboxd zu verfremden.",viewSource:"Quellcode auf GitHub ↗",aboutLicense:"MIT-Lizenz",aboutRepository:"GitHub-Repository",aboutRepositoryHint:"Quellcode, Releases und Fehlermeldungen",aboutAuthor:"Autor",cancel:"Abbrechen",saveReload:"Speichern und neu laden",certifiedFresh:"Certified Fresh",tomatometer:"Tomatometer",criticReviews:"{count} Kritiken",audienceRatings:"{count} Bewertungen",userRatings:"{count} Nutzerbewertungen",averageRating:"Durchschnittsbewertung",averageRatingScore:"Gesamtwertung",averageRatingCount:"{count} Wertungen berücksichtigt",noCount:"Anzahl nicht verfügbar",notRated:"Noch nicht bewertet",ratingNotFound:"Keine Bewertung auf Rotten Tomatoes gefunden.",ratingUnavailable:"Rotten Tomatoes ist vorübergehend nicht verfügbar. Bitte neu laden.",metacriticRatingNotFound:"Keine Bewertung auf Metacritic gefunden.",metacriticRatingUnavailable:"Metacritic ist vorübergehend nicht verfügbar. Bitte neu laden."},fr:{menuSettings:"Paramètres de Letterboxd Plus",openSettingsTitle:"Ouvrir les paramètres de Letterboxd Plus",settingsTitle:"Paramètres",closeSettings:"Fermer les paramètres",settingsSections:"Sections des paramètres",tabGeneral:"Général",tabFilm:"Page du film",tabCache:"Cache",tabAbout:"À propos",generalTitle:"Gardez les données externes rapides",uiLanguage:"Langue de l'interface",uiLanguageHint:"Auto suit la langue du navigateur. L'anglais est utilisé par défaut.",uiLanguageAuto:"Auto (langue du navigateur)",cacheDuration:"Durée du cache",cacheHint:"Utilisez 0 pour récupérer une note à chaque chargement.",hours:"heures",cacheTitle:"Gérer les notes enregistrées",cacheDescription:"Le cache accélère les visites répétées et réduit les requêtes vers les sources externes.",cacheFilled:"{percent}% utilisé",cacheUsed:"{used} sur {limit}",cacheActive:"{count} notes actives",cacheExpired:"{count} entrées expirées",cacheActiveLabel:"Actives",cacheExpiredLabel:"Expirées",cacheSoftLimitHint:"La jauge utilise un budget indicatif prudent. Votre gestionnaire peut autoriser plus de stockage.",clearCache:"Vider le cache",cacheClearHint:"Supprime uniquement les notes enregistrées. Vos paramètres sont conservés.",cacheCleared:"{count} entrées de cache supprimées.",cacheAlreadyEmpty:"Le cache des notes est déjà vide.",filmTitle:"Choisissez le contenu de la barre latérale",rottenTomatoes:"Rotten Tomatoes",rottenTomatoesHint:"Afficher le Tomatometer avec les notes Letterboxd.",popcornmeter:"Popcornmeter",popcornmeterHint:"Inclure la note du public sous celle des critiques.",metacritic:"Metacritic",metacriticHint:"Afficher le Metascore avec les notes Letterboxd.",metascore:"Metascore",metacriticUserScore:"Note des utilisateurs",metacriticUserScoreHint:"Inclure la note des utilisateurs sous le Metascore.",enhancedCast:"Distribution enrichie",enhancedCastHint:"Affiche portraits, noms et rôles dans la distribution.",showAllCast:"Afficher toute la distribution",aboutTitle:"Un compagnon compact pour Letterboxd",aboutDescription:"Letterboxd Plus ajoute un contexte utile sans changer l'expérience Letterboxd.",viewSource:"Voir le code sur GitHub ↗",aboutLicense:"Licence MIT",aboutRepository:"Dépôt GitHub",aboutRepositoryHint:"Code source, versions et suivi des problèmes",aboutAuthor:"Auteur",cancel:"Annuler",saveReload:"Enregistrer et recharger",certifiedFresh:"Certified Fresh",tomatometer:"Tomatometer",criticReviews:"{count} critiques",audienceRatings:"{count} notes",userRatings:"{count} notes utilisateurs",averageRating:"Note moyenne",averageRatingScore:"Note combinée",averageRatingCount:"{count} notes prises en compte",noCount:"Nombre indisponible",notRated:"Pas encore noté",ratingNotFound:"Note introuvable sur Rotten Tomatoes.",ratingUnavailable:"Rotten Tomatoes est temporairement indisponible. Rechargez pour réessayer.",metacriticRatingNotFound:"Note introuvable sur Metacritic.",metacriticRatingUnavailable:"Metacritic est temporairement indisponible. Rechargez pour réessayer."},"zh-CN":{menuSettings:"Letterboxd Plus 设置",openSettingsTitle:"打开 Letterboxd Plus 设置",settingsTitle:"设置",closeSettings:"关闭设置",settingsSections:"设置分区",tabGeneral:"常规",tabFilm:"影片页面",tabCache:"缓存",tabAbout:"关于",generalTitle:"让外部数据保持快速",uiLanguage:"界面语言",uiLanguageHint:"自动模式跟随浏览器语言;不支持时回退到英语。",uiLanguageAuto:"自动(浏览器语言)",cacheDuration:"缓存时长",cacheHint:"设为 0 可在每次加载页面时获取最新评分。",hours:"小时",cacheTitle:"管理已保存的外部评分",cacheDescription:"缓存可加快重复访问,并减少对外部评分来源的请求。",cacheFilled:"已使用 {percent}%",cacheUsed:"{used} / {limit}",cacheActive:"{count} 条有效评分",cacheExpired:"{count} 条过期记录",cacheActiveLabel:"有效",cacheExpiredLabel:"过期",cacheSoftLimitHint:"该仪表使用保守的建议容量;userscript 管理器可能允许更多空间。",clearCache:"清除缓存",cacheClearHint:"仅删除已保存的评分,不会更改设置。",cacheCleared:"已删除 {count} 条缓存记录。",cacheAlreadyEmpty:"评分缓存已经为空。",filmTitle:"选择侧边栏中显示的内容",rottenTomatoes:"Rotten Tomatoes",rottenTomatoesHint:"在 Letterboxd 评分旁显示 Tomatometer。",popcornmeter:"Popcornmeter",popcornmeterHint:"在影评人评分下显示观众评分。",metacritic:"Metacritic",metacriticHint:"在 Letterboxd 评分旁显示 Metascore。",metascore:"Metascore",metacriticUserScore:"用户评分",metacriticUserScoreHint:"在 Metascore 下显示 Metacritic 用户评分。",enhancedCast:"增强演职员表",enhancedCastHint:"在演员表中显示演员头像、姓名和角色。",showAllCast:"显示全部演员",aboutTitle:"紧凑的 Letterboxd 助手",aboutDescription:"Letterboxd Plus 在不改变网站体验的前提下补充实用影片信息。",viewSource:"在 GitHub 查看源代码 ↗",aboutLicense:"MIT 许可证",aboutRepository:"GitHub 仓库",aboutRepositoryHint:"源代码、版本发布和问题跟踪",aboutAuthor:"作者",cancel:"取消",saveReload:"保存并重新加载",certifiedFresh:"新鲜认证",tomatometer:"Tomatometer",criticReviews:"{count} 条影评",audienceRatings:"{count} 条评分",userRatings:"{count} 条用户评分",averageRating:"平均评分",averageRatingScore:"综合评分",averageRatingCount:"已计入 {count} 项评分",noCount:"暂无数量",notRated:"暂无评分",ratingNotFound:"未在 Rotten Tomatoes 找到评分。",ratingUnavailable:"Rotten Tomatoes 暂时不可用,请重新加载后重试。",metacriticRatingNotFound:"未在 Metacritic 找到评分。",metacriticRatingUnavailable:"Metacritic 暂时不可用,请重新加载后重试。"}},L=Object.freeze({en:"en",ru:"ru",es:"es",pt:"pt-BR","pt-br":"pt-BR",de:"de",fr:"fr",zh:"zh-CN","zh-cn":"zh-CN","zh-hans":"zh-CN"});let x="en";function R(e){const t=String(e||"").trim().toLowerCase();return L[t]||L[t.split("-")[0]]||null}function A(e="auto"){return x="auto"===e?function(){var e;const t=(null==(e=navigator.languages)?void 0:e.length)?navigator.languages:[navigator.language];for(const a of t){const e=R(a);if(e)return e}return "en"}():R(e)||"en",x}function _(e){return new Intl.NumberFormat(x).format(e)}function T(e,t={}){var a,n,r;const o=null!=(r=null!=(n=null==(a=C[x])?void 0:a[e])?n:C.en[e])?r:e;return Object.entries(t).reduce((e,[t,a])=>e.split(`{${t}}`).join(String(a)),o)}const M="lbp:ratings-changed";function E(e){return `\n \n `}function H({id:e,title:t,faviconUrl:a="",skeletonModifiers:n,variant:r="source"}){var o;const i=document.createElement("section");return i.id=e,i.className=`lbp-rating lbp-rating--${r} section`,i.setAttribute("aria-live","polite"),i.setAttribute("aria-busy","true"),i.innerHTML=`\n `:""}\n
${t}
\n
${T("cacheSoftLimitHint")}
\n${T("tabGeneral")}
\n${T("tabFilm")}
\n${T("tabCache")}
\n${T("cacheDescription")}
\n ${Ne(n)}\n \n${T("tabAbout")}
\n${T("aboutDescription")}
\n${T("aboutAuthor")}
\n \n