From 5db54cf87e39af2fbb6668fccc4a44e1069f8452 Mon Sep 17 00:00:00 2001 From: ChristopherWMM Date: Fri, 23 Aug 2024 06:39:59 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20Christop?= =?UTF-8?q?herWMM/lectures@7365d66104607924b24fc777180cef9f66b79fa3=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/404.html | 10 ++-- test/_redirects | 2 +- test/assets/index-Df4vEvvN.js | 52 +++++++++++++++++++ test/assets/md-C8XcVckz.js | 1 + test/assets/md-Cc1fxSyz.js | 1 + test/assets/slidev/404-8kfwPgJ5.js | 1 + test/assets/slidev/ClicksSlider-Bv3jj13O.js | 1 + .../assets/slidev/DrawingControls-jVv_pSyJ.js | 1 + ...ue_vue_type_style_index_0_lang-BQZjIz1e.js | 1 + test/assets/slidev/DrawingLayer-qn3yOZUe.js | 1 + ...ue_type_script_setup_true_lang-D58kc9wE.js | 1 + test/assets/slidev/context-G025NcPA.js | 1 + test/assets/slidev/entry-DBVNHmWY.js | 1 + test/assets/slidev/intro-mdsqHmL8.js | 1 + test/assets/slidev/notes-D2G3W9tS.js | 1 + test/assets/slidev/overview-D6vhBkpI.js | 1 + test/assets/slidev/play-mGGM2FGe.js | 2 + test/assets/slidev/presenter-CfIGrs6G.js | 1 + test/assets/slidev/useWakeLock-CRYEXDUy.js | 4 ++ test/index.html | 10 ++-- 20 files changed, 83 insertions(+), 11 deletions(-) create mode 100644 test/assets/index-Df4vEvvN.js create mode 100644 test/assets/md-C8XcVckz.js create mode 100644 test/assets/md-Cc1fxSyz.js create mode 100644 test/assets/slidev/404-8kfwPgJ5.js create mode 100644 test/assets/slidev/ClicksSlider-Bv3jj13O.js create mode 100644 test/assets/slidev/DrawingControls-jVv_pSyJ.js create mode 100644 test/assets/slidev/DrawingControls.vue_vue_type_style_index_0_lang-BQZjIz1e.js create mode 100644 test/assets/slidev/DrawingLayer-qn3yOZUe.js create mode 100644 test/assets/slidev/DrawingPreview.vue_vue_type_script_setup_true_lang-D58kc9wE.js create mode 100644 test/assets/slidev/context-G025NcPA.js create mode 100644 test/assets/slidev/entry-DBVNHmWY.js create mode 100644 test/assets/slidev/intro-mdsqHmL8.js create mode 100644 test/assets/slidev/notes-D2G3W9tS.js create mode 100644 test/assets/slidev/overview-D6vhBkpI.js create mode 100644 test/assets/slidev/play-mGGM2FGe.js create mode 100644 test/assets/slidev/presenter-CfIGrs6G.js create mode 100644 test/assets/slidev/useWakeLock-CRYEXDUy.js diff --git a/test/404.html b/test/404.html index 3424210..725193d 100644 --- a/test/404.html +++ b/test/404.html @@ -7,11 +7,11 @@ Welcome to Slidev - Slidev - - - - - + + + + +
diff --git a/test/_redirects b/test/_redirects index 2ce7014..1c91fb2 100644 --- a/test/_redirects +++ b/test/_redirects @@ -1 +1 @@ -/lectures/slides/test/* /lectures/slides/test/index.html 200 +/test/* /test/index.html 200 diff --git a/test/assets/index-Df4vEvvN.js b/test/assets/index-Df4vEvvN.js new file mode 100644 index 0000000..91b05d5 --- /dev/null +++ b/test/assets/index-Df4vEvvN.js @@ -0,0 +1,52 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/md-C8XcVckz.js","assets/modules/vue-B03c_Ivc.js","assets/slidev/context-G025NcPA.js","assets/slidev/intro-mdsqHmL8.js","assets/modules/shiki-D6VyeOrD.js","assets/modules/shiki-BPvBenZD.css","assets/md-Cc1fxSyz.js","assets/slidev/entry-DBVNHmWY.js","assets/modules/unplugin-icons-DLmkOyLZ.js","assets/entry-vofcDpez.css","assets/slidev/overview-D6vhBkpI.js","assets/slidev/DrawingPreview.vue_vue_type_script_setup_true_lang-D58kc9wE.js","assets/DrawingPreview-Cu20KZhX.css","assets/slidev/IconButton.vue_vue_type_script_setup_true_lang-ClhDPtQg.js","assets/slidev/ClicksSlider-Bv3jj13O.js","assets/ClicksSlider-cxx98IfQ.css","assets/slidev/notes-D2G3W9tS.js","assets/slidev/presenter-CfIGrs6G.js","assets/slidev/useWakeLock-CRYEXDUy.js","assets/useWakeLock-Dgwxzjge.css","assets/slidev/DrawingControls.vue_vue_type_style_index_0_lang-BQZjIz1e.js","assets/DrawingControls-C5T1oZL5.css","assets/presenter-B7J4lulD.css","assets/slidev/play-mGGM2FGe.js","assets/play-CoA43pdi.css","assets/slidev/404-8kfwPgJ5.js","assets/404-D104_nge.css"])))=>i.map(i=>d[i]); +import{z as w,n as Vs,A as Hn,B as Xt,C as qs,t as T,D as Me,E as J,G as Dn,H as Rn,I as Fn,J as Us,K as Te,L as Bn,M as Wn,N as gt,O as xs,P as es,Q as zn,o as nt,b as Dt,d as Ks,F as Vn,g as qn,e as Js,R as ts,S as Un,T as Gs,U as xn,V as Kn,W as G,X as Qs,Y as mt,r as Jn,c as Gn,Z as Qn,_ as Zn,$ as Yn,a0 as Xn,a1 as eo,a2 as to,a3 as so,a4 as no,a5 as oo,a6 as io,a7 as ro,a8 as ao,a9 as lo,u as co}from"./modules/vue-B03c_Ivc.js";import{T as uo}from"./modules/shiki-D6VyeOrD.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const r of i.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function t(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(o){if(o.ep)return;o.ep=!0;const i=t(o);fetch(o.href,i)}})();function Rt(s,e,t){return Math.min(t,Math.max(e,s))}function fo(...s){return po(s).reduce((e,t)=>e+t,0)}function ho(s){return s=s??[],Array.isArray(s)?s:[s]}function po(s){return ho(s).flat(1)}function Sa(...s){let e,t,n;s.length===1?(e=0,n=1,[t]=s):[e,t,n=1]=s;const o=[];let i=e;for(;ie(t,n)).filter(go))}const E={theme:"default",title:"Welcome to Slidev",titleTemplate:"%s - Slidev",addons:[],remoteAssets:!1,monaco:!0,monacoTypesSource:"local",monacoTypesAdditionalPackages:[],monacoTypesIgnorePackages:[],monacoRunAdditionalDeps:[],download:!1,export:{},info:!1,highlighter:"shiki",twoslash:!0,lineNumbers:!1,colorSchema:"auto",routerMode:"history",aspectRatio:1.7777777777777777,canvasWidth:980,exportFilename:"",selectable:!1,themeConfig:{},fonts:{sans:['"Avenir Next"','"Nunito Sans"',"ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial",'"Noto Sans"',"sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:['"Fira Code"',"ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"],webfonts:["Avenir Next","Nunito Sans","Fira Code"],provider:"google",local:["Avenir Next"],italic:!1,weights:["200","400","600"]},favicon:"https://cdn.jsdelivr.net/gh/slidevjs/slidev/assets/favicon.png",drawings:{enabled:!0,persist:!1,presenterOnly:!1,syncAll:!0},plantUmlServer:"https://www.plantuml.com/plantuml",codeCopy:!0,record:"dev",css:"unocss",presenter:!0,htmlAttrs:{},transition:null,editor:!0,contextMenu:null,wakeLock:!0,mdc:!1,layout:"intro",slidesTitle:"Welcome to Slidev - Slidev"},_a="build",Zs=w(()=>E.aspectRatio),yo=w(()=>E.canvasWidth),Ma=w(()=>Math.ceil(yo.value/Zs.value)),vo=w(()=>mo(E.themeConfig||{},(s,e)=>[`--slidev-theme-${s}`,e])),Mt=E.slidesTitle,Oa="/test";function Ft(s,e={},t){for(const n in s){const o=s[n],i=t?`${t}:${n}`:n;typeof o=="object"&&o!==null?Ft(o,e,i):typeof o=="function"&&(e[i]=o)}return e}const bo={run:s=>s()},ko=()=>bo,Ys=typeof console.createTask<"u"?console.createTask:ko;function wo(s,e){const t=e.shift(),n=Ys(t);return s.reduce((o,i)=>o.then(()=>n.run(()=>i(...e))),Promise.resolve())}function So(s,e){const t=e.shift(),n=Ys(t);return Promise.all(s.map(o=>n.run(()=>o(...e))))}function Ot(s,e){for(const t of[...s])t(e)}class _o{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(e,t,n={}){if(!e||typeof t!="function")return()=>{};const o=e;let i;for(;this._deprecatedHooks[e];)i=this._deprecatedHooks[e],e=i.to;if(i&&!n.allowDeprecated){let r=i.message;r||(r=`${o} hook has been deprecated`+(i.to?`, please use ${i.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(r)||(console.warn(r),this._deprecatedMessages.add(r))}if(!t.name)try{Object.defineProperty(t,"name",{get:()=>"_"+e.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[e]=this._hooks[e]||[],this._hooks[e].push(t),()=>{t&&(this.removeHook(e,t),t=void 0)}}hookOnce(e,t){let n,o=(...i)=>(typeof n=="function"&&n(),n=void 0,o=void 0,t(...i));return n=this.hook(e,o),n}removeHook(e,t){if(this._hooks[e]){const n=this._hooks[e].indexOf(t);n!==-1&&this._hooks[e].splice(n,1),this._hooks[e].length===0&&delete this._hooks[e]}}deprecateHook(e,t){this._deprecatedHooks[e]=typeof t=="string"?{to:t}:t;const n=this._hooks[e]||[];delete this._hooks[e];for(const o of n)this.hook(e,o)}deprecateHooks(e){Object.assign(this._deprecatedHooks,e);for(const t in e)this.deprecateHook(t,e[t])}addHooks(e){const t=Ft(e),n=Object.keys(t).map(o=>this.hook(o,t[o]));return()=>{for(const o of n.splice(0,n.length))o()}}removeHooks(e){const t=Ft(e);for(const n in t)this.removeHook(n,t[n])}removeAllHooks(){for(const e in this._hooks)delete this._hooks[e]}callHook(e,...t){return t.unshift(e),this.callHookWith(wo,e,...t)}callHookParallel(e,...t){return t.unshift(e),this.callHookWith(So,e,...t)}callHookWith(e,t,...n){const o=this._before||this._after?{name:t,args:n,context:{}}:void 0;this._before&&Ot(this._before,o);const i=e(t in this._hooks?[...this._hooks[t]]:[],n);return i instanceof Promise?i.finally(()=>{this._after&&o&&Ot(this._after,o)}):(this._after&&o&&Ot(this._after,o),i)}beforeEach(e){return this._before=this._before||[],this._before.push(e),()=>{if(this._before!==void 0){const t=this._before.indexOf(e);t!==-1&&this._before.splice(t,1)}}}afterEach(e){return this._after=this._after||[],this._after.push(e),()=>{if(this._after!==void 0){const t=this._after.indexOf(e);t!==-1&&this._after.splice(t,1)}}}}function Mo(){return new _o}const Oo=new Set(["title","titleTemplate","script","style","noscript"]),Ge=new Set(["base","meta","link","style","script","noscript"]),Po=new Set(["title","titleTemplate","templateParams","base","htmlAttrs","bodyAttrs","meta","link","style","script","noscript"]),To=new Set(["base","title","titleTemplate","bodyAttrs","htmlAttrs","templateParams"]),Xs=new Set(["tagPosition","tagPriority","tagDuplicateStrategy","children","innerHTML","textContent","processTemplateParams"]),Ao=typeof window<"u";function ot(s){let e=9;for(let t=0;t>>9)+65536).toString(16).substring(1,8).toLowerCase()}function ys(s){if(s._h)return s._h;if(s._d)return ot(s._d);let e=`${s.tag}:${s.textContent||s.innerHTML||""}:`;for(const t in s.props)e+=`${t}:${s.props[t]},`;return ot(e)}const Co=["name","property","http-equiv"];function en(s){const{props:e,tag:t}=s;if(To.has(t))return t;if(t==="link"&&e.rel==="canonical")return"canonical";if(e.charset)return"charset";if(e.id)return`${t}:id:${e.id}`;for(const n of Co)if(e[n]!==void 0)return`${t}:${n}:${e[n]}`;return!1}function vs(s,e){return s==null?e||null:typeof s=="function"?s(e):s}function Lo(s,e){return s instanceof Promise?s.then(e):e(s)}function Bt(s,e,t,n){const o=n||sn(typeof e=="object"&&typeof e!="function"&&!(e instanceof Promise)?{...e}:{[s==="script"||s==="noscript"||s==="style"?"innerHTML":"textContent"]:e},s==="templateParams"||s==="titleTemplate");if(o instanceof Promise)return o.then(r=>Bt(s,e,t,r));const i={tag:s,props:o};for(const r of Xs){const a=i.props[r]!==void 0?i.props[r]:t[r];a!==void 0&&((!(r==="innerHTML"||r==="textContent"||r==="children")||Oo.has(i.tag))&&(i[r==="children"?"innerHTML":r]=a),delete i.props[r])}return i.props.body&&(i.tagPosition="bodyClose",delete i.props.body),i.tag==="script"&&typeof i.innerHTML=="object"&&(i.innerHTML=JSON.stringify(i.innerHTML),i.props.type=i.props.type||"application/json"),Array.isArray(i.props.content)?i.props.content.map(r=>({...i,props:{...i.props,content:r}})):i}function Eo(s,e){var n;const t=s==="class"?" ":";";return typeof e=="object"&&!Array.isArray(e)&&(e=Object.entries(e).filter(([,o])=>o).map(([o,i])=>s==="style"?`${o}:${i}`:o)),(n=String(Array.isArray(e)?e.join(t):e))==null?void 0:n.split(t).filter(o=>!!o.trim()).join(t)}function tn(s,e,t,n){for(let o=n;o(s[i]=r,tn(s,e,t,o)));if(!e&&!Xs.has(i)){const r=String(s[i]),a=i.startsWith("data-");r==="true"||r===""?s[i]=a?"true":!0:s[i]||(a&&r==="false"?s[i]="false":delete s[i])}}}function sn(s,e=!1){const t=tn(s,e,Object.keys(s),0);return t instanceof Promise?t.then(()=>s):s}const $o=10;function nn(s,e,t){for(let n=t;n(e[n]=i,nn(s,e,n)));Array.isArray(o)?s.push(...o):s.push(o)}}function No(s){const e=[],t=s.resolvedInput;for(const o in t){if(!Object.prototype.hasOwnProperty.call(t,o))continue;const i=t[o];if(!(i===void 0||!Po.has(o))){if(Array.isArray(i)){for(const r of i)e.push(Bt(o,r,s));continue}e.push(Bt(o,i,s))}}if(e.length===0)return[];const n=[];return Lo(nn(n,e,0),()=>n.map((o,i)=>(o._e=s._i,s.mode&&(o._m=s.mode),o._p=(s._i<<$o)+i,o)))}const bs={base:-10,title:10},ks={critical:-80,high:-10,low:20};function it(s){const e=s.tagPriority;if(typeof e=="number")return e;let t=100;return s.tag==="meta"?s.props["http-equiv"]==="content-security-policy"?t=-30:s.props.charset?t=-20:s.props.name==="viewport"&&(t=-15):s.tag==="link"&&s.props.rel==="preconnect"?t=20:s.tag in bs&&(t=bs[s.tag]),e&&e in ks?t+ks[e]:t}const Io=[{prefix:"before:",offset:-1},{prefix:"after:",offset:1}],ws=new Set(["onload","onerror","onabort","onprogress","onloadstart"]),ie="%separator";function jo(s,e){var n;let t;if(e==="s"||e==="pageTitle")t=s.pageTitle;else if(e.includes(".")){const o=e.indexOf(".");t=(n=s[e.substring(0,o)])==null?void 0:n[e.substring(o+1)]}else t=s[e];return t!==void 0?(t||"").replace(/"/g,'\\"'):void 0}const Ho=new RegExp(`${ie}(?:\\s*${ie})*`,"g");function Pt(s,e,t){if(typeof s!="string"||!s.includes("%"))return s;let n=s;try{n=decodeURI(s)}catch{}const o=n.match(/%\w+(?:\.\w+)?/g);if(!o)return s;const i=s.includes(ie);return s=s.replace(/%\w+(?:\.\w+)?/g,r=>{if(r===ie||!o.includes(r))return r;const a=jo(e,r.slice(1));return a!==void 0?a:r}).trim(),i&&(s.endsWith(ie)&&(s=s.slice(0,-ie.length)),s.startsWith(ie)&&(s=s.slice(ie.length)),s=s.replace(Ho,t).trim()),s}async function Do(s,e={}){var u;const t=e.document||s.resolvedOptions.document;if(!t||!s.dirty)return;const n={shouldRender:!0,tags:[]};if(await s.hooks.callHook("dom:beforeRender",n),!n.shouldRender)return;const o=(await s.resolveTags()).map(f=>({tag:f,id:Ge.has(f.tag)?ys(f):f.tag,shouldRender:!0}));let i=s._dom;if(!i){i={elMap:{htmlAttrs:t.documentElement,bodyAttrs:t.body}};const f=new Set;for(const d of["body","head"]){const h=(u=t[d])==null?void 0:u.children;for(const p of h){const g=p.tagName.toLowerCase();if(!Ge.has(g))continue;const m={tag:g,props:await sn(p.getAttributeNames().reduce((k,M)=>({...k,[M]:p.getAttribute(M)}),{})),innerHTML:p.innerHTML},y=en(m);let v=y,b=1;for(;v&&f.has(v);)v=`${y}:${b++}`;v&&(m._d=v,f.add(v)),i.elMap[p.getAttribute("data-hid")||ys(m)]=p}}}i.pendingSideEffects={...i.sideEffects},i.sideEffects={};function r(f,d,h){const p=`${f}:${d}`;i.sideEffects[p]=h,delete i.pendingSideEffects[p]}function a({id:f,$el:d,tag:h}){const p=h.tag.endsWith("Attrs");if(i.elMap[f]=d,p||(h.textContent&&h.textContent!==d.textContent&&(d.textContent=h.textContent),h.innerHTML&&h.innerHTML!==d.innerHTML&&(d.innerHTML=h.innerHTML),r(f,"el",()=>{var g;(g=i.elMap[f])==null||g.remove(),delete i.elMap[f]})),h._eventHandlers)for(const g in h._eventHandlers)Object.prototype.hasOwnProperty.call(h._eventHandlers,g)&&d.getAttribute(`data-${g}`)!==""&&((h.tag==="bodyAttrs"?t.defaultView:d).addEventListener(g.substring(2),h._eventHandlers[g].bind(d)),d.setAttribute(`data-${g}`,""));for(const g in h.props){if(!Object.prototype.hasOwnProperty.call(h.props,g))continue;const m=h.props[g],y=`attr:${g}`;if(g==="class"){if(!m)continue;for(const v of m.split(" "))p&&r(f,`${y}:${v}`,()=>d.classList.remove(v)),!d.classList.contains(v)&&d.classList.add(v)}else if(g==="style"){if(!m)continue;for(const v of m.split(";")){const b=v.indexOf(":"),k=v.substring(0,b).trim(),M=v.substring(b+1).trim();r(f,`${y}:${k}`,()=>{d.style.removeProperty(k)}),d.style.setProperty(k,M)}}else d.getAttribute(g)!==m&&d.setAttribute(g,m===!0?"":String(m)),p&&r(f,y,()=>d.removeAttribute(g))}}const l=[],c={bodyClose:void 0,bodyOpen:void 0,head:void 0};for(const f of o){const{tag:d,shouldRender:h,id:p}=f;if(h){if(d.tag==="title"){t.title=d.textContent;continue}f.$el=f.$el||i.elMap[p],f.$el?a(f):Ge.has(d.tag)&&l.push(f)}}for(const f of l){const d=f.tag.tagPosition||"head";f.$el=t.createElement(f.tag.tag),a(f),c[d]=c[d]||t.createDocumentFragment(),c[d].appendChild(f.$el)}for(const f of o)await s.hooks.callHook("dom:renderTag",f,t,r);c.head&&t.head.appendChild(c.head),c.bodyOpen&&t.body.insertBefore(c.bodyOpen,t.body.firstChild),c.bodyClose&&t.body.appendChild(c.bodyClose);for(const f in i.pendingSideEffects)i.pendingSideEffects[f]();s._dom=i,s.dirty=!1,await s.hooks.callHook("dom:rendered",{renders:o})}function Ro(s,e={}){const t=e.delayFn||(n=>setTimeout(n,10));return s._domUpdatePromise=s._domUpdatePromise||new Promise(n=>t(()=>Do(s,e).then(()=>{delete s._domUpdatePromise,n()})))}function Fo(s){return e=>{var n,o;const t=((o=(n=e.resolvedOptions.document)==null?void 0:n.head.querySelector('script[id="unhead:payload"]'))==null?void 0:o.innerHTML)||!1;return t&&e.push(JSON.parse(t)),{mode:"client",hooks:{"entries:updated":i=>{Ro(i,s)}}}}}const Bo=new Set(["templateParams","htmlAttrs","bodyAttrs"]),Wo={hooks:{"tag:normalise":({tag:s})=>{s.props.hid&&(s.key=s.props.hid,delete s.props.hid),s.props.vmid&&(s.key=s.props.vmid,delete s.props.vmid),s.props.key&&(s.key=s.props.key,delete s.props.key);const t=en(s)||(s.key?`${s.tag}:${s.key}`:!1);t&&(s._d=t)},"tags:resolve":s=>{const e=Object.create(null);for(const n of s.tags){const o=(n.key?`${n.tag}:${n.key}`:n._d)||n._p,i=e[o];if(i){let a=n==null?void 0:n.tagDuplicateStrategy;if(!a&&Bo.has(n.tag)&&(a="merge"),a==="merge"){const l=i.props;l.style&&n.props.style&&(l.style[l.style.length-1]!==";"&&(l.style+=";"),n.props.style=`${l.style} ${n.props.style}`),l.class&&n.props.class?n.props.class=`${l.class} ${n.props.class}`:l.class&&(n.props.class=l.class),e[o].props={...l,...n.props};continue}else if(n._e===i._e){i._duped=i._duped||[],n._d=`${i._d}:${i._duped.length+1}`,i._duped.push(n);continue}else if(it(n)>it(i))continue}if(!(n.innerHTML||n.textContent||Object.keys(n.props).length!==0)&&Ge.has(n.tag)){delete e[o];continue}e[o]=n}const t=[];for(const n in e){const o=e[n],i=o._duped;t.push(o),i&&(delete o._duped,t.push(...i))}s.tags=t,s.tags=s.tags.filter(n=>!(n.tag==="meta"&&(n.props.name||n.props.property)&&!n.props.content))}}},zo={mode:"server",hooks:{"tags:resolve":s=>{const e={};let t=!1;for(const n of s.tags)n._m!=="server"||n.tag!=="titleTemplate"&&n.tag!=="templateParams"&&n.tag!=="title"||(e[n.tag]=n.tag==="title"||n.tag==="titleTemplate"?n.textContent:n.props,t=!0);t&&s.tags.push({tag:"script",innerHTML:JSON.stringify(e),props:{id:"unhead:payload",type:"application/json"}})}}},Vo=new Set(["script","link","bodyAttrs"]),qo=s=>({hooks:{"tags:resolve":e=>{for(const t of e.tags){if(!Vo.has(t.tag))continue;const n=t.props;for(const o in n){if(o[0]!=="o"||o[1]!=="n"||!Object.prototype.hasOwnProperty.call(n,o))continue;const i=n[o];typeof i=="function"&&(s.ssr&&ws.has(o)?n[o]=`this.dataset.${o}fired = true`:delete n[o],t._eventHandlers=t._eventHandlers||{},t._eventHandlers[o]=i)}s.ssr&&t._eventHandlers&&(t.props.src||t.props.href)&&(t.key=t.key||ot(t.props.src||t.props.href))}},"dom:renderTag":({$el:e,tag:t})=>{var o,i;const n=e==null?void 0:e.dataset;if(n)for(const r in n){if(!r.endsWith("fired"))continue;const a=r.slice(0,-5);ws.has(a)&&((i=(o=t._eventHandlers)==null?void 0:o[a])==null||i.call(e,new Event(a.substring(2))))}}}}),Uo=new Set(["link","style","script","noscript"]),xo={hooks:{"tag:normalise":({tag:s})=>{s.key&&Uo.has(s.tag)&&(s.props["data-hid"]=s._h=ot(s.key))}}},Ko={hooks:{"tags:resolve":s=>{var e;for(const t of s.tags)if(typeof t.tagPriority=="string")for(const{prefix:n,offset:o}of Io){if(!t.tagPriority.startsWith(n))continue;const i=t.tagPriority.substring(n.length),r=(e=s.tags.find(a=>a._d===i))==null?void 0:e._p;if(r!==void 0){t._p=r+o;break}}s.tags.sort((t,n)=>{const o=it(t),i=it(n);return oi?1:t._p-n._p})}}},Jo={meta:"content",link:"href",htmlAttrs:"lang"},Go=["innerHTML","textContent"],Qo=s=>({hooks:{"tags:resolve":e=>{var r;const{tags:t}=e;let n;for(let a=0;aa.tag==="title"))==null?void 0:r.textContent)||"",o,i);for(const a of t){if(a.processTemplateParams===!1)continue;const l=Jo[a.tag];if(l&&typeof a.props[l]=="string")a.props[l]=Pt(a.props[l],o,i);else if(a.processTemplateParams||a.tag==="titleTemplate"||a.tag==="title")for(const c of Go)typeof a[c]=="string"&&(a[c]=Pt(a[c],o,i))}s._templateParams=o,s._separator=i}}}),Zo={hooks:{"tags:resolve":s=>{const{tags:e}=s;let t,n;for(let o=0;o{for(const e of s.tags)typeof e.innerHTML=="string"&&(e.innerHTML&&(e.props.type==="application/ld+json"||e.props.type==="application/json")?e.innerHTML=e.innerHTML.replace(/{a.dirty=!0,e.callHook("entries:updated",a)};let o=0,i=[];const r=[],a={plugins:r,dirty:!1,resolvedOptions:s,hooks:e,headEntries(){return i},use(l){const c=typeof l=="function"?l(a):l;(!c.key||!r.some(u=>u.key===c.key))&&(r.push(c),Ss(c.mode,t)&&e.addHooks(c.hooks||{}))},push(l,c){c==null||delete c.head;const u={_i:o++,input:l,...c};return Ss(u.mode,t)&&(i.push(u),n()),{dispose(){i=i.filter(f=>f._i!==u._i),e.callHook("entries:updated",a),n()},patch(f){for(const d of i)d._i===u._i&&(d.input=u.input=f);n()}}},async resolveTags(){const l={tags:[],entries:[...i]};await e.callHook("entries:resolve",l);for(const c of l.entries){const u=c.resolvedInput||c.input;if(c.resolvedInput=await(c.transform?c.transform(u):u),c.resolvedInput)for(const f of await No(c)){const d={tag:f,entry:c,resolvedOptions:a.resolvedOptions};await e.callHook("tag:normalise",d),l.tags.push(d.tag)}}return await e.callHook("tags:beforeResolve",l),await e.callHook("tags:resolve",l),await e.callHook("tags:afterResolve",l),l.tags},ssr:t};return[Wo,zo,qo,xo,Ko,Qo,Zo,Yo,...(s==null?void 0:s.plugins)||[]].forEach(l=>a.use(l)),a.hooks.callHook("init",a),a}function ti(){return on}const si=Hn[0]==="3";function ni(s){return typeof s=="function"?s():Xt(s)}function rt(s){if(s instanceof Promise)return s;const e=ni(s);if(!s||!e)return e;if(Array.isArray(e))return e.map(t=>rt(t));if(typeof e=="object"){const t={};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(n==="titleTemplate"||n[0]==="o"&&n[1]==="n"){t[n]=Xt(e[n]);continue}t[n]=rt(e[n])}return t}return e}const oi={hooks:{"entries:resolve":s=>{for(const e of s.entries)e.resolvedInput=rt(e.input)}}},rn="usehead";function ii(s){return{install(t){si&&(t.config.globalProperties.$unhead=s,t.config.globalProperties.$head=s,t.provide(rn,s))}}.install}function ri(s={}){s.domDelayFn=s.domDelayFn||(t=>Vs(()=>setTimeout(()=>t(),0)));const e=Xo(s);return e.use(oi),e.install=ii(e),e}const _s=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ms="__unhead_injection_handler__";function ai(){if(Ms in _s)return _s[Ms]();const s=qs(rn);return s||ti()}function li(s,e={}){const t=e.head||ai();if(t)return t.ssr?t.push(s,e):ci(t,s,e)}function ci(s,e,t={}){const n=T(!1),o=T({});Me(()=>{o.value=n.value?{}:rt(e)});const i=s.push(o.value,t);return J(o,a=>{i.patch(a)}),Us()&&(Dn(()=>{i.dispose()}),Rn(()=>{n.value=!0}),Fn(()=>{n.value=!1})),i}function an(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(2,10)}function Q(s,e,t){Object.defineProperty(s,e,{value:t,writable:!0,enumerable:!1})}const me=Te({page:0,clicks:0});let ui=[],fi=[];Q(me,"$syncUp",!0);Q(me,"$syncDown",!0);Q(me,"$paused",!1);Q(me,"$onSet",s=>ui.push(s));Q(me,"$onPatch",s=>fi.push(s));an();Q(me,"$patch",async()=>!1);function ln(s,e,t=!1){const n=[];let o=!1,i=!1,r,a;const l=Te(e);function c(h){n.push(h)}function u(h,p){l[h]!==p&&(clearTimeout(r),o=!0,l[h]=p,r=setTimeout(()=>o=!1,0))}function f(h){o||(clearTimeout(a),i=!0,Object.entries(h).forEach(([p,g])=>{l[p]=g}),a=setTimeout(()=>i=!1,0))}function d(h){let p;t?t&&window.addEventListener("storage",m=>{m&&m.key===h&&m.newValue&&f(JSON.parse(m.newValue))}):(p=new BroadcastChannel(h),p.addEventListener("message",m=>f(m.data)));function g(){!t&&p&&!i?p.postMessage(Bn(l)):t&&!i&&window.localStorage.setItem(h,JSON.stringify(l)),o||n.forEach(m=>m(l))}if(J(l,g,{deep:!0,flush:"sync"}),t){const m=window.localStorage.getItem(h);m&&f(JSON.parse(m))}}return{init:d,onPatch:c,patch:u,state:l}}const{init:hi,onPatch:di,patch:ce,state:Pa}=ln(me,{page:1,clicks:0,clicksTotal:0,viewerPage:1,viewerClicks:0,viewerClicksTotal:0}),re=Te({});let pi=[],gi=[];Q(re,"$syncUp",!0);Q(re,"$syncDown",!0);Q(re,"$paused",!1);Q(re,"$onSet",s=>pi.push(s));Q(re,"$onPatch",s=>gi.push(s));an();Q(re,"$patch",async()=>!1);const{init:mi,onPatch:Ta,patch:Aa,state:Ca}=ln(re,re,!1),yt="$$slidev-clicks-context",ss="$$slidev-page",cn="$$slidev-slide-element",yi="$$slidev-slide-scale",vi="$$slidev-context",La="$$slidev-route",ns="$$slidev-render-context",bi="$$slidev-fontmatter",ki="$$slidev-slide-zoom",Qe="slidev-vclick-target",$e="slidev-vclick-hidden",Ne="slidev-vclick-fade",Tt="slidev-vclick-hidden-explicitly",At="slidev-vclick-current",Ct="slidev-vclick-prior",Ze=999999,wi=["localhost","127.0.0.1"],Si=["clicks","clicksStart","disabled","hide","hideInToc","layout","level","preload","routeAlias","src","title","transition","zoom","dragPos"],Ea=[...Si,"theme","titleTemplate","info","author","keywords","presenter","download","exportFilename","export","highlighter","lineNumbers","monaco","monacoTypesSource","monacoTypesAdditionalPackages","monacoRunAdditionalDeps","remoteAssets","selectable","record","colorSchema","routerMode","aspectRatio","canvasWidth","themeConfig","favicon","plantUmlServer","fonts","defaults","drawings","htmlAttrs","mdc","contextMenu","wakeLock"],os=T(!1),is=Symbol.for("yaml.alias"),_i=Symbol.for("yaml.document"),ge=Symbol.for("yaml.map"),un=Symbol.for("yaml.pair"),rs=Symbol.for("yaml.scalar"),ze=Symbol.for("yaml.seq"),se=Symbol.for("yaml.node.type"),Ae=s=>!!s&&typeof s=="object"&&s[se]===is,vt=s=>!!s&&typeof s=="object"&&s[se]===_i,fn=s=>!!s&&typeof s=="object"&&s[se]===ge,D=s=>!!s&&typeof s=="object"&&s[se]===un,j=s=>!!s&&typeof s=="object"&&s[se]===rs,as=s=>!!s&&typeof s=="object"&&s[se]===ze;function U(s){if(s&&typeof s=="object")switch(s[se]){case ge:case ze:return!0}return!1}function B(s){if(s&&typeof s=="object")switch(s[se]){case is:case ge:case rs:case ze:return!0}return!1}const Mi=s=>(j(s)||U(s))&&!!s.anchor,he=Symbol("break visit"),Oi=Symbol("skip children"),De=Symbol("remove node");function Be(s,e){const t=Pi(e);vt(s)?ke(null,s.contents,t,Object.freeze([s]))===De&&(s.contents=null):ke(null,s,t,Object.freeze([]))}Be.BREAK=he;Be.SKIP=Oi;Be.REMOVE=De;function ke(s,e,t,n){const o=Ti(s,e,t,n);if(B(o)||D(o))return Ai(s,n,o),ke(s,o,t,n);if(typeof o!="symbol"){if(U(e)){n=Object.freeze(n.concat(e));for(let i=0;iX(n,String(o),t));if(s&&typeof s.toJSON=="function"){if(!t||!Mi(s))return s.toJSON(e,t);const n={aliasCount:0,count:1,res:void 0};t.anchors.set(s,n),t.onCreate=i=>{n.res=i,delete t.onCreate};const o=s.toJSON(e,t);return t.onCreate&&t.onCreate(o),o}return typeof s=="bigint"&&!(t!=null&&t.keep)?Number(s):s}class ls{constructor(e){Object.defineProperty(this,se,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:o,reviver:i}={}){if(!vt(e))throw new TypeError("A document argument is required");const r={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},a=X(this,"",r);if(typeof o=="function")for(const{count:l,res:c}of r.anchors.values())o(c,l);return typeof i=="function"?He(i,{"":a},"",a):a}}class Ci extends ls{constructor(e){super(is),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return Be(e,{Node:(n,o)=>{if(o===this)return Be.BREAK;o.anchor===this.source&&(t=o)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:o,maxAliasCount:i}=t,r=this.resolve(o);if(!r){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=n.get(r);if(a||(X(r,null,t),a=n.get(r)),!a||a.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(i>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Ye(o,r,n)),a.count*a.aliasCount>i)){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,t,n){const o=`*${this.source}`;if(e){if(hn(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(i)}if(e.implicitKey)return`${o} `}return o}}function Ye(s,e,t){if(Ae(e)){const n=e.resolve(s),o=t&&n&&t.get(n);return o?o.count*o.aliasCount:0}else if(U(e)){let n=0;for(const o of e.items){const i=Ye(s,o,t);i>n&&(n=i)}return n}else if(D(e)){const n=Ye(s,e.key,t),o=Ye(s,e.value,t);return Math.max(n,o)}return 1}const dn=s=>!s||typeof s!="function"&&typeof s!="object";class I extends ls{constructor(e){super(rs),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:X(this.value,e,t)}toString(){return String(this.value)}}I.BLOCK_FOLDED="BLOCK_FOLDED";I.BLOCK_LITERAL="BLOCK_LITERAL";I.PLAIN="PLAIN";I.QUOTE_DOUBLE="QUOTE_DOUBLE";I.QUOTE_SINGLE="QUOTE_SINGLE";function Li(s,e,t){return t.find(n=>{var o;return((o=n.identify)==null?void 0:o.call(n,s))&&!n.format})}function at(s,e,t){var f,d,h;if(vt(s)&&(s=s.contents),B(s))return s;if(D(s)){const p=(d=(f=t.schema[ge]).createNode)==null?void 0:d.call(f,t.schema,null,t);return p.items.push(s),p}(s instanceof String||s instanceof Number||s instanceof Boolean||typeof BigInt<"u"&&s instanceof BigInt)&&(s=s.valueOf());const{aliasDuplicateObjects:n,onAnchor:o,onTagObj:i,schema:r,sourceObjects:a}=t;let l;if(n&&s&&typeof s=="object"){if(l=a.get(s),l)return l.anchor||(l.anchor=o(s)),new Ci(l.anchor);l={anchor:null,node:null},a.set(s,l)}let c=Li(s,e,r.tags);if(!c){if(s&&typeof s.toJSON=="function"&&(s=s.toJSON()),!s||typeof s!="object"){const p=new I(s);return l&&(l.node=p),p}c=s instanceof Map?r[ge]:Symbol.iterator in Object(s)?r[ze]:r[ge]}i&&(i(c),delete t.onTagObj);const u=c!=null&&c.createNode?c.createNode(t.schema,s,t):typeof((h=c==null?void 0:c.nodeClass)==null?void 0:h.from)=="function"?c.nodeClass.from(t.schema,s,t):new I(s);return c.default||(u.tag=c.tag),l&&(l.node=u),u}function Os(s,e,t){let n=t;for(let o=e.length-1;o>=0;--o){const i=e[o];if(typeof i=="number"&&Number.isInteger(i)&&i>=0){const r=[];r[i]=n,n=r}else n=new Map([[i,n]])}return at(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:s,sourceObjects:new Map})}const Ei=s=>s==null||typeof s=="object"&&!!s[Symbol.iterator]().next().done;class pn extends ls{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>B(n)||D(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Ei(e))this.add(t);else{const[n,...o]=e,i=this.get(n,!0);if(U(i))i.addIn(o,t);else if(i===void 0&&this.schema)this.set(n,Os(this.schema,o,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${o}`)}}deleteIn(e){const[t,...n]=e;if(n.length===0)return this.delete(t);const o=this.get(t,!0);if(U(o))return o.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){const[n,...o]=e,i=this.get(n,!0);return o.length===0?!t&&j(i)?i.value:i:U(i)?i.getIn(o,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!D(t))return!1;const n=t.value;return n==null||e&&j(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){const[t,...n]=e;if(n.length===0)return this.has(t);const o=this.get(t,!0);return U(o)?o.hasIn(n):!1}setIn(e,t){const[n,...o]=e;if(o.length===0)this.set(n,t);else{const i=this.get(n,!0);if(U(i))i.setIn(o,t);else if(i===void 0&&this.schema)this.set(n,Os(this.schema,o,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${o}`)}}}const $i=s=>s.replace(/^(?!$)(?: $)?/gm,"#");function We(s,e){return/^\n+$/.test(s)?s.substring(1):e?s.replace(/^(?! *$)/gm,e):s}const we=(s,e,t)=>s.endsWith(` +`)?We(t,e):t.includes(` +`)?` +`+We(t,e):(s.endsWith(" ")?"":" ")+t,gn="flow",Wt="block",Xe="quoted";function bt(s,e,t="flow",{indentAtStart:n,lineWidth:o=80,minContentWidth:i=20,onFold:r,onOverflow:a}={}){if(!o||o<0)return s;oo-Math.max(2,i)?c.push(0):f=o-n);let d,h,p=!1,g=-1,m=-1,y=-1;t===Wt&&(g=Ps(s,g,e.length),g!==-1&&(f=g+l));for(let b;b=s[g+=1];){if(t===Xe&&b==="\\"){switch(m=g,s[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}y=g}if(b===` +`)t===Wt&&(g=Ps(s,g,e.length)),f=g+e.length+l,d=void 0;else{if(b===" "&&h&&h!==" "&&h!==` +`&&h!==" "){const k=s[g+1];k&&k!==" "&&k!==` +`&&k!==" "&&(d=g)}if(g>=f)if(d)c.push(d),f=d+l,d=void 0;else if(t===Xe){for(;h===" "||h===" ";)h=b,b=s[g+=1],p=!0;const k=g>y+1?g-2:m-1;if(u[k])return s;c.push(k),u[k]=!0,f=k+l,d=void 0}else p=!0}h=b}if(p&&a&&a(),c.length===0)return s;r&&r();let v=s.slice(0,c[0]);for(let b=0;b({indentAtStart:e?s.indent.length:s.indentAtStart,lineWidth:s.options.lineWidth,minContentWidth:s.options.minContentWidth}),wt=s=>/^(%|---|\.\.\.)/m.test(s);function Ni(s,e,t){if(!e||e<0)return!1;const n=e-t,o=s.length;if(o<=n)return!1;for(let i=0,r=0;in)return!0;if(r=i+1,o-r<=n)return!1}return!0}function Re(s,e){const t=JSON.stringify(s);if(e.options.doubleQuotedAsJSON)return t;const{implicitKey:n}=e,o=e.options.doubleQuotedMinMultiLineLength,i=e.indent||(wt(s)?" ":"");let r="",a=0;for(let l=0,c=t[l];c;c=t[++l])if(c===" "&&t[l+1]==="\\"&&t[l+2]==="n"&&(r+=t.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(t[l+1]){case"u":{r+=t.slice(a,l);const u=t.substr(l+2,4);switch(u){case"0000":r+="\\0";break;case"0007":r+="\\a";break;case"000b":r+="\\v";break;case"001b":r+="\\e";break;case"0085":r+="\\N";break;case"00a0":r+="\\_";break;case"2028":r+="\\L";break;case"2029":r+="\\P";break;default:u.substr(0,2)==="00"?r+="\\x"+u.substr(2):r+=t.substr(l,6)}l+=5,a=l+1}break;case"n":if(n||t[l+2]==='"'||t.length +`;let f,d;for(d=t.length;d>0;--d){const _=t[d-1];if(_!==` +`&&_!==" "&&_!==" ")break}let h=t.substring(d);const p=h.indexOf(` +`);p===-1?f="-":t===h||p!==h.length-1?(f="+",i&&i()):f="",h&&(t=t.slice(0,-h.length),h[h.length-1]===` +`&&(h=h.slice(0,-1)),h=h.replace(Vt,`$&${c}`));let g=!1,m,y=-1;for(m=0;m")+(g?c?"2":"1":"")+f;if(s&&(k+=" "+a(s.replace(/ ?[\r\n]+/g," ")),o&&o()),u)return t=t.replace(/\n+/g,`$&${c}`),`${k} +${c}${v}${t}${h}`;t=t.replace(/\n+/g,` +$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);const M=bt(`${v}${t}${h}`,c,Wt,kt(n,!0));return`${k} +${c}${M}`}function Ii(s,e,t,n){const{type:o,value:i}=s,{actualString:r,implicitKey:a,indent:l,indentStep:c,inFlow:u}=e;if(a&&i.includes(` +`)||u&&/[[\]{},]/.test(i))return Se(i,e);if(!i||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return a||u||!i.includes(` +`)?Se(i,e):et(s,e,t,n);if(!a&&!u&&o!==I.PLAIN&&i.includes(` +`))return et(s,e,t,n);if(wt(i)){if(l==="")return e.forceBlockIndent=!0,et(s,e,t,n);if(a&&l===c)return Se(i,e)}const f=i.replace(/\n+/g,`$& +${l}`);if(r){const d=g=>{var m;return g.default&&g.tag!=="tag:yaml.org,2002:str"&&((m=g.test)==null?void 0:m.test(f))},{compat:h,tags:p}=e.doc.schema;if(p.some(d)||h!=null&&h.some(d))return Se(i,e)}return a?f:bt(f,l,gn,kt(e,!1))}function ji(s,e,t,n){const{implicitKey:o,inFlow:i}=e,r=typeof s.value=="string"?s:Object.assign({},s,{value:String(s.value)});let{type:a}=s;a!==I.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(r.value)&&(a=I.QUOTE_DOUBLE);const l=u=>{switch(u){case I.BLOCK_FOLDED:case I.BLOCK_LITERAL:return o||i?Se(r.value,e):et(r,e,t,n);case I.QUOTE_DOUBLE:return Re(r.value,e);case I.QUOTE_SINGLE:return zt(r.value,e);case I.PLAIN:return Ii(r,e,t,n);default:return null}};let c=l(a);if(c===null){const{defaultKeyType:u,defaultStringType:f}=e.options,d=o&&u||f;if(c=l(d),c===null)throw new Error(`Unsupported default string type ${d}`)}return c}function Hi(s,e){const t=Object.assign({blockQuote:!0,commentString:$i,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},s.schema.toStringOptions,e);let n;switch(t.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:s,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:n,options:t}}function Di(s,e){var o;if(e.tag){const i=s.filter(r=>r.tag===e.tag);if(i.length>0)return i.find(r=>r.format===e.format)??i[0]}let t,n;if(j(e)){n=e.value;const i=s.filter(r=>{var a;return(a=r.identify)==null?void 0:a.call(r,n)});t=i.find(r=>r.format===e.format)??i.find(r=>!r.format)}else n=e,t=s.find(i=>i.nodeClass&&n instanceof i.nodeClass);if(!t){const i=((o=n==null?void 0:n.constructor)==null?void 0:o.name)??typeof n;throw new Error(`Tag not resolved for ${i} value`)}return t}function Ri(s,e,{anchors:t,doc:n}){if(!n.directives)return"";const o=[],i=(j(s)||U(s))&&s.anchor;i&&hn(i)&&(t.add(i),o.push(`&${i}`));const r=s.tag?s.tag:e.default?null:e.tag;return r&&o.push(n.directives.tagString(r)),o.join(" ")}function lt(s,e,t,n){var l;if(D(s))return s.toString(e,t,n);if(Ae(s)){if(e.doc.directives)return s.toString(e);if((l=e.resolvedAliases)!=null&&l.has(s))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(s):e.resolvedAliases=new Set([s]),s=s.resolve(e.doc)}let o;const i=B(s)?s:e.doc.createNode(s,{onTagObj:c=>o=c});o||(o=Di(e.doc.schema.tags,i));const r=Ri(i,o,e);r.length>0&&(e.indentAtStart=(e.indentAtStart??0)+r.length+1);const a=typeof o.stringify=="function"?o.stringify(i,e,t,n):j(i)?ji(i,e,t,n):i.toString(e,t,n);return r?j(i)||a[0]==="{"||a[0]==="["?`${r} ${a}`:`${r} +${e.indent}${a}`:a}function Fi({key:s,value:e},t,n,o){const{allNullValues:i,doc:r,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:f}}=t;let d=B(s)&&s.comment||null;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(U(s)||!B(s)&&typeof s=="object"){const O="With simple keys, collection cannot be used as a key value";throw new Error(O)}}let h=!f&&(!s||d&&e==null&&!t.inFlow||U(s)||(j(s)?s.type===I.BLOCK_FOLDED||s.type===I.BLOCK_LITERAL:typeof s=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!h&&(f||!i),indent:a+l});let p=!1,g=!1,m=lt(s,t,()=>p=!0,()=>g=!0);if(!h&&!t.inFlow&&m.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(t.inFlow){if(i||e==null)return p&&n&&n(),m===""?"?":h?`? ${m}`:m}else if(i&&!f||e==null&&h)return m=`? ${m}`,d&&!p?m+=we(m,t.indent,c(d)):g&&o&&o(),m;p&&(d=null),h?(d&&(m+=we(m,t.indent,c(d))),m=`? ${m} +${a}:`):(m=`${m}:`,d&&(m+=we(m,t.indent,c(d))));let y,v,b;B(e)?(y=!!e.spaceBefore,v=e.commentBefore,b=e.comment):(y=!1,v=null,b=null,e&&typeof e=="object"&&(e=r.createNode(e))),t.implicitKey=!1,!h&&!d&&j(e)&&(t.indentAtStart=m.length+1),g=!1,!u&&l.length>=2&&!t.inFlow&&!h&&as(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let k=!1;const M=lt(e,t,()=>k=!0,()=>g=!0);let _=" ";if(d||y||v){if(_=y?` +`:"",v){const O=c(v);_+=` +${We(O,t.indent)}`}M===""&&!t.inFlow?_===` +`&&(_=` + +`):_+=` +${t.indent}`}else if(!h&&U(e)){const O=M[0],C=M.indexOf(` +`),$=C!==-1,W=t.inFlow??e.flow??e.items.length===0;if($||!W){let R=!1;if($&&(O==="&"||O==="!")){let P=M.indexOf(" ");O==="&"&&P!==-1&&Ps===Ts||j(s)&&s.value===Ts&&(!s.type||s.type===I.PLAIN);function Lt(s,e,t){const n=s&&Ae(t)?t.resolve(s.doc):t;if(!fn(n))throw new Error("Merge sources must be maps or map aliases");const o=n.toJSON(null,s,Map);for(const[i,r]of o)e instanceof Map?e.has(i)||e.set(i,r):e instanceof Set?e.add(i):Object.prototype.hasOwnProperty.call(e,i)||Object.defineProperty(e,i,{value:r,writable:!0,enumerable:!0,configurable:!0});return e}function zi(s,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(B(s)&&(t!=null&&t.doc)){const n=Hi(t.doc,{});n.anchors=new Set;for(const i of t.anchors.keys())n.anchors.add(i.anchor);n.inFlow=!0,n.inStringifyKey=!0;const o=s.toString(n);if(!t.mapKeyWarned){let i=JSON.stringify(o);i.length>40&&(i=i.substring(0,36)+'..."'),Bi(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return o}return JSON.stringify(e)}function cs(s,e,t){const n=at(s,void 0,t),o=at(e,void 0,t);return new oe(n,o)}class oe{constructor(e,t=null){Object.defineProperty(this,se,{value:un}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return B(t)&&(t=t.clone(e)),B(n)&&(n=n.clone(e)),new oe(t,n)}toJSON(e,t){const n=t!=null&&t.mapAsMap?new Map:{};return mn(t,n,this)}toString(e,t,n){return e!=null&&e.doc?Fi(this,e,t,n):JSON.stringify(this)}}function yn(s,e,t){return(e.inFlow??s.flow?qi:Vi)(s,e,t)}function Vi({comment:s,items:e},t,{blockItemPrefix:n,flowChars:o,itemIndent:i,onChompKeep:r,onComment:a}){const{indent:l,options:{commentString:c}}=t,u=Object.assign({},t,{indent:i,type:null});let f=!1;const d=[];for(let p=0;pm=null,()=>f=!0);m&&(y+=we(y,i,c(m))),f&&m&&(f=!1),d.push(n+y)}let h;if(d.length===0)h=o.start+o.end;else{h=d[0];for(let p=1;pm=null);pu||y.includes(` +`))&&(c=!0),f.push(y),u=f.length}const{start:d,end:h}=t;if(f.length===0)return d+h;if(!c){const p=f.reduce((g,m)=>g+m.length+2,2);c=e.options.lineWidth>0&&p>e.options.lineWidth}if(c){let p=d;for(const g of f)p+=g?` +${i}${o}${g}`:` +`;return`${p} +${o}${h}`}else return`${d}${r}${f.join(" ")}${r}${h}`}function ct({indent:s,options:{commentString:e}},t,n,o){if(n&&o&&(n=n.replace(/^\n+/,"")),n){const i=We(e(n),s);t.push(i.trimStart())}}function pe(s,e){const t=j(e)?e.value:e;for(const n of s)if(D(n)&&(n.key===e||n.key===t||j(n.key)&&n.key.value===t))return n}class ve extends pn{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(ge,e),this.items=[]}static from(e,t,n){const{keepUndefined:o,replacer:i}=n,r=new this(e),a=(l,c)=>{if(typeof i=="function")c=i.call(t,l,c);else if(Array.isArray(i)&&!i.includes(l))return;(c!==void 0||o)&&r.items.push(cs(l,c,n))};if(t instanceof Map)for(const[l,c]of t)a(l,c);else if(t&&typeof t=="object")for(const l of Object.keys(t))a(l,t[l]);return typeof e.sortMapEntries=="function"&&r.items.sort(e.sortMapEntries),r}add(e,t){var r;let n;D(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new oe(e,e==null?void 0:e.value):n=new oe(e.key,e.value);const o=pe(this.items,n.key),i=(r=this.schema)==null?void 0:r.sortMapEntries;if(o){if(!t)throw new Error(`Key ${n.key} already set`);j(o.value)&&dn(n.value)?o.value.value=n.value:o.value=n.value}else if(i){const a=this.items.findIndex(l=>i(n,l)<0);a===-1?this.items.push(n):this.items.splice(a,0,n)}else this.items.push(n)}delete(e){const t=pe(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){const n=pe(this.items,e),o=n==null?void 0:n.value;return(!t&&j(o)?o.value:o)??void 0}has(e){return!!pe(this.items,e)}set(e,t){this.add(new oe(e,t),!0)}toJSON(e,t,n){const o=n?new n:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(o);for(const i of this.items)mn(t,o,i);return o}toString(e,t,n){if(!e)return JSON.stringify(this);for(const o of this.items)if(!D(o))throw new Error(`Map items must all be pairs; found ${JSON.stringify(o)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),yn(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}class vn extends pn{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(ze,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=qe(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){const n=qe(e);if(typeof n!="number")return;const o=this.items[n];return!t&&j(o)?o.value:o}has(e){const t=qe(e);return typeof t=="number"&&t=0?e:null}function Ui(s,e,t){const{replacer:n}=t,o=new vn(s);o.tag="tag:yaml.org,2002:pairs";let i=0;if(e&&Symbol.iterator in Object(e))for(let r of e){typeof n=="function"&&(r=n.call(e,String(i++),r));let a,l;if(Array.isArray(r))if(r.length===2)a=r[0],l=r[1];else throw new TypeError(`Expected [key, value] tuple: ${r}`);else if(r&&r instanceof Object){const c=Object.keys(r);if(c.length===1)a=c[0],l=r[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=r;o.items.push(cs(a,l,t))}return o}class us extends vn{constructor(){super(),this.add=ve.prototype.add.bind(this),this.delete=ve.prototype.delete.bind(this),this.get=ve.prototype.get.bind(this),this.has=ve.prototype.has.bind(this),this.set=ve.prototype.set.bind(this),this.tag=us.tag}toJSON(e,t){if(!t)return super.toJSON(e);const n=new Map;t!=null&&t.onCreate&&t.onCreate(n);for(const o of this.items){let i,r;if(D(o)?(i=X(o.key,"",t),r=X(o.value,i,t)):i=X(o,"",t),n.has(i))throw new Error("Ordered maps must not include duplicate keys");n.set(i,r)}return n}static from(e,t,n){const o=Ui(e,t,n),i=new this;return i.items=o.items,i}}us.tag="tag:yaml.org,2002:omap";class fs extends ve{constructor(e){super(e),this.tag=fs.tag}add(e){let t;D(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new oe(e.key,null):t=new oe(e,null),pe(this.items,t.key)||this.items.push(t)}get(e,t){const n=pe(this.items,e);return!t&&D(n)?j(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const n=pe(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new oe(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){const{replacer:o}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let r of t)typeof o=="function"&&(r=o.call(t,r,r)),i.items.push(cs(r,null,n));return i}}fs.tag="tag:yaml.org,2002:set";new Set("0123456789ABCDEFabcdef");new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()");new Set(",[]{}");new Set(` ,[]{} +\r `);function $a(){const s=T(Date.now()),e=Wn({interval:1e3}),t=w(()=>{const o=(e.value-s.value)/1e3,i=Math.floor(o%60).toString().padStart(2,"0");return`${Math.floor(o/60).toString().padStart(2,"0")}:${i}`});function n(){s.value=e.value}return{timer:t,resetTimer:n}}function hs(s=5){const e=[],t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",n=t.length;for(let o=0;oi.trim());t=e?o:n}if(t)return{...s,name:t}}function Ji(s,e,t){var o,i;let n=s>0?(o=t==null?void 0:t.meta)==null?void 0:o.transition:(i=e==null?void 0:e.meta)==null?void 0:i.transition;return n||(n=E.transition||void 0),Ki(n,s<0)}function Gi(s,e,{mode:t="replace"}={}){const n=gt();return w({get(){const o=n.currentRoute.value.query[s];return o==null?e:Array.isArray(o)?o.filter(Boolean):o},set(o){Vs(()=>{(n.currentRoute.value.query[s]??(e==null?void 0:e.toString()))!==o.toString()&&n[Xt(t)]({query:{...n.currentRoute.value.query,[s]:`${o}`===e?void 0:o}})})}})}function bn(s,e,t=1){var o,i,r,a,l,c,u;const n=e.meta.slide.level??t;n&&n>t&&s.length>0?bn(s[s.length-1].children,e,t+1):s.push({no:e.no,children:[],level:t,titleLevel:n,path:_e(((i=(o=e.meta.slide)==null?void 0:o.frontmatter)==null?void 0:i.routeAlias)??e.no,!1),hideInToc:!!((l=(a=(r=e.meta)==null?void 0:r.slide)==null?void 0:a.frontmatter)!=null&&l.hideInToc),title:(u=(c=e.meta)==null?void 0:c.slide)==null?void 0:u.title})}function kn(s,e,t=!1,n,o){return s.map(i=>{const r={...i,active:i.no===(o==null?void 0:o.value),hasActiveParent:t};return r.children.length>0&&(r.children=kn(r.children,e,r.active||r.hasActiveParent,r,o)),n&&(r.active||r.activeParent)&&(n.activeParent=!0),r})}function wn(s,e=1){return s.filter(t=>!t.hideInToc).map(t=>({...t,children:wn(t.children,e+1)}))}function Qi(s,e,t){const n=w(()=>s.value.filter(i=>{var r,a;return(a=(r=i.meta)==null?void 0:r.slide)==null?void 0:a.title}).reduce((i,r)=>(bn(i,r),i),[])),o=w(()=>kn(n.value,t.value,void 0,void 0,e));return w(()=>wn(o.value))}function qt(s){if(s===!1||s==="false")return null;if(s==null||s===!0||s==="true")return"+1";if(typeof s=="string"&&"+-".includes(s[0]))return s;const e=+s;return Number.isNaN(e)?(console.error(`Invalid "at" prop value: ${s}`),null):e}function Zi(s){return Array.isArray(s)?[qt(s[0]),qt(s[1])]:null}function Sn(s,e=0,t){const n=T(!1);let o=new Map,i=new Map;const r={get current(){return Rt(+s.value,e,r.total)},set current(a){s.value=n.value?Rt(a,e,r.total):a},clicksStart:e,get relativeSizeMap(){return o},get maxMap(){return i},get isMounted(){return n.value},setup(){xs(()=>{n.value=!0,i=es(i),r.current=s.value}),zn(()=>{n.value=!1,o=new Map,i=new Map})},calculateSince(a,l=1){const c=qt(a);if(c==null)return null;let u,f,d;if(typeof c=="string"){const h=r.currentOffset,p=+c;u=h+p,f=h+p+l-1,d=p+l-1}else u=c,f=c+l-1,d=0;return{start:u,end:+Number.POSITIVE_INFINITY,max:f,delta:d,currentOffset:w(()=>r.current-u),isCurrent:w(()=>r.current===u),isActive:w(()=>r.current>=u)}},calculateRange(a){const l=Zi(a);if(l==null)return null;const[c,u]=l;let f,d,h;return typeof c=="string"?(f=r.currentOffset+ +c,h=+c):(f=c,h=0),typeof u=="string"?(d=f+ +u,h+=+u):d=u,{start:f,end:d,max:d,delta:h,currentOffset:w(()=>r.current-f),isCurrent:w(()=>r.current===f),isActive:w(()=>f<=r.current&&r.current0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),r=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));o=Promise.all(t.map(a=>{if(a=er(a),a in As)return;As[a]=!0;const l=a.endsWith(".css"),c=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${c}`))return;const u=document.createElement("link");if(u.rel=l?"stylesheet":Xi,l||(u.as="script",u.crossOrigin=""),u.href=a,r&&u.setAttribute("nonce",r),document.head.appendChild(u),l)return new Promise((f,d)=>{u.addEventListener("load",f),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${a}`)))})}))}return o.then(()=>e()).catch(i=>{const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=i,window.dispatchEvent(r),!r.defaultPrevented)throw i})},tr=(s,e)=>{const t=s.__vccOpts||s;for(const[n,o]of e)t[n]=o;return t},sr={},nr={class:"px-4 py-10 text-center text-red-700 dark:text-red-500 font-bold font-mono"};function or(s,e){return nt(),Dt("div",nr," An error occurred on this slide. Check the terminal for more information. ")}const ds=tr(sr,[["render",or]]),ir={class:"h-full w-full flex items-center justify-center gap-2 slidev-slide-loading"},rr=Js("div",{class:"i-svg-spinners-90-ring-with-bg text-xl"},null,-1),ar=Js("div",null,"Loading slide...",-1),lr=Ks({__name:"SlideLoading",setup(s){const e=T(!1);return xs(()=>{setTimeout(()=>{e.value=!0},200)}),(t,n)=>(nt(),Dt("div",ir,[e.value?(nt(),Dt(Vn,{key:0},[rr,ar],64)):qn("",!0)]))}}),cr={theme:"default",title:"Welcome to Slidev",layout:"intro"},ue=Te(cr),ur=es({get layout(){return ue.layout},get transition(){return ue.transition},get class(){return ue.class},get clicks(){return ue.clicks},get name(){return ue.name},get preload(){return ue.preload},slide:{index:0,content:"",note:"",title:"Welcome to Slidev",noteHTML:"",raw:"",frontmatter:ue,filepath:"",start:0,id:0,no:1},__clicksContext:null,__preloaded:!1}),fr={layout:"intro"},fe=Te(fr),hr=es({get layout(){return fe.layout},get transition(){return fe.transition},get class(){return fe.class},get clicks(){return fe.clicks},get name(){return fe.name},get preload(){return fe.preload},slide:{index:1,content:"",note:"",title:"Imported Slides",level:1,noteHTML:"",raw:"",frontmatter:fe,filepath:"",start:0,id:1,no:2},__clicksContext:null,__preloaded:!1}),Oe=new Array(2),Cs=(s,e)=>Un({loader:e,delay:300,loadingComponent:lr,errorComponent:ds,onError:t=>console.error("Failed to load slide "+(s+1),t)}),Ls=async()=>{try{return Oe[0]??(Oe[0]=await ne(()=>import("./md-C8XcVckz.js"),__vite__mapDeps([0,1,2,3,4,5])))}catch(s){return console.error("slide failed to load",s),ds}},Es=async()=>{try{return Oe[1]??(Oe[1]=await ne(()=>import("./md-Cc1fxSyz.js"),__vite__mapDeps([6,1,3,2,4,5])))}catch(s){return console.error("slide failed to load",s),ds}},dr=[{no:1,meta:ur,load:Ls,component:Cs(0,Ls)},{no:2,meta:hr,load:Es,component:Cs(1,Es)}],te=ts(dr);function pr(s,e,t=T(0),n,o,i){const r=w(()=>te.value.length),a=T(0),l=T(0),c=w(()=>_e(s.value,n.value)),u=w(()=>s.value.no),f=w(()=>{var A;return((A=s.value.meta)==null?void 0:A.layout)||(u.value===1?"cover":"default")}),d=w(()=>e.value.current),h=w(()=>e.value.clicksStart),p=w(()=>e.value.total),g=w(()=>te.value[Math.min(te.value.length,u.value+1)-1]),m=w(()=>te.value[Math.max(1,u.value-1)-1]),y=w(()=>u.valueu.value>1||d.value>0),b=w(()=>Ji(a.value,s.value,m.value));J(s,(A,H)=>{a.value=A.no-H.no});async function k(A){return!1}const M=Qi(te,u,s);async function _(){l.value=1,p.value<=t.value?await C():t.value+=1}async function O(){l.value=-1,t.value<=h.value?await $(!0):t.value-=1}async function C(A=!1){l.value=1,u.value1&&await P(u.value-1,A&&!o.value?Ze:void 0)}function W(){return P(1)}function R(){return P(r.value)}async function P(A,H=0,ee=!1){var le,Le,Ee;os.value=!1;const Ce=u.value!==A,Z=H!==t.value,x=(le=St(A))==null?void 0:le.meta,N=((Le=x==null?void 0:x.slide)==null?void 0:Le.frontmatter.clicksStart)??0;H=Rt(H,N,((Ee=x==null?void 0:x.__clicksContext)==null?void 0:Ee.total)??Ze),(ee||Ce||Z)&&await(i==null?void 0:i.push({path:_e(A,n.value),query:{...i.currentRoute.value.query,clicks:H===0?void 0:H.toString(),embedded:location.search.includes("embedded")?"true":void 0}}))}function L(){i==null||i.push({path:_e(u.value,!0),query:{...i.currentRoute.value.query}})}function F(){i==null||i.push({path:_e(u.value,!1),query:{...i.currentRoute.value.query}})}return{slides:te,total:r,currentPath:c,currentSlideNo:u,currentPage:u,currentSlideRoute:s,currentLayout:f,currentTransition:b,clicksDirection:l,nextRoute:g,prevRoute:m,clicksContext:e,clicks:d,clicksStart:h,clicksTotal:p,hasNext:y,hasPrev:v,tocTree:M,navDirection:a,openInEditor:k,next:_,prev:O,go:P,goLast:R,goFirst:W,nextSlide:C,prevSlide:$,enterPresenter:L,exitPresenter:F}}const gr=Gs(()=>{const s=gt(),e=w(()=>s.currentRoute.value),t=w(()=>(s.currentRoute.value.query,new URLSearchParams(location.search))),n=w(()=>t.value.has("print")),o=w(()=>t.value.get("print")==="clicks"),i=w(()=>t.value.has("embedded")),r=w(()=>e.value.name==="play"),a=w(()=>e.value.name==="presenter"),l=w(()=>e.value.name==="notes"),c=w(()=>!a.value&&(!E.remote||t.value.get("password")===E.remote)),u=xn(r,a),f=w(()=>{var y;return u.value?((y=St(e.value.params.no))==null?void 0:y.no)??1:1}),d=w(()=>te.value[f.value-1]),h=Gi("clicks","0"),p=w(()=>m(d.value)),g=w({get(){let y=+(h.value||0);return Number.isNaN(y)&&(y=0),y},set(y){os.value=!1,h.value=y.toString()}});function m(y){var k,M;if((k=y==null?void 0:y.meta)!=null&&k.__clicksContext)return y.meta.__clicksContext;const v=y.no,b=Sn(w({get(){return f.value===v?Math.max(+(h.value??0),b.clicksStart):f.value>v?Ze:b.clicksStart},set(_){f.value===v&&(h.value=_.toString())}}),((M=y==null?void 0:y.meta.slide)==null?void 0:M.frontmatter.clicksStart)??0,y==null?void 0:y.meta.clicks);return y!=null&&y.meta&&(y.meta.__clicksContext=b),b}return{router:s,currentRoute:e,isPrintMode:n,isPrintWithClicks:o,isEmbedded:i,isPlaying:r,isPresenter:a,isNotesViewer:l,isPresenterAvailable:c,hasPrimarySlide:u,currentSlideNo:f,currentSlideRoute:d,clicksContext:p,queryClicksRaw:h,queryClicks:g,getPrimaryClicks:m}}),Ut=Gs(()=>{const s=gr(),e=gt(),t=pr(s.currentSlideRoute,s.clicksContext,s.queryClicks,s.isPresenter,s.isPrintMode,e);return J([t.total,s.currentRoute],async()=>{const n=s.currentRoute.value.params.no;s.hasPrimarySlide.value&&!St(n)&&(n&&n!=="index.html"?await t.go(t.total.value,0,!0):await t.go(1,0,!0))},{flush:"pre",immediate:!0}),{...t,...s}});function St(s){return te.value.find(e=>{var t;return e.no===+s||((t=e.meta.slide)==null?void 0:t.frontmatter.routeAlias)===s})}function _e(s,e){var n;(typeof s=="number"||typeof s=="string")&&(s=St(s));const t=((n=s.meta.slide)==null?void 0:n.frontmatter.routeAlias)??s.no;return e?`/presenter/${t}`:`/${t}`}const $s=Kn(),Et=G("slidev-color-schema","auto"),Ns=w(()=>E.colorSchema!=="auto"),_n=w({get(){return Ns.value?E.colorSchema==="dark":Et.value==="auto"?$s.value:Et.value==="dark"},set(s){Ns.value||(Et.value=s===$s.value?"auto":s?"dark":"light")}}),Na=Qs(_n);mt&&J(_n,s=>{const e=document.querySelector("html");e.classList.toggle("dark",s),e.classList.toggle("light",!s)},{immediate:!0});const mr=[];function yr(){const s=Us().appContext.app,e=Te({nav:Ut(),configs:E,themeConfigs:w(()=>E.themeConfig)});s.provide(ns,T("none")),s.provide(vi,e),s.provide(ss,w(()=>e.nav.currentSlideNo)),s.provide(yt,ts(Yi()));for(const u of mr)u();const{clicksContext:t,currentSlideNo:n,hasPrimarySlide:o,isNotesViewer:i,isPresenter:r}=Ut();li({title:Mt,htmlAttrs:E.htmlAttrs}),hi(`${Mt} - shared`),mi(`${Mt} - drawings`);const a=`${location.origin}_${hs()}`;function l(){i.value||!r.value&&!wi.includes(location.host.split(":")[0])||(r.value?(ce("page",+n.value),ce("clicks",t.value.current),ce("clicksTotal",t.value.total)):(ce("viewerPage",+n.value),ce("viewerClicks",t.value.current),ce("viewerClicksTotal",t.value.total)),ce("lastUpdate",{id:a,type:r.value?"presenter":"viewer",time:new Date().getTime()}))}const c=gt();c.afterEach(l),J(t,l),di(u=>{var f;o.value&&((f=u.lastUpdate)==null?void 0:f.type)==="presenter"&&(+u.page!=+n.value||+t.value.current!=+u.clicks)&&(os.value=!1,c.replace({path:_e(u.page,r.value),query:{...c.currentRoute.value.query,clicks:u.clicks||0}}))})}const vr=Ks({__name:"App",setup(s){return yr(),Me(()=>{for(const[e,t]of Object.entries(vo.value))document.body.style.setProperty(e,t.toString())}),(e,t)=>{const n=Jn("RouterView");return nt(),Gn(n)}}});function Ia(s,e=""){var o,i;const t=["slidev-page",e],n=(i=(o=s==null?void 0:s.meta)==null?void 0:o.slide)==null?void 0:i.no;return n!=null&&t.push(`slidev-page-${n}`),t.filter(Boolean).join(" ")}async function ja(){const{saveAs:s}=await ne(async()=>{const{saveAs:e}=await import("./modules/file-saver-Bb21Aim5.js").then(t=>t.F);return{saveAs:e}},[]);s(typeof E.download=="string"?E.download:E.exportFilename?`${E.exportFilename}.pdf`:"/testslidev-exported.pdf",`${E.title}.pdf`)}function Pe(s,e,t){var n;return((n=s.instance)==null?void 0:n.$).provides[e]??t}function br(){return{install(s){s.directive("click",{name:"v-click",mounted(e,t){const n=tt(e,t,t.value);n!=null&&(e.classList.toggle(Qe,!0),e.dataset.slidevClicksStart=String(n.start),Number.isFinite(n.end)&&(e.dataset.slidevClicksEnd=String(n.end)),e.watchStopHandle=Me(()=>{const o=n.isActive.value,i=n.isCurrent.value,r=o&&!i;n.flagHide?(e.classList.toggle(n.flagFade?Ne:$e,o),e.classList.toggle(Tt,o)):e.classList.toggle(n.flagFade?Ne:$e,!o),e.classList.toggle(At,i),e.classList.toggle(Ct,r)}))},unmounted:$t}),s.directive("after",{name:"v-after",mounted(e,t){const n=tt(e,t,"+0");n!=null&&(e.classList.toggle(Qe,!0),e.watchStopHandle=Me(()=>{const o=n.isActive.value,i=n.isCurrent.value,r=o&&!i;n.flagHide?(e.classList.toggle(n.flagFade?Ne:$e,o),e.classList.toggle(Tt,o)):e.classList.toggle(n.flagFade?Ne:$e,!o),e.classList.toggle(At,i),e.classList.toggle(Ct,r)}))},unmounted:$t}),s.directive("click-hide",{name:"v-click-hide",mounted(e,t){const n=tt(e,t,t.value,!0);n!=null&&(e.classList.toggle(Qe,!0),e.watchStopHandle=Me(()=>{const o=n.isActive.value,i=n.isCurrent.value,r=o&&!i;e.classList.toggle(n.flagFade?Ne:$e,o),e.classList.toggle(Tt,o),e.classList.toggle(At,i),e.classList.toggle(Ct,r)}))},unmounted:$t})}}}const Mn=new Map;function tt(s,e,t,n=!1){var f;const o=(f=Pe(e,yt))==null?void 0:f.value;if(!s||!o)return null;const i=n||e.modifiers.hide!==!1&&e.modifiers.hide!=null,r=e.modifiers.fade!==!1&&e.modifiers.fade!=null,a=o.calculate(t);if(!a)return null;o.register(s,a);const l=w(()=>i?!a.isActive.value:a.isActive.value),c=w(()=>l.value?"shown":Number.isFinite(a.end)?o.currentn.push(...o)),xt(n,e,t)}function Sr(s,e){return s[0]===e[0]&&s[1]===e[1]}function _r(s,e,t,n=1){const o=t,i=Math.max(e,.1),r=s[0]&&s[0][0]&&typeof s[0][0]=="number"?[s]:s,a=[0,0];if(o)for(const c of r)xt(c,a,o);const l=Mr(r,i,n);if(o){for(const c of r)xt(c,a,-o);wr(l,a,-o)}return l}function Mr(s,e,t){const n=[];for(const c of s){const u=[...c];Sr(u[0],u[u.length-1])||u.push([u[0][0],u[0][1]]),u.length>2&&n.push(u)}const o=[];e=Math.max(e,.1);const i=[];for(const c of n)for(let u=0;uc.yminu.ymin?1:c.xu.x?1:c.ymax===u.ymax?0:(c.ymax-u.ymax)/Math.abs(c.ymax-u.ymax)),!i.length)return o;let r=[],a=i[0].ymin,l=0;for(;r.length||i.length;){if(i.length){let c=-1;for(let f=0;fa);f++)c=f;i.splice(0,c+1).forEach(f=>{r.push({s:a,edge:f})})}if(r=r.filter(c=>!(c.edge.ymax<=a)),r.sort((c,u)=>c.edge.x===u.edge.x?0:(c.edge.x-u.edge.x)/Math.abs(c.edge.x-u.edge.x)),(t!==1||l%e===0)&&r.length>1)for(let c=0;c=r.length)break;const f=r[c].edge,d=r[u].edge;o.push([[Math.round(f.x),a],[Math.round(d.x),a]])}a+=t,r.forEach(c=>{c.edge.x=c.edge.x+t*c.edge.islope}),l++}return o}function Ve(s,e){var t;const n=e.hachureAngle+90;let o=e.hachureGap;o<0&&(o=e.strokeWidth*4),o=Math.round(Math.max(o,.1));let i=1;return e.roughness>=1&&(((t=e.randomizer)===null||t===void 0?void 0:t.next())||Math.random())>.7&&(i=o),_r(s,o,n,i||1)}class ps{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){const n=Ve(e,t);return{type:"fillSketch",ops:this.renderLines(n,t)}}renderLines(e,t){const n=[];for(const o of e)n.push(...this.helper.doubleLineOps(o[0][0],o[0][1],o[1][0],o[1][1],t));return n}}function _t(s){const e=s[0],t=s[1];return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}class Or extends ps{fillPolygons(e,t){let n=t.hachureGap;n<0&&(n=t.strokeWidth*4),n=Math.max(n,.1);const o=Object.assign({},t,{hachureGap:n}),i=Ve(e,o),r=Math.PI/180*t.hachureAngle,a=[],l=n*.5*Math.cos(r),c=n*.5*Math.sin(r);for(const[f,d]of i)_t([f,d])&&a.push([[f[0]-l,f[1]+c],[...d]],[[f[0]+l,f[1]-c],[...d]]);return{type:"fillSketch",ops:this.renderLines(a,t)}}}class Pr extends ps{fillPolygons(e,t){const n=this._fillPolygons(e,t),o=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),i=this._fillPolygons(e,o);return n.ops=n.ops.concat(i.ops),n}}class Tr{constructor(e){this.helper=e}fillPolygons(e,t){t=Object.assign({},t,{hachureAngle:0});const n=Ve(e,t);return this.dotsOnLines(n,t)}dotsOnLines(e,t){const n=[];let o=t.hachureGap;o<0&&(o=t.strokeWidth*4),o=Math.max(o,.1);let i=t.fillWeight;i<0&&(i=t.strokeWidth/2);const r=o/4;for(const a of e){const l=_t(a),c=l/o,u=Math.ceil(c)-1,f=l-u*o,d=(a[0][0]+a[1][0])/2-o/4,h=Math.min(a[0][1],a[1][1]);for(let p=0;p{const a=_t(r),l=Math.floor(a/(n+o)),c=(a+o-l*(n+o))/2;let u=r[0],f=r[1];u[0]>f[0]&&(u=r[1],f=r[0]);const d=Math.atan((f[1]-u[1])/(f[0]-u[0]));for(let h=0;h{const r=_t(i),a=Math.round(r/(2*t));let l=i[0],c=i[1];l[0]>c[0]&&(l=i[1],c=i[0]);const u=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let f=0;fu%2?c+t:c+e);i.push({key:"C",data:l}),e=l[4],t=l[5];break}case"Q":i.push({key:"Q",data:[...a]}),e=a[2],t=a[3];break;case"q":{const l=a.map((c,u)=>u%2?c+t:c+e);i.push({key:"Q",data:l}),e=l[2],t=l[3];break}case"A":i.push({key:"A",data:[...a]}),e=a[5],t=a[6];break;case"a":e+=a[5],t+=a[6],i.push({key:"A",data:[a[0],a[1],a[2],a[3],a[4],e,t]});break;case"H":i.push({key:"H",data:[...a]}),e=a[0];break;case"h":e+=a[0],i.push({key:"H",data:[e]});break;case"V":i.push({key:"V",data:[...a]}),t=a[0];break;case"v":t+=a[0],i.push({key:"V",data:[t]});break;case"S":i.push({key:"S",data:[...a]}),e=a[2],t=a[3];break;case"s":{const l=a.map((c,u)=>u%2?c+t:c+e);i.push({key:"S",data:l}),e=l[2],t=l[3];break}case"T":i.push({key:"T",data:[...a]}),e=a[0],t=a[1];break;case"t":e+=a[0],t+=a[1],i.push({key:"T",data:[e,t]});break;case"Z":case"z":i.push({key:"Z",data:[]}),e=n,t=o;break}return i}function An(s){const e=[];let t="",n=0,o=0,i=0,r=0,a=0,l=0;for(const{key:c,data:u}of s){switch(c){case"M":e.push({key:"M",data:[...u]}),[n,o]=u,[i,r]=u;break;case"C":e.push({key:"C",data:[...u]}),n=u[4],o=u[5],a=u[2],l=u[3];break;case"L":e.push({key:"L",data:[...u]}),[n,o]=u;break;case"H":n=u[0],e.push({key:"L",data:[n,o]});break;case"V":o=u[0],e.push({key:"L",data:[n,o]});break;case"S":{let f=0,d=0;t==="C"||t==="S"?(f=n+(n-a),d=o+(o-l)):(f=n,d=o),e.push({key:"C",data:[f,d,...u]}),a=u[0],l=u[1],n=u[2],o=u[3];break}case"T":{const[f,d]=u;let h=0,p=0;t==="Q"||t==="T"?(h=n+(n-a),p=o+(o-l)):(h=n,p=o);const g=n+2*(h-n)/3,m=o+2*(p-o)/3,y=f+2*(h-f)/3,v=d+2*(p-d)/3;e.push({key:"C",data:[g,m,y,v,f,d]}),a=h,l=p,n=f,o=d;break}case"Q":{const[f,d,h,p]=u,g=n+2*(f-n)/3,m=o+2*(d-o)/3,y=h+2*(f-h)/3,v=p+2*(d-p)/3;e.push({key:"C",data:[g,m,y,v,h,p]}),a=f,l=d,n=h,o=p;break}case"A":{const f=Math.abs(u[0]),d=Math.abs(u[1]),h=u[2],p=u[3],g=u[4],m=u[5],y=u[6];f===0||d===0?(e.push({key:"C",data:[n,o,m,y,m,y]}),n=m,o=y):(n!==m||o!==y)&&(Cn(n,o,m,y,f,d,h,p,g).forEach(function(b){e.push({key:"C",data:b})}),n=m,o=y);break}case"Z":e.push({key:"Z",data:[]}),n=i,o=r;break}t=c}return e}function Nr(s){return Math.PI*s/180}function Ie(s,e,t){const n=s*Math.cos(t)-e*Math.sin(t),o=s*Math.sin(t)+e*Math.cos(t);return[n,o]}function Cn(s,e,t,n,o,i,r,a,l,c){const u=Nr(r);let f=[],d=0,h=0,p=0,g=0;if(c)[d,h,p,g]=c;else{[s,e]=Ie(s,e,-u),[t,n]=Ie(t,n,-u);const P=(s-t)/2,L=(e-n)/2;let F=P*P/(o*o)+L*L/(i*i);F>1&&(F=Math.sqrt(F),o=F*o,i=F*i);const A=a===l?-1:1,H=o*o,ee=i*i,Ce=H*ee-H*L*L-ee*P*P,Z=H*L*L+ee*P*P,x=A*Math.sqrt(Math.abs(Ce/Z));p=x*o*L/i+(s+t)/2,g=x*-i*P/o+(e+n)/2,d=Math.asin(parseFloat(((e-g)/i).toFixed(9))),h=Math.asin(parseFloat(((n-g)/i).toFixed(9))),sh&&(d=d-Math.PI*2),!l&&h>d&&(h=h-Math.PI*2)}let m=h-d;if(Math.abs(m)>Math.PI*120/180){const P=h,L=t,F=n;l&&h>d?h=d+Math.PI*120/180*1:h=d+Math.PI*120/180*-1,t=p+o*Math.cos(h),n=g+i*Math.sin(h),f=Cn(t,n,L,F,o,i,r,0,l,[h,P,p,g])}m=h-d;const y=Math.cos(d),v=Math.sin(d),b=Math.cos(h),k=Math.sin(h),M=Math.tan(m/4),_=4/3*o*M,O=4/3*i*M,C=[s,e],$=[s+_*v,e-O*y],W=[t+_*k,n-O*b],R=[t,n];if($[0]=2*C[0]-$[0],$[1]=2*C[1]-$[1],c)return[$,W,R].concat(f);{f=[$,W,R].concat(f);const P=[];for(let L=0;L2){const o=[];for(let i=0;iMath.PI*2&&(h=0,p=Math.PI*2);const g=Math.PI*2/l.curveStepCount,m=Math.min(g/2,(p-h)/2),y=Fs(m,c,u,f,d,h,p,1,l);if(!l.disableMultiStroke){const v=Fs(m,c,u,f,d,h,p,1.5,l);y.push(...v)}return r&&(a?y.push(...ae(c,u,c+f*Math.cos(h),u+d*Math.sin(h),l),...ae(c,u,c+f*Math.cos(p),u+d*Math.sin(p),l)):y.push({op:"lineTo",data:[c,u]},{op:"lineTo",data:[c+f*Math.cos(h),u+d*Math.sin(h)]})),{type:"path",ops:y}}function Hs(s,e){const t=An(Tn(gs(s))),n=[];let o=[0,0],i=[0,0];for(const{key:r,data:a}of t)switch(r){case"M":{i=[a[0],a[1]],o=[a[0],a[1]];break}case"L":n.push(...ae(i[0],i[1],a[0],a[1],e)),i=[a[0],a[1]];break;case"C":{const[l,c,u,f,d,h]=a;n.push(...Br(l,c,u,f,d,h,i,e)),i=[d,h];break}case"Z":n.push(...ae(i[0],i[1],o[0],o[1],e)),i=[o[0],o[1]];break}return{type:"path",ops:n}}function It(s,e){const t=[];for(const n of s)if(n.length){const o=e.maxRandomnessOffset||0,i=n.length;if(i>2){t.push({op:"move",data:[n[0][0]+S(o,e),n[0][1]+S(o,e)]});for(let r=1;rMath.PI*2&&(f=0,d=Math.PI*2);const h=(d-f)/r.curveStepCount,p=[];for(let g=f;g<=d;g=g+h)p.push([a+c*Math.cos(g),l+u*Math.sin(g)]);return p.push([a+c*Math.cos(d),l+u*Math.sin(d)]),p.push([a,l]),be([p],r)}function Dr(s,e){return S(s,e)}function Rr(s,e,t){return ut(s,e,t)}function Fr(s,e,t,n,o){return ae(s,e,t,n,o,!0)}function Ds(s){const e=Object.assign({},s);return e.randomizer=void 0,s.seed&&(e.seed=s.seed+1),e}function $n(s){return s.randomizer||(s.randomizer=new kr(s.seed||0)),s.randomizer.next()}function ut(s,e,t,n=1){return t.roughness*n*($n(t)*(e-s)+s)}function S(s,e,t=1){return ut(-s,s,e,t)}function ae(s,e,t,n,o,i=!1){const r=i?o.disableMultiStrokeFill:o.disableMultiStroke,a=Qt(s,e,t,n,o,!0,!1);if(r)return a;const l=Qt(s,e,t,n,o,!0,!0);return a.concat(l)}function Qt(s,e,t,n,o,i,r){const a=Math.pow(s-t,2)+Math.pow(e-n,2),l=Math.sqrt(a);let c=1;l<200?c=1:l>500?c=.4:c=-.0016668*l+1.233334;let u=o.maxRandomnessOffset||0;u*u*100>a&&(u=l/10);const f=u/2,d=.2+$n(o)*.2;let h=o.bowing*o.maxRandomnessOffset*(n-e)/200,p=o.bowing*o.maxRandomnessOffset*(s-t)/200;h=S(h,o,c),p=S(p,o,c);const g=[],m=()=>S(f,o,c),y=()=>S(u,o,c),v=o.preserveVertices;return r?g.push({op:"move",data:[s+(v?0:m()),e+(v?0:m())]}):g.push({op:"move",data:[s+(v?0:S(u,o,c)),e+(v?0:S(u,o,c))]}),r?g.push({op:"bcurveTo",data:[h+s+(t-s)*d+m(),p+e+(n-e)*d+m(),h+s+2*(t-s)*d+m(),p+e+2*(n-e)*d+m(),t+(v?0:m()),n+(v?0:m())]}):g.push({op:"bcurveTo",data:[h+s+(t-s)*d+y(),p+e+(n-e)*d+y(),h+s+2*(t-s)*d+y(),p+e+2*(n-e)*d+y(),t+(v?0:y()),n+(v?0:y())]}),g}function xe(s,e,t){if(!s.length)return[];const n=[];n.push([s[0][0]+S(e,t),s[0][1]+S(e,t)]),n.push([s[0][0]+S(e,t),s[0][1]+S(e,t)]);for(let o=1;o3){const i=[],r=1-t.curveTightness;o.push({op:"move",data:[s[1][0],s[1][1]]});for(let a=1;a+21&&o.push(i):o.push(i),o.push(s[e+3])}else{const r=s[e+0],a=s[e+1],l=s[e+2],c=s[e+3],u=de(r,a,.5),f=de(a,l,.5),d=de(l,c,.5),h=de(u,f,.5),p=de(f,d,.5),g=de(h,p,.5);Zt([r,u,h,g],0,t,o),Zt([g,p,d,c],0,t,o)}return o}function qr(s,e){return ht(s,0,s.length,e)}function ht(s,e,t,n,o){const i=o||[],r=s[e],a=s[t-1];let l=0,c=1;for(let u=e+1;ul&&(l=f,c=u)}return Math.sqrt(l)>n?(ht(s,e,c+1,n,i),ht(s,c,t,n,i)):(i.length||i.push(r),i.push(a)),i}function Yt(s,e=.15,t){const n=[],o=(s.length-1)/3;for(let i=0;i0?ht(n,0,n.length,t):n}function Ur(s,e,t){const n=gs(s),o=An(Tn(n)),i=[];let r=[],a=[0,0],l=[];const c=()=>{l.length>=4&&r.push(...Yt(l,e)),l=[]},u=()=>{c(),r.length&&(i.push(r),r=[])};for(const{key:d,data:h}of o)switch(d){case"M":u(),a=[h[0],h[1]],r.push(a);break;case"L":c(),r.push([h[0],h[1]]);break;case"C":if(!l.length){const p=r.length?r[r.length-1]:a;l.push([p[0],p[1]])}l.push([h[0],h[1]]),l.push([h[2],h[3]]),l.push([h[4],h[5]]);break;case"Z":c(),r.push([a[0],a[1]]);break}if(u(),!t)return i;const f=[];for(const d of i){const h=qr(d,t);h.length&&f.push(h)}return f}const q="none";class xr{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return On()}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,n){return{shape:e,sets:t||[],options:n||this.defaultOptions}}line(e,t,n,o,i){const r=this._o(i);return this._d("line",[K(e,t,n,o,r)],r)}rectangle(e,t,n,o,i){const r=this._o(i),a=[],l=Ln(e,t,n,o,r);if(r.fill){const c=[[e,t],[e+n,t],[e+n,t+o],[e,t+o]];r.fillStyle==="solid"?a.push(It([c],r)):a.push(be([c],r))}return r.stroke!==q&&a.push(l),this._d("rectangle",a,r)}ellipse(e,t,n,o,i){const r=this._o(i),a=[],l=En(n,o,r),c=Gt(e,t,r,l);if(r.fill)if(r.fillStyle==="solid"){const u=Gt(e,t,r,l).opset;u.type="fillPath",a.push(u)}else a.push(be([c.estimatedPoints],r));return r.stroke!==q&&a.push(c.opset),this._d("ellipse",a,r)}circle(e,t,n,o){const i=this.ellipse(e,t,n,n,o);return i.shape="circle",i}linearPath(e,t){const n=this._o(t);return this._d("linearPath",[Fe(e,!1,n)],n)}arc(e,t,n,o,i,r,a=!1,l){const c=this._o(l),u=[],f=js(e,t,n,o,i,r,a,!0,c);if(a&&c.fill)if(c.fillStyle==="solid"){const d=Object.assign({},c);d.disableMultiStroke=!0;const h=js(e,t,n,o,i,r,!0,!1,d);h.type="fillPath",u.push(h)}else u.push(Hr(e,t,n,o,i,r,c));return c.stroke!==q&&u.push(f),this._d("arc",u,c)}curve(e,t){const n=this._o(t),o=[],i=Is(e,n);if(n.fill&&n.fill!==q)if(n.fillStyle==="solid"){const r=Is(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));o.push({type:"fillPath",ops:this._mergedShape(r.ops)})}else{const r=[],a=e;if(a.length){const c=typeof a[0][0]=="number"?[a]:a;for(const u of c)u.length<3?r.push(...u):u.length===3?r.push(...Yt(Bs([u[0],u[0],u[1],u[2]]),10,(1+n.roughness)/2)):r.push(...Yt(Bs(u),10,(1+n.roughness)/2))}r.length&&o.push(be([r],n))}return n.stroke!==q&&o.push(i),this._d("curve",o,n)}polygon(e,t){const n=this._o(t),o=[],i=Fe(e,!0,n);return n.fill&&(n.fillStyle==="solid"?o.push(It([e],n)):o.push(be([e],n))),n.stroke!==q&&o.push(i),this._d("polygon",o,n)}path(e,t){const n=this._o(t),o=[];if(!e)return this._d("path",o,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const i=n.fill&&n.fill!=="transparent"&&n.fill!==q,r=n.stroke!==q,a=!!(n.simplification&&n.simplification<1),l=a?4-4*(n.simplification||1):(1+n.roughness)/2,c=Ur(e,1,l),u=Hs(e,n);if(i)if(n.fillStyle==="solid")if(c.length===1){const f=Hs(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));o.push({type:"fillPath",ops:this._mergedShape(f.ops)})}else o.push(It(c,n));else o.push(be(c,n));return r&&(a?c.forEach(f=>{o.push(Fe(f,!1,n))}):o.push(u)),this._d("path",o,n)}opsToPath(e,t){let n="";for(const o of e.ops){const i=typeof t=="number"&&t>=0?o.data.map(r=>+r.toFixed(t)):o.data;switch(o.op){case"move":n+=`M${i[0]} ${i[1]} `;break;case"bcurveTo":n+=`C${i[0]} ${i[1]}, ${i[2]} ${i[3]}, ${i[4]} ${i[5]} `;break;case"lineTo":n+=`L${i[0]} ${i[1]} `;break}}return n.trim()}toPaths(e){const t=e.sets||[],n=e.options||this.defaultOptions,o=[];for(const i of t){let r=null;switch(i.type){case"path":r={d:this.opsToPath(i),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:q};break;case"fillPath":r={d:this.opsToPath(i),stroke:q,strokeWidth:0,fill:n.fill||q};break;case"fillSketch":r=this.fillSketch(i,n);break}r&&o.push(r)}return o}fillSketch(e,t){let n=t.fillWeight;return n<0&&(n=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||q,strokeWidth:n,fill:q}}_mergedShape(e){return e.filter((t,n)=>n===0?!0:t.op!=="move")}}const Nn="http://www.w3.org/2000/svg",Kr=800;let jt=null;function Jr(){return jt||(jt=new xr().defaultOptions),jt}function Ht(s,e,t){return{...Jr(),maxRandomnessOffset:2,roughness:s==="highlight"?3:1.5,bowing:1,stroke:"#000",strokeWidth:1.5,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,disableMultiStroke:s!=="double",disableMultiStrokeFill:!1,seed:e,...t}}function Gr(s){const e=s.padding;if(e||e===0){if(typeof e=="number")return[e,e,e,e];if(Array.isArray(e)){const t=e;if(t.length)switch(t.length){case 4:return[...t];case 1:return[t[0],t[0],t[0],t[0]];case 2:return[...t,...t];case 3:return[...t,t[1]];default:return[t[0],t[1],t[2],t[3]]}}}return[5,5,5,5]}function Qr(s,e,t,n,o,i){const r=[];let a=t.strokeWidth||2;const l=Gr(t),c=t.animate===void 0?!0:!!t.animate,u=t.iterations||2,f=t.rtl?1:0,d=Ht("single",i,t);switch(t.type){case"underline":{const h=e.y+e.h+l[2];for(let p=f;pv.setAttribute(b,k);for(const v of h){const b=document.createElementNS(Nn,"path");if(y(b,"d",v),y(b,"fill","none"),y(b,"stroke",t.color||"currentColor"),y(b,"stroke-width",`${a}`),t.opacity!==void 0&&y(b,"style",`opacity:${t.opacity}`),c){const k=b.getTotalLength();p.push(k),m+=k}s.appendChild(b),g.push(b)}if(c){let v=0;for(let b=0;bsetTimeout(e,s))}function Zr(s){const e=[];for(const t of s){let n="";for(const o of t.ops){const i=o.data;switch(o.op){case"move":n.trim()&&e.push(n.trim()),n=`M${i[0]} ${i[1]} `;break;case"bcurveTo":n+=`C${i[0]} ${i[1]}, ${i[2]} ${i[3]}, ${i[4]} ${i[5]} `;break;case"lineTo":n+=`L${i[0]} ${i[1]} `;break}}n.trim()&&e.push(n.trim())}return e}function Yr(){if(!window.__rno_kf_s){const s=window.__rno_kf_s=document.createElement("style");s.textContent="@keyframes rough-notation-dash { to { stroke-dashoffset: 0; } }",document.head.appendChild(s)}}var Xr=Object.defineProperty,ea=(s,e,t)=>e in s?Xr(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Y=(s,e,t)=>(ea(s,typeof e!="symbol"?e+"":e,t),t);class ta{constructor(e,t){Y(this,"_state","unattached"),Y(this,"_config"),Y(this,"_resizing",!1),Y(this,"_ro"),Y(this,"_seed",On()),Y(this,"_e"),Y(this,"_svg"),Y(this,"_lastSizes",[]),Y(this,"_animationDelay",0),Y(this,"_resizeListener",()=>{this._resizing||(this._resizing=!0,setTimeout(()=>{this._resizing=!1,this._state==="showing"&&this.haveRectsChanged()&&this.show()},400))}),Y(this,"pendingRefresh"),this._e=e,this._config=JSON.parse(JSON.stringify(t)),this.attach()}getConfig(e){return this._config[e]}setConfig(e,t){this._config[e]!==t&&(this._config[e]=t,this.refresh())}get animate(){return this._config.animate}set animate(e){this._config.animate=e}get animationDuration(){return this._config.animationDuration}set animationDuration(e){this._config.animationDuration=e}get iterations(){return this._config.iterations}set iterations(e){this._config.iterations=e}get color(){return this._config.color}set color(e){this._config.color!==e&&(this._config.color=e,this.refresh())}get class(){return this._config.class}set class(e){this._config.class!==e&&(this._config.class=e,this._svg&&this._svg.setAttribute("class",["rough-annotation",this._config.class||""].filter(Boolean).join(" ")))}get strokeWidth(){return this._config.strokeWidth}set strokeWidth(e){this._config.strokeWidth!==e&&(this._config.strokeWidth=e,this.refresh())}get padding(){return this._config.padding}set padding(e){this._config.padding!==e&&(this._config.padding=e,this.refresh())}attach(){if(this._state==="unattached"&&this._e.parentElement){Yr();const e=this._svg=document.createElementNS(Nn,"svg");e.setAttribute("class",["rough-annotation",this._config.class||""].filter(Boolean).join(" "));const t=e.style;t.position="absolute",t.top="0",t.left="0",t.overflow="visible",t.pointerEvents="none",t.width="100px",t.height="100px";const n=this._config.type==="highlight";if(this._e.insertAdjacentElement(n?"beforebegin":"afterend",e),this._state="not-showing",n){const o=window.getComputedStyle(this._e).position;(!o||o==="static")&&(this._e.style.position="relative")}this.attachListeners()}}detachListeners(){window.removeEventListener("resize",this._resizeListener),this._ro&&this._ro.unobserve(this._e)}attachListeners(){this.detachListeners(),window.addEventListener("resize",this._resizeListener,{passive:!0}),!this._ro&&"ResizeObserver"in window&&(this._ro=new window.ResizeObserver(e=>{for(const t of e)t.contentRect&&this._resizeListener()})),this._ro&&this._ro.observe(this._e)}haveRectsChanged(){if(this._lastSizes.length){const e=this.rects();if(e.length===this._lastSizes.length){for(let t=0;tMath.round(o)===Math.round(i);return n(e.x,t.x)&&n(e.y,t.y)&&n(e.w,t.w)&&n(e.h,t.h)}isShowing(){return this._state!=="not-showing"}refresh(){this.isShowing()&&!this.pendingRefresh&&(this.pendingRefresh=Promise.resolve().then(()=>{this.isShowing()&&this.show(),delete this.pendingRefresh}))}async show(){switch(this._state){case"unattached":break;case"showing":this.hide(),this._svg&&await this.render(this._svg,!0);break;case"not-showing":this.attach(),this._svg&&await this.render(this._svg,!1);break}}hide(){if(this._svg)for(;this._svg.lastChild;)this._svg.removeChild(this._svg.lastChild);this._state="not-showing"}remove(){this._svg&&this._svg.parentElement&&this._svg.parentElement.removeChild(this._svg),this._svg=void 0,this._state="unattached",this.detachListeners()}async render(e,t){let n=this._config;t&&(n=JSON.parse(JSON.stringify(this._config)),n.animate=!1);const o=this.rects();let i=0;o.forEach(c=>i+=c.w);const r=n.animationDuration||Kr;let a=0;const l=[];for(let c=0;cObject.assign(s,{type:"box"}),circle:s=>Object.assign(s,{type:"circle"}),underline:s=>Object.assign(s,{type:"underline"}),highlight:s=>Object.assign(s,{type:"highlight"}),"strike-through":s=>Object.assign(s,{type:"strike-through"}),"crossed-off":s=>Object.assign(s,{type:"crossed-off"}),bracket:s=>Object.assign(s,{type:"bracket"}),strike:s=>Object.assign(s,{type:"strike-through"}),cross:s=>Object.assign(s,{type:"crossed-off"}),crossed:s=>Object.assign(s,{type:"crossed-off"}),linethrough:s=>Object.assign(s,{type:"strike-through"}),"line-through":s=>Object.assign(s,{type:"strike-through"}),black:s=>V(s,"text-black"),blue:s=>V(s,"text-blue"),cyan:s=>V(s,"text-cyan"),gray:s=>V(s,"text-gray"),green:s=>V(s,"text-green"),indigo:s=>V(s,"text-indigo"),lime:s=>V(s,"text-lime"),orange:s=>V(s,"text-orange"),pink:s=>V(s,"text-pink"),purple:s=>V(s,"text-purple"),red:s=>V(s,"text-red"),teal:s=>V(s,"text-teal"),white:s=>V(s,"text-white"),yellow:s=>V(s,"text-yellow")},na=[[/^delay-?(\d+)?$/,(s,e,t)=>{const n=(s[1]?Number.parseInt(s[1]):t)||300;return e.delay=n,e}],[/^(?:op|opacity)-?(\d+)?$/,(s,e,t)=>{const n=(s[1]?Number.parseInt(s[1]):t)||100;return e.opacity=n/100,e}]];function oa(){return{install(s){s.directive("mark",{name:"v-mark",mounted:(e,t)=>{const n=w(()=>{const r=typeof t.value=="object"&&!Array.isArray(t.value)?{...t.value}:{at:t.value};let a={at:r.at};const l=Object.entries(t.modifiers).filter(([u,f])=>{if(zs[u])return a=zs[u](a,f),!1;for(const[d,h]of na){const p=u.match(d);if(p)return a=h(p,a,f),!1}return!0});l.length&&console.warn("[Slidev] Invalid modifiers for v-mark:",l);const c={...a,...r};return c.type||(c.type="underline"),c}),o=sa(e,n.value),i=tt(e,t,n.value.at);if(!i){o.show();return}e.watchStopHandle=Me(()=>{let r;n.value.class&&(o.class=n.value.class),n.value.color&&(o.color=n.value.color);const a=n.value.at;a===!0?r=!0:a===!1?r=!1:r=i.isActive.value,r!=null&&(r?o.show():o.hide())})},unmounted:e=>{var t;(t=e.watchStopHandle)==null||t.call(e)}})}}}const Ha=T(!1),Da=T(!1),Ra=T(!1),ia=T(!1),Fa=T(!0),Ba=Qn({xs:460,...to}),dt=Zn(),Wa=Yn(),za=w(()=>dt.height.value-dt.width.value/Zs.value>120),Va=Xn(mt?document.body:null),In=eo(),qa=w(()=>{var s;return["INPUT","TEXTAREA"].includes(((s=In.value)==null?void 0:s.tagName)||"")}),Ua=w(()=>{var s;return["BUTTON","A"].includes(((s=In.value)==null?void 0:s.tagName)||"")});G("slidev-camera","default",{listenToStorageChanges:!1});G("slidev-mic","default",{listenToStorageChanges:!1});const ra=G("slidev-scale",0),xa=G("slidev-wake-lock",!0),Ka=G("slidev-presenter-cursor",!0,{listenToStorageChanges:!1}),aa=G("slidev-show-editor",!1,{listenToStorageChanges:!1}),la=G("slidev-editor-vertical",!1,{listenToStorageChanges:!1}),ca=G("slidev-editor-width",mt?window.innerWidth*.4:318,{listenToStorageChanges:!1}),ua=G("slidev-editor-height",mt?window.innerHeight*.4:300,{listenToStorageChanges:!1}),Ke=ts(null),pt=G("slidev-presenter-font-size",1,{listenToStorageChanges:!1}),Je=G("slidev-presenter-layout",1,{listenToStorageChanges:!1});function Ja(){Je.value=Je.value+1,Je.value>2&&(Je.value=1)}function Ga(){pt.value=Math.min(2,pt.value+.1)}function Qa(){pt.value=Math.max(.5,pt.value-.1)}const Za=Qs(ia);function fa(s=qs(cn,T())){const e=so(s),t=J([aa,la,ca,ua,ra,dt.width,dt.height],()=>{setTimeout(e.update,300)},{flush:"post",immediate:!0});return{...e,stop:t}}function ha(s){return()=>{}}function da(s,e,t,n=!1){var x;function o(N){return s?Pe(s,N):io(N)}const i=o(ns),r=o(bi)??{},a=o(ss),l=w(()=>ha(a.value)),c=o(yi)??T(1),u=o(ki)??T(1),{left:f,top:d,stop:h}=fa(o(cn)??T()),p=["slide","presenter"].includes(i.value);let g=s?"directive":"prop",m=hs(),y;if(Array.isArray(e)?y=e:typeof e=="string"&&e.includes(",")?y=e.split(",").map(Number):e!=null&&(g="frontmatter",m=`${e}`,e=(x=r==null?void 0:r.dragPos)==null?void 0:x[m],y=e==null?void 0:e.split(",").map(Number)),g!=="frontmatter"&&!t)throw new Error("[Slidev] Can not identify the source position of the v-drag element, please provide an explicit `id` prop.");const v=[h],b=!n&&e!=null&&!Number.isFinite(y==null?void 0:y[3]);y??(y=[Number.NaN,Number.NaN,0]);const k=T(y[2]),M=T(y[0]+y[2]/2),_=T(n?0:y[4]??0),O=w(()=>_.value*Math.PI/180),C=w(()=>Math.sin(O.value)),$=w(()=>Math.cos(O.value)),W=T(),R=T({left:0,top:0,width:0,height:0}),P=T(0);function L(){if(!W.value)return;const N=W.value.getBoundingClientRect();R.value={left:N.left/u.value,top:N.top/u.value,width:N.width/u.value,height:N.height/u.value},P.value=(R.value.width+R.value.height)/c.value/(Math.abs(C.value)+Math.abs($.value))-k.value}v.push(J(k,L,{flush:"post"}));const F=T(y[3]??0),A=b?w({get:()=>(b?P.value:F.value)||0,set:N=>!b&&(F.value=N)}):F,H=b?T(y[1]):T(y[1]+y[3]/2),ee=b?w({get:()=>H.value+A.value/2,set:N=>H.value=N-A.value/2}):H,Ce=w(()=>Number.isFinite(M.value)?{position:"absolute",zIndex:100,left:`${M.value-k.value/2}px`,top:`${ee.value-A.value/2}px`,width:`${k.value}px`,height:b?void 0:`${A.value}px`,transformOrigin:"center center",transform:`rotate(${_.value}deg)`}:{position:"absolute",zIndex:100});v.push(J([M,ee,k,A,_],([N,le,Le,Ee,ms])=>{let ye=[N-Le/2,le-Ee/2,Le].map(Math.round).join();b?ye+=g==="directive"?",NaN":",_":ye+=`,${Math.round(Ee)}`,Math.round(ms)!==0&&(ye+=`,${Math.round(ms)}`),g==="directive"&&(ye=`[${ye}]`),l.value(m,ye,g,t)}));const Z={dragId:m,dataSource:g,markdownSource:t,isArrow:n,zoom:u,autoHeight:b,x0:M,y0:ee,width:k,height:A,rotate:_,container:W,containerStyle:Ce,watchStopHandles:v,dragging:w(()=>Ke.value===Z),mounted(){p&&(L(),e||setTimeout(()=>{L(),M.value=(R.value.left+R.value.width/2-f.value)/c.value,ee.value=(R.value.top-d.value)/c.value,k.value=R.value.width/c.value,A.value=R.value.height/c.value},100))},unmounted(){p&&Z.stopDragging()},startDragging(){L(),Ke.value=Z},stopDragging(){Ke.value===Z&&(Ke.value=null)}};return v.push(no(W,N=>{const le=document.querySelector("#drag-control-container");le&&N.target&&le.contains(N.target)||Z.stopDragging()}),J(oo(),N=>{N||Z.stopDragging()})),Z}function pa(){return{install(s){s.directive("drag",{name:"v-drag",created(e,t,n){var i;const o=da(t,t.value,(i=n.props)==null?void 0:i.markdownSource);n.props&&(n.props={...n.props},delete n.props.markdownSource),o.container.value=e,e.draggingState=o,e.dataset.dragId=o.dragId,o.watchStopHandles.push(J(o.containerStyle,r=>{for(const[a,l]of Object.entries(r))l&&(e.style[a]=l)},{immediate:!0})),e.addEventListener("dblclick",o.startDragging)},mounted(e){e.draggingState.mounted()},unmounted(e){const t=e.draggingState;t.unmounted(),e.removeEventListener("dblclick",t.startDragging),t.watchStopHandles.forEach(n=>n())}})}}}function ga(){return{install(s){const e=ro();s.directive("motion",{name:"v-motion",mounted(t,n,o,i){var b,k,M;const r=Pe(n,yt),a=Pe(n,ss),l=Pe(n,ns),{currentPage:c,clicks:u,isPrintMode:f}=Ut(),d=o.props={...o.props},h={...d.initial,...(b=d.variants)==null?void 0:b["slidev-initial"]},p={...d.enter,...(k=d.variants)==null?void 0:k["slidev-enter"]},g={...d.leave,...(M=d.variants)==null?void 0:M["slidev-leave"]};delete d.initial,delete d.enter,delete d.leave;const m=`${hs()}-`,y=[];for(const _ of Object.keys(d))if(_.startsWith("click-")){const O=_.slice(6),C=O.includes("-")?O.split("-").map(Number):+O,$=m+O;y.push({id:$,at:C,variant:{...d[_]},info:r==null?void 0:r.value.calculate(C)}),delete d[_]}y.sort((_,O)=>(Array.isArray(_.at)?_.at[0]:_.at)-(Array.isArray(O.at)?O.at[0]:O.at)),e.created(t,n,o,i),e.mounted(t,n,o,i);const v=t.motionInstance;v.clickIds=y.map(_=>_.id),v.set(h),v.watchStopHandle=J([a,c,u].filter(Boolean),()=>{var O;const _=((O=Mn.get(t))==null?void 0:O.visibilityState.value)??"shown";if(!(r!=null&&r.value)||!["slide","presenter"].includes((l==null?void 0:l.value)??"")){const C={...h,...p};for(const{variant:$}of y)Object.assign(C,$);v.set(C)}else if(f.value||(a==null?void 0:a.value)===c.value)if(_==="shown"){const C={...h,...p};for(const{variant:$,info:W}of y)(!W||W.isActive.value)&&Object.assign(C,$);f.value?v.set(C):v.apply(C)}else v.apply(_==="before"?h:g);else v.apply(((a==null?void 0:a.value)??-1)>c.value?h:g)},{immediate:!0})},unmounted(t){t.motionInstance.watchStopHandle()}})}}}const ma=[];function ya(){const s=[];{let e=function(t){if(!E.remote||E.remote===t.query.password)return!0;if(E.remote&&t.query.password===void 0){const n=prompt("Enter password");if(E.remote===n)return!0}return t.params.no?{path:`/${t.params.no}`}:{path:""}};s.push({name:"entry",path:"/entry",component:()=>ne(()=>import("./slidev/entry-DBVNHmWY.js"),__vite__mapDeps([7,8,1,4,5,9]))},{name:"overview",path:"/overview",component:()=>ne(()=>import("./slidev/overview-D6vhBkpI.js"),__vite__mapDeps([10,8,1,11,12,13,14,15,4,5]))},{name:"notes",path:"/notes",component:()=>ne(()=>import("./slidev/notes-D2G3W9tS.js"),__vite__mapDeps([16,8,1,14,15,13,4,5])),beforeEnter:e},{name:"presenter",path:"/presenter/:no",component:()=>ne(()=>import("./slidev/presenter-CfIGrs6G.js"),__vite__mapDeps([17,8,1,18,11,12,13,2,4,5,19,14,15,20,21,22])),beforeEnter:e},{path:"/presenter",redirect:{path:"/presenter/1"}})}return s.push({name:"play",path:"/:no",component:()=>ne(()=>import("./slidev/play-mGGM2FGe.js"),__vite__mapDeps([23,1,18,11,12,8,13,2,4,5,19,24]))},{path:"",redirect:{path:"/1"}},{path:"/:pathMatch(.*)*",name:"NotFound",component:()=>ne(()=>import("./slidev/404-8kfwPgJ5.js"),__vite__mapDeps([25,1,4,5,26]))}),ma.reduce((e,t)=>t(e),s)}const va=[];async function ba(s){function e(){document.documentElement.style.setProperty("--vh",`${window.innerHeight*.01}px`)}e(),window.addEventListener("resize",e);const t=ao({history:lo("/test"),routes:ya()});s.use(t),s.use(ri()),s.use(br()),s.use(oa()),s.use(pa()),s.use(ga()),s.use(uo,{container:"#twoslash-container"});const n={app:s,router:t};for(const o of va)await o(n)}const jn=co(vr);ba(jn);jn.mount("#app");export{cn as $,Ma as A,za as B,Ze as C,dt as D,la as E,te as F,Ke as G,ia as H,Za as I,Ra as J,Wa as K,ja as L,Fa as M,Ua as N,qa as O,_a as P,ra as Q,xa as R,Ba as S,In as T,Ja as U,St as V,yi as W,fa as X,os as Y,Zs as Z,tr as _,Ut as a,La as a0,bi as a1,ss as a2,ns as a3,yt as a4,ki as a5,Ia as a6,Ca as a7,Aa as a8,Ta as a9,vi as aa,Ea as ab,Si as ac,_n as b,Yi as c,Pa as d,Sn as e,Va as f,_e as g,$a as h,Ns as i,Ka as j,Je as k,aa as l,pt as m,Ga as n,Qa as o,Oa as p,Rt as q,Sa as r,Mt as s,Na as t,li as u,E as v,ne as w,Ha as x,Da as y,yo as z}; diff --git a/test/assets/md-C8XcVckz.js b/test/assets/md-C8XcVckz.js new file mode 100644 index 0000000..2d24054 --- /dev/null +++ b/test/assets/md-C8XcVckz.js @@ -0,0 +1 @@ +import{d as u,t as _,o as i,b as d,e,x as f,c as v,k as $,l as x,q as C,s as b,B as a}from"./modules/vue-B03c_Ivc.js";import{u as c,f as k}from"./slidev/context-G025NcPA.js";import{_ as g}from"./slidev/intro-mdsqHmL8.js";import"./index-Df4vEvvN.js";import"./modules/shiki-D6VyeOrD.js";const h={flex:"~",w:"min",border:"~ main rounded-md"},y={m:"auto",p:"2"},B=u({__name:"Counter",props:{count:{default:0}},setup(n){c();const t=_(n.count);return(s,o)=>(i(),d("div",h,[e("button",{border:"r main",p:"2",font:"mono",outline:"!none","hover:bg":"gray-400 opacity-20",onClick:o[0]||(o[0]=r=>t.value-=30)}," - "),e("span",y,f(t.value),1),e("button",{border:"l main",p:"2",font:"mono",outline:"!none","hover:bg":"gray-400 opacity-20",onClick:o[1]||(o[1]=r=>t.value+=11)}," + ")]))}}),P=e("h1",null,"Welcome to Slidev",-1),S=e("p",null,"Presentation slides for developers",-1),w={__name:"slides.md__slidev_1",setup(n){const{$slidev:l,$nav:t,$clicksContext:s,$clicks:o,$page:r,$renderContext:N,$frontmatter:p}=c();return s.setup(),(V,q)=>{const m=B;return i(),v(g,C(b(a(k)(a(p),0))),{default:$(()=>[P,S,x(m,{count:13,m:"t-4"})]),_:1},16)}}},W=w;export{W as default}; diff --git a/test/assets/md-Cc1fxSyz.js b/test/assets/md-Cc1fxSyz.js new file mode 100644 index 0000000..f6dccc6 --- /dev/null +++ b/test/assets/md-Cc1fxSyz.js @@ -0,0 +1 @@ +import{o as r,c as n,k as i,q as c,s as l,B as e,e as t,aa as s}from"./modules/vue-B03c_Ivc.js";import{_}from"./slidev/intro-mdsqHmL8.js";import{u as m,f as p}from"./slidev/context-G025NcPA.js";import"./index-Df4vEvvN.js";import"./modules/shiki-D6VyeOrD.js";const u=t("h1",null,"Imported Slides",-1),d=t("p",null,[s("You can split your slides.md into multiple files and organize them as you want using the "),t("code",null,"src"),s(" attribute.")],-1),f={__name:"test.md__slidev_2",setup($){const{$slidev:h,$nav:x,$clicksContext:o,$clicks:k,$page:g,$renderContext:v,$frontmatter:a}=m();return o.setup(),(B,C)=>(r(),n(_,c(l(e(p)(e(a),1))),{default:i(()=>[u,d]),_:1},16))}},S=f;export{S as default}; diff --git a/test/assets/slidev/404-8kfwPgJ5.js b/test/assets/slidev/404-8kfwPgJ5.js new file mode 100644 index 0000000..f2b43f1 --- /dev/null +++ b/test/assets/slidev/404-8kfwPgJ5.js @@ -0,0 +1 @@ +import{d as m,N as f,z as h,r as x,o as n,b as v,e,aa as a,x as r,B as g,c as p,k as u,g as d,p as k,a as N}from"../modules/vue-B03c_Ivc.js";import{a as S,_ as B}from"../index-Df4vEvvN.js";import"../modules/shiki-D6VyeOrD.js";const w=o=>(k("data-v-c97f3120"),o=o(),N(),o),y={class:"grid justify-center text-center pt-15% gap-5"},C=w(()=>e("h1",{class:"text-9xl font-light"}," 404 ",-1)),I={class:"text-2xl"},R={class:"op-60"},V={class:"mt-3 flex flex-col gap-2 max-w-xs mx-auto w-full"},G=m({__name:"404",setup(o){const{currentRoute:l}=f(),{total:i}=S(),s=h(()=>{const c=l.value.path.match(/\d+/);if(c){const t=+c[0];if(t>0&&t<=i.value)return t}return null});return(_,c)=>{const t=x("RouterLink");return n(),v("div",y,[e("div",null,[C,e("p",I,[a(" Page "),e("code",R,r(g(l).path),1),a(" not found ")])]),e("div",V,[s.value!==1?(n(),p(t,{key:0,to:"/",class:"page-link"},{default:u(()=>[a(" Go Home ")]),_:1})):d("",!0),s.value?(n(),p(t,{key:1,to:`/${s.value}`,class:"page-link"},{default:u(()=>[a(" Go to Slide "+r(s.value),1)]),_:1},8,["to"])):d("",!0)])])}}}),z=B(G,[["__scopeId","data-v-c97f3120"]]);export{z as default}; diff --git a/test/assets/slidev/ClicksSlider-Bv3jj13O.js b/test/assets/slidev/ClicksSlider-Bv3jj13O.js new file mode 100644 index 0000000..62f9d0a --- /dev/null +++ b/test/assets/slidev/ClicksSlider-Bv3jj13O.js @@ -0,0 +1 @@ +import{d as I,z as x,t as D,E as T,n as z,O as F,D as P,o as v,b as f,i as k,e as u,x as C,l as V,B as R,F as E,ag as q,ae as K,af as j,h as A,p as O,a as U}from"../modules/vue-B03c_Ivc.js";import{C as N,q as X,r as G,_ as J}from"../index-Df4vEvvN.js";import{m as Q}from"../modules/unplugin-icons-DLmkOyLZ.js";const W=["innerHTML"],Y=["textContent"],Z=["textContent"],L="slidev-note-fade",b="slidev-note-click-mark",me=I({__name:"NoteDisplay",props:{class:{},noteHtml:{},note:{},highlight:{type:Boolean,default:!0},placeholder:{},clicksContext:{},autoScroll:{type:Boolean}},emits:["markerDblclick","markerClick"],setup(h,{emit:p}){const t=h,_=p,m=x(()=>{var s;return t.clicksContext!=null&&((s=t.noteHtml)==null?void 0:s.includes("slidev-note-click-mark"))}),n=D(null);function w(){var $,B;if(!n.value||!m.value)return;const s=Array.from(n.value.querySelectorAll(`.${b}`)),c=new Map,d=new Map;let a=0;for(const r of s){const l=Number(r.dataset.clicks);c.set(r,l);let o=r,e=r.parentElement;for(;e&&o!==n.value;)d.has(e)||d.set(e,[[null,a]]),d.get(e).push([o,l]),o=e,e=e.parentElement;a=l}const y=new Map;for(const[r,l]of d){let o=!1,e=0;for(const i of Array.from(r.childNodes)){let S=!1;for(;i===(($=l[e+1])==null?void 0:$[0]);)S=!0,e++;if(S)continue;let M=i;if(i.nodeType===3){if(!((B=i.textContent)!=null&&B.trim()))continue;M=document.createElement("span"),M.textContent=i.textContent,r.insertBefore(M,i),i.remove()}o||(o=e===0),y.set(M,l[e][1])}o||(l[0][1]=-1)}return r=>{const l=t.highlight;for(const[o,e]of d)o.classList.toggle(L,l&&!e.some(([i,S])=>S===r));for(const[o,e]of y)o.classList.toggle(L,l&&e!==r);for(const[o,e]of c)o.classList.remove(L),o.classList.toggle(`${b}-past`,l&&er+1),o.ondblclick=l?i=>{_("markerDblclick",i,e),!i.defaultPrevented&&(t.clicksContext.current=e,i.stopPropagation(),i.stopImmediatePropagation())}:null,o.onclick=l?i=>{_("markerClick",i,e)}:null,l&&t.autoScroll&&e===r&&o.scrollIntoView({block:"center",behavior:"smooth"})}}const g=D();return T(()=>[t.noteHtml,t.highlight],()=>{z(()=>{g.value=w()})},{immediate:!0}),F(()=>{w()}),P(()=>{var c,d;const s=((c=t.clicksContext)==null?void 0:c.current)??N;(d=g.value)==null||d.call(g,s)}),(s,c)=>s.noteHtml?(v(),f("div",{key:0,ref_key:"noteDisplay",ref:n,class:k(["prose overflow-auto outline-none slidev-note",[t.class,m.value?"slidev-note-with-clicks":""]]),innerHTML:s.noteHtml},null,10,W)):s.note?(v(),f("div",{key:1,class:k(["prose overflow-auto outline-none slidev-note",t.class])},[u("p",{textContent:C(s.note)},null,8,Y)],2)):(v(),f("div",{key:2,class:k(["prose overflow-auto outline-none opacity-50 italic select-none slidev-note",t.class])},[u("p",{textContent:C(t.placeholder||"No notes.")},null,8,Z)],2))}}),H=h=>(O("data-v-28bf77d9"),h=h(),U(),h),ee=["title"],te={class:"flex gap-0.2 items-center min-w-16 font-mono mr1"},oe=H(()=>u("div",{"flex-auto":""},null,-1)),se={"text-primary":""},le=H(()=>u("span",{op25:"","text-sm":""},"/",-1)),ne={op50:"","text-sm":""},ae={key:1,op50:"","flex-auto":"",pl1:""},re={relative:"","flex-auto":"",h5:"","font-mono":"",flex:"~"},ie=["min","max"],ce=I({__name:"ClicksSlider",props:{clicksContext:{},readonly:{type:Boolean},active:{type:Boolean,default:!0}},setup(h){const p=h,t=x(()=>p.clicksContext.total),_=x(()=>X(0,p.clicksContext.clicksStart,t.value)),m=x(()=>t.value-_.value+1),n=x({get(){return p.clicksContext.current>t.value?-1:p.clicksContext.current},set(s){p.clicksContext.current=s}}),w=x(()=>G(_.value,t.value+1));function g(){p.readonly||(n.value<0||n.value>t.value)&&(n.value=0)}return(s,c)=>{const d=Q;return v(),f("div",{class:k(["flex gap-1 items-center select-none",m.value&&p.clicksContext.isMounted?"":"op50"]),title:`Clicks in this slide: ${m.value}`},[u("div",te,[V(d,{"text-sm":"",op50:""}),n.value>=0&&n.value!==R(N)&&s.active?(v(),f(E,{key:0},[oe,u("span",se,C(n.value),1),le,u("span",ne,C(t.value),1)],64)):(v(),f("div",ae,C(t.value),1))]),u("div",re,[(v(!0),f(E,null,q(w.value,a=>(v(),f("div",{key:a,border:"y main","of-hidden":"",relative:"",class:k([a===0?"rounded-l border-l":"",a===t.value?"rounded-r border-r":""]),style:A({width:m.value>0?`${1/m.value*100}%`:"100%"})},[u("div",{absolute:"","inset-0":"",class:k(a<=n.value&&s.active?"bg-primary op15":"")},null,2),u("div",{class:k([+a==+n.value&&s.active?"text-primary font-bold op100 border-primary":"op30 border-main",a===0?"rounded-l":"",a===t.value?"rounded-r":"border-r-2"]),"w-full":"","h-full":"","text-xs":"",flex:"","items-center":"","justify-center":"","z-1":""},C(a),3)],6))),128)),K(u("input",{"onUpdate:modelValue":c[0]||(c[0]=a=>n.value=a),class:k(["range",s.readonly?"pointer-events-none":""]),type:"range",min:_.value,max:t.value,step:1,absolute:"","inset-0":"","z-10":"",op0:"",style:A({"--thumb-width":`${1/(m.value+1)*100}%`}),onMousedown:g,onFocus:c[1]||(c[1]=a=>{var y;return(y=a.currentTarget)==null?void 0:y.blur()})},null,46,ie),[[j,n.value]])])],10,ee)}}}),ve=J(ce,[["__scopeId","data-v-28bf77d9"]]);export{ve as C,me as _}; diff --git a/test/assets/slidev/DrawingControls-jVv_pSyJ.js b/test/assets/slidev/DrawingControls-jVv_pSyJ.js new file mode 100644 index 0000000..22e9608 --- /dev/null +++ b/test/assets/slidev/DrawingControls-jVv_pSyJ.js @@ -0,0 +1 @@ +import{_ as o}from"./DrawingControls.vue_vue_type_style_index_0_lang-BQZjIz1e.js";import"../modules/unplugin-icons-DLmkOyLZ.js";import"../modules/vue-B03c_Ivc.js";import"../modules/shiki-D6VyeOrD.js";import"./DrawingPreview.vue_vue_type_script_setup_true_lang-D58kc9wE.js";import"../index-Df4vEvvN.js";import"./useWakeLock-CRYEXDUy.js";import"./IconButton.vue_vue_type_script_setup_true_lang-ClhDPtQg.js";import"./context-G025NcPA.js";export{o as default}; diff --git a/test/assets/slidev/DrawingControls.vue_vue_type_style_index_0_lang-BQZjIz1e.js b/test/assets/slidev/DrawingControls.vue_vue_type_style_index_0_lang-BQZjIz1e.js new file mode 100644 index 0000000..eda00ad --- /dev/null +++ b/test/assets/slidev/DrawingControls.vue_vue_type_style_index_0_lang-BQZjIz1e.js @@ -0,0 +1 @@ +import{f as W,A as Y,B as q,C as I,D as O,E as Q,F as X,G as Z,H as ee,J as ne,K as te,L as se}from"../modules/unplugin-icons-DLmkOyLZ.js";import{d as L,t as $,W as oe,aC as le,o as g,b as B,f as ae,h as z,B as e,c as x,k as o,l as n,i as l,e as i,x as re,ae as m,af as ie,F as ue,ag as ce,aw as b,g as de}from"../modules/vue-B03c_Ivc.js";import{L as _e}from"../modules/shiki-D6VyeOrD.js";import{c as pe}from"./DrawingPreview.vue_vue_type_script_setup_true_lang-D58kc9wE.js";import{V as h}from"./useWakeLock-CRYEXDUy.js";import{_ as a}from"./IconButton.vue_vue_type_script_setup_true_lang-ClhDPtQg.js";const me=L({__name:"Draggable",props:{storageKey:{},initial:{}},setup(D){const u=D,w=$(null),f=u.initial??{x:0,y:0},k=u.storageKey?oe(u.storageKey,f):$(f),{style:y}=le(w,{initialValue:k});return(v,d)=>(g(),B("div",{ref_key:"el",ref:w,class:"fixed",style:z(e(y))},[ae(v.$slots,"default")],4))}}),ge=i("svg",{width:"1em",height:"1em",class:"-mt-0.5",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24"},[i("path",{d:"M21.71 3.29a1 1 0 0 0-1.42 0l-18 18a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l18-18a1 1 0 0 0 0-1.42z",fill:"currentColor"})],-1),we=i("svg",{viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},[i("line",{x1:"2",y1:"15",x2:"22",y2:"4",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round"}),i("line",{x1:"2",y1:"24",x2:"28",y2:"10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"}),i("line",{x1:"7",y1:"31",x2:"29",y2:"19",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round"})],-1),fe={class:"flex bg-main p-2"},ve={class:"inline-block w-7 text-center"},be={class:"pt-.5"},Le=L({__name:"DrawingControls",setup(D){const{brush:u,canClear:w,canRedo:f,canUndo:k,clear:y,drauu:v,drawingEnabled:d,drawingMode:r,drawingPinned:c,brushColors:M}=pe();function V(){v.undo()}function S(){v.redo()}let C="stylus";function _(p){r.value=p,d.value=!0,p!=="eraseLine"&&(C=p)}function E(p){u.color=p,d.value=!0,r.value=C}return(p,t)=>{const K=W,U=Y,A=q,F=I,N=O,R=Q,P=X,j=Z,G=ee,H=ne,J=te,T=se;return g(),x(me,{class:l(["flex flex-wrap text-xl p-2 gap-1 rounded-md bg-main shadow transition-opacity duration-200 z-20 border border-main",e(d)?"":e(c)?"opacity-40 hover:opacity-90":"opacity-0 pointer-events-none"]),"storage-key":"slidev-drawing-pos","initial-x":10,"initial-y":10},{default:o(()=>[n(a,{title:"Draw with stylus",class:l({shallow:e(r)!=="stylus"}),onClick:t[0]||(t[0]=s=>_("stylus"))},{default:o(()=>[n(K)]),_:1},8,["class"]),n(a,{title:"Draw a line",class:l({shallow:e(r)!=="line"}),onClick:t[1]||(t[1]=s=>_("line"))},{default:o(()=>[ge]),_:1},8,["class"]),n(a,{title:"Draw an arrow",class:l({shallow:e(r)!=="arrow"}),onClick:t[2]||(t[2]=s=>_("arrow"))},{default:o(()=>[n(U)]),_:1},8,["class"]),n(a,{title:"Draw an ellipse",class:l({shallow:e(r)!=="ellipse"}),onClick:t[3]||(t[3]=s=>_("ellipse"))},{default:o(()=>[n(A)]),_:1},8,["class"]),n(a,{title:"Draw a rectangle",class:l({shallow:e(r)!=="rectangle"}),onClick:t[4]||(t[4]=s=>_("rectangle"))},{default:o(()=>[n(F)]),_:1},8,["class"]),n(a,{title:"Erase",class:l({shallow:e(r)!=="eraseLine"}),onClick:t[5]||(t[5]=s=>_("eraseLine"))},{default:o(()=>[n(N)]),_:1},8,["class"]),n(h),n(e(_e),null,{popper:o(()=>[i("div",fe,[i("div",ve,re(e(u).size),1),i("div",be,[m(i("input",{"onUpdate:modelValue":t[6]||(t[6]=s=>e(u).size=s),type:"range",min:"1",max:"15",onChange:t[7]||(t[7]=s=>r.value=e(C))},null,544),[[ie,e(u).size]])])])]),default:o(()=>[n(a,{title:"Adjust stroke width",class:l({shallow:e(r)==="eraseLine"})},{default:o(()=>[we]),_:1},8,["class"])]),_:1}),(g(!0),B(ue,null,ce(e(M),s=>(g(),x(a,{key:s,title:"Set brush color",class:l(e(u).color===s&&e(r)!=="eraseLine"?"active":"shallow"),onClick:ke=>E(s)},{default:o(()=>[i("div",{class:l(["w-6 h-6 transition-all transform border",e(u).color!==s?"rounded-1/2 scale-85 border-white":"rounded-md border-gray-300/50"]),style:z(e(d)?{background:s}:{borderColor:s})},null,6)]),_:2},1032,["class","onClick"]))),128)),n(h),n(a,{title:"Undo",class:l({disabled:!e(k)}),onClick:t[8]||(t[8]=s=>V())},{default:o(()=>[n(R)]),_:1},8,["class"]),n(a,{title:"Redo",class:l({disabled:!e(f)}),onClick:t[9]||(t[9]=s=>S())},{default:o(()=>[n(P)]),_:1},8,["class"]),n(a,{title:"Delete",class:l({disabled:!e(w)}),onClick:t[10]||(t[10]=s=>e(y)())},{default:o(()=>[n(j)]),_:1},8,["class"]),n(h),n(a,{title:e(c)?"Unpin drawing":"Pin drawing",class:l({shallow:!e(c)}),onClick:t[11]||(t[11]=s=>c.value=!e(c))},{default:o(()=>[m(n(G,{class:"transform -rotate-45"},null,512),[[b,e(c)]]),m(n(H,null,null,512),[[b,!e(c)]])]),_:1},8,["title","class"]),e(d)?(g(),x(a,{key:0,title:e(c)?"Drawing pinned":"Drawing unpinned",class:l({shallow:!e(d)}),onClick:t[12]||(t[12]=s=>d.value=!e(d))},{default:o(()=>[m(n(J,null,null,512),[[b,e(c)]]),m(n(T,null,null,512),[[b,!e(c)]])]),_:1},8,["title","class"])):de("",!0)]),_:1},8,["class"])}}});export{Le as _}; diff --git a/test/assets/slidev/DrawingLayer-qn3yOZUe.js b/test/assets/slidev/DrawingLayer-qn3yOZUe.js new file mode 100644 index 0000000..db8c06d --- /dev/null +++ b/test/assets/slidev/DrawingLayer-qn3yOZUe.js @@ -0,0 +1 @@ +import{d as l,t as u,O as c,E as m,G as i,o as p,b as f,i as d,B as t}from"../modules/vue-B03c_Ivc.js";import{u as _}from"./context-G025NcPA.js";import{c as v}from"./DrawingPreview.vue_vue_type_script_setup_true_lang-D58kc9wE.js";import"../index-Df4vEvvN.js";import"../modules/shiki-D6VyeOrD.js";const k=l({__name:"DrawingLayer",setup(g){const{drauu:e,drawingEnabled:o,loadCanvas:s}=v(),r=_().$scale,n=u();return c(()=>{e.mount(n.value,n.value.parentElement),m(r,a=>e.options.coordinateScale=1/a,{immediate:!0}),s()}),i(()=>{e.unmount()}),(a,w)=>(p(),f("svg",{ref_key:"svg",ref:n,class:d(["w-full h-full absolute top-0",{"pointer-events-none":!t(o),"touch-none":t(o)}])},null,2))}});export{k as default}; diff --git a/test/assets/slidev/DrawingPreview.vue_vue_type_script_setup_true_lang-D58kc9wE.js b/test/assets/slidev/DrawingPreview.vue_vue_type_script_setup_true_lang-D58kc9wE.js new file mode 100644 index 0000000..d43e642 --- /dev/null +++ b/test/assets/slidev/DrawingPreview.vue_vue_type_script_setup_true_lang-D58kc9wE.js @@ -0,0 +1 @@ +import{t as $,z as b,B as F,d as pt,ax as Vt,ay as Ut,az as A,o as Y,b as gt,e as Gt,f as xt,h as ht,ac as Ht,l as _t,c as qt,au as Zt,i as Xt,T as Yt,W as at,aA as Qt,K as Jt,y as Wt,n as te,E as ee,g as se}from"../modules/vue-B03c_Ivc.js";import{V as re,a as At,Z as wt,Q as St,z as bt,A as Pt,W as ne,$ as ie,_ as Ft,a0 as ae,a1 as oe,a2 as le,a3 as he,a4 as ue,v as ut,a5 as ce,a6 as de,a7 as ot,a8 as Et,a9 as fe,O as pe}from"../index-Df4vEvvN.js";function ge(t){var e;return{info:$(((e=re(t))==null?void 0:e.meta.slide)??null),update:async()=>{}}}const lt={};function ss(t){function e(s){return lt[s]??(lt[s]=ge(s))}return{info:b({get(){return e(F(t)).info.value},set(s){e(F(t)).info.value=s}}),update:async(s,r)=>{const n=e(r??F(t)),i=await n.update(s);return i&&(n.info.value=i),i}}}const me=["id"],ve=["id"],ye=pt({__name:"SlideContainer",props:{width:{type:Number},meta:{default:()=>({})},isMain:{type:Boolean,default:!1}},setup(t){const e=t,{isPrintMode:s}=At(),r=$(null),n=Vt(r),i=$(null),o=b(()=>e.width??n.width.value),a=b(()=>e.width?e.width/wt.value:n.height.value),l=b(()=>St.value&&!s.value?+St.value:Math.min(o.value/bt.value,a.value/Pt.value)),p=b(()=>({height:`${Pt.value}px`,width:`${bt.value}px`,transform:`translate(-50%, -50%) scale(${l.value})`,"--slidev-slide-scale":l.value})),y=b(()=>e.width?{width:`${e.width}px`,height:`${e.width/wt.value}px`}:{});return e.isMain&&Ut(b(()=>`:root { --slidev-slide-scale: ${l.value}; }`)),A(ne,l),A(ie,i),(v,S)=>(Y(),gt("div",{id:t.isMain?"slide-container":void 0,ref_key:"container",ref:r,class:"slidev-slide-container",style:ht(y.value)},[Gt("div",{id:t.isMain?"slide-content":void 0,ref_key:"slideElement",ref:i,class:"slidev-slide-content",style:ht(p.value)},[xt(v.$slots,"default",{},void 0,!0)],12,ve),xt(v.$slots,"controls",{},void 0,!0)],12,me))}}),rs=Ft(ye,[["__scopeId","data-v-57dad4c1"]]),ns={render:()=>[]},is={render:()=>[]},xe={render:()=>[]},_e={render:()=>[]},we=["data-slidev-no"],Se=pt({__name:"SlideWrapper",props:{clicksContext:{type:Object,required:!0},renderContext:{type:String,default:"slide"},route:{type:Object,required:!0}},setup(t){const e=t,s=b(()=>{var i,o;return((o=(i=e.route.meta)==null?void 0:i.slide)==null?void 0:o.frontmatter.zoom)??1});A(ae,e.route),A(oe,e.route.meta.slide.frontmatter),A(le,$(e.route.no)),A(he,$(e.renderContext)),A(ue,Ht(e,"clicksContext")),A(ce,s);const r=b(()=>s.value===1?void 0:{width:`${100/s.value}%`,height:`${100/s.value}%`,transformOrigin:"top left",transform:`scale(${s.value})`}),n=b(()=>({...r.value,"user-select":ut.selectable?void 0:"none"}));return(i,o)=>(Y(),gt("div",{"data-slidev-no":e.route.no,class:Xt(F(de)(t.route,["slide","presenter"].includes(e.renderContext)?"":"disable-view-transition")),style:ht(n.value)},[_t(F(_e)),(Y(),qt(Zt(e.route.component))),_t(F(xe))],14,we))}}),as=Ft(Se,[["__scopeId","data-v-6f3f0ce1"]]);var be=Object.defineProperty,Mt=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,Lt=(t,e,s)=>e in t?be(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,ct=(t,e)=>{for(var s in e||(e={}))Pe.call(e,s)&&Lt(t,s,e[s]);if(Mt)for(var s of Mt(e))Ee.call(e,s)&&Lt(t,s,e[s]);return t},Me=()=>({emit(t,...e){for(let s=0,r=this.events[t]||[],n=r.length;s{var r;this.events[t]=(r=this.events[t])==null?void 0:r.filter(n=>e!==n)}}});function $t(t,e,s,r=n=>n){return t*r(.5-e*(.5-s))}function Le(t){return[-t[0],-t[1]]}function L(t,e){return[t[0]+e[0],t[1]+e[1]]}function P(t,e){return[t[0]-e[0],t[1]-e[1]]}function M(t,e){return[t[0]*e,t[1]*e]}function $e(t,e){return[t[0]/e,t[1]/e]}function U(t){return[t[1],-t[0]]}function Ct(t,e){return t[0]*e[0]+t[1]*e[1]}function Ce(t,e){return t[0]===e[0]&&t[1]===e[1]}function ke(t){return Math.hypot(t[0],t[1])}function De(t){return t[0]*t[0]+t[1]*t[1]}function kt(t,e){return De(P(t,e))}function Tt(t){return $e(t,ke(t))}function Ie(t,e){return Math.hypot(t[1]-e[1],t[0]-e[0])}function G(t,e,s){let r=Math.sin(s),n=Math.cos(s),i=t[0]-e[0],o=t[1]-e[1],a=i*n-o*r,l=i*r+o*n;return[a+e[0],l+e[1]]}function dt(t,e,s){return L(t,M(P(e,t),s))}function Dt(t,e,s){return L(t,M(e,s))}var{min:j,PI:Ne}=Math,It=.275,H=Ne+1e-4;function Ae(t,e={}){let{size:s=16,smoothing:r=.5,thinning:n=.5,simulatePressure:i=!0,easing:o=u=>u,start:a={},end:l={},last:p=!1}=e,{cap:y=!0,easing:v=u=>u*(2-u)}=a,{cap:S=!0,easing:f=u=>--u*u*u+1}=l;if(t.length===0||s<=0)return[];let d=t[t.length-1].runningLength,c=a.taper===!1?0:a.taper===!0?Math.max(s,d):a.taper,E=l.taper===!1?0:l.taper===!0?Math.max(s,d):l.taper,R=Math.pow(s*r,2),k=[],h=[],x=t.slice(0,10).reduce((u,w)=>{let g=w.pressure;if(i){let m=j(1,w.distance/s),rt=j(1,1-m);g=j(1,u+(rt-u)*(m*It))}return(u+g)/2},t[0].pressure),_=$t(s,n,t[t.length-1].pressure,o),W,tt=t[0].vector,B=t[0].point,q=B,T=B,K=q,et=!1;for(let u=0;uR)&&(k.push(T),B=T),K=L(g,yt),(u<=1||kt(q,K)>R)&&(h.push(K),q=K),x=w,tt=m}let D=t[0].point.slice(0,2),I=t.length>1?t[t.length-1].point.slice(0,2):L(t[0].point,[1,1]),st=[],Z=[];if(t.length===1){if(!(c||E)||p){let u=Dt(D,Tt(U(P(D,I))),-(W||_)),w=[];for(let g=1/13,m=g;m<=1;m+=g)w.push(G(u,D,H*2*m));return w}}else{if(!(c||E&&t.length===1))if(y)for(let w=1/13,g=w;g<=1;g+=w){let m=G(h[0],D,H*g);st.push(m)}else{let w=P(k[0],h[0]),g=M(w,.5),m=M(w,.51);st.push(P(D,g),P(D,m),L(D,m),L(D,g))}let u=U(Le(t[t.length-1].vector));if(E||c&&t.length===1)Z.push(I);else if(S){let w=Dt(I,u,_);for(let g=1/29,m=g;m<1;m+=g)Z.push(G(w,I,H*3*m))}else Z.push(L(I,M(u,_)),L(I,M(u,_*.99)),P(I,M(u,_*.99)),P(I,M(u,_)))}return k.concat(Z,h.reverse(),st)}function Fe(t,e={}){var s;let{streamline:r=.5,size:n=16,last:i=!1}=e;if(t.length===0)return[];let o=.15+(1-r)*.85,a=Array.isArray(t[0])?t:t.map(({x:f,y:d,pressure:c=.5})=>[f,d,c]);if(a.length===2){let f=a[1];a=a.slice(0,-1);for(let d=1;d<5;d++)a.push(dt(a[0],f,d/4))}a.length===1&&(a=[...a,[...L(a[0],[1,1]),...a[0].slice(2)]]);let l=[{point:[a[0][0],a[0][1]],pressure:a[0][2]>=0?a[0][2]:.25,vector:[1,1],distance:0,runningLength:0}],p=!1,y=0,v=l[0],S=a.length-1;for(let f=1;f=0?a[f][2]:.5,vector:Tt(P(v.point,d)),distance:c,runningLength:y},l.push(v)}return l[0].vector=((s=l[1])==null?void 0:s.vector)||[0,0],l}function Te(t,e={}){return Ae(Fe(t,e),e)}function Q(t,e){return t-e}function Ke(t){return t<0?-1:1}function J(t){return[Math.abs(t),Ke(t)]}function Kt(){const t=()=>((1+Math.random())*65536|0).toString(16).substring(1);return`${t()+t()}-${t()}-${t()}-${t()}-${t()}${t()}${t()}`}var ze=2,C=ze,O=class{constructor(t){this.drauu=t,this.event=void 0,this.point=void 0,this.start=void 0,this.el=null}onSelected(t){}onUnselected(){}onStart(t){}onMove(t){return!1}onEnd(t){}get brush(){return this.drauu.brush}get shiftPressed(){return this.drauu.shiftPressed}get altPressed(){return this.drauu.altPressed}get svgElement(){return this.drauu.el}getMousePosition(t){var e,s,r;const n=this.drauu.el,i=(e=this.drauu.options.coordinateScale)!=null?e:1,o=(s=this.drauu.options.offset)!=null?s:{x:0,y:0};if(this.drauu.options.coordinateTransform===!1){const a=this.drauu.el.getBoundingClientRect();return{x:(t.pageX-a.left+o.x)*i,y:(t.pageY-a.top+o.y)*i,pressure:t.pressure}}else{const a=this.drauu.svgPoint;a.x=t.clientX+o.x,a.y=t.clientY+o.y;const l=a.matrixTransform((r=n.getScreenCTM())==null?void 0:r.inverse());return{x:l.x*i,y:l.y*i,pressure:t.pressure}}}createElement(t,e){var s;const r=document.createElementNS("http://www.w3.org/2000/svg",t),n=e?ct(ct({},this.brush),e):this.brush;return r.setAttribute("fill",(s=n.fill)!=null?s:"transparent"),r.setAttribute("stroke",n.color),r.setAttribute("stroke-width",n.size.toString()),r.setAttribute("stroke-linecap","round"),n.dasharray&&r.setAttribute("stroke-dasharray",n.dasharray),r}attr(t,e){this.el.setAttribute(t,typeof e=="string"?e:e.toFixed(C))}_setEvent(t){this.event=t,this.point=this.getMousePosition(t)}_eventDown(t){return this._setEvent(t),this.start=this.point,this.onStart(this.point)}_eventMove(t){return this._setEvent(t),this.onMove(this.point)}_eventUp(t){return this._setEvent(t),this.onEnd(this.point)}},Re=class zt extends O{constructor(){super(...arguments),this.points=[]}onStart(e){return this.el=document.createElementNS("http://www.w3.org/2000/svg","path"),this.points=[e],this.attr("fill",this.brush.color),this.attr("d",this.getSvgData(this.points)),this.el}onMove(e){return this.el||this.onStart(e),this.points[this.points.length-1]!==e&&this.points.push(e),this.attr("d",this.getSvgData(this.points)),!0}onEnd(){const e=this.el;return this.el=null,!!e}getSvgData(e){return zt.getSvgData(e,this.brush)}static getSvgData(e,s){const r=Te(e,ct({size:s.size,thinning:.9,simulatePressure:!1,start:{taper:5},end:{taper:5}},s.stylusOptions));if(!r.length)return"";const n=r.reduce((i,[o,a],l,p)=>{const[y,v]=p[(l+1)%p.length];return i.push(o,a,(o+y)/2,(a+v)/2),i},["M",...r[0],"Q"]);return n.push("Z"),n.map(i=>typeof i=="number"?i.toFixed(2):i).join(" ")}},je=class extends O{onStart(t){return this.el=this.createElement("ellipse"),this.attr("cx",t.x),this.attr("cy",t.y),this.el}onMove(t){if(!this.el||!this.start)return!1;let[e,s]=J(t.x-this.start.x),[r,n]=J(t.y-this.start.y);if(this.shiftPressed){const i=Math.min(e,r);e=i,r=i}if(this.altPressed)this.attr("cx",this.start.x),this.attr("cy",this.start.y),this.attr("rx",e),this.attr("ry",r);else{const[i,o]=[this.start.x,this.start.x+e*s].sort(Q),[a,l]=[this.start.y,this.start.y+r*n].sort(Q);this.attr("cx",(i+o)/2),this.attr("cy",(a+l)/2),this.attr("rx",(o-i)/2),this.attr("ry",(l-a)/2)}return!0}onEnd(){const t=this.el;return this.el=null,!(!t||!t.getTotalLength())}};function Rt(t,e){const s=document.createElementNS("http://www.w3.org/2000/svg","defs"),r=document.createElementNS("http://www.w3.org/2000/svg","marker"),n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("fill",e),r.setAttribute("id",t),r.setAttribute("viewBox","0 -5 10 10"),r.setAttribute("refX","5"),r.setAttribute("refY","0"),r.setAttribute("markerWidth","4"),r.setAttribute("markerHeight","4"),r.setAttribute("orient","auto"),n.setAttribute("d","M0,-5L10,0L0,5"),r.appendChild(n),s.appendChild(r),s}var Oe=class extends O{onStart(t){if(this.el=this.createElement("line",{fill:"transparent"}),this.attr("x1",t.x),this.attr("y1",t.y),this.attr("x2",t.x),this.attr("y2",t.y),this.brush.arrowEnd){const e=Kt(),s=document.createElementNS("http://www.w3.org/2000/svg","g");return s.append(Rt(e,this.brush.color)),s.append(this.el),this.attr("marker-end",`url(#${e})`),s}return this.el}onMove(t){if(!this.el)return!1;let{x:e,y:s}=t;if(this.shiftPressed){const r=t.x-this.start.x,n=t.y-this.start.y;if(n!==0){let i=r/n;i=Math.round(i),Math.abs(i)<=1?(e=this.start.x+n*i,s=this.start.y+n):(e=this.start.x+r,s=this.start.y)}}return this.altPressed?(this.attr("x1",this.start.x*2-e),this.attr("y1",this.start.y*2-s),this.attr("x2",e),this.attr("y2",s)):(this.attr("x1",this.start.x),this.attr("y1",this.start.y),this.attr("x2",e),this.attr("y2",s)),!0}onEnd(){const t=this.el;return this.el=null,!(!t||t.getTotalLength()<5)}},Be=class extends O{onStart(t){return this.el=this.createElement("rect"),this.brush.cornerRadius&&(this.attr("rx",this.brush.cornerRadius),this.attr("ry",this.brush.cornerRadius)),this.attr("x",t.x),this.attr("y",t.y),this.el}onMove(t){if(!this.el||!this.start)return!1;let[e,s]=J(t.x-this.start.x),[r,n]=J(t.y-this.start.y);if(this.shiftPressed){const i=Math.min(e,r);e=i,r=i}if(this.altPressed)this.attr("x",this.start.x-e),this.attr("y",this.start.y-r),this.attr("width",e*2),this.attr("height",r*2);else{const[i,o]=[this.start.x,this.start.x+e*s].sort(Q),[a,l]=[this.start.y,this.start.y+r*n].sort(Q);this.attr("x",i),this.attr("y",a),this.attr("width",o-i),this.attr("height",l-a)}return!0}onEnd(){const t=this.el;return this.el=null,!(!t||!t.getTotalLength())}};function Ve(t,e){const s=t.x-e.x,r=t.y-e.y;return s*s+r*r}function Ue(t,e,s){let r=e.x,n=e.y,i=s.x-r,o=s.y-n;if(i!==0||o!==0){const a=((t.x-r)*i+(t.y-n)*o)/(i*i+o*o);a>1?(r=s.x,n=s.y):a>0&&(r+=i*a,n+=o*a)}return i=t.x-r,o=t.y-n,i*i+o*o}function Ge(t,e){let s=t[0];const r=[s];let n;for(let i=1,o=t.length;ie&&(r.push(n),s=n);return s!==n&&n&&r.push(n),r}function ft(t,e,s,r,n){let i=r,o=0;for(let a=e+1;ai&&(o=a,i=l)}i>r&&(o-e>1&&ft(t,e,o,r,n),n.push(t[o]),s-o>1&&ft(t,o,s,r,n))}function He(t,e){const s=t.length-1,r=[t[0]];return ft(t,0,s,e,r),r.push(t[s]),r}function Nt(t,e,s=!1){if(t.length<=2)return t;const r=e*e;return t=s?t:Ge(t,r),t=He(t,r),t}var qe=class z extends O{constructor(){super(...arguments),this.points=[],this.count=0}onStart(e){if(this.el=this.createElement("path",{fill:"transparent"}),this.points=[e],this.brush.arrowEnd){this.arrowId=Kt();const s=Rt(this.arrowId,this.brush.color);this.el.appendChild(s)}return this.el}onMove(e){return this.el||this.onStart(e),this.points[this.points.length-1]!==e&&(this.points.push(e),this.count+=1),this.count>5&&(this.points=Nt(this.points,1,!0),this.count=0),this.attr("d",z.toSvgData(this.points)),!0}onEnd(){const e=this.el;if(this.el=null,!e)return!1;if(e.setAttribute("d",z.toSvgData(Nt(this.points,1,!0))),!e.getTotalLength()){const{x:s,y:r}=this.points[0],n=this.brush.size/2;e.setAttribute("d",`M ${s-n} ${r} a ${n},${n} 0 1,0 ${n*2},0 a ${n},${n} 0 1,0 ${-n*2},0`),e.setAttribute("fill",this.brush.color),e.setAttribute("stroke-width","0")}return!0}static line(e,s){const r=s.x-e.x,n=s.y-e.y;return{length:Math.sqrt(r**2+n**2),angle:Math.atan2(n,r)}}static controlPoint(e,s,r,n){const i=s||e,o=r||e,a=.2,l=z.line(i,o),p=l.angle+(n?Math.PI:0),y=l.length*a,v=e.x+Math.cos(p)*y,S=e.y+Math.sin(p)*y;return{x:v,y:S}}static bezierCommand(e,s,r){const n=z.controlPoint(r[s-1],r[s-2],e),i=z.controlPoint(e,r[s-1],r[s+1],!0);return`C ${n.x.toFixed(C)},${n.y.toFixed(C)} ${i.x.toFixed(C)},${i.y.toFixed(C)} ${e.x.toFixed(C)},${e.y.toFixed(C)}`}static toSvgData(e){return e.reduce((s,r,n,i)=>n===0?`M ${r.x.toFixed(C)},${r.y.toFixed(C)}`:`${s} ${z.bezierCommand(r,n,i)}`,"")}},Ze=class extends O{constructor(){super(...arguments),this.pathSubFactor=20,this.pathFragments=[],this._erased=[]}onSelected(t){const e=(s,r)=>{if(s&&s.length)for(let n=0;nt.forEach(e=>this.drauu._restoreNode(e)),redo:()=>t.forEach(e=>this.drauu._removeNode(e))}}checkAndEraseElement(){if(this.pathFragments.length)for(let t=0;t!this._erased.includes(t.element))),this._erased.length>0}lineLineIntersect(t,e){const s=t.x1,r=t.x2,n=e.x1,i=e.x2,o=t.y1,a=t.y2,l=e.y1,p=e.y2,y=(s-r)*(l-p)-(o-a)*(n-i),v=(s*a-o*r)*(n-i)-(s-r)*(n*p-l*i),S=(s*a-o*r)*(l-p)-(o-a)*(n*p-l*i),f=(d,c,E)=>d>=c&&d<=E?!0:d>=E&&d<=c;if(y===0)return!1;{const d={x:v/y,y:S/y};return f(d.x,s,r)&&f(d.y,o,a)&&f(d.x,n,i)&&f(d.y,l,p)}}};function Xe(t){return{draw:new qe(t),stylus:new Re(t),line:new Oe(t),rectangle:new Be(t),ellipse:new je(t),eraseLine:new Ze(t)}}var Ye=class{constructor(t={}){this.options=t,this.el=null,this.svgPoint=null,this.eventEl=null,this.shiftPressed=!1,this.altPressed=!1,this.drawing=!1,this._emitter=Me(),this._originalPointerId=null,this._models=Xe(this),this._opStack=[],this._opIndex=0,this._disposables=[],this._elements=[],this.options.brush||(this.options.brush={color:"black",size:3,mode:"stylus"}),t.el&&this.mount(t.el,t.eventTarget,t.window)}get model(){return this._models[this.mode]}get mounted(){return!!this.el}get mode(){return this.options.brush.mode||"stylus"}set mode(t){this._models[this.mode].onUnselected(),this.options.brush.mode=t,this.model.onSelected(this.el)}get brush(){return this.options.brush}set brush(t){this.options.brush=t}resolveSelector(t){return typeof t=="string"?document.querySelector(t):t||null}mount(t,e,s=window){if(this.el)throw new Error("[drauu] already mounted, unmount previous target first");if(this.el=this.resolveSelector(t),!this.el)throw new Error("[drauu] target element not found");if(this.el.tagName.toLocaleLowerCase()!=="svg")throw new Error("[drauu] can only mount to a SVG element");if(!this.el.createSVGPoint)throw new Error("[drauu] SVG element must be create by document.createElementNS('http://www.w3.org/2000/svg', 'svg')");this.svgPoint=this.el.createSVGPoint();const r=this.resolveSelector(e)||this.el,n=this.eventStart.bind(this),i=this.eventMove.bind(this),o=this.eventEnd.bind(this),a=this.eventKeyboard.bind(this);r.addEventListener("pointerdown",n,{passive:!1}),s.addEventListener("pointermove",i,{passive:!1}),s.addEventListener("pointerup",o,{passive:!1}),s.addEventListener("pointercancel",o,{passive:!1}),s.addEventListener("keydown",a,!1),s.addEventListener("keyup",a,!1),this._disposables.push(()=>{r.removeEventListener("pointerdown",n),s.removeEventListener("pointermove",i),s.removeEventListener("pointerup",o),s.removeEventListener("pointercancel",o),s.removeEventListener("keydown",a,!1),s.removeEventListener("keyup",a,!1)}),this._emitter.emit("mounted")}unmount(){this._disposables.forEach(t=>t()),this._disposables.length=0,this._elements.length=0,this.el=null,this._emitter.emit("unmounted")}on(t,e){return this._emitter.on(t,e)}undo(){return!this.canUndo()||this.drawing?!1:(this._opStack[--this._opIndex].undo(),this._emitter.emit("changed"),!0)}redo(){return!this.canRedo()||this.drawing?!1:(this._opStack[this._opIndex++].redo(),this._emitter.emit("changed"),!0)}canRedo(){return this._opIndex0}eventMove(t){!this.acceptsInput(t)||!this.drawing||this.model._eventMove(t)&&(t.stopPropagation(),t.preventDefault(),this._emitter.emit("changed"))}eventStart(t){this.acceptsInput(t)&&(t.stopPropagation(),t.preventDefault(),this._currentNode&&this.cancel(),this.drawing=!0,this._originalPointerId=t.pointerId,this._emitter.emit("start"),this._currentNode=this.model._eventDown(t),this._currentNode&&this.mode!=="eraseLine"&&this.el.appendChild(this._currentNode),this._emitter.emit("changed"))}eventEnd(t){if(!this.acceptsInput(t)||!this.drawing)return;const e=this.model._eventUp(t);if(!e)this.cancel();else if(e===!0){const s=this._currentNode;this._appendNode(s),this.commit({undo:()=>this._removeNode(s),redo:()=>this._restoreNode(s)})}else this.commit(e);this.drawing=!1,this._emitter.emit("end"),this._emitter.emit("changed"),this._originalPointerId=null}acceptsInput(t){return(!this.options.acceptsInputTypes||this.options.acceptsInputTypes.includes(t.pointerType))&&!(this._originalPointerId&&this._originalPointerId!==t.pointerId)}eventKeyboard(t){this.shiftPressed===t.shiftKey&&this.altPressed===t.altKey||(this.shiftPressed=t.shiftKey,this.altPressed=t.altKey,this.model.point&&this.model.onMove(this.model.point)&&this._emitter.emit("changed"))}commit(t){this._opStack.length=this._opIndex,this._opStack.push(t),this._opIndex++;const e=this._currentNode;this._currentNode=void 0,this._emitter.emit("committed",e)}clear(){this._opStack.length=0,this._opIndex=0,this._elements=[],this.cancel(),this.el.innerHTML="",this._emitter.emit("changed")}cancel(){this._currentNode&&(this.el.removeChild(this._currentNode),this._currentNode=void 0,this._emitter.emit("canceled"))}dump(){return this.el.innerHTML}load(t){this.clear(),this.el.innerHTML=t}_appendNode(t){const e=this._elements.at(-1);e?e.after(t):this.el.append(t);const s=this._elements.push(t)-1;t.dataset.drauu_index=s.toString()}_removeNode(t){t.remove(),this._elements[+t.dataset.drauu_index]=null}_restoreNode(t){const e=+t.dataset.drauu_index;this._elements[e]=t;for(let s=e-1;s>=0;s--){const r=this._elements[s];if(r){r.after(t);return}}this.el.prepend(t)}};function Qe(t){return new Ye(t)}const Je=Yt(()=>{const{currentSlideNo:t,isPresenter:e}=At(),s=["#ff595e","#ffca3a","#8ac926","#1982c4","#6a4c93","#ffffff","#000000"],r=at("slidev-drawing-enabled",!1),n=at("slidev-drawing-pinned",!1),i=Qt(at("slidev-drawing-brush",{color:s[0],size:4,mode:"stylus"})),o=$(!1),a=$(!1),l=$(!1),p=$(!1),y=$("stylus"),v=b(()=>ut.drawings.syncAll||e.value);let S=!1;const f=b({get(){return y.value},set(h){y.value=h,h==="arrow"?(c.mode="line",i.arrowEnd=!0):(c.mode=h,i.arrowEnd=!1)}}),d=Jt({brush:i,acceptsInputTypes:b(()=>r.value&&(!ut.drawings.presenterOnly||e.value)?void 0:["pen"]),coordinateTransform:!1}),c=Wt(Qe(d));function E(){c.clear(),v.value&&Et(t.value,"")}function R(){var h;l.value=c.canRedo(),a.value=c.canUndo(),p.value=!!((h=c.el)!=null&&h.children.length)}function k(h){S=!0;const x=ot[h||t.value];x!=null?c.load(x):c.clear(),R(),S=!1}return c.on("changed",()=>{if(R(),!S){const h=c.dump(),x=t.value;(ot[x]||"")!==h&&v.value&&Et(x,c.dump())}}),fe(h=>{S=!0,h[t.value]!=null&&c.load(h[t.value]||""),S=!1,R()}),te(()=>{ee(t,()=>{c.mounted&&k()},{immediate:!0})}),c.on("start",()=>o.value=!0),c.on("end",()=>o.value=!1),window.addEventListener("keydown",h=>{if(!r.value||pe.value)return;const x=!h.ctrlKey&&!h.altKey&&!h.shiftKey&&!h.metaKey;let _=!0;h.code==="KeyZ"&&(h.ctrlKey||h.metaKey)?h.shiftKey?c.redo():c.undo():h.code==="Escape"?r.value=!1:h.code==="KeyL"&&x?f.value="line":h.code==="KeyA"&&x?f.value="arrow":h.code==="KeyS"&&x?f.value="stylus":h.code==="KeyR"&&x?f.value="rectangle":h.code==="KeyE"&&x?f.value="ellipse":h.code==="KeyC"&&x?E():h.code.startsWith("Digit")&&x&&+h.code[5]<=s.length?i.color=s[+h.code[5]-1]:_=!1,_&&(h.preventDefault(),h.stopPropagation())},!1),{brush:i,brushColors:s,canClear:p,canRedo:l,canUndo:a,clear:E,drauu:c,drauuOptions:d,drawingEnabled:r,drawingMode:f,drawingPinned:n,drawingState:ot,isDrawing:o,loadCanvas:k}}),We=["innerHTML"],os=pt({__name:"DrawingPreview",props:{page:{}},setup(t){const{drawingState:e}=Je();return(s,r)=>F(e)[s.page]?(Y(),gt("svg",{key:0,class:"w-full h-full absolute top-0 pointer-events-none",innerHTML:F(e)[s.page]},null,8,We)):se("",!0)}});export{is as G,as as S,os as _,rs as a,ge as b,Je as c,ns as d,ss as u}; diff --git a/test/assets/slidev/context-G025NcPA.js b/test/assets/slidev/context-G025NcPA.js new file mode 100644 index 0000000..b937aea --- /dev/null +++ b/test/assets/slidev/context-G025NcPA.js @@ -0,0 +1 @@ +import{a6 as t,ac as a,t as m,z as $,aB as d}from"../modules/vue-B03c_Ivc.js";import{W as f,a5 as C,aa as x,a4 as S,a2 as p,a3 as v,a1 as R,a0 as T,ab as E,ac as F}from"../index-Df4vEvvN.js";function D(){const n=t(x),o=a(n,"nav"),e=t(S).value,c=a(e,"current"),s=t(p),i=t(v),r=t(R,{}),l=t(T,void 0),u=t(f,m(1)),j=t(C,$(()=>1));return{$slidev:n,$nav:o,$clicksContext:e,$clicks:c,$page:s,$route:l,$renderContext:i,$frontmatter:r,$scale:u,$zoom:j}}function L(n,o){return{...d(n,o===0?E:F),frontmatter:n}}export{L as f,D as u}; diff --git a/test/assets/slidev/entry-DBVNHmWY.js b/test/assets/slidev/entry-DBVNHmWY.js new file mode 100644 index 0000000..cff7ed2 --- /dev/null +++ b/test/assets/slidev/entry-DBVNHmWY.js @@ -0,0 +1 @@ +import{_ as r,a as l,b as p,c as i}from"../modules/unplugin-icons-DLmkOyLZ.js";import{b as m,l as e,k as n,r as u,o as f,aa as t}from"../modules/vue-B03c_Ivc.js";import{_ as d}from"../index-Df4vEvvN.js";import"../modules/shiki-D6VyeOrD.js";const g={},k={class:"h-full w-full flex items-center justify-center gap-5 lt-md:flex-col"};function x(b,v){const s=r,o=u("RouterLink"),_=l,a=p,c=i;return f(),m("div",k,[e(o,{to:"/",class:"page-link"},{default:n(()=>[e(s),t(" Slides ")]),_:1}),e(o,{to:"/presenter",class:"page-link"},{default:n(()=>[e(_),t(" Presenter ")]),_:1}),e(o,{to:"/notes",class:"page-link"},{default:n(()=>[e(a),t(" Notes ")]),_:1}),e(o,{to:"/overview",class:"page-link"},{default:n(()=>[e(c),t(" Overview ")]),_:1})])}const B=d(g,[["render",x],["__scopeId","data-v-e5df851c"]]);export{B as default}; diff --git a/test/assets/slidev/intro-mdsqHmL8.js b/test/assets/slidev/intro-mdsqHmL8.js new file mode 100644 index 0000000..41a082e --- /dev/null +++ b/test/assets/slidev/intro-mdsqHmL8.js @@ -0,0 +1 @@ +import{o,b as s,e as t,f as a}from"../modules/vue-B03c_Ivc.js";import{u as r}from"./context-G025NcPA.js";const n={class:"slidev-layout intro"},c={class:"my-auto"},m={__name:"intro",setup(_){return r(),(e,i)=>(o(),s("div",n,[t("div",c,[a(e.$slots,"default")])]))}};export{m as _}; diff --git a/test/assets/slidev/notes-D2G3W9tS.js b/test/assets/slidev/notes-D2G3W9tS.js new file mode 100644 index 0000000..d14b541 --- /dev/null +++ b/test/assets/slidev/notes-D2G3W9tS.js @@ -0,0 +1 @@ +import{g as T,h as E,i as U,j as D}from"../modules/unplugin-icons-DLmkOyLZ.js";import{d as H,t as y,W as L,z as r,E as V,o as u,b as j,e as o,h as C,B as l,l as s,k as _,c as z,x as b,F as I}from"../modules/vue-B03c_Ivc.js";import{u as M,a as P,d as t,e as R,s as W,f as q}from"../index-Df4vEvvN.js";import{_ as A,C as G}from"./ClicksSlider-Bv3jj13O.js";import{_ as p}from"./IconButton.vue_vue_type_script_setup_true_lang-ClhDPtQg.js";import"../modules/shiki-D6VyeOrD.js";const J={class:"h-full pt-2 flex flex-col"},K={class:"flex-none border-t border-main",px3:"",py2:""},O={class:"flex-none border-t border-main"},Q={class:"flex gap-1 items-center px-6 py-3"},X=o("div",{class:"flex-auto"},null,-1),Y={class:"p2 text-center"},ae=H({__name:"notes",setup(Z){M({title:`Notes - ${W}`});const{slides:w,total:d}=P(),{isFullscreen:f,toggle:S}=q,m=y(),n=L("slidev-notes-font-size",18),a=r(()=>{var e;return((e=t.lastUpdate)==null?void 0:e.type)==="viewer"?t.viewerPage:t.page}),v=r(()=>w.value.find(e=>e.no===a.value));V(a,()=>{var e;(e=m.value)==null||e.scrollTo({left:0,top:0,behavior:"smooth"}),window.scrollTo({left:0,top:0,behavior:"smooth"})});function $(){n.value=n.value+1}function B(){n.value=n.value-1}const x=r(()=>{var c,i;const e=((c=t.lastUpdate)==null?void 0:c.type)==="viewer"?t.viewerClicks:t.clicks,h=((i=t.lastUpdate)==null?void 0:i.type)==="viewer"?t.viewerClicksTotal:t.clicksTotal;return R(y(e),void 0,h)});return(e,h)=>{var k,g;const c=U,i=D,F=T,N=E;return u(),j(I,null,[o("div",{class:"fixed top-0 left-0 h-3px bg-primary transition-all duration-500",style:C({width:`${(a.value-1)/(l(d)-1)*100+1}%`})},null,4),o("div",J,[o("div",{ref_key:"scroller",ref:m,class:"px-5 flex-auto h-full overflow-auto",style:C({fontSize:`${l(n)}px`})},[s(A,{note:(k=v.value)==null?void 0:k.meta.slide.note,"note-html":(g=v.value)==null?void 0:g.meta.slide.noteHTML,placeholder:`No notes for Slide ${a.value}.`,"clicks-context":x.value,"auto-scroll":!0},null,8,["note","note-html","placeholder","clicks-context"])],4),o("div",K,[s(G,{"clicks-context":x.value,readonly:""},null,8,["clicks-context"])]),o("div",O,[o("div",Q,[s(p,{title:l(f)?"Close fullscreen":"Enter fullscreen",onClick:l(S)},{default:_(()=>[l(f)?(u(),z(c,{key:0})):(u(),z(i,{key:1}))]),_:1},8,["title","onClick"]),s(p,{title:"Increase font size",onClick:$},{default:_(()=>[s(F)]),_:1}),s(p,{title:"Decrease font size",onClick:B},{default:_(()=>[s(N)]),_:1}),X,o("div",Y,b(a.value)+" / "+b(l(d)),1)])])])],64)}}});export{ae as default}; diff --git a/test/assets/slidev/overview-D6vhBkpI.js b/test/assets/slidev/overview-D6vhBkpI.js new file mode 100644 index 0000000..1288fe0 --- /dev/null +++ b/test/assets/slidev/overview-D6vhBkpI.js @@ -0,0 +1 @@ +import{d as te,e as ne,_ as oe,f as le}from"../modules/unplugin-icons-DLmkOyLZ.js";import{d as J,ab as ae,ac as ie,t as T,ad as se,E as U,D as ce,a4 as re,n as Q,B as c,o as a,c as g,i as S,h as z,ae as ue,af as de,b,j as me,K as pe,z as L,R as ve,O as fe,e as s,F as j,ag as q,k as N,x as y,g as V,l as w}from"../modules/vue-B03c_Ivc.js";import{u as he,a as ge,s as ke,c as _e,C as X,i as be,b as K,t as xe,g as G,p as ye}from"../index-Df4vEvvN.js";import{u as we,S as Ce,_ as $e,a as De}from"./DrawingPreview.vue_vue_type_script_setup_true_lang-D58kc9wE.js";import{_ as W}from"./IconButton.vue_vue_type_script_setup_true_lang-ClhDPtQg.js";import{_ as Se,C as Ee}from"./ClicksSlider-Bv3jj13O.js";import"../modules/shiki-D6VyeOrD.js";const Me=["placeholder"],He=J({__name:"NoteEditable",props:{no:{type:Number,required:!0},class:{default:""},editing:{default:!1},style:{default:()=>({})},placeholder:{default:"No notes for this slide"},clicksContext:{type:Object},highlight:{default:!0},autoHeight:{default:!1}},emits:["update:editing","markerDblclick","markerClick"],setup(C,{emit:A}){const o=C,x=A,r=ae(o,"editing",x,{passive:!0}),{info:f,update:$}=we(ie(o,"no")),p=T("");let E;const{ignoreUpdates:k}=se(p,i=>{if(!r.value)return;const m=o.no;clearTimeout(E),E=setTimeout(()=>{$({note:i},m)},500)});U(()=>{var i;return(i=f.value)==null?void 0:i.note},(i="")=>{r.value||(clearTimeout(E),k(()=>{p.value=i}))},{immediate:!0,flush:"sync"});const d=T(),_=T();ce(()=>{var i;r.value&&((i=d.value)==null||i.focus())}),re(d,()=>{r.value=!1});function B(){!o.autoHeight||!d.value||!r.value||d.value.scrollHeight>d.value.clientHeight&&(d.value.style.height=`${d.value.scrollHeight}px`)}function R(i){r.value&&i.metaKey&&i.key==="s"&&(i.preventDefault(),$({note:p.value},o.no))}return U([p,r],()=>{Q(()=>{B()})},{flush:"post",immediate:!0}),(i,m)=>{var M;return c(r)?ue((a(),b("textarea",{key:1,ref_key:"inputEl",ref:d,"onUpdate:modelValue":m[2]||(m[2]=h=>p.value=h),class:S(["prose resize-none overflow-auto outline-none bg-transparent block border-primary border-2",o.class]),style:z([{"line-height":"1.75"},[o.style,_.value!=null?{height:`${_.value}px`}:{}]]),placeholder:C.placeholder,onKeydown:[m[3]||(m[3]=me(h=>r.value=!1,["esc"])),R]},null,46,Me)),[[de,p.value]]):(a(),g(Se,{key:0,class:S(["border-transparent border-2",[o.class,p.value?"":"opacity-25 italic select-none"]]),style:z(o.style),note:p.value||C.placeholder,"note-html":(M=c(f))==null?void 0:M.noteHTML,"clicks-context":C.clicksContext,"auto-scroll":!C.autoHeight,highlight:o.highlight,onMarkerClick:m[0]||(m[0]=(h,H)=>x("markerClick",h,H)),onMarkerDblclick:m[1]||(m[1]=(h,H)=>x("markerDblclick",h,H))},null,8,["class","style","note","note-html","clicks-context","auto-scroll","highlight"]))}}}),Ne={class:"h-screen w-screen of-hidden flex"},Te={class:"grid grid-rows-[auto_max-content] border-r border-main select-none max-h-full h-full"},Be={class:"relative"},Ie={class:"absolute left-0 top-0 bottom-0 w-200 flex flex-col flex-auto items-end group p2 gap-1 max-h-full of-x-visible of-y-auto",style:{direction:"rtl"}},Ve=["onClick"],Ke={p2:"",border:"t main"},We={class:"select-none w-13 text-right my4 flex flex-col gap-1 items-end"},ze={class:"text-3xl op20 mb2"},Re=["onDblclick"],Le={class:"py3 mt-0.5 mr--8 ml--4 op0 transition group-hover:op100"},Oe={key:0,class:"select-none absolute bottom-0 right-0 bg-main rounded-tl p2 op35 text-xs"},Ae={class:"absolute top-0 right-0 px3 py1.5 border-b border-l rounded-lb bg-main border-main select-none"},Fe={class:"text-xs op50"},O=450,Ye=J({__name:"overview",setup(C){he({title:`Overview - ${ke}`});const{openInEditor:A,slides:o}=ge(),x=pe(new Map),r=T([]),f=T(null),$=L(()=>o.value.map(t=>{var e,l;return i(((l=(e=t.meta)==null?void 0:e.slide)==null?void 0:l.note)||"")})),p=L(()=>$.value.reduce((t,e)=>t+e,0)),E=L(()=>o.value.map(t=>B(t)).reduce((t,e)=>t+e,0)),k=ve(),d=new WeakMap;function _(t){return d.has(t)||d.set(t,_e(t,X)),d.get(t)}function B(t){var e,l;return((e=t.meta)==null?void 0:e.clicks)||((l=_(t))==null?void 0:l.total)}function R(t){k.value===t?k.value=void 0:k.value=t}function i(t){var e;return((e=t.match(/[\w`'\-]+/g))==null?void 0:e.length)||0}function m(t){const e=t.getBoundingClientRect(),l=20;return e.top>=0-l&&e.left>=0-l&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)+l&&e.right<=(window.innerWidth||document.documentElement.clientWidth)+l}function M(){const t=[];Array.from(x.entries()).forEach(([e,l])=>{m(l)&&t.push(e)}),r.value=t}function h(t){const e=document.createElement("a");e.target="_blank",e.href=ye+t.slice(1),e.click()}function H(t){const e=x.get(t);e&&e.scrollIntoView({behavior:"smooth",block:"start"})}function Y(t,e,l){const D=_(l);D.current===e?D.current=X:D.current=e,t.preventDefault()}return fe(()=>{Q(()=>{M()})}),(t,e)=>{const l=te,D=ne,Z=oe,ee=le;return a(),b("div",Ne,[s("nav",Te,[s("div",Be,[s("div",Ie,[(a(!0),b(j,null,q(c(o),(n,v)=>{var u,I,F,P;return a(),b("div",{key:n.no,class:"relative",style:{direction:"ltr"}},[s("button",{class:S(["relative transition duration-300 w-8 h-8 rounded hover:bg-active hover:op100",r.value.includes(v)?"op100 text-primary bg-gray:5":"op20"]),onClick:Pe=>H(v)},[s("div",null,y(v+1),1)],10,Ve),(I=(u=n.meta)==null?void 0:u.slide)!=null&&I.title?(a(),b("div",{key:0,class:S(["pointer-events-none select-none absolute left-110% backdrop-blur-8 top-50% translate-y--50% ws-nowrap z-10 px2 shadow-xl rounded border border-main transition duration-400 op0 group-hover:op100",r.value.includes(v)?"text-primary":"text-main important-text-op-50"])},y((P=(F=n.meta)==null?void 0:F.slide)==null?void 0:P.title),3)):V("",!0)])}),128))])]),s("div",Ke,[c(be)?(a(),g(W,{key:1,title:c(K)?"Dark mode":"Light mode","pointer-events-none":"",op50:""},{default:N(()=>[c(K)?(a(),g(l,{key:0})):(a(),g(D,{key:1}))]),_:1},8,["title"])):(a(),g(W,{key:0,title:c(K)?"Switch to light mode theme":"Switch to dark mode theme",onClick:e[0]||(e[0]=n=>c(xe)())},{default:N(()=>[c(K)?(a(),g(l,{key:0})):(a(),g(D,{key:1}))]),_:1},8,["title"]))])]),s("main",{class:"flex-1 h-full of-auto",style:z(`grid-template-columns: repeat(auto-fit,minmax(${O}px,1fr))`),onScroll:M},[(a(!0),b(j,null,q(c(o),(n,v)=>(a(),b("div",{key:n.no,ref_for:!0,ref:u=>x.set(v,u),class:S(["relative border-t border-main of-hidden flex gap-4 min-h-50 group",v===0?"pt5":""])},[s("div",We,[s("div",ze,y(v+1),1),w(W,{class:"mr--3 op0 group-hover:op80",title:"Play in new tab",onClick:u=>h(c(G)(n,!1))},{default:N(()=>[w(Z)]),_:2},1032,["onClick"]),V("",!0)]),s("div",{class:"flex flex-col gap-2 my5",style:z({width:`${O}px`})},[s("div",{class:"border rounded border-main overflow-hidden bg-main select-none h-max",onDblclick:u=>h(c(G)(n,!1))},[(a(),g(De,{key:n.no,width:O,class:"pointer-events-none important:[&_*]:select-none"},{default:N(()=>[w(Ce,{"clicks-context":_(n),route:n,"render-context":"overview"},null,8,["clicks-context","route"]),w($e,{page:n.no},null,8,["page"])]),_:2},1024))],40,Re),B(n)?(a(),g(Ee,{key:0,active:k.value===n,"clicks-context":_(n),class:"w-full mt-2",onDblclick:u=>R(n),onClick:u=>k.value=n},null,8,["active","clicks-context","onDblclick","onClick"])):V("",!0)],4),s("div",Le,[w(W,{title:"Edit Note",class:S(["rounded-full w-9 h-9 text-sm",f.value===n.no?"important:op0":""]),onClick:u=>f.value=n.no},{default:N(()=>[w(ee)]),_:2},1032,["class","onClick"])]),w(He,{no:n.no,class:"max-w-250 w-250 text-lg rounded p3","auto-height":!0,highlight:k.value===n,editing:f.value===n.no,"clicks-context":_(n),onDblclick:u=>f.value!==n.no?f.value=n.no:null,"onUpdate:editing":e[1]||(e[1]=u=>f.value=null),onMarkerClick:(u,I)=>Y(u,I,n)},null,8,["no","highlight","editing","clicks-context","onDblclick","onMarkerClick"]),$.value[v]>0?(a(),b("div",Oe,y($.value[v])+" words ",1)):V("",!0)],2))),128))],36),s("div",Ae,[s("div",Fe,y(c(o).length)+" slides · "+y(E.value+c(o).length-1)+" clicks · "+y(p.value)+" words ",1)])])}}});export{Ye as default}; diff --git a/test/assets/slidev/play-mGGM2FGe.js b/test/assets/slidev/play-mGGM2FGe.js new file mode 100644 index 0000000..9200283 --- /dev/null +++ b/test/assets/slidev/play-mGGM2FGe.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/slidev/DrawingControls-jVv_pSyJ.js","assets/slidev/DrawingControls.vue_vue_type_style_index_0_lang-BQZjIz1e.js","assets/modules/unplugin-icons-DLmkOyLZ.js","assets/modules/vue-B03c_Ivc.js","assets/modules/shiki-D6VyeOrD.js","assets/modules/shiki-BPvBenZD.css","assets/slidev/DrawingPreview.vue_vue_type_script_setup_true_lang-D58kc9wE.js","assets/index-Df4vEvvN.js","assets/index-CfcUbi7S.css","assets/DrawingPreview-Cu20KZhX.css","assets/slidev/useWakeLock-CRYEXDUy.js","assets/slidev/IconButton.vue_vue_type_script_setup_true_lang-ClhDPtQg.js","assets/slidev/context-G025NcPA.js","assets/useWakeLock-Dgwxzjge.css","assets/DrawingControls-C5T1oZL5.css"])))=>i.map(i=>d[i]); +import{d as v,ab as z,o,c as u,B as e,b as f,e as l,f as N,i as C,g as r,ai as R,z as E,k as h,aj as $,aa as B,R as y,l as m,F as M,x as D,v as W,h as A,t as H}from"../modules/vue-B03c_Ivc.js";import{v as k,a as P,w as I,x as b,y as w,z as L,A as T,d as V,B as O,l as S,D as U,E as j}from"../index-Df4vEvvN.js";import{b as F,G,c as K,u as X,r as Y,a as q,S as J,_ as Q,o as Z}from"./useWakeLock-CRYEXDUy.js";import{c as ee,a as te}from"./DrawingPreview.vue_vue_type_script_setup_true_lang-D58kc9wE.js";import{n as oe}from"../modules/unplugin-icons-DLmkOyLZ.js";import"../modules/shiki-D6VyeOrD.js";import"./IconButton.vue_vue_type_script_setup_true_lang-ClhDPtQg.js";import"./context-G025NcPA.js";const se="/test/assets/logo-BYkHSa_O.png",ae={key:0,class:"fixed top-0 bottom-0 left-0 right-0 grid z-20"},ne=v({__name:"Modal",props:{modelValue:{default:!1},class:{default:""}},emits:["update:modelValue"],setup(p,{emit:i}){const a=p,n=z(a,"modelValue",i);function d(){n.value=!1}return(_,s)=>(o(),u(R,null,[e(n)?(o(),f("div",ae,[l("div",{bg:"black opacity-80",class:"absolute top-0 bottom-0 left-0 right-0 -z-1",onClick:s[0]||(s[0]=c=>d())}),l("div",{class:C(["m-auto rounded-md bg-main shadow",a.class]),"dark:border":"~ main"},[N(_.$slots,"default")],2)])):r("",!0)],1024))}}),le={class:"slidev-info-dialog slidev-layout flex flex-col gap-4 text-base"},re=["innerHTML"],ie=l("a",{href:"https://github.com/slidevjs/slidev",target:"_blank",class:"!opacity-100 !border-none !text-current"},[l("div",{class:"flex gap-1 children:my-auto"},[l("div",{class:"opacity-50 text-sm mr-2"},"Powered by"),l("img",{class:"w-5 h-5",src:se,alt:"Slidev logo"}),l("div",{style:{color:"#2082A6"}},[l("b",null,"Sli"),B("dev ")])])],-1),ue=v({__name:"InfoDialog",props:{modelValue:{default:!1}},emits:["update:modelValue"],setup(p,{emit:i}){const n=z(p,"modelValue",i),d=E(()=>typeof k.info=="string");return(_,s)=>(o(),u(ne,{modelValue:e(n),"onUpdate:modelValue":s[0]||(s[0]=c=>$(n)?n.value=c:null),class:"px-6 py-4"},{default:h(()=>[l("div",le,[d.value?(o(),f("div",{key:0,class:"mb-4",innerHTML:e(k).info},null,8,re)):r("",!0),ie])]),_:1},8,["modelValue"]))}}),de=v({__name:"Controls",setup(p){const{isEmbedded:i}=P(),a=!k.drawings.presenterOnly&&!i.value,t=y();a&&I(()=>import("./DrawingControls-jVv_pSyJ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(_=>t.value=_.default);const n=y(),d=y();return(_,s)=>(o(),f(M,null,[e(a)&&t.value?(o(),u(e(t),{key:0})):r("",!0),m(F),m(G),n.value?(o(),u(e(n),{key:1})):r("",!0),d.value?(o(),u(e(d),{key:2,modelValue:e(b),"onUpdate:modelValue":s[0]||(s[0]=c=>$(b)?b.value=c:null)},null,8,["modelValue"])):r("",!0),e(k).info?(o(),u(ue,{key:3,modelValue:e(w),"onUpdate:modelValue":s[1]||(s[1]=c=>$(w)?w.value=c:null)},null,8,["modelValue"])):r("",!0),m(K)],64))}}),ce=v({__name:"PrintStyle",setup(p){function i(a,{slots:t}){if(t.default)return W("style",t.default())}return(a,t)=>(o(),u(i,null,{default:h(()=>[B(" @page { size: "+D(e(L))+"px "+D(e(T))+"px; margin: 0px; } ",1)]),_:1}))}}),me={key:0,class:"absolute top-0 left-0 right-0 bottom-0 pointer-events-none text-xl"},pe=v({__name:"PresenterMouse",setup(p){return(i,a)=>{const t=oe;return e(V).cursor?(o(),f("div",me,[m(t,{class:"absolute stroke-white dark:stroke-black",style:A({left:`${e(V).cursor.x}%`,top:`${e(V).cursor.y}%`,strokeWidth:16})},null,8,["style"])])):r("",!0)}}}),_e=l("div",{id:"twoslash-container"},null,-1),we=v({__name:"play",setup(p){const{next:i,prev:a,isPrintMode:t}=P(),{isDrawing:n}=ee(),d=H();function _(g){var x;S.value||g.button===0&&((x=g.target)==null?void 0:x.id)==="slide-container"&&(g.pageX/window.innerWidth>.5?i():a())}X(d),Y(),q();const s=E(()=>O.value||S.value),c=y();return(g,x)=>(o(),f(M,null,[e(t)?(o(),u(ce,{key:0})):r("",!0),l("div",{id:"page-root",ref_key:"root",ref:d,class:C(["grid",e(j)?"grid-rows-[1fr_max-content]":"grid-cols-[1fr_max-content]"])},[m(te,{style:{background:"var(--slidev-slide-container-background, black)"},width:e(t)?e(U).width.value:void 0,"is-main":"",onPointerdown:_,onContextmenu:e(Z)},{default:h(()=>[m(J,{"render-context":"slide"}),m(pe)]),controls:h(()=>[e(t)?r("",!0):(o(),f("div",{key:0,class:C(["absolute bottom-0 left-0 transition duration-300 opacity-0 hover:opacity-100",[s.value?"!opacity-100 right-0":"opacity-0 p-2",e(n)?"pointer-events-none":""]])},[m(Q,{persist:s.value},null,8,["persist"])],2))]),_:1},8,["width","onContextmenu"]),c.value&&e(S)?(o(),u(e(c),{key:0,resize:!0})):r("",!0)],2),e(t)?r("",!0):(o(),u(de,{key:1})),_e],64))}});export{we as default}; diff --git a/test/assets/slidev/presenter-CfIGrs6G.js b/test/assets/slidev/presenter-CfIGrs6G.js new file mode 100644 index 0000000..fb9b3a7 --- /dev/null +++ b/test/assets/slidev/presenter-CfIGrs6G.js @@ -0,0 +1 @@ +import{g as j,h as G,k as H,l as q}from"../modules/unplugin-icons-DLmkOyLZ.js";import{d as E,o,c,i as M,B as e,t as z,z as C,E as N,R as K,O,K as A,ah as J,a5 as Q,b as k,e as t,l as s,k as b,h as F,g as U,x as X,F as Y,p as Z,a as ee}from"../modules/vue-B03c_Ivc.js";import{a as te,u as se,h as oe,c as ne,d as ae,j as re,s as ie,k as le,l as ce,m as ue,n as de,o as _e,_ as pe}from"../index-Df4vEvvN.js";import{r as me,u as fe,a as xe,S as ve,_ as he,G as ke,b as be,c as ge,o as ye}from"./useWakeLock-CRYEXDUy.js";import{b as Ce,c as Se,a as B,S as we}from"./DrawingPreview.vue_vue_type_script_setup_true_lang-D58kc9wE.js";import{_ as $e,C as ze}from"./ClicksSlider-Bv3jj13O.js";import{_ as Ne}from"./DrawingControls.vue_vue_type_style_index_0_lang-BQZjIz1e.js";import{_ as I}from"./IconButton.vue_vue_type_script_setup_true_lang-ClhDPtQg.js";import"../modules/shiki-D6VyeOrD.js";import"./context-G025NcPA.js";const Fe=E({__name:"NoteStatic",props:{no:{},class:{},clicksContext:{}},setup(i){const l=i,{info:r}=Ce(l.no);return(u,m)=>{var f,x;return o(),c($e,{class:M(l.class),note:(f=e(r))==null?void 0:f.note,"note-html":(x=e(r))==null?void 0:x.noteHTML,"clicks-context":u.clicksContext},null,8,["class","note","note-html","clicks-context"])}}}),g=i=>(Z("data-v-aba0fb80"),i=i(),ee(),i),Be={class:"bg-main h-full slidev-presenter"},Ie=g(()=>t("div",{class:"absolute left-0 top-0 bg-main border-b border-r border-main px2 py1 op50 text-sm"}," Current ",-1)),Ee={class:"relative grid-section next flex flex-col p-2 lg:p-4"},Me={key:1,class:"h-full flex justify-center items-center"},Pe=g(()=>t("div",{class:"text-gray-500"}," End of the presentation ",-1)),Re=[Pe],De=g(()=>t("div",{class:"absolute left-0 top-0 bg-main border-b border-r border-main px2 py1 op50 text-sm"}," Next ",-1)),Te={key:0,class:"grid-section note of-auto"},Le={key:1,class:"grid-section note grid grid-rows-[1fr_min-content] overflow-hidden"},Ve={class:"border-t border-main py-1 px-2 text-sm"},We={class:"grid-section bottom flex"},je=g(()=>t("div",{"flex-auto":""},null,-1)),Ge={class:"text-2xl pl-2 pr-6 my-auto tabular-nums"},He={class:"progress-bar"},qe=E({__name:"presenter",setup(i){const l=z();me(),fe(l),xe();const{clicksContext:r,currentSlideNo:u,currentSlideRoute:m,hasNext:f,nextRoute:x,slides:P,getPrimaryClicks:R,total:D}=te(),{isDrawing:T}=Se();se({title:`Presenter - ${ie}`}),z(!1);const{timer:L,resetTimer:S}=oe(),V=C(()=>P.value.map(h=>ne(h))),n=C(()=>r.value.currentn.value&&V.value[n.value[0].no-1]);N(n,()=>{v.value&&n.value&&(v.value.current=n.value[1])},{immediate:!0});const w=K();return O(()=>{const h=l.value.querySelector("#slide-content"),d=A(J()),y=Q();N(()=>{if(!y.value||T.value||!re.value)return;const a=h.getBoundingClientRect(),_=(d.x-a.left)/a.width*100,p=(d.y-a.top)/a.height*100;if(!(_<0||_>100||p<0||p>100))return{x:_,y:p}},a=>{ae.cursor=a})}),(h,d)=>{var $;const y=j,a=G,_=H,p=q;return o(),k(Y,null,[t("div",Be,[t("div",{class:M(["grid-container",`layout${e(le)}`])},[t("div",{ref_key:"main",ref:l,class:"relative grid-section main flex flex-col"},[s(B,{key:"main",class:"p-2 lg:p-4 flex-auto","is-main":"",onContextmenu:e(ye)},{default:b(()=>[s(ve,{"render-context":"presenter"})]),_:1},8,["onContextmenu"]),(o(),c(ze,{key:($=e(m))==null?void 0:$.no,"clicks-context":e(R)(e(m)),class:"w-full pb2 px4 flex-none"},null,8,["clicks-context"])),Ie],512),t("div",Ee,[n.value&&v.value?(o(),c(B,{key:"next"},{default:b(()=>[(o(),c(we,{key:n.value[0].no,"clicks-context":v.value,route:n.value[0],"render-context":"previewNext"},null,8,["clicks-context","route"]))]),_:1})):(o(),k("div",Me,Re)),De]),w.value&&e(ce)?(o(),k("div",Te,[s(e(w))])):(o(),k("div",Le,[(o(),c(Fe,{key:`static-${e(u)}`,no:e(u),class:"w-full max-w-full h-full overflow-auto p-2 lg:p-4",style:F({fontSize:`${e(ue)}em`}),"clicks-context":e(r)},null,8,["no","style","clicks-context"])),t("div",Ve,[s(I,{title:"Increase font size",onClick:e(de)},{default:b(()=>[s(y)]),_:1},8,["onClick"]),s(I,{title:"Decrease font size",onClick:e(_e)},{default:b(()=>[s(a)]),_:1},8,["onClick"]),U("",!0)])])),t("div",We,[s(he,{persist:!0}),je,t("div",{class:"timer-btn my-auto relative w-22px h-22px cursor-pointer text-lg",opacity:"50 hover:100",onClick:d[2]||(d[2]=(...W)=>e(S)&&e(S)(...W))},[s(_,{class:"absolute"}),s(p,{class:"absolute opacity-0"})]),t("div",Ge,X(e(L)),1)]),(o(),c(Ne,{key:2}))],2),t("div",He,[t("div",{class:"progress h-3px bg-primary transition-all",style:F({width:`${(e(u)-1)/(e(D)-1)*100+1}%`})},null,4)])]),s(ke),s(be),s(ge)],64)}}}),tt=pe(qe,[["__scopeId","data-v-aba0fb80"]]);export{tt as default}; diff --git a/test/assets/slidev/useWakeLock-CRYEXDUy.js b/test/assets/slidev/useWakeLock-CRYEXDUy.js new file mode 100644 index 0000000..6b38225 --- /dev/null +++ b/test/assets/slidev/useWakeLock-CRYEXDUy.js @@ -0,0 +1,4 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/slidev/DrawingLayer-qn3yOZUe.js","assets/modules/vue-B03c_Ivc.js","assets/slidev/context-G025NcPA.js","assets/index-Df4vEvvN.js","assets/modules/shiki-D6VyeOrD.js","assets/modules/shiki-BPvBenZD.css","assets/index-CfcUbi7S.css","assets/slidev/DrawingPreview.vue_vue_type_script_setup_true_lang-D58kc9wE.js","assets/DrawingPreview-Cu20KZhX.css"])))=>i.map(i=>d[i]); +import{t as G,ak as mn,al as _n,z as N,am as V,an as re,U as yn,E as Te,ao as bn,R as xt,d as de,ab as Bt,o as f,b as w,e as I,x as ue,F as j,ag as De,i as Z,B as c,l as P,aa as Oe,ap as Wt,aj as Ct,c as R,g as $,a4 as Kt,f as $t,ai as xn,k as z,h as Re,aq as Ht,D as Qe,ar as wn,j as ze,as as Gt,N as kn,C as Sn,at as je,q as ye,s as be,m as Mn,au as Ge,av as Cn,ae as $n,aw as En,a5 as In,a3 as Pn}from"../modules/vue-B03c_Ivc.js";import{a as Me,F as Rn,G as ht,H as te,t as vt,I as Je,J as ke,K as wt,L as Yt,M as An,N as Nn,O as Ln,f as kt,l as rt,v as Se,P as Tn,_ as qe,Q as lt,R as Ye,S as ft,j as Be,y as Et,T as Le,i as On,b as It,k as Dn,U as Fn,D as Ee,c as Xt,C as Ut,p as Vn,V as Pt,W as zn,X as jn,q as Rt,z as At,A as Nt,w as Bn,Y as Lt}from"../index-Df4vEvvN.js";import{c as et,a as Wn,S as Qt,_ as Kn,G as Hn,d as Gn,u as Yn}from"./DrawingPreview.vue_vue_type_script_setup_true_lang-D58kc9wE.js";import{o as Jt,p as Zt,I as Xn,q as Un,r as Qn,f as qt,s as en,_ as tn,a as nn,i as sn,j as an,t as Jn,d as Zn,e as qn,n as es,u as ts,v as ns,w as ss,x as as,y as os,z as rs,c as ls}from"../modules/unplugin-icons-DLmkOyLZ.js";import{_ as Q}from"./IconButton.vue_vue_type_script_setup_true_lang-ClhDPtQg.js";import{u as is}from"./context-G025NcPA.js";import{t as cs}from"../modules/shiki-D6VyeOrD.js";function no(t){const{next:e,nextSlide:n,prev:a,prevSlide:r}=Me(),{isDrawing:s}=et(),o=G(0),{direction:i,distanceX:l,distanceY:d}=mn(t,{pointerTypes:["touch"],onSwipeStart(){s.value||(o.value=_n())},onSwipeEnd(){if(!o.value||s.value)return;const u=Math.abs(l.value),h=Math.abs(d.value);u/window.innerWidth>.3||u>75?i.value==="left"?e():a():(h/window.innerHeight>.4||h>200)&&(i.value==="down"?r():n())}})}const Xe=G(1),Ue=N(()=>Rn.value.length),Y=G(0),St=G(0);function us(){Y.value>Xe.value&&(Y.value-=1)}function ds(){Y.valueXe.value){let t=Y.value-St.value;tUe.value&&(t=Ue.value),Y.value=t}}const fs=[];function ps(){const{go:t,goFirst:e,goLast:n,next:a,nextSlide:r,prev:s,prevSlide:o}=Me(),{drawingEnabled:i}=et(),{escape:l,space:d,shift:u,left:h,right:p,up:_,down:b,enter:m,d:M,g:v,o:g,"`":D}=wt,K={next:a,prev:s,nextSlide:r,prevSlide:o,go:t,goFirst:e,goLast:n,downloadPDF:Yt,toggleDark:vt,toggleOverview:Je,toggleDrawing:()=>i.value=!i.value,escapeOverview:()=>te.value=!1,showGotoDialog:()=>ke.value=!ke.value},k=V(re(te),re(ht));let T=[{name:"next_space",key:V(d,re(u)),fn:a,autoRepeat:!0},{name:"prev_space",key:V(d,u),fn:s,autoRepeat:!0},{name:"next_right",key:V(p,re(u),k),fn:a,autoRepeat:!0},{name:"prev_left",key:V(h,re(u),k),fn:s,autoRepeat:!0},{name:"next_page_key",key:"pageDown",fn:a,autoRepeat:!0},{name:"prev_page_key",key:"pageUp",fn:s,autoRepeat:!0},{name:"next_down",key:V(b,k),fn:r,autoRepeat:!0},{name:"prev_up",key:V(_,k),fn:o,autoRepeat:!0},{name:"next_shift",key:V(p,u),fn:r,autoRepeat:!0},{name:"prev_shift",key:V(h,u),fn:o,autoRepeat:!0},{name:"toggle_dark",key:V(M,re(i)),fn:vt},{name:"toggle_overview",key:V(yn(g,D),re(i)),fn:Je},{name:"hide_overview",key:V(l,re(i)),fn:()=>te.value=!1},{name:"goto",key:V(v,re(i)),fn:()=>ke.value=!ke.value},{name:"next_overview",key:V(p,te),fn:ds},{name:"prev_overview",key:V(h,te),fn:us},{name:"up_overview",key:V(_,te),fn:hs},{name:"down_overview",key:V(b,te),fn:vs},{name:"goto_from_overview",key:V(m,te),fn:()=>{t(Y.value),te.value=!1}}];const C=new Set(T.map(L=>L.name));for(const L of fs){const he=L(K,T);T=T.concat(he)}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 on=V(re(Ln),re(Nn),An);function gs(t,e,n=!1){typeof t=="string"&&(t=wt[t]);const a=V(t,on);let r=0,s;const o=()=>{if(clearTimeout(s),!a.value){r=0;return}n&&(s=setTimeout(o,Math.max(1e3-r*250,150)),r++),e()};return Te(a,o,{flush:"sync"})}function ms(t,e){return bn(t,n=>{on.value&&(n.repeat||e())})}function so(){const t=ps();new Map(t.map(n=>[n.key,n])).forEach(n=>{n.fn&&gs(n.key,n.fn,n.autoRepeat)}),ms("f",()=>kt.toggle())}const _s=[];let it;const ys=()=>{if(it)return it;const{next:t,nextSlide:e,prev:n,prevSlide:a,hasNext:r,hasPrev:s,currentPage:o,total:i,isPresenter:l,enterPresenter:d,exitPresenter:u,isEmbedded:h,isPresenterAvailable:p}=Me(),{drawingEnabled:_}=et(),{isFullscreen:b,toggle:m}=kt;return it=_s.reduce((M,v)=>v(M),N(()=>[{small:!0,icon:Jt,label:"Previous Click",action:n,disabled:!s.value},{small:!0,icon:Zt,label:"Next Click",action:t,disabled:!r.value},{small:!0,icon:Xn,label:"Previous Slide",action:a,disabled:o.value<=1},{small:!0,icon:Un,label:"Next Slide",action:e,disabled:o.value>=i.value},"separator",{icon:Qn,label:rt.value?"Hide editor":"Show editor",action:()=>rt.value=!rt.value},{icon:qt,label:_.value?"Hide drawing toolbar":"Show drawing toolbar",action:()=>_.value=!_.value},{icon:en,label:"Show slide overview",action:Je},l.value&&{icon:tn,label:"Exit Presenter Mode",action:u},p.value&&{icon:nn,label:"Enter Presenter Mode",action:d},!h.value&&{icon:b.value?sn:an,label:b.value?"Close fullscreen":"Enter fullscreen",action:m}].filter(Boolean)))},Pe=xt(null);function bs(t,e){Pe.value={x:t,y:e,items:ys()}}function Ne(){Pe.value=null}function ao(t){if(Se.contextMenu!==!0&&Se.contextMenu!==void 0&&Se.contextMenu!==Tn||t.shiftKey||t.defaultPrevented)return;const{isEmbedded:e}=Me();e.value||(bs(t.pageX,t.pageY),t.preventDefault(),t.stopPropagation())}const xs={class:"select-list"},ws={class:"title"},ks={class:"items"},Ss=["onClick"],Ms=de({__name:"SelectList",props:{modelValue:{type:[Object,String,Number,Boolean]},title:{type:String},items:{type:Array}},setup(t,{emit:e}){const r=Bt(t,"modelValue",e,{passive:!0});return(s,o)=>{const i=Jn;return f(),w("div",xs,[I("div",ws,ue(t.title),1),I("div",ks,[(f(!0),w(j,null,De(t.items,l=>(f(),w("div",{key:l.value,class:Z(["item",{active:c(r)===l.value}]),onClick:()=>{var d;r.value=l.value,(d=l.onClick)==null||d.call(l)}},[P(i,{class:Z(["text-green-500",{"opacity-0":c(r)!==l.value}])},null,8,["class"]),Oe(" "+ue(l.display||l.value),1)],10,Ss))),128))])])}}}),Tt=qe(Ms,[["__scopeId","data-v-88eb4a10"]]),Cs={class:"text-sm select-none"},$s=de({__name:"Settings",setup(t){const e=[{display:"Fit",value:0},{display:"1:1",value:1}],{isSupported:n}=Wt(),a=[{display:"Enabled",value:!0},{display:"Disabled",value:!1}];return(r,s)=>(f(),w("div",Cs,[P(Tt,{modelValue:c(lt),"onUpdate:modelValue":s[0]||(s[0]=o=>Ct(lt)?lt.value=o:null),title:"Scale",items:e},null,8,["modelValue"]),c(n)?(f(),R(Tt,{key:0,modelValue:c(Ye),"onUpdate:modelValue":s[1]||(s[1]=o=>Ct(Ye)?Ye.value=o:null),title:"Wake lock",items:a},null,8,["modelValue"])):$("",!0)]))}}),Es={key:0,class:"rounded-md bg-main text-main shadow absolute bottom-10 left-0 z-20","dark:border":"~ main"},Is=de({__name:"MenuButton",props:{modelValue:{default:!1},disabled:{default:!1}},setup(t,{emit:e}){const r=Bt(t,"modelValue",e,{passive:!0}),s=G();return Kt(s,()=>{r.value=!1}),(o,i)=>(f(),w("div",{ref_key:"el",ref:s,class:"flex relative"},[I("button",{class:Z({disabled:t.disabled}),onClick:i[0]||(i[0]=l=>r.value=!c(r))},[$t(o.$slots,"button",{class:Z({disabled:t.disabled})})],2),(f(),R(xn,null,[c(r)?(f(),w("div",Es,[$t(o.$slots,"menu")])):$("",!0)],1024))],512))}}),Ps={},Rs={class:"w-1px opacity-10 bg-current m-1 lg:m-2"};function As(t,e){return f(),w("div",Rs)}const We=qe(Ps,[["render",As]]),Ns={render:()=>[]},Ls={class:"h-40px flex",p:"l-1 t-0.5 r-2",text:"sm leading-2"},Ts={class:"my-auto"},Os={class:"opacity-50"},oo=de({__name:"NavControls",props:{persist:{default:!1}},setup(t){const e=t,{currentSlideNo:n,hasNext:a,hasPrev:r,isEmbedded:s,isPresenter:o,isPresenterAvailable:i,next:l,prev:d,total:u,enterPresenter:h,exitPresenter:p}=Me(),{brush:_,drawingEnabled:b}=et(),m=ft.smaller("md"),{isFullscreen:M,toggle:v}=kt,g=G();function D(){g.value&&Le.value&&g.value.contains(Le.value)&&Le.value.blur()}const K=N(()=>e.persist?"text-$slidev-controls-foreground bg-transparent":"rounded-md bg-main shadow dark:border dark:border-main"),k=xt();return(T,C)=>{const H=sn,L=an,he=Jt,F=Zt,q=en,Fe=Zn,B=qn,ae=es,ve=ts,tt=qt,Ie=tn,nt=nn,st=ns,at=ss,ot=as,y=os;return f(),w("nav",{ref_key:"root",ref:g,class:"flex flex-col"},[I("div",{class:Z(["flex flex-wrap-reverse text-xl gap-0.5 p-1 lg:gap-1 lg:p-2",K.value]),onMouseleave:D},[c(s)?$("",!0):(f(),R(Q,{key:0,title:c(M)?"Close fullscreen":"Enter fullscreen",onClick:c(v)},{default:z(()=>[c(M)?(f(),R(H,{key:0})):(f(),R(L,{key:1}))]),_:1},8,["title","onClick"])),P(Q,{class:Z({disabled:!c(r)}),title:"Go to previous slide",onClick:c(d)},{default:z(()=>[P(he)]),_:1},8,["class","onClick"]),P(Q,{class:Z({disabled:!c(a)}),title:"Go to next slide",onClick:c(l)},{default:z(()=>[P(F)]),_:1},8,["class","onClick"]),c(s)?$("",!0):(f(),R(Q,{key:1,title:"Show slide overview",onClick:C[0]||(C[0]=A=>c(Je)())},{default:z(()=>[P(q)]),_:1})),c(On)?$("",!0):(f(),R(Q,{key:2,title:c(It)?"Switch to light mode theme":"Switch to dark mode theme",onClick:C[1]||(C[1]=A=>c(vt)())},{default:z(()=>[c(It)?(f(),R(Fe,{key:0})):(f(),R(B,{key:1}))]),_:1},8,["title"])),P(We),c(s)?$("",!0):(f(),w(j,{key:3},[!c(o)&&!c(m)&&k.value?(f(),w(j,{key:0},[P(c(k)),P(We)],64)):$("",!0),c(o)?(f(),R(Q,{key:1,title:c(Be)?"Hide presenter cursor":"Show presenter cursor",onClick:C[2]||(C[2]=A=>Be.value=!c(Be))},{default:z(()=>[c(Be)?(f(),R(ae,{key:0})):(f(),R(ve,{key:1}))]),_:1},8,["title"])):$("",!0)],64)),(!c(Se).drawings.presenterOnly||c(o))&&!c(s)?(f(),w(j,{key:4},[P(Q,{class:"relative",title:c(b)?"Hide drawing toolbar":"Show drawing toolbar",onClick:C[3]||(C[3]=A=>b.value=!c(b))},{default:z(()=>[P(tt),c(b)?(f(),w("div",{key:0,class:"absolute left-1 right-1 bottom-0 h-0.7 rounded-full",style:Re({background:c(_).color})},null,4)):$("",!0)]),_:1},8,["title"]),P(We)],64)):$("",!0),c(s)?$("",!0):(f(),w(j,{key:5},[c(o)?(f(),R(Q,{key:0,title:"Play Mode",onClick:c(p)},{default:z(()=>[P(Ie)]),_:1},8,["onClick"])):$("",!0),c(i)?(f(),R(Q,{key:1,title:"Presenter Mode",onClick:c(h)},{default:z(()=>[P(nt)]),_:1},8,["onClick"])):$("",!0),$("",!0),c(o)?(f(),R(Q,{key:3,title:"Toggle Presenter Layout",class:"aspect-ratio-initial",onClick:c(Fn)},{default:z(()=>[P(st),Oe(" "+ue(c(Dn)),1)]),_:1},8,["onClick"])):$("",!0)],64)),(f(),w(j,{key:6},[c(Se).download?(f(),R(Q,{key:0,title:"Download as PDF",onClick:c(Yt)},{default:z(()=>[P(at)]),_:1},8,["onClick"])):$("",!0)],64)),!c(o)&&c(Se).info&&!c(s)?(f(),R(Q,{key:7,title:"Show info",onClick:C[5]||(C[5]=A=>Et.value=!c(Et))},{default:z(()=>[P(ot)]),_:1})):$("",!0),!c(o)&&!c(s)?(f(),R(Is,{key:8},{button:z(()=>[P(Q,{title:"Adjust settings"},{default:z(()=>[P(y)]),_:1})]),menu:z(()=>[P($s)]),_:1})):$("",!0),c(s)?$("",!0):(f(),R(We,{key:9})),I("div",Ls,[I("div",Ts,[Oe(ue(c(n))+" ",1),I("span",Os,"/ "+ue(c(u)),1)])]),P(c(Ns))],34)],512)}}}),Ds=["onClick"],Fs={class:"text-green font-bold"},Vs={class:"opacity-50"},zs={key:1,class:"opacity-50"},js={key:0,class:"fixed top-4 right-4 z-20 text-gray-400 flex flex-col items-center gap-2"},ct=4*16*2,Ot=2*16,ro=de({__name:"QuickOverview",setup(t){const{currentSlideNo:e,go:n,slides:a}=Me();function r(){te.value=!1}function s(p){n(p),r()}function o(p){return p===Y.value}const i=ft.smaller("xs"),l=ft.smaller("sm"),d=N(()=>i.value?Ee.width.value-ct:l.value?(Ee.width.value-ct-Ot)/2:300),u=N(()=>Math.floor((Ee.width.value-ct)/(d.value+Ot))),h=G("");return Ht("keypress",p=>{if(!te.value){h.value="";return}if(p.key==="Enter"){p.preventDefault(),h.value?(s(+h.value),h.value=""):s(Y.value);return}const _=Number.parseInt(p.key.replace(/\D/g,""));if(Number.isNaN(_)){h.value="";return}if(!h.value&&_===0)return;if(h.value+=String(_),+h.value>=a.value.length){h.value="";return}const b=a.value.findIndex(m=>`/${m.no}`===h.value);b!==-1&&(Y.value=b+1),+h.value*10>a.value.length&&(s(+h.value),h.value="")}),Qe(()=>{Y.value=e.value,St.value=u.value}),(p,_)=>{const b=rs,m=ls;return f(),w(j,null,[P(wn,{"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:z(()=>[c(te)?(f(),w("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",onClick:r},[I("div",{class:"grid gap-y-4 gap-x-8 w-full",style:Re(`grid-template-columns: repeat(auto-fit,minmax(${d.value}px,1fr))`)},[(f(!0),w(j,null,De(c(a),(M,v)=>(f(),w("div",{key:M.no,class:"relative"},[I("div",{class:Z(["inline-block border rounded overflow-hidden bg-main hover:border-primary transition",o(v+1)||c(Y)===v+1?"border-primary":"border-main"]),onClick:g=>s(M.no)},[(f(),R(Wn,{key:M.no,width:d.value,class:"pointer-events-none"},{default:z(()=>[P(Qt,{"clicks-context":c(Xt)(M,c(Ut)),route:M,"render-context":"overview"},null,8,["clicks-context","route"]),P(Kn,{page:M.no},null,8,["page"])]),_:2},1032,["width"]))],10,Ds),I("div",{class:"absolute top-0",style:Re(`left: ${d.value+5}px`)},[h.value&&String(v+1).startsWith(h.value)?(f(),w(j,{key:0},[I("span",Fs,ue(h.value),1),I("span",Vs,ue(String(v+1).slice(h.value.length)),1)],64)):(f(),w("span",zs,ue(v+1),1))],4)]))),128))],4)])):$("",!0)]),_:1}),c(te)?(f(),w("div",js,[P(Q,{title:"Close",class:"text-2xl",onClick:r},{default:z(()=>[P(b)]),_:1}),(f(),R(Q,{key:0,as:"a",title:"Slides Overview",target:"_blank",href:`${c(Vn)}overview`,"tab-index":"-1",class:"text-2xl"},{default:z(()=>[P(m)]),_:1},8,["href"]))])):$("",!0)],64)}}});function xe(t){return Array.isArray?Array.isArray(t):cn(t)==="[object Array]"}const Bs=1/0;function Ws(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-Bs?"-0":e}function Ks(t){return t==null?"":Ws(t)}function ce(t){return typeof t=="string"}function rn(t){return typeof t=="number"}function Hs(t){return t===!0||t===!1||Gs(t)&&cn(t)=="[object Boolean]"}function ln(t){return typeof t=="object"}function Gs(t){return ln(t)&&t!==null}function ne(t){return t!=null}function ut(t){return!t.trim().length}function cn(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const Ys="Incorrect 'index' type",Xs=t=>`Invalid value for key ${t}`,Us=t=>`Pattern length exceeds max of ${t}.`,Qs=t=>`Missing ${t} property in key`,Js=t=>`Property 'weight' in key '${t}' must be a positive integer`,Dt=Object.prototype.hasOwnProperty;class Zs{constructor(e){this._keys=[],this._keyMap={};let n=0;e.forEach(a=>{let r=un(a);this._keys.push(r),this._keyMap[r.id]=r,n+=r.weight}),this._keys.forEach(a=>{a.weight/=n})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function un(t){let e=null,n=null,a=null,r=1,s=null;if(ce(t)||xe(t))a=t,e=Ft(t),n=pt(t);else{if(!Dt.call(t,"name"))throw new Error(Qs("name"));const o=t.name;if(a=o,Dt.call(t,"weight")&&(r=t.weight,r<=0))throw new Error(Js(o));e=Ft(o),n=pt(o),s=t.getFn}return{path:e,id:n,weight:r,src:a,getFn:s}}function Ft(t){return xe(t)?t:t.split(".")}function pt(t){return xe(t)?t.join("."):t}function qs(t,e){let n=[],a=!1;const r=(s,o,i)=>{if(ne(s))if(!o[i])n.push(s);else{let l=o[i];const d=s[l];if(!ne(d))return;if(i===o.length-1&&(ce(d)||rn(d)||Hs(d)))n.push(Ks(d));else if(xe(d)){a=!0;for(let u=0,h=d.length;ut.score===e.score?t.idx{this._keysMap[n.id]=a})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,ce(this.docs[0])?this.docs.forEach((e,n)=>{this._addString(e,n)}):this.docs.forEach((e,n)=>{this._addObject(e,n)}),this.norm.clear())}add(e){const n=this.size();ce(e)?this._addString(e,n):this._addObject(e,n)}removeAt(e){this.records.splice(e,1);for(let n=e,a=this.size();n{let o=r.getFn?r.getFn(e):this.getFn(e,r.path);if(ne(o)){if(xe(o)){let i=[];const l=[{nestedArrIndex:-1,value:o}];for(;l.length;){const{nestedArrIndex:d,value:u}=l.pop();if(ne(u))if(ce(u)&&!ut(u)){let h={v:u,i:d,n:this.norm.get(u)};i.push(h)}else xe(u)&&u.forEach((h,p)=>{l.push({nestedArrIndex:p,value:h})})}a.$[s]=i}else if(ce(o)&&!ut(o)){let i={v:o,n:this.norm.get(o)};a.$[s]=i}}}),this.records.push(a)}toJSON(){return{keys:this.keys,records:this.records}}}function dn(t,e,{getFn:n=x.getFn,fieldNormWeight:a=x.fieldNormWeight}={}){const r=new Mt({getFn:n,fieldNormWeight:a});return r.setKeys(t.map(un)),r.setSources(e),r.create(),r}function ra(t,{getFn:e=x.getFn,fieldNormWeight:n=x.fieldNormWeight}={}){const{keys:a,records:r}=t,s=new Mt({getFn:e,fieldNormWeight:n});return s.setKeys(a),s.setIndexRecords(r),s}function Ke(t,{errors:e=0,currentLocation:n=0,expectedLocation:a=0,distance:r=x.distance,ignoreLocation:s=x.ignoreLocation}={}){const o=e/t.length;if(s)return o;const i=Math.abs(a-n);return r?o+i/r:i?1:o}function la(t=[],e=x.minMatchCharLength){let n=[],a=-1,r=-1,s=0;for(let o=t.length;s=e&&n.push([a,r]),a=-1)}return t[s-1]&&s-a>=e&&n.push([a,s-1]),n}const $e=32;function ia(t,e,n,{location:a=x.location,distance:r=x.distance,threshold:s=x.threshold,findAllMatches:o=x.findAllMatches,minMatchCharLength:i=x.minMatchCharLength,includeMatches:l=x.includeMatches,ignoreLocation:d=x.ignoreLocation}={}){if(e.length>$e)throw new Error(Us($e));const u=e.length,h=t.length,p=Math.max(0,Math.min(a,h));let _=s,b=p;const m=i>1||l,M=m?Array(h):[];let v;for(;(v=t.indexOf(e,b))>-1;){let C=Ke(e,{currentLocation:v,expectedLocation:p,distance:r,ignoreLocation:d});if(_=Math.min(C,_),b=v+u,m){let H=0;for(;H=he;B-=1){let ae=B-1,ve=n[t.charAt(ae)];if(m&&(M[ae]=+!!ve),q[B]=(q[B+1]<<1|1)&ve,C&&(q[B]|=(g[B+1]|g[B])<<1|1|g[B+1]),q[B]&k&&(D=Ke(e,{errors:C,currentLocation:ae,expectedLocation:p,distance:r,ignoreLocation:d}),D<=_)){if(_=D,b=ae,b<=p)break;he=Math.max(1,2*p-b)}}if(Ke(e,{errors:C+1,currentLocation:p,expectedLocation:p,distance:r,ignoreLocation:d})>_)break;g=q}const T={isMatch:b>=0,score:Math.max(.001,D)};if(m){const C=la(M,i);C.length?l&&(T.indices=C):T.isMatch=!1}return T}function ca(t){let e={};for(let n=0,a=t.length;n{this.chunks.push({pattern:p,alphabet:ca(p),startIndex:_})},h=this.pattern.length;if(h>$e){let p=0;const _=h%$e,b=h-_;for(;p{const{isMatch:v,score:g,indices:D}=ia(e,b,m,{location:r+M,distance:s,threshold:o,findAllMatches:i,minMatchCharLength:l,includeMatches:a,ignoreLocation:d});v&&(p=!0),h+=g,v&&D&&(u=[...u,...D])});let _={isMatch:p,score:p?h/this.chunks.length:1};return p&&a&&(_.indices=u),_}}class Ce{constructor(e){this.pattern=e}static isMultiMatch(e){return Vt(e,this.multiRegex)}static isSingleMatch(e){return Vt(e,this.singleRegex)}search(){}}function Vt(t,e){const n=t.match(e);return n?n[1]:null}class ua extends Ce{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const n=e===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class da extends Ce{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const a=e.indexOf(this.pattern)===-1;return{isMatch:a,score:a?0:1,indices:[0,e.length-1]}}}class ha extends Ce{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const n=e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class va extends Ce{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const n=!e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class fa extends Ce{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const n=e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class pa extends Ce{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const n=!e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class vn extends Ce{constructor(e,{location:n=x.location,threshold:a=x.threshold,distance:r=x.distance,includeMatches:s=x.includeMatches,findAllMatches:o=x.findAllMatches,minMatchCharLength:i=x.minMatchCharLength,isCaseSensitive:l=x.isCaseSensitive,ignoreLocation:d=x.ignoreLocation}={}){super(e),this._bitapSearch=new hn(e,{location:n,threshold:a,distance:r,includeMatches:s,findAllMatches:o,minMatchCharLength:i,isCaseSensitive:l,ignoreLocation:d})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class fn extends Ce{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let n=0,a;const r=[],s=this.pattern.length;for(;(a=e.indexOf(this.pattern,n))>-1;)n=a+s,r.push([a,n-1]);const o=!!r.length;return{isMatch:o,score:o?0:1,indices:r}}}const gt=[ua,fn,ha,va,pa,fa,da,vn],zt=gt.length,ga=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,ma="|";function _a(t,e={}){return t.split(ma).map(n=>{let a=n.trim().split(ga).filter(s=>s&&!!s.trim()),r=[];for(let s=0,o=a.length;s!!(t[Ze.AND]||t[Ze.OR]),wa=t=>!!t[yt.PATH],ka=t=>!xe(t)&&ln(t)&&!bt(t),jt=t=>({[Ze.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function pn(t,e,{auto:n=!0}={}){const a=r=>{let s=Object.keys(r);const o=wa(r);if(!o&&s.length>1&&!bt(r))return a(jt(r));if(ka(r)){const l=o?r[yt.PATH]:s[0],d=o?r[yt.PATTERN]:r[l];if(!ce(d))throw new Error(Xs(l));const u={keyId:pt(l),pattern:d};return n&&(u.searcher=_t(d,e)),u}let i={children:[],operator:s[0]};return s.forEach(l=>{const d=r[l];xe(d)&&d.forEach(u=>{i.children.push(a(u))})}),i};return bt(t)||(t=jt(t)),a(t)}function Sa(t,{ignoreFieldNorm:e=x.ignoreFieldNorm}){t.forEach(n=>{let a=1;n.matches.forEach(({key:r,norm:s,score:o})=>{const i=r?r.weight:null;a*=Math.pow(o===0&&i?Number.EPSILON:o,(i||1)*(e?1:s))}),n.score=a})}function Ma(t,e){const n=t.matches;e.matches=[],ne(n)&&n.forEach(a=>{if(!ne(a.indices)||!a.indices.length)return;const{indices:r,value:s}=a;let o={indices:r,value:s};a.key&&(o.key=a.key.src),a.idx>-1&&(o.refIndex=a.idx),e.matches.push(o)})}function Ca(t,e){e.score=t.score}function $a(t,e,{includeMatches:n=x.includeMatches,includeScore:a=x.includeScore}={}){const r=[];return n&&r.push(Ma),a&&r.push(Ca),t.map(s=>{const{idx:o}=s,i={item:e[o],refIndex:o};return r.length&&r.forEach(l=>{l(s,i)}),i})}class Ae{constructor(e,n={},a){this.options={...x,...n},this.options.useExtendedSearch,this._keyStore=new Zs(this.options.keys),this.setCollection(e,a)}setCollection(e,n){if(this._docs=e,n&&!(n instanceof Mt))throw new Error(Ys);this._myIndex=n||dn(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){ne(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const n=[];for(let a=0,r=this._docs.length;a-1&&(l=l.slice(0,n)),$a(l,this._docs,{includeMatches:a,includeScore:r})}_searchStringList(e){const n=_t(e,this.options),{records:a}=this._myIndex,r=[];return a.forEach(({v:s,i:o,n:i})=>{if(!ne(s))return;const{isMatch:l,score:d,indices:u}=n.searchIn(s);l&&r.push({item:s,idx:o,matches:[{score:d,value:s,norm:i,indices:u}]})}),r}_searchLogical(e){const n=pn(e,this.options),a=(i,l,d)=>{if(!i.children){const{keyId:h,searcher:p}=i,_=this._findMatches({key:this._keyStore.get(h),value:this._myIndex.getValueForItemAtKeyId(l,h),searcher:p});return _&&_.length?[{idx:d,item:l,matches:_}]:[]}const u=[];for(let h=0,p=i.children.length;h{if(ne(i)){let d=a(n,i,l);d.length&&(s[l]||(s[l]={idx:l,item:i,matches:[]},o.push(s[l])),d.forEach(({matches:u})=>{s[l].matches.push(...u)}))}}),o}_searchObjectList(e){const n=_t(e,this.options),{keys:a,records:r}=this._myIndex,s=[];return r.forEach(({$:o,i})=>{if(!ne(o))return;let l=[];a.forEach((d,u)=>{l.push(...this._findMatches({key:d,value:o[u],searcher:n}))}),l.length&&s.push({idx:i,item:o,matches:l})}),s}_findMatches({key:e,value:n,searcher:a}){if(!ne(n))return[];let r=[];if(xe(n))n.forEach(({v:s,i:o,n:i})=>{if(!ne(s))return;const{isMatch:l,score:d,indices:u}=a.searchIn(s);l&&r.push({score:d,key:e,value:s,idx:o,norm:i,indices:u})});else{const{v:s,n:o}=n,{isMatch:i,score:l,indices:d}=a.searchIn(s);i&&r.push({score:l,key:e,value:s,norm:o,indices:d})}return r}}Ae.version="7.0.0";Ae.createIndex=dn;Ae.parseIndex=ra;Ae.config=x;Ae.parseQuery=pn;xa(ba);const Ea={key:0},Ia={key:1},Pa=de({__name:"title-renderer",props:{no:{}},setup(t){const e=t,{$page:n}=is(),a=N(()=>+(e.no??n.value));return(r,s)=>(f(),w("div",null,[a.value===1?(f(),w("p",Ea,"Welcome to Slidev")):a.value===2?(f(),w("p",Ia,"Imported Slides")):$("",!0)]))}}),Ra={class:"bg-main transform",shadow:"~",p:"x-4 y-2",border:"~ transparent rounded dark:main"},Aa=["value","disabled"],Na={table:"","w-full":"","border-collapse":""},La=["border","onClick"],Ta={"text-right":"",op50:"","text-sm":"","table-cell":"","py-2":"","pl-4":"","pr-3":"","vertical-middle":""},Oa=de({__name:"Goto",setup(t){const e=G(),n=G(),a=G(),r=G(),s=G(""),o=G(0),{go:i,slides:l}=Me();function d(k){return k!=null}const u=N(()=>new Ae(l.value.map(k=>{var T;return(T=k.meta)==null?void 0:T.slide}).filter(d),{keys:["no","title"],threshold:.3,shouldSort:!0,minMatchCharLength:1})),h=N(()=>s.value.startsWith("/")?s.value.substring(1):s.value),p=N(()=>u.value.search(h.value).map(k=>k.item)),_=N(()=>!!p.value.length);function b(){if(_.value){const k=p.value.at(o.value||0);k&&i(k.no)}m()}function m(){s.value="",ke.value=!1}function M(k){k.preventDefault(),o.value++,o.value>=p.value.length&&(o.value=0),g()}function v(k){k.preventDefault(),o.value--,o.value<=-2&&(o.value=p.value.length-1),g()}function g(){var T;const k=(T=r.value)==null?void 0:T[o.value];k&&a.value&&(k.offsetTop+k.offsetHeight>a.value.offsetHeight+a.value.scrollTop?a.value.scrollTo({behavior:"smooth",top:k.offsetTop+k.offsetHeight-a.value.offsetHeight+1}):k.offsetTop{var T;k?(s.value="",o.value=0,setTimeout(()=>{var C;return(C=n.value)==null?void 0:C.focus()},0)):(T=n.value)==null||T.blur()}),Te(Le,()=>{var k;(k=e.value)!=null&&k.contains(Le.value)||m()}),(k,T)=>(f(),w("div",{id:"slidev-goto-dialog",ref_key:"container",ref:e,class:Z(["fixed right-5 transition-all",c(ke)?"top-5":"-top-20"]),"w-90":"","max-w-90":"","min-w-90":""},[I("div",Ra,[I("input",{id:"slidev-goto-input",ref_key:"input",ref:n,value:s.value,type:"text",disabled:!c(ke),class:Z(["outline-none bg-transparent",{"text-red-400":!_.value&&s.value}]),placeholder:"Goto...",onKeydown:[ze(b,["enter"]),ze(m,["escape"]),ze(M,["down"]),ze(v,["up"])],onInput:D},null,42,Aa)]),p.value.length>0?(f(),w("div",{key:0,ref_key:"list",ref:a,class:"autocomplete-list",shadow:"~",border:"~ transparent rounded dark:main"},[I("ul",Na,[(f(!0),w(j,null,De(p.value,(C,H)=>(f(),w("li",{ref_for:!0,ref_key:"items",ref:r,key:C.id,role:"button",tabindex:"0","cursor-pointer":"",hover:"op100","table-row":"","items-center":"",border:H===0?void 0:"t main",class:Z(o.value===H?"bg-active op100":"op80"),onClick:Gt(L=>K(C.no),["stop","prevent"])},[I("div",Ta,ue(C.no),1),P(c(Pa),{"table-cell":"","py-2":"","pr-4":"","w-full":"",no:C.no},null,8,["no"])],10,La))),128))])],512)):$("",!0)],2))}}),lo=qe(Oa,[["__scopeId","data-v-c5c6e3c7"]]);function Da(){const t=kn(),e=G(!1);let n,a;const r=typeof document<"u"&&"startViewTransition"in document;return t.beforeResolve((s,o)=>{var m,M,v,g;const i=(m=Pt(o.params.no))==null?void 0:m.meta,l=(M=Pt(s.params.no))==null?void 0:M.meta,d=(v=i==null?void 0:i.slide)==null?void 0:v.no,u=(g=l==null?void 0:l.slide)==null?void 0:g.no;if((d!=null&&u!=null&&((d{n=D,a=K});let _;const b=new Promise(D=>_=D);return setTimeout(()=>{document.startViewTransition(()=>(_(),p))},50),b}),r&&t.afterEach(()=>{n==null||n(),a==null||a()}),e}const Fa=["data-drag-id"],oe=10,we=10,dt="absolute border border-gray bg-gray dark:border-gray-500 dark:bg-gray-800 bg-opacity-30 ",He=20,Va=de({__name:"DragControl",props:{data:{}},setup(t){const{data:e}=t,{dragId:n,zoom:a,autoHeight:r,x0:s,y0:o,width:i,height:l,rotate:d,isArrow:u}=e,h=Sn(zn,G(1)),p=N(()=>h.value*a.value),{left:_,top:b}=jn(),m=u?Number.NEGATIVE_INFINITY:40,M=N(()=>d.value*Math.PI/180),v=N(()=>Math.sin(M.value)),g=N(()=>Math.cos(M.value)),D=N(()=>i.value*g.value+l.value*v.value),K=N(()=>i.value*v.value+l.value*g.value),k=N(()=>s.value-D.value/2),T=N(()=>o.value-K.value/2),C=N(()=>s.value+D.value/2),H=N(()=>o.value+K.value/2),L=N(()=>u&&i.value<0),he=N(()=>u&&l.value<0);let F=null;function q(y){if(y.buttons!==1)return;y.preventDefault(),y.stopPropagation();const O=y.target.getBoundingClientRect(),S=i.value*g.value-l.value*v.value,E=i.value*v.value+l.value*g.value,X=i.value*g.value+l.value*v.value,se=-i.value*v.value+l.value*g.value;F={x0:s.value,y0:o.value,width:i.value,height:l.value,rotate:d.value,dx0:y.clientX-(O.left+O.right)/2,dy0:y.clientY-(O.top+O.bottom)/2,ltx:s.value-S/2,lty:o.value-E/2,rtx:s.value+X/2,rty:o.value-se/2,lbx:s.value-X/2,lby:o.value+se/2,rbx:s.value+S/2,rby:o.value+E/2},y.currentTarget.setPointerCapture(y.pointerId)}function Fe(y){if(!F||y.buttons!==1)return;y.preventDefault(),y.stopPropagation();const A=(y.clientX-_.value-F.dx0)/p.value,O=(y.clientY-b.value-F.dy0)/p.value;s.value=Rt(A,-D.value/2+we,At.value+D.value/2-we),o.value=Rt(O,-K.value/2+we,Nt.value+K.value/2-we)}function B(y){F&&(y.preventDefault(),y.stopPropagation(),F=null)}function ae(y,A){return{onPointerdown:q,onPointermove:O=>{if(!F||O.buttons!==1)return;O.preventDefault(),O.stopPropagation();let S=(O.clientX-_.value)/p.value,E=(O.clientY-b.value)/p.value;const{ltx:X,lty:se,rtx:fe,rty:pe,lbx:ge,lby:me,rbx:_e,rby:W}=F,U=F.width/F.height,gn=Math.max(m,m*U);function Ve(le,ie){if(O.shiftKey){const J=Math.max(le,ie*U,gn),ee=J/U;return{w:J,h:ee}}else return{w:Math.max(le,m),h:Math.max(ie,m)}}if(y)if(A){const le=(_e-S)*g.value+(W-E)*v.value,ie=-(_e-S)*v.value+(W-E)*g.value,{w:J,h:ee}=Ve(le,ie);S=_e-J*g.value+ee*v.value,E=W-J*v.value-ee*g.value}else{const le=(fe-S)*g.value-(E-pe)*v.value,ie=(fe-S)*v.value+(E-pe)*g.value,{w:J,h:ee}=Ve(le,ie);S=fe-J*g.value-ee*v.value,E=pe-J*v.value+ee*g.value}else if(A){const le=(S-ge)*g.value-(me-E)*v.value,ie=(S-ge)*v.value+(me-E)*g.value,{w:J,h:ee}=Ve(le,ie);S=ge+J*g.value+ee*v.value,E=me+J*v.value-ee*g.value}else{const le=(S-X)*g.value+(E-se)*v.value,ie=-(S-X)*v.value+(E-se)*g.value,{w:J,h:ee}=Ve(le,ie);S=X+J*g.value-ee*v.value,E=se+J*v.value+ee*g.value}y?A?(s.value=(S+_e)/2,o.value=(E+W)/2,i.value=(_e-S)*g.value+(W-E)*v.value,l.value=-(_e-S)*v.value+(W-E)*g.value):(s.value=(S+fe)/2,o.value=(E+pe)/2,i.value=(fe-S)*g.value-(E-pe)*v.value,l.value=(fe-S)*v.value+(E-pe)*g.value):A?(s.value=(S+ge)/2,o.value=(E+me)/2,i.value=(S-ge)*g.value-(me-E)*v.value,l.value=(S-ge)*v.value+(me-E)*g.value):(s.value=(S+X)/2,o.value=(E+se)/2,i.value=(S-X)*g.value+(E-se)*v.value,l.value=-(S-X)*v.value+(E-se)*g.value)},onPointerup:B,style:{width:`${oe}px`,height:`${oe}px`,margin:`-${oe/2}px`,left:y!==L.value?"0":void 0,right:y!==L.value?void 0:"0",top:A!==he.value?"0":void 0,bottom:A!==he.value?void 0:"0",cursor:u?"move":+y+ +A==1?"nesw-resize":"nwse-resize",borderRadius:u?"50%":void 0},class:dt}}function ve(y){return{onPointerdown:q,onPointermove:A=>{if(!F||A.buttons!==1)return;A.preventDefault(),A.stopPropagation();const O=(A.clientX-_.value)/p.value,S=(A.clientY-b.value)/p.value,{ltx:E,lty:X,rtx:se,rty:fe,lbx:pe,lby:ge,rbx:me,rby:_e}=F;if(y==="l"){const W=(se+me)/2,U=(fe+_e)/2;i.value=Math.max((W-O)*g.value+(U-S)*v.value,m),s.value=W-i.value*g.value/2,o.value=U-i.value*v.value/2}else if(y==="r"){const W=(E+pe)/2,U=(X+ge)/2;i.value=Math.max((O-W)*g.value+(S-U)*v.value,m),s.value=W+i.value*g.value/2,o.value=U+i.value*v.value/2}else if(y==="t"){const W=(pe+me)/2,U=(ge+_e)/2;l.value=Math.max((U-S)*g.value-(W-O)*v.value,m),s.value=W+l.value*v.value/2,o.value=U-l.value*g.value/2}else if(y==="b"){const W=(E+se)/2,U=(X+fe)/2;l.value=Math.max((S-U)*g.value-(O-W)*v.value,m),s.value=W-l.value*v.value/2,o.value=U+l.value*g.value/2}},onPointerup:B,style:{width:`${oe}px`,height:`${oe}px`,margin:`-${oe/2}px`,left:y==="l"?"0":y==="r"?"100%":"50%",top:y==="t"?"0":y==="b"?"100%":"50%",cursor:"lr".includes(y)?"ew-resize":"ns-resize",borderRadius:"50%"},class:dt}}function tt(){return{onPointerdown:q,onPointermove:y=>{if(!F||y.buttons!==1)return;y.preventDefault(),y.stopPropagation();const A=(y.clientX-_.value-F.dx0)/p.value-oe/4,O=(y.clientY-b.value-F.dy0)/p.value-oe/4;let S=Math.atan2(O-o.value,A-s.value)*180/Math.PI+90;const E=[0,90,180,270,360];for(const X of E)if(Math.abs(S-X)<5){S=X%360;break}d.value=S},onPointerup:B,style:{width:`${oe}px`,height:`${oe}px`,margin:`-${oe/2}px`,left:"50%",top:"-20px",cursor:"grab",borderRadius:"50%"},class:dt}}const Ie={immediate:!1,immediateCallback:!1},nt=je(()=>{C.value<=we||s.value--},He,Ie),st=je(()=>{k.value>=At.value-we||s.value++},He,Ie),at=je(()=>{H.value<=we||o.value--},He,Ie),ot=je(()=>{T.value>=Nt.value-we||o.value++},He,Ie);return Qe(()=>{function y(A,O){wt[A].value?O.resume():O.pause()}y("left",nt),y("right",st),y("up",at),y("down",ot)}),(y,A)=>Number.isFinite(c(s))?(f(),w("div",{key:0,id:"drag-control-container","data-drag-id":c(n),style:Re({position:"absolute",zIndex:100,left:`${c(a)*(c(s)-Math.abs(c(i))/2)}px`,top:`${c(a)*(c(o)-Math.abs(c(l))/2)}px`,width:`${c(a)*Math.abs(c(i))}px`,height:`${c(a)*Math.abs(c(l))}px`,transformOrigin:"center center",transform:`rotate(${c(d)}deg)`}),onPointerdown:q,onPointermove:Fe,onPointerup:B},[I("div",{class:Z(["absolute inset-0 z-100 dark:b-gray-400",c(u)?"":"b b-dark"])},[c(r)?$("",!0):(f(),w(j,{key:0},[I("div",ye(be(ae(!0,!0))),null,16),I("div",ye(be(ae(!1,!1))),null,16),c(u)?$("",!0):(f(),w(j,{key:0},[I("div",ye(be(ae(!0,!1))),null,16),I("div",ye(be(ae(!1,!0))),null,16)],64))],64)),c(u)?$("",!0):(f(),w(j,{key:1},[I("div",ye(be(ve("l"))),null,16),I("div",ye(be(ve("r"))),null,16),c(r)?$("",!0):(f(),w(j,{key:0},[I("div",ye(be(ve("t"))),null,16),I("div",ye(be(ve("b"))),null,16)],64)),I("div",ye(be(tt())),null,16),I("div",{class:"absolute -top-15px w-0 b b-dashed b-dark dark:b-gray-400",style:Re({left:"calc(50% - 1px)",height:c(r)?"14px":"10px"})},null,4)],64))],2)],44,Fa)):$("",!0)}}),za=de({__name:"SlidesShow",props:{renderContext:{}},setup(t){const{currentSlideRoute:e,currentTransition:n,getPrimaryClicks:a,prevRoute:r,nextRoute:s,slides:o,isPrintMode:i,isPrintWithClicks:l,clicksDirection:d}=Me();function u(m){m.meta.preload!==!1&&(m.meta.__preloaded=!0,m.load())}Qe(()=>{u(e.value),u(r.value),u(s.value)}),Qe(m=>{const M=o.value,v=setTimeout(()=>{M.forEach(u)},3e3);m(()=>clearTimeout(v))});const h=Da(),p=xt();Bn(()=>import("./DrawingLayer-qn3yOZUe.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(m=>p.value=m.default);const _=N(()=>o.value.filter(m=>{var M;return((M=m.meta)==null?void 0:M.__preloaded)||m===e.value}));function b(){Lt.value=!0,cs()}return(m,M)=>(f(),w(j,null,[P(c(Hn)),(f(),R(Ge(c(h)?"div":Cn),Mn(c(Lt)?{}:c(n),{id:"slideshow",tag:"div",class:{"slidev-nav-go-forward":c(d)>0,"slidev-nav-go-backward":c(d)<0},onAfterLeave:b}),{default:z(()=>[(f(!0),w(j,null,De(_.value,v=>(f(),w(j,{key:v.no},[Math.abs(v.no-c(e).no)<=20?$n((f(),R(Qt,{key:0,"clicks-context":c(i)&&!c(l)?c(Xt)(v,c(Ut)):c(a)(v),route:v,"render-context":m.renderContext},null,8,["clicks-context","route","render-context"])),[[En,v===c(e)]]):$("",!0)],64))),128))]),_:1},16,["class"])),c(ht)?(f(),R(Va,{key:0,data:c(ht)},null,8,["data"])):$("",!0),P(c(Gn)),p.value?(f(),R(c(p),{key:1})):$("",!0)],64))}}),io=qe(za,[["__scopeId","data-v-a5297e9b"]]),ja=["title","onClick"],Ba=["onClick"],Wa={class:"mx-auto"},Ka={key:0},Ha=I("div",{class:"w-full my1 border-t border-main"},null,-1),Ga={class:"w-full text-xs p2"},Ya={class:"text-main text-opacity-50!"},Xa=I("kbd",{class:"border px1 py0.5 border-main rounded text-primary"},"Shift",-1),co=de({__name:"ContextMenu",setup(t){const e=G();Kt(e,Ne),Ht(document,"mousedown",l=>{l.buttons&2&&Ne()},{passive:!0,capture:!0});const n=N(()=>Se.contextMenu!=null),a=In();Te(a,l=>{l||Ne()}),Yn(1);const{width:r,height:s}=Pn(e),o=N(()=>{var d;const l=(d=Pe.value)==null?void 0:d.x;return l?l+r.value>Ee.width.value?Ee.width.value-r.value:l:0}),i=N(()=>{var d;const l=(d=Pe.value)==null?void 0:d.y;return l?l+s.value>Ee.height.value?Ee.height.value-s.value:l:0});return(l,d)=>c(Pe)?(f(),w("div",{key:0,ref_key:"container",ref:e,style:Re(`left:${o.value}px;top:${i.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]=(...u)=>c(Ne)&&c(Ne)(...u))},[(f(!0),w(j,null,De(c(Pe).items.value,(u,h)=>(f(),w(j,{key:h},[u==="separator"?(f(),w("div",{key:h,class:"w-full my1 border-t border-main"})):u.small?(f(),w("div",{key:1,class:Z(["p-2 w-[40px] h-[40px] inline-block text-center cursor-pointer rounded",u.disabled?"op40":"hover:bg-active"]),title:u.label,onClick:u.action},[(f(),R(Ge(u.icon)))],10,ja)):(f(),w("div",{key:2,class:Z(["w-full grid grid-cols-[35px_1fr] p-2 pl-0 cursor-pointer rounded",u.disabled?"op40":"hover:bg-active"]),onClick:u.action},[I("div",Wa,[(f(),R(Ge(u.icon)))]),typeof u.label=="string"?(f(),w("div",Ka,ue(u.label),1)):(f(),R(Ge(u.label),{key:1}))],10,Ba))],64))),128)),n.value?$("",!0):(f(),w(j,{key:0},[Ha,I("div",Ga,[I("div",Ya,[Oe(" Hold "),Xa,Oe(" and right click to open the native context menu "),$("",!0)])])],64))],36)):$("",!0)}});function uo(){const{request:t,release:e}=Wt();Te(Ye,n=>{n?t("screen"):e()},{immediate:!0})}export{lo as G,io as S,We as V,oo as _,uo as a,ro as b,co as c,ao as o,so as r,no as u}; diff --git a/test/index.html b/test/index.html index 3424210..725193d 100644 --- a/test/index.html +++ b/test/index.html @@ -7,11 +7,11 @@ Welcome to Slidev - Slidev - - - - - + + + + +