@startside/swa 0.0.0-stage → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +81 -0
- package/README.md +94 -2
- package/bin/swa.mjs +33 -0
- package/package.json +30 -4
- package/swa/1.0/agents.md +638 -0
- package/swa/1.0/quickstart.md +145 -0
- package/swa/1.0/runtime.js +4 -0
- package/swa/1.0/spec.md +2125 -0
- package/swa/1.0/swa.d.ts +361 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# SWA in 60 lines
|
|
2
|
+
|
|
3
|
+
**A quickstart for the Startside Widget API (SWA) 1.0.** The full specification, [swa-spec.md](https://startside.app/swa/1.0/spec.md), is the
|
|
4
|
+
reference; this page is what you need to write a widget that conforms to it: one complete widget, the rules as a
|
|
5
|
+
table, and a checklist.
|
|
6
|
+
|
|
7
|
+
## What a widget is
|
|
8
|
+
|
|
9
|
+
One HTML file, named `<name>.swa.html`: its metadata in the head, its settings as a hidden form, its markup in the
|
|
10
|
+
body, its code in a script, all talking to one global `widget`. A Startside page runs it in a sandboxed frame; opened
|
|
11
|
+
in a browser, it runs on its own page, with a menu, light and dark, and a width you can drag. Nothing to build or
|
|
12
|
+
install.
|
|
13
|
+
|
|
14
|
+
## A complete widget
|
|
15
|
+
|
|
16
|
+
The latest headlines of a feed, chosen in its settings:
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<!doctype html>
|
|
20
|
+
<html lang="en">
|
|
21
|
+
<head>
|
|
22
|
+
<script src="https://startside.app/swa/1.0/runtime.js"></script>
|
|
23
|
+
<title>Headlines</title>
|
|
24
|
+
<meta name="description" content="The latest headlines of a feed." />
|
|
25
|
+
<meta name="apiVersion" content="1.0" />
|
|
26
|
+
<meta name="category" content="News" />
|
|
27
|
+
<style>
|
|
28
|
+
.news ul { list-style: none; margin: 0; padding: 0; }
|
|
29
|
+
.news li { padding: 3px 0; border-bottom: 1px solid light-dark(#e5e7eb, #333a42); }
|
|
30
|
+
.news a { color: var(--link, #1e5bb8); }
|
|
31
|
+
.news .uwa-read a { color: var(--muted, #6b7280); }
|
|
32
|
+
.news [hidden] { display: none; }
|
|
33
|
+
</style>
|
|
34
|
+
</head>
|
|
35
|
+
<body>
|
|
36
|
+
<form id="preferences" hidden>
|
|
37
|
+
<label>Feed <input type="url" name="feed" value="https://daringfireball.net/feeds/main" /></label>
|
|
38
|
+
<label>Items <input type="range" name="count" min="1" max="20" value="5" /></label>
|
|
39
|
+
</form>
|
|
40
|
+
<div class="news">
|
|
41
|
+
<p class="state waiting">Loading…</p>
|
|
42
|
+
<p class="state failed" role="alert" hidden>Could not read the feed.</p>
|
|
43
|
+
<ul hidden></ul>
|
|
44
|
+
<template><li><a class="ext-link"></a></li></template>
|
|
45
|
+
</div>
|
|
46
|
+
<script>
|
|
47
|
+
const News = {
|
|
48
|
+
show(state) {
|
|
49
|
+
for (const el of widget.body.querySelectorAll('.state')) el.hidden = !el.classList.contains(state);
|
|
50
|
+
},
|
|
51
|
+
draw(feed) {
|
|
52
|
+
const list = widget.body.querySelector('ul');
|
|
53
|
+
const row = widget.body.querySelector('template').content.firstElementChild;
|
|
54
|
+
const items = feed.items.slice(0, widget.settings.get('count'));
|
|
55
|
+
list.replaceChildren(...items.map((item) => {
|
|
56
|
+
const li = row.cloneNode(true);
|
|
57
|
+
const a = li.querySelector('a');
|
|
58
|
+
a.href = item.url;
|
|
59
|
+
a.textContent = item.title || item.url; // text, never markup
|
|
60
|
+
return li;
|
|
61
|
+
}));
|
|
62
|
+
list.hidden = false;
|
|
63
|
+
News.show('none');
|
|
64
|
+
},
|
|
65
|
+
load(event, fresh) {
|
|
66
|
+
const url = String(widget.settings.get('feed'));
|
|
67
|
+
return widget.fetchFeed(url, { signal: event.signal, fresh }).then(News.draw, (error) => {
|
|
68
|
+
if (error.name !== 'AbortError' && !widget.body.querySelector('li')) News.show('failed');
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
widget.addEventListener('load', (event) => {
|
|
73
|
+
const list = widget.body.querySelector('ul');
|
|
74
|
+
list.addEventListener('click', (e) => {
|
|
75
|
+
const a = e.target.closest('a');
|
|
76
|
+
if (a) (e.preventDefault(), widget.openURL(a.href));
|
|
77
|
+
});
|
|
78
|
+
widget.readItems(list, 'li');
|
|
79
|
+
event.waitUntil(News.load(event, false));
|
|
80
|
+
});
|
|
81
|
+
widget.addEventListener('refresh', (event) => event.waitUntil(News.load(event, true)));
|
|
82
|
+
</script>
|
|
83
|
+
</body>
|
|
84
|
+
</html>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
What it shows, in order:
|
|
88
|
+
|
|
89
|
+
1. **The runtime** in the head, by its full address, so the file also runs opened from disk.
|
|
90
|
+
2. **Metadata**: a title and a description; `category` places it in a catalogue.
|
|
91
|
+
3. **Settings as a hidden form**: a control per setting, its `name` the setting's, its `value` the default, its
|
|
92
|
+
label the setting's label. `widget.settings.get()` gives each typed: a range a number, a checkbox a boolean.
|
|
93
|
+
4. **Markup in the file**: every state (loading, failed, the list) is there from the start, shown or hidden with
|
|
94
|
+
`hidden`; a `template` gives each row.
|
|
95
|
+
5. **Code in one object**, wired once in `load`: one listener on the list for every row, the read state from
|
|
96
|
+
`readItems`. `load` and `refresh` give `waitUntil` their promise, and pass on the `signal` that cancels a request
|
|
97
|
+
when the next load starts.
|
|
98
|
+
6. **Text set with `textContent`**, never fetched text as markup.
|
|
99
|
+
7. **Colors from the host's properties**, each with a fallback, and `light-dark()` for both modes.
|
|
100
|
+
|
|
101
|
+
## The rules
|
|
102
|
+
|
|
103
|
+
| | Rule | Section |
|
|
104
|
+
|---|---|---|
|
|
105
|
+
| MUST | Name the file `<name>.swa.html`, begin it with `<!doctype html>` | 4.1, 4.2 |
|
|
106
|
+
| MUST | Load the runtime once, in the head: `https://startside.app/swa/1.0/runtime.js` (where startside.app can't be loaded, the npm package on a CDN, `https://cdn.jsdelivr.net/npm/@startside/swa@1/swa/1.0/runtime.js`; or inlined: `<script data-runtime="swa/1.0">`) | 4.3 |
|
|
107
|
+
| MUST | Declare settings in `<form id="preferences" hidden>`, one named control each | 5 |
|
|
108
|
+
| MUST NOT | Use `localStorage`, `sessionStorage`, IndexedDB or cookies: `widget.storage` or a hidden setting | 4.8, 7.8 |
|
|
109
|
+
| MUST NOT | Use UWA's API (`onLoad`, `getValue`, `UWA.Data`): events, `widget.settings`, `widget.fetch`, `widget.fetchFeed` | 7, 8, 11 |
|
|
110
|
+
| MUST NOT | Style or script the page around the widget on its own page | 10.3 |
|
|
111
|
+
| MUST | Work framed: no inline mode, no access to the page | 10.1, 10.2 |
|
|
112
|
+
| MUST NOT | Use `alert()`, `confirm()` or `prompt()` (off in a frame): ask in the widget's own box | 10.1 |
|
|
113
|
+
| SHOULD | Write the markup in the file and update it in place; `setBody` only for content made whole at each draw | 4.9, 7.3.1 |
|
|
114
|
+
| SHOULD NOT | Put fetched or typed text into markup (`innerHTML`, a `setBody` string) | 7.3 |
|
|
115
|
+
| SHOULD | Keep a game in progress or the person's data in a hidden setting, read defensively, and under the host's limit if it grows (Startside: 20,000 characters a setting) | 7.5, 7.8 |
|
|
116
|
+
| SHOULD | Let the host set the width; the height is the content's; never `100vh` | 7.3.2 |
|
|
117
|
+
| SHOULD | Make a board, a grid or a list moved through with the arrow keys one Tab stop, the keys heard on the widget's own element; a list of plain links, as above, keeps its links in the Tab order | 7.3.1, 14 |
|
|
118
|
+
| SHOULD | Announce results and errors in a `role="status"` element present from the start, nothing as it first draws; keep the focus through updates | 14 |
|
|
119
|
+
| SHOULD | Write colors with `light-dark()`, other dark-mode changes under `:root[data-color-scheme="dark"]`, not `prefers-color-scheme` | 4.7 |
|
|
120
|
+
| SHOULD | Scope every rule under the widget's root class (`.news li`); give each host property a fallback, `var(--text, #222)`; avoid the host's class names (`loading`, `spinner`) | 4.7 |
|
|
121
|
+
| SHOULD | Do nothing at rest: an animation that draws the eye plays a few times; timers only for what changes on screen | 7.3.1 |
|
|
122
|
+
| SHOULD | Follow its width with a `ResizeObserver` on its own element when its layout depends on it | 7.3.2 |
|
|
123
|
+
| SHOULD | Meet WCAG 2.2 AA: keyboard alone, names on controls, 4.5:1 text, `prefers-reduced-motion` | 14 |
|
|
124
|
+
| MAY | Carry its icon in the file: `<link rel="icon" href="data:image/svg+xml,…">`, kept when the file is shared by itself (best: an SVG drawn for 16 pixels, or a 64 × 64 PNG) | 4.6 |
|
|
125
|
+
|
|
126
|
+
## Checklist
|
|
127
|
+
|
|
128
|
+
- [ ] It opens in a browser, from disk and from a server, with no error in the widget or the console.
|
|
129
|
+
- [ ] Each setting changed in the menu (▾) applies, and Refresh keeps what it should.
|
|
130
|
+
- [ ] It reads well light and dark, narrow (300 pixels) and wide, maximized: open it as
|
|
131
|
+
`name.swa.html#mode=dark&width=300`, then light and wider.
|
|
132
|
+
- [ ] Everything works with the keyboard alone; the focus is visible and never lost.
|
|
133
|
+
- [ ] Saved data from an older version, or edited by hand, doesn't break it.
|
|
134
|
+
- [ ] Nothing moves or runs when nobody uses it.
|
|
135
|
+
|
|
136
|
+
## Next
|
|
137
|
+
|
|
138
|
+
- The types, for an editor: `https://startside.app/swa/1.0/swa.d.ts` (Appendix F).
|
|
139
|
+
- More examples: a blog (Example 4), a game (Example 6), a to-do list (Example 7), in Appendix A of the specification.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
*Published at https://startside.app/swa/1.0/quickstart.html (Markdown: https://startside.app/swa/1.0/quickstart.md). ©
|
|
144
|
+
2026 François Hodierne, shared under the [Creative Commons Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/)
|
|
145
|
+
licence (CC BY 4.0).*
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/* SWA 1.0, the Startside Widget API */
|
|
2
|
+
(function(){!window.UWA&&!window.__startside&&((function(){var e=document.createElement(`style`);e.id=`uwa-standalone-styles`,e.textContent=`html,body{background:0 0;margin:0;padding:0}body{color:var(--text,#333);font:11px/1.45 var(--font-body,Verdana, Tahoma, Geneva, sans-serif);overflow:hidden}.moduleContent{padding:6px 8px}:root.uwa-cover .moduleContent{padding:0}a{color:var(--link,#1e5bb8);text-decoration:none}a:hover{text-decoration:underline}p{margin:0 0 6px}ul{margin:0;padding:0;list-style:none}li{padding:2px 0 2px 12px;position:relative}li:before{content:"";background:var(--link,#1e5bb8);width:4px;height:4px;position:absolute;top:7px;left:2px}input,select,textarea,button{font:inherit}table{border-collapse:collapse;font:inherit}.buttonClean,button{cursor:pointer;color:#222;background:linear-gradient(#fff,#e8ecf1 50%,#d6dde5 51%,#e9edf2);border:1px solid #8e99a6;border-radius:3px;padding:2px 10px}:root[data-color-scheme=dark] .buttonClean,:root[data-color-scheme=dark] button{color:#e6e9ed;background:linear-gradient(#3e4650,#313841 50%,#2a3038 51%,#323941);border-color:#5c6672}.uwa-error{color:#b3261e;background:#fdecea;border-bottom:1px solid #f3c1bc;margin:0 0 6px;padding:4px 8px}.nv-pager{border-top:1px dotted var(--border,#ccc);align-items:baseline;gap:10px;margin-top:6px;padding-top:5px;display:flex}.nv-pager .status{color:var(--muted,#888);font-size:10px}.nv-pager .next{margin-left:auto}img{max-width:100%;height:auto}.loading{color:var(--muted,#888);align-items:center;gap:6px;padding:10px 8px;display:flex}.spinner{width:16px;height:16px;position:relative}.spinner i{background:var(--muted,#888);transform-origin:1px 8px;border-radius:1px;width:2px;height:5px;animation:.8s step-end infinite spin-fade;position:absolute;top:0;left:7px}.spinner i:first-child{animation-delay:-.8s;transform:rotate(0)}.spinner i:nth-child(2){animation-delay:-.7s;transform:rotate(45deg)}.spinner i:nth-child(3){animation-delay:-.6s;transform:rotate(90deg)}.spinner i:nth-child(4){animation-delay:-.5s;transform:rotate(135deg)}.spinner i:nth-child(5){animation-delay:-.4s;transform:rotate(180deg)}.spinner i:nth-child(6){animation-delay:-.3s;transform:rotate(225deg)}.spinner i:nth-child(7){animation-delay:-.2s;transform:rotate(270deg)}.spinner i:nth-child(8){animation-delay:-.1s;transform:rotate(315deg)}@keyframes spin-fade{0%{opacity:1}12.5%{opacity:.8}25%{opacity:.6}37.5%{opacity:.45}50%{opacity:.3}62.5%,to{opacity:.15}}.ext-link{padding-right:1.02em}.ext-link:after{content:"";vertical-align:0;opacity:.45;width:.72em;height:.72em;-webkit-mask:var(--ext-icon) no-repeat center / contain;mask:var(--ext-icon) no-repeat center / contain;--ext-icon:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M14 3h7v7h-2V6.41l-9.29 9.3-1.42-1.42L17.59 5H14V3zM5 5h6v2H5v12h12v-6h2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z%27/%3E%3C/svg%3E");background:currentColor;flex:none;margin:0 -1.02em 0 .3em;display:inline-block}.ext-link:hover:after{opacity:.8}.count-grip{cursor:ns-resize;touch-action:none;color:currentColor;opacity:.35;place-items:center;width:20px;height:20px;display:grid;position:absolute;bottom:0;right:0}.count-grip:hover,.count-grip-dragging .count-grip{opacity:.9}.count-grip svg{width:10px;height:10px}.count-grip-dragging,.count-grip-dragging *{user-select:none;cursor:ns-resize!important}:root{--accent:#2b6fd6;--accent-ink:#1e5bb8;--text:#2a2f36;--muted:#6b7280;--link:var(--accent-ink);--widget-bg:#fff;--page-bg:color-mix(in srgb, var(--accent) 3%, #f4f5f7);--head-top:#fff;--head-bottom:color-mix(in srgb, var(--accent) 7%, #f7f8fa);--head-border:color-mix(in srgb, var(--accent) 9%, #e3e6ea);--head-text:color-mix(in srgb, var(--accent-ink) 25%, #2a2f36);--head-shine:#fff9;--widget-border:color-mix(in srgb, var(--accent) 8%, #dde1e6)}:root[data-mode=dark]{color-scheme:dark;--text:#d6dce3;--muted:#98a3af;--link:var(--accent-glow,#8cc4ff);--widget-bg:#242d36;--page-bg:#14191f;--head-top:color-mix(in srgb, var(--accent) 7%, #3a4653);--head-bottom:color-mix(in srgb, var(--accent) 5%, #2c3640);--head-border:#12181e;--head-text:#eef2f6;--head-shine:#ffffff1a;--widget-border:#11171d}html{background:var(--page-bg) linear-gradient(color-mix(in srgb, var(--accent) 7%, #f4f5f7) 0, var(--page-bg) 200px) no-repeat;min-height:100%}:root[data-mode=dark]{background:var(--page-bg) linear-gradient(color-mix(in srgb, var(--accent) 6%, #1f262e) 0, #14191f 220px) no-repeat}body{box-sizing:border-box;flex-direction:column;min-height:100vh;margin:0;padding:30px 16px 24px;display:flex;overflow:auto}#wrapper{box-sizing:border-box;background:var(--widget-bg);border:1px solid var(--widget-border);border-radius:6px;width:100%;max-width:420px;margin:auto auto 0;overflow:hidden;box-shadow:0 1px 4px #0000001f}.moduleHeader{height:24px;color:var(--head-text);background:linear-gradient(var(--head-top), var(--head-top) 45%, var(--head-bottom) 55%, var(--head-bottom));border-bottom:1px solid var(--head-border);box-shadow:inset 0 1px 0 var(--head-shine);align-items:center;gap:6px;padding:0 6px;font-weight:700;display:flex}.moduleHeader .ico{display:flex}.moduleHeader .title{white-space:nowrap;text-overflow:ellipsis;min-width:0;text-shadow:0 1px 0 var(--head-shine);flex:1;overflow:hidden}.editContent{background:#f3f7e8;border-bottom:1px solid #cfe0a4;padding:8px}.editContent .formTable{width:100%;margin-bottom:6px}.editContent .formTable th{text-align:right;vertical-align:middle;white-space:nowrap;width:35%;padding:2px 6px 2px 0}.editContent .formTable td{padding:2px 0}.editContent input[type=text],.editContent input[type=password],.editContent select,.editContent textarea{box-sizing:border-box;background:#fff;border:1px solid #a5acb5;border-top-color:#7c8590;width:100%;padding:2px 3px}.editContent .buttonClean{float:right}.editContent form:after{content:"";clear:both;display:block}.editContent .noPrefs{color:#888;margin:0}#standaloneFooter{text-align:center;color:var(--muted);margin:auto 0 0;padding-top:24px;font-size:10px}#standaloneFooter a{color:var(--link)}#wrapper.options-page{box-sizing:border-box;position:relative}.moduleHeader .options{width:22px;height:20px;font:inherit;color:var(--head-text);cursor:pointer;background:0 0;border:1px solid #0000;border-radius:4px;flex:none;padding:0;font-size:13px;line-height:1}.moduleHeader .options:hover,.moduleHeader .options[aria-expanded=true]{border-color:var(--head-border);background:#ffffff80}.moduleHeader .options:focus-visible,.widthGrip{cursor:ew-resize;touch-action:none;width:8px;position:absolute}.widthGrip[hidden]{display:none}.widthGrip:hover,.resizing .widthGrip{background:linear-gradient(to right, transparent 3px, color-mix(in srgb, var(--accent) 45%, #9aa4b0) 3px, color-mix(in srgb, var(--accent) 45%, #9aa4b0) 5px, transparent 5px)}.resizing,.resizing *{user-select:none;cursor:ew-resize!important}.optionsMenu{z-index:10;box-sizing:border-box;width:290px;min-width:230px;max-width:calc(100vw - 16px);color:var(--text);background:var(--widget-bg);border:1px solid var(--widget-border);border-radius:0 4px 4px;padding:12px 14px 10px;font:11px/16px Tahoma,Verdana,Geneva,sans-serif;position:absolute;box-shadow:0 3px 10px #00000038}.optionsMenu :focus-visible{outline:2px solid var(--link);outline-offset:1px}.optionsMenu .menuLine{grid-template-columns:60px minmax(0,1fr);align-items:center;column-gap:8px;min-height:24px;margin:0 0 5px;display:grid}.optionsMenu .menuLabel{text-align:right;justify-content:flex-end;align-items:center;gap:4px;font-weight:700;display:flex}.optionsMenu .menuLabel label{font-weight:700}.optionsMenu input:not([type=checkbox]),.optionsMenu select,.optionsMenu textarea{box-sizing:border-box;width:100%;min-width:0;font:inherit;color:var(--text);background:#fff;border:1px solid #a5acb5;border-top-color:#7c8590;padding:2px 4px}:root[data-mode=dark] .optionsMenu :is(input:not([type=checkbox]),select,textarea){background:color-mix(in srgb, var(--text) 8%, var(--widget-bg));border-color:color-mix(in srgb, var(--text) 35%, transparent)}.optionsMenu .menuCheck{align-items:center;gap:5px;display:flex}.optionsMenu .menuCheck input{margin:0}.optionsMenu .looks,.optionsMenu .swatches{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.optionsMenu .lookChoice{font:inherit;color:var(--text);background:var(--widget-bg);border:1px solid color-mix(in srgb, var(--text) 30%, transparent);cursor:pointer;border-radius:3px;align-items:center;gap:5px;padding:2px 8px 2px 4px;display:inline-flex}.optionsMenu .lookChoice[aria-pressed=true]{outline:2px solid var(--link);outline-offset:1px;font-weight:700}.optionsMenu .lookSwatch{border:1px solid #0000004d;border-radius:2px;width:12px;height:12px}.optionsMenu .swatch{cursor:pointer;border:1px solid #b9c7d8;border-radius:3px;width:18px;height:18px;padding:0}.optionsMenu .swatch[aria-pressed=true]{outline:2px solid var(--link);outline-offset:1px}.optionsMenu .swatchGap{background:color-mix(in srgb, var(--text) 25%, transparent);width:1px;height:16px;margin:0 2px}.optionsMenu .menuSep{border:0;border-top:1px solid color-mix(in srgb, var(--text) 15%, transparent);margin:10px 0 6px}.optionsMenu .menuAction{width:100%;font:inherit;color:var(--text);text-align:left;cursor:pointer;background:0 0;border:0;border-radius:3px;align-items:center;gap:6px;margin:0;padding:5px 6px;display:flex}.optionsMenu .menuAction:hover{background:color-mix(in srgb, var(--link) 12%, transparent)}.optionsMenu .menuIcon{text-align:center;width:14px;color:var(--muted)}.optionsMenu .hint{display:inline-flex;position:relative}.optionsMenu .hintMark{width:13px;height:13px;color:var(--muted);cursor:help;background:0 0;border:1px solid;border-radius:50%;place-items:center;padding:0;font:italic 700 9px/1 Georgia,Times New Roman,serif;display:inline-grid}.optionsMenu .hintMark:hover{color:var(--link)}.optionsMenu .hintBubble{z-index:5;text-align:left;width:max-content;max-width:200px;color:var(--widget-bg);background:var(--text);visibility:hidden;border-radius:4px;padding:6px 8px;font-weight:400;position:absolute;top:calc(100% + 6px);right:-8px;box-shadow:0 2px 8px #00000040}.optionsMenu .menuCheck .hintBubble{left:-8px;right:auto}.optionsMenu .hint:hover .hintBubble,.optionsMenu .hintMark:focus-visible+.hintBubble{visibility:visible}#standaloneFooter .accents{justify-content:center;align-items:center;gap:5px;margin-top:12px;display:flex}#standaloneFooter .accent-dot{cursor:pointer;border:1px solid #00000059;border-radius:50%;width:11px;height:11px;padding:0;position:relative;box-shadow:inset 0 1px #fff6}#standaloneFooter .accent-dot:before{content:"";position:absolute;inset:-6px}#standaloneFooter .accent-dot[aria-pressed=true]{outline:2px solid var(--accent);outline-offset:1px}#standaloneFooter .accent-dot:focus-visible{outline:2px solid var(--accent-ink);outline-offset:2px}#wrapper.maximized{flex-direction:column;margin:auto auto 0;display:flex;max-width:none!important}#wrapper.maximized[data-maximize=column]{max-height:var(--room,calc(100vh - 110px));width:min(var(--maximize-width,600px), calc(100vw - 32px))!important}#wrapper.maximized[data-maximize=fill]{height:var(--room,calc(100vh - 110px));width:calc(100vw - 32px)!important}#wrapper.maximized[data-maximize=fit]{max-height:var(--room,calc(100vh - 110px));width:min(var(--fit-width,calc(100vw - 32px)), calc(100vw - 32px))!important}#wrapper.maximized .moduleContent{flex:1;min-height:0;overflow:auto}#wrapper.options-page .moduleHeader{cursor:pointer}#standaloneFooter .accentsSep{background:color-mix(in srgb, var(--text) 25%, transparent);width:1px;height:12px;margin:0 3px}#standaloneFooter .mode-toggle{width:18px;height:18px;color:var(--text);border:1px solid color-mix(in srgb, var(--text) 30%, transparent);cursor:pointer;background:0 0;border-radius:50%;place-items:center;padding:0;display:inline-grid;position:relative}#standaloneFooter .mode-toggle:before{content:"";position:absolute;inset:-3px}#standaloneFooter .mode-toggle:focus-visible{outline:2px solid var(--link);outline-offset:2px}#standaloneInstall{text-align:center;margin:0 0 auto;padding:14px 0 0}body:has(#standaloneInstall) #standaloneFooter{margin-top:0}body:has(#wrapper.maximized) #standaloneFooter{margin-top:auto}body:has(#wrapper.maximized) #standaloneInstall{display:none}.addToStartside{box-sizing:border-box;color:#fff;text-shadow:0 -1px #00000040;border:1px solid var(--accent-ink);background:linear-gradient(color-mix(in srgb, var(--accent-ink) 82%, black), color-mix(in srgb, var(--accent-ink) 64%, black));border-radius:14px;align-items:center;gap:6px;height:28px;padding:0 12px 0 6px;font:700 12px/1 system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Helvetica,Arial,sans-serif;text-decoration:none;display:inline-flex;box-shadow:inset 0 1px #ffffff59,0 1px 1px #0003}.addToStartside:hover{filter:brightness(1.07)}.addToStartside:active{background:linear-gradient(color-mix(in srgb, var(--accent-ink) 64%, black), color-mix(in srgb, var(--accent-ink) 82%, black));box-shadow:inset 0 1px 3px #00000059}.addToStartside:focus-visible{outline:2px solid var(--link);outline-offset:2px}.addToStartside .addPlus{background:#0000002e;border-radius:50%;place-items:center;width:16px;height:16px;font-size:14px;line-height:1;display:grid}.moduleHeader .title{flex:0 auto}.moduleHeader .options{margin-left:auto}:root{--count-bg:#d93025;--count-fg:#fff}:root[data-mode=dark]{--count-bg:#ffb4ad;--count-fg:#3a0b08}.moduleHeader .unread-count{box-sizing:border-box;text-align:center;min-width:16px;color:var(--count-fg);background:var(--count-bg);box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--head-text) 40%, transparent);border-radius:999px;flex:none;margin-left:3px;padding:0 5px;font-size:10px;font-weight:700;line-height:16px;text-decoration:none}.moduleHeader .unread-count[hidden]{display:none}.moduleHeader .unread-count:hover{filter:brightness(1.1)}.moduleHeader .unread-count:focus-visible{outline:2px solid var(--link);outline-offset:1px}html.uwa-neutral #moduleContent{background:var(--widget-bg,var(--bg,#fff))!important;color:var(--text,#222)!important}html.uwa-neutral #moduleContent :not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter){color:inherit!important;border-color:color-mix(in srgb, var(--text,#222) 20%, transparent)!important;text-shadow:none!important;box-shadow:none!important;background-color:#0000!important}html.uwa-neutral #moduleContent a:not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent a :not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter){color:var(--link,#1e5bb8)!important}html.uwa-neutral #moduleContent a.ext-link:not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent a.ext-link :not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent a[class*=title]:not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent a[class*=title] :not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent a[class*=headline]:not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent a[class*=headline] :not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent a[class*=heading]:not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent a[class*=heading] :not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent a:has(.ext-link):not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent a:has(.ext-link) :not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent a:has([class*=title]):not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent a:has([class*=title]) :not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent [class*=title] a:not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent [class*=title] a :not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent [class*=headline] a:not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent [class*=headline] a :not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent :is(h1,h2,h3,h4) a:not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent :is(h1,h2,h3,h4) a :not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter){color:var(--text,#222)!important}html.uwa-neutral #moduleContent .uwa-read:not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent .uwa-read :not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent a.uwa-read:not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent .uwa-read a.ext-link:not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent .uwa-read a.ext-link :not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent .uwa-read a[class*=title]:not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent .uwa-read a[class*=title] :not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent .uwa-read a[class*=headline]:not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent .uwa-read a[class*=headline] :not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent .uwa-read a[class*=heading]:not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent .uwa-read a[class*=heading] :not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent .uwa-read a:has(.ext-link):not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent .uwa-read a:has(.ext-link) :not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent .uwa-read a:has([class*=title]):not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent .uwa-read a:has([class*=title]) :not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent .uwa-read [class*=title] a:not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent .uwa-read [class*=title] a :not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent .uwa-read [class*=headline] a:not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent .uwa-read [class*=headline] a :not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent .uwa-read :is(h1,h2,h3,h4) a:not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter),html.uwa-neutral #moduleContent .uwa-read :is(h1,h2,h3,h4) a :not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter){color:var(--read-muted,var(--muted,#6b6b6b))!important}html.uwa-neutral #moduleContent button:not([class*=play]){color:var(--text,#222)}html.uwa-neutral #moduleContent :not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter):before,html.uwa-neutral #moduleContent :not(img):not(video):not(canvas):not(svg):not(svg *):not(input):not(select):not(textarea):not(button):not(i):not(progress):not(meter):after{color:inherit!important;background-color:#0000!important}`,(document.head||document.documentElement).appendChild(e)})(),(function(){"use strict";var e=document.currentScript,t=e&&!e.src?e.getAttribute(`data-runtime`):null,n=e&&e.getAttribute(`data-host`),r=e&&/^https?:/.test(e.src)?new URL(e.src):null,i=n&&/^https?:\/\//.test(n)?new URL(n).origin:r?/^\/.+\/(swa|rwa|uwa)\/\d+\.\d+\/runtime\.js$/.test(r.pathname)?`https://startside.app`:r.origin:t?`https://startside.app`:location.origin,a=e&&/\/(swa|rwa)\/\d+(?:\.\d+)?\/runtime\.js(\?|$)/.exec(e.src||``)||t&&/^(swa)\/\d+\.\d+$/.exec(t),o=a?a[1]:/\.rwa\.x?html$/i.test(location.pathname)?`rwa`:/\.swa\.html$/i.test(location.pathname)?`swa`:null,s=`uwa-standalone:`+location.pathname;function c(){try{return JSON.parse(localStorage.getItem(s))||{}}catch{return{}}}function l(){try{localStorage.setItem(s,JSON.stringify(p.values))}catch{}}var u=`uwa-standalone-read:`+location.pathname;function d(){try{var e=JSON.parse(localStorage.getItem(u));return Array.isArray(e)?e.filter(function(e){return typeof e==`string`}):[]}catch{return[]}}function f(e,t){var n=d().filter(function(t){return e.indexOf(t)===-1});t&&(n=n.concat(e));try{localStorage.setItem(u,JSON.stringify(n.slice(-500)))}catch{}}var p=window.__UWA_CONFIG__={instance:`standalone`,standalone:!0,dashboard:i,values:c(),read:d(),lang:navigator.language||`en-US`,url:location.href,format:o||`uwa`,title:document.title,preferences:null,metas:{}},m=null,h=0,g=null;function _(){g&&(g.hidden=!(h>0),g.textContent=String(h),g.setAttribute(`aria-label`,h+` unread: mark all as read`))}function v(){return!!(widget.__readAllItems||widget.__listens(`onReadAll`))}var y=[],b=[],x=0,S=null;function C(){cancelAnimationFrame(x),x=requestAnimationFrame(function(){var e=document.getElementById(`wrapper`),t=document.getElementById(`moduleContent`);if(T&&e&&t&&e.dataset.maximize===`column`){var n=parseFloat(getComputedStyle(e).maxHeight);if(n>0){var r=Math.floor(n-(e.offsetHeight-t.clientHeight+t.scrollHeight)),i=e.getBoundingClientRect().bottom-document.documentElement.getBoundingClientRect().top;b.forEach(function(e){e(r,i)})}}})}function w(e){S&&S.disconnect(),S=null;var t=document.getElementById(`moduleContent`);if(e&&t&&typeof ResizeObserver<`u`){S=new ResizeObserver(C),S.observe(t);for(var n=0;n<t.children.length;n++)S.observe(t.children[n])}}var T=!1,E=360,D=`uwa-standalone-max-width:`+location.pathname,O=0;try{O=Number(localStorage.getItem(D)),localStorage.removeItem(`uwa-standalone-width:`+location.pathname)}catch{}Number.isFinite(O)&&O>=E||(O=0);function k(e){var t=Number(p.metas.maximizeWidth);e.style.setProperty(`--maximize-width`,(O||(t>=E&&t<=1600?t:600))+`px`),O?e.style.setProperty(`--fit-width`,O+`px`):e.style.removeProperty(`--fit-width`)}function A(e){e=!!e;var t=document.getElementById(`wrapper`);if(t&&e!==T){T=e;var n=(p.metas.maximize||`column`).trim();t.classList.toggle(`maximized`,e),t.dataset.maximize=/^(column|fill|fit)$/.test(n)?n:`column`,k(t),ee(),y.forEach(function(t){t(e)}),e&&t.dataset.maximize===`fit`&&requestAnimationFrame(M),w(e),e&&C()}}function j(){var e=document.getElementById(`standaloneFooter`),t=getComputedStyle(document.body),n=parseFloat(t.paddingTop)||0,r=(parseFloat(t.paddingBottom)||0)+(e?e.offsetHeight:0);return Math.max(200,Math.floor(window.innerHeight-n-r))}function ee(){var e=document.getElementById(`wrapper`);e&&e.style.setProperty(`--room`,j()+`px`)}function M(){var e=document.getElementById(`wrapper`);if(T&&e&&e.dataset.maximize===`fit`){var t=j();e.style.maxHeight=`none`;var n=function(n){return e.style.setProperty(`--fit-width`,n+`px`),e.offsetHeight<=t},r=document.documentElement.clientWidth-32,i=300;if(!n(r)){for(var a=0;a<12&&r-i>8;a++){var o=Math.round((i+r)/2);n(o)?i=o:r=o}r=i}n(O?Math.min(O,r):r),e.style.maxHeight=``}}window.addEventListener(`resize`,function(){T&&(ee(),M(),C())});var N=`uwa-standalone-title:`+location.pathname,P=null;function F(){try{return localStorage.getItem(N)||``}catch{return``}}function I(){P??=p.title;var e=F()||P;document.title=e,m&&(m.textContent=e)}var L={yellow:{label:`Yellow`,bar:`#f2cf3a`,paper:`#ffffe0`,barDark:`#7d6612`,paperDark:`#3a3218`},green:{label:`Green`,bar:`#8cc45a`,paper:`#eeffe0`,barDark:`#3d6324`,paperDark:`#27311e`},pink:{label:`Pink`,bar:`#ee8a96`,paper:`#ffe0e1`,barDark:`#8a3548`,paperDark:`#3e2429`},blue:{label:`Blue`,bar:`#8a8fe6`,paper:`#e0e0ff`,barDark:`#3d4290`,paperDark:`#27273e`},orange:{label:`Orange`,bar:`#f4a53c`,paper:`#fee8bd`,barDark:`#8f4f14`,paperDark:`#3f2b19`}},R={blue:{label:`Blue`,color:`#2b6fd6`,ink:`#2866c5`,glow:`#84abe7`},green:{label:`Green`,color:`#6ab42d`,ink:`#44731d`,glow:`#76ba3e`},pink:{label:`Pink`,color:`#ee4fa0`,ink:`#b53c7a`,glow:`#f384bd`},orange:{label:`Orange`,color:`#e08a2b`,ink:`#945b1c`,glow:`#e49844`},yellow:{label:`Yellow`,color:`#e3b100`,ink:`#7f6300`,glow:`#e3b100`},purple:{label:`Purple`,color:`#8a5cf0`,ink:`#774fce`,glow:`#b69af6`},red:{label:`Red`,color:`#e0463f`,ink:`#bc3b35`,glow:`#ec908c`},teal:{label:`Teal`,color:`#1fa393`,ink:`#16756a`,glow:`#55b9ad`},grey:{label:`Grey`,color:`#7b8794`,ink:`#606973`,glow:`#a3abb4`}},te=`uwa-standalone-accent`,ne={light:`<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" aria-hidden="true" fill="currentColor" stroke="currentColor"><circle cx="6" cy="6" r="2.4" stroke="none"/><g stroke-width="1.1" stroke-linecap="round">`+[0,45,90,135,180,225,270,315].map(function(e){var t=e*Math.PI/180,n=function(e){return e.toFixed(2)};return`<line x1="`+n(6+3.6*Math.cos(t))+`" y1="`+n(6+3.6*Math.sin(t))+`" x2="`+n(6+5.1*Math.cos(t))+`" y2="`+n(6+5.1*Math.sin(t))+`"/>`}).join(``)+`</g></svg>`,dark:`<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" aria-hidden="true" fill="currentColor"><path d="M7.6 1.4A4.7 4.7 0 1 0 10.6 8.9 3.9 3.9 0 0 1 7.6 1.4z"/></svg>`,auto:`<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" aria-hidden="true" fill="currentColor" stroke="currentColor"><circle cx="6" cy="6" r="4.3" fill="none" stroke-width="1.2"/><path d="M6 1.7a4.3 4.3 0 0 1 0 8.6z" stroke="none"/></svg>`};function re(){try{var e=localStorage.getItem(te);return R&&e&&R[e]?e:`blue`}catch{return`blue`}}function ie(e){R&&R[e]&&(document.documentElement.style.setProperty(`--accent`,R[e].color),document.documentElement.style.setProperty(`--accent-ink`,R[e].ink),document.documentElement.style.setProperty(`--accent-glow`,R[e].glow))}ie(re());var z={};location.hash.replace(/^#/,``).split(`&`).forEach(function(e){var t=e.split(`=`);try{t[0]&&(z[decodeURIComponent(t[0])]=decodeURIComponent(t[1]||``))}catch{}});var B=[`light`,`dark`,`auto`],ae=`uwa-standalone-mode`,V=window.matchMedia?window.matchMedia(`(prefers-color-scheme: dark)`):null;function H(){if(B.indexOf(z.mode)!==-1)return z.mode;try{var e=localStorage.getItem(ae);return B.indexOf(e)===-1?`light`:e}catch{return`light`}}function U(){var e=H();return e===`dark`||e===`auto`&&!!V&&V.matches}function W(){var e=U();document.documentElement.dataset.mode=e?`dark`:`light`,document.documentElement.dataset.colorScheme=e?`dark`:`light`,document.documentElement.style.colorScheme=e?`dark`:`light`,document.documentElement.classList.toggle(`uwa-dark`,e),document.getElementById(`wrapper`)&&$(Q())}W(),V&&V.addEventListener&&V.addEventListener(`change`,function(){H()===`auto`&&W()});var G=`uwa-standalone-tint:`+location.pathname,K=`linear-gradient(var(--head-top), var(--head-bottom))`;function oe(e){throw e instanceof TypeError?Error(e.message+` — could not reach `+i):e}function se(e){return e.ok?e:e.text().then(function(t){var n=`HTTP `+e.status;try{n=JSON.parse(t).error||n}catch{}throw Error(n)})}window.__UWA_HOST__={request:function(e,t){var n=new URL(t,location.href);if(n.protocol!==`http:`&&n.protocol!==`https:`)return Promise.reject(/* @__PURE__ */ Error(`Only http and https URLs are allowed`));if(e===`feed`||e===`jsonfeed`)return fetch(i+`/api/feed?format=`+(e===`jsonfeed`?`jsonfeed`:`uwa`)+`&url=`+encodeURIComponent(n.href)).then(se,oe).then(function(e){return e.json()});var r=n.origin===i?n.href:i+`/api/proxy?url=`+encodeURIComponent(n.href);return fetch(r).then(se,oe).then(function(e){return e.text()})},setTitle:function(e){P=e,I()},openFull:function(){A(!0)},closeFull:function(){A(!1)},watchRoom:function(e){return b.push(e),C(),function(){b=b.filter(function(t){return t!==e})}},askRoom:function(){C()},watchFull:function(e){return y.push(e),function(){y=y.filter(function(t){return t!==e})}},setRead:function(e,t){f(e,t)},setUnreadCount:function(e){h=e,_()},openPreferences:function(){var e=document.querySelector(`#moduleHeader .options`);e&&e.getAttribute(`aria-expanded`)!==`true`&&e.click()},setValue:function(e,t){p.values[e]=t,l()},rename:function(e){try{e?localStorage.setItem(N,String(e).slice(0,100)):localStorage.removeItem(N)}catch{}I();var t=document.getElementById(`opt-title`);t&&(t.value=F()||P)},deleteValue:function(e){delete p.values[e],l()},getStored:function(e){try{var t=localStorage.getItem(`uwa-stored:`+location.origin+location.pathname+`|`+e);return t==null?void 0:JSON.parse(t)}catch{return}},setStored:function(e,t){var n=`uwa-stored:`+location.origin+location.pathname+`|`+e;try{t===void 0?localStorage.removeItem(n):localStorage.setItem(n,JSON.stringify(t))}catch{}}};function ce(){for(var e={},t=document.getElementsByTagName(`meta`),n=0;n<t.length;n++){var r=t[n].getAttribute(`name`);r&&(e[r]=t[n].getAttribute(`content`)||``)}return e}function le(){var e=document.getElementById(`preferences`);if(!e||e.localName!==`form`)return[];var t=function(e){if(!e)return``;var t=e.cloneNode(!0);return Array.prototype.forEach.call(t.querySelectorAll(`select, input, textarea`),function(e){e.remove()}),(t.textContent||``).replace(/\s+/g,` `).trim()},n=[];return Array.prototype.forEach.call(e.querySelectorAll(`select[name], input[name]:not([type=submit i], [type=button i], [type=reset i], [type=image i]), textarea[name]`),function(r){var i=r.id?e.querySelector(`label[for="`+CSS.escape(r.id)+`"]`):null,a={name:r.getAttribute(`name`),label:t(r.closest(`label`))||t(i)||r.getAttribute(`aria-label`)||r.getAttribute(`name`),options:[],defaultValue:``};r.getAttribute(`data-hint`)&&(a.hint=r.getAttribute(`data-hint`).trim()),r.getAttribute(`data-commit`)===`ok`&&(a.commit=`ok`),r.getAttribute(`data-when`)&&(a.when=r.getAttribute(`data-when`).trim());var o=(r.getAttribute(`type`)||`text`).toLowerCase();if(r.localName===`select`){a.type=`list`,a.options=Array.prototype.map.call(r.querySelectorAll(`option`),function(e){var t={value:e.getAttribute(`value`)==null?e.textContent.trim():e.getAttribute(`value`),label:e.textContent.trim()};return e.getAttribute(`data-feed`)&&(t.feed=e.getAttribute(`data-feed`).trim()),t});var s=r.querySelector(`option[selected]`);a.defaultValue=s?s.getAttribute(`value`)==null?s.textContent.trim():s.getAttribute(`value`):a.options.length?a.options[0].value:``}else r.localName===`textarea`?(a.type=`text`,a.defaultValue=r.textContent||``):o===`checkbox`?(a.type=`boolean`,a.defaultValue=r.hasAttribute(`checked`)?`true`:`false`):o===`range`?(a.type=`range`,a.defaultValue=r.getAttribute(`value`)||``,a.min=Number(r.getAttribute(`min`)||0),a.max=Number(r.getAttribute(`max`)||100),a.step=Number(r.getAttribute(`step`)||1)):(a.type=o===`password`||o===`hidden`||o===`url`?o:`text`,a.defaultValue=r.getAttribute(`value`)||``);n.push(a)}),n}function ue(){for(var e=le(),t=document.getElementsByTagName(`preference`),n=0;n<t.length;n++){for(var r=t[n],i=[],a=r.getElementsByTagName(`option`),o=0;o<a.length;o++){var s={value:a[o].getAttribute(`value`)||``,label:a[o].getAttribute(`label`)||a[o].getAttribute(`value`)||``};a[o].getAttribute(`feed`)&&(s.feed=a[o].getAttribute(`feed`).trim()),i.push(s)}e.push({name:r.getAttribute(`name`)||``,type:(r.getAttribute(`type`)||`text`).toLowerCase(),label:r.getAttribute(`label`)||r.getAttribute(`name`)||``,defaultValue:r.getAttribute(`defaultValue`)||r.getAttribute(`defaultvalue`)||``,options:i,min:Number(r.getAttribute(`min`)||0),max:Number(r.getAttribute(`max`)||10),step:Number(r.getAttribute(`step`)||1)})}return e}function de(){for(var e=document.getElementsByTagName(`link`),t=0;t<e.length;t++)if(/(^|\s)icon(\s|$)/i.test(e[t].getAttribute(`rel`)||``))return e[t].href;return null}function q(e,t,n){var r=document.createElement(e);for(var i in t||{})r.setAttribute(i,t[i]);return n!=null&&(r.textContent=n),r}function fe(e){var t=p.preferences.filter(function(e){return e.name&&e.type!==`hidden`});if(e.innerHTML=``,!t.length){e.appendChild(q(`p`,{class:`noPrefs`},`This widget has no preferences.`));return}var n=q(`form`),r=q(`table`,{class:`formTable`});t.forEach(function(e){var t=widget.__getValue(e.name),n=q(`tr`);n.appendChild(q(`th`,{},e.label+`:`));var i=q(`td`),a;if(e.type===`boolean`)a=q(`input`,{type:`checkbox`}),a.checked=widget.__getBool(e.name);else if(e.type===`list`||e.type===`range`){a=q(`select`);var o=e.options;if(e.type===`range`){o=[];for(var s=e.min;s<=e.max&&o.length<500;s+=e.step||1)o.push({value:String(s),label:String(s)})}o.forEach(function(e){var n=q(`option`,{value:e.value},e.label);String(t)===e.value&&(n.selected=!0),a.appendChild(n)})}else e.type===`textarea`?(a=q(`textarea`,{rows:`4`}),a.value=t??``):(a=q(`input`,{type:e.type===`password`?`password`:`text`}),a.value=t??``);a.name=e.name,i.appendChild(a),n.appendChild(i),r.appendChild(n)}),n.appendChild(r);var i=q(`input`,{type:`submit`,value:`Ok`,class:`buttonClean`});n.appendChild(i),n.addEventListener(`submit`,function(r){r.preventDefault();var i=[];t.forEach(function(e){var t=n.elements[e.name],r=e.type===`boolean`?t.checked?`true`:`false`:t.value;String(widget.__getValue(e.name))!==r&&i.push(e.name),widget.__setValue(e.name,r)}),e.style.display=`none`,widget.__endEdit(i)}),e.appendChild(n)}var pe=6;function me(e,t){var n=/^([\w-]+)\s*(!?=)\s*(.*)$/.exec(e||``);if(!n)return!0;var r=n[3].split(`|`).indexOf(String(t(n[1])==null?``:t(n[1])))!==-1;return n[2]===`=`?r:!r}var J=`uwa-standalone-look:`+location.pathname;function Y(){var e=(p.metas.looks||``).trim();return e===`own`||e===`page`?{own:e===`own`,page:e===`page`}:{own:!!(p.metas.chromeColor||p.metas.chromeColorDark||p.metas.background||p.metas.backgroundDark),page:!0}}function X(){var e=Y();if(!e.own)return`page`;if(!e.page)return`own`;try{return localStorage.getItem(J)===`page`?`page`:`own`}catch{return`own`}}function he(e){try{e===`page`?localStorage.setItem(J,`page`):localStorage.removeItem(J)}catch{}$(Q())}function Z(){var e=(U()&&p.metas.chromeColorDark||p.metas.chromeColor||``).trim();return X()===`own`&&e&&CSS.supports(`color`,e)?e:null}function Q(){try{var e=localStorage.getItem(G);return L&&e&&L[e]?e:null}catch{return null}}function $(e){var t=document.getElementById(`wrapper`),n=document.documentElement;if(t){var r=Y(),i=r.own&&r.page&&X()===`page`;n.classList.toggle(`uwa-neutral`,i);var a=document.getElementById(`moduleContent`),o=(U()&&p.metas.backgroundDark||p.metas.background||``).trim();if(a&&(a.style.background=!i&&o&&CSS.supports(`color`,o)?o:``),e&&L&&L[e]){var s=U();be(t,s?L[e].barDark:L[e].bar),n.style.setProperty(`--module-color`,s?L[e].barDark:L[e].bar),n.style.setProperty(`--module-paper`,s?L[e].paperDark:L[e].paper)}else[`--head-top`,`--head-bottom`,`--head-border`,`--widget-border`,`--head-text`,`--head-shine`].forEach(function(e){t.style.removeProperty(e)}),n.style.removeProperty(`--module-color`),n.style.removeProperty(`--module-paper`),be(t,Z())}}function ge(e){try{e?localStorage.setItem(G,e):localStorage.removeItem(G)}catch{}$(e)}function _e(e,t,n){var r=p.preferences.filter(function(e){return e.name&&e.type!==`hidden`}),i=(p.metas.livePreferences||``).trim(),a=q(`button`,{type:`button`,class:`options`,"aria-haspopup":`dialog`,"aria-expanded":`false`,"aria-controls":`optionsMenu`,title:`Options`},`▾`);a.setAttribute(`aria-label`,`Options`),e.appendChild(a);var o=q(`div`,{id:`optionsMenu`,class:`optionsMenu`,role:`dialog`,"aria-label":`Options`});o.hidden=!0,document.body.appendChild(o);var s={},c=null,l=function(e){return e in s?s[e]:widget.__getValue(e)};function u(){clearTimeout(c),c=null;var e=Object.keys(s);if(e.length){var t=e.filter(function(e){return String(widget.__getValue(e))!==String(s[e])});e.forEach(function(e){widget.__setValue(e,s[e])}),s={},widget.__endEdit(t)}}function d(e){if(i!==`false`){if(clearTimeout(c),i===`instant`&&e<=500)return u();c=setTimeout(u,e)}}var f=[];function m(){f.forEach(function(e){e.row.hidden=!me(e.p.when,l)})}function g(){var e=q(`div`,{class:`menuLine`});e.appendChild(q(`label`,{for:`opt-title`,class:`menuLabel`},`Title:`));var t=q(`input`,{id:`opt-title`,type:`text`,maxlength:`100`,placeholder:P});t.value=F()||P;var n=null,r=function(){clearTimeout(n);var e=t.value.trim().slice(0,100);try{!e||e===P?localStorage.removeItem(N):localStorage.setItem(N,e)}catch{}I(),window.widget&&window.widget.__retitle&&window.widget.__retitle(F())};return t.addEventListener(`input`,function(){clearTimeout(n),n=setTimeout(r,600)}),t.addEventListener(`change`,r),t.addEventListener(`keydown`,function(e){e.key===`Enter`&&(e.preventDefault(),r(),C())}),e.appendChild(t),e}function _(){var e=q(`div`,{class:`menuLine`});e.appendChild(q(`span`,{id:`opt-look`,class:`menuLabel`},`Look:`));var t=q(`span`,{class:`looks`,role:`group`,"aria-labelledby":`opt-look`}),n=X(),r=function(e,t,r,i){var a=q(`button`,{type:`button`,class:`lookChoice`,title:i,"aria-pressed":String(n===e)}),s=q(`span`,{class:`lookSwatch`,"aria-hidden":`true`});return s.style.background=r,a.appendChild(s),a.appendChild(document.createTextNode(t)),a.addEventListener(`click`,function(){he(e),b();var t=o.querySelector(`.lookChoice[aria-pressed="true"]`);t&&t.focus()}),a};return t.appendChild(r(`own`,`Own`,p.metas.chromeColor||K,`Its own look, as its maker designed it`)),t.appendChild(r(`page`,`Page`,K,`The page’s style and colors`)),e.appendChild(t),e}function y(){var e=q(`div`,{class:`menuLine`});e.appendChild(q(`span`,{id:`opt-color`,class:`menuLabel`},`Color:`));var t=q(`span`,{class:`swatches`,role:`group`,"aria-labelledby":`opt-color`}),n=Q(),r=function(e,r,i){var a=q(`button`,{type:`button`,class:`swatch`,title:i,"aria-label":i,"aria-pressed":String(n===e)});return a.style.background=r,a.addEventListener(`click`,function(){ge(e),t.querySelectorAll(`.swatch`).forEach(function(e){e.setAttribute(`aria-pressed`,String(e===a))})}),a},i=Z();return t.appendChild(r(null,i||K,i?`Its own color`:`The page’s bar`)),t.appendChild(q(`span`,{class:`swatchGap`,"aria-hidden":`true`})),Object.keys(L||{}).forEach(function(e){t.appendChild(r(e,U()?L[e].barDark:L[e].bar,L[e].label))}),e.appendChild(t),e}function b(){o.innerHTML=``,f=[],o.appendChild(g());var e=Y();e.own&&e.page&&o.appendChild(_()),L&&o.appendChild(y()),r.length&&o.appendChild(q(`hr`,{class:`menuSep`}));var t=q(`div`,{class:`menuForm`});r.length&&o.appendChild(t);var i=function(){o.appendChild(q(`hr`,{class:`menuSep`}));var e=q(`button`,{type:`button`,class:`menuAction`});e.appendChild(q(`span`,{class:`menuIcon`,"aria-hidden":`true`},`↻`)),e.appendChild(document.createTextNode(`Refresh`)),e.addEventListener(`click`,function(){C(),widget.__listens(`onRefresh`)?widget.__fire(`onRefresh`):widget.__fire(`onLoad`)}),o.appendChild(e);var t=q(`button`,{type:`button`,class:`menuAction`});t.appendChild(q(`span`,{class:`menuIcon`,"aria-hidden":`true`},T?`↙`:`↗`)),t.appendChild(document.createTextNode(T?`Minimize`:`Maximize`)),t.addEventListener(`click`,function(){C(),A(!T)}),o.appendChild(t);var n=function(e,t,n){var r=q(`button`,{type:`button`,class:`menuAction`});r.appendChild(q(`span`,{class:`menuIcon`,"aria-hidden":`true`},e)),r.appendChild(document.createTextNode(t)),r.addEventListener(`click`,function(){C(),widget.__readAll(n)}),o.appendChild(r)};v()&&h>0&&n(`●`,`Mark all as read`,!0),v()&&widget.__read&&Object.keys(widget.__read).length&&n(`○`,`Mark all as unread`,!1)};if(r.length>pe){var a=q(`button`,{type:`button`,class:`menuAction`});a.appendChild(q(`span`,{class:`menuIcon`,"aria-hidden":`true`},`⚙`)),a.appendChild(document.createTextNode(`Preferences…`)),a.addEventListener(`click`,function(){C(!1),fe(n),n.style.display=``,widget.__fire(`onShowEdit`,n);var e=n.querySelector(`input, select, textarea`);e&&e.focus()}),t.appendChild(a),i();return}r.forEach(function(e,n){var r=`opt-`+n,i=q(`div`,{class:`menuLine`}),a=widget.__getValue(e.name),o,c=function(){if(!e.hint)return null;var t=q(`span`,{class:`hint`}),n=q(`button`,{type:`button`,class:`hintMark`,"aria-label":`About `+e.label,"aria-describedby":r+`-hint`},`i`),i=q(`span`,{id:r+`-hint`,class:`hintBubble`,role:`tooltip`},e.hint);return t.appendChild(n),t.appendChild(i),t};if(e.type===`boolean`){o=q(`input`,{type:`checkbox`,id:r}),o.checked=widget.__getBool(e.name),o.addEventListener(`change`,function(){s[e.name]=o.checked?`true`:`false`,m(),d(500)}),i.appendChild(q(`span`,{class:`menuLabel`,"aria-hidden":`true`}));var l=q(`span`,{class:`menuCheck`});l.appendChild(o),l.appendChild(q(`label`,{for:r},e.label));var p=c();p&&l.appendChild(p),i.appendChild(l)}else{if(e.type===`list`||e.type===`range`){o=q(`select`,{id:r});var h=e.options;if(e.type===`range`){h=[];for(var g=e.min;g<=e.max&&h.length<500;g+=e.step||1)h.push({value:String(g),label:String(g)})}h.forEach(function(e){var t=q(`option`,{value:e.value},e.label);String(a)===e.value&&(t.selected=!0),o.appendChild(t)}),o.addEventListener(`change`,function(){s[e.name]=o.value,m(),d(500)})}else{var _=e.type===`url`||e.commit===`ok`;o=e.type===`textarea`?q(`textarea`,{id:r,rows:`3`}):q(`input`,{id:r,type:e.type===`password`?`password`:`text`,inputmode:e.type===`url`?`url`:`text`}),o.value=a??``,o.addEventListener(`input`,function(){s[e.name]=o.value,_||d(700)}),o.addEventListener(`change`,function(){e.name in s&&u()}),o.addEventListener(`keydown`,function(e){e.key===`Enter`&&o.localName===`input`&&(e.preventDefault(),u())})}var v=q(`span`,{class:`menuLabel`});v.appendChild(q(`label`,{for:r},e.label+`:`));var y=c();y&&v.appendChild(y),i.appendChild(v),i.appendChild(o)}e.hint&&o.setAttribute(`aria-describedby`,r+`-hint`),f.push({p:e,row:i}),t.appendChild(i)}),m(),i()}function x(){var e=a.getBoundingClientRect();o.style.top=Math.round(e.bottom+window.scrollY+4)+`px`,o.style.left=Math.round(Math.max(8,e.right+window.scrollX-o.offsetWidth))+`px`}function S(){b(),o.hidden=!1,x(),a.setAttribute(`aria-expanded`,`true`);var e=o.querySelector(`input, select, textarea, button`);e&&e.focus()}function C(e){o.hidden||(u(),o.hidden=!0,a.setAttribute(`aria-expanded`,`false`),e!==!1&&a.focus())}a.addEventListener(`click`,function(){o.hidden?S():C()}),o.addEventListener(`keydown`,function(e){e.key===`Escape`&&(e.preventDefault(),C())}),document.addEventListener(`pointerdown`,function(e){!o.hidden&&!o.contains(e.target)&&e.target!==a&&C(!1)}),window.addEventListener(`resize`,function(){o.hidden||x()})}function ve(e){var t=function(){return Math.max(E,document.documentElement.clientWidth-32)},n=Number(z.width);n>0&&(e.style.width=Math.round(Math.min(t(),Math.max(200,n)))+`px`,e.style.maxWidth=`none`);var r=[`left`,`right`].map(function(e){var t=q(`div`,{class:`widthGrip `+e,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Width (`+e+` edge)`,title:`Drag to resize; double-click to reset`,tabindex:`0`});return t.dataset.side=e,t.hidden=!0,document.body.appendChild(t),t});function i(){var t=T&&e.dataset.maximize!==`fill`,n=e.getBoundingClientRect();r.forEach(function(e){e.hidden=!t,t&&(e.style.top=n.top+window.scrollY+`px`,e.style.height=n.height+`px`,e.style.left=(e.dataset.side===`left`?n.left-11:n.right+3)+window.scrollX+`px`)}),t&&o()}typeof ResizeObserver<`u`&&new ResizeObserver(i).observe(e),window.addEventListener(`resize`,i);var a=0;function o(){var n=e.getBoundingClientRect().width;r.forEach(function(e){e.setAttribute(`aria-valuenow`,String(Math.round(n))),e.setAttribute(`aria-valuemin`,String(E)),e.setAttribute(`aria-valuemax`,String(t()))})}function s(){i(),cancelAnimationFrame(a),a=requestAnimationFrame(function(){widget.__fire(`onResize`)})}y.push(i);function c(n,r){if(O=Math.round(Math.min(t(),Math.max(E,n))),k(e),M(),r)try{localStorage.setItem(D,String(O))}catch{}s()}function l(){O=0;try{localStorage.removeItem(D)}catch{}k(e),M(),s()}r.forEach(function(t){var n=t.dataset.side===`left`?-1:1;t.addEventListener(`pointerdown`,function(r){if(r.button!==0)return;r.preventDefault(),t.setPointerCapture(r.pointerId);var i=r.clientX,a=e.getBoundingClientRect().width,o=!1;document.documentElement.classList.add(`resizing`);function s(e){e.clientX!==i&&(o=!0),o&&c(a+n*2*(e.clientX-i),!1)}function l(e){t.removeEventListener(`pointermove`,s),t.removeEventListener(`pointerup`,l),t.removeEventListener(`pointercancel`,l),document.documentElement.classList.remove(`resizing`),o&&c(a+n*2*(e.clientX-i),!0)}t.addEventListener(`pointermove`,s),t.addEventListener(`pointerup`,l),t.addEventListener(`pointercancel`,l)}),t.addEventListener(`dblclick`,l),t.addEventListener(`keydown`,function(t){var r=t.shiftKey?50:10;if(t.key===`ArrowLeft`||t.key===`ArrowRight`){t.preventDefault();var i=e.getBoundingClientRect().width;c(i+n*(t.key===`ArrowRight`?r:-r),!0)}else t.key===`Enter`&&(t.preventDefault(),l())})})}function ye(){var e=q(`div`,{id:`moduleHeader`,class:`moduleHeader`}),t=q(`span`,{id:`moduleIcon`,class:`ico`}),n=de();if(n){var r=q(`img`,{src:n,width:`16`,height:`16`,alt:``});r.addEventListener(`error`,function(){t.style.display=`none`}),t.appendChild(r)}m=q(`span`,{id:`moduleTitle`,class:`title`},document.title),e.appendChild(t),e.appendChild(m),g=q(`a`,{href:`#`,class:`unread-count`,title:`Mark all as read`}),g.addEventListener(`click`,function(e){e.preventDefault(),widget.__readAll()}),e.appendChild(g),_(),e.title=`Double-click to maximize or restore`,e.addEventListener(`dblclick`,function(e){e.target.closest&&e.target.closest(`button, a, input, select, textarea`)||A(!T)});var a=q(`div`,{id:`editContent`,class:`editContent optionContent configureContent`});a.style.display=`none`,Array.prototype.slice.call(document.body.querySelectorAll(`style, link[rel~="stylesheet"]`)).forEach(function(e){document.head.appendChild(e)});for(var s=q(`div`,{id:`moduleContent`,class:`moduleContent`});document.body.firstChild;)s.appendChild(document.body.firstChild);var c=q(`div`,{id:`wrapper`});c.appendChild(e),c.appendChild(a),c.appendChild(s),document.body.appendChild(c);var l=!0;try{l=window.top!==window.self}catch{}var u=null;if(p.metas.addButton===`false`||l)u=null;else if(/^https?:$/.test(location.protocol))u=location.href.split(`#`)[0];else if(location.protocol===`file:`&&/^https?:$/.test(new URL(i).protocol)){var d=/\/public\/uwa\/((?:[^/]+\/)*[^/]+)$/.exec(decodeURIComponent(location.pathname));d&&(u=i+`/uwa/`+d[1])}var f=u?i+`/add?url=`+encodeURIComponent(u):null;if(f){var h=q(`a`,{id:`addToStartside`,class:`addToStartside`,href:f,target:`_blank`,rel:`noopener`});h.appendChild(q(`span`,{class:`addPlus`,"aria-hidden":`true`},`+`)),h.appendChild(document.createTextNode(`Add to Startside`));var v=q(`div`,{id:`standaloneInstall`});v.appendChild(h),document.body.appendChild(v)}var y=q(`div`,{id:`standaloneFooter`});if(y.appendChild(document.createTextNode((o?o.toUpperCase():`UWA`)+` standalone preview`)),R){var b=q(`span`,{class:`accents`,role:`group`,"aria-label":`Accent`});Object.keys(R).forEach(function(e){var t=q(`button`,{type:`button`,class:`accent-dot`,title:`Accent: `+R[e].label,"aria-label":`Accent: `+R[e].label});t.style.background=R[e].color,t.setAttribute(`aria-pressed`,String(e===re())),t.addEventListener(`click`,function(){try{localStorage.setItem(te,e)}catch{}ie(e),b.querySelectorAll(`.accent-dot`).forEach(function(e){e.setAttribute(`aria-pressed`,String(e===t))})}),b.appendChild(t)}),b.appendChild(q(`span`,{class:`accentsSep`,"aria-hidden":`true`}));var x=q(`button`,{type:`button`,class:`mode-toggle`}),S=function(){var e=H(),t=B[(B.indexOf(e)+1)%B.length],n=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};x.innerHTML=ne[e],x.setAttribute(`aria-label`,`Light or dark: `+n(e)),x.title=n(e)+(e===`auto`?` (follows the system)`:``)+`. Switch to `+n(t)};x.addEventListener(`click`,function(){var e=B[(B.indexOf(H())+1)%B.length];delete z.mode;try{localStorage.setItem(ae,e)}catch{}W(),S()}),S(),b.appendChild(x),y.appendChild(b)}document.body.appendChild(y),c.classList.add(`options-page`),_e(e,c,a),ve(c),window.addEventListener(`resize`,function(){widget.__fire(`onResize`)})}function be(e,t){if(t&&CSS.supports(`color`,t)){var n=q(`span`);n.style.color=t,document.body.appendChild(n);var r=(getComputedStyle(n).color.match(/[\d.]+/g)||[0,0,0]).map(Number);n.remove();var i=r.slice(0,3).map(function(e){return e/=255,e<=.03928?e/12.92:((e+.055)/1.055)**2.4}),a=.2126*i[0]+.7152*i[1]+.0722*i[2],o=(a+.05)/.05>=1.05/(a+.05),s={"--head-top":`color-mix(in srgb, `+t+` 82%, white)`,"--head-bottom":t,"--head-border":`color-mix(in srgb, `+t+` 78%, black)`,"--widget-border":`color-mix(in srgb, `+t+` 78%, black)`,"--head-text":o?`#000`:`#fff`,"--head-shine":o?`rgba(255, 255, 255, 0.45)`:`rgba(255, 255, 255, 0.25)`};for(var c in s)e.style.setProperty(c,s[c])}}document.addEventListener(`DOMContentLoaded`,function(){p.metas=ce(),p.preferences=ue(),p.title=document.title,ye(),$(Q()),I(),window.__startside.attachBody(),p.renamed=F(),window.__startside.start()})})(),(function(){"use strict";if(window.__startside||window.UWA&&window.UWA.__createInline)return;function e(e,t){for(var n in t)e[n]=t[n];return e}var t={addContent:function(e){var n=e;if((typeof e==`string`||typeof e==`number`)&&(n=document.createElement(`div`),n.innerHTML=String(e)),Array.isArray(e)){for(var i=0;i<e.length;i++)t.addContent.call(this,e[i]);return this}return n&&this.appendChild(n),r(n)},setContent:function(e){return typeof e==`string`||typeof e==`number`?this.innerHTML=String(e):(t.empty.call(this),e!=null&&t.addContent.call(this,e)),this},empty:function(){for(;this.firstChild;)this.removeChild(this.firstChild);return this}};function n(e){return!1}function r(e){return typeof e==`string`&&(e=document.getElementById(e)),e||null}function i(e,n){var r=document.createElement(e);if(!n||typeof n!=`object`)return r;for(var i in n){var a=n[i];i===`styles`?t.setStyles.call(r,a):i===`attributes`?t.setAttributes.call(r,a):i===`id`?r.id=a:i===`class`||i===`className`?r.className=a:i===`events`?t.addEvents.call(r,a):r.setAttribute(i,a)}return r}function a(e){if(!/<a\b/i.test(e))return null;for(var t=new DOMParser().parseFromString(`<body>`+e+`</body>`,`text/html`).body,n=[],r=t.firstChild;r&&n.length<8;r=r.nextSibling){var i=(r.textContent||``).slice(0,100);if(i){var a=r.nodeType===1&&r.tagName===`A`&&r.getAttribute(`href`)||``;n.push(/^https?:\/\//i.test(a)?{text:i,href:a}:{text:i})}}return n.some(function(e){return e.href})?n:null}function o(e,t,n){function r(t,n){return e.request(t,String(n))}var i=null;function a(e){return e.reason===void 0?new DOMException(`The operation was aborted.`,`AbortError`):e.reason}function o(e,n,i){return new Promise(function(o,s){if(i&&i.aborted)return s(a(i));var c=function(){s(a(i))};i&&i.addEventListener(`abort`,c,{once:!0}),r(e,n).then(function(e){if(i&&i.removeEventListener(`abort`,c),t.__destroyed)return s(new DOMException(`The widget is gone.`,`AbortError`));o(e)},function(e){i&&i.removeEventListener(`abort`,c),s(e)})})}function s(e,t){if(!e)return``;if(typeof e.get==`function`)return e.get(t)||``;for(var n=Array.isArray(e)?e:Object.keys(e).map(function(t){return[t,e[t]]}),r=0;r<n.length;r++)if(String(n[r][0]).toLowerCase()===t)return String(n[r][1]);return``}t.fetch=function(e,t){t||={};var n=e&&typeof e==`object`&&`url`in e?e.url:e,r=String(t.method||e&&e.method||`GET`).toUpperCase();if(r!==`GET`)return Promise.reject(/* @__PURE__ */ TypeError(`widget.fetch sends GET requests only (`+r+`)`));var i=s(t.headers||e&&e.headers,`accept`),a=t.signal||e&&typeof e==`object`&&e.signal||null;return o(/json/i.test(i)?`json`:`text`,String(n),a).then(function(e){return new Response(e,{status:200})},function(e){if(a&&a.aborted)throw a.reason===void 0?e:a.reason;if(e&&e.name===`AbortError`)throw e;var t=/HTTP (\d{3})/.exec(String(e&&e.message)),n=t?Number(t[1]):0;if(n>=400&&n<=599)return new Response(null,{status:n,statusText:String(e.message).slice(0,200)});throw TypeError(String(e&&e.message||`Failed to fetch`))})};var c={};function l(e,n,r){return o(`jsonfeed`,e,n).then(function(n){if(!n)throw Error(`Could not read the feed `+e);return t.__keepContent(e,y.feed(n))},function(e){throw!r&&!(e&&e.name===`AbortError`)&&!t.__keepsContent()&&t.__retryLoad(),e instanceof Error?e:Error(String(e))})}return t.fetchFeed=function(e,n){n||={},e=String(e);var r=n.signal||null;if(r&&r.aborted)return Promise.reject(a(r));var i=n.fresh?null:t.__keptContent(e);return i?(!(Date.now()-i._myvibes.fetched<h)&&!c[e]&&(c[e]=!0,setTimeout(function(){l(e,null,!0).then(function(){delete c[e],t.__destroyed||t.__fire(t.__listens(`onRefresh`)?`onRefresh`:`onLoad`)},function(){delete c[e]})})),Promise.resolve(i)):l(e,r,!1)},i}function s(e){if(e.__standaloneAudio)return e.__standaloneAudio;var t=new Audio;t.preload=`none`;var n=function(t){var n=e.audioState;e.__setAudioState({url:`url`in t?t.url:n.url,playing:`playing`in t?t.playing:n.playing,loading:`loading`in t?t.loading:n.loading,error:`error`in t?t.error:n.error})};return t.addEventListener(`playing`,function(){n({playing:!0,loading:!1,error:null})}),t.addEventListener(`waiting`,function(){n({loading:!0})}),t.addEventListener(`pause`,function(){n({playing:!1,loading:!1})}),t.addEventListener(`error`,function(){t.getAttribute(`src`)&&n({playing:!1,loading:!1,error:`failed`})}),e.__standaloneAudio={play:function(e){return/^https:\/\//.test(e.url)?(n({url:e.url,loading:!0,error:null}),t.src=e.url,t.play().catch(function(e){e.name!==`AbortError`&&n({playing:!1,loading:!1,error:e.name===`NotAllowedError`?`blocked`:`failed`})}),!0):!1},pause:function(){t.pause(),t.removeAttribute(`src`),t.load()}},e.__standaloneAudio}function c(e,t){var n=`http://www.w3.org/2000/svg`,r=document.createElement(`div`);r.className=`count-grip`,r.setAttribute(`role`,`separator`),r.setAttribute(`aria-orientation`,`horizontal`),r.setAttribute(`aria-label`,t),r.title=t;var i=r.appendChild(document.createElementNS(n,`svg`));i.setAttribute(`viewBox`,`0 0 10 10`),i.setAttribute(`aria-hidden`,`true`);var a=i.appendChild(document.createElementNS(n,`path`));a.setAttribute(`d`,`M9 3L3 9M9 6L6 9`),a.setAttribute(`stroke`,`currentColor`),a.setAttribute(`stroke-width`,`1.2`),a.setAttribute(`stroke-linecap`,`round`);var o=getComputedStyle(e).position;return(!o||o===`static`)&&(e.style.position=`relative`),e.appendChild(r),r}var l={onLoad:`load`,onLoadComplete:`loadcomplete`,onRefresh:`refresh`,onResize:`resize`,onUpdateBody:`updatebody`,onUpdatePreferences:`updatepreferences`,onHideEdit:`hideedit`,onReadAll:`readall`,onAudioState:`audiostate`,onAudioResume:`audioresume`,onVideoState:`videostate`,onFullSize:`fullsize`,onFullScreen:`fullscreen`,__settingsChange:`settingschange`},u={readall:!0,settingschange:!0},d=typeof Event==`function`?(function(){function e(t,n){var r=Reflect.construct(Event,[t,n||{}],new.target||e);return Object.defineProperty(r,"__detail",{value:n&&`detail`in n?n.detail:null}),Object.defineProperty(r,"__promises",{value:null,writable:!0}),Object.defineProperty(r,"__signal",{value:n&&n.signal?n.signal:null}),r}return e.prototype=Object.create(Event.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.setPrototypeOf(e,Event),Object.defineProperty(e.prototype,"detail",{get:function(){return this.__detail},configurable:!0}),Object.defineProperty(e.prototype,"signal",{get:function(){return this.__signal},configurable:!0}),e.prototype.waitUntil=function(e){if(!this.__promises)throw new DOMException(`waitUntil is only for a load being dispatched (load, refresh)`,`InvalidStateError`);this.__promises.push(Promise.resolve(e))},e})():null;d&&!window.WidgetEvent&&(window.WidgetEvent=d);function f(e){return e&&typeof e==`object`&&(Object.keys(e).forEach(function(t){f(e[t])}),Object.freeze(e)),e}function p(e,t,n){var r=e.__uwaApi,i=function(t,n,i){Object.defineProperty(e,t,{get:n,set:r?i:void 0,enumerable:!0,configurable:!0})},a=function(t){Object.defineProperty(e,t,{value:e[t],writable:!!r,enumerable:!0,configurable:!0})};i(`title`,function(){return e.__renamed?e.__renamed:e.__title},function(t){e.__title=t}),i(`body`,function(){return e.__body},function(t){e.__body=t}),i(`fullSize`,function(){return e.__fullSize},function(t){e.__fullSize=t}),i(`fullScreen`,function(){return e.__fullScreen},function(t){e.__fullScreen=t}),i(`audioState`,function(){return r?e.__audioState:Object.freeze(e.__audioState)},function(t){e.__audioState=t}),i(`videoState`,function(){return r||!e.__videoState?e.__videoState:Object.freeze(e.__videoState)},function(t){e.__videoState=t});var o=null,s=null;if(i(`preferences`,function(){return r?e.__preferences:(o!==e.__preferences&&(o=e.__preferences,s=f(JSON.parse(JSON.stringify(o||[])))),s)},function(t){e.__preferences=t}),r){e.data=e.__data,e.periodicals=e.__periodicals,e.launch=e.__launch,e.endEdit=e.__endEdit,e.initPreferences=e.__initPreferences,i(`debugMode`,function(){return e.__debug},function(t){e.__debug=t}),i(`unreadCount`,function(){return e.__unreadCount},function(t){e.__unreadCount=t}),i(`searchResultCount`,function(){return e.__searchResultCount},function(t){e.__searchResultCount=t});return}i(`metas`,n),e.environment=Object.freeze(e.environment),[`id`,`uwaUrl`,`lang`,`locale`,`environment`,`canFullSize`,`settings`,`storage`].forEach(a)}function m(r,m,h){var _=r.metas||{},v=_.debugMode===`true`,b=null,x={id:r.instance,__title:r.title,__body:null,__data:{},callbacks:{},__preferences:r.preferences||[],metas:_,__debug:v,elements:{},__periodicals:{},apiVersion:`1.2`,lang:(r.lang||`en-US`).replace(`-`,`_`),locale:(r.lang||`en-US`).split(`-`)[1]?(r.lang||`en-US`).split(`-`)[1].toLowerCase():`us`,dir:`ltr`,readOnly:!1,isNew:!1,uwaUrl:r.url,__searchResultCount:0,__unreadCount:0,__memory:r.memory||{},__stored:r.stored||{},__read:(r.read||[]).reduce(function(e,t){return typeof t==`string`&&(e[t]=!0),e},{}),environment:{name:`myvibes`,standalone:!!r.standalone,inline:!!r.inline,fit:!!r.fit,style:r.theme?String(r.theme):``},setTitle:function(e){this.__title=String(e);var t=a(this.__title);m.setTitle(t?t.map(function(e){return e.text}).join(``):this.__title.replace(/<[^>]*>/g,``)),m.setTitleLinks&&m.setTitleLinks(t)},getTitle:function(){return String(this.title).replace(/<[^>]*>/g,``)},setBody:function(e){this.__destroyed||(t.setContent.call(this.body,e),m.bodyChanged&&m.bodyChanged(),m.loading&&m.loading(!1),this.__fire(`onUpdateBody`))},addBody:function(e){this.__destroyed||(t.addContent.call(this.body,e),m.bodyChanged&&m.bodyChanged(),m.loading&&m.loading(!1),this.__fire(`onUpdateBody`))},createElement:function(e,t){return i(e,t)},setIcon:function(e){m.setIcon&&m.setIcon(e==null?null:String(e))},setStyle:function(e){if(m.addStyle)return m.addStyle(String(e));var t=document.createElement(`style`),n=String(e).replace(/#moduleContent|#container/g,``);t.textContent=document.documentElement.hasAttribute(`data-css-layers`)?`@layer widget{`+n+`
|
|
3
|
+
}`:n,document.head.appendChild(t)},getPreference:function(e){for(var t=0;t<this.preferences.length;t++)if(this.preferences[t].name===e)return this.preferences[t];return null},__initPreferences:function(){for(var e=0;e<this.preferences.length;e++){var t=this.preferences[e];t.name&&this.__getValue(t.name)==null&&t.defaultValue&&(this.__data[t.name]=String(t.defaultValue))}},getValue:function(e){if(this.__data[e]!==void 0)return this.__data[e];var t=Object.prototype.hasOwnProperty.call(r.values,e)?r.values[e]:void 0;return t===`null`&&(t=null),t!==void 0&&(this.__data[e]=t),t},getInt:function(e){var t=this.__getValue(e);return t===`true`||t===!0?1:(t=parseInt(t,10),isNaN(t)?0:t)},getBool:function(e){return!!this.__getInt(e)},setValue:function(e,t){return this.__data[e]===t||(this.__gripTemp&&!Object.prototype.hasOwnProperty.call(this.__held,e)&&(this.__held[e]=this.__getValue(e)),this.__data[e]=t,this.__gripTemp)||m.setValue(String(e),t==null?``:String(t)),t},deleteValue:function(e){e=String(e),delete this.__data[e],r.values&&delete r.values[e];var t=this.getPreference(e);t&&t.defaultValue!==void 0&&(this.__data[e]=t.defaultValue),m.deleteValue?m.deleteValue(e):m.setValue(e,``)},audioStarted:function(e,t){if(typeof e!=`function`)throw Error(`widget.audioStarted needs a function that stops the sound`);m.audioStarted&&m.audioStarted(e,t||{})},audioStopped:function(){m.audioStopped&&m.audioStopped()},__audioState:{url:null,playing:!1,loading:!1,error:null,away:!1},__prepareGoogle:function(){m.prepareGoogle&&m.prepareGoogle()},__connectGoogle:function(e){return m.connectGoogle?m.connectGoogle(e):Promise.reject(/* @__PURE__ */ Error(`Connecting a Google account works from your page, not from this widget alone.`))},playAudio:function(e){var t=e||{},n={url:String(t.url||``),relay:!!t.relay,live:t.live!==!1};return m.playAudio?m.playAudio(n):s(this).play(n)},pauseAudio:function(){return m.pauseAudio?m.pauseAudio():s(this).pause()},setChromeColor:function(e,t){var n=t||{};m.setChromeColor&&m.setChromeColor(e||null,n.background||null)},openPhoto:function(e){if(m.openPhoto)return m.openPhoto(e);e&&e.src&&window.open(String(e.src),`_blank`,`noopener`)},__fullSize:!1,canFullSize:!!m.openFull,openFull:function(){m.openFull&&m.openFull()},closeFull:function(){m.closeFull&&m.closeFull()},setFullScreen:function(e){m.setScreen&&m.setScreen(!!e)},__fullScreen:!1,__setFullScreen:function(e,t){if(this.environment&&this.environment.inline||document.documentElement.classList.toggle(`uwa-full-window`,!!t),this.__fullScreen!==!!e){this.__fullScreen=!!e;var n=this;requestAnimationFrame(function(){n.__listens(`onFullScreen`)&&n.__fire(`onFullScreen`,n.fullScreen)})}},__grows:[],__held:{},__fullFits:[],__gripTemp:!1,__setRoom:function(e,t){if(e=Number(e),t=Number(t),this.fullSize&&isFinite(e)){this.__grows.forEach(function(t){t(e)});var n=!1;this.__fullFits.forEach(function(r){r.box.isConnected&&r(e,t>0?t:void 0)&&(n=!0)}),n||this.__fitDone()}},__fitted:!0,__fitCache:{},__fitDone:function(){!this.__fitted&&this.fullSize&&(this.__fitted=!0,requestAnimationFrame(function(){requestAnimationFrame(function(){m.fitted&&m.fitted()})}))},__setFullSize:function(e){if(this.__fullSize!==!!e){this.__fullSize=!!e;var t=this;if(this.environment&&this.environment.inline||document.documentElement.classList.toggle(`uwa-full-size`,this.fullSize),e){this.__fitted=!1;var n=function(e){return e.box?e.box.isConnected:e.scroller.isConnected};!this.__fullFits.some(n)&&!this.__grows.some(n)?this.__fitDone():setTimeout(function(){t.__fitDone()},1200)}if(e&&!this.__fullEsc?(this.__fullEsc=function(e){e.key===`Escape`&&t.fullSize&&!e.defaultPrevented&&t.closeFull()},document.addEventListener(`keydown`,this.__fullEsc)):!e&&this.__fullEsc&&(document.removeEventListener(`keydown`,this.__fullEsc),this.__fullEsc=null),!e){this.__grows.forEach(function(e){e(null)});var r=!1;this.__fullFits.forEach(function(e){e.box.isConnected&&!e.restore()&&(r=!0)});var i=this.__held;this.__held={};for(var a=Object.keys(i),o=0;o<a.length;o++)this.__data[a[o]]=i[a[o]];r?this.__fire(`onLoad`):this.environment&&this.environment.fit&&this.__fit&&this.__fit()}requestAnimationFrame(function(){t.__listens(`onFullSize`)&&t.__fire(`onFullSize`,t.fullSize)})}},seekAudio:function(e){if(m.seekAudio)return m.seekAudio(Number(e));var t=s(this);t.seek&&t.seek(Number(e))},__setAudioState:function(e){var t=e||{};this.__audioState={url:t.url||null,playing:!!t.playing,loading:!!t.loading,error:t.error||null,away:!!t.away,time:typeof t.time==`number`?t.time:null,duration:typeof t.duration==`number`?t.duration:null,elsewhere:t.elsewhere&&t.elsewhere.url?{url:String(t.elsewhere.url),playing:!!t.elsewhere.playing,loading:!!t.elsewhere.loading,time:typeof t.elsewhere.time==`number`?t.elsewhere.time:null,duration:typeof t.elsewhere.duration==`number`?t.elsewhere.duration:null,source:t.elsewhere.source?String(t.elsewhere.source):null}:null},this.__listens(`onAudioState`)&&this.__fire(`onAudioState`,this.audioState)},__videoState:null,__setVideoState:function(e){var t=e&&typeof e==`object`?e:null;this.__videoState=t?{provider:String(t.provider||``),id:String(t.id||``),list:t.list?String(t.list):void 0,playing:!!t.playing}:null,this.__listens(`onVideoState`)&&this.__fire(`onVideoState`,this.videoState)},audioInfo:function(e){m.audioInfo&&e&&m.audioInfo({source:e.source?String(e.source):void 0,title:e.title?String(e.title):void 0,artist:e.artist?String(e.artist):void 0,artwork:e.artwork?String(e.artwork):void 0,artworkType:e.artworkType?String(e.artworkType):void 0,artworkSizes:e.artworkSizes?String(e.artworkSizes):void 0})},log:function(){this.__debug&&console.log.apply(console,[`[UWA]`].concat([].slice.call(arguments)))},setPeriodical:function(e,t,n,r){this.clearPeriodical(e);var i=this;this.__periodicals[e]=setInterval(function(){t.call(i)},n),r&&t.call(this)},clearPeriodical:function(e){this.__periodicals[e]&&clearInterval(this.__periodicals[e]),delete this.__periodicals[e]},setAutoRefresh:function(e){if(e=Number(e)||0,this.__listens(`onRefresh`)||(e=0),m.autoRefresh)return m.autoRefresh(e);if(e<=0)return this.clearPeriodical(`autoRefresh`);this.setPeriodical(`autoRefresh`,function(){this.__fire(`onRefresh`)},e*6e4+Math.floor(Math.random()*1e4))},setSearchResultCount:function(e){this.__searchResultCount=Number(e)||0},recall:function(e){return this.__memory[String(e)]},remember:function(e,t){e=String(e),t===void 0?delete this.__memory[e]:this.__memory[e]=t,m.remember&&m.remember(e,t)},getStored:function(e){if(e=String(e),m.getStored)return m.getStored(e);var t=this.__stored[e];return t===void 0?void 0:JSON.parse(JSON.stringify(t))},setStored:function(e,t){e=String(e),t===void 0?delete this.__stored[e]:this.__stored[e]=JSON.parse(JSON.stringify(t)),m.setStored&&m.setStored(e,t)},keptContent:function(e){var t=this.__recall(`content`),n=t&&t[String(e)],r=n&&n._myvibes&&n._myvibes.fetched;return n&&Array.isArray(n.items)&&typeof r==`number`?n:null},keepContent:function(t,n,r){t=String(t);var i=Date.now(),a=this.__recall(`content`)||{},o={},s={};for(var c in n)s[c]=n[c];var l=n._myvibes&&n._myvibes.fetched;s._myvibes=e(e({},n._myvibes||{}),{source:t,fetched:r&&typeof l==`number`?l:i});var u=Object.keys(a).filter(function(e){var n=a[e];return e!==t&&n&&n._myvibes&&i-n._myvibes.fetched<g});return u.sort(function(e,t){return a[t]._myvibes.fetched-a[e]._myvibes.fetched}),u.slice(0,5).forEach(function(e){o[e]=a[e]}),o[t]=s,this.__remember(`content`,o),s},isRead:function(e){return Object.prototype.hasOwnProperty.call(this.__read,String(e))},setRead:function(e,t){for(var n=(Array.isArray(e)?e:[e]).map(String).filter(function(e){return e&&e.length<=2e3}).slice(0,500),r=t!==!1,i=0;i<n.length;i++)r?this.__read[n[i]]=!0:delete this.__read[n[i]];n.length&&m.setRead&&m.setRead(n,r)},__setReadKeys:function(e){var t={};(Array.isArray(e)?e:[]).forEach(function(e){typeof e==`string`&&(t[e]=!0)}),this.__read=t,this.__paintRead&&this.__paintRead()},setUnreadCount:function(e){this.__unreadCount=Math.max(0,Math.floor(Number(e))||0),m.setUnreadCount&&m.setUnreadCount(this.__unreadCount)},setMaxValue:function(e,t){var n=Math.floor(Number(t));m.setMaxValue&&e&&n>=0&&m.setMaxValue(String(e),n)},readItems:function(e,t,n){n||={};var r=this,i=function(e){if(n.key)return String(n.key(e)||``);var t=e.querySelector(`a.ext-link[href]`)||e.querySelector(`a[href]`);return t?t.href:``},a=function(){return Array.prototype.slice.call(e.querySelectorAll(t))},o=function(){var e=0;a().forEach(function(t){var n=i(t),a=!!n&&r.isRead(n);t.classList.toggle(`uwa-read`,a),n&&!a&&e++}),document.body.classList.contains(`count-grip-dragging`)||r.setUnreadCount(e)},s=function(n){if(n.type!==`auxclick`||n.button===1){var a=n.target.closest&&n.target.closest(`a[href]`),s=a&&a.closest(t);if(s&&e.contains(s)){var c=i(s);c&&!r.isRead(c)&&(r.setRead(c),o())}}};e.addEventListener(`click`,s,!0),e.addEventListener(`auxclick`,s,!0);var c=null,l=new MutationObserver(function(){clearTimeout(c),c=setTimeout(o,50)});l.observe(e,{childList:!0,subtree:!0}),this.__paintRead=o,this.onReadAll||(this.__readAllItems=function(){var e=a().map(i).filter(Boolean);e.length&&r.setRead(e),o()}),o();var u=this.__readAllItems;return{paint:o,stop:function(){e.removeEventListener(`click`,s,!0),e.removeEventListener(`auxclick`,s,!0),l.disconnect(),clearTimeout(c),r.__paintRead===o&&(r.__paintRead=null),r.__readAllItems===u&&(r.__readAllItems=null)}}},addWidget:function(e){return m.addWidget?m.addWidget(e):!1},dragWidget:function(e,t){return!m.dragWidget||!e?!1:(e.setAttribute(`draggable`,`true`),e.addEventListener(`dragstart`,function(e){var n=typeof t==`function`?t(e):t;(!n||!m.dragWidget(e,n))&&e.preventDefault()}),!0)},playVideo:function(e){if(m.playVideo)return m.playVideo(e);var t=e||{};t.provider===`youtube`&&/^[A-Za-z0-9_-]{11}$/.test(t.id)?window.open(`https://www.youtube.com/watch?v=`+t.id+(/^[A-Za-z0-9_-]{10,64}$/.test(t.list||``)?`&list=`+t.list:``),`_blank`,`noopener`):t.provider===`vimeo`&&/^\d{1,12}$/.test(t.id)?window.open(`https://vimeo.com/`+t.id,`_blank`,`noopener`):t.provider===`arte`&&/^(\d{6}-\d{3}-[A-Z]|RC-\d{6})$/.test(t.id)&&window.open(`https://www.arte.tv/`+(/^(fr|de|en|es|pl|it)$/.test(t.lang||``)?t.lang:`fr`)+`/videos/`+t.id+`/`,`_blank`,`noopener`)},openURL:function(e){m.openURL?m.openURL(String(e)):window.open(e,`_blank`,`noopener`)},openPreferences:function(){m.openPreferences&&m.openPreferences()},withPreferencesLink:function(e){var t=this,n=document.createElement(`span`);return String(e).split(/(\[\[[^\]]*\]\])/).forEach(function(e){var r=/^\[\[([^\]]*)\]\]$/.exec(e);if(!r){e&&n.appendChild(document.createTextNode(e));return}var i=document.createElement(`a`);i.href=`#`,i.className=`uwa-prefs-link`,i.textContent=r[1],i.addEventListener(`click`,function(e){e.preventDefault(),t.openPreferences()}),n.appendChild(i)}),n},shareUrl:function(){var e=r.dashboard||(r.inline?location.origin:``),t=/^(https?:\/\/[^/]+)\/uwa\/([a-z0-9-]+(?:\.[rsu]wa)?)\.x?html$/.exec(String(r.url||``).split(/[?#]/)[0]);return t&&e&&t[1]===e?e+`/add/`+t[2]:null},share:function(e){var t={text:String(e&&e.text||``).slice(0,2e3),url:e&&e.url?String(e.url):``};if(m.share)return m.share(t);var n=t.url?t.text+`
|
|
4
|
+
`+t.url:t.text;if(navigator.share)return navigator.share(t.url?{text:t.text,url:t.url}:{text:t.text}).catch(function(){});navigator.clipboard&&navigator.clipboard.writeText(n)},openItems:function(e,t,n){if(m.openItems)return m.openItems(e,t,n||{});var r=e&&e[t];r&&r.url&&window.open(r.url,`_blank`,`noopener`)},__gripFollower:function(e,t,n){var r=function(){return e.getBoundingClientRect().top},i=t-r(),a=1,o={h:n,g:r()};return{want:function(e){return o.h+(e-i-r())/a},took:function(e){var t=r();if(Math.abs(e-o.h)>=2){var n=(t-o.g)/(e-o.h);n>.3&&n<1.3&&(a=n)}o={h:e,g:t}}}},__relayGrip:function(e){this.__grip=e,m.gripDrag&&m.gripDrag(!!e)},countGrip:function(e,t,n){n||={};var r=this.environment&&this.environment.fit?this.__fitList(e,t,n):null,i=n.min||1,a=null,o=160,s=r?null:c(e,`Drag to show more or fewer items`),l=function(){return Array.prototype.slice.call(e.querySelectorAll(t))},u=this,d=function(e,t){u.__gripTemp=t;try{n.onDone(e)}finally{u.__gripTemp=!1}},f=function(t,r){if(!n.onDone||!e.isConnected||(f.px=t,f.from=r,f.ran))return!1;f.ran=!0;var a=u.environment&&u.environment.inline?u.body:document.documentElement,o=(r||a.getBoundingClientRect().height)+t,s=Math.round(a.getBoundingClientRect().width);f.before===void 0&&(f.before=l().length);var c=function(e){var t=0;return e.forEach(function(e){t=Math.max(t,e.getBoundingClientRect().bottom)}),t-a.getBoundingClientRect().top},p=0,h=function(){var t=a.getBoundingClientRect().top,n=l();p=n.length?Math.max(0,e.getBoundingClientRect().bottom-t-c(n)):0;var r=n.filter(function(e){return e.getBoundingClientRect().bottom-t+p<=o}).length;return{n:Math.max(i,r),all:n.length}},g=l().length;if(n.onStart){u.__gripTemp=!0;try{n.onStart()}finally{u.__gripTemp=!1}}var _=l().length===g&&(!m.inFlight||m.inFlight()>0),v=parseInt(u.__getValue(`__maxCount`),10);if(v>0)return d(v,!0),!1;var y=Math.round(o)+`x`+s,b=u.__fitCache[y],x=h();if(b&&x.all>=b)return d(b,!0),!1;var S=function(e,t){if(d(e,!0),l().length===e)for(;e<t;){d(e+1,!0);var n=l();if(n.length!==e+1||c(n)+p>o){d(e,!0);break}e++}u.__fitCache[y]=e};if(x.n<x.all||!_)return S(x.n,x.all),!1;var C=new MutationObserver(function(){var e=h();e.n<e.all&&(C.disconnect(),clearTimeout(w),S(e.n,e.all),u.__fitDone())});C.observe(e,{childList:!0,subtree:!0});var w=setTimeout(function(){C.disconnect();var e=h();S(e.n,e.all),u.__fitDone()},1e3);return!0};if(f.restore=function(){var t=f.before;if(f.before=void 0,f.ran=!1,t===void 0||!e.isConnected)return!0;if(l().length<t)return!1;if(n.onStart){u.__gripTemp=!0;try{n.onStart()}finally{u.__gripTemp=!1}}return d(t,!0),!0},f.box=e,this.__fullFits=this.__fullFits.filter(function(e){return e.box.isConnected}).concat(f),r)return r;var p=function(t){e.style.height=``;var n=e.getBoundingClientRect().height;e.style.height=t+`px`,e.offsetHeight,e.style.transition=`height `+o+`ms ease-out`,e.style.height=n+`px`,setTimeout(function(){e.style.transition=``,e.style.height=``,e.style.overflow=``,e.style.boxSizing=``},o+30)};s.addEventListener(`dblclick`,function(){if(!u.fullSize){var t=n.setting||(u.getPreference(`count`)?`count`:u.getPreference(`limit`)?`limit`:null),r=t?u.getPreference(t):null,a=r?parseInt(r.defaultValue,10):NaN;if(!(a>0)||!n.onDone)return;var s=e.getBoundingClientRect().height;n.onStart&&n.onStart(),d(Math.max(i,a),!1),p(s);return}u.__deleteValue(`__maxCount`),f.ran=!1,setTimeout(function(){f.px!==void 0&&u.fullSize&&f(f.px,f.from)},o+60)});var h=function(){var t=a;if(a=null,document.body.classList.remove(`count-grip-dragging`),u.__relayGrip(null),t){var r=e.getBoundingClientRect().bottom-t.below,o=Math.max(i,l().filter(function(e){var t=e.getBoundingClientRect();return t.top+t.height/2<r}).length),s=e.getBoundingClientRect().height;n.onDone&&(d(o,u.fullSize),u.fullSize&&u.__setValue(`__maxCount`,String(o))),p(s)}};s.addEventListener(`pointerdown`,function(t){var r=l(),i=r[r.length-1];if(i&&t.button===0){t.preventDefault();try{s.setPointerCapture(t.pointerId)}catch{}var o=e.getBoundingClientRect();a={startY:t.clientY,startHeight:o.height,below:o.bottom-i.getBoundingClientRect().bottom,follow:u.__gripFollower(s,t.clientY,o.height)},u.fullSize&&f.before===void 0&&(f.before=r.length),e.style.boxSizing=`border-box`,e.style.height=o.height+`px`,e.style.overflow=`hidden`,e.style.transition=``,document.body.classList.add(`count-grip-dragging`),u.__relayGrip({move:g,end:h}),n.onStart&&n.onStart()}});var g=function(t){if(a){var n=l()[0],r=(n?n.getBoundingClientRect().bottom-e.getBoundingClientRect().top:0)+a.below;e.style.height=Math.max(r,a.follow.want(t))+`px`,a.follow.took(e.getBoundingClientRect().height)}};return s.addEventListener(`pointermove`,function(e){g(e.clientY)}),s.addEventListener(`pointerup`,h),s.addEventListener(`pointercancel`,h),s.release=function(){a&&h(),s.remove()},s},heightGrip:function(e,t,n){n||={};var r=this,i=n.min||80,a=null,o=null,s=null;t.style.overflowY=`auto`;var l=function(e){if(e===null){if(s===null)return;t.style.height=s,s=null,o&&(o.style.display=``);return}if(t.isConnected&&(s===null&&(s=t.style.height),o&&(o.style.display=`none`),!(Math.abs(e)<2))){var n=t.getBoundingClientRect().height+e;t.style.height=Math.max(i,Math.min(t.scrollHeight,n))+`px`}};if(this.__grows=this.__grows.filter(function(e){return e.scroller.isConnected}).concat(l),l.scroller=t,this.fullSize&&m.askRoom&&setTimeout(function(){m.askRoom()},0),this.environment&&this.environment.fit)return setTimeout(function(){var n=t.getBoundingClientRect().top-e.getBoundingClientRect().top;r.__available>0&&(t.style.height=Math.max(i,r.__available-n-8)+`px`)},0),null;var u=160,d=function(){if(!n.items)return[];var e=t.getBoundingClientRect().top-t.scrollTop;return Array.prototype.slice.call(t.querySelectorAll(n.items)).map(function(t){var n=t.getBoundingClientRect();return{top:n.top-e,bottom:n.bottom-e}})},f=function(e,t){var n=d(),r=-1;if(t||=0,!n.length)return Math.max(i,e);for(var a=0;a<n.length;a++)n[a].bottom>t&&(r<0||(n[a].top+n[a].bottom)/2<t+e)&&(r=a);return Math.max(i,Math.round(n[r].bottom-t))};n.height>0&&(t.style.height=f(Math.max(i,n.height))+`px`),o=c(e,`Drag to make the list taller or shorter`);var p=function(){r.__relayGrip(null);var e=a;if(a=null,document.body.classList.remove(`count-grip-dragging`),e){var i=d(),o=i.length?i[0].top:0,s=0;i.forEach(function(e){Math.abs(e.top-o-t.scrollTop)<Math.abs(s-t.scrollTop)&&(s=e.top-o)}),t.scrollTop=s;var c=f(t.getBoundingClientRect().height,t.scrollTop);t.style.transition=`height `+u+`ms ease-out`,t.style.height=c+`px`,setTimeout(function(){t.style.transition=``,n.onDone&&n.onDone(c)},u+30)}};o.addEventListener(`pointerdown`,function(e){if(e.button===0){e.preventDefault();try{o.setPointerCapture(e.pointerId)}catch{}var n=t.getBoundingClientRect().height;a={startY:e.clientY,startHeight:n,follow:r.__gripFollower(o,e.clientY,n)},document.body.classList.add(`count-grip-dragging`),r.__relayGrip({move:h,end:p})}});var h=function(e){if(a){var n=Math.max(i,t.scrollHeight);t.style.height=Math.min(n,Math.max(i,a.follow.want(e)))+`px`,a.follow.took(t.getBoundingClientRect().height)}};return o.addEventListener(`pointermove`,function(e){h(e.clientY)}),o.addEventListener(`pointerup`,p),o.addEventListener(`pointercancel`,p),o},__fitList:function(e,t,n){var r=this,i=n.min||1,a=!1,o=null,s=null,c=function(){return Array.prototype.slice.call(e.querySelectorAll(t))},l=function(){var t=(r.environment.inline?r.body:document.documentElement).getBoundingClientRect().top,n=c(),a=n[n.length-1],o=a?Math.max(0,e.getBoundingClientRect().bottom-a.getBoundingClientRect().bottom):0,s=n.filter(function(e){return e.getBoundingClientRect().bottom-t+o<=r.__available}).length;return{n:Math.max(i,s),all:n.length}},u=function(){clearTimeout(o),s&&s.disconnect(),s=null,a=!0;try{n.onDone&&n.onDone(l().n)}finally{a=!1}},d=function(){if(!r.fullSize&&r.__available&&e.isConnected){clearTimeout(o),s&&s.disconnect(),a=!0;try{n.onStart&&n.onStart()}finally{a=!1}var t=l();if(t.n<t.all)return u();s=new MutationObserver(function(){if(!a){var e=l();if(e.n<e.all)return u()}}),s.observe(e,{childList:!0,subtree:!0}),o=setTimeout(u,1500)}};return this.__fit=d,d(),{release:function(){clearTimeout(o),s&&s.disconnect(),r.__fit===d&&(r.__fit=null)}}},__setAvailable:function(e){e=Number(e),!(!(e>0)||Math.abs(e-(this.__available||0))<1)&&(this.__available=e,this.__fit&&this.__fit())},__keepsContent:function(){return this.__refreshAfterError||!(Date.now()<(this.__refreshUntil||0))||!this.body?!1:this.body.children.length>0&&!this.body.querySelector(`.loading`)},__fire:function(e,t,n){var r=e===`onLoad`||e===`onRefresh`;(e===`onLoad`||e===`onRefresh`)&&m.loading&&m.loading(!0),(e===`onRefresh`||e===`onLoad`&&this.__retrying)&&(this.__afterEdit||(this.__refreshUntil=Date.now()+3e4),this.__refreshAfterError=this.__errorBoxes().length>0,this.__refreshAfterError||(this.__retries=0),this.__errorBoxes().forEach(function(e){e.remove()}));for(var i=[],a=this.__uwaApi?[this[e],this.callbacks[e]]:[],o=0;o<a.length;o++)if(typeof a[o]==`function`)try{var s=a[o].call(n||this,t);r&&s&&typeof s.then==`function`&&i.push(s)}catch(e){S(e)}var c=!0,f=l[e];if(f&&this.__dispatch){var p=null;r&&typeof AbortController==`function`&&(this.__loadAbort&&this.__loadAbort.abort(),this.__loadAbort=new AbortController,p=this.__loadAbort.signal);var h=new d(f,{detail:t===void 0?null:t,cancelable:!!u[f],signal:p});r&&(h.__promises=[]),c=this.__dispatch(h),r&&(h.__promises.forEach(function(e){i.push(e.catch(S))}),h.__promises=null)}return i.length&&m.loading?Promise.allSettled(i).then(function(){m.loading(!1),m.bodyChanged&&m.bodyChanged()}):r&&!this.__uwaApi&&(m.loading&&m.loading(!1),m.bodyChanged&&m.bodyChanged()),c},__listens:function(e){return this.__uwaApi&&(typeof this[e]==`function`||typeof this.callbacks[e]==`function`)||(this.__listening?this.__listening(l[e]):!1)},__attach:function(e){this.__body=e,this.elements&&(this.elements.body=e)},__launch:function(){if(r.preferences&&(this.__preferences=r.preferences),e(_,r.metas||{}),b=null,this.__debug=_.debugMode===`true`,this.environment&&this.environment.inline||document.documentElement.classList.toggle(`uwa-cover`,/(^|[,;\s])viewport-fit\s*=\s*cover\b/i.test(_.viewport||``)),r.title&&(this.__title=r.title),r.renamed&&(this.__renamed=String(r.renamed)),this.__initPreferences(),_.autoRefresh&&this.setAutoRefresh(_.autoRefresh),this.__starting=!0,this.__fire(`onLoad`),this.__starting=!1,this.__staleFeeds){var t=this;setTimeout(function(){t.__staleFeeds=!1,t.__listens(`onRefresh`)?t.__fire(`onRefresh`):t.__fire(`onLoad`)},0)}this.__fire(`onLoadComplete`),this.__launched=!0,this.__resumeQueued&&this.__resumeAudio()},__readAll:function(e){if(e===!1){var t=Object.keys(this.__read);t.length&&this.setRead(t,!1),this.__paintRead&&this.__paintRead();return}var n=this.__uwaApi&&(typeof this.onReadAll==`function`||typeof this.callbacks.onReadAll==`function`);this.__fire(`onReadAll`)&&!n&&this.__readAllItems&&this.__readAllItems()},__resumeAudio:function(){this.__resumeQueued=!this.__launched,this.__launched&&this.__fire(`onAudioResume`)},__endEdit:function(e){var t=Array.isArray(e)?e.slice():[];if(!t.length||this.__fire(`__settingsChange`,{names:t})){this.__afterEdit=!0,this.__refreshUntil=0;try{this.__listens(`onRefresh`)?this.__fire(`onRefresh`):this.__fire(`onLoad`)}finally{this.__afterEdit=!1}}this.__fire(`onHideEdit`)},__retitle:function(e){if(e=e?String(e):``,e!==(this.__renamed||``)){var t=this.title;this.__renamed=e,this.title!==t&&this.__fire(`__settingsChange`,{names:[`title`]})&&(this.__refreshUntil=0,this.__listens(`onRefresh`)?this.__fire(`onRefresh`):this.__fire(`onLoad`))}},__applySettings:function(e){var t=[];for(var n in e)String(this.__getValue(n))!==String(e[n])&&t.push(n),this.__data[n]=e[n];this.__endEdit(t)},__errorBoxes:function(){var e=this.body&&this.body.parentNode;return Array.prototype.slice.call(e?e.querySelectorAll(`:scope > .uwa-error`):document.querySelectorAll(`.uwa-error`))},__retryLoad:function(){if(!(this.__retryTimer||this.__destroyed)){var e=this,t=[15,30,60,120,300],n=t[Math.min(this.__retries||0,t.length-1)]*1e3;this.__retries=(this.__retries||0)+1,this.__retryTimer=setTimeout(function(){if(e.__retryTimer=null,e.__destroyed||!e.__errorBoxes().length){e.__errorBoxes().length||(e.__retries=0);return}e.log(`trying again after a failed load`),e.__retrying=!0;try{e.__fire(e.__listens(`onRefresh`)?`onRefresh`:`onLoad`)}finally{e.__retrying=!1}},n)}},__destroy:function(){for(var e in this.__loadAbort&&this.__loadAbort.abort(),this.__destroyed=!0,this.__unwatchAudio&&this.__unwatchAudio(),this.__unwatchVideo&&this.__unwatchVideo(),this.__unwatchFull&&this.__unwatchFull(),this.__unwatchScreen&&this.__unwatchScreen(),this.__unwatchRoom&&this.__unwatchRoom(),clearTimeout(this.__retryTimer),this.__periodicals)this.clearPeriodical(e)}};function S(e){m.loading&&m.loading(!1),console.error(`[UWA]`,e);var t=document.createElement(`div`);t.className=`uwa-error`,t.textContent=typeof e==`string`?e:`Widget error: `+(e&&e.message?e.message:String(e));var n=x.body;n&&n.parentNode?n.parentNode.insertBefore(t,n):document.body.insertBefore(t,document.body.firstChild)}x.__showError=S,x.__uwaApi=n(r),x.__keptContent=x.keptContent,x.__keepContent=x.keepContent,x.__recall=x.recall,x.__remember=x.remember,x.__getStored=x.getStored,x.__setStored=x.setStored,x.__getValue=x.getValue,x.__getInt=x.getInt,x.__getBool=x.getBool,x.__setValue=x.setValue,x.__deleteValue=x.deleteValue;var C=function(e,t){var n=x.getPreference(String(e));if(!n&&t)throw TypeError(`widget.settings.`+t+`: no setting "`+e+`" in the widget's form`);return n},w=function(e){return String(e)===`title`&&!x.getPreference(`title`)},T=function(e){var t=(e==null?``:String(e)).replace(/\s+/g,` `).trim().slice(0,100),n=String(x.__title||``).replace(/<[^>]*>/g,``);x.__renamed=t&&t!==n?t:``,m.rename&&m.rename(x.__renamed)};x.settings=Object.freeze({get:function(e){if(w(e))return x.getTitle();var t=C(e);if(t){var n=x.__getValue(t.name);if(n??=t.defaultValue,t.type===`boolean`)return n===!0||n===`true`;if(t.type===`range`||t.type===`number`){var r=n===``||n==null?NaN:Number(n);return isFinite(r)?r:null}return n==null?``:String(n)}},set:function(e,t){if(w(e)){if(t!=null&&typeof t!=`string`)throw TypeError(`widget.settings.set: "title" is text`);return T(t)}var n=C(e,`set`);if(n.type===`boolean`){if(typeof t!=`boolean`)throw TypeError(`widget.settings.set: "`+n.name+`" is a checkbox: true or false`);t=t?`true`:`false`}else if(n.type===`range`||n.type===`number`){if(typeof t!=`number`||!isFinite(t))throw TypeError(`widget.settings.set: "`+n.name+`" is a number`);t=String(t)}else t=t==null?``:String(t);x.__setValue(n.name,t)},reset:function(e){if(w(e))return T(``);x.__deleteValue(C(e,`reset`).name)}}),x.refresh=function(){x.__destroyed||(x.__listens(`onRefresh`)?x.__fire(`onRefresh`):x.__fire(`onLoad`))};var E={content:!0,"uwa-feeds":!0},D=function(e,t,n){var r=function(e){if(e=String(e),n&&Object.prototype.hasOwnProperty.call(E,e))throw TypeError(`"`+e+`" is the runtime's own key`);return e},i=function(e){var t=JSON.stringify(e);if(t===void 0)throw TypeError(`A stored value must be JSON (not undefined or a function)`);return JSON.parse(t)};return Object.freeze({get:function(t){return new Promise(function(n){var a=e(r(t));n(a===void 0?void 0:i(a))})},set:function(e,n){return new Promise(function(a){t(r(e),i(n)),a()})},delete:function(e){return new Promise(function(n){t(r(e),void 0),n()})}})};if(x.storage=Object.freeze({memory:D(function(e){return x.__recall(e)},function(e,t){x.__remember(e,t)},!0),local:D(function(e){return x.__getStored(e)},function(e,t){x.__setStored(e,t)},!1)}),x.__uwaApi||(delete x.callback,delete x.setCallback,delete x.callbacks,delete x.loadContent,delete x.keptContent,delete x.keepContent,delete x.getValue,delete x.getInt,delete x.getBool,delete x.setValue,delete x.deleteValue,delete x.remember,delete x.recall,delete x.getStored,delete x.setStored,[`addPreference`,`apiVersion`,`data`,`debugMode`,`dir`,`elements`,`endEdit`,`initPreferences`,`isNew`,`launch`,`periodicals`,`readOnly`,`saveValues`,`searchResultCount`,`setCSS`,`setDebugMode`,`setMetas`,`setPreferences`,`unreadCount`].forEach(function(e){delete x[e]})),p(x,r,function(){return b||=f(JSON.parse(JSON.stringify(_)))}),d&&typeof EventTarget==`function`){var O=new EventTarget;Object.setPrototypeOf(x,EventTarget.prototype);var k={},A=function(e,t,n){for(var r=k[e]||[],i=0;i<r.length;i++)if(r[i].fn===t&&r[i].capture===n)return r[i];return null},j=function(e,t){var n=k[e]||[],r=n.indexOf(t);r>=0&&n.splice(r,1),O.removeEventListener(e,t.wrapped,t.capture)};x.addEventListener=function(e,t,n){if(!(!t||typeof t!=`function`&&typeof t.handleEvent!=`function`)){e=String(e);var r=typeof n==`boolean`?n:!!(n&&n.capture),i=n&&typeof n==`object`?n.signal:null,a=!!(n&&typeof n==`object`&&n.once),o=!!(n&&typeof n==`object`&&n.passive);if(!(i&&i.aborted||A(e,t,r))){var s={fn:t,capture:r};s.wrapped=function(n){a&&j(e,s);try{typeof t==`function`?t.call(x,n):t.handleEvent(n)}catch(e){S(e)}},(k[e]||(k[e]=[])).push(s),O.addEventListener(e,s.wrapped,{capture:r,passive:o}),i&&i.addEventListener(`abort`,function(){j(e,s)},{once:!0})}}},x.removeEventListener=function(e,t,n){var r=typeof n==`boolean`?n:!!(n&&n.capture),i=A(String(e),t,r);i&&j(String(e),i)},x.dispatchEvent=function(e){return O.dispatchEvent(e)},x.__dispatch=function(e){return O.dispatchEvent(e)},x.__listening=function(e){return!!(e&&k[e]&&k[e].length)}}return m.watchAudio&&(x.__unwatchAudio=m.watchAudio(function(e){x.__setAudioState(e)})),m.watchVideo&&(x.__unwatchVideo=m.watchVideo(function(e){x.__setVideoState(e)})),m.watchFull&&(x.__unwatchFull=m.watchFull(function(e){x.__setFullSize(e)})),m.watchScreen&&(x.__unwatchScreen=m.watchScreen(function(e,t){x.__setFullScreen(e,t)})),m.watchRoom&&(x.__unwatchRoom=m.watchRoom(function(e,t){x.__setRoom(e,t)})),h.Feeds={},h.Data=o(m,x,h),h.Content=y,m.addWidget||delete x.addWidget,x}var h=3e5,g=2592e6,_=[`version`,`title`,`home_page_url`,`feed_url`,`description`,`user_comment`,`next_url`,`icon`,`favicon`,`authors`,`language`,`expired`,`items`],v=[`id`,`url`,`external_url`,`title`,`content_html`,`content_text`,`summary`,`image`,`banner_image`,`date_published`,`date_modified`,`authors`,`tags`,`language`,`attachments`],y={VERSION:`https://jsonfeed.org/version/1.1`,feed:function(e){e||={};var t=b(e,_);return t.version=y.VERSION,t.items=(Array.isArray(e.items)?e.items:[]).map(y.item).filter(Boolean),t},item:function(e){if(!e||typeof e!=`object`)return null;var t=b(e,v);return(t.id==null||t.id===``)&&(t.id=t.url),t.id==null||t.id===``?null:(t.id=String(t.id),[`date_published`,`date_modified`].forEach(function(e){if(t[e]!=null){var n=new Date(t[e]);isNaN(n.getTime())?delete t[e]:t[e]=n.toISOString()}}),typeof t.authors==`string`&&(t.authors=[{name:t.authors}]),t)},author:function(e){var t=e&&e.authors&&e.authors[0];return t&&t.name||``},ext:function(e){return e&&e._myvibes||{}}};function b(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&e[r]!==void 0&&(t.indexOf(r)>=0||/^_[a-zA-Z]/.test(r))&&(n[r]=e[r]);return n}var x=window.UWA={};function S(e){this.module=e.module||window.widget,this.limit=Math.max(1,Number(e.limit)||10),this.offset=Math.max(0,Number(e.offset)||0),this.total=e.dataArray?e.dataArray.length:Number(e.total)||0,this.onChange=e.onChange||null}S.prototype.go=function(e){this.offset=e,this.onChange&&this.onChange.call(this,e)},S.prototype.getContent=function(){var e=this,n=Math.floor(this.offset/this.limit),r=Math.max(1,Math.ceil(this.total/this.limit)),a=i(`div`,{class:`nv-pager`});function o(n,r,a){var o=i(`a`,{href:`#`,class:a});return t.setText.call(o,n),o.addEventListener(`click`,function(t){t.preventDefault(),e.go(r)}),o}n>0&&a.appendChild(o(`« Previous`,(n-1)*this.limit,`prev`));var s=i(`span`,{class:`status`});return t.setText.call(s,n+1+` / `+r),a.appendChild(s),n+1<r&&a.appendChild(o(`Next »`,(n+1)*this.limit,`next`)),a};function C(e,t){window.widget=e,w(e)}function w(e){window.addEventListener(`error`,function(t){if(!/ResizeObserver loop/.test(String(t.message||``))){if(!t.error&&!t.filename&&!t.lineno)return console.warn(`[UWA] an error from a script not the widget’s:`,t.message);e.__showError(t.error||t.message)}}),window.addEventListener(`unhandledrejection`,function(t){e.__showError(t.reason)})}function T(e){var t=window.fetch?window.fetch.bind(window):null,n=window.open,r=E.dashboard;function i(e){if(!r)return null;try{var t=new URL(String(e),document.baseURI);return t.origin===r?t:null}catch{return null}}window.fetch=function(n,r){var a=i(n&&typeof n==`object`&&`url`in n?n.url:n);if(!a)return t(n,r);r||={};var o=new Headers(r.headers||n&&n.headers||{}),s=r.body;s!=null&&typeof s!=`string`&&(s=s instanceof URLSearchParams?s.toString():String(s));var c=o.get(`Content-Type`)||(r.body instanceof URLSearchParams?`application/x-www-form-urlencoded`:s==null?``:`text/plain`);return e.dashboardFetch({url:a.href,method:r.method||`GET`,body:s,contentType:c}).then(function(e){var t=Number(e.status)||500;return new Response(t===204||t===205||t===304?null:e.body,{status:t<200||t>599?500:t,headers:{"Content-Type":e.contentType||`text/plain`}})})},window.open=function(t,r,a){var o=i(t);return o?(e.openPopup(o.href,r?String(r):``,a?String(a):``),{closed:!1,close:function(){},focus:function(){}}):n.apply(window,arguments)}}var E=window.__UWA_CONFIG__;if(E){if(!window.__UWA_HOST__)var D=A();D&&T(D);var O=!1,k=m(E,window.__UWA_HOST__||D,x);Object.defineProperty(window,"__startside",{value:Object.freeze({attachBody:function(){k.__attach(document.getElementById(`moduleContent`))},start:function(){k.__launch()}})}),delete window.UWA,C(k,O)}function A(){var e={},t={},n=0;function r(e){e.uwa=E.instance,parent.postMessage(e,`*`)}window.addEventListener(`message`,function(n){if(n.source===parent){var s=n.data;if(s&&s.uwa===E.instance){if(s.type===`dashboardResponse`){var c=t[s.reqId];if(!c)return;delete t[s.reqId],s.ok?c.resolve(s.answer):c.reject(TypeError(s.error||`Failed to fetch`))}else if(s.type===`response`){var l=e[s.reqId];if(!l)return;delete e[s.reqId],s.ok?l.resolve(s.data):l.reject(Error(s.error))}else if(s.type===`refresh`)k.__listens(`onRefresh`)?k.__fire(`onRefresh`):k.__fire(`onLoad`);else if(s.type===`renamed`)k.__retitle(s.title);else if(s.type===`valueRefused`)console.warn(`settings.set("`+s.name+`"): not saved by the host, `+s.why+`. The widget keeps it until it reloads.`);else if(s.type===`prefsSaved`)k.__applySettings(s.values||{});else if(s.type===`gripMove`)k.__grip&&typeof s.y==`number`&&k.__grip.move(s.y);else if(s.type===`gripEnd`)k.__grip&&k.__grip.end();else if(s.type===`resize`)k.__fire(`onResize`);else if(s.type===`available`)k.__setAvailable(s.height);else if(s.type===`audioResumeAfterLoad`)k.__resumeAudio();else if(s.type===`audioState`)k.__setAudioState(s.state);else if(s.type===`videoState`)k.__setVideoState(s.state);else if(s.type===`fullSize`)k.__setFullSize(s.on);else if(s.type===`fullScreen`)k.__setFullScreen(s.on,s.whole);else if(s.type===`fullRoom`)k.__setRoom(s.px,s.from);else if(s.type===`measure`){var u=s.seq,d=!1,f=function(){d||(d=!0,r({type:`measured`,seq:u,height:document.documentElement.getBoundingClientRect().height,width:window.innerWidth}))};requestAnimationFrame(function(){requestAnimationFrame(f)}),setTimeout(f,100)}else if(s.type===`itemOpened`){if(typeof a==`function`)try{a(Number(s.index))}catch(e){k.__showError(e)}}else if(s.type===`readKeys`)k.__setReadKeys(s.keys);else if(s.type===`readAll`)k.__readAll(s.read!==!1);else if(s.type===`accent`)[`--accent`,`--accent-ink`,`--accent-glow`].forEach(function(e){var t=s.vars&&s.vars[e];typeof t==`string`&&/^#[\da-f]{3,8}$/i.test(t)&&document.documentElement.style.setProperty(e,t)});else if(s.type===`look`){var p=document.documentElement;p.classList.toggle(`uwa-neutral`,!!s.neutral),[`--module-color`,`--module-paper`,`--module-accent`].forEach(function(e){var t=s.vars&&s.vars[e];typeof t==`string`?p.style.setProperty(e,t):p.style.removeProperty(e)})}else if(/^audio(Stop|Resume|Volume|Next|Previous)$/.test(s.type)){var m={audioStop:i,audioResume:o.resume,audioVolume:o.setVolume,audioNext:o.next,audioPrevious:o.previous}[s.type];if(typeof m==`function`)try{m(Number(s.volume))}catch(e){k.__showError(e)}}}}});var i=null,a=null,o={},s=0;function c(){var e=Math.round(document.documentElement.getBoundingClientRect().height*100)/100;e!==s&&(s=e,r({type:`height`,height:e}))}var l=0;function u(){l||=setTimeout(function(){l=0,c()},250)}return window.addEventListener(`load`,c),window.addEventListener(`resize`,u),document.addEventListener(`load`,u,!0),document.addEventListener(`visibilitychange`,function(){document.hidden||c()}),document.fonts&&document.fonts.addEventListener&&document.fonts.addEventListener(`loadingdone`,u),document.addEventListener(`DOMContentLoaded`,function(){new ResizeObserver(c).observe(document.documentElement),new MutationObserver(u).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),typeof IntersectionObserver==`function`&&new IntersectionObserver(function(e){e.some(function(e){return e.isIntersecting})&&c()}).observe(document.documentElement),c()}),{bodyChanged:function(){setTimeout(c,0)},inFlight:function(){return Object.keys(e).length+Object.keys(t).length},request:function(t,i){return new Promise(function(a,o){var s=++n;e[s]={resolve:a,reject:o},r({type:`request`,reqId:s,kind:t,url:i})})},setTitle:function(e){r({type:`setTitle`,title:e})},setTitleLinks:function(e){r({type:`setTitleLinks`,parts:e})},setValue:function(e,t){r({type:`setValue`,name:e,value:t})},rename:function(e){r({type:`rename`,title:e})},deleteValue:function(e){r({type:`deleteValue`,name:e})},addWidget:E.noAdd?void 0:function(e){var t=e||{};return r({type:`addWidget`,spec:{file:String(t.file||``),title:t.title==null?void 0:String(t.title),values:t.values&&typeof t.values==`object`?JSON.parse(JSON.stringify(t.values)):void 0}}),!0},playVideo:function(e){var t=e||{};r({type:`playVideo`,video:{provider:String(t.provider||``),id:String(t.id||``),title:t.title==null?void 0:String(t.title),list:t.list==null?void 0:String(t.list),lang:t.lang==null?void 0:String(t.lang)}})},openURL:function(e){r({type:`openURL`,url:e})},openPreferences:function(){r({type:`openPreferences`})},gripDrag:function(e){r({type:`gripDrag`,on:!!e})},share:function(e){r({type:`share`,text:String(e&&e.text||``).slice(0,2e3),url:e&&e.url?String(e.url):``})},openItems:function(e,t,n){n||={},a=typeof n.onOpen==`function`?n.onOpen:null;var i=(Array.isArray(e)?e:[]).map(function(e){return e||={},{url:String(e.url||``),link:typeof e.link==`string`?e.link:void 0,title:String(e.title||``),content:typeof e.content==`string`?e.content:void 0,prefer:typeof e.prefer==`string`?e.prefer:void 0,truncated:e.truncated===!0||void 0,date:typeof e.date==`string`?e.date:void 0,summary:typeof e.summary==`string`?e.summary:void 0,read:e.read===!0||void 0,author:typeof e.author==`string`?e.author:void 0,excerpt:e.excerpt===!0||void 0,image:typeof e.image==`string`?e.image:void 0}}),o=Array.isArray(n.frameable)?n.frameable.map(String):void 0;r({type:`openItems`,items:i,index:Number(t),options:{prefer:n.prefer?String(n.prefer):void 0,frameable:o,onOpen:!!a}})},audioStarted:function(e,t){i=e,o=t||{},r({type:`audioStarted`,resume:!!o.resume,volume:!!o.setVolume,next:!!o.next,previous:!!o.previous,elsewhere:!!o.elsewhere})},audioStopped:function(){r({type:`audioStopped`})},playAudio:function(e){return r({type:`playAudio`,spec:e}),!0},pauseAudio:function(){r({type:`pauseAudio`})},seekAudio:function(e){r({type:`seekAudio`,seconds:e})},setChromeColor:function(e,t){r({type:`setChromeColor`,color:e,background:t})},openPhoto:function(e){r({type:`openPhoto`,spec:e&&{src:e.src,alt:e.alt,title:e.title,preview:e.preview,width:e.width,height:e.height,credit:e.credit}})},openFull:function(){r({type:`openFull`})},closeFull:function(){r({type:`closeFull`})},askRoom:function(){r({type:`askRoom`})},fitted:function(){r({type:`fitted`,height:document.documentElement.getBoundingClientRect().height})},setScreen:function(e){r({type:`setScreen`,on:e})},setIcon:function(e){r({type:`setIcon`,url:e})},audioInfo:function(e){r({type:`audioInfo`,info:e})},setRead:function(e,t){r({type:`setRead`,keys:e,read:t})},remember:function(e,t){r({type:`remember`,key:e,value:t})},setStored:function(e,t){r({type:`setStored`,key:e,value:t})},dashboardFetch:function(e){return new Promise(function(i,a){var o=++n;t[o]={resolve:i,reject:a},r({type:`dashboardFetch`,reqId:o,url:e.url,method:e.method,body:e.body,contentType:e.contentType})})},openPopup:function(e,t,n){r({type:`openPopup`,url:e,name:t,features:n})},prepareGoogle:function(){r({type:`prepareGoogle`})},connectGoogle:function(e){return new Promise(function(i,a){var o=++n;t[o]={resolve:i,reject:a},r({type:`connectGoogle`,reqId:o,scope:e&&e.scope,account:e&&e.account})})},autoRefresh:function(e){r({type:`autoRefresh`,minutes:e})},loading:function(e){r({type:`loading`,on:!!e})},setUnreadCount:function(e){r({type:`setUnreadCount`,count:e})},setMaxValue:function(e,t){r({type:`setMaxValue`,name:e,max:t})}}}})())})();
|