compost-jekyll-theme 0.3.3 → 0.3.5
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.
- checksums.yaml +4 -4
- data/_data/activity_pub.yml +8 -0
- data/_data/en.yml +2 -0
- data/_data/es.yml +2 -0
- data/_data/layouts/theme.yml +20 -1
- data/_data/manifest.json +8 -8
- data/_includes/activity_pub/actor.html +2 -2
- data/_includes/activity_pub/actor_mention.html +1 -1
- data/_includes/activity_pub/image_modal.html +1 -1
- data/_includes/activity_pub/login_modal.html +39 -40
- data/_includes/author_block.html +3 -1
- data/_includes/external_link.html +1 -0
- data/_layouts/author.html +47 -0
- data/_layouts/back_cover.html +1 -1
- data/_layouts/home.html +4 -2
- data/_layouts/post.html +1 -1
- data/_sass/utilities.scss +5 -0
- data/assets/js/{pack.3KYIYXYU.js → pack.YXAD762X.js} +2 -2
- data/assets/js/{pack.3KYIYXYU.js.map → pack.YXAD762X.js.map} +2 -2
- metadata +7 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9a41515272ee5ed385b4f6a340c16b9e74ea2057d17dce7a1af9da793a2f7c60
|
|
4
|
+
data.tar.gz: b78d7d977e8ec7ee58dbfec053a6ac7d5440f05163ae515a851a6e37791a62b6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ad39b06553014230bac28353a2320bb9ad8573cd423dc884c425ac75ebeba6167782ca43022e5d32bd9957bfba67db737fedbf87420684ea68f4adc23b26aa98
|
|
7
|
+
data.tar.gz: 9dd0a6625beb871418b123255e836a0a97e5861a851bdfe4827a9fb12e9f0cf9f1313ee570656dcfde1966ef700732ef49a65a8ac5fe184de112ecc77aaf6a33
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
notifications:
|
|
3
|
+
qubit-guarantee.jsonld:
|
|
4
|
+
action: create
|
|
5
|
+
id: https://compost.testing.sutty.nl/qubit-guarantee.jsonld
|
|
6
|
+
actor_url: https://compost.testing.sutty.nl/about.jsonld
|
|
7
|
+
actor: "@compost@compost.testing.sutty.nl"
|
|
8
|
+
public_key_url: https://compost.testing.sutty.nl/about.jsonld#main-key
|
data/_data/en.yml
CHANGED
data/_data/es.yml
CHANGED
data/_data/layouts/theme.yml
CHANGED
|
@@ -227,7 +227,7 @@ body_image:
|
|
|
227
227
|
path:
|
|
228
228
|
label:
|
|
229
229
|
es: "Imagen de fondo del sitio"
|
|
230
|
-
en: "Site
|
|
230
|
+
en: "Site's background image"
|
|
231
231
|
help:
|
|
232
232
|
es: ""
|
|
233
233
|
en: ""
|
|
@@ -238,6 +238,25 @@ body_image:
|
|
|
238
238
|
help:
|
|
239
239
|
es: ""
|
|
240
240
|
en: ""
|
|
241
|
+
divider_image:
|
|
242
|
+
type: "image"
|
|
243
|
+
path:
|
|
244
|
+
label:
|
|
245
|
+
es: "Imagen del separador"
|
|
246
|
+
en: "Divider image"
|
|
247
|
+
help:
|
|
248
|
+
es: "Separa el contenido del inicio de la lista de artículos"
|
|
249
|
+
en: "Separates home content from article list"
|
|
250
|
+
support_image:
|
|
251
|
+
type: "image"
|
|
252
|
+
path:
|
|
253
|
+
label:
|
|
254
|
+
es: "Imagen del botón de donaciones"
|
|
255
|
+
en: "Donations button image"
|
|
256
|
+
description:
|
|
257
|
+
label:
|
|
258
|
+
es: "Descripción de la imagen"
|
|
259
|
+
en: "Image description"
|
|
241
260
|
locales:
|
|
242
261
|
type: "locales"
|
|
243
262
|
label:
|
data/_data/manifest.json
CHANGED
|
@@ -1216,7 +1216,7 @@
|
|
|
1216
1216
|
"format": "esm"
|
|
1217
1217
|
},
|
|
1218
1218
|
"_packs/controllers/authorize_interaction_controller.js": {
|
|
1219
|
-
"bytes":
|
|
1219
|
+
"bytes": 1561,
|
|
1220
1220
|
"imports": [
|
|
1221
1221
|
{
|
|
1222
1222
|
"path": "node_modules/.pnpm/@hotwired+stimulus@3.2.2/node_modules/@hotwired/stimulus/dist/stimulus.js",
|
|
@@ -1248,7 +1248,7 @@
|
|
|
1248
1248
|
"format": "esm"
|
|
1249
1249
|
},
|
|
1250
1250
|
"_packs/entry.js": {
|
|
1251
|
-
"bytes":
|
|
1251
|
+
"bytes": 2152,
|
|
1252
1252
|
"imports": [
|
|
1253
1253
|
{
|
|
1254
1254
|
"path": "node_modules/.pnpm/device-detector-js@3.0.3/node_modules/device-detector-js/dist/index.js",
|
|
@@ -1315,13 +1315,13 @@
|
|
|
1315
1315
|
}
|
|
1316
1316
|
},
|
|
1317
1317
|
"outputs": {
|
|
1318
|
-
"assets/js/pack.
|
|
1318
|
+
"assets/js/pack.YXAD762X.js.map": {
|
|
1319
1319
|
"imports": [],
|
|
1320
1320
|
"exports": [],
|
|
1321
1321
|
"inputs": {},
|
|
1322
|
-
"bytes":
|
|
1322
|
+
"bytes": 2479110
|
|
1323
1323
|
},
|
|
1324
|
-
"assets/js/pack.
|
|
1324
|
+
"assets/js/pack.YXAD762X.js": {
|
|
1325
1325
|
"imports": [],
|
|
1326
1326
|
"exports": [],
|
|
1327
1327
|
"entryPoint": "_packs/entry.js",
|
|
@@ -1489,7 +1489,7 @@
|
|
|
1489
1489
|
"bytesInOutput": 4705
|
|
1490
1490
|
},
|
|
1491
1491
|
"_packs/entry.js": {
|
|
1492
|
-
"bytesInOutput":
|
|
1492
|
+
"bytesInOutput": 1035
|
|
1493
1493
|
},
|
|
1494
1494
|
"node_modules/.pnpm/promise-polyfill@8.3.0/node_modules/promise-polyfill/src/finally.js": {
|
|
1495
1495
|
"bytesInOutput": 200
|
|
@@ -1606,13 +1606,13 @@
|
|
|
1606
1606
|
"bytesInOutput": 1615
|
|
1607
1607
|
},
|
|
1608
1608
|
"_packs/controllers/authorize_interaction_controller.js": {
|
|
1609
|
-
"bytesInOutput":
|
|
1609
|
+
"bytesInOutput": 926
|
|
1610
1610
|
},
|
|
1611
1611
|
"_packs/controllers/tabs_controller.js": {
|
|
1612
1612
|
"bytesInOutput": 431
|
|
1613
1613
|
}
|
|
1614
1614
|
},
|
|
1615
|
-
"bytes":
|
|
1615
|
+
"bytes": 853794
|
|
1616
1616
|
}
|
|
1617
1617
|
}
|
|
1618
1618
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
{% endcomment %}
|
|
6
6
|
|
|
7
7
|
{% if include.actor.available %}
|
|
8
|
-
<span>{{ include.actor.name | strip_html }}</span>
|
|
8
|
+
<span class="break-wrap">{{ include.actor.name | strip_html }}</span>
|
|
9
9
|
{% else %}
|
|
10
|
-
<span>{{ include.actor }}</span>
|
|
10
|
+
<span class="break-wrap">{{ include.actor }}</span>
|
|
11
11
|
{% endif %}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
@param :image [Image] la imagen que queremos en el modal, contiene url y alt text
|
|
5
5
|
{%- endcomment -%}
|
|
6
6
|
|
|
7
|
+
{% assign extra = 'data-action="click->modal#show"' %}
|
|
7
8
|
{% assign alt = include.image.name | strip_html | escape %}
|
|
8
9
|
{% assign src = include.image.url | strip_html | uri_escape %}
|
|
9
|
-
{% assign extra = 'data-action="click->modal#show"' %}
|
|
10
10
|
|
|
11
11
|
{% capture body %}
|
|
12
12
|
<img class="background-white mw-100" title="{{ alt }}" alt="{{ alt }}" src="{{ src }}">
|
|
@@ -14,52 +14,51 @@
|
|
|
14
14
|
{% endcapture %}
|
|
15
15
|
|
|
16
16
|
{% capture header %}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</div>
|
|
17
|
+
|
|
18
|
+
<div class="d-flex align-items-center h1 justify-content-center w-100">
|
|
19
|
+
<span class="d-flex responsive-header font-weight-bold text-center">
|
|
20
|
+
<i class="fa fa-{{fa}} text-primary mr-2"></i>
|
|
21
|
+
<span class="break-wrap">{{ site.i18n.login_modal[action.title].text | replace: "$usuarie", name }}</span>
|
|
22
|
+
<div>
|
|
23
|
+
<span class="px-3 py-2 m-0 h1" type="button" data-action="click->modal#hide">×</span>
|
|
24
|
+
<span class="sr-only">{{ site.i18n.close }}</span>
|
|
25
|
+
</div>
|
|
26
|
+
</span>
|
|
27
|
+
</div>
|
|
29
28
|
{% endcapture %}
|
|
30
29
|
|
|
31
30
|
{% capture body %}
|
|
32
|
-
<p class="mb-2">{{site.i18n.login_modal.top_text | markdownify | replace: "$action", site.i18n.login_modal[action.title].title }}</p>
|
|
33
|
-
<div class="mt-3 mb-2 h5">{{site.i18n.login_modal.question | markdownify}}</div>
|
|
34
|
-
<div class="mb-3">
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
31
|
+
<p class="mb-2">{{site.i18n.login_modal.top_text | markdownify | replace: "$action", site.i18n.login_modal[action.title].title }}</p>
|
|
32
|
+
<div class="mt-3 mb-2 h5">{{site.i18n.login_modal.question | markdownify}}</div>
|
|
33
|
+
<div class="mb-3">
|
|
34
|
+
<form
|
|
35
|
+
class="needs-validation"
|
|
36
|
+
data-controller="authorize-interaction"
|
|
37
|
+
data-action="authorize-interaction#submit:prevent"
|
|
38
|
+
data-authorize-interaction-uri-value="{{ include.uri | strip_html | absolute_url | uri_escape }}"
|
|
39
|
+
>
|
|
40
|
+
<div class="form-row align-items-center border-lg border-lg-primary py-1">
|
|
41
|
+
<div class="col-12 col-lg mb-1 mb-lg-0">
|
|
42
|
+
<label class="sr-only">{{site.i18n.login_modal.placeholder}}</label>
|
|
43
|
+
<input
|
|
44
|
+
class="form-control border border-primary border-lg-0"
|
|
45
|
+
placeholder="{{site.i18n.login_modal.placeholder}}"
|
|
46
|
+
autocomplete="impp"
|
|
47
|
+
required
|
|
48
|
+
data-authorize-interaction-target="instance"
|
|
49
|
+
data-action="authorize-interaction#revalid"
|
|
50
|
+
type="search">
|
|
51
|
+
<div class="invalid-feedback">
|
|
52
|
+
{{- site.i18n.login_modal.authorize_interaction_unsupported -}}
|
|
53
|
+
</div>
|
|
54
54
|
</div>
|
|
55
|
-
</div>
|
|
56
55
|
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
<div class="col-12 col-lg-auto">
|
|
57
|
+
<button class="btn btn-primary btn-block py-btn-padding-y lh-btn-line-height f-16 font-weight-bold" type="submit">{{ site.i18n.take_me_home }}</button>
|
|
58
|
+
</div>
|
|
59
59
|
</div>
|
|
60
|
-
</
|
|
61
|
-
</
|
|
62
|
-
</div>
|
|
60
|
+
</form>
|
|
61
|
+
</div>
|
|
63
62
|
<small class="d-block mb-2">{{site.i18n.login_modal.small_text}}</small>
|
|
64
63
|
<span>{{site.i18n.login_modal.bottom_text | markdownify}}</span>
|
|
65
64
|
{% endcapture %}
|
data/_includes/author_block.html
CHANGED
|
@@ -11,7 +11,9 @@ Author block
|
|
|
11
11
|
{% unless links == empty %}
|
|
12
12
|
<div class="">
|
|
13
13
|
<div class="py-3">
|
|
14
|
-
|
|
14
|
+
<a href="{{include.title.url}}" class="hover-black">
|
|
15
|
+
{% include headings/h3.html text=include.title.alias class="black source-serif font-weight-bold" %}
|
|
16
|
+
</a>
|
|
15
17
|
</div>
|
|
16
18
|
|
|
17
19
|
{% unless links == empty %}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: "default_with_menu"
|
|
3
|
+
---
|
|
4
|
+
{%- assign theme = site.posts | find: 'layout', 'theme' -%}
|
|
5
|
+
|
|
6
|
+
<div class="pt-md-80 px-3">
|
|
7
|
+
<div class="container-lg mx-auto">
|
|
8
|
+
<div class="d-flex flex-column align-items-center">
|
|
9
|
+
<h1 class="font-weight-bold mb-4">{{ page.title }}</h1>
|
|
10
|
+
<div class="{% unless theme.divider_image.path %} mb-5 {% endunless %} lead-md">
|
|
11
|
+
<div class="content">
|
|
12
|
+
{{ page.content }}
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
{% unless page.projects == empty %}
|
|
17
|
+
<h2 class="font-weight-bold mb-3">{{ site.i18n.projects }}</h2>
|
|
18
|
+
{% for project in page.projects %}
|
|
19
|
+
{% assign href = project %}
|
|
20
|
+
{% include external_link.html href=href class='' text=href %}
|
|
21
|
+
{% endfor %}
|
|
22
|
+
{% endunless %}
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
{% if theme.divider_image.path %}
|
|
26
|
+
{% include divider.html src=theme.divider_image.path alt=site.i18n.divider %}
|
|
27
|
+
{% else %}
|
|
28
|
+
<hr class="my-5">
|
|
29
|
+
{% endif %}
|
|
30
|
+
|
|
31
|
+
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 container-lg mx-auto">
|
|
32
|
+
{% for post in page.posts %}
|
|
33
|
+
<div class="col pb-5 px-2">
|
|
34
|
+
{%
|
|
35
|
+
include cover_post/home.html
|
|
36
|
+
authors=post.authors
|
|
37
|
+
src=post.image.path
|
|
38
|
+
alt=post.title
|
|
39
|
+
title=post.title
|
|
40
|
+
description=post.description
|
|
41
|
+
href=post.url
|
|
42
|
+
%}
|
|
43
|
+
</div>
|
|
44
|
+
{% endfor %}
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
data/_layouts/back_cover.html
CHANGED
|
@@ -23,7 +23,7 @@ layout: "default_with_menu"
|
|
|
23
23
|
|
|
24
24
|
{% unless authors == empty %}
|
|
25
25
|
{% for author in authors %}
|
|
26
|
-
{% include author_block.html title=author
|
|
26
|
+
{% include author_block.html title=author links=author.projects %}
|
|
27
27
|
{% endfor %}
|
|
28
28
|
{% endunless %}
|
|
29
29
|
|
data/_layouts/home.html
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
layout: "default_with_menu"
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
+
{%- assign theme = site.posts | find: "layout", "theme" -%}
|
|
5
6
|
{%- assign front_cover = site.posts | find: "layout", "front_cover" -%}
|
|
6
7
|
{%- assign posts = site.posts | where: "layout", "post" -%}
|
|
7
8
|
{%- assign back_cover = site.posts | find: "layout", "back_cover" -%}
|
|
@@ -14,8 +15,9 @@ layout: "default_with_menu"
|
|
|
14
15
|
subtitle=front_cover.subtitle
|
|
15
16
|
content=front_cover.content
|
|
16
17
|
%}
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
{% if theme.divider_image.path %}
|
|
19
|
+
{% include divider.html src=theme.divider_image.path alt=site.i18n.divider %}
|
|
20
|
+
{% endif %}
|
|
19
21
|
|
|
20
22
|
<article class="row row-cols-1 row-cols-md-2 row-cols-lg-3 container-lg mx-auto">
|
|
21
23
|
{% for post in posts %}
|
data/_layouts/post.html
CHANGED
|
@@ -27,7 +27,7 @@ layout: "default_with_menu"
|
|
|
27
27
|
{% unless page.authors == empty %}
|
|
28
28
|
<p class="lead text-uppercase letter-spacing-5">
|
|
29
29
|
{% for author in page.authors %}
|
|
30
|
-
{{ author.title -}}
|
|
30
|
+
<a href="{{author.url}}">{{ author.title -}}</a>
|
|
31
31
|
{%- unless forloop.last %} {{ site.i18n.and }} {% endunless %}
|
|
32
32
|
{% endfor %}
|
|
33
33
|
</p>
|
data/_sass/utilities.scss
CHANGED
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
|
|
37
37
|
%o
|
|
38
38
|
|
|
39
|
-
%o`,r,e,t),(i=window.onerror)===null||i===void 0||i.call(window,r,"",0,0,e)}logFormattedMessage(e,r,t={}){t=Object.assign({application:this},t),this.logger.groupCollapsed(`${e} #${r}`),this.logger.log("details:",Object.assign({},t)),this.logger.groupEnd()}};function Rm(){return new Promise(o=>{document.readyState=="loading"?document.addEventListener("DOMContentLoaded",()=>o()):o()})}function Xm(o){return sr(o,"classes").reduce((r,t)=>Object.assign(r,Vm(t)),{})}function Vm(o){return{[`${o}Class`]:{get(){let{classes:e}=this;if(e.has(o))return e.get(o);{let r=e.getAttributeName(o);throw new Error(`Missing attribute "${r}"`)}}},[`${o}Classes`]:{get(){return this.classes.getAll(o)}},[`has${dr(o)}Class`]:{get(){return this.classes.has(o)}}}}function Hm(o){return sr(o,"outlets").reduce((r,t)=>Object.assign(r,km(t)),{})}function Aa(o,e,r){return o.application.getControllerForElementAndIdentifier(e,r)}function $a(o,e,r){let t=Aa(o,e,r);if(t||(o.application.router.proposeToConnectScopeForElementAndIdentifier(e,r),t=Aa(o,e,r),t))return t}function km(o){let e=ct(o);return{[`${e}Outlet`]:{get(){let r=this.outlets.find(o),t=this.outlets.getSelectorForOutletName(o);if(r){let i=$a(this,r,o);if(i)return i;throw new Error(`The provided outlet element is missing an outlet controller "${o}" instance for host controller "${this.identifier}"`)}throw new Error(`Missing outlet element "${o}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${t}".`)}},[`${e}Outlets`]:{get(){let r=this.outlets.findAll(o);return r.length>0?r.map(t=>{let i=$a(this,t,o);if(i)return i;console.warn(`The provided outlet element is missing an outlet controller "${o}" instance for host controller "${this.identifier}"`,t)}).filter(t=>t):[]}},[`${e}OutletElement`]:{get(){let r=this.outlets.find(o),t=this.outlets.getSelectorForOutletName(o);if(r)return r;throw new Error(`Missing outlet element "${o}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${t}".`)}},[`${e}OutletElements`]:{get(){return this.outlets.findAll(o)}},[`has${dr(e)}Outlet`]:{get(){return this.outlets.has(o)}}}}function Um(o){return sr(o,"targets").reduce((r,t)=>Object.assign(r,Km(t)),{})}function Km(o){return{[`${o}Target`]:{get(){let e=this.targets.find(o);if(e)return e;throw new Error(`Missing target element "${o}" for "${this.identifier}" controller`)}},[`${o}Targets`]:{get(){return this.targets.findAll(o)}},[`has${dr(o)}Target`]:{get(){return this.targets.has(o)}}}}function Wm(o){let e=Lm(o,"values"),r={valueDescriptorMap:{get(){return e.reduce((t,i)=>{let l=La(i,this.identifier),a=this.data.getAttributeNameForKey(l.key);return Object.assign(t,{[a]:l})},{})}}};return e.reduce((t,i)=>Object.assign(t,Qm(i)),r)}function Qm(o,e){let r=La(o,e),{key:t,name:i,reader:l,writer:a}=r;return{[i]:{get(){let n=this.data.get(t);return n!==null?l(n):r.defaultValue},set(n){n===void 0?this.data.delete(t):this.data.set(t,a(n))}},[`has${dr(i)}`]:{get(){return this.data.has(t)||r.hasCustomDefaultValue}}}}function La([o,e],r){return Jm({controller:r,token:o,typeDefinition:e})}function Zr(o){switch(o){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function nr(o){switch(typeof o){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(o))return"array";if(Object.prototype.toString.call(o)==="[object Object]")return"object"}function Zm(o){let{controller:e,token:r,typeObject:t}=o,i=ha(t.type),l=ha(t.default),a=i&&l,n=i&&!l,d=!i&&l,m=Zr(t.type),g=nr(o.typeObject.default);if(n)return m;if(d)return g;if(m!==g){let u=e?`${e}.${r}`:r;throw new Error(`The specified default value for the Stimulus Value "${u}" must match the defined type "${m}". The provided default value of "${t.default}" is of type "${g}".`)}if(a)return m}function Ym(o){let{controller:e,token:r,typeDefinition:t}=o,l=Zm({controller:e,token:r,typeObject:t}),a=nr(t),n=Zr(t),d=l||a||n;if(d)return d;let m=e?`${e}.${t}`:r;throw new Error(`Unknown value type "${m}" for "${r}" value`)}function zm(o){let e=Zr(o);if(e)return Ma[e];let r=xt(o,"default"),t=xt(o,"type"),i=o;if(r)return i.default;if(t){let{type:l}=i,a=Zr(l);if(a)return Ma[a]}return o}function Jm(o){let{token:e,typeDefinition:r}=o,t=`${_a(e)}-value`,i=Ym(o);return{type:i,key:t,name:Ct(t),get defaultValue(){return zm(r)},get hasCustomDefaultValue(){return nr(r)!==void 0},reader:qm[i],writer:Ta[i]||Ta.default}}var Ma={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},qm={array(o){let e=JSON.parse(o);if(!Array.isArray(e))throw new TypeError(`expected value of type "array" but instead got value "${o}" of type "${nr(e)}"`);return e},boolean(o){return!(o=="0"||String(o).toLowerCase()=="false")},number(o){return Number(o.replace(/_/g,""))},object(o){let e=JSON.parse(o);if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected value of type "object" but instead got value "${o}" of type "${nr(e)}"`);return e},string(o){return o}},Ta={default:jm,array:Pa,object:Pa};function Pa(o){return JSON.stringify(o)}function jm(o){return`${o}`}var _=class{constructor(e){this.context=e}static get shouldLoad(){return!0}static afterLoad(e,r){}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(e,{target:r=this.element,detail:t={},prefix:i=this.identifier,bubbles:l=!0,cancelable:a=!0}={}){let n=i?`${i}:${e}`:e,d=new CustomEvent(n,{detail:t,bubbles:l,cancelable:a});return r.dispatchEvent(d),d}};_.blessings=[Xm,Um,Wm,Hm];_.targets=[];_.outlets=[];_.values={};var Yr=class extends _{toggle(o){o.target.checked?(document.body.style.overflowY="hidden",this.element.style.overflowY="scroll",this.element.style.minHeight="100vh"):(document.body.style.overflowY="scroll",this.element.style.overflowY="",this.element.style.minHeight="")}};var mr=class extends _{connect(){this.element.style.zIndex=1e4,this.clientNameTarget.innerText=window.device.client.name,this.clientVersionTarget.innerText=window.device.client.version,this.osNameTarget.innerText=window.device.os.name,this.osVersionTarget.innerText=window.device.os.version,this.deviceTypeTarget.innerText=window.device.device.type,this.viewportWidthTarget.innerText=window.innerWidth,this.viewportHeightTarget.innerText=window.innerHeight,this.devicePixelRatioTarget.innerText=window.devicePixelRatio}resized(o){this.viewportWidthTarget.innerText=window.innerWidth,this.viewportHeightTarget.innerText=window.innerHeight}outline(o){let e=document.head.querySelector("style#outline");e?e.remove():(e=document.createElement("style"),e.id="outline",e.append("* { outline: 1px solid pink }"),document.head.appendChild(e))}toggleHelp(o){this.helpTarget.hidden=!this.helpTarget.hidden}};f(mr,"targets",["clientName","clientVersion","osName","osVersion","viewportWidth","viewportHeight","devicePixelRatio","deviceType","help"]);var be=class extends _{async copy(o){if(!("clipboard"in navigator))return;try{await navigator.clipboard.writeText(this.textValue.trim())}catch(r){console.error("Couldn't copy",r);return}let e=this.hasTextTarget?"textTarget":"element";this[e].innerText=this.confirmationValue,this.hasIconTarget&&this.iconTarget.classList.add("d-none"),this.hasConfirmationIconTarget&&this.confirmationIconTarget.classList.remove("d-none")}};f(be,"targets",["text","icon","confirmationIcon"]),f(be,"values",{text:String,confirmation:String});var me=class extends _{connect(){this.originalFootnotes=[],this.createFootnotes()}resize(o=void 0){if(this.sidenotesArePossible===void 0)return;this.offsetTopValue=0;let e=this.sidenotesArePossible,r=this.areSidenotesPossible;if(e&&r)for(let t of this.footnoteTargets)this.positionSidenote(t);else{let t=Array.from(this.footnoteTargets);for(let i in this.footnoteTargets)t[i].outerHTML=this.originalFootnotes[i];this.originalFootnotes=[],this.createFootnotes()}}createFootnotes(){let o=this.element.querySelectorAll("a[id^=fn]"),e=this.element.querySelectorAll("li[id^=fn]");this.sidenotesArePossible=this.areSidenotesPossible;for(let r in Array.from(o)){let t=o[r],i=e[r],l=i.querySelector("a[role=doc-backlink]");this.originalFootnotes.push(i.outerHTML),t.dataset.footnote=i.id,t.dataset.turbo="false",t.dataset.footnotesTarget="reference",l&&(l.dataset.turbo="false"),i.dataset.reference=t.id,setTimeout(()=>i.dataset.footnotesTarget="footnote",1+r)}}footnoteTargetConnected(o){let e=this.referenceTargets.find(r=>r.id===o.dataset.reference);if(o.style.listStylePosition="inside",this.sidenotesArePossible)this.positionSidenote(o,e);else{o.dataset.action="blur->footnotes#hide",o.classList.add(...this.footnoteToggledClasses),o.classList.add(...this.footnoteClasses),o.style.bottom=0,o.style.left=0,o.style.zIndex=1,o.dataset.height=o.offsetHeight,o.style.height=0,o.classList.add("collapsing"),o.classList.remove(...this.footnoteToggledClasses);let r=o.querySelector("a[role=doc-backlink]");r&&(r.style.display="none"),e.dataset.action="footnotes#show",e.dataset.footnotesReferenceParam=e.id,e.dataset.footnotesFootnoteParam=o.id}}get areSidenotesPossible(){let o=document.body.offsetWidth,e=this.containerWidthValue+this.paddingLeftValue+this.sidenoteWidthValue*2;return o>e}positionSidenote(o,e=void 0){e||(e=this.referenceTargets.find(l=>l.id===o.dataset.reference));let r=o.querySelector("a[role=doc-backlink]"),t=Math.max(e.offsetTop,this.offsetTopValue),i=this.element.offsetLeft+this.element.offsetWidth+this.paddingLeftValue;o.style.top=`${t}px`,o.style.left=`${i}px`,o.classList.add(...this.sidenoteClasses),o.dataset.action="",e.dataset.action="",r&&(r.style.display=""),this.offsetTopValue=t+o.offsetHeight+this.minSpacingValue}show(o){let e=this.footnoteTargets.find(r=>r.id===o.params.footnote);o.preventDefault(),this.hide(),e.style.height=`${e.dataset.height}px`,e.classList.add(...this.footnoteToggledClasses),e.setAttribute("role","alert"),e.setAttribute("tabindex","0"),e.focus()}hide(o=void 0){for(let e of this.footnoteTargets)e.style.height=0,e.classList.remove(...this.footnoteToggledClasses),e.setAttribute("role","")}};f(me,"targets",["footnote","reference"]),f(me,"classes",["footnote","footnoteToggled","sidenote"]),f(me,"values",{minSpacing:{type:Number,default:20},offsetTop:{type:Number,default:0},containerWidth:{type:Number,default:780},sidenoteWidth:{type:Number,default:220},paddingLeft:{type:Number,default:16}});var fe=class extends _{async connect(){if(!this.monetizationUrlValue)return;try{let i=new URL(this.monetizationUrlValue);window.location.protocol!==i.protocol&&(i.protocol=this.protocol,this.monetizationUrlValue=i.toString())}catch{console.error("Not a valid URL",this.monetizationUrlValue);return}let o=await this.fetchBalances();if(!o)return;let e=o.balance.length-o.decimal,r=`${o.balance.slice(0,e)}.${o.balance.slice(e)}`,t=document.querySelector("html").lang;for(let i of this.goalTargets){let l=parseFloat(i.getAttribute("aria-valuemax")??"0"),a=Math.min(100,r/l*100);i.style.width=`${a}%`,i.setAttribute("aria-valuenow",r)}if(this.hasBalanceTarget){let i="currency",l=o.currency,a=new Intl.NumberFormat(t,{style:i,currency:l});this.balanceTarget.innerText=a.format(r)}if(this.hasDateTarget){let i=new Date(o.timestamp),l=new Intl.DateTimeFormat(t,{dateStyle:"full"});this.dateTarget.innerText=l.format(i)}}async fetchBalances(){try{return await(await fetch(this.monetizationUrlValue)).json()}catch(o){return console.error("Couldn't fetch",this.monetizationUrlValue,o),null}}get protocol(){return window.location.protocol==="ipfs:"?"ipns:":window.location.protocol}};f(fe,"targets",["goal","balance","date"]),f(fe,"values",{monetizationUrl:String});var gr=class extends _{showAnother(o=void 0){if(o?.preventDefault(),!o.params.show){console.error("data-modal-show-param attribute missing",o.target);return}o.target.id||console.error("id attribute missing, focus won't be re-assigned when modal is closed",o.target),window.dispatchEvent(new CustomEvent("modal:show",{detail:{id:o.params.show,previousFocus:o.target.id}}))}show(o=void 0){o?.preventDefault();let e=o?.detail?.id;e&&this.element.id!==e||(this.modalTarget.style.display="block",this.backdropTarget.style.display="block",this.modalTarget.setAttribute("role","dialog"),this.modalTarget.setAttribute("aria-modal",!0),this.modalTarget.removeAttribute("aria-hidden"),window.document.body.classList.add("modal-open"),o?.detail?.previousFocus?this.previousFocus=window.document.getElementById(o.detail.previousFocus):this.previousFocus=o?.target,setTimeout(()=>{this.modalTarget.classList.add("show"),this.backdropTarget.classList.add("show"),this.modalTarget.focus()},1))}hideWithEscape(o){o?.key==="Escape"&&this.hide()}hide(o=void 0){o?.preventDefault();let e=o?.detail?.id;e&&this.element.id!==e||(this.backdropTarget.classList.remove("show"),this.modalTarget.classList.remove("show"),this.modalTarget.setAttribute("aria-hidden",!0),this.modalTarget.removeAttribute("role"),this.modalTarget.removeAttribute("aria-modal"),this.previousFocus?.focus(),this.modalTarget.querySelectorAll("video,audio").forEach(r=>r.pause()),setTimeout(()=>{this.modalTarget.style.display="",this.backdropTarget.style.display=""},500),window.document.body.classList.remove("modal-open"))}};f(gr,"targets",["modal","backdrop"]);var Le=class extends _{revalid(o){this.instanceTarget.classList.remove("is-invalid")}async submit(o){this.toggle();let e=this.instanceTarget.value.split(/[@ ]/).map(a=>a.trim()).filter(a=>a.length),r=e.length===1?e[0]:e[e.length-1],t=`https://${r}/.well-known/webfinger?resource=https://${r}`,i=AbortSignal.any([window.abortController.signal,AbortSignal.timeout(3e3)]),l={Accept:"application/json"};try{let d=(await(await fetch(t,{headers:l,signal:i})).json())?.links?.find(g=>g?.rel==="http://ostatus.org/schema/1.0/subscribe")?.template;if(!d)throw new Error(`Webfinger ${t} doesn't support remote interaction`);let m=d.replaceAll("{uri}",encodeURIComponent(this.uriValue));setTimeout(()=>Turbo.visit(m),100)}catch(a){console.error(a),this.instanceTarget.classList.add("is-invalid")}this.toggle()}toggle(){for(let o of this.element.elements)o.disabled=!o.disabled}};f(Le,"targets",["instance"]),f(Le,"values",{uri:String});var Ge=class extends _{valueTargetConnected(o){this.toggle()}toggle(o=void 0){let e=this.valueTarget.value?.trim();for(let r of this.tabTargets)e===r.id?(r.classList.remove("d-none",...this.hideClasses),setTimeout(()=>r.classList.add(...this.showClasses),1)):(r.classList.add("d-none",...this.hideClasses),setTimeout(()=>r.classList.remove(...this.showClasses),1))}};f(Ge,"targets",["tab","value"]),f(Ge,"classes",["hide","show"]);window.deviceDetector=new Ga.default;window.device=window.deviceDetector.parse(navigator.userAgent);try{!window.device.bot&&window.env.JEKYLL_ENV==="production"&&(window.airbrake=new Do({projectId:window.env.AIRBRAKE_PROJECT_ID,projectKey:window.env.AIRBRAKE_PROJECT_KEY,host:"https://panel.sutty.nl"}),console.originalError=console.error,console.error=(...o)=>(window.airbrake.notify(o.join(" ")),console.originalError(...o)))}catch(o){console.error(o)}Vr();window.Stimulus=Qr.start();window.abortController=new AbortController;Stimulus.debug=window.env.JEKYLL_ENV!=="production";Stimulus.register("body-scroll",Yr);Stimulus.register("device-detector",mr);Stimulus.register("button-copy",be);Stimulus.register("footnotes",me);Stimulus.register("support-us",fe);Stimulus.register("modal",gr);Stimulus.register("authorize-interaction",Le);Stimulus.register("tabs",Ge);document.addEventListener("turbo:visit",o=>{window.abortController.abort()});})();
|
|
40
|
-
//# sourceMappingURL=pack.
|
|
39
|
+
%o`,r,e,t),(i=window.onerror)===null||i===void 0||i.call(window,r,"",0,0,e)}logFormattedMessage(e,r,t={}){t=Object.assign({application:this},t),this.logger.groupCollapsed(`${e} #${r}`),this.logger.log("details:",Object.assign({},t)),this.logger.groupEnd()}};function Rm(){return new Promise(o=>{document.readyState=="loading"?document.addEventListener("DOMContentLoaded",()=>o()):o()})}function Xm(o){return sr(o,"classes").reduce((r,t)=>Object.assign(r,Vm(t)),{})}function Vm(o){return{[`${o}Class`]:{get(){let{classes:e}=this;if(e.has(o))return e.get(o);{let r=e.getAttributeName(o);throw new Error(`Missing attribute "${r}"`)}}},[`${o}Classes`]:{get(){return this.classes.getAll(o)}},[`has${dr(o)}Class`]:{get(){return this.classes.has(o)}}}}function Hm(o){return sr(o,"outlets").reduce((r,t)=>Object.assign(r,km(t)),{})}function Aa(o,e,r){return o.application.getControllerForElementAndIdentifier(e,r)}function $a(o,e,r){let t=Aa(o,e,r);if(t||(o.application.router.proposeToConnectScopeForElementAndIdentifier(e,r),t=Aa(o,e,r),t))return t}function km(o){let e=ct(o);return{[`${e}Outlet`]:{get(){let r=this.outlets.find(o),t=this.outlets.getSelectorForOutletName(o);if(r){let i=$a(this,r,o);if(i)return i;throw new Error(`The provided outlet element is missing an outlet controller "${o}" instance for host controller "${this.identifier}"`)}throw new Error(`Missing outlet element "${o}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${t}".`)}},[`${e}Outlets`]:{get(){let r=this.outlets.findAll(o);return r.length>0?r.map(t=>{let i=$a(this,t,o);if(i)return i;console.warn(`The provided outlet element is missing an outlet controller "${o}" instance for host controller "${this.identifier}"`,t)}).filter(t=>t):[]}},[`${e}OutletElement`]:{get(){let r=this.outlets.find(o),t=this.outlets.getSelectorForOutletName(o);if(r)return r;throw new Error(`Missing outlet element "${o}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${t}".`)}},[`${e}OutletElements`]:{get(){return this.outlets.findAll(o)}},[`has${dr(e)}Outlet`]:{get(){return this.outlets.has(o)}}}}function Um(o){return sr(o,"targets").reduce((r,t)=>Object.assign(r,Km(t)),{})}function Km(o){return{[`${o}Target`]:{get(){let e=this.targets.find(o);if(e)return e;throw new Error(`Missing target element "${o}" for "${this.identifier}" controller`)}},[`${o}Targets`]:{get(){return this.targets.findAll(o)}},[`has${dr(o)}Target`]:{get(){return this.targets.has(o)}}}}function Wm(o){let e=Lm(o,"values"),r={valueDescriptorMap:{get(){return e.reduce((t,i)=>{let l=La(i,this.identifier),a=this.data.getAttributeNameForKey(l.key);return Object.assign(t,{[a]:l})},{})}}};return e.reduce((t,i)=>Object.assign(t,Qm(i)),r)}function Qm(o,e){let r=La(o,e),{key:t,name:i,reader:l,writer:a}=r;return{[i]:{get(){let n=this.data.get(t);return n!==null?l(n):r.defaultValue},set(n){n===void 0?this.data.delete(t):this.data.set(t,a(n))}},[`has${dr(i)}`]:{get(){return this.data.has(t)||r.hasCustomDefaultValue}}}}function La([o,e],r){return Jm({controller:r,token:o,typeDefinition:e})}function Zr(o){switch(o){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function nr(o){switch(typeof o){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(o))return"array";if(Object.prototype.toString.call(o)==="[object Object]")return"object"}function Zm(o){let{controller:e,token:r,typeObject:t}=o,i=ha(t.type),l=ha(t.default),a=i&&l,n=i&&!l,d=!i&&l,m=Zr(t.type),g=nr(o.typeObject.default);if(n)return m;if(d)return g;if(m!==g){let u=e?`${e}.${r}`:r;throw new Error(`The specified default value for the Stimulus Value "${u}" must match the defined type "${m}". The provided default value of "${t.default}" is of type "${g}".`)}if(a)return m}function Ym(o){let{controller:e,token:r,typeDefinition:t}=o,l=Zm({controller:e,token:r,typeObject:t}),a=nr(t),n=Zr(t),d=l||a||n;if(d)return d;let m=e?`${e}.${t}`:r;throw new Error(`Unknown value type "${m}" for "${r}" value`)}function zm(o){let e=Zr(o);if(e)return Ma[e];let r=xt(o,"default"),t=xt(o,"type"),i=o;if(r)return i.default;if(t){let{type:l}=i,a=Zr(l);if(a)return Ma[a]}return o}function Jm(o){let{token:e,typeDefinition:r}=o,t=`${_a(e)}-value`,i=Ym(o);return{type:i,key:t,name:Ct(t),get defaultValue(){return zm(r)},get hasCustomDefaultValue(){return nr(r)!==void 0},reader:qm[i],writer:Ta[i]||Ta.default}}var Ma={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},qm={array(o){let e=JSON.parse(o);if(!Array.isArray(e))throw new TypeError(`expected value of type "array" but instead got value "${o}" of type "${nr(e)}"`);return e},boolean(o){return!(o=="0"||String(o).toLowerCase()=="false")},number(o){return Number(o.replace(/_/g,""))},object(o){let e=JSON.parse(o);if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected value of type "object" but instead got value "${o}" of type "${nr(e)}"`);return e},string(o){return o}},Ta={default:jm,array:Pa,object:Pa};function Pa(o){return JSON.stringify(o)}function jm(o){return`${o}`}var _=class{constructor(e){this.context=e}static get shouldLoad(){return!0}static afterLoad(e,r){}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(e,{target:r=this.element,detail:t={},prefix:i=this.identifier,bubbles:l=!0,cancelable:a=!0}={}){let n=i?`${i}:${e}`:e,d=new CustomEvent(n,{detail:t,bubbles:l,cancelable:a});return r.dispatchEvent(d),d}};_.blessings=[Xm,Um,Wm,Hm];_.targets=[];_.outlets=[];_.values={};var Yr=class extends _{toggle(o){o.target.checked?(document.body.style.overflowY="hidden",this.element.style.overflowY="scroll",this.element.style.minHeight="100vh"):(document.body.style.overflowY="scroll",this.element.style.overflowY="",this.element.style.minHeight="")}};var mr=class extends _{connect(){this.element.style.zIndex=1e4,this.clientNameTarget.innerText=window.device.client.name,this.clientVersionTarget.innerText=window.device.client.version,this.osNameTarget.innerText=window.device.os.name,this.osVersionTarget.innerText=window.device.os.version,this.deviceTypeTarget.innerText=window.device.device.type,this.viewportWidthTarget.innerText=window.innerWidth,this.viewportHeightTarget.innerText=window.innerHeight,this.devicePixelRatioTarget.innerText=window.devicePixelRatio}resized(o){this.viewportWidthTarget.innerText=window.innerWidth,this.viewportHeightTarget.innerText=window.innerHeight}outline(o){let e=document.head.querySelector("style#outline");e?e.remove():(e=document.createElement("style"),e.id="outline",e.append("* { outline: 1px solid pink }"),document.head.appendChild(e))}toggleHelp(o){this.helpTarget.hidden=!this.helpTarget.hidden}};f(mr,"targets",["clientName","clientVersion","osName","osVersion","viewportWidth","viewportHeight","devicePixelRatio","deviceType","help"]);var be=class extends _{async copy(o){if(!("clipboard"in navigator))return;try{await navigator.clipboard.writeText(this.textValue.trim())}catch(r){console.error("Couldn't copy",r);return}let e=this.hasTextTarget?"textTarget":"element";this[e].innerText=this.confirmationValue,this.hasIconTarget&&this.iconTarget.classList.add("d-none"),this.hasConfirmationIconTarget&&this.confirmationIconTarget.classList.remove("d-none")}};f(be,"targets",["text","icon","confirmationIcon"]),f(be,"values",{text:String,confirmation:String});var me=class extends _{connect(){this.originalFootnotes=[],this.createFootnotes()}resize(o=void 0){if(this.sidenotesArePossible===void 0)return;this.offsetTopValue=0;let e=this.sidenotesArePossible,r=this.areSidenotesPossible;if(e&&r)for(let t of this.footnoteTargets)this.positionSidenote(t);else{let t=Array.from(this.footnoteTargets);for(let i in this.footnoteTargets)t[i].outerHTML=this.originalFootnotes[i];this.originalFootnotes=[],this.createFootnotes()}}createFootnotes(){let o=this.element.querySelectorAll("a[id^=fn]"),e=this.element.querySelectorAll("li[id^=fn]");this.sidenotesArePossible=this.areSidenotesPossible;for(let r in Array.from(o)){let t=o[r],i=e[r],l=i.querySelector("a[role=doc-backlink]");this.originalFootnotes.push(i.outerHTML),t.dataset.footnote=i.id,t.dataset.turbo="false",t.dataset.footnotesTarget="reference",l&&(l.dataset.turbo="false"),i.dataset.reference=t.id,setTimeout(()=>i.dataset.footnotesTarget="footnote",1+r)}}footnoteTargetConnected(o){let e=this.referenceTargets.find(r=>r.id===o.dataset.reference);if(o.style.listStylePosition="inside",this.sidenotesArePossible)this.positionSidenote(o,e);else{o.dataset.action="blur->footnotes#hide",o.classList.add(...this.footnoteToggledClasses),o.classList.add(...this.footnoteClasses),o.style.bottom=0,o.style.left=0,o.style.zIndex=1,o.dataset.height=o.offsetHeight,o.style.height=0,o.classList.add("collapsing"),o.classList.remove(...this.footnoteToggledClasses);let r=o.querySelector("a[role=doc-backlink]");r&&(r.style.display="none"),e.dataset.action="footnotes#show",e.dataset.footnotesReferenceParam=e.id,e.dataset.footnotesFootnoteParam=o.id}}get areSidenotesPossible(){let o=document.body.offsetWidth,e=this.containerWidthValue+this.paddingLeftValue+this.sidenoteWidthValue*2;return o>e}positionSidenote(o,e=void 0){e||(e=this.referenceTargets.find(l=>l.id===o.dataset.reference));let r=o.querySelector("a[role=doc-backlink]"),t=Math.max(e.offsetTop,this.offsetTopValue),i=this.element.offsetLeft+this.element.offsetWidth+this.paddingLeftValue;o.style.top=`${t}px`,o.style.left=`${i}px`,o.classList.add(...this.sidenoteClasses),o.dataset.action="",e.dataset.action="",r&&(r.style.display=""),this.offsetTopValue=t+o.offsetHeight+this.minSpacingValue}show(o){let e=this.footnoteTargets.find(r=>r.id===o.params.footnote);o.preventDefault(),this.hide(),e.style.height=`${e.dataset.height}px`,e.classList.add(...this.footnoteToggledClasses),e.setAttribute("role","alert"),e.setAttribute("tabindex","0"),e.focus()}hide(o=void 0){for(let e of this.footnoteTargets)e.style.height=0,e.classList.remove(...this.footnoteToggledClasses),e.setAttribute("role","")}};f(me,"targets",["footnote","reference"]),f(me,"classes",["footnote","footnoteToggled","sidenote"]),f(me,"values",{minSpacing:{type:Number,default:20},offsetTop:{type:Number,default:0},containerWidth:{type:Number,default:780},sidenoteWidth:{type:Number,default:220},paddingLeft:{type:Number,default:16}});var fe=class extends _{async connect(){if(!this.monetizationUrlValue)return;try{let i=new URL(this.monetizationUrlValue);window.location.protocol!==i.protocol&&(i.protocol=this.protocol,this.monetizationUrlValue=i.toString())}catch{console.error("Not a valid URL",this.monetizationUrlValue);return}let o=await this.fetchBalances();if(!o)return;let e=o.balance.length-o.decimal,r=`${o.balance.slice(0,e)}.${o.balance.slice(e)}`,t=document.querySelector("html").lang;for(let i of this.goalTargets){let l=parseFloat(i.getAttribute("aria-valuemax")??"0"),a=Math.min(100,r/l*100);i.style.width=`${a}%`,i.setAttribute("aria-valuenow",r)}if(this.hasBalanceTarget){let i="currency",l=o.currency,a=new Intl.NumberFormat(t,{style:i,currency:l});this.balanceTarget.innerText=a.format(r)}if(this.hasDateTarget){let i=new Date(o.timestamp),l=new Intl.DateTimeFormat(t,{dateStyle:"full"});this.dateTarget.innerText=l.format(i)}}async fetchBalances(){try{return await(await fetch(this.monetizationUrlValue)).json()}catch(o){return console.error("Couldn't fetch",this.monetizationUrlValue,o),null}}get protocol(){return window.location.protocol==="ipfs:"?"ipns:":window.location.protocol}};f(fe,"targets",["goal","balance","date"]),f(fe,"values",{monetizationUrl:String});var gr=class extends _{showAnother(o=void 0){if(o?.preventDefault(),!o.params.show){console.error("data-modal-show-param attribute missing",o.target);return}o.target.id||console.error("id attribute missing, focus won't be re-assigned when modal is closed",o.target),window.dispatchEvent(new CustomEvent("modal:show",{detail:{id:o.params.show,previousFocus:o.target.id}}))}show(o=void 0){o?.preventDefault();let e=o?.detail?.id;e&&this.element.id!==e||(this.modalTarget.style.display="block",this.backdropTarget.style.display="block",this.modalTarget.setAttribute("role","dialog"),this.modalTarget.setAttribute("aria-modal",!0),this.modalTarget.removeAttribute("aria-hidden"),window.document.body.classList.add("modal-open"),o?.detail?.previousFocus?this.previousFocus=window.document.getElementById(o.detail.previousFocus):this.previousFocus=o?.target,setTimeout(()=>{this.modalTarget.classList.add("show"),this.backdropTarget.classList.add("show"),this.modalTarget.focus()},1))}hideWithEscape(o){o?.key==="Escape"&&this.hide()}hide(o=void 0){o?.preventDefault();let e=o?.detail?.id;e&&this.element.id!==e||(this.backdropTarget.classList.remove("show"),this.modalTarget.classList.remove("show"),this.modalTarget.setAttribute("aria-hidden",!0),this.modalTarget.removeAttribute("role"),this.modalTarget.removeAttribute("aria-modal"),this.previousFocus?.focus(),this.modalTarget.querySelectorAll("video,audio").forEach(r=>r.pause()),setTimeout(()=>{this.modalTarget.style.display="",this.backdropTarget.style.display=""},500),window.document.body.classList.remove("modal-open"))}};f(gr,"targets",["modal","backdrop"]);var Le=class extends _{revalid(o){this.instanceTarget.classList.remove("is-invalid")}async submit(o){this.toggle();let e=this.instanceTarget.value.split(/[@ ]/).map(a=>a.trim()).filter(a=>a.length),r=e.length===1?e[0]:e[e.length-1],t=`https://${r}/.well-known/webfinger?resource=https://${r}`,i=AbortSignal.any([window.abortController?.signal,AbortSignal.timeout(3e3)]),l={Accept:"application/json"};try{let d=(await(await fetch(t,{headers:l,signal:i})).json())?.links?.find(g=>g?.rel==="http://ostatus.org/schema/1.0/subscribe")?.template;if(!d)throw new Error(`Webfinger ${t} doesn't support remote interaction`);let m=d.replaceAll("{uri}",encodeURIComponent(this.uriValue));setTimeout(()=>Turbo.visit(m),100)}catch(a){console.error(a),this.instanceTarget.classList.add("is-invalid")}this.toggle()}toggle(){for(let o of this.element.elements)o.disabled=!o.disabled}};f(Le,"targets",["instance"]),f(Le,"values",{uri:String});var Ge=class extends _{valueTargetConnected(o){this.toggle()}toggle(o=void 0){let e=this.valueTarget.value?.trim();for(let r of this.tabTargets)e===r.id?(r.classList.remove("d-none",...this.hideClasses),setTimeout(()=>r.classList.add(...this.showClasses),1)):(r.classList.add("d-none",...this.hideClasses),setTimeout(()=>r.classList.remove(...this.showClasses),1))}};f(Ge,"targets",["tab","value"]),f(Ge,"classes",["hide","show"]);window.deviceDetector=new Ga.default;window.device=window.deviceDetector.parse(navigator.userAgent);try{!window.device.bot&&window.env.JEKYLL_ENV==="production"&&(window.airbrake=new Do({projectId:window.env.AIRBRAKE_PROJECT_ID,projectKey:window.env.AIRBRAKE_PROJECT_KEY,host:"https://panel.sutty.nl"}),console.originalError=console.error,console.error=(...o)=>(window.airbrake.notify(o.join(" ")),console.originalError(...o)))}catch(o){console.error(o)}Vr();window.Stimulus=Qr.start();window.abortController=void 0;Stimulus.debug=window.env.JEKYLL_ENV!=="production";Stimulus.register("body-scroll",Yr);Stimulus.register("device-detector",mr);Stimulus.register("button-copy",be);Stimulus.register("footnotes",me);Stimulus.register("support-us",fe);Stimulus.register("modal",gr);Stimulus.register("authorize-interaction",Le);Stimulus.register("tabs",Ge);document.addEventListener("turbo:load",o=>{window.abortController=new AbortController});document.addEventListener("turbo:visit",o=>{window.abortController.abort()});})();
|
|
40
|
+
//# sourceMappingURL=pack.YXAD762X.js.map
|