From febe8bae35ede7692ec2e7fea767c1ed941722e8 Mon Sep 17 00:00:00 2001 From: Martino Date: Wed, 9 Oct 2024 19:29:16 +0200 Subject: [PATCH] Dependency fix --- demo/plugin/appearance/appearance.esm.js | 2 +- demo/plugin/appearance/appearance.esm.js.map | 2 +- demo/plugin/appearance/appearance.js | 2 +- demo/plugin/appearance/appearance.js.map | 2 +- package-lock.json | 243 ++++++++++--------- 5 files changed, 132 insertions(+), 119 deletions(-) diff --git a/demo/plugin/appearance/appearance.esm.js b/demo/plugin/appearance/appearance.esm.js index a1808b6..ef51eed 100644 --- a/demo/plugin/appearance/appearance.esm.js +++ b/demo/plugin/appearance/appearance.esm.js @@ -12,5 +12,5 @@ * Copyright (C) 2023 Martijn De Jongh (Martino) * ******************************************************************/ -const e=e=>e&&"object"==typeof e&&!Array.isArray(e),t=(a,...s)=>{if(!s.length)return a;const n=s.shift();if(e(a)&&e(n))for(const s in n)e(n[s])?(a[s]||Object.assign(a,{[s]:{}}),t(a[s],n[s])):Object.assign(a,{[s]:n[s]});return t(a,...s)},a=e=>{let t="";return"string"==typeof e&&(e=e.replace(/[“”]/g,'"').replace(/[‘’]/g,"'")),t=(e=>{try{return JSON.parse(e)&&!!e}catch(e){return!1}})(e)?e:"object"==typeof e?JSON.stringify(e,null,2):"{"===e.trim().replace(/'/g,'"').charAt(0)?e.trim().replace(/'/g,'"'):`{${e.trim().replace(/'/g,'"')}}`,t},s=(e,t,a)=>{let s,n=document.querySelector("head"),r=!1;if("script"===t?document.querySelector(`script[src="${e}"]`)?r=!0:(s=document.createElement("script"),s.type="text/javascript",s.src=e):"stylesheet"===t&&(document.querySelector(`link[href="${e}"]`)?r=!0:(s=document.createElement("link"),s.rel="stylesheet",s.href=e)),!r){const e=()=>{"function"==typeof a&&(a.call(),a=null)};s.onload=e,s.onreadystatechange=function(){"loaded"===this.readyState&&e()},n.appendChild(s)}},n=(e,t)=>{e.debug&&console.log(t)},r=(e,t)=>{let a=(e=>{let t,a=document.querySelector(`script[src$="${e}"]`);return t=a?a.getAttribute("src").slice(0,-1*e.length):import.meta.url.slice(0,import.meta.url.lastIndexOf("/")+1),t})(t),n=t.replace(/\.[^/.]+$/,"");if(e.cssautoload){let t=e.csspath.appearance?e.csspath.appearance:`${a}${n}.css`||`plugin/${n}/${n}.css`,r=e.compatibility?e.animatecsspath.compat:e.animatecsspath.link;e.debug&&(console.log("Paths:"),console.log(` - Plugin path = ${a}`),console.log(` - Appearance CSS path = ${t}`),console.log(` - AnimateCSS CSS path = ${r}`)),s(r,"stylesheet",(function(){s(t,"stylesheet")}))}},i=(e,t)=>{let a=e.parentNode;if(a){for(const t of a.children)if(t!==e&&t.dataset.appearParent)return;a.classList=e.classList,(({attributes:e},t,a)=>{[...e].filter((({nodeName:e})=>e.includes("data"))).forEach((({nodeName:e,nodeValue:s})=>{(a&&e!==a||!a)&&t.setAttribute(e,s)}))})(e,a,"data-appear-parent"),a.innerHTML=e.innerHTML,a.classList.add(t)}},l=(e,t,a)=>Array.from(a.querySelectorAll(`.${e}`)).filter((e=>!e.closest(`.${t}`))),o=(e,t,a)=>{const s=[l(t,a,e),...Array.from(e.querySelectorAll(`.${a}`)).map((e=>((e,t,a)=>Array.from(a.querySelectorAll(`.${e}`)).filter((e=>e.closest(`.${t}`)===a)))(t,a,e)))];return!!s.some((e=>e.length>0))&&s},c=(e,t)=>{t.hideagain&&e.from&&e.from.dataset.appearanceCanStart&&e.from.removeAttribute("data-appearance-can-start")},d=(e,t,a)=>{if(t.hideagain&&e&&e.from){let t=e.from.querySelectorAll(a.animatecss);t&&t.forEach((e=>{e.classList.remove("animationended")}));let s=e.from.querySelectorAll(".fragment.visible");s&&s.forEach((e=>{e.classList.remove("visible")}))}},p=()=>{const e={names:{}};let s={};const l=(e,t,s)=>{n(e,"------------- Preloading -------------");let l=t.names;r(e,l.es5Filename),e.compatibility&&(l.animatecss=".backInDown, .backInLeft, .backInRight, .backInUp, .bounceIn, .bounceInDown, .bounceInLeft, .bounceInRight, .bounceInUp, .fadeIn, .fadeInDown, .fadeInDownBig, .fadeInLeft, .fadeInLeftBig, .fadeInRight, .fadeInRightBig, .fadeInUp, .fadeInUpBig, .fadeInTopLeft, .fadeInTopRight, .fadeInBottomLeft, .fadeInBottomRight, .flipInX, .flipInY, .lightSpeedInRight, .lightSpeedInLeft, .rotateIn, .rotateInDownLeft, .rotateInDownRight, .rotateInUpLeft, .rotateInUpRight, .jackInTheBox, .rollIn, .zoomIn, .zoomInDown, .zoomInLeft, .zoomInRight, .zoomInUp, .slideInDown, .slideInLeft, .slideInRight, .slideInUp, .skidLeft, .skidLeftBig, .skidRight, .skidRightBig, .shrinkIn, .shrinkInBlur",l.baseclass=e.compatibilitybaseclass),t.appearances=Array.from(t.slides.querySelectorAll(l.animatecss)),t.regularSections.forEach((s=>((e,t,s)=>{let n=null;if(e.hasAttribute("data-autoappear")){let a=e.dataset.autoappear;n="auto"==a||""==a||a.length<1||"true"==a?t.autoelements?t.autoelements:null:a}else t.autoappear&&t.autoelements&&(n=t.autoelements);if(n){let t=JSON.parse(a(n));Object.entries(t).forEach((([t,a])=>{let n=Array.from(e.querySelectorAll(t)).filter((e=>!s.appearances.includes(e)));n.length&&n.forEach((e=>{s.appearances.push(e);let t=[],n=null,r=!1,i=null,l=null;Array.isArray(a)?(t=a[0].split(/[ ,]+/),n=a[1]):"string"==typeof a?t=a.split(/[ ,]+/):a.constructor===Object&&((a.class||a.animation)&&(t=(a.animation?a.animation:a.class).split(/[ ,]+/)),a.speed&&(r=String(a.speed),r.includes("animate__")||(r=`animate__${r}`)),a.delay&&(n=String(a.delay)),a.split&&(i=String(a.split)),a["container-delay"]&&(l=String(a["container-delay"]))),e.classList.add(...t),r&&e.classList.add(r),n&&(e.dataset.delay||(e.dataset.delay=n)),i&&(e.dataset.split=i),l&&(e.dataset.containerDelay=l)}))}))}})(s,e,t))),t.appearances.forEach(((t,a)=>{((e,t,a)=>{let s=a.baseclass;e.hasAttribute("data-appear-parent")&&i(e,s),t.appearparents&&e.parentNode&&e.parentNode.tagName&&"SPAN"==e.tagName&&"LI"==e.parentNode.tagName&&String(e.outerHTML).length==String(e.parentNode.innerHTML).length&&i(e)})(t,e,l),((e,t)=>{e.classList.contains(t.baseclass)||e.classList.add(t.baseclass),e.classList.contains(t.fragmentClass)&&e.classList.add("custom")})(t,l),t.hasAttribute("data-split")&&((e,t)=>{let a=!1,s=" ";if("words"==t?a=e.textContent.trim().split(/\s+/):"letters"==t&&(a=e.textContent.trim().split(""),s=""),a){const t=Array.from(e.classList).filter((e=>e.startsWith("animate__"))),n=a.map(((t,a)=>{const s=document.createElement("span");return s.textContent=t," "==t&&(s.textContent=" "),e.dataset.delay&&0!==a&&(s.dataset.delay=e.dataset.delay),e.dataset.containerDelay&&0===a&&(s.dataset.delay=e.dataset.containerDelay),e.classList.add("wordchargroup"),e.classList.forEach((e=>e.startsWith("animate__")&&s.classList.add(e))),s.outerHTML})).join(s);t.forEach((t=>e.classList.remove(t))),e.removeAttribute("data-delay"),e.removeAttribute("data-split"),e.removeAttribute("data-container-delay"),e.innerHTML=n}})(t,t.dataset.split)})),t.regularSections.forEach(((t,a)=>{let s=o(t,l.baseclass,l.fragmentClass);s&&s.forEach((t=>{((e,t,a)=>{let s=0;e.forEach(((e,a)=>{if(0==a&&e.dataset.delay||0!=a){let a=t.delay;e.dataset&&e.dataset.delay&&(a=parseInt(e.dataset.delay)),s+=a,e.style.setProperty("animation-delay",s+"ms"),e.removeAttribute("data-delay")}}))})(t,e)}))})),(e=>{setTimeout(e,0)})(s)},p=(t,a,s)=>{let r=e.names;return r.baseclass=a.baseclass,r.compatibilitybaseclass=a.compatibilitybaseclass,r.fragmentSelector=".fragment",r.fragmentClass="fragment",r.speedClasses=["slower","slow","fast","faster"],r.speedClasses.push(...r.speedClasses.map((e=>`animate__${e}`))),r.animatecss='[class^="animate__"],[class*=" animate__"]',r.es5Filename=s,r.eventnames=["ready","slidechanged","slidetransitionend","autoanimate","overviewhidden"],e.deck=t,e.dom=t.getRevealElement(),e.viewport=t.getViewportElement(),e.slides=t.getSlidesElement(),e.sections=e.slides.querySelectorAll("section"),e.fragments=e.slides.querySelectorAll(r.fragmentSelector),e.regularSections=Array.from(e.sections).filter((e=>!(({childNodes:e})=>{let t=!1;for(let a=0;at.on(s,(t=>{((e,t,a,s)=>{s.deck.getConfig().view;let n=s.viewport.classList.contains("reveal-scroll"),r=e.type,i=(e=>{let t={};return t.from=e.fromSlide||e.previousSlide||null,t.to=e.toSlide||e.currentSlide||null,t})(e);if(i.to){"ready"==r&&(i.to.dataset.appearanceCanStart=!0);let s=((e,t)=>(e.dataset.appearevent&&"auto"===e.dataset.appearevent&&(e.dataset.appearevent="autoanimate"),"auto"==t.appearevent&&(t.appearevent="autoanimate"),e.dataset.appearevent?e.dataset.appearevent:t.appearevent))(i.to,t);(r==s||"slidetransitionend"==r&&"autoanimate"==s)&&(i.to.dataset.appearanceCanStart=!0),n&&"slidechanged"==r&&(c(i,t),d(i,t,a),setTimeout((()=>{i.to.dataset.appearanceCanStart=!0}),t.delay)),"slidetransitionend"==r&&(c(i,t),d(i,t,a)),"slidechanged"==r&&document.body.dataset.exitoverview?(c(i,t),i.to.dataset.appearanceCanStart=!0):"overviewhidden"==r&&(document.body.dataset.exitoverview=!0,setTimeout((()=>{document.body.removeAttribute("data-exitoverview")}),500),e.currentSlide&&(c(i,t),i.to.dataset.appearanceCanStart=!0))}})(t,a,r,e)})))),e.viewport.addEventListener("animationend",(e=>{e.target.classList.add("animationended")})),e.viewport.addEventListener("fragmenthidden",(e=>{e.fragment.classList.remove("animationended"),e.fragment.querySelectorAll(".animationended").forEach((e=>{e.classList.remove("animationended")}))})),new Promise((t=>{l(a,e,t),n(a,"---------- Done preloading ----------")}))};return{id:"appearance",init:e=>(s=t({baseclass:"animate__animated",hideagain:!0,delay:300,debug:!1,appearevent:"slidetransitionend",autoappear:!1,autoelements:!1,appearparents:!1,cssautoload:!0,csspath:"",animatecsspath:{link:"https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css",compat:"https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.compat.css"},compatibility:!1,compatibilitybaseclass:"animated"},e.getConfig().appearance||{}),p(e,s,"appearance.js"))}};export{p as default}; +const e=e=>e&&"object"==typeof e&&!Array.isArray(e),t=(a,...s)=>{if(!s.length)return a;const n=s.shift();if(e(a)&&e(n))for(const s in n)e(n[s])?(a[s]||Object.assign(a,{[s]:{}}),t(a[s],n[s])):Object.assign(a,{[s]:n[s]});return t(a,...s)},a=e=>{let t="";return"string"==typeof e&&(e=e.replace(/[“”]/g,'"').replace(/[‘’]/g,"'")),t=(e=>{try{return JSON.parse(e)&&!!e}catch(e){return!1}})(e)?e:"object"==typeof e?JSON.stringify(e,null,2):"{"===e.trim().replace(/'/g,'"').charAt(0)?e.trim().replace(/'/g,'"'):`{${e.trim().replace(/'/g,'"')}}`,t},s=(e,t,a)=>{let s,n=document.querySelector("head"),r=!1;if(document.querySelector(`link[href="${e}"]`)?r=!0:(s=document.createElement("link"),s.rel="stylesheet",s.href=e),!r){const e=()=>{"function"==typeof a&&(a.call(),a=null)};s.onload=e,s.onreadystatechange=function(){"loaded"===this.readyState&&e()},n.appendChild(s)}},n=(e,t)=>{e.debug&&console.log(t)},r=(e,t)=>{let a=(e=>{let t,a=document.querySelector(`script[src$="${e}"]`);return t=a?a.getAttribute("src").slice(0,-1*e.length):import.meta.url.slice(0,import.meta.url.lastIndexOf("/")+1),t})(t),n=t.replace(/\.[^/.]+$/,"");if(e.cssautoload){let t=e.csspath.appearance?e.csspath.appearance:`${a}${n}.css`||`plugin/${n}/${n}.css`,r=e.compatibility?e.animatecsspath.compat:e.animatecsspath.link;e.debug&&(console.log("Paths:"),console.log(` - Plugin path = ${a}`),console.log(` - Appearance CSS path = ${t}`),console.log(` - AnimateCSS CSS path = ${r}`)),s(r,0,(function(){s(t)}))}},i=(e,t)=>{let a=e.parentNode;if(a){for(const t of a.children)if(t!==e&&t.dataset.appearParent)return;a.classList=e.classList,(({attributes:e},t,a)=>{[...e].filter((({nodeName:e})=>e.includes("data"))).forEach((({nodeName:e,nodeValue:s})=>{e===a&&a||t.setAttribute(e,s)}))})(e,a,"data-appear-parent"),a.innerHTML=e.innerHTML,a.classList.add(t)}},l=(e,t,a)=>Array.from(a.querySelectorAll(`.${e}`)).filter((e=>!e.closest(`.${t}`))),o=(e,t,a)=>{const s=[l(t,a,e),...Array.from(e.querySelectorAll(`.${a}`)).map((e=>((e,t,a)=>Array.from(a.querySelectorAll(`.${e}`)).filter((e=>e.closest(`.${t}`)===a)))(t,a,e)))];return!!s.some((e=>e.length>0))&&s},c=(e,t)=>{t.hideagain&&e.from&&e.from.dataset.appearanceCanStart&&e.from.removeAttribute("data-appearance-can-start")},d=(e,t,a)=>{if(t.hideagain&&e&&e.from){let t=e.from.querySelectorAll(a.animatecss);t&&t.forEach((e=>{e.classList.remove("animationended")}));let s=e.from.querySelectorAll(".fragment.visible");s&&s.forEach((e=>{e.classList.remove("visible")}))}},p=()=>{const e={names:{}};let s={};const l=(e,t,s)=>{n(e,"------------- Preloading -------------");let l=t.names;r(e,l.es5Filename),e.compatibility&&(l.animatecss=".backInDown, .backInLeft, .backInRight, .backInUp, .bounceIn, .bounceInDown, .bounceInLeft, .bounceInRight, .bounceInUp, .fadeIn, .fadeInDown, .fadeInDownBig, .fadeInLeft, .fadeInLeftBig, .fadeInRight, .fadeInRightBig, .fadeInUp, .fadeInUpBig, .fadeInTopLeft, .fadeInTopRight, .fadeInBottomLeft, .fadeInBottomRight, .flipInX, .flipInY, .lightSpeedInRight, .lightSpeedInLeft, .rotateIn, .rotateInDownLeft, .rotateInDownRight, .rotateInUpLeft, .rotateInUpRight, .jackInTheBox, .rollIn, .zoomIn, .zoomInDown, .zoomInLeft, .zoomInRight, .zoomInUp, .slideInDown, .slideInLeft, .slideInRight, .slideInUp, .skidLeft, .skidLeftBig, .skidRight, .skidRightBig, .shrinkIn, .shrinkInBlur",l.baseclass=e.compatibilitybaseclass),t.appearances=Array.from(t.slides.querySelectorAll(l.animatecss)),t.regularSections.forEach((s=>((e,t,s)=>{let n=null;if(e.hasAttribute("data-autoappear")){let a=e.dataset.autoappear;n="auto"==a||""==a||a.length<1||"true"==a?t.autoelements?t.autoelements:null:a}else t.autoappear&&t.autoelements&&(n=t.autoelements);if(n){let t=JSON.parse(a(n));Object.entries(t).forEach((([t,a])=>{let n=Array.from(e.querySelectorAll(t)).filter((e=>!s.appearances.includes(e)));n.length&&n.forEach((e=>{s.appearances.push(e);let t=[],n=null,r=!1,i=null,l=null;Array.isArray(a)?(t=a[0].split(/[ ,]+/),n=a[1]):"string"==typeof a?t=a.split(/[ ,]+/):a.constructor===Object&&((a.class||a.animation)&&(t=(a.animation?a.animation:a.class).split(/[ ,]+/)),a.speed&&(r=String(a.speed),r.includes("animate__")||(r=`animate__${r}`)),a.delay&&(n=String(a.delay)),a.split&&(i=String(a.split)),a["container-delay"]&&(l=String(a["container-delay"]))),e.classList.add(...t),r&&e.classList.add(r),n&&(e.dataset.delay||(e.dataset.delay=n)),i&&(e.dataset.split=i),l&&(e.dataset.containerDelay=l)}))}))}})(s,e,t))),t.appearances.forEach(((t,a)=>{((e,t,a)=>{let s=a.baseclass;e.hasAttribute("data-appear-parent")&&i(e,s),t.appearparents&&e.parentNode&&e.parentNode.tagName&&"SPAN"==e.tagName&&"LI"==e.parentNode.tagName&&String(e.outerHTML).length==String(e.parentNode.innerHTML).length&&i(e)})(t,e,l),((e,t)=>{e.classList.contains(t.baseclass)||e.classList.add(t.baseclass),e.classList.contains(t.fragmentClass)&&e.classList.add("custom")})(t,l),t.hasAttribute("data-split")&&((e,t)=>{let a=!1,s=" ";if("words"==t?a=e.textContent.trim().split(/\s+/):"letters"==t&&(a=e.textContent.trim().split(""),s=""),a){const t=Array.from(e.classList).filter((e=>e.startsWith("animate__"))),n=a.map(((t,a)=>{const s=document.createElement("span");return s.textContent=t," "==t&&(s.textContent=" "),e.dataset.delay&&0!==a&&(s.dataset.delay=e.dataset.delay),e.dataset.containerDelay&&0===a&&(s.dataset.delay=e.dataset.containerDelay),e.classList.add("wordchargroup"),e.classList.forEach((e=>e.startsWith("animate__")&&s.classList.add(e))),s.outerHTML})).join(s);t.forEach((t=>e.classList.remove(t))),e.removeAttribute("data-delay"),e.removeAttribute("data-split"),e.removeAttribute("data-container-delay"),e.innerHTML=n}})(t,t.dataset.split)})),t.regularSections.forEach(((t,a)=>{let s=o(t,l.baseclass,l.fragmentClass);s&&s.forEach((t=>{((e,t,a)=>{let s=0;e.forEach(((e,a)=>{if(0==a&&e.dataset.delay||0!=a){let a=t.delay;e.dataset&&e.dataset.delay&&(a=parseInt(e.dataset.delay)),s+=a,e.style.setProperty("animation-delay",s+"ms"),e.removeAttribute("data-delay")}}))})(t,e)}))})),(e=>{setTimeout(e,0)})(s)},p=(t,a,s)=>{let r=e.names;return r.baseclass=a.baseclass,r.compatibilitybaseclass=a.compatibilitybaseclass,r.fragmentSelector=".fragment",r.fragmentClass="fragment",r.speedClasses=["slower","slow","fast","faster"],r.speedClasses.push(...r.speedClasses.map((e=>`animate__${e}`))),r.animatecss='[class^="animate__"],[class*=" animate__"]',r.es5Filename=s,r.eventnames=["ready","slidechanged","slidetransitionend","autoanimate","overviewhidden"],e.deck=t,e.dom=t.getRevealElement(),e.viewport=t.getViewportElement(),e.slides=t.getSlidesElement(),e.sections=e.slides.querySelectorAll("section"),e.fragments=e.slides.querySelectorAll(r.fragmentSelector),e.regularSections=Array.from(e.sections).filter((e=>!(({childNodes:e})=>{let t=!1;for(let a=0;at.on(s,(t=>{((e,t,a,s)=>{s.deck.getConfig().view;let n=s.viewport.classList.contains("reveal-scroll"),r=e.type,i=(e=>{let t={};return t.from=e.fromSlide||e.previousSlide||null,t.to=e.toSlide||e.currentSlide||null,t})(e);if(i.to){"ready"==r&&(i.to.dataset.appearanceCanStart=!0);let s=((e,t)=>(e.dataset.appearevent&&"auto"===e.dataset.appearevent&&(e.dataset.appearevent="autoanimate"),"auto"==t.appearevent&&(t.appearevent="autoanimate"),e.dataset.appearevent?e.dataset.appearevent:t.appearevent))(i.to,t);(r==s||"slidetransitionend"==r&&"autoanimate"==s)&&(i.to.dataset.appearanceCanStart=!0),n&&"slidechanged"==r&&(c(i,t),d(i,t,a),setTimeout((()=>{i.to.dataset.appearanceCanStart=!0}),t.delay)),"slidetransitionend"==r&&(c(i,t),d(i,t,a)),"slidechanged"==r&&document.body.dataset.exitoverview?(c(i,t),i.to.dataset.appearanceCanStart=!0):"overviewhidden"==r&&(document.body.dataset.exitoverview=!0,setTimeout((()=>{document.body.removeAttribute("data-exitoverview")}),500),e.currentSlide&&(c(i,t),i.to.dataset.appearanceCanStart=!0))}})(t,a,r,e)})))),e.viewport.addEventListener("animationend",(e=>{e.target.classList.add("animationended")})),e.viewport.addEventListener("fragmenthidden",(e=>{e.fragment.classList.remove("animationended"),e.fragment.querySelectorAll(".animationended").forEach((e=>{e.classList.remove("animationended")}))})),new Promise((t=>{l(a,e,t),n(a,"---------- Done preloading ----------")}))};return{id:"appearance",init:e=>(s=t({baseclass:"animate__animated",hideagain:!0,delay:300,debug:!1,appearevent:"slidetransitionend",autoappear:!1,autoelements:!1,appearparents:!1,cssautoload:!0,csspath:"",animatecsspath:{link:"https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css",compat:"https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.compat.css"},compatibility:!1,compatibilitybaseclass:"animated"},e.getConfig().appearance||{}),p(e,s,"appearance.js"))}};export{p as default}; //# sourceMappingURL=appearance.esm.js.map diff --git a/demo/plugin/appearance/appearance.esm.js.map b/demo/plugin/appearance/appearance.esm.js.map index c2c2459..f79c226 100644 --- a/demo/plugin/appearance/appearance.esm.js.map +++ b/demo/plugin/appearance/appearance.esm.js.map @@ -1 +1 @@ -{"version":3,"file":"appearance.esm.js","sources":["../../../src/plugin/js/helpers.js","../../../src/plugin/js/functions/get-load-css.js","../../../src/plugin/js/functions/fix-list-item.js","../../../src/plugin/js/functions/get-appearance-arrays.js","../../../src/plugin/js/functions/show-hide-slide.js","../../../src/plugin/js/plugin.js","../../../src/plugin/js/functions/add-auto-animation.js","../../../src/plugin/js/functions/add-base-class.js","../../../src/plugin/js/functions/convert-to-spans.js","../../../src/plugin/js/functions/add-delay.js"],"sourcesContent":["/**\n * Check if a given string is valid JSON.\n * @param {string} str - The string to be checked.\n * @returns {boolean} `true` if the string is valid JSON, otherwise `false`.\n */\nexport const isJSON = str => {\n\ttry {\n\t\treturn (JSON.parse(str) && !!str);\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\n/**\n * Convert a NodeList into an array based on provided selectors.\n * @param {Element} container - The root element to begin querying.\n * @param {string} selectors - A string containing one or more CSS selectors separated by commas.\n * @returns {Element[]} Array of elements that match the given selectors.\n */\nexport const selectionArray = (container, selectors) => {\n\tlet selections = container.querySelectorAll(selectors);\n\tlet selectionarray = Array.prototype.slice.call(selections);\n\treturn selectionarray;\n};\n\n/**\n * Check if an element has child nodes that are `SECTION` elements.\n * @param {Object} param0 - Object with childNodes property.\n * @param {NodeListOf} param0.childNodes - List of child nodes of the element.\n * @returns {boolean} `true` if the element contains `SECTION` child nodes, otherwise `false`.\n */\nexport const isStack = ({childNodes}) => {\n\tlet isStack = false;\n\tfor (let i = 0; i < childNodes.length; i++) {\n\t\tif (childNodes[i].tagName == \"SECTION\") {\n\t\t\tisStack = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn isStack;\n};\n\n/**\n * Copy data attributes from a source element to a target element with an optional exception.\n * @param {Object} param0 - Object with attributes property.\n * @param {NamedNodeMap} param0.attributes - Map of attributes of the source element.\n * @param {Element} target - Target element to copy attributes to.\n * @param {string} [not] - Optional attribute name to exclude from copying.\n */\nexport const copyDataAttributes = ({attributes}, target, not) => {\n\t[...attributes].filter(({nodeName}) => nodeName.includes('data')).forEach(({nodeName, nodeValue}) => {\n\t\tif ((not && nodeName !== not) || !not) {\n\t\t\ttarget.setAttribute(nodeName, nodeValue);\n\t\t}\n\t});\n};\n\n/**\n * Check if the given item is an object and not an array.\n * @param {*} item - The item to be checked.\n * @returns {boolean} `true` if the item is an object and not an array, otherwise `false`.\n */\nexport const isObject = (item) => {\n\treturn (item && typeof item === 'object' && !Array.isArray(item));\n}\n\n/**\n * Deep merge multiple objects into a target object.\n * @param {Object} target - Target object to merge values into.\n * @param {...Object} sources - Source objects to merge from.\n * @returns {Object} The merged object.\n */\nexport const mergeDeep = (target, ...sources) => {\n\tif (!sources.length) return target;\n\tconst source = sources.shift();\n\n\tif (isObject(target) && isObject(source)) {\n\t\tfor (const key in source) {\n\t\t\tif (isObject(source[key])) {\n\t\t\t\tif (!target[key]) Object.assign(target, { [key]: {} });\n\t\t\t\tmergeDeep(target[key], source[key]);\n\t\t\t} else {\n\t\t\t\tObject.assign(target, { [key]: source[key] });\n\t\t\t}\n\t\t}\n\t}\n\treturn mergeDeep(target, ...sources);\n}\n\n/**\n * Resolves the given Promise immediately using setTimeout.\n * @param {Function} resolve - The resolve function of a Promise.\n * @returns {number} The ID value of the timer that is set.\n */\nexport const doneLoading = (resolve) => {\n\treturn setTimeout(resolve, 0);\n}\n\n\n/**\n * Converts a JavaScript object or a JSON-formatted string to a JSON string.\n *\n * @param {Object|string} str - The input string or object to be converted to a JSON string.\n * @returns {string} The JSON string.\n */\nexport const toJSONString = (str) => {\n\tlet JSONString = ''\n\n\tif (typeof str === \"string\") str = str.replace(/[“”]/g,'\"').replace(/[‘’]/g,\"'\");\n\n\tif (isJSON(str)) {\n\t\tJSONString = str\n\t} else {\n\t\tif (typeof str === \"object\") {\n\t\t\tJSONString = JSON.stringify(str, null, 2)\n\t\t} else {\n\t\t\tJSONString = str.trim().replace(/'/g, '\"').charAt(0) === \"{\" ? str.trim().replace(/'/g, '\"') : `{${str.trim().replace(/'/g, '\"')}}`;\n\t\t}\n\t}\n\treturn JSONString;\n}\n\n\n/**\n * Dynamically loads a resource from the specified URL and calls a callback function when it's loaded.\n * Will not load the resource if it has already been loaded.\n *\n * @param {string} url - The URL of the resource to load.\n * @param {string} type - The type of resource to load.\n * @param {Function} callback - A callback function to be called when the resource is loaded.\n */\n\nexport const loadResource = (url, type, callback) => {\n\tlet head = document.querySelector('head');\n\tlet resource;\n\tlet alreadyExists = false;\n\n\tif (type === 'script') {\n\t\tif (!document.querySelector(`script[src=\"${url}\"]`)) {\n\t\t\tresource = document.createElement('script');\n\t\t\tresource.type = 'text/javascript';\n\t\t\tresource.src = url;\n\t\t} else { alreadyExists = true }\n\n\t} else if (type === 'stylesheet') {\n\n\t\tif (!document.querySelector(`link[href=\"${url}\"]`)) {\n\t\t\tresource = document.createElement('link');\n\t\t\tresource.rel = 'stylesheet';\n\t\t\tresource.href = url;\n\t\t} else { alreadyExists = true }\n\t}\n\n\tif (!alreadyExists) {\n\t\tconst finish = () => {\n\t\t\tif (typeof callback === 'function') {\n\t\t\tcallback.call();\n\t\t\tcallback = null;\n\t\t\t}\n\t\t};\n\t\tresource.onload = finish;\n\t\tresource.onreadystatechange = function () {\n\t\t\tif (this.readyState === 'loaded') {\n\t\t\t\tfinish();\n\t\t\t}\n\t\t};\n\t\thead.appendChild(resource);\n\t}\n}\n\n\n/**\n * Retrieves the path of a JavaScript file based on its filename.\n *\n * @param {string} fileName - The filename of the script.\n * @returns {string} The path to the plugin's location.\n */\nexport const pluginPath = (fileName) => {\n\tlet path;\n\tlet pluginScript = document.querySelector(`script[src$=\"${fileName}\"]`);\n\tif (pluginScript) {\n\t\tpath = pluginScript.getAttribute(\"src\").slice(0, -1 * (fileName.length));\n\t} else {\n\t\tpath = import.meta.url.slice(0, import.meta.url.lastIndexOf('/') + 1);\n\t}\n\treturn path;\n}\n\n\n/**\n * Check if element 'a' appears before element 'b' in the DOM tree.\n *\n * @param {HTMLElement} a - The first HTML element to compare.\n * @param {HTMLElement} b - The second HTML element to compare.\n * @returns {boolean|undefined} - Returns `true` if element 'a' appears before element 'b', `false` if 'b' appears before 'a', and `undefined` if the elements have no relative position in the DOM tree.\n */\nexport const isBefore = (a, b) => {\n var all = document.getElementsByTagName('*');\n\n for (var i = 0; i < all.length; ++i) {\n if (all[i] === a) {\n return true;\n } else if (all[i] === b) {\n return false;\n }\n }\n // If the elements have no relative position in the DOM tree\n return undefined;\n};\n\n\n/**\n * Check the number of occurrences of a specific element in an array.\n *\n * @param {Array} array - The array in which occurrences are to be counted.\n * @param {*} element - The element to be counted within the array.\n * @returns {number} - The count of occurrences of the specified element in the array.\n */\nexport const checkOccurrence = (array, element) => {\n let counter = 0;\n for (let i = 0; i < array.length; i++) {\n if (array[i] == element) {\n counter++;\n }\n }\n return counter;\n};\n\n\n/**\n * Create an HTML element from a string of HTML.\n *\n * @param {string} thehtml - The string of HTML to be converted into an HTML element.\n * @returns {HTMLElement | null} - The HTML element created from the provided HTML string. Returns `null` if the element couldn't be created.\n */\nexport const createNode = (thehtml) => {\n const fragment = document.createRange().createContextualFragment(thehtml);\n return fragment.firstElementChild;\n};\n\n\n/**\n * Gets the index of the given DOM element within its parent's children.\n * @param {HTMLElement} elm - The target element.\n * @returns {number} - The index of the element within its parent's children.\n */\nexport const getNodeIndex = (elm) => [...elm.parentNode.children].indexOf(elm);\n\n\nexport const debugLog = (options, text) => {\n\tif (options.debug) console.log(text);\n}\n\n","import { loadResource } from '../helpers';\nimport { pluginPath } from '../helpers';\n\n/**\n * Retrieves and loads CSS stylesheets based on the provided options and ES5 filename.\n *\n * @param {Object} options - Configuration options for loading CSS.\n * @param {string} fileName - The filename of the script.\n */\n\nexport const getAndLoadCSS = (options, fileName) => {\n\tlet thePath = pluginPath(fileName);\n\tlet pluginBaseName = fileName.replace(/\\.[^/.]+$/, \"\");\n\n\tif (options.cssautoload) {\n\t\tlet AppearanceStylePath = options.csspath.appearance ? options.csspath.appearance : null || `${thePath}${pluginBaseName}.css` || `plugin/${pluginBaseName}/${pluginBaseName}.css`\n\t\tlet AnimateCSSPath = !options.compatibility ? options.animatecsspath.link : options.animatecsspath.compat;\n\t\n\t\tif (options.debug) {\n\t\t\tconsole.log(`Paths:`);\n\t\t\tconsole.log(` - Plugin path = ${thePath}`);\n\t\t\tconsole.log(` - Appearance CSS path = ${AppearanceStylePath}`);\n\t\t\tconsole.log(` - AnimateCSS CSS path = ${AnimateCSSPath}`);\n\t\t}\n\t\n\t\tloadResource(AnimateCSSPath, 'stylesheet', function () {\n\t\t\tloadResource(AppearanceStylePath, 'stylesheet');\n\t\t});\n\t}\n}","import { copyDataAttributes } from '../helpers';\n\n/**\n * Hoist a list item's appearance to its parent element's appearance.\n *\n * @param {HTMLElement} from - The list item element.\n * @returns {undefined}\n */\nconst hoistAppearance = (from, baseclass) => {\n\tlet to = from.parentNode;\n\tif (!to) return;\n \n\tfor (const sibling of to.children) {\n\t if (sibling !== from && sibling.dataset.appearParent) return;\n\t}\n \n\tto.classList = from.classList;\n\tcopyDataAttributes(from, to, \"data-appear-parent\");\n\tto.innerHTML = from.innerHTML;\n\tto.classList.add(baseclass);\n};\n\n\n/**\n * Fix list items that were changed by Quarto.\n *\n * This function is designed for use with Quarto and handles the conversion of list items\n * with Appearance classes to their parent elements when a manual attribute is present.\n * It also provides automatic conversion for list items that directly contain spans, which\n * is related to Quarto's wrapping of list content in a span.\n *\n * @param {HTMLElement} appearance - The list item element whose appearance will be converted.\n * @param {Object} options - An options object that controls the conversion behavior.\n * @param {boolean} options.appearparents - If `true`, automatic conversion of list items with spans is enabled.\n * @returns {undefined}\n */\nexport const fixListItem = (appearance, options, names) => {\n\n\tlet baseclass = names.baseclass\n\tif (appearance.hasAttribute(\"data-appear-parent\")) {\n\t\thoistAppearance(appearance, baseclass);\n\t}\n\n\tif (options.appearparents) {\n\t\tif (appearance.parentNode && appearance.parentNode.tagName) {\n\t\t\tif (appearance.tagName == \"SPAN\" && appearance.parentNode.tagName == \"LI\") {\n\t\t\t\tlet spanLength = String(appearance.outerHTML).length;\n\t\t\t\tlet liContentLength = String(appearance.parentNode.innerHTML).length;\n\t\t\t\tif (spanLength == liContentLength) {\n\t\t\t\t\thoistAppearance(appearance);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","/**\n * Selects elements with a specified class that are not nested inside an element with another specified class.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} excludeClass - The class name to exclude elements nested inside it.\n * @param {Element} el - The element to find the target elements in.\n * @returns {Element[]} - Array of selected elements.\n */\nconst elemsNotInClass = (targetClass, excludeClass, el) => \n Array.from(el.querySelectorAll(`.${targetClass}`))\n .filter(s => !s.closest(`.${excludeClass}`));\n\n/**\n * Selects elements with a specified class that are nested inside an element with another specified class.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} parentClass - The class name of the parent to find elements in.\n * @param {Element} el - The element to find the target elements in.\n * @returns {Element[]} - Array of selected elements.\n */\nconst elemsInClass = (targetClass, parentClass, el) =>\n Array.from(el.querySelectorAll(`.${targetClass}`))\n .filter(s => s.closest(`.${parentClass}`) === el);\n\n/**\n * Extracts groups of elements with a specified class from the provided section element.\n * Groups are formed based on nesting inside elements with another specified class.\n * @param {Element} section - The section to extract data from.\n * @returns {Element[][]} - Nested arrays of selected elements.\n */\n\n\n/**\n * Extracts groups of elements with a specified class from the provided section element.\n * Groups are formed based on nesting inside elements with another specified class.\n * @param {Element} section - The section to extract data from.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} groupClass - The class name of the parent to find elements in.\n * @returns {Element[][]} - Nested arrays of selected elements.\n */\nexport const getAppearanceArrays = (section, targetClass, groupClass) => {\n const result = [\n elemsNotInClass(targetClass, groupClass, section), \n ...Array.from(section.querySelectorAll(`.${groupClass}`))\n .map(frag => elemsInClass(targetClass, groupClass, frag))\n ];\n\n\tif (result.some(group => group.length > 0)) {\n return result;\n } else {\n\t\treturn false;\n\t}\n};\n","/**\n * Derives slide from and to from the event object.\n *\n * @param {Object} event - The event object containing slide transition details.\n * @returns {Object} - An object containing references to the \"from\" and \"to\" slides.\n */\nconst fromTo = (event) => {\n\tlet slides = {};\n\tslides.from = event.fromSlide || event.previousSlide || null;\n\tslides.to = event.toSlide || event.currentSlide || null;\n\treturn slides;\n};\n\n/**\n * A function that determines the appearance event for a given slide.\n *\n * This function checks the `data-appearevent` attribute of the slide and the `options.appearevent` parameter.\n * If `data-appearevent` is set to \"auto\", it is converted to \"autoanimate\". If `options.appearevent` is \"auto\", it is also converted to \"autoanimate\".\n * The function returns the appearance event, prioritizing `data-appearevent` over `options.appearevent`.\n *\n * @param {HTMLElement} toSlide - The slide for which the appearance event is determined.\n * @param {Object} options - An object containing options for the appearance event.\n * @param {string} options.appearevent - The appearance event option provided in the `options` object.\n *\n * @returns {string} - The determined appearance event for the slide, either from `data-appearevent` or `options.appearevent`.\n */\nconst slideAppearevent = (toSlide, options) => {\n\n\tif (toSlide.dataset.appearevent && toSlide.dataset.appearevent === \"auto\" ) {\n\t\ttoSlide.dataset.appearevent = \"autoanimate\"\n\t}\n\tif (options.appearevent == \"auto\") {options.appearevent = \"autoanimate\"}\n\treturn toSlide.dataset.appearevent ? toSlide.dataset.appearevent : options.appearevent;\n};\n\n/**\n * Remove the 'data-appearance-can-start' attribute from the 'from' slide if the 'hideagain' option is enabled.\n *\n * @param {HTMLElement} slides - The container element for the slides.\n * @param {Object} options - An object containing configuration options.\n * @param {boolean} options.hideagain - A flag indicating whether to remove the attribute when 'hideagain' is true.\n */\nconst removeStartAttribute = (slides, options) => {\n\tif (options.hideagain) {\n\t\tif (slides.from && slides.from.dataset.appearanceCanStart ) {\n\t\t\tslides.from.removeAttribute('data-appearance-can-start');\n\t\t}\n\t}\n};\n\n\n/**\n * Turn off slide appearances when transitioning from one slide to another if the 'hideagain' option is enabled.\n *\n * @param {HTMLElement} slides - The container element for the slides.\n * @param {Object} options - An object containing configuration options.\n * @param {string} names.animatecss - The CSS selector for animated elements.\n */\nconst turnOffSlideAppearances = (slides, options, names) => {\n\tif (options.hideagain) {\n\t\tif (slides && slides.from) {\n\n\t\t\t// Remove animationended class from animated elements when moving away from that slide\n\t\t\tlet fromAppearances = slides.from.querySelectorAll(names.animatecss);\n\t\t\tif (fromAppearances) {\n\t\t\t\tfromAppearances.forEach( appearance => {\n\t\t\t\t\tappearance.classList.remove('animationended');\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Remove visible class from fragments when moving away from that slide\n\t\t\tlet fromFragments = slides.from.querySelectorAll(`.fragment.visible`);\n\t\t\tif (fromFragments) {\n\t\t\t\tfromFragments.forEach(fragment => {\n\t\t\t\t\tfragment.classList.remove('visible');\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n};\n\n\n/**\n * Handles the showing and hiding of slides based on the provided event and options.\n *\n * @param {Object} event - The event object containing slide transition details.\n * @param {Object} options - An object containing configurations for slide appearance management.\n */\nexport const showHideSlide = (event, options, names, vars) => {\n\n\tlet view = vars.deck.getConfig().view;\n\tlet isScroll = vars.viewport.classList.contains(\"reveal-scroll\");\n\tlet etype = event.type;\n\tlet slides = fromTo(event);\n\n\tif (slides.to) {\n\n\t\tif (etype == \"ready\") {\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t}\n\n\t\tlet appearevent = slideAppearevent(slides.to, options)\n\n\t\tif (etype == appearevent || (etype == \"slidetransitionend\" && appearevent == \"autoanimate\")) {\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t}\n\n\t\t// Add scroll mode compatibility, does not have a slidetransitionend event yet\n\t\tif (isScroll && etype == 'slidechanged' ) {\n\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tturnOffSlideAppearances(slides, options, names);\n\n\t\t\t// Add delay to allow for scroll animation to finish\n\t\t\tsetTimeout(() => {\n\t\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t\t}, options.delay)\n\t\t}\n\n\n\t\tif (etype == \"slidetransitionend\" ) {\n\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tturnOffSlideAppearances(slides, options, names);\n\t\t}\n\t\t\n\t\tif (etype == 'slidechanged' && document.body.dataset.exitoverview) {\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\n\t\t} else if (etype == 'overviewhidden' ) {\n\n\t\t\tdocument.body.dataset.exitoverview = true;\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tdocument.body.removeAttribute('data-exitoverview')\n\t\t\t}, 500)\n\n\t\t\tif (event.currentSlide ) {\n\t\t\t\tremoveStartAttribute(slides, options);\n\t\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t\t}\n\t\t}\n\t}\n}","import { debugLog, mergeDeep, doneLoading, isStack } from './helpers';\n\nimport {getAndLoadCSS} from './functions/get-load-css.js';\nimport {addAutoAnimation} from './functions/add-auto-animation.js';\nimport {fixListItem} from './functions/fix-list-item';\nimport {addBaseClass} from './functions/add-base-class.js';\nimport {addDelay} from './functions/add-delay.js';\nimport {getAppearanceArrays} from './functions/get-appearance-arrays.js';\nimport {convertToSpans} from './functions/convert-to-spans';\nimport {showHideSlide} from './functions/show-hide-slide.js';\n\n\nconst Plugin = () => {\n\n\tconst vars = {};\n\tvars.names = {};\n\tlet options = {};\n\n\t/**\n\t* Prepare the plugin to find Appearance elements\n\t* @param {Object} vars - The variables to be prepared.\n\t* @param {Object} names - The names to be prepared.\n\t* @param {Function} resolve - The callback function to be called when preparation is complete.\n\t* @throws {Error} Throws an error if the 'options' object is not defined.\n\t*/\n\tconst prepare = (options, vars, resolve) => {\n\n\t\tdebugLog(options, \"------------- Preloading -------------\");\n\n\t\tlet names = vars.names;\n\n\t\tgetAndLoadCSS(options, names.es5Filename);\n\n\t\tif (options.compatibility) {\n\t\t\tnames.animatecss = '.backInDown, .backInLeft, .backInRight, .backInUp, .bounceIn, .bounceInDown, .bounceInLeft, .bounceInRight, .bounceInUp, .fadeIn, .fadeInDown, .fadeInDownBig, .fadeInLeft, .fadeInLeftBig, .fadeInRight, .fadeInRightBig, .fadeInUp, .fadeInUpBig, .fadeInTopLeft, .fadeInTopRight, .fadeInBottomLeft, .fadeInBottomRight, .flipInX, .flipInY, .lightSpeedInRight, .lightSpeedInLeft, .rotateIn, .rotateInDownLeft, .rotateInDownRight, .rotateInUpLeft, .rotateInUpRight, .jackInTheBox, .rollIn, .zoomIn, .zoomInDown, .zoomInLeft, .zoomInRight, .zoomInUp, .slideInDown, .slideInLeft, .slideInRight, .slideInUp, .skidLeft, .skidLeftBig, .skidRight, .skidRightBig, .shrinkIn, .shrinkInBlur';\n\t\t\tnames.baseclass = options.compatibilitybaseclass\n\t\t}\n\n\t\tvars.appearances = Array.from(vars.slides.querySelectorAll(names.animatecss));\n\n\t\t// Go through each section to see if there are any (auto) selectors that need animation classes\n\t\tvars.regularSections.forEach(theSection => addAutoAnimation(theSection, options, vars));\n\n\t\tvars.appearances.forEach((theAppearance, index) => {\n\t\t\t// Fix any list item where the Appearance classes were moved to the span (Quarto does this)\n\t\t\tfixListItem(theAppearance, options, names);\n\n\t\t\t// Go through each appearance element and add the baseclass if it doesn't have it\n\t\t\taddBaseClass(theAppearance, names);\n\n\t\t\tif (theAppearance.hasAttribute('data-split')) {\n\t\t\t\tconvertToSpans(theAppearance, theAppearance.dataset.split);\n\t\t\t}\n\t\t});\n\n\t\tvars.regularSections.forEach((theSection, index) => {\n\t\t\t// Get all the Appearances in the section as separate arrays per delay loop\n\t\t\tlet appearanceArrays = getAppearanceArrays(theSection, names.baseclass, names.fragmentClass);\n\n\t\t\tif (appearanceArrays) {\n\t\t\t\tappearanceArrays.forEach((appearanceArray) => {\n\t\t\t\t\t// Add the delays to each appearance in the array\n\t\t\t\t\taddDelay(appearanceArray, options, names)\n\t\t\t\t})\n\t\t\t}\n\t\t});\n\n\t\tdoneLoading(resolve);\n\t}\n\n\t/**\n\t* The main function of the plugin\n\t* @param {object} deck - The deck object\n\t* @param {object} options - The options object\n\t* @param {string} es5Filename - The name of the file that will be used\n\t*/\n\tconst Appear = (deck, options, es5Filename) => {\n\n\t\tlet names = vars.names;\n\n\t\t// Set up names\n\t\tnames.baseclass = options.baseclass;\n\t\tnames.compatibilitybaseclass = options.compatibilitybaseclass;\n\t\tnames.fragmentSelector = \".fragment\";\n\t\tnames.fragmentClass = \"fragment\";\n\t\tnames.speedClasses = ['slower', 'slow', 'fast', 'faster'];\n\t\tnames.speedClasses.push(...names.speedClasses.map(speed => `animate__${speed}`));\n\t\tnames.animatecss = '[class^=\"animate__\"],[class*=\" animate__\"]';\n\t\tnames.es5Filename = es5Filename;\n\t\tnames.eventnames = ['ready', 'slidechanged', 'slidetransitionend', 'autoanimate', 'overviewhidden'];\n\t\n\t\t// Set up variables\n\t\tvars.deck = deck;\n\t\tvars.dom = deck.getRevealElement();\n\t\tvars.viewport = deck.getViewportElement();\n\t\tvars.slides = deck.getSlidesElement();\n\n\t\tvars.sections = vars.slides.querySelectorAll('section');\n\t\tvars.fragments = vars.slides.querySelectorAll(names.fragmentSelector);\n\t\tvars.regularSections = Array.from(vars.sections).filter( section => !isStack(section));\n\n\t\t// Check if Speaker view window\n\t\tif( /receiver/i.test( window.location.search ) ) vars.viewport.classList.add('sv');\n\n\t\tnames.eventnames.forEach( (eventname) => deck.on( eventname, event => { showHideSlide(event, options, names, vars) } ) );\n\n\t\tvars.viewport.addEventListener(\"animationend\", (event) => {\n\t\t\tevent.target.classList.add('animationended');\n\t\t});\n\t\tvars.viewport.addEventListener(\"fragmenthidden\", (event) => {\n\t\t\tevent.fragment.classList.remove('animationended');\n\t\t\tevent.fragment.querySelectorAll('.animationended').forEach(el => {\n\t\t\t\tel.classList.remove('animationended');\n\t\t\t});\n\t\t});\n\n\t\treturn new Promise(resolve => {\n\t\t\tprepare(options, vars, resolve);\n\t\t\tdebugLog(options, \"---------- Done preloading ----------\");\n\t\t});\n\t};\n\n\n\t/**\n\t* Initialize the plugin\n\t* @param {object} deck - The deck object\n\t*/\n\tconst init = (deck) => {\n\n\t\tlet defaultOptions = {\n\t\t\tbaseclass: 'animate__animated',\n\t\t\thideagain: true,\n\t\t\tdelay: 300,\n\t\t\tdebug: false,\n\t\t\tappearevent: 'slidetransitionend',\n\t\t\tautoappear: false,\n\t\t\tautoelements: false,\n\t\t\tappearparents: false,\n\t\t\tcssautoload: true,\n\t\t\tcsspath: '',\n\t\t\tanimatecsspath: {\n\t\t\t\tlink : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css',\n\t\t\t\tcompat : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.compat.css',\n\t\t\t},\n\t\t\tcompatibility: false,\n\t\t\tcompatibilitybaseclass: 'animated'\n\t\t};\n\n\t\toptions = mergeDeep(defaultOptions, deck.getConfig().appearance || {});\n\n\t\treturn Appear(deck, options, \"appearance.js\");\n\t};\n\n\treturn { id: 'appearance', init: init };\n};\n\nexport default Plugin;","import { toJSONString } from '../helpers';\n\n\n/**\n * Adds automatic animations to elements within a section based on specified criteria.\n *\n * This function examines the provided section for attributes and options to determine\n * which classes should be added to its elements to enable automatic animations.\n *\n * @param {HTMLElement} section - The section element to which automatic animations will be applied.\n * @param {Object} options - The existing user options object\n * @param {Object} vars - The existing vars object\n * @returns {undefined}\n */\nexport const addAutoAnimation = (section, options, vars) => {\n\n\tlet sectionAutoSelectors = null;\n\n\tif (section.hasAttribute(\"data-autoappear\")) {\n\n\t\tlet sectDataAppear = section.dataset.autoappear;\n\n\t\tif (sectDataAppear == \"auto\" || sectDataAppear == \"\" || sectDataAppear.length < 1 || sectDataAppear == \"true\") {\n\t\t\t// This section should get the global autoappear classes on its objects\n\t\t\tsectionAutoSelectors = options.autoelements ? options.autoelements : null;\n\t\t} else {\n\t\t\t// This section should get the local autoappear classes on its objects\n\t\t\tsectionAutoSelectors = sectDataAppear;\n\t\t}\n\n\t} else if ( options.autoappear && options.autoelements ) {\n\t\t// This section should get the global autoappear classes on its objects\n\t\tsectionAutoSelectors = options.autoelements;\n\t}\n\n\tif (sectionAutoSelectors) {\n\n\t\tlet elementsToAnimate = JSON.parse(toJSONString(sectionAutoSelectors));\n\n\t\tObject.entries(elementsToAnimate).forEach(([selector, assignables]) => {\n\n\n\t\t\t// Exclude the elements from vars.appearances\n\t\t\tlet elements = Array.from(section.querySelectorAll(selector)).filter( element => !vars.appearances.includes(element) );\n\n\t\t\tif (elements.length) {\n\n\t\t\t\telements.forEach((element) => {\n\n\t\t\t\t\tvars.appearances.push(element)\n\n\t\t\t\t\tlet newClasses = [], newDelay = null, speedClass = false, elementSplit = null, containerDelay = null;\n\n\t\t\t\t\tif (Array.isArray(assignables)) {\n\n\t\t\t\t\t\tnewClasses = assignables[0].split(/[ ,]+/);\n\t\t\t\t\t\tnewDelay = assignables[1];\n\n\t\t\t\t\t} else if (typeof assignables == \"string\"){\n\n\t\t\t\t\t\tnewClasses = assignables.split(/[ ,]+/);\n\n\t\t\t\t\t} else if (assignables.constructor === Object) {\n\n\t\t\t\t\t\tif (assignables.class || assignables.animation) {\n\t\t\t\t\t\t\tlet animationClass = assignables.animation ? assignables.animation : assignables.class;\n\t\t\t\t\t\t\tnewClasses = animationClass.split(/[ ,]+/);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.speed) {\n\t\t\t\t\t\t\tspeedClass = String(assignables.speed);\n\t\t\t\t\t\t\tif (!speedClass.includes(\"animate__\")) {\n\t\t\t\t\t\t\t\tspeedClass = `animate__${speedClass}`\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.delay) {\n\t\t\t\t\t\t\tnewDelay = String(assignables.delay);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.split) {\n\t\t\t\t\t\t\telementSplit = String(assignables.split);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables[\"container-delay\"]) {\n\t\t\t\t\t\t\tcontainerDelay = String(assignables[\"container-delay\"]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telement.classList.add(...newClasses);\n\t\t\t\t\tif (speedClass) { element.classList.add(speedClass)}\n\n\t\t\t\t\tif (newDelay) {\n\t\t\t\t\t\tif (!element.dataset.delay) {\n\t\t\t\t\t\t\telement.dataset.delay = newDelay\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (elementSplit) {element.dataset.split = elementSplit};\n\t\t\t\t\tif (containerDelay) {element.dataset.containerDelay = containerDelay};\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n","/**\n * Adds a base class to an HTML element if it doesn't already have it.\n *\n * This function checks if the specified HTML element has the specified base class,\n * and if not, it adds the base class to the element's class list.\n *\n * @param {HTMLElement} appearance - The HTML element to which the base class should be added.\n * @param {Object} names - The existing 'names' object\n * @returns {undefined}\n */\n\nexport const addBaseClass = (appearance, names) => {\n\tif (!appearance.classList.contains(names.baseclass)) {\n\t\tappearance.classList.add(names.baseclass);\n\t}\n\tif (appearance.classList.contains(names.fragmentClass)) {\n\t\tappearance.classList.add('custom');\n\t}\n}\n","export const convertToSpans = (parent, kind) => {\n\n\tlet splitElements = false;\n\tlet joinChar = ' ';\n\n\tif (kind == \"words\") {\n\t\tsplitElements = parent.textContent.trim().split(/\\s+/);\n\t\t\n\t} else if (kind == \"letters\") {\n\t\tsplitElements = parent.textContent.trim().split('');\n\t\tjoinChar = '';\n\t}\n\n\tif (splitElements) {\n\t\tconst parentAnimateClasses = Array.from(parent.classList).filter(className => className.startsWith('animate__'));\n\t\n\t\tconst newHtml = splitElements.map((element, index) => {\n\t\t\tconst span = document.createElement('span');\n\t\t\tspan.textContent = element;\n\t\t\tif (element == \" \") {span.textContent = \"\\u00A0\"}\n\t\n\t\t\tif (parent.dataset.delay && index !== 0) {\n\t\t\t\tspan.dataset.delay = parent.dataset.delay\n\t\t\t}\n\n\t\t\tif (parent.dataset.containerDelay && index === 0) {\n\t\t\t\tspan.dataset.delay = parent.dataset.containerDelay\n\t\t\t}\n\t\t\tparent.classList.add('wordchargroup');\n\t\n\t\t\tparent.classList.forEach(className => className.startsWith('animate__') && span.classList.add(className));\n\t\t\treturn span.outerHTML;\n\t\t\t\n\t\t}).join(joinChar);\n\t\n\t\tparentAnimateClasses.forEach(className => parent.classList.remove(className));\n\t\tparent.removeAttribute('data-delay');\n\t\tparent.removeAttribute('data-split');\n\t\tparent.removeAttribute('data-container-delay');\n\t\n\t\tparent.innerHTML = newHtml;\n\t}\n\n\n};","export const addDelay = (appearanceArray, options, names) => {\n\n let delay = 0;\n appearanceArray.forEach((appearance, index) => {\n\n if ((index == 0 && appearance.dataset.delay) || index !=0) {\n\n let elementDelay = options.delay;\n\n if (appearance.dataset && appearance.dataset.delay) {\n elementDelay = parseInt(appearance.dataset.delay);\n }\n\n delay = delay + elementDelay;\n\n appearance.style.setProperty('animation-delay', delay + \"ms\");\n appearance.removeAttribute('data-delay');\n }\n\n })\n\n}\n"],"names":["isObject","item","Array","isArray","mergeDeep","target","sources","length","source","shift","key","Object","assign","toJSONString","str","JSONString","replace","JSON","parse","e","isJSON","stringify","trim","charAt","loadResource","url","type","callback","resource","head","document","querySelector","alreadyExists","createElement","src","rel","href","finish","call","onload","onreadystatechange","this","readyState","appendChild","debugLog","options","text","debug","console","log","getAndLoadCSS","fileName","thePath","path","pluginScript","getAttribute","slice","lastIndexOf","pluginPath","pluginBaseName","cssautoload","AppearanceStylePath","csspath","appearance","AnimateCSSPath","compatibility","animatecsspath","compat","link","hoistAppearance","from","baseclass","to","parentNode","sibling","children","dataset","appearParent","classList","copyDataAttributes","attributes","not","filter","nodeName","includes","forEach","nodeValue","setAttribute","innerHTML","add","elemsNotInClass","targetClass","excludeClass","el","querySelectorAll","s","closest","getAppearanceArrays","section","groupClass","result","map","frag","elemsInClass","parentClass","some","group","removeStartAttribute","slides","hideagain","appearanceCanStart","removeAttribute","turnOffSlideAppearances","names","fromAppearances","animatecss","remove","fromFragments","fragment","Plugin","vars","prepare","resolve","es5Filename","compatibilitybaseclass","appearances","regularSections","theSection","addAutoAnimation","sectionAutoSelectors","hasAttribute","sectDataAppear","autoappear","autoelements","elementsToAnimate","entries","selector","assignables","elements","element","push","newClasses","newDelay","speedClass","elementSplit","containerDelay","split","constructor","class","animation","speed","String","delay","theAppearance","index","fixListItem","appearparents","tagName","outerHTML","addBaseClass","contains","fragmentClass","convertToSpans","parent","kind","splitElements","joinChar","textContent","parentAnimateClasses","className","startsWith","newHtml","span","join","appearanceArrays","appearanceArray","addDelay","elementDelay","parseInt","style","setProperty","setTimeout","doneLoading","Appear","deck","fragmentSelector","speedClasses","eventnames","dom","getRevealElement","viewport","getViewportElement","getSlidesElement","sections","fragments","isStack","childNodes","i","test","window","location","search","eventname","on","event","showHideSlide","getConfig","view","isScroll","etype","fromSlide","previousSlide","toSlide","currentSlide","fromTo","appearevent","slideAppearevent","body","exitoverview","addEventListener","Promise","id","init"],"mappings":";;;;;;;;;;;;;;AAKO,MAyDMA,EAAYC,GAChBA,GAAwB,iBAATA,IAAsBC,MAAMC,QAAQF,GAS/CG,EAAYA,CAACC,KAAWC,KACpC,IAAKA,EAAQC,OAAQ,OAAOF,EAC5B,MAAMG,EAASF,EAAQG,QAEvB,GAAIT,EAASK,IAAWL,EAASQ,GAChC,IAAK,MAAME,KAAOF,EACbR,EAASQ,EAAOE,KACdL,EAAOK,IAAMC,OAAOC,OAAOP,EAAQ,CAAEK,CAACA,GAAM,CAAC,IAClDN,EAAUC,EAAOK,GAAMF,EAAOE,KAE9BC,OAAOC,OAAOP,EAAQ,CAAEK,CAACA,GAAMF,EAAOE,KAIzC,OAAON,EAAUC,KAAWC,EAAQ,EAmBxBO,EAAgBC,IAC5B,IAAIC,EAAa,GAajB,MAXmB,iBAARD,IAAkBA,EAAMA,EAAIE,QAAQ,QAAQ,KAAKA,QAAQ,QAAQ,MAG3ED,EA1GoBD,KACrB,IACC,OAAQG,KAAKC,MAAMJ,MAAUA,CAC7B,CAAC,MAAOK,GACR,OAAO,CACR,GAoGIC,CAAON,GACGA,EAEM,iBAARA,EACGG,KAAKI,UAAUP,EAAK,KAAM,GAEkB,MAA5CA,EAAIQ,OAAON,QAAQ,KAAM,KAAKO,OAAO,GAAaT,EAAIQ,OAAON,QAAQ,KAAM,KAAQ,IAAGF,EAAIQ,OAAON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AAc,EACduB,eAAe,EACfhG,aAAa,EACbE,QAAS,GACTI,eAAgB,CACfE,KAAO,2EACPD,OAAS,+EAEVF,eAAe,EACf2D,uBAAwB,YAGW4D,EAAKsB,YAAY/I,YAAc,CAAA,GAE5DwH,EAAOC,EAAM3I,EAAS,kBAGS"} \ No newline at end of file +{"version":3,"file":"appearance.esm.js","sources":["../../../src/plugin/js/helpers.js","../../../src/plugin/js/functions/get-load-css.js","../../../src/plugin/js/functions/fix-list-item.js","../../../src/plugin/js/functions/get-appearance-arrays.js","../../../src/plugin/js/functions/show-hide-slide.js","../../../src/plugin/js/plugin.js","../../../src/plugin/js/functions/add-auto-animation.js","../../../src/plugin/js/functions/add-base-class.js","../../../src/plugin/js/functions/convert-to-spans.js","../../../src/plugin/js/functions/add-delay.js"],"sourcesContent":["/**\n * Check if a given string is valid JSON.\n * @param {string} str - The string to be checked.\n * @returns {boolean} `true` if the string is valid JSON, otherwise `false`.\n */\nexport const isJSON = str => {\n\ttry {\n\t\treturn (JSON.parse(str) && !!str);\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\n/**\n * Convert a NodeList into an array based on provided selectors.\n * @param {Element} container - The root element to begin querying.\n * @param {string} selectors - A string containing one or more CSS selectors separated by commas.\n * @returns {Element[]} Array of elements that match the given selectors.\n */\nexport const selectionArray = (container, selectors) => {\n\tlet selections = container.querySelectorAll(selectors);\n\tlet selectionarray = Array.prototype.slice.call(selections);\n\treturn selectionarray;\n};\n\n/**\n * Check if an element has child nodes that are `SECTION` elements.\n * @param {Object} param0 - Object with childNodes property.\n * @param {NodeListOf} param0.childNodes - List of child nodes of the element.\n * @returns {boolean} `true` if the element contains `SECTION` child nodes, otherwise `false`.\n */\nexport const isStack = ({childNodes}) => {\n\tlet isStack = false;\n\tfor (let i = 0; i < childNodes.length; i++) {\n\t\tif (childNodes[i].tagName == \"SECTION\") {\n\t\t\tisStack = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn isStack;\n};\n\n/**\n * Copy data attributes from a source element to a target element with an optional exception.\n * @param {Object} param0 - Object with attributes property.\n * @param {NamedNodeMap} param0.attributes - Map of attributes of the source element.\n * @param {Element} target - Target element to copy attributes to.\n * @param {string} [not] - Optional attribute name to exclude from copying.\n */\nexport const copyDataAttributes = ({attributes}, target, not) => {\n\t[...attributes].filter(({nodeName}) => nodeName.includes('data')).forEach(({nodeName, nodeValue}) => {\n\t\tif ((not && nodeName !== not) || !not) {\n\t\t\ttarget.setAttribute(nodeName, nodeValue);\n\t\t}\n\t});\n};\n\n/**\n * Check if the given item is an object and not an array.\n * @param {*} item - The item to be checked.\n * @returns {boolean} `true` if the item is an object and not an array, otherwise `false`.\n */\nexport const isObject = (item) => {\n\treturn (item && typeof item === 'object' && !Array.isArray(item));\n}\n\n/**\n * Deep merge multiple objects into a target object.\n * @param {Object} target - Target object to merge values into.\n * @param {...Object} sources - Source objects to merge from.\n * @returns {Object} The merged object.\n */\nexport const mergeDeep = (target, ...sources) => {\n\tif (!sources.length) return target;\n\tconst source = sources.shift();\n\n\tif (isObject(target) && isObject(source)) {\n\t\tfor (const key in source) {\n\t\t\tif (isObject(source[key])) {\n\t\t\t\tif (!target[key]) Object.assign(target, { [key]: {} });\n\t\t\t\tmergeDeep(target[key], source[key]);\n\t\t\t} else {\n\t\t\t\tObject.assign(target, { [key]: source[key] });\n\t\t\t}\n\t\t}\n\t}\n\treturn mergeDeep(target, ...sources);\n}\n\n/**\n * Resolves the given Promise immediately using setTimeout.\n * @param {Function} resolve - The resolve function of a Promise.\n * @returns {number} The ID value of the timer that is set.\n */\nexport const doneLoading = (resolve) => {\n\treturn setTimeout(resolve, 0);\n}\n\n\n/**\n * Converts a JavaScript object or a JSON-formatted string to a JSON string.\n *\n * @param {Object|string} str - The input string or object to be converted to a JSON string.\n * @returns {string} The JSON string.\n */\nexport const toJSONString = (str) => {\n\tlet JSONString = ''\n\n\tif (typeof str === \"string\") str = str.replace(/[“”]/g,'\"').replace(/[‘’]/g,\"'\");\n\n\tif (isJSON(str)) {\n\t\tJSONString = str\n\t} else {\n\t\tif (typeof str === \"object\") {\n\t\t\tJSONString = JSON.stringify(str, null, 2)\n\t\t} else {\n\t\t\tJSONString = str.trim().replace(/'/g, '\"').charAt(0) === \"{\" ? str.trim().replace(/'/g, '\"') : `{${str.trim().replace(/'/g, '\"')}}`;\n\t\t}\n\t}\n\treturn JSONString;\n}\n\n\n/**\n * Dynamically loads a resource from the specified URL and calls a callback function when it's loaded.\n * Will not load the resource if it has already been loaded.\n *\n * @param {string} url - The URL of the resource to load.\n * @param {string} type - The type of resource to load.\n * @param {Function} callback - A callback function to be called when the resource is loaded.\n */\n\nexport const loadResource = (url, type, callback) => {\n\tlet head = document.querySelector('head');\n\tlet resource;\n\tlet alreadyExists = false;\n\n\tif (type === 'script') {\n\t\tif (!document.querySelector(`script[src=\"${url}\"]`)) {\n\t\t\tresource = document.createElement('script');\n\t\t\tresource.type = 'text/javascript';\n\t\t\tresource.src = url;\n\t\t} else { alreadyExists = true }\n\n\t} else if (type === 'stylesheet') {\n\n\t\tif (!document.querySelector(`link[href=\"${url}\"]`)) {\n\t\t\tresource = document.createElement('link');\n\t\t\tresource.rel = 'stylesheet';\n\t\t\tresource.href = url;\n\t\t} else { alreadyExists = true }\n\t}\n\n\tif (!alreadyExists) {\n\t\tconst finish = () => {\n\t\t\tif (typeof callback === 'function') {\n\t\t\tcallback.call();\n\t\t\tcallback = null;\n\t\t\t}\n\t\t};\n\t\tresource.onload = finish;\n\t\tresource.onreadystatechange = function () {\n\t\t\tif (this.readyState === 'loaded') {\n\t\t\t\tfinish();\n\t\t\t}\n\t\t};\n\t\thead.appendChild(resource);\n\t}\n}\n\n\n/**\n * Retrieves the path of a JavaScript file based on its filename.\n *\n * @param {string} fileName - The filename of the script.\n * @returns {string} The path to the plugin's location.\n */\nexport const pluginPath = (fileName) => {\n\tlet path;\n\tlet pluginScript = document.querySelector(`script[src$=\"${fileName}\"]`);\n\tif (pluginScript) {\n\t\tpath = pluginScript.getAttribute(\"src\").slice(0, -1 * (fileName.length));\n\t} else {\n\t\tpath = import.meta.url.slice(0, import.meta.url.lastIndexOf('/') + 1);\n\t}\n\treturn path;\n}\n\n\n/**\n * Check if element 'a' appears before element 'b' in the DOM tree.\n *\n * @param {HTMLElement} a - The first HTML element to compare.\n * @param {HTMLElement} b - The second HTML element to compare.\n * @returns {boolean|undefined} - Returns `true` if element 'a' appears before element 'b', `false` if 'b' appears before 'a', and `undefined` if the elements have no relative position in the DOM tree.\n */\nexport const isBefore = (a, b) => {\n var all = document.getElementsByTagName('*');\n\n for (var i = 0; i < all.length; ++i) {\n if (all[i] === a) {\n return true;\n } else if (all[i] === b) {\n return false;\n }\n }\n // If the elements have no relative position in the DOM tree\n return undefined;\n};\n\n\n/**\n * Check the number of occurrences of a specific element in an array.\n *\n * @param {Array} array - The array in which occurrences are to be counted.\n * @param {*} element - The element to be counted within the array.\n * @returns {number} - The count of occurrences of the specified element in the array.\n */\nexport const checkOccurrence = (array, element) => {\n let counter = 0;\n for (let i = 0; i < array.length; i++) {\n if (array[i] == element) {\n counter++;\n }\n }\n return counter;\n};\n\n\n/**\n * Create an HTML element from a string of HTML.\n *\n * @param {string} thehtml - The string of HTML to be converted into an HTML element.\n * @returns {HTMLElement | null} - The HTML element created from the provided HTML string. Returns `null` if the element couldn't be created.\n */\nexport const createNode = (thehtml) => {\n const fragment = document.createRange().createContextualFragment(thehtml);\n return fragment.firstElementChild;\n};\n\n\n/**\n * Gets the index of the given DOM element within its parent's children.\n * @param {HTMLElement} elm - The target element.\n * @returns {number} - The index of the element within its parent's children.\n */\nexport const getNodeIndex = (elm) => [...elm.parentNode.children].indexOf(elm);\n\n\nexport const debugLog = (options, text) => {\n\tif (options.debug) console.log(text);\n}\n\n","import { loadResource } from '../helpers';\nimport { pluginPath } from '../helpers';\n\n/**\n * Retrieves and loads CSS stylesheets based on the provided options and ES5 filename.\n *\n * @param {Object} options - Configuration options for loading CSS.\n * @param {string} fileName - The filename of the script.\n */\n\nexport const getAndLoadCSS = (options, fileName) => {\n\tlet thePath = pluginPath(fileName);\n\tlet pluginBaseName = fileName.replace(/\\.[^/.]+$/, \"\");\n\n\tif (options.cssautoload) {\n\t\tlet AppearanceStylePath = options.csspath.appearance ? options.csspath.appearance : null || `${thePath}${pluginBaseName}.css` || `plugin/${pluginBaseName}/${pluginBaseName}.css`\n\t\tlet AnimateCSSPath = !options.compatibility ? options.animatecsspath.link : options.animatecsspath.compat;\n\t\n\t\tif (options.debug) {\n\t\t\tconsole.log(`Paths:`);\n\t\t\tconsole.log(` - Plugin path = ${thePath}`);\n\t\t\tconsole.log(` - Appearance CSS path = ${AppearanceStylePath}`);\n\t\t\tconsole.log(` - AnimateCSS CSS path = ${AnimateCSSPath}`);\n\t\t}\n\t\n\t\tloadResource(AnimateCSSPath, 'stylesheet', function () {\n\t\t\tloadResource(AppearanceStylePath, 'stylesheet');\n\t\t});\n\t}\n}","import { copyDataAttributes } from '../helpers';\n\n/**\n * Hoist a list item's appearance to its parent element's appearance.\n *\n * @param {HTMLElement} from - The list item element.\n * @returns {undefined}\n */\nconst hoistAppearance = (from, baseclass) => {\n\tlet to = from.parentNode;\n\tif (!to) return;\n \n\tfor (const sibling of to.children) {\n\t if (sibling !== from && sibling.dataset.appearParent) return;\n\t}\n \n\tto.classList = from.classList;\n\tcopyDataAttributes(from, to, \"data-appear-parent\");\n\tto.innerHTML = from.innerHTML;\n\tto.classList.add(baseclass);\n};\n\n\n/**\n * Fix list items that were changed by Quarto.\n *\n * This function is designed for use with Quarto and handles the conversion of list items\n * with Appearance classes to their parent elements when a manual attribute is present.\n * It also provides automatic conversion for list items that directly contain spans, which\n * is related to Quarto's wrapping of list content in a span.\n *\n * @param {HTMLElement} appearance - The list item element whose appearance will be converted.\n * @param {Object} options - An options object that controls the conversion behavior.\n * @param {boolean} options.appearparents - If `true`, automatic conversion of list items with spans is enabled.\n * @returns {undefined}\n */\nexport const fixListItem = (appearance, options, names) => {\n\n\tlet baseclass = names.baseclass\n\tif (appearance.hasAttribute(\"data-appear-parent\")) {\n\t\thoistAppearance(appearance, baseclass);\n\t}\n\n\tif (options.appearparents) {\n\t\tif (appearance.parentNode && appearance.parentNode.tagName) {\n\t\t\tif (appearance.tagName == \"SPAN\" && appearance.parentNode.tagName == \"LI\") {\n\t\t\t\tlet spanLength = String(appearance.outerHTML).length;\n\t\t\t\tlet liContentLength = String(appearance.parentNode.innerHTML).length;\n\t\t\t\tif (spanLength == liContentLength) {\n\t\t\t\t\thoistAppearance(appearance);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","/**\n * Selects elements with a specified class that are not nested inside an element with another specified class.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} excludeClass - The class name to exclude elements nested inside it.\n * @param {Element} el - The element to find the target elements in.\n * @returns {Element[]} - Array of selected elements.\n */\nconst elemsNotInClass = (targetClass, excludeClass, el) => \n Array.from(el.querySelectorAll(`.${targetClass}`))\n .filter(s => !s.closest(`.${excludeClass}`));\n\n/**\n * Selects elements with a specified class that are nested inside an element with another specified class.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} parentClass - The class name of the parent to find elements in.\n * @param {Element} el - The element to find the target elements in.\n * @returns {Element[]} - Array of selected elements.\n */\nconst elemsInClass = (targetClass, parentClass, el) =>\n Array.from(el.querySelectorAll(`.${targetClass}`))\n .filter(s => s.closest(`.${parentClass}`) === el);\n\n/**\n * Extracts groups of elements with a specified class from the provided section element.\n * Groups are formed based on nesting inside elements with another specified class.\n * @param {Element} section - The section to extract data from.\n * @returns {Element[][]} - Nested arrays of selected elements.\n */\n\n\n/**\n * Extracts groups of elements with a specified class from the provided section element.\n * Groups are formed based on nesting inside elements with another specified class.\n * @param {Element} section - The section to extract data from.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} groupClass - The class name of the parent to find elements in.\n * @returns {Element[][]} - Nested arrays of selected elements.\n */\nexport const getAppearanceArrays = (section, targetClass, groupClass) => {\n const result = [\n elemsNotInClass(targetClass, groupClass, section), \n ...Array.from(section.querySelectorAll(`.${groupClass}`))\n .map(frag => elemsInClass(targetClass, groupClass, frag))\n ];\n\n\tif (result.some(group => group.length > 0)) {\n return result;\n } else {\n\t\treturn false;\n\t}\n};\n","/**\n * Derives slide from and to from the event object.\n *\n * @param {Object} event - The event object containing slide transition details.\n * @returns {Object} - An object containing references to the \"from\" and \"to\" slides.\n */\nconst fromTo = (event) => {\n\tlet slides = {};\n\tslides.from = event.fromSlide || event.previousSlide || null;\n\tslides.to = event.toSlide || event.currentSlide || null;\n\treturn slides;\n};\n\n/**\n * A function that determines the appearance event for a given slide.\n *\n * This function checks the `data-appearevent` attribute of the slide and the `options.appearevent` parameter.\n * If `data-appearevent` is set to \"auto\", it is converted to \"autoanimate\". If `options.appearevent` is \"auto\", it is also converted to \"autoanimate\".\n * The function returns the appearance event, prioritizing `data-appearevent` over `options.appearevent`.\n *\n * @param {HTMLElement} toSlide - The slide for which the appearance event is determined.\n * @param {Object} options - An object containing options for the appearance event.\n * @param {string} options.appearevent - The appearance event option provided in the `options` object.\n *\n * @returns {string} - The determined appearance event for the slide, either from `data-appearevent` or `options.appearevent`.\n */\nconst slideAppearevent = (toSlide, options) => {\n\n\tif (toSlide.dataset.appearevent && toSlide.dataset.appearevent === \"auto\" ) {\n\t\ttoSlide.dataset.appearevent = \"autoanimate\"\n\t}\n\tif (options.appearevent == \"auto\") {options.appearevent = \"autoanimate\"}\n\treturn toSlide.dataset.appearevent ? toSlide.dataset.appearevent : options.appearevent;\n};\n\n/**\n * Remove the 'data-appearance-can-start' attribute from the 'from' slide if the 'hideagain' option is enabled.\n *\n * @param {HTMLElement} slides - The container element for the slides.\n * @param {Object} options - An object containing configuration options.\n * @param {boolean} options.hideagain - A flag indicating whether to remove the attribute when 'hideagain' is true.\n */\nconst removeStartAttribute = (slides, options) => {\n\tif (options.hideagain) {\n\t\tif (slides.from && slides.from.dataset.appearanceCanStart ) {\n\t\t\tslides.from.removeAttribute('data-appearance-can-start');\n\t\t}\n\t}\n};\n\n\n/**\n * Turn off slide appearances when transitioning from one slide to another if the 'hideagain' option is enabled.\n *\n * @param {HTMLElement} slides - The container element for the slides.\n * @param {Object} options - An object containing configuration options.\n * @param {string} names.animatecss - The CSS selector for animated elements.\n */\nconst turnOffSlideAppearances = (slides, options, names) => {\n\tif (options.hideagain) {\n\t\tif (slides && slides.from) {\n\n\t\t\t// Remove animationended class from animated elements when moving away from that slide\n\t\t\tlet fromAppearances = slides.from.querySelectorAll(names.animatecss);\n\t\t\tif (fromAppearances) {\n\t\t\t\tfromAppearances.forEach( appearance => {\n\t\t\t\t\tappearance.classList.remove('animationended');\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Remove visible class from fragments when moving away from that slide\n\t\t\tlet fromFragments = slides.from.querySelectorAll(`.fragment.visible`);\n\t\t\tif (fromFragments) {\n\t\t\t\tfromFragments.forEach(fragment => {\n\t\t\t\t\tfragment.classList.remove('visible');\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n};\n\n\n/**\n * Handles the showing and hiding of slides based on the provided event and options.\n *\n * @param {Object} event - The event object containing slide transition details.\n * @param {Object} options - An object containing configurations for slide appearance management.\n */\nexport const showHideSlide = (event, options, names, vars) => {\n\n\tlet view = vars.deck.getConfig().view;\n\tlet isScroll = vars.viewport.classList.contains(\"reveal-scroll\");\n\tlet etype = event.type;\n\tlet slides = fromTo(event);\n\n\tif (slides.to) {\n\n\t\tif (etype == \"ready\") {\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t}\n\n\t\tlet appearevent = slideAppearevent(slides.to, options)\n\n\t\tif (etype == appearevent || (etype == \"slidetransitionend\" && appearevent == \"autoanimate\")) {\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t}\n\n\t\t// Add scroll mode compatibility, does not have a slidetransitionend event yet\n\t\tif (isScroll && etype == 'slidechanged' ) {\n\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tturnOffSlideAppearances(slides, options, names);\n\n\t\t\t// Add delay to allow for scroll animation to finish\n\t\t\tsetTimeout(() => {\n\t\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t\t}, options.delay)\n\t\t}\n\n\n\t\tif (etype == \"slidetransitionend\" ) {\n\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tturnOffSlideAppearances(slides, options, names);\n\t\t}\n\t\t\n\t\tif (etype == 'slidechanged' && document.body.dataset.exitoverview) {\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\n\t\t} else if (etype == 'overviewhidden' ) {\n\n\t\t\tdocument.body.dataset.exitoverview = true;\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tdocument.body.removeAttribute('data-exitoverview')\n\t\t\t}, 500)\n\n\t\t\tif (event.currentSlide ) {\n\t\t\t\tremoveStartAttribute(slides, options);\n\t\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t\t}\n\t\t}\n\t}\n}","import { debugLog, mergeDeep, doneLoading, isStack } from './helpers';\n\nimport {getAndLoadCSS} from './functions/get-load-css.js';\nimport {addAutoAnimation} from './functions/add-auto-animation.js';\nimport {fixListItem} from './functions/fix-list-item';\nimport {addBaseClass} from './functions/add-base-class.js';\nimport {addDelay} from './functions/add-delay.js';\nimport {getAppearanceArrays} from './functions/get-appearance-arrays.js';\nimport {convertToSpans} from './functions/convert-to-spans';\nimport {showHideSlide} from './functions/show-hide-slide.js';\n\n\nconst Plugin = () => {\n\n\tconst vars = {};\n\tvars.names = {};\n\tlet options = {};\n\n\t/**\n\t* Prepare the plugin to find Appearance elements\n\t* @param {Object} vars - The variables to be prepared.\n\t* @param {Object} names - The names to be prepared.\n\t* @param {Function} resolve - The callback function to be called when preparation is complete.\n\t* @throws {Error} Throws an error if the 'options' object is not defined.\n\t*/\n\tconst prepare = (options, vars, resolve) => {\n\n\t\tdebugLog(options, \"------------- Preloading -------------\");\n\n\t\tlet names = vars.names;\n\n\t\tgetAndLoadCSS(options, names.es5Filename);\n\n\t\tif (options.compatibility) {\n\t\t\tnames.animatecss = '.backInDown, .backInLeft, .backInRight, .backInUp, .bounceIn, .bounceInDown, .bounceInLeft, .bounceInRight, .bounceInUp, .fadeIn, .fadeInDown, .fadeInDownBig, .fadeInLeft, .fadeInLeftBig, .fadeInRight, .fadeInRightBig, .fadeInUp, .fadeInUpBig, .fadeInTopLeft, .fadeInTopRight, .fadeInBottomLeft, .fadeInBottomRight, .flipInX, .flipInY, .lightSpeedInRight, .lightSpeedInLeft, .rotateIn, .rotateInDownLeft, .rotateInDownRight, .rotateInUpLeft, .rotateInUpRight, .jackInTheBox, .rollIn, .zoomIn, .zoomInDown, .zoomInLeft, .zoomInRight, .zoomInUp, .slideInDown, .slideInLeft, .slideInRight, .slideInUp, .skidLeft, .skidLeftBig, .skidRight, .skidRightBig, .shrinkIn, .shrinkInBlur';\n\t\t\tnames.baseclass = options.compatibilitybaseclass\n\t\t}\n\n\t\tvars.appearances = Array.from(vars.slides.querySelectorAll(names.animatecss));\n\n\t\t// Go through each section to see if there are any (auto) selectors that need animation classes\n\t\tvars.regularSections.forEach(theSection => addAutoAnimation(theSection, options, vars));\n\n\t\tvars.appearances.forEach((theAppearance, index) => {\n\t\t\t// Fix any list item where the Appearance classes were moved to the span (Quarto does this)\n\t\t\tfixListItem(theAppearance, options, names);\n\n\t\t\t// Go through each appearance element and add the baseclass if it doesn't have it\n\t\t\taddBaseClass(theAppearance, names);\n\n\t\t\tif (theAppearance.hasAttribute('data-split')) {\n\t\t\t\tconvertToSpans(theAppearance, theAppearance.dataset.split);\n\t\t\t}\n\t\t});\n\n\t\tvars.regularSections.forEach((theSection, index) => {\n\t\t\t// Get all the Appearances in the section as separate arrays per delay loop\n\t\t\tlet appearanceArrays = getAppearanceArrays(theSection, names.baseclass, names.fragmentClass);\n\n\t\t\tif (appearanceArrays) {\n\t\t\t\tappearanceArrays.forEach((appearanceArray) => {\n\t\t\t\t\t// Add the delays to each appearance in the array\n\t\t\t\t\taddDelay(appearanceArray, options, names)\n\t\t\t\t})\n\t\t\t}\n\t\t});\n\n\t\tdoneLoading(resolve);\n\t}\n\n\t/**\n\t* The main function of the plugin\n\t* @param {object} deck - The deck object\n\t* @param {object} options - The options object\n\t* @param {string} es5Filename - The name of the file that will be used\n\t*/\n\tconst Appear = (deck, options, es5Filename) => {\n\n\t\tlet names = vars.names;\n\n\t\t// Set up names\n\t\tnames.baseclass = options.baseclass;\n\t\tnames.compatibilitybaseclass = options.compatibilitybaseclass;\n\t\tnames.fragmentSelector = \".fragment\";\n\t\tnames.fragmentClass = \"fragment\";\n\t\tnames.speedClasses = ['slower', 'slow', 'fast', 'faster'];\n\t\tnames.speedClasses.push(...names.speedClasses.map(speed => `animate__${speed}`));\n\t\tnames.animatecss = '[class^=\"animate__\"],[class*=\" animate__\"]';\n\t\tnames.es5Filename = es5Filename;\n\t\tnames.eventnames = ['ready', 'slidechanged', 'slidetransitionend', 'autoanimate', 'overviewhidden'];\n\t\n\t\t// Set up variables\n\t\tvars.deck = deck;\n\t\tvars.dom = deck.getRevealElement();\n\t\tvars.viewport = deck.getViewportElement();\n\t\tvars.slides = deck.getSlidesElement();\n\n\t\tvars.sections = vars.slides.querySelectorAll('section');\n\t\tvars.fragments = vars.slides.querySelectorAll(names.fragmentSelector);\n\t\tvars.regularSections = Array.from(vars.sections).filter( section => !isStack(section));\n\n\t\t// Check if Speaker view window\n\t\tif( /receiver/i.test( window.location.search ) ) vars.viewport.classList.add('sv');\n\n\t\tnames.eventnames.forEach( (eventname) => deck.on( eventname, event => { showHideSlide(event, options, names, vars) } ) );\n\n\t\tvars.viewport.addEventListener(\"animationend\", (event) => {\n\t\t\tevent.target.classList.add('animationended');\n\t\t});\n\t\tvars.viewport.addEventListener(\"fragmenthidden\", (event) => {\n\t\t\tevent.fragment.classList.remove('animationended');\n\t\t\tevent.fragment.querySelectorAll('.animationended').forEach(el => {\n\t\t\t\tel.classList.remove('animationended');\n\t\t\t});\n\t\t});\n\n\t\treturn new Promise(resolve => {\n\t\t\tprepare(options, vars, resolve);\n\t\t\tdebugLog(options, \"---------- Done preloading ----------\");\n\t\t});\n\t};\n\n\n\t/**\n\t* Initialize the plugin\n\t* @param {object} deck - The deck object\n\t*/\n\tconst init = (deck) => {\n\n\t\tlet defaultOptions = {\n\t\t\tbaseclass: 'animate__animated',\n\t\t\thideagain: true,\n\t\t\tdelay: 300,\n\t\t\tdebug: false,\n\t\t\tappearevent: 'slidetransitionend',\n\t\t\tautoappear: false,\n\t\t\tautoelements: false,\n\t\t\tappearparents: false,\n\t\t\tcssautoload: true,\n\t\t\tcsspath: '',\n\t\t\tanimatecsspath: {\n\t\t\t\tlink : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css',\n\t\t\t\tcompat : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.compat.css',\n\t\t\t},\n\t\t\tcompatibility: false,\n\t\t\tcompatibilitybaseclass: 'animated'\n\t\t};\n\n\t\toptions = mergeDeep(defaultOptions, deck.getConfig().appearance || {});\n\n\t\treturn Appear(deck, options, \"appearance.js\");\n\t};\n\n\treturn { id: 'appearance', init: init };\n};\n\nexport default Plugin;","import { toJSONString } from '../helpers';\n\n\n/**\n * Adds automatic animations to elements within a section based on specified criteria.\n *\n * This function examines the provided section for attributes and options to determine\n * which classes should be added to its elements to enable automatic animations.\n *\n * @param {HTMLElement} section - The section element to which automatic animations will be applied.\n * @param {Object} options - The existing user options object\n * @param {Object} vars - The existing vars object\n * @returns {undefined}\n */\nexport const addAutoAnimation = (section, options, vars) => {\n\n\tlet sectionAutoSelectors = null;\n\n\tif (section.hasAttribute(\"data-autoappear\")) {\n\n\t\tlet sectDataAppear = section.dataset.autoappear;\n\n\t\tif (sectDataAppear == \"auto\" || sectDataAppear == \"\" || sectDataAppear.length < 1 || sectDataAppear == \"true\") {\n\t\t\t// This section should get the global autoappear classes on its objects\n\t\t\tsectionAutoSelectors = options.autoelements ? options.autoelements : null;\n\t\t} else {\n\t\t\t// This section should get the local autoappear classes on its objects\n\t\t\tsectionAutoSelectors = sectDataAppear;\n\t\t}\n\n\t} else if ( options.autoappear && options.autoelements ) {\n\t\t// This section should get the global autoappear classes on its objects\n\t\tsectionAutoSelectors = options.autoelements;\n\t}\n\n\tif (sectionAutoSelectors) {\n\n\t\tlet elementsToAnimate = JSON.parse(toJSONString(sectionAutoSelectors));\n\n\t\tObject.entries(elementsToAnimate).forEach(([selector, assignables]) => {\n\n\n\t\t\t// Exclude the elements from vars.appearances\n\t\t\tlet elements = Array.from(section.querySelectorAll(selector)).filter( element => !vars.appearances.includes(element) );\n\n\t\t\tif (elements.length) {\n\n\t\t\t\telements.forEach((element) => {\n\n\t\t\t\t\tvars.appearances.push(element)\n\n\t\t\t\t\tlet newClasses = [], newDelay = null, speedClass = false, elementSplit = null, containerDelay = null;\n\n\t\t\t\t\tif (Array.isArray(assignables)) {\n\n\t\t\t\t\t\tnewClasses = assignables[0].split(/[ ,]+/);\n\t\t\t\t\t\tnewDelay = assignables[1];\n\n\t\t\t\t\t} else if (typeof assignables == \"string\"){\n\n\t\t\t\t\t\tnewClasses = assignables.split(/[ ,]+/);\n\n\t\t\t\t\t} else if (assignables.constructor === Object) {\n\n\t\t\t\t\t\tif (assignables.class || assignables.animation) {\n\t\t\t\t\t\t\tlet animationClass = assignables.animation ? assignables.animation : assignables.class;\n\t\t\t\t\t\t\tnewClasses = animationClass.split(/[ ,]+/);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.speed) {\n\t\t\t\t\t\t\tspeedClass = String(assignables.speed);\n\t\t\t\t\t\t\tif (!speedClass.includes(\"animate__\")) {\n\t\t\t\t\t\t\t\tspeedClass = `animate__${speedClass}`\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.delay) {\n\t\t\t\t\t\t\tnewDelay = String(assignables.delay);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.split) {\n\t\t\t\t\t\t\telementSplit = String(assignables.split);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables[\"container-delay\"]) {\n\t\t\t\t\t\t\tcontainerDelay = String(assignables[\"container-delay\"]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telement.classList.add(...newClasses);\n\t\t\t\t\tif (speedClass) { element.classList.add(speedClass)}\n\n\t\t\t\t\tif (newDelay) {\n\t\t\t\t\t\tif (!element.dataset.delay) {\n\t\t\t\t\t\t\telement.dataset.delay = newDelay\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (elementSplit) {element.dataset.split = elementSplit};\n\t\t\t\t\tif (containerDelay) {element.dataset.containerDelay = containerDelay};\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n","/**\n * Adds a base class to an HTML element if it doesn't already have it.\n *\n * This function checks if the specified HTML element has the specified base class,\n * and if not, it adds the base class to the element's class list.\n *\n * @param {HTMLElement} appearance - The HTML element to which the base class should be added.\n * @param {Object} names - The existing 'names' object\n * @returns {undefined}\n */\n\nexport const addBaseClass = (appearance, names) => {\n\tif (!appearance.classList.contains(names.baseclass)) {\n\t\tappearance.classList.add(names.baseclass);\n\t}\n\tif (appearance.classList.contains(names.fragmentClass)) {\n\t\tappearance.classList.add('custom');\n\t}\n}\n","export const convertToSpans = (parent, kind) => {\n\n\tlet splitElements = false;\n\tlet joinChar = ' ';\n\n\tif (kind == \"words\") {\n\t\tsplitElements = parent.textContent.trim().split(/\\s+/);\n\t\t\n\t} else if (kind == \"letters\") {\n\t\tsplitElements = parent.textContent.trim().split('');\n\t\tjoinChar = '';\n\t}\n\n\tif (splitElements) {\n\t\tconst parentAnimateClasses = Array.from(parent.classList).filter(className => className.startsWith('animate__'));\n\t\n\t\tconst newHtml = splitElements.map((element, index) => {\n\t\t\tconst span = document.createElement('span');\n\t\t\tspan.textContent = element;\n\t\t\tif (element == \" \") {span.textContent = \"\\u00A0\"}\n\t\n\t\t\tif (parent.dataset.delay && index !== 0) {\n\t\t\t\tspan.dataset.delay = parent.dataset.delay\n\t\t\t}\n\n\t\t\tif (parent.dataset.containerDelay && index === 0) {\n\t\t\t\tspan.dataset.delay = parent.dataset.containerDelay\n\t\t\t}\n\t\t\tparent.classList.add('wordchargroup');\n\t\n\t\t\tparent.classList.forEach(className => className.startsWith('animate__') && span.classList.add(className));\n\t\t\treturn span.outerHTML;\n\t\t\t\n\t\t}).join(joinChar);\n\t\n\t\tparentAnimateClasses.forEach(className => parent.classList.remove(className));\n\t\tparent.removeAttribute('data-delay');\n\t\tparent.removeAttribute('data-split');\n\t\tparent.removeAttribute('data-container-delay');\n\t\n\t\tparent.innerHTML = newHtml;\n\t}\n\n\n};","export const addDelay = (appearanceArray, options, names) => {\n\n let delay = 0;\n appearanceArray.forEach((appearance, index) => {\n\n if ((index == 0 && appearance.dataset.delay) || index !=0) {\n\n let elementDelay = options.delay;\n\n if (appearance.dataset && appearance.dataset.delay) {\n elementDelay = parseInt(appearance.dataset.delay);\n }\n\n delay = delay + elementDelay;\n\n appearance.style.setProperty('animation-delay', delay + \"ms\");\n appearance.removeAttribute('data-delay');\n }\n\n })\n\n}\n"],"names":["isObject","item","Array","isArray","mergeDeep","target","sources","length","source","shift","key","Object","assign","toJSONString","str","JSONString","replace","JSON","parse","e","isJSON","stringify","trim","charAt","loadResource","url","type","callback","resource","head","document","querySelector","alreadyExists","createElement","rel","href","finish","call","onload","onreadystatechange","this","readyState","appendChild","debugLog","options","text","debug","console","log","getAndLoadCSS","fileName","thePath","path","pluginScript","getAttribute","slice","lastIndexOf","pluginPath","pluginBaseName","cssautoload","AppearanceStylePath","csspath","appearance","AnimateCSSPath","compatibility","animatecsspath","compat","link","hoistAppearance","from","baseclass","to","parentNode","sibling","children","dataset","appearParent","classList","copyDataAttributes","attributes","not","filter","nodeName","includes","forEach","nodeValue","setAttribute","innerHTML","add","elemsNotInClass","targetClass","excludeClass","el","querySelectorAll","s","closest","getAppearanceArrays","section","groupClass","result","map","frag","elemsInClass","parentClass","some","group","removeStartAttribute","slides","hideagain","appearanceCanStart","removeAttribute","turnOffSlideAppearances","names","fromAppearances","animatecss","remove","fromFragments","fragment","Plugin","vars","prepare","resolve","es5Filename","compatibilitybaseclass","appearances","regularSections","theSection","addAutoAnimation","sectionAutoSelectors","hasAttribute","sectDataAppear","autoappear","autoelements","elementsToAnimate","entries","selector","assignables","elements","element","push","newClasses","newDelay","speedClass","elementSplit","containerDelay","split","constructor","class","animation","speed","String","delay","theAppearance","index","fixListItem","appearparents","tagName","outerHTML","addBaseClass","contains","fragmentClass","convertToSpans","parent","kind","splitElements","joinChar","textContent","parentAnimateClasses","className","startsWith","newHtml","span","join","appearanceArrays","appearanceArray","addDelay","elementDelay","parseInt","style","setProperty","setTimeout","doneLoading","Appear","deck","fragmentSelector","speedClasses","eventnames","dom","getRevealElement","viewport","getViewportElement","getSlidesElement","sections","fragments","isStack","childNodes","i","test","window","location","search","eventname","on","event","showHideSlide","getConfig","view","isScroll","etype","fromSlide","previousSlide","toSlide","currentSlide","fromTo","appearevent","slideAppearevent","body","exitoverview","addEventListener","Promise","id","init"],"mappings":";;;;;;;;;;;;;;AAKO,MAyDMA,EAAYC,GAChBA,GAAwB,iBAATA,IAAsBC,MAAMC,QAAQF,GAS/CG,EAAYA,CAACC,KAAWC,KACpC,IAAKA,EAAQC,OAAQ,OAAOF,EAC5B,MAAMG,EAASF,EAAQG,QAEvB,GAAIT,EAASK,IAAWL,EAASQ,GAChC,IAAK,MAAME,KAAOF,EACbR,EAASQ,EAAOE,KACdL,EAAOK,IAAMC,OAAOC,OAAOP,EAAQ,CAAEK,CAACA,GAAM,CAAC,IAClDN,EAAUC,EAAOK,GAAMF,EAAOE,KAE9BC,OAAOC,OAAOP,EAAQ,CAAEK,CAACA,GAAMF,EAAOE,KAIzC,OAAON,EAAUC,KAAWC,EAAQ,EAmBxBO,EAAgBC,IAC5B,IAAIC,EAAa,GAajB,MAXmB,iBAARD,IAAkBA,EAAMA,EAAIE,QAAQ,QAAQ,KAAKA,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,GAAI,aAAcC,KA1BbtC,IAqBb3I,EAAUxC,EAnBW,CACpBkE,UAAW,oBACXsC,WAAW,EACX2C,MAAO,IACPzG,OAAO,EACPwK,YAAa,qBACbnF,YAAY,EACZC,cAAc,EACduB,eAAe,EACfhG,aAAa,EACbE,QAAS,GACTI,eAAgB,CACfE,KAAO,2EACPD,OAAS,+EAEVF,eAAe,EACf2D,uBAAwB,YAGW4D,EAAKsB,YAAY/I,YAAc,CAAA,GAE5DwH,EAAOC,EAAM3I,EAAS,kBAGS"} \ No newline at end of file diff --git a/demo/plugin/appearance/appearance.js b/demo/plugin/appearance/appearance.js index 6350a41..8106211 100644 --- a/demo/plugin/appearance/appearance.js +++ b/demo/plugin/appearance/appearance.js @@ -12,5 +12,5 @@ * Copyright (C) 2023 Martijn De Jongh (Martino) * ******************************************************************/ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Appearance=t()}(this,(function(){"use strict";var e="undefined"!=typeof document?document.currentScript:null;const t=e=>e&&"object"==typeof e&&!Array.isArray(e),a=(e,...n)=>{if(!n.length)return e;const s=n.shift();if(t(e)&&t(s))for(const n in s)t(s[n])?(e[n]||Object.assign(e,{[n]:{}}),a(e[n],s[n])):Object.assign(e,{[n]:s[n]});return a(e,...n)},n=e=>{let t="";return"string"==typeof e&&(e=e.replace(/[“”]/g,'"').replace(/[‘’]/g,"'")),t=(e=>{try{return JSON.parse(e)&&!!e}catch(e){return!1}})(e)?e:"object"==typeof e?JSON.stringify(e,null,2):"{"===e.trim().replace(/'/g,'"').charAt(0)?e.trim().replace(/'/g,'"'):`{${e.trim().replace(/'/g,'"')}}`,t},s=(e,t,a)=>{let n,s=document.querySelector("head"),r=!1;if("script"===t?document.querySelector(`script[src="${e}"]`)?r=!0:(n=document.createElement("script"),n.type="text/javascript",n.src=e):"stylesheet"===t&&(document.querySelector(`link[href="${e}"]`)?r=!0:(n=document.createElement("link"),n.rel="stylesheet",n.href=e)),!r){const e=()=>{"function"==typeof a&&(a.call(),a=null)};n.onload=e,n.onreadystatechange=function(){"loaded"===this.readyState&&e()},s.appendChild(n)}},r=(e,t)=>{e.debug&&console.log(t)},i=(t,a)=>{let n=(t=>{let a,n=document.querySelector(`script[src$="${t}"]`);return a=n?n.getAttribute("src").slice(0,-1*t.length):("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:e&&e.src||new URL("appearance.js",document.baseURI).href).slice(0,("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:e&&e.src||new URL("appearance.js",document.baseURI).href).lastIndexOf("/")+1),a})(a),r=a.replace(/\.[^/.]+$/,"");if(t.cssautoload){let e=t.csspath.appearance?t.csspath.appearance:`${n}${r}.css`||`plugin/${r}/${r}.css`,a=t.compatibility?t.animatecsspath.compat:t.animatecsspath.link;t.debug&&(console.log("Paths:"),console.log(` - Plugin path = ${n}`),console.log(` - Appearance CSS path = ${e}`),console.log(` - AnimateCSS CSS path = ${a}`)),s(a,"stylesheet",(function(){s(e,"stylesheet")}))}},o=(e,t)=>{let a=e.parentNode;if(a){for(const t of a.children)if(t!==e&&t.dataset.appearParent)return;a.classList=e.classList,(({attributes:e},t,a)=>{[...e].filter((({nodeName:e})=>e.includes("data"))).forEach((({nodeName:e,nodeValue:n})=>{(a&&e!==a||!a)&&t.setAttribute(e,n)}))})(e,a,"data-appear-parent"),a.innerHTML=e.innerHTML,a.classList.add(t)}},l=(e,t,a)=>Array.from(a.querySelectorAll(`.${e}`)).filter((e=>!e.closest(`.${t}`))),c=(e,t,a)=>{const n=[l(t,a,e),...Array.from(e.querySelectorAll(`.${a}`)).map((e=>((e,t,a)=>Array.from(a.querySelectorAll(`.${e}`)).filter((e=>e.closest(`.${t}`)===a)))(t,a,e)))];return!!n.some((e=>e.length>0))&&n},d=(e,t)=>{t.hideagain&&e.from&&e.from.dataset.appearanceCanStart&&e.from.removeAttribute("data-appearance-can-start")},p=(e,t,a)=>{if(t.hideagain&&e&&e.from){let t=e.from.querySelectorAll(a.animatecss);t&&t.forEach((e=>{e.classList.remove("animationended")}));let n=e.from.querySelectorAll(".fragment.visible");n&&n.forEach((e=>{e.classList.remove("visible")}))}};return()=>{const e={names:{}};let t={};const s=(e,t,a)=>{r(e,"------------- Preloading -------------");let s=t.names;i(e,s.es5Filename),e.compatibility&&(s.animatecss=".backInDown, .backInLeft, .backInRight, .backInUp, .bounceIn, .bounceInDown, .bounceInLeft, .bounceInRight, .bounceInUp, .fadeIn, .fadeInDown, .fadeInDownBig, .fadeInLeft, .fadeInLeftBig, .fadeInRight, .fadeInRightBig, .fadeInUp, .fadeInUpBig, .fadeInTopLeft, .fadeInTopRight, .fadeInBottomLeft, .fadeInBottomRight, .flipInX, .flipInY, .lightSpeedInRight, .lightSpeedInLeft, .rotateIn, .rotateInDownLeft, .rotateInDownRight, .rotateInUpLeft, .rotateInUpRight, .jackInTheBox, .rollIn, .zoomIn, .zoomInDown, .zoomInLeft, .zoomInRight, .zoomInUp, .slideInDown, .slideInLeft, .slideInRight, .slideInUp, .skidLeft, .skidLeftBig, .skidRight, .skidRightBig, .shrinkIn, .shrinkInBlur",s.baseclass=e.compatibilitybaseclass),t.appearances=Array.from(t.slides.querySelectorAll(s.animatecss)),t.regularSections.forEach((a=>((e,t,a)=>{let s=null;if(e.hasAttribute("data-autoappear")){let a=e.dataset.autoappear;s="auto"==a||""==a||a.length<1||"true"==a?t.autoelements?t.autoelements:null:a}else t.autoappear&&t.autoelements&&(s=t.autoelements);if(s){let t=JSON.parse(n(s));Object.entries(t).forEach((([t,n])=>{let s=Array.from(e.querySelectorAll(t)).filter((e=>!a.appearances.includes(e)));s.length&&s.forEach((e=>{a.appearances.push(e);let t=[],s=null,r=!1,i=null,o=null;Array.isArray(n)?(t=n[0].split(/[ ,]+/),s=n[1]):"string"==typeof n?t=n.split(/[ ,]+/):n.constructor===Object&&((n.class||n.animation)&&(t=(n.animation?n.animation:n.class).split(/[ ,]+/)),n.speed&&(r=String(n.speed),r.includes("animate__")||(r=`animate__${r}`)),n.delay&&(s=String(n.delay)),n.split&&(i=String(n.split)),n["container-delay"]&&(o=String(n["container-delay"]))),e.classList.add(...t),r&&e.classList.add(r),s&&(e.dataset.delay||(e.dataset.delay=s)),i&&(e.dataset.split=i),o&&(e.dataset.containerDelay=o)}))}))}})(a,e,t))),t.appearances.forEach(((t,a)=>{((e,t,a)=>{let n=a.baseclass;e.hasAttribute("data-appear-parent")&&o(e,n),t.appearparents&&e.parentNode&&e.parentNode.tagName&&"SPAN"==e.tagName&&"LI"==e.parentNode.tagName&&String(e.outerHTML).length==String(e.parentNode.innerHTML).length&&o(e)})(t,e,s),((e,t)=>{e.classList.contains(t.baseclass)||e.classList.add(t.baseclass),e.classList.contains(t.fragmentClass)&&e.classList.add("custom")})(t,s),t.hasAttribute("data-split")&&((e,t)=>{let a=!1,n=" ";if("words"==t?a=e.textContent.trim().split(/\s+/):"letters"==t&&(a=e.textContent.trim().split(""),n=""),a){const t=Array.from(e.classList).filter((e=>e.startsWith("animate__"))),s=a.map(((t,a)=>{const n=document.createElement("span");return n.textContent=t," "==t&&(n.textContent=" "),e.dataset.delay&&0!==a&&(n.dataset.delay=e.dataset.delay),e.dataset.containerDelay&&0===a&&(n.dataset.delay=e.dataset.containerDelay),e.classList.add("wordchargroup"),e.classList.forEach((e=>e.startsWith("animate__")&&n.classList.add(e))),n.outerHTML})).join(n);t.forEach((t=>e.classList.remove(t))),e.removeAttribute("data-delay"),e.removeAttribute("data-split"),e.removeAttribute("data-container-delay"),e.innerHTML=s}})(t,t.dataset.split)})),t.regularSections.forEach(((t,a)=>{let n=c(t,s.baseclass,s.fragmentClass);n&&n.forEach((t=>{((e,t,a)=>{let n=0;e.forEach(((e,a)=>{if(0==a&&e.dataset.delay||0!=a){let a=t.delay;e.dataset&&e.dataset.delay&&(a=parseInt(e.dataset.delay)),n+=a,e.style.setProperty("animation-delay",n+"ms"),e.removeAttribute("data-delay")}}))})(t,e)}))})),(e=>{setTimeout(e,0)})(a)},l=(t,a,n)=>{let i=e.names;return i.baseclass=a.baseclass,i.compatibilitybaseclass=a.compatibilitybaseclass,i.fragmentSelector=".fragment",i.fragmentClass="fragment",i.speedClasses=["slower","slow","fast","faster"],i.speedClasses.push(...i.speedClasses.map((e=>`animate__${e}`))),i.animatecss='[class^="animate__"],[class*=" animate__"]',i.es5Filename=n,i.eventnames=["ready","slidechanged","slidetransitionend","autoanimate","overviewhidden"],e.deck=t,e.dom=t.getRevealElement(),e.viewport=t.getViewportElement(),e.slides=t.getSlidesElement(),e.sections=e.slides.querySelectorAll("section"),e.fragments=e.slides.querySelectorAll(i.fragmentSelector),e.regularSections=Array.from(e.sections).filter((e=>!(({childNodes:e})=>{let t=!1;for(let a=0;at.on(n,(t=>{((e,t,a,n)=>{n.deck.getConfig().view;let s=n.viewport.classList.contains("reveal-scroll"),r=e.type,i=(e=>{let t={};return t.from=e.fromSlide||e.previousSlide||null,t.to=e.toSlide||e.currentSlide||null,t})(e);if(i.to){"ready"==r&&(i.to.dataset.appearanceCanStart=!0);let n=((e,t)=>(e.dataset.appearevent&&"auto"===e.dataset.appearevent&&(e.dataset.appearevent="autoanimate"),"auto"==t.appearevent&&(t.appearevent="autoanimate"),e.dataset.appearevent?e.dataset.appearevent:t.appearevent))(i.to,t);(r==n||"slidetransitionend"==r&&"autoanimate"==n)&&(i.to.dataset.appearanceCanStart=!0),s&&"slidechanged"==r&&(d(i,t),p(i,t,a),setTimeout((()=>{i.to.dataset.appearanceCanStart=!0}),t.delay)),"slidetransitionend"==r&&(d(i,t),p(i,t,a)),"slidechanged"==r&&document.body.dataset.exitoverview?(d(i,t),i.to.dataset.appearanceCanStart=!0):"overviewhidden"==r&&(document.body.dataset.exitoverview=!0,setTimeout((()=>{document.body.removeAttribute("data-exitoverview")}),500),e.currentSlide&&(d(i,t),i.to.dataset.appearanceCanStart=!0))}})(t,a,i,e)})))),e.viewport.addEventListener("animationend",(e=>{e.target.classList.add("animationended")})),e.viewport.addEventListener("fragmenthidden",(e=>{e.fragment.classList.remove("animationended"),e.fragment.querySelectorAll(".animationended").forEach((e=>{e.classList.remove("animationended")}))})),new Promise((t=>{s(a,e,t),r(a,"---------- Done preloading ----------")}))};return{id:"appearance",init:e=>(t=a({baseclass:"animate__animated",hideagain:!0,delay:300,debug:!1,appearevent:"slidetransitionend",autoappear:!1,autoelements:!1,appearparents:!1,cssautoload:!0,csspath:"",animatecsspath:{link:"https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css",compat:"https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.compat.css"},compatibility:!1,compatibilitybaseclass:"animated"},e.getConfig().appearance||{}),l(e,t,"appearance.js"))}}})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Appearance=t()}(this,(function(){"use strict";var e="undefined"!=typeof document?document.currentScript:null;const t=e=>e&&"object"==typeof e&&!Array.isArray(e),a=(e,...n)=>{if(!n.length)return e;const s=n.shift();if(t(e)&&t(s))for(const n in s)t(s[n])?(e[n]||Object.assign(e,{[n]:{}}),a(e[n],s[n])):Object.assign(e,{[n]:s[n]});return a(e,...n)},n=e=>{let t="";return"string"==typeof e&&(e=e.replace(/[“”]/g,'"').replace(/[‘’]/g,"'")),t=(e=>{try{return JSON.parse(e)&&!!e}catch(e){return!1}})(e)?e:"object"==typeof e?JSON.stringify(e,null,2):"{"===e.trim().replace(/'/g,'"').charAt(0)?e.trim().replace(/'/g,'"'):`{${e.trim().replace(/'/g,'"')}}`,t},s=(e,t,a)=>{let n,s=document.querySelector("head"),r=!1;if(document.querySelector(`link[href="${e}"]`)?r=!0:(n=document.createElement("link"),n.rel="stylesheet",n.href=e),!r){const e=()=>{"function"==typeof a&&(a.call(),a=null)};n.onload=e,n.onreadystatechange=function(){"loaded"===this.readyState&&e()},s.appendChild(n)}},r=(e,t)=>{e.debug&&console.log(t)},i=(t,a)=>{let n=(t=>{let a,n=document.querySelector(`script[src$="${t}"]`);return a=n?n.getAttribute("src").slice(0,-1*t.length):("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:e&&"SCRIPT"===e.tagName.toUpperCase()&&e.src||new URL("appearance.js",document.baseURI).href).slice(0,("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:e&&"SCRIPT"===e.tagName.toUpperCase()&&e.src||new URL("appearance.js",document.baseURI).href).lastIndexOf("/")+1),a})(a),r=a.replace(/\.[^/.]+$/,"");if(t.cssautoload){let e=t.csspath.appearance?t.csspath.appearance:`${n}${r}.css`||`plugin/${r}/${r}.css`,a=t.compatibility?t.animatecsspath.compat:t.animatecsspath.link;t.debug&&(console.log("Paths:"),console.log(` - Plugin path = ${n}`),console.log(` - Appearance CSS path = ${e}`),console.log(` - AnimateCSS CSS path = ${a}`)),s(a,0,(function(){s(e)}))}},o=(e,t)=>{let a=e.parentNode;if(a){for(const t of a.children)if(t!==e&&t.dataset.appearParent)return;a.classList=e.classList,(({attributes:e},t,a)=>{[...e].filter((({nodeName:e})=>e.includes("data"))).forEach((({nodeName:e,nodeValue:n})=>{e===a&&a||t.setAttribute(e,n)}))})(e,a,"data-appear-parent"),a.innerHTML=e.innerHTML,a.classList.add(t)}},l=(e,t,a)=>Array.from(a.querySelectorAll(`.${e}`)).filter((e=>!e.closest(`.${t}`))),d=(e,t,a)=>{const n=[l(t,a,e),...Array.from(e.querySelectorAll(`.${a}`)).map((e=>((e,t,a)=>Array.from(a.querySelectorAll(`.${e}`)).filter((e=>e.closest(`.${t}`)===a)))(t,a,e)))];return!!n.some((e=>e.length>0))&&n},c=(e,t)=>{t.hideagain&&e.from&&e.from.dataset.appearanceCanStart&&e.from.removeAttribute("data-appearance-can-start")},p=(e,t,a)=>{if(t.hideagain&&e&&e.from){let t=e.from.querySelectorAll(a.animatecss);t&&t.forEach((e=>{e.classList.remove("animationended")}));let n=e.from.querySelectorAll(".fragment.visible");n&&n.forEach((e=>{e.classList.remove("visible")}))}};return()=>{const e={names:{}};let t={};const s=(e,t,a)=>{r(e,"------------- Preloading -------------");let s=t.names;i(e,s.es5Filename),e.compatibility&&(s.animatecss=".backInDown, .backInLeft, .backInRight, .backInUp, .bounceIn, .bounceInDown, .bounceInLeft, .bounceInRight, .bounceInUp, .fadeIn, .fadeInDown, .fadeInDownBig, .fadeInLeft, .fadeInLeftBig, .fadeInRight, .fadeInRightBig, .fadeInUp, .fadeInUpBig, .fadeInTopLeft, .fadeInTopRight, .fadeInBottomLeft, .fadeInBottomRight, .flipInX, .flipInY, .lightSpeedInRight, .lightSpeedInLeft, .rotateIn, .rotateInDownLeft, .rotateInDownRight, .rotateInUpLeft, .rotateInUpRight, .jackInTheBox, .rollIn, .zoomIn, .zoomInDown, .zoomInLeft, .zoomInRight, .zoomInUp, .slideInDown, .slideInLeft, .slideInRight, .slideInUp, .skidLeft, .skidLeftBig, .skidRight, .skidRightBig, .shrinkIn, .shrinkInBlur",s.baseclass=e.compatibilitybaseclass),t.appearances=Array.from(t.slides.querySelectorAll(s.animatecss)),t.regularSections.forEach((a=>((e,t,a)=>{let s=null;if(e.hasAttribute("data-autoappear")){let a=e.dataset.autoappear;s="auto"==a||""==a||a.length<1||"true"==a?t.autoelements?t.autoelements:null:a}else t.autoappear&&t.autoelements&&(s=t.autoelements);if(s){let t=JSON.parse(n(s));Object.entries(t).forEach((([t,n])=>{let s=Array.from(e.querySelectorAll(t)).filter((e=>!a.appearances.includes(e)));s.length&&s.forEach((e=>{a.appearances.push(e);let t=[],s=null,r=!1,i=null,o=null;Array.isArray(n)?(t=n[0].split(/[ ,]+/),s=n[1]):"string"==typeof n?t=n.split(/[ ,]+/):n.constructor===Object&&((n.class||n.animation)&&(t=(n.animation?n.animation:n.class).split(/[ ,]+/)),n.speed&&(r=String(n.speed),r.includes("animate__")||(r=`animate__${r}`)),n.delay&&(s=String(n.delay)),n.split&&(i=String(n.split)),n["container-delay"]&&(o=String(n["container-delay"]))),e.classList.add(...t),r&&e.classList.add(r),s&&(e.dataset.delay||(e.dataset.delay=s)),i&&(e.dataset.split=i),o&&(e.dataset.containerDelay=o)}))}))}})(a,e,t))),t.appearances.forEach(((t,a)=>{((e,t,a)=>{let n=a.baseclass;e.hasAttribute("data-appear-parent")&&o(e,n),t.appearparents&&e.parentNode&&e.parentNode.tagName&&"SPAN"==e.tagName&&"LI"==e.parentNode.tagName&&String(e.outerHTML).length==String(e.parentNode.innerHTML).length&&o(e)})(t,e,s),((e,t)=>{e.classList.contains(t.baseclass)||e.classList.add(t.baseclass),e.classList.contains(t.fragmentClass)&&e.classList.add("custom")})(t,s),t.hasAttribute("data-split")&&((e,t)=>{let a=!1,n=" ";if("words"==t?a=e.textContent.trim().split(/\s+/):"letters"==t&&(a=e.textContent.trim().split(""),n=""),a){const t=Array.from(e.classList).filter((e=>e.startsWith("animate__"))),s=a.map(((t,a)=>{const n=document.createElement("span");return n.textContent=t," "==t&&(n.textContent=" "),e.dataset.delay&&0!==a&&(n.dataset.delay=e.dataset.delay),e.dataset.containerDelay&&0===a&&(n.dataset.delay=e.dataset.containerDelay),e.classList.add("wordchargroup"),e.classList.forEach((e=>e.startsWith("animate__")&&n.classList.add(e))),n.outerHTML})).join(n);t.forEach((t=>e.classList.remove(t))),e.removeAttribute("data-delay"),e.removeAttribute("data-split"),e.removeAttribute("data-container-delay"),e.innerHTML=s}})(t,t.dataset.split)})),t.regularSections.forEach(((t,a)=>{let n=d(t,s.baseclass,s.fragmentClass);n&&n.forEach((t=>{((e,t,a)=>{let n=0;e.forEach(((e,a)=>{if(0==a&&e.dataset.delay||0!=a){let a=t.delay;e.dataset&&e.dataset.delay&&(a=parseInt(e.dataset.delay)),n+=a,e.style.setProperty("animation-delay",n+"ms"),e.removeAttribute("data-delay")}}))})(t,e)}))})),(e=>{setTimeout(e,0)})(a)},l=(t,a,n)=>{let i=e.names;return i.baseclass=a.baseclass,i.compatibilitybaseclass=a.compatibilitybaseclass,i.fragmentSelector=".fragment",i.fragmentClass="fragment",i.speedClasses=["slower","slow","fast","faster"],i.speedClasses.push(...i.speedClasses.map((e=>`animate__${e}`))),i.animatecss='[class^="animate__"],[class*=" animate__"]',i.es5Filename=n,i.eventnames=["ready","slidechanged","slidetransitionend","autoanimate","overviewhidden"],e.deck=t,e.dom=t.getRevealElement(),e.viewport=t.getViewportElement(),e.slides=t.getSlidesElement(),e.sections=e.slides.querySelectorAll("section"),e.fragments=e.slides.querySelectorAll(i.fragmentSelector),e.regularSections=Array.from(e.sections).filter((e=>!(({childNodes:e})=>{let t=!1;for(let a=0;at.on(n,(t=>{((e,t,a,n)=>{n.deck.getConfig().view;let s=n.viewport.classList.contains("reveal-scroll"),r=e.type,i=(e=>{let t={};return t.from=e.fromSlide||e.previousSlide||null,t.to=e.toSlide||e.currentSlide||null,t})(e);if(i.to){"ready"==r&&(i.to.dataset.appearanceCanStart=!0);let n=((e,t)=>(e.dataset.appearevent&&"auto"===e.dataset.appearevent&&(e.dataset.appearevent="autoanimate"),"auto"==t.appearevent&&(t.appearevent="autoanimate"),e.dataset.appearevent?e.dataset.appearevent:t.appearevent))(i.to,t);(r==n||"slidetransitionend"==r&&"autoanimate"==n)&&(i.to.dataset.appearanceCanStart=!0),s&&"slidechanged"==r&&(c(i,t),p(i,t,a),setTimeout((()=>{i.to.dataset.appearanceCanStart=!0}),t.delay)),"slidetransitionend"==r&&(c(i,t),p(i,t,a)),"slidechanged"==r&&document.body.dataset.exitoverview?(c(i,t),i.to.dataset.appearanceCanStart=!0):"overviewhidden"==r&&(document.body.dataset.exitoverview=!0,setTimeout((()=>{document.body.removeAttribute("data-exitoverview")}),500),e.currentSlide&&(c(i,t),i.to.dataset.appearanceCanStart=!0))}})(t,a,i,e)})))),e.viewport.addEventListener("animationend",(e=>{e.target.classList.add("animationended")})),e.viewport.addEventListener("fragmenthidden",(e=>{e.fragment.classList.remove("animationended"),e.fragment.querySelectorAll(".animationended").forEach((e=>{e.classList.remove("animationended")}))})),new Promise((t=>{s(a,e,t),r(a,"---------- Done preloading ----------")}))};return{id:"appearance",init:e=>(t=a({baseclass:"animate__animated",hideagain:!0,delay:300,debug:!1,appearevent:"slidetransitionend",autoappear:!1,autoelements:!1,appearparents:!1,cssautoload:!0,csspath:"",animatecsspath:{link:"https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css",compat:"https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.compat.css"},compatibility:!1,compatibilitybaseclass:"animated"},e.getConfig().appearance||{}),l(e,t,"appearance.js"))}}})); //# sourceMappingURL=appearance.js.map diff --git a/demo/plugin/appearance/appearance.js.map b/demo/plugin/appearance/appearance.js.map index 2e11f50..5c16deb 100644 --- a/demo/plugin/appearance/appearance.js.map +++ b/demo/plugin/appearance/appearance.js.map @@ -1 +1 @@ -{"version":3,"file":"appearance.js","sources":["../../../src/plugin/js/helpers.js","../../../src/plugin/js/functions/get-load-css.js","../../../src/plugin/js/functions/fix-list-item.js","../../../src/plugin/js/functions/get-appearance-arrays.js","../../../src/plugin/js/functions/show-hide-slide.js","../../../src/plugin/js/plugin.js","../../../src/plugin/js/functions/add-auto-animation.js","../../../src/plugin/js/functions/add-base-class.js","../../../src/plugin/js/functions/convert-to-spans.js","../../../src/plugin/js/functions/add-delay.js"],"sourcesContent":["/**\n * Check if a given string is valid JSON.\n * @param {string} str - The string to be checked.\n * @returns {boolean} `true` if the string is valid JSON, otherwise `false`.\n */\nexport const isJSON = str => {\n\ttry {\n\t\treturn (JSON.parse(str) && !!str);\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\n/**\n * Convert a NodeList into an array based on provided selectors.\n * @param {Element} container - The root element to begin querying.\n * @param {string} selectors - A string containing one or more CSS selectors separated by commas.\n * @returns {Element[]} Array of elements that match the given selectors.\n */\nexport const selectionArray = (container, selectors) => {\n\tlet selections = container.querySelectorAll(selectors);\n\tlet selectionarray = Array.prototype.slice.call(selections);\n\treturn selectionarray;\n};\n\n/**\n * Check if an element has child nodes that are `SECTION` elements.\n * @param {Object} param0 - Object with childNodes property.\n * @param {NodeListOf} param0.childNodes - List of child nodes of the element.\n * @returns {boolean} `true` if the element contains `SECTION` child nodes, otherwise `false`.\n */\nexport const isStack = ({childNodes}) => {\n\tlet isStack = false;\n\tfor (let i = 0; i < childNodes.length; i++) {\n\t\tif (childNodes[i].tagName == \"SECTION\") {\n\t\t\tisStack = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn isStack;\n};\n\n/**\n * Copy data attributes from a source element to a target element with an optional exception.\n * @param {Object} param0 - Object with attributes property.\n * @param {NamedNodeMap} param0.attributes - Map of attributes of the source element.\n * @param {Element} target - Target element to copy attributes to.\n * @param {string} [not] - Optional attribute name to exclude from copying.\n */\nexport const copyDataAttributes = ({attributes}, target, not) => {\n\t[...attributes].filter(({nodeName}) => nodeName.includes('data')).forEach(({nodeName, nodeValue}) => {\n\t\tif ((not && nodeName !== not) || !not) {\n\t\t\ttarget.setAttribute(nodeName, nodeValue);\n\t\t}\n\t});\n};\n\n/**\n * Check if the given item is an object and not an array.\n * @param {*} item - The item to be checked.\n * @returns {boolean} `true` if the item is an object and not an array, otherwise `false`.\n */\nexport const isObject = (item) => {\n\treturn (item && typeof item === 'object' && !Array.isArray(item));\n}\n\n/**\n * Deep merge multiple objects into a target object.\n * @param {Object} target - Target object to merge values into.\n * @param {...Object} sources - Source objects to merge from.\n * @returns {Object} The merged object.\n */\nexport const mergeDeep = (target, ...sources) => {\n\tif (!sources.length) return target;\n\tconst source = sources.shift();\n\n\tif (isObject(target) && isObject(source)) {\n\t\tfor (const key in source) {\n\t\t\tif (isObject(source[key])) {\n\t\t\t\tif (!target[key]) Object.assign(target, { [key]: {} });\n\t\t\t\tmergeDeep(target[key], source[key]);\n\t\t\t} else {\n\t\t\t\tObject.assign(target, { [key]: source[key] });\n\t\t\t}\n\t\t}\n\t}\n\treturn mergeDeep(target, ...sources);\n}\n\n/**\n * Resolves the given Promise immediately using setTimeout.\n * @param {Function} resolve - The resolve function of a Promise.\n * @returns {number} The ID value of the timer that is set.\n */\nexport const doneLoading = (resolve) => {\n\treturn setTimeout(resolve, 0);\n}\n\n\n/**\n * Converts a JavaScript object or a JSON-formatted string to a JSON string.\n *\n * @param {Object|string} str - The input string or object to be converted to a JSON string.\n * @returns {string} The JSON string.\n */\nexport const toJSONString = (str) => {\n\tlet JSONString = ''\n\n\tif (typeof str === \"string\") str = str.replace(/[“”]/g,'\"').replace(/[‘’]/g,\"'\");\n\n\tif (isJSON(str)) {\n\t\tJSONString = str\n\t} else {\n\t\tif (typeof str === \"object\") {\n\t\t\tJSONString = JSON.stringify(str, null, 2)\n\t\t} else {\n\t\t\tJSONString = str.trim().replace(/'/g, '\"').charAt(0) === \"{\" ? str.trim().replace(/'/g, '\"') : `{${str.trim().replace(/'/g, '\"')}}`;\n\t\t}\n\t}\n\treturn JSONString;\n}\n\n\n/**\n * Dynamically loads a resource from the specified URL and calls a callback function when it's loaded.\n * Will not load the resource if it has already been loaded.\n *\n * @param {string} url - The URL of the resource to load.\n * @param {string} type - The type of resource to load.\n * @param {Function} callback - A callback function to be called when the resource is loaded.\n */\n\nexport const loadResource = (url, type, callback) => {\n\tlet head = document.querySelector('head');\n\tlet resource;\n\tlet alreadyExists = false;\n\n\tif (type === 'script') {\n\t\tif (!document.querySelector(`script[src=\"${url}\"]`)) {\n\t\t\tresource = document.createElement('script');\n\t\t\tresource.type = 'text/javascript';\n\t\t\tresource.src = url;\n\t\t} else { alreadyExists = true }\n\n\t} else if (type === 'stylesheet') {\n\n\t\tif (!document.querySelector(`link[href=\"${url}\"]`)) {\n\t\t\tresource = document.createElement('link');\n\t\t\tresource.rel = 'stylesheet';\n\t\t\tresource.href = url;\n\t\t} else { alreadyExists = true }\n\t}\n\n\tif (!alreadyExists) {\n\t\tconst finish = () => {\n\t\t\tif (typeof callback === 'function') {\n\t\t\tcallback.call();\n\t\t\tcallback = null;\n\t\t\t}\n\t\t};\n\t\tresource.onload = finish;\n\t\tresource.onreadystatechange = function () {\n\t\t\tif (this.readyState === 'loaded') {\n\t\t\t\tfinish();\n\t\t\t}\n\t\t};\n\t\thead.appendChild(resource);\n\t}\n}\n\n\n/**\n * Retrieves the path of a JavaScript file based on its filename.\n *\n * @param {string} fileName - The filename of the script.\n * @returns {string} The path to the plugin's location.\n */\nexport const pluginPath = (fileName) => {\n\tlet path;\n\tlet pluginScript = document.querySelector(`script[src$=\"${fileName}\"]`);\n\tif (pluginScript) {\n\t\tpath = pluginScript.getAttribute(\"src\").slice(0, -1 * (fileName.length));\n\t} else {\n\t\tpath = import.meta.url.slice(0, import.meta.url.lastIndexOf('/') + 1);\n\t}\n\treturn path;\n}\n\n\n/**\n * Check if element 'a' appears before element 'b' in the DOM tree.\n *\n * @param {HTMLElement} a - The first HTML element to compare.\n * @param {HTMLElement} b - The second HTML element to compare.\n * @returns {boolean|undefined} - Returns `true` if element 'a' appears before element 'b', `false` if 'b' appears before 'a', and `undefined` if the elements have no relative position in the DOM tree.\n */\nexport const isBefore = (a, b) => {\n var all = document.getElementsByTagName('*');\n\n for (var i = 0; i < all.length; ++i) {\n if (all[i] === a) {\n return true;\n } else if (all[i] === b) {\n return false;\n }\n }\n // If the elements have no relative position in the DOM tree\n return undefined;\n};\n\n\n/**\n * Check the number of occurrences of a specific element in an array.\n *\n * @param {Array} array - The array in which occurrences are to be counted.\n * @param {*} element - The element to be counted within the array.\n * @returns {number} - The count of occurrences of the specified element in the array.\n */\nexport const checkOccurrence = (array, element) => {\n let counter = 0;\n for (let i = 0; i < array.length; i++) {\n if (array[i] == element) {\n counter++;\n }\n }\n return counter;\n};\n\n\n/**\n * Create an HTML element from a string of HTML.\n *\n * @param {string} thehtml - The string of HTML to be converted into an HTML element.\n * @returns {HTMLElement | null} - The HTML element created from the provided HTML string. Returns `null` if the element couldn't be created.\n */\nexport const createNode = (thehtml) => {\n const fragment = document.createRange().createContextualFragment(thehtml);\n return fragment.firstElementChild;\n};\n\n\n/**\n * Gets the index of the given DOM element within its parent's children.\n * @param {HTMLElement} elm - The target element.\n * @returns {number} - The index of the element within its parent's children.\n */\nexport const getNodeIndex = (elm) => [...elm.parentNode.children].indexOf(elm);\n\n\nexport const debugLog = (options, text) => {\n\tif (options.debug) console.log(text);\n}\n\n","import { loadResource } from '../helpers';\nimport { pluginPath } from '../helpers';\n\n/**\n * Retrieves and loads CSS stylesheets based on the provided options and ES5 filename.\n *\n * @param {Object} options - Configuration options for loading CSS.\n * @param {string} fileName - The filename of the script.\n */\n\nexport const getAndLoadCSS = (options, fileName) => {\n\tlet thePath = pluginPath(fileName);\n\tlet pluginBaseName = fileName.replace(/\\.[^/.]+$/, \"\");\n\n\tif (options.cssautoload) {\n\t\tlet AppearanceStylePath = options.csspath.appearance ? options.csspath.appearance : null || `${thePath}${pluginBaseName}.css` || `plugin/${pluginBaseName}/${pluginBaseName}.css`\n\t\tlet AnimateCSSPath = !options.compatibility ? options.animatecsspath.link : options.animatecsspath.compat;\n\t\n\t\tif (options.debug) {\n\t\t\tconsole.log(`Paths:`);\n\t\t\tconsole.log(` - Plugin path = ${thePath}`);\n\t\t\tconsole.log(` - Appearance CSS path = ${AppearanceStylePath}`);\n\t\t\tconsole.log(` - AnimateCSS CSS path = ${AnimateCSSPath}`);\n\t\t}\n\t\n\t\tloadResource(AnimateCSSPath, 'stylesheet', function () {\n\t\t\tloadResource(AppearanceStylePath, 'stylesheet');\n\t\t});\n\t}\n}","import { copyDataAttributes } from '../helpers';\n\n/**\n * Hoist a list item's appearance to its parent element's appearance.\n *\n * @param {HTMLElement} from - The list item element.\n * @returns {undefined}\n */\nconst hoistAppearance = (from, baseclass) => {\n\tlet to = from.parentNode;\n\tif (!to) return;\n \n\tfor (const sibling of to.children) {\n\t if (sibling !== from && sibling.dataset.appearParent) return;\n\t}\n \n\tto.classList = from.classList;\n\tcopyDataAttributes(from, to, \"data-appear-parent\");\n\tto.innerHTML = from.innerHTML;\n\tto.classList.add(baseclass);\n};\n\n\n/**\n * Fix list items that were changed by Quarto.\n *\n * This function is designed for use with Quarto and handles the conversion of list items\n * with Appearance classes to their parent elements when a manual attribute is present.\n * It also provides automatic conversion for list items that directly contain spans, which\n * is related to Quarto's wrapping of list content in a span.\n *\n * @param {HTMLElement} appearance - The list item element whose appearance will be converted.\n * @param {Object} options - An options object that controls the conversion behavior.\n * @param {boolean} options.appearparents - If `true`, automatic conversion of list items with spans is enabled.\n * @returns {undefined}\n */\nexport const fixListItem = (appearance, options, names) => {\n\n\tlet baseclass = names.baseclass\n\tif (appearance.hasAttribute(\"data-appear-parent\")) {\n\t\thoistAppearance(appearance, baseclass);\n\t}\n\n\tif (options.appearparents) {\n\t\tif (appearance.parentNode && appearance.parentNode.tagName) {\n\t\t\tif (appearance.tagName == \"SPAN\" && appearance.parentNode.tagName == \"LI\") {\n\t\t\t\tlet spanLength = String(appearance.outerHTML).length;\n\t\t\t\tlet liContentLength = String(appearance.parentNode.innerHTML).length;\n\t\t\t\tif (spanLength == liContentLength) {\n\t\t\t\t\thoistAppearance(appearance);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","/**\n * Selects elements with a specified class that are not nested inside an element with another specified class.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} excludeClass - The class name to exclude elements nested inside it.\n * @param {Element} el - The element to find the target elements in.\n * @returns {Element[]} - Array of selected elements.\n */\nconst elemsNotInClass = (targetClass, excludeClass, el) => \n Array.from(el.querySelectorAll(`.${targetClass}`))\n .filter(s => !s.closest(`.${excludeClass}`));\n\n/**\n * Selects elements with a specified class that are nested inside an element with another specified class.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} parentClass - The class name of the parent to find elements in.\n * @param {Element} el - The element to find the target elements in.\n * @returns {Element[]} - Array of selected elements.\n */\nconst elemsInClass = (targetClass, parentClass, el) =>\n Array.from(el.querySelectorAll(`.${targetClass}`))\n .filter(s => s.closest(`.${parentClass}`) === el);\n\n/**\n * Extracts groups of elements with a specified class from the provided section element.\n * Groups are formed based on nesting inside elements with another specified class.\n * @param {Element} section - The section to extract data from.\n * @returns {Element[][]} - Nested arrays of selected elements.\n */\n\n\n/**\n * Extracts groups of elements with a specified class from the provided section element.\n * Groups are formed based on nesting inside elements with another specified class.\n * @param {Element} section - The section to extract data from.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} groupClass - The class name of the parent to find elements in.\n * @returns {Element[][]} - Nested arrays of selected elements.\n */\nexport const getAppearanceArrays = (section, targetClass, groupClass) => {\n const result = [\n elemsNotInClass(targetClass, groupClass, section), \n ...Array.from(section.querySelectorAll(`.${groupClass}`))\n .map(frag => elemsInClass(targetClass, groupClass, frag))\n ];\n\n\tif (result.some(group => group.length > 0)) {\n return result;\n } else {\n\t\treturn false;\n\t}\n};\n","/**\n * Derives slide from and to from the event object.\n *\n * @param {Object} event - The event object containing slide transition details.\n * @returns {Object} - An object containing references to the \"from\" and \"to\" slides.\n */\nconst fromTo = (event) => {\n\tlet slides = {};\n\tslides.from = event.fromSlide || event.previousSlide || null;\n\tslides.to = event.toSlide || event.currentSlide || null;\n\treturn slides;\n};\n\n/**\n * A function that determines the appearance event for a given slide.\n *\n * This function checks the `data-appearevent` attribute of the slide and the `options.appearevent` parameter.\n * If `data-appearevent` is set to \"auto\", it is converted to \"autoanimate\". If `options.appearevent` is \"auto\", it is also converted to \"autoanimate\".\n * The function returns the appearance event, prioritizing `data-appearevent` over `options.appearevent`.\n *\n * @param {HTMLElement} toSlide - The slide for which the appearance event is determined.\n * @param {Object} options - An object containing options for the appearance event.\n * @param {string} options.appearevent - The appearance event option provided in the `options` object.\n *\n * @returns {string} - The determined appearance event for the slide, either from `data-appearevent` or `options.appearevent`.\n */\nconst slideAppearevent = (toSlide, options) => {\n\n\tif (toSlide.dataset.appearevent && toSlide.dataset.appearevent === \"auto\" ) {\n\t\ttoSlide.dataset.appearevent = \"autoanimate\"\n\t}\n\tif (options.appearevent == \"auto\") {options.appearevent = \"autoanimate\"}\n\treturn toSlide.dataset.appearevent ? toSlide.dataset.appearevent : options.appearevent;\n};\n\n/**\n * Remove the 'data-appearance-can-start' attribute from the 'from' slide if the 'hideagain' option is enabled.\n *\n * @param {HTMLElement} slides - The container element for the slides.\n * @param {Object} options - An object containing configuration options.\n * @param {boolean} options.hideagain - A flag indicating whether to remove the attribute when 'hideagain' is true.\n */\nconst removeStartAttribute = (slides, options) => {\n\tif (options.hideagain) {\n\t\tif (slides.from && slides.from.dataset.appearanceCanStart ) {\n\t\t\tslides.from.removeAttribute('data-appearance-can-start');\n\t\t}\n\t}\n};\n\n\n/**\n * Turn off slide appearances when transitioning from one slide to another if the 'hideagain' option is enabled.\n *\n * @param {HTMLElement} slides - The container element for the slides.\n * @param {Object} options - An object containing configuration options.\n * @param {string} names.animatecss - The CSS selector for animated elements.\n */\nconst turnOffSlideAppearances = (slides, options, names) => {\n\tif (options.hideagain) {\n\t\tif (slides && slides.from) {\n\n\t\t\t// Remove animationended class from animated elements when moving away from that slide\n\t\t\tlet fromAppearances = slides.from.querySelectorAll(names.animatecss);\n\t\t\tif (fromAppearances) {\n\t\t\t\tfromAppearances.forEach( appearance => {\n\t\t\t\t\tappearance.classList.remove('animationended');\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Remove visible class from fragments when moving away from that slide\n\t\t\tlet fromFragments = slides.from.querySelectorAll(`.fragment.visible`);\n\t\t\tif (fromFragments) {\n\t\t\t\tfromFragments.forEach(fragment => {\n\t\t\t\t\tfragment.classList.remove('visible');\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n};\n\n\n/**\n * Handles the showing and hiding of slides based on the provided event and options.\n *\n * @param {Object} event - The event object containing slide transition details.\n * @param {Object} options - An object containing configurations for slide appearance management.\n */\nexport const showHideSlide = (event, options, names, vars) => {\n\n\tlet view = vars.deck.getConfig().view;\n\tlet isScroll = vars.viewport.classList.contains(\"reveal-scroll\");\n\tlet etype = event.type;\n\tlet slides = fromTo(event);\n\n\tif (slides.to) {\n\n\t\tif (etype == \"ready\") {\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t}\n\n\t\tlet appearevent = slideAppearevent(slides.to, options)\n\n\t\tif (etype == appearevent || (etype == \"slidetransitionend\" && appearevent == \"autoanimate\")) {\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t}\n\n\t\t// Add scroll mode compatibility, does not have a slidetransitionend event yet\n\t\tif (isScroll && etype == 'slidechanged' ) {\n\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tturnOffSlideAppearances(slides, options, names);\n\n\t\t\t// Add delay to allow for scroll animation to finish\n\t\t\tsetTimeout(() => {\n\t\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t\t}, options.delay)\n\t\t}\n\n\n\t\tif (etype == \"slidetransitionend\" ) {\n\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tturnOffSlideAppearances(slides, options, names);\n\t\t}\n\t\t\n\t\tif (etype == 'slidechanged' && document.body.dataset.exitoverview) {\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\n\t\t} else if (etype == 'overviewhidden' ) {\n\n\t\t\tdocument.body.dataset.exitoverview = true;\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tdocument.body.removeAttribute('data-exitoverview')\n\t\t\t}, 500)\n\n\t\t\tif (event.currentSlide ) {\n\t\t\t\tremoveStartAttribute(slides, options);\n\t\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t\t}\n\t\t}\n\t}\n}","import { debugLog, mergeDeep, doneLoading, isStack } from './helpers';\n\nimport {getAndLoadCSS} from './functions/get-load-css.js';\nimport {addAutoAnimation} from './functions/add-auto-animation.js';\nimport {fixListItem} from './functions/fix-list-item';\nimport {addBaseClass} from './functions/add-base-class.js';\nimport {addDelay} from './functions/add-delay.js';\nimport {getAppearanceArrays} from './functions/get-appearance-arrays.js';\nimport {convertToSpans} from './functions/convert-to-spans';\nimport {showHideSlide} from './functions/show-hide-slide.js';\n\n\nconst Plugin = () => {\n\n\tconst vars = {};\n\tvars.names = {};\n\tlet options = {};\n\n\t/**\n\t* Prepare the plugin to find Appearance elements\n\t* @param {Object} vars - The variables to be prepared.\n\t* @param {Object} names - The names to be prepared.\n\t* @param {Function} resolve - The callback function to be called when preparation is complete.\n\t* @throws {Error} Throws an error if the 'options' object is not defined.\n\t*/\n\tconst prepare = (options, vars, resolve) => {\n\n\t\tdebugLog(options, \"------------- Preloading -------------\");\n\n\t\tlet names = vars.names;\n\n\t\tgetAndLoadCSS(options, names.es5Filename);\n\n\t\tif (options.compatibility) {\n\t\t\tnames.animatecss = '.backInDown, .backInLeft, .backInRight, .backInUp, .bounceIn, .bounceInDown, .bounceInLeft, .bounceInRight, .bounceInUp, .fadeIn, .fadeInDown, .fadeInDownBig, .fadeInLeft, .fadeInLeftBig, .fadeInRight, .fadeInRightBig, .fadeInUp, .fadeInUpBig, .fadeInTopLeft, .fadeInTopRight, .fadeInBottomLeft, .fadeInBottomRight, .flipInX, .flipInY, .lightSpeedInRight, .lightSpeedInLeft, .rotateIn, .rotateInDownLeft, .rotateInDownRight, .rotateInUpLeft, .rotateInUpRight, .jackInTheBox, .rollIn, .zoomIn, .zoomInDown, .zoomInLeft, .zoomInRight, .zoomInUp, .slideInDown, .slideInLeft, .slideInRight, .slideInUp, .skidLeft, .skidLeftBig, .skidRight, .skidRightBig, .shrinkIn, .shrinkInBlur';\n\t\t\tnames.baseclass = options.compatibilitybaseclass\n\t\t}\n\n\t\tvars.appearances = Array.from(vars.slides.querySelectorAll(names.animatecss));\n\n\t\t// Go through each section to see if there are any (auto) selectors that need animation classes\n\t\tvars.regularSections.forEach(theSection => addAutoAnimation(theSection, options, vars));\n\n\t\tvars.appearances.forEach((theAppearance, index) => {\n\t\t\t// Fix any list item where the Appearance classes were moved to the span (Quarto does this)\n\t\t\tfixListItem(theAppearance, options, names);\n\n\t\t\t// Go through each appearance element and add the baseclass if it doesn't have it\n\t\t\taddBaseClass(theAppearance, names);\n\n\t\t\tif (theAppearance.hasAttribute('data-split')) {\n\t\t\t\tconvertToSpans(theAppearance, theAppearance.dataset.split);\n\t\t\t}\n\t\t});\n\n\t\tvars.regularSections.forEach((theSection, index) => {\n\t\t\t// Get all the Appearances in the section as separate arrays per delay loop\n\t\t\tlet appearanceArrays = getAppearanceArrays(theSection, names.baseclass, names.fragmentClass);\n\n\t\t\tif (appearanceArrays) {\n\t\t\t\tappearanceArrays.forEach((appearanceArray) => {\n\t\t\t\t\t// Add the delays to each appearance in the array\n\t\t\t\t\taddDelay(appearanceArray, options, names)\n\t\t\t\t})\n\t\t\t}\n\t\t});\n\n\t\tdoneLoading(resolve);\n\t}\n\n\t/**\n\t* The main function of the plugin\n\t* @param {object} deck - The deck object\n\t* @param {object} options - The options object\n\t* @param {string} es5Filename - The name of the file that will be used\n\t*/\n\tconst Appear = (deck, options, es5Filename) => {\n\n\t\tlet names = vars.names;\n\n\t\t// Set up names\n\t\tnames.baseclass = options.baseclass;\n\t\tnames.compatibilitybaseclass = options.compatibilitybaseclass;\n\t\tnames.fragmentSelector = \".fragment\";\n\t\tnames.fragmentClass = \"fragment\";\n\t\tnames.speedClasses = ['slower', 'slow', 'fast', 'faster'];\n\t\tnames.speedClasses.push(...names.speedClasses.map(speed => `animate__${speed}`));\n\t\tnames.animatecss = '[class^=\"animate__\"],[class*=\" animate__\"]';\n\t\tnames.es5Filename = es5Filename;\n\t\tnames.eventnames = ['ready', 'slidechanged', 'slidetransitionend', 'autoanimate', 'overviewhidden'];\n\t\n\t\t// Set up variables\n\t\tvars.deck = deck;\n\t\tvars.dom = deck.getRevealElement();\n\t\tvars.viewport = deck.getViewportElement();\n\t\tvars.slides = deck.getSlidesElement();\n\n\t\tvars.sections = vars.slides.querySelectorAll('section');\n\t\tvars.fragments = vars.slides.querySelectorAll(names.fragmentSelector);\n\t\tvars.regularSections = Array.from(vars.sections).filter( section => !isStack(section));\n\n\t\t// Check if Speaker view window\n\t\tif( /receiver/i.test( window.location.search ) ) vars.viewport.classList.add('sv');\n\n\t\tnames.eventnames.forEach( (eventname) => deck.on( eventname, event => { showHideSlide(event, options, names, vars) } ) );\n\n\t\tvars.viewport.addEventListener(\"animationend\", (event) => {\n\t\t\tevent.target.classList.add('animationended');\n\t\t});\n\t\tvars.viewport.addEventListener(\"fragmenthidden\", (event) => {\n\t\t\tevent.fragment.classList.remove('animationended');\n\t\t\tevent.fragment.querySelectorAll('.animationended').forEach(el => {\n\t\t\t\tel.classList.remove('animationended');\n\t\t\t});\n\t\t});\n\n\t\treturn new Promise(resolve => {\n\t\t\tprepare(options, vars, resolve);\n\t\t\tdebugLog(options, \"---------- Done preloading ----------\");\n\t\t});\n\t};\n\n\n\t/**\n\t* Initialize the plugin\n\t* @param {object} deck - The deck object\n\t*/\n\tconst init = (deck) => {\n\n\t\tlet defaultOptions = {\n\t\t\tbaseclass: 'animate__animated',\n\t\t\thideagain: true,\n\t\t\tdelay: 300,\n\t\t\tdebug: false,\n\t\t\tappearevent: 'slidetransitionend',\n\t\t\tautoappear: false,\n\t\t\tautoelements: false,\n\t\t\tappearparents: false,\n\t\t\tcssautoload: true,\n\t\t\tcsspath: '',\n\t\t\tanimatecsspath: {\n\t\t\t\tlink : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css',\n\t\t\t\tcompat : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.compat.css',\n\t\t\t},\n\t\t\tcompatibility: false,\n\t\t\tcompatibilitybaseclass: 'animated'\n\t\t};\n\n\t\toptions = mergeDeep(defaultOptions, deck.getConfig().appearance || {});\n\n\t\treturn Appear(deck, options, \"appearance.js\");\n\t};\n\n\treturn { id: 'appearance', init: init };\n};\n\nexport default Plugin;","import { toJSONString } from '../helpers';\n\n\n/**\n * Adds automatic animations to elements within a section based on specified criteria.\n *\n * This function examines the provided section for attributes and options to determine\n * which classes should be added to its elements to enable automatic animations.\n *\n * @param {HTMLElement} section - The section element to which automatic animations will be applied.\n * @param {Object} options - The existing user options object\n * @param {Object} vars - The existing vars object\n * @returns {undefined}\n */\nexport const addAutoAnimation = (section, options, vars) => {\n\n\tlet sectionAutoSelectors = null;\n\n\tif (section.hasAttribute(\"data-autoappear\")) {\n\n\t\tlet sectDataAppear = section.dataset.autoappear;\n\n\t\tif (sectDataAppear == \"auto\" || sectDataAppear == \"\" || sectDataAppear.length < 1 || sectDataAppear == \"true\") {\n\t\t\t// This section should get the global autoappear classes on its objects\n\t\t\tsectionAutoSelectors = options.autoelements ? options.autoelements : null;\n\t\t} else {\n\t\t\t// This section should get the local autoappear classes on its objects\n\t\t\tsectionAutoSelectors = sectDataAppear;\n\t\t}\n\n\t} else if ( options.autoappear && options.autoelements ) {\n\t\t// This section should get the global autoappear classes on its objects\n\t\tsectionAutoSelectors = options.autoelements;\n\t}\n\n\tif (sectionAutoSelectors) {\n\n\t\tlet elementsToAnimate = JSON.parse(toJSONString(sectionAutoSelectors));\n\n\t\tObject.entries(elementsToAnimate).forEach(([selector, assignables]) => {\n\n\n\t\t\t// Exclude the elements from vars.appearances\n\t\t\tlet elements = Array.from(section.querySelectorAll(selector)).filter( element => !vars.appearances.includes(element) );\n\n\t\t\tif (elements.length) {\n\n\t\t\t\telements.forEach((element) => {\n\n\t\t\t\t\tvars.appearances.push(element)\n\n\t\t\t\t\tlet newClasses = [], newDelay = null, speedClass = false, elementSplit = null, containerDelay = null;\n\n\t\t\t\t\tif (Array.isArray(assignables)) {\n\n\t\t\t\t\t\tnewClasses = assignables[0].split(/[ ,]+/);\n\t\t\t\t\t\tnewDelay = assignables[1];\n\n\t\t\t\t\t} else if (typeof assignables == \"string\"){\n\n\t\t\t\t\t\tnewClasses = assignables.split(/[ ,]+/);\n\n\t\t\t\t\t} else if (assignables.constructor === Object) {\n\n\t\t\t\t\t\tif (assignables.class || assignables.animation) {\n\t\t\t\t\t\t\tlet animationClass = assignables.animation ? assignables.animation : assignables.class;\n\t\t\t\t\t\t\tnewClasses = animationClass.split(/[ ,]+/);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.speed) {\n\t\t\t\t\t\t\tspeedClass = String(assignables.speed);\n\t\t\t\t\t\t\tif (!speedClass.includes(\"animate__\")) {\n\t\t\t\t\t\t\t\tspeedClass = `animate__${speedClass}`\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.delay) {\n\t\t\t\t\t\t\tnewDelay = String(assignables.delay);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.split) {\n\t\t\t\t\t\t\telementSplit = String(assignables.split);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables[\"container-delay\"]) {\n\t\t\t\t\t\t\tcontainerDelay = String(assignables[\"container-delay\"]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telement.classList.add(...newClasses);\n\t\t\t\t\tif (speedClass) { element.classList.add(speedClass)}\n\n\t\t\t\t\tif (newDelay) {\n\t\t\t\t\t\tif (!element.dataset.delay) {\n\t\t\t\t\t\t\telement.dataset.delay = newDelay\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (elementSplit) {element.dataset.split = elementSplit};\n\t\t\t\t\tif (containerDelay) {element.dataset.containerDelay = containerDelay};\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n","/**\n * Adds a base class to an HTML element if it doesn't already have it.\n *\n * This function checks if the specified HTML element has the specified base class,\n * and if not, it adds the base class to the element's class list.\n *\n * @param {HTMLElement} appearance - The HTML element to which the base class should be added.\n * @param {Object} names - The existing 'names' object\n * @returns {undefined}\n */\n\nexport const addBaseClass = (appearance, names) => {\n\tif (!appearance.classList.contains(names.baseclass)) {\n\t\tappearance.classList.add(names.baseclass);\n\t}\n\tif (appearance.classList.contains(names.fragmentClass)) {\n\t\tappearance.classList.add('custom');\n\t}\n}\n","export const convertToSpans = (parent, kind) => {\n\n\tlet splitElements = false;\n\tlet joinChar = ' ';\n\n\tif (kind == \"words\") {\n\t\tsplitElements = parent.textContent.trim().split(/\\s+/);\n\t\t\n\t} else if (kind == \"letters\") {\n\t\tsplitElements = parent.textContent.trim().split('');\n\t\tjoinChar = '';\n\t}\n\n\tif (splitElements) {\n\t\tconst parentAnimateClasses = Array.from(parent.classList).filter(className => className.startsWith('animate__'));\n\t\n\t\tconst newHtml = splitElements.map((element, index) => {\n\t\t\tconst span = document.createElement('span');\n\t\t\tspan.textContent = element;\n\t\t\tif (element == \" \") {span.textContent = \"\\u00A0\"}\n\t\n\t\t\tif (parent.dataset.delay && index !== 0) {\n\t\t\t\tspan.dataset.delay = parent.dataset.delay\n\t\t\t}\n\n\t\t\tif (parent.dataset.containerDelay && index === 0) {\n\t\t\t\tspan.dataset.delay = parent.dataset.containerDelay\n\t\t\t}\n\t\t\tparent.classList.add('wordchargroup');\n\t\n\t\t\tparent.classList.forEach(className => className.startsWith('animate__') && span.classList.add(className));\n\t\t\treturn span.outerHTML;\n\t\t\t\n\t\t}).join(joinChar);\n\t\n\t\tparentAnimateClasses.forEach(className => parent.classList.remove(className));\n\t\tparent.removeAttribute('data-delay');\n\t\tparent.removeAttribute('data-split');\n\t\tparent.removeAttribute('data-container-delay');\n\t\n\t\tparent.innerHTML = newHtml;\n\t}\n\n\n};","export const addDelay = (appearanceArray, options, names) => {\n\n let delay = 0;\n appearanceArray.forEach((appearance, index) => {\n\n if ((index == 0 && appearance.dataset.delay) || index !=0) {\n\n let elementDelay = options.delay;\n\n if (appearance.dataset && appearance.dataset.delay) {\n elementDelay = parseInt(appearance.dataset.delay);\n }\n\n delay = delay + elementDelay;\n\n appearance.style.setProperty('animation-delay', delay + \"ms\");\n appearance.removeAttribute('data-delay');\n }\n\n })\n\n}\n"],"names":["isObject","item","Array","isArray","mergeDeep","target","sources","length","source","shift","key","Object","assign","toJSONString","str","JSONString","replace","JSON","parse","e","isJSON","stringify","trim","charAt","loadResource","url","type","callback","resource","head","document","querySelector","alreadyExists","createElement","src","rel","href","finish","call","onload","onreadystatechange","this","readyState","appendChild","debugLog","options","text","debug","console","log","getAndLoadCSS","fileName","thePath","path","pluginScript","getAttribute","slice","import","location","require","pathToFileURL","__filename","_documentCurrentScript","URL","baseURI","lastIndexOf","pluginPath","pluginBaseName","cssautoload","AppearanceStylePath","csspath","appearance","AnimateCSSPath","compatibility","animatecsspath","compat","link","hoistAppearance","from","baseclass","to","parentNode","sibling","children","dataset","appearParent","classList","copyDataAttributes","attributes","not","filter","nodeName","includes","forEach","nodeValue","setAttribute","innerHTML","add","elemsNotInClass","targetClass","excludeClass","el","querySelectorAll","s","closest","getAppearanceArrays","section","groupClass","result","map","frag","elemsInClass","parentClass","some","group","removeStartAttribute","slides","hideagain","appearanceCanStart","removeAttribute","turnOffSlideAppearances","names","fromAppearances","animatecss","remove","fromFragments","fragment","Plugin","vars","prepare","resolve","es5Filename","compatibilitybaseclass","appearances","regularSections","theSection","addAutoAnimation","sectionAutoSelectors","hasAttribute","sectDataAppear","autoappear","autoelements","elementsToAnimate","entries","selector","assignables","elements","element","push","newClasses","newDelay","speedClass","elementSplit","containerDelay","split","constructor","class","animation","speed","String","delay","theAppearance","index","fixListItem","appearparents","tagName","outerHTML","addBaseClass","contains","fragmentClass","convertToSpans","parent","kind","splitElements","joinChar","textContent","parentAnimateClasses","className","startsWith","newHtml","span","join","appearanceArrays","appearanceArray","addDelay","elementDelay","parseInt","style","setProperty","setTimeout","doneLoading","Appear","deck","fragmentSelector","speedClasses","eventnames","dom","getRevealElement","viewport","getViewportElement","getSlidesElement","sections","fragments","isStack","childNodes","i","test","window","search","eventname","on","event","showHideSlide","getConfig","view","isScroll","etype","fromSlide","previousSlide","toSlide","currentSlide","fromTo","appearevent","slideAppearevent","body","exitoverview","addEventListener","Promise","id","init"],"mappings":";;;;;;;;;;;;;;0SAKO,MAyDMA,EAAYC,GAChBA,GAAwB,iBAATA,IAAsBC,MAAMC,QAAQF,GAS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5DwH,EAAOC,EAAMnJ,EAAS,kBAGS"} \ No newline at end of file +{"version":3,"file":"appearance.js","sources":["../../../src/plugin/js/helpers.js","../../../src/plugin/js/functions/get-load-css.js","../../../src/plugin/js/functions/fix-list-item.js","../../../src/plugin/js/functions/get-appearance-arrays.js","../../../src/plugin/js/functions/show-hide-slide.js","../../../src/plugin/js/plugin.js","../../../src/plugin/js/functions/add-auto-animation.js","../../../src/plugin/js/functions/add-base-class.js","../../../src/plugin/js/functions/convert-to-spans.js","../../../src/plugin/js/functions/add-delay.js"],"sourcesContent":["/**\n * Check if a given string is valid JSON.\n * @param {string} str - The string to be checked.\n * @returns {boolean} `true` if the string is valid JSON, otherwise `false`.\n */\nexport const isJSON = str => {\n\ttry {\n\t\treturn (JSON.parse(str) && !!str);\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\n/**\n * Convert a NodeList into an array based on provided selectors.\n * @param {Element} container - The root element to begin querying.\n * @param {string} selectors - A string containing one or more CSS selectors separated by commas.\n * @returns {Element[]} Array of elements that match the given selectors.\n */\nexport const selectionArray = (container, selectors) => {\n\tlet selections = container.querySelectorAll(selectors);\n\tlet selectionarray = Array.prototype.slice.call(selections);\n\treturn selectionarray;\n};\n\n/**\n * Check if an element has child nodes that are `SECTION` elements.\n * @param {Object} param0 - Object with childNodes property.\n * @param {NodeListOf} param0.childNodes - List of child nodes of the element.\n * @returns {boolean} `true` if the element contains `SECTION` child nodes, otherwise `false`.\n */\nexport const isStack = ({childNodes}) => {\n\tlet isStack = false;\n\tfor (let i = 0; i < childNodes.length; i++) {\n\t\tif (childNodes[i].tagName == \"SECTION\") {\n\t\t\tisStack = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn isStack;\n};\n\n/**\n * Copy data attributes from a source element to a target element with an optional exception.\n * @param {Object} param0 - Object with attributes property.\n * @param {NamedNodeMap} param0.attributes - Map of attributes of the source element.\n * @param {Element} target - Target element to copy attributes to.\n * @param {string} [not] - Optional attribute name to exclude from copying.\n */\nexport const copyDataAttributes = ({attributes}, target, not) => {\n\t[...attributes].filter(({nodeName}) => nodeName.includes('data')).forEach(({nodeName, nodeValue}) => {\n\t\tif ((not && nodeName !== not) || !not) {\n\t\t\ttarget.setAttribute(nodeName, nodeValue);\n\t\t}\n\t});\n};\n\n/**\n * Check if the given item is an object and not an array.\n * @param {*} item - The item to be checked.\n * @returns {boolean} `true` if the item is an object and not an array, otherwise `false`.\n */\nexport const isObject = (item) => {\n\treturn (item && typeof item === 'object' && !Array.isArray(item));\n}\n\n/**\n * Deep merge multiple objects into a target object.\n * @param {Object} target - Target object to merge values into.\n * @param {...Object} sources - Source objects to merge from.\n * @returns {Object} The merged object.\n */\nexport const mergeDeep = (target, ...sources) => {\n\tif (!sources.length) return target;\n\tconst source = sources.shift();\n\n\tif (isObject(target) && isObject(source)) {\n\t\tfor (const key in source) {\n\t\t\tif (isObject(source[key])) {\n\t\t\t\tif (!target[key]) Object.assign(target, { [key]: {} });\n\t\t\t\tmergeDeep(target[key], source[key]);\n\t\t\t} else {\n\t\t\t\tObject.assign(target, { [key]: source[key] });\n\t\t\t}\n\t\t}\n\t}\n\treturn mergeDeep(target, ...sources);\n}\n\n/**\n * Resolves the given Promise immediately using setTimeout.\n * @param {Function} resolve - The resolve function of a Promise.\n * @returns {number} The ID value of the timer that is set.\n */\nexport const doneLoading = (resolve) => {\n\treturn setTimeout(resolve, 0);\n}\n\n\n/**\n * Converts a JavaScript object or a JSON-formatted string to a JSON string.\n *\n * @param {Object|string} str - The input string or object to be converted to a JSON string.\n * @returns {string} The JSON string.\n */\nexport const toJSONString = (str) => {\n\tlet JSONString = ''\n\n\tif (typeof str === \"string\") str = str.replace(/[“”]/g,'\"').replace(/[‘’]/g,\"'\");\n\n\tif (isJSON(str)) {\n\t\tJSONString = str\n\t} else {\n\t\tif (typeof str === \"object\") {\n\t\t\tJSONString = JSON.stringify(str, null, 2)\n\t\t} else {\n\t\t\tJSONString = str.trim().replace(/'/g, '\"').charAt(0) === \"{\" ? str.trim().replace(/'/g, '\"') : `{${str.trim().replace(/'/g, '\"')}}`;\n\t\t}\n\t}\n\treturn JSONString;\n}\n\n\n/**\n * Dynamically loads a resource from the specified URL and calls a callback function when it's loaded.\n * Will not load the resource if it has already been loaded.\n *\n * @param {string} url - The URL of the resource to load.\n * @param {string} type - The type of resource to load.\n * @param {Function} callback - A callback function to be called when the resource is loaded.\n */\n\nexport const loadResource = (url, type, callback) => {\n\tlet head = document.querySelector('head');\n\tlet resource;\n\tlet alreadyExists = false;\n\n\tif (type === 'script') {\n\t\tif (!document.querySelector(`script[src=\"${url}\"]`)) {\n\t\t\tresource = document.createElement('script');\n\t\t\tresource.type = 'text/javascript';\n\t\t\tresource.src = url;\n\t\t} else { alreadyExists = true }\n\n\t} else if (type === 'stylesheet') {\n\n\t\tif (!document.querySelector(`link[href=\"${url}\"]`)) {\n\t\t\tresource = document.createElement('link');\n\t\t\tresource.rel = 'stylesheet';\n\t\t\tresource.href = url;\n\t\t} else { alreadyExists = true }\n\t}\n\n\tif (!alreadyExists) {\n\t\tconst finish = () => {\n\t\t\tif (typeof callback === 'function') {\n\t\t\tcallback.call();\n\t\t\tcallback = null;\n\t\t\t}\n\t\t};\n\t\tresource.onload = finish;\n\t\tresource.onreadystatechange = function () {\n\t\t\tif (this.readyState === 'loaded') {\n\t\t\t\tfinish();\n\t\t\t}\n\t\t};\n\t\thead.appendChild(resource);\n\t}\n}\n\n\n/**\n * Retrieves the path of a JavaScript file based on its filename.\n *\n * @param {string} fileName - The filename of the script.\n * @returns {string} The path to the plugin's location.\n */\nexport const pluginPath = (fileName) => {\n\tlet path;\n\tlet pluginScript = document.querySelector(`script[src$=\"${fileName}\"]`);\n\tif (pluginScript) {\n\t\tpath = pluginScript.getAttribute(\"src\").slice(0, -1 * (fileName.length));\n\t} else {\n\t\tpath = import.meta.url.slice(0, import.meta.url.lastIndexOf('/') + 1);\n\t}\n\treturn path;\n}\n\n\n/**\n * Check if element 'a' appears before element 'b' in the DOM tree.\n *\n * @param {HTMLElement} a - The first HTML element to compare.\n * @param {HTMLElement} b - The second HTML element to compare.\n * @returns {boolean|undefined} - Returns `true` if element 'a' appears before element 'b', `false` if 'b' appears before 'a', and `undefined` if the elements have no relative position in the DOM tree.\n */\nexport const isBefore = (a, b) => {\n var all = document.getElementsByTagName('*');\n\n for (var i = 0; i < all.length; ++i) {\n if (all[i] === a) {\n return true;\n } else if (all[i] === b) {\n return false;\n }\n }\n // If the elements have no relative position in the DOM tree\n return undefined;\n};\n\n\n/**\n * Check the number of occurrences of a specific element in an array.\n *\n * @param {Array} array - The array in which occurrences are to be counted.\n * @param {*} element - The element to be counted within the array.\n * @returns {number} - The count of occurrences of the specified element in the array.\n */\nexport const checkOccurrence = (array, element) => {\n let counter = 0;\n for (let i = 0; i < array.length; i++) {\n if (array[i] == element) {\n counter++;\n }\n }\n return counter;\n};\n\n\n/**\n * Create an HTML element from a string of HTML.\n *\n * @param {string} thehtml - The string of HTML to be converted into an HTML element.\n * @returns {HTMLElement | null} - The HTML element created from the provided HTML string. Returns `null` if the element couldn't be created.\n */\nexport const createNode = (thehtml) => {\n const fragment = document.createRange().createContextualFragment(thehtml);\n return fragment.firstElementChild;\n};\n\n\n/**\n * Gets the index of the given DOM element within its parent's children.\n * @param {HTMLElement} elm - The target element.\n * @returns {number} - The index of the element within its parent's children.\n */\nexport const getNodeIndex = (elm) => [...elm.parentNode.children].indexOf(elm);\n\n\nexport const debugLog = (options, text) => {\n\tif (options.debug) console.log(text);\n}\n\n","import { loadResource } from '../helpers';\nimport { pluginPath } from '../helpers';\n\n/**\n * Retrieves and loads CSS stylesheets based on the provided options and ES5 filename.\n *\n * @param {Object} options - Configuration options for loading CSS.\n * @param {string} fileName - The filename of the script.\n */\n\nexport const getAndLoadCSS = (options, fileName) => {\n\tlet thePath = pluginPath(fileName);\n\tlet pluginBaseName = fileName.replace(/\\.[^/.]+$/, \"\");\n\n\tif (options.cssautoload) {\n\t\tlet AppearanceStylePath = options.csspath.appearance ? options.csspath.appearance : null || `${thePath}${pluginBaseName}.css` || `plugin/${pluginBaseName}/${pluginBaseName}.css`\n\t\tlet AnimateCSSPath = !options.compatibility ? options.animatecsspath.link : options.animatecsspath.compat;\n\t\n\t\tif (options.debug) {\n\t\t\tconsole.log(`Paths:`);\n\t\t\tconsole.log(` - Plugin path = ${thePath}`);\n\t\t\tconsole.log(` - Appearance CSS path = ${AppearanceStylePath}`);\n\t\t\tconsole.log(` - AnimateCSS CSS path = ${AnimateCSSPath}`);\n\t\t}\n\t\n\t\tloadResource(AnimateCSSPath, 'stylesheet', function () {\n\t\t\tloadResource(AppearanceStylePath, 'stylesheet');\n\t\t});\n\t}\n}","import { copyDataAttributes } from '../helpers';\n\n/**\n * Hoist a list item's appearance to its parent element's appearance.\n *\n * @param {HTMLElement} from - The list item element.\n * @returns {undefined}\n */\nconst hoistAppearance = (from, baseclass) => {\n\tlet to = from.parentNode;\n\tif (!to) return;\n \n\tfor (const sibling of to.children) {\n\t if (sibling !== from && sibling.dataset.appearParent) return;\n\t}\n \n\tto.classList = from.classList;\n\tcopyDataAttributes(from, to, \"data-appear-parent\");\n\tto.innerHTML = from.innerHTML;\n\tto.classList.add(baseclass);\n};\n\n\n/**\n * Fix list items that were changed by Quarto.\n *\n * This function is designed for use with Quarto and handles the conversion of list items\n * with Appearance classes to their parent elements when a manual attribute is present.\n * It also provides automatic conversion for list items that directly contain spans, which\n * is related to Quarto's wrapping of list content in a span.\n *\n * @param {HTMLElement} appearance - The list item element whose appearance will be converted.\n * @param {Object} options - An options object that controls the conversion behavior.\n * @param {boolean} options.appearparents - If `true`, automatic conversion of list items with spans is enabled.\n * @returns {undefined}\n */\nexport const fixListItem = (appearance, options, names) => {\n\n\tlet baseclass = names.baseclass\n\tif (appearance.hasAttribute(\"data-appear-parent\")) {\n\t\thoistAppearance(appearance, baseclass);\n\t}\n\n\tif (options.appearparents) {\n\t\tif (appearance.parentNode && appearance.parentNode.tagName) {\n\t\t\tif (appearance.tagName == \"SPAN\" && appearance.parentNode.tagName == \"LI\") {\n\t\t\t\tlet spanLength = String(appearance.outerHTML).length;\n\t\t\t\tlet liContentLength = String(appearance.parentNode.innerHTML).length;\n\t\t\t\tif (spanLength == liContentLength) {\n\t\t\t\t\thoistAppearance(appearance);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","/**\n * Selects elements with a specified class that are not nested inside an element with another specified class.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} excludeClass - The class name to exclude elements nested inside it.\n * @param {Element} el - The element to find the target elements in.\n * @returns {Element[]} - Array of selected elements.\n */\nconst elemsNotInClass = (targetClass, excludeClass, el) => \n Array.from(el.querySelectorAll(`.${targetClass}`))\n .filter(s => !s.closest(`.${excludeClass}`));\n\n/**\n * Selects elements with a specified class that are nested inside an element with another specified class.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} parentClass - The class name of the parent to find elements in.\n * @param {Element} el - The element to find the target elements in.\n * @returns {Element[]} - Array of selected elements.\n */\nconst elemsInClass = (targetClass, parentClass, el) =>\n Array.from(el.querySelectorAll(`.${targetClass}`))\n .filter(s => s.closest(`.${parentClass}`) === el);\n\n/**\n * Extracts groups of elements with a specified class from the provided section element.\n * Groups are formed based on nesting inside elements with another specified class.\n * @param {Element} section - The section to extract data from.\n * @returns {Element[][]} - Nested arrays of selected elements.\n */\n\n\n/**\n * Extracts groups of elements with a specified class from the provided section element.\n * Groups are formed based on nesting inside elements with another specified class.\n * @param {Element} section - The section to extract data from.\n * @param {string} targetClass - The class name to select elements.\n * @param {string} groupClass - The class name of the parent to find elements in.\n * @returns {Element[][]} - Nested arrays of selected elements.\n */\nexport const getAppearanceArrays = (section, targetClass, groupClass) => {\n const result = [\n elemsNotInClass(targetClass, groupClass, section), \n ...Array.from(section.querySelectorAll(`.${groupClass}`))\n .map(frag => elemsInClass(targetClass, groupClass, frag))\n ];\n\n\tif (result.some(group => group.length > 0)) {\n return result;\n } else {\n\t\treturn false;\n\t}\n};\n","/**\n * Derives slide from and to from the event object.\n *\n * @param {Object} event - The event object containing slide transition details.\n * @returns {Object} - An object containing references to the \"from\" and \"to\" slides.\n */\nconst fromTo = (event) => {\n\tlet slides = {};\n\tslides.from = event.fromSlide || event.previousSlide || null;\n\tslides.to = event.toSlide || event.currentSlide || null;\n\treturn slides;\n};\n\n/**\n * A function that determines the appearance event for a given slide.\n *\n * This function checks the `data-appearevent` attribute of the slide and the `options.appearevent` parameter.\n * If `data-appearevent` is set to \"auto\", it is converted to \"autoanimate\". If `options.appearevent` is \"auto\", it is also converted to \"autoanimate\".\n * The function returns the appearance event, prioritizing `data-appearevent` over `options.appearevent`.\n *\n * @param {HTMLElement} toSlide - The slide for which the appearance event is determined.\n * @param {Object} options - An object containing options for the appearance event.\n * @param {string} options.appearevent - The appearance event option provided in the `options` object.\n *\n * @returns {string} - The determined appearance event for the slide, either from `data-appearevent` or `options.appearevent`.\n */\nconst slideAppearevent = (toSlide, options) => {\n\n\tif (toSlide.dataset.appearevent && toSlide.dataset.appearevent === \"auto\" ) {\n\t\ttoSlide.dataset.appearevent = \"autoanimate\"\n\t}\n\tif (options.appearevent == \"auto\") {options.appearevent = \"autoanimate\"}\n\treturn toSlide.dataset.appearevent ? toSlide.dataset.appearevent : options.appearevent;\n};\n\n/**\n * Remove the 'data-appearance-can-start' attribute from the 'from' slide if the 'hideagain' option is enabled.\n *\n * @param {HTMLElement} slides - The container element for the slides.\n * @param {Object} options - An object containing configuration options.\n * @param {boolean} options.hideagain - A flag indicating whether to remove the attribute when 'hideagain' is true.\n */\nconst removeStartAttribute = (slides, options) => {\n\tif (options.hideagain) {\n\t\tif (slides.from && slides.from.dataset.appearanceCanStart ) {\n\t\t\tslides.from.removeAttribute('data-appearance-can-start');\n\t\t}\n\t}\n};\n\n\n/**\n * Turn off slide appearances when transitioning from one slide to another if the 'hideagain' option is enabled.\n *\n * @param {HTMLElement} slides - The container element for the slides.\n * @param {Object} options - An object containing configuration options.\n * @param {string} names.animatecss - The CSS selector for animated elements.\n */\nconst turnOffSlideAppearances = (slides, options, names) => {\n\tif (options.hideagain) {\n\t\tif (slides && slides.from) {\n\n\t\t\t// Remove animationended class from animated elements when moving away from that slide\n\t\t\tlet fromAppearances = slides.from.querySelectorAll(names.animatecss);\n\t\t\tif (fromAppearances) {\n\t\t\t\tfromAppearances.forEach( appearance => {\n\t\t\t\t\tappearance.classList.remove('animationended');\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Remove visible class from fragments when moving away from that slide\n\t\t\tlet fromFragments = slides.from.querySelectorAll(`.fragment.visible`);\n\t\t\tif (fromFragments) {\n\t\t\t\tfromFragments.forEach(fragment => {\n\t\t\t\t\tfragment.classList.remove('visible');\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n};\n\n\n/**\n * Handles the showing and hiding of slides based on the provided event and options.\n *\n * @param {Object} event - The event object containing slide transition details.\n * @param {Object} options - An object containing configurations for slide appearance management.\n */\nexport const showHideSlide = (event, options, names, vars) => {\n\n\tlet view = vars.deck.getConfig().view;\n\tlet isScroll = vars.viewport.classList.contains(\"reveal-scroll\");\n\tlet etype = event.type;\n\tlet slides = fromTo(event);\n\n\tif (slides.to) {\n\n\t\tif (etype == \"ready\") {\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t}\n\n\t\tlet appearevent = slideAppearevent(slides.to, options)\n\n\t\tif (etype == appearevent || (etype == \"slidetransitionend\" && appearevent == \"autoanimate\")) {\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t}\n\n\t\t// Add scroll mode compatibility, does not have a slidetransitionend event yet\n\t\tif (isScroll && etype == 'slidechanged' ) {\n\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tturnOffSlideAppearances(slides, options, names);\n\n\t\t\t// Add delay to allow for scroll animation to finish\n\t\t\tsetTimeout(() => {\n\t\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t\t}, options.delay)\n\t\t}\n\n\n\t\tif (etype == \"slidetransitionend\" ) {\n\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tturnOffSlideAppearances(slides, options, names);\n\t\t}\n\t\t\n\t\tif (etype == 'slidechanged' && document.body.dataset.exitoverview) {\n\t\t\tremoveStartAttribute(slides, options);\n\t\t\tslides.to.dataset.appearanceCanStart = true;\n\n\t\t} else if (etype == 'overviewhidden' ) {\n\n\t\t\tdocument.body.dataset.exitoverview = true;\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tdocument.body.removeAttribute('data-exitoverview')\n\t\t\t}, 500)\n\n\t\t\tif (event.currentSlide ) {\n\t\t\t\tremoveStartAttribute(slides, options);\n\t\t\t\tslides.to.dataset.appearanceCanStart = true;\n\t\t\t}\n\t\t}\n\t}\n}","import { debugLog, mergeDeep, doneLoading, isStack } from './helpers';\n\nimport {getAndLoadCSS} from './functions/get-load-css.js';\nimport {addAutoAnimation} from './functions/add-auto-animation.js';\nimport {fixListItem} from './functions/fix-list-item';\nimport {addBaseClass} from './functions/add-base-class.js';\nimport {addDelay} from './functions/add-delay.js';\nimport {getAppearanceArrays} from './functions/get-appearance-arrays.js';\nimport {convertToSpans} from './functions/convert-to-spans';\nimport {showHideSlide} from './functions/show-hide-slide.js';\n\n\nconst Plugin = () => {\n\n\tconst vars = {};\n\tvars.names = {};\n\tlet options = {};\n\n\t/**\n\t* Prepare the plugin to find Appearance elements\n\t* @param {Object} vars - The variables to be prepared.\n\t* @param {Object} names - The names to be prepared.\n\t* @param {Function} resolve - The callback function to be called when preparation is complete.\n\t* @throws {Error} Throws an error if the 'options' object is not defined.\n\t*/\n\tconst prepare = (options, vars, resolve) => {\n\n\t\tdebugLog(options, \"------------- Preloading -------------\");\n\n\t\tlet names = vars.names;\n\n\t\tgetAndLoadCSS(options, names.es5Filename);\n\n\t\tif (options.compatibility) {\n\t\t\tnames.animatecss = '.backInDown, .backInLeft, .backInRight, .backInUp, .bounceIn, .bounceInDown, .bounceInLeft, .bounceInRight, .bounceInUp, .fadeIn, .fadeInDown, .fadeInDownBig, .fadeInLeft, .fadeInLeftBig, .fadeInRight, .fadeInRightBig, .fadeInUp, .fadeInUpBig, .fadeInTopLeft, .fadeInTopRight, .fadeInBottomLeft, .fadeInBottomRight, .flipInX, .flipInY, .lightSpeedInRight, .lightSpeedInLeft, .rotateIn, .rotateInDownLeft, .rotateInDownRight, .rotateInUpLeft, .rotateInUpRight, .jackInTheBox, .rollIn, .zoomIn, .zoomInDown, .zoomInLeft, .zoomInRight, .zoomInUp, .slideInDown, .slideInLeft, .slideInRight, .slideInUp, .skidLeft, .skidLeftBig, .skidRight, .skidRightBig, .shrinkIn, .shrinkInBlur';\n\t\t\tnames.baseclass = options.compatibilitybaseclass\n\t\t}\n\n\t\tvars.appearances = Array.from(vars.slides.querySelectorAll(names.animatecss));\n\n\t\t// Go through each section to see if there are any (auto) selectors that need animation classes\n\t\tvars.regularSections.forEach(theSection => addAutoAnimation(theSection, options, vars));\n\n\t\tvars.appearances.forEach((theAppearance, index) => {\n\t\t\t// Fix any list item where the Appearance classes were moved to the span (Quarto does this)\n\t\t\tfixListItem(theAppearance, options, names);\n\n\t\t\t// Go through each appearance element and add the baseclass if it doesn't have it\n\t\t\taddBaseClass(theAppearance, names);\n\n\t\t\tif (theAppearance.hasAttribute('data-split')) {\n\t\t\t\tconvertToSpans(theAppearance, theAppearance.dataset.split);\n\t\t\t}\n\t\t});\n\n\t\tvars.regularSections.forEach((theSection, index) => {\n\t\t\t// Get all the Appearances in the section as separate arrays per delay loop\n\t\t\tlet appearanceArrays = getAppearanceArrays(theSection, names.baseclass, names.fragmentClass);\n\n\t\t\tif (appearanceArrays) {\n\t\t\t\tappearanceArrays.forEach((appearanceArray) => {\n\t\t\t\t\t// Add the delays to each appearance in the array\n\t\t\t\t\taddDelay(appearanceArray, options, names)\n\t\t\t\t})\n\t\t\t}\n\t\t});\n\n\t\tdoneLoading(resolve);\n\t}\n\n\t/**\n\t* The main function of the plugin\n\t* @param {object} deck - The deck object\n\t* @param {object} options - The options object\n\t* @param {string} es5Filename - The name of the file that will be used\n\t*/\n\tconst Appear = (deck, options, es5Filename) => {\n\n\t\tlet names = vars.names;\n\n\t\t// Set up names\n\t\tnames.baseclass = options.baseclass;\n\t\tnames.compatibilitybaseclass = options.compatibilitybaseclass;\n\t\tnames.fragmentSelector = \".fragment\";\n\t\tnames.fragmentClass = \"fragment\";\n\t\tnames.speedClasses = ['slower', 'slow', 'fast', 'faster'];\n\t\tnames.speedClasses.push(...names.speedClasses.map(speed => `animate__${speed}`));\n\t\tnames.animatecss = '[class^=\"animate__\"],[class*=\" animate__\"]';\n\t\tnames.es5Filename = es5Filename;\n\t\tnames.eventnames = ['ready', 'slidechanged', 'slidetransitionend', 'autoanimate', 'overviewhidden'];\n\t\n\t\t// Set up variables\n\t\tvars.deck = deck;\n\t\tvars.dom = deck.getRevealElement();\n\t\tvars.viewport = deck.getViewportElement();\n\t\tvars.slides = deck.getSlidesElement();\n\n\t\tvars.sections = vars.slides.querySelectorAll('section');\n\t\tvars.fragments = vars.slides.querySelectorAll(names.fragmentSelector);\n\t\tvars.regularSections = Array.from(vars.sections).filter( section => !isStack(section));\n\n\t\t// Check if Speaker view window\n\t\tif( /receiver/i.test( window.location.search ) ) vars.viewport.classList.add('sv');\n\n\t\tnames.eventnames.forEach( (eventname) => deck.on( eventname, event => { showHideSlide(event, options, names, vars) } ) );\n\n\t\tvars.viewport.addEventListener(\"animationend\", (event) => {\n\t\t\tevent.target.classList.add('animationended');\n\t\t});\n\t\tvars.viewport.addEventListener(\"fragmenthidden\", (event) => {\n\t\t\tevent.fragment.classList.remove('animationended');\n\t\t\tevent.fragment.querySelectorAll('.animationended').forEach(el => {\n\t\t\t\tel.classList.remove('animationended');\n\t\t\t});\n\t\t});\n\n\t\treturn new Promise(resolve => {\n\t\t\tprepare(options, vars, resolve);\n\t\t\tdebugLog(options, \"---------- Done preloading ----------\");\n\t\t});\n\t};\n\n\n\t/**\n\t* Initialize the plugin\n\t* @param {object} deck - The deck object\n\t*/\n\tconst init = (deck) => {\n\n\t\tlet defaultOptions = {\n\t\t\tbaseclass: 'animate__animated',\n\t\t\thideagain: true,\n\t\t\tdelay: 300,\n\t\t\tdebug: false,\n\t\t\tappearevent: 'slidetransitionend',\n\t\t\tautoappear: false,\n\t\t\tautoelements: false,\n\t\t\tappearparents: false,\n\t\t\tcssautoload: true,\n\t\t\tcsspath: '',\n\t\t\tanimatecsspath: {\n\t\t\t\tlink : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css',\n\t\t\t\tcompat : 'https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.compat.css',\n\t\t\t},\n\t\t\tcompatibility: false,\n\t\t\tcompatibilitybaseclass: 'animated'\n\t\t};\n\n\t\toptions = mergeDeep(defaultOptions, deck.getConfig().appearance || {});\n\n\t\treturn Appear(deck, options, \"appearance.js\");\n\t};\n\n\treturn { id: 'appearance', init: init };\n};\n\nexport default Plugin;","import { toJSONString } from '../helpers';\n\n\n/**\n * Adds automatic animations to elements within a section based on specified criteria.\n *\n * This function examines the provided section for attributes and options to determine\n * which classes should be added to its elements to enable automatic animations.\n *\n * @param {HTMLElement} section - The section element to which automatic animations will be applied.\n * @param {Object} options - The existing user options object\n * @param {Object} vars - The existing vars object\n * @returns {undefined}\n */\nexport const addAutoAnimation = (section, options, vars) => {\n\n\tlet sectionAutoSelectors = null;\n\n\tif (section.hasAttribute(\"data-autoappear\")) {\n\n\t\tlet sectDataAppear = section.dataset.autoappear;\n\n\t\tif (sectDataAppear == \"auto\" || sectDataAppear == \"\" || sectDataAppear.length < 1 || sectDataAppear == \"true\") {\n\t\t\t// This section should get the global autoappear classes on its objects\n\t\t\tsectionAutoSelectors = options.autoelements ? options.autoelements : null;\n\t\t} else {\n\t\t\t// This section should get the local autoappear classes on its objects\n\t\t\tsectionAutoSelectors = sectDataAppear;\n\t\t}\n\n\t} else if ( options.autoappear && options.autoelements ) {\n\t\t// This section should get the global autoappear classes on its objects\n\t\tsectionAutoSelectors = options.autoelements;\n\t}\n\n\tif (sectionAutoSelectors) {\n\n\t\tlet elementsToAnimate = JSON.parse(toJSONString(sectionAutoSelectors));\n\n\t\tObject.entries(elementsToAnimate).forEach(([selector, assignables]) => {\n\n\n\t\t\t// Exclude the elements from vars.appearances\n\t\t\tlet elements = Array.from(section.querySelectorAll(selector)).filter( element => !vars.appearances.includes(element) );\n\n\t\t\tif (elements.length) {\n\n\t\t\t\telements.forEach((element) => {\n\n\t\t\t\t\tvars.appearances.push(element)\n\n\t\t\t\t\tlet newClasses = [], newDelay = null, speedClass = false, elementSplit = null, containerDelay = null;\n\n\t\t\t\t\tif (Array.isArray(assignables)) {\n\n\t\t\t\t\t\tnewClasses = assignables[0].split(/[ ,]+/);\n\t\t\t\t\t\tnewDelay = assignables[1];\n\n\t\t\t\t\t} else if (typeof assignables == \"string\"){\n\n\t\t\t\t\t\tnewClasses = assignables.split(/[ ,]+/);\n\n\t\t\t\t\t} else if (assignables.constructor === Object) {\n\n\t\t\t\t\t\tif (assignables.class || assignables.animation) {\n\t\t\t\t\t\t\tlet animationClass = assignables.animation ? assignables.animation : assignables.class;\n\t\t\t\t\t\t\tnewClasses = animationClass.split(/[ ,]+/);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.speed) {\n\t\t\t\t\t\t\tspeedClass = String(assignables.speed);\n\t\t\t\t\t\t\tif (!speedClass.includes(\"animate__\")) {\n\t\t\t\t\t\t\t\tspeedClass = `animate__${speedClass}`\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.delay) {\n\t\t\t\t\t\t\tnewDelay = String(assignables.delay);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables.split) {\n\t\t\t\t\t\t\telementSplit = String(assignables.split);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (assignables[\"container-delay\"]) {\n\t\t\t\t\t\t\tcontainerDelay = String(assignables[\"container-delay\"]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telement.classList.add(...newClasses);\n\t\t\t\t\tif (speedClass) { element.classList.add(speedClass)}\n\n\t\t\t\t\tif (newDelay) {\n\t\t\t\t\t\tif (!element.dataset.delay) {\n\t\t\t\t\t\t\telement.dataset.delay = newDelay\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (elementSplit) {element.dataset.split = elementSplit};\n\t\t\t\t\tif (containerDelay) {element.dataset.containerDelay = containerDelay};\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}\n","/**\n * Adds a base class to an HTML element if it doesn't already have it.\n *\n * This function checks if the specified HTML element has the specified base class,\n * and if not, it adds the base class to the element's class list.\n *\n * @param {HTMLElement} appearance - The HTML element to which the base class should be added.\n * @param {Object} names - The existing 'names' object\n * @returns {undefined}\n */\n\nexport const addBaseClass = (appearance, names) => {\n\tif (!appearance.classList.contains(names.baseclass)) {\n\t\tappearance.classList.add(names.baseclass);\n\t}\n\tif (appearance.classList.contains(names.fragmentClass)) {\n\t\tappearance.classList.add('custom');\n\t}\n}\n","export const convertToSpans = (parent, kind) => {\n\n\tlet splitElements = false;\n\tlet joinChar = ' ';\n\n\tif (kind == \"words\") {\n\t\tsplitElements = parent.textContent.trim().split(/\\s+/);\n\t\t\n\t} else if (kind == \"letters\") {\n\t\tsplitElements = parent.textContent.trim().split('');\n\t\tjoinChar = '';\n\t}\n\n\tif (splitElements) {\n\t\tconst parentAnimateClasses = Array.from(parent.classList).filter(className => className.startsWith('animate__'));\n\t\n\t\tconst newHtml = splitElements.map((element, index) => {\n\t\t\tconst span = document.createElement('span');\n\t\t\tspan.textContent = element;\n\t\t\tif (element == \" \") {span.textContent = \"\\u00A0\"}\n\t\n\t\t\tif (parent.dataset.delay && index !== 0) {\n\t\t\t\tspan.dataset.delay = parent.dataset.delay\n\t\t\t}\n\n\t\t\tif (parent.dataset.containerDelay && index === 0) {\n\t\t\t\tspan.dataset.delay = parent.dataset.containerDelay\n\t\t\t}\n\t\t\tparent.classList.add('wordchargroup');\n\t\n\t\t\tparent.classList.forEach(className => className.startsWith('animate__') && span.classList.add(className));\n\t\t\treturn span.outerHTML;\n\t\t\t\n\t\t}).join(joinChar);\n\t\n\t\tparentAnimateClasses.forEach(className => parent.classList.remove(className));\n\t\tparent.removeAttribute('data-delay');\n\t\tparent.removeAttribute('data-split');\n\t\tparent.removeAttribute('data-container-delay');\n\t\n\t\tparent.innerHTML = newHtml;\n\t}\n\n\n};","export const addDelay = (appearanceArray, options, names) => {\n\n let delay = 0;\n appearanceArray.forEach((appearance, index) => {\n\n if ((index == 0 && appearance.dataset.delay) || index !=0) {\n\n let elementDelay = options.delay;\n\n if (appearance.dataset && appearance.dataset.delay) {\n elementDelay = parseInt(appearance.dataset.delay);\n }\n\n delay = delay + elementDelay;\n\n appearance.style.setProperty('animation-delay', delay + \"ms\");\n appearance.removeAttribute('data-delay');\n }\n\n })\n\n}\n"],"names":["isObject","item","Array","isArray","mergeDeep","target","sources","length","source","shift","key","Object","assign","toJSONString","str","JSONString","replace","JSON","parse","e","isJSON","stringify","trim","charAt","loadResource","url","type","callback","resource","head","document","querySelector","alreadyExists","createElement","rel","href","finish","call","onload","onreadystatechange","this","readyState","appendChild","debugLog","options","text","debug","console","log","getAndLoadCSS","fileName","thePath","path","pluginScript","getAttribute","slice","import","location","require","pathToFileURL","__filename","_documentCurrentScript","tagName","toUpperCase","src","URL","baseURI","lastIndexOf","pluginPath","pluginBaseName","cssautoload","AppearanceStylePath","csspath","appearance","AnimateCSSPath","compatibility","animatecsspath","compat","link","hoistAppearance","from","baseclass","to","parentNode","sibling","children","dataset","appearParent","classList","copyDataAttributes","attributes","not","filter","nodeName","includes","forEach","nodeValue","setAttribute","innerHTML","add","elemsNotInClass","targetClass","excludeClass","el","querySelectorAll","s","closest","getAppearanceArrays","section","groupClass","result","map","frag","elemsInClass","parentClass","some","group","removeStartAttribute","slides","hideagain","appearanceCanStart","removeAttribute","turnOffSlideAppearances","names","fromAppearances","animatecss","remove","fromFragments","fragment","Plugin","vars","prepare","resolve","es5Filename","compatibilitybaseclass","appearances","regularSections","theSection","addAutoAnimation","sectionAutoSelectors","hasAttribute","sectDataAppear","autoappear","autoelements","elementsToAnimate","entries","selector","assignables","elements","element","push","newClasses","newDelay","speedClass","elementSplit","containerDelay","split","constructor","class","animation","speed","String","delay","theAppearance","index","fixListItem","appearparents","outerHTML","addBaseClass","contains","fragmentClass","convertToSpans","parent","kind","splitElements","joinChar","textContent","parentAnimateClasses","className","startsWith","newHtml","span","join","appearanceArrays","appearanceArray","addDelay","elementDelay","parseInt","style","setProperty","setTimeout","doneLoading","Appear","deck","fragmentSelector","speedClasses","eventnames","dom","getRevealElement","viewport","getViewportElement","getSlidesElement","sections","fragments","isStack","childNodes","i","test","window","search","eventname","on","event","showHideSlide","getConfig","view","isScroll","etype","fromSlide","previousSlide","toSlide","currentSlide","fromTo","appearevent","slideAppearevent","body","exitoverview","addEventListener","Promise","id","init"],"mappings":";;;;;;;;;;;;;;0SAKO,MAyDMA,EAAYC,GAChBA,GAAwB,iBAATA,IAAsBC,MAAMC,QAAQF,GAS/CG,EAAYA,CAACC,KAAWC,KACpC,IAAKA,EAAQC,OAAQ,OAAOF,EAC5B,MAAMG,EAASF,EAAQG,QAEvB,GAAIT,EAASK,IAAWL,EAASQ,GAChC,IAAK,MAAME,KAAOF,EACbR,EAASQ,EAAOE,KACdL,EAAOK,IAAMC,OAAOC,OAAOP,EAAQ,CAAEK,CAACA,GAAM,CAAC,IAClDN,EAAUC,EAAOK,GAAMF,EAAOE,KAE9BC,OAAOC,OAAOP,EAAQ,CAAEK,CAACA,GAAMF,EAAOE,KAIzC,OAAON,EAAUC,KAAWC,EAAQ,EAmBxBO,EAAgBC,IAC5B,IAAIC,EAAa,GAajB,MAXmB,iBAARD,IAAkBA,EAAMA,EAAIE,QAAQ,QAAQ,KAAKA,QAAQ,QAAQ,MAG3ED,EA1GoBD,KACrB,IACC,OAAQG,KAAKC,MAAMJ,MAAUA,CAC7B,CAAC,MAAOK,GACR,OA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B,EAAKqE,SAAS4B,iBAAiB,kBAAmBf,IACjDA,EAAMpF,SAASxC,UAAUsC,OAAO,kBAChCsF,EAAMpF,SAASxB,iBAAiB,mBAAmBT,SAAQQ,IAC1DA,EAAGf,UAAUsC,OAAO,iBAAiB,GACpC,IAGI,IAAIsG,SAAQhG,IAClBD,EAAQvF,EAASsF,EAAME,GACvBzF,EAASC,EAAS,4CAA4C,GAC7D,EAkCH,MAAO,CAAEyL,GAAI,aAAcC,KA1BbrC,IAqBbrJ,EAAUxC,EAnBW,CACpB6E,UAAW,oBACXsC,WAAW,EACX2C,MAAO,IACPpH,OAAO,EACPiL,YAAa,qBACbjF,YAAY,EACZC,cAAc,EACduB,eAAe,EACfhG,aAAa,EACbE,QAAS,GACTI,eAAgB,CACfE,KAAO,2EACPD,OAAS,+EAEVF,eAAe,EACf2D,uBAAwB,YAGW2D,EAAKqB,YAAY7I,YAAc,CAAA,GAE5DuH,EAAOC,EAAMrJ,EAAS,kBAGS"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 62a86a5..21a3142 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2020,13 +2020,15 @@ }, "node_modules/@types/cookie": { "version": "0.4.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==", + "dev": true }, "node_modules/@types/cors": { - "version": "2.8.13", + "version": "2.8.17", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.17.tgz", + "integrity": "sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==", "dev": true, - "license": "MIT", "dependencies": { "@types/node": "*" } @@ -2425,8 +2427,9 @@ }, "node_modules/base64id": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", + "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", "dev": true, - "license": "MIT", "engines": { "node": "^4.5.0 || >= 5.9" } @@ -2486,13 +2489,13 @@ } }, "node_modules/browser-sync": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-3.0.2.tgz", - "integrity": "sha512-PC9c7aWJFVR4IFySrJxOqLwB9ENn3/TaXCXtAa0SzLwocLN3qMjN+IatbjvtCX92BjNXsY6YWg9Eb7F3Wy255g==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-3.0.3.tgz", + "integrity": "sha512-91hoBHKk1C4pGeD+oE9Ld222k2GNQEAsI5AElqR8iLLWNrmZR2LPP8B0h8dpld9u7kro5IEUB3pUb0DJ3n1cRQ==", "dev": true, "dependencies": { - "browser-sync-client": "^3.0.2", - "browser-sync-ui": "^3.0.2", + "browser-sync-client": "^3.0.3", + "browser-sync-ui": "^3.0.3", "bs-recipes": "1.3.4", "chalk": "4.1.2", "chokidar": "^3.5.1", @@ -2506,15 +2509,15 @@ "fs-extra": "3.0.1", "http-proxy": "^1.18.1", "immutable": "^3", - "micromatch": "^4.0.2", + "micromatch": "^4.0.8", "opn": "5.3.0", "portscanner": "2.2.0", "raw-body": "^2.3.2", "resp-modifier": "6.0.2", "rx": "4.1.0", - "send": "0.16.2", - "serve-index": "1.9.1", - "serve-static": "1.13.2", + "send": "^0.19.0", + "serve-index": "^1.9.1", + "serve-static": "^1.16.2", "server-destroy": "1.0.1", "socket.io": "^4.4.1", "ua-parser-js": "^1.0.33", @@ -2528,9 +2531,9 @@ } }, "node_modules/browser-sync-client": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-3.0.2.tgz", - "integrity": "sha512-tBWdfn9L0wd2Pjuz/NWHtNEKthVb1Y67vg8/qyGNtCqetNz5lkDkFnrsx5UhPNPYUO8vci50IWC/BhYaQskDiQ==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-3.0.3.tgz", + "integrity": "sha512-TOEXaMgYNjBYIcmX5zDlOdjEqCeCN/d7opf/fuyUD/hhGVCfP54iQIDhENCi012AqzYZm3BvuFl57vbwSTwkSQ==", "dev": true, "dependencies": { "etag": "1.8.1", @@ -2542,9 +2545,9 @@ } }, "node_modules/browser-sync-ui": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-3.0.2.tgz", - "integrity": "sha512-V3FwWAI+abVbFLTyJjXJlCMBwjc3GXf/BPGfwO2fMFACWbIGW9/4SrBOFYEOOtqzCjQE0Di+U3VIb7eES4omNA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-3.0.3.tgz", + "integrity": "sha512-FcGWo5lP5VodPY6O/f4pXQy5FFh4JK0f2/fTBsp0Lx1NtyBWs/IfPPJbW8m1ujTW/2r07oUXKTF2LYZlCZktjw==", "dev": true, "dependencies": { "async-each-series": "0.1.1", @@ -3005,9 +3008,10 @@ "peer": true }, "node_modules/cookie": { - "version": "0.4.2", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -3044,8 +3048,9 @@ }, "node_modules/cors": { "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", "dev": true, - "license": "MIT", "dependencies": { "object-assign": "^4", "vary": "^1" @@ -3105,9 +3110,14 @@ } }, "node_modules/destroy": { - "version": "1.0.4", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", "dev": true, - "license": "MIT" + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } }, "node_modules/detect-file": { "version": "1.0.0", @@ -3275,51 +3285,44 @@ } }, "node_modules/engine.io": { - "version": "6.5.1", + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.2.tgz", + "integrity": "sha512-gmNvsYi9C8iErnZdVcJnvCpSKbWTt1E8+JZo8b+daLninywUWi5NQ5STSHZ9rFjFO7imNcvb8Pc5pe/wMR5xEw==", "dev": true, - "license": "MIT", "dependencies": { "@types/cookie": "^0.4.1", "@types/cors": "^2.8.12", "@types/node": ">=10.0.0", "accepts": "~1.3.4", "base64id": "2.0.0", - "cookie": "~0.4.1", + "cookie": "~0.7.2", "cors": "~2.8.5", "debug": "~4.3.1", - "engine.io-parser": "~5.1.0", - "ws": "~8.11.0" + "engine.io-parser": "~5.2.1", + "ws": "~8.17.1" }, "engines": { - "node": ">=10.0.0" + "node": ">=10.2.0" } }, "node_modules/engine.io-client": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.5.4.tgz", - "integrity": "sha512-GeZeeRjpD2qf49cZQ0Wvh/8NJNfeXkXXcoGh+F77oEAgo9gUHwT1fCRxSNU+YEEaysOJTnsFHmM5oAcPy4ntvQ==", + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.6.1.tgz", + "integrity": "sha512-aYuoak7I+R83M/BBPIOs2to51BmFIpC1wZe6zZzMrT2llVsHy5cvcmdsJgP2Qz6smHu+sD9oexiSUAVd8OfBPw==", "dev": true, "dependencies": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.1", "engine.io-parser": "~5.2.1", "ws": "~8.17.1", - "xmlhttprequest-ssl": "~2.0.0" - } - }, - "node_modules/engine.io-client/node_modules/engine.io-parser": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.2.tgz", - "integrity": "sha512-RcyUFKA93/CXH20l4SoVvzZfrSDMOTUS3bWVpTt2FuFP+XYrL8i8oonHP7WInRyVHXh0n/ORtoeiE1os+8qkSw==", - "dev": true, - "engines": { - "node": ">=10.0.0" + "xmlhttprequest-ssl": "~2.1.1" } }, "node_modules/engine.io-parser": { - "version": "5.1.0", + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz", + "integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==", "dev": true, - "license": "MIT", "engines": { "node": ">=10.0.0" } @@ -3360,8 +3363,9 @@ }, "node_modules/etag": { "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -3610,8 +3614,9 @@ }, "node_modules/fresh": { "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -4871,11 +4876,12 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, - "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -4883,11 +4889,15 @@ } }, "node_modules/mime": { - "version": "1.4.1", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", "dev": true, - "license": "MIT", "bin": { "mime": "cli.js" + }, + "engines": { + "node": ">=4" } }, "node_modules/mime-db": { @@ -5395,8 +5405,9 @@ }, "node_modules/range-parser": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -5819,23 +5830,24 @@ } }, "node_modules/send": { - "version": "0.16.2", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", "dev": true, - "license": "MIT", "dependencies": { "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", + "depd": "2.0.0", + "destroy": "1.2.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", - "http-errors": "~1.6.2", - "mime": "1.4.1", - "ms": "2.0.0", - "on-finished": "~2.3.0", - "range-parser": "~1.2.0", - "statuses": "~1.4.0" + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" }, "engines": { "node": ">= 0.8.0" @@ -5843,55 +5855,44 @@ }, "node_modules/send/node_modules/debug": { "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, - "license": "MIT", "dependencies": { "ms": "2.0.0" } }, - "node_modules/send/node_modules/depd": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true }, - "node_modules/send/node_modules/http-errors": { - "version": "1.6.3", + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/send/node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dev": true, - "license": "MIT", "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" + "ee-first": "1.1.1" }, "engines": { - "node": ">= 0.6" + "node": ">= 0.8" } }, - "node_modules/send/node_modules/inherits": { - "version": "2.0.3", - "dev": true, - "license": "ISC" - }, - "node_modules/send/node_modules/ms": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/send/node_modules/setprototypeof": { - "version": "1.1.0", - "dev": true, - "license": "ISC" - }, "node_modules/send/node_modules/statuses": { - "version": "1.4.0", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "dev": true, - "license": "MIT", "engines": { - "node": ">= 0.6" + "node": ">= 0.8" } }, "node_modules/serialize-javascript": { @@ -5973,19 +5974,29 @@ } }, "node_modules/serve-static": { - "version": "1.13.2", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", "dev": true, - "license": "MIT", "dependencies": { - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", - "parseurl": "~1.3.2", - "send": "0.16.2" + "parseurl": "~1.3.3", + "send": "0.19.0" }, "engines": { "node": ">= 0.8.0" } }, + "node_modules/serve-static/node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/server-destroy": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/server-destroy/-/server-destroy-1.0.1.tgz", @@ -6011,20 +6022,21 @@ "license": "MIT" }, "node_modules/socket.io": { - "version": "4.7.1", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.8.0.tgz", + "integrity": "sha512-8U6BEgGjQOfGz3HHTYaC/L1GaxDCJ/KM0XTkJly0EhZ5U/du9uNEZy4ZgYzEzIqlx2CMm25CrCqr1ck899eLNA==", "dev": true, - "license": "MIT", "dependencies": { "accepts": "~1.3.4", "base64id": "~2.0.0", "cors": "~2.8.5", "debug": "~4.3.2", - "engine.io": "~6.5.0", + "engine.io": "~6.6.0", "socket.io-adapter": "~2.5.2", "socket.io-parser": "~4.2.4" }, "engines": { - "node": ">=10.0.0" + "node": ">=10.2.0" } }, "node_modules/socket.io-adapter": { @@ -6036,14 +6048,14 @@ } }, "node_modules/socket.io-client": { - "version": "4.7.5", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.7.5.tgz", - "integrity": "sha512-sJ/tqHOCe7Z50JCBCXrsY3I2k03iOiUe+tj1OmKeD2lXPiGH/RUCdTZFoqVyN7l1MnpIzPrGtLcijffmeouNlQ==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.8.0.tgz", + "integrity": "sha512-C0jdhD5yQahMws9alf/yvtsMGTaIDBnZ8Rb5HU56svyq0l5LIrGzIDZZD5pHQlmzxLuU91Gz+VpQMKgCTNYtkw==", "dev": true, "dependencies": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.2", - "engine.io-client": "~6.5.2", + "engine.io-client": "~6.6.1", "socket.io-parser": "~4.2.4" }, "engines": { @@ -6505,8 +6517,9 @@ }, "node_modules/vary": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.8" } @@ -6808,9 +6821,9 @@ } }, "node_modules/xmlhttprequest-ssl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz", - "integrity": "sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.1.1.tgz", + "integrity": "sha512-ptjR8YSJIXoA3Mbv5po7RtSYHO6mZr8s7i5VGmEk7QY2pQWyT1o0N+W1gKbOyJPUCGXGnuw0wqe8f0L6Y0ny7g==", "dev": true, "engines": { "node": ">=0.4.0"