summaryrefslogtreecommitdiffhomepage
path: root/docs/assets/slidev/shortcuts-TVJpHdJV.js
diff options
context:
space:
mode:
Diffstat (limited to 'docs/assets/slidev/shortcuts-TVJpHdJV.js')
-rw-r--r--docs/assets/slidev/shortcuts-TVJpHdJV.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/assets/slidev/shortcuts-TVJpHdJV.js b/docs/assets/slidev/shortcuts-TVJpHdJV.js
new file mode 100644
index 0000000..e336bd1
--- /dev/null
+++ b/docs/assets/slidev/shortcuts-TVJpHdJV.js
@@ -0,0 +1,4 @@
+const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/slidev/DrawingLayer-DoZ9KrJP.js","assets/modules/vue-DPv8DyWv.js","assets/slidev/SlideWrapper-Ccnvj0Sw.js","assets/index-Da-oe7Cw.js","assets/monaco/bundled-types-B0l6HWZX.js","assets/modules/file-saver-igGfcqei.js","assets/monaco/bundled-types-B_1qVWDs.css","assets/modules/shiki-BNMsYMPq.js","assets/modules/shiki-Bxv373Z5.css","assets/index-CGHbX1oj.css","assets/SlideWrapper-D-ORDv98.css","assets/slidev/context-DlCOjm-I.js"])))=>i.map(i=>d[i]);
+import{t as K,ak as _n,al as gn,am as jt,E as De,z as N,S as bt,d as he,a4 as zt,an as Wt,a5 as mn,a3 as yn,I as u,o as i,b as v,F as j,ag as Fe,e as $,aa as Se,g as S,h as Ae,ao as Gt,i as Z,c as R,ap as He,x as de,j as Ve,l as I,ab as Kt,f as Mt,ai as bn,aj as Ct,k as V,G as Je,aq as kn,U as xn,J as wn,ar as je,q as me,s as ye,m as Sn,as as Mn,ae as Cn,at as $n,au as B,av as ae,W as En,aw as In}from"../modules/vue-DPv8DyWv.js";import{a as Me,q as Ye,h as at,t as Qe,f as kt,w as Ie,_ as qe,r as we,v as Oe,x as rt,y as dt,e as ze,m as $t,p as Pn,z as Rn,A as Ht,B as Nn,D as ee,c as Yt,C as Ut,E as Et,F as An,G as Ln,H as xt,I as It,J as ht,K as Tn,L as On,M as Dn}from"../index-Da-oe7Cw.js";import{c as et,u as Fn,a as Bn,S as Xt,_ as Vn,G as jn,d as zn}from"./SlideWrapper-Ccnvj0Sw.js";import{a as be,m as Wn,i as Gn,f as Pt,g as vt,p as Kn,c as Rt,h as Nt,j as At,_ as Hn}from"../monaco/bundled-types-B0l6HWZX.js";import{o as Jt,p as Qt,I as Yn,q as Un,r as Xn,f as Zt,s as qt,_ as en,a as tn,i as nn,j as sn,t as Jn,d as Qn,e as Zn,n as qn,u as es,v as ts,w as ns,x as ss,y as os,z as as,c as rs}from"../modules/unplugin-icons-DdQIwbVj.js";import{u as ls}from"./context-DlCOjm-I.js";import{_ as X}from"./IconButton.vue_vue_type_script_setup_true_lang-D92RVpEC.js";import{t as is}from"../modules/shiki-BNMsYMPq.js";function Ka(n){const{next:e,nextSlide:s,prev:t,prevSlide:a}=Me(),{isDrawing:o}=et(),r=K(0),{direction:l,distanceX:c,distanceY:d}=_n(n,{pointerTypes:["touch"],onSwipeStart(){o.value||(r.value=gn())},onSwipeEnd(){if(!r.value||o.value)return;const h=Math.abs(c.value),f=Math.abs(d.value);h/window.innerWidth>.3||h>75?l.value==="left"?e():t():(f/window.innerHeight>.4||f>200)&&(l.value==="down"?a():s())}})}function Ha(){const{request:n,release:e}=jt();De(Ye,s=>{s?n("screen"):e()},{immediate:!0})}const cs=[];let lt;const us=()=>{if(lt)return lt;const{next:n,nextSlide:e,prev:s,prevSlide:t,hasNext:a,hasPrev:o,currentPage:r,total:l,isPresenter:c,enterPresenter:d,exitPresenter:h,isEmbedded:f,isPresenterAvailable:g}=Me(),{drawingEnabled:m}=et(),{isFullscreen:y,toggle:k}=kt;return lt=cs.reduce((_,p)=>p(_),N(()=>[{small:!0,icon:Jt,label:"Previous Click",action:s,disabled:!o.value},{small:!0,icon:Qt,label:"Next Click",action:n,disabled:!a.value},{small:!0,icon:Yn,label:"Previous Slide",action:t,disabled:r.value<=1},{small:!0,icon:Un,label:"Next Slide",action:e,disabled:r.value>=l.value},"separator",{icon:Xn,label:at.value?"Hide editor":"Show editor",action:()=>at.value=!at.value},{icon:Zt,label:m.value?"Hide drawing toolbar":"Show drawing toolbar",action:()=>m.value=!m.value},{icon:qt,label:"Show slide overview",action:Qe},c.value&&{icon:en,label:"Exit Presenter Mode",action:h},g.value&&{icon:tn,label:"Enter Presenter Mode",action:d},!f.value&&{icon:y.value?nn:sn,label:y.value?"Close fullscreen":"Enter fullscreen",action:k}].filter(Boolean)))},Ne=bt(null);function ds(n,e){Ne.value={x:n,y:e,items:us()}}function Te(){Ne.value=null}function Ya(n){if(be.contextMenu!==!0&&be.contextMenu!=null&&be.contextMenu!==Wn||n.shiftKey||n.defaultPrevented)return;const{isEmbedded:e}=Me();e.value||(ds(n.pageX,n.pageY),n.preventDefault(),n.stopPropagation())}const hs=["title","onClick"],vs=["onClick"],fs={class:"mx-auto"},ps={key:0},_s={class:"w-full text-xs p2"},gs={class:"text-main text-opacity-50!"},Ua=he({__name:"ContextMenu",setup(n){const e=K();zt(e,Te),Wt(document,"mousedown",c=>{c.buttons&2&&Te()},{passive:!0,capture:!0});const s=N(()=>be.contextMenu!=null),t=mn();De(t,c=>{c||Te()}),Fn(1);const{width:a,height:o}=yn(e),r=N(()=>{var d;const c=(d=Ne.value)==null?void 0:d.x;return c?c+a.value>Ie.width.value?Ie.width.value-a.value:c:0}),l=N(()=>{var d;const c=(d=Ne.value)==null?void 0:d.y;return c?c+o.value>Ie.height.value?Ie.height.value-o.value:c:0});return(c,d)=>u(Ne)?(i(),v("div",{key:0,ref_key:"container",ref:e,style:Ae(`left:${r.value}px;top:${l.value}px`),class:"fixed z-100 w-60 flex flex-wrap justify-items-start p-1 animate-fade-in animate-duration-100 backdrop-blur bg-main bg-opacity-75! border border-main rounded-md shadow overflow-hidden select-none",onContextmenu:d[1]||(d[1]=Gt(()=>{},["prevent"])),onClick:d[2]||(d[2]=(...h)=>u(Te)&&u(Te)(...h))},[(i(!0),v(j,null,Fe(u(Ne).items.value,(h,f)=>(i(),v(j,{key:f},[h==="separator"?(i(),v("div",{key:f,class:"w-full my1 border-t border-main"})):h.small?(i(),v("div",{key:1,class:Z(["p-2 w-[40px] h-[40px] inline-block text-center cursor-pointer rounded",h.disabled?"op40":"hover:bg-active"]),title:h.label,onClick:h.action},[(i(),R(He(h.icon)))],10,hs)):(i(),v("div",{key:2,class:Z(["w-full grid grid-cols-[35px_1fr] p-2 pl-0 cursor-pointer rounded",h.disabled?"op40":"hover:bg-active"]),onClick:h.action},[$("div",fs,[(i(),R(He(h.icon)))]),typeof h.label=="string"?(i(),v("div",ps,de(h.label),1)):(i(),R(He(h.label),{key:1}))],10,vs))],64))),128)),s.value?S("v-if",!0):(i(),v(j,{key:0},[d[6]||(d[6]=$("div",{class:"w-full my1 border-t border-main"},null,-1)),$("div",_s,[$("div",gs,[d[3]||(d[3]=Se(" Hold ")),d[4]||(d[4]=$("kbd",{class:"border px1 py0.5 border-main rounded text-primary"},"Shift",-1)),d[5]||(d[5]=Se(" and right click to open the native context menu ")),S("v-if",!0)])])],64))],36)):S("v-if",!0)}}),ms={},ys={class:"w-1px opacity-10 bg-current m-1 lg:m-2"};function bs(n,e){return i(),v("div",ys)}const We=qe(ms,[["render",bs]]),ks={key:0},xs={key:1},ws={key:2},Ss={key:3},Ms={key:4},Cs={key:5},$s={key:6},Es={key:7},Is={key:8},Ps={key:9},Rs={key:10},Ns={key:11},As={key:12},Ls={key:13},Ts={key:14},Os={key:15},Ds={key:16},Fs={key:17},Bs={key:18},Vs={key:19},js={key:20},zs={key:21},Ws={key:22},Gs={key:23},Ks={key:24},Hs={key:25},Ys={key:26},Us={key:27},Xs={key:28},Js={key:29},Qs={key:30},Zs={key:31},qs={key:32},eo={key:33},to={key:34},no={key:35},so={key:36},oo={key:37},ao={key:38},ro={key:39},lo={key:40},io={key:41},co={key:42},uo={key:43},ho={key:44},vo={key:45},fo=he({__name:"title-renderer",props:{no:{}},setup(n){const e=n,{$page:s}=ls(),t=N(()=>+(e.no??s.value));return(a,o)=>(i(),v("div",null,[t.value===1?(i(),v("p",ks,"Really Functional Data Structures")):t.value===2?(i(),v("p",xs,"Goal/Motivation")):t.value===3?(i(),v("p",ws,"Anonymous Functions (Lambdas)")):t.value===4?(i(),v("p",Ss,"JavaScript Notation")):t.value===5?(i(),v("p",Ms,"Really Functional Data Structures")):t.value===6?(i(),v("p",Cs,"Common")):t.value===7?(i(),v("p",$s,"Boolean Logic")):t.value===8?(i(),v("p",Es,"Church Booleans")):t.value===9?(i(),v("p",Is,"Church Booleans")):t.value===10?(i(),v("p",Ps,"Example: Negation")):t.value===11?(i(),v("p",Rs,"Example: Negation")):t.value===12?(i(),v("p",Ns,"Other Operators")):t.value===13?(i(),v("p",As,"Church Pairs")):t.value===14?(i(),v("p",Ls,"Construction/Selection")):t.value===15?(i(),v("p",Ts,"Lists")):t.value===16?(i(),v("p",Os,"Church Lists")):t.value===17?(i(),v("p",Ds,o[0]||(o[0]=[$("code",null,"isNil",-1),Se("?")]))):t.value===18?(i(),v("p",Fs,o[1]||(o[1]=[$("code",null,"isNil",-1),Se("?")]))):t.value===19?(i(),v("p",Bs,"Example: Iteration")):t.value===20?(i(),v("p",Vs,"Other Lists")):t.value===21?(i(),v("p",js,"Numbers")):t.value===22?(i(),v("p",zs,"Church Numerals")):t.value===23?(i(),v("p",Ws,"Church Numerals")):t.value===24?(i(),v("p",Gs,"Successor")):t.value===25?(i(),v("p",Ks,"Successor")):t.value===26?(i(),v("p",Hs,o[2]||(o[2]=[$("code",null,"isZero",-1),Se("?")]))):t.value===27?(i(),v("p",Ys,"Other Numeral Systems")):t.value===28?(i(),v("p",Us,"Algebraic Types")):t.value===29?(i(),v("p",Xs,"Products/Records")):t.value===30?(i(),v("p",Js,"Products/Records")):t.value===31?(i(),v("p",Qs,"Sums/Unions")):t.value===32?(i(),v("p",Zs,"undefined")):t.value===33?(i(),v("p",qs,"undefined")):t.value===34?(i(),v("p",eo,"Trees")):t.value===35?(i(),v("p",to,"Monads")):t.value===36?(i(),v("p",no,"Maybe")):t.value===37?(i(),v("p",so,"Either")):t.value===38?(i(),v("p",oo,"Meta")):t.value===39?(i(),v("p",ao,"Mogensen-Scott")):t.value===40?(i(),v("p",ro,"Meta-Circular Interpreter")):t.value===41?(i(),v("p",lo,"de Bruijn-Church")):t.value===42?(i(),v("p",io,"194 bit self interpreter")):t.value===43?(i(),v("p",co,"Other Data?")):t.value===44?(i(),v("p",uo,"Images")):t.value===45?(i(),v("p",ho,"Quad Trees")):t.value===46?(i(),v("p",vo,"Demo")):S("v-if",!0)]))}});function ke(n){return Array.isArray?Array.isArray(n):rn(n)==="[object Array]"}const po=1/0;function _o(n){if(typeof n=="string")return n;let e=n+"";return e=="0"&&1/n==-po?"-0":e}function go(n){return n==null?"":_o(n)}function ue(n){return typeof n=="string"}function on(n){return typeof n=="number"}function mo(n){return n===!0||n===!1||yo(n)&&rn(n)=="[object Boolean]"}function an(n){return typeof n=="object"}function yo(n){return an(n)&&n!==null}function te(n){return n!=null}function it(n){return!n.trim().length}function rn(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}const bo="Incorrect 'index' type",ko=n=>`Invalid value for key ${n}`,xo=n=>`Pattern length exceeds max of ${n}.`,wo=n=>`Missing ${n} property in key`,So=n=>`Property 'weight' in key '${n}' must be a positive integer`,Lt=Object.prototype.hasOwnProperty;class Mo{constructor(e){this._keys=[],this._keyMap={};let s=0;e.forEach(t=>{let a=ln(t);this._keys.push(a),this._keyMap[a.id]=a,s+=a.weight}),this._keys.forEach(t=>{t.weight/=s})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function ln(n){let e=null,s=null,t=null,a=1,o=null;if(ue(n)||ke(n))t=n,e=Tt(n),s=ft(n);else{if(!Lt.call(n,"name"))throw new Error(wo("name"));const r=n.name;if(t=r,Lt.call(n,"weight")&&(a=n.weight,a<=0))throw new Error(So(r));e=Tt(r),s=ft(r),o=n.getFn}return{path:e,id:s,weight:a,src:t,getFn:o}}function Tt(n){return ke(n)?n:n.split(".")}function ft(n){return ke(n)?n.join("."):n}function Co(n,e){let s=[],t=!1;const a=(o,r,l)=>{if(te(o))if(!r[l])s.push(o);else{let c=r[l];const d=o[c];if(!te(d))return;if(l===r.length-1&&(ue(d)||on(d)||mo(d)))s.push(go(d));else if(ke(d)){t=!0;for(let h=0,f=d.length;h<f;h+=1)a(d[h],r,l+1)}else r.length&&a(d,r,l+1)}};return a(n,ue(e)?e.split("."):e,0),t?s:s[0]}const $o={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Eo={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(n,e)=>n.score===e.score?n.idx<e.idx?-1:1:n.score<e.score?-1:1},Io={location:0,threshold:.6,distance:100},Po={useExtendedSearch:!1,getFn:Co,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var x={...Eo,...$o,...Io,...Po};const Ro=/[^ ]+/g;function No(n=1,e=3){const s=new Map,t=Math.pow(10,e);return{get(a){const o=a.match(Ro).length;if(s.has(o))return s.get(o);const r=1/Math.pow(o,.5*n),l=parseFloat(Math.round(r*t)/t);return s.set(o,l),l},clear(){s.clear()}}}class wt{constructor({getFn:e=x.getFn,fieldNormWeight:s=x.fieldNormWeight}={}){this.norm=No(s,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((s,t)=>{this._keysMap[s.id]=t})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,ue(this.docs[0])?this.docs.forEach((e,s)=>{this._addString(e,s)}):this.docs.forEach((e,s)=>{this._addObject(e,s)}),this.norm.clear())}add(e){const s=this.size();ue(e)?this._addString(e,s):this._addObject(e,s)}removeAt(e){this.records.splice(e,1);for(let s=e,t=this.size();s<t;s+=1)this.records[s].i-=1}getValueForItemAtKeyId(e,s){return e[this._keysMap[s]]}size(){return this.records.length}_addString(e,s){if(!te(e)||it(e))return;let t={v:e,i:s,n:this.norm.get(e)};this.records.push(t)}_addObject(e,s){let t={i:s,$:{}};this.keys.forEach((a,o)=>{let r=a.getFn?a.getFn(e):this.getFn(e,a.path);if(te(r)){if(ke(r)){let l=[];const c=[{nestedArrIndex:-1,value:r}];for(;c.length;){const{nestedArrIndex:d,value:h}=c.pop();if(te(h))if(ue(h)&&!it(h)){let f={v:h,i:d,n:this.norm.get(h)};l.push(f)}else ke(h)&&h.forEach((f,g)=>{c.push({nestedArrIndex:g,value:f})})}t.$[o]=l}else if(ue(r)&&!it(r)){let l={v:r,n:this.norm.get(r)};t.$[o]=l}}}),this.records.push(t)}toJSON(){return{keys:this.keys,records:this.records}}}function cn(n,e,{getFn:s=x.getFn,fieldNormWeight:t=x.fieldNormWeight}={}){const a=new wt({getFn:s,fieldNormWeight:t});return a.setKeys(n.map(ln)),a.setSources(e),a.create(),a}function Ao(n,{getFn:e=x.getFn,fieldNormWeight:s=x.fieldNormWeight}={}){const{keys:t,records:a}=n,o=new wt({getFn:e,fieldNormWeight:s});return o.setKeys(t),o.setIndexRecords(a),o}function Ge(n,{errors:e=0,currentLocation:s=0,expectedLocation:t=0,distance:a=x.distance,ignoreLocation:o=x.ignoreLocation}={}){const r=e/n.length;if(o)return r;const l=Math.abs(t-s);return a?r+l/a:l?1:r}function Lo(n=[],e=x.minMatchCharLength){let s=[],t=-1,a=-1,o=0;for(let r=n.length;o<r;o+=1){let l=n[o];l&&t===-1?t=o:!l&&t!==-1&&(a=o-1,a-t+1>=e&&s.push([t,a]),t=-1)}return n[o-1]&&o-t>=e&&s.push([t,o-1]),s}const Ee=32;function To(n,e,s,{location:t=x.location,distance:a=x.distance,threshold:o=x.threshold,findAllMatches:r=x.findAllMatches,minMatchCharLength:l=x.minMatchCharLength,includeMatches:c=x.includeMatches,ignoreLocation:d=x.ignoreLocation}={}){if(e.length>Ee)throw new Error(xo(Ee));const h=e.length,f=n.length,g=Math.max(0,Math.min(t,f));let m=o,y=g;const k=l>1||c,_=k?Array(f):[];let p;for(;(p=n.indexOf(e,y))>-1;){let C=Ge(e,{currentLocation:p,expectedLocation:g,distance:a,ignoreLocation:d});if(m=Math.min(C,m),y=p+h,k){let G=0;for(;G<h;)_[p+G]=1,G+=1}}y=-1;let A=[],D=1,J=h+f;const w=1<<h-1;for(let C=0;C<h;C+=1){let G=0,L=J;for(;G<L;)Ge(e,{errors:C,currentLocation:g+L,expectedLocation:g,distance:a,ignoreLocation:d})<=m?G=L:J=L,L=Math.floor((J-G)/2+G);J=L;let F=Math.max(1,g-L+1),re=r?f:Math.min(g+L,f)+h,le=Array(re+2);le[re+1]=(1<<C)-1;for(let z=re;z>=F;z-=1){let se=z-1,Pe=s[n.charAt(se)];if(k&&(_[se]=+!!Pe),le[z]=(le[z+1]<<1|1)&Pe,C&&(le[z]|=(A[z+1]|A[z])<<1|1|A[z+1]),le[z]&w&&(D=Ge(e,{errors:C,currentLocation:se,expectedLocation:g,distance:a,ignoreLocation:d}),D<=m)){if(m=D,y=se,y<=g)break;F=Math.max(1,2*g-y)}}if(Ge(e,{errors:C+1,currentLocation:g,expectedLocation:g,distance:a,ignoreLocation:d})>m)break;A=le}const T={isMatch:y>=0,score:Math.max(.001,D)};if(k){const C=Lo(_,l);C.length?c&&(T.indices=C):T.isMatch=!1}return T}function Oo(n){let e={};for(let s=0,t=n.length;s<t;s+=1){const a=n.charAt(s);e[a]=(e[a]||0)|1<<t-s-1}return e}class un{constructor(e,{location:s=x.location,threshold:t=x.threshold,distance:a=x.distance,includeMatches:o=x.includeMatches,findAllMatches:r=x.findAllMatches,minMatchCharLength:l=x.minMatchCharLength,isCaseSensitive:c=x.isCaseSensitive,ignoreLocation:d=x.ignoreLocation}={}){if(this.options={location:s,threshold:t,distance:a,includeMatches:o,findAllMatches:r,minMatchCharLength:l,isCaseSensitive:c,ignoreLocation:d},this.pattern=c?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const h=(g,m)=>{this.chunks.push({pattern:g,alphabet:Oo(g),startIndex:m})},f=this.pattern.length;if(f>Ee){let g=0;const m=f%Ee,y=f-m;for(;g<y;)h(this.pattern.substr(g,Ee),g),g+=Ee;if(m){const k=f-Ee;h(this.pattern.substr(k),k)}}else h(this.pattern,0)}searchIn(e){const{isCaseSensitive:s,includeMatches:t}=this.options;if(s||(e=e.toLowerCase()),this.pattern===e){let y={isMatch:!0,score:0};return t&&(y.indices=[[0,e.length-1]]),y}const{location:a,distance:o,threshold:r,findAllMatches:l,minMatchCharLength:c,ignoreLocation:d}=this.options;let h=[],f=0,g=!1;this.chunks.forEach(({pattern:y,alphabet:k,startIndex:_})=>{const{isMatch:p,score:A,indices:D}=To(e,y,k,{location:a+_,distance:o,threshold:r,findAllMatches:l,minMatchCharLength:c,includeMatches:t,ignoreLocation:d});p&&(g=!0),f+=A,p&&D&&(h=[...h,...D])});let m={isMatch:g,score:g?f/this.chunks.length:1};return g&&t&&(m.indices=h),m}}class Ce{constructor(e){this.pattern=e}static isMultiMatch(e){return Ot(e,this.multiRegex)}static isSingleMatch(e){return Ot(e,this.singleRegex)}search(){}}function Ot(n,e){const s=n.match(e);return s?s[1]:null}class Do extends Ce{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const s=e===this.pattern;return{isMatch:s,score:s?0:1,indices:[0,this.pattern.length-1]}}}class Fo extends Ce{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const t=e.indexOf(this.pattern)===-1;return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class Bo extends Ce{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const s=e.startsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,this.pattern.length-1]}}}class Vo extends Ce{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const s=!e.startsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}}class jo extends Ce{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const s=e.endsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class zo extends Ce{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const s=!e.endsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}}class dn extends Ce{constructor(e,{location:s=x.location,threshold:t=x.threshold,distance:a=x.distance,includeMatches:o=x.includeMatches,findAllMatches:r=x.findAllMatches,minMatchCharLength:l=x.minMatchCharLength,isCaseSensitive:c=x.isCaseSensitive,ignoreLocation:d=x.ignoreLocation}={}){super(e),this._bitapSearch=new un(e,{location:s,threshold:t,distance:a,includeMatches:o,findAllMatches:r,minMatchCharLength:l,isCaseSensitive:c,ignoreLocation:d})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class hn extends Ce{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let s=0,t;const a=[],o=this.pattern.length;for(;(t=e.indexOf(this.pattern,s))>-1;)s=t+o,a.push([t,s-1]);const r=!!a.length;return{isMatch:r,score:r?0:1,indices:a}}}const pt=[Do,hn,Bo,Vo,zo,jo,Fo,dn],Dt=pt.length,Wo=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Go="|";function Ko(n,e={}){return n.split(Go).map(s=>{let t=s.trim().split(Wo).filter(o=>o&&!!o.trim()),a=[];for(let o=0,r=t.length;o<r;o+=1){const l=t[o];let c=!1,d=-1;for(;!c&&++d<Dt;){const h=pt[d];let f=h.isMultiMatch(l);f&&(a.push(new h(f,e)),c=!0)}if(!c)for(d=-1;++d<Dt;){const h=pt[d];let f=h.isSingleMatch(l);if(f){a.push(new h(f,e));break}}}return a})}const Ho=new Set([dn.type,hn.type]);class Yo{constructor(e,{isCaseSensitive:s=x.isCaseSensitive,includeMatches:t=x.includeMatches,minMatchCharLength:a=x.minMatchCharLength,ignoreLocation:o=x.ignoreLocation,findAllMatches:r=x.findAllMatches,location:l=x.location,threshold:c=x.threshold,distance:d=x.distance}={}){this.query=null,this.options={isCaseSensitive:s,includeMatches:t,minMatchCharLength:a,findAllMatches:r,ignoreLocation:o,location:l,threshold:c,distance:d},this.pattern=s?e:e.toLowerCase(),this.query=Ko(this.pattern,this.options)}static condition(e,s){return s.useExtendedSearch}searchIn(e){const s=this.query;if(!s)return{isMatch:!1,score:1};const{includeMatches:t,isCaseSensitive:a}=this.options;e=a?e:e.toLowerCase();let o=0,r=[],l=0;for(let c=0,d=s.length;c<d;c+=1){const h=s[c];r.length=0,o=0;for(let f=0,g=h.length;f<g;f+=1){const m=h[f],{isMatch:y,indices:k,score:_}=m.search(e);if(y){if(o+=1,l+=_,t){const p=m.constructor.type;Ho.has(p)?r=[...r,...k]:r.push(k)}}else{l=0,o=0,r.length=0;break}}if(o){let f={isMatch:!0,score:l/o};return t&&(f.indices=r),f}}return{isMatch:!1,score:1}}}const _t=[];function Uo(...n){_t.push(...n)}function gt(n,e){for(let s=0,t=_t.length;s<t;s+=1){let a=_t[s];if(a.condition(n,e))return new a(n,e)}return new un(n,e)}const Ze={AND:"$and",OR:"$or"},mt={PATH:"$path",PATTERN:"$val"},yt=n=>!!(n[Ze.AND]||n[Ze.OR]),Xo=n=>!!n[mt.PATH],Jo=n=>!ke(n)&&an(n)&&!yt(n),Ft=n=>({[Ze.AND]:Object.keys(n).map(e=>({[e]:n[e]}))});function vn(n,e,{auto:s=!0}={}){const t=a=>{let o=Object.keys(a);const r=Xo(a);if(!r&&o.length>1&&!yt(a))return t(Ft(a));if(Jo(a)){const c=r?a[mt.PATH]:o[0],d=r?a[mt.PATTERN]:a[c];if(!ue(d))throw new Error(ko(c));const h={keyId:ft(c),pattern:d};return s&&(h.searcher=gt(d,e)),h}let l={children:[],operator:o[0]};return o.forEach(c=>{const d=a[c];ke(d)&&d.forEach(h=>{l.children.push(t(h))})}),l};return yt(n)||(n=Ft(n)),t(n)}function Qo(n,{ignoreFieldNorm:e=x.ignoreFieldNorm}){n.forEach(s=>{let t=1;s.matches.forEach(({key:a,norm:o,score:r})=>{const l=a?a.weight:null;t*=Math.pow(r===0&&l?Number.EPSILON:r,(l||1)*(e?1:o))}),s.score=t})}function Zo(n,e){const s=n.matches;e.matches=[],te(s)&&s.forEach(t=>{if(!te(t.indices)||!t.indices.length)return;const{indices:a,value:o}=t;let r={indices:a,value:o};t.key&&(r.key=t.key.src),t.idx>-1&&(r.refIndex=t.idx),e.matches.push(r)})}function qo(n,e){e.score=n.score}function ea(n,e,{includeMatches:s=x.includeMatches,includeScore:t=x.includeScore}={}){const a=[];return s&&a.push(Zo),t&&a.push(qo),n.map(o=>{const{idx:r}=o,l={item:e[r],refIndex:r};return a.length&&a.forEach(c=>{c(o,l)}),l})}class Le{constructor(e,s={},t){this.options={...x,...s},this.options.useExtendedSearch,this._keyStore=new Mo(this.options.keys),this.setCollection(e,t)}setCollection(e,s){if(this._docs=e,s&&!(s instanceof wt))throw new Error(bo);this._myIndex=s||cn(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){te(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const s=[];for(let t=0,a=this._docs.length;t<a;t+=1){const o=this._docs[t];e(o,t)&&(this.removeAt(t),t-=1,a-=1,s.push(o))}return s}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:s=-1}={}){const{includeMatches:t,includeScore:a,shouldSort:o,sortFn:r,ignoreFieldNorm:l}=this.options;let c=ue(e)?ue(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Qo(c,{ignoreFieldNorm:l}),o&&c.sort(r),on(s)&&s>-1&&(c=c.slice(0,s)),ea(c,this._docs,{includeMatches:t,includeScore:a})}_searchStringList(e){const s=gt(e,this.options),{records:t}=this._myIndex,a=[];return t.forEach(({v:o,i:r,n:l})=>{if(!te(o))return;const{isMatch:c,score:d,indices:h}=s.searchIn(o);c&&a.push({item:o,idx:r,matches:[{score:d,value:o,norm:l,indices:h}]})}),a}_searchLogical(e){const s=vn(e,this.options),t=(l,c,d)=>{if(!l.children){const{keyId:f,searcher:g}=l,m=this._findMatches({key:this._keyStore.get(f),value:this._myIndex.getValueForItemAtKeyId(c,f),searcher:g});return m&&m.length?[{idx:d,item:c,matches:m}]:[]}const h=[];for(let f=0,g=l.children.length;f<g;f+=1){const m=l.children[f],y=t(m,c,d);if(y.length)h.push(...y);else if(l.operator===Ze.AND)return[]}return h},a=this._myIndex.records,o={},r=[];return a.forEach(({$:l,i:c})=>{if(te(l)){let d=t(s,l,c);d.length&&(o[c]||(o[c]={idx:c,item:l,matches:[]},r.push(o[c])),d.forEach(({matches:h})=>{o[c].matches.push(...h)}))}}),r}_searchObjectList(e){const s=gt(e,this.options),{keys:t,records:a}=this._myIndex,o=[];return a.forEach(({$:r,i:l})=>{if(!te(r))return;let c=[];t.forEach((d,h)=>{c.push(...this._findMatches({key:d,value:r[h],searcher:s}))}),c.length&&o.push({idx:l,item:r,matches:c})}),o}_findMatches({key:e,value:s,searcher:t}){if(!te(s))return[];let a=[];if(ke(s))s.forEach(({v:o,i:r,n:l})=>{if(!te(o))return;const{isMatch:c,score:d,indices:h}=t.searchIn(o);c&&a.push({score:d,key:e,value:o,idx:r,norm:l,indices:h})});else{const{v:o,n:r}=s,{isMatch:l,score:c,indices:d}=t.searchIn(o);l&&a.push({score:c,key:e,value:o,norm:r,indices:d})}return a}}Le.version="7.0.0";Le.createIndex=cn;Le.parseIndex=Ao;Le.config=x;Le.parseQuery=vn;Uo(Yo);const ta={class:"bg-main transform",shadow:"~",p:"x-4 y-2",border:"~ transparent rounded dark:main"},na=["value","disabled"],sa={table:"","w-full":"","border-collapse":""},oa=["border","onClick"],aa={"text-right":"",op50:"","text-sm":"","table-cell":"","py-2":"","pl-4":"","pr-3":"","vertical-middle":""},ra=he({__name:"Goto",setup(n){const e=K(),s=K(),t=K(),a=K(),o=K(""),r=K(0),{go:l,slides:c}=Me();function d(w){return w!=null}const h=N(()=>new Le(c.value.map(w=>{var T;return(T=w.meta)==null?void 0:T.slide}).filter(d),{keys:["no","title"],threshold:.3,shouldSort:!0,minMatchCharLength:1})),f=N(()=>o.value.startsWith("/")?o.value.substring(1):o.value),g=N(()=>h.value.search(f.value).map(w=>w.item)),m=N(()=>!!g.value.length);function y(){if(m.value){const w=g.value.at(r.value||0);w&&l(w.no)}k()}function k(){o.value="",we.value=!1}function _(w){w.preventDefault(),r.value++,r.value>=g.value.length&&(r.value=0),A()}function p(w){w.preventDefault(),r.value--,r.value<=-2&&(r.value=g.value.length-1),A()}function A(){var T;const w=(T=a.value)==null?void 0:T[r.value];w&&t.value&&(w.offsetTop+w.offsetHeight>t.value.offsetHeight+t.value.scrollTop?t.value.scrollTo({behavior:"smooth",top:w.offsetTop+w.offsetHeight-t.value.offsetHeight+1}):w.offsetTop<t.value.scrollTop&&t.value.scrollTo({behavior:"smooth",top:w.offsetTop}))}function D(w){r.value=0,o.value=w.target.value}function J(w){l(w),k()}return De(we,async w=>{var T;w?(o.value="",r.value=0,setTimeout(()=>{var C;return(C=s.value)==null?void 0:C.focus()},0)):(T=s.value)==null||T.blur()}),De(Oe,()=>{var w;(w=e.value)!=null&&w.contains(Oe.value)||k()}),(w,T)=>(i(),v("div",{id:"slidev-goto-dialog",ref_key:"container",ref:e,class:Z(["fixed right-5 transition-all",u(we)?"top-5":"-top-20"]),"w-90":"","max-w-90":"","min-w-90":""},[$("div",ta,[$("input",{id:"slidev-goto-input",ref_key:"input",ref:s,value:o.value,type:"text",disabled:!u(we),class:Z(["outline-none bg-transparent",{"text-red-400":!m.value&&o.value}]),placeholder:"Goto...",onKeydown:[Ve(y,["enter"]),Ve(k,["escape"]),Ve(_,["down"]),Ve(p,["up"])],onInput:D},null,42,na)]),g.value.length>0?(i(),v("div",{key:0,ref_key:"list",ref:t,class:"autocomplete-list",shadow:"~",border:"~ transparent rounded dark:main"},[$("ul",sa,[(i(!0),v(j,null,Fe(g.value,(C,G)=>(i(),v("li",{ref_for:!0,ref_key:"items",ref:a,key:C.id,role:"button",tabindex:"0","cursor-pointer":"",hover:"op100","table-row":"","items-center":"",border:G===0?void 0:"t main",class:Z(r.value===G?"bg-active op100":"op80"),onClick:Gt(L=>J(C.no),["stop","prevent"])},[$("div",aa,de(C.no),1),I(u(fo),{"table-cell":"","py-2":"","pr-4":"","w-full":"",no:C.no},null,8,["no"])],10,oa))),128))])],512)):S("v-if",!0)],2))}}),Xa=qe(ra,[["__scopeId","data-v-cba06e55"]]),la={render:()=>[]},ia={key:0,class:"rounded-md bg-main text-main shadow absolute bottom-10 left-0 z-20","dark:border":"~ main"},ca=he({__name:"MenuButton",props:{modelValue:{default:!1},disabled:{default:!1}},setup(n,{emit:e}){const a=Kt(n,"modelValue",e,{passive:!0}),o=K();return zt(o,()=>{a.value=!1}),(r,l)=>(i(),v("div",{ref_key:"el",ref:o,class:"flex relative"},[$("button",{class:Z({disabled:n.disabled}),onClick:l[0]||(l[0]=c=>a.value=!u(a))},[Mt(r.$slots,"button",{class:Z({disabled:n.disabled})})],2),(i(),R(bn,null,[u(a)?(i(),v("div",ia,[Mt(r.$slots,"menu")])):S("v-if",!0)],1024))],512))}}),ua={class:"select-list"},da={class:"title"},ha={class:"items"},va=["onClick"],fa=he({__name:"SelectList",props:{modelValue:{type:[Object,String,Number,Boolean]},title:{type:String},items:{type:Array}},setup(n,{emit:e}){const a=Kt(n,"modelValue",e,{passive:!0});return(o,r)=>{const l=Jn;return i(),v("div",ua,[$("div",da,de(n.title),1),$("div",ha,[(i(!0),v(j,null,Fe(n.items,c=>(i(),v("div",{key:c.value,class:Z(["item",{active:u(a)===c.value}]),onClick:()=>{var d;a.value=c.value,(d=c.onClick)==null||d.call(c)}},[I(l,{class:Z(["text-green-500",{"opacity-0":u(a)!==c.value}])},null,8,["class"]),Se(" "+de(c.display||c.value),1)],10,va))),128))])])}}}),Bt=qe(fa,[["__scopeId","data-v-553818ec"]]),pa={class:"text-sm select-none"},_a=he({__name:"Settings",setup(n){const e=[{display:"Fit",value:0},{display:"1:1",value:1}],{isSupported:s}=jt(),t=[{display:"Enabled",value:!0},{display:"Disabled",value:!1}];return(a,o)=>(i(),v("div",pa,[I(Bt,{modelValue:u(rt),"onUpdate:modelValue":o[0]||(o[0]=r=>Ct(rt)?rt.value=r:null),title:"Scale",items:e},null,8,["modelValue"]),u(s)?(i(),R(Bt,{key:0,modelValue:u(Ye),"onUpdate:modelValue":o[1]||(o[1]=r=>Ct(Ye)?Ye.value=r:null),title:"Wake lock",items:t},null,8,["modelValue"])):S("v-if",!0)]))}}),ga={class:"h-40px flex",p:"l-1 t-0.5 r-2",text:"sm leading-2"},ma={class:"my-auto"},ya={class:"opacity-50"},Ja=he({__name:"NavControls",props:{persist:{default:!1}},setup(n){const e=n,{currentSlideNo:s,hasNext:t,hasPrev:a,isEmbedded:o,isPresenter:r,isPresenterAvailable:l,next:c,prev:d,total:h,enterPresenter:f,exitPresenter:g}=Me(),{brush:m,drawingEnabled:y}=et(),k=dt.smaller("md"),{isFullscreen:_,toggle:p}=kt,A=K();function D(){A.value&&Oe.value&&A.value.contains(Oe.value)&&Oe.value.blur()}const J=N(()=>e.persist?"text-$slidev-controls-foreground bg-transparent":"rounded-md bg-main shadow dark:border dark:border-main"),w=bt();return(T,C)=>{const G=nn,L=sn,F=Jt,re=Qt,le=qt,$e=Qn,z=Zn,se=qn,Pe=es,Re=Zt,tt=en,nt=tn,st=ts,ot=ns,b=ss,O=os;return i(),v("nav",{ref_key:"root",ref:A,class:"flex flex-col"},[$("div",{class:Z(["flex flex-wrap-reverse text-xl gap-0.5 p-1 lg:gap-1 lg:p-2",J.value]),onMouseleave:D},[u(o)?S("v-if",!0):(i(),R(X,{key:0,title:u(_)?"Close fullscreen":"Enter fullscreen",onClick:u(p)},{default:V(()=>[u(_)?(i(),R(G,{key:0})):(i(),R(L,{key:1}))]),_:1},8,["title","onClick"])),I(X,{class:Z({disabled:!u(a)}),title:"Go to previous slide",onClick:u(d)},{default:V(()=>[I(F)]),_:1},8,["class","onClick"]),I(X,{class:Z({disabled:!u(t)}),title:"Go to next slide",onClick:u(c)},{default:V(()=>[I(re)]),_:1},8,["class","onClick"]),u(o)?S("v-if",!0):(i(),R(X,{key:1,title:"Show slide overview",onClick:C[0]||(C[0]=P=>u(Qe)())},{default:V(()=>[I(le)]),_:1})),u(Gn)?S("v-if",!0):(i(),R(X,{key:2,title:u(Pt)?"Switch to light mode theme":"Switch to dark mode theme",onClick:C[1]||(C[1]=P=>u(vt)())},{default:V(()=>[u(Pt)?(i(),R($e,{key:0})):(i(),R(z,{key:1}))]),_:1},8,["title"])),I(We),u(o)?S("v-if",!0):(i(),v(j,{key:3},[!u(r)&&!u(k)&&w.value?(i(),v(j,{key:0},[I(u(w)),I(We)],64)):S("v-if",!0),u(r)?(i(),R(X,{key:1,title:u(ze)?"Hide presenter cursor":"Show presenter cursor",onClick:C[2]||(C[2]=P=>ze.value=!u(ze))},{default:V(()=>[u(ze)?(i(),R(se,{key:0})):(i(),R(Pe,{key:1}))]),_:1},8,["title"])):S("v-if",!0)],64)),(!u(be).drawings.presenterOnly||u(r))&&!u(o)?(i(),v(j,{key:4},[I(X,{class:"relative",title:u(y)?"Hide drawing toolbar":"Show drawing toolbar",onClick:C[3]||(C[3]=P=>y.value=!u(y))},{default:V(()=>[I(Re),u(y)?(i(),v("div",{key:0,class:"absolute left-1 right-1 bottom-0 h-0.7 rounded-full",style:Ae({background:u(m).color})},null,4)):S("v-if",!0)]),_:1},8,["title"]),I(We)],64)):S("v-if",!0),u(o)?S("v-if",!0):(i(),v(j,{key:5},[u(r)?(i(),R(X,{key:0,title:"Play Mode",onClick:u(g)},{default:V(()=>[I(tt)]),_:1},8,["onClick"])):S("v-if",!0),u(l)?(i(),R(X,{key:1,title:"Presenter Mode",onClick:u(f)},{default:V(()=>[I(nt)]),_:1},8,["onClick"])):S("v-if",!0),S("v-if",!0),u(r)?(i(),R(X,{key:3,title:"Toggle Presenter Layout",class:"aspect-ratio-initial",onClick:u(Rn)},{default:V(()=>[I(st),Se(" "+de(u(Pn)),1)]),_:1},8,["onClick"])):S("v-if",!0)],64)),(i(),v(j,{key:6},[u(be).download?(i(),R(X,{key:0,title:"Download as PDF",onClick:u(Ht)},{default:V(()=>[I(ot)]),_:1},8,["onClick"])):S("v-if",!0)],64)),!u(r)&&u(be).info&&!u(o)?(i(),R(X,{key:7,title:"Show info",onClick:C[5]||(C[5]=P=>$t.value=!u($t))},{default:V(()=>[I(b)]),_:1})):S("v-if",!0),!u(r)&&!u(o)?(i(),R(ca,{key:8},{button:V(()=>[I(X,{title:"Adjust settings"},{default:V(()=>[I(O)]),_:1})]),menu:V(()=>[I(_a)]),_:1})):S("v-if",!0),u(o)?S("v-if",!0):(i(),R(We,{key:9})),$("div",ga,[$("div",ma,[Se(de(u(s))+" ",1),$("span",ya,"/ "+de(u(h)),1)])]),I(u(la))],34)],512)}}}),Ue=K(1),Xe=N(()=>Nn.value.length),H=K(0),St=K(0);function ba(){H.value>Ue.value&&(H.value-=1)}function ka(){H.value<Xe.value&&(H.value+=1)}function xa(){if(H.value>Ue.value){let n=H.value-St.value;n<Ue.value&&(n=Ue.value),H.value=n}}function wa(){if(H.value<Xe.value){let n=H.value+St.value;n>Xe.value&&(n=Xe.value),H.value=n}}const Sa=["onClick"],Ma={class:"text-green font-bold"},Ca={class:"opacity-50"},$a={key:1,class:"opacity-50"},Ea={key:0,class:"fixed top-4 right-4 z-20 text-gray-400 flex flex-col items-center gap-2"},ct=4*16*2,Vt=2*16,Qa=he({__name:"QuickOverview",setup(n){const{currentSlideNo:e,go:s,slides:t}=Me();function a(){ee.value=!1}function o(g){s(g),a()}function r(g){return g===H.value}const l=dt.smaller("xs"),c=dt.smaller("sm"),d=N(()=>l.value?Ie.width.value-ct:c.value?(Ie.width.value-ct-Vt)/2:300),h=N(()=>Math.floor((Ie.width.value-ct)/(d.value+Vt))),f=K("");return Wt("keypress",g=>{if(!ee.value){f.value="";return}if(g.key==="Enter"){g.preventDefault(),f.value?(o(+f.value),f.value=""):o(H.value);return}const m=Number.parseInt(g.key.replace(/\D/g,""));if(Number.isNaN(m)){f.value="";return}if(!f.value&&m===0)return;if(f.value+=String(m),+f.value>=t.value.length){f.value="";return}const y=t.value.findIndex(k=>`/${k.no}`===f.value);y!==-1&&(H.value=y+1),+f.value*10>t.value.length&&(o(+f.value),f.value="")}),Je(()=>{H.value=e.value,St.value=h.value}),(g,m)=>{const y=as,k=rs;return i(),v(j,null,[I(kn,{"enter-active-class":"duration-150 ease-out","enter-from-class":"opacity-0 scale-102 !backdrop-blur-0px","leave-active-class":"duration-200 ease-in","leave-to-class":"opacity-0 scale-102 !backdrop-blur-0px"},{default:V(()=>[u(ee)?(i(),v("div",{key:0,class:"fixed left-0 right-0 top-0 h-[calc(var(--vh,1vh)*100)] z-20 bg-main !bg-opacity-75 p-16 py-20 overflow-y-auto backdrop-blur-5px select-none",onClick:a},[$("div",{class:"grid gap-y-4 gap-x-8 w-full",style:Ae(`grid-template-columns: repeat(auto-fit,minmax(${d.value}px,1fr))`)},[(i(!0),v(j,null,Fe(u(t),(_,p)=>(i(),v("div",{key:_.no,class:"relative"},[$("div",{class:Z(["inline-block border rounded overflow-hidden bg-main hover:border-primary transition",r(p+1)||u(H)===p+1?"border-primary":"border-main"]),onClick:A=>o(_.no)},[(i(),R(Bn,{key:_.no,no:_.no,"use-snapshot":u(be).overviewSnapshots,width:d.value,class:"pointer-events-none"},{default:V(()=>[I(Xt,{"clicks-context":u(Yt)(_,u(Ut)),route:_,"render-context":"overview"},null,8,["clicks-context","route"]),I(Vn,{page:_.no},null,8,["page"])]),_:2},1032,["no","use-snapshot","width"]))],10,Sa),$("div",{class:"absolute top-0",style:Ae(`left: ${d.value+5}px`)},[f.value&&String(p+1).startsWith(f.value)?(i(),v(j,{key:0},[$("span",Ma,de(f.value),1),$("span",Ca,de(String(p+1).slice(f.value.length)),1)],64)):(i(),v("span",$a,de(p+1),1))],4)]))),128))],4)])):S("v-if",!0)]),_:1}),u(ee)?(i(),v("div",Ea,[I(X,{title:"Close",class:"text-2xl",onClick:a},{default:V(()=>[I(y)]),_:1}),(i(),R(X,{key:0,as:"a",title:"Slides Overview",target:"_blank",href:`${u(Kn)}overview`,"tab-index":"-1",class:"text-2xl"},{default:V(()=>[I(k)]),_:1},8,["href"]))])):S("v-if",!0)],64)}}});function Ia(){const n=xn(),e=K(!1);let s,t;const a=typeof document<"u"&&"startViewTransition"in document;return n.beforeResolve((o,r)=>{var k,_,p,A;const l=(k=Et(r.params.no))==null?void 0:k.meta,c=(_=Et(o.params.no))==null?void 0:_.meta,d=(p=l==null?void 0:l.slide)==null?void 0:p.no,h=(A=c==null?void 0:c.slide)==null?void 0:A.no;if((d!=null&&h!=null&&((d<h?l==null?void 0:l.transition:c==null?void 0:c.transition)??be.transition))!=="view-transition"){e.value=!1;return}if(!a){e.value=!1,console.warn("View transition is not supported in your browser, fallback to normal transition.");return}e.value=!0;const g=new Promise((D,J)=>{s=D,t=J});let m;const y=new Promise(D=>m=D);return setTimeout(()=>{document.startViewTransition(()=>(m(),g))},50),y}),a&&n.afterEach(()=>{s==null||s(),t==null||t()}),e}const Pa=["data-drag-id"],oe=10,xe=10,ut="absolute border border-gray bg-gray dark:border-gray-500 dark:bg-gray-800 bg-opacity-30 ",Ke=20,Ra=he({__name:"DragControl",props:{data:{}},setup(n){const{dragId:e,zoom:s,autoHeight:t,x0:a,y0:o,width:r,height:l,rotate:c,isArrow:d}=n.data,h=wn(An,K(1)),f=N(()=>h.value*s.value),{left:g,top:m}=Ln(),y=d?Number.NEGATIVE_INFINITY:40,k=N(()=>c.value*Math.PI/180),_=N(()=>Math.sin(k.value)),p=N(()=>Math.cos(k.value)),A=N(()=>r.value*p.value+l.value*_.value),D=N(()=>r.value*_.value+l.value*p.value),J=N(()=>a.value-A.value/2),w=N(()=>o.value-D.value/2),T=N(()=>a.value+A.value/2),C=N(()=>o.value+D.value/2),G=N(()=>d&&r.value<0),L=N(()=>d&&l.value<0);let F=null;function re(b){if(b.buttons!==1)return;b.preventDefault(),b.stopPropagation();const P=b.target.getBoundingClientRect(),M=r.value*p.value-l.value*_.value,E=r.value*_.value+l.value*p.value,Y=r.value*p.value+l.value*_.value,ne=-r.value*_.value+l.value*p.value;F={x0:a.value,y0:o.value,width:r.value,height:l.value,rotate:c.value,dx0:b.clientX-(P.left+P.right)/2,dy0:b.clientY-(P.top+P.bottom)/2,ltx:a.value-M/2,lty:o.value-E/2,rtx:a.value+Y/2,rty:o.value-ne/2,lbx:a.value-Y/2,lby:o.value+ne/2,rbx:a.value+M/2,rby:o.value+E/2},b.currentTarget.setPointerCapture(b.pointerId)}function le(b){if(!F||b.buttons!==1)return;b.preventDefault(),b.stopPropagation();const O=(b.clientX-g.value-F.dx0)/f.value,P=(b.clientY-m.value-F.dy0)/f.value;a.value=Rt(O,-A.value/2+xe,Nt.value+A.value/2-xe),o.value=Rt(P,-D.value/2+xe,At.value+D.value/2-xe)}function $e(b){F&&(b.preventDefault(),b.stopPropagation(),F=null)}function z(b,O){return{onPointerdown:re,onPointermove:P=>{if(!F||P.buttons!==1)return;P.preventDefault(),P.stopPropagation();let M=(P.clientX-g.value)/f.value,E=(P.clientY-m.value)/f.value;const{ltx:Y,lty:ne,rtx:ve,rty:fe,lbx:pe,lby:_e,rbx:ge,rby:W}=F,U=F.width/F.height,pn=Math.max(y,y*U);function Be(ie,ce){if(P.shiftKey){const Q=Math.max(ie,ce*U,pn),q=Q/U;return{w:Q,h:q}}else return{w:Math.max(ie,y),h:Math.max(ce,y)}}if(b)if(O){const ie=(ge-M)*p.value+(W-E)*_.value,ce=-(ge-M)*_.value+(W-E)*p.value,{w:Q,h:q}=Be(ie,ce);M=ge-Q*p.value+q*_.value,E=W-Q*_.value-q*p.value}else{const ie=(ve-M)*p.value-(E-fe)*_.value,ce=(ve-M)*_.value+(E-fe)*p.value,{w:Q,h:q}=Be(ie,ce);M=ve-Q*p.value-q*_.value,E=fe-Q*_.value+q*p.value}else if(O){const ie=(M-pe)*p.value-(_e-E)*_.value,ce=(M-pe)*_.value+(_e-E)*p.value,{w:Q,h:q}=Be(ie,ce);M=pe+Q*p.value+q*_.value,E=_e+Q*_.value-q*p.value}else{const ie=(M-Y)*p.value+(E-ne)*_.value,ce=-(M-Y)*_.value+(E-ne)*p.value,{w:Q,h:q}=Be(ie,ce);M=Y+Q*p.value-q*_.value,E=ne+Q*_.value+q*p.value}b?O?(a.value=(M+ge)/2,o.value=(E+W)/2,r.value=(ge-M)*p.value+(W-E)*_.value,l.value=-(ge-M)*_.value+(W-E)*p.value):(a.value=(M+ve)/2,o.value=(E+fe)/2,r.value=(ve-M)*p.value-(E-fe)*_.value,l.value=(ve-M)*_.value+(E-fe)*p.value):O?(a.value=(M+pe)/2,o.value=(E+_e)/2,r.value=(M-pe)*p.value-(_e-E)*_.value,l.value=(M-pe)*_.value+(_e-E)*p.value):(a.value=(M+Y)/2,o.value=(E+ne)/2,r.value=(M-Y)*p.value+(E-ne)*_.value,l.value=-(M-Y)*_.value+(E-ne)*p.value)},onPointerup:$e,style:{width:`${oe}px`,height:`${oe}px`,margin:`-${oe/2}px`,left:b!==G.value?"0":void 0,right:b!==G.value?void 0:"0",top:O!==L.value?"0":void 0,bottom:O!==L.value?void 0:"0",cursor:d?"move":+b+ +O==1?"nesw-resize":"nwse-resize",borderRadius:d?"50%":void 0},class:ut}}function se(b){return{onPointerdown:re,onPointermove:O=>{if(!F||O.buttons!==1)return;O.preventDefault(),O.stopPropagation();const P=(O.clientX-g.value)/f.value,M=(O.clientY-m.value)/f.value,{ltx:E,lty:Y,rtx:ne,rty:ve,lbx:fe,lby:pe,rbx:_e,rby:ge}=F;if(b==="l"){const W=(ne+_e)/2,U=(ve+ge)/2;r.value=Math.max((W-P)*p.value+(U-M)*_.value,y),a.value=W-r.value*p.value/2,o.value=U-r.value*_.value/2}else if(b==="r"){const W=(E+fe)/2,U=(Y+pe)/2;r.value=Math.max((P-W)*p.value+(M-U)*_.value,y),a.value=W+r.value*p.value/2,o.value=U+r.value*_.value/2}else if(b==="t"){const W=(fe+_e)/2,U=(pe+ge)/2;l.value=Math.max((U-M)*p.value-(W-P)*_.value,y),a.value=W+l.value*_.value/2,o.value=U-l.value*p.value/2}else if(b==="b"){const W=(E+ne)/2,U=(Y+ve)/2;l.value=Math.max((M-U)*p.value-(P-W)*_.value,y),a.value=W-l.value*_.value/2,o.value=U+l.value*p.value/2}},onPointerup:$e,style:{width:`${oe}px`,height:`${oe}px`,margin:`-${oe/2}px`,left:b==="l"?"0":b==="r"?"100%":"50%",top:b==="t"?"0":b==="b"?"100%":"50%",cursor:"lr".includes(b)?"ew-resize":"ns-resize",borderRadius:"50%"},class:ut}}function Pe(){return{onPointerdown:re,onPointermove:b=>{if(!F||b.buttons!==1)return;b.preventDefault(),b.stopPropagation();const O=(b.clientX-g.value-F.dx0)/f.value-oe/4,P=(b.clientY-m.value-F.dy0)/f.value-oe/4;let M=Math.atan2(P-o.value,O-a.value)*180/Math.PI+90;const E=[0,90,180,270,360];for(const Y of E)if(Math.abs(M-Y)<5){M=Y%360;break}c.value=M},onPointerup:$e,style:{width:`${oe}px`,height:`${oe}px`,margin:`-${oe/2}px`,left:"50%",top:"-20px",cursor:"grab",borderRadius:"50%"},class:ut}}const Re={immediate:!1,immediateCallback:!1},tt=je(()=>{T.value<=xe||a.value--},Ke,Re),nt=je(()=>{J.value>=Nt.value-xe||a.value++},Ke,Re),st=je(()=>{C.value<=xe||o.value--},Ke,Re),ot=je(()=>{w.value>=At.value-xe||o.value++},Ke,Re);return Je(()=>{function b(O,P){xt[O].value?P.resume():P.pause()}b("left",tt),b("right",nt),b("up",st),b("down",ot)}),(b,O)=>Number.isFinite(u(a))?(i(),v("div",{key:0,id:"drag-control-container","data-drag-id":u(e),style:Ae({position:"absolute",zIndex:100,left:`${u(s)*(u(a)-Math.abs(u(r))/2)}px`,top:`${u(s)*(u(o)-Math.abs(u(l))/2)}px`,width:`${u(s)*Math.abs(u(r))}px`,height:`${u(s)*Math.abs(u(l))}px`,transformOrigin:"center center",transform:`rotate(${u(c)}deg)`}),onPointerdown:re,onPointermove:le,onPointerup:$e},[$("div",{class:Z(["absolute inset-0 z-100 dark:b-gray-400",u(d)?"":"b b-dark"])},[u(t)?S("v-if",!0):(i(),v(j,{key:0},[$("div",me(ye(z(!0,!0))),null,16),$("div",me(ye(z(!1,!1))),null,16),u(d)?S("v-if",!0):(i(),v(j,{key:0},[$("div",me(ye(z(!0,!1))),null,16),$("div",me(ye(z(!1,!0))),null,16)],64))],64)),u(d)?S("v-if",!0):(i(),v(j,{key:1},[$("div",me(ye(se("l"))),null,16),$("div",me(ye(se("r"))),null,16),u(t)?S("v-if",!0):(i(),v(j,{key:0},[$("div",me(ye(se("t"))),null,16),$("div",me(ye(se("b"))),null,16)],64)),$("div",me(ye(Pe())),null,16),$("div",{class:"absolute -top-15px w-0 b b-dashed b-dark dark:b-gray-400",style:Ae({left:"calc(50% - 1px)",height:u(t)?"14px":"10px"})},null,4)],64))],2)],44,Pa)):S("v-if",!0)}}),Na=he({__name:"SlidesShow",props:{renderContext:{}},setup(n){const{currentSlideRoute:e,currentTransition:s,getPrimaryClicks:t,prevRoute:a,nextRoute:o,slides:r,isPrintMode:l,isPrintWithClicks:c,clicksDirection:d}=Me();function h(k){k.meta.preload!==!1&&(k.meta.__preloaded=!0,k.load())}Je(()=>{h(e.value),h(a.value),h(o.value)}),Je(k=>{const _=r.value,p=setTimeout(()=>{_.forEach(h)},3e3);k(()=>clearTimeout(p))});const f=Ia(),g=bt();Hn(()=>import("./DrawingLayer-DoZ9KrJP.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])).then(k=>g.value=k.default);const m=N(()=>r.value.filter(k=>{var _;return((_=k.meta)==null?void 0:_.__preloaded)||k===e.value}));function y(){It.value=!0,is()}return(k,_)=>(i(),v(j,null,[S(" Global Bottom "),I(u(jn)),S(" Slides "),(i(),R(He(u(f)?"div":Mn),Sn(u(It)?{}:u(s),{id:"slideshow",tag:"div",class:{"slidev-nav-go-forward":u(d)>0,"slidev-nav-go-backward":u(d)<0},onAfterLeave:y}),{default:V(()=>[(i(!0),v(j,null,Fe(m.value,p=>(i(),v(j,{key:p.no},[Math.abs(p.no-u(e).no)<=20?Cn((i(),R(Xt,{key:0,"clicks-context":u(l)&&!u(c)?u(Yt)(p,u(Ut)):u(t)(p),route:p,"render-context":k.renderContext},null,8,["clicks-context","route","render-context"])),[[$n,p===u(e)]]):S("v-if",!0)],64))),128))]),_:1},16,["class"])),u(ht)?(i(),R(Ra,{key:0,data:u(ht)},null,8,["data"])):S("v-if",!0),S(" Global Top "),I(u(zn)),g.value?(i(),R(u(g),{key:1})):S("v-if",!0)],64))}}),Za=qe(Na,[["__scopeId","data-v-721ea928"]]),Aa=[];function La(){const{go:n,goFirst:e,goLast:s,next:t,nextSlide:a,prev:o,prevSlide:r}=Me(),{drawingEnabled:l}=et(),{escape:c,space:d,shift:h,left:f,right:g,up:m,down:y,enter:k,d:_,g:p,o:A,"`":D}=xt,J={next:t,prev:o,nextSlide:a,prevSlide:r,go:n,goFirst:e,goLast:s,downloadPDF:Ht,toggleDark:vt,toggleOverview:Qe,toggleDrawing:()=>l.value=!l.value,escapeOverview:()=>ee.value=!1,showGotoDialog:()=>we.value=!we.value},w=B(ae(ee),ae(ht));let T=[{name:"next_space",key:B(d,ae(h)),fn:t,autoRepeat:!0},{name:"prev_space",key:B(d,h),fn:o,autoRepeat:!0},{name:"next_right",key:B(g,ae(h),w),fn:t,autoRepeat:!0},{name:"prev_left",key:B(f,ae(h),w),fn:o,autoRepeat:!0},{name:"next_page_key",key:"pageDown",fn:t,autoRepeat:!0},{name:"prev_page_key",key:"pageUp",fn:o,autoRepeat:!0},{name:"next_down",key:B(y,w),fn:a,autoRepeat:!0},{name:"prev_up",key:B(m,w),fn:r,autoRepeat:!0},{name:"next_shift",key:B(g,h),fn:a,autoRepeat:!0},{name:"prev_shift",key:B(f,h),fn:r,autoRepeat:!0},{name:"toggle_dark",key:B(_,ae(l)),fn:vt},{name:"toggle_overview",key:B(En(A,D),ae(l)),fn:Qe},{name:"hide_overview",key:B(c,ae(l)),fn:()=>ee.value=!1},{name:"goto",key:B(p,ae(l)),fn:()=>we.value=!we.value},{name:"next_overview",key:B(g,ee),fn:ka},{name:"prev_overview",key:B(f,ee),fn:ba},{name:"up_overview",key:B(m,ee),fn:xa},{name:"down_overview",key:B(y,ee),fn:wa},{name:"goto_from_overview",key:B(k,ee),fn:()=>{n(H.value),ee.value=!1}}];const C=new Set(T.map(L=>L.name));for(const L of Aa){const F=L(J,T);T=T.concat(F)}if(T.filter(L=>L.name&&C.has(L.name)).length===0){const L=["========== WARNING ==========","defineShortcutsSetup did not return any of the base shortcuts.","See https://sli.dev/custom/config-shortcuts.html for migration.",'If it is intentional, return at least one shortcut with one of the base names (e.g. name:"goto").'].join(`
+
+`);alert(L),console.warn(L)}return T}const fn=B(ae(Dn),ae(On),Tn);function Ta(n,e,s=!1){typeof n=="string"&&(n=xt[n]);const t=B(n,fn);let a=0,o;const r=()=>{if(clearTimeout(o),!t.value){a=0;return}s&&(o=setTimeout(r,Math.max(1e3-a*250,150)),a++),e()};return De(t,r,{flush:"sync"})}function Oa(n,e){return In(n,s=>{fn.value&&(s.repeat||e())})}function qa(){const n=La();new Map(n.map(s=>[s.key,s])).forEach(s=>{s.fn&&Ta(s.key,s.fn,s.autoRepeat)}),Oa("f",()=>kt.toggle())}export{Xa as G,Za as S,We as V,Ja as _,Ha as a,Qa as b,Ua as c,Ya as o,qa as r,Ka as u};