How to use QuerySelectorAll method of html Package

Best K6 code snippet using html.QuerySelectorAll

reveal.go

Source:reveal.go Github

copy

Full Screen

1package reveal2import (3 "io"4 "strings"5)6const revealjs string = `/**7* Minified by jsDelivr using Terser v3.14.1.8* Original file: /npm/reveal.js@3.9.2/js/reveal.js9*10* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files11*/12!function(e,t){"function"==typeof define&&define.amd?define(function(){return e.Reveal=t(),e.Reveal}):"object"==typeof exports?module.exports=t():e.Reveal=t()}(this,function(){"use strict";var e,t,r,n,a,i,o,s,l,c=".slides section",d=".slides>section",u=".slides>section.present>section",p=".slides>section:first-of-type",f=navigator.userAgent,v=/registerPlugin|registerKeyboardShortcut|addKeyBinding|addEventListener/,h={width:960,height:700,margin:.04,minScale:.2,maxScale:2,controls:!0,controlsTutorial:!0,controlsLayout:"bottom-right",controlsBackArrows:"faded",progress:!0,slideNumber:!1,showSlideNumber:"all",hashOneBasedIndex:!1,hash:!1,history:!1,keyboard:!0,keyboardCondition:null,overview:!0,disableLayout:!1,center:!0,touch:!0,loop:!1,rtl:!1,navigationMode:"default",shuffle:!1,fragments:!0,fragmentInURL:!1,embedded:!1,help:!0,pause:!0,showNotes:!1,autoPlayMedia:null,preloadIframes:null,autoSlide:0,autoSlideStoppable:!0,autoSlideMethod:null,defaultTiming:null,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,postMessage:!0,postMessageEvents:!1,focusBodyOnPageVisibilityChange:!0,transition:"slide",transitionSpeed:"default",backgroundTransition:"fade",parallaxBackgroundImage:"",parallaxBackgroundSize:"",parallaxBackgroundRepeat:"",parallaxBackgroundPosition:"",parallaxBackgroundHorizontal:null,parallaxBackgroundVertical:null,pdfMaxPagesPerSlide:Number.POSITIVE_INFINITY,pdfSeparateFragments:!0,pdfPageHeightOffset:-1,viewDistance:3,mobileViewDistance:2,display:"block",hideInactiveCursor:!0,hideCursorTime:5e3,dependencies:[]},g=!1,m=!1,b=!1,y=null,w=null,A=!1,k=!1,L=[],E=1,S={layout:"",overview:""},x={},q={},M=[],N={},I=0,T=0,P=!1,C=0,H=!1,R=0,B=0,z=-1,D=!1,O={startX:0,startY:0,startCount:0,captured:!1,threshold:40},W={},F={};function U(){var e=Object.keys(q).length;if(0===e)V();else{var t=function(){0==--e&&V()};for(var r in q){var n=q[r];if("function"==typeof n.init){var a=n.init();a&&"function"==typeof a.then?a.then(t):t()}else t()}}}function V(){var n;M.length&&M.forEach(function(e){j(e.src,e.callback)}),m=!0,x.slides.classList.add("no-transition"),o?x.wrapper.classList.add("no-hover"):x.wrapper.classList.remove("no-hover"),/iphone/gi.test(f)?x.wrapper.classList.add("ua-iphone"):x.wrapper.classList.remove("ua-iphone"),x.background=X(x.wrapper,"div","backgrounds",null),x.progress=X(x.wrapper,"div","progress","<span></span>"),x.progressbar=x.progress.querySelector("span"),x.controls=X(x.wrapper,"aside","controls",'<button class="navigate-left" aria-label="previous slide"><div class="controls-arrow"></div></button><button class="navigate-right" aria-label="next slide"><div class="controls-arrow"></div></button><button class="navigate-up" aria-label="above slide"><div class="controls-arrow"></div></button><button class="navigate-down" aria-label="below slide"><div class="controls-arrow"></div></button>'),x.slideNumber=X(x.wrapper,"div","slide-number",""),x.speakerNotes=X(x.wrapper,"div","speaker-notes",null),x.speakerNotes.setAttribute("data-prevent-swipe",""),x.speakerNotes.setAttribute("tabindex","0"),x.pauseOverlay=X(x.wrapper,"div","pause-overlay",h.controls?'<button class="resume-button">Resume presentation</button>':null),x.wrapper.setAttribute("role","application"),x.controlsLeft=ee(document.querySelectorAll(".navigate-left")),x.controlsRight=ee(document.querySelectorAll(".navigate-right")),x.controlsUp=ee(document.querySelectorAll(".navigate-up")),x.controlsDown=ee(document.querySelectorAll(".navigate-down")),x.controlsPrev=ee(document.querySelectorAll(".navigate-prev")),x.controlsNext=ee(document.querySelectorAll(".navigate-next")),x.controlsRightArrow=x.controls.querySelector(".navigate-right"),x.controlsDownArrow=x.controls.querySelector(".navigate-down"),x.statusDiv=((n=document.getElementById("aria-status-div"))||((n=document.createElement("div")).style.position="absolute",n.style.height="1px",n.style.width="1px",n.style.overflow="hidden",n.style.clip="rect( 1px, 1px, 1px, 1px )",n.setAttribute("id","aria-status-div"),n.setAttribute("aria-live","polite"),n.setAttribute("aria-atomic","true"),x.wrapper.appendChild(n)),n),h.postMessage&&window.addEventListener("message",function(t){var r=t.data;if("string"==typeof r&&"{"===r.charAt(0)&&"}"===r.charAt(r.length-1)&&(r=JSON.parse(r)).method&&"function"==typeof e[r.method])if(!1===v.test(r.method)){var n=e[r.method].apply(e,r.args);de("callback",{method:r.method,result:n})}else console.warn('reveal.js: "'+r.method+'" is is blacklisted from the postMessage API')},!1),setInterval(function(){0===x.wrapper.scrollTop&&0===x.wrapper.scrollLeft||(x.wrapper.scrollTop=0,x.wrapper.scrollLeft=0)},1e3),ee(x.wrapper.querySelectorAll(d)).forEach(function(e){var t=ee(e.querySelectorAll("section"));t.forEach(function(e,t){t>0&&(e.classList.remove("present"),e.classList.remove("past"),e.classList.add("future"),e.setAttribute("aria-hidden","true"))})}),J(),st(),Xe(!0),setTimeout(function(){x.slides.classList.remove("no-transition"),x.wrapper.classList.add("ready"),ce("ready",{indexh:t,indexv:r,currentSlide:a})},1),se()&&(Z(),"complete"===document.readyState?Y():window.addEventListener("load",Y))}function j(e,t){var r=document.createElement("script");r.type="text/javascript",r.async=!1,r.defer=!1,r.src=e,t&&(r.onload=r.onreadystatechange=function(e){("load"===e.type||/loaded|complete/.test(r.readyState))&&(r.onload=r.onreadystatechange=r.onerror=null,t())},r.onerror=function(e){r.onload=r.onreadystatechange=r.onerror=null,t(new Error("Failed loading script: "+r.src+"\n"+e))});var n=document.querySelector("head");n.insertBefore(r,n.lastChild)}function K(e){var t="";if(3===e.nodeType)t+=e.textContent;else if(1===e.nodeType){var r=e.getAttribute("aria-hidden"),n="none"===window.getComputedStyle(e).display;"true"===r||n||ee(e.childNodes).forEach(function(e){t+=K(e)})}return t}function Y(){var e=be(window.innerWidth,window.innerHeight),t=Math.floor(e.width*(1+h.margin)),r=Math.floor(e.height*(1+h.margin)),n=e.width,a=e.height;ae("@page{size:"+t+"px "+r+"px; margin: 0px;}"),ae(".reveal section>img, .reveal section>video, .reveal section>iframe{max-width: "+n+"px; max-height:"+a+"px}"),document.body.classList.add("print-pdf"),document.body.style.width=t+"px",document.body.style.height=r+"px",me(n,a);var i=h.slideNumber&&/all|print/i.test(h.showSlideNumber);ee(x.wrapper.querySelectorAll(c)).forEach(function(e){e.setAttribute("data-slide-number",Ke(e))}),ee(x.wrapper.querySelectorAll(c)).forEach(function(e){if(!1===e.classList.contains("stack")){var o=(t-n)/2,s=(r-a)/2,l=e.scrollHeight,c=Math.max(Math.ceil(l/r),1);(1===(c=Math.min(c,h.pdfMaxPagesPerSlide))&&h.center||e.classList.contains("center"))&&(s=Math.max((r-l)/2,0));var d=document.createElement("div");if(d.className="pdf-page",d.style.height=(r+h.pdfPageHeightOffset)*c+"px",e.parentNode.insertBefore(d,e),d.appendChild(e),e.style.left=o+"px",e.style.top=s+"px",e.style.width=n+"px",e.slideBackgroundElement&&d.insertBefore(e.slideBackgroundElement,e),h.showNotes){var u=bt(e);if(u){var p="string"==typeof h.showNotes?h.showNotes:"inline",f=document.createElement("div");f.classList.add("speaker-notes"),f.classList.add("speaker-notes-pdf"),f.setAttribute("data-layout",p),f.innerHTML=u,"separate-page"===p?d.parentNode.insertBefore(f,d.nextSibling):(f.style.left="8px",f.style.bottom="8px",f.style.width=t-16+"px",d.appendChild(f))}}if(i){var v=document.createElement("div");v.classList.add("slide-number"),v.classList.add("slide-number-pdf"),v.innerHTML=e.getAttribute("data-slide-number"),d.appendChild(v)}if(h.pdfSeparateFragments){var g,m,b=wt(d.querySelectorAll(".fragment"),!0);b.forEach(function(e){g&&g.forEach(function(e){e.classList.remove("current-fragment")}),e.forEach(function(e){e.classList.add("visible","current-fragment")});var t=d.cloneNode(!0);d.parentNode.insertBefore(t,(m||d).nextSibling),g=e,m=t}),b.forEach(function(e){e.forEach(function(e){e.classList.remove("visible","current-fragment")})})}else ee(d.querySelectorAll(".fragment:not(.fade-out)")).forEach(function(e){e.classList.add("visible")})}}),ce("pdf-ready")}function X(e,t,r,n){for(var a=e.querySelectorAll("."+r),i=0;i<a.length;i++){var o=a[i];if(o.parentNode===e)return o}var s=document.createElement(t);return s.className=r,"string"==typeof n&&(s.innerHTML=n),e.appendChild(s),s}function _(e,t){var r=document.createElement("div");r.className="slide-background "+e.className.replace(/present|past|future/,"");var n=document.createElement("div");return n.className="slide-background-content",r.appendChild(n),t.appendChild(r),e.slideBackgroundElement=r,e.slideBackgroundContentElement=n,$(e),r}function $(e){var t=e.slideBackgroundElement,r=e.slideBackgroundContentElement;e.classList.remove("has-dark-background"),e.classList.remove("has-light-background"),t.removeAttribute("data-loaded"),t.removeAttribute("data-background-hash"),t.removeAttribute("data-background-size"),t.removeAttribute("data-background-transition"),t.style.backgroundColor="",r.style.backgroundSize="",r.style.backgroundRepeat="",r.style.backgroundPosition="",r.style.backgroundImage="",r.style.opacity="",r.innerHTML="";var n={background:e.getAttribute("data-background"),backgroundSize:e.getAttribute("data-background-size"),backgroundImage:e.getAttribute("data-background-image"),backgroundVideo:e.getAttribute("data-background-video"),backgroundIframe:e.getAttribute("data-background-iframe"),backgroundColor:e.getAttribute("data-background-color"),backgroundRepeat:e.getAttribute("data-background-repeat"),backgroundPosition:e.getAttribute("data-background-position"),backgroundTransition:e.getAttribute("data-background-transition"),backgroundOpacity:e.getAttribute("data-background-opacity")};n.background&&(/^(http|file|\/\/)/gi.test(n.background)||/\.(svg|png|jpg|jpeg|gif|bmp)([?#\s]|$)/gi.test(n.background)?e.setAttribute("data-background-image",n.background):t.style.background=n.background),(n.background||n.backgroundColor||n.backgroundImage||n.backgroundVideo||n.backgroundIframe)&&t.setAttribute("data-background-hash",n.background+n.backgroundSize+n.backgroundImage+n.backgroundVideo+n.backgroundIframe+n.backgroundColor+n.backgroundRepeat+n.backgroundPosition+n.backgroundTransition+n.backgroundOpacity),n.backgroundSize&&t.setAttribute("data-background-size",n.backgroundSize),n.backgroundColor&&(t.style.backgroundColor=n.backgroundColor),n.backgroundTransition&&t.setAttribute("data-background-transition",n.backgroundTransition),e.hasAttribute("data-preload")&&t.setAttribute("data-preload",""),n.backgroundSize&&(r.style.backgroundSize=n.backgroundSize),n.backgroundRepeat&&(r.style.backgroundRepeat=n.backgroundRepeat),n.backgroundPosition&&(r.style.backgroundPosition=n.backgroundPosition),n.backgroundOpacity&&(r.style.opacity=n.backgroundOpacity);var a=n.backgroundColor;if(!a){var i=window.getComputedStyle(t);i&&i.backgroundColor&&(a=i.backgroundColor)}if(a){var o=oe(a);o&&0!==o.a&&(function(e){"string"==typeof e&&(e=oe(e));if(e)return(299*e.r+587*e.g+114*e.b)/1e3;return null}(a)<128?e.classList.add("has-dark-background"):e.classList.add("has-light-background"))}}function J(e){var t=h.transition;if("object"==typeof e&&G(h,e),!1!==m){var r=x.wrapper.querySelectorAll(c).length;x.wrapper.classList.remove(t),!1===N.transforms3d&&(h.transition="linear"),x.wrapper.classList.add(h.transition),x.wrapper.setAttribute("data-transition-speed",h.transitionSpeed),x.wrapper.setAttribute("data-background-transition",h.backgroundTransition),x.controls.style.display=h.controls?"block":"none",x.progress.style.display=h.progress?"block":"none",x.controls.setAttribute("data-controls-layout",h.controlsLayout),x.controls.setAttribute("data-controls-back-arrows",h.controlsBackArrows),h.shuffle&&Oe(),h.rtl?x.wrapper.classList.add("rtl"):x.wrapper.classList.remove("rtl"),h.center?x.wrapper.classList.add("center"):x.wrapper.classList.remove("center"),!1===h.pause&&Pe(),h.showNotes&&x.speakerNotes.setAttribute("data-layout","string"==typeof h.showNotes?h.showNotes:"inline"),h.mouseWheel?(document.addEventListener("DOMMouseScroll",Yt,!1),document.addEventListener("mousewheel",Yt,!1)):(document.removeEventListener("DOMMouseScroll",Yt,!1),document.removeEventListener("mousewheel",Yt,!1)),h.rollingLinks?function(){if(N.transforms3d&&!("msPerspective"in document.body.style))for(var e=x.wrapper.querySelectorAll(c+" a"),t=0,r=e.length;t<r;t++){var n=e[t];if(n.textContent&&!n.querySelector("*")&&(!n.className||!n.classList.contains(n,"roll"))){var a=document.createElement("span");a.setAttribute("data-title",n.text),a.innerHTML=n.innerHTML,n.classList.add("roll"),n.innerHTML="",n.appendChild(a)}}}():function(){for(var e=x.wrapper.querySelectorAll(c+" a.roll"),t=0,r=e.length;t<r;t++){var n=e[t],a=n.querySelector("span");a&&(n.classList.remove("roll"),n.innerHTML=a.innerHTML)}}(),h.hideInactiveCursor?(document.addEventListener("mousemove",zt,!1),document.addEventListener("mousedown",zt,!1)):(Ne(),document.removeEventListener("mousemove",zt,!1),document.removeEventListener("mousedown",zt,!1)),h.previewLinks?(ue(),pe("[data-preview-link=false]")):(pe(),ue("[data-preview-link]:not([data-preview-link=false])")),l&&(l.destroy(),l=null),r>1&&h.autoSlide&&h.autoSlideStoppable&&N.canvas&&N.requestAnimationFrame&&((l=new or(x.wrapper,function(){return Math.min(Math.max((Date.now()-z)/R,0),1)})).on("click",ir),D=!1),!1===h.fragments&&ee(x.slides.querySelectorAll(".fragment")).forEach(function(e){e.classList.add("visible"),e.classList.remove("current-fragment")});var n="none";h.slideNumber&&!se()&&("all"===h.showSlideNumber?n="block":"speaker"===h.showSlideNumber&&ot()&&(n="block")),x.slideNumber.style.display=n,"default"!==h.navigationMode?x.wrapper.setAttribute("data-navigation-mode",h.navigationMode):x.wrapper.removeAttribute("data-navigation-mode"),"linear"===h.navigationMode?(W["&#8594; , &#8595; , SPACE , N , L , J"]="Next slide",W["&#8592; , &#8593; , P , H , K"]="Previous slide"):(W["N , SPACE"]="Next slide",W.P="Previous slide",W["&#8592; , H"]="Navigate left",W["&#8594; , L"]="Navigate right",W["&#8593; , K"]="Navigate up",W["&#8595; , J"]="Navigate down"),W["Home , Shift &#8592;"]="First slide",W["End , Shift &#8594;"]="Last slide",W["B , ."]="Pause",W.F="Fullscreen",W["ESC, O"]="Slide overview",ze()}}function Q(){var e;(H=!0,window.addEventListener("hashchange",er,!1),window.addEventListener("resize",tr,!1),h.touch&&("onpointerdown"in window?(x.wrapper.addEventListener("pointerdown",Vt,!1),x.wrapper.addEventListener("pointermove",jt,!1),x.wrapper.addEventListener("pointerup",Kt,!1)):window.navigator.msPointerEnabled?(x.wrapper.addEventListener("MSPointerDown",Vt,!1),x.wrapper.addEventListener("MSPointerMove",jt,!1),x.wrapper.addEventListener("MSPointerUp",Kt,!1)):(x.wrapper.addEventListener("touchstart",Wt,!1),x.wrapper.addEventListener("touchmove",Ft,!1),x.wrapper.addEventListener("touchend",Ut,!1))),h.keyboard&&(document.addEventListener("keydown",Ot,!1),document.addEventListener("keypress",Dt,!1)),h.progress&&x.progress&&x.progress.addEventListener("click",Xt,!1),x.pauseOverlay.addEventListener("click",Pe,!1),h.focusBodyOnPageVisibilityChange)&&("hidden"in document?e="visibilitychange":"msHidden"in document?e="msvisibilitychange":"webkitHidden"in document&&(e="webkitvisibilitychange"),e&&document.addEventListener(e,rr,!1));var t=["touchstart","click"];f.match(/android/gi)&&(t=["touchstart"]),t.forEach(function(e){x.controlsLeft.forEach(function(t){t.addEventListener(e,_t,!1)}),x.controlsRight.forEach(function(t){t.addEventListener(e,$t,!1)}),x.controlsUp.forEach(function(t){t.addEventListener(e,Jt,!1)}),x.controlsDown.forEach(function(t){t.addEventListener(e,Qt,!1)}),x.controlsPrev.forEach(function(t){t.addEventListener(e,Zt,!1)}),x.controlsNext.forEach(function(t){t.addEventListener(e,Gt,!1)})})}function Z(){H=!1,document.removeEventListener("keydown",Ot,!1),document.removeEventListener("keypress",Dt,!1),window.removeEventListener("hashchange",er,!1),window.removeEventListener("resize",tr,!1),x.wrapper.removeEventListener("pointerdown",Vt,!1),x.wrapper.removeEventListener("pointermove",jt,!1),x.wrapper.removeEventListener("pointerup",Kt,!1),x.wrapper.removeEventListener("MSPointerDown",Vt,!1),x.wrapper.removeEventListener("MSPointerMove",jt,!1),x.wrapper.removeEventListener("MSPointerUp",Kt,!1),x.wrapper.removeEventListener("touchstart",Wt,!1),x.wrapper.removeEventListener("touchmove",Ft,!1),x.wrapper.removeEventListener("touchend",Ut,!1),x.pauseOverlay.removeEventListener("click",Pe,!1),h.progress&&x.progress&&x.progress.removeEventListener("click",Xt,!1),["touchstart","click"].forEach(function(e){x.controlsLeft.forEach(function(t){t.removeEventListener(e,_t,!1)}),x.controlsRight.forEach(function(t){t.removeEventListener(e,$t,!1)}),x.controlsUp.forEach(function(t){t.removeEventListener(e,Jt,!1)}),x.controlsDown.forEach(function(t){t.removeEventListener(e,Qt,!1)}),x.controlsPrev.forEach(function(t){t.removeEventListener(e,Zt,!1)}),x.controlsNext.forEach(function(t){t.removeEventListener(e,Gt,!1)})})}function G(e,t){for(var r in t)e[r]=t[r];return e}function ee(e){return Array.prototype.slice.call(e)}function te(e){if("string"==typeof e){if("null"===e)return null;if("true"===e)return!0;if("false"===e)return!1;if(e.match(/^-?[\d\.]+$/))return parseFloat(e)}return e}function re(e,t){e.style.WebkitTransform=t,e.style.MozTransform=t,e.style.msTransform=t,e.style.transform=t}function ne(e){"string"==typeof e.layout&&(S.layout=e.layout),"string"==typeof e.overview&&(S.overview=e.overview),S.layout?re(x.slides,S.layout+" "+S.overview):re(x.slides,S.overview)}function ae(e){var t=document.createElement("style");t.type="text/css",t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),document.getElementsByTagName("head")[0].appendChild(t)}function ie(e,t){for(var r=e.parentNode;r;){var n=r.matches||r.matchesSelector||r.msMatchesSelector;if(n&&n.call(r,t))return r;r=r.parentNode}return null}function oe(e){var t=e.match(/^#([0-9a-f]{3})$/i);if(t&&t[1])return t=t[1],{r:17*parseInt(t.charAt(0),16),g:17*parseInt(t.charAt(1),16),b:17*parseInt(t.charAt(2),16)};var r=e.match(/^#([0-9a-f]{6})$/i);if(r&&r[1])return r=r[1],{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16)};var n=e.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(n)return{r:parseInt(n[1],10),g:parseInt(n[2],10),b:parseInt(n[3],10)};var a=e.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\,\s*([\d]+|[\d]*.[\d]+)\s*\)$/i);return a?{r:parseInt(a[1],10),g:parseInt(a[2],10),b:parseInt(a[3],10),a:parseFloat(a[4])}:null}function se(){return/print-pdf/gi.test(window.location.search)}function le(){setTimeout(function(){window.scrollTo(0,1)},10)}function ce(e,t){var r=document.createEvent("HTMLEvents",1,2);r.initEvent(e,!0,!0),G(r,t),x.wrapper.dispatchEvent(r),de(e)}function de(e,t){if(h.postMessageEvents&&window.parent!==window.self){var r={namespace:"reveal",eventName:e,state:yt()};G(r,t),window.parent.postMessage(JSON.stringify(r),"*")}}function ue(e){ee(document.querySelectorAll(e||"a")).forEach(function(e){/^(http|www)/gi.test(e.getAttribute("href"))&&e.addEventListener("click",ar,!1)})}function pe(e){ee(document.querySelectorAll(e||"a")).forEach(function(e){/^(http|www)/gi.test(e.getAttribute("href"))&&e.removeEventListener("click",ar,!1)})}function fe(e){"boolean"==typeof e?e?ve():he():x.overlay?he():ve()}function ve(){if(h.help){he(),x.overlay=document.createElement("div"),x.overlay.classList.add("overlay"),x.overlay.classList.add("overlay-help"),x.wrapper.appendChild(x.overlay);var e='<p class="title">Keyboard Shortcuts</p><br/>';for(var t in e+="<table><th>KEY</th><th>ACTION</th>",W)e+="<tr><td>"+t+"</td><td>"+W[t]+"</td></tr>";for(var r in F)F[r].key&&F[r].description&&(e+="<tr><td>"+F[r].key+"</td><td>"+F[r].description+"</td></tr>");e+="</table>",x.overlay.innerHTML=["<header>",'<a class="close" href="#"><span class="icon"></span></a>',"</header>",'<div class="viewport">','<div class="viewport-inner">'+e+"</div>","</div>"].join(""),x.overlay.querySelector(".close").addEventListener("click",function(e){he(),e.preventDefault()},!1),setTimeout(function(){x.overlay.classList.add("visible")},1)}}function he(){x.overlay&&(x.overlay.parentNode.removeChild(x.overlay),x.overlay=null)}function ge(){if(x.wrapper&&!se()){if(!h.disableLayout){o&&document.documentElement.style.setProperty("--vh",.01*window.innerHeight+"px");var e=be(),t=E;me(h.width,h.height),x.slides.style.width=e.width+"px",x.slides.style.height=e.height+"px",E=Math.min(e.presentationWidth/e.width,e.presentationHeight/e.height),E=Math.max(E,h.minScale),1===(E=Math.min(E,h.maxScale))?(x.slides.style.zoom="",x.slides.style.left="",x.slides.style.top="",x.slides.style.bottom="",x.slides.style.right="",ne({layout:""})):E>1&&N.zoom&&window.devicePixelRatio<2?(x.slides.style.zoom=E,x.slides.style.left="",x.slides.style.top="",x.slides.style.bottom="",x.slides.style.right="",ne({layout:""})):(x.slides.style.zoom="",x.slides.style.left="50%",x.slides.style.top="50%",x.slides.style.bottom="auto",x.slides.style.right="auto",ne({layout:"translate(-50%, -50%) scale("+E+")"}));for(var r=ee(x.wrapper.querySelectorAll(c)),n=0,a=r.length;n<a;n++){var i=r[n];"none"!==i.style.display&&(h.center||i.classList.contains("center")?i.classList.contains("stack")?i.style.top=0:i.style.top=Math.max((e.height-i.scrollHeight)/2,0)+"px":i.style.top="")}t!==E&&ce("resize",{oldScale:t,scale:E,size:e})}Ve(),_e(),xe()&&Le()}}function me(e,t){ee(x.slides.querySelectorAll("section > .stretch")).forEach(function(r){var n=function(e,t){if(t=t||0,e){var r,n=e.style.height;return e.style.height="0px",e.parentNode.style.height="auto",r=t-e.parentNode.offsetHeight,e.style.height=n+"px",e.parentNode.style.removeProperty("height"),r}return t}(r,t);if(/(img|video)/gi.test(r.nodeName)){var a=r.naturalWidth||r.videoWidth,i=r.naturalHeight||r.videoHeight,o=Math.min(e/a,n/i);r.style.width=a*o+"px",r.style.height=i*o+"px"}else r.style.width=e+"px",r.style.height=n+"px"})}function be(e,t){var r={width:h.width,height:h.height,presentationWidth:e||x.wrapper.offsetWidth,presentationHeight:t||x.wrapper.offsetHeight};return r.presentationWidth-=r.presentationWidth*h.margin,r.presentationHeight-=r.presentationHeight*h.margin,"string"==typeof r.width&&/%$/.test(r.width)&&(r.width=parseInt(r.width,10)/100*r.presentationWidth),"string"==typeof r.height&&/%$/.test(r.height)&&(r.height=parseInt(r.height,10)/100*r.presentationHeight),r}function ye(e,t){"object"==typeof e&&"function"==typeof e.setAttribute&&e.setAttribute("data-previous-indexv",t||0)}function we(e){if("object"==typeof e&&"function"==typeof e.setAttribute&&e.classList.contains("stack")){var t=e.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(e.getAttribute(t)||0,10)}return 0}function Ae(){if(h.overview&&!xe()){b=!0,x.wrapper.classList.add("overview"),x.wrapper.classList.remove("overview-deactivating"),N.overviewTransitions&&setTimeout(function(){x.wrapper.classList.add("overview-animated")},1),xt(),x.slides.appendChild(x.background),ee(x.wrapper.querySelectorAll(c)).forEach(function(e){e.classList.contains("stack")||e.addEventListener("click",nr,!0)});var e=be();y=e.width+70,w=e.height+70,h.rtl&&(y=-y),Fe(),ke(),Le(),ge(),ce("overviewshown",{indexh:t,indexv:r,currentSlide:a})}}function ke(){ee(x.wrapper.querySelectorAll(d)).forEach(function(e,t){e.setAttribute("data-index-h",t),re(e,"translate3d("+t*y+"px, 0, 0)"),e.classList.contains("stack")&&ee(e.querySelectorAll("section")).forEach(function(e,r){e.setAttribute("data-index-h",t),e.setAttribute("data-index-v",r),re(e,"translate3d(0, "+r*w+"px, 0)")})}),ee(x.background.childNodes).forEach(function(e,t){re(e,"translate3d("+t*y+"px, 0, 0)"),ee(e.querySelectorAll(".slide-background")).forEach(function(e,t){re(e,"translate3d(0, "+t*w+"px, 0)")})})}function Le(){var e=Math.min(window.innerWidth,window.innerHeight);ne({overview:["scale("+Math.max(e/5,150)/e+")","translateX("+-t*y+"px)","translateY("+-r*w+"px)"].join(" ")})}function Ee(){h.overview&&(b=!1,x.wrapper.classList.remove("overview"),x.wrapper.classList.remove("overview-animated"),x.wrapper.classList.add("overview-deactivating"),setTimeout(function(){x.wrapper.classList.remove("overview-deactivating")},1),x.wrapper.appendChild(x.background),ee(x.wrapper.querySelectorAll(c)).forEach(function(e){re(e,""),e.removeEventListener("click",nr,!0)}),ee(x.background.querySelectorAll(".slide-background")).forEach(function(e){re(e,"")}),ne({overview:""}),Be(t,r),ge(),St(),ce("overviewhidden",{indexh:t,indexv:r,currentSlide:a}))}function Se(e){"boolean"==typeof e?e?Ae():Ee():xe()?Ee():Ae()}function xe(){return b}function qe(e){var t="/",r=e||a,n=r?r.getAttribute("id"):null;n&&(n=encodeURIComponent(n));var i=ct(e);if(h.fragmentInURL||(i.f=void 0),"string"==typeof n&&n.length&&void 0===i.f)t="/"+n;else{var o=h.hashOneBasedIndex?1:0;(i.h>0||i.v>0||void 0!==i.f)&&(t+=i.h+o),(i.v>0||void 0!==i.f)&&(t+="/"+(i.v+o)),void 0!==i.f&&(t+="/"+i.f)}return t}function Me(e){return(e=e||a)&&e.parentNode&&!!e.parentNode.nodeName.match(/section/i)}function Ne(){P&&(P=!1,x.wrapper.style.cursor="")}function Ie(){!1===P&&(P=!0,x.wrapper.style.cursor="none")}function Te(){if(h.pause){var e=x.wrapper.classList.contains("paused");xt(),x.wrapper.classList.add("paused"),!1===e&&ce("paused")}}function Pe(){var e=x.wrapper.classList.contains("paused");x.wrapper.classList.remove("paused"),St(),e&&ce("resumed")}function Ce(e){"boolean"==typeof e?e?Te():Pe():He()?Pe():Te()}function He(){return x.wrapper.classList.contains("paused")}function Re(e){"boolean"==typeof e?e?Mt():qt():D?Mt():qt()}function Be(e,i,o,s){n=a;var l=x.wrapper.querySelectorAll(d);if(0!==l.length){void 0!==i||xe()||(i=we(l[e])),n&&n.parentNode&&n.parentNode.classList.contains("stack")&&ye(n.parentNode,r);var c=L.concat();L.length=0;var f=t||0,v=r||0;t=We(d,void 0===e?t:e),r=We(u,void 0===i?r:i),Fe(),ge(),xe()&&Le();var h=l[t],g=h.querySelectorAll("section");a=g[r]||h,void 0!==o&&kt(o);var m=t!==f||r!==v;m||(n=null),n&&n!==a&&(n.classList.remove("present"),n.setAttribute("aria-hidden","true"),x.wrapper.querySelector(p).classList.contains("present")&&setTimeout(function(){var e,t=ee(x.wrapper.querySelectorAll(d+".stack"));for(e in t)t[e]&&ye(t[e],0)},0));e:for(var b=0,y=L.length;b<y;b++){for(var w=0;w<c.length;w++)if(c[w]===L[b]){c.splice(w,1);continue e}document.documentElement.classList.add(L[b]),ce(L[b])}for(;c.length;)document.documentElement.classList.remove(c.pop());m&&ce("slidechanged",{indexh:t,indexv:r,previousSlide:n,currentSlide:a,origin:s}),!m&&n||(nt(n),et(a)),x.statusDiv.textContent=K(a),Ye(),Ve(),Xe(),_e(),je(),Ue(),At(),lt(),St()}}function ze(){var e;Z(),Q(),ge(),R=h.autoSlide,St(),se(),x.background.innerHTML="",x.background.classList.add("no-transition"),ee(x.wrapper.querySelectorAll(d)).forEach(function(e){var t=_(e,x.background);ee(e.querySelectorAll("section")).forEach(function(e){_(e,t),t.classList.add("stack")})}),h.parallaxBackgroundImage?(x.background.style.backgroundImage='url("'+h.parallaxBackgroundImage+'")',x.background.style.backgroundSize=h.parallaxBackgroundSize,x.background.style.backgroundRepeat=h.parallaxBackgroundRepeat,x.background.style.backgroundPosition=h.parallaxBackgroundPosition,setTimeout(function(){x.wrapper.classList.add("has-parallax-background")},1)):(x.background.style.backgroundImage="",x.wrapper.classList.remove("has-parallax-background")),lt(),ee(x.wrapper.querySelectorAll(d)).forEach(function(e){var t=ee(e.querySelectorAll("section"));t.forEach(function(e,t){wt(e.querySelectorAll(".fragment"))}),0===t.length&&wt(e.querySelectorAll(".fragment"))}),Ye(),Ve(),je(),Fe(),Xe(!0),h.showNotes&&x.slides.querySelectorAll("[data-notes], aside.notes").length>0?x.wrapper.classList.add("show-notes"):x.wrapper.classList.remove("show-notes"),Ue(),(e=function(e,t,r){ee(x.slides.querySelectorAll("iframe["+e+'*="'+t+'"]')).forEach(function(t){var n=t.getAttribute(e);n&&-1===n.indexOf(r)&&t.setAttribute(e,n+(/\?/.test(n)?"&":"?")+r)})})("src","youtube.com/embed/","enablejsapi=1"),e("data-src","youtube.com/embed/","enablejsapi=1"),e("src","player.vimeo.com/","api=1"),e("data-src","player.vimeo.com/","api=1"),!1===h.autoPlayMedia?nt(a,{unloadIframes:!1}):et(a),xe()&&ke()}function De(e){return wt((e=e||a).querySelectorAll(".fragment"))}function Oe(){var e=ee(x.wrapper.querySelectorAll(d));e.forEach(function(t){x.slides.insertBefore(t,e[Math.floor(Math.random()*e.length)])})}function We(e,t){var r=ee(x.wrapper.querySelectorAll(e)),n=r.length,a=se();if(n){h.loop&&(t%=n)<0&&(t=n+t),t=Math.max(Math.min(t,n-1),0);for(var i=0;i<n;i++){var o=r[i],s=h.rtl&&!Me(o);o.classList.remove("past"),o.classList.remove("present"),o.classList.remove("future"),o.setAttribute("hidden",""),o.setAttribute("aria-hidden","true"),o.querySelector("section")&&o.classList.add("stack"),a?o.classList.add("present"):i<t?(o.classList.add(s?"future":"past"),h.fragments&&ee(o.querySelectorAll(".fragment")).forEach(function(e){e.classList.add("visible"),e.classList.remove("current-fragment")})):i>t&&(o.classList.add(s?"past":"future"),h.fragments&&ee(o.querySelectorAll(".fragment.visible")).forEach(function(e){e.classList.remove("visible"),e.classList.remove("current-fragment")}))}r[t].classList.add("present"),r[t].removeAttribute("hidden"),r[t].removeAttribute("aria-hidden");var l=r[t].getAttribute("data-state");l&&(L=L.concat(l.split(" ")))}else t=0;return t}function Fe(){var e,n=ee(x.wrapper.querySelectorAll(d)),a=n.length;if(a&&void 0!==t){var i=xe()?10:h.viewDistance;o&&(i=xe()?6:h.mobileViewDistance),se()&&(i=Number.MAX_VALUE);for(var s=0;s<a;s++){var l=n[s],c=ee(l.querySelectorAll("section")),u=c.length;if(e=Math.abs((t||0)-s)||0,h.loop&&(e=Math.abs(((t||0)-s)%(a-i))||0),e<i?Je(l):Qe(l),u)for(var p=we(l),f=0;f<u;f++){var v=c[f];e+(s===(t||0)?Math.abs((r||0)-f):Math.abs(f-p))<i?Je(v):Qe(v)}}vt()?x.wrapper.classList.add("has-vertical-slides"):x.wrapper.classList.remove("has-vertical-slides"),ft()?x.wrapper.classList.add("has-horizontal-slides"):x.wrapper.classList.remove("has-horizontal-slides")}}function Ue(){h.showNotes&&x.speakerNotes&&a&&!se()&&(x.speakerNotes.innerHTML=bt()||'<span class="notes-placeholder">No notes on this slide.</span>')}function Ve(){h.progress&&x.progressbar&&(x.progressbar.style.width=it()*x.wrapper.offsetWidth+"px")}function je(){h.slideNumber&&x.slideNumber&&(x.slideNumber.innerHTML=Ke())}function Ke(e){var t,r="h.v";if(void 0===e&&(e=a),"function"==typeof h.slideNumber)t=h.slideNumber(e);else switch("string"==typeof h.slideNumber&&(r=h.slideNumber),/c/.test(r)||1!==x.wrapper.querySelectorAll(d).length||(r="c"),t=[],r){case"c":t.push(at(e)+1);break;case"c/t":t.push(at(e)+1,"/",ht());break;default:var n=ct(e);t.push(n.h+1);var i="h/v"===r?"/":".";Me(e)&&t.push(i,n.v+1)}var o="#"+qe(e);return function(e,t,r,n){void 0===n&&(n="#"+qe());return"number"!=typeof r||isNaN(r)?'<a href="'+n+'"><span class="slide-number-a">'+e+"</span></a>":'<a href="'+n+'"><span class="slide-number-a">'+e+'</span><span class="slide-number-delimiter">'+t+'</span><span class="slide-number-b">'+r+"</span></a>"}(t[0],t[1],t[2],o)}function Ye(){var e=Ze(),t=Ge();x.controlsLeft.concat(x.controlsRight).concat(x.controlsUp).concat(x.controlsDown).concat(x.controlsPrev).concat(x.controlsNext).forEach(function(e){e.classList.remove("enabled"),e.classList.remove("fragmented"),e.setAttribute("disabled","disabled")}),e.left&&x.controlsLeft.forEach(function(e){e.classList.add("enabled"),e.removeAttribute("disabled")}),e.right&&x.controlsRight.forEach(function(e){e.classList.add("enabled"),e.removeAttribute("disabled")}),e.up&&x.controlsUp.forEach(function(e){e.classList.add("enabled"),e.removeAttribute("disabled")}),e.down&&x.controlsDown.forEach(function(e){e.classList.add("enabled"),e.removeAttribute("disabled")}),(e.left||e.up)&&x.controlsPrev.forEach(function(e){e.classList.add("enabled"),e.removeAttribute("disabled")}),(e.right||e.down)&&x.controlsNext.forEach(function(e){e.classList.add("enabled"),e.removeAttribute("disabled")}),a&&(t.prev&&x.controlsPrev.forEach(function(e){e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&x.controlsNext.forEach(function(e){e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),Me(a)?(t.prev&&x.controlsUp.forEach(function(e){e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&x.controlsDown.forEach(function(e){e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")})):(t.prev&&x.controlsLeft.forEach(function(e){e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&x.controlsRight.forEach(function(e){e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}))),h.controlsTutorial&&(!k&&e.down?x.controlsDownArrow.classList.add("highlight"):(x.controlsDownArrow.classList.remove("highlight"),!A&&e.right&&0===r?x.controlsRightArrow.classList.add("highlight"):x.controlsRightArrow.classList.remove("highlight")))}function Xe(e){var n=null,o=h.rtl?"future":"past",s=h.rtl?"past":"future";if(ee(x.background.childNodes).forEach(function(a,i){a.classList.remove("past"),a.classList.remove("present"),a.classList.remove("future"),i<t?a.classList.add(o):i>t?a.classList.add(s):(a.classList.add("present"),n=a),(e||i===t)&&ee(a.querySelectorAll(".slide-background")).forEach(function(e,a){e.classList.remove("past"),e.classList.remove("present"),e.classList.remove("future"),a<r?e.classList.add("past"):a>r?e.classList.add("future"):(e.classList.add("present"),i===t&&(n=e))})}),i&&nt(i,{unloadIframes:!$e(i)}),n){et(n);var l=n.querySelector(".slide-background-content");if(l){var c=l.style.backgroundImage||"";/\.gif/i.test(c)&&(l.style.backgroundImage="",window.getComputedStyle(l).opacity,l.style.backgroundImage=c)}var d=i?i.getAttribute("data-background-hash"):null,u=n.getAttribute("data-background-hash");u&&u===d&&n!==i&&x.background.classList.add("no-transition"),i=n}a&&["has-light-background","has-dark-background"].forEach(function(e){a.classList.contains(e)?x.wrapper.classList.add(e):x.wrapper.classList.remove(e)}),setTimeout(function(){x.background.classList.remove("no-transition")},1)}function _e(){if(h.parallaxBackgroundImage){var e,n,a=x.wrapper.querySelectorAll(d),i=x.wrapper.querySelectorAll(u),o=x.background.style.backgroundSize.split(" ");1===o.length?e=n=parseInt(o[0],10):(e=parseInt(o[0],10),n=parseInt(o[1],10));var s,l=x.background.offsetWidth,c=a.length;s=("number"==typeof h.parallaxBackgroundHorizontal?h.parallaxBackgroundHorizontal:c>1?(e-l)/(c-1):0)*t*-1;var p,f,v=x.background.offsetHeight,g=i.length;p="number"==typeof h.parallaxBackgroundVertical?h.parallaxBackgroundVertical:(n-v)/(g-1),f=g>0?p*r:0,x.background.style.backgroundPosition=s+"px "+-f+"px"}}function $e(e){var t=h.preloadIframes;return"boolean"!=typeof t&&(t=e.hasAttribute("data-preload")),t}function Je(e,t){t=t||{},e.style.display=h.display,ee(e.querySelectorAll("img[data-src], video[data-src], audio[data-src], iframe[data-src]")).forEach(function(e){("IFRAME"!==e.tagName||$e(e))&&(e.setAttribute("src",e.getAttribute("data-src")),e.setAttribute("data-lazy-loaded",""),e.removeAttribute("data-src"))}),ee(e.querySelectorAll("video, audio")).forEach(function(e){var t=0;ee(e.querySelectorAll("source[data-src]")).forEach(function(e){e.setAttribute("src",e.getAttribute("data-src")),e.removeAttribute("data-src"),e.setAttribute("data-lazy-loaded",""),t+=1}),t>0&&e.load()});var r=e.slideBackgroundElement;if(r){r.style.display="block";var n=e.slideBackgroundContentElement,a=e.getAttribute("data-background-iframe");if(!1===r.hasAttribute("data-loaded")){r.setAttribute("data-loaded","true");var i=e.getAttribute("data-background-image"),s=e.getAttribute("data-background-video"),l=e.hasAttribute("data-background-video-loop"),c=e.hasAttribute("data-background-video-muted");if(i)n.style.backgroundImage="url("+encodeURI(i)+")";else if(s&&!ot()){var d=document.createElement("video");l&&d.setAttribute("loop",""),c&&(d.muted=!0),o&&(d.muted=!0,d.autoplay=!0,d.setAttribute("playsinline","")),s.split(",").forEach(function(e){d.innerHTML+='<source src="'+e+'">'}),n.appendChild(d)}else if(a&&!0!==t.excludeIframes){var u=document.createElement("iframe");u.setAttribute("allowfullscreen",""),u.setAttribute("mozallowfullscreen",""),u.setAttribute("webkitallowfullscreen",""),u.setAttribute("allow","autoplay"),u.setAttribute("data-src",a),u.style.width="100%",u.style.height="100%",u.style.maxHeight="100%",u.style.maxWidth="100%",n.appendChild(u)}}var p=n.querySelector("iframe[data-src]");p&&$e(r)&&!/autoplay=(1|true|yes)/gi.test(a)&&p.getAttribute("src")!==a&&p.setAttribute("src",a)}}function Qe(e){e.style.display="none";var t=mt(e);t&&(t.style.display="none",ee(t.querySelectorAll("iframe[src]")).forEach(function(e){e.removeAttribute("src")})),ee(e.querySelectorAll("video[data-lazy-loaded][src], audio[data-lazy-loaded][src], iframe[data-lazy-loaded][src]")).forEach(function(e){e.setAttribute("data-src",e.getAttribute("src")),e.removeAttribute("src")}),ee(e.querySelectorAll("video[data-lazy-loaded] source[src], audio source[src]")).forEach(function(e){e.setAttribute("data-src",e.getAttribute("src")),e.removeAttribute("src")})}function Ze(){var e=x.wrapper.querySelectorAll(d),n=x.wrapper.querySelectorAll(u),a={left:t>0,right:t<e.length-1,up:r>0,down:r<n.length-1};if(h.loop&&(e.length>1&&(a.left=!0,a.right=!0),n.length>1&&(a.up=!0,a.down=!0)),h.rtl){var i=a.left;a.left=a.right,a.right=i}return a}function Ge(){if(a&&h.fragments){var e=a.querySelectorAll(".fragment"),t=a.querySelectorAll(".fragment:not(.visible)");return{prev:e.length-t.length>0,next:!!t.length}}return{prev:!1,next:!1}}function et(e){e&&!ot()&&(ee(e.querySelectorAll('img[src$=".gif"]')).forEach(function(e){e.setAttribute("src",e.getAttribute("src"))}),ee(e.querySelectorAll("video, audio")).forEach(function(e){if(!ie(e,".fragment")||ie(e,".fragment.visible")){var t=h.autoPlayMedia;if("boolean"!=typeof t&&(t=e.hasAttribute("data-autoplay")||!!ie(e,".slide-background")),t&&"function"==typeof e.play)if(e.readyState>1)tt({target:e});else if(o){var r=e.play();r&&"function"==typeof r.catch&&!1===e.controls&&r.catch(function(){e.controls=!0,e.addEventListener("play",function(){e.controls=!1})})}else e.removeEventListener("loadeddata",tt),e.addEventListener("loadeddata",tt)}}),ee(e.querySelectorAll("iframe[src]")).forEach(function(e){ie(e,".fragment")&&!ie(e,".fragment.visible")||rt({target:e})}),ee(e.querySelectorAll("iframe[data-src]")).forEach(function(e){ie(e,".fragment")&&!ie(e,".fragment.visible")||e.getAttribute("src")!==e.getAttribute("data-src")&&(e.removeEventListener("load",rt),e.addEventListener("load",rt),e.setAttribute("src",e.getAttribute("data-src")))}))}function tt(e){var t=!!ie(e.target,"html"),r=!!ie(e.target,".present");t&&r&&(e.target.currentTime=0,e.target.play()),e.target.removeEventListener("loadeddata",tt)}function rt(e){var t=e.target;if(t&&t.contentWindow){var r=!!ie(e.target,"html"),n=!!ie(e.target,".present");if(r&&n){var a=h.autoPlayMedia;"boolean"!=typeof a&&(a=t.hasAttribute("data-autoplay")||!!ie(t,".slide-background")),/youtube\.com\/embed\//.test(t.getAttribute("src"))&&a?t.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*"):/player\.vimeo\.com\//.test(t.getAttribute("src"))&&a?t.contentWindow.postMessage('{"method":"play"}',"*"):t.contentWindow.postMessage("slide:start","*")}}}function nt(e,t){t=G({unloadIframes:!0},t||{}),e&&e.parentNode&&(ee(e.querySelectorAll("video, audio")).forEach(function(e){e.hasAttribute("data-ignore")||"function"!=typeof e.pause||(e.setAttribute("data-paused-by-reveal",""),e.pause())}),ee(e.querySelectorAll("iframe")).forEach(function(e){e.contentWindow&&e.contentWindow.postMessage("slide:stop","*"),e.removeEventListener("load",rt)}),ee(e.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(e){!e.hasAttribute("data-ignore")&&e.contentWindow&&"function"==typeof e.contentWindow.postMessage&&e.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),ee(e.querySelectorAll('iframe[src*="player.vimeo.com/"]')).forEach(function(e){!e.hasAttribute("data-ignore")&&e.contentWindow&&"function"==typeof e.contentWindow.postMessage&&e.contentWindow.postMessage('{"method":"pause"}',"*")}),!0===t.unloadIframes&&ee(e.querySelectorAll("iframe[data-src]")).forEach(function(e){e.setAttribute("src","about:blank"),e.removeAttribute("src")}))}function at(e){void 0===e&&(e=a);var t=ee(x.wrapper.querySelectorAll(d)),r=0;e:for(var n=0;n<t.length;n++){for(var i=t[n],o=ee(i.querySelectorAll("section")),s=0;s<o.length;s++){if(o[s]===e)break e;r++}if(i===e)break;!1===i.classList.contains("stack")&&r++}return r}function it(){var e=ht(),t=at();if(a){var r=a.querySelectorAll(".fragment");if(r.length>0){t+=a.querySelectorAll(".fragment.visible").length/r.length*.9}}return Math.min(t/(e-1),1)}function ot(){return!!window.location.search.match(/receiver/gi)}function st(){var n=window.location.hash,i=n.slice(2).split("/"),o=n.replace(/#|\//gi,"");if(!/^[0-9]*$/.test(i[0])&&o.length){var s;try{s=document.getElementById(decodeURIComponent(o))}catch(e){}var l=!!a&&a.getAttribute("id")===o;if(s){if(!l){var c=e.getIndices(s);Be(c.h,c.v)}}else Be(t||0,r||0)}else{var d,u=h.hashOneBasedIndex?1:0,p=parseInt(i[0],10)-u||0,f=parseInt(i[1],10)-u||0;h.fragmentInURL&&(d=parseInt(i[2],10),isNaN(d)&&(d=void 0)),p===t&&f===r&&void 0===d||Be(p,f,d)}}function lt(e){clearTimeout(T),"number"==typeof e?T=setTimeout(lt,e):a&&(h.history||!window.history?window.location.hash=qe():h.hash?window.history.replaceState(null,null,"#"+qe()):window.history.replaceState(null,null,window.location.pathname+window.location.search))}function ct(e){var n,i=t,o=r;if(e){var s=Me(e),l=s?e.parentNode:e,c=ee(x.wrapper.querySelectorAll(d));i=Math.max(c.indexOf(l),0),o=void 0,s&&(o=Math.max(ee(e.parentNode.querySelectorAll("section")).indexOf(e),0))}if(!e&&a&&a.querySelectorAll(".fragment").length>0){var u=a.querySelector(".current-fragment");n=u&&u.hasAttribute("data-fragment-index")?parseInt(u.getAttribute("data-fragment-index"),10):a.querySelectorAll(".fragment.visible").length-1}return{h:i,v:o,f:n}}function dt(){return ee(x.wrapper.querySelectorAll(c+":not(.stack)"))}function ut(){return ee(x.wrapper.querySelectorAll(d))}function pt(){return ee(x.wrapper.querySelectorAll(".slides>section>section"))}function ft(){return ut().length>1}function vt(){return pt().length>1}function ht(){return dt().length}function gt(e,t){var r=x.wrapper.querySelectorAll(d)[e],n=r&&r.querySelectorAll("section");return n&&n.length&&"number"==typeof t?n?n[t]:void 0:r}function mt(e,t){var r="number"==typeof e?gt(e,t):e;if(r)return r.slideBackgroundElement}function bt(e){if((e=e||a).hasAttribute("data-notes"))return e.getAttribute("data-notes");var t=e.querySelector("aside.notes");return t?t.innerHTML:null}function yt(){var e=ct();return{indexh:e.h,indexv:e.v,indexf:e.f,paused:He(),overview:xe()}}function wt(e,t){e=ee(e);var r=[],n=[],a=[];e.forEach(function(e,t){if(e.hasAttribute("data-fragment-index")){var a=parseInt(e.getAttribute("data-fragment-index"),10);r[a]||(r[a]=[]),r[a].push(e)}else n.push([e])}),r=r.concat(n);var i=0;return r.forEach(function(e){e.forEach(function(e){a.push(e),e.setAttribute("data-fragment-index",i)}),i++}),!0===t?r:a}function At(e,t){var r={shown:[],hidden:[]};if(a&&h.fragments&&(t=t||wt(a.querySelectorAll(".fragment"))).length){var n=0;if("number"!=typeof e){var i=wt(a.querySelectorAll(".fragment.visible")).pop();i&&(e=parseInt(i.getAttribute("data-fragment-index")||0,10))}ee(t).forEach(function(t,a){t.hasAttribute("data-fragment-index")&&(a=parseInt(t.getAttribute("data-fragment-index"),10)),n=Math.max(n,a),a<=e?(t.classList.contains("visible")||r.shown.push(t),t.classList.add("visible"),t.classList.remove("current-fragment"),x.statusDiv.textContent=K(t),a===e&&(t.classList.add("current-fragment"),et(t))):(t.classList.contains("visible")&&r.hidden.push(t),t.classList.remove("visible"),t.classList.remove("current-fragment"))}),e="number"==typeof e?e:-1,e=Math.max(Math.min(e,n),-1),a.setAttribute("data-fragment",e)}return r}function kt(e,t){if(a&&h.fragments){var r=wt(a.querySelectorAll(".fragment"));if(r.length){if("number"!=typeof e){var n=wt(a.querySelectorAll(".fragment.visible")).pop();e=n?parseInt(n.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof t&&(e+=t);var i=At(e,r);return i.hidden.length&&ce("fragmenthidden",{fragment:i.hidden[0],fragments:i.hidden}),i.shown.length&&ce("fragmentshown",{fragment:i.shown[0],fragments:i.shown}),Ye(),Ve(),h.fragmentInURL&&lt(),!(!i.shown.length&&!i.hidden.length)}}return!1}function Lt(){return kt(null,1)}function Et(){return kt(null,-1)}function St(){if(xt(),a&&!1!==h.autoSlide){var t=a.querySelector(".current-fragment");t||(t=a.querySelector(".fragment"));var r=t?t.getAttribute("data-autoslide"):null,n=a.parentNode?a.parentNode.getAttribute("data-autoslide"):null,i=a.getAttribute("data-autoslide");R=r?parseInt(r,10):i?parseInt(i,10):n?parseInt(n,10):h.autoSlide,0===a.querySelectorAll(".fragment").length&&ee(a.querySelectorAll("video, audio")).forEach(function(e){e.hasAttribute("data-autoplay")&&R&&1e3*e.duration/e.playbackRate>R&&(R=1e3*e.duration/e.playbackRate+1e3)}),!R||D||He()||xe()||e.isLastSlide()&&!Ge().next&&!0!==h.loop||(B=setTimeout(function(){"function"==typeof h.autoSlideMethod?h.autoSlideMethod():Ht(),St()},R),z=Date.now()),l&&l.setPlaying(-1!==B)}}function xt(){clearTimeout(B),B=-1}function qt(){R&&!D&&(D=!0,ce("autoslidepaused"),clearTimeout(B),l&&l.setPlaying(!1))}function Mt(){R&&D&&(D=!1,ce("autoslideresumed"),St())}function Nt(){h.rtl?(xe()||!1===Lt())&&Ze().left&&Be(t+1,"grid"===h.navigationMode?r:void 0):(xe()||!1===Et())&&Ze().left&&Be(t-1,"grid"===h.navigationMode?r:void 0)}function It(){A=!0,h.rtl?(xe()||!1===Et())&&Ze().right&&Be(t-1,"grid"===h.navigationMode?r:void 0):(xe()||!1===Lt())&&Ze().right&&Be(t+1,"grid"===h.navigationMode?r:void 0)}function Tt(){(xe()||!1===Et())&&Ze().up&&Be(t,r-1)}function Pt(){k=!0,(xe()||!1===Lt())&&Ze().down&&Be(t,r+1)}function Ct(){var e;if(!1===Et())if(Ze().up)Tt();else if(e=h.rtl?ee(x.wrapper.querySelectorAll(d+".future")).pop():ee(x.wrapper.querySelectorAll(d+".past")).pop()){var r=e.querySelectorAll("section").length-1||void 0;Be(t-1,r)}}function Ht(){if(A=!0,k=!0,!1===Lt()){var t=Ze();t.down&&t.right&&h.loop&&e.isLastVerticalSlide(a)&&(t.down=!1),t.down?Pt():h.rtl?Nt():It()}}function Rt(e){for(;e&&"function"==typeof e.hasAttribute;){if(e.hasAttribute("data-prevent-swipe"))return!0;e=e.parentNode}return!1}function Bt(e){h.autoSlideStoppable&&qt()}function zt(e){Ne(),clearTimeout(C),C=setTimeout(Ie,h.hideCursorTime)}function Dt(e){e.shiftKey&&63===e.charCode&&fe()}function Ot(t){if("function"==typeof h.keyboardCondition&&!1===h.keyboardCondition(t))return!0;var r=t.keyCode,n=D;Bt();var a=document.activeElement&&"inherit"!==document.activeElement.contentEditable,i=document.activeElement&&document.activeElement.tagName&&/input|textarea/i.test(document.activeElement.tagName),o=document.activeElement&&document.activeElement.className&&/speaker-notes/i.test(document.activeElement.className),s=t.shiftKey&&32===t.keyCode,l=t.shiftKey&&37===r,c=t.shiftKey&&39===r,d=!s&&!l&&!c&&(t.shiftKey||t.altKey||t.ctrlKey||t.metaKey);if(!(a||i||o||d)){var u,p=[66,86,190,191];if("object"==typeof h.keyboard)for(u in h.keyboard)"togglePause"===h.keyboard[u]&&p.push(parseInt(u,10));if(He()&&-1===p.indexOf(r))return!1;var f,v,g="linear"===h.navigationMode||!ft()||!vt(),m=!1;if("object"==typeof h.keyboard)for(u in h.keyboard)if(parseInt(u,10)===r){var b=h.keyboard[u];"function"==typeof b?b.apply(null,[t]):"string"==typeof b&&"function"==typeof e[b]&&e[b].call(),m=!0}if(!1===m)for(u in F)if(parseInt(u,10)===r){var y=F[u].callback;"function"==typeof y?y.apply(null,[t]):"string"==typeof y&&"function"==typeof e[y]&&e[y].call(),m=!0}!1===m&&(m=!0,80===r||33===r?Ct():78===r||34===r?Ht():72===r||37===r?l?Be(0):!xe()&&g?Ct():Nt():76===r||39===r?c?Be(Number.MAX_VALUE):!xe()&&g?Ht():It():75===r||38===r?!xe()&&g?Ct():Tt():74===r||40===r?!xe()&&g?Ht():Pt():36===r?Be(0):35===r?Be(Number.MAX_VALUE):32===r?(xe()&&Ee(),t.shiftKey?Ct():Ht()):58===r||59===r||66===r||86===r||190===r||191===r?Ce():70===r?(f=document.documentElement,(v=f.requestFullscreen||f.webkitRequestFullscreen||f.webkitRequestFullScreen||f.mozRequestFullScreen||f.msRequestFullscreen)&&v.apply(f)):65===r?h.autoSlideStoppable&&Re(n):m=!1),m?t.preventDefault&&t.preventDefault():27!==r&&79!==r||!N.transforms3d||(x.overlay?he():Se(),t.preventDefault&&t.preventDefault()),St()}}function Wt(e){if(Rt(e.target))return!0;O.startX=e.touches[0].clientX,O.startY=e.touches[0].clientY,O.startCount=e.touches.length}function Ft(e){if(Rt(e.target))return!0;if(O.captured)f.match(/android/gi)&&e.preventDefault();else{Bt();var t=e.touches[0].clientX,r=e.touches[0].clientY;if(1===e.touches.length&&2!==O.startCount){var n=t-O.startX,i=r-O.startY;n>O.threshold&&Math.abs(n)>Math.abs(i)?(O.captured=!0,"linear"===h.navigationMode?h.rtl?Ht():Ct():Nt()):n<-O.threshold&&Math.abs(n)>Math.abs(i)?(O.captured=!0,"linear"===h.navigationMode?h.rtl?Ct():Ht():It()):i>O.threshold?(O.captured=!0,"linear"===h.navigationMode?Ct():Tt()):i<-O.threshold&&(O.captured=!0,"linear"===h.navigationMode?Ht():Pt()),h.embedded?(O.captured||Me(a))&&e.preventDefault():e.preventDefault()}}}function Ut(e){O.captured=!1}function Vt(e){e.pointerType!==e.MSPOINTER_TYPE_TOUCH&&"touch"!==e.pointerType||(e.touches=[{clientX:e.clientX,clientY:e.clientY}],Wt(e))}function jt(e){e.pointerType!==e.MSPOINTER_TYPE_TOUCH&&"touch"!==e.pointerType||(e.touches=[{clientX:e.clientX,clientY:e.clientY}],Ft(e))}function Kt(e){e.pointerType!==e.MSPOINTER_TYPE_TOUCH&&"touch"!==e.pointerType||(e.touches=[{clientX:e.clientX,clientY:e.clientY}],Ut())}function Yt(e){if(Date.now()-I>600){I=Date.now();var t=e.detail||-e.wheelDelta;t>0?Ht():t<0&&Ct()}}function Xt(e){Bt(),e.preventDefault();var t=ee(x.wrapper.querySelectorAll(d)).length,r=Math.floor(e.clientX/x.wrapper.offsetWidth*t);h.rtl&&(r=t-r),Be(r)}function _t(e){e.preventDefault(),Bt(),"linear"===h.navigationMode?Ct():Nt()}function $t(e){e.preventDefault(),Bt(),"linear"===h.navigationMode?Ht():It()}function Jt(e){e.preventDefault(),Bt(),Tt()}function Qt(e){e.preventDefault(),Bt(),Pt()}function Zt(e){e.preventDefault(),Bt(),Ct()}function Gt(e){e.preventDefault(),Bt(),Ht()}function er(e){st()}function tr(e){ge()}function rr(e){!1===(document.webkitHidden||document.msHidden||document.hidden)&&document.activeElement!==document.body&&("function"==typeof document.activeElement.blur&&document.activeElement.blur(),document.body.focus())}function nr(e){if(H&&xe()){e.preventDefault();for(var t=e.target;t&&!t.nodeName.match(/section/gi);)t=t.parentNode;if(t&&!t.classList.contains("disabled"))if(Ee(),t.nodeName.match(/section/gi))Be(parseInt(t.getAttribute("data-index-h"),10),parseInt(t.getAttribute("data-index-v"),10))}}function ar(e){if(e.currentTarget&&e.currentTarget.hasAttribute("href")){var t=e.currentTarget.getAttribute("href");t&&(!function(e){he(),x.overlay=document.createElement("div"),x.overlay.classList.add("overlay"),x.overlay.classList.add("overlay-preview"),x.wrapper.appendChild(x.overlay),x.overlay.innerHTML=["<header>",'<a class="close" href="#"><span class="icon"></span></a>','<a class="external" href="'+e+'" target="_blank"><span class="icon"></span></a>',"</header>",'<div class="spinner"></div>','<div class="viewport">','<iframe src="'+e+'"></iframe>','<small class="viewport-inner">','<span class="x-frame-error">Unable to load iframe. This is likely due to the site\'s policy (x-frame-options).</span>',"</small>","</div>"].join(""),x.overlay.querySelector("iframe").addEventListener("load",function(e){x.overlay.classList.add("loaded")},!1),x.overlay.querySelector(".close").addEventListener("click",function(e){he(),e.preventDefault()},!1),x.overlay.querySelector(".external").addEventListener("click",function(e){he()},!1),setTimeout(function(){x.overlay.classList.add("visible")},1)}(t),e.preventDefault())}}function ir(t){e.isLastSlide()&&!1===h.loop?(Be(0,0),Mt()):D?Mt():qt()}function or(e,t){this.diameter=100,this.diameter2=this.diameter/2,this.thickness=6,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=e,this.progressCheck=t,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.canvas.style.width=this.diameter2+"px",this.canvas.style.height=this.diameter2+"px",this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}return or.prototype.setPlaying=function(e){var t=this.playing;this.playing=e,!t&&this.playing?this.animate():this.render()},or.prototype.animate=function(){var e=this.progress;this.progress=this.progressCheck(),e>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&N.requestAnimationFrameMethod.call(window,this.animate.bind(this))},or.prototype.render=function(){var e=this.playing?this.progress:0,t=this.diameter2-this.thickness,r=this.diameter2,n=this.diameter2;this.progressOffset+=.1*(1-this.progressOffset);var a=-Math.PI/2+e*(2*Math.PI),i=-Math.PI/2+this.progressOffset*(2*Math.PI);this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(r,n,t+4,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(r,n,t,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="rgba( 255, 255, 255, 0.2 )",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(r,n,t,i,a,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(r-14,n-14),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,10,28),this.context.fillRect(18,0,10,28)):(this.context.beginPath(),this.context.translate(4,0),this.context.moveTo(0,0),this.context.lineTo(24,14),this.context.lineTo(0,28),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},or.prototype.on=function(e,t){this.canvas.addEventListener(e,t,!1)},or.prototype.off=function(e,t){this.canvas.removeEventListener(e,t,!1)},or.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},e={VERSION:"3.9.2",initialize:function(t){if(!0!==g)if(g=!0,function(){o=/(iphone|ipod|ipad|android)/gi.test(f)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,s=/chrome/i.test(f)&&!/edge/i.test(f);var e=document.createElement("div");N.transforms3d="WebkitPerspective"in e.style||"MozPerspective"in e.style||"msPerspective"in e.style||"OPerspective"in e.style||"perspective"in e.style,N.transforms2d="WebkitTransform"in e.style||"MozTransform"in e.style||"msTransform"in e.style||"OTransform"in e.style||"transform"in e.style,N.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,N.requestAnimationFrame="function"==typeof N.requestAnimationFrameMethod,N.canvas=!!document.createElement("canvas").getContext,N.overviewTransitions=!/Version\/[\d\.]+.*Safari/.test(f),N.zoom="zoom"in e.style&&!o&&(s||/Version\/[\d\.]+.*Safari/.test(f))}(),N.transforms2d||N.transforms3d){x.wrapper=document.querySelector(".reveal"),x.slides=document.querySelector(".reveal .slides"),window.addEventListener("load",ge,!1);var r,n,a=e.getQueryHash();void 0!==a.dependencies&&delete a.dependencies,G(h,t),G(h,a),h.hideAddressBar&&o&&(window.addEventListener("load",le,!1),window.addEventListener("orientationchange",le,!1)),r=[],n=0,h.dependencies.forEach(function(e){e.condition&&!e.condition()||(e.async?M.push(e):r.push(e))}),r.length?(n=r.length,r.forEach(function(e){j(e.src,function(){"function"==typeof e.callback&&e.callback(),0==--n&&U()})})):U()}else{document.body.setAttribute("class","no-transforms");for(var i=ee(document.getElementsByTagName("img")),l=ee(document.getElementsByTagName("iframe")),c=i.concat(l),d=0,u=c.length;d<u;d++){var p=c[d];p.getAttribute("data-src")&&(p.setAttribute("src",p.getAttribute("data-src")),p.removeAttribute("data-src"))}}},configure:J,sync:ze,syncSlide:function(e){$(e=e||a),De(e),Je(e),Xe(),Ue()},syncFragments:De,slide:Be,left:Nt,right:It,up:Tt,down:Pt,prev:Ct,next:Ht,navigateFragment:kt,prevFragment:Et,nextFragment:Lt,navigateTo:Be,navigateLeft:Nt,navigateRight:It,navigateUp:Tt,navigateDown:Pt,navigatePrev:Ct,navigateNext:Ht,layout:ge,shuffle:Oe,availableRoutes:Ze,availableFragments:Ge,toggleHelp:fe,toggleOverview:Se,togglePause:Ce,toggleAutoSlide:Re,isOverview:xe,isPaused:He,isAutoSliding:function(){return!(!R||D)},isSpeakerNotes:ot,loadSlide:Je,unloadSlide:Qe,addEventListeners:Q,removeEventListeners:Z,getState:yt,setState:function(e){if("object"==typeof e){Be(te(e.indexh),te(e.indexv),te(e.indexf));var t=te(e.paused),r=te(e.overview);"boolean"==typeof t&&t!==He()&&Ce(t),"boolean"==typeof r&&r!==xe()&&Se(r)}},getSlidePastCount:at,getProgress:it,getIndices:ct,getSlides:dt,getSlidesAttributes:function(){return dt().map(function(e){for(var t={},r=0;r<e.attributes.length;r++){var n=e.attributes[r];t[n.name]=n.value}return t})},getTotalSlides:ht,getSlide:gt,getSlideBackground:mt,getSlideNotes:bt,getHorizontalSlides:ut,getVerticalSlides:pt,hasHorizontalSlides:ft,hasVerticalSlides:vt,getPreviousSlide:function(){return n},getCurrentSlide:function(){return a},getScale:function(){return E},getConfig:function(){return h},getQueryHash:function(){var e={};for(var t in location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(t){e[t.split("=").shift()]=t.split("=").pop()}),e){var r=e[t];e[t]=te(unescape(r))}return e},getRevealElement:function(){return x.wrapper||document.querySelector(".reveal")},getPlugins:function(){return q},isFirstSlide:function(){return 0===t&&0===r},isLastSlide:function(){return!!a&&(!a.nextElementSibling&&(!Me(a)||!a.parentNode.nextElementSibling))},isLastVerticalSlide:function(){return!(!a||!Me(a))&&!a.nextElementSibling},isReady:function(){return m},addEventListener:function(t,r,n){"addEventListener"in window&&e.getRevealElement().addEventListener(t,r,n)},removeEventListener:function(t,r,n){"addEventListener"in window&&e.getRevealElement().removeEventListener(t,r,n)},addKeyBinding:function(e,t){"object"==typeof e&&e.keyCode?F[e.keyCode]={callback:t,key:e.key,description:e.description}:F[e]={callback:t,key:null,description:null}},removeKeyBinding:function(e){delete F[e]},registerPlugin:function(e,t){void 0===q[e]?(q[e]=t,m&&"function"==typeof t.init&&t.init()):console.warn('reveal.js: "'+e+'" plugin has already been registered')},hasPlugin:function(e){return!!q[e]},getPlugin:function(e){return q[e]},triggerKey:function(e){Ot({keyCode:e})},registerKeyboardShortcut:function(e,t){W[e]=t}}});13//# sourceMappingURL=/sm/08e1fa594140e0c94b13896259d52c6f14612c26e76f87b04cfc7890fcd861d7.map`14func RevealJS() io.Reader {15 return strings.NewReader(revealjs)16}17func RevealFindJS(revealfindjs string) io.Reader {18 if strings.LastIndex(revealfindjs, "/") >= 0 {19 revealfindjs = revealfindjs[strings.LastIndex(revealfindjs, "/")+1:]20 }21 if revealfindjs == "reveal.js" {22 return RevealJS()23 }24 return nil25}...

Full Screen

Full Screen

attributes.go

Source:attributes.go Github

copy

Full Screen

...47 movie.SetFirstRow(firstRow)48 movie.SetSecondRow(firstRow)49}50func (movie *Movie) SetFirstRow(doc playwright.ElementHandle) {51 elements, err := doc.QuerySelectorAll("div.row-line")52 HandleErrorByPanic(err)53 release, err := elements[0].TextContent()54 release = strings.ReplaceAll(release, "\n", "")55 release = strings.ReplaceAll(release, " ", "")56 movie.Release = strings.ReplaceAll(release, "Released: ", "")57 HandleErrorByPanic(err)58 genresData, err := elements[1].QuerySelectorAll("a")59 HandleErrorByPanic(err)60 for _, genreData := range genresData {61 genre, err := genreData.InnerHTML()62 HandleErrorByPanic(err)63 movie.Genre = append(movie.Genre, genre)64 }65 castsData, err := elements[2].QuerySelectorAll("a")66 HandleErrorByPanic(err)67 for _, castData := range castsData {68 cast, err := castData.InnerHTML()69 HandleErrorByPanic(err)70 movie.Casts = append(movie.Casts, cast)71 }72}73func (movie *Movie) SetSecondRow(doc playwright.ElementHandle) {74 elements, err := doc.QuerySelectorAll("div.row-line")75 HandleErrorByPanic(err)76 duration, err := elements[3].TextContent()77 HandleErrorByPanic(err)78 duration = strings.ReplaceAll(duration, "Duration: ", "")79 duration = strings.ReplaceAll(duration, "\n", "")80 duration = strings.ReplaceAll(duration, " ", "")81 movie.Duration = strings.ReplaceAll(duration, "min", "")82 country, err := elements[4].TextContent()83 HandleErrorByPanic(err)84 movie.Country = strings.ReplaceAll(country, "Country: ", "")85 production, err := elements[5].TextContent()86 production = strings.ReplaceAll(production, "\n", "")87 production = strings.ReplaceAll(production, " ", "")88 movie.Production = strings.ReplaceAll(production, "Production:", "")...

Full Screen

Full Screen

element_js.go

Source:element_js.go Github

copy

Full Screen

...36func (v Value) QuerySelector(selectors string) Value {37 return Value{v.Call("querySelector", selectors)}38}39// https://developer.mozilla.org/en-US/docs/Web/API/Element/querySelectorAll40func (v Value) QuerySelectorAll(selectors string) []Value {41 nodeList := v.Call("querySelectorAll", selectors)42 length := nodeList.Get("length").Int()43 var nodes []Value44 for i := 0; i < length; i++ {45 nodes = append(nodes, Value{nodeList.Call("item", i)})46 }47 return nodes48}...

Full Screen

Full Screen

QuerySelectorAll

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 if err != nil {4 log.Fatal(err)5 }6 defer res.Body.Close()7 if res.StatusCode != 200 {8 log.Fatalf("status code error: %d %s", res.StatusCode, res.Status)9 }10 doc, err := goquery.NewDocumentFromReader(res.Body)11 if err != nil {12 log.Fatal(err)13 }14 doc.Find(".site-listing").Each(func(i int, s *goquery.Selection) {15 rank := s.Find(".desc-paragraph").Text()16 title := s.Find("a").Text()17 fmt.Printf("Review %d: %s - %s\n", i, rank, title)18 })19}

Full Screen

Full Screen

QuerySelectorAll

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 if err != nil {4 log.Fatal(err)5 }6 defer resp.Body.Close()7 doc, err := html.Parse(resp.Body)8 if err != nil {9 log.Fatal(err)10 }11 links := visit(nil, doc)12 for _, link := range links {13 fmt.Println(link)14 }15}16func visit(links []string, n *html.Node) []string {17 if n.Type == html.ElementNode && n.Data == "a" {18 for _, a := range n.Attr {19 if a.Key == "href" {20 links = append(links, a.Val)21 }22 }23 }24 for c := n.FirstChild; c != nil; c = c.NextSibling {25 links = visit(links, c)26 }27}28import (29func main() {30 if err != nil {31 log.Fatal(err)32 }33 defer resp.Body.Close()34 doc, err := html.Parse(resp.Body)35 if err != nil {36 log.Fatal(err)37 }38 links := visit(nil, doc)39 for _, link := range links {40 fmt.Println(link)41 }42}43func visit(links []string, n *html.Node) []string {44 if n.Type == html.ElementNode && n.Data == "a" {45 for _, a := range n.Attr {46 if a.Key == "href" {47 links = append(links, a.Val)48 }49 }50 }51 for c := n.FirstChild; c != nil; c = c.NextSibling {52 links = visit(links, c)53 }54}55import (56func main() {

Full Screen

Full Screen

QuerySelectorAll

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 for _, url := range os.Args[1:] {4 doc, err := html.Parse(httpGet(url))5 if err != nil {6 fmt.Fprintf(os.Stderr, "findlinks1: %v\n", err)7 os.Exit(1)8 }9 for _, link := range visit(nil, doc) {10 fmt.Println(link)11 }12 }13}14func visit(links []string, n *html.Node) []string {15 if n.Type == html.ElementNode && n.Data == "a" {16 for _, a := range n.Attr {17 if a.Key == "href" {18 links = append(links, a.Val)19 }20 }21 }22 for c := n.FirstChild; c != nil; c = c.NextSibling {23 links = visit(links, c)24 }25}26func httpGet(url string) *http.Response {27 resp, err := http.Get(url)28 if err != nil {29 fmt.Fprintf(os.Stderr, "findlinks1: %v\n", err)30 os.Exit(1)31 }32}33import (34func main() {35 for _, url := range os.Args[1:] {36 doc, err := html.Parse(httpGet(url))37 if err != nil {38 fmt.Fprintf(os.Stderr, "findlinks1: %v\n", err)39 os.Exit(1)40 }41 for _, link := range visit(nil, doc) {42 fmt.Println(link)43 }44 }45}46func visit(links []string, n *html.Node) []string {47 if n.Type == html.ElementNode && n.Data == "a" {48 for _, a := range n.Attr {49 if a.Key == "href" {50 links = append(links, a.Val)51 }52 }53 }54 for c := n.FirstChild; c != nil; c = c.NextSibling {55 links = visit(links, c)56 }57}58func httpGet(url string) *http.Response {59 resp, err := http.Get(url)

Full Screen

Full Screen

QuerySelectorAll

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 if err != nil {4 log.Fatal(err)5 }6 defer resp.Body.Close()7 doc, err := html.Parse(resp.Body)8 if err != nil {9 fmt.Fprintf(os.Stderr, "findlinks1: %v10 os.Exit(1)11 }12 for _, link := range visit(nil, doc) {13 fmt.Println(link)14 }15}16func visit(links []string, n *html.Node) []string {17 if n.Type == html.ElementNode && n.Data == "a" {18 for _, a := range n.Attr {19 if a.Key == "href" {20 links = append(links, a.Val)21 }22 }23 }24 for c := n.FirstChild; c != nil; c = c.NextSibling {25 links = visit(links, c)26 }27}28import (29func main() {30 if err != nil {31 log.Fatal(err)32 }33 defer resp.Body.Close()34 doc, err := html.Parse(resp.Body)35 if err != nil {36 fmt.Fprintf(os.Stderr, "findlinks1: %v37 os.Exit(1)38 }39 links := visit(nil, doc)40 fmt.Println(links)41}42func visit(links []string, n *html.Node) []string {43 if n.Type == html.ElementNode && n.Data == "a" {44 for _, a := range n.Attr {45 if a.Key == "href" {46 links = append(links, a.Val)47 }48 }49 }50 for c := n.FirstChild; c != nil; c = c.NextSibling {51 links = visit(links, c)52 }53}54import (

Full Screen

Full Screen

QuerySelectorAll

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 if err != nil {4 fmt.Println("Error loading HTTP response body. ", err)5 os.Exit(1)6 }7 doc.Find("a").Each(func(i int, s *goquery.Selection) {8 link, _ := s.Attr("href")9 if strings.HasPrefix(link, "http") {10 fmt.Println("link:", link)11 }12 })13}

Full Screen

Full Screen

QuerySelectorAll

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 if err != nil {4 log.Fatal(err)5 }6 doc.Find("a").Each(func(index int, item *goquery.Selection) {7 link, _ := linkTag.Attr("href")8 fmt.Println(link)9 })10}

Full Screen

Full Screen

QuerySelectorAll

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 if err != nil {4 log.Fatal(err)5 }6 defer resp.Body.Close()7 body, err := ioutil.ReadAll(resp.Body)8 if err != nil {9 log.Fatal(err)10 }11 doc, err := html.Parse(strings.NewReader(string(body)))12 if err != nil {13 log.Fatal(err)14 }15 links := linkNodes(doc)16 for _, link := range links {17 fmt.Println(link)18 }19}20func linkNodes(n *html.Node) []string {21 if n.Type == html.ElementNode && n.Data == "a" {22 for _, a := range n.Attr {23 if a.Key == "href" {24 links = append(links, a.Val)25 }26 }27 }28 for c := n.FirstChild; c != nil; c = c.NextSibling {29 links = append(links, linkNodes(c)...)30 }31}

Full Screen

Full Screen

QuerySelectorAll

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 doc, err := html.Parse(strings.NewReader(`4 if err != nil {5 log.Fatal(err)6 }7 fmt.Println(doc)8}9&html.Node{Type:html.DocumentNode, Data:"", Namespace:"", Attr:[]html.Attribute(nil), FirstChild:(*html.Node)(0xc0000a0000), LastChild:(*html.Node)(0xc0000a00c0), PrevSibling:(*html.Node)(nil), NextSibling:(*html.Node)(nil), Parent:(*html.Node)(nil), LastChild:(*html.Node)(nil), PrevSibling:(*html.Node)(nil), NextSibling:(*html.Node)(nil), Parent:(*html.Node)(nil)}10import (11func main() {12 doc, err := html.Parse(strings.NewReader(`13 if err != nil {14 log.Fatal(err)15 }16 nodes := htmlquery.QuerySelectorAll(doc, "div")17 fmt.Println(nodes)18}19[]*html.Node{(*html.Node)(0xc0000a0000)}20In the above code, we have used the htmlquery.QuerySelectorAll() method to select all the div tags present in the HTML document. The htmlquery.QuerySelectorAll() method takes two arguments. The first argument is the document that we want to parse and the

Full Screen

Full Screen

QuerySelectorAll

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 if err != nil {4 panic(err)5 }6 defer res.Body.Close()7 htmlBytes, err := ioutil.ReadAll(res.Body)8 if err != nil {9 panic(err)10 }11 doc, err := html.Parse(bytes.NewReader(htmlBytes))12 if err != nil {13 panic(err)14 }15 links := html.QuerySelectorAll(doc, "a")16 for _, link := range links {17 fmt.Println(link.Attr["href"])18 }19}20import (21func main() {22 if err != nil {23 panic(err)24 }25 defer res.Body.Close()26 htmlBytes, err := ioutil.ReadAll(res.Body)27 if err != nil {28 panic(err)29 }30 doc, err := html.Parse(bytes.NewReader(htmlBytes))31 if err != nil {32 panic(err)33 }34 link := html.QuerySelector(doc, "a")35 fmt.Println(link.Attr["href"])36}37import (38func main() {39 if err != nil {40 panic(err)41 }42 defer res.Body.Close()43 htmlBytes, err := ioutil.ReadAll(res.Body)44 if err != nil {45 panic(err)46 }47 doc, err := html.Parse(bytes.NewReader(htmlBytes))48 if err != nil {49 panic(err)50 }51 link := html.QuerySelectorAll(doc, "a")

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run K6 automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Most used method in

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful