compost-jekyll-theme 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6628e894f09177ac1b9ae586498d5132a80e6c16b81a502148af29afdc65c66e
|
4
|
+
data.tar.gz: 6b78f35b71e0dda0b7fc7159f6df01c4953c96666db782b3684b6344c6b1525f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d6a5f5c503cb8a69c6579c6014a4c2d0d7fef68c8ea8b8c2b45b0433dfc661dd8da9b94cc5a9b84ba3a7751d94cc96a91eff5b43305ba4883d1ffc9fa43d23b
|
7
|
+
data.tar.gz: 81a21bb682161d7fcf4bd53e779d6c734806d18179a2a5ebee2f1db7ef22155f2afdee2cb5c23ca37a7164663da934af59004f14a882b5a22199acc52177cd39
|
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
|
}
|
@@ -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
|