rikiki-deck 0.7.1 → 0.7.2
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/README.md +1 -1
- package/bin/lib/browser.mjs +24 -1
- package/bin/lib/check-api.d.ts +28 -0
- package/bin/lib/check-api.mjs +6 -0
- package/bin/lib/check-plugins.mjs +228 -0
- package/bin/lib/check.mjs +369 -14
- package/bin/lib/component-deps.mjs +69 -0
- package/bin/lib/export-pdf.mjs +28 -5
- package/bin/lib/inline.mjs +70 -35
- package/bin/lib/narrative.mjs +77 -0
- package/bin/lib/prune-icons.mjs +24 -1
- package/bin/rikiki.mjs +45 -7
- package/dist/{plugins/click-stages.d.ts → click-stages.d.ts} +1 -1
- package/dist/{layouts/deck-cover.d.ts → deck-cover.d.ts} +2 -0
- package/dist/deck-cover.js +9 -6
- package/dist/{atoms/deck-kicker.d.ts → deck-kicker.d.ts} +5 -0
- package/dist/deck-kicker.js +1 -1
- package/dist/deck-mermaid.js +4 -4
- package/dist/deck-overview.js +41 -40
- package/dist/deck-presenter.js +89 -46
- package/dist/{runtime/deck-root.d.ts → deck-root.d.ts} +14 -3
- package/dist/deck-root.js +5 -5
- package/dist/{extras/deck-timeline.d.ts → deck-timeline.d.ts} +6 -0
- package/dist/deck-timeline.js +4 -4
- package/dist/deck-versus.js +2 -2
- package/dist/index.d.ts +37 -37
- package/dist/index.js +55 -52
- package/dist/standalone.js +229 -182
- package/dist/vendor/THIRD-PARTY-NOTICES.txt +3 -3
- package/dist/vendor/inventory.json +7 -7
- package/dist/vendor/mermaid.min.js +95 -95
- package/docs/llms/rikiki-reference.md +31 -4
- package/llms.txt +1 -1
- package/package.json +13 -6
- package/dist/contrast.js +0 -1
- package/dist/shared/contrast.d.ts +0 -52
- /package/dist/{shared/annotation-marks.d.ts → annotation-marks.d.ts} +0 -0
- /package/dist/{shared/bar-segments.d.ts → bar-segments.d.ts} +0 -0
- /package/dist/{infrastructure/browser-location.d.ts → browser-location.d.ts} +0 -0
- /package/dist/{shared/cards-syntax.d.ts → cards-syntax.d.ts} +0 -0
- /package/dist/{runtime/color.d.ts → color.d.ts} +0 -0
- /package/dist/{extras/deck-agenda.d.ts → deck-agenda.d.ts} +0 -0
- /package/dist/{extras/deck-annotate.d.ts → deck-annotate.d.ts} +0 -0
- /package/dist/{atoms/deck-badge.d.ts → deck-badge.d.ts} +0 -0
- /package/dist/{extras/deck-bar.d.ts → deck-bar.d.ts} +0 -0
- /package/dist/{layouts/deck-bento.d.ts → deck-bento.d.ts} +0 -0
- /package/dist/{molecules/deck-callout.d.ts → deck-callout.d.ts} +0 -0
- /package/dist/{molecules/deck-card.d.ts → deck-card.d.ts} +0 -0
- /package/dist/{molecules/deck-cell.d.ts → deck-cell.d.ts} +0 -0
- /package/dist/{extras/deck-checklist.d.ts → deck-checklist.d.ts} +0 -0
- /package/dist/{atoms/deck-code-highlighter.d.ts → deck-code-highlighter.d.ts} +0 -0
- /package/dist/{atoms/deck-code.d.ts → deck-code.d.ts} +0 -0
- /package/dist/{molecules/deck-csv.d.ts → deck-csv.d.ts} +0 -0
- /package/dist/{layouts/deck-feature-cards.d.ts → deck-feature-cards.d.ts} +0 -0
- /package/dist/{layouts/deck-feature.d.ts → deck-feature.d.ts} +0 -0
- /package/dist/{extras/deck-figure.d.ts → deck-figure.d.ts} +0 -0
- /package/dist/{molecules/deck-fit.d.ts → deck-fit.d.ts} +0 -0
- /package/dist/{extras/deck-flow.d.ts → deck-flow.d.ts} +0 -0
- /package/dist/{extras/deck-graph.d.ts → deck-graph.d.ts} +0 -0
- /package/dist/{molecules/deck-grid.d.ts → deck-grid.d.ts} +0 -0
- /package/dist/{runtime/deck-help.d.ts → deck-help.d.ts} +0 -0
- /package/dist/{extras/deck-icon.d.ts → deck-icon.d.ts} +0 -0
- /package/dist/{extras/deck-kpi-grid.d.ts → deck-kpi-grid.d.ts} +0 -0
- /package/dist/{domain/deck-link.d.ts → deck-link.d.ts} +0 -0
- /package/dist/{molecules/deck-md.d.ts → deck-md.d.ts} +0 -0
- /package/dist/{molecules/deck-mermaid.d.ts → deck-mermaid.d.ts} +0 -0
- /package/dist/{molecules/deck-metric.d.ts → deck-metric.d.ts} +0 -0
- /package/dist/{runtime/deck-notes.d.ts → deck-notes.d.ts} +0 -0
- /package/dist/{domain/deck-outline.d.ts → deck-outline.d.ts} +0 -0
- /package/dist/{runtime/deck-overview.d.ts → deck-overview.d.ts} +0 -0
- /package/dist/{extras/deck-persona.d.ts → deck-persona.d.ts} +0 -0
- /package/dist/{layouts/deck-photo.d.ts → deck-photo.d.ts} +0 -0
- /package/dist/{molecules/deck-point.d.ts → deck-point.d.ts} +0 -0
- /package/dist/{runtime/deck-presenter.d.ts → deck-presenter.d.ts} +0 -0
- /package/dist/{extras/deck-pull.d.ts → deck-pull.d.ts} +0 -0
- /package/dist/{atoms/deck-punch.d.ts → deck-punch.d.ts} +0 -0
- /package/dist/{extras/deck-quote.d.ts → deck-quote.d.ts} +0 -0
- /package/dist/{layouts/deck-section.d.ts → deck-section.d.ts} +0 -0
- /package/dist/{molecules/deck-shortcut.d.ts → deck-shortcut.d.ts} +0 -0
- /package/dist/{atoms/deck-source.d.ts → deck-source.d.ts} +0 -0
- /package/dist/{layouts/deck-split.d.ts → deck-split.d.ts} +0 -0
- /package/dist/{molecules/deck-stack.d.ts → deck-stack.d.ts} +0 -0
- /package/dist/{molecules/deck-stat.d.ts → deck-stat.d.ts} +0 -0
- /package/dist/{molecules/deck-step-list.d.ts → deck-step-list.d.ts} +0 -0
- /package/dist/{extras/deck-table.d.ts → deck-table.d.ts} +0 -0
- /package/dist/{layouts/deck-takeaway.d.ts → deck-takeaway.d.ts} +0 -0
- /package/dist/{molecules/deck-tier-list.d.ts → deck-tier-list.d.ts} +0 -0
- /package/dist/{runtime/deck-transition.d.ts → deck-transition.d.ts} +0 -0
- /package/dist/{extras/deck-versus.d.ts → deck-versus.d.ts} +0 -0
- /package/dist/{application/deep-link.d.ts → deep-link.d.ts} +0 -0
- /package/dist/{shared/escape-html.d.ts → escape-html.d.ts} +0 -0
- /package/dist/{shared/fit-controller.d.ts → fit-controller.d.ts} +0 -0
- /package/dist/{shared/graph-layout.d.ts → graph-layout.d.ts} +0 -0
- /package/dist/{shared/grid-tracks.d.ts → grid-tracks.d.ts} +0 -0
- /package/dist/{shared/icon-set.d.ts → icon-set.d.ts} +0 -0
- /package/dist/{application/keymap.d.ts → keymap.d.ts} +0 -0
- /package/dist/{application/mouse-nav.d.ts → mouse-nav.d.ts} +0 -0
- /package/dist/{domain/navigation.d.ts → navigation.d.ts} +0 -0
- /package/dist/{shared/parse-csv.d.ts → parse-csv.d.ts} +0 -0
- /package/dist/{plugins/shiki.d.ts → shiki.d.ts} +0 -0
- /package/dist/{extras/signature.d.ts → signature.d.ts} +0 -0
- /package/dist/{shared/slide-fill.d.ts → slide-fill.d.ts} +0 -0
- /package/dist/{domain/viewport.d.ts → viewport.d.ts} +0 -0
package/dist/standalone.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Mr=Object.defineProperty;var sn=Object.getOwnPropertyDescriptor;var Me=(i,t)=>()=>(i&&(t=i(i=0)),t);var wt=(i,t)=>{for(var e in t)Mr(i,e,{get:t[e],enumerable:!0})};var c=(i,t,e,r)=>{for(var n=r>1?void 0:r?sn(t,e):t,s=i.length-1,o;s>=0;s--)(o=i[s])&&(n=(r?o(t,e,n):o(n))||n);return r&&n&&Mr(t,e,n),n};var cr={};wt(cr,{closeHelp:()=>gi,toggleHelp:()=>zn});function Tn(i){let t=i.querySelector("#kb-overlay");if(t)return t;if(!i.querySelector(`style[${fi}]`)){let n=document.createElement("style");n.setAttribute(fi,"1"),n.textContent=$n,i.appendChild(n)}let e=document.createElement("div");return e.innerHTML=An,t=e.firstElementChild,i.appendChild(t),t.addEventListener("click",()=>gi(i.host)),t.querySelector(".kb-card")?.addEventListener("click",n=>n.stopPropagation()),t}function zn(i){if(!i.shadowRoot)return;Tn(i.shadowRoot).classList.toggle("open")}function gi(i){i.shadowRoot?.querySelector("#kb-overlay")?.classList.remove("open")}var fi,$n,An,Nt=Me(()=>{"use strict";fi="data-deck-help",$n=`
|
|
2
2
|
#kb-overlay {
|
|
3
3
|
position: fixed; inset: 0;
|
|
4
4
|
background: rgba(10,10,10,0.7);
|
|
@@ -61,7 +61,7 @@ var xr=Object.defineProperty;var Xi=Object.getOwnPropertyDescriptor;var Ce=(n,t)
|
|
|
61
61
|
box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset;
|
|
62
62
|
}
|
|
63
63
|
.kb-row .desc { color: var(--rik-text-default--muted); }
|
|
64
|
-
`,
|
|
64
|
+
`,An=`
|
|
65
65
|
<div id="kb-overlay">
|
|
66
66
|
<div class="kb-card">
|
|
67
67
|
<div class="kb-card-header">
|
|
@@ -82,13 +82,14 @@ var xr=Object.defineProperty;var Xi=Object.getOwnPropertyDescriptor;var Ce=(n,t)
|
|
|
82
82
|
<div class="kb-row"><span class="desc">Navigate</span><span class="keys"><kbd>Wheel</kbd><kbd>Back/Fwd buttons</kbd></span></div>
|
|
83
83
|
</div>
|
|
84
84
|
</div>
|
|
85
|
-
`});function
|
|
86
|
-
`),
|
|
85
|
+
`});function It(i){return i==null?"":String(i).replace(/[&<>"']/g,t=>Ln[t])}var Ln,dr=Me(()=>{"use strict";Ln={"&":"&","<":"<",">":">",'"':""","'":"'"}});var Si={};wt(Si,{installPresenter:()=>Bn});async function Pn(){if(lt)return lt;let i=window.getScreenDetails;if(!i)return null;try{return lt=await i.call(window),lt}catch{return null}}function xi(i){return{left:Math.round(i.availLeft+(i.availWidth-Rt)/2),top:Math.round(i.availTop+(i.availHeight-jt)/2)}}function Mn(i){let{left:t,top:e}=xi(i);return`popup=yes,width=${Rt},height=${jt},left=${t},top=${e}`}function Hn(i,t){let{left:e,top:r}=xi(t);i.resizeTo(Rt,jt),i.moveTo(e,r)}function vi(i,t){i.requestFullscreen?.({screen:t}).then(()=>{if(!je?.has(i)){document.exitFullscreen?.().catch(()=>{});return}Ot=!0}).catch(()=>{})}function wi(){document.fullscreenElement||(Ot=!1)}function Nn(){document.removeEventListener("fullscreenchange",wi),Ot&&document.fullscreenElement&&document.exitFullscreen?.().catch(()=>{}),Ot=!1}function pr(i){D?.close(),D=null,qe?.close(),qe=null,je?.delete(i),i.presenterActive=!1,Nn()}function _i(i){let t=Array.from(i.children).filter(u=>u.tagName.toLowerCase().startsWith("deck-")),e=t.findIndex(u=>u.hasAttribute("active")),r=t[e]??null,n=t[e+1]??null,o=(r?.querySelector("deck-notes")?.textContent??"").trim(),l=document.querySelector('link[rel="stylesheet"][href*="rikiki"], link[rel="stylesheet"][href*="tokens"], link[rel="stylesheet"][href*="theme"]')?.href??"",p=Array.from(document.querySelectorAll("style")).map(u=>u.textContent??"").join(`
|
|
86
|
+
`),h=document.querySelector('script[type="module"][data-rikiki-bundle]')?.textContent??"";return{current:e+1,total:t.length,step:i.step,steps:Number(r?.getAttribute("steps")||r?.getAttribute("data-steps")||0),slideHtml:r?.outerHTML??"",nextHtml:n?.outerHTML??null,notes:o,themeHref:l,previewStyles:Array.from(document.querySelectorAll('link[rel="stylesheet"], style')).map(u=>u.outerHTML).join(`
|
|
87
|
+
`),moduleHrefs:Array.from(document.querySelectorAll('script[type="module"][src]')).map(u=>u.src),baseHref:document.baseURI,lang:document.documentElement.lang,canvasWidth:i.width,canvasHeight:i.height,inlineStyles:p,bundleHref:Cn,bundleInline:h}}function ki(i){qe&&qe.postMessage({type:"state",state:_i(i)})}function On(i,t){let e=document.elementFromPoint(i,t);for(;e?.shadowRoot;){let r=e.shadowRoot.elementFromPoint(i,t);if(!r||r===e)break;e=r}return e}function Rn(i,t,e){for(let r=i;r;r=r.parentElement){let n=getComputedStyle(r);if(e!==0&&r.scrollHeight>r.clientHeight&&/auto|scroll/.test(n.overflowY)||t!==0&&r.scrollWidth>r.clientWidth&&/auto|scroll/.test(n.overflowX))return r}return null}function jn(i,t,e){let r=i.getBoundingClientRect();return{x:r.left+t*r.width,y:r.top+e*r.height}}function bi(i,t){let{x:e,y:r}=jn(i,t.x??.5,t.y??.5);return{x:e,y:r,target:On(e,r)??i}}function qn(i){let t=(i??"all").trim();return t==="none"?"none":t===""||t==="all"?"wheel arrows aux":t.split(/\s+/).filter(e=>e!=="click").join(" ")||"none"}function Bn(i){if(je=je??new WeakSet,je.has(i)){pr(i);return}je.add(i);let t=i.mouseNav;qe=new BroadcastChannel(yi),i.addEventListener("step-change",()=>ki(i)),qe.addEventListener("message",a=>{let l=a.data;if(l?.type==="key"&&l.key)window.dispatchEvent(new KeyboardEvent("keydown",{key:l.key,shiftKey:!!l.shift,bubbles:!0}));else if(l?.type==="click"){let{x:p,y:h,target:u}=bi(i,l),f={bubbles:!0,composed:!0,cancelable:!0,clientX:p,clientY:h,view:window,shiftKey:!!l.shift};u.dispatchEvent(new PointerEvent("pointerdown",{...f,pointerId:1,isPrimary:!0})),u.dispatchEvent(new PointerEvent("pointerup",{...f,pointerId:1,isPrimary:!0})),u.dispatchEvent(new MouseEvent("click",f))}else if(l?.type==="wheel"){let{x:p,y:h,target:u}=bi(i,l),f=l.dx??0,y=l.dy??0,A=Rn(u,f,y);A?A.scrollBy({left:f,top:y}):u.dispatchEvent(new WheelEvent("wheel",{bubbles:!0,composed:!0,cancelable:!0,clientX:p,clientY:h,deltaX:f,deltaY:y,view:window}))}else l?.type==="config"&&typeof l.advanceOnClick=="boolean"?i.mouseNav=l.advanceOnClick?t:qn(t):l?.type==="hello"&&ki(i)});let e=lt,r=e?.screens.find(a=>a!==e.currentScreen)??null;r?vi(i,r):Pn().then(a=>{if(!a)return;let l=a.screens.find(p=>p!==a.currentScreen);l&&vi(i,l),D&&a.currentScreen&&Hn(D,a.currentScreen)});let n=_i(i),s=e?.currentScreen?Mn(e.currentScreen):`popup=yes,width=${Rt},height=${jt}`;if(D=window.open("","rikiki-presenter",s),!D){console.warn("[rikiki/presenter] popup was blocked \xB7 allow popups for this site"),pr(i);return}D.document.open(),D.document.write(In(n)),D.document.close(),i.presenterActive=!0,document.addEventListener("fullscreenchange",wi);let o=setInterval(()=>{D?.closed&&(clearInterval(o),pr(i))},1e3)}var yi,Cn,D,qe,je,lt,Ot,Rt,jt,In,hr=Me(()=>{"use strict";dr();yi="rik-presenter",Cn=new URL("./index.js",import.meta.url).href,D=null,qe=null,je=null,lt=null,Ot=!1;Rt=1280,jt=720;In=i=>`<!doctype html>
|
|
87
88
|
<html lang="en">
|
|
88
89
|
<head>
|
|
89
90
|
<meta charset="utf-8">
|
|
90
91
|
<title>Rikiki \xB7 presenter</title>
|
|
91
|
-
${
|
|
92
|
+
${i.themeHref?`<link rel="stylesheet" href="${It(i.themeHref)}">`:""}
|
|
92
93
|
<style>
|
|
93
94
|
html, body { margin: 0; padding: 0; height: 100%; background: #0f1422; color: #fafafa; font-family: var(--rik-font-sans, system-ui); }
|
|
94
95
|
.grid {
|
|
@@ -140,7 +141,7 @@ ${n.themeHref?`<link rel="stylesheet" href="${Pt(n.themeHref)}">`:""}
|
|
|
140
141
|
container lets the iframe size against the pane in cq units. */
|
|
141
142
|
#current .body { display: grid; place-items: center; container-type: size; }
|
|
142
143
|
.panel iframe { border: 0; background: #0f1422; display: block; }
|
|
143
|
-
#current-
|
|
144
|
+
#current-viewport {
|
|
144
145
|
aspect-ratio: 16 / 9;
|
|
145
146
|
width: min(100cqw, calc(100cqh * 16 / 9));
|
|
146
147
|
height: auto;
|
|
@@ -148,12 +149,18 @@ ${n.themeHref?`<link rel="stylesheet" href="${Pt(n.themeHref)}">`:""}
|
|
|
148
149
|
}
|
|
149
150
|
/* Next sizes its 16:9 box from the column width (its pane row is auto), so
|
|
150
151
|
the panel hugs the thumbnail instead of stretching full-height. */
|
|
151
|
-
#next-
|
|
152
|
+
#next-viewport {
|
|
152
153
|
aspect-ratio: 16 / 9;
|
|
153
154
|
width: 100%;
|
|
154
155
|
height: auto;
|
|
155
156
|
display: block;
|
|
156
157
|
}
|
|
158
|
+
.preview-viewport { position: relative; overflow: hidden; }
|
|
159
|
+
.preview-viewport iframe {
|
|
160
|
+
position: absolute; top: 0; left: 0;
|
|
161
|
+
width: ${i.canvasWidth}px; height: ${i.canvasHeight}px;
|
|
162
|
+
transform-origin: top left;
|
|
163
|
+
}
|
|
157
164
|
#notes { font-size: 17px; line-height: 1.6; white-space: pre-wrap; padding: 20px; overflow: auto; color: #e8e4f0; }
|
|
158
165
|
#notes:empty::before { content: 'No notes for this slide.'; color: rgba(232,228,240,0.4); font-style: italic; }
|
|
159
166
|
#footer {
|
|
@@ -185,11 +192,11 @@ ${n.themeHref?`<link rel="stylesheet" href="${Pt(n.themeHref)}">`:""}
|
|
|
185
192
|
<div class="grid">
|
|
186
193
|
<section class="panel" id="current">
|
|
187
194
|
<header>Current</header>
|
|
188
|
-
<div class="body"><iframe id="current-frame" srcdoc=""></iframe></div>
|
|
195
|
+
<div class="body"><div class="preview-viewport" id="current-viewport"><iframe id="current-frame" srcdoc=""></iframe></div></div>
|
|
189
196
|
</section>
|
|
190
197
|
<section class="panel" id="next">
|
|
191
198
|
<header>Next</header>
|
|
192
|
-
<div class="body"><iframe id="next-frame" srcdoc=""></iframe></div>
|
|
199
|
+
<div class="body"><div class="preview-viewport" id="next-viewport"><iframe id="next-frame" srcdoc=""></iframe></div></div>
|
|
193
200
|
</section>
|
|
194
201
|
<section class="panel" id="notes-panel">
|
|
195
202
|
<header>Speaker notes</header>
|
|
@@ -197,7 +204,7 @@ ${n.themeHref?`<link rel="stylesheet" href="${Pt(n.themeHref)}">`:""}
|
|
|
197
204
|
</section>
|
|
198
205
|
<div id="footer">
|
|
199
206
|
<div><span id="timer">00:00</span> <button id="timer-toggle">Pause</button> <button id="timer-reset">Reset</button></div>
|
|
200
|
-
<div id="counter">${
|
|
207
|
+
<div><span id="counter">${i.current} / ${i.total}</span> <span id="stepper"></span></div>
|
|
201
208
|
<div>
|
|
202
209
|
<label class="opt"><input type="checkbox" id="opt-advance" checked> Advance on click</label>
|
|
203
210
|
<span class="ghost">\xB7 P to close</span>
|
|
@@ -205,9 +212,17 @@ ${n.themeHref?`<link rel="stylesheet" href="${Pt(n.themeHref)}">`:""}
|
|
|
205
212
|
</div>
|
|
206
213
|
</div>
|
|
207
214
|
<script>
|
|
208
|
-
const channel = new BroadcastChannel('${
|
|
215
|
+
const channel = new BroadcastChannel('${yi}');
|
|
209
216
|
const current = document.getElementById('current-frame');
|
|
210
217
|
const next = document.getElementById('next-frame');
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
const previewResize = new ResizeObserver(entries => {
|
|
221
|
+
for (const entry of entries) {
|
|
222
|
+
entry.target.querySelector('iframe').style.transform = 'scale(' + (entry.contentRect.width / ${i.canvasWidth}) + ')';
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
document.querySelectorAll('.preview-viewport').forEach(el => previewResize.observe(el));
|
|
211
226
|
const notes = document.getElementById('notes');
|
|
212
227
|
const counter = document.getElementById('counter');
|
|
213
228
|
const timerEl = document.getElementById('timer');
|
|
@@ -235,31 +250,30 @@ ${n.themeHref?`<link rel="stylesheet" href="${Pt(n.themeHref)}">`:""}
|
|
|
235
250
|
};
|
|
236
251
|
resetBtn.onclick = () => { startedAt = Date.now(); elapsed = 0; running = true; toggleBtn.textContent = 'Pause'; };
|
|
237
252
|
|
|
238
|
-
// Presentation options \xB7 push each change to the live deck over the channel.
|
|
239
253
|
document.getElementById('opt-advance').addEventListener('change', (e) => {
|
|
240
254
|
channel.postMessage({ type: 'config', advanceOnClick: e.target.checked });
|
|
241
255
|
});
|
|
242
256
|
|
|
243
257
|
function wrapFrame(slideHtml, forward) {
|
|
244
|
-
const
|
|
245
|
-
const
|
|
246
|
-
const
|
|
247
|
-
const
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
258
|
+
const previewStyles = ${JSON.stringify(i.previewStyles).replace(/</g,"\\u003c")};
|
|
259
|
+
const moduleHrefs = ${JSON.stringify(i.moduleHrefs).replace(/</g,"\\u003c")};
|
|
260
|
+
const baseHref = ${JSON.stringify(i.baseHref).replace(/</g,"\\u003c")};
|
|
261
|
+
const lang = ${JSON.stringify(i.lang).replace(/</g,"\\u003c")};
|
|
262
|
+
const bundleHref = ${JSON.stringify(i.bundleHref)};
|
|
263
|
+
const bundleInline = ${JSON.stringify(i.bundleInline)};
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
252
268
|
const escAttr = (s) => s.replace(/&/g, '&').replace(/"/g, '"').replace(/</g, '<');
|
|
253
269
|
const escStyle = (s) => s.replace(/<\\/(style|script)/gi, '<\\\\/$1');
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
// this block early (this comment must avoid the literal too).
|
|
262
|
-
// \xB7 served deck \u2192 load the real bundle URL with <script src>.
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
263
277
|
let bundleTag;
|
|
264
278
|
const esc = (c) => c.replace(/<\\/script/gi, '<\\\\/script');
|
|
265
279
|
if (bundleInline) {
|
|
@@ -273,12 +287,12 @@ ${n.themeHref?`<link rel="stylesheet" href="${Pt(n.themeHref)}">`:""}
|
|
|
273
287
|
} else {
|
|
274
288
|
bundleTag = '<script type="module" src="' + bundleHref + '"><' + '/script>';
|
|
275
289
|
}
|
|
276
|
-
|
|
277
|
-
|
|
290
|
+
|
|
291
|
+
|
|
278
292
|
const activeSlide = slideHtml.replace(/^(\\s*<deck-[a-z-]+)/i, '$1 active');
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
282
296
|
const forwarder = forward
|
|
283
297
|
? '<scr' + 'ipt>(function(){' +
|
|
284
298
|
'var post=function(o){o.source="rikiki-presenter-input";parent.postMessage(o,"*");};' +
|
|
@@ -287,52 +301,81 @@ ${n.themeHref?`<link rel="stylesheet" href="${Pt(n.themeHref)}">`:""}
|
|
|
287
301
|
'addEventListener("wheel",function(e){if(e.ctrlKey||e.metaKey)return;post({type:"wheel",x:e.clientX/innerWidth,y:e.clientY/innerHeight,dx:e.deltaX,dy:e.deltaY});},{passive:true});' +
|
|
288
302
|
'})();<' + '/scr' + 'ipt>'
|
|
289
303
|
: '';
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
return '<!doctype html><html><head><meta charset="UTF-8"
|
|
294
|
-
bundleTag +
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
return '<!doctype html><html lang="' + escAttr(lang) + '"><head><meta charset="UTF-8"><base href="' + escAttr(baseHref) + '">' + previewStyles +
|
|
308
|
+
bundleTag + moduleHrefs.filter((href) => href !== bundleHref).map((href) => '<script type="module" src="' + escAttr(href) + '"><' + '/script>').join('') +
|
|
295
309
|
'<style>html,body{margin:0;padding:0;height:100%;overflow:hidden;background:#0f1422}' +
|
|
296
310
|
'deck-root{position:absolute;inset:0}</style>' +
|
|
297
|
-
'</head><body><deck-root no-hint no-arrows no-counter preview>' + activeSlide + '</deck-root>' + forwarder + '</body></html>';
|
|
311
|
+
'</head><body><deck-root width="${i.canvasWidth}" height="${i.canvasHeight}" no-hint no-arrows no-counter preview data-overview-snapshot>' + activeSlide + '</deck-root>' + forwarder + '</body></html>';
|
|
298
312
|
}
|
|
299
313
|
|
|
314
|
+
|
|
315
|
+
const frames = new Map();
|
|
316
|
+
function updateFrame(frame, html, step, forward) {
|
|
317
|
+
let state = frames.get(frame);
|
|
318
|
+
if (!state) {
|
|
319
|
+
state = { html, step, ready: false, painted: null };
|
|
320
|
+
frames.set(frame, state);
|
|
321
|
+
frame.addEventListener('load', () => {
|
|
322
|
+
state.ready = true;
|
|
323
|
+
paint();
|
|
324
|
+
});
|
|
325
|
+
frame.srcdoc = wrapFrame('', forward);
|
|
326
|
+
}
|
|
327
|
+
state.html = html;
|
|
328
|
+
state.step = step;
|
|
329
|
+
function paint() {
|
|
330
|
+
if (!state.ready) return;
|
|
331
|
+
const root = frame.contentDocument?.querySelector('deck-root');
|
|
332
|
+
if (!root) return;
|
|
333
|
+
if (state.painted !== state.html) {
|
|
334
|
+
root.innerHTML = state.html || '<div style="padding:3rem;color:white">End of deck</div>';
|
|
335
|
+
root.firstElementChild?.setAttribute('active', '');
|
|
336
|
+
state.painted = state.html;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
Promise.resolve().then(async () => {
|
|
340
|
+
const elements = [root.firstElementChild, ...root.querySelectorAll('*')].filter(Boolean);
|
|
341
|
+
await Promise.all(elements.map(el => el.updateComplete));
|
|
342
|
+
elements.forEach(el => el.applyStep?.(state.step));
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
paint();
|
|
346
|
+
}
|
|
300
347
|
channel.onmessage = (e) => {
|
|
301
348
|
if (e.data?.type !== 'state') return;
|
|
302
349
|
const s = e.data.state;
|
|
303
350
|
counter.textContent = s.current + ' / ' + s.total;
|
|
351
|
+
document.getElementById('stepper').textContent = s.steps ? ' \xB7 \xC9tape ' + s.step + ' / ' + s.steps : '';
|
|
304
352
|
notes.textContent = s.notes;
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
else next.srcdoc = '<!doctype html><html><body style="background:#0f1422;color:rgba(232,228,240,0.4);display:flex;align-items:center;justify-content:center;font-family:system-ui">End of deck</body></html>';
|
|
353
|
+
updateFrame(current, s.slideHtml, s.step, true);
|
|
354
|
+
updateFrame(next, s.nextHtml, 0, false);
|
|
308
355
|
};
|
|
309
356
|
|
|
310
|
-
|
|
311
|
-
const seed = ${JSON.stringify(n)};
|
|
357
|
+
const seed = ${JSON.stringify(i).replace(/</g,"\\u003c")};
|
|
312
358
|
channel.postMessage({ type: 'state', state: seed });
|
|
313
359
|
|
|
314
|
-
// Forward keys back to the main window (so the speaker can drive nav from the laptop)
|
|
315
360
|
window.addEventListener('keydown', (e) => {
|
|
316
361
|
if (e.target.matches && e.target.matches('input,textarea,button')) return;
|
|
317
362
|
channel.postMessage({ type: 'key', key: e.key, shift: e.shiftKey });
|
|
318
363
|
});
|
|
319
364
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
// never reach this window directly \xB7 it postMessages them here instead.
|
|
365
|
+
|
|
366
|
+
|
|
323
367
|
window.addEventListener('message', (e) => {
|
|
324
368
|
const d = e.data;
|
|
325
369
|
if (!d || d.source !== 'rikiki-presenter-input') return;
|
|
326
370
|
channel.postMessage({ type: d.type, key: d.key, shift: d.shift, x: d.x, y: d.y, dx: d.dx, dy: d.dy });
|
|
327
371
|
});
|
|
328
372
|
|
|
329
|
-
// Tell main window we're alive
|
|
330
373
|
channel.postMessage({ type: 'hello' });
|
|
331
374
|
<\/script>
|
|
332
375
|
</body>
|
|
333
|
-
</html>`});var vi={};kt(vi,{mountOverview:()=>Bn});function Cn(n){if(n.querySelector(`style[${ui}]`))return;let t=document.createElement("style");t.setAttribute(ui,"1"),t.textContent=Ln,n.appendChild(t)}function Pn(n,t){if(n.querySelector(`link[${mi}]`))return;let e=document.createElement("link");e.rel="stylesheet",e.setAttribute(mi,"1"),e.href=new URL("../tokens.css",t).href,n.appendChild(e)}function fi(n){let e=n.slides[0]?.querySelector("h1");return e?Array.from(e.childNodes).map(r=>r.nodeName==="BR"?" ":r.textContent??"").join("").replace(/\s+/g," ").trim()||`Slide ${n.startIdx+1}`:`Slide ${n.startIdx+1}`}function gi(n){return(n.textContent||"").replace(/\s+/g," ").trim().slice(0,400).toLowerCase()}function Hn(n,t){let e=new Map;if(n.querySelectorAll("[id]").forEach(s=>{e.set(s.id,s.id+t),s.id=s.id+t}),e.size===0)return;let r=s=>s.replace(/url\(['"]?#([^'")]+)['"]?\)/g,(o,a)=>e.has(a)?`url(#${e.get(a)})`:o);n.querySelectorAll("*").forEach(s=>{for(let o of Mn){let a=s.getAttribute(o);a?.includes("url(")&&s.setAttribute(o,r(a))}for(let o of["href","xlink:href"]){let a=s.getAttribute(o);a?.startsWith("#")&&e.has(a.slice(1))&&s.setAttribute(o,`#${e.get(a.slice(1))}`)}});let i=n.querySelectorAll("style");if(i.length){let s=o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");i.forEach(o=>{let a=o.textContent??"";e.forEach((l,h)=>{a=a.replace(new RegExp(`#${s(h)}(?![\\w-])`,"g"),`#${l}`)}),o.textContent=a})}}function Nn(n,t){let e=n.querySelectorAll("svg");t.querySelectorAll("svg").forEach((r,i)=>{let s=e[i]?.getBoundingClientRect();if(s&&s.width>0)r.setAttribute("width",String(Math.round(s.width))),r.setAttribute("height",String(Math.round(s.height))),r.style.maxWidth="100%";else if(r.hasAttribute("viewBox")&&!r.hasAttribute("width")){let o=(r.getAttribute("viewBox")??"").split(/[\s,]+/).map(Number);o.length===4&&o[2]>0&&(r.setAttribute("width",String(o[2])),r.setAttribute("height",String(o[3])),r.style.maxWidth="100%",r.style.height="auto")}})}function In(n,t){let e=n.querySelectorAll("deck-mermaid");t.querySelectorAll("deck-mermaid").forEach((r,i)=>{let s=e[i],o=document.createElement("div");o.className="ov-mermaid-snap",o.innerHTML=s?.renderedSvg??"";let a=s?.getBoundingClientRect();a&&a.width>0&&(o.style.width=`${a.width}px`,o.style.height=`${a.height}px`),r.replaceWith(o)})}function On(n){n.querySelectorAll("[data-click], [data-click-auto], [data-click-children], [data-click-stagger] > *").forEach(t=>{t.style.opacity="",t.style.transform="",t.style.filter="",t.style.pointerEvents="",t.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect").forEach(e=>{e.style.strokeDashoffset=""})})}function Rn(n,t){let e=n.cloneNode(!0);return e.setAttribute("active",""),On(e),Nn(n,e),In(n,e),Hn(e,`-ov${t}`),e}async function jn(n,t){let e=Array.from(t.querySelectorAll("deck-mermaid")).map(i=>i.whenRendered).filter(i=>!!i);e.length&&await Promise.all(e).catch(()=>{});let r=document.createElement("div");r.className="ov-thumb",r.appendChild(Rn(t,Number(n.dataset.idx))),n.insertBefore(r,n.firstChild),n.dataset.loaded="1",delete n.dataset.building}function Bn(n,t){let e=n.shadowRoot;if(!e)return()=>{};Cn(e),Pn(e,import.meta.url);let r=e.querySelector("#overview-grid");r||(r=document.createElement("div"),r.id="overview-grid",e.appendChild(r)),r.innerHTML="";let i=t.slides.length,s=i>60,o=i>300?140:i>150?160:i>60?180:220;r.style.setProperty("--ov-cell-min",`${o}px`);let a=e.querySelector("#stage"),l=a?.clientWidth||window.innerWidth,h=a?.clientHeight||window.innerHeight;r.style.setProperty("--ov-thumb-w",`${l}px`),r.style.setProperty("--ov-thumb-h",`${h}px`),requestAnimationFrame(()=>{let w=r.querySelector(".ov-cell")?.clientWidth??o;r.style.setProperty("--overview-scale",String(w/l))});let p=document.createElement("div");p.className="ov-bar";let u=document.createElement("input");u.className="ov-search",u.type="search",u.placeholder=`Search ${i} slides \xB7 type to filter`,u.spellcheck=!1,p.appendChild(u);let f=document.createElement("span");f.className="ov-count",f.textContent=`${i} slides \xB7 ${t.chapters.length} chapters`,p.appendChild(f);let b=document.createElement("span");b.className="ov-hint",b.textContent="O \xB7 Esc \xB7 close",p.appendChild(b),r.appendChild(p);let $=document.createElement("div");$.className=`ov-body${s?"":" compact"}`,r.appendChild($);let A=s?document.createElement("aside"):null;A&&(A.className="ov-aside",$.appendChild(A));let H=document.createElement("div");H.className=`ov-main${s?"":" ov-path"}`,$.appendChild(H);let ge=[],Qe=[],Je=new WeakMap,ve=new IntersectionObserver(w=>{for(let L of w){if(!L.isIntersecting)continue;let _=L.target;if(_.dataset.loaded||_.dataset.building)continue;let N=Je.get(_);N&&(_.dataset.building="1",ve.unobserve(_),jn(_,N).catch(S=>{let F=Number(_.dataset.tries??"0")+1;_.dataset.tries=String(F),console.warn("[rikiki/overview] thumbnail build failed",S),delete _.dataset.building,F<3&&ve.observe(_)}))}},{root:null,rootMargin:"300px 0px",threshold:0});t.chapters.forEach((w,L)=>{let _=document.createElement("section");if(_.className="ov-chapter",_.id=`ov-chapter-${L}`,s){let S=document.createElement("header");S.className="ov-chapter-head";let F=document.createElement("span");F.className="ov-chapter-num",F.textContent=String(L+1).padStart(2,"0"),S.appendChild(F);let R=document.createElement("span");R.className="ov-chapter-title",R.textContent=fi(w),S.appendChild(R);let T=document.createElement("span");T.className="ov-chapter-count",T.textContent=`${w.slides.length} slide${w.slides.length>1?"s":""}`,S.appendChild(T),_.appendChild(S)}let N=document.createElement("div");if(N.className="ov-row",w.slides.forEach((S,F)=>{if(!s&&F>0){let yr=document.createElement("div");yr.className="ov-connector",N.appendChild(yr)}let R=w.startIdx+F,T=document.createElement("button");T.type="button",T.className="ov-cell",T.dataset.idx=String(R),T.dataset.search=gi(S),R===t.currentIdx&&(T.dataset.current="1"),Je.set(T,S),ve.observe(T);let be=document.createElement("span");be.className="ov-cell-label",be.textContent=String(R+1),T.appendChild(be);let br=gi(S).trim().slice(0,80);T.setAttribute("aria-label",`Slide ${R+1} of ${i}${br?` \xB7 ${br}`:""}`),R===t.currentIdx&&T.setAttribute("aria-current","true"),T.addEventListener("click",()=>t.onPick(R)),N.appendChild(T)}),_.appendChild(N),H.appendChild(_),ge.push(_),A){let S=document.createElement("button");S.type="button",S.className="ov-aside-item",t.currentIdx>=w.startIdx&&t.currentIdx<w.startIdx+w.slides.length&&(S.dataset.active="1");let R=document.createElement("span");R.className="ov-aside-num",R.textContent=String(L+1).padStart(2,"0"),S.appendChild(R);let T=document.createElement("span");T.className="ov-aside-text",T.textContent=fi(w);let be=document.createElement("div");be.className="ov-aside-count",be.textContent=`${w.slides.length} slide${w.slides.length>1?"s":""}`,T.appendChild(be),S.appendChild(T),S.addEventListener("click",()=>{_.scrollIntoView({behavior:"smooth",block:"start"})}),A.appendChild(S),Qe.push(S)}});let ke=null;A&&(ke=new IntersectionObserver(w=>{let L=w.filter(_=>_.isIntersecting).sort((_,N)=>_.boundingClientRect.top-N.boundingClientRect.top);if(L.length>0){let _=ge.indexOf(L[0].target);_>=0&&Qe.forEach((N,S)=>{S===_?N.dataset.active="1":delete N.dataset.active})}},{root:H,rootMargin:"0px 0px -70% 0px",threshold:0}),ge.forEach(w=>{ke.observe(w)}));let kr=r.querySelectorAll(".ov-cell");return u.addEventListener("input",()=>{let w=u.value.trim().toLowerCase();if(!w){kr.forEach(L=>{delete L.dataset.filteredOut});return}kr.forEach(L=>{(L.dataset.search||"").includes(w)?delete L.dataset.filteredOut:L.dataset.filteredOut="1"})}),requestAnimationFrame(()=>{let w=r.querySelector(".ov-cell[data-current]");w&&(w.scrollIntoView({block:"center"}),w.focus({preventScroll:!0}))}),r.addEventListener("keydown",w=>{let L=w.key;if(L!=="ArrowLeft"&&L!=="ArrowRight")return;let _=[...r.querySelectorAll(".ov-cell")].filter(F=>!F.dataset.filteredOut),N=_.indexOf(document.activeElement);if(N<0)return;w.preventDefault();let S=_[N+(L==="ArrowRight"?1:-1)];S?.focus(),S?.scrollIntoView({block:"nearest"})}),()=>{ke?.disconnect(),ve.disconnect(),r&&(r.innerHTML="")}}var ui,mi,Ln,Mn,or=Ce(()=>{"use strict";ui="data-deck-overview",mi="data-overview-tokens",Ln=`
|
|
376
|
+
</html>`});var zi={};wt(zi,{mountOverview:()=>Qn});function Un(i){let t=i.outerHTML,e=t.indexOf(">");return t.slice(0,e).replace(/\sactive(?:="[^"]*")?/,"")+t.slice(e)}function Yn(i){if(i.querySelector(`style[${Ei}]`))return;let t=document.createElement("style");t.setAttribute(Ei,"1"),t.textContent=Wn,i.appendChild(t)}function Ai(i){let e=i.slides[0]?.querySelector("h1");return e?Array.from(e.childNodes).map(r=>r.nodeName==="BR"?" ":r.textContent??"").join("").replace(/\s+/g," ").trim()||`Slide ${i.startIdx+1}`:`Slide ${i.startIdx+1}`}function Ti(i){return(i.textContent||"").replace(/\s+/g," ").trim().slice(0,400).toLowerCase()}function Xn(i,t){let e=new Map;if(i.querySelectorAll("[id]").forEach(s=>{e.set(s.id,s.id+t),s.id=s.id+t}),e.size===0)return;let r=s=>s.replace(/url\(['"]?#([^'")]+)['"]?\)/g,(o,a)=>e.has(a)?`url(#${e.get(a)})`:o);i.querySelectorAll("*").forEach(s=>{for(let o of Fn){let a=s.getAttribute(o);a?.includes("url(")&&s.setAttribute(o,r(a))}for(let o of["href","xlink:href"]){let a=s.getAttribute(o);a?.startsWith("#")&&e.has(a.slice(1))&&s.setAttribute(o,`#${e.get(a.slice(1))}`)}});let n=i.querySelectorAll("style");if(n.length){let s=o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");n.forEach(o=>{let a=o.textContent??"";e.forEach((l,p)=>{a=a.replace(new RegExp(`#${s(p)}(?![\\w-])`,"g"),`#${l}`)}),o.textContent=a})}}function Zn(i,t){let e=i.querySelectorAll("svg");t.querySelectorAll("svg").forEach((r,n)=>{let s=e[n]?.getBoundingClientRect();if(s&&s.width>0)r.setAttribute("width",String(Math.round(s.width))),r.setAttribute("height",String(Math.round(s.height))),r.style.maxWidth="100%";else if(r.hasAttribute("viewBox")&&!r.hasAttribute("width")){let o=(r.getAttribute("viewBox")??"").split(/[\s,]+/).map(Number);o.length===4&&o[2]>0&&(r.setAttribute("width",String(o[2])),r.setAttribute("height",String(o[3])),r.style.maxWidth="100%",r.style.height="auto")}})}function Vn(i,t){let e=i.querySelectorAll("deck-mermaid");t.querySelectorAll("deck-mermaid").forEach((r,n)=>{let s=e[n],o=document.createElement("div");o.className="ov-mermaid-snap",o.innerHTML=s?.renderedSvg??"";let a=s?.getBoundingClientRect();a&&a.width>0&&(o.style.width=`${a.width}px`,o.style.height=`${a.height}px`),r.replaceWith(o)})}function Kn(i){i.querySelectorAll("[data-click], [data-click-auto], [data-click-children], [data-click-stagger] > *").forEach(t=>{t.style.opacity="",t.style.transform="",t.style.filter="",t.style.pointerEvents="",t.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect").forEach(e=>{e.style.strokeDashoffset=""})})}function Gn(i,t){let e=i.cloneNode(!0);return e.setAttribute("active",""),Kn(e),Zn(i,e),Vn(i,e),Xn(e,`-ov${t}`),e}async function Jn(i,t,e,r){let n=r+":"+i.dataset.idx+":"+t.outerHTML,s=e.get(t);if(s?.key===n){i.insertBefore(s.thumb,i.firstChild),i.dataset.loaded="1",delete i.dataset.building;return}let o=Array.from(t.querySelectorAll("deck-mermaid")).map(u=>u.whenRendered).filter(u=>!!u);if(o.length&&await Promise.all(o).catch(()=>{}),!i.isConnected)return;s?.thumb.remove();let a=document.createElement("div");a.className="ov-thumb";let l=a.attachShadow({mode:"open"});for(let u of document.querySelectorAll('link[rel="stylesheet"], style'))l.appendChild(u.cloneNode(!0));let p=document.createElement("deck-root");p.setAttribute("data-overview-snapshot","");for(let u of["preview","no-hint","no-arrows","no-counter"])p.setAttribute(u,"");let h=t.closest("deck-root");for(let u of["width","height","class","lang","dir","style"]){let f=h?.getAttribute(u);f!=null&&p.setAttribute(u,f)}p.style.cssText+=";position:absolute;inset:0;width:100%;height:100%;",p.appendChild(Gn(t,Number(i.dataset.idx))),l.appendChild(p),e.set(t,{key:n,thumb:a}),i.insertBefore(a,i.firstChild),i.dataset.loaded="1",delete i.dataset.building}function Qn(i,t){let e=i.shadowRoot;if(!e)return()=>{};Yn(e);let r=e.querySelector("#overview-grid");r||(r=document.createElement("div"),r.id="overview-grid",e.appendChild(r));let n=$i.get(i);n||(n=new Map,$i.set(i,n));let s=new Set(t.slides);for(let[b,$]of n)s.has(b)||($.thumb.remove(),n.delete(b));let o=Array.from(document.querySelectorAll('link[rel="stylesheet"], style')).filter(b=>!b.id.startsWith("rik-deck-")).map(b=>b.outerHTML).join("")+["width","height","class","lang","dir","style"].map(b=>i.getAttribute(b)).join("|"),a=o+t.slides.map(Un).join("")+JSON.stringify(t.chapters.map(b=>b.startIdx)),l=ur.get(i);if(l?.key===a)return r.querySelectorAll(".ov-cell").forEach(b=>{let $=Number(b.dataset.idx)===t.currentIdx;b.toggleAttribute("data-current",$),$?b.setAttribute("aria-current","true"):b.removeAttribute("aria-current")}),requestAnimationFrame(()=>{if(!i.hasAttribute("overview"))return;let b=r.querySelector(".ov-cell[data-current]");b?.scrollIntoView({block:"center"}),b?.focus({preventScroll:!0})}),l.dispose;l?.dispose(),r.innerHTML="";let p=t.slides.length,h=p>60,u=p>300?140:p>150?160:p>60?180:220;r.style.setProperty("--ov-cell-min",`${u}px`);let f=e.querySelector("#stage"),y=f?.clientWidth||window.innerWidth,A=f?.clientHeight||window.innerHeight;r.style.setProperty("--ov-thumb-w",`${y}px`),r.style.setProperty("--ov-thumb-h",`${A}px`);let P=new ResizeObserver(()=>{let b=r.querySelector(".ov-cell")?.clientWidth;b&&r.style.setProperty("--overview-scale",String(b/y))});P.observe(r),requestAnimationFrame(()=>{let b=r.querySelector(".ov-cell")?.clientWidth??u;r.style.setProperty("--overview-scale",String(b/y))});let N=document.createElement("div");N.className="ov-bar";let X=document.createElement("input");X.className="ov-search",X.type="search",X.placeholder=`Search ${p} slides \xB7 type to filter`,X.spellcheck=!1,N.appendChild(X);let Ce=document.createElement("span");Ce.className="ov-count",Ce.textContent=`${p} slides \xB7 ${t.chapters.length} chapters`,N.appendChild(Ce);let Pe=document.createElement("span");Pe.className="ov-hint",Pe.textContent="O \xB7 Esc \xB7 close",N.appendChild(Pe),r.appendChild(N);let ke=document.createElement("div");ke.className=`ov-body${h?"":" compact"}`,r.appendChild(ke);let Q=h?document.createElement("aside"):null;Q&&(Q.className="ov-aside",ke.appendChild(Q));let kt=document.createElement("div");kt.className=`ov-main${h?"":" ov-path"}`,ke.appendChild(kt);let Ft=[],$r=[],Ar=new WeakMap,bt=!1,yt=[],Xt=!1,Tr=()=>{if(Xt||bt||!yt.length)return;Xt=!0;let b=()=>{Xt=!1,!bt&&(yt.shift()?.(),Tr())};"requestIdleCallback"in window?window.requestIdleCallback(b,{timeout:1e3}):setTimeout(b,32)},xt=new IntersectionObserver(b=>{for(let $ of b){if(!$.isIntersecting)continue;let _=$.target;if(_.dataset.loaded||_.dataset.building)continue;let I=Ar.get(_);if(!I)continue;_.dataset.building="1",xt.unobserve(_);let E=()=>{Jn(_,I,n,o).catch(Z=>{let M=Number(_.dataset.tries??"0")+1;_.dataset.tries=String(M),console.warn("[rikiki/overview] thumbnail build failed",Z),delete _.dataset.building,M<3&&!bt&&xt.observe(_)})};i.hasAttribute("overview")?E():(yt.push(E),Tr())}},{root:null,rootMargin:"300px 0px",threshold:0});t.chapters.forEach((b,$)=>{let _=document.createElement("section");if(_.className="ov-chapter",_.id=`ov-chapter-${$}`,h){let E=document.createElement("header");E.className="ov-chapter-head";let Z=document.createElement("span");Z.className="ov-chapter-num",Z.textContent=String($+1).padStart(2,"0"),E.appendChild(Z);let M=document.createElement("span");M.className="ov-chapter-title",M.textContent=Ai(b),E.appendChild(M);let T=document.createElement("span");T.className="ov-chapter-count",T.textContent=`${b.slides.length} slide${b.slides.length>1?"s":""}`,E.appendChild(T),_.appendChild(E)}let I=document.createElement("div");if(I.className="ov-row",b.slides.forEach((E,Z)=>{if(!h&&Z>0){let Pr=document.createElement("div");Pr.className="ov-connector",I.appendChild(Pr)}let M=b.startIdx+Z,T=document.createElement("button");T.type="button",T.className="ov-cell",T.dataset.idx=String(M),T.dataset.search=Ti(E),M===t.currentIdx&&(T.dataset.current="1"),Ar.set(T,E),xt.observe(T);let be=document.createElement("span");be.className="ov-cell-label",be.textContent=String(M+1),T.appendChild(be);let Cr=Ti(E).trim().slice(0,80);T.setAttribute("aria-label",`Slide ${M+1} of ${p}${Cr?` \xB7 ${Cr}`:""}`),M===t.currentIdx&&T.setAttribute("aria-current","true"),T.addEventListener("click",()=>t.onPick(M)),I.appendChild(T)}),_.appendChild(I),kt.appendChild(_),Ft.push(_),Q){let E=document.createElement("button");E.type="button",E.className="ov-aside-item",t.currentIdx>=b.startIdx&&t.currentIdx<b.startIdx+b.slides.length&&(E.dataset.active="1");let M=document.createElement("span");M.className="ov-aside-num",M.textContent=String($+1).padStart(2,"0"),E.appendChild(M);let T=document.createElement("span");T.className="ov-aside-text",T.textContent=Ai(b);let be=document.createElement("div");be.className="ov-aside-count",be.textContent=`${b.slides.length} slide${b.slides.length>1?"s":""}`,T.appendChild(be),E.appendChild(T),E.addEventListener("click",()=>{_.scrollIntoView({behavior:"smooth",block:"start"})}),Q.appendChild(E),$r.push(E)}});let Zt=null;Q&&(Zt=new IntersectionObserver(b=>{let $=b.filter(_=>_.isIntersecting).sort((_,I)=>_.boundingClientRect.top-I.boundingClientRect.top);if($.length>0){let _=Ft.indexOf($[0].target);_>=0&&$r.forEach((I,E)=>{E===_?I.dataset.active="1":delete I.dataset.active})}},{root:kt,rootMargin:"0px 0px -70% 0px",threshold:0}),Ft.forEach(b=>{Zt.observe(b)}));let zr=r.querySelectorAll(".ov-cell");X.addEventListener("input",()=>{let b=X.value.trim().toLowerCase();if(!b){zr.forEach($=>{delete $.dataset.filteredOut});return}zr.forEach($=>{($.dataset.search||"").includes(b)?delete $.dataset.filteredOut:$.dataset.filteredOut="1"})}),requestAnimationFrame(()=>{if(!i.hasAttribute("overview"))return;let b=r.querySelector(".ov-cell[data-current]");b&&(b.scrollIntoView({block:"center"}),b.focus({preventScroll:!0}))}),r.addEventListener("keydown",b=>{let $=b.key;if($!=="ArrowLeft"&&$!=="ArrowRight")return;let _=[...r.querySelectorAll(".ov-cell")].filter(Z=>!Z.dataset.filteredOut),I=_.indexOf(document.activeElement);if(I<0)return;b.preventDefault();let E=_[I+($==="ArrowRight"?1:-1)];E?.focus(),E?.scrollIntoView({block:"nearest"})});let Lr=()=>{bt=!0,P.disconnect(),yt.length=0,ur.delete(i),Zt?.disconnect(),xt.disconnect(),r&&(r.innerHTML="")};return ur.set(i,{key:a,dispose:Lr}),Lr}var Ei,$i,ur,Wn,Fn,mr=Me(()=>{"use strict";Ei="data-deck-overview",$i=new WeakMap,ur=new WeakMap;Wn=`
|
|
334
377
|
:host([overview]) ::slotted(*) { display: none !important; }
|
|
335
|
-
:host([overview]) #overview-grid {
|
|
378
|
+
:host(:is([overview], [data-overview-warming])) #overview-grid {
|
|
336
379
|
position: fixed; inset: 0;
|
|
337
380
|
background: var(--rik-surface-page);
|
|
338
381
|
overflow: hidden;
|
|
@@ -342,7 +385,7 @@ ${n.themeHref?`<link rel="stylesheet" href="${Pt(n.themeHref)}">`:""}
|
|
|
342
385
|
}
|
|
343
386
|
|
|
344
387
|
/* \u2500\u2500 Top bar \xB7 search, slide count, close hint \u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
345
|
-
:host([overview]) .ov-bar {
|
|
388
|
+
:host(:is([overview], [data-overview-warming])) .ov-bar {
|
|
346
389
|
display: flex; align-items: center; gap: 16px;
|
|
347
390
|
padding: 14px 28px;
|
|
348
391
|
background: var(--rik-surface-raised);
|
|
@@ -351,7 +394,7 @@ ${n.themeHref?`<link rel="stylesheet" href="${Pt(n.themeHref)}">`:""}
|
|
|
351
394
|
letter-spacing: 0.10em;
|
|
352
395
|
color: var(--rik-text-default--faint);
|
|
353
396
|
}
|
|
354
|
-
:host([overview]) .ov-bar .ov-search {
|
|
397
|
+
:host(:is([overview], [data-overview-warming])) .ov-bar .ov-search {
|
|
355
398
|
flex: 1;
|
|
356
399
|
appearance: none;
|
|
357
400
|
background: var(--rik-surface-raised--strong);
|
|
@@ -363,28 +406,28 @@ ${n.themeHref?`<link rel="stylesheet" href="${Pt(n.themeHref)}">`:""}
|
|
|
363
406
|
letter-spacing: 0;
|
|
364
407
|
max-width: 480px;
|
|
365
408
|
}
|
|
366
|
-
:host([overview]) .ov-bar .ov-search:focus {
|
|
409
|
+
:host(:is([overview], [data-overview-warming])) .ov-bar .ov-search:focus {
|
|
367
410
|
outline: none;
|
|
368
411
|
border-color: var(--rik-accent);
|
|
369
412
|
box-shadow: 0 0 0 3px var(--rik-accent--soft);
|
|
370
413
|
}
|
|
371
|
-
:host([overview]) .ov-bar .ov-count { color: var(--rik-accent); }
|
|
372
|
-
:host([overview]) .ov-bar .ov-hint { letter-spacing: 0.16em; text-transform: uppercase; }
|
|
414
|
+
:host(:is([overview], [data-overview-warming])) .ov-bar .ov-count { color: var(--rik-accent); }
|
|
415
|
+
:host(:is([overview], [data-overview-warming])) .ov-bar .ov-hint { letter-spacing: 0.16em; text-transform: uppercase; }
|
|
373
416
|
|
|
374
417
|
/* \u2500\u2500 Sidebar layout (many slides) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
375
|
-
:host([overview]) .ov-body {
|
|
418
|
+
:host(:is([overview], [data-overview-warming])) .ov-body {
|
|
376
419
|
display: grid;
|
|
377
420
|
grid-template-columns: 240px 1fr;
|
|
378
421
|
min-height: 0;
|
|
379
422
|
}
|
|
380
|
-
:host([overview]) .ov-body.compact { grid-template-columns: 1fr; }
|
|
381
|
-
:host([overview]) .ov-aside {
|
|
423
|
+
:host(:is([overview], [data-overview-warming])) .ov-body.compact { grid-template-columns: 1fr; }
|
|
424
|
+
:host(:is([overview], [data-overview-warming])) .ov-aside {
|
|
382
425
|
border-right: 1px solid var(--rik-border-default);
|
|
383
426
|
background: var(--rik-surface-raised);
|
|
384
427
|
overflow-y: auto;
|
|
385
428
|
padding: 16px 0;
|
|
386
429
|
}
|
|
387
|
-
:host([overview]) .ov-aside-item {
|
|
430
|
+
:host(:is([overview], [data-overview-warming])) .ov-aside-item {
|
|
388
431
|
display: grid;
|
|
389
432
|
grid-template-columns: 36px 1fr;
|
|
390
433
|
gap: 10px;
|
|
@@ -395,84 +438,84 @@ ${n.themeHref?`<link rel="stylesheet" href="${Pt(n.themeHref)}">`:""}
|
|
|
395
438
|
color: var(--rik-text-default--muted);
|
|
396
439
|
transition: background 0.12s, color 0.12s, border-color 0.12s;
|
|
397
440
|
}
|
|
398
|
-
:host([overview]) .ov-aside-item:hover {
|
|
441
|
+
:host(:is([overview], [data-overview-warming])) .ov-aside-item:hover {
|
|
399
442
|
background: var(--rik-surface-tint);
|
|
400
443
|
color: var(--rik-text-default);
|
|
401
444
|
}
|
|
402
|
-
:host([overview]) .ov-aside-item[data-active] {
|
|
445
|
+
:host(:is([overview], [data-overview-warming])) .ov-aside-item[data-active] {
|
|
403
446
|
background: var(--rik-accent--faint);
|
|
404
447
|
border-left-color: var(--rik-accent);
|
|
405
448
|
color: var(--rik-text-default);
|
|
406
449
|
}
|
|
407
|
-
:host([overview]) .ov-aside-num {
|
|
450
|
+
:host(:is([overview], [data-overview-warming])) .ov-aside-num {
|
|
408
451
|
font: 800 0.85rem/1 var(--rik-font-mono);
|
|
409
452
|
color: var(--rik-accent);
|
|
410
453
|
}
|
|
411
|
-
:host([overview]) .ov-aside-text {
|
|
454
|
+
:host(:is([overview], [data-overview-warming])) .ov-aside-text {
|
|
412
455
|
font: 700 0.92rem/1.3 var(--rik-font-display, var(--rik-font-sans));
|
|
413
456
|
letter-spacing: -0.005em;
|
|
414
457
|
}
|
|
415
|
-
:host([overview]) .ov-aside-count {
|
|
458
|
+
:host(:is([overview], [data-overview-warming])) .ov-aside-count {
|
|
416
459
|
font: 600 0.70rem/1 var(--rik-font-mono);
|
|
417
460
|
color: var(--rik-text-default--faint);
|
|
418
461
|
margin-top: 4px;
|
|
419
462
|
}
|
|
420
463
|
|
|
421
464
|
/* \u2500\u2500 Main scroll area \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
422
|
-
:host([overview]) .ov-main {
|
|
465
|
+
:host(:is([overview], [data-overview-warming])) .ov-main {
|
|
423
466
|
overflow-y: auto;
|
|
424
467
|
padding: 24px 32px 48px;
|
|
425
468
|
display: flex; flex-direction: column;
|
|
426
469
|
gap: 32px;
|
|
427
470
|
min-width: 0;
|
|
428
471
|
}
|
|
429
|
-
:host([overview]) .ov-chapter {
|
|
472
|
+
:host(:is([overview], [data-overview-warming])) .ov-chapter {
|
|
430
473
|
display: flex; flex-direction: column;
|
|
431
474
|
gap: 12px;
|
|
432
475
|
scroll-margin-top: 24px;
|
|
433
476
|
}
|
|
434
|
-
:host([overview]) .ov-chapter-head {
|
|
477
|
+
:host(:is([overview], [data-overview-warming])) .ov-chapter-head {
|
|
435
478
|
display: flex; align-items: baseline; gap: 12px;
|
|
436
479
|
padding-bottom: 6px;
|
|
437
480
|
border-bottom: 2px solid var(--rik-accent);
|
|
438
481
|
}
|
|
439
|
-
:host([overview]) .ov-chapter-num {
|
|
482
|
+
:host(:is([overview], [data-overview-warming])) .ov-chapter-num {
|
|
440
483
|
font: 800 0.85rem/1 var(--rik-font-mono);
|
|
441
484
|
color: var(--rik-accent);
|
|
442
485
|
letter-spacing: 0.12em;
|
|
443
486
|
}
|
|
444
|
-
:host([overview]) .ov-chapter-title {
|
|
487
|
+
:host(:is([overview], [data-overview-warming])) .ov-chapter-title {
|
|
445
488
|
font: 800 1.2rem/1.2 var(--rik-font-display, var(--rik-font-sans));
|
|
446
489
|
color: var(--rik-text-default);
|
|
447
490
|
letter-spacing: -0.012em;
|
|
448
491
|
flex: 1;
|
|
449
492
|
min-width: 0;
|
|
450
493
|
}
|
|
451
|
-
:host([overview]) .ov-chapter-count {
|
|
494
|
+
:host(:is([overview], [data-overview-warming])) .ov-chapter-count {
|
|
452
495
|
font: 700 0.72rem/1 var(--rik-font-mono);
|
|
453
496
|
color: var(--rik-text-default--faint);
|
|
454
497
|
letter-spacing: 0.1em;
|
|
455
498
|
text-transform: uppercase;
|
|
456
499
|
}
|
|
457
|
-
:host([overview]) .ov-row {
|
|
500
|
+
:host(:is([overview], [data-overview-warming])) .ov-row {
|
|
458
501
|
display: grid;
|
|
459
502
|
grid-template-columns: repeat(auto-fill, minmax(var(--ov-cell-min, 180px), 1fr));
|
|
460
503
|
gap: 12px;
|
|
461
504
|
}
|
|
462
505
|
|
|
463
506
|
/* \u2500\u2500 Path layout (\u2264 60 slides) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
464
|
-
:host([overview]) .ov-path .ov-row {
|
|
507
|
+
:host(:is([overview], [data-overview-warming])) .ov-path .ov-row {
|
|
465
508
|
display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
|
|
466
509
|
}
|
|
467
|
-
:host([overview]) .ov-path .ov-connector {
|
|
510
|
+
:host(:is([overview], [data-overview-warming])) .ov-path .ov-connector {
|
|
468
511
|
flex: 0 0 auto;
|
|
469
512
|
width: 16px; height: 2px;
|
|
470
513
|
background: var(--rik-border-default);
|
|
471
514
|
}
|
|
472
|
-
:host([overview]) .ov-path .ov-cell { flex: 0 0 auto; width: clamp(160px, 14vw, 260px); }
|
|
515
|
+
:host(:is([overview], [data-overview-warming])) .ov-path .ov-cell { flex: 0 0 auto; width: clamp(160px, 14vw, 260px); }
|
|
473
516
|
|
|
474
517
|
/* \u2500\u2500 Thumbnail cell \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
475
|
-
:host([overview]) .ov-cell {
|
|
518
|
+
:host(:is([overview], [data-overview-warming])) .ov-cell {
|
|
476
519
|
position: relative;
|
|
477
520
|
aspect-ratio: 16 / 9;
|
|
478
521
|
background:
|
|
@@ -492,24 +535,24 @@ ${n.themeHref?`<link rel="stylesheet" href="${Pt(n.themeHref)}">`:""}
|
|
|
492
535
|
}
|
|
493
536
|
/* The keyboard user must see where they are \xB7 without this the grid moves
|
|
494
537
|
focus invisibly. */
|
|
495
|
-
:host([overview]) .ov-cell:focus-visible {
|
|
538
|
+
:host(:is([overview], [data-overview-warming])) .ov-cell:focus-visible {
|
|
496
539
|
outline: var(--rik-focus-ring--width, 2px) solid var(--rik-focus-ring, currentColor);
|
|
497
540
|
outline-offset: var(--rik-focus-ring--offset, 2px);
|
|
498
541
|
z-index: 2;
|
|
499
542
|
}
|
|
500
|
-
:host([overview]) .ov-cell:hover {
|
|
543
|
+
:host(:is([overview], [data-overview-warming])) .ov-cell:hover {
|
|
501
544
|
transform: translateY(-2px) scale(1.015);
|
|
502
545
|
border-color: var(--rik-accent--soft);
|
|
503
546
|
box-shadow: var(--rik-elevation-3);
|
|
504
547
|
z-index: 1;
|
|
505
548
|
}
|
|
506
|
-
:host([overview]) .ov-cell[data-current] {
|
|
549
|
+
:host(:is([overview], [data-overview-warming])) .ov-cell[data-current] {
|
|
507
550
|
border-color: var(--rik-accent);
|
|
508
551
|
box-shadow: 0 0 0 3px var(--rik-accent--soft), var(--rik-elevation-2);
|
|
509
552
|
}
|
|
510
|
-
:host([overview]) .ov-cell[data-filtered-out] { opacity: 0.10; pointer-events: none; transform: scale(0.96); }
|
|
511
|
-
:host([overview]) .ov-cell:not([data-loaded]) .ov-thumb { display: none; }
|
|
512
|
-
:host([overview]) .ov-cell:not([data-loaded])::before {
|
|
553
|
+
:host(:is([overview], [data-overview-warming])) .ov-cell[data-filtered-out] { opacity: 0.10; pointer-events: none; transform: scale(0.96); }
|
|
554
|
+
:host(:is([overview], [data-overview-warming])) .ov-cell:not([data-loaded]) .ov-thumb { display: none; }
|
|
555
|
+
:host(:is([overview], [data-overview-warming])) .ov-cell:not([data-loaded])::before {
|
|
513
556
|
content: '';
|
|
514
557
|
position: absolute; inset: 0;
|
|
515
558
|
background:
|
|
@@ -529,7 +572,7 @@ ${n.themeHref?`<link rel="stylesheet" href="${Pt(n.themeHref)}">`:""}
|
|
|
529
572
|
/* The thumb mirrors the letterboxed stage, so make it a size container too \xB7
|
|
530
573
|
the cloned slide's cqw/cqh then resolve exactly as they do live instead of
|
|
531
574
|
falling back to the (larger) window. */
|
|
532
|
-
:host([overview]) .ov-thumb {
|
|
575
|
+
:host(:is([overview], [data-overview-warming])) .ov-thumb {
|
|
533
576
|
position: absolute; top: 0; left: 0;
|
|
534
577
|
width: var(--ov-thumb-w, 1920px); height: var(--ov-thumb-h, 1080px);
|
|
535
578
|
transform: scale(var(--overview-scale, 0.2));
|
|
@@ -537,8 +580,8 @@ ${n.themeHref?`<link rel="stylesheet" href="${Pt(n.themeHref)}">`:""}
|
|
|
537
580
|
pointer-events: none;
|
|
538
581
|
container-type: size;
|
|
539
582
|
}
|
|
540
|
-
:host([overview]) .ov-thumb > * { display: flex !important; }
|
|
541
|
-
:host([overview]) .ov-mermaid-snap {
|
|
583
|
+
:host(:is([overview], [data-overview-warming])) .ov-thumb > * { display: flex !important; }
|
|
584
|
+
:host(:is([overview], [data-overview-warming])) .ov-mermaid-snap {
|
|
542
585
|
display: flex; align-items: center; justify-content: center;
|
|
543
586
|
background: var(--rik-code__bg);
|
|
544
587
|
border: 1px solid var(--rik-code__border);
|
|
@@ -546,11 +589,11 @@ ${n.themeHref?`<link rel="stylesheet" href="${Pt(n.themeHref)}">`:""}
|
|
|
546
589
|
padding: var(--rik-space-4);
|
|
547
590
|
overflow: hidden; min-width: 0;
|
|
548
591
|
}
|
|
549
|
-
:host([overview]) .ov-mermaid-snap svg {
|
|
592
|
+
:host(:is([overview], [data-overview-warming])) .ov-mermaid-snap svg {
|
|
550
593
|
width: 100% !important; height: auto !important;
|
|
551
594
|
max-width: 100% !important; max-height: 60cqh;
|
|
552
595
|
}
|
|
553
|
-
:host([overview]) .ov-cell-label {
|
|
596
|
+
:host(:is([overview], [data-overview-warming])) .ov-cell-label {
|
|
554
597
|
position: absolute; bottom: 6px; right: 8px;
|
|
555
598
|
font: 700 0.70rem/1 var(--rik-font-mono);
|
|
556
599
|
color: var(--rik-text-default);
|
|
@@ -559,8 +602,9 @@ ${n.themeHref?`<link rel="stylesheet" href="${Pt(n.themeHref)}">`:""}
|
|
|
559
602
|
z-index: 2;
|
|
560
603
|
pointer-events: none;
|
|
561
604
|
}
|
|
562
|
-
:host(:not([overview])) #overview-grid {
|
|
563
|
-
|
|
605
|
+
:host(:not([overview])) #overview-grid { visibility: hidden; pointer-events: none; }
|
|
606
|
+
:host(:not([overview]):not([data-overview-warming])) #overview-grid { display: none; }
|
|
607
|
+
`;Fn=["fill","stroke","clip-path","mask","filter","marker-start","marker-mid","marker-end","style"]});var Ci={};wt(Ci,{installTransitions:()=>is});function is(i){let t=i;if(t.__rkTransitions)return t.__rkTransitions;let e=i.shadowRoot;if(!e)return()=>{};let r=document.createElement("style");r.textContent=ts,r.setAttribute("data-rik-transitions",""),e.appendChild(r);function n(l,p){if(!p)return 0;let h=l.compareDocumentPosition(p);return h&Node.DOCUMENT_POSITION_PRECEDING?1:h&Node.DOCUMENT_POSITION_FOLLOWING?-1:0}let s=l=>{if(i.__rkMorphActive)return;let p=l,h=p.detail.current,u=p.detail.previous;if(!h)return;let f=h.dataset.transition||i.transition||"fade",y=n(h,u);f==="slide"&&y<0?f="slide-right":f==="slide-right"&&y>0?f="slide":f==="slide-up"&&y<0?f="slide-down":f==="slide-down"&&y>0&&(f="slide-up");let A=`rk-enter-${f}`,P=`rk-exit-${f}`,N=O[f]??480;u&&u!==h&&Dn.has(f)&&(u.classList.remove(...Li,...rs,"rk-leaving"),u.style.display="flex",u.style.zIndex="1",u.offsetWidth,u.classList.add("rk-leaving",P),window.setTimeout(()=>{u.classList.remove("rk-leaving",P),u.style.display="",u.style.zIndex=""},N+40)),h.classList.remove(...Li),h.style.zIndex="2",h.offsetWidth,h.classList.add(A),window.setTimeout(()=>{h.classList.remove(A),h.style.zIndex=""},N+40)};i.addEventListener("slide-change",s);let o=i.querySelector(":scope > [active]");o&&s(new CustomEvent("slide-change",{detail:{current:o,previous:null}}));let a=()=>{i.removeEventListener("slide-change",s),r.remove(),delete t.__rkTransitions};return t.__rkTransitions=a,a}var O,Dn,B,es,ts,Li,rs,fr=Me(()=>{"use strict";O={slide:560,"slide-up":520,"slide-down":520,"slide-right":560,fade:480,zoom:520,flip:560},Dn=new Set(["slide","slide-right","slide-up","slide-down"]),B="var(--rik-motion__ease-out, cubic-bezier(0.16, 1, 0.3, 1))",es="var(--rik-motion__ease-spring, cubic-bezier(0.5, 1.8, 0.3, 1))",ts=`
|
|
564
608
|
/* Incoming \xB7 from right (forward) */
|
|
565
609
|
@keyframes rk-slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
|
|
566
610
|
/* Outgoing \xB7 pushed off to the left (forward) */
|
|
@@ -591,30 +635,30 @@ ${n.themeHref?`<link rel="stylesheet" href="${Pt(n.themeHref)}">`:""}
|
|
|
591
635
|
a placeholder so the selector resolves cleanly in shadow CSS. */
|
|
592
636
|
::slotted(.rk-leaving) { }
|
|
593
637
|
|
|
594
|
-
::slotted([active].rk-enter-slide) { animation: rk-slide-in ${
|
|
595
|
-
::slotted(.rk-leaving.rk-exit-slide) { animation: rk-slide-out ${
|
|
596
|
-
::slotted([active].rk-enter-slide-right) { animation: rk-slide-right-in ${
|
|
597
|
-
::slotted(.rk-leaving.rk-exit-slide-right){ animation: rk-slide-right-out ${
|
|
598
|
-
::slotted([active].rk-enter-slide-up) { animation: rk-slide-up-in ${
|
|
599
|
-
::slotted(.rk-leaving.rk-exit-slide-up) { animation: rk-slide-up-out ${
|
|
600
|
-
::slotted([active].rk-enter-slide-down) { animation: rk-slide-down-in ${
|
|
601
|
-
::slotted(.rk-leaving.rk-exit-slide-down) { animation: rk-slide-down-out ${
|
|
602
|
-
::slotted([active].rk-enter-fade) { animation: rk-fade-in ${
|
|
603
|
-
::slotted(.rk-leaving.rk-exit-fade) { animation: rk-fade-out ${
|
|
604
|
-
::slotted([active].rk-enter-zoom) { animation: rk-zoom-in ${
|
|
605
|
-
::slotted(.rk-leaving.rk-exit-zoom) { animation: rk-zoom-out ${
|
|
606
|
-
::slotted([active].rk-enter-flip) { animation: rk-flip-in ${
|
|
607
|
-
::slotted(.rk-leaving.rk-exit-flip) { animation: rk-flip-out ${
|
|
638
|
+
::slotted([active].rk-enter-slide) { animation: rk-slide-in ${O.slide}ms ${B} both; }
|
|
639
|
+
::slotted(.rk-leaving.rk-exit-slide) { animation: rk-slide-out ${O.slide}ms ${B} both; }
|
|
640
|
+
::slotted([active].rk-enter-slide-right) { animation: rk-slide-right-in ${O["slide-right"]}ms ${B} both; }
|
|
641
|
+
::slotted(.rk-leaving.rk-exit-slide-right){ animation: rk-slide-right-out ${O["slide-right"]}ms ${B} both; }
|
|
642
|
+
::slotted([active].rk-enter-slide-up) { animation: rk-slide-up-in ${O["slide-up"]}ms ${B} both; }
|
|
643
|
+
::slotted(.rk-leaving.rk-exit-slide-up) { animation: rk-slide-up-out ${O["slide-up"]}ms ${B} both; }
|
|
644
|
+
::slotted([active].rk-enter-slide-down) { animation: rk-slide-down-in ${O["slide-down"]}ms ${B} both; }
|
|
645
|
+
::slotted(.rk-leaving.rk-exit-slide-down) { animation: rk-slide-down-out ${O["slide-down"]}ms ${B} both; }
|
|
646
|
+
::slotted([active].rk-enter-fade) { animation: rk-fade-in ${O.fade}ms ${B} both; }
|
|
647
|
+
::slotted(.rk-leaving.rk-exit-fade) { animation: rk-fade-out ${O.fade}ms ${B} both; }
|
|
648
|
+
::slotted([active].rk-enter-zoom) { animation: rk-zoom-in ${O.zoom}ms ${es} both; }
|
|
649
|
+
::slotted(.rk-leaving.rk-exit-zoom) { animation: rk-zoom-out ${O.zoom}ms ${B} both; }
|
|
650
|
+
::slotted([active].rk-enter-flip) { animation: rk-flip-in ${O.flip}ms ${B} both; }
|
|
651
|
+
::slotted(.rk-leaving.rk-exit-flip) { animation: rk-flip-out ${O.flip}ms ${B} both; }
|
|
608
652
|
|
|
609
653
|
@media (prefers-reduced-motion: reduce) {
|
|
610
654
|
::slotted([active][class*='rk-enter-']),
|
|
611
655
|
::slotted(.rk-leaving) { animation: none; }
|
|
612
656
|
}
|
|
613
|
-
`,
|
|
614
|
-
\f\r]`,rt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
615
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Cr=/'/g,Pr=/"/g,Ir=/^(?:script|style|textarea|title)$/i,Qt=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),m=Qt(1),ro=Qt(2),io=Qt(3),_e=Symbol.for("lit-noChange"),C=Symbol.for("lit-nothing"),Mr=new WeakMap,xe=we.createTreeWalker(we,129);function Or(n,t){if(!Gt(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Tr!==void 0?Tr.createHTML(t):t}var nn=(n,t)=>{let e=n.length-1,r=[],i,s=t===2?"<svg>":t===3?"<math>":"",o=rt;for(let a=0;a<e;a++){let l=n[a],h,p,u=-1,f=0;for(;f<l.length&&(o.lastIndex=f,p=o.exec(l),p!==null);)f=o.lastIndex,o===rt?p[1]==="!--"?o=zr:p[1]!==void 0?o=Lr:p[2]!==void 0?(Ir.test(p[2])&&(i=RegExp("</"+p[2],"g")),o=ye):p[3]!==void 0&&(o=ye):o===ye?p[0]===">"?(o=i??rt,u=-1):p[1]===void 0?u=-2:(u=o.lastIndex-p[2].length,h=p[1],o=p[3]===void 0?ye:p[3]==='"'?Pr:Cr):o===Pr||o===Cr?o=ye:o===zr||o===Lr?o=rt:(o=ye,i=void 0);let b=o===ye&&n[a+1].startsWith("/>")?" ":"";s+=o===rt?l+tn:u>=0?(r.push(h),l.slice(0,u)+Hr+l.slice(u)+ae+b):l+ae+(u===-2?a:b)}return[Or(n,s+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},st=class n{constructor({strings:t,_$litType$:e},r){let i;this.parts=[];let s=0,o=0,a=t.length-1,l=this.parts,[h,p]=nn(t,e);if(this.el=n.createElement(h,r),xe.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(i=xe.nextNode())!==null&&l.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let u of i.getAttributeNames())if(u.endsWith(Hr)){let f=p[o++],b=i.getAttribute(u).split(ae),$=/([.?@])?(.*)/.exec(f);l.push({type:1,index:s,name:$[2],strings:b,ctor:$[1]==="."?Ft:$[1]==="?"?Xt:$[1]==="@"?Zt:Me}),i.removeAttribute(u)}else u.startsWith(ae)&&(l.push({type:6,index:s}),i.removeAttribute(u));if(Ir.test(i.tagName)){let u=i.textContent.split(ae),f=u.length-1;if(f>0){i.textContent=_t?_t.emptyScript:"";for(let b=0;b<f;b++)i.append(u[b],it()),xe.nextNode(),l.push({type:2,index:++s});i.append(u[f],it())}}}else if(i.nodeType===8)if(i.data===Nr)l.push({type:2,index:s});else{let u=-1;for(;(u=i.data.indexOf(ae,u+1))!==-1;)l.push({type:7,index:s}),u+=ae.length-1}s++}}static createElement(t,e){let r=we.createElement("template");return r.innerHTML=t,r}};function Pe(n,t,e=n,r){if(t===_e)return t;let i=r!==void 0?e._$Co?.[r]:e._$Cl,s=nt(t)?void 0:t._$litDirective$;return i?.constructor!==s&&(i?._$AO?.(!1),s===void 0?i=void 0:(i=new s(n),i._$AT(n,e,r)),r!==void 0?(e._$Co??=[])[r]=i:e._$Cl=i),i!==void 0&&(t=Pe(n,i._$AS(n,t.values),i,r)),t}var Wt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:r}=this._$AD,i=(t?.creationScope??we).importNode(e,!0);xe.currentNode=i;let s=xe.nextNode(),o=0,a=0,l=r[0];for(;l!==void 0;){if(o===l.index){let h;l.type===2?h=new ot(s,s.nextSibling,this,t):l.type===1?h=new l.ctor(s,l.name,l.strings,this,t):l.type===6&&(h=new Vt(s,this,t)),this._$AV.push(h),l=r[++a]}o!==l?.index&&(s=xe.nextNode(),o++)}return xe.currentNode=we,i}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},ot=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,i){this.type=2,this._$AH=C,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Pe(this,t,e),nt(t)?t===C||t==null||t===""?(this._$AH!==C&&this._$AR(),this._$AH=C):t!==this._$AH&&t!==_e&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):rn(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==C&&nt(this._$AH)?this._$AA.nextSibling.data=t:this.T(we.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,i=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=st.createElement(Or(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(e);else{let s=new Wt(i,this),o=s.u(this.options);s.p(e),this.T(o),this._$AH=s}}_$AC(t){let e=Mr.get(t.strings);return e===void 0&&Mr.set(t.strings,e=new st(t)),e}k(t){Gt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,i=0;for(let s of t)i===e.length?e.push(r=new n(this.O(it()),this.O(it()),this,this.options)):r=e[i],r._$AI(s),i++;i<e.length&&(this._$AR(r&&r._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let r=Ar(t).nextSibling;Ar(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},Me=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,i,s){this.type=1,this._$AH=C,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=C}_$AI(t,e=this,r,i){let s=this.strings,o=!1;if(s===void 0)t=Pe(this,t,e,0),o=!nt(t)||t!==this._$AH&&t!==_e,o&&(this._$AH=t);else{let a=t,l,h;for(t=s[0],l=0;l<s.length-1;l++)h=Pe(this,a[r+l],e,l),h===_e&&(h=this._$AH[l]),o||=!nt(h)||h!==this._$AH[l],h===C?t=C:t!==C&&(t+=(h??"")+s[l+1]),this._$AH[l]=h}o&&!i&&this.j(t)}j(t){t===C?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Ft=class extends Me{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===C?void 0:t}},Xt=class extends Me{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==C)}},Zt=class extends Me{constructor(t,e,r,i,s){super(t,e,r,i,s),this.type=5}_$AI(t,e=this){if((t=Pe(this,t,e,0)??C)===_e)return;let r=this._$AH,i=t===C&&r!==C||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,s=t!==C&&(r===C||i);i&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},Vt=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){Pe(this,t)}};var sn=Kt.litHtmlPolyfillSupport;sn?.(st,ot),(Kt.litHtmlVersions??=[]).push("3.3.3");var Rr=(n,t,e)=>{let r=e?.renderBefore??t,i=r._$litPart$;if(i===void 0){let s=e?.renderBefore??null;r._$litPart$=i=new ot(t.insertBefore(it(),s),s,void 0,e??{})}return i._$AI(n),i};var Jt=globalThis,g=class extends ee{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Rr(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return _e}};g._$litElement$=!0,g.finalized=!0,Jt.litElementHydrateSupport?.({LitElement:g});var on=Jt.litElementPolyfillSupport;on?.({LitElement:g});(Jt.litElementVersions??=[]).push("4.2.2");var k=n=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(n,t)}):customElements.define(n,t)};var an={attribute:!0,type:String,converter:tt,reflect:!1,hasChanged:wt},ln=(n=an,t,e)=>{let{kind:r,metadata:i}=e,s=globalThis.litPropertyMetadata.get(i);if(s===void 0&&globalThis.litPropertyMetadata.set(i,s=new Map),r==="setter"&&((n=Object.create(n)).wrapped=!0),s.set(e.name,n),r==="accessor"){let{name:o}=e;return{set(a){let l=t.get.call(this);t.set.call(this,a),this.requestUpdate(o,l,n,!0,a)},init(a){return a!==void 0&&this.C(o,void 0,n,a),a}}}if(r==="setter"){let{name:o}=e;return function(a){let l=this[o];t.call(this,a),this.requestUpdate(o,l,n,!0,a)}}throw Error("Unsupported decorator location: "+r)};function d(n){return(t,e)=>typeof e=="object"?ln(n,t,e):((r,i,s)=>{let o=i.hasOwnProperty(s);return i.constructor.createProperty(s,r),o?Object.getOwnPropertyDescriptor(i,s):void 0})(n,t,e)}function j(n){return d({...n,state:!0,attribute:!1})}function jr(n){if(!n||n==="transparent")return!1;let t=n.match(/^(?:rgb|hsl)a?\(([^)]*)\)$/i);if(t){let r=t[1].split(",");return r.length<4||parseFloat(r[3])>=1}let e=n.match(/\/\s*([\d.]+%?)\s*\)$/);if(e){let r=e[1];return(r.endsWith("%")?parseFloat(r)/100:parseFloat(r))>=1}return!0}var Br={slideCount:0,chapters:[]};function Ur(n){let t=[];return n.forEach((e,r)=>{if(e.toLowerCase()==="deck-section"||t.length===0)t.push({start:r,length:1});else{let s=t[t.length-1];t[t.length-1]={start:s.start,length:s.length+1}}}),{slideCount:n.length,chapters:t}}function qr(n,t){return t&&n.chapters.length>1&&n.chapters.some(e=>e.length>1)}function He(n,t){for(let e=0;e<n.chapters.length;e++){let r=n.chapters[e],i=t-r.start;if(i>=0&&i<r.length)return{chapter:e,index:i}}return{chapter:0,index:0}}function Yr(n,t){if(n.chapters.length===0)return null;let e=at(t.chapter,0,n.chapters.length-1),r=n.chapters[e],i=at(t.index,0,r.length-1);return r.start+i}function at(n,t,e){return Number.isNaN(n)?t:Math.max(t,Math.min(e,n))}var cn=/^#(\d+)\.(\d+)(?:s(\d+))?$/,dn=/^#(\d+)(?:\.(\d+))?$/;function St(n,t){if(t){let r=cn.exec(n);if(r)return{kind:"coords",coords:{chapter:Number(r[1])-1,index:Number(r[2])-1},step:r[3]?Number(r[3]):0}}let e=dn.exec(n);return e?{kind:"slide",slide:Number(e[1])-1,step:e[2]?Number(e[2]):0}:null}function Wr(n,t){if(t.twoD&&t.coords){let{chapter:e,index:r}=t.coords,i=n.step>0?`s${n.step}`:"";return`#${e+1}.${r+1}${i}`}return`#${n.slide+1}${n.step>0?`.${n.step}`:""}`}var Dt=n=>n.slideCount<=0;function $t(n,t,e){if(Dt(n))return null;let r=at(t.slide,0,n.slideCount-1),i=Math.max(0,e(r));return{slide:r,step:at(t.step,0,i)}}function At(n,t,e,r){if(Dt(n))return null;let i=Math.max(0,r(e.slide));return e.step<i?{slide:e.slide,step:e.step+1}:e.slide<n.slideCount-1?{slide:e.slide+1,step:0}:t.loop?{slide:0,step:0}:null}function Tt(n,t,e,r){if(Dt(n))return null;if(e.step>0)return{slide:e.slide,step:e.step-1};if(e.slide>0){let i=e.slide-1;return{slide:i,step:Math.max(0,r(i))}}if(t.loop){let i=n.slideCount-1;return{slide:i,step:Math.max(0,r(i))}}return null}function Ne(n,t,e){return $t(n,{slide:t,step:0},e)}function te(n,t,e){let r=Yr(n,t);return r===null?null:$t(n,{slide:r,step:0},e)}function Fr(n,t){return Ne(n,0,t)}function Xr(n,t){return Ne(n,n.slideCount-1,t)}function er(n,t){return n===null||t===null?n===t:n.slide===t.slide&&n.step===t.step}function Zr(n,t,e=!1){if(!t.ownsUrl)return null;let r=St(n.read(),t.twoD);if(!r)return null;let i=r.kind==="coords"?te(t.outline,r.coords,t.stepsOf):Ne(t.outline,r.slide,t.stepsOf);return i?t.stepsOf(i.slide)>0||!e?$t(t.outline,{slide:i.slide,step:r.step},t.stepsOf):{slide:i.slide,step:Math.max(0,r.step)}:null}function Vr(n,t,e){if(!e.ownsUrl)return;let r=Wr(t,{twoD:e.twoD,coords:e.twoD?He(e.outline,t.slide):void 0});n.read()!==r&&n.write(r)}var tr={intent:"none",preventDefault:!1},z=(n,t=!0)=>({intent:n,preventDefault:t}),Ie=(n,...t)=>t.some(e=>e.toLowerCase()===n.toLowerCase());function Kr(n){let{key:t}=n;return n.overview?Ie(t,"Escape","o","Enter")?z("close-overview"):tr:n.blanked?z("clear-blank"):Ie(t,".","b")?z("blank-black"):Ie(t,",","w")?z("blank-white"):n.zoomEnabled&&(t==="+"||t==="=")?z("zoom-in"):n.zoomEnabled&&t==="-"?z("zoom-out"):t==="0"&&n.zoomed?z("zoom-reset"):Ie(t,"?","h")?z("toggle-help",!1):t==="Escape"?z("close-help",!1):t==="Home"?z("first",!1):t==="End"?z("last",!1):Ie(t,"o")?z("open-overview"):Ie(t,"p")?z("toggle-presenter"):t===" "||t==="PageDown"?z("advance"):t==="PageUp"?z("back"):n.twoD?t==="ArrowRight"?z("next-chapter"):t==="ArrowLeft"?z("prev-chapter"):t==="ArrowDown"?z("next-in-chapter"):t==="ArrowUp"?z("prev-in-chapter"):tr:t==="ArrowRight"||t==="ArrowDown"?z("advance"):t==="ArrowLeft"||t==="ArrowUp"?z("back"):tr}var pn=new Set(["first","last","advance","back","next-chapter","prev-chapter","next-in-chapter","prev-in-chapter"]),Gr=n=>pn.has(n);function Qr(n,t,e,r,i){let s=()=>At(t,e,r,i),o=()=>Tt(t,e,r,i),{chapter:a,index:l}=He(t,r.slide);switch(n){case"first":return Fr(t,i);case"last":return Xr(t,i);case"advance":return s();case"back":return o();case"next-chapter":return a+1<t.chapters.length?te(t,{chapter:a+1,index:0},i):s();case"prev-chapter":return a>0?te(t,{chapter:a-1,index:0},i):o();case"next-in-chapter":{let h=t.chapters[a];return h&&l+1<h.length?te(t,{chapter:a,index:l+1},i):s()}case"prev-in-chapter":return l>0?te(t,{chapter:a,index:l-1},i):o()}}function Jr(n,t){let e=(n??"all").trim();return e==="none"?!1:e===""||e==="all"?!0:e.split(/\s+/).includes(t)}var Dr={zoom:1,panX:0,panY:0};function hn(n,t){return!t.width||!t.height||!n.width||!n.height?1:Math.min(t.width/n.width,t.height/n.height)}function un(n,t,e){let r=hn(n,t)*e;return{x:Math.max(0,(n.width*r-t.width)/2),y:Math.max(0,(n.height*r-t.height)/2)}}function zt(n,t,e){let r=un(t,e,n.zoom);return{zoom:n.zoom,panX:Math.max(-r.x,Math.min(r.x,n.panX)),panY:Math.max(-r.y,Math.min(r.y,n.panY))}}function ei(n,t,e,r,i,s,o){let a=Math.max(1,Math.min(o.max,n.zoom*t));if(a===n.zoom)return n;let l=a/n.zoom;return zt({zoom:a,panX:n.panX+(e-n.panX)*(1-l),panY:n.panY+(r-n.panY)*(1-l)},i,s)}function ti(n,t,e,r,i){return zt({zoom:n.zoom,panX:n.panX+t,panY:n.panY+e},r,i)}var ri=n=>n.zoom===1&&n.panX===0&&n.panY===0;var Lt={read(){return typeof location>"u"?"":location.hash},write(n){if(!(typeof history>"u"))try{history.replaceState(null,"",n)}catch{}}};var y=class extends g{constructor(){super(...arguments);this.current=0;this.step=0;this.blank=null;this.presenterActive=!1;this.overview=!1;this.fluid=!1;this.width=1920;this.height=1080;this.noHint=!1;this.noArrows=!1;this.noCounter=!1;this.preview=!1;this.noZoom=!1;this.transition=null;this.autoplay=0;this.loop=!1;this.swipe=!1;this.mouseNav=null;this.nav=null;this.slides=[];this.chapters=[];this._overviewTeardown=null;this._transitionLoaded=!1;this._autoplayTimer=null;this._autoplayPaused=!1;this._swipeStartX=0;this._swipeStartY=0;this._swipePointerId=null;this._navDownX=0;this._navDownY=0;this._wheelAccum=0;this._wheelLockUntil=0;this._zoom=1;this._panX=0;this._panY=0;this._plugins=[];this._ctx=null;this._applyScale=()=>{if(this._effectiveFluid()){this.style.removeProperty("--deck-scale");return}let e=Math.min(this.clientWidth/this.width,this.clientHeight/this.height);e>0&&this.style.setProperty("--deck-scale",String(e)),this._zoom>1&&(this._clampPan(),this._applyZoom())};this._resizeObserver=null;this._pendingStep=null;this._stepWatcher=null;this._panning=!1;this._panLastX=0;this._panLastY=0;this._onPanDown=e=>{this._zoom<=1||!this._zoomEnabled()||e.pointerType==="mouse"&&e.button!==0||e.target?.closest("a, button, input, textarea, select, [contenteditable]")||(this._panning=!0,this._panLastX=e.clientX,this._panLastY=e.clientY,this.toggleAttribute("data-panning",!0),this.setPointerCapture?.(e.pointerId))};this._onPanMove=e=>{this._panning&&(this._panBy(e.clientX-this._panLastX,e.clientY-this._panLastY),this._panLastX=e.clientX,this._panLastY=e.clientY)};this._onPanUp=e=>{this._panning&&(this._panning=!1,this.toggleAttribute("data-panning",!1),this.releasePointerCapture?.(e.pointerId))};this._onHoverEnter=()=>{this._autoplayPaused=!0,this._stopAutoplay()};this._onHoverLeave=()=>{this._autoplayPaused=!1,this.autoplay>0&&this._startAutoplay()};this._onPointerDown=e=>{!this.swipe||e.pointerType==="mouse"&&e.button!==0||e.target?.closest("a, button, input, textarea, [contenteditable]")||(this._swipePointerId=e.pointerId,this._swipeStartX=e.clientX,this._swipeStartY=e.clientY)};this._onPointerUp=e=>{if(this._swipePointerId===null||e.pointerId!==this._swipePointerId)return;if(this._zoom>1){this._swipePointerId=null;return}let r=e.clientX-this._swipeStartX,i=e.clientY-this._swipeStartY;this._swipePointerId=null,!(Math.abs(r)<60||Math.abs(r)<Math.abs(i)*2)&&(this._stopAutoplay(),r<0?this._advance():this._back(),this._restartAutoplay())};this._onNavPointerDown=e=>{this._navDownX=e.clientX,this._navDownY=e.clientY};this._onClickNav=e=>{if(!this._mouseEnabled("click")||this.overview||this.blank||this._zoom>1||this.shadowRoot?.querySelector("#kb-overlay.open")||Math.hypot(e.clientX-this._navDownX,e.clientY-this._navDownY)>5)return;let r=window.getSelection();r&&!r.isCollapsed||e.composedPath().some(s=>s instanceof HTMLElement?s.matches?.("a, button, input, textarea, select, [contenteditable], [data-no-advance]")?!0:s.id==="blank"||s.id==="kb-overlay"||s.id==="overview-grid"||s.id==="nav-arrows"||s.id==="kb-hint":!1)||(this._restartAutoplay(),e.shiftKey?this._back():this._advance())};this._onWheel=e=>{if(!this._isFullPage()&&!e.ctrlKey&&!e.metaKey&&this._zoom<=1)return;if(e.ctrlKey||e.metaKey){if(!this._zoomEnabled())return;e.preventDefault(),this._zoomAt(Math.exp(-e.deltaY*y.ZOOM_WHEEL_SENSITIVITY),e.clientX,e.clientY);return}if(this._zoom>1&&this._zoomEnabled()){e.preventDefault(),this._panBy(-e.deltaX,-e.deltaY);return}if(!this._mouseEnabled("wheel")||this.overview||this.blank||this._wheelTargetScrolls(e))return;e.preventDefault();let r=performance.now();if(r<this._wheelLockUntil||(this._wheelAccum+=e.deltaY,Math.abs(this._wheelAccum)<50))return;let i=this._wheelAccum>0;this._wheelAccum=0,this._wheelLockUntil=r+400,this._restartAutoplay(),i?this._advance():this._back()};this._onAuxUp=e=>{this._mouseEnabled("aux")&&(e.button!==3&&e.button!==4||(e.preventDefault(),this._restartAutoplay(),e.button===3?this._back():this._advance()))};this._onAuxClick=e=>{this._mouseEnabled("aux")&&(e.button===3||e.button===4)&&e.preventDefault()};this._outline=Br;this._onHash=()=>{this._readHash(!1)};this._onKey=e=>{if(!this._ownsKeyboard()||e.target&&e.target.matches?.("input,textarea,[contenteditable]"))return;this._restartAutoplay();let{intent:r,preventDefault:i}=Kr({key:e.key,overview:this.overview,blanked:this.blank!==null,zoomEnabled:this._zoomEnabled(),zoomed:this._zoom>1,twoD:this._has2DNav()});if(r!=="none"){if(i&&e.preventDefault(),Gr(r)){this._applyPosition(Qr(r,this._outline,{loop:this.loop},this._position,this._maxStepsFor));return}switch(r){case"close-overview":this.overview=!1;return;case"open-overview":this.overview=!0;return;case"clear-blank":this.blank=null;return;case"blank-black":this.blank="black";return;case"blank-white":this.blank="white";return;case"zoom-in":case"zoom-out":{let s=this.getBoundingClientRect(),o=r==="zoom-out"?1/y.ZOOM_STEP:y.ZOOM_STEP;this._zoomAt(o,s.left+s.width/2,s.top+s.height/2);return}case"zoom-reset":this._resetZoom();return;case"toggle-help":this._toggleHelp();return;case"close-help":this._closeHelp();return;case"toggle-presenter":this._togglePresenter();return}}};this._maxStepsFor=e=>{let r=this._baseMaxSteps(e),i=this.slides[e];if(i)for(let s of this._plugins)s.steps&&(r=Math.max(r,s.steps(i,this._context())));return r}}_context(){if(this._ctx)return this._ctx;let e=this;return this._ctx={host:e,get current(){return e.current},get step(){return e.step},get slides(){return e.slides},requestUpdate:()=>e.requestUpdate()},this._ctx}use(e){if(this._plugins.some(i=>i.name===e.name))return()=>{};e.navigate&&this._plugins.some(i=>i.navigate)&&console.warn(`[rikiki] plugin "${e.name}" has a navigate hook but another plugin already owns navigation \xB7 it will be ignored`),this._plugins.push(e);let r=e.setup?.(this._context());return this._applyStep(),this._updateUI(),()=>{let i=this._plugins.indexOf(e);i>=0&&this._plugins.splice(i,1),typeof r=="function"&&r()}}firstUpdated(){this._installRuntime(),this._scopeSlideStyles(),this.slides=Array.from(this.querySelectorAll(":scope > *")).filter(e=>e.tagName?.toLowerCase().startsWith("deck-")&&e.tagName?.toLowerCase()!=="deck-root"),this._buildChapters(),this._readHash(!0),this._applyActive(),this._applyStep(),this._updateUI(),this.requestUpdate()}_installRuntime(){this._applyCanvasVars(),this._applyScale(),this._resizeObserver=new ResizeObserver(this._applyScale),this._resizeObserver.observe(this),!this.preview&&(window.addEventListener("keydown",this._onKey),window.addEventListener("hashchange",this._onHash),this.addEventListener("pointerdown",this._onNavPointerDown),this.addEventListener("click",this._onClickNav),this.addEventListener("wheel",this._onWheel,{passive:!1}),this.addEventListener("pointerdown",this._onPanDown),this.addEventListener("pointermove",this._onPanMove),this.addEventListener("pointerup",this._onPanUp),this.addEventListener("pointercancel",this._onPanUp),window.addEventListener("mouseup",this._onAuxUp),window.addEventListener("auxclick",this._onAuxClick),this.autoplay>0&&this._startAutoplay(),this.swipe?(this.addEventListener("pointerdown",this._onPointerDown),this.addEventListener("pointerup",this._onPointerUp),this.addEventListener("pointercancel",this._onPointerUp),this.addEventListener("mouseenter",this._onHoverEnter),this.addEventListener("mouseleave",this._onHoverLeave)):this.autoplay>0&&(this.addEventListener("mouseenter",this._onHoverEnter),this.addEventListener("mouseleave",this._onHoverLeave)))}_scopeSlideStyles(){this.querySelectorAll("style[scoped]").forEach(e=>{e.dataset.rikScoped||(e.dataset.rikScoped="1",e.textContent=`@scope {
|
|
657
|
+
`,Li=["rk-enter-slide","rk-enter-slide-up","rk-enter-slide-down","rk-enter-slide-right","rk-enter-fade","rk-enter-zoom","rk-enter-flip"],rs=["rk-exit-slide","rk-exit-slide-up","rk-exit-slide-down","rk-exit-slide-right","rk-exit-fade","rk-exit-zoom","rk-exit-flip"]});var lo={};function tn(i,t="#0a0a0a"){J||(J=document.createElement("div"),J.style.cssText=`position:fixed;bottom:12px;left:12px;z-index:9999;padding:6px 12px;background:${t};color:#F7CB44;font:600 11px/1.4 monospace;border-radius:6px;letter-spacing:.08em;text-transform:uppercase;opacity:0;transition:opacity .2s;pointer-events:none;border:1px solid #F7CB44`,document.body.appendChild(J)),J.textContent=i,J.style.opacity="1",J._t&&clearTimeout(J._t),J._t=setTimeout(()=>{J&&(J.style.opacity="0")},1500)}async function rn(i){try{let t=await fetch(`${i}?_lr=${Date.now()}`,{method:"HEAD",cache:"no-store"}),e=t.headers.get("last-modified")??t.headers.get("etag")??t.headers.get("content-length");if(!e)return!1;let r=Di.get(i);return Di.set(i,e),r!==void 0&&r!==e}catch{return!1}}async function ao(){for(;;){for(let i of en)if(await rn(i)){tn(`reload \xB7 ${i.split("/").pop()}`),await new Promise(t=>setTimeout(t,150)),location.reload();return}await new Promise(i=>setTimeout(i,800))}}var H,so,oo,en,Di,J,nn=Me(()=>{"use strict";H=i=>new URL(i,import.meta.url).href,so=i=>{try{return new URL(i,location.href).origin===location.origin}catch{return!1}},oo=Array.from(document.querySelectorAll('link[rel="stylesheet"]')).map(i=>i.href).filter(so),en=[...oo,H("./index.js"),H("./deck-root.js"),H("./deck-cover.js"),H("./deck-section.js"),H("./deck-feature.js"),H("./deck-split.js"),H("./deck-feature-cards.js"),H("./deck-takeaway.js"),H("./deck-md.js"),H("./deck-code.js"),H("./deck-callout.js"),H("./deck-card.js"),H("./deck-mermaid.js"),H("./shared-styles.js"),H("./deck-stack.js"),H("./deck-grid.js"),H("./deck-punch.js"),location.pathname],Di=new Map;(async()=>(await Promise.all(en.map(rn)),tn("livereload on"),ao()))()});var _t=globalThis,St=_t.ShadowRoot&&(_t.ShadyCSS===void 0||_t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Vt=Symbol(),Hr=new WeakMap,De=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==Vt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(St&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=Hr.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&Hr.set(e,t))}return t}toString(){return this.cssText}},Nr=i=>new De(typeof i=="string"?i:i+"",void 0,Vt),v=(i,...t)=>{let e=i.length===1?i[0]:t.reduce((r,n,s)=>r+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+i[s+1],i[0]);return new De(e,i,Vt)},Ir=(i,t)=>{if(St)i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),n=_t.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=e.cssText,i.appendChild(r)}},Kt=St?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return Nr(e)})(i):i;var{is:on,defineProperty:an,getOwnPropertyDescriptor:ln,getOwnPropertyNames:cn,getOwnPropertySymbols:dn,getPrototypeOf:pn}=Object,Et=globalThis,Or=Et.trustedTypes,hn=Or?Or.emptyScript:"",un=Et.reactiveElementPolyfillSupport,et=(i,t)=>i,tt={toAttribute(i,t){switch(t){case Boolean:i=i?hn:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},$t=(i,t)=>!on(i,t),Rr={attribute:!0,type:String,converter:tt,reflect:!1,useDefault:!1,hasChanged:$t};Symbol.metadata??=Symbol("metadata"),Et.litPropertyMetadata??=new WeakMap;var re=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Rr){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),n=this.getPropertyDescriptor(t,r,e);n!==void 0&&an(this.prototype,t,n)}}static getPropertyDescriptor(t,e,r){let{get:n,set:s}=ln(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get:n,set(o){let a=n?.call(this);s?.call(this,o),this.requestUpdate(t,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Rr}static _$Ei(){if(this.hasOwnProperty(et("elementProperties")))return;let t=pn(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(et("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(et("properties"))){let e=this.properties,r=[...cn(e),...dn(e)];for(let n of r)this.createProperty(n,e[n])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,n]of e)this.elementProperties.set(r,n)}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let n=this._$Eu(e,r);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let n of r)e.unshift(Kt(n))}else t!==void 0&&e.push(Kt(t));return e}static _$Eu(t,e){let r=e.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ir(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){let r=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,r);if(n!==void 0&&r.reflect===!0){let s=(r.converter?.toAttribute!==void 0?r.converter:tt).toAttribute(e,r.type);this._$Em=t,s==null?this.removeAttribute(n):this.setAttribute(n,s),this._$Em=null}}_$AK(t,e){let r=this.constructor,n=r._$Eh.get(t);if(n!==void 0&&this._$Em!==n){let s=r.getPropertyOptions(n),o=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:tt;this._$Em=n;let a=o.fromAttribute(e,s.type);this[n]=a??this._$Ej?.get(n)??a,this._$Em=null}}requestUpdate(t,e,r,n=!1,s){if(t!==void 0){let o=this.constructor;if(n===!1&&(s=this[t]),r??=o.getPropertyOptions(t),!((r.hasChanged??$t)(s,e)||r.useDefault&&r.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,r))))return;this.C(t,e,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:n,wrapped:s},o){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),s!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),n===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,s]of this._$Ep)this[n]=s;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[n,s]of r){let{wrapped:o}=s,a=this[n];o!==!0||this._$AL.has(n)||a===void 0||this.C(n,void 0,s,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(e)):this._$EM()}catch(r){throw t=!1,this._$EM(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};re.elementStyles=[],re.shadowRootOptions={mode:"open"},re[et("elementProperties")]=new Map,re[et("finalized")]=new Map,un?.({ReactiveElement:re}),(Et.reactiveElementVersions??=[]).push("2.1.2");var rr=globalThis,jr=i=>i,At=rr.trustedTypes,qr=At?At.createPolicy("lit-html",{createHTML:i=>i}):void 0,Xr="$lit$",ce=`lit$${Math.random().toFixed(9).slice(2)}$`,Zr="?"+ce,mn=`<${Zr}>`,we=document,it=()=>we.createComment(""),nt=i=>i===null||typeof i!="object"&&typeof i!="function",ir=Array.isArray,fn=i=>ir(i)||typeof i?.[Symbol.iterator]=="function",Gt=`[
|
|
658
|
+
\f\r]`,rt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Br=/-->/g,Ur=/>/g,ye=RegExp(`>|${Gt}(?:([^\\s"'>=/]+)(${Gt}*=${Gt}*(?:[^
|
|
659
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Wr=/'/g,Yr=/"/g,Vr=/^(?:script|style|textarea|title)$/i,nr=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),m=nr(1),fo=nr(2),go=nr(3),_e=Symbol.for("lit-noChange"),L=Symbol.for("lit-nothing"),Fr=new WeakMap,xe=we.createTreeWalker(we,129);function Kr(i,t){if(!ir(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return qr!==void 0?qr.createHTML(t):t}var gn=(i,t)=>{let e=i.length-1,r=[],n,s=t===2?"<svg>":t===3?"<math>":"",o=rt;for(let a=0;a<e;a++){let l=i[a],p,h,u=-1,f=0;for(;f<l.length&&(o.lastIndex=f,h=o.exec(l),h!==null);)f=o.lastIndex,o===rt?h[1]==="!--"?o=Br:h[1]!==void 0?o=Ur:h[2]!==void 0?(Vr.test(h[2])&&(n=RegExp("</"+h[2],"g")),o=ye):h[3]!==void 0&&(o=ye):o===ye?h[0]===">"?(o=n??rt,u=-1):h[1]===void 0?u=-2:(u=o.lastIndex-h[2].length,p=h[1],o=h[3]===void 0?ye:h[3]==='"'?Yr:Wr):o===Yr||o===Wr?o=ye:o===Br||o===Ur?o=rt:(o=ye,n=void 0);let y=o===ye&&i[a+1].startsWith("/>")?" ":"";s+=o===rt?l+mn:u>=0?(r.push(p),l.slice(0,u)+Xr+l.slice(u)+ce+y):l+ce+(u===-2?a:y)}return[Kr(i,s+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},st=class i{constructor({strings:t,_$litType$:e},r){let n;this.parts=[];let s=0,o=0,a=t.length-1,l=this.parts,[p,h]=gn(t,e);if(this.el=i.createElement(p,r),xe.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(n=xe.nextNode())!==null&&l.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let u of n.getAttributeNames())if(u.endsWith(Xr)){let f=h[o++],y=n.getAttribute(u).split(ce),A=/([.?@])?(.*)/.exec(f);l.push({type:1,index:s,name:A[2],strings:y,ctor:A[1]==="."?Qt:A[1]==="?"?Dt:A[1]==="@"?er:Ne}),n.removeAttribute(u)}else u.startsWith(ce)&&(l.push({type:6,index:s}),n.removeAttribute(u));if(Vr.test(n.tagName)){let u=n.textContent.split(ce),f=u.length-1;if(f>0){n.textContent=At?At.emptyScript:"";for(let y=0;y<f;y++)n.append(u[y],it()),xe.nextNode(),l.push({type:2,index:++s});n.append(u[f],it())}}}else if(n.nodeType===8)if(n.data===Zr)l.push({type:2,index:s});else{let u=-1;for(;(u=n.data.indexOf(ce,u+1))!==-1;)l.push({type:7,index:s}),u+=ce.length-1}s++}}static createElement(t,e){let r=we.createElement("template");return r.innerHTML=t,r}};function He(i,t,e=i,r){if(t===_e)return t;let n=r!==void 0?e._$Co?.[r]:e._$Cl,s=nt(t)?void 0:t._$litDirective$;return n?.constructor!==s&&(n?._$AO?.(!1),s===void 0?n=void 0:(n=new s(i),n._$AT(i,e,r)),r!==void 0?(e._$Co??=[])[r]=n:e._$Cl=n),n!==void 0&&(t=He(i,n._$AS(i,t.values),n,r)),t}var Jt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:r}=this._$AD,n=(t?.creationScope??we).importNode(e,!0);xe.currentNode=n;let s=xe.nextNode(),o=0,a=0,l=r[0];for(;l!==void 0;){if(o===l.index){let p;l.type===2?p=new ot(s,s.nextSibling,this,t):l.type===1?p=new l.ctor(s,l.name,l.strings,this,t):l.type===6&&(p=new tr(s,this,t)),this._$AV.push(p),l=r[++a]}o!==l?.index&&(s=xe.nextNode(),o++)}return xe.currentNode=we,n}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},ot=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,n){this.type=2,this._$AH=L,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=He(this,t,e),nt(t)?t===L||t==null||t===""?(this._$AH!==L&&this._$AR(),this._$AH=L):t!==this._$AH&&t!==_e&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):fn(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==L&&nt(this._$AH)?this._$AA.nextSibling.data=t:this.T(we.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,n=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=st.createElement(Kr(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(e);else{let s=new Jt(n,this),o=s.u(this.options);s.p(e),this.T(o),this._$AH=s}}_$AC(t){let e=Fr.get(t.strings);return e===void 0&&Fr.set(t.strings,e=new st(t)),e}k(t){ir(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,n=0;for(let s of t)n===e.length?e.push(r=new i(this.O(it()),this.O(it()),this,this.options)):r=e[n],r._$AI(s),n++;n<e.length&&(this._$AR(r&&r._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let r=jr(t).nextSibling;jr(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},Ne=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,n,s){this.type=1,this._$AH=L,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=L}_$AI(t,e=this,r,n){let s=this.strings,o=!1;if(s===void 0)t=He(this,t,e,0),o=!nt(t)||t!==this._$AH&&t!==_e,o&&(this._$AH=t);else{let a=t,l,p;for(t=s[0],l=0;l<s.length-1;l++)p=He(this,a[r+l],e,l),p===_e&&(p=this._$AH[l]),o||=!nt(p)||p!==this._$AH[l],p===L?t=L:t!==L&&(t+=(p??"")+s[l+1]),this._$AH[l]=p}o&&!n&&this.j(t)}j(t){t===L?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Qt=class extends Ne{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===L?void 0:t}},Dt=class extends Ne{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==L)}},er=class extends Ne{constructor(t,e,r,n,s){super(t,e,r,n,s),this.type=5}_$AI(t,e=this){if((t=He(this,t,e,0)??L)===_e)return;let r=this._$AH,n=t===L&&r!==L||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,s=t!==L&&(r===L||n);n&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},tr=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){He(this,t)}};var vn=rr.litHtmlPolyfillSupport;vn?.(st,ot),(rr.litHtmlVersions??=[]).push("3.3.3");var Gr=(i,t,e)=>{let r=e?.renderBefore??t,n=r._$litPart$;if(n===void 0){let s=e?.renderBefore??null;r._$litPart$=n=new ot(t.insertBefore(it(),s),s,void 0,e??{})}return n._$AI(i),n};var sr=globalThis,g=class extends re{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Gr(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return _e}};g._$litElement$=!0,g.finalized=!0,sr.litElementHydrateSupport?.({LitElement:g});var kn=sr.litElementPolyfillSupport;kn?.({LitElement:g});(sr.litElementVersions??=[]).push("4.2.2");var k=i=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(i,t)}):customElements.define(i,t)};var bn={attribute:!0,type:String,converter:tt,reflect:!1,hasChanged:$t},yn=(i=bn,t,e)=>{let{kind:r,metadata:n}=e,s=globalThis.litPropertyMetadata.get(n);if(s===void 0&&globalThis.litPropertyMetadata.set(n,s=new Map),r==="setter"&&((i=Object.create(i)).wrapped=!0),s.set(e.name,i),r==="accessor"){let{name:o}=e;return{set(a){let l=t.get.call(this);t.set.call(this,a),this.requestUpdate(o,l,i,!0,a)},init(a){return a!==void 0&&this.C(o,void 0,i,a),a}}}if(r==="setter"){let{name:o}=e;return function(a){let l=this[o];t.call(this,a),this.requestUpdate(o,l,i,!0,a)}}throw Error("Unsupported decorator location: "+r)};function d(i){return(t,e)=>typeof e=="object"?yn(i,t,e):((r,n,s)=>{let o=n.hasOwnProperty(s);return n.constructor.createProperty(s,r),o?Object.getOwnPropertyDescriptor(n,s):void 0})(i,t,e)}function j(i){return d({...i,state:!0,attribute:!1})}function Jr(i){if(!i||i==="transparent")return!1;let t=i.match(/^(?:rgb|hsl)a?\(([^)]*)\)$/i);if(t){let r=t[1].split(",");return r.length<4||parseFloat(r[3])>=1}let e=i.match(/\/\s*([\d.]+%?)\s*\)$/);if(e){let r=e[1];return(r.endsWith("%")?parseFloat(r)/100:parseFloat(r))>=1}return!0}var Qr={slideCount:0,chapters:[]};function Dr(i){let t=[];return i.forEach((e,r)=>{if(e.toLowerCase()==="deck-section"||t.length===0)t.push({start:r,length:1});else{let s=t[t.length-1];t[t.length-1]={start:s.start,length:s.length+1}}}),{slideCount:i.length,chapters:t}}function ei(i,t){return t&&i.chapters.length>1&&i.chapters.some(e=>e.length>1)}function Ie(i,t){for(let e=0;e<i.chapters.length;e++){let r=i.chapters[e],n=t-r.start;if(n>=0&&n<r.length)return{chapter:e,index:n}}return{chapter:0,index:0}}function ti(i,t){if(i.chapters.length===0)return null;let e=at(t.chapter,0,i.chapters.length-1),r=i.chapters[e],n=at(t.index,0,r.length-1);return r.start+n}function at(i,t,e){return Number.isNaN(i)?t:Math.max(t,Math.min(e,i))}var xn=/^#(\d+)\.(\d+)(?:s(\d+))?$/,wn=/^#(\d+)(?:\.(\d+))?$/;function zt(i,t){if(t){let r=xn.exec(i);if(r)return{kind:"coords",coords:{chapter:Number(r[1])-1,index:Number(r[2])-1},step:r[3]?Number(r[3]):0}}let e=wn.exec(i);return e?{kind:"slide",slide:Number(e[1])-1,step:e[2]?Number(e[2]):0}:null}function ri(i,t){if(t.twoD&&t.coords){let{chapter:e,index:r}=t.coords,n=i.step>0?`s${i.step}`:"";return`#${e+1}.${r+1}${n}`}return`#${i.slide+1}${i.step>0?`.${i.step}`:""}`}var or=i=>i.slideCount<=0;function Lt(i,t,e){if(or(i))return null;let r=at(t.slide,0,i.slideCount-1),n=Math.max(0,e(r));return{slide:r,step:at(t.step,0,n)}}function Ct(i,t,e,r){if(or(i))return null;let n=Math.max(0,r(e.slide));return e.step<n?{slide:e.slide,step:e.step+1}:e.slide<i.slideCount-1?{slide:e.slide+1,step:0}:t.loop?{slide:0,step:0}:null}function Pt(i,t,e,r){if(or(i))return null;if(e.step>0)return{slide:e.slide,step:e.step-1};if(e.slide>0){let n=e.slide-1;return{slide:n,step:Math.max(0,r(n))}}if(t.loop){let n=i.slideCount-1;return{slide:n,step:Math.max(0,r(n))}}return null}function Oe(i,t,e){return Lt(i,{slide:t,step:0},e)}function ie(i,t,e){let r=ti(i,t);return r===null?null:Lt(i,{slide:r,step:0},e)}function ii(i,t){return Oe(i,0,t)}function ni(i,t){return Oe(i,i.slideCount-1,t)}function ar(i,t){return i===null||t===null?i===t:i.slide===t.slide&&i.step===t.step}function si(i,t,e=!1){if(!t.ownsUrl)return null;let r=zt(i.read(),t.twoD);if(!r)return null;let n=r.kind==="coords"?ie(t.outline,r.coords,t.stepsOf):Oe(t.outline,r.slide,t.stepsOf);return n?t.stepsOf(n.slide)>0||!e?Lt(t.outline,{slide:n.slide,step:r.step},t.stepsOf):{slide:n.slide,step:Math.max(0,r.step)}:null}function oi(i,t,e){if(!e.ownsUrl)return;let r=ri(t,{twoD:e.twoD,coords:e.twoD?Ie(e.outline,t.slide):void 0});i.read()!==r&&i.write(r)}var lr={intent:"none",preventDefault:!1},z=(i,t=!0)=>({intent:i,preventDefault:t}),Re=(i,...t)=>t.some(e=>e.toLowerCase()===i.toLowerCase());function ai(i){let{key:t}=i;return i.overview?Re(t,"Escape","o","Enter")?z("close-overview"):lr:i.blanked?z("clear-blank"):Re(t,".","b")?z("blank-black"):Re(t,",","w")?z("blank-white"):i.zoomEnabled&&(t==="+"||t==="=")?z("zoom-in"):i.zoomEnabled&&t==="-"?z("zoom-out"):t==="0"&&i.zoomed?z("zoom-reset"):Re(t,"?","h")?z("toggle-help",!1):t==="Escape"?z("close-help",!1):t==="Home"?z("first",!1):t==="End"?z("last",!1):Re(t,"o")?z("open-overview"):Re(t,"p")?z("toggle-presenter"):t===" "||t==="PageDown"?z("advance"):t==="PageUp"?z("back"):i.twoD?t==="ArrowRight"?z("next-chapter"):t==="ArrowLeft"?z("prev-chapter"):t==="ArrowDown"?z("next-in-chapter"):t==="ArrowUp"?z("prev-in-chapter"):lr:t==="ArrowRight"||t==="ArrowDown"?z("advance"):t==="ArrowLeft"||t==="ArrowUp"?z("back"):lr}var _n=new Set(["first","last","advance","back","next-chapter","prev-chapter","next-in-chapter","prev-in-chapter"]),li=i=>_n.has(i);function ci(i,t,e,r,n){let s=()=>Ct(t,e,r,n),o=()=>Pt(t,e,r,n),{chapter:a,index:l}=Ie(t,r.slide);switch(i){case"first":return ii(t,n);case"last":return ni(t,n);case"advance":return s();case"back":return o();case"next-chapter":return a+1<t.chapters.length?ie(t,{chapter:a+1,index:0},n):s();case"prev-chapter":return a>0?ie(t,{chapter:a-1,index:0},n):o();case"next-in-chapter":{let p=t.chapters[a];return p&&l+1<p.length?ie(t,{chapter:a,index:l+1},n):s()}case"prev-in-chapter":return l>0?ie(t,{chapter:a,index:l-1},n):o()}}function di(i,t){let e=(i??"all").trim();return e==="none"?!1:e===""||e==="all"?!0:e.split(/\s+/).includes(t)}var pi={zoom:1,panX:0,panY:0};function Sn(i,t){return!t.width||!t.height||!i.width||!i.height?1:Math.min(t.width/i.width,t.height/i.height)}function En(i,t,e){let r=Sn(i,t)*e;return{x:Math.max(0,(i.width*r-t.width)/2),y:Math.max(0,(i.height*r-t.height)/2)}}function Mt(i,t,e){let r=En(t,e,i.zoom);return{zoom:i.zoom,panX:Math.max(-r.x,Math.min(r.x,i.panX)),panY:Math.max(-r.y,Math.min(r.y,i.panY))}}function hi(i,t,e,r,n,s,o){let a=Math.max(1,Math.min(o.max,i.zoom*t));if(a===i.zoom)return i;let l=a/i.zoom;return Mt({zoom:a,panX:i.panX+(e-i.panX)*(1-l),panY:i.panY+(r-i.panY)*(1-l)},n,s)}function ui(i,t,e,r,n){return Mt({zoom:i.zoom,panX:i.panX+t,panY:i.panY+e},r,n)}var mi=i=>i.zoom===1&&i.panX===0&&i.panY===0;var Ht={read(){return typeof location>"u"?"":location.hash},write(i){if(!(typeof history>"u"))try{history.replaceState(null,"",i)}catch{}}};var x=class extends g{constructor(){super(...arguments);this.current=0;this.step=0;this.blank=null;this.presenterActive=!1;this.overview=!1;this.fluid=!1;this.width=1920;this.height=1080;this.noHint=!1;this.noArrows=!1;this.noCounter=!1;this.preview=!1;this.noZoom=!1;this.transition=null;this.autoplay=0;this.loop=!1;this.swipe=!1;this.mouseNav=null;this.nav=null;this.slides=[];this.chapters=[];this._overviewTeardown=null;this._transitionLoaded=!1;this._autoplayTimer=null;this._autoplayPaused=!1;this._swipeStartX=0;this._swipeStartY=0;this._swipePointerId=null;this._navDownX=0;this._navDownY=0;this._wheelAccum=0;this._wheelLockUntil=0;this._zoom=1;this._panX=0;this._panY=0;this._plugins=[];this._ctx=null;this._applyScale=()=>{if(this._effectiveFluid()){this.style.removeProperty("--deck-scale");return}let e=Math.min(this.clientWidth/this.width,this.clientHeight/this.height);e>0&&this.style.setProperty("--deck-scale",String(e)),this._zoom>1&&(this._clampPan(),this._applyZoom())};this._resizeObserver=null;this._pendingStep=null;this._stepWatcher=null;this._panning=!1;this._panLastX=0;this._panLastY=0;this._onPanDown=e=>{this._zoom<=1||!this._zoomEnabled()||e.pointerType==="mouse"&&e.button!==0||e.target?.closest("a, button, input, textarea, select, [contenteditable]")||(this._panning=!0,this._panLastX=e.clientX,this._panLastY=e.clientY,this.toggleAttribute("data-panning",!0),this.setPointerCapture?.(e.pointerId))};this._onPanMove=e=>{this._panning&&(this._panBy(e.clientX-this._panLastX,e.clientY-this._panLastY),this._panLastX=e.clientX,this._panLastY=e.clientY)};this._onPanUp=e=>{this._panning&&(this._panning=!1,this.toggleAttribute("data-panning",!1),this.releasePointerCapture?.(e.pointerId))};this._onHoverEnter=()=>{this._autoplayPaused=!0,this._stopAutoplay()};this._onHoverLeave=()=>{this._autoplayPaused=!1,this.autoplay>0&&this._startAutoplay()};this._onPointerDown=e=>{!this.swipe||e.pointerType==="mouse"&&e.button!==0||e.target?.closest("a, button, input, textarea, [contenteditable]")||(this._swipePointerId=e.pointerId,this._swipeStartX=e.clientX,this._swipeStartY=e.clientY)};this._onPointerUp=e=>{if(this._swipePointerId===null||e.pointerId!==this._swipePointerId)return;if(this._zoom>1){this._swipePointerId=null;return}let r=e.clientX-this._swipeStartX,n=e.clientY-this._swipeStartY;this._swipePointerId=null,!(Math.abs(r)<60||Math.abs(r)<Math.abs(n)*2)&&(this._stopAutoplay(),r<0?this._advance():this._back(),this._restartAutoplay())};this._onNavPointerDown=e=>{this._navDownX=e.clientX,this._navDownY=e.clientY};this._onClickNav=e=>{if(!this._mouseEnabled("click")||this.overview||this.blank||this._zoom>1||this.shadowRoot?.querySelector("#kb-overlay.open")||Math.hypot(e.clientX-this._navDownX,e.clientY-this._navDownY)>5)return;let r=window.getSelection();r&&!r.isCollapsed||e.composedPath().some(s=>s instanceof HTMLElement?s.matches?.("a, button, input, textarea, select, [contenteditable], [data-no-advance]")?!0:s.id==="blank"||s.id==="kb-overlay"||s.id==="overview-grid"||s.id==="nav-arrows"||s.id==="kb-hint":!1)||(this._restartAutoplay(),e.shiftKey?this._back():this._advance())};this._onWheel=e=>{if(!this._isFullPage()&&!e.ctrlKey&&!e.metaKey&&this._zoom<=1)return;if(e.ctrlKey||e.metaKey){if(!this._zoomEnabled())return;e.preventDefault(),this._zoomAt(Math.exp(-e.deltaY*x.ZOOM_WHEEL_SENSITIVITY),e.clientX,e.clientY);return}if(this._zoom>1&&this._zoomEnabled()){e.preventDefault(),this._panBy(-e.deltaX,-e.deltaY);return}if(!this._mouseEnabled("wheel")||this.overview||this.blank||this._wheelTargetScrolls(e))return;e.preventDefault();let r=performance.now();if(r<this._wheelLockUntil||(this._wheelAccum+=e.deltaY,Math.abs(this._wheelAccum)<50))return;let n=this._wheelAccum>0;this._wheelAccum=0,this._wheelLockUntil=r+400,this._restartAutoplay(),n?this._advance():this._back()};this._onAuxUp=e=>{this._mouseEnabled("aux")&&(e.button!==3&&e.button!==4||(e.preventDefault(),this._restartAutoplay(),e.button===3?this._back():this._advance()))};this._onAuxClick=e=>{this._mouseEnabled("aux")&&(e.button===3||e.button===4)&&e.preventDefault()};this._outline=Qr;this._onHash=()=>{this._readHash(!1)};this._onKey=e=>{if(!this._ownsKeyboard()||e.target&&e.target.matches?.("input,textarea,[contenteditable]"))return;this._restartAutoplay();let{intent:r,preventDefault:n}=ai({key:e.key,overview:this.overview,blanked:this.blank!==null,zoomEnabled:this._zoomEnabled(),zoomed:this._zoom>1,twoD:this._has2DNav()});if(r!=="none"){if(n&&e.preventDefault(),li(r)){this._applyPosition(ci(r,this._outline,{loop:this.loop},this._position,this._maxStepsFor));return}switch(r){case"close-overview":this.overview=!1;return;case"open-overview":this.overview=!0;return;case"clear-blank":this.blank=null;return;case"blank-black":this.blank="black";return;case"blank-white":this.blank="white";return;case"zoom-in":case"zoom-out":{let s=this.getBoundingClientRect(),o=r==="zoom-out"?1/x.ZOOM_STEP:x.ZOOM_STEP;this._zoomAt(o,s.left+s.width/2,s.top+s.height/2);return}case"zoom-reset":this._resetZoom();return;case"toggle-help":this._toggleHelp();return;case"close-help":this._closeHelp();return;case"toggle-presenter":this._togglePresenter();return}}};this._maxStepsFor=e=>{let r=this._baseMaxSteps(e),n=this.slides[e];if(n)for(let s of this._plugins)s.steps&&(r=Math.max(r,s.steps(n,this._context())));return r}}get _overviewSnapshot(){return this.hasAttribute("data-overview-snapshot")}_context(){if(this._ctx)return this._ctx;let e=this;return this._ctx={host:e,get current(){return e.current},get step(){return e.step},get slides(){return e.slides},requestUpdate:()=>e.requestUpdate()},this._ctx}use(e){if(this._plugins.some(n=>n.name===e.name))return()=>{};e.navigate&&this._plugins.some(n=>n.navigate)&&console.warn(`[rikiki] plugin "${e.name}" has a navigate hook but another plugin already owns navigation \xB7 it will be ignored`),this._plugins.push(e);let r=e.setup?.(this._context());return this._applyStep(),this._updateUI(),()=>{let n=this._plugins.indexOf(e);n>=0&&this._plugins.splice(n,1),typeof r=="function"&&r()}}firstUpdated(){if(!this._overviewSnapshot&&(this._installRuntime(),this._scopeSlideStyles(),this.slides=Array.from(this.querySelectorAll(":scope > *")).filter(e=>e.tagName?.toLowerCase().startsWith("deck-")&&e.tagName?.toLowerCase()!=="deck-root"),this._buildChapters(),this._readHash(!0),this._applyActive(),this._applyStep(),this._updateUI(),this.requestUpdate(),!this.hasAttribute("preview"))){let e=()=>{!this.isConnected||this.overview||(this.setAttribute("data-overview-warming",""),this._renderOverviewIfActive(!0))};document.fonts.ready.then(()=>{"requestIdleCallback"in window?window.requestIdleCallback(e,{timeout:1500}):setTimeout(e,300)})}}_installRuntime(){this._applyCanvasVars(),this._applyScale(),this._resizeObserver=new ResizeObserver(this._applyScale),this._resizeObserver.observe(this),!this.preview&&(window.addEventListener("keydown",this._onKey),window.addEventListener("hashchange",this._onHash),this.addEventListener("pointerdown",this._onNavPointerDown),this.addEventListener("click",this._onClickNav),this.addEventListener("wheel",this._onWheel,{passive:!1}),this.addEventListener("pointerdown",this._onPanDown),this.addEventListener("pointermove",this._onPanMove),this.addEventListener("pointerup",this._onPanUp),this.addEventListener("pointercancel",this._onPanUp),window.addEventListener("mouseup",this._onAuxUp),window.addEventListener("auxclick",this._onAuxClick),this.autoplay>0&&this._startAutoplay(),this.swipe?(this.addEventListener("pointerdown",this._onPointerDown),this.addEventListener("pointerup",this._onPointerUp),this.addEventListener("pointercancel",this._onPointerUp),this.addEventListener("mouseenter",this._onHoverEnter),this.addEventListener("mouseleave",this._onHoverLeave)):this.autoplay>0&&(this.addEventListener("mouseenter",this._onHoverEnter),this.addEventListener("mouseleave",this._onHoverLeave)))}_scopeSlideStyles(){this.querySelectorAll("style[scoped]").forEach(e=>{e.dataset.rikScoped||(e.dataset.rikScoped="1",e.textContent=`@scope {
|
|
616
660
|
${e.textContent??""}
|
|
617
|
-
}`)})}_effectiveFluid(){return this.fluid||(this.slides[this.current]?.hasAttribute("fluid")??!1)}_applySlideFluid(){let e=!this.fluid&&(this.slides[this.current]?.hasAttribute("fluid")??!1);this.toggleAttribute("unfixed",e),this._applyCanvasVars(),this._applyScale()}_applyCanvasVars(){let e=document.documentElement;if(this._effectiveFluid()){e.style.removeProperty("--deck-canvas-w"),e.style.removeProperty("--deck-canvas-h");return}e.style.setProperty("--deck-canvas-w",String(this.width)),e.style.setProperty("--deck-canvas-h",String(this.height)),this._applyPageSize()}_zoomEnabled(){return!this.noZoom&&!this._effectiveFluid()&&!this.overview&&!this.blank}_applyZoom(){this.style.setProperty("--deck-zoom",String(this._zoom)),this.style.setProperty("--deck-pan-x",`${this._panX}px`),this.style.setProperty("--deck-pan-y",`${this._panY}px`),this.toggleAttribute("data-zoomed",this._zoom>1)}get _view(){return{zoom:this._zoom,panX:this._panX,panY:this._panY}}set _view(e){this._zoom=e.zoom,this._panX=e.panX,this._panY=e.panY}get _canvas(){return{width:this.width,height:this.height}}get _box(){return{width:this.clientWidth,height:this.clientHeight}}_clampPan(){this._view=zt(this._view,this._canvas,this._box)}_zoomAt(e,r,i){if(!this._zoomEnabled())return;let s=this.getBoundingClientRect(),o=ei(this._view,e,r-(s.left+s.width/2),i-(s.top+s.height/2),this._canvas,this._box,{max:y.ZOOM_MAX});o!==this._view&&(this._view=o,this._applyZoom())}_resetZoom(){ri(this._view)||(this._view=Dr,this._applyZoom())}_panBy(e,r){this._view=ti(this._view,e,r,this._canvas,this._box),this._applyZoom()}_applyLetterbox(e){if(this._effectiveFluid()){this.style.removeProperty("--deck-letterbox-bg");return}let r=e?getComputedStyle(e).backgroundColor:"";r&&jr(r)?this.style.setProperty("--deck-letterbox-bg",r):this.style.removeProperty("--deck-letterbox-bg")}_liveLabel(){let e=this.slides.length;if(!e)return"";let i=this.slides[this.current]?.querySelector('h1, [slot="title"]')?.textContent?.trim(),s=`Slide ${this.current+1} of ${e}`;return i?`${s} \xB7 ${i}`:s}_applyPageSize(){if(typeof document>"u")return;let e="rik-deck-page",r=document.getElementById(e);r||(r=document.createElement("style"),r.id=e,document.head.appendChild(r)),r.textContent=`@page { size: ${this.width}px ${this.height}px; margin: 0 }@media print{html:has(> body > deck-root),html:has(> body > deck-root) body{overflow:visible;height:auto}}`}static _injectGlobals(){if(typeof document>"u"||document.getElementById("rik-deck-globals"))return;let e=document.createElement("style");e.id="rik-deck-globals",e.textContent="html:has(> body > deck-root){overflow:hidden;height:100%}html:has(> body > deck-root) body{margin:0;overflow:hidden;height:100%}html:has(> body > deck-root:not([fluid])){font-size:calc(var(--deck-canvas-h,1080)*0.0235px)}html:has(> body > deck-root[fluid]){font-size:clamp(14px,2.35vh,42px)}html:has(> body > deck-root[unfixed]){font-size:clamp(14px,2.35vh,42px)}",document.head.appendChild(e)}connectedCallback(){super.connectedCallback(),!this.hasAttribute("tabindex")&&typeof document<"u"&&queueMicrotask(()=>{!this._isFullPage()&&!this.hasAttribute("tabindex")&&(this.tabIndex=0)}),y._injectGlobals(),this.hasUpdated&&this._installRuntime()}disconnectedCallback(){super.disconnectedCallback(),document.documentElement.style.removeProperty("--deck-canvas-w"),document.documentElement.style.removeProperty("--deck-canvas-h"),document.querySelector("deck-root")||document.getElementById("rik-deck-globals")?.remove(),this._resizeObserver?.disconnect(),this._resizeObserver=null,this._forgetPendingStep(),window.removeEventListener("keydown",this._onKey),window.removeEventListener("hashchange",this._onHash),this.removeEventListener("pointerdown",this._onNavPointerDown),this.removeEventListener("click",this._onClickNav),this.removeEventListener("wheel",this._onWheel),this.removeEventListener("pointerdown",this._onPanDown),this.removeEventListener("pointermove",this._onPanMove),this.removeEventListener("pointerup",this._onPanUp),this.removeEventListener("pointercancel",this._onPanUp),window.removeEventListener("mouseup",this._onAuxUp),window.removeEventListener("auxclick",this._onAuxClick),this._stopAutoplay(),this.removeEventListener("pointerdown",this._onPointerDown),this.removeEventListener("pointerup",this._onPointerUp),this.removeEventListener("pointercancel",this._onPointerUp),this.removeEventListener("mouseenter",this._onHoverEnter),this.removeEventListener("mouseleave",this._onHoverLeave),this._panning=!1,this.toggleAttribute("data-panning",!1)}_startAutoplay(){this._stopAutoplay(),!(this.autoplay<=0||this._autoplayPaused)&&(this._autoplayTimer=window.setInterval(()=>this._autoTick(),this.autoplay))}_stopAutoplay(){this._autoplayTimer!==null&&(window.clearInterval(this._autoplayTimer),this._autoplayTimer=null)}_autoTick(){if(this.overview)return;this.current>=this.slides.length-1&&this.step>=this._maxSteps()&&this.loop?this._goTo(0):this._advance()}_restartAutoplay(){this.autoplay>0&&!this._autoplayPaused&&this._startAutoplay()}_wheelTargetScrolls(e){let r=e.deltaY>0,i=e.deltaX>0;for(let s of e.composedPath()){if(s===this)return!1;if(!(s instanceof Element))continue;let o=s.scrollHeight>s.clientHeight,a=s.scrollWidth>s.clientWidth;if(!o&&!a)continue;let l=getComputedStyle(s);if(o&&/auto|scroll/.test(l.overflowY)&&(r?s.scrollTop+s.clientHeight<s.scrollHeight-1:s.scrollTop>0)||a&&/auto|scroll/.test(l.overflowX)&&(i?s.scrollLeft+s.clientWidth<s.scrollWidth-1:s.scrollLeft>0))return!0}return!1}_buildChapters(){this._outline=Ur(this.slides.map(r=>r.tagName?.toLowerCase()??"")),this.chapters=[];let e=null;this.slides.forEach((r,i)=>{r.tagName?.toLowerCase()==="deck-section"||!e?(e={startIdx:i,slides:[r]},this.chapters.push(e)):e.slides.push(r)})}_has2DNav(){return qr(this._outline,this.nav==="2d")}_mouseEnabled(e){return Jr(this.mouseNav,e)}_coords(e){let{chapter:r,index:i}=He(this._outline,e);return{c:r,i}}_isFullPage(){return typeof document<"u"&&this.parentElement===document.body}_ownsKeyboard(){if(this._isFullPage())return!0;let e=document.activeElement;return e===this||e!==null&&this.contains(e)}_linkContext(){return{outline:this._outline,twoD:this._has2DNav(),stepsOf:this._maxStepsFor,ownsUrl:this._isFullPage()}}_readHash(e){let r=Zr(Lt,this._linkContext(),e);r&&(er(r,this._position)&&!e||(this.current=r.slide,this.step=r.step,e&&this._watchForLateSteps(r),e||(this._resetZoom(),this._applyActive(),this._applyStep(),this._updateUI())))}_watchForLateSteps(e){let r=St(Lt.read(),this._has2DNav());!r||r.step<=0||(this._pendingStep=Math.max(r.step,e.step),this._stepWatcher?.disconnect(),this._stepWatcher=new MutationObserver(()=>this._replayPendingStep()),this._stepWatcher.observe(this,{subtree:!0,attributes:!0,attributeFilter:["steps","data-steps"]}))}_replayPendingStep(){let e=this._pendingStep;e!==null&&(this._maxStepsFor(this.current)<e||(this._forgetPendingStep(),this.step=e,this._applyActive(),this._applyStep(),this._updateUI(),this._writeHash()))}_forgetPendingStep(){this._pendingStep=null,this._stepWatcher?.disconnect(),this._stepWatcher=null}_writeHash(){Vr(Lt,this._position,this._linkContext())}async _toggleHelp(){(await Promise.resolve().then(()=>(Ct(),rr))).toggleHelp(this)}async _togglePresenter(){(await Promise.resolve().then(()=>(sr(),hi))).installPresenter(this)}async _closeHelp(){(await Promise.resolve().then(()=>(Ct(),rr))).closeHelp(this)}async _renderOverviewIfActive(){if(!this.overview){this._overviewTeardown?.(),this._overviewTeardown=null;return}let{mountOverview:e}=await Promise.resolve().then(()=>(or(),vi));this._overviewTeardown=e(this,{slides:this.slides,chapters:this.chapters,currentIdx:this.current,onPick:r=>{this.overview=!1,this._goTo(r)}})}_maxSteps(){return this._maxStepsFor(this.current)}_baseMaxSteps(e){let r=this.slides[e];if(!r)return 0;let i=parseInt(r.getAttribute("steps")||r.dataset?.steps||"0",10);if(i>0)return i;let s=r.querySelector("deck-code[step-groups]");if(s)try{return JSON.parse(s.getAttribute("step-groups")).length}catch{}return 0}get _position(){return{slide:this.current,step:this.step}}_applyPosition(e){if(e===null||er(e,this._position))return;if(this._forgetPendingStep(),e.slide===this.current){this.step=e.step,this._applyStep(),this._updateUI(),this._writeHash();return}let r=this._plugins.find(s=>s.navigate),i=()=>this._moveTo(e);r?.navigate?.(e.slide,this._context(),i)||i()}_moveTo(e){this._resetZoom(),this.current=e.slide,this.step=e.step,this._applyActive(),this._applyStep(),this._updateUI(),this._writeHash()}_advance(){this._applyPosition(At(this._outline,{loop:this.loop},this._position,this._maxStepsFor))}_back(){this._applyPosition(Tt(this._outline,{loop:this.loop},this._position,this._maxStepsFor))}_goTo(e){this._applyPosition(Ne(this._outline,e,this._maxStepsFor))}_goToCoords(e,r){this._applyPosition(te(this._outline,{chapter:e,index:r},this._maxStepsFor))}_applyActive(){let e=this.slides.find(i=>i.hasAttribute("active"))??null,r=this.slides[this.current]??null;this.slides.forEach((i,s)=>{let o=s===this.current;i.toggleAttribute("active",o),o&&i.querySelectorAll("deck-mermaid").forEach(a=>{a.render?.()})}),this._applySlideFluid(),this._applyLetterbox(r),this.transition&&!this._transitionLoaded&&(this._transitionLoaded=!0,Promise.resolve().then(()=>(ar(),bi)).then(i=>i.installTransitions(this))),e!==r&&this.dispatchEvent(new CustomEvent("slide-change",{detail:{current:r,previous:e},bubbles:!1}))}_applyStep(){let e=this.slides[this.current];if(e){e.applyStep?.(this.step),e.querySelectorAll("*").forEach(r=>{r.applyStep?.(this.step)}),e.querySelectorAll("[data-step-block]").forEach(r=>{let i=parseInt(r.dataset.stepBlock,10);r.style.transition="opacity 0.25s ease",r.style.opacity=this.step===0||i<=this.step?"1":"0.15"});for(let r of this._plugins)r.applyStep?.(this.step,e,this._context())}}_counterHidden(){let e=this.slides[this.current];return this.overview||this.blank!==null||e?.tagName.toLowerCase()==="deck-cover"}_updateUI(){let e=this.slides.length,r=this.current+1,i=this.renderRoot.querySelector("#progress"),s=this.renderRoot.querySelector("#counter"),o=this.renderRoot.querySelector("#step-dots");i&&(i.style.width=`${e>0?r/e*100:0}%`),s&&(s.textContent=`${r} / ${e}`);let a=this._maxSteps();o&&(o.innerHTML=a===0?"":Array.from({length:a},(l,h)=>`<div class="dot${h<this.step?" active":""}"></div>`).join(""))}updated(e){(e.has("width")||e.has("height")||e.has("fluid"))&&(this._applyCanvasVars(),this._applyScale()),e.has("fluid")&&this._applyLetterbox(this.slides[this.current]??null),(e.has("overview")&&this.overview||e.has("blank")&&this.blank||e.has("noZoom")&&this.noZoom||e.has("fluid")&&this.fluid)&&this._resetZoom(),this._updateUI(),this._renderOverviewIfActive()}_navArrows(){if(this.noArrows||this.presenterActive||!this._mouseEnabled("arrows")||this.overview)return"";let e=this.slides.length;if(e===0)return"";let r=this.current===0&&this.step===0,i=this.current>=e-1&&this.step>=this._maxSteps();if(this._has2DNav()){let{c:s,i:o}=this._coords(this.current),a=this.chapters[s];return m`<div id="nav-arrows"> <button class="nav-btn" aria-label="Previous chapter" title="Previous chapter" ?disabled=${!this.loop&&this.current===0} @click=${()=>s>0?this._goToCoords(s-1,0):this._back()}><svg viewBox="0 0 16 16" aria-hidden="true"><path d="m10 3-5 5 5 5" /></svg></button> <button class="nav-btn" aria-label="Previous slide in chapter" title="Up" ?disabled=${o===0} @click=${()=>this._goToCoords(s,o-1)}><svg viewBox="0 0 16 16" aria-hidden="true"><path d="m3 10 5-5 5 5" /></svg></button> <button class="nav-btn" aria-label="Next slide in chapter" title="Down" ?disabled=${!a||o+1>=a.slides.length} @click=${()=>this._goToCoords(s,o+1)}><svg viewBox="0 0 16 16" aria-hidden="true"><path d="m3 6 5 5 5-5" /></svg></button> <button class="nav-btn" aria-label="Next chapter" title="Next chapter" ?disabled=${!this.loop&&i} @click=${()=>s+1<this.chapters.length?this._goToCoords(s+1,0):this._advance()}><svg viewBox="0 0 16 16" aria-hidden="true"><path d="m6 3 5 5-5 5" /></svg></button> </div>`}return m`<div id="nav-arrows"> <button class="nav-btn" aria-label="Previous slide" title="Previous" ?disabled=${!this.loop&&r} @click=${()=>this._back()}><svg viewBox="0 0 16 16" aria-hidden="true"><path d="m10 3-5 5 5 5" /></svg></button> <button class="nav-btn" aria-label="Next slide" title="Next" ?disabled=${!this.loop&&i} @click=${()=>this._advance()}><svg viewBox="0 0 16 16" aria-hidden="true"><path d="m6 3 5 5-5 5" /></svg></button> </div>`}render(){return m`<div id="progress"></div> <div id="live" aria-live="polite" aria-atomic="true">${this._liveLabel()}</div> <div id="counter" class=${this._counterHidden()?"hidden":""}></div> <div id="step-dots"></div> ${this.noHint||this.presenterActive?"":m`
|
|
661
|
+
}`)})}_effectiveFluid(){return this.fluid||(this.slides[this.current]?.hasAttribute("fluid")??!1)}_applySlideFluid(){let e=!this.fluid&&(this.slides[this.current]?.hasAttribute("fluid")??!1);this.toggleAttribute("unfixed",e),this._applyCanvasVars(),this._applyScale()}_applyCanvasVars(){let e=document.documentElement;if(this._effectiveFluid()){e.style.removeProperty("--deck-canvas-w"),e.style.removeProperty("--deck-canvas-h");return}e.style.setProperty("--deck-canvas-w",String(this.width)),e.style.setProperty("--deck-canvas-h",String(this.height)),this._applyPageSize()}_zoomEnabled(){return!this.noZoom&&!this._effectiveFluid()&&!this.overview&&!this.blank}_applyZoom(){this.style.setProperty("--deck-zoom",String(this._zoom)),this.style.setProperty("--deck-pan-x",`${this._panX}px`),this.style.setProperty("--deck-pan-y",`${this._panY}px`),this.toggleAttribute("data-zoomed",this._zoom>1)}get _view(){return{zoom:this._zoom,panX:this._panX,panY:this._panY}}set _view(e){this._zoom=e.zoom,this._panX=e.panX,this._panY=e.panY}get _canvas(){return{width:this.width,height:this.height}}get _box(){return{width:this.clientWidth,height:this.clientHeight}}_clampPan(){this._view=Mt(this._view,this._canvas,this._box)}_zoomAt(e,r,n){if(!this._zoomEnabled())return;let s=this.getBoundingClientRect(),o=hi(this._view,e,r-(s.left+s.width/2),n-(s.top+s.height/2),this._canvas,this._box,{max:x.ZOOM_MAX});o!==this._view&&(this._view=o,this._applyZoom())}_resetZoom(){mi(this._view)||(this._view=pi,this._applyZoom())}_panBy(e,r){this._view=ui(this._view,e,r,this._canvas,this._box),this._applyZoom()}_applyLetterbox(e){if(this._effectiveFluid()){this.style.removeProperty("--deck-letterbox-bg");return}let r=e?getComputedStyle(e).backgroundColor:"";r&&Jr(r)?this.style.setProperty("--deck-letterbox-bg",r):this.style.removeProperty("--deck-letterbox-bg"),e&&this._repaintLetterboxWhenDefined(e)}_repaintLetterboxWhenDefined(e){let r=e.localName;!r.startsWith("deck-")||customElements.get(r)||customElements.whenDefined(r).then(async()=>{await e.updateComplete,this.slides[this.current]===e&&this._applyLetterbox(e)})}_liveLabel(){let e=this.slides.length;if(!e)return"";let n=this.slides[this.current]?.querySelector('h1, [slot="title"]')?.textContent?.trim(),s=`Slide ${this.current+1} of ${e}`;return n?`${s} \xB7 ${n}`:s}_applyPageSize(){if(typeof document>"u")return;let e="rik-deck-page",r=document.getElementById(e);r||(r=document.createElement("style"),r.id=e,document.head.appendChild(r)),r.textContent=`@page { size: ${this.width}px ${this.height}px; margin: 0 }@media print{html:has(> body > deck-root),html:has(> body > deck-root) body{overflow:visible;height:auto}}`}static _injectGlobals(){if(typeof document>"u"||document.getElementById("rik-deck-globals"))return;let e=document.createElement("style");e.id="rik-deck-globals",e.textContent="html:has(> body > deck-root){overflow:hidden;height:100%}html:has(> body > deck-root) body{margin:0;overflow:hidden;height:100%}html:has(> body > deck-root:not([fluid])){font-size:calc(var(--deck-canvas-h,1080)*0.0235px)}html:has(> body > deck-root[fluid]){font-size:clamp(14px,2.35vh,42px)}html:has(> body > deck-root[unfixed]){font-size:clamp(14px,2.35vh,42px)}",document.head.appendChild(e)}connectedCallback(){super.connectedCallback(),!this._overviewSnapshot&&(!this.hasAttribute("tabindex")&&typeof document<"u"&&queueMicrotask(()=>{!this._isFullPage()&&!this.hasAttribute("tabindex")&&(this.tabIndex=0)}),x._injectGlobals(),this.hasUpdated&&this._installRuntime())}disconnectedCallback(){super.disconnectedCallback(),!this._overviewSnapshot&&(this._overviewTeardown?.(),this._overviewTeardown=null,document.documentElement.style.removeProperty("--deck-canvas-w"),document.documentElement.style.removeProperty("--deck-canvas-h"),document.querySelector("deck-root")||document.getElementById("rik-deck-globals")?.remove(),this._resizeObserver?.disconnect(),this._resizeObserver=null,this._forgetPendingStep(),window.removeEventListener("keydown",this._onKey),window.removeEventListener("hashchange",this._onHash),this.removeEventListener("pointerdown",this._onNavPointerDown),this.removeEventListener("click",this._onClickNav),this.removeEventListener("wheel",this._onWheel),this.removeEventListener("pointerdown",this._onPanDown),this.removeEventListener("pointermove",this._onPanMove),this.removeEventListener("pointerup",this._onPanUp),this.removeEventListener("pointercancel",this._onPanUp),window.removeEventListener("mouseup",this._onAuxUp),window.removeEventListener("auxclick",this._onAuxClick),this._stopAutoplay(),this.removeEventListener("pointerdown",this._onPointerDown),this.removeEventListener("pointerup",this._onPointerUp),this.removeEventListener("pointercancel",this._onPointerUp),this.removeEventListener("mouseenter",this._onHoverEnter),this.removeEventListener("mouseleave",this._onHoverLeave),this._panning=!1,this.toggleAttribute("data-panning",!1))}_startAutoplay(){this._stopAutoplay(),!(this.autoplay<=0||this._autoplayPaused)&&(this._autoplayTimer=window.setInterval(()=>this._autoTick(),this.autoplay))}_stopAutoplay(){this._autoplayTimer!==null&&(window.clearInterval(this._autoplayTimer),this._autoplayTimer=null)}_autoTick(){if(this.overview)return;this.current>=this.slides.length-1&&this.step>=this._maxSteps()&&this.loop?this._goTo(0):this._advance()}_restartAutoplay(){this.autoplay>0&&!this._autoplayPaused&&this._startAutoplay()}_wheelTargetScrolls(e){let r=e.deltaY>0,n=e.deltaX>0;for(let s of e.composedPath()){if(s===this)return!1;if(!(s instanceof Element))continue;let o=s.scrollHeight>s.clientHeight,a=s.scrollWidth>s.clientWidth;if(!o&&!a)continue;let l=getComputedStyle(s);if(o&&/auto|scroll/.test(l.overflowY)&&(r?s.scrollTop+s.clientHeight<s.scrollHeight-1:s.scrollTop>0)||a&&/auto|scroll/.test(l.overflowX)&&(n?s.scrollLeft+s.clientWidth<s.scrollWidth-1:s.scrollLeft>0))return!0}return!1}_buildChapters(){this._outline=Dr(this.slides.map(r=>r.tagName?.toLowerCase()??"")),this.chapters=[];let e=null;this.slides.forEach((r,n)=>{r.tagName?.toLowerCase()==="deck-section"||!e?(e={startIdx:n,slides:[r]},this.chapters.push(e)):e.slides.push(r)})}_has2DNav(){return ei(this._outline,this.nav==="2d")}_mouseEnabled(e){return di(this.mouseNav,e)}_coords(e){let{chapter:r,index:n}=Ie(this._outline,e);return{c:r,i:n}}_isFullPage(){return typeof document<"u"&&this.parentElement===document.body}_ownsKeyboard(){if(this._isFullPage())return!0;let e=document.activeElement;return e===this||e!==null&&this.contains(e)}_linkContext(){return{outline:this._outline,twoD:this._has2DNav(),stepsOf:this._maxStepsFor,ownsUrl:this._isFullPage()}}_readHash(e){let r=si(Ht,this._linkContext(),e);r&&(ar(r,this._position)&&!e||(this.current=r.slide,this.step=r.step,e&&this._watchForLateSteps(r),e||(this._resetZoom(),this._applyActive(),this._applyStep(),this._updateUI())))}_watchForLateSteps(e){let r=zt(Ht.read(),this._has2DNav());!r||r.step<=0||(this._pendingStep=Math.max(r.step,e.step),this._stepWatcher?.disconnect(),this._stepWatcher=new MutationObserver(()=>this._replayPendingStep()),this._stepWatcher.observe(this,{subtree:!0,attributes:!0,attributeFilter:["steps","data-steps"]}))}_replayPendingStep(){let e=this._pendingStep;e!==null&&(this._maxStepsFor(this.current)<e||(this._forgetPendingStep(),this.step=e,this._applyActive(),this._applyStep(),this._updateUI(),this._writeHash()))}_forgetPendingStep(){this._pendingStep=null,this._stepWatcher?.disconnect(),this._stepWatcher=null}_writeHash(){oi(Ht,this._position,this._linkContext())}async _toggleHelp(){(await Promise.resolve().then(()=>(Nt(),cr))).toggleHelp(this)}async _togglePresenter(){(await Promise.resolve().then(()=>(hr(),Si))).installPresenter(this)}async _closeHelp(){(await Promise.resolve().then(()=>(Nt(),cr))).closeHelp(this)}async _renderOverviewIfActive(e=!1){if(!this.overview&&!e)return;let{mountOverview:r}=await Promise.resolve().then(()=>(mr(),zi));this.isConnected&&(this._overviewTeardown=r(this,{slides:this.slides,chapters:this.chapters,currentIdx:this.current,onPick:n=>{this.overview=!1,this._goTo(n)}}))}_maxSteps(){return this._maxStepsFor(this.current)}_baseMaxSteps(e){let r=this.slides[e];if(!r)return 0;let n=parseInt(r.getAttribute("steps")||r.dataset?.steps||"0",10);if(n>0)return n;let s=r.querySelector("deck-code[step-groups]");if(s)try{return JSON.parse(s.getAttribute("step-groups")).length}catch{}return 0}get _position(){return{slide:this.current,step:this.step}}_applyPosition(e){if(e===null||ar(e,this._position))return;if(this._forgetPendingStep(),e.slide===this.current){this.step=e.step,this._applyStep(),this._updateUI(),this._writeHash();return}let r=this._plugins.find(s=>s.navigate),n=()=>this._moveTo(e);r?.navigate?.(e.slide,this._context(),n)||n()}_moveTo(e){this._resetZoom(),this.current=e.slide,this.step=e.step,this._applyActive(),this._applyStep(),this._updateUI(),this._writeHash()}_advance(){this._applyPosition(Ct(this._outline,{loop:this.loop},this._position,this._maxStepsFor))}_back(){this._applyPosition(Pt(this._outline,{loop:this.loop},this._position,this._maxStepsFor))}_goTo(e){this._applyPosition(Oe(this._outline,e,this._maxStepsFor))}_goToCoords(e,r){this._applyPosition(ie(this._outline,{chapter:e,index:r},this._maxStepsFor))}_applyActive(){let e=this.slides.find(n=>n.hasAttribute("active"))??null,r=this.slides[this.current]??null;this.slides.forEach((n,s)=>{let o=s===this.current;n.toggleAttribute("active",o),o&&n.querySelectorAll("deck-mermaid").forEach(a=>{a.render?.()})}),this._applySlideFluid(),this._applyLetterbox(r),this.transition&&!this._transitionLoaded&&(this._transitionLoaded=!0,Promise.resolve().then(()=>(fr(),Ci)).then(n=>n.installTransitions(this))),e!==r&&this.dispatchEvent(new CustomEvent("slide-change",{detail:{current:r,previous:e},bubbles:!1}))}_applyStep(){let e=this.slides[this.current];if(e){e.applyStep?.(this.step),e.querySelectorAll("*").forEach(r=>{r.applyStep?.(this.step)}),e.querySelectorAll("[data-step-block]").forEach(r=>{let n=parseInt(r.dataset.stepBlock,10);r.style.transition="opacity 0.25s ease",r.style.opacity=this.step===0||n<=this.step?"1":"0.15"});for(let r of this._plugins)r.applyStep?.(this.step,e,this._context());this.dispatchEvent(new CustomEvent("step-change",{detail:{step:this.step,steps:this._maxSteps()}}))}}_counterHidden(){return this.overview||this.blank!==null}_updateUI(){let e=this.slides.length,r=this.current+1,n=this.renderRoot.querySelector("#progress"),s=this.renderRoot.querySelector("#counter"),o=this.renderRoot.querySelector("#step-dots");n&&(n.style.width=`${e>0?r/e*100:0}%`),s&&(s.textContent=`${r} / ${e}`);let a=this._maxSteps();o&&(o.innerHTML=a===0?"":Array.from({length:a},(l,p)=>`<div class="dot${p<this.step?" active":""}"></div>`).join(""))}updated(e){this._overviewSnapshot||((e.has("width")||e.has("height")||e.has("fluid"))&&(this._applyCanvasVars(),this._applyScale()),e.has("fluid")&&this._applyLetterbox(this.slides[this.current]??null),(e.has("overview")&&this.overview||e.has("blank")&&this.blank||e.has("noZoom")&&this.noZoom||e.has("fluid")&&this.fluid)&&this._resetZoom(),this._updateUI(),this._renderOverviewIfActive())}_navArrows(){if(this.noArrows||this.presenterActive||!this._mouseEnabled("arrows")||this.overview)return"";let e=this.slides.length;if(e===0)return"";let r=this.current===0&&this.step===0,n=this.current>=e-1&&this.step>=this._maxSteps();if(this._has2DNav()){let{c:s,i:o}=this._coords(this.current),a=this.chapters[s];return m`<div id="nav-arrows"> <button class="nav-btn" aria-label="Previous chapter" title="Previous chapter" ?disabled=${!this.loop&&this.current===0} @click=${()=>s>0?this._goToCoords(s-1,0):this._back()}><svg viewBox="0 0 16 16" aria-hidden="true"><path d="m10 3-5 5 5 5" /></svg></button> <button class="nav-btn" aria-label="Previous slide in chapter" title="Up" ?disabled=${o===0} @click=${()=>this._goToCoords(s,o-1)}><svg viewBox="0 0 16 16" aria-hidden="true"><path d="m3 10 5-5 5 5" /></svg></button> <button class="nav-btn" aria-label="Next slide in chapter" title="Down" ?disabled=${!a||o+1>=a.slides.length} @click=${()=>this._goToCoords(s,o+1)}><svg viewBox="0 0 16 16" aria-hidden="true"><path d="m3 6 5 5 5-5" /></svg></button> <button class="nav-btn" aria-label="Next chapter" title="Next chapter" ?disabled=${!this.loop&&n} @click=${()=>s+1<this.chapters.length?this._goToCoords(s+1,0):this._advance()}><svg viewBox="0 0 16 16" aria-hidden="true"><path d="m6 3 5 5-5 5" /></svg></button> </div>`}return m`<div id="nav-arrows"> <button class="nav-btn" aria-label="Previous slide" title="Previous" ?disabled=${!this.loop&&r} @click=${()=>this._back()}><svg viewBox="0 0 16 16" aria-hidden="true"><path d="m10 3-5 5 5 5" /></svg></button> <button class="nav-btn" aria-label="Next slide" title="Next" ?disabled=${!this.loop&&n} @click=${()=>this._advance()}><svg viewBox="0 0 16 16" aria-hidden="true"><path d="m6 3 5 5-5 5" /></svg></button> </div>`}render(){return this._overviewSnapshot?m`<slot></slot>`:m`<div id="progress"></div> <div id="live" aria-live="polite" aria-atomic="true">${this._liveLabel()}</div> <div id="counter" class=${this._counterHidden()?"hidden":""}></div> <div id="step-dots"></div> ${this.noHint||this.presenterActive?"":m`
|
|
618
662
|
<div id="kb-hint">
|
|
619
663
|
<button type="button" aria-label="Previous slide" title="Previous"
|
|
620
664
|
@click=${()=>this._back()}>←</button
|
|
@@ -633,22 +677,25 @@ ${e.textContent??""}
|
|
|
633
677
|
${this._navArrows()}
|
|
634
678
|
<div id="stage"><slot></slot></div>
|
|
635
679
|
${this.blank?m`<div id="blank" data-tone="${this.blank}" @click=${()=>{this.blank=null}}></div>`:""}
|
|
636
|
-
`}};
|
|
680
|
+
`}};x.styles=v`:host{display:flex;align-items:center;justify-content:center;width:100%;height:100%;overflow:hidden;background:var(--deck-letterbox-bg,var(--deck-root-bg,var(--rik-surface-page)))}#stage{flex:none;width:calc(var(--deck-canvas-w,1920) * 1px);height:calc(var(--deck-canvas-h,1080) * 1px);transform:translate(var(--deck-pan-x,0px),var(--deck-pan-y,0px)) scale(calc(var(--deck-scale,1) * var(--deck-zoom,1)));transform-origin:center center;container-type:size}:host([fluid]) #stage,:host([unfixed]) #stage{width:100%;height:100%;transform:none}:host([data-zoomed]){cursor:grab}:host([data-zoomed][data-panning]){cursor:grabbing}#live{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}#progress{position:fixed;bottom:0;left:0;height:var(--deck-root-progress-height,3px);background:var(--deck-root-progress-color,linear-gradient(90deg,var(--rik-accent),var(--rik-accent--soft)));transition:width 0.25s ease;z-index:100}#counter{position:fixed;bottom:1rem;right:1.5rem;font-size:var(--rik-font-size-xs);color:var(--deck-root-counter-color,var(--rik-text-default--faint));font-family:var(--rik-font-mono);z-index:100}:host([no-counter]) #counter{display:none}#counter.hidden{display:none}#step-dots{position:fixed;bottom:1rem;left:50%;transform:translateX(-50%);display:flex;gap:6px;z-index:100}.dot{width:6px;height:6px;border-radius:50%;background:var(--deck-root-dot-bg,var(--rik-border-default));transition:background 0.2s}.dot.active{background:var(--deck-root-dot-active-bg,var(--rik-accent))}#kb-hint{position:fixed;bottom:1rem;left:1.5rem;display:inline-flex;align-items:center;gap:6px;font:600 0.62rem/1 var(--rik-font-mono);color:var(--deck-root-kb-hint-color,var(--rik-text-default--faint));z-index:100;opacity:0.5;transition:opacity 0.2s ease;cursor:help}#kb-hint:hover{opacity:1}#kb-hint button{background:var(--rik-surface-raised);border:1px solid var(--rik-border-default);border-bottom:2px solid var(--rik-border-default);border-radius:4px;padding:2px 6px;color:var(--rik-text-default);font:inherit;min-width:16px;text-align:center;cursor:pointer}#kb-hint button:hover{border-color:var(--rik-accent)}#kb-hint button:focus-visible,.nav-btn:focus-visible{outline:var(--rik-focus-ring--width,2px) solid var(--rik-focus-ring,currentColor);outline-offset:var(--rik-focus-ring--offset,2px)}#kb-hint .sep{opacity:0.4}#nav-arrows{position:fixed;bottom:2.4rem;right:1.5rem;display:flex;gap:4px;z-index:100;opacity:var(--deck-root-nav-opacity,0.35);transition:opacity 0.2s ease}#nav-arrows:hover{opacity:1}.nav-btn{appearance:none;cursor:pointer;width:30px;height:30px;display:grid;place-items:center;font:700 1rem/1 var(--rik-font-mono);color:var(--deck-root-nav-color,var(--rik-text-default));background:var(--deck-root-nav-bg,var(--rik-surface-raised));border:1px solid var(--rik-border-default);border-radius:6px;padding:0}.nav-btn svg{display:block;width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.nav-btn:hover:not(:disabled){border-color:var(--rik-accent)}.nav-btn:disabled{opacity:0.3;cursor:default}#blank{position:fixed;inset:0;z-index:9999;cursor:pointer}#blank[data-tone="black"]{background:#000}#blank[data-tone="white"]{background:#fff}@media print{:host{display:block;position:static;height:auto;overflow:visible;background:none}#stage{display:block;width:auto;height:auto;transform:none;container-type:normal}#counter,#progress,#nav-arrows,#kb-hint,#step-dots,#blank{display:none}}`,x.ZOOM_MAX=4,x.ZOOM_STEP=1.25,x.ZOOM_WHEEL_SENSITIVITY=.002,c([j()],x.prototype,"current",2),c([j()],x.prototype,"step",2),c([j()],x.prototype,"blank",2),c([j()],x.prototype,"presenterActive",2),c([d({type:Boolean,reflect:!0})],x.prototype,"overview",2),c([d({type:Boolean,reflect:!0})],x.prototype,"fluid",2),c([d({type:Number})],x.prototype,"width",2),c([d({type:Number})],x.prototype,"height",2),c([d({type:Boolean,reflect:!0,attribute:"no-hint"})],x.prototype,"noHint",2),c([d({type:Boolean,reflect:!0,attribute:"no-arrows"})],x.prototype,"noArrows",2),c([d({type:Boolean,reflect:!0,attribute:"no-counter"})],x.prototype,"noCounter",2),c([d({type:Boolean,reflect:!0})],x.prototype,"preview",2),c([d({type:Boolean,reflect:!0,attribute:"no-zoom"})],x.prototype,"noZoom",2),c([d({type:String,reflect:!0})],x.prototype,"transition",2),c([d({type:Number,reflect:!0})],x.prototype,"autoplay",2),c([d({type:Boolean,reflect:!0})],x.prototype,"loop",2),c([d({type:Boolean,reflect:!0})],x.prototype,"swipe",2),c([d({type:String,reflect:!0,attribute:"mouse-nav"})],x.prototype,"mouseNav",2),c([d({type:String,reflect:!0})],x.prototype,"nav",2),x=c([k("deck-root")],x);fr();Nt();mr();hr();var ct=class extends g{get notes(){return(this.textContent??"").trim()}render(){return m`<slot></slot>`}};ct.styles=v`:host{display:none}`,ct=c([k("deck-notes")],ct);var gr=v`:host{display:none;position:absolute;inset:0;padding:var(--rik-slide-padding-y) var(--rik-slide-padding-x);flex-direction:column;overflow:hidden;background:var(--rik-surface-page);font-family:var(--rik-font-sans);color:var(--rik-text-default)}:host([active]){display:flex}.body,.col{justify-content:var(--_spread,var(--rik-slide-spread,center))}:host([fill]) .body > ::slotted(*),:host([fill]) .col > ::slotted(*){flex:1 1 0;min-height:0}:host([fill]) .body,:host([fill]) .col{justify-content:stretch}@media print{:host{display:flex;position:relative;inset:auto;width:calc(var(--deck-canvas-w,1920) * 1px);height:calc(var(--deck-canvas-h,1080) * 1px);break-inside:avoid;break-after:page;-webkit-print-color-adjust:exact;print-color-adjust:exact}:host(:last-child){break-after:auto}}`,ns=v`h1{font-size:var(--rik-font-size-h1);font-weight:700;color:var(--rik-text-default);letter-spacing:-0.022em;line-height:1.15;margin-bottom:var(--rik-space-4);padding-bottom:var(--rik-space-2);border-bottom:3px solid var(--rik-accent);display:inline-block;align-self:flex-start;flex:0 0 auto}h1 .accent{color:var(--rik-accent)}::slotted(p),p{font-size:var(--rik-font-size-body);line-height:1.65;color:var(--rik-text-default--muted);margin:0}::slotted(strong),strong{color:var(--rik-text-default);font-weight:700}::slotted(code),code{font-family:var(--rik-font-mono);font-size:var(--rik-font-size-mono-sm);background:rgba(0,0,0,0.06);padding:2px 6px;border-radius:var(--rik-radius-sm);color:var(--rik-text-default)}`,ss=v`.lbl{display:inline-block;padding:var(--deck-eyebrow-padding-y,0) var(--deck-eyebrow-padding-x,0);background:var(--deck-eyebrow-bg,transparent);color:var(--deck-eyebrow-color,var(--rik-accent__text));border-radius:var(--deck-eyebrow-radius,0);font-size:var(--rik-font-size-body);font-weight:600;margin-bottom:var(--rik-space-1);align-self:flex-start}.lead{font-size:var(--rik-font-size-lead);color:var(--rik-text-default--faint);line-height:1.5;margin-bottom:var(--rik-space-4);max-width:75ch;flex:0 0 auto}.kicker{font-size:var(--rik-font-size-xs);font-weight:700;letter-spacing:0.14em;text-transform:uppercase;color:var(--rik-text-default--faint);margin-bottom:var(--rik-space-3);display:block}.kicker.on-dark{color:rgba(255,255,255,0.35)}.caption{font-size:var(--rik-font-size-sm);color:var(--rik-text-default--faint);line-height:1.55}.caption.on-dark{color:rgba(255,255,255,0.5)}.col-label{font-size:var(--rik-font-size-xs);font-weight:700;letter-spacing:0.08em;text-transform:uppercase;color:var(--rik-text-default--faint);margin-bottom:var(--rik-space-2)}`,q=[gr,ns,ss];var C=class extends g{labels(){return(this.closest("[lang]")?.getAttribute("lang")??(typeof document>"u"?"":document.documentElement.lang)).toLowerCase().startsWith("fr")?{speaker:"Pr\xE9sent\xE9 par",company:"Entreprise",duration:"Dur\xE9e",audience:"Audience"}:{speaker:"Presented by",company:"Company",duration:"Duration",audience:"Audience"}}render(){let t=this.labels(),e=(this.brand??"").split("\xB7").map(a=>a.trim()).filter(Boolean),r=e[0]??"",n=e.slice(1).join(" \xB7 "),s=[this.speaker&&{key:"speaker",l:this.speakerLabel??t.speaker,v:this.speaker},this.company&&{key:"company",l:this.companyLabel??t.company,v:this.company,src:this.companySrc},this.duration&&{key:"duration",l:this.durationLabel??t.duration,v:this.duration},this.audience&&{key:"audience",l:this.audienceLabel??t.audience,v:this.audience},this.runtime&&{key:"runtime",l:this.runtimeLabel??"Runtime",v:this.runtime}].filter(a=>!!a),o=!!this.brandSrc;return m`<div class="brand" part="brand"> ${o?m`<span class="brand-tile"><img src="${this.brandSrc}" alt="${r}"></span>`:""}
|
|
637
681
|
${r?m`<span class="brand-name">${r}</span>`:""}
|
|
638
|
-
${
|
|
682
|
+
${n?m`<span class="brand-context">${n}</span>`:""}
|
|
639
683
|
</div>
|
|
640
684
|
<slot></slot>
|
|
641
685
|
${s.length?m`<div class="meta" part="meta"> ${s.map(a=>m`
|
|
642
|
-
<div class="meta-item"
|
|
686
|
+
<div class="meta-item" data-field="${a.key}">
|
|
687
|
+
<strong>${a.l}</strong>
|
|
688
|
+
${a.src?m`<div class="meta-value"><img class="meta-logo" src="${a.src}" alt=""><span>${a.v}</span></div>`:m`<span>${a.v}</span>`}
|
|
689
|
+
</div>
|
|
643
690
|
`)}
|
|
644
691
|
</div>`:""}
|
|
645
|
-
`}};
|
|
692
|
+
`}};C.styles=[...q,v`:host{background:var(--deck-cover-bg,var(--rik-surface-inverse));justify-content:center;color:var(--deck-cover-text,var(--rik-text-inverse))}.brand{display:inline-flex;align-items:center;gap:var(--rik-space-3);margin-bottom:var(--rik-space-5);align-self:flex-start}.brand-tile{width:2.5rem;height:2.5rem;display:inline-flex;align-items:center;justify-content:center}.brand-tile img{width:100%;height:100%;display:block}.brand-name{font-family:var(--rik-font-display,inherit);font-size:var(--rik-font-size-xs);font-weight:700;letter-spacing:0.2em;text-transform:uppercase;color:var(--deck-cover-soft,var(--rik-text-inverse--muted))}.brand-context{font-size:var(--rik-font-size-xs);font-weight:700;color:var(--deck-cover-muted,var(--rik-text-inverse--faint));letter-spacing:0.2em;text-transform:uppercase;padding-left:var(--rik-space-3);border-left:1px solid var(--deck-cover-border,var(--rik-border-inverse))}::slotted(h1){font-size:clamp(3.6rem,9cqw,8.5rem);font-weight:900;color:var(--deck-cover-text,var(--rik-text-inverse));line-height:1.02;letter-spacing:-0.035em;margin-bottom:var(--rik-space-4);border:none;padding:0}::slotted(.sub){font-size:var(--rik-font-size-h2);color:var(--deck-cover-muted,var(--rik-text-inverse--faint));margin-bottom:var(--rik-space-6);max-width:60ch;line-height:1.45;display:block}.meta{display:flex;gap:var(--rik-space-6);border-top:1px solid var(--deck-cover-border,var(--rik-border-inverse));padding-top:var(--rik-space-4)}.meta-item strong{display:block;font-size:var(--rik-font-size-xs);letter-spacing:0.12em;text-transform:uppercase;color:var(--deck-cover-faint,var(--rik-text-inverse--muted));margin-bottom:6px;font-weight:700}.meta-item span{color:var(--deck-cover-text,var(--rik-text-inverse));font-size:var(--rik-font-size-body);font-weight:600}.meta-value{display:flex;align-items:center;gap:var(--rik-space-2)}.meta-logo{height:1.6em;width:auto;display:block}`],c([d({type:String})],C.prototype,"brand",2),c([d({type:String,attribute:"brand-src"})],C.prototype,"brandSrc",2),c([d({type:String})],C.prototype,"speaker",2),c([d({type:String})],C.prototype,"company",2),c([d({type:String,attribute:"company-src"})],C.prototype,"companySrc",2),c([d({type:String})],C.prototype,"duration",2),c([d({type:String})],C.prototype,"audience",2),c([d({type:String})],C.prototype,"runtime",2),c([d({type:String,attribute:"speaker-label"})],C.prototype,"speakerLabel",2),c([d({type:String,attribute:"company-label"})],C.prototype,"companyLabel",2),c([d({type:String,attribute:"duration-label"})],C.prototype,"durationLabel",2),c([d({type:String,attribute:"audience-label"})],C.prototype,"audienceLabel",2),c([d({type:String,attribute:"runtime-label"})],C.prototype,"runtimeLabel",2),C=c([k("deck-cover")],C);var Be=class extends g{render(){return m`${this.num?m`<div class="sec-num" part="num">${this.num}</div>`:""}
|
|
646
693
|
<slot></slot>
|
|
647
|
-
`}};
|
|
694
|
+
`}};Be.styles=[...q,v`:host{background:var(--deck-section-bg,var(--rik-surface-inverse));color:var(--rik-text-inverse);justify-content:center;align-items:center;text-align:center}.sec-num{font-size:var(--rik-font-size-xs);font-weight:700;letter-spacing:0.16em;text-transform:uppercase;color:var(--deck-section-num-color,var(--rik-text-inverse--ghost));margin-bottom:var(--rik-space-3);display:inline-flex;align-items:center;gap:0.8rem;font-family:var(--rik-font-mono)}.sec-num::before,.sec-num::after{content:'';width:1.25rem;height:1px;background:var(--deck-section-rule-color,var(--rik-border-inverse))}::slotted(h1){font-size:var(--rik-font-size-section);font-weight:900;color:var(--deck-section-title-color,var(--rik-accent));line-height:1.02;letter-spacing:-0.03em;max-width:18ch;border:none;padding:0;margin:0;text-align:center;align-self:center}::slotted(h1 em){color:var(--deck-section-em-color,var(--rik-text-inverse--muted));font-style:normal;font-weight:700}`],c([d({type:String})],Be.prototype,"num",2),Be=c([k("deck-section")],Be);var os=new Map([["start","flex-start"],["center","center"],["end","flex-end"],["between","space-between"],["around","space-around"],["evenly","space-evenly"]]);function Ue(i){let t=(i??"").trim().toLowerCase();return t===""||t==="theme"?"":os.get(t)??""}var de=class extends g{constructor(){super(...arguments);this.fill=!1}willUpdate(){this.style.setProperty("--_spread",Ue(this.spread??null))}render(){return m`${this.eyebrow?m`<span class="lbl">${this.eyebrow}</span>`:""}
|
|
648
695
|
<slot name="title"></slot>
|
|
649
696
|
<slot name="lead"></slot>
|
|
650
697
|
<div class="body" part="body"><slot></slot></div>
|
|
651
|
-
`}};
|
|
698
|
+
`}};de.styles=[...q,v`:host{justify-content:flex-start}.body{flex:1;min-height:0;display:flex;flex-direction:column;gap:var(--rik-space-3);overflow:hidden}::slotted(deck-code:not([nested])),::slotted(deck-mermaid),::slotted(table),::slotted(pre),::slotted(svg),::slotted(.hero-main){max-height:100%;flex:0 1 auto}`],c([d({type:String})],de.prototype,"eyebrow",2),c([d({type:String,reflect:!0})],de.prototype,"spread",2),c([d({type:Boolean,reflect:!0})],de.prototype,"fill",2),de=c([k("deck-feature")],de);var U=class extends g{constructor(){super(...arguments);this.fill=!1}_resolveSp(e){let r=parseInt(e,10);return!Number.isNaN(r)&&r>=1&&r<=6?`var(--rik-space-${r})`:e}updated(){this.gap&&this.style.setProperty("--_gap",this._resolveSp(this.gap)),this.colGap&&this.style.setProperty("--_col-gap",this._resolveSp(this.colGap))}willUpdate(){this.style.setProperty("--_spread",Ue(this.spread??null))}render(){let e=this.querySelector('[slot="a"]'),r=this.cols==="3"||!!e;return m`${this.eyebrow?m`<span class="lbl">${this.eyebrow}</span>`:""}
|
|
652
699
|
<slot name="title"></slot>
|
|
653
700
|
<slot name="lead"></slot>
|
|
654
701
|
<div class="body" part="body">
|
|
@@ -656,7 +703,7 @@ ${e.textContent??""}
|
|
|
656
703
|
<div class="col" part="col"><slot name="right"></slot></div>
|
|
657
704
|
`}
|
|
658
705
|
</div>
|
|
659
|
-
`}};
|
|
706
|
+
`}};U.styles=[...q,v`:host{justify-content:flex-start}.body{flex:1;min-height:0;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:minmax(0,1fr);gap:var(--_gap,var(--deck-split-gap,var(--rik-space-5)))}:host([cols="1-2"]) .body{grid-template-columns:1fr 2fr}:host([cols="2-1"]) .body{grid-template-columns:2fr 1fr}:host([cols="3"]) .body{grid-template-columns:1fr 1fr 1fr;gap:var(--_gap,var(--deck-split-gap,var(--rik-space-4)))}.col{display:flex;flex-direction:column;min-height:0;min-width:0;gap:var(--_col-gap,var(--deck-split-col-gap,var(--rik-space-3)));overflow:hidden}.pivot{align-self:stretch;justify-self:center;display:grid;place-items:center;position:relative;padding-inline:var(--rik-space-3);flex:none}.pivot::before{content:'';position:absolute;top:0;bottom:0;left:50%;width:var(--deck-split-pivot-rule-width,4px);transform:translateX(-50%);background:var(--deck-split-pivot-rule,var(--rik-accent));border-radius:var(--rik-radius-pill)}.pivot-word{position:relative;font-family:var(--rik-font-display,var(--rik-font-sans));font-size:var(--deck-split-pivot-size,var(--rik-font-size-big));font-weight:900;line-height:1;color:var(--deck-split-pivot-color,var(--rik-accent));background:var(--deck-split-pivot-bg,var(--rik-surface-page));padding-block:var(--rik-space-2)}:host([pivot]) .body{grid-template-columns:1fr auto 1fr}:host([winner]) .col{padding-top:var(--rik-space-3);border-top:var(--deck-split-winner-width,3px) solid var(--rik-text-default--faint)}:host([winner='left']) .col:first-of-type,:host([winner='right']) .col:last-of-type{border-top-color:var(--deck-split-winner-ring,var(--rik-accent))}@media print{:host([winner]) .col{-webkit-print-color-adjust:exact;print-color-adjust:exact}}`],c([d({type:String})],U.prototype,"eyebrow",2),c([d({type:String})],U.prototype,"cols",2),c([d({type:String})],U.prototype,"gap",2),c([d({type:String,attribute:"col-gap"})],U.prototype,"colGap",2),c([d({type:String,reflect:!0})],U.prototype,"spread",2),c([d({type:Boolean,reflect:!0})],U.prototype,"fill",2),c([d({type:String,reflect:!0})],U.prototype,"pivot",2),c([d({type:String,reflect:!0})],U.prototype,"winner",2),U=c([k("deck-split")],U);var We=class extends g{render(){return m`${this.eyebrow?m`<span class="lbl">${this.eyebrow}</span>`:""}
|
|
660
707
|
<slot name="title"></slot>
|
|
661
708
|
<slot name="lead"></slot>
|
|
662
709
|
<div class="hero" part="hero"><slot></slot></div>
|
|
@@ -664,46 +711,47 @@ ${e.textContent??""}
|
|
|
664
711
|
<div class="col"><slot name="left"></slot></div>
|
|
665
712
|
<div class="col"><slot name="right"></slot></div>
|
|
666
713
|
</div>
|
|
667
|
-
`}};
|
|
714
|
+
`}};We.styles=[...q,v`:host{justify-content:flex-start}.hero{flex:var(--deck-feature-cards-hero-flex,0 1 auto);min-height:0;display:flex;flex-direction:column;overflow:hidden}::slotted(deck-code),::slotted(deck-mermaid),::slotted(pre),::slotted(table),::slotted(svg){max-height:100%;flex:1 1 auto}.detail{flex:var(--deck-feature-cards-detail-flex,1 1 auto);min-height:0;margin-top:var(--deck-feature-cards-gap,var(--rik-space-3));display:grid;grid-template-columns:1fr 1fr;gap:var(--deck-feature-cards-col-gap,var(--rik-space-4));overflow:hidden}.col{display:flex;flex-direction:column;justify-content:flex-start;gap:var(--rik-space-2);min-width:0;min-height:0;overflow:hidden}`],c([d({type:String})],We.prototype,"eyebrow",2),We=c([k("deck-feature-cards")],We);var ee=class extends g{updated(){this.position&&this.style.setProperty("--_pos",this.position),typeof this.darken=="number"&&this.style.setProperty("--_dim",String(this.darken));let t=this.align==="top"?"flex-start":this.align==="bottom"?"flex-end":"center";if(this.style.setProperty("--_align",t),this.textAlign){this.style.setProperty("--_text-align",this.textAlign);let e=this.textAlign==="center"?"center":this.textAlign==="right"?"flex-end":"flex-start";this.style.setProperty("--_text-align-items",e)}}render(){let t=this.src?`background-image: url("${this.src.replace(/"/g,"%22")}")`:"";return m`<div class="bg" part="bg" style=${t}></div> <div class="overlay" part="overlay"></div> <div class="content" part="content"><slot></slot></div>`}};ee.styles=[gr,v`:host{padding:0;color:var(--deck-photo-text-color,var(--rik-text-inverse));overflow:hidden}.bg{position:absolute;inset:0;background-size:cover;background-position:var(--_pos,center);background-repeat:no-repeat}.overlay{position:absolute;inset:0;background:var(--deck-photo-overlay-color,rgba(0,0,0,var(--_dim,0.35)))}.content{position:relative;z-index:1;display:flex;flex-direction:column;gap:var(--rik-space-3);padding:var(--deck-photo-padding-y,var(--rik-slide-padding-y)) var(--deck-photo-padding-x,var(--rik-slide-padding-x));width:100%;height:100%;max-width:100%;box-sizing:border-box;justify-content:var(--_align,center);text-align:var(--_text-align,left);align-items:var(--_text-align-items,flex-start)}.content > *{max-width:var(--deck-photo-content-max-width,36ch)}::slotted(h1){font-family:var(--rik-font-display,var(--rik-font-sans));font-size:clamp(2.5rem,6cqw,5.5rem);font-weight:900;letter-spacing:-0.035em;line-height:1.02;color:var(--deck-photo-text-color,var(--rik-text-inverse));margin:0;text-shadow:0 2px 16px rgba(0,0,0,0.35)}::slotted(h2){font-family:var(--rik-font-display,var(--rik-font-sans));font-size:clamp(1.6rem,3cqw,2.6rem);font-weight:800;letter-spacing:-0.025em;line-height:1.1;color:var(--deck-photo-text-color,var(--rik-text-inverse));margin:0;text-shadow:0 2px 12px rgba(0,0,0,0.35)}::slotted(p),::slotted(.sub){font-size:var(--rik-font-size-lead);color:var(--deck-photo-text-muted,var(--rik-text-inverse--muted));line-height:1.5;margin:0;text-shadow:0 1px 8px rgba(0,0,0,0.35)}::slotted(.kicker){font:700 var(--rik-font-size-xs)/1 var(--rik-font-mono);letter-spacing:0.18em;text-transform:uppercase;color:var(--deck-photo-text-muted,var(--rik-text-inverse--muted));margin:0}`],c([d({type:String})],ee.prototype,"src",2),c([d({type:String})],ee.prototype,"position",2),c([d({type:Number})],ee.prototype,"darken",2),c([d({type:String})],ee.prototype,"align",2),c([d({type:String,attribute:"text-align"})],ee.prototype,"textAlign",2),ee=c([k("deck-photo")],ee);var pe=class extends g{constructor(){super(...arguments);this.fill=!1}willUpdate(){this.style.setProperty("--_spread",Ue(this.spread??null))}render(){return m`<div class="body" part="body"> ${this.kicker?m`<span class="kicker on-dark">${this.kicker}</span>`:""}
|
|
668
715
|
<slot></slot>
|
|
669
716
|
</div>
|
|
670
|
-
`}};
|
|
717
|
+
`}};pe.styles=[...q,v`:host{background:var(--deck-takeaway-bg,var(--rik-surface-inverse));color:var(--rik-text-inverse);justify-content:center;align-items:center;text-align:center}.body{display:flex;flex-direction:column;align-items:center;gap:var(--deck-takeaway-gap,var(--rik-space-4));max-width:75cqw}::slotted(.display){font-family:var(--rik-font-display,var(--rik-font-sans));font-size:clamp(3rem,7cqw,5.5rem);font-weight:900;color:var(--deck-takeaway-display-color,var(--rik-accent));letter-spacing:-0.03em;line-height:1.05;margin:0}::slotted(.display.danger){color:var(--rik-status-danger)}::slotted(.caption){font-size:var(--rik-font-size-lead);color:var(--deck-takeaway-caption-color,var(--rik-text-inverse--faint))}`],c([d({type:String})],pe.prototype,"kicker",2),c([d({type:String,reflect:!0})],pe.prototype,"spread",2),c([d({type:Boolean,reflect:!0})],pe.prototype,"fill",2),pe=c([k("deck-takeaway")],pe);function Ye(i){if(!i)return null;let t=parseInt(i,10);return!Number.isNaN(t)&&String(t)===i.trim()&&t>=1&&t<=12?`repeat(${t}, minmax(0, 1fr))`:i}function qt(i){if(!i)return null;let t=parseInt(i,10);return!Number.isNaN(t)&&String(t)===i.trim()&&t>=1&&t<=6?`var(--rik-space-${t})`:i}function he(i){if(!i)return"auto";let t=i.trim();return/^\d+$/.test(t)?`span ${t}`:t}function Fe(i){if(!i)return{col:"auto",row:"auto"};let[t,e]=i.toLowerCase().split("x");return{col:he(t),row:he(e)}}var V=class extends g{_bandCount(){if(this.rows)return 0;let t=[...this.children].filter(n=>n.tagName.startsWith("DECK-")),e=t.filter(n=>n.tagName==="DECK-POINT");if(e.length<2||e.length!==t.length||e.some(n=>n.hasAttribute("span")||n.hasAttribute("col")||n.hasAttribute("row")))return 0;let r=e.map(n=>n.childElementCount);return new Set(r).size!==1?0:r[0]??0}updated(){let t=Ye(this.cols),e=Ye(this.rows),r=qt(this.gap),n=this._bandCount();for(let s of this.children)s.tagName==="DECK-POINT"&&(n>0?s.setAttribute("banded",String(n)):s.removeAttribute("banded"));this.toggleAttribute("banded",n>0),t&&this.style.setProperty("--_cols",t),n>0?this.style.setProperty("--_rows",`repeat(${n}, minmax(0, auto))`):e?this.style.setProperty("--_rows",e):this.style.removeProperty("--_rows"),r&&this.style.setProperty("--_gap",r),this.align&&this.style.setProperty("--_align",this.align),this.justify&&this.style.setProperty("--_justify",this.justify)}render(){return m`${this.eyebrow?m`<span class="lbl">${this.eyebrow}</span>`:""}
|
|
671
718
|
<slot name="title"></slot>
|
|
672
719
|
<div class="grid" part="grid"><slot></slot></div>
|
|
673
|
-
`}};
|
|
674
|
-
|
|
675
|
-
`)
|
|
676
|
-
`)}}
|
|
677
|
-
|
|
678
|
-
`);
|
|
679
|
-
|
|
680
|
-
`,1)[0]
|
|
681
|
-
`,
|
|
682
|
-
`,1)
|
|
683
|
-
|
|
684
|
-
`+f
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
]
|
|
689
|
-
`),
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
`+r.
|
|
693
|
-
`+r.raw,
|
|
694
|
-
`+r.raw,
|
|
695
|
-
`+r.raw,
|
|
696
|
-
`+r.
|
|
697
|
-
`+r.raw,
|
|
698
|
-
`+r.
|
|
699
|
-
|
|
700
|
-
|
|
720
|
+
`}};V.styles=[...q,v`:host{gap:var(--rik-space-3)}.grid{flex:1 1 auto;margin-inline:calc(-1 * var(--deck-cell-padding-x,var(--rik-space-4)));display:grid;grid-template-columns:var(--_cols,repeat(2,minmax(0,1fr)));grid-template-rows:var(--_rows,minmax(0,1fr));gap:var(--_gap,var(--deck-bento-gap,var(--rik-space-3)));align-items:var(--_align,stretch);justify-items:var(--_justify,stretch);min-height:0;min-width:0}:host([banded]) .grid{align-content:start}`],c([d({type:String})],V.prototype,"eyebrow",2),c([d({type:String})],V.prototype,"cols",2),c([d({type:String})],V.prototype,"rows",2),c([d({type:String})],V.prototype,"gap",2),c([d({type:String})],V.prototype,"align",2),c([d({type:String})],V.prototype,"justify",2),V=c([k("deck-bento")],V);var as={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"},ls={start:"flex-start",center:"center",end:"flex-end",between:"space-between"},K=class extends g{updated(){let t=Fe(this.span);this.style.setProperty("--_col",this.col?he(this.col):t.col),this.style.setProperty("--_row",this.row?he(this.row):t.row),this.align&&this.style.setProperty("--_align",as[this.align]??this.align),this.justify&&this.style.setProperty("--_justify",ls[this.justify]??this.justify)}render(){return m`<slot></slot>`}};K.styles=v`:host{display:flex;flex-direction:column;gap:var(--deck-cell-gap,var(--rik-space-2));align-items:var(--_align,stretch);justify-content:var(--_justify,flex-start);grid-column:var(--_col,auto);grid-row:var(--_row,auto);min-width:0;min-height:0;overflow:hidden;box-sizing:border-box;container-type:size;padding:var(--deck-cell-padding-y,var(--rik-space-3)) var(--deck-cell-padding-x,var(--rik-space-4));background:var(--deck-cell-bg,var(--rik-surface-raised--strong));border:1px solid var(--deck-cell-border,var(--rik-border-default));border-radius:var(--deck-cell-radius,var(--rik-radius-lg));font-family:var(--rik-font-sans);color:var(--rik-text-default--muted)}:host([tone="info"]){background:var(--deck-cell-bg,var(--rik-status-info__bg));border-color:var(--deck-cell-border,var(--rik-status-info__border))}:host([tone="warn"]){background:var(--deck-cell-bg,var(--rik-status-warn__bg));border-color:var(--deck-cell-border,var(--rik-status-warn__border))}:host([tone="ok"]){background:var(--deck-cell-bg,var(--rik-status-success__bg));border-color:var(--deck-cell-border,var(--rik-status-success__border))}:host([tone="danger"]){background:var(--deck-cell-bg,var(--rik-status-danger__bg));border-color:var(--deck-cell-border,var(--rik-status-danger__border))}:host([plain]){background:none;border-color:transparent;border-radius:0}:host([flat]){border:none}::slotted(h3){font-family:var(--rik-font-display,var(--rik-font-sans));font-size:var(--rik-font-size-h2);font-weight:700;color:var(--rik-text-default);letter-spacing:-0.01em;line-height:1.2;margin:0}::slotted(p){font-size:var(--rik-font-size-body);line-height:1.5;margin:0}::slotted(img),::slotted(svg),::slotted(video){flex:1 1 0;min-height:0;width:100%;max-width:100%;object-fit:contain}::slotted(table){width:100%;border-collapse:collapse}`,c([d({type:String})],K.prototype,"span",2),c([d({type:String})],K.prototype,"col",2),c([d({type:String})],K.prototype,"row",2),c([d({type:String})],K.prototype,"align",2),c([d({type:String})],K.prototype,"justify",2),c([d({type:String})],K.prototype,"tone",2),K=c([k("deck-cell")],K);var cs={start:"start",center:"center",end:"end",stretch:"stretch"},G=class extends g{updated(){let t=Fe(this.span);this.style.setProperty("--_col",this.col?he(this.col):t.col),this.style.setProperty("--_row",this.banded?`span ${this.banded}`:this.row?he(this.row):t.row),this.align&&this.style.setProperty("--_align",cs[this.align]??this.align)}render(){return m`<slot></slot>`}};G.styles=v`:host{display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:min-content;row-gap:var(--deck-cell-gap,var(--rik-space-2));justify-items:var(--_align,stretch);grid-column:var(--_col,auto);grid-row:var(--_row,auto);min-width:0;box-sizing:border-box;padding:var(--deck-cell-padding-y,var(--rik-space-3)) var(--deck-cell-padding-x,var(--rik-space-4));background:var(--deck-cell-bg,var(--rik-surface-raised--strong));border:1px solid var(--deck-cell-border,var(--rik-border-default));border-radius:var(--deck-cell-radius,var(--rik-radius-lg));font-family:var(--rik-font-sans);color:var(--rik-text-default--muted)}:host([banded]){grid-template-rows:subgrid;grid-auto-rows:initial;row-gap:0}:host([banded]) ::slotted(*){align-self:start}:host([tone="info"]){background:var(--deck-cell-bg,var(--rik-status-info__bg));border-color:var(--deck-cell-border,var(--rik-status-info__border))}:host([tone="warn"]){background:var(--deck-cell-bg,var(--rik-status-warn__bg));border-color:var(--deck-cell-border,var(--rik-status-warn__border))}:host([tone="ok"]){background:var(--deck-cell-bg,var(--rik-status-success__bg));border-color:var(--deck-cell-border,var(--rik-status-success__border))}:host([tone="danger"]){background:var(--deck-cell-bg,var(--rik-status-danger__bg));border-color:var(--deck-cell-border,var(--rik-status-danger__border))}:host([plain]){background:none;border-color:transparent;border-radius:0}:host([flat]){border:none}::slotted(h3){font-family:var(--rik-font-display,var(--rik-font-sans));font-size:var(--rik-font-size-h2);font-weight:700;color:var(--rik-text-default);letter-spacing:-0.01em;line-height:1.2;margin:0}::slotted(p){font-size:var(--rik-font-size-body);line-height:1.5;margin:0}`,c([d({type:String})],G.prototype,"span",2),c([d({type:String})],G.prototype,"col",2),c([d({type:String})],G.prototype,"row",2),c([d({type:String})],G.prototype,"align",2),c([d({type:String})],G.prototype,"tone",2),c([d({type:String,reflect:!0})],G.prototype,"banded",2),G=c([k("deck-point")],G);var te=class extends g{updated(){let t=Ye(this.cols),e=Ye(this.rows),r=qt(this.gap);t&&this.style.setProperty("--_cols",t),e&&this.style.setProperty("--_rows",e),r&&this.style.setProperty("--_gap",r),this.align&&this.style.setProperty("--_align",this.align),this.justify&&this.style.setProperty("--_justify",this.justify)}render(){return m`<slot></slot>`}};te.styles=v`:host{display:grid;grid-template-columns:var(--_cols,1fr);grid-template-rows:var(--_rows,auto);gap:var(--_gap,var(--deck-grid-gap,var(--rik-space-3)));align-items:var(--_align,stretch);justify-items:var(--_justify,stretch);min-width:0;min-height:0}:host([fill]){flex:1 1 auto;height:100%}`,c([d({type:String})],te.prototype,"cols",2),c([d({type:String})],te.prototype,"rows",2),c([d({type:String})],te.prototype,"gap",2),c([d({type:String})],te.prototype,"align",2),c([d({type:String})],te.prototype,"justify",2),te=c([k("deck-grid")],te);var ds={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around"},ps={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"},ne=class extends g{updated(){if(this.gap){let t=parseInt(this.gap,10);!Number.isNaN(t)&&t>=1&&t<=6?this.style.setProperty("--_gap",`var(--rik-space-${t})`):this.style.setProperty("--_gap",this.gap)}else this.style.removeProperty("--_gap");this.style.setProperty("--_dir",this.direction==="row"?"row":"column"),this.align&&this.style.setProperty("--_align",ps[this.align]??this.align),this.justify&&this.style.setProperty("--_justify",ds[this.justify]??this.justify)}render(){return m`<slot></slot>`}};ne.styles=v`:host{display:flex;flex-direction:var(--_dir,column);gap:var(--_gap,var(--deck-stack-gap,var(--rik-space-3)));align-items:var(--_align,stretch);justify-content:var(--_justify,flex-start);min-width:0;min-height:0}:host([fill]){flex:1 1 auto}`,c([d({type:String})],ne.prototype,"gap",2),c([d({type:String})],ne.prototype,"direction",2),c([d({type:String})],ne.prototype,"align",2),c([d({type:String})],ne.prototype,"justify",2),ne=c([k("deck-stack")],ne);var ue=class extends g{constructor(){super(...arguments);this.center=!1;this.compact=!1}render(){return m`<slot></slot>`}};ue.styles=v`:host{display:flex;flex-direction:column;gap:var(--deck-card-gap,var(--rik-space-2));background:var(--deck-card-bg,var(--rik-surface-raised--strong));border:1px solid var(--deck-card-border,var(--rik-border-default));border-radius:var(--deck-card-radius,var(--rik-radius-lg));padding:var(--deck-card-padding-y,var(--rik-space-3)) var(--deck-card-padding-x,var(--rik-space-4));box-shadow:var(--deck-card-shadow,var(--rik-elevation-2));min-height:0;font-family:var(--rik-font-sans);color:var(--deck-card-text,var(--rik-text-default--muted))}:host([color="yellow"]){background:var(--deck-card-bg,var(--rik-status-info__bg));border:4px solid var(--deck-card-border,var(--rik-status-info__border))}:host([color="orange"]){background:var(--deck-card-bg,var(--rik-status-warn__bg));border:4px solid var(--deck-card-border,var(--rik-status-warn__border))}:host([color="green"]){background:var(--deck-card-bg,var(--rik-status-success__bg));border:4px solid var(--deck-card-border,var(--rik-status-success__border))}:host([color="red"]){background:var(--deck-card-bg,var(--rik-status-danger__bg));border:4px solid var(--deck-card-border,var(--rik-status-danger__border))}::slotted(h3){font-family:var(--rik-font-display,var(--rik-font-sans));font-size:var(--rik-font-size-h2);font-weight:700;color:var(--deck-card-title-color,var(--rik-text-default));letter-spacing:-0.01em;line-height:1.25;margin:0}::slotted(p){font-size:var(--rik-font-size-body);line-height:1.55;margin:0}::slotted(strong){color:var(--rik-text-default);font-weight:700}:host([center]){text-align:center;align-items:center}:host([compact]){padding:var(--rik-space-2) var(--rik-space-3)}`,c([d({type:String})],ue.prototype,"color",2),c([d({type:Boolean})],ue.prototype,"center",2),c([d({type:Boolean})],ue.prototype,"compact",2),ue=c([k("deck-card")],ue);var Xe=class extends g{render(){return m`<cite part="source" >${this.href?m`<a href=${this.href}><slot></slot></a>`:m`<slot></slot>`}</cite
|
|
721
|
+
>`}};Xe.styles=v`:host{display:block;margin-top:var(--deck-source-gap,var(--rik-space-2));color:var(--deck-source-color,var(--rik-text-default--faint));font-family:var(--rik-font-mono);font-size:var(--rik-font-size-xs);font-style:normal}a{color:inherit;text-underline-offset:0.18em}`,c([d({type:String})],Xe.prototype,"href",2),Xe=c([k("deck-source")],Xe);function br(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ee=br();function Oi(i){Ee=i}var Ri=/[&<>"']/,hs=new RegExp(Ri.source,"g"),ji=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,us=new RegExp(ji.source,"g"),ms={"&":"&","<":"<",">":">",'"':""","'":"'"},Pi=i=>ms[i];function W(i,t){if(t){if(Ri.test(i))return i.replace(hs,Pi)}else if(ji.test(i))return i.replace(us,Pi);return i}var fs=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function gs(i){return i.replace(fs,(t,e)=>(e=e.toLowerCase(),e==="colon"?":":e.charAt(0)==="#"?e.charAt(1)==="x"?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))}var vs=/(^|[^\[])\^/g;function S(i,t){let e=typeof i=="string"?i:i.source;t=t||"";let r={replace:(n,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(vs,"$1"),e=e.replace(n,o),r},getRegex:()=>new RegExp(e,t)};return r}function Mi(i){try{i=encodeURI(i).replace(/%25/g,"%")}catch{return null}return i}var pt={exec:()=>null};function Hi(i,t){let e=i.replace(/\|/g,(s,o,a)=>{let l=!1,p=o;for(;--p>=0&&a[p]==="\\";)l=!l;return l?"|":" |"}),r=e.split(/ \|/),n=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(/\\\|/g,"|");return r}function Bt(i,t,e){let r=i.length;if(r===0)return"";let n=0;for(;n<r;){let s=i.charAt(r-n-1);if(s===t&&!e)n++;else if(s!==t&&e)n++;else break}return i.slice(0,r-n)}function ks(i,t){if(i.indexOf(t[1])===-1)return-1;let e=0;for(let r=0;r<i.length;r++)if(i[r]==="\\")r++;else if(i[r]===t[0])e++;else if(i[r]===t[1]&&(e--,e<0))return r;return-1}function Ni(i,t,e,r){let n=t.href,s=t.title?W(t.title):null,o=i[1].replace(/\\([\[\]])/g,"$1");if(i[0].charAt(0)!=="!"){r.state.inLink=!0;let a={type:"link",raw:e,href:n,title:s,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,a}return{type:"image",raw:e,href:n,title:s,text:W(o)}}function bs(i,t){let e=i.match(/^(\s+)(?:```)/);if(e===null)return t;let r=e[1];return t.split(`
|
|
722
|
+
`).map(n=>{let s=n.match(/^\s+/);if(s===null)return n;let[o]=s;return o.length>=r.length?n.slice(r.length):n}).join(`
|
|
723
|
+
`)}var Ve=class{options;rules;lexer;constructor(t){this.options=t||Ee}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let r=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Bt(r,`
|
|
724
|
+
`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],n=bs(r,e[3]||"");return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(/#$/.test(r)){let n=Bt(r,"#");(this.options.pedantic||!n||/ $/.test(n))&&(r=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:e[0]}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let r=e[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
|
|
725
|
+
$1`);r=Bt(r.replace(/^ *>[ \t]?/gm,""),`
|
|
726
|
+
`);let n=this.lexer.state.top;this.lexer.state.top=!0;let s=this.lexer.blockTokens(r);return this.lexer.state.top=n,{type:"blockquote",raw:e[0],tokens:s,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),n=r.length>1,s={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let o=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),a="",l="",p=!1;for(;t;){let h=!1;if(!(e=o.exec(t))||this.rules.block.hr.test(t))break;a=e[0],t=t.substring(a.length);let u=e[2].split(`
|
|
727
|
+
`,1)[0].replace(/^\t+/,X=>" ".repeat(3*X.length)),f=t.split(`
|
|
728
|
+
`,1)[0],y=0;this.options.pedantic?(y=2,l=u.trimStart()):(y=e[2].search(/[^ ]/),y=y>4?1:y,l=u.slice(y),y+=e[1].length);let A=!1;if(!u&&/^ *$/.test(f)&&(a+=f+`
|
|
729
|
+
`,t=t.substring(f.length+1),h=!0),!h){let X=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),Ce=new RegExp(`^ {0,${Math.min(3,y-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),Pe=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:\`\`\`|~~~)`),ke=new RegExp(`^ {0,${Math.min(3,y-1)}}#`);for(;t;){let Q=t.split(`
|
|
730
|
+
`,1)[0];if(f=Q,this.options.pedantic&&(f=f.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),Pe.test(f)||ke.test(f)||X.test(f)||Ce.test(t))break;if(f.search(/[^ ]/)>=y||!f.trim())l+=`
|
|
731
|
+
`+f.slice(y);else{if(A||u.search(/[^ ]/)>=4||Pe.test(u)||ke.test(u)||Ce.test(u))break;l+=`
|
|
732
|
+
`+f}!A&&!f.trim()&&(A=!0),a+=Q+`
|
|
733
|
+
`,t=t.substring(Q.length+1),u=f.slice(y)}}s.loose||(p?s.loose=!0:/\n *\n *$/.test(a)&&(p=!0));let P=null,N;this.options.gfm&&(P=/^\[[ xX]\] /.exec(l),P&&(N=P[0]!=="[ ] ",l=l.replace(/^\[[ xX]\] +/,""))),s.items.push({type:"list_item",raw:a,task:!!P,checked:N,loose:!1,text:l,tokens:[]}),s.raw+=a}s.items[s.items.length-1].raw=a.trimEnd(),s.items[s.items.length-1].text=l.trimEnd(),s.raw=s.raw.trimEnd();for(let h=0;h<s.items.length;h++)if(this.lexer.state.top=!1,s.items[h].tokens=this.lexer.blockTokens(s.items[h].text,[]),!s.loose){let u=s.items[h].tokens.filter(y=>y.type==="space"),f=u.length>0&&u.some(y=>/\n.*\n/.test(y.raw));s.loose=f}if(s.loose)for(let h=0;h<s.items.length;h++)s.items[h].loose=!0;return s}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let r=e[1].toLowerCase().replace(/\s+/g," "),n=e[2]?e[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:e[0],href:n,title:s}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!/[:|]/.test(e[2]))return;let r=Hi(e[1]),n=e[2].replace(/^\||\| *$/g,"").split("|"),s=e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split(`
|
|
734
|
+
`):[],o={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===n.length){for(let a of n)/^ *-+: *$/.test(a)?o.align.push("right"):/^ *:-+: *$/.test(a)?o.align.push("center"):/^ *:-+ *$/.test(a)?o.align.push("left"):o.align.push(null);for(let a of r)o.header.push({text:a,tokens:this.lexer.inline(a)});for(let a of s)o.rows.push(Hi(a,o.header.length).map(l=>({text:l,tokens:this.lexer.inline(l)})));return o}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let r=e[1].charAt(e[1].length-1)===`
|
|
735
|
+
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:W(e[1])}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&/^<a /i.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let r=e[2].trim();if(!this.options.pedantic&&/^</.test(r)){if(!/>$/.test(r))return;let o=Bt(r.slice(0,-1),"\\");if((r.length-o.length)%2===0)return}else{let o=ks(e[2],"()");if(o>-1){let l=(e[0].indexOf("!")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let n=e[2],s="";if(this.options.pedantic){let o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);o&&(n=o[1],s=o[3])}else s=e[3]?e[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(this.options.pedantic&&!/>$/.test(r)?n=n.slice(1):n=n.slice(1,-1)),Ni(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let n=(r[2]||r[1]).replace(/\s+/g," "),s=e[n.toLowerCase()];if(!s){let o=r[0].charAt(0);return{type:"text",raw:o,text:o}}return Ni(r,s,r[0],this.lexer)}}emStrong(t,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!n||n[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(n[1]||n[2]||"")||!r||this.rules.inline.punctuation.exec(r)){let o=[...n[0]].length-1,a,l,p=o,h=0,u=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,e=e.slice(-1*t.length+o);(n=u.exec(e))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(l=[...a].length,n[3]||n[4]){p+=l;continue}else if((n[5]||n[6])&&o%3&&!((o+l)%3)){h+=l;continue}if(p-=l,p>0)continue;l=Math.min(l,l+p+h);let f=[...n[0]][0].length,y=t.slice(0,o+n.index+f+l);if(Math.min(o,l)%2){let P=y.slice(1,-1);return{type:"em",raw:y,text:P,tokens:this.lexer.inlineTokens(P)}}let A=y.slice(2,-2);return{type:"strong",raw:y,text:A,tokens:this.lexer.inlineTokens(A)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(/\n/g," "),n=/[^ ]/.test(r),s=/^ /.test(r)&&/ $/.test(r);return n&&s&&(r=r.substring(1,r.length-1)),r=W(r,!0),{type:"codespan",raw:e[0],text:r}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,n;return e[2]==="@"?(r=W(e[1]),n="mailto:"+r):(r=W(e[1]),n=r),{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let r,n;if(e[2]==="@")r=W(e[0]),n="mailto:"+r;else{let s;do s=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(s!==e[0]);r=W(e[0]),e[1]==="www."?n="http://"+e[0]:n=e[0]}return{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r;return this.lexer.state.inRawBlock?r=e[0]:r=W(e[0]),{type:"text",raw:e[0],text:r}}}},ys=/^(?: *(?:\n|$))+/,xs=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,ws=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ut=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,_s=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,qi=/(?:[*+-]|\d{1,9}[.)])/,Bi=S(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,qi).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),yr=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ss=/^[^\n]+/,xr=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Es=S(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",xr).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),$s=S(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,qi).getRegex(),Yt="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",wr=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,As=S("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",wr).replace("tag",Yt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ui=S(yr).replace("hr",ut).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Yt).getRegex(),Ts=S(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ui).getRegex(),_r={blockquote:Ts,code:xs,def:Es,fences:ws,heading:_s,hr:ut,html:As,lheading:Bi,list:$s,newline:ys,paragraph:Ui,table:pt,text:Ss},Ii=S("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ut).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Yt).getRegex(),zs={..._r,table:Ii,paragraph:S(yr).replace("hr",ut).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ii).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Yt).getRegex()},Ls={..._r,html:S(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",wr).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:pt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:S(yr).replace("hr",ut).replace("heading",` *#{1,6} *[^
|
|
736
|
+
]`).replace("lheading",Bi).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Wi=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Cs=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Yi=/^( {2,}|\\)\n(?!\s*$)/,Ps=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,mt="\\p{P}\\p{S}",Ms=S(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,mt).getRegex(),Hs=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,Ns=S(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,mt).getRegex(),Is=S("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,mt).getRegex(),Os=S("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,mt).getRegex(),Rs=S(/\\([punct])/,"gu").replace(/punct/g,mt).getRegex(),js=S(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),qs=S(wr).replace("(?:-->|$)","-->").getRegex(),Bs=S("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",qs).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Wt=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Us=S(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Wt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Fi=S(/^!?\[(label)\]\[(ref)\]/).replace("label",Wt).replace("ref",xr).getRegex(),Xi=S(/^!?\[(ref)\](?:\[\])?/).replace("ref",xr).getRegex(),Ws=S("reflink|nolink(?!\\()","g").replace("reflink",Fi).replace("nolink",Xi).getRegex(),Sr={_backpedal:pt,anyPunctuation:Rs,autolink:js,blockSkip:Hs,br:Yi,code:Cs,del:pt,emStrongLDelim:Ns,emStrongRDelimAst:Is,emStrongRDelimUnd:Os,escape:Wi,link:Us,nolink:Xi,punctuation:Ms,reflink:Fi,reflinkSearch:Ws,tag:Bs,text:Ps,url:pt},Ys={...Sr,link:S(/^!?\[(label)\]\((.*?)\)/).replace("label",Wt).getRegex(),reflink:S(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Wt).getRegex()},vr={...Sr,escape:S(Wi).replace("])","~|])").getRegex(),url:S(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Fs={...vr,br:S(Yi).replace("{2,}","*").getRegex(),text:S(vr.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ut={normal:_r,gfm:zs,pedantic:Ls},dt={normal:Sr,gfm:vr,breaks:Fs,pedantic:Ys},se=class i{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ee,this.options.tokenizer=this.options.tokenizer||new Ve,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={block:Ut.normal,inline:dt.normal};this.options.pedantic?(e.block=Ut.pedantic,e.inline=dt.pedantic):this.options.gfm&&(e.block=Ut.gfm,this.options.breaks?e.inline=dt.breaks:e.inline=dt.gfm),this.tokenizer.rules=e}static get rules(){return{block:Ut,inline:dt}}static lex(t,e){return new i(e).lex(t)}static lexInline(t,e){return new i(e).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
|
|
737
|
+
`),this.blockTokens(t,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let r=this.inlineQueue[e];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(a,l,p)=>l+" ".repeat(p.length));let r,n,s,o;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(r=a.call({lexer:this},t,e))?(t=t.substring(r.raw.length),e.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&e.length>0?e[e.length-1].raw+=`
|
|
738
|
+
`:e.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),n=e[e.length-1],n&&(n.type==="paragraph"||n.type==="text")?(n.raw+=`
|
|
739
|
+
`+r.raw,n.text+=`
|
|
740
|
+
`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text):e.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),n=e[e.length-1],n&&(n.type==="paragraph"||n.type==="text")?(n.raw+=`
|
|
741
|
+
`+r.raw,n.text+=`
|
|
742
|
+
`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),e.push(r);continue}if(s=t,this.options.extensions&&this.options.extensions.startBlock){let a=1/0,l=t.slice(1),p;this.options.extensions.startBlock.forEach(h=>{p=h.call({lexer:this},l),typeof p=="number"&&p>=0&&(a=Math.min(a,p))}),a<1/0&&a>=0&&(s=t.substring(0,a+1))}if(this.state.top&&(r=this.tokenizer.paragraph(s))){n=e[e.length-1],o&&n.type==="paragraph"?(n.raw+=`
|
|
743
|
+
`+r.raw,n.text+=`
|
|
744
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):e.push(r),o=s.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),n=e[e.length-1],n&&n.type==="text"?(n.raw+=`
|
|
745
|
+
`+r.raw,n.text+=`
|
|
746
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):e.push(r);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,n,s,o=t,a,l,p;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)h.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,a.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(l||(p=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(h=>(r=h.call({lexer:this},t,e))?(t=t.substring(r.raw.length),e.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),n=e[e.length-1],n&&r.type==="text"&&n.type==="text"?(n.raw+=r.raw,n.text+=r.text):e.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),n=e[e.length-1],n&&r.type==="text"&&n.type==="text"?(n.raw+=r.raw,n.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(t,o,p)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}if(s=t,this.options.extensions&&this.options.extensions.startInline){let h=1/0,u=t.slice(1),f;this.options.extensions.startInline.forEach(y=>{f=y.call({lexer:this},u),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(s=t.substring(0,h+1))}if(r=this.tokenizer.inlineText(s)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(p=r.raw.slice(-1)),l=!0,n=e[e.length-1],n&&n.type==="text"?(n.raw+=r.raw,n.text+=r.text):e.push(r);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return e}},Ke=class{options;constructor(t){this.options=t||Ee}code(t,e,r){let n=(e||"").match(/^\S*/)?.[0];return t=t.replace(/\n$/,"")+`
|
|
747
|
+
`,n?'<pre><code class="language-'+W(n)+'">'+(r?t:W(t,!0))+`</code></pre>
|
|
748
|
+
`:"<pre><code>"+(r?t:W(t,!0))+`</code></pre>
|
|
701
749
|
`}blockquote(t){return`<blockquote>
|
|
702
750
|
${t}</blockquote>
|
|
703
751
|
`}html(t,e){return t}heading(t,e,r){return`<h${e}>${t}</h${e}>
|
|
704
752
|
`}hr(){return`<hr>
|
|
705
|
-
`}list(t,e,r){let
|
|
706
|
-
`+t+"</"+
|
|
753
|
+
`}list(t,e,r){let n=e?"ol":"ul",s=e&&r!==1?' start="'+r+'"':"";return"<"+n+s+`>
|
|
754
|
+
`+t+"</"+n+`>
|
|
707
755
|
`}listitem(t,e,r){return`<li>${t}</li>
|
|
708
756
|
`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(t){return`<p>${t}</p>
|
|
709
757
|
`}table(t,e){return e&&(e=`<tbody>${e}</tbody>`),`<table>
|
|
@@ -713,55 +761,54 @@ ${t}</blockquote>
|
|
|
713
761
|
`}tablerow(t){return`<tr>
|
|
714
762
|
${t}</tr>
|
|
715
763
|
`}tablecell(t,e){let r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
|
|
716
|
-
`}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return"<br>"}del(t){return`<del>${t}</del>`}link(t,e,r){let
|
|
717
|
-
`+(o.tokens?this.parseInline(o.tokens):o.text);r+=e?this.renderer.paragraph(a):a;continue}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return r}parseInline(t,e){e=e||this.renderer;let r="";for(let
|
|
718
|
-
Please report this to https://github.com/markedjs/marked.`,t){let
|
|
719
|
-
`)){let
|
|
720
|
-
`:"")+r)}return e&&t.push(e),t}function
|
|
721
|
-
`),r=[],
|
|
722
|
-
`)),a,t)),r.push("",`<!--cards:${
|
|
723
|
-
`),blocks:
|
|
724
|
-
`),
|
|
725
|
-
`),{text:o,blocks:a}=Ii(s.trim(),{inline:h=>x.parseInline(h),block:h=>x.parse(h)}),l=x.parse(o);a.forEach((h,p)=>{l=l.replace(`<!--cards:${p}-->`,()=>h)}),this._html=l}render(){return m`<div class="content" .innerHTML="${this._html}"></div>`}};Ze.styles=v`:host{display:block;color:var(--rik-text-default--muted);font-family:var(--rik-font-sans)}h1,h2,h3,h4{color:var(--rik-text-default);font-weight:700;letter-spacing:-0.01em}h2{font-size:var(--rik-font-size-h2);margin-bottom:var(--rik-space-2)}h3{font-size:var(--rik-font-size-lead);margin-bottom:var(--rik-space-2);margin-top:var(--rik-space-3)}h4{font-size:var(--rik-font-size-body);margin-bottom:var(--rik-space-1);margin-top:var(--rik-space-3)}p{font-size:var(--rik-font-size-body);line-height:1.65;margin:0 0 var(--rik-space-3)}p:last-child{margin-bottom:0}strong{color:var(--rik-text-default);font-weight:700}em{font-style:italic}code{font-family:var(--rik-font-mono);font-size:var(--rik-font-size-mono-sm);background:var(--rik-surface-tint);padding:2px 6px;border-radius:var(--rik-radius-sm);color:var(--rik-text-default)}pre{background:var(--deck-md-pre-bg,var(--rik-code__bg));border:1px solid var(--deck-md-pre-border,var(--rik-code__border));border-radius:var(--rik-radius-md);padding:var(--rik-space-3) var(--rik-space-4);overflow:auto;font-family:var(--rik-font-mono);font-size:var(--rik-font-size-mono);line-height:1.75;color:var(--deck-md-pre-text,var(--rik-code__text));margin:0 0 var(--rik-space-3);box-shadow:var(--rik-elevation-2)}pre code{background:none;padding:0;color:inherit;border-radius:0}ul,ol{padding-left:1.4rem;margin:0 0 var(--rik-space-3)}li{margin-bottom:var(--rik-space-1);font-size:var(--rik-font-size-body);line-height:1.55}li::marker{color:var(--rik-accent)}a{color:var(--rik-accent);text-decoration:underline;text-decoration-thickness:1px}blockquote{border-left:3px solid var(--rik-accent);padding:var(--rik-space-1) var(--rik-space-3);color:var(--rik-text-default--faint);font-style:italic;margin:0 0 var(--rik-space-3)}hr{border:none;border-top:1px solid var(--rik-border-default);margin:var(--rik-space-4) 0}img{max-width:100%;height:auto;display:block;border-radius:var(--rik-radius-md);margin:0 0 var(--rik-space-3)}table{width:100%;border-collapse:collapse;font-size:var(--rik-font-size-body);margin:0 0 var(--rik-space-3)}th,td{border:1px solid var(--rik-border-default);padding:var(--rik-space-1) var(--rik-space-2);text-align:left;vertical-align:top}th{background:var(--rik-surface-tint);color:var(--rik-text-default);font-weight:700}.md-cards{display:grid;grid-template-columns:repeat(var(--cards-cols,2),minmax(0,1fr));gap:var(--cards-gap,var(--rik-space-3));margin:0 0 var(--rik-space-3)}.md-card{background:var(--rik-surface-raised--strong);border:1px solid var(--rik-border-default);border-radius:var(--rik-radius-lg);padding:var(--rik-space-3) var(--rik-space-4);container-type:inline-size;min-width:0}.md-card[data-tone="info"]{background:var(--rik-status-info__bg);border-color:var(--rik-status-info__border)}.md-card[data-tone="warn"]{background:var(--rik-status-warn__bg);border-color:var(--rik-status-warn__border)}.md-card[data-tone="ok"]{background:var(--rik-status-success__bg);border-color:var(--rik-status-success__border)}.md-card[data-tone="danger"]{background:var(--rik-status-danger__bg);border-color:var(--rik-status-danger__border)}.md-card h3{margin:0 0 var(--rik-space-2)}.md-card > :last-child{margin-bottom:0}.content{display:contents}`,c([j()],Ze.prototype,"_html",2),Ze=c([k("deck-md")],Ze);ir();var Oi=!1;async function Is(){Oi||(window.mermaid||await new Promise((n,t)=>{let e=document.createElement("script");e.src=new URL("./vendor/mermaid.min.js",import.meta.url).href,e.onload=()=>n(),e.onerror=()=>t(new Error("mermaid failed to load")),document.head.appendChild(e)}),window.mermaid.initialize({startOnLoad:!1,theme:"dark",themeVariables:{background:"#0f0f10",mainBkg:"#2a2a2a",nodeBorder:"#555",lineColor:"#777",textColor:"#e5e5e5",fontSize:"13px",edgeLabelBackground:"#111"},flowchart:{curve:"basis",htmlLabels:!0,padding:12},securityLevel:"strict"}),Oi=!0)}var Os=0,Ae=class extends g{constructor(){super(...arguments);this.rendered=!1;this._svg="";this._source="";this._renderPromise=null}get renderedSvg(){return this._svg}get whenRendered(){return this._renderPromise??Promise.resolve()}connectedCallback(){super.connectedCallback(),this._source=(this.textContent??"").trim();let e=this._source.split(`
|
|
726
|
-
`),r=e.filter(i=>i.trim()).reduce((i,s)=>Math.min(i,s.match(/^ */)?.[0].length??0),1/0);r<1/0&&(this._source=e.map(i=>i.slice(r)).join(`
|
|
727
|
-
`)),this._renderPromise=this._render()}async _render(){if(!this._source)return;await Is();let e=`mmd-${++Os}`;try{let{svg:r}=await window.mermaid.render(e,this._source);this._svg=r,this.rendered=!0}catch(r){console.error("Mermaid render error",r);let i=r instanceof Error?r.message:String(r);this._svg=`<pre style="color:#f87171">${Pt(i)}</pre>`}}render(){return m`<div class="canvas" .innerHTML="${this._svg}"></div>`}};Ae.styles=v`:host{display:flex;align-items:center;justify-content:center;background:var(--deck-mermaid-bg,var(--rik-code__bg));border:1px solid var(--deck-mermaid-border,var(--rik-code__border));border-radius:var(--deck-mermaid-radius,var(--rik-radius-md));padding:var(--deck-mermaid-padding,var(--rik-space-4));box-shadow:var(--rik-elevation-2);overflow:hidden;min-width:0}:host([compact]){padding:var(--rik-space-2)}/* The canvas takes the host's content box so the diagram can be capped against the room it actually has. Capping the SVG at 60cqh alone measures the slide,not this box:a diagram beside a two-line title then drew taller than the space left for it and the box clipped,which \`rikiki check\` reports in pixels. */
|
|
728
|
-
.canvas {
|
|
729
|
-
width: 100%; max-width: 100%; height: 100%; min-height: 0;
|
|
730
|
-
display: flex; align-items: center; justify-content: center;
|
|
731
|
-
text-align: center; overflow: hidden;
|
|
732
|
-
}
|
|
733
|
-
.canvas svg {
|
|
734
|
-
width: 100% !important; height: auto !important; max-width: 100% !important;
|
|
735
|
-
max-height: min(60cqh, 100%) !important;
|
|
736
|
-
}
|
|
737
|
-
:host([compact]) .canvas { max-width: 60%; }
|
|
738
|
-
:host([compact]) .canvas svg { max-height: 22cqh; }
|
|
739
|
-
`,c([d({type:Boolean,reflect:!0})],Ae.prototype,"rendered",2),c([j()],Ae.prototype,"_svg",2),Ae=c([k("deck-mermaid")],Ae);var Rs={yellow:"var(--rik-accent__text)",orange:"var(--rik-status-warn__text)",green:"var(--rik-status-success__text)",red:"var(--rik-status-danger__text)",purple:"var(--rik-decor-orchid__text)",lime:"var(--rik-decor-lime__text)",cyan:"var(--rik-decor-canary__text)"},he=class extends g{constructor(){super(...arguments);this.compact=!1}updated(){this.tone?this.style.setProperty("--_c",Rs[this.tone]??this.tone):this.style.removeProperty("--_c")}render(){return m`${this.num?m`<div class="num" part="num">${this.num}</div>`:""}
|
|
764
|
+
`}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return"<br>"}del(t){return`<del>${t}</del>`}link(t,e,r){let n=Mi(t);if(n===null)return r;t=n;let s='<a href="'+t+'"';return e&&(s+=' title="'+e+'"'),s+=">"+r+"</a>",s}image(t,e,r){let n=Mi(t);if(n===null)return r;t=n;let s=`<img src="${t}" alt="${r}"`;return e&&(s+=` title="${e}"`),s+=">",s}text(t){return t}},ht=class{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,e,r){return""+r}image(t,e,r){return""+r}br(){return""}},oe=class i{options;renderer;textRenderer;constructor(t){this.options=t||Ee,this.options.renderer=this.options.renderer||new Ke,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ht}static parse(t,e){return new i(e).parse(t)}static parseInline(t,e){return new i(e).parseInline(t)}parse(t,e=!0){let r="";for(let n=0;n<t.length;n++){let s=t[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){let o=s,a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(o.type)){r+=a||"";continue}}switch(s.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{let o=s;r+=this.renderer.heading(this.parseInline(o.tokens),o.depth,gs(this.parseInline(o.tokens,this.textRenderer)));continue}case"code":{let o=s;r+=this.renderer.code(o.text,o.lang,!!o.escaped);continue}case"table":{let o=s,a="",l="";for(let h=0;h<o.header.length;h++)l+=this.renderer.tablecell(this.parseInline(o.header[h].tokens),{header:!0,align:o.align[h]});a+=this.renderer.tablerow(l);let p="";for(let h=0;h<o.rows.length;h++){let u=o.rows[h];l="";for(let f=0;f<u.length;f++)l+=this.renderer.tablecell(this.parseInline(u[f].tokens),{header:!1,align:o.align[f]});p+=this.renderer.tablerow(l)}r+=this.renderer.table(a,p);continue}case"blockquote":{let o=s,a=this.parse(o.tokens);r+=this.renderer.blockquote(a);continue}case"list":{let o=s,a=o.ordered,l=o.start,p=o.loose,h="";for(let u=0;u<o.items.length;u++){let f=o.items[u],y=f.checked,A=f.task,P="";if(f.task){let N=this.renderer.checkbox(!!y);p?f.tokens.length>0&&f.tokens[0].type==="paragraph"?(f.tokens[0].text=N+" "+f.tokens[0].text,f.tokens[0].tokens&&f.tokens[0].tokens.length>0&&f.tokens[0].tokens[0].type==="text"&&(f.tokens[0].tokens[0].text=N+" "+f.tokens[0].tokens[0].text)):f.tokens.unshift({type:"text",text:N+" "}):P+=N+" "}P+=this.parse(f.tokens,p),h+=this.renderer.listitem(P,A,!!y)}r+=this.renderer.list(h,a,l);continue}case"html":{let o=s;r+=this.renderer.html(o.text,o.block);continue}case"paragraph":{let o=s;r+=this.renderer.paragraph(this.parseInline(o.tokens));continue}case"text":{let o=s,a=o.tokens?this.parseInline(o.tokens):o.text;for(;n+1<t.length&&t[n+1].type==="text";)o=t[++n],a+=`
|
|
765
|
+
`+(o.tokens?this.parseInline(o.tokens):o.text);r+=e?this.renderer.paragraph(a):a;continue}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return r}parseInline(t,e){e=e||this.renderer;let r="";for(let n=0;n<t.length;n++){let s=t[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){let o=this.options.extensions.renderers[s.type].call({parser:this},s);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){r+=o||"";continue}}switch(s.type){case"escape":{let o=s;r+=e.text(o.text);break}case"html":{let o=s;r+=e.html(o.text);break}case"link":{let o=s;r+=e.link(o.href,o.title,this.parseInline(o.tokens,e));break}case"image":{let o=s;r+=e.image(o.href,o.title,o.text);break}case"strong":{let o=s;r+=e.strong(this.parseInline(o.tokens,e));break}case"em":{let o=s;r+=e.em(this.parseInline(o.tokens,e));break}case"codespan":{let o=s;r+=e.codespan(o.text);break}case"br":{r+=e.br();break}case"del":{let o=s;r+=e.del(this.parseInline(o.tokens,e));break}case"text":{let o=s;r+=e.text(o.text);break}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return r}},Ze=class{options;constructor(t){this.options=t||Ee}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}},kr=class{defaults=br();options=this.setOptions;parse=this.#e(se.lex,oe.parse);parseInline=this.#e(se.lexInline,oe.parseInline);Parser=oe;Renderer=Ke;TextRenderer=ht;Lexer=se;Tokenizer=Ve;Hooks=Ze;constructor(...t){this.use(...t)}walkTokens(t,e){let r=[];for(let n of t)switch(r=r.concat(e.call(this,n)),n.type){case"table":{let s=n;for(let o of s.header)r=r.concat(this.walkTokens(o.tokens,e));for(let o of s.rows)for(let a of o)r=r.concat(this.walkTokens(a.tokens,e));break}case"list":{let s=n;r=r.concat(this.walkTokens(s.items,e));break}default:{let s=n;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(o=>{let a=s[o].flat(1/0);r=r.concat(this.walkTokens(a,e))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let o=e.renderers[s.name];o?e.renderers[s.name]=function(...a){let l=s.renderer.apply(this,a);return l===!1&&(l=o.apply(this,a)),l}:e.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=e[s.level];o?o.unshift(s.tokenizer):e[s.level]=[s.tokenizer],s.start&&(s.level==="block"?e.startBlock?e.startBlock.push(s.start):e.startBlock=[s.start]:s.level==="inline"&&(e.startInline?e.startInline.push(s.start):e.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(e.childTokens[s.name]=s.childTokens)}),n.extensions=e),r.renderer){let s=this.defaults.renderer||new Ke(this.defaults);for(let o in r.renderer){if(!(o in s))throw new Error(`renderer '${o}' does not exist`);if(o==="options")continue;let a=o,l=r.renderer[a],p=s[a];s[a]=(...h)=>{let u=l.apply(s,h);return u===!1&&(u=p.apply(s,h)),u||""}}n.renderer=s}if(r.tokenizer){let s=this.defaults.tokenizer||new Ve(this.defaults);for(let o in r.tokenizer){if(!(o in s))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let a=o,l=r.tokenizer[a],p=s[a];s[a]=(...h)=>{let u=l.apply(s,h);return u===!1&&(u=p.apply(s,h)),u}}n.tokenizer=s}if(r.hooks){let s=this.defaults.hooks||new Ze;for(let o in r.hooks){if(!(o in s))throw new Error(`hook '${o}' does not exist`);if(o==="options")continue;let a=o,l=r.hooks[a],p=s[a];Ze.passThroughHooks.has(o)?s[a]=h=>{if(this.defaults.async)return Promise.resolve(l.call(s,h)).then(f=>p.call(s,f));let u=l.call(s,h);return p.call(s,u)}:s[a]=(...h)=>{let u=l.apply(s,h);return u===!1&&(u=p.apply(s,h)),u}}n.hooks=s}if(r.walkTokens){let s=this.defaults.walkTokens,o=r.walkTokens;n.walkTokens=function(a){let l=[];return l.push(o.call(this,a)),s&&(l=l.concat(s.call(this,a))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return se.lex(t,e??this.defaults)}parser(t,e){return oe.parse(t,e??this.defaults)}#e(t,e){return(r,n)=>{let s={...n},o={...this.defaults,...s};this.defaults.async===!0&&s.async===!1&&(o.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),o.async=!0);let a=this.#t(!!o.silent,!!o.async);if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o),o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(r):r).then(l=>t(l,o)).then(l=>o.hooks?o.hooks.processAllTokens(l):l).then(l=>o.walkTokens?Promise.all(this.walkTokens(l,o.walkTokens)).then(()=>l):l).then(l=>e(l,o)).then(l=>o.hooks?o.hooks.postprocess(l):l).catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));let l=t(r,o);o.hooks&&(l=o.hooks.processAllTokens(l)),o.walkTokens&&this.walkTokens(l,o.walkTokens);let p=e(l,o);return o.hooks&&(p=o.hooks.postprocess(p)),p}catch(l){return a(l)}}}#t(t,e){return r=>{if(r.message+=`
|
|
766
|
+
Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+W(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},Se=new kr;function w(i,t){return Se.parse(i,t)}w.options=w.setOptions=function(i){return Se.setOptions(i),w.defaults=Se.defaults,Oi(w.defaults),w};w.getDefaults=br;w.defaults=Ee;w.use=function(...i){return Se.use(...i),w.defaults=Se.defaults,Oi(w.defaults),w};w.walkTokens=function(i,t){return Se.walkTokens(i,t)};w.parseInline=Se.parseInline;w.Parser=oe;w.parser=oe.parse;w.Renderer=Ke;w.TextRenderer=ht;w.Lexer=se;w.lexer=se.lex;w.Tokenizer=Ve;w.Hooks=Ze;w.parse=w;var ic=w.options,nc=w.setOptions,sc=w.use,oc=w.walkTokens,ac=w.parseInline;var lc=oe.parse,cc=se.lex;var Xs=new Set(["info","warn","ok","danger"]),Zs=/^\d+(x\d+)?$/;function Vs(i){let t={};for(let e of i.trim().split(/\s+/).filter(Boolean)){let[r,n]=e.split("="),s=parseInt(n??"",10);r==="cols"&&s>=1&&(t.cols=s),r==="gap"&&s>=1&&s<=6&&(t.gap=s)}return t}function Ks(i){let t=[],e=null;for(let r of i.split(`
|
|
767
|
+
`)){let n=r.match(/^::\s?(.*)$/);n?(e&&t.push(e),e=Gs(n[1])):e&&(e.body+=(e.body?`
|
|
768
|
+
`:"")+r)}return e&&t.push(e),t}function Gs(i){let t=i.indexOf("|");if(t<0)return{title:i.trim(),body:""};let e={title:i.slice(t+1).trim(),body:""};for(let r of i.slice(0,t).trim().split(/\s+/).filter(Boolean))Zs.test(r)?e.span=r:Xs.has(r)&&(e.tone=r);return e}function Js(i,t){let e=i.tone?` data-tone="${i.tone}"`:"",r="";if(i.span){let{col:o,row:a}=Fe(i.span);r=` style="grid-column:${o};grid-row:${a}"`}let n=i.title?`<h3>${t.inline(i.title)}</h3>`:"",s=i.body.trim()?t.block(i.body.trim()):"";return`<div class="md-card"${e}${r}>${n}${s}</div>`}function Qs(i,t,e){let r=t.cols??i.length,n=t.gap??3,s=i.map(o=>Js(o,e)).join("");return`<div class="md-cards" style="--cards-cols:${r};--cards-gap:var(--rik-space-${n})">${s}</div>`}function Zi(i,t){let e=i.split(`
|
|
769
|
+
`),r=[],n=[],s=0;for(;s<e.length;){let o=e[s].match(/^:::\s*cards\b(.*)$/);if(!o){r.push(e[s]),s++;continue}let a=Vs(o[1]),l=[];for(s++;s<e.length&&!/^:::\s*$/.test(e[s]);)l.push(e[s]),s++;s++,n.push(Qs(Ks(l.join(`
|
|
770
|
+
`)),a,t)),r.push("",`<!--cards:${n.length-1}-->`,"")}return{text:r.join(`
|
|
771
|
+
`),blocks:n}}w.setOptions({gfm:!0,breaks:!1});var Ge=class extends g{constructor(){super(...arguments);this._html=""}connectedCallback(){super.connectedCallback(),this._parse()}reparse(){this._parse()}_parse(){let e=this.textContent??"",r=e.split(`
|
|
772
|
+
`),n=r.filter(p=>p.trim().length>0).reduce((p,h)=>Math.min(p,h.match(/^ */)?.[0].length??0),1/0),s=n===1/0?e:r.map(p=>p.slice(n)).join(`
|
|
773
|
+
`),{text:o,blocks:a}=Zi(s.trim(),{inline:p=>w.parseInline(p),block:p=>w.parse(p)}),l=w.parse(o);a.forEach((p,h)=>{l=l.replace(`<!--cards:${h}-->`,()=>p)}),this._html=l}render(){return m`<div class="content" .innerHTML="${this._html}"></div>`}};Ge.styles=v`:host{display:block;color:var(--rik-text-default--muted);font-family:var(--rik-font-sans)}h1,h2,h3,h4{color:var(--rik-text-default);font-weight:700;letter-spacing:-0.01em}h2{font-size:var(--rik-font-size-h2);margin-bottom:var(--rik-space-2)}h3{font-size:var(--rik-font-size-lead);margin-bottom:var(--rik-space-2);margin-top:var(--rik-space-3)}h4{font-size:var(--rik-font-size-body);margin-bottom:var(--rik-space-1);margin-top:var(--rik-space-3)}p{font-size:var(--rik-font-size-body);line-height:1.65;margin:0 0 var(--rik-space-3)}p:last-child{margin-bottom:0}strong{color:var(--rik-text-default);font-weight:700}em{font-style:italic}code{font-family:var(--rik-font-mono);font-size:var(--rik-font-size-mono-sm);background:var(--rik-surface-tint);padding:2px 6px;border-radius:var(--rik-radius-sm);color:var(--rik-text-default)}pre{background:var(--deck-md-pre-bg,var(--rik-code__bg));border:1px solid var(--deck-md-pre-border,var(--rik-code__border));border-radius:var(--rik-radius-md);padding:var(--rik-space-3) var(--rik-space-4);overflow:auto;font-family:var(--rik-font-mono);font-size:var(--rik-font-size-mono);line-height:1.75;color:var(--deck-md-pre-text,var(--rik-code__text));margin:0 0 var(--rik-space-3);box-shadow:var(--rik-elevation-2)}pre code{background:none;padding:0;color:inherit;border-radius:0}ul,ol{padding-left:1.4rem;margin:0 0 var(--rik-space-3)}li{margin-bottom:var(--rik-space-1);font-size:var(--rik-font-size-body);line-height:1.55}li::marker{color:var(--rik-accent)}a{color:var(--rik-accent);text-decoration:underline;text-decoration-thickness:1px}blockquote{border-left:3px solid var(--rik-accent);padding:var(--rik-space-1) var(--rik-space-3);color:var(--rik-text-default--faint);font-style:italic;margin:0 0 var(--rik-space-3)}hr{border:none;border-top:1px solid var(--rik-border-default);margin:var(--rik-space-4) 0}img{max-width:100%;height:auto;display:block;border-radius:var(--rik-radius-md);margin:0 0 var(--rik-space-3)}table{width:100%;border-collapse:collapse;font-size:var(--rik-font-size-body);margin:0 0 var(--rik-space-3)}th,td{border:1px solid var(--rik-border-default);padding:var(--rik-space-1) var(--rik-space-2);text-align:left;vertical-align:top}th{background:var(--rik-surface-tint);color:var(--rik-text-default);font-weight:700}.md-cards{display:grid;grid-template-columns:repeat(var(--cards-cols,2),minmax(0,1fr));gap:var(--cards-gap,var(--rik-space-3));margin:0 0 var(--rik-space-3)}.md-card{background:var(--rik-surface-raised--strong);border:1px solid var(--rik-border-default);border-radius:var(--rik-radius-lg);padding:var(--rik-space-3) var(--rik-space-4);container-type:inline-size;min-width:0}.md-card[data-tone="info"]{background:var(--rik-status-info__bg);border-color:var(--rik-status-info__border)}.md-card[data-tone="warn"]{background:var(--rik-status-warn__bg);border-color:var(--rik-status-warn__border)}.md-card[data-tone="ok"]{background:var(--rik-status-success__bg);border-color:var(--rik-status-success__border)}.md-card[data-tone="danger"]{background:var(--rik-status-danger__bg);border-color:var(--rik-status-danger__border)}.md-card h3{margin:0 0 var(--rik-space-2)}.md-card > :last-child{margin-bottom:0}.content{display:contents}`,c([j()],Ge.prototype,"_html",2),Ge=c([k("deck-md")],Ge);var Vi={info:'<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>',warn:'<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/>',danger:'<circle cx="12" cy="12" r="10"/><path d="M12 8v4"/><path d="M12 16h.01"/>',ok:'<path d="M20 6 9 17l-5-5"/>'},$e=class extends g{constructor(){super(...arguments);this.onDark=!1}render(){let e=this.type??"info",r=Vi[e]??Vi.info;return m`<div class="icon-box"> <svg viewBox="0 0 24 24" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" .innerHTML="${r}"></svg> </div> <div class="content"><slot></slot></div>`}};$e.styles=v`:host{display:flex;gap:var(--rik-space-3);padding:var(--deck-callout-padding-y,var(--rik-space-3)) var(--deck-callout-padding-x,var(--rik-space-4));border-radius:var(--deck-callout-radius,var(--rik-radius-md));background:var(--deck-callout-bg,var(--rik-status-info__bg--mid));border:1px solid var(--deck-callout-border,var(--rik-status-info__border));box-shadow:var(--rik-elevation-2);align-items:center;color:var(--deck-callout-color,var(--rik-text-default--muted));font-family:var(--rik-font-sans);font-size:var(--rik-font-size-body);line-height:1.55}:host([type="info"]){--deck-callout-bg:var(--rik-status-info__bg--mid);--deck-callout-border:var(--rik-status-info__border);--deck-callout-stroke:var(--rik-accent)}:host([type="warn"]){--deck-callout-bg:var(--rik-status-warn__bg);--deck-callout-border:var(--rik-status-warn__border);--deck-callout-stroke:var(--rik-status-warn)}:host([type="danger"]){--deck-callout-bg:var(--rik-status-danger__bg);--deck-callout-border:var(--rik-status-danger__border);--deck-callout-stroke:var(--rik-status-danger)}:host([type="ok"]){--deck-callout-bg:var(--rik-status-success__bg);--deck-callout-border:var(--rik-status-success__border);--deck-callout-stroke:var(--rik-status-success)}:host([on-dark]){--deck-callout-bg:var(--rik-surface-inverse--soft-2);--deck-callout-border:var(--rik-border-inverse);--deck-callout-color:var(--rik-text-inverse--muted);--deck-callout-strong-color:var(--rik-text-inverse);--deck-callout-code-bg:var(--rik-surface-inverse__overlay);box-shadow:none}:host([on-dark]) .icon-box{background:var(--rik-surface-inverse__overlay)}.icon-box{flex-shrink:0;width:var(--rik-icon-2xl);height:var(--rik-icon-2xl);display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:var(--rik-surface-tint)}.icon-box svg{width:var(--rik-icon-lg);height:var(--rik-icon-lg);stroke:var(--deck-callout-stroke,var(--rik-accent));stroke-width:2.2}.content{flex:1}::slotted(p){margin:0}::slotted(strong){color:var(--deck-callout-strong-color,var(--rik-text-default));font-weight:700}::slotted(code){font-family:var(--rik-font-mono);font-size:var(--rik-font-size-mono-sm);background:var(--deck-callout-code-bg,var(--rik-surface-tint));padding:2px 6px;border-radius:var(--rik-radius-sm);color:var(--deck-callout-strong-color,var(--rik-text-default))}`,c([d({type:String})],$e.prototype,"type",2),c([d({type:Boolean,reflect:!0,attribute:"on-dark"})],$e.prototype,"onDark",2),$e=c([k("deck-callout")],$e);function Ds(i,t,e,r=.5){if(t<=i)return i;if(e(t))return t;let n=i,s=t;for(;s-n>r;){let o=(n+s)/2;e(o)?n=o:s=o}return n}var me=class{constructor(t,e={}){this.host=t;this.opts=e;t.addController(this)}hostConnected(){this.ro=new ResizeObserver(()=>this.refit()),this.ro.observe(this.host),this.refit(),document.fonts?.ready?.then(()=>{this.ro&&this.refit()})}hostDisconnected(){this.ro?.disconnect(),this.ro=void 0}refit(){let t=this.host;if(this.opts.enabled&&!this.opts.enabled()){t.style.removeProperty("font-size");return}if(t.clientWidth===0||t.clientHeight===0)return;let e=parseFloat(getComputedStyle(document.documentElement).fontSize)||16,r=(this.opts.minRem?.()??1)*e,n=(this.opts.maxRem?.()??12)*e,s=o=>(t.style.fontSize=`${o}px`,t.scrollWidth<=t.clientWidth&&t.scrollHeight<=t.clientHeight);t.style.fontSize=`${Ds(r,n,s)}px`}};var Ae=class extends g{constructor(){super(...arguments);this.fitter=new me(this,{minRem:()=>this.min??1,maxRem:()=>this.max??12})}updated(){this.fitter.refit()}render(){return m`<slot></slot>`}};Ae.styles=v`:host{display:block;width:100%;height:100%;overflow:hidden}`,c([d({type:Number})],Ae.prototype,"min",2),c([d({type:Number})],Ae.prototype,"max",2),Ae=c([k("deck-fit")],Ae);var Je=class extends g{render(){return m`<slot></slot>`}};Je.styles=v`:host{display:inline-block;padding:var(--deck-badge-padding-y,var(--rik-space-1)) var(--deck-badge-padding-x,var(--rik-space-3));margin-bottom:var(--rik-space-2);font:700 var(--rik-font-size-xs)/1.2 var(--rik-font-sans);letter-spacing:0.1em;text-transform:uppercase;border-radius:var(--deck-badge-radius,var(--rik-radius-pill));background:var(--deck-badge-bg,var(--rik-surface-tint));color:var(--deck-badge-fg,var(--rik-text-default--faint));border:1px solid var(--deck-badge-border,var(--rik-border-default))}:host([type="bad"]){--deck-badge-bg:var(--rik-status-danger__bg);--deck-badge-fg:var(--rik-status-danger);--deck-badge-border:var(--rik-status-danger__border)}:host([type="ok"]){--deck-badge-bg:var(--rik-status-success__bg);--deck-badge-fg:var(--rik-status-success);--deck-badge-border:var(--rik-status-success__border)}:host([type="info"]){--deck-badge-bg:var(--rik-status-info__bg--strong);--deck-badge-fg:var(--rik-status-info__text);--deck-badge-border:var(--rik-status-info__border)}:host([type="warn"]){--deck-badge-bg:var(--rik-status-warn__bg);--deck-badge-fg:var(--rik-status-warn);--deck-badge-border:var(--rik-status-warn__border)}`,c([d({type:String})],Je.prototype,"type",2),Je=c([k("deck-badge")],Je);var Er=class extends g{static{this.styles=v`:host{display:block;font:700 var(--deck-kicker-font-size,var(--rik-font-size-xs))/1.2 var(--rik-font-sans);letter-spacing:var(--deck-kicker-tracking,0.14em);text-transform:uppercase;color:var(--deck-kicker-color,var(--rik-text-default--faint));margin-bottom:var(--deck-kicker-margin,var(--rik-space-2))}:host([on-dark]){color:var(--deck-kicker-on-dark-color,var(--rik-text-inverse--faint))}`}render(){return m`<slot></slot>`}};customElements.define("deck-kicker",Er);var Ki={warn:"var(--rik-status-warn__text)",danger:"var(--rik-status-danger__text)",ok:"var(--rik-status-success__text)",info:"var(--rik-accent__text)",muted:"var(--rik-text-default--faint)",accent:"var(--rik-accent__text)"},Gi={lead:"var(--rik-font-size-lead)",big:"var(--rik-font-size-big)",mega:"var(--rik-font-size-mega)",stat:"var(--rik-font-size-stat)",display:"clamp(2.6rem, 6cqw, 5rem)"},F=class extends g{constructor(){super(...arguments);this.fit=!1;this.fitter=new me(this,{enabled:()=>this.fit,minRem:()=>this.fitMin??1,maxRem:()=>this.fitMax??12})}updated(){this.fitter.refit(),this.tone&&Ki[this.tone]?this.style.setProperty("--_color",Ki[this.tone]):this.style.removeProperty("--_color"),this.size&&Gi[this.size]?this.style.setProperty("--_size",Gi[this.size]):this.style.removeProperty("--_size")}render(){return m`<slot></slot>`}};F.styles=v`:host{display:block;margin:0;font-family:var(--rik-font-display,var(--rik-font-sans));font-weight:900;line-height:1.1;letter-spacing:-0.02em;font-size:var(--deck-punch-size,var(--_size,var(--rik-font-size-lead)));color:var(--deck-punch-color,var(--_color,inherit))}:host([weight="700"]){font-weight:700}:host([weight="800"]){font-weight:800}:host([align="center"]){text-align:center}:host([align="right"]){text-align:right}:host([fit]){display:block;width:100%;height:100%;overflow:hidden}`,c([d({type:String})],F.prototype,"tone",2),c([d({type:String})],F.prototype,"size",2),c([d({type:String,reflect:!0})],F.prototype,"weight",2),c([d({type:String,reflect:!0})],F.prototype,"align",2),c([d({type:Boolean})],F.prototype,"fit",2),c([d({type:Number,attribute:"fit-min"})],F.prototype,"fitMin",2),c([d({type:Number,attribute:"fit-max"})],F.prototype,"fitMax",2),F=c([k("deck-punch")],F);var eo={yellow:"var(--rik-accent__text)",orange:"var(--rik-status-warn__text)",green:"var(--rik-status-success__text)",red:"var(--rik-status-danger__text)",purple:"var(--rik-decor-orchid__text)",lime:"var(--rik-decor-lime__text)",cyan:"var(--rik-decor-canary__text)"},fe=class extends g{constructor(){super(...arguments);this.compact=!1}updated(){this.tone?this.style.setProperty("--_c",eo[this.tone]??this.tone):this.style.removeProperty("--_c")}render(){return m`${this.num?m`<div class="num" part="num">${this.num}</div>`:""}
|
|
740
774
|
<slot name="claim"></slot>
|
|
741
775
|
<div class="body" part="body"><slot></slot></div>
|
|
742
|
-
`}};
|
|
776
|
+
`}};fe.styles=v`:host{display:flex;flex-direction:column;gap:var(--deck-stat-gap,var(--rik-space-2));padding:var(--deck-stat-padding-y,var(--rik-space-4)) var(--deck-stat-padding-x,var(--rik-space-3));border-left:var(--deck-stat-border-width,4px) solid var(--_c,var(--deck-stat-color,var(--rik-accent)));min-width:0;font-family:var(--rik-font-sans)}.num{font-family:var(--rik-font-display,var(--rik-font-sans));font-size:var(--deck-stat-num-size,clamp(3.5rem,7cqw,6rem));font-weight:var(--deck-stat-num-weight,900);line-height:0.9;color:var(--_c,var(--deck-stat-color,var(--rik-accent)));letter-spacing:-0.04em}::slotted([slot="claim"]){font-family:var(--rik-font-display,var(--rik-font-sans));font-size:var(--rik-font-size-strong);font-weight:800;color:var(--deck-stat-claim-color,var(--rik-text-default));line-height:1.1;letter-spacing:-0.02em;margin:0}.body{font-size:var(--rik-font-size-body);color:var(--deck-stat-body-color,var(--rik-text-default--faint));line-height:1.45;margin-top:var(--rik-space-2)}::slotted(strong){color:var(--rik-text-default);font-weight:700}::slotted(code){font-family:var(--rik-font-mono);font-size:var(--rik-font-size-mono-sm);background:var(--rik-surface-tint);color:var(--rik-text-default);padding:2px 6px;border-radius:var(--rik-radius-sm)}:host([compact]){--deck-stat-num-size:var(--rik-font-size-big);gap:var(--rik-space-1)}`,c([d({type:String})],fe.prototype,"num",2),c([d({type:String})],fe.prototype,"tone",2),c([d({type:Boolean,reflect:!0})],fe.prototype,"compact",2),fe=c([k("deck-stat")],fe);var ft=class extends g{render(){return m`<slot></slot>`}};ft.styles=v`:host{display:flex;flex-direction:column;gap:var(--rik-space-2)}`,ft=c([k("deck-metric-list")],ft);var ge=class extends g{constructor(){super(...arguments);this.mono=!1}render(){return m`<span class="label ${this.mono?"mono":""}"><slot></slot></span> <span class="value" data-severity="${this.severity??""}">${this.value}</span>`}};ge.styles=v`:host{display:flex;justify-content:space-between;align-items:center;background:var(--deck-metric-bg,var(--rik-surface-raised--strong));border:1px solid var(--deck-metric-border,var(--rik-border-default));border-radius:var(--deck-metric-radius,var(--rik-radius-md));padding:var(--deck-metric-padding-y,var(--rik-space-2)) var(--deck-metric-padding-x,var(--rik-space-4));font-family:var(--rik-font-sans);font-size:var(--rik-font-size-body);color:var(--deck-metric-text,var(--rik-text-default--muted));box-shadow:var(--deck-metric-shadow,var(--rik-elevation-2))}.label{font-family:inherit}.label.mono{font-family:var(--rik-font-mono);font-size:var(--rik-font-size-sm);color:var(--deck-metric-label-color,var(--rik-text-default--faint))}.value{font-weight:700}.value[data-severity="bad"]{color:var(--deck-metric-value-bad,var(--rik-status-danger))}.value[data-severity="warn"]{color:var(--deck-metric-value-warn,var(--rik-status-warn))}.value[data-severity="ok"]{color:var(--deck-metric-value-ok,var(--rik-status-success))}.value[data-severity="info"]{color:var(--deck-metric-value-info,var(--rik-status-info__text))}`,c([d({type:String})],ge.prototype,"value",2),c([d({type:String})],ge.prototype,"severity",2),c([d({type:Boolean})],ge.prototype,"mono",2),ge=c([k("deck-metric")],ge);var gt=class extends g{render(){return m`<slot></slot>`}};gt.styles=v`:host{display:flex;flex-direction:column;gap:var(--rik-space-2xs)}`,gt=c([k("deck-tier-list")],gt);var ae=class extends g{constructor(){super(...arguments);this.hot=!1}render(){return m`<div class="head"> <span class="name">${this.name}</span> <span class="speed" data-severity="${this.severity??(this.hot?"hot":"")}">${this.speed}</span> </div> <div class="desc"><slot></slot></div>`}};ae.styles=v`:host{display:flex;flex-direction:column;gap:var(--rik-space-hair);background:var(--deck-tier-bg,var(--rik-surface-raised--strong));border:1px solid var(--deck-tier-border,var(--rik-border-default));border-radius:var(--deck-tier-radius,var(--rik-radius-md));padding:var(--deck-tier-padding-y,var(--rik-space-2)) var(--deck-tier-padding-x,var(--rik-space-4));box-shadow:var(--deck-tier-shadow,var(--rik-elevation-2));font-family:var(--rik-font-sans)}:host([hot]){border-color:var(--deck-tier-hot-border,var(--rik-status-info__border));background:var(--deck-tier-hot-bg,var(--rik-status-info__bg))}.head{display:flex;justify-content:space-between;align-items:baseline}.name{font:700 var(--rik-font-size-body)/1 var(--rik-font-mono);color:var(--deck-tier-name-color,var(--rik-text-default))}:host([hot]) .name{color:var(--deck-tier-hot-color,var(--rik-accent))}.speed{font:700 var(--rik-font-size-body)/1 var(--rik-font-mono)}.speed[data-severity="muted"]{color:var(--deck-tier-speed-muted,var(--rik-text-default--faint))}.speed[data-severity="warn"]{color:var(--deck-tier-speed-warn,var(--rik-status-warn))}.speed[data-severity="ok"]{color:var(--deck-tier-speed-ok,var(--rik-status-success))}:host([hot]) .speed{color:var(--deck-tier-hot-color,var(--rik-accent))}.desc{font-size:var(--rik-font-size-sm);color:var(--deck-tier-desc-color,var(--rik-text-default--faint));line-height:1.4}`,c([d({type:String})],ae.prototype,"name",2),c([d({type:String})],ae.prototype,"speed",2),c([d({type:String})],ae.prototype,"severity",2),c([d({type:Boolean,reflect:!0})],ae.prototype,"hot",2),ae=c([k("deck-tier")],ae);var vt=class extends g{render(){return m`<slot></slot>`}};vt.styles=v`:host{display:block;text-align:center;color:var(--rik-text-default--faint);opacity:var(--rik-opacity-soft);font-size:var(--rik-font-size-xs);padding:2px 0}`,vt=c([k("deck-tier-arrow")],vt);var Te=class extends g{constructor(){super(...arguments);this.direction="column";this.noConnectors=!1}render(){return m`<slot></slot>`}};Te.styles=v`:host{display:flex;flex-direction:column;gap:var(--deck-step-list-gap,var(--rik-space-2xs))}:host([direction='row']){flex-direction:row;align-items:stretch;gap:var(--deck-step-list-gap,var(--rik-space-4))}:host([direction='row']) ::slotted(*){flex:1 1 0;min-width:0;position:relative}:host([direction='row']:not([no-connectors])) ::slotted(* + *)::before{content:'';position:absolute;top:50%;right:100%;width:var(--deck-step-list-gap,var(--rik-space-4));height:var(--deck-step-list-arrow,2px);transform:translateY(-50%);background:var(--deck-step-list-connector,var(--rik-border-default))}`,c([d({type:String,reflect:!0})],Te.prototype,"direction",2),c([d({type:Boolean,reflect:!0,attribute:"no-connectors"})],Te.prototype,"noConnectors",2),Te=c([k("deck-step-list")],Te);var ve=class extends g{constructor(){super(...arguments);this.notePosition="inline"}render(){return m`${this.n?m`<span class="step-num">${this.n}</span>`:""}
|
|
743
777
|
<span class="label"><slot></slot></span>
|
|
744
778
|
${this.note?m`<span class="note">${this.note}</span>`:""}
|
|
745
|
-
`}};
|
|
779
|
+
`}};ve.styles=v`:host{display:flex;align-items:baseline;gap:var(--rik-space-3);padding:var(--deck-step-padding-y,var(--rik-space-2)) 0;border-bottom:1px solid var(--deck-step-rule,var(--rik-border-subtle,var(--rik-border-default)));font-family:var(--rik-font-sans);font-size:var(--rik-font-size-body)}:host(:last-of-type){border-bottom:0}.step-num{flex:0 0 auto;min-width:var(--deck-step-num-size,1.6em);color:var(--deck-step-num-color,var(--rik-accent));font:800 var(--deck-step-num-scale,1.15em)/1 var(--rik-font-sans);font-variant-numeric:tabular-nums}.label{flex:0 1 auto;font-weight:600;color:var(--deck-step-label-color,var(--rik-text-default))}.note{flex:0 1 auto;margin-right:auto;color:var(--deck-step-note-color,var(--rik-text-default--muted,var(--rik-text-default--faint)));font-size:var(--rik-font-size-sm)}:host([note-position='below']){display:grid;grid-template-columns:minmax(var(--deck-step-num-size,1.6em),auto) minmax(0,1fr);grid-template-rows:auto auto;column-gap:var(--rik-space-3);row-gap:var(--deck-step-note-gap,var(--rik-space-1));align-items:baseline}:host([note-position='below']) .step-num{grid-column:1;grid-row:1 / span 2}:host([note-position='below']) .label{grid-column:2;grid-row:1}:host([note-position='below']) .note{grid-column:2;grid-row:2;min-width:0;margin:0;line-height:1.35;overflow-wrap:anywhere}`,c([d({type:String})],ve.prototype,"n",2),c([d({type:String})],ve.prototype,"note",2),c([d({type:String,reflect:!0,attribute:"note-position"})],ve.prototype,"notePosition",2),ve=c([k("deck-step")],ve);var Qe=class extends g{render(){return m`<slot></slot>`}};Qe.styles=v`:host{display:inline-flex;align-items:center;justify-content:center;background:var(--deck-kbd-bg,var(--rik-surface-raised--strong));border:1px solid var(--deck-kbd-border,var(--rik-border-default));border-bottom:3px solid var(--rik-surface-tint--strong,rgba(0,0,0,0.10));border-radius:var(--deck-kbd-radius,5px);padding:var(--deck-kbd-padding-y,3px) var(--deck-kbd-padding-x,8px);font:700 0.92rem/1 var(--rik-font-mono);color:var(--deck-kbd-color,var(--rik-text-default));min-width:22px;text-align:center;box-shadow:0 1px 0 rgba(255,255,255,0.5) inset}:host([tone="accent"]){background:var(--deck-kbd-accent-bg,var(--rik-accent));color:var(--deck-kbd-color,var(--rik-accent__on,var(--rik-surface-inverse)));border-color:rgba(0,0,0,0.15)}:host([tone="ok"]){background:var(--deck-kbd-ok-bg,var(--rik-status-success));color:var(--deck-kbd-color,var(--rik-surface-inverse));border-color:rgba(0,0,0,0.15)}`,c([d({type:String})],Qe.prototype,"tone",2),Qe=c([k("deck-kbd")],Qe);var le=class extends g{render(){let t=(this.keys??"").trim().split(/\s+/).filter(Boolean);return m`<span class="keys" part="keys"> ${t.map(e=>m`<span class="k">${e}</span>`)}
|
|
746
780
|
</span>
|
|
747
781
|
<div class="body" part="body">
|
|
748
782
|
${this.label?m`<div class="label">${this.label}</div>`:""}
|
|
749
783
|
${this.note?m`<div class="note">${this.note}</div>`:m`<div class="note"><slot></slot></div>`}
|
|
750
784
|
</div>
|
|
751
|
-
`}};se.styles=v`:host{display:flex;align-items:center;gap:var(--rik-space-3);padding:var(--rik-space-2) 0;font-family:var(--rik-font-sans)}.keys{display:inline-flex;gap:4px;flex-shrink:0}.keys deck-kbd,.keys .k{display:inline-flex;align-items:center;justify-content:center;background:var(--rik-surface-raised--strong);border:1px solid var(--rik-border-default);border-bottom:3px solid rgba(0,0,0,0.10);border-radius:5px;padding:3px 8px;font:700 0.92rem/1 var(--rik-font-mono);color:var(--rik-text-default);min-width:22px;text-align:center}.body{flex:1;min-width:0}.label{font:700 var(--rik-font-size-body)/1.2 var(--rik-font-sans);color:var(--rik-text-default)}.note{font:400 var(--rik-font-size-sm)/1.4 var(--rik-font-sans);color:var(--rik-text-default--faint);margin-top:2px}:host([tone="accent"]) .keys .k{background:var(--rik-accent);color:var(--rik-surface-inverse);border-color:rgba(0,0,0,0.15)}:host([tone="ok"]) .keys .k{background:var(--rik-status-success);color:var(--rik-surface-inverse);border-color:rgba(0,0,0,0.15)}`,c([d({type:String})],se.prototype,"keys",2),c([d({type:String})],se.prototype,"label",2),c([d({type:String})],se.prototype,"note",2),c([d({type:String})],se.prototype,"tone",2),se=c([k("deck-shortcut")],se);var ze=class extends g{updated(){if(this.colGap){let t=parseInt(this.colGap,10),e=!Number.isNaN(t)&&t>=1&&t<=6?`var(--sp-${t})`:this.colGap;this.style.setProperty("--_col-gap",e)}}render(){return m`<slot></slot>`}};ze.styles=v`:host{display:grid;grid-template-columns:1fr 1fr;gap:0 var(--_col-gap,var(--rik-space-5));font-family:var(--rik-font-sans)}:host([cols="1"]){grid-template-columns:1fr}::slotted(deck-shortcut){border-bottom:1px solid var(--rik-border-default)}`,c([d({type:String})],ze.prototype,"cols",2),c([d({type:String,attribute:"col-gap"})],ze.prototype,"colGap",2),ze=c([k("deck-shortcut-list")],ze);var js={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around"},Bs={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"},oe=class extends g{updated(){if(this.gap){let t=parseInt(this.gap,10);!Number.isNaN(t)&&t>=1&&t<=6?this.style.setProperty("--_gap",`var(--rik-space-${t})`):this.style.setProperty("--_gap",this.gap)}else this.style.removeProperty("--_gap");this.style.setProperty("--_dir",this.direction==="row"?"row":"column"),this.align&&this.style.setProperty("--_align",Bs[this.align]??this.align),this.justify&&this.style.setProperty("--_justify",js[this.justify]??this.justify)}render(){return m`<slot></slot>`}};oe.styles=v`:host{display:flex;flex-direction:var(--_dir,column);gap:var(--_gap,var(--deck-stack-gap,var(--rik-space-3)));align-items:var(--_align,stretch);justify-content:var(--_justify,flex-start);min-width:0;min-height:0}:host([fill]){flex:1 1 auto}`,c([d({type:String})],oe.prototype,"gap",2),c([d({type:String})],oe.prototype,"direction",2),c([d({type:String})],oe.prototype,"align",2),c([d({type:String})],oe.prototype,"justify",2),oe=c([k("deck-stack")],oe);var D=class extends g{updated(){let t=qe(this.cols),e=qe(this.rows),r=It(this.gap);t&&this.style.setProperty("--_cols",t),e&&this.style.setProperty("--_rows",e),r&&this.style.setProperty("--_gap",r),this.align&&this.style.setProperty("--_align",this.align),this.justify&&this.style.setProperty("--_justify",this.justify)}render(){return m`<slot></slot>`}};D.styles=v`:host{display:grid;grid-template-columns:var(--_cols,1fr);grid-template-rows:var(--_rows,auto);gap:var(--_gap,var(--deck-grid-gap,var(--rik-space-3)));align-items:var(--_align,stretch);justify-items:var(--_justify,stretch);min-width:0;min-height:0}:host([fill]){flex:1 1 auto;height:100%}`,c([d({type:String})],D.prototype,"cols",2),c([d({type:String})],D.prototype,"rows",2),c([d({type:String})],D.prototype,"gap",2),c([d({type:String})],D.prototype,"align",2),c([d({type:String})],D.prototype,"justify",2),D=c([k("deck-grid")],D);var Us={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"},qs={start:"flex-start",center:"center",end:"flex-end",between:"space-between"},V=class extends g{updated(){let t=Ye(this.span);this.style.setProperty("--_col",this.col?de(this.col):t.col),this.style.setProperty("--_row",this.row?de(this.row):t.row),this.align&&this.style.setProperty("--_align",Us[this.align]??this.align),this.justify&&this.style.setProperty("--_justify",qs[this.justify]??this.justify)}render(){return m`<slot></slot>`}};V.styles=v`:host{display:flex;flex-direction:column;gap:var(--deck-cell-gap,var(--rik-space-2));align-items:var(--_align,stretch);justify-content:var(--_justify,flex-start);grid-column:var(--_col,auto);grid-row:var(--_row,auto);min-width:0;min-height:0;overflow:hidden;box-sizing:border-box;container-type:size;padding:var(--deck-cell-padding-y,var(--rik-space-3)) var(--deck-cell-padding-x,var(--rik-space-4));background:var(--deck-cell-bg,var(--rik-surface-raised--strong));border:1px solid var(--deck-cell-border,var(--rik-border-default));border-radius:var(--deck-cell-radius,var(--rik-radius-lg));font-family:var(--rik-font-sans);color:var(--rik-text-default--muted)}:host([tone="info"]){background:var(--deck-cell-bg,var(--rik-status-info__bg));border-color:var(--deck-cell-border,var(--rik-status-info__border))}:host([tone="warn"]){background:var(--deck-cell-bg,var(--rik-status-warn__bg));border-color:var(--deck-cell-border,var(--rik-status-warn__border))}:host([tone="ok"]){background:var(--deck-cell-bg,var(--rik-status-success__bg));border-color:var(--deck-cell-border,var(--rik-status-success__border))}:host([tone="danger"]){background:var(--deck-cell-bg,var(--rik-status-danger__bg));border-color:var(--deck-cell-border,var(--rik-status-danger__border))}:host([plain]){background:none;border-color:transparent;border-radius:0}:host([flat]){border:none}::slotted(h3){font-family:var(--rik-font-display,var(--rik-font-sans));font-size:var(--rik-font-size-h2);font-weight:700;color:var(--rik-text-default);letter-spacing:-0.01em;line-height:1.2;margin:0}::slotted(p){font-size:var(--rik-font-size-body);line-height:1.5;margin:0}::slotted(img),::slotted(svg),::slotted(video){flex:1 1 0;min-height:0;width:100%;max-width:100%;object-fit:contain}::slotted(table){width:100%;border-collapse:collapse}`,c([d({type:String})],V.prototype,"span",2),c([d({type:String})],V.prototype,"col",2),c([d({type:String})],V.prototype,"row",2),c([d({type:String})],V.prototype,"align",2),c([d({type:String})],V.prototype,"justify",2),c([d({type:String})],V.prototype,"tone",2),V=c([k("deck-cell")],V);var Ys={start:"start",center:"center",end:"end",stretch:"stretch"},K=class extends g{updated(){let t=Ye(this.span);this.style.setProperty("--_col",this.col?de(this.col):t.col),this.style.setProperty("--_row",this.banded?`span ${this.banded}`:this.row?de(this.row):t.row),this.align&&this.style.setProperty("--_align",Ys[this.align]??this.align)}render(){return m`<slot></slot>`}};K.styles=v`:host{display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:min-content;row-gap:var(--deck-cell-gap,var(--rik-space-2));justify-items:var(--_align,stretch);grid-column:var(--_col,auto);grid-row:var(--_row,auto);min-width:0;box-sizing:border-box;padding:var(--deck-cell-padding-y,var(--rik-space-3)) var(--deck-cell-padding-x,var(--rik-space-4));background:var(--deck-cell-bg,var(--rik-surface-raised--strong));border:1px solid var(--deck-cell-border,var(--rik-border-default));border-radius:var(--deck-cell-radius,var(--rik-radius-lg));font-family:var(--rik-font-sans);color:var(--rik-text-default--muted)}:host([banded]){grid-template-rows:subgrid;grid-auto-rows:initial;row-gap:0}:host([banded]) ::slotted(*){align-self:start}:host([tone="info"]){background:var(--deck-cell-bg,var(--rik-status-info__bg));border-color:var(--deck-cell-border,var(--rik-status-info__border))}:host([tone="warn"]){background:var(--deck-cell-bg,var(--rik-status-warn__bg));border-color:var(--deck-cell-border,var(--rik-status-warn__border))}:host([tone="ok"]){background:var(--deck-cell-bg,var(--rik-status-success__bg));border-color:var(--deck-cell-border,var(--rik-status-success__border))}:host([tone="danger"]){background:var(--deck-cell-bg,var(--rik-status-danger__bg));border-color:var(--deck-cell-border,var(--rik-status-danger__border))}:host([plain]){background:none;border-color:transparent;border-radius:0}:host([flat]){border:none}::slotted(h3){font-family:var(--rik-font-display,var(--rik-font-sans));font-size:var(--rik-font-size-h2);font-weight:700;color:var(--rik-text-default);letter-spacing:-0.01em;line-height:1.2;margin:0}::slotted(p){font-size:var(--rik-font-size-body);line-height:1.5;margin:0}`,c([d({type:String})],K.prototype,"span",2),c([d({type:String})],K.prototype,"col",2),c([d({type:String})],K.prototype,"row",2),c([d({type:String})],K.prototype,"align",2),c([d({type:String})],K.prototype,"tone",2),c([d({type:String,reflect:!0})],K.prototype,"banded",2),K=c([k("deck-point")],K);function Ws(n,t,e,r=.5){if(t<=n)return n;if(e(t))return t;let i=n,s=t;for(;s-i>r;){let o=(i+s)/2;e(o)?i=o:s=o}return i}var fe=class{constructor(t,e={}){this.host=t;this.opts=e;t.addController(this)}hostConnected(){this.ro=new ResizeObserver(()=>this.refit()),this.ro.observe(this.host),this.refit(),document.fonts?.ready?.then(()=>{this.ro&&this.refit()})}hostDisconnected(){this.ro?.disconnect(),this.ro=void 0}refit(){let t=this.host;if(this.opts.enabled&&!this.opts.enabled()){t.style.removeProperty("font-size");return}if(t.clientWidth===0||t.clientHeight===0)return;let e=parseFloat(getComputedStyle(document.documentElement).fontSize)||16,r=(this.opts.minRem?.()??1)*e,i=(this.opts.maxRem?.()??12)*e,s=o=>(t.style.fontSize=`${o}px`,t.scrollWidth<=t.clientWidth&&t.scrollHeight<=t.clientHeight);t.style.fontSize=`${Ws(r,i,s)}px`}};var Le=class extends g{constructor(){super(...arguments);this.fitter=new fe(this,{minRem:()=>this.min??1,maxRem:()=>this.max??12})}updated(){this.fitter.refit()}render(){return m`<slot></slot>`}};Le.styles=v`:host{display:block;width:100%;height:100%;overflow:hidden}`,c([d({type:Number})],Le.prototype,"min",2),c([d({type:Number})],Le.prototype,"max",2),Le=c([k("deck-fit")],Le);function Ri(n,t=","){let e=[],r=[],i=[],s="",o=!1,a=!1,l=()=>{i.push(s),s=""},h=()=>{l(),e.push(i),r.push(a),i=[],a=!1};for(let p=0;p<n.length;p++){let u=n[p];if(o){u==='"'?n[p+1]==='"'?(s+='"',p++):o=!1:s+=u;continue}u==='"'?(o=!0,a=!0):n.startsWith(t,p)?(l(),p+=t.length-1):u===`
|
|
752
|
-
`?
|
|
753
|
-
`&&
|
|
754
|
-
`),
|
|
755
|
-
`),o=
|
|
785
|
+
`}};le.styles=v`:host{display:flex;align-items:center;gap:var(--rik-space-3);padding:var(--rik-space-2) 0;font-family:var(--rik-font-sans)}.keys{display:inline-flex;gap:4px;flex-shrink:0}.keys deck-kbd,.keys .k{display:inline-flex;align-items:center;justify-content:center;background:var(--rik-surface-raised--strong);border:1px solid var(--rik-border-default);border-bottom:3px solid rgba(0,0,0,0.10);border-radius:5px;padding:3px 8px;font:700 0.92rem/1 var(--rik-font-mono);color:var(--rik-text-default);min-width:22px;text-align:center}.body{flex:1;min-width:0}.label{font:700 var(--rik-font-size-body)/1.2 var(--rik-font-sans);color:var(--rik-text-default)}.note{font:400 var(--rik-font-size-sm)/1.4 var(--rik-font-sans);color:var(--rik-text-default--faint);margin-top:2px}:host([tone="accent"]) .keys .k{background:var(--rik-accent);color:var(--rik-surface-inverse);border-color:rgba(0,0,0,0.15)}:host([tone="ok"]) .keys .k{background:var(--rik-status-success);color:var(--rik-surface-inverse);border-color:rgba(0,0,0,0.15)}`,c([d({type:String})],le.prototype,"keys",2),c([d({type:String})],le.prototype,"label",2),c([d({type:String})],le.prototype,"note",2),c([d({type:String})],le.prototype,"tone",2),le=c([k("deck-shortcut")],le);var ze=class extends g{updated(){if(this.colGap){let t=parseInt(this.colGap,10),e=!Number.isNaN(t)&&t>=1&&t<=6?`var(--sp-${t})`:this.colGap;this.style.setProperty("--_col-gap",e)}}render(){return m`<slot></slot>`}};ze.styles=v`:host{display:grid;grid-template-columns:1fr 1fr;gap:0 var(--_col-gap,var(--rik-space-5));font-family:var(--rik-font-sans)}:host([cols="1"]){grid-template-columns:1fr}::slotted(deck-shortcut){border-bottom:1px solid var(--rik-border-default)}`,c([d({type:String})],ze.prototype,"cols",2),c([d({type:String,attribute:"col-gap"})],ze.prototype,"colGap",2),ze=c([k("deck-shortcut-list")],ze);function Ji(i,t=","){let e=[],r=[],n=[],s="",o=!1,a=!1,l=()=>{n.push(s),s=""},p=()=>{l(),e.push(n),r.push(a),n=[],a=!1};for(let h=0;h<i.length;h++){let u=i[h];if(o){u==='"'?i[h+1]==='"'?(s+='"',h++):o=!1:s+=u;continue}u==='"'?(o=!0,a=!0):i.startsWith(t,h)?(l(),h+=t.length-1):u===`
|
|
786
|
+
`?p():u==="\r"?i[h+1]!==`
|
|
787
|
+
`&&p():s+=u}return(s.length>0||n.length>0)&&p(),e.filter((h,u)=>r[u]||!(h.length===1&&h[0]===""))}var R=class extends g{constructor(){super(...arguments);this.delimiter=",";this.noHeader=!1;this.fit=!1;this.reveal=!1;this.step=0;this.rows=[];this.fitter=new me(this,{enabled:()=>this.fit,minRem:()=>this.fitMin??.6,maxRem:()=>this.fitMax??2})}connectedCallback(){super.connectedCallback(),this.parse(),this._publishSteps()}_publishSteps(){if(!this.reveal)return;let e=this;for(;e?.parentElement&&e.parentElement.tagName.toLowerCase()!=="deck-root";)e=e.parentElement;if(!e?.parentElement)return;let r=Math.max(0,this.rows.length-(this.noHeader?0:1)),n=Number(e.getAttribute("steps")??e.getAttribute("data-steps")??"0");r>n&&e.setAttribute("data-steps",String(r))}applyStep(e){this.step=e}_marked(e){return new Set((e??"").split(/[\s,]+/).map(r=>Number.parseInt(r,10)).filter(r=>Number.isFinite(r)&&r>0))}updated(){this.fitter.refit()}reparse(){this.parse()}parse(){let e=this.textContent??"",r=e.split(`
|
|
788
|
+
`),n=r.filter(l=>l.trim().length>0).reduce((l,p)=>Math.min(l,p.match(/^ */)?.[0].length??0),1/0),s=n===1/0?e:r.map(l=>l.slice(n)).join(`
|
|
789
|
+
`),o=Ji(s.trim(),this.delimiter).map(l=>l.map(p=>p.trim())),a=o.reduce((l,p)=>Math.max(l,p.length),0);this.rows=o.map(l=>l.length===a?l:[...l,...Array(a-l.length).fill("")])}render(){if(this.rows.length===0)return m``;let e=this.noHeader?null:this.rows[0],r=this.noHeader?this.rows:this.rows.slice(1),n=this._marked(this.highlightRows),s=this._marked(this.highlightCols);return m`<table part="table"> ${e?m`<thead>
|
|
756
790
|
<tr>
|
|
757
791
|
${e.map((o,a)=>m`<th ?data-mark=${s.has(a+1)}>${o}</th>`)}
|
|
758
792
|
</tr>
|
|
759
793
|
</thead>`:""}
|
|
760
794
|
<tbody>
|
|
761
|
-
${r.map((o,a)=>m`<tr ?data-mark=${
|
|
795
|
+
${r.map((o,a)=>m`<tr ?data-mark=${n.has(a+1)} ?data-pending=${this.reveal&&a+1>this.step} > ${o.map((l,p)=>m`<td ?data-mark=${s.has(p+1)}>${l}</td>`)}
|
|
762
796
|
</tr>`)}
|
|
763
797
|
</tbody>
|
|
764
798
|
</table>
|
|
765
|
-
`}};
|
|
766
|
-
`);for(;
|
|
767
|
-
|
|
799
|
+
`}};R.styles=v`:host{display:block;min-width:0;overflow:hidden;font-family:var(--rik-font-sans);font-size:var(--rik-font-size-body)}:host([fit]){width:100%;height:100%}table{width:100%;border-collapse:collapse;font-size:1em;color:var(--rik-text-default--muted)}th,td{border:1px solid var(--deck-csv-border,var(--rik-border-default));padding:var(--deck-csv-padding-y,var(--rik-space-1)) var(--deck-csv-padding-x,var(--rik-space-2));text-align:left;vertical-align:top}tr[data-mark] > td{background:var(--deck-csv-mark-bg,var(--rik-surface-inverse));color:var(--deck-csv-mark-color,var(--rik-text-inverse));border-color:var(--deck-csv-mark-bg,var(--rik-surface-inverse));font-weight:700}td[data-mark],th[data-mark]{color:var(--deck-csv-mark-col-color,var(--rik-accent__text));font-weight:700}tr[data-mark] > td[data-mark]{color:var(--deck-csv-mark-col-on-mark,var(--rik-accent))}tr[data-pending]{visibility:hidden}@media print{tr[data-pending]{visibility:visible}tr[data-mark] > td,td[data-mark],th[data-mark]{-webkit-print-color-adjust:exact;print-color-adjust:exact}}th{background:var(--deck-csv-header-bg,transparent);color:var(--rik-text-default);font-weight:700;border-bottom:2px solid var(--deck-csv-header-rule,var(--rik-accent))}`,c([d({type:String})],R.prototype,"delimiter",2),c([d({type:Boolean,attribute:"no-header"})],R.prototype,"noHeader",2),c([d({type:Boolean})],R.prototype,"fit",2),c([d({type:Number,attribute:"fit-min"})],R.prototype,"fitMin",2),c([d({type:Number,attribute:"fit-max"})],R.prototype,"fitMax",2),c([d({type:String,attribute:"highlight-rows"})],R.prototype,"highlightRows",2),c([d({type:String,attribute:"highlight-cols"})],R.prototype,"highlightCols",2),c([d({type:Boolean,reflect:!0})],R.prototype,"reveal",2),c([j()],R.prototype,"step",2),c([j()],R.prototype,"rows",2),R=c([k("deck-csv")],R);function to(i,t){let e=i.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),r=[],n=(a,l)=>{let p=`P${r.length}E`;return r.push(`<span class="${a}">${l}</span>`),p};return t==="html"||t==="xml"||t==="svg"?(e=e.replace(/(<!--[\s\S]*?-->)/g,a=>n("cmt",a)),e=e.replace(/(<!doctype[^&]*>)/gi,a=>n("cmt",a)),e=e.replace(/("[^"]*"|'[^']*')/g,a=>n("str",a)),e=e.replace(/(<\/?)([a-zA-Z][a-zA-Z0-9:-]*)/g,(a,l,p)=>l+n("kw",p)),e=e.replace(/\b([a-zA-Z][a-zA-Z0-9-]*)(?==)/g,a=>n("prop",a))):t==="css"||t==="scss"||t==="less"?(e=e.replace(/(\/\*[\s\S]*?\*\/)/g,a=>n("cmt",a)),e=e.replace(/("[^"]*"|'[^']*')/g,a=>n("str",a)),e=e.replace(/([a-zA-Z-]+)(?=\s*:)/g,a=>n("prop",a)),e=e.replace(/(#[0-9a-fA-F]{3,8})\b/g,a=>n("num",a)),e=e.replace(/\b(\d+(?:\.\d+)?)(px|rem|em|%|vh|vw|vmin|vmax|s|ms|deg)?/g,(a,l,p)=>n("num",l+(p??"")))):(e=e.replace(/(\/\/[^\n]*)/g,a=>n("cmt",a)),e=e.replace(/(['"`])((?:\\.|(?!\1)[^\\])*)\1/g,a=>n("str",a)),e=e.replace(/\b(const|let|var|function|return|if|else|for|while|class|extends|new|export|import|from|as|await|async|of|in|typeof|instanceof|true|false|null|undefined)\b/g,a=>n("kw",a)),e=e.replace(/\b(\d+(?:\.\d+)?)\b/g,a=>n("num",a))),e=e.replace(/P(\d+)E/g,(a,l)=>r[+l]??""),e}var Y=class extends g{constructor(){super(...arguments);this.lang="";this.hero=!1;this.nested=!1;this._html="";this._groups=null}static rehighlightAll(){document.querySelectorAll("deck-code").forEach(e=>{e.rehighlight()})}connectedCallback(){super.connectedCallback(),this._highlight();try{this._groups=JSON.parse(this.getAttribute("step-groups")??"null")}catch{this._groups=null}}rehighlight(){this._highlight(),this.requestUpdate()}_highlight(){let e=Y.highlighter?.(this.textContent??"",this.lang||"txt");if(e!=null){this._html=e;return}let n=(this.textContent??"").split(`
|
|
800
|
+
`);for(;n.length&&!n[0].trim();)n.shift();for(;n.length&&!n[n.length-1].trim();)n.pop();let s=n.filter(a=>a.trim().length>0).reduce((a,l)=>Math.min(a,l.match(/^ */)?.[0].length??0),1/0),o=s===1/0?n:n.map(a=>a.slice(s));this._html=o.map((a,l)=>'<span class="line" data-line="'+(l+1)+'">'+to(a||" ",this.lang)+"</span>").join("")}applyStep(e){if(!this._groups)return;let r=this.shadowRoot?.querySelectorAll(".line");if(r)if(e===0)r.forEach(n=>{n.classList.remove("dim","lit")});else{let n=this._groups[Math.min(e-1,this._groups.length-1)]??[];r.forEach(s=>{let o=parseInt(s.dataset.line??"0",10);s.classList.toggle("lit",n.includes(o)),s.classList.toggle("dim",!n.includes(o))})}}render(){return m`<pre><code .innerHTML="${this._html}"></code></pre>`}};Y.highlighter=null,Y.styles=v`:host{display:block;background:var(--deck-code-bg,var(--rik-code__bg));border:1px solid var(--deck-code-border,var(--rik-code__border));border-radius:var(--deck-code-radius,var(--rik-radius-md));padding:var(--deck-code-padding-y,var(--rik-space-3)) var(--deck-code-padding-x,var(--rik-space-4));font-family:var(--rik-font-mono);font-size:var(--rik-font-size-mono);line-height:1.7;color:var(--deck-code-text,var(--rik-code__text));box-shadow:var(--rik-elevation-2);overflow:auto;white-space:pre}:host([hero]){display:flex;align-items:safe center;padding:var(--deck-code-padding-y,var(--rik-space-4)) var(--deck-code-padding-x,var(--rik-space-5))}:host([nested]){box-shadow:none;border-radius:var(--rik-radius-sm);padding:var(--deck-code-padding-y,var(--rik-space-2)) var(--deck-code-padding-x,var(--rik-space-3))}pre{margin:0;font:inherit;color:inherit}code{display:block;width:100%;font:inherit;color:inherit}.line{transition:opacity 0.25s ease;display:block}.line.dim{opacity:0.25}.line.lit{opacity:1}.kw{color:var(--deck-code-syntax-kw,var(--rik-code__syntax-keyword))}.fn{color:var(--deck-code-syntax-fn,var(--rik-code__syntax-function))}.str{color:var(--deck-code-syntax-str,var(--rik-code__syntax-string))}.num{color:var(--deck-code-syntax-num,var(--rik-code__syntax-number))}.cmt{color:var(--deck-code-syntax-cmt,var(--rik-code__syntax-comment));font-style:italic}.ty{color:var(--deck-code-syntax-ty,var(--rik-code__syntax-type))}.prop{color:var(--deck-code-syntax-prop,var(--rik-code__syntax-property))}`,c([d({type:String})],Y.prototype,"lang",2),c([d({type:Boolean,reflect:!0})],Y.prototype,"hero",2),c([d({type:Boolean,reflect:!0})],Y.prototype,"nested",2),c([d({type:String,attribute:"step-groups"})],Y.prototype,"stepGroups",2),c([j()],Y.prototype,"_html",2),Y=c([k("deck-code")],Y);dr();var Qi=!1;async function ro(){if(Qi)return;window.mermaid||await new Promise((e,r)=>{let n=document.createElement("script");n.src=new URL("./vendor/mermaid.min.js",import.meta.url).href,n.onload=()=>e(),n.onerror=()=>r(new Error("mermaid failed to load")),document.head.appendChild(n)});let i=getComputedStyle(document.documentElement),t=e=>Object.fromEntries(Object.entries(e).map(([r,n])=>[r,i.getPropertyValue(n).trim()]).filter(([,r])=>r!==""));window.mermaid.initialize({startOnLoad:!1,theme:"dark",themeVariables:{...t({background:"--rik-code__bg",edgeLabelBackground:"--rik-code__bg",textColor:"--rik-code__text"}),mainBkg:"#2a2a2a",nodeBorder:"#555",lineColor:"#777",fontSize:"13px"},flowchart:{curve:"basis",htmlLabels:!0,padding:12},securityLevel:"strict"}),Qi=!0}var io=0,Le=class extends g{constructor(){super(...arguments);this.rendered=!1;this._svg="";this._source="";this._renderPromise=null}get renderedSvg(){return this._svg}get whenRendered(){return this._renderPromise??Promise.resolve()}connectedCallback(){super.connectedCallback(),this._source=(this.textContent??"").trim();let e=this._source.split(`
|
|
801
|
+
`),r=e.filter(n=>n.trim()).reduce((n,s)=>Math.min(n,s.match(/^ */)?.[0].length??0),1/0);r<1/0&&(this._source=e.map(n=>n.slice(r)).join(`
|
|
802
|
+
`)),this._renderPromise=this._render()}async _render(){if(!this._source)return;await ro();let e=`mmd-${++io}`;try{let{svg:r}=await window.mermaid.render(e,this._source);this._svg=r,this.rendered=!0}catch(r){console.error("Mermaid render error",r);let n=r instanceof Error?r.message:String(r);this._svg=`<pre style="color:#f87171">${It(n)}</pre>`}}render(){return m`<div class="canvas" .innerHTML="${this._svg}"></div>`}};Le.styles=v`:host{display:flex;align-items:center;justify-content:center;background:var(--deck-mermaid-bg,var(--rik-code__bg));border:1px solid var(--deck-mermaid-border,var(--rik-code__border));border-radius:var(--deck-mermaid-radius,var(--rik-radius-md));padding:var(--deck-mermaid-padding,var(--rik-space-4));box-shadow:var(--rik-elevation-2);overflow:hidden;min-width:0}:host([compact]){padding:var(--rik-space-2)}/* The canvas takes the host's content box so the diagram can be capped against the room it actually has. Capping the SVG at 60cqh alone measures the slide,not this box:a diagram beside a two-line title then drew taller than the space left for it and the box clipped,which \`rikiki check\` reports in pixels. */
|
|
803
|
+
.canvas {
|
|
804
|
+
width: 100%; max-width: 100%; height: 100%; min-height: 0;
|
|
805
|
+
display: flex; align-items: center; justify-content: center;
|
|
806
|
+
text-align: center; overflow: hidden;
|
|
807
|
+
}
|
|
808
|
+
.canvas svg {
|
|
809
|
+
width: 100% !important; height: auto !important; max-width: 100% !important;
|
|
810
|
+
max-height: min(60cqh, 100%) !important;
|
|
811
|
+
}
|
|
812
|
+
:host([compact]) .canvas { max-width: 60%; }
|
|
813
|
+
:host([compact]) .canvas svg { max-height: 22cqh; }
|
|
814
|
+
`,c([d({type:Boolean,reflect:!0})],Le.prototype,"rendered",2),c([j()],Le.prototype,"_svg",2),Le=c([k("deck-mermaid")],Le);function no(i){let t=customElements.get("deck-code");if(!t){console.warn("[rikiki/deck-code] <deck-code> is not defined yet \xB7 import rikiki first");return}t.highlighter=i,t.rehighlightAll()}new URLSearchParams(location.search).has("live")&&Promise.resolve().then(()=>(nn(),lo));export{no as setDeckCodeHighlighter};
|