From d68d13252b0faa5f444175212f17d32d6ac511a4 Mon Sep 17 00:00:00 2001 From: Stephen Date: Wed, 18 May 2022 17:08:41 +0200 Subject: [PATCH 1/6] Fixes bug where removing child causes sync error --- build/slide-show-figure.js | 6 +- build/slide-show-ol.js | 6 +- build/slide-show-shadow.css | 2 +- build/slide-show-ul.js | 6 +- build/slide-show.css | 2 +- build/slide-show.js | 6 +- modules/lifecycle.js | 59 +++++++++--------- modules/properties.js | 4 -- modules/test.js | 26 ++++++++ test/1-structure.html | 5 ++ test/2-slide-show.html | 118 +++++++++++++++++++++++++++++++++++- 11 files changed, 193 insertions(+), 47 deletions(-) create mode 100644 modules/test.js diff --git a/build/slide-show-figure.js b/build/slide-show-figure.js index 1d61afa..d098b07 100644 --- a/build/slide-show-figure.js +++ b/build/slide-show-figure.js @@ -1,7 +1,7 @@ /* slide-show 1.1.5 By Stephen Band - Built 2022-05-16 23:59 */ + Built 2022-05-18 15:08 */ -var qe=Object.defineProperty;var Mt=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var Dt=(t,e)=>{var n={};for(var o in t)We.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&Mt)for(var o of Mt(t))e.indexOf(o)<0&&$e.call(t,o)&&(n[o]=t[o]);return n};var G=(t,e)=>{for(var n in e)qe(t,n,{get:e[n],enumerable:!0})};function $(t){var e=new Map;return function(o){if(e.has(o))return e.get(o);var r=t(o);return e.set(o,r),r}}var Ne=Array.prototype;function Xe(t,e){return typeof t=="function"?t.apply(null,e):t}function Bt(t,e,n){n=n||t.length;var o=n===1?e?t:$(t):$(function(r){return Bt(function(){var i=[r];return i.push.apply(i,arguments),t.apply(null,i)},e,n-1)});return function r(i){return arguments.length===0?r:arguments.length===1?o(i):arguments.length>=n?t.apply(null,arguments):Xe(o(i),Ne.slice.call(arguments,1))}}var w=Bt;function Ye(t,e){return 1-Math.pow(1-e,t)}var Gt=w(Ye);function v(){}function at(t,e){return e(t)}function S(t){return t}var Ke=Array.prototype;function pt(){let t=arguments;return t.length?e=>Ke.reduce.call(t,at,e):S}function ft(t,e,n){return n*(e-t)+t}var Ze=window.performance,zt=window.requestAnimationFrame,Qe=window.cancelAnimationFrame;function dt(t,e,n){var o=Ze.now();function r(s){var u=(s-o)/(t*1e3);u<1?(u>0&&e(u),i=zt(r)):(e(1),n&&n())}var i=zt(r);return function(){Qe(i)}}function N(t,e,n,o,r,i){let s=o[n];return dt(t,pt(e,u=>ft(s,r,u),u=>o[n]=u),i)}function Je(){return{x:0,y:0,left:0,top:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}}function T(t){return t===window?Je():t.getClientRects()[0]||t.getBoundingClientRect()}var I={scrollDuration:.3,scrollDurationPerHeight:.125,scrollTransform:Gt(3)},_t=v;function tn(t,e){if(e.behavior==="smooth"){let n=t.style.getPropertyValue("scroll-snap-type"),o=()=>t.style.setProperty("scroll-snap-type",n);if(t.style.setProperty("scroll-snap-type","none"),e.left!==void 0){let r=t===document.body?window.innerWidth:T(t).width,i=I.scrollDuration+I.scrollDurationPerHeight*Math.abs(e.left-t.scrollLeft)/r;_t=N(i,I.scrollTransform,"scrollLeft",t,e.left,o)}else{let r=t===document.body?window.innerHeight:T(t).height,i=I.scrollDuration+I.scrollDurationPerHeight*Math.abs(e.top-t.scrollTop)/r;_t=N(i,I.scrollTransform,"scrollTop",t,e.top,o)}}else e.left!==void 0&&(t.scrollLeft=e.left),e.top!==void 0&&(t.scrollTop=e.top)}if(!("scrollBehavior"in document.documentElement.style)){console.log("Polyfilling Element.scrollTo(options).");let t="scrollTo"in Element.prototype?Element:HTMLElement,e=t.scrollIntoView;t.prototype.scrollTo=function(n){typeof n=="object"?tn(this,n):e.apply(this,arguments)}}function y(t,e){return function(){let o=t.apply(this,arguments),r=e[o]||e.default;if(!r)throw new Error('overload() no handler for "'+o+'"');return r.apply(this,arguments)}}var en=y(S,{is:v,tag:v,html:function(t,e,n){e.innerHTML=n},text:function(t,e,n){e.textContent=n},children:function(t,e,n){e.innerHTML="",n.forEach(o=>{e.appendChild(o)})},points:j,cx:j,cy:j,r:j,preserveAspectRatio:j,viewBox:j,default:function(t,e,n){t in e?e[t]=n:e.setAttribute(t,n)}});function j(t,e,n){e.setAttribute(t,n)}function nn(t,e){for(var n=Object.keys(e),o=n.length;o--;)en(n[o],t,e[n[o]]);return t}var mt=w(nn,!0);var on="http://www.w3.org/2000/svg",Rt=document.createElement("div");var Ut=(t,e)=>e&&typeof e;function Vt(t,e){let n=document.createRange();return n.selectNode(t),n.createContextualFragment(e)}function L(t,e){var n=document.createElementNS(on,t);return e&&(n.innerHTML=e),n}var rn=y(S,{comment:function(t,e){return document.createComment(e||"")},fragment:y(Ut,{string:function(t,e,n){if(n)return Vt(n,e);let o=document.createDocumentFragment();Rt.innerHTML=e;let r=Rt.childNodes;for(;r[0];)o.appendChild(r[0]);return o},object:function(t,e,n){let o=n?Vt(n):document.createDocumentFragment();return typeof e.length=="number"?o.append.apply(o,e):mt(o,e),o},default:()=>document.createDocumentFragment()}),text:function(t,e){return document.createTextNode(e||"")},circle:L,ellipse:L,g:L,glyph:L,image:L,line:L,rect:L,use:L,path:L,pattern:L,polygon:L,polyline:L,svg:L,default:y(Ut,{string:function(t,e){let n=document.createElement(t);return n.innerHTML=e,n},object:function(t,e){let n=document.createElement(t);return typeof e.length=="number"?n.append.apply(n,e):mt(n,e),n},default:t=>{if(typeof t!="string")throw new Error('create(tag, content) accepts only a string as tag "'+typeof t+'"');return document.createElement(t)}})}),b=rn;function ht(t,e,n){let o;typeof n!="string"&&n.input!==void 0&&n.index!==void 0&&(o=n,n=o.input.slice(n.index+n[0].length+(n.consumed||0)));let r=t.exec(n);if(!r)return;let i=e(r);return o&&(o.consumed=(o.consumed||0)+r.index+r[0].length+(r.consumed||0)),i}var fr=w(ht,!0);function sn(t,e,n){throw n.input!==void 0&&n.index!==void 0&&(n=n.input),new Error('Cannot parse string "'+n+'"')}function cn(t,e,n){let o=-1;for(;++ocn(e,n,i),o);return r===void 0?e.catch?e.catch(n,o):sn(t,e,o):r}var qt=w(un,!0);var gt=v;var k=Symbol("internals"),O=Symbol("shadow"),Wt=Object.defineProperties,ln={a:HTMLAnchorElement,dl:HTMLDListElement,p:HTMLParagraphElement,br:HTMLBRElement,fieldset:HTMLFieldSetElement,hr:HTMLHRElement,img:HTMLImageElement,li:HTMLLIElement,ol:HTMLOListElement,optgroup:HTMLOptGroupElement,q:HTMLQuoteElement,textarea:HTMLTextAreaElement,td:HTMLTableCellElement,th:HTMLTableCellElement,tr:HTMLTableRowElement,tbody:HTMLTableSectionElement,thead:HTMLTableSectionElement,tfoot:HTMLTableSectionElement,ul:HTMLUListElement},an={name:{set:function(t){return this.setAttribute("name",t)},get:function(){return this.getAttribute("name")||""}},form:{get:function(){return this[k].form}},labels:{get:function(){return this[k].labels}},validity:{get:function(){return this[k].validity}},validationMessage:{get:function(){return this[k].validationMessage}},willValidate:{get:function(){return this[k].willValidate}},checkValidity:{value:function(){return this[k].checkValidity()}},reportValidity:{value:function(){return this[k].reportValidity()}}},pn={},$t={once:!0},fn=0,Nt=!1;function dn(t){return ln[t]||window["HTML"+t[0].toUpperCase()+t.slice(1)+"Element"]||(()=>{throw new Error('Constructor not found for tag "'+t+'"')})()}var mn=qt(/^\s*?\s*$|^\s*?\s*$/,{1:(t,e)=>({name:e[1]}),2:(t,e)=>({name:e[3],tag:e[2]}),catch:function(t,e){throw new SyntaxError(`dom element() – name must be of the form 'element-name' or 'tag is="element-name"' (`+e+")")}},null);function hn(t,e){if(t.hasOwnProperty(e)){let n=t[e];delete t[e],t[e]=n}return t}function gn(t,e,n){t._initialLoad=!0;let o=t.attachShadow({mode:e.mode||"closed",delegatesFocus:e.focusable||!1});if(n){let r=b("link",{rel:"stylesheet",href:n});o.append(r)}return t[O]=o,o}function wn(t){var e;if(t.attachInternals){if(e=t.attachInternals(),e.setFormValue)return e}else e={shadowRoot:t.shadowRoot};return e.input=b("input",{type:"hidden",name:t.name}),t.appendChild(e.input),e.setFormValue=function(n){this.input.value=n},e}function vn(t){t._initialAttributes={},t._n=0}function yn(t,e,n){let o=t._initialAttributes;for(;t._nfn?gn(p,e,o||e.stylesheet):void 0,c=l.formAssociated&&wn(p);return i&&(Nt=!0),e.construct&&e.construct.call(p,a,c),u&&(vn(p),Promise.resolve(1).then(function(){Xt(p,l.observedAttributes,u)})),f&&Object.keys(f).reduce(hn,p),p}return l.prototype=Object.create(s.prototype,f),f&&f.value&&(l.formAssociated=!0,Wt(l.prototype,an),(e.enable||e.disable)&&(l.prototype.formDisabledCallback=function(p){return p?e.disable&&e.disable.call(this,this[O],this[k]):e.enable&&e.enable.call(this,this[O],this[k])}),e.reset&&(l.prototype.formResetCallback=function(){return e.reset.call(this,this[O],this[k])}),e.restore&&(l.prototype.formStateRestoreCallback=function(){return e.restore.call(this,this[O],this[k])})),u&&(l.observedAttributes=Object.keys(u),l.prototype.attributeChangedCallback=function(p,a,c){if(!this._initialAttributes)return u[p].call(this,c);this._initialAttributes[p]=c,yn(this,l.observedAttributes,u)}),l.prototype.connectedCallback=function(){let p=this,a=p[O],c=p[k];if(p._initialAttributes&&Xt(p,l.observedAttributes,u),p._initialLoad){let E=a.querySelectorAll('link[rel="stylesheet"]');if(E.length){let ze=0,lt=E.length,Ht=function(Ue){++ze>=E.length&&(delete p._initialLoad,e.load&&(gt("element()","loaded",Array.from(E).map(Ve=>Ve.href).join(` -`)),e.load.call(p,a)))},_e=Ht;for(;lt--;)E[lt].addEventListener("load",Ht,$t),E[lt].addEventListener("error",_e,$t);e.connect&&e.connect.call(this,a,c)}else e.connect&&e.connect.call(this,a,c),e.load&&e.load.call(this,a,c)}else e.connect&&e.connect.call(this,a,c)},e.disconnect&&(l.prototype.disconnectedCallback=function(){return e.disconnect.call(this,this[O],this[k])}),gt("element()","<"+(i?i+" is="+r:r)+">"),window.customElements.define(r,l,i&&{extends:i}),i&&!Nt&&document.querySelectorAll('[is="'+r+'"]').forEach(p=>{Wt(p,f),e.construct&&e.construct.apply(p);let a;for(a in u){let c=p.attributes[a];c&&u[a].call(p,c.value)}e.connect&&e.connect.apply(p)}),l}function Kt(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object")return!1;let n=Object.keys(t),o=Object.keys(e),r=n.length;for(;r--;){if(t[n[r]]===void 0){if(e[n[r]]!==void 0)return!1}else if(!e.hasOwnProperty(n[r])||!Kt(t[n[r]],e[n[r]]))return!1;let i=o.indexOf(n[r]);i>-1&&o.splice(i,1)}for(r=o.length;r--;)if(e[o[r]]===void 0){if(t[o[r]]!==void 0)return!1}else return!1;return!0}var Zt=w(Kt,!0);function En(t,e){return e[t]}var H=w(En,!0);var Sn=Object.freeze;function Qt(){return this}var M=Sn({shift:v,push:v,forEach:v,join:function(){return""},map:Qt,filter:Qt,reduce:function(t,e){return e},length:0,each:v,pipe:S,start:v,stop:v,done:v,valueOf:function(){return null}});function vt(){return this}function yt(t){return t&&t[Symbol.iterator]}var Tn=Object.assign;function Ln(t){return t.stop?t.stop():t()}function kn(t){t.forEach(Ln),t.length=0}function D(){}Tn(D.prototype,{stop:function(){return this.stopables&&kn(this.stopables),this},done:function(e){return(this.stopables||(this.stopables=[])).push(e),this}});var Pn=Object.assign;function X(t){D.prototype.stop.apply(t);let e=-1,n;for(;n=t[++e];)t[e]=void 0,X(n)}function m(){}Pn(m.prototype,{pipe:function(t){return this[0]=t,t},stop:function(){return X(this[0]),this}});var P=Object.assign,F=Object.create;function z(t,e){e!==void 0&&t[0].push(e)}function Fn(t,e){if(t[1]){let n=-1;for(;t[++n]&&t[n]!==e;);for(;t[n++];)t[n-1]=t[n];X(e)}else t.stop()}function h(t){this.input=t}P(h.prototype,D.prototype,{push:function(t){z(this,t)},pipe:function(t){if(this[0])throw new Error("Stream: Attempt to .pipe() a unicast stream multiple times. Create a multicast stream with stream.broadcast().");return this[0]=t,this.input.pipe(this),t},map:function(t){return new Jt(this,t)},filter:function(t){return new te(this,t)},chunk:function(t){return new ne(this,t)},flatMap:function(t){return new ee(this,t)},take:function(t){return new oe(this,t)},each:function(t){return new se(this,t)},reduce:function(t,e){return new re(this,t,e)},scan:function(t,e){return new ie(this,t,e)},stop:function(){return Fn(this.input,this),this}});function Jt(t,e){this.input=t,this.fn=e}Jt.prototype=P(F(h.prototype),{push:function(e){let n=this.fn;z(this,n(e))}});function te(t,e){this.input=t,this.fn=e}te.prototype=P(F(h.prototype),{push:function(e){this.fn(e)&&z(this,e)}});function ee(t,e){this.input=t,this.fn=e}ee.prototype=P(F(h.prototype),{push:function(e){let o=this.fn(e);if(o!==void 0)if(yt(o))for(let r of o)z(this,r);else throw new Error("Stream: Cannot .flatMap() non-iterable values")}});function ne(t,e){this.input=t,this.chunk=[],typeof e=="number"?this.n=e:typeof e=="function"&&(this.fn=e)}ne.prototype=P(F(h.prototype),{fn:function(t){return t.length===this.n},push:function(e){let n=this.chunk;n.push(e),this.fn(n)&&(z(this,n),this.chunk=[])}});function oe(t,e){this.input=t,this.count=e}oe.prototype=P(F(h.prototype),{push:function(e){this[0].push(e),--this.count||this.stop()}});function re(t,e,n){return this.input=t,this.fn=e,this.value=n,this.i=0,t.pipe(this),n}re.prototype=P(F(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t,this.i++,this)}});function ie(t,e,n){this.input=t,this.fn=e,this.value=n}ie.prototype=P(F(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t),this[0].push(this.value)}});function se(t,e){this.input=t,this.push=e,t.pipe(this)}se.prototype=P(F(h.prototype),{each:null,reduce:null,pipe:null});var On=Array.prototype,An=Object.assign,Cn=Object.create;function _(t){this.buffer=t||[]}_.prototype=An(Cn(h.prototype),m.prototype,{push:function(t){t!==void 0&&this.buffer.push(t)},pipe:function(t){for(this[0]=t;this.buffer.length;)this[0].push(On.shift.apply(this.buffer));return this.buffer=this[0],t}});var In=Object.assign,jn=Object.create;function R(t,e){this.input=t,this.memory=!!(e&&e.memory),e&&e.hot&&this.pipe(M)}R.prototype=In(jn(h.prototype),{push:function(t){if(t!==void 0){this.memory&&(this.value=t);let e=-1;for(;this[++e];)this[e].push(t)}},pipe:function(t){let e=-1;for(;this[++e];);return this[e]=t,this.value!==void 0&&t.push(this.value),e===0&&this.input.pipe(this),t}});var Hn=Object.assign;function Y(t){this.promise=t}Hn(Y.prototype,m.prototype,{pipe:function(t){let e=this.promise;this[0]=t,e.then(n=>this[0].push(n)).finally(n=>this.stop())},stop:function(){m.prototype.stop.apply(this,arguments),this[0]=M}});var ue=Object.assign,le=Object.keys;function ce(t,e,n){let o=t.values,r=t.names,i=t[0];o[e]=n,(t.active||(t.active=le(o).length===r.length))&&i.push(ue({},o))}function K(t){this.inputs=t,this.active=!1}ue(K.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this.values={},this.names=le(e),this[0]=t;for(let n in e){let o=e[n];o.pipe?t.done(o.each(r=>ce(this,n,r))):o.then?o.then(r=>ce(this,n,r)):console.log("Todo: combine() raw values ?")}}});var Mn=Object.assign;function Z(t){this.inputs=t}Mn(Z.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this[0]=t;let n=-1,o;for(;o=e[++n];)if(o.pipe)o.pipe(t);else if(o.then)o.then(r=>t.push(r));else{let r=-1;for(;++r0}function Gn(t,e,n){return t[n]=e.shift(),t}function zn(t){return[]}function bt(t,e,n,o){n.push(o),e.every(Bn)&&t.push(e.reduce(Gn,{}))}function Q(t){this.inputs=t,this.buffers=xt.map.call(t,zn)}Dn(Q.prototype,m.prototype,{pipe:function(t){let e=this.inputs,n=this.buffers;this[0]=t,xt.forEach.call(e,(o,r)=>{let i=n[r];o.each?t.done(o.each(s=>bt(t,n,i,s))):o.then?o.then(s=>bt(t,n,i,s)):xt.forEach.call(o,s=>bt(t,n,i,s))})},stop:function(){let t=this.inputs,e=-1,n;for(;n=t[++e];)n.stop();return m.prototype.stop.apply(this,arguments)}});var _n=Array.prototype,ae=Object.assign;function Rn(t){throw new TypeError("Stream: invalid source object cannot be read into stream")}var g=ae(h,{of:function(){return new _(_n.slice.apply(arguments))},from:function(t){return t.pipe?new h(t):t.then?new h(new Y(t)):typeof t.length=="number"?new _(t):Rn(t)},broadcast:function(e){return new R(M,e)},combine:function(e){return new h(new K(e))},merge:function(){return new h(new Z(arguments))},zip:function(){return new h(new Q(arguments))}});ae(h.prototype,{log:vt,broadcast:function(t){return new R(this,t)}});var Un=Object.assign,Vn=/\s+/,pe={fullscreenchange:"fullscreenElement"in document?"fullscreenchange":"webkitFullscreenElement"in document?"webkitfullscreenchange":"fullscreenchange"};function fe(t){return t.which===1&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}var de=0;window.addEventListener("click",t=>de=t.timeStamp);function qn(t,e){return t.node.addEventListener(pe[e]||e,t,t.options),t}function Wn(t,e){return t.node.removeEventListener(pe[e]||e,t),t}function me(t,e,n){this.types=t.split(Vn),this.options=e,this.node=n,this.select=e&&e.select}Un(me.prototype,m.prototype,{pipe:function(t){this[0]=t,this.types.reduce(qn,this)},handleEvent:function(t){if(!(t.type==="click"&&t.timeStamp<=de)){if(this.select){let e=t.target.closest(this.select);if(!e)return;t.selectedTarget=e}this[0].push(t)}},stop:function(){this.types.reduce(Wn,this),m.prototype.stop.apply(this,arguments)}});function x(t,e){let n;return typeof t=="object"&&(n=t,t=n.type),new g(new me(t,n,e))}function Et(t){return typeof t}var $n=/^\s*([+-]?\d*\.?\d+)([^\s\d]*)\s*$/;function Nn(t,e){if(typeof e=="number")return e;var n=$n.exec(e);if(!n||!t[n[2]||""]){if(!t.catch)throw new Error('Cannot parse value "'+e+'" with provided units '+Object.keys(t).join(", "));return n?t.catch(parseFloat(n[1]),n[2]):t.catch(parseFloat(e))}return t[n[2]||""](parseFloat(n[1]))}var J=w(Nn);var Xn=/px$/,he={"transform:translateX":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[4])},"transform:translateY":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[5])},"transform:scale":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.sqrt(o*o+r*r)},"transform:rotate":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.atan2(r,o)}};function tt(t){return t.split("(")[1].split(")")[0].split(/\s*,\s*/)}function U(t,e){return window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):0}function et(t,e){if(he[t])return he[t](e);var n=U(t,e);return typeof n=="string"&&Xn.test(n)?parseFloat(n):n}var nt,ot;function Yn(){if(!nt){let t=document.documentElement.style.fontSize;document.documentElement.style.fontSize="100%",nt=et("font-size",document.documentElement),document.documentElement.style.fontSize=t||""}return nt}function Kn(){return ot||(ot=et("font-size",document.documentElement)),ot}window.addEventListener("resize",()=>{nt=void 0,ot=void 0});var A=y(Et,{number:S,string:J({em:function(t){return Yn()*t},px:function(t){return t},rem:function(t){return Kn()*t},vw:function(t){return window.innerWidth*t/100},vh:function(t){return window.innerHeight*t/100},vmin:function(t){return window.innerWidthn?o:n}n=nq.maxScrollInterval?q.maxScrollInterval:1.4*n}function it(){return ye}function xe(t){let e=T(t),n=window.getComputedStyle(t,null),o=A(n.getPropertyValue("padding-left")),r=A(n.getPropertyValue("padding-right"));return e.leftPadding=e.left+o,e.rightPadding=e.left+e.width-r,e.centrePadding=e.leftPadding+(e.width-o-r)/2,e}function Ee(t){let e=window.getComputedStyle(t,null).getPropertyValue("scroll-snap-align");return e.endsWith("start")?"left":e.endsWith("end")?"right":"centre"}function Se(t,e,n){let o=xe(t),r=T(e),i=Ee(e);t.scrollTo({top:t.scrollTop,left:t.scrollLeft+(i==="left"?r.left-o.leftPadding:i==="right"?r.right-o.rightPadding:r.left+r.width/2-o.centrePadding),behavior:n})}function Te(t,e){return Se(t,e,"smooth"),e}function B(t,e){return t.style.setProperty("scroll-behavior","auto","important"),Se(t,e,"auto"),t.style.setProperty("scroll-behavior",""),e}function Le(t,e){let{leftPadding:n,rightPadding:o,centrePadding:r}=xe(t),i=e.length,s;for(;s=e[--i];){let u=T(s);if(!u)continue;let f=Ee(s),l=u.width/2+(f==="left"?n:f==="right"?o:r);if((f==="left"?u.left:f==="right"?u.right:u.left+u.width/2)<=l)break}return s}function ke(t){return!!t.dataset.slideIndex}function Pe(t){let{scroller:e,elements:n,children:o}=t,r=Le(e,n);return ke(r)?o[r.dataset.slideIndex]:r}function Fe(t){let{scroller:e,children:n,elements:o}=t,r=Le(e,o),i;!r||(ke(r)?(i=n[r.dataset.slideIndex],B(e,i)):i=r,t.activations.push(i))}function to(t,e){t.style.setProperty("scroll-snap-type",""),e.stop()}var Oe=y((t,e)=>e.type,{pointerdown:function(t,e){return t.e0=e,t.x0=e.clientX,t.y0=e.clientY,t},pointermove:function(t,e){let n=e.clientX,o=e.clientY;if(!t.gesturing){if(Math.abs(n-t.x0)(clearTimeout(s),setTimeout(to,it()*1e3,n,l)))}return t.gesturing=!1,t.e0=void 0,t.x0=void 0,t.y0=void 0,t.pointers=void 0,t.scrollLeft0=void 0,t}});var eo=Object.assign,no={capture:!0,passive:!0};function oo(t,e){t.timer=void 0,t.stream.push(e);let n=t.times;n.length>1&&be(n),n.length=0}function Ae(t){this.element=t,this.times=[]}eo(Ae.prototype,m.prototype,{pipe:function(t){this.stream=t,this.element.addEventListener("scroll",this,no)},handleEvent:function(t){let e=t.timeStamp/1e3;this.times.push(e),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(oo,it()*1e3,this,t)},stop:function(){this.element.removeEventListener("scroll",this),m.prototype.stop.apply(this,arguments)}});function kt(t){return new g(new Ae(t))}function ro(t,e,n){let o=n.length,r=-1/0;for(;o--;){let l=T(n[o]),p=l.x+l.width;r=p>r?p:r}let i=T(e),s=getComputedStyle(t),u=A(s.paddingLeft||0),f=A(s.paddingRight||0);return u+f+r-i.x}function io(t,e,n){let o=ro(t,e,n);t.style.setProperty("--scroll-width",o+"px")}function so(t){return!t.dataset.slideIndex}var Ce={construct:function(t){let e=b("slot",{part:"slides"}),n=b("div",{class:"scroller",children:[e]}),o=b("nav",{part:"controls",children:[b("slot",{name:"controls"})]});t.append(n,o);let r=g.of(),i=g.combine({host:r,elements:x("slotchange",e).map(c=>a.elements=e.assignedElements())}).broadcast({memory:!0}),s=i.map(c=>{let E=c.elements.filter(so);return Zt(a.children,E)?void 0:a.children=E}).broadcast({memory:!0}),u=g.of(null),f=g.of(),l=f.filter(c=>a.active!==c&&Lt("slide-active",c)).map(c=>a.active=c).broadcast({memory:!0,hot:!0}),p=x("click",t).filter(fe).broadcast(),a=this[d]={clickSuppressTime:-1/0,host:this,style:window.getComputedStyle(this),scroller:n,slides:e,controls:o,load:r,views:u,activations:f,actives:l,slotchanges:i,mutations:s,clicks:p};g.merge(i,x("resize",window)).each(c=>io(n,e,a.elements)),g.combine({children:s,child:u}).map(c=>!a.active||a.active===c.child?B(n,c.children.includes(c.child)?c.child:c.children[0]):(Te(n,c.child),c.child.dataset.slideIndex?c.children[c.child.dataset.slideIndex]:c.child)).pipe(f),kt(n).filter(()=>!a.gesturing).each(c=>Fe(a)),Tt({threshold:"0.25rem",device:"mouse"},t).filter(()=>a.children.length>1).each(c=>{a.pointers=c,c.reduce(Oe,a)}),p.each(c=>{c.timeStamp-a.clickSuppressTime<120&&(c.preventDefault(),c.stopPropagation())}),x("fullscreenchange",window).each(c=>{(c.target===this||c.target.contains(this))&&B(n,a.active)}),x("focusin",this).map(c=>a.children.indexOf(c.target)!==-1?c.target:a.children.find(E=>E.contains(c.target))).pipe(u),x("keydown",this).filter(()=>document.activeElement===this||this.contains(document.activeElement)).map(y(H("keyCode"),{37:c=>(c.preventDefault(),a.elements[a.elements.indexOf(a.active)-1]),39:c=>(c.preventDefault(),a.elements[a.elements.indexOf(a.active)+1]),default:v})).pipe(u)},load:function(t){this[d].load.push(this)}};function st(t,e){function n(o,r){if(t.getState(o)!==r)return t[r?"enable":"disable"](o)}return{attribute:function(o){return n(this,o!==null)},set:function(o){return n(this,!!o)},get:function(){return t.getState(this)}}}function Pt(t,e){t.remove&&t.remove(e);let n;for(;(n=t.indexOf(e))!==-1;)t.splice(n,1);return e}var ls=w(Pt,!0);var co=Object.assign;function W(t,e){this.element=t,this.definitions=e,this.tokens=[]}co(W.prototype,{contains:function(t){return this.tokens.includes(t)},add:function(){let t=arguments.length;for(;t--;){let e=arguments[t];!this.tokens.includes(e)&&this.definitions[e]&&(this.definitions[e].enable(this.element),this.tokens.push(e))}},remove:function(){let t=arguments.length;for(;t--;){let e=arguments[t];this.tokens.includes(e)&&(this.definitions[e].disable(this.element),Pt(this.tokens,e))}},supports:function(t){return!!this.definitions[t]}});var uo=Array.prototype;function lo(t,e){let n=t.tokens.slice(),o=uo.slice.apply(e),r=n.length;for(;r--;)o.includes(n[r])&&n.splice(r,1);t.remove.apply(t,n),t.add.apply(t,o)}function Ft(t){let e=Symbol("TokenList");function n(o,r){let i=o[e]||(o[e]=new W(o,t));lo(i,r.trim().split(/\s+/))}return{attribute:function(o){n(this,o||"")},set:function(o){n(this,o+"")},get:function(){return this[e]||(this[e]=new W(this,t))}}}var Ot={};G(Ot,{disable:()=>ho,enable:()=>mo,getState:()=>go});var ao=J({s:S,ms:t=>t/1e3});function po(t){let{active:e,children:n,elements:o,host:r}=t,i=o.indexOf(e),s=o[i+1]||n[0];t.autoplay.timer=null,!!s&&(r.active=s)}function fo(t){let{active:e,style:n}=t,o=ao(window.getComputedStyle(e).getPropertyValue("--slide-duration")||n.getPropertyValue("--slide-duration"));clearTimeout(t.autoplay.timer),t.autoplay.timer=setTimeout(po,o*1e3,t)}function Ie(t){clearTimeout(t.autoplay.timer),t.autoplay.timer=null}function mo(t){let e=t[d],{actives:n}=e,o=e.autoplay={},r=g.merge([!1],x("pointerenter pointerleave",t).map(s=>s.type==="pointerenter")),i=g.merge([t.contains(document.activeElement)],x("focusin focusout",t).map(y(H("type"),{focusin:s=>!0,focusout:s=>t.contains(s.relatedTarget)}))).map((s=>u=>s===u?void 0:s=u)());o.updates=g.combine({active:n,hover:r,focus:i}).each(s=>s.hover||s.focus?Ie(e):fo(e))}function ho(t){let e=t[d];Ie(e),e.autoplay.updates.stop(),e.autoplay=void 0}function go(t){return!!t[d].autoplay}var At={};G(At,{disable:()=>yo,enable:()=>vo,getState:()=>bo});function je(t,e){let n=t.cloneNode(!0);return n.dataset.slideIndex=e,n.removeAttribute("id"),n.setAttribute("aria-hidden","true"),n.tabIndex="-1",n}function wo(t){let{active:e,children:n,host:o,scroller:r}=t;if(t.loop.prepends&&(t.loop.prepends.forEach(c=>c.remove()),t.loop.appends.forEach(c=>c.remove()),t.loop.prepends=void 0,t.loop.appends=void 0),n.length<2){t.elements=t.slides.assignedElements();return}let i=o.clientWidth,s=n.map(T),u=s[1].left,f=s[s.length-2].right,l=1;for(;s[++l]&&s[l].leftf-i;);let a=n.slice(++l).map((c,E)=>je(c,l+E));o.prepend.apply(o,a),o.append.apply(o,p),t.loop.prepends=a,t.loop.appends=p,t.elements=t.slides.assignedElements(),B(r,e||n[0])}function vo(t){let e=t[d],{mutations:n}=e,o=e.loop={};o.renders=n.each(r=>wo(e))}function yo(t){let e=t[d];e.loop&&(e.loop.prepends&&e.loop.prepends.forEach(n=>n.remove()),e.loop.appends&&e.loop.appends.forEach(n=>n.remove()),e.loop.renders.stop(),e.loop=void 0)}function bo(t){return!!t[d].loop}var Ct={};G(Ct,{disable:()=>Eo,enable:()=>xo,getState:()=>So});function C(t){if(typeof t!="object"||arguments.length>1)throw new Error("delegate() now takes an object of selector:fn pairs.");let e=Object.keys(t);return function(o){let r=o.target,i=-1;for(;e[++i];){let s=r.closest(e[i]);if(s)return t[e[i]](s,...arguments)}}}function He(t,e,n,o){o===0?t.hidden=!0:t.hidden=!1,o===n.length-1?e.hidden=!0:e.hidden=!1}function xo(t){let e=t[d],{actives:n,clicks:o,slotchanges:r}=e,i=e.navigation={prev:b("button",{part:"prev-button",type:"button",name:"navigation",value:"-1",html:"Previous"}),next:b("button",{part:"next-button",type:"button",name:"navigation",value:"1",html:"Next"})};e.controls.prepend(i.prev,i.next),i.updates=g.combine({active:n,changes:r}).each(s=>He(i.prev,i.next,s.changes.elements,s.changes.elements.indexOf(s.active))),i.clicks=o.each(C({'[name="navigation"]':function(s,u){let f=parseFloat(s.value),l=e.elements.indexOf(e.active)+f,p=e.elements[l];!p||(t.active=p,He(i.prev,i.next,e.elements,l))}}))}function Eo(t){let e=t[d];e.navigation.prev.remove(),e.navigation.next.remove(),e.navigation.updates.stop(),e.navigation.clicks.stop(),e.navigation=void 0}function So(t){return!!t[d].navigation}var It={};G(It,{disable:()=>ko,enable:()=>Lo,getState:()=>Po});function Me(t,e,n){let{active:o,buttons:r,index:i}=t;if(o===n)return;i>-1&&(t.activeSpan.remove(),r.children[i].part.remove("page-button-active"));let s=e.indexOf(n);s!==-1&&(r.children[s].part.add("page-button-active"),r.children[s].append(t.activeSpan),t.index=s,t.active=n)}function To(t,e,n,o){return e.buttons&&(e.buttons.remove(),e.buttons=void 0),o.length<2||(e.buttons=b("div",{part:"pagination",children:o.map((r,i)=>b("button",{part:"page-button",type:"button",name:"pagination",value:i}))}),t.append(e.buttons)),o.length}function Lo(t){let e=t[d],{shadow:n,actives:o,clicks:r,mutations:i}=e,s=e.pagination={activeSpan:b("span",{class:"invisible",text:"(Current slide)"})};s.mutations=i.each(()=>To(e.controls,s,n,e.children)),s.updates=g.combine({active:o,children:i}).filter(u=>u.children.length>1).each(u=>Me(s,e.children,e.active)),s.clicks=r.each(C({'[name="pagination"]':function(u,f){let{host:l}=e,p=e.children,a=p[u.value];!a||(l.active=a,Me(s,p,a))}}))}function ko(t){let e=t[d];e.pagination.buttons.remove(),e.pagination.mutations.stop(),e.pagination.updates.stop(),e.pagination.clicks.stop(),e.pagination=void 0}function Po(t){return!!t[d].pagination}var jt={};G(jt,{disable:()=>Oo,enable:()=>Fo,getState:()=>Ao});var De=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled;function ct(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement}function Be(t){return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():void 0}function ut(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}function Fo(t){let e=t[d];if(!De)return;let n=e.fullscreen={button:b("button",{part:"fullscreen-button",type:"button",name:"fullscreen",html:"Open in fullscreen"})};e.controls.append(n.button),n.changes=x("fullscreenchange",t).filter(o=>ct()===t).each(o=>{n.button.part.add("fullscreen-button-active"),n.button.innerHTML="Close fullscreen",document.activeElement!==t&&(n.tabIndex=t.tabIndex,t.tabIndex<0&&(t.tabIndex=0),t.focus());let r=x("fullscreenchange",t).each(i=>{n.button.part.remove("fullscreen-button-active"),n.button.innerHTML="Open in fullscreen",t.tabIndex=n.tabIndex,n.tabIndex=void 0,r.stop()})}),n.clicks=e.clicks.each(C({'[name="fullscreen"]':(o,r)=>{let i=ct();if(i===t){ut();return}i&&ut(),Be(t)}}))}function Oo(t){let e=t[d];ct()===t&&ut(),e.fullscreen.button.remove(),e.fullscreen.clicks.stop(),e.fullscreen.changes.stop(),e.fullscreen=void 0}function Ao(t){return!!t[d].fullscreen}var Ge={active:{attribute:function(t){this.active=t},set:function(t){let e=this[d],n=typeof t=="object"?t:/^\d/.test(t+"")?this.querySelector("#\\3"+(t+"")[0]+" "+(t+"").slice(1)):/^\#/.test(t+"")?this.querySelector(t):this.querySelector("#"+t);if(!n)throw new Error("Cannot set active – not a child of slide-show");e.views.push(n)},get:function(){return this[d].active}},autoplay:st(Ot,"autoplay"),controls:Ft({navigation:Ct,pagination:It,fullscreen:jt}),loop:st(At,"loop")};var Co=import.meta.url.replace(/\/[^\/]*\.js/,"/slide-show-shadow.css"),Qs=wt('
',Ce,Ge,Co);export{Qs as default}; +var qe=Object.defineProperty;var Mt=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var Dt=(t,e)=>{var n={};for(var o in t)We.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&Mt)for(var o of Mt(t))e.indexOf(o)<0&&$e.call(t,o)&&(n[o]=t[o]);return n};var G=(t,e)=>{for(var n in e)qe(t,n,{get:e[n],enumerable:!0})};function $(t){var e=new Map;return function(o){if(e.has(o))return e.get(o);var r=t(o);return e.set(o,r),r}}var Ne=Array.prototype;function Xe(t,e){return typeof t=="function"?t.apply(null,e):t}function Bt(t,e,n){n=n||t.length;var o=n===1?e?t:$(t):$(function(r){return Bt(function(){var i=[r];return i.push.apply(i,arguments),t.apply(null,i)},e,n-1)});return function r(i){return arguments.length===0?r:arguments.length===1?o(i):arguments.length>=n?t.apply(null,arguments):Xe(o(i),Ne.slice.call(arguments,1))}}var w=Bt;function Ye(t,e){return 1-Math.pow(1-e,t)}var Gt=w(Ye);function v(){}function at(t,e){return e(t)}function S(t){return t}var Ke=Array.prototype;function pt(){let t=arguments;return t.length?e=>Ke.reduce.call(t,at,e):S}function ft(t,e,n){return n*(e-t)+t}var Ze=window.performance,zt=window.requestAnimationFrame,Qe=window.cancelAnimationFrame;function dt(t,e,n){var o=Ze.now();function r(s){var l=(s-o)/(t*1e3);l<1?(l>0&&e(l),i=zt(r)):(e(1),n&&n())}var i=zt(r);return function(){Qe(i)}}function N(t,e,n,o,r,i){let s=o[n];return dt(t,pt(e,l=>ft(s,r,l),l=>o[n]=l),i)}function Je(){return{x:0,y:0,left:0,top:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}}function T(t){return t===window?Je():t.getClientRects()[0]||t.getBoundingClientRect()}var H={scrollDuration:.3,scrollDurationPerHeight:.125,scrollTransform:Gt(3)},_t=v;function tn(t,e){if(e.behavior==="smooth"){let n=t.style.getPropertyValue("scroll-snap-type"),o=()=>t.style.setProperty("scroll-snap-type",n);if(t.style.setProperty("scroll-snap-type","none"),e.left!==void 0){let r=t===document.body?window.innerWidth:T(t).width,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.left-t.scrollLeft)/r;_t=N(i,H.scrollTransform,"scrollLeft",t,e.left,o)}else{let r=t===document.body?window.innerHeight:T(t).height,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.top-t.scrollTop)/r;_t=N(i,H.scrollTransform,"scrollTop",t,e.top,o)}}else e.left!==void 0&&(t.scrollLeft=e.left),e.top!==void 0&&(t.scrollTop=e.top)}if(!("scrollBehavior"in document.documentElement.style)){console.log("Polyfilling Element.scrollTo(options).");let t="scrollTo"in Element.prototype?Element:HTMLElement,e=t.scrollIntoView;t.prototype.scrollTo=function(n){typeof n=="object"?tn(this,n):e.apply(this,arguments)}}function y(t,e){return function(){let o=t.apply(this,arguments),r=e[o]||e.default;if(!r)throw new Error('overload() no handler for "'+o+'"');return r.apply(this,arguments)}}var en=y(S,{is:v,tag:v,html:function(t,e,n){e.innerHTML=n},text:function(t,e,n){e.textContent=n},children:function(t,e,n){e.innerHTML="",n.forEach(o=>{e.appendChild(o)})},points:M,cx:M,cy:M,r:M,preserveAspectRatio:M,viewBox:M,default:function(t,e,n){t in e?e[t]=n:e.setAttribute(t,n)}});function M(t,e,n){e.setAttribute(t,n)}function nn(t,e){for(var n=Object.keys(e),o=n.length;o--;)en(n[o],t,e[n[o]]);return t}var mt=w(nn,!0);var on="http://www.w3.org/2000/svg",Rt=document.createElement("div");var Ut=(t,e)=>e&&typeof e;function Vt(t,e){let n=document.createRange();return n.selectNode(t),n.createContextualFragment(e)}function L(t,e){var n=document.createElementNS(on,t);return e&&(n.innerHTML=e),n}var rn=y(S,{comment:function(t,e){return document.createComment(e||"")},fragment:y(Ut,{string:function(t,e,n){if(n)return Vt(n,e);let o=document.createDocumentFragment();Rt.innerHTML=e;let r=Rt.childNodes;for(;r[0];)o.appendChild(r[0]);return o},object:function(t,e,n){let o=n?Vt(n):document.createDocumentFragment();return typeof e.length=="number"?o.append.apply(o,e):mt(o,e),o},default:()=>document.createDocumentFragment()}),text:function(t,e){return document.createTextNode(e||"")},circle:L,ellipse:L,g:L,glyph:L,image:L,line:L,rect:L,use:L,path:L,pattern:L,polygon:L,polyline:L,svg:L,default:y(Ut,{string:function(t,e){let n=document.createElement(t);return n.innerHTML=e,n},object:function(t,e){let n=document.createElement(t);return typeof e.length=="number"?n.append.apply(n,e):mt(n,e),n},default:t=>{if(typeof t!="string")throw new Error('create(tag, content) accepts only a string as tag "'+typeof t+'"');return document.createElement(t)}})}),b=rn;function ht(t,e,n){let o;typeof n!="string"&&n.input!==void 0&&n.index!==void 0&&(o=n,n=o.input.slice(n.index+n[0].length+(n.consumed||0)));let r=t.exec(n);if(!r)return;let i=e(r);return o&&(o.consumed=(o.consumed||0)+r.index+r[0].length+(r.consumed||0)),i}var fr=w(ht,!0);function sn(t,e,n){throw n.input!==void 0&&n.index!==void 0&&(n=n.input),new Error('Cannot parse string "'+n+'"')}function cn(t,e,n){let o=-1;for(;++ocn(e,n,i),o);return r===void 0?e.catch?e.catch(n,o):sn(t,e,o):r}var qt=w(un,!0);var gt=v;var k=Symbol("internals"),A=Symbol("shadow"),Wt=Object.defineProperties,ln={a:HTMLAnchorElement,dl:HTMLDListElement,p:HTMLParagraphElement,br:HTMLBRElement,fieldset:HTMLFieldSetElement,hr:HTMLHRElement,img:HTMLImageElement,li:HTMLLIElement,ol:HTMLOListElement,optgroup:HTMLOptGroupElement,q:HTMLQuoteElement,textarea:HTMLTextAreaElement,td:HTMLTableCellElement,th:HTMLTableCellElement,tr:HTMLTableRowElement,tbody:HTMLTableSectionElement,thead:HTMLTableSectionElement,tfoot:HTMLTableSectionElement,ul:HTMLUListElement},an={name:{set:function(t){return this.setAttribute("name",t)},get:function(){return this.getAttribute("name")||""}},form:{get:function(){return this[k].form}},labels:{get:function(){return this[k].labels}},validity:{get:function(){return this[k].validity}},validationMessage:{get:function(){return this[k].validationMessage}},willValidate:{get:function(){return this[k].willValidate}},checkValidity:{value:function(){return this[k].checkValidity()}},reportValidity:{value:function(){return this[k].reportValidity()}}},pn={},$t={once:!0},fn=0,Nt=!1;function dn(t){return ln[t]||window["HTML"+t[0].toUpperCase()+t.slice(1)+"Element"]||(()=>{throw new Error('Constructor not found for tag "'+t+'"')})()}var mn=qt(/^\s*?\s*$|^\s*?\s*$/,{1:(t,e)=>({name:e[1]}),2:(t,e)=>({name:e[3],tag:e[2]}),catch:function(t,e){throw new SyntaxError(`dom element() – name must be of the form 'element-name' or 'tag is="element-name"' (`+e+")")}},null);function hn(t,e){if(t.hasOwnProperty(e)){let n=t[e];delete t[e],t[e]=n}return t}function gn(t,e,n){t._initialLoad=!0;let o=t.attachShadow({mode:e.mode||"closed",delegatesFocus:e.focusable||!1});if(n){let r=b("link",{rel:"stylesheet",href:n});o.append(r)}return t[A]=o,o}function wn(t){var e;if(t.attachInternals){if(e=t.attachInternals(),e.setFormValue)return e}else e={shadowRoot:t.shadowRoot};return e.input=b("input",{type:"hidden",name:t.name}),t.appendChild(e.input),e.setFormValue=function(n){this.input.value=n},e}function vn(t){t._initialAttributes={},t._n=0}function yn(t,e,n){let o=t._initialAttributes;for(;t._nfn?gn(p,e,o||e.stylesheet):void 0,c=a.formAssociated&&wn(p);return i&&(Nt=!0),e.construct&&e.construct.call(p,u,c),l&&(vn(p),Promise.resolve(1).then(function(){Xt(p,a.observedAttributes,l)})),f&&Object.keys(f).reduce(hn,p),p}return a.prototype=Object.create(s.prototype,f),f&&f.value&&(a.formAssociated=!0,Wt(a.prototype,an),(e.enable||e.disable)&&(a.prototype.formDisabledCallback=function(p){return p?e.disable&&e.disable.call(this,this[A],this[k]):e.enable&&e.enable.call(this,this[A],this[k])}),e.reset&&(a.prototype.formResetCallback=function(){return e.reset.call(this,this[A],this[k])}),e.restore&&(a.prototype.formStateRestoreCallback=function(){return e.restore.call(this,this[A],this[k])})),l&&(a.observedAttributes=Object.keys(l),a.prototype.attributeChangedCallback=function(p,u,c){if(!this._initialAttributes)return l[p].call(this,c);this._initialAttributes[p]=c,yn(this,a.observedAttributes,l)}),a.prototype.connectedCallback=function(){let p=this,u=p[A],c=p[k];if(p._initialAttributes&&Xt(p,a.observedAttributes,l),p._initialLoad){let E=u.querySelectorAll('link[rel="stylesheet"]');if(E.length){let ze=0,lt=E.length,Ht=function(Ue){++ze>=E.length&&(delete p._initialLoad,e.load&&(gt("element()","loaded",Array.from(E).map(Ve=>Ve.href).join(` +`)),e.load.call(p,u)))},_e=Ht;for(;lt--;)E[lt].addEventListener("load",Ht,$t),E[lt].addEventListener("error",_e,$t);e.connect&&e.connect.call(this,u,c)}else e.connect&&e.connect.call(this,u,c),e.load&&e.load.call(this,u,c)}else e.connect&&e.connect.call(this,u,c)},e.disconnect&&(a.prototype.disconnectedCallback=function(){return e.disconnect.call(this,this[A],this[k])}),gt("element()","<"+(i?i+" is="+r:r)+">"),window.customElements.define(r,a,i&&{extends:i}),i&&!Nt&&document.querySelectorAll('[is="'+r+'"]').forEach(p=>{Wt(p,f),e.construct&&e.construct.apply(p);let u;for(u in l){let c=p.attributes[u];c&&l[u].call(p,c.value)}e.connect&&e.connect.apply(p)}),a}function Kt(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object")return!1;let n=Object.keys(t),o=Object.keys(e),r=n.length;for(;r--;){if(t[n[r]]===void 0){if(e[n[r]]!==void 0)return!1}else if(!e.hasOwnProperty(n[r])||!Kt(t[n[r]],e[n[r]]))return!1;let i=o.indexOf(n[r]);i>-1&&o.splice(i,1)}for(r=o.length;r--;)if(e[o[r]]===void 0){if(t[o[r]]!==void 0)return!1}else return!1;return!0}var Zt=w(Kt,!0);function En(t,e){return e[t]}var D=w(En,!0);var Sn=Object.freeze;function Qt(){return this}var P=Sn({shift:v,push:v,forEach:v,join:function(){return""},map:Qt,filter:Qt,includes:function(){return!1},reduce:function(t,e){return e},length:0,each:v,pipe:S,start:v,stop:v,done:v,valueOf:function(){return null}});function vt(){return this}function yt(t){return t&&t[Symbol.iterator]}var Tn=Object.assign;function Ln(t){return t.stop?t.stop():t()}function kn(t){t.forEach(Ln),t.length=0}function B(){}Tn(B.prototype,{stop:function(){return this.stopables&&kn(this.stopables),this},done:function(e){return(this.stopables||(this.stopables=[])).push(e),this}});var Pn=Object.assign;function X(t){B.prototype.stop.apply(t);let e=-1,n;for(;n=t[++e];)t[e]=void 0,X(n)}function m(){}Pn(m.prototype,{pipe:function(t){return this[0]=t,t},stop:function(){return X(this[0]),this}});var F=Object.assign,O=Object.create;function z(t,e){e!==void 0&&t[0].push(e)}function Fn(t,e){if(t[1]){let n=-1;for(;t[++n]&&t[n]!==e;);for(;t[n++];)t[n-1]=t[n];X(e)}else t.stop()}function h(t){this.input=t}F(h.prototype,B.prototype,{push:function(t){z(this,t)},pipe:function(t){if(this[0])throw new Error("Stream: Attempt to .pipe() a unicast stream multiple times. Create a multicast stream with stream.broadcast().");return this[0]=t,this.input.pipe(this),t},map:function(t){return new Jt(this,t)},filter:function(t){return new te(this,t)},chunk:function(t){return new ne(this,t)},flatMap:function(t){return new ee(this,t)},take:function(t){return new oe(this,t)},each:function(t){return new se(this,t)},reduce:function(t,e){return new re(this,t,e)},scan:function(t,e){return new ie(this,t,e)},stop:function(){return Fn(this.input,this),this}});function Jt(t,e){this.input=t,this.fn=e}Jt.prototype=F(O(h.prototype),{push:function(e){let n=this.fn;z(this,n(e))}});function te(t,e){this.input=t,this.fn=e}te.prototype=F(O(h.prototype),{push:function(e){this.fn(e)&&z(this,e)}});function ee(t,e){this.input=t,this.fn=e}ee.prototype=F(O(h.prototype),{push:function(e){let o=this.fn(e);if(o!==void 0)if(yt(o))for(let r of o)z(this,r);else throw new Error("Stream: Cannot .flatMap() non-iterable values")}});function ne(t,e){this.input=t,this.chunk=[],typeof e=="number"?this.n=e:typeof e=="function"&&(this.fn=e)}ne.prototype=F(O(h.prototype),{fn:function(t){return t.length===this.n},push:function(e){let n=this.chunk;n.push(e),this.fn(n)&&(z(this,n),this.chunk=[])}});function oe(t,e){this.input=t,this.count=e}oe.prototype=F(O(h.prototype),{push:function(e){this[0].push(e),--this.count||this.stop()}});function re(t,e,n){return this.input=t,this.fn=e,this.value=n,this.i=0,t.pipe(this),n}re.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t,this.i++,this)}});function ie(t,e,n){this.input=t,this.fn=e,this.value=n}ie.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t),this[0].push(this.value)}});function se(t,e){this.input=t,this.push=e,t.pipe(this)}se.prototype=F(O(h.prototype),{each:null,reduce:null,pipe:null});var On=Array.prototype,An=Object.assign,Cn=Object.create;function _(t){this.buffer=t||[]}_.prototype=An(Cn(h.prototype),m.prototype,{push:function(t){t!==void 0&&this.buffer.push(t)},pipe:function(t){for(this[0]=t;this.buffer.length;)this[0].push(On.shift.apply(this.buffer));return this.buffer=this[0],t}});var In=Object.assign,jn=Object.create;function R(t,e){this.input=t,this.memory=!!(e&&e.memory),e&&e.hot&&this.pipe(P)}R.prototype=In(jn(h.prototype),{push:function(t){if(t!==void 0){this.memory&&(this.value=t);let e=-1;for(;this[++e];)this[e].push(t)}},pipe:function(t){let e=-1;for(;this[++e];);return this[e]=t,this.value!==void 0&&t.push(this.value),e===0&&this.input.pipe(this),t}});var Hn=Object.assign;function Y(t){this.promise=t}Hn(Y.prototype,m.prototype,{pipe:function(t){let e=this.promise;this[0]=t,e.then(n=>this[0].push(n)).finally(n=>this.stop())},stop:function(){m.prototype.stop.apply(this,arguments),this[0]=P}});var ue=Object.assign,le=Object.keys;function ce(t,e,n){let o=t.values,r=t.names,i=t[0];o[e]=n,(t.active||(t.active=le(o).length===r.length))&&i.push(ue({},o))}function K(t){this.inputs=t,this.active=!1}ue(K.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this.values={},this.names=le(e),this[0]=t;for(let n in e){let o=e[n];o.pipe?t.done(o.each(r=>ce(this,n,r))):o.then?o.then(r=>ce(this,n,r)):console.log("Todo: combine() raw values ?")}}});var Mn=Object.assign;function Z(t){this.inputs=t}Mn(Z.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this[0]=t;let n=-1,o;for(;o=e[++n];)if(o.pipe)o.pipe(t);else if(o.then)o.then(r=>t.push(r));else{let r=-1;for(;++r0}function Gn(t,e,n){return t[n]=e.shift(),t}function zn(t){return[]}function bt(t,e,n,o){n.push(o),e.every(Bn)&&t.push(e.reduce(Gn,{}))}function Q(t){this.inputs=t,this.buffers=xt.map.call(t,zn)}Dn(Q.prototype,m.prototype,{pipe:function(t){let e=this.inputs,n=this.buffers;this[0]=t,xt.forEach.call(e,(o,r)=>{let i=n[r];o.each?t.done(o.each(s=>bt(t,n,i,s))):o.then?o.then(s=>bt(t,n,i,s)):xt.forEach.call(o,s=>bt(t,n,i,s))})},stop:function(){let t=this.inputs,e=-1,n;for(;n=t[++e];)n.stop();return m.prototype.stop.apply(this,arguments)}});var _n=Array.prototype,ae=Object.assign;function Rn(t){throw new TypeError("Stream: invalid source object cannot be read into stream")}var g=ae(h,{of:function(){return new _(_n.slice.apply(arguments))},from:function(t){return t.pipe?new h(t):t.then?new h(new Y(t)):typeof t.length=="number"?new _(t):Rn(t)},broadcast:function(e){return new R(P,e)},combine:function(e){return new h(new K(e))},merge:function(){return new h(new Z(arguments))},zip:function(){return new h(new Q(arguments))}});ae(h.prototype,{log:vt,broadcast:function(t){return new R(this,t)}});var Un=Object.assign,Vn=/\s+/,pe={fullscreenchange:"fullscreenElement"in document?"fullscreenchange":"webkitFullscreenElement"in document?"webkitfullscreenchange":"fullscreenchange"};function fe(t){return t.which===1&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}var de=0;window.addEventListener("click",t=>de=t.timeStamp);function qn(t,e){return t.node.addEventListener(pe[e]||e,t,t.options),t}function Wn(t,e){return t.node.removeEventListener(pe[e]||e,t),t}function me(t,e,n){this.types=t.split(Vn),this.options=e,this.node=n,this.select=e&&e.select}Un(me.prototype,m.prototype,{pipe:function(t){this[0]=t,this.types.reduce(qn,this)},handleEvent:function(t){if(!(t.type==="click"&&t.timeStamp<=de)){if(this.select){let e=t.target.closest(this.select);if(!e)return;t.selectedTarget=e}this[0].push(t)}},stop:function(){this.types.reduce(Wn,this),m.prototype.stop.apply(this,arguments)}});function x(t,e){let n;return typeof t=="object"&&(n=t,t=n.type),new g(new me(t,n,e))}function Et(t){return typeof t}var $n=/^\s*([+-]?\d*\.?\d+)([^\s\d]*)\s*$/;function Nn(t,e){if(typeof e=="number")return e;var n=$n.exec(e);if(!n||!t[n[2]||""]){if(!t.catch)throw new Error('Cannot parse value "'+e+'" with provided units '+Object.keys(t).join(", "));return n?t.catch(parseFloat(n[1]),n[2]):t.catch(parseFloat(e))}return t[n[2]||""](parseFloat(n[1]))}var J=w(Nn);var Xn=/px$/,he={"transform:translateX":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[4])},"transform:translateY":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[5])},"transform:scale":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.sqrt(o*o+r*r)},"transform:rotate":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.atan2(r,o)}};function tt(t){return t.split("(")[1].split(")")[0].split(/\s*,\s*/)}function U(t,e){return window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):0}function et(t,e){if(he[t])return he[t](e);var n=U(t,e);return typeof n=="string"&&Xn.test(n)?parseFloat(n):n}var nt,ot;function Yn(){if(!nt){let t=document.documentElement.style.fontSize;document.documentElement.style.fontSize="100%",nt=et("font-size",document.documentElement),document.documentElement.style.fontSize=t||""}return nt}function Kn(){return ot||(ot=et("font-size",document.documentElement)),ot}window.addEventListener("resize",()=>{nt=void 0,ot=void 0});var C=y(Et,{number:S,string:J({em:function(t){return Yn()*t},px:function(t){return t},rem:function(t){return Kn()*t},vw:function(t){return window.innerWidth*t/100},vh:function(t){return window.innerHeight*t/100},vmin:function(t){return window.innerWidthn?o:n}n=nq.maxScrollInterval?q.maxScrollInterval:1.4*n}function it(){return ye}function xe(t){let e=T(t),n=window.getComputedStyle(t,null),o=C(n.getPropertyValue("padding-left")),r=C(n.getPropertyValue("padding-right"));return e.leftPadding=e.left+o,e.rightPadding=e.left+e.width-r,e.centrePadding=e.leftPadding+(e.width-o-r)/2,e}function Ee(t){let e=window.getComputedStyle(t,null).getPropertyValue("scroll-snap-align");return e.endsWith("start")?"left":e.endsWith("end")?"right":"centre"}function Se(t,e,n){let o=xe(t),r=T(e),i=Ee(e);t.scrollTo({top:t.scrollTop,left:t.scrollLeft+(i==="left"?r.left-o.leftPadding:i==="right"?r.right-o.rightPadding:r.left+r.width/2-o.centrePadding),behavior:n})}function Te(t,e){return Se(t,e,"smooth"),e}function I(t,e){return t.style.setProperty("scroll-behavior","auto","important"),Se(t,e,"auto"),t.style.setProperty("scroll-behavior",""),e}function Le(t,e){let{leftPadding:n,rightPadding:o,centrePadding:r}=xe(t),i=e.length,s;for(;s=e[--i];){let l=T(s);if(!l)continue;let f=Ee(s),a=l.width/2+(f==="left"?n:f==="right"?o:r);if((f==="left"?l.left:f==="right"?l.right:l.left+l.width/2)<=a)break}return s}function ke(t){return!!t.dataset.slideIndex}function Pe(t){let{scroller:e,elements:n,children:o}=t,r=Le(e,n);return ke(r)?o[r.dataset.slideIndex]:r}function Fe(t){let{scroller:e,children:n,elements:o}=t,r=Le(e,o),i;!r||(ke(r)?(i=n[r.dataset.slideIndex],I(e,i)):i=r,t.activations.push(i))}function to(t,e){t.style.setProperty("scroll-snap-type",""),e.stop()}var Oe=y((t,e)=>e.type,{pointerdown:function(t,e){return t.e0=e,t.x0=e.clientX,t.y0=e.clientY,t},pointermove:function(t,e){let n=e.clientX,o=e.clientY;if(!t.gesturing){if(Math.abs(n-t.x0)(clearTimeout(s),setTimeout(to,it()*1e3,n,a)))}return t.gesturing=!1,t.e0=void 0,t.x0=void 0,t.y0=void 0,t.pointers=void 0,t.scrollLeft0=void 0,t}});var eo=Object.assign,no={capture:!0,passive:!0};function oo(t,e){t.timer=void 0,t.stream.push(e);let n=t.times;n.length>1&&be(n),n.length=0}function Ae(t){this.element=t,this.times=[]}eo(Ae.prototype,m.prototype,{pipe:function(t){this.stream=t,this.element.addEventListener("scroll",this,no)},handleEvent:function(t){let e=t.timeStamp/1e3;this.times.push(e),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(oo,it()*1e3,this,t)},stop:function(){this.element.removeEventListener("scroll",this),m.prototype.stop.apply(this,arguments)}});function kt(t){return new g(new Ae(t))}function ro(t,e,n){let o=n.length,r=-1/0;for(;o--;){let a=T(n[o]),p=a.x+a.width;r=p>r?p:r}let i=T(e),s=getComputedStyle(t),l=C(s.paddingLeft||0),f=C(s.paddingRight||0);return l+f+r-i.x}function io(t,e,n){let o=ro(t,e,n);t.style.setProperty("--scroll-width",o+"px")}function so(t){return!t.dataset.slideIndex}var Ce={construct:function(t){let e=b("slot",{part:"slides"}),n=b("div",{class:"scroller",children:[e]}),o=b("nav",{part:"controls",children:[b("slot",{name:"controls"})]});t.append(n,o);let r=g.of().broadcast({memory:!0}),i=g.combine({host:r,elements:x("slotchange",e).map(c=>u.elements=e.assignedElements())}).broadcast({memory:!0}),s=i.map(c=>{let E=c.elements.filter(so);return Zt(u.children,E)?void 0:u.children=E}).broadcast({memory:!0,hot:!0}),l=g.of(),f=g.of(),a=f.map(c=>c.dataset.slideIndex?u.children[c.dataset.slideIndex]:c).filter(c=>u.active!==c&&Lt("slide-active",c)).map(c=>u.active=c).broadcast({memory:!0,hot:!0}),p=x("click",t).filter(fe).broadcast(),u=this[d]={clickSuppressTime:-1/0,host:this,style:window.getComputedStyle(this),elements:P,children:P,scroller:n,slides:e,controls:o,load:r,views:l,activations:f,actives:a,slotchanges:i,mutations:s,clicks:p};g.merge(i,x("resize",window)).each(c=>io(n,e,u.elements)),i.map(c=>c.elements.includes(u.active)?u.active:u.children[0]).map(c=>I(n,c)).pipe(f),g.combine({host:r,child:l}).map(c=>u.elements.includes(c.child)&&u.active!==c.child?c.child:void 0).map(c=>u.active?Te(n,c):I(n,c)).pipe(f),kt(n).filter(()=>!u.gesturing).each(c=>Fe(u)),Tt({threshold:"0.25rem",device:"mouse"},t).filter(()=>u.children.length>1).each(c=>{u.pointers=c,c.reduce(Oe,u)}),p.each(c=>{c.timeStamp-u.clickSuppressTime<120&&(c.preventDefault(),c.stopPropagation())}),x("fullscreenchange",window).each(c=>{(c.target===this||c.target.contains(this))&&I(n,u.active)}),x("focusin",this).map(c=>u.children.indexOf(c.target)!==-1?c.target:u.children.find(E=>E.contains(c.target))).pipe(l),x("keydown",this).filter(()=>document.activeElement===this||this.contains(document.activeElement)).map(y(D("keyCode"),{37:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)-1]),39:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)+1]),default:v})).pipe(l)},load:function(t){this[d].load.push(this)}};function st(t,e){function n(o,r){if(t.getState(o)!==r)return t[r?"enable":"disable"](o)}return{attribute:function(o){return n(this,o!==null)},set:function(o){return n(this,!!o)},get:function(){return t.getState(this)}}}function Pt(t,e){t.remove&&t.remove(e);let n;for(;(n=t.indexOf(e))!==-1;)t.splice(n,1);return e}var as=w(Pt,!0);var co=Object.assign;function W(t,e){this.element=t,this.definitions=e,this.tokens=[]}co(W.prototype,{contains:function(t){return this.tokens.includes(t)},add:function(){let t=arguments.length;for(;t--;){let e=arguments[t];!this.tokens.includes(e)&&this.definitions[e]&&(this.definitions[e].enable(this.element),this.tokens.push(e))}},remove:function(){let t=arguments.length;for(;t--;){let e=arguments[t];this.tokens.includes(e)&&(this.definitions[e].disable(this.element),Pt(this.tokens,e))}},supports:function(t){return!!this.definitions[t]}});var uo=Array.prototype;function lo(t,e){let n=t.tokens.slice(),o=uo.slice.apply(e),r=n.length;for(;r--;)o.includes(n[r])&&n.splice(r,1);t.remove.apply(t,n),t.add.apply(t,o)}function Ft(t){let e=Symbol("TokenList");function n(o,r){let i=o[e]||(o[e]=new W(o,t));lo(i,r.trim().split(/\s+/))}return{attribute:function(o){n(this,o||"")},set:function(o){n(this,o+"")},get:function(){return this[e]||(this[e]=new W(this,t))}}}var Ot={};G(Ot,{disable:()=>ho,enable:()=>mo,getState:()=>go});var ao=J({s:S,ms:t=>t/1e3});function po(t){let{active:e,children:n,elements:o,host:r}=t,i=o.indexOf(e),s=o[i+1]||n[0];t.autoplay.timer=null,!!s&&(r.active=s)}function fo(t){let{active:e,style:n}=t,o=ao(window.getComputedStyle(e).getPropertyValue("--slide-duration")||n.getPropertyValue("--slide-duration"));clearTimeout(t.autoplay.timer),t.autoplay.timer=setTimeout(po,o*1e3,t)}function Ie(t){clearTimeout(t.autoplay.timer),t.autoplay.timer=null}function mo(t){let e=t[d],{actives:n}=e,o=e.autoplay={},r=g.merge([!1],x("pointerenter pointerleave",t).map(s=>s.type==="pointerenter")),i=g.merge([t.contains(document.activeElement)],x("focusin focusout",t).map(y(D("type"),{focusin:s=>!0,focusout:s=>t.contains(s.relatedTarget)}))).map((s=>l=>s===l?void 0:s=l)());o.updates=g.combine({active:n,hover:r,focus:i}).each(s=>s.hover||s.focus?Ie(e):fo(e))}function ho(t){let e=t[d];Ie(e),e.autoplay.updates.stop(),e.autoplay=void 0}function go(t){return!!t[d].autoplay}var At={};G(At,{disable:()=>yo,enable:()=>vo,getState:()=>bo});function je(t,e){let n=t.cloneNode(!0);return n.dataset.slideIndex=e,n.removeAttribute("id"),n.setAttribute("aria-hidden","true"),n.tabIndex="-1",n}function wo(t){let{active:e,children:n,host:o,scroller:r}=t;if(t.loop.prepends&&(t.loop.prepends.forEach(c=>c.remove()),t.loop.appends.forEach(c=>c.remove()),t.loop.prepends=void 0,t.loop.appends=void 0),n.length<2){t.elements=t.slides.assignedElements();return}let i=o.clientWidth,s=n.map(T),l=s[1].left,f=s[s.length-2].right,a=1;for(;s[++a]&&s[a].leftf-i;);let u=n.slice(++a).map((c,E)=>je(c,a+E));o.prepend.apply(o,u),o.append.apply(o,p),t.loop.prepends=u,t.loop.appends=p,t.elements=t.slides.assignedElements(),I(r,e||n[0])}function vo(t){let e=t[d],{mutations:n}=e,o=e.loop={};o.renders=n.each(r=>wo(e))}function yo(t){let e=t[d];e.loop&&(e.loop.prepends&&e.loop.prepends.forEach(n=>n.remove()),e.loop.appends&&e.loop.appends.forEach(n=>n.remove()),e.loop.renders.stop(),e.loop=void 0)}function bo(t){return!!t[d].loop}var Ct={};G(Ct,{disable:()=>Eo,enable:()=>xo,getState:()=>So});function j(t){if(typeof t!="object"||arguments.length>1)throw new Error("delegate() now takes an object of selector:fn pairs.");let e=Object.keys(t);return function(o){let r=o.target,i=-1;for(;e[++i];){let s=r.closest(e[i]);if(s)return t[e[i]](s,...arguments)}}}function He(t,e,n,o){o===0?t.hidden=!0:t.hidden=!1,o===n.length-1?e.hidden=!0:e.hidden=!1}function xo(t){let e=t[d],{actives:n,clicks:o,slotchanges:r}=e,i=e.navigation={prev:b("button",{part:"prev-button",type:"button",name:"navigation",value:"-1",html:"Previous"}),next:b("button",{part:"next-button",type:"button",name:"navigation",value:"1",html:"Next"})};e.controls.prepend(i.prev,i.next),i.updates=g.combine({active:n,changes:r}).each(s=>He(i.prev,i.next,s.changes.elements,s.changes.elements.indexOf(s.active))),i.clicks=o.each(j({'[name="navigation"]':function(s,l){let f=parseFloat(s.value),a=e.elements.indexOf(e.active)+f,p=e.elements[a];!p||(t.active=p,He(i.prev,i.next,e.elements,a))}}))}function Eo(t){let e=t[d];e.navigation.prev.remove(),e.navigation.next.remove(),e.navigation.updates.stop(),e.navigation.clicks.stop(),e.navigation=void 0}function So(t){return!!t[d].navigation}var It={};G(It,{disable:()=>ko,enable:()=>Lo,getState:()=>Po});function Me(t,e,n){let{active:o,buttons:r,index:i}=t;if(o===n)return;i>-1&&(t.activeSpan.remove(),r.children[i].part.remove("page-button-active"));let s=e.indexOf(n);s!==-1&&(r.children[s].part.add("page-button-active"),r.children[s].append(t.activeSpan),t.index=s,t.active=n)}function To(t,e,n,o){return e.buttons&&(e.buttons.remove(),e.buttons=void 0),o.length<2||(e.buttons=b("div",{part:"pagination",children:o.map((r,i)=>b("button",{part:"page-button",type:"button",name:"pagination",value:i}))}),t.append(e.buttons)),o.length}function Lo(t){let e=t[d],{shadow:n,actives:o,clicks:r,mutations:i}=e,s=e.pagination={activeSpan:b("span",{class:"invisible",text:"(Current slide)"})};s.mutations=i.each(()=>To(e.controls,s,n,e.children)),s.updates=g.combine({active:o,children:i}).filter(l=>l.children.length>1).each(l=>Me(s,e.children,e.active)),s.clicks=r.each(j({'[name="pagination"]':function(l,f){let{host:a}=e,p=e.children,u=p[l.value];!u||(a.active=u,Me(s,p,u))}}))}function ko(t){let e=t[d];e.pagination.buttons.remove(),e.pagination.mutations.stop(),e.pagination.updates.stop(),e.pagination.clicks.stop(),e.pagination=void 0}function Po(t){return!!t[d].pagination}var jt={};G(jt,{disable:()=>Oo,enable:()=>Fo,getState:()=>Ao});var De=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled;function ct(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement}function Be(t){return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():void 0}function ut(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}function Fo(t){let e=t[d];if(!De)return;let n=e.fullscreen={button:b("button",{part:"fullscreen-button",type:"button",name:"fullscreen",html:"Open in fullscreen"})};e.controls.append(n.button),n.changes=x("fullscreenchange",t).filter(o=>ct()===t).each(o=>{n.button.part.add("fullscreen-button-active"),n.button.innerHTML="Close fullscreen",document.activeElement!==t&&(n.tabIndex=t.tabIndex,t.tabIndex<0&&(t.tabIndex=0),t.focus());let r=x("fullscreenchange",t).each(i=>{n.button.part.remove("fullscreen-button-active"),n.button.innerHTML="Open in fullscreen",t.tabIndex=n.tabIndex,n.tabIndex=void 0,r.stop()})}),n.clicks=e.clicks.each(j({'[name="fullscreen"]':(o,r)=>{let i=ct();if(i===t){ut();return}i&&ut(),Be(t)}}))}function Oo(t){let e=t[d];ct()===t&&ut(),e.fullscreen.button.remove(),e.fullscreen.clicks.stop(),e.fullscreen.changes.stop(),e.fullscreen=void 0}function Ao(t){return!!t[d].fullscreen}var Ge={active:{attribute:function(t){this.active=t},set:function(t){let e=this[d],n=typeof t=="object"?t:/^\d/.test(t+"")?this.querySelector("#\\3"+(t+"")[0]+" "+(t+"").slice(1)):/^\#/.test(t+"")?this.querySelector(t):this.querySelector("#"+t);e.views.push(n)},get:function(){return this[d].active}},autoplay:st(Ot,"autoplay"),controls:Ft({navigation:Ct,pagination:It,fullscreen:jt}),loop:st(At,"loop")};var Co=import.meta.url.replace(/\/[^\/]*\.js/,"/slide-show-shadow.css"),Js=wt('
',Ce,Ge,Co);export{Js as default}; diff --git a/build/slide-show-ol.js b/build/slide-show-ol.js index a00f74b..6c01c96 100644 --- a/build/slide-show-ol.js +++ b/build/slide-show-ol.js @@ -1,7 +1,7 @@ /* slide-show 1.1.5 By Stephen Band - Built 2022-05-16 23:59 */ + Built 2022-05-18 15:08 */ -var qe=Object.defineProperty;var Mt=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var Dt=(t,e)=>{var n={};for(var o in t)We.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&Mt)for(var o of Mt(t))e.indexOf(o)<0&&$e.call(t,o)&&(n[o]=t[o]);return n};var G=(t,e)=>{for(var n in e)qe(t,n,{get:e[n],enumerable:!0})};function $(t){var e=new Map;return function(o){if(e.has(o))return e.get(o);var r=t(o);return e.set(o,r),r}}var Ne=Array.prototype;function Xe(t,e){return typeof t=="function"?t.apply(null,e):t}function Bt(t,e,n){n=n||t.length;var o=n===1?e?t:$(t):$(function(r){return Bt(function(){var i=[r];return i.push.apply(i,arguments),t.apply(null,i)},e,n-1)});return function r(i){return arguments.length===0?r:arguments.length===1?o(i):arguments.length>=n?t.apply(null,arguments):Xe(o(i),Ne.slice.call(arguments,1))}}var w=Bt;function Ye(t,e){return 1-Math.pow(1-e,t)}var Gt=w(Ye);function v(){}function at(t,e){return e(t)}function S(t){return t}var Ke=Array.prototype;function pt(){let t=arguments;return t.length?e=>Ke.reduce.call(t,at,e):S}function ft(t,e,n){return n*(e-t)+t}var Ze=window.performance,zt=window.requestAnimationFrame,Qe=window.cancelAnimationFrame;function dt(t,e,n){var o=Ze.now();function r(s){var u=(s-o)/(t*1e3);u<1?(u>0&&e(u),i=zt(r)):(e(1),n&&n())}var i=zt(r);return function(){Qe(i)}}function N(t,e,n,o,r,i){let s=o[n];return dt(t,pt(e,u=>ft(s,r,u),u=>o[n]=u),i)}function Je(){return{x:0,y:0,left:0,top:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}}function T(t){return t===window?Je():t.getClientRects()[0]||t.getBoundingClientRect()}var I={scrollDuration:.3,scrollDurationPerHeight:.125,scrollTransform:Gt(3)},_t=v;function tn(t,e){if(e.behavior==="smooth"){let n=t.style.getPropertyValue("scroll-snap-type"),o=()=>t.style.setProperty("scroll-snap-type",n);if(t.style.setProperty("scroll-snap-type","none"),e.left!==void 0){let r=t===document.body?window.innerWidth:T(t).width,i=I.scrollDuration+I.scrollDurationPerHeight*Math.abs(e.left-t.scrollLeft)/r;_t=N(i,I.scrollTransform,"scrollLeft",t,e.left,o)}else{let r=t===document.body?window.innerHeight:T(t).height,i=I.scrollDuration+I.scrollDurationPerHeight*Math.abs(e.top-t.scrollTop)/r;_t=N(i,I.scrollTransform,"scrollTop",t,e.top,o)}}else e.left!==void 0&&(t.scrollLeft=e.left),e.top!==void 0&&(t.scrollTop=e.top)}if(!("scrollBehavior"in document.documentElement.style)){console.log("Polyfilling Element.scrollTo(options).");let t="scrollTo"in Element.prototype?Element:HTMLElement,e=t.scrollIntoView;t.prototype.scrollTo=function(n){typeof n=="object"?tn(this,n):e.apply(this,arguments)}}function y(t,e){return function(){let o=t.apply(this,arguments),r=e[o]||e.default;if(!r)throw new Error('overload() no handler for "'+o+'"');return r.apply(this,arguments)}}var en=y(S,{is:v,tag:v,html:function(t,e,n){e.innerHTML=n},text:function(t,e,n){e.textContent=n},children:function(t,e,n){e.innerHTML="",n.forEach(o=>{e.appendChild(o)})},points:j,cx:j,cy:j,r:j,preserveAspectRatio:j,viewBox:j,default:function(t,e,n){t in e?e[t]=n:e.setAttribute(t,n)}});function j(t,e,n){e.setAttribute(t,n)}function nn(t,e){for(var n=Object.keys(e),o=n.length;o--;)en(n[o],t,e[n[o]]);return t}var mt=w(nn,!0);var on="http://www.w3.org/2000/svg",Rt=document.createElement("div");var Ut=(t,e)=>e&&typeof e;function Vt(t,e){let n=document.createRange();return n.selectNode(t),n.createContextualFragment(e)}function L(t,e){var n=document.createElementNS(on,t);return e&&(n.innerHTML=e),n}var rn=y(S,{comment:function(t,e){return document.createComment(e||"")},fragment:y(Ut,{string:function(t,e,n){if(n)return Vt(n,e);let o=document.createDocumentFragment();Rt.innerHTML=e;let r=Rt.childNodes;for(;r[0];)o.appendChild(r[0]);return o},object:function(t,e,n){let o=n?Vt(n):document.createDocumentFragment();return typeof e.length=="number"?o.append.apply(o,e):mt(o,e),o},default:()=>document.createDocumentFragment()}),text:function(t,e){return document.createTextNode(e||"")},circle:L,ellipse:L,g:L,glyph:L,image:L,line:L,rect:L,use:L,path:L,pattern:L,polygon:L,polyline:L,svg:L,default:y(Ut,{string:function(t,e){let n=document.createElement(t);return n.innerHTML=e,n},object:function(t,e){let n=document.createElement(t);return typeof e.length=="number"?n.append.apply(n,e):mt(n,e),n},default:t=>{if(typeof t!="string")throw new Error('create(tag, content) accepts only a string as tag "'+typeof t+'"');return document.createElement(t)}})}),b=rn;function ht(t,e,n){let o;typeof n!="string"&&n.input!==void 0&&n.index!==void 0&&(o=n,n=o.input.slice(n.index+n[0].length+(n.consumed||0)));let r=t.exec(n);if(!r)return;let i=e(r);return o&&(o.consumed=(o.consumed||0)+r.index+r[0].length+(r.consumed||0)),i}var fr=w(ht,!0);function sn(t,e,n){throw n.input!==void 0&&n.index!==void 0&&(n=n.input),new Error('Cannot parse string "'+n+'"')}function cn(t,e,n){let o=-1;for(;++ocn(e,n,i),o);return r===void 0?e.catch?e.catch(n,o):sn(t,e,o):r}var qt=w(un,!0);var gt=v;var k=Symbol("internals"),O=Symbol("shadow"),Wt=Object.defineProperties,ln={a:HTMLAnchorElement,dl:HTMLDListElement,p:HTMLParagraphElement,br:HTMLBRElement,fieldset:HTMLFieldSetElement,hr:HTMLHRElement,img:HTMLImageElement,li:HTMLLIElement,ol:HTMLOListElement,optgroup:HTMLOptGroupElement,q:HTMLQuoteElement,textarea:HTMLTextAreaElement,td:HTMLTableCellElement,th:HTMLTableCellElement,tr:HTMLTableRowElement,tbody:HTMLTableSectionElement,thead:HTMLTableSectionElement,tfoot:HTMLTableSectionElement,ul:HTMLUListElement},an={name:{set:function(t){return this.setAttribute("name",t)},get:function(){return this.getAttribute("name")||""}},form:{get:function(){return this[k].form}},labels:{get:function(){return this[k].labels}},validity:{get:function(){return this[k].validity}},validationMessage:{get:function(){return this[k].validationMessage}},willValidate:{get:function(){return this[k].willValidate}},checkValidity:{value:function(){return this[k].checkValidity()}},reportValidity:{value:function(){return this[k].reportValidity()}}},pn={},$t={once:!0},fn=0,Nt=!1;function dn(t){return ln[t]||window["HTML"+t[0].toUpperCase()+t.slice(1)+"Element"]||(()=>{throw new Error('Constructor not found for tag "'+t+'"')})()}var mn=qt(/^\s*?\s*$|^\s*?\s*$/,{1:(t,e)=>({name:e[1]}),2:(t,e)=>({name:e[3],tag:e[2]}),catch:function(t,e){throw new SyntaxError(`dom element() – name must be of the form 'element-name' or 'tag is="element-name"' (`+e+")")}},null);function hn(t,e){if(t.hasOwnProperty(e)){let n=t[e];delete t[e],t[e]=n}return t}function gn(t,e,n){t._initialLoad=!0;let o=t.attachShadow({mode:e.mode||"closed",delegatesFocus:e.focusable||!1});if(n){let r=b("link",{rel:"stylesheet",href:n});o.append(r)}return t[O]=o,o}function wn(t){var e;if(t.attachInternals){if(e=t.attachInternals(),e.setFormValue)return e}else e={shadowRoot:t.shadowRoot};return e.input=b("input",{type:"hidden",name:t.name}),t.appendChild(e.input),e.setFormValue=function(n){this.input.value=n},e}function vn(t){t._initialAttributes={},t._n=0}function yn(t,e,n){let o=t._initialAttributes;for(;t._nfn?gn(p,e,o||e.stylesheet):void 0,c=l.formAssociated&&wn(p);return i&&(Nt=!0),e.construct&&e.construct.call(p,a,c),u&&(vn(p),Promise.resolve(1).then(function(){Xt(p,l.observedAttributes,u)})),f&&Object.keys(f).reduce(hn,p),p}return l.prototype=Object.create(s.prototype,f),f&&f.value&&(l.formAssociated=!0,Wt(l.prototype,an),(e.enable||e.disable)&&(l.prototype.formDisabledCallback=function(p){return p?e.disable&&e.disable.call(this,this[O],this[k]):e.enable&&e.enable.call(this,this[O],this[k])}),e.reset&&(l.prototype.formResetCallback=function(){return e.reset.call(this,this[O],this[k])}),e.restore&&(l.prototype.formStateRestoreCallback=function(){return e.restore.call(this,this[O],this[k])})),u&&(l.observedAttributes=Object.keys(u),l.prototype.attributeChangedCallback=function(p,a,c){if(!this._initialAttributes)return u[p].call(this,c);this._initialAttributes[p]=c,yn(this,l.observedAttributes,u)}),l.prototype.connectedCallback=function(){let p=this,a=p[O],c=p[k];if(p._initialAttributes&&Xt(p,l.observedAttributes,u),p._initialLoad){let E=a.querySelectorAll('link[rel="stylesheet"]');if(E.length){let ze=0,lt=E.length,Ht=function(Ue){++ze>=E.length&&(delete p._initialLoad,e.load&&(gt("element()","loaded",Array.from(E).map(Ve=>Ve.href).join(` -`)),e.load.call(p,a)))},_e=Ht;for(;lt--;)E[lt].addEventListener("load",Ht,$t),E[lt].addEventListener("error",_e,$t);e.connect&&e.connect.call(this,a,c)}else e.connect&&e.connect.call(this,a,c),e.load&&e.load.call(this,a,c)}else e.connect&&e.connect.call(this,a,c)},e.disconnect&&(l.prototype.disconnectedCallback=function(){return e.disconnect.call(this,this[O],this[k])}),gt("element()","<"+(i?i+" is="+r:r)+">"),window.customElements.define(r,l,i&&{extends:i}),i&&!Nt&&document.querySelectorAll('[is="'+r+'"]').forEach(p=>{Wt(p,f),e.construct&&e.construct.apply(p);let a;for(a in u){let c=p.attributes[a];c&&u[a].call(p,c.value)}e.connect&&e.connect.apply(p)}),l}function Kt(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object")return!1;let n=Object.keys(t),o=Object.keys(e),r=n.length;for(;r--;){if(t[n[r]]===void 0){if(e[n[r]]!==void 0)return!1}else if(!e.hasOwnProperty(n[r])||!Kt(t[n[r]],e[n[r]]))return!1;let i=o.indexOf(n[r]);i>-1&&o.splice(i,1)}for(r=o.length;r--;)if(e[o[r]]===void 0){if(t[o[r]]!==void 0)return!1}else return!1;return!0}var Zt=w(Kt,!0);function En(t,e){return e[t]}var H=w(En,!0);var Sn=Object.freeze;function Qt(){return this}var M=Sn({shift:v,push:v,forEach:v,join:function(){return""},map:Qt,filter:Qt,reduce:function(t,e){return e},length:0,each:v,pipe:S,start:v,stop:v,done:v,valueOf:function(){return null}});function vt(){return this}function yt(t){return t&&t[Symbol.iterator]}var Tn=Object.assign;function Ln(t){return t.stop?t.stop():t()}function kn(t){t.forEach(Ln),t.length=0}function D(){}Tn(D.prototype,{stop:function(){return this.stopables&&kn(this.stopables),this},done:function(e){return(this.stopables||(this.stopables=[])).push(e),this}});var Pn=Object.assign;function X(t){D.prototype.stop.apply(t);let e=-1,n;for(;n=t[++e];)t[e]=void 0,X(n)}function m(){}Pn(m.prototype,{pipe:function(t){return this[0]=t,t},stop:function(){return X(this[0]),this}});var P=Object.assign,F=Object.create;function z(t,e){e!==void 0&&t[0].push(e)}function Fn(t,e){if(t[1]){let n=-1;for(;t[++n]&&t[n]!==e;);for(;t[n++];)t[n-1]=t[n];X(e)}else t.stop()}function h(t){this.input=t}P(h.prototype,D.prototype,{push:function(t){z(this,t)},pipe:function(t){if(this[0])throw new Error("Stream: Attempt to .pipe() a unicast stream multiple times. Create a multicast stream with stream.broadcast().");return this[0]=t,this.input.pipe(this),t},map:function(t){return new Jt(this,t)},filter:function(t){return new te(this,t)},chunk:function(t){return new ne(this,t)},flatMap:function(t){return new ee(this,t)},take:function(t){return new oe(this,t)},each:function(t){return new se(this,t)},reduce:function(t,e){return new re(this,t,e)},scan:function(t,e){return new ie(this,t,e)},stop:function(){return Fn(this.input,this),this}});function Jt(t,e){this.input=t,this.fn=e}Jt.prototype=P(F(h.prototype),{push:function(e){let n=this.fn;z(this,n(e))}});function te(t,e){this.input=t,this.fn=e}te.prototype=P(F(h.prototype),{push:function(e){this.fn(e)&&z(this,e)}});function ee(t,e){this.input=t,this.fn=e}ee.prototype=P(F(h.prototype),{push:function(e){let o=this.fn(e);if(o!==void 0)if(yt(o))for(let r of o)z(this,r);else throw new Error("Stream: Cannot .flatMap() non-iterable values")}});function ne(t,e){this.input=t,this.chunk=[],typeof e=="number"?this.n=e:typeof e=="function"&&(this.fn=e)}ne.prototype=P(F(h.prototype),{fn:function(t){return t.length===this.n},push:function(e){let n=this.chunk;n.push(e),this.fn(n)&&(z(this,n),this.chunk=[])}});function oe(t,e){this.input=t,this.count=e}oe.prototype=P(F(h.prototype),{push:function(e){this[0].push(e),--this.count||this.stop()}});function re(t,e,n){return this.input=t,this.fn=e,this.value=n,this.i=0,t.pipe(this),n}re.prototype=P(F(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t,this.i++,this)}});function ie(t,e,n){this.input=t,this.fn=e,this.value=n}ie.prototype=P(F(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t),this[0].push(this.value)}});function se(t,e){this.input=t,this.push=e,t.pipe(this)}se.prototype=P(F(h.prototype),{each:null,reduce:null,pipe:null});var On=Array.prototype,An=Object.assign,Cn=Object.create;function _(t){this.buffer=t||[]}_.prototype=An(Cn(h.prototype),m.prototype,{push:function(t){t!==void 0&&this.buffer.push(t)},pipe:function(t){for(this[0]=t;this.buffer.length;)this[0].push(On.shift.apply(this.buffer));return this.buffer=this[0],t}});var In=Object.assign,jn=Object.create;function R(t,e){this.input=t,this.memory=!!(e&&e.memory),e&&e.hot&&this.pipe(M)}R.prototype=In(jn(h.prototype),{push:function(t){if(t!==void 0){this.memory&&(this.value=t);let e=-1;for(;this[++e];)this[e].push(t)}},pipe:function(t){let e=-1;for(;this[++e];);return this[e]=t,this.value!==void 0&&t.push(this.value),e===0&&this.input.pipe(this),t}});var Hn=Object.assign;function Y(t){this.promise=t}Hn(Y.prototype,m.prototype,{pipe:function(t){let e=this.promise;this[0]=t,e.then(n=>this[0].push(n)).finally(n=>this.stop())},stop:function(){m.prototype.stop.apply(this,arguments),this[0]=M}});var ue=Object.assign,le=Object.keys;function ce(t,e,n){let o=t.values,r=t.names,i=t[0];o[e]=n,(t.active||(t.active=le(o).length===r.length))&&i.push(ue({},o))}function K(t){this.inputs=t,this.active=!1}ue(K.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this.values={},this.names=le(e),this[0]=t;for(let n in e){let o=e[n];o.pipe?t.done(o.each(r=>ce(this,n,r))):o.then?o.then(r=>ce(this,n,r)):console.log("Todo: combine() raw values ?")}}});var Mn=Object.assign;function Z(t){this.inputs=t}Mn(Z.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this[0]=t;let n=-1,o;for(;o=e[++n];)if(o.pipe)o.pipe(t);else if(o.then)o.then(r=>t.push(r));else{let r=-1;for(;++r0}function Gn(t,e,n){return t[n]=e.shift(),t}function zn(t){return[]}function bt(t,e,n,o){n.push(o),e.every(Bn)&&t.push(e.reduce(Gn,{}))}function Q(t){this.inputs=t,this.buffers=xt.map.call(t,zn)}Dn(Q.prototype,m.prototype,{pipe:function(t){let e=this.inputs,n=this.buffers;this[0]=t,xt.forEach.call(e,(o,r)=>{let i=n[r];o.each?t.done(o.each(s=>bt(t,n,i,s))):o.then?o.then(s=>bt(t,n,i,s)):xt.forEach.call(o,s=>bt(t,n,i,s))})},stop:function(){let t=this.inputs,e=-1,n;for(;n=t[++e];)n.stop();return m.prototype.stop.apply(this,arguments)}});var _n=Array.prototype,ae=Object.assign;function Rn(t){throw new TypeError("Stream: invalid source object cannot be read into stream")}var g=ae(h,{of:function(){return new _(_n.slice.apply(arguments))},from:function(t){return t.pipe?new h(t):t.then?new h(new Y(t)):typeof t.length=="number"?new _(t):Rn(t)},broadcast:function(e){return new R(M,e)},combine:function(e){return new h(new K(e))},merge:function(){return new h(new Z(arguments))},zip:function(){return new h(new Q(arguments))}});ae(h.prototype,{log:vt,broadcast:function(t){return new R(this,t)}});var Un=Object.assign,Vn=/\s+/,pe={fullscreenchange:"fullscreenElement"in document?"fullscreenchange":"webkitFullscreenElement"in document?"webkitfullscreenchange":"fullscreenchange"};function fe(t){return t.which===1&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}var de=0;window.addEventListener("click",t=>de=t.timeStamp);function qn(t,e){return t.node.addEventListener(pe[e]||e,t,t.options),t}function Wn(t,e){return t.node.removeEventListener(pe[e]||e,t),t}function me(t,e,n){this.types=t.split(Vn),this.options=e,this.node=n,this.select=e&&e.select}Un(me.prototype,m.prototype,{pipe:function(t){this[0]=t,this.types.reduce(qn,this)},handleEvent:function(t){if(!(t.type==="click"&&t.timeStamp<=de)){if(this.select){let e=t.target.closest(this.select);if(!e)return;t.selectedTarget=e}this[0].push(t)}},stop:function(){this.types.reduce(Wn,this),m.prototype.stop.apply(this,arguments)}});function x(t,e){let n;return typeof t=="object"&&(n=t,t=n.type),new g(new me(t,n,e))}function Et(t){return typeof t}var $n=/^\s*([+-]?\d*\.?\d+)([^\s\d]*)\s*$/;function Nn(t,e){if(typeof e=="number")return e;var n=$n.exec(e);if(!n||!t[n[2]||""]){if(!t.catch)throw new Error('Cannot parse value "'+e+'" with provided units '+Object.keys(t).join(", "));return n?t.catch(parseFloat(n[1]),n[2]):t.catch(parseFloat(e))}return t[n[2]||""](parseFloat(n[1]))}var J=w(Nn);var Xn=/px$/,he={"transform:translateX":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[4])},"transform:translateY":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[5])},"transform:scale":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.sqrt(o*o+r*r)},"transform:rotate":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.atan2(r,o)}};function tt(t){return t.split("(")[1].split(")")[0].split(/\s*,\s*/)}function U(t,e){return window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):0}function et(t,e){if(he[t])return he[t](e);var n=U(t,e);return typeof n=="string"&&Xn.test(n)?parseFloat(n):n}var nt,ot;function Yn(){if(!nt){let t=document.documentElement.style.fontSize;document.documentElement.style.fontSize="100%",nt=et("font-size",document.documentElement),document.documentElement.style.fontSize=t||""}return nt}function Kn(){return ot||(ot=et("font-size",document.documentElement)),ot}window.addEventListener("resize",()=>{nt=void 0,ot=void 0});var A=y(Et,{number:S,string:J({em:function(t){return Yn()*t},px:function(t){return t},rem:function(t){return Kn()*t},vw:function(t){return window.innerWidth*t/100},vh:function(t){return window.innerHeight*t/100},vmin:function(t){return window.innerWidthn?o:n}n=nq.maxScrollInterval?q.maxScrollInterval:1.4*n}function it(){return ye}function xe(t){let e=T(t),n=window.getComputedStyle(t,null),o=A(n.getPropertyValue("padding-left")),r=A(n.getPropertyValue("padding-right"));return e.leftPadding=e.left+o,e.rightPadding=e.left+e.width-r,e.centrePadding=e.leftPadding+(e.width-o-r)/2,e}function Ee(t){let e=window.getComputedStyle(t,null).getPropertyValue("scroll-snap-align");return e.endsWith("start")?"left":e.endsWith("end")?"right":"centre"}function Se(t,e,n){let o=xe(t),r=T(e),i=Ee(e);t.scrollTo({top:t.scrollTop,left:t.scrollLeft+(i==="left"?r.left-o.leftPadding:i==="right"?r.right-o.rightPadding:r.left+r.width/2-o.centrePadding),behavior:n})}function Te(t,e){return Se(t,e,"smooth"),e}function B(t,e){return t.style.setProperty("scroll-behavior","auto","important"),Se(t,e,"auto"),t.style.setProperty("scroll-behavior",""),e}function Le(t,e){let{leftPadding:n,rightPadding:o,centrePadding:r}=xe(t),i=e.length,s;for(;s=e[--i];){let u=T(s);if(!u)continue;let f=Ee(s),l=u.width/2+(f==="left"?n:f==="right"?o:r);if((f==="left"?u.left:f==="right"?u.right:u.left+u.width/2)<=l)break}return s}function ke(t){return!!t.dataset.slideIndex}function Pe(t){let{scroller:e,elements:n,children:o}=t,r=Le(e,n);return ke(r)?o[r.dataset.slideIndex]:r}function Fe(t){let{scroller:e,children:n,elements:o}=t,r=Le(e,o),i;!r||(ke(r)?(i=n[r.dataset.slideIndex],B(e,i)):i=r,t.activations.push(i))}function to(t,e){t.style.setProperty("scroll-snap-type",""),e.stop()}var Oe=y((t,e)=>e.type,{pointerdown:function(t,e){return t.e0=e,t.x0=e.clientX,t.y0=e.clientY,t},pointermove:function(t,e){let n=e.clientX,o=e.clientY;if(!t.gesturing){if(Math.abs(n-t.x0)(clearTimeout(s),setTimeout(to,it()*1e3,n,l)))}return t.gesturing=!1,t.e0=void 0,t.x0=void 0,t.y0=void 0,t.pointers=void 0,t.scrollLeft0=void 0,t}});var eo=Object.assign,no={capture:!0,passive:!0};function oo(t,e){t.timer=void 0,t.stream.push(e);let n=t.times;n.length>1&&be(n),n.length=0}function Ae(t){this.element=t,this.times=[]}eo(Ae.prototype,m.prototype,{pipe:function(t){this.stream=t,this.element.addEventListener("scroll",this,no)},handleEvent:function(t){let e=t.timeStamp/1e3;this.times.push(e),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(oo,it()*1e3,this,t)},stop:function(){this.element.removeEventListener("scroll",this),m.prototype.stop.apply(this,arguments)}});function kt(t){return new g(new Ae(t))}function ro(t,e,n){let o=n.length,r=-1/0;for(;o--;){let l=T(n[o]),p=l.x+l.width;r=p>r?p:r}let i=T(e),s=getComputedStyle(t),u=A(s.paddingLeft||0),f=A(s.paddingRight||0);return u+f+r-i.x}function io(t,e,n){let o=ro(t,e,n);t.style.setProperty("--scroll-width",o+"px")}function so(t){return!t.dataset.slideIndex}var Ce={construct:function(t){let e=b("slot",{part:"slides"}),n=b("div",{class:"scroller",children:[e]}),o=b("nav",{part:"controls",children:[b("slot",{name:"controls"})]});t.append(n,o);let r=g.of(),i=g.combine({host:r,elements:x("slotchange",e).map(c=>a.elements=e.assignedElements())}).broadcast({memory:!0}),s=i.map(c=>{let E=c.elements.filter(so);return Zt(a.children,E)?void 0:a.children=E}).broadcast({memory:!0}),u=g.of(null),f=g.of(),l=f.filter(c=>a.active!==c&&Lt("slide-active",c)).map(c=>a.active=c).broadcast({memory:!0,hot:!0}),p=x("click",t).filter(fe).broadcast(),a=this[d]={clickSuppressTime:-1/0,host:this,style:window.getComputedStyle(this),scroller:n,slides:e,controls:o,load:r,views:u,activations:f,actives:l,slotchanges:i,mutations:s,clicks:p};g.merge(i,x("resize",window)).each(c=>io(n,e,a.elements)),g.combine({children:s,child:u}).map(c=>!a.active||a.active===c.child?B(n,c.children.includes(c.child)?c.child:c.children[0]):(Te(n,c.child),c.child.dataset.slideIndex?c.children[c.child.dataset.slideIndex]:c.child)).pipe(f),kt(n).filter(()=>!a.gesturing).each(c=>Fe(a)),Tt({threshold:"0.25rem",device:"mouse"},t).filter(()=>a.children.length>1).each(c=>{a.pointers=c,c.reduce(Oe,a)}),p.each(c=>{c.timeStamp-a.clickSuppressTime<120&&(c.preventDefault(),c.stopPropagation())}),x("fullscreenchange",window).each(c=>{(c.target===this||c.target.contains(this))&&B(n,a.active)}),x("focusin",this).map(c=>a.children.indexOf(c.target)!==-1?c.target:a.children.find(E=>E.contains(c.target))).pipe(u),x("keydown",this).filter(()=>document.activeElement===this||this.contains(document.activeElement)).map(y(H("keyCode"),{37:c=>(c.preventDefault(),a.elements[a.elements.indexOf(a.active)-1]),39:c=>(c.preventDefault(),a.elements[a.elements.indexOf(a.active)+1]),default:v})).pipe(u)},load:function(t){this[d].load.push(this)}};function st(t,e){function n(o,r){if(t.getState(o)!==r)return t[r?"enable":"disable"](o)}return{attribute:function(o){return n(this,o!==null)},set:function(o){return n(this,!!o)},get:function(){return t.getState(this)}}}function Pt(t,e){t.remove&&t.remove(e);let n;for(;(n=t.indexOf(e))!==-1;)t.splice(n,1);return e}var ls=w(Pt,!0);var co=Object.assign;function W(t,e){this.element=t,this.definitions=e,this.tokens=[]}co(W.prototype,{contains:function(t){return this.tokens.includes(t)},add:function(){let t=arguments.length;for(;t--;){let e=arguments[t];!this.tokens.includes(e)&&this.definitions[e]&&(this.definitions[e].enable(this.element),this.tokens.push(e))}},remove:function(){let t=arguments.length;for(;t--;){let e=arguments[t];this.tokens.includes(e)&&(this.definitions[e].disable(this.element),Pt(this.tokens,e))}},supports:function(t){return!!this.definitions[t]}});var uo=Array.prototype;function lo(t,e){let n=t.tokens.slice(),o=uo.slice.apply(e),r=n.length;for(;r--;)o.includes(n[r])&&n.splice(r,1);t.remove.apply(t,n),t.add.apply(t,o)}function Ft(t){let e=Symbol("TokenList");function n(o,r){let i=o[e]||(o[e]=new W(o,t));lo(i,r.trim().split(/\s+/))}return{attribute:function(o){n(this,o||"")},set:function(o){n(this,o+"")},get:function(){return this[e]||(this[e]=new W(this,t))}}}var Ot={};G(Ot,{disable:()=>ho,enable:()=>mo,getState:()=>go});var ao=J({s:S,ms:t=>t/1e3});function po(t){let{active:e,children:n,elements:o,host:r}=t,i=o.indexOf(e),s=o[i+1]||n[0];t.autoplay.timer=null,!!s&&(r.active=s)}function fo(t){let{active:e,style:n}=t,o=ao(window.getComputedStyle(e).getPropertyValue("--slide-duration")||n.getPropertyValue("--slide-duration"));clearTimeout(t.autoplay.timer),t.autoplay.timer=setTimeout(po,o*1e3,t)}function Ie(t){clearTimeout(t.autoplay.timer),t.autoplay.timer=null}function mo(t){let e=t[d],{actives:n}=e,o=e.autoplay={},r=g.merge([!1],x("pointerenter pointerleave",t).map(s=>s.type==="pointerenter")),i=g.merge([t.contains(document.activeElement)],x("focusin focusout",t).map(y(H("type"),{focusin:s=>!0,focusout:s=>t.contains(s.relatedTarget)}))).map((s=>u=>s===u?void 0:s=u)());o.updates=g.combine({active:n,hover:r,focus:i}).each(s=>s.hover||s.focus?Ie(e):fo(e))}function ho(t){let e=t[d];Ie(e),e.autoplay.updates.stop(),e.autoplay=void 0}function go(t){return!!t[d].autoplay}var At={};G(At,{disable:()=>yo,enable:()=>vo,getState:()=>bo});function je(t,e){let n=t.cloneNode(!0);return n.dataset.slideIndex=e,n.removeAttribute("id"),n.setAttribute("aria-hidden","true"),n.tabIndex="-1",n}function wo(t){let{active:e,children:n,host:o,scroller:r}=t;if(t.loop.prepends&&(t.loop.prepends.forEach(c=>c.remove()),t.loop.appends.forEach(c=>c.remove()),t.loop.prepends=void 0,t.loop.appends=void 0),n.length<2){t.elements=t.slides.assignedElements();return}let i=o.clientWidth,s=n.map(T),u=s[1].left,f=s[s.length-2].right,l=1;for(;s[++l]&&s[l].leftf-i;);let a=n.slice(++l).map((c,E)=>je(c,l+E));o.prepend.apply(o,a),o.append.apply(o,p),t.loop.prepends=a,t.loop.appends=p,t.elements=t.slides.assignedElements(),B(r,e||n[0])}function vo(t){let e=t[d],{mutations:n}=e,o=e.loop={};o.renders=n.each(r=>wo(e))}function yo(t){let e=t[d];e.loop&&(e.loop.prepends&&e.loop.prepends.forEach(n=>n.remove()),e.loop.appends&&e.loop.appends.forEach(n=>n.remove()),e.loop.renders.stop(),e.loop=void 0)}function bo(t){return!!t[d].loop}var Ct={};G(Ct,{disable:()=>Eo,enable:()=>xo,getState:()=>So});function C(t){if(typeof t!="object"||arguments.length>1)throw new Error("delegate() now takes an object of selector:fn pairs.");let e=Object.keys(t);return function(o){let r=o.target,i=-1;for(;e[++i];){let s=r.closest(e[i]);if(s)return t[e[i]](s,...arguments)}}}function He(t,e,n,o){o===0?t.hidden=!0:t.hidden=!1,o===n.length-1?e.hidden=!0:e.hidden=!1}function xo(t){let e=t[d],{actives:n,clicks:o,slotchanges:r}=e,i=e.navigation={prev:b("button",{part:"prev-button",type:"button",name:"navigation",value:"-1",html:"Previous"}),next:b("button",{part:"next-button",type:"button",name:"navigation",value:"1",html:"Next"})};e.controls.prepend(i.prev,i.next),i.updates=g.combine({active:n,changes:r}).each(s=>He(i.prev,i.next,s.changes.elements,s.changes.elements.indexOf(s.active))),i.clicks=o.each(C({'[name="navigation"]':function(s,u){let f=parseFloat(s.value),l=e.elements.indexOf(e.active)+f,p=e.elements[l];!p||(t.active=p,He(i.prev,i.next,e.elements,l))}}))}function Eo(t){let e=t[d];e.navigation.prev.remove(),e.navigation.next.remove(),e.navigation.updates.stop(),e.navigation.clicks.stop(),e.navigation=void 0}function So(t){return!!t[d].navigation}var It={};G(It,{disable:()=>ko,enable:()=>Lo,getState:()=>Po});function Me(t,e,n){let{active:o,buttons:r,index:i}=t;if(o===n)return;i>-1&&(t.activeSpan.remove(),r.children[i].part.remove("page-button-active"));let s=e.indexOf(n);s!==-1&&(r.children[s].part.add("page-button-active"),r.children[s].append(t.activeSpan),t.index=s,t.active=n)}function To(t,e,n,o){return e.buttons&&(e.buttons.remove(),e.buttons=void 0),o.length<2||(e.buttons=b("div",{part:"pagination",children:o.map((r,i)=>b("button",{part:"page-button",type:"button",name:"pagination",value:i}))}),t.append(e.buttons)),o.length}function Lo(t){let e=t[d],{shadow:n,actives:o,clicks:r,mutations:i}=e,s=e.pagination={activeSpan:b("span",{class:"invisible",text:"(Current slide)"})};s.mutations=i.each(()=>To(e.controls,s,n,e.children)),s.updates=g.combine({active:o,children:i}).filter(u=>u.children.length>1).each(u=>Me(s,e.children,e.active)),s.clicks=r.each(C({'[name="pagination"]':function(u,f){let{host:l}=e,p=e.children,a=p[u.value];!a||(l.active=a,Me(s,p,a))}}))}function ko(t){let e=t[d];e.pagination.buttons.remove(),e.pagination.mutations.stop(),e.pagination.updates.stop(),e.pagination.clicks.stop(),e.pagination=void 0}function Po(t){return!!t[d].pagination}var jt={};G(jt,{disable:()=>Oo,enable:()=>Fo,getState:()=>Ao});var De=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled;function ct(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement}function Be(t){return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():void 0}function ut(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}function Fo(t){let e=t[d];if(!De)return;let n=e.fullscreen={button:b("button",{part:"fullscreen-button",type:"button",name:"fullscreen",html:"Open in fullscreen"})};e.controls.append(n.button),n.changes=x("fullscreenchange",t).filter(o=>ct()===t).each(o=>{n.button.part.add("fullscreen-button-active"),n.button.innerHTML="Close fullscreen",document.activeElement!==t&&(n.tabIndex=t.tabIndex,t.tabIndex<0&&(t.tabIndex=0),t.focus());let r=x("fullscreenchange",t).each(i=>{n.button.part.remove("fullscreen-button-active"),n.button.innerHTML="Open in fullscreen",t.tabIndex=n.tabIndex,n.tabIndex=void 0,r.stop()})}),n.clicks=e.clicks.each(C({'[name="fullscreen"]':(o,r)=>{let i=ct();if(i===t){ut();return}i&&ut(),Be(t)}}))}function Oo(t){let e=t[d];ct()===t&&ut(),e.fullscreen.button.remove(),e.fullscreen.clicks.stop(),e.fullscreen.changes.stop(),e.fullscreen=void 0}function Ao(t){return!!t[d].fullscreen}var Ge={active:{attribute:function(t){this.active=t},set:function(t){let e=this[d],n=typeof t=="object"?t:/^\d/.test(t+"")?this.querySelector("#\\3"+(t+"")[0]+" "+(t+"").slice(1)):/^\#/.test(t+"")?this.querySelector(t):this.querySelector("#"+t);if(!n)throw new Error("Cannot set active – not a child of slide-show");e.views.push(n)},get:function(){return this[d].active}},autoplay:st(Ot,"autoplay"),controls:Ft({navigation:Ct,pagination:It,fullscreen:jt}),loop:st(At,"loop")};var Co=import.meta.url.replace(/\/[^\/]*\.js/,"/slide-show-shadow.css"),Qs=wt('
    ',Ce,Ge,Co);export{Qs as default}; +var qe=Object.defineProperty;var Mt=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var Dt=(t,e)=>{var n={};for(var o in t)We.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&Mt)for(var o of Mt(t))e.indexOf(o)<0&&$e.call(t,o)&&(n[o]=t[o]);return n};var G=(t,e)=>{for(var n in e)qe(t,n,{get:e[n],enumerable:!0})};function $(t){var e=new Map;return function(o){if(e.has(o))return e.get(o);var r=t(o);return e.set(o,r),r}}var Ne=Array.prototype;function Xe(t,e){return typeof t=="function"?t.apply(null,e):t}function Bt(t,e,n){n=n||t.length;var o=n===1?e?t:$(t):$(function(r){return Bt(function(){var i=[r];return i.push.apply(i,arguments),t.apply(null,i)},e,n-1)});return function r(i){return arguments.length===0?r:arguments.length===1?o(i):arguments.length>=n?t.apply(null,arguments):Xe(o(i),Ne.slice.call(arguments,1))}}var w=Bt;function Ye(t,e){return 1-Math.pow(1-e,t)}var Gt=w(Ye);function v(){}function at(t,e){return e(t)}function S(t){return t}var Ke=Array.prototype;function pt(){let t=arguments;return t.length?e=>Ke.reduce.call(t,at,e):S}function ft(t,e,n){return n*(e-t)+t}var Ze=window.performance,zt=window.requestAnimationFrame,Qe=window.cancelAnimationFrame;function dt(t,e,n){var o=Ze.now();function r(s){var l=(s-o)/(t*1e3);l<1?(l>0&&e(l),i=zt(r)):(e(1),n&&n())}var i=zt(r);return function(){Qe(i)}}function N(t,e,n,o,r,i){let s=o[n];return dt(t,pt(e,l=>ft(s,r,l),l=>o[n]=l),i)}function Je(){return{x:0,y:0,left:0,top:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}}function T(t){return t===window?Je():t.getClientRects()[0]||t.getBoundingClientRect()}var H={scrollDuration:.3,scrollDurationPerHeight:.125,scrollTransform:Gt(3)},_t=v;function tn(t,e){if(e.behavior==="smooth"){let n=t.style.getPropertyValue("scroll-snap-type"),o=()=>t.style.setProperty("scroll-snap-type",n);if(t.style.setProperty("scroll-snap-type","none"),e.left!==void 0){let r=t===document.body?window.innerWidth:T(t).width,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.left-t.scrollLeft)/r;_t=N(i,H.scrollTransform,"scrollLeft",t,e.left,o)}else{let r=t===document.body?window.innerHeight:T(t).height,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.top-t.scrollTop)/r;_t=N(i,H.scrollTransform,"scrollTop",t,e.top,o)}}else e.left!==void 0&&(t.scrollLeft=e.left),e.top!==void 0&&(t.scrollTop=e.top)}if(!("scrollBehavior"in document.documentElement.style)){console.log("Polyfilling Element.scrollTo(options).");let t="scrollTo"in Element.prototype?Element:HTMLElement,e=t.scrollIntoView;t.prototype.scrollTo=function(n){typeof n=="object"?tn(this,n):e.apply(this,arguments)}}function y(t,e){return function(){let o=t.apply(this,arguments),r=e[o]||e.default;if(!r)throw new Error('overload() no handler for "'+o+'"');return r.apply(this,arguments)}}var en=y(S,{is:v,tag:v,html:function(t,e,n){e.innerHTML=n},text:function(t,e,n){e.textContent=n},children:function(t,e,n){e.innerHTML="",n.forEach(o=>{e.appendChild(o)})},points:M,cx:M,cy:M,r:M,preserveAspectRatio:M,viewBox:M,default:function(t,e,n){t in e?e[t]=n:e.setAttribute(t,n)}});function M(t,e,n){e.setAttribute(t,n)}function nn(t,e){for(var n=Object.keys(e),o=n.length;o--;)en(n[o],t,e[n[o]]);return t}var mt=w(nn,!0);var on="http://www.w3.org/2000/svg",Rt=document.createElement("div");var Ut=(t,e)=>e&&typeof e;function Vt(t,e){let n=document.createRange();return n.selectNode(t),n.createContextualFragment(e)}function L(t,e){var n=document.createElementNS(on,t);return e&&(n.innerHTML=e),n}var rn=y(S,{comment:function(t,e){return document.createComment(e||"")},fragment:y(Ut,{string:function(t,e,n){if(n)return Vt(n,e);let o=document.createDocumentFragment();Rt.innerHTML=e;let r=Rt.childNodes;for(;r[0];)o.appendChild(r[0]);return o},object:function(t,e,n){let o=n?Vt(n):document.createDocumentFragment();return typeof e.length=="number"?o.append.apply(o,e):mt(o,e),o},default:()=>document.createDocumentFragment()}),text:function(t,e){return document.createTextNode(e||"")},circle:L,ellipse:L,g:L,glyph:L,image:L,line:L,rect:L,use:L,path:L,pattern:L,polygon:L,polyline:L,svg:L,default:y(Ut,{string:function(t,e){let n=document.createElement(t);return n.innerHTML=e,n},object:function(t,e){let n=document.createElement(t);return typeof e.length=="number"?n.append.apply(n,e):mt(n,e),n},default:t=>{if(typeof t!="string")throw new Error('create(tag, content) accepts only a string as tag "'+typeof t+'"');return document.createElement(t)}})}),b=rn;function ht(t,e,n){let o;typeof n!="string"&&n.input!==void 0&&n.index!==void 0&&(o=n,n=o.input.slice(n.index+n[0].length+(n.consumed||0)));let r=t.exec(n);if(!r)return;let i=e(r);return o&&(o.consumed=(o.consumed||0)+r.index+r[0].length+(r.consumed||0)),i}var fr=w(ht,!0);function sn(t,e,n){throw n.input!==void 0&&n.index!==void 0&&(n=n.input),new Error('Cannot parse string "'+n+'"')}function cn(t,e,n){let o=-1;for(;++ocn(e,n,i),o);return r===void 0?e.catch?e.catch(n,o):sn(t,e,o):r}var qt=w(un,!0);var gt=v;var k=Symbol("internals"),A=Symbol("shadow"),Wt=Object.defineProperties,ln={a:HTMLAnchorElement,dl:HTMLDListElement,p:HTMLParagraphElement,br:HTMLBRElement,fieldset:HTMLFieldSetElement,hr:HTMLHRElement,img:HTMLImageElement,li:HTMLLIElement,ol:HTMLOListElement,optgroup:HTMLOptGroupElement,q:HTMLQuoteElement,textarea:HTMLTextAreaElement,td:HTMLTableCellElement,th:HTMLTableCellElement,tr:HTMLTableRowElement,tbody:HTMLTableSectionElement,thead:HTMLTableSectionElement,tfoot:HTMLTableSectionElement,ul:HTMLUListElement},an={name:{set:function(t){return this.setAttribute("name",t)},get:function(){return this.getAttribute("name")||""}},form:{get:function(){return this[k].form}},labels:{get:function(){return this[k].labels}},validity:{get:function(){return this[k].validity}},validationMessage:{get:function(){return this[k].validationMessage}},willValidate:{get:function(){return this[k].willValidate}},checkValidity:{value:function(){return this[k].checkValidity()}},reportValidity:{value:function(){return this[k].reportValidity()}}},pn={},$t={once:!0},fn=0,Nt=!1;function dn(t){return ln[t]||window["HTML"+t[0].toUpperCase()+t.slice(1)+"Element"]||(()=>{throw new Error('Constructor not found for tag "'+t+'"')})()}var mn=qt(/^\s*?\s*$|^\s*?\s*$/,{1:(t,e)=>({name:e[1]}),2:(t,e)=>({name:e[3],tag:e[2]}),catch:function(t,e){throw new SyntaxError(`dom element() – name must be of the form 'element-name' or 'tag is="element-name"' (`+e+")")}},null);function hn(t,e){if(t.hasOwnProperty(e)){let n=t[e];delete t[e],t[e]=n}return t}function gn(t,e,n){t._initialLoad=!0;let o=t.attachShadow({mode:e.mode||"closed",delegatesFocus:e.focusable||!1});if(n){let r=b("link",{rel:"stylesheet",href:n});o.append(r)}return t[A]=o,o}function wn(t){var e;if(t.attachInternals){if(e=t.attachInternals(),e.setFormValue)return e}else e={shadowRoot:t.shadowRoot};return e.input=b("input",{type:"hidden",name:t.name}),t.appendChild(e.input),e.setFormValue=function(n){this.input.value=n},e}function vn(t){t._initialAttributes={},t._n=0}function yn(t,e,n){let o=t._initialAttributes;for(;t._nfn?gn(p,e,o||e.stylesheet):void 0,c=a.formAssociated&&wn(p);return i&&(Nt=!0),e.construct&&e.construct.call(p,u,c),l&&(vn(p),Promise.resolve(1).then(function(){Xt(p,a.observedAttributes,l)})),f&&Object.keys(f).reduce(hn,p),p}return a.prototype=Object.create(s.prototype,f),f&&f.value&&(a.formAssociated=!0,Wt(a.prototype,an),(e.enable||e.disable)&&(a.prototype.formDisabledCallback=function(p){return p?e.disable&&e.disable.call(this,this[A],this[k]):e.enable&&e.enable.call(this,this[A],this[k])}),e.reset&&(a.prototype.formResetCallback=function(){return e.reset.call(this,this[A],this[k])}),e.restore&&(a.prototype.formStateRestoreCallback=function(){return e.restore.call(this,this[A],this[k])})),l&&(a.observedAttributes=Object.keys(l),a.prototype.attributeChangedCallback=function(p,u,c){if(!this._initialAttributes)return l[p].call(this,c);this._initialAttributes[p]=c,yn(this,a.observedAttributes,l)}),a.prototype.connectedCallback=function(){let p=this,u=p[A],c=p[k];if(p._initialAttributes&&Xt(p,a.observedAttributes,l),p._initialLoad){let E=u.querySelectorAll('link[rel="stylesheet"]');if(E.length){let ze=0,lt=E.length,Ht=function(Ue){++ze>=E.length&&(delete p._initialLoad,e.load&&(gt("element()","loaded",Array.from(E).map(Ve=>Ve.href).join(` +`)),e.load.call(p,u)))},_e=Ht;for(;lt--;)E[lt].addEventListener("load",Ht,$t),E[lt].addEventListener("error",_e,$t);e.connect&&e.connect.call(this,u,c)}else e.connect&&e.connect.call(this,u,c),e.load&&e.load.call(this,u,c)}else e.connect&&e.connect.call(this,u,c)},e.disconnect&&(a.prototype.disconnectedCallback=function(){return e.disconnect.call(this,this[A],this[k])}),gt("element()","<"+(i?i+" is="+r:r)+">"),window.customElements.define(r,a,i&&{extends:i}),i&&!Nt&&document.querySelectorAll('[is="'+r+'"]').forEach(p=>{Wt(p,f),e.construct&&e.construct.apply(p);let u;for(u in l){let c=p.attributes[u];c&&l[u].call(p,c.value)}e.connect&&e.connect.apply(p)}),a}function Kt(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object")return!1;let n=Object.keys(t),o=Object.keys(e),r=n.length;for(;r--;){if(t[n[r]]===void 0){if(e[n[r]]!==void 0)return!1}else if(!e.hasOwnProperty(n[r])||!Kt(t[n[r]],e[n[r]]))return!1;let i=o.indexOf(n[r]);i>-1&&o.splice(i,1)}for(r=o.length;r--;)if(e[o[r]]===void 0){if(t[o[r]]!==void 0)return!1}else return!1;return!0}var Zt=w(Kt,!0);function En(t,e){return e[t]}var D=w(En,!0);var Sn=Object.freeze;function Qt(){return this}var P=Sn({shift:v,push:v,forEach:v,join:function(){return""},map:Qt,filter:Qt,includes:function(){return!1},reduce:function(t,e){return e},length:0,each:v,pipe:S,start:v,stop:v,done:v,valueOf:function(){return null}});function vt(){return this}function yt(t){return t&&t[Symbol.iterator]}var Tn=Object.assign;function Ln(t){return t.stop?t.stop():t()}function kn(t){t.forEach(Ln),t.length=0}function B(){}Tn(B.prototype,{stop:function(){return this.stopables&&kn(this.stopables),this},done:function(e){return(this.stopables||(this.stopables=[])).push(e),this}});var Pn=Object.assign;function X(t){B.prototype.stop.apply(t);let e=-1,n;for(;n=t[++e];)t[e]=void 0,X(n)}function m(){}Pn(m.prototype,{pipe:function(t){return this[0]=t,t},stop:function(){return X(this[0]),this}});var F=Object.assign,O=Object.create;function z(t,e){e!==void 0&&t[0].push(e)}function Fn(t,e){if(t[1]){let n=-1;for(;t[++n]&&t[n]!==e;);for(;t[n++];)t[n-1]=t[n];X(e)}else t.stop()}function h(t){this.input=t}F(h.prototype,B.prototype,{push:function(t){z(this,t)},pipe:function(t){if(this[0])throw new Error("Stream: Attempt to .pipe() a unicast stream multiple times. Create a multicast stream with stream.broadcast().");return this[0]=t,this.input.pipe(this),t},map:function(t){return new Jt(this,t)},filter:function(t){return new te(this,t)},chunk:function(t){return new ne(this,t)},flatMap:function(t){return new ee(this,t)},take:function(t){return new oe(this,t)},each:function(t){return new se(this,t)},reduce:function(t,e){return new re(this,t,e)},scan:function(t,e){return new ie(this,t,e)},stop:function(){return Fn(this.input,this),this}});function Jt(t,e){this.input=t,this.fn=e}Jt.prototype=F(O(h.prototype),{push:function(e){let n=this.fn;z(this,n(e))}});function te(t,e){this.input=t,this.fn=e}te.prototype=F(O(h.prototype),{push:function(e){this.fn(e)&&z(this,e)}});function ee(t,e){this.input=t,this.fn=e}ee.prototype=F(O(h.prototype),{push:function(e){let o=this.fn(e);if(o!==void 0)if(yt(o))for(let r of o)z(this,r);else throw new Error("Stream: Cannot .flatMap() non-iterable values")}});function ne(t,e){this.input=t,this.chunk=[],typeof e=="number"?this.n=e:typeof e=="function"&&(this.fn=e)}ne.prototype=F(O(h.prototype),{fn:function(t){return t.length===this.n},push:function(e){let n=this.chunk;n.push(e),this.fn(n)&&(z(this,n),this.chunk=[])}});function oe(t,e){this.input=t,this.count=e}oe.prototype=F(O(h.prototype),{push:function(e){this[0].push(e),--this.count||this.stop()}});function re(t,e,n){return this.input=t,this.fn=e,this.value=n,this.i=0,t.pipe(this),n}re.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t,this.i++,this)}});function ie(t,e,n){this.input=t,this.fn=e,this.value=n}ie.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t),this[0].push(this.value)}});function se(t,e){this.input=t,this.push=e,t.pipe(this)}se.prototype=F(O(h.prototype),{each:null,reduce:null,pipe:null});var On=Array.prototype,An=Object.assign,Cn=Object.create;function _(t){this.buffer=t||[]}_.prototype=An(Cn(h.prototype),m.prototype,{push:function(t){t!==void 0&&this.buffer.push(t)},pipe:function(t){for(this[0]=t;this.buffer.length;)this[0].push(On.shift.apply(this.buffer));return this.buffer=this[0],t}});var In=Object.assign,jn=Object.create;function R(t,e){this.input=t,this.memory=!!(e&&e.memory),e&&e.hot&&this.pipe(P)}R.prototype=In(jn(h.prototype),{push:function(t){if(t!==void 0){this.memory&&(this.value=t);let e=-1;for(;this[++e];)this[e].push(t)}},pipe:function(t){let e=-1;for(;this[++e];);return this[e]=t,this.value!==void 0&&t.push(this.value),e===0&&this.input.pipe(this),t}});var Hn=Object.assign;function Y(t){this.promise=t}Hn(Y.prototype,m.prototype,{pipe:function(t){let e=this.promise;this[0]=t,e.then(n=>this[0].push(n)).finally(n=>this.stop())},stop:function(){m.prototype.stop.apply(this,arguments),this[0]=P}});var ue=Object.assign,le=Object.keys;function ce(t,e,n){let o=t.values,r=t.names,i=t[0];o[e]=n,(t.active||(t.active=le(o).length===r.length))&&i.push(ue({},o))}function K(t){this.inputs=t,this.active=!1}ue(K.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this.values={},this.names=le(e),this[0]=t;for(let n in e){let o=e[n];o.pipe?t.done(o.each(r=>ce(this,n,r))):o.then?o.then(r=>ce(this,n,r)):console.log("Todo: combine() raw values ?")}}});var Mn=Object.assign;function Z(t){this.inputs=t}Mn(Z.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this[0]=t;let n=-1,o;for(;o=e[++n];)if(o.pipe)o.pipe(t);else if(o.then)o.then(r=>t.push(r));else{let r=-1;for(;++r0}function Gn(t,e,n){return t[n]=e.shift(),t}function zn(t){return[]}function bt(t,e,n,o){n.push(o),e.every(Bn)&&t.push(e.reduce(Gn,{}))}function Q(t){this.inputs=t,this.buffers=xt.map.call(t,zn)}Dn(Q.prototype,m.prototype,{pipe:function(t){let e=this.inputs,n=this.buffers;this[0]=t,xt.forEach.call(e,(o,r)=>{let i=n[r];o.each?t.done(o.each(s=>bt(t,n,i,s))):o.then?o.then(s=>bt(t,n,i,s)):xt.forEach.call(o,s=>bt(t,n,i,s))})},stop:function(){let t=this.inputs,e=-1,n;for(;n=t[++e];)n.stop();return m.prototype.stop.apply(this,arguments)}});var _n=Array.prototype,ae=Object.assign;function Rn(t){throw new TypeError("Stream: invalid source object cannot be read into stream")}var g=ae(h,{of:function(){return new _(_n.slice.apply(arguments))},from:function(t){return t.pipe?new h(t):t.then?new h(new Y(t)):typeof t.length=="number"?new _(t):Rn(t)},broadcast:function(e){return new R(P,e)},combine:function(e){return new h(new K(e))},merge:function(){return new h(new Z(arguments))},zip:function(){return new h(new Q(arguments))}});ae(h.prototype,{log:vt,broadcast:function(t){return new R(this,t)}});var Un=Object.assign,Vn=/\s+/,pe={fullscreenchange:"fullscreenElement"in document?"fullscreenchange":"webkitFullscreenElement"in document?"webkitfullscreenchange":"fullscreenchange"};function fe(t){return t.which===1&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}var de=0;window.addEventListener("click",t=>de=t.timeStamp);function qn(t,e){return t.node.addEventListener(pe[e]||e,t,t.options),t}function Wn(t,e){return t.node.removeEventListener(pe[e]||e,t),t}function me(t,e,n){this.types=t.split(Vn),this.options=e,this.node=n,this.select=e&&e.select}Un(me.prototype,m.prototype,{pipe:function(t){this[0]=t,this.types.reduce(qn,this)},handleEvent:function(t){if(!(t.type==="click"&&t.timeStamp<=de)){if(this.select){let e=t.target.closest(this.select);if(!e)return;t.selectedTarget=e}this[0].push(t)}},stop:function(){this.types.reduce(Wn,this),m.prototype.stop.apply(this,arguments)}});function x(t,e){let n;return typeof t=="object"&&(n=t,t=n.type),new g(new me(t,n,e))}function Et(t){return typeof t}var $n=/^\s*([+-]?\d*\.?\d+)([^\s\d]*)\s*$/;function Nn(t,e){if(typeof e=="number")return e;var n=$n.exec(e);if(!n||!t[n[2]||""]){if(!t.catch)throw new Error('Cannot parse value "'+e+'" with provided units '+Object.keys(t).join(", "));return n?t.catch(parseFloat(n[1]),n[2]):t.catch(parseFloat(e))}return t[n[2]||""](parseFloat(n[1]))}var J=w(Nn);var Xn=/px$/,he={"transform:translateX":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[4])},"transform:translateY":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[5])},"transform:scale":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.sqrt(o*o+r*r)},"transform:rotate":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.atan2(r,o)}};function tt(t){return t.split("(")[1].split(")")[0].split(/\s*,\s*/)}function U(t,e){return window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):0}function et(t,e){if(he[t])return he[t](e);var n=U(t,e);return typeof n=="string"&&Xn.test(n)?parseFloat(n):n}var nt,ot;function Yn(){if(!nt){let t=document.documentElement.style.fontSize;document.documentElement.style.fontSize="100%",nt=et("font-size",document.documentElement),document.documentElement.style.fontSize=t||""}return nt}function Kn(){return ot||(ot=et("font-size",document.documentElement)),ot}window.addEventListener("resize",()=>{nt=void 0,ot=void 0});var C=y(Et,{number:S,string:J({em:function(t){return Yn()*t},px:function(t){return t},rem:function(t){return Kn()*t},vw:function(t){return window.innerWidth*t/100},vh:function(t){return window.innerHeight*t/100},vmin:function(t){return window.innerWidthn?o:n}n=nq.maxScrollInterval?q.maxScrollInterval:1.4*n}function it(){return ye}function xe(t){let e=T(t),n=window.getComputedStyle(t,null),o=C(n.getPropertyValue("padding-left")),r=C(n.getPropertyValue("padding-right"));return e.leftPadding=e.left+o,e.rightPadding=e.left+e.width-r,e.centrePadding=e.leftPadding+(e.width-o-r)/2,e}function Ee(t){let e=window.getComputedStyle(t,null).getPropertyValue("scroll-snap-align");return e.endsWith("start")?"left":e.endsWith("end")?"right":"centre"}function Se(t,e,n){let o=xe(t),r=T(e),i=Ee(e);t.scrollTo({top:t.scrollTop,left:t.scrollLeft+(i==="left"?r.left-o.leftPadding:i==="right"?r.right-o.rightPadding:r.left+r.width/2-o.centrePadding),behavior:n})}function Te(t,e){return Se(t,e,"smooth"),e}function I(t,e){return t.style.setProperty("scroll-behavior","auto","important"),Se(t,e,"auto"),t.style.setProperty("scroll-behavior",""),e}function Le(t,e){let{leftPadding:n,rightPadding:o,centrePadding:r}=xe(t),i=e.length,s;for(;s=e[--i];){let l=T(s);if(!l)continue;let f=Ee(s),a=l.width/2+(f==="left"?n:f==="right"?o:r);if((f==="left"?l.left:f==="right"?l.right:l.left+l.width/2)<=a)break}return s}function ke(t){return!!t.dataset.slideIndex}function Pe(t){let{scroller:e,elements:n,children:o}=t,r=Le(e,n);return ke(r)?o[r.dataset.slideIndex]:r}function Fe(t){let{scroller:e,children:n,elements:o}=t,r=Le(e,o),i;!r||(ke(r)?(i=n[r.dataset.slideIndex],I(e,i)):i=r,t.activations.push(i))}function to(t,e){t.style.setProperty("scroll-snap-type",""),e.stop()}var Oe=y((t,e)=>e.type,{pointerdown:function(t,e){return t.e0=e,t.x0=e.clientX,t.y0=e.clientY,t},pointermove:function(t,e){let n=e.clientX,o=e.clientY;if(!t.gesturing){if(Math.abs(n-t.x0)(clearTimeout(s),setTimeout(to,it()*1e3,n,a)))}return t.gesturing=!1,t.e0=void 0,t.x0=void 0,t.y0=void 0,t.pointers=void 0,t.scrollLeft0=void 0,t}});var eo=Object.assign,no={capture:!0,passive:!0};function oo(t,e){t.timer=void 0,t.stream.push(e);let n=t.times;n.length>1&&be(n),n.length=0}function Ae(t){this.element=t,this.times=[]}eo(Ae.prototype,m.prototype,{pipe:function(t){this.stream=t,this.element.addEventListener("scroll",this,no)},handleEvent:function(t){let e=t.timeStamp/1e3;this.times.push(e),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(oo,it()*1e3,this,t)},stop:function(){this.element.removeEventListener("scroll",this),m.prototype.stop.apply(this,arguments)}});function kt(t){return new g(new Ae(t))}function ro(t,e,n){let o=n.length,r=-1/0;for(;o--;){let a=T(n[o]),p=a.x+a.width;r=p>r?p:r}let i=T(e),s=getComputedStyle(t),l=C(s.paddingLeft||0),f=C(s.paddingRight||0);return l+f+r-i.x}function io(t,e,n){let o=ro(t,e,n);t.style.setProperty("--scroll-width",o+"px")}function so(t){return!t.dataset.slideIndex}var Ce={construct:function(t){let e=b("slot",{part:"slides"}),n=b("div",{class:"scroller",children:[e]}),o=b("nav",{part:"controls",children:[b("slot",{name:"controls"})]});t.append(n,o);let r=g.of().broadcast({memory:!0}),i=g.combine({host:r,elements:x("slotchange",e).map(c=>u.elements=e.assignedElements())}).broadcast({memory:!0}),s=i.map(c=>{let E=c.elements.filter(so);return Zt(u.children,E)?void 0:u.children=E}).broadcast({memory:!0,hot:!0}),l=g.of(),f=g.of(),a=f.map(c=>c.dataset.slideIndex?u.children[c.dataset.slideIndex]:c).filter(c=>u.active!==c&&Lt("slide-active",c)).map(c=>u.active=c).broadcast({memory:!0,hot:!0}),p=x("click",t).filter(fe).broadcast(),u=this[d]={clickSuppressTime:-1/0,host:this,style:window.getComputedStyle(this),elements:P,children:P,scroller:n,slides:e,controls:o,load:r,views:l,activations:f,actives:a,slotchanges:i,mutations:s,clicks:p};g.merge(i,x("resize",window)).each(c=>io(n,e,u.elements)),i.map(c=>c.elements.includes(u.active)?u.active:u.children[0]).map(c=>I(n,c)).pipe(f),g.combine({host:r,child:l}).map(c=>u.elements.includes(c.child)&&u.active!==c.child?c.child:void 0).map(c=>u.active?Te(n,c):I(n,c)).pipe(f),kt(n).filter(()=>!u.gesturing).each(c=>Fe(u)),Tt({threshold:"0.25rem",device:"mouse"},t).filter(()=>u.children.length>1).each(c=>{u.pointers=c,c.reduce(Oe,u)}),p.each(c=>{c.timeStamp-u.clickSuppressTime<120&&(c.preventDefault(),c.stopPropagation())}),x("fullscreenchange",window).each(c=>{(c.target===this||c.target.contains(this))&&I(n,u.active)}),x("focusin",this).map(c=>u.children.indexOf(c.target)!==-1?c.target:u.children.find(E=>E.contains(c.target))).pipe(l),x("keydown",this).filter(()=>document.activeElement===this||this.contains(document.activeElement)).map(y(D("keyCode"),{37:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)-1]),39:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)+1]),default:v})).pipe(l)},load:function(t){this[d].load.push(this)}};function st(t,e){function n(o,r){if(t.getState(o)!==r)return t[r?"enable":"disable"](o)}return{attribute:function(o){return n(this,o!==null)},set:function(o){return n(this,!!o)},get:function(){return t.getState(this)}}}function Pt(t,e){t.remove&&t.remove(e);let n;for(;(n=t.indexOf(e))!==-1;)t.splice(n,1);return e}var as=w(Pt,!0);var co=Object.assign;function W(t,e){this.element=t,this.definitions=e,this.tokens=[]}co(W.prototype,{contains:function(t){return this.tokens.includes(t)},add:function(){let t=arguments.length;for(;t--;){let e=arguments[t];!this.tokens.includes(e)&&this.definitions[e]&&(this.definitions[e].enable(this.element),this.tokens.push(e))}},remove:function(){let t=arguments.length;for(;t--;){let e=arguments[t];this.tokens.includes(e)&&(this.definitions[e].disable(this.element),Pt(this.tokens,e))}},supports:function(t){return!!this.definitions[t]}});var uo=Array.prototype;function lo(t,e){let n=t.tokens.slice(),o=uo.slice.apply(e),r=n.length;for(;r--;)o.includes(n[r])&&n.splice(r,1);t.remove.apply(t,n),t.add.apply(t,o)}function Ft(t){let e=Symbol("TokenList");function n(o,r){let i=o[e]||(o[e]=new W(o,t));lo(i,r.trim().split(/\s+/))}return{attribute:function(o){n(this,o||"")},set:function(o){n(this,o+"")},get:function(){return this[e]||(this[e]=new W(this,t))}}}var Ot={};G(Ot,{disable:()=>ho,enable:()=>mo,getState:()=>go});var ao=J({s:S,ms:t=>t/1e3});function po(t){let{active:e,children:n,elements:o,host:r}=t,i=o.indexOf(e),s=o[i+1]||n[0];t.autoplay.timer=null,!!s&&(r.active=s)}function fo(t){let{active:e,style:n}=t,o=ao(window.getComputedStyle(e).getPropertyValue("--slide-duration")||n.getPropertyValue("--slide-duration"));clearTimeout(t.autoplay.timer),t.autoplay.timer=setTimeout(po,o*1e3,t)}function Ie(t){clearTimeout(t.autoplay.timer),t.autoplay.timer=null}function mo(t){let e=t[d],{actives:n}=e,o=e.autoplay={},r=g.merge([!1],x("pointerenter pointerleave",t).map(s=>s.type==="pointerenter")),i=g.merge([t.contains(document.activeElement)],x("focusin focusout",t).map(y(D("type"),{focusin:s=>!0,focusout:s=>t.contains(s.relatedTarget)}))).map((s=>l=>s===l?void 0:s=l)());o.updates=g.combine({active:n,hover:r,focus:i}).each(s=>s.hover||s.focus?Ie(e):fo(e))}function ho(t){let e=t[d];Ie(e),e.autoplay.updates.stop(),e.autoplay=void 0}function go(t){return!!t[d].autoplay}var At={};G(At,{disable:()=>yo,enable:()=>vo,getState:()=>bo});function je(t,e){let n=t.cloneNode(!0);return n.dataset.slideIndex=e,n.removeAttribute("id"),n.setAttribute("aria-hidden","true"),n.tabIndex="-1",n}function wo(t){let{active:e,children:n,host:o,scroller:r}=t;if(t.loop.prepends&&(t.loop.prepends.forEach(c=>c.remove()),t.loop.appends.forEach(c=>c.remove()),t.loop.prepends=void 0,t.loop.appends=void 0),n.length<2){t.elements=t.slides.assignedElements();return}let i=o.clientWidth,s=n.map(T),l=s[1].left,f=s[s.length-2].right,a=1;for(;s[++a]&&s[a].leftf-i;);let u=n.slice(++a).map((c,E)=>je(c,a+E));o.prepend.apply(o,u),o.append.apply(o,p),t.loop.prepends=u,t.loop.appends=p,t.elements=t.slides.assignedElements(),I(r,e||n[0])}function vo(t){let e=t[d],{mutations:n}=e,o=e.loop={};o.renders=n.each(r=>wo(e))}function yo(t){let e=t[d];e.loop&&(e.loop.prepends&&e.loop.prepends.forEach(n=>n.remove()),e.loop.appends&&e.loop.appends.forEach(n=>n.remove()),e.loop.renders.stop(),e.loop=void 0)}function bo(t){return!!t[d].loop}var Ct={};G(Ct,{disable:()=>Eo,enable:()=>xo,getState:()=>So});function j(t){if(typeof t!="object"||arguments.length>1)throw new Error("delegate() now takes an object of selector:fn pairs.");let e=Object.keys(t);return function(o){let r=o.target,i=-1;for(;e[++i];){let s=r.closest(e[i]);if(s)return t[e[i]](s,...arguments)}}}function He(t,e,n,o){o===0?t.hidden=!0:t.hidden=!1,o===n.length-1?e.hidden=!0:e.hidden=!1}function xo(t){let e=t[d],{actives:n,clicks:o,slotchanges:r}=e,i=e.navigation={prev:b("button",{part:"prev-button",type:"button",name:"navigation",value:"-1",html:"Previous"}),next:b("button",{part:"next-button",type:"button",name:"navigation",value:"1",html:"Next"})};e.controls.prepend(i.prev,i.next),i.updates=g.combine({active:n,changes:r}).each(s=>He(i.prev,i.next,s.changes.elements,s.changes.elements.indexOf(s.active))),i.clicks=o.each(j({'[name="navigation"]':function(s,l){let f=parseFloat(s.value),a=e.elements.indexOf(e.active)+f,p=e.elements[a];!p||(t.active=p,He(i.prev,i.next,e.elements,a))}}))}function Eo(t){let e=t[d];e.navigation.prev.remove(),e.navigation.next.remove(),e.navigation.updates.stop(),e.navigation.clicks.stop(),e.navigation=void 0}function So(t){return!!t[d].navigation}var It={};G(It,{disable:()=>ko,enable:()=>Lo,getState:()=>Po});function Me(t,e,n){let{active:o,buttons:r,index:i}=t;if(o===n)return;i>-1&&(t.activeSpan.remove(),r.children[i].part.remove("page-button-active"));let s=e.indexOf(n);s!==-1&&(r.children[s].part.add("page-button-active"),r.children[s].append(t.activeSpan),t.index=s,t.active=n)}function To(t,e,n,o){return e.buttons&&(e.buttons.remove(),e.buttons=void 0),o.length<2||(e.buttons=b("div",{part:"pagination",children:o.map((r,i)=>b("button",{part:"page-button",type:"button",name:"pagination",value:i}))}),t.append(e.buttons)),o.length}function Lo(t){let e=t[d],{shadow:n,actives:o,clicks:r,mutations:i}=e,s=e.pagination={activeSpan:b("span",{class:"invisible",text:"(Current slide)"})};s.mutations=i.each(()=>To(e.controls,s,n,e.children)),s.updates=g.combine({active:o,children:i}).filter(l=>l.children.length>1).each(l=>Me(s,e.children,e.active)),s.clicks=r.each(j({'[name="pagination"]':function(l,f){let{host:a}=e,p=e.children,u=p[l.value];!u||(a.active=u,Me(s,p,u))}}))}function ko(t){let e=t[d];e.pagination.buttons.remove(),e.pagination.mutations.stop(),e.pagination.updates.stop(),e.pagination.clicks.stop(),e.pagination=void 0}function Po(t){return!!t[d].pagination}var jt={};G(jt,{disable:()=>Oo,enable:()=>Fo,getState:()=>Ao});var De=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled;function ct(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement}function Be(t){return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():void 0}function ut(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}function Fo(t){let e=t[d];if(!De)return;let n=e.fullscreen={button:b("button",{part:"fullscreen-button",type:"button",name:"fullscreen",html:"Open in fullscreen"})};e.controls.append(n.button),n.changes=x("fullscreenchange",t).filter(o=>ct()===t).each(o=>{n.button.part.add("fullscreen-button-active"),n.button.innerHTML="Close fullscreen",document.activeElement!==t&&(n.tabIndex=t.tabIndex,t.tabIndex<0&&(t.tabIndex=0),t.focus());let r=x("fullscreenchange",t).each(i=>{n.button.part.remove("fullscreen-button-active"),n.button.innerHTML="Open in fullscreen",t.tabIndex=n.tabIndex,n.tabIndex=void 0,r.stop()})}),n.clicks=e.clicks.each(j({'[name="fullscreen"]':(o,r)=>{let i=ct();if(i===t){ut();return}i&&ut(),Be(t)}}))}function Oo(t){let e=t[d];ct()===t&&ut(),e.fullscreen.button.remove(),e.fullscreen.clicks.stop(),e.fullscreen.changes.stop(),e.fullscreen=void 0}function Ao(t){return!!t[d].fullscreen}var Ge={active:{attribute:function(t){this.active=t},set:function(t){let e=this[d],n=typeof t=="object"?t:/^\d/.test(t+"")?this.querySelector("#\\3"+(t+"")[0]+" "+(t+"").slice(1)):/^\#/.test(t+"")?this.querySelector(t):this.querySelector("#"+t);e.views.push(n)},get:function(){return this[d].active}},autoplay:st(Ot,"autoplay"),controls:Ft({navigation:Ct,pagination:It,fullscreen:jt}),loop:st(At,"loop")};var Co=import.meta.url.replace(/\/[^\/]*\.js/,"/slide-show-shadow.css"),Js=wt('
      ',Ce,Ge,Co);export{Js as default}; diff --git a/build/slide-show-shadow.css b/build/slide-show-shadow.css index aa408f0..eedf436 100644 --- a/build/slide-show-shadow.css +++ b/build/slide-show-shadow.css @@ -1,6 +1,6 @@ /* slide-show 1.1.5 By Stephen Band - Built 2022-05-16 23:59 */ + Built 2022-05-18 15:08 */ :host,*{box-sizing:border-box;background-origin:padding-box;background-repeat:no-repeat;padding:0;margin:0}button{font-size:inherit}:host{--slide-duration: 8s;--padding-left: 0;--padding-right: 0;position:relative;display:block!important;padding-left:0!important;padding-right:0!important;align-content:center!important;align-items:stretch;justify-content:center!important;justify-items:stretch;grid-auto-flow:row!important;grid-auto-columns:100%;grid-template-columns:none;column-gap:0;grid-auto-rows:min-content;grid-template-rows:1fr;row-gap:0;scroll-snap-type:none!important;scroll-snap-stop:none!important;-webkit-scroll-behavior:smooth;scroll-behavior:smooth;overscroll-behavior-x:none!important;-ms-overflow-style:none!important;scrollbar-width:none!important;overflow:visible}:host(:-webkit-full-screen){width:100vw!important;height:100vh!important;margin:0!important;background-color:#121212}:host(:fullscreen){width:100vw!important;height:100vh!important;margin:0!important;background-color:#121212}.invisible{position:absolute;clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);width:1px;height:1px;padding:0;margin:0 -1px -1px 0;overflow:hidden;white-space:nowrap;border-width:0}.scroller{display:block;position:relative;height:100%;padding-left:var(--padding-left, 0);padding-right:var(--padding-right, 0);scroll-padding-left:var(--padding-left, 0);scroll-padding-right:var(--padding-right, 0);overflow:auto;overflow-y:hidden;overscroll-behavior-x:none;overscroll-behavior-x:contain;scrollbar-width:none;scroll-snap-type:x mandatory;scroll-snap-stop:always;-webkit-scroll-behavior:inherit;scroll-behavior:inherit;will-change:-webkit-scroll-behavior;will-change:scroll-behavior;grid-template-columns:inherit;grid-auto-columns:inherit;column-gap:inherit;justify-content:inherit;justify-items:inherit;grid-template-rows:inherit;grid-auto-rows:inherit;row-gap:inherit;align-content:inherit;align-items:inherit}.scroller:before{content:"";position:absolute;left:0;top:0;width:var(--scroll-width, 5000%);height:1px;z-index:-1}.scroller::-webkit-scrollbar{-webkit-appearance:none;display:var(--webkit-scrollbar-display, none);width:var(--webkit-scrollbar-width);height:var(--webkit-scrollbar-width);background:var(--webkit-scrollbar-background);border:var(--webkit-scrollbar-border);border-radius:var(--webkit-scrollbar-border-radius)}.scroller::-webkit-scrollbar-thumb:vertical,.scroller::-webkit-scrollbar-thumb:horizontal{background:var(--webkit-scrollbar-thumb-background);border:var(--webkit-scrollbar-thumb-border);border-radius:var(--webkit-scrollbar-thumb-border-radius)}.scroller>[part=slides]{position:relative;z-index:1}:host(:-webkit-full-screen) .scroller{height:calc(100% - 2.75rem)}:host(:fullscreen) .scroller{height:calc(100% - 2.75rem)}[part=slides]{display:grid;height:100%;margin-left:auto;margin-right:auto;grid-auto-flow:column;grid-template-columns:inherit;grid-auto-columns:inherit;column-gap:inherit;justify-content:start!important;justify-items:inherit;grid-template-rows:inherit;grid-auto-rows:inherit;row-gap:inherit;align-content:inherit;align-items:inherit}[part=slides]::slotted(*){scroll-snap-align:center}[part=controls]{display:grid;grid-template-columns:[left] 1fr [center] auto [right] 1fr;height:auto;padding-left:var(--padding-left);padding-right:var(--padding-right);align-content:center;align-items:center;justify-items:center;justify-content:stretch}[part=controls]:empty{display:none}@media print{:host>nav{display:none!important}}[part*=fullscreen-button]{vertical-align:baseline;overflow:hidden;z-index:2;grid-column:3;grid-row:1;justify-self:end;margin:.375em 0;width:0;min-width:0;line-height:inherit;text-decoration:none;padding:0 0 0 1.875em;height:1.875em;cursor:pointer;background-size:contain;background-position:50% 50%;background-repeat:no-repeat;background-color:transparent;background-image:url('data:image/svg+xml;utf8, ');border-width:0;border-radius:.3125em;color:inherit;transition:background-color .2s linear}[part*=fullscreen-button]:hover{transition:background-color .1s linear;background-color:#ffffff4d}[part*=fullscreen-button-active]{background-image:url('data:image/svg+xml;utf8, ')}:host(:fullscreen) [part*=fullscreen-button]{grid-column:auto;grid-row:auto;position:absolute;top:.75em;right:.75em;margin:0;bottom:auto}:host(:-webkit-full-screen) [part*=fullscreen-button]{grid-column:auto;grid-row:auto;position:absolute;top:.75em;right:.75em;margin:0;bottom:auto}[part=prev-button],[part=next-button]{vertical-align:baseline;overflow:hidden;position:absolute;top:50%;z-index:2;padding:0;width:0;min-width:0;line-height:inherit;text-decoration:none;padding-left:1.875rem;height:2.5rem;margin-top:-1.25rem;background-size:contain;background-position:50% 50%;background-repeat:no-repeat;background-color:transparent;border-width:0;border-radius:.3125rem;color:inherit;transition:background-color .2s linear;cursor:pointer}[part=prev-button]{left:.1875rem;background-image:url('data:image/svg+xml;utf8, ')}[part=next-button]{right:.1875rem;background-image:url('data:image/svg+xml;utf8, ')}[part=prev-button]:hover,[part=next-button]:hover{transition:background-color .1s linear;background-color:#ffffff4d}[part=pagination]{display:flex;justify-content:center;grid-column:2;grid-row:1;justify-self:center;margin:0;padding:.875em 0}[part*=page-button]{display:inline-block;padding:0 0 0 1.25em;height:1.25em;cursor:pointer;border-width:0;background-color:transparent;background-size:100% auto;background-position:50% 50%;background-image:url('data:image/svg+xml;utf8, ')}[part*=page-button-active]{background-image:url('data:image/svg+xml;utf8, ')}:host(:fullscreen) [part*=page-button-active]{background-image:url('data:image/svg+xml;utf8, ')}:host(:-webkit-full-screen) [part*=page-button-active]{background-image:url('data:image/svg+xml;utf8, ')}slot[name=optional]::slotted(*){grid-column:1;grid-row:1} diff --git a/build/slide-show-ul.js b/build/slide-show-ul.js index 3beaf0d..a23c424 100644 --- a/build/slide-show-ul.js +++ b/build/slide-show-ul.js @@ -1,7 +1,7 @@ /* slide-show 1.1.5 By Stephen Band - Built 2022-05-16 23:59 */ + Built 2022-05-18 15:08 */ -var qe=Object.defineProperty;var Mt=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var Dt=(t,e)=>{var n={};for(var o in t)We.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&Mt)for(var o of Mt(t))e.indexOf(o)<0&&$e.call(t,o)&&(n[o]=t[o]);return n};var G=(t,e)=>{for(var n in e)qe(t,n,{get:e[n],enumerable:!0})};function $(t){var e=new Map;return function(o){if(e.has(o))return e.get(o);var r=t(o);return e.set(o,r),r}}var Ne=Array.prototype;function Xe(t,e){return typeof t=="function"?t.apply(null,e):t}function Bt(t,e,n){n=n||t.length;var o=n===1?e?t:$(t):$(function(r){return Bt(function(){var i=[r];return i.push.apply(i,arguments),t.apply(null,i)},e,n-1)});return function r(i){return arguments.length===0?r:arguments.length===1?o(i):arguments.length>=n?t.apply(null,arguments):Xe(o(i),Ne.slice.call(arguments,1))}}var w=Bt;function Ye(t,e){return 1-Math.pow(1-e,t)}var Gt=w(Ye);function v(){}function at(t,e){return e(t)}function S(t){return t}var Ke=Array.prototype;function pt(){let t=arguments;return t.length?e=>Ke.reduce.call(t,at,e):S}function ft(t,e,n){return n*(e-t)+t}var Ze=window.performance,zt=window.requestAnimationFrame,Qe=window.cancelAnimationFrame;function dt(t,e,n){var o=Ze.now();function r(s){var u=(s-o)/(t*1e3);u<1?(u>0&&e(u),i=zt(r)):(e(1),n&&n())}var i=zt(r);return function(){Qe(i)}}function N(t,e,n,o,r,i){let s=o[n];return dt(t,pt(e,u=>ft(s,r,u),u=>o[n]=u),i)}function Je(){return{x:0,y:0,left:0,top:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}}function T(t){return t===window?Je():t.getClientRects()[0]||t.getBoundingClientRect()}var I={scrollDuration:.3,scrollDurationPerHeight:.125,scrollTransform:Gt(3)},_t=v;function tn(t,e){if(e.behavior==="smooth"){let n=t.style.getPropertyValue("scroll-snap-type"),o=()=>t.style.setProperty("scroll-snap-type",n);if(t.style.setProperty("scroll-snap-type","none"),e.left!==void 0){let r=t===document.body?window.innerWidth:T(t).width,i=I.scrollDuration+I.scrollDurationPerHeight*Math.abs(e.left-t.scrollLeft)/r;_t=N(i,I.scrollTransform,"scrollLeft",t,e.left,o)}else{let r=t===document.body?window.innerHeight:T(t).height,i=I.scrollDuration+I.scrollDurationPerHeight*Math.abs(e.top-t.scrollTop)/r;_t=N(i,I.scrollTransform,"scrollTop",t,e.top,o)}}else e.left!==void 0&&(t.scrollLeft=e.left),e.top!==void 0&&(t.scrollTop=e.top)}if(!("scrollBehavior"in document.documentElement.style)){console.log("Polyfilling Element.scrollTo(options).");let t="scrollTo"in Element.prototype?Element:HTMLElement,e=t.scrollIntoView;t.prototype.scrollTo=function(n){typeof n=="object"?tn(this,n):e.apply(this,arguments)}}function y(t,e){return function(){let o=t.apply(this,arguments),r=e[o]||e.default;if(!r)throw new Error('overload() no handler for "'+o+'"');return r.apply(this,arguments)}}var en=y(S,{is:v,tag:v,html:function(t,e,n){e.innerHTML=n},text:function(t,e,n){e.textContent=n},children:function(t,e,n){e.innerHTML="",n.forEach(o=>{e.appendChild(o)})},points:j,cx:j,cy:j,r:j,preserveAspectRatio:j,viewBox:j,default:function(t,e,n){t in e?e[t]=n:e.setAttribute(t,n)}});function j(t,e,n){e.setAttribute(t,n)}function nn(t,e){for(var n=Object.keys(e),o=n.length;o--;)en(n[o],t,e[n[o]]);return t}var mt=w(nn,!0);var on="http://www.w3.org/2000/svg",Rt=document.createElement("div");var Ut=(t,e)=>e&&typeof e;function Vt(t,e){let n=document.createRange();return n.selectNode(t),n.createContextualFragment(e)}function L(t,e){var n=document.createElementNS(on,t);return e&&(n.innerHTML=e),n}var rn=y(S,{comment:function(t,e){return document.createComment(e||"")},fragment:y(Ut,{string:function(t,e,n){if(n)return Vt(n,e);let o=document.createDocumentFragment();Rt.innerHTML=e;let r=Rt.childNodes;for(;r[0];)o.appendChild(r[0]);return o},object:function(t,e,n){let o=n?Vt(n):document.createDocumentFragment();return typeof e.length=="number"?o.append.apply(o,e):mt(o,e),o},default:()=>document.createDocumentFragment()}),text:function(t,e){return document.createTextNode(e||"")},circle:L,ellipse:L,g:L,glyph:L,image:L,line:L,rect:L,use:L,path:L,pattern:L,polygon:L,polyline:L,svg:L,default:y(Ut,{string:function(t,e){let n=document.createElement(t);return n.innerHTML=e,n},object:function(t,e){let n=document.createElement(t);return typeof e.length=="number"?n.append.apply(n,e):mt(n,e),n},default:t=>{if(typeof t!="string")throw new Error('create(tag, content) accepts only a string as tag "'+typeof t+'"');return document.createElement(t)}})}),b=rn;function ht(t,e,n){let o;typeof n!="string"&&n.input!==void 0&&n.index!==void 0&&(o=n,n=o.input.slice(n.index+n[0].length+(n.consumed||0)));let r=t.exec(n);if(!r)return;let i=e(r);return o&&(o.consumed=(o.consumed||0)+r.index+r[0].length+(r.consumed||0)),i}var fr=w(ht,!0);function sn(t,e,n){throw n.input!==void 0&&n.index!==void 0&&(n=n.input),new Error('Cannot parse string "'+n+'"')}function cn(t,e,n){let o=-1;for(;++ocn(e,n,i),o);return r===void 0?e.catch?e.catch(n,o):sn(t,e,o):r}var qt=w(un,!0);var gt=v;var k=Symbol("internals"),O=Symbol("shadow"),Wt=Object.defineProperties,ln={a:HTMLAnchorElement,dl:HTMLDListElement,p:HTMLParagraphElement,br:HTMLBRElement,fieldset:HTMLFieldSetElement,hr:HTMLHRElement,img:HTMLImageElement,li:HTMLLIElement,ol:HTMLOListElement,optgroup:HTMLOptGroupElement,q:HTMLQuoteElement,textarea:HTMLTextAreaElement,td:HTMLTableCellElement,th:HTMLTableCellElement,tr:HTMLTableRowElement,tbody:HTMLTableSectionElement,thead:HTMLTableSectionElement,tfoot:HTMLTableSectionElement,ul:HTMLUListElement},an={name:{set:function(t){return this.setAttribute("name",t)},get:function(){return this.getAttribute("name")||""}},form:{get:function(){return this[k].form}},labels:{get:function(){return this[k].labels}},validity:{get:function(){return this[k].validity}},validationMessage:{get:function(){return this[k].validationMessage}},willValidate:{get:function(){return this[k].willValidate}},checkValidity:{value:function(){return this[k].checkValidity()}},reportValidity:{value:function(){return this[k].reportValidity()}}},pn={},$t={once:!0},fn=0,Nt=!1;function dn(t){return ln[t]||window["HTML"+t[0].toUpperCase()+t.slice(1)+"Element"]||(()=>{throw new Error('Constructor not found for tag "'+t+'"')})()}var mn=qt(/^\s*?\s*$|^\s*?\s*$/,{1:(t,e)=>({name:e[1]}),2:(t,e)=>({name:e[3],tag:e[2]}),catch:function(t,e){throw new SyntaxError(`dom element() – name must be of the form 'element-name' or 'tag is="element-name"' (`+e+")")}},null);function hn(t,e){if(t.hasOwnProperty(e)){let n=t[e];delete t[e],t[e]=n}return t}function gn(t,e,n){t._initialLoad=!0;let o=t.attachShadow({mode:e.mode||"closed",delegatesFocus:e.focusable||!1});if(n){let r=b("link",{rel:"stylesheet",href:n});o.append(r)}return t[O]=o,o}function wn(t){var e;if(t.attachInternals){if(e=t.attachInternals(),e.setFormValue)return e}else e={shadowRoot:t.shadowRoot};return e.input=b("input",{type:"hidden",name:t.name}),t.appendChild(e.input),e.setFormValue=function(n){this.input.value=n},e}function vn(t){t._initialAttributes={},t._n=0}function yn(t,e,n){let o=t._initialAttributes;for(;t._nfn?gn(p,e,o||e.stylesheet):void 0,c=l.formAssociated&&wn(p);return i&&(Nt=!0),e.construct&&e.construct.call(p,a,c),u&&(vn(p),Promise.resolve(1).then(function(){Xt(p,l.observedAttributes,u)})),f&&Object.keys(f).reduce(hn,p),p}return l.prototype=Object.create(s.prototype,f),f&&f.value&&(l.formAssociated=!0,Wt(l.prototype,an),(e.enable||e.disable)&&(l.prototype.formDisabledCallback=function(p){return p?e.disable&&e.disable.call(this,this[O],this[k]):e.enable&&e.enable.call(this,this[O],this[k])}),e.reset&&(l.prototype.formResetCallback=function(){return e.reset.call(this,this[O],this[k])}),e.restore&&(l.prototype.formStateRestoreCallback=function(){return e.restore.call(this,this[O],this[k])})),u&&(l.observedAttributes=Object.keys(u),l.prototype.attributeChangedCallback=function(p,a,c){if(!this._initialAttributes)return u[p].call(this,c);this._initialAttributes[p]=c,yn(this,l.observedAttributes,u)}),l.prototype.connectedCallback=function(){let p=this,a=p[O],c=p[k];if(p._initialAttributes&&Xt(p,l.observedAttributes,u),p._initialLoad){let E=a.querySelectorAll('link[rel="stylesheet"]');if(E.length){let ze=0,lt=E.length,Ht=function(Ue){++ze>=E.length&&(delete p._initialLoad,e.load&&(gt("element()","loaded",Array.from(E).map(Ve=>Ve.href).join(` -`)),e.load.call(p,a)))},_e=Ht;for(;lt--;)E[lt].addEventListener("load",Ht,$t),E[lt].addEventListener("error",_e,$t);e.connect&&e.connect.call(this,a,c)}else e.connect&&e.connect.call(this,a,c),e.load&&e.load.call(this,a,c)}else e.connect&&e.connect.call(this,a,c)},e.disconnect&&(l.prototype.disconnectedCallback=function(){return e.disconnect.call(this,this[O],this[k])}),gt("element()","<"+(i?i+" is="+r:r)+">"),window.customElements.define(r,l,i&&{extends:i}),i&&!Nt&&document.querySelectorAll('[is="'+r+'"]').forEach(p=>{Wt(p,f),e.construct&&e.construct.apply(p);let a;for(a in u){let c=p.attributes[a];c&&u[a].call(p,c.value)}e.connect&&e.connect.apply(p)}),l}function Kt(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object")return!1;let n=Object.keys(t),o=Object.keys(e),r=n.length;for(;r--;){if(t[n[r]]===void 0){if(e[n[r]]!==void 0)return!1}else if(!e.hasOwnProperty(n[r])||!Kt(t[n[r]],e[n[r]]))return!1;let i=o.indexOf(n[r]);i>-1&&o.splice(i,1)}for(r=o.length;r--;)if(e[o[r]]===void 0){if(t[o[r]]!==void 0)return!1}else return!1;return!0}var Zt=w(Kt,!0);function En(t,e){return e[t]}var H=w(En,!0);var Sn=Object.freeze;function Qt(){return this}var M=Sn({shift:v,push:v,forEach:v,join:function(){return""},map:Qt,filter:Qt,reduce:function(t,e){return e},length:0,each:v,pipe:S,start:v,stop:v,done:v,valueOf:function(){return null}});function vt(){return this}function yt(t){return t&&t[Symbol.iterator]}var Tn=Object.assign;function Ln(t){return t.stop?t.stop():t()}function kn(t){t.forEach(Ln),t.length=0}function D(){}Tn(D.prototype,{stop:function(){return this.stopables&&kn(this.stopables),this},done:function(e){return(this.stopables||(this.stopables=[])).push(e),this}});var Pn=Object.assign;function X(t){D.prototype.stop.apply(t);let e=-1,n;for(;n=t[++e];)t[e]=void 0,X(n)}function m(){}Pn(m.prototype,{pipe:function(t){return this[0]=t,t},stop:function(){return X(this[0]),this}});var P=Object.assign,F=Object.create;function z(t,e){e!==void 0&&t[0].push(e)}function Fn(t,e){if(t[1]){let n=-1;for(;t[++n]&&t[n]!==e;);for(;t[n++];)t[n-1]=t[n];X(e)}else t.stop()}function h(t){this.input=t}P(h.prototype,D.prototype,{push:function(t){z(this,t)},pipe:function(t){if(this[0])throw new Error("Stream: Attempt to .pipe() a unicast stream multiple times. Create a multicast stream with stream.broadcast().");return this[0]=t,this.input.pipe(this),t},map:function(t){return new Jt(this,t)},filter:function(t){return new te(this,t)},chunk:function(t){return new ne(this,t)},flatMap:function(t){return new ee(this,t)},take:function(t){return new oe(this,t)},each:function(t){return new se(this,t)},reduce:function(t,e){return new re(this,t,e)},scan:function(t,e){return new ie(this,t,e)},stop:function(){return Fn(this.input,this),this}});function Jt(t,e){this.input=t,this.fn=e}Jt.prototype=P(F(h.prototype),{push:function(e){let n=this.fn;z(this,n(e))}});function te(t,e){this.input=t,this.fn=e}te.prototype=P(F(h.prototype),{push:function(e){this.fn(e)&&z(this,e)}});function ee(t,e){this.input=t,this.fn=e}ee.prototype=P(F(h.prototype),{push:function(e){let o=this.fn(e);if(o!==void 0)if(yt(o))for(let r of o)z(this,r);else throw new Error("Stream: Cannot .flatMap() non-iterable values")}});function ne(t,e){this.input=t,this.chunk=[],typeof e=="number"?this.n=e:typeof e=="function"&&(this.fn=e)}ne.prototype=P(F(h.prototype),{fn:function(t){return t.length===this.n},push:function(e){let n=this.chunk;n.push(e),this.fn(n)&&(z(this,n),this.chunk=[])}});function oe(t,e){this.input=t,this.count=e}oe.prototype=P(F(h.prototype),{push:function(e){this[0].push(e),--this.count||this.stop()}});function re(t,e,n){return this.input=t,this.fn=e,this.value=n,this.i=0,t.pipe(this),n}re.prototype=P(F(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t,this.i++,this)}});function ie(t,e,n){this.input=t,this.fn=e,this.value=n}ie.prototype=P(F(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t),this[0].push(this.value)}});function se(t,e){this.input=t,this.push=e,t.pipe(this)}se.prototype=P(F(h.prototype),{each:null,reduce:null,pipe:null});var On=Array.prototype,An=Object.assign,Cn=Object.create;function _(t){this.buffer=t||[]}_.prototype=An(Cn(h.prototype),m.prototype,{push:function(t){t!==void 0&&this.buffer.push(t)},pipe:function(t){for(this[0]=t;this.buffer.length;)this[0].push(On.shift.apply(this.buffer));return this.buffer=this[0],t}});var In=Object.assign,jn=Object.create;function R(t,e){this.input=t,this.memory=!!(e&&e.memory),e&&e.hot&&this.pipe(M)}R.prototype=In(jn(h.prototype),{push:function(t){if(t!==void 0){this.memory&&(this.value=t);let e=-1;for(;this[++e];)this[e].push(t)}},pipe:function(t){let e=-1;for(;this[++e];);return this[e]=t,this.value!==void 0&&t.push(this.value),e===0&&this.input.pipe(this),t}});var Hn=Object.assign;function Y(t){this.promise=t}Hn(Y.prototype,m.prototype,{pipe:function(t){let e=this.promise;this[0]=t,e.then(n=>this[0].push(n)).finally(n=>this.stop())},stop:function(){m.prototype.stop.apply(this,arguments),this[0]=M}});var ue=Object.assign,le=Object.keys;function ce(t,e,n){let o=t.values,r=t.names,i=t[0];o[e]=n,(t.active||(t.active=le(o).length===r.length))&&i.push(ue({},o))}function K(t){this.inputs=t,this.active=!1}ue(K.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this.values={},this.names=le(e),this[0]=t;for(let n in e){let o=e[n];o.pipe?t.done(o.each(r=>ce(this,n,r))):o.then?o.then(r=>ce(this,n,r)):console.log("Todo: combine() raw values ?")}}});var Mn=Object.assign;function Z(t){this.inputs=t}Mn(Z.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this[0]=t;let n=-1,o;for(;o=e[++n];)if(o.pipe)o.pipe(t);else if(o.then)o.then(r=>t.push(r));else{let r=-1;for(;++r0}function Gn(t,e,n){return t[n]=e.shift(),t}function zn(t){return[]}function bt(t,e,n,o){n.push(o),e.every(Bn)&&t.push(e.reduce(Gn,{}))}function Q(t){this.inputs=t,this.buffers=xt.map.call(t,zn)}Dn(Q.prototype,m.prototype,{pipe:function(t){let e=this.inputs,n=this.buffers;this[0]=t,xt.forEach.call(e,(o,r)=>{let i=n[r];o.each?t.done(o.each(s=>bt(t,n,i,s))):o.then?o.then(s=>bt(t,n,i,s)):xt.forEach.call(o,s=>bt(t,n,i,s))})},stop:function(){let t=this.inputs,e=-1,n;for(;n=t[++e];)n.stop();return m.prototype.stop.apply(this,arguments)}});var _n=Array.prototype,ae=Object.assign;function Rn(t){throw new TypeError("Stream: invalid source object cannot be read into stream")}var g=ae(h,{of:function(){return new _(_n.slice.apply(arguments))},from:function(t){return t.pipe?new h(t):t.then?new h(new Y(t)):typeof t.length=="number"?new _(t):Rn(t)},broadcast:function(e){return new R(M,e)},combine:function(e){return new h(new K(e))},merge:function(){return new h(new Z(arguments))},zip:function(){return new h(new Q(arguments))}});ae(h.prototype,{log:vt,broadcast:function(t){return new R(this,t)}});var Un=Object.assign,Vn=/\s+/,pe={fullscreenchange:"fullscreenElement"in document?"fullscreenchange":"webkitFullscreenElement"in document?"webkitfullscreenchange":"fullscreenchange"};function fe(t){return t.which===1&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}var de=0;window.addEventListener("click",t=>de=t.timeStamp);function qn(t,e){return t.node.addEventListener(pe[e]||e,t,t.options),t}function Wn(t,e){return t.node.removeEventListener(pe[e]||e,t),t}function me(t,e,n){this.types=t.split(Vn),this.options=e,this.node=n,this.select=e&&e.select}Un(me.prototype,m.prototype,{pipe:function(t){this[0]=t,this.types.reduce(qn,this)},handleEvent:function(t){if(!(t.type==="click"&&t.timeStamp<=de)){if(this.select){let e=t.target.closest(this.select);if(!e)return;t.selectedTarget=e}this[0].push(t)}},stop:function(){this.types.reduce(Wn,this),m.prototype.stop.apply(this,arguments)}});function x(t,e){let n;return typeof t=="object"&&(n=t,t=n.type),new g(new me(t,n,e))}function Et(t){return typeof t}var $n=/^\s*([+-]?\d*\.?\d+)([^\s\d]*)\s*$/;function Nn(t,e){if(typeof e=="number")return e;var n=$n.exec(e);if(!n||!t[n[2]||""]){if(!t.catch)throw new Error('Cannot parse value "'+e+'" with provided units '+Object.keys(t).join(", "));return n?t.catch(parseFloat(n[1]),n[2]):t.catch(parseFloat(e))}return t[n[2]||""](parseFloat(n[1]))}var J=w(Nn);var Xn=/px$/,he={"transform:translateX":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[4])},"transform:translateY":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[5])},"transform:scale":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.sqrt(o*o+r*r)},"transform:rotate":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.atan2(r,o)}};function tt(t){return t.split("(")[1].split(")")[0].split(/\s*,\s*/)}function U(t,e){return window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):0}function et(t,e){if(he[t])return he[t](e);var n=U(t,e);return typeof n=="string"&&Xn.test(n)?parseFloat(n):n}var nt,ot;function Yn(){if(!nt){let t=document.documentElement.style.fontSize;document.documentElement.style.fontSize="100%",nt=et("font-size",document.documentElement),document.documentElement.style.fontSize=t||""}return nt}function Kn(){return ot||(ot=et("font-size",document.documentElement)),ot}window.addEventListener("resize",()=>{nt=void 0,ot=void 0});var A=y(Et,{number:S,string:J({em:function(t){return Yn()*t},px:function(t){return t},rem:function(t){return Kn()*t},vw:function(t){return window.innerWidth*t/100},vh:function(t){return window.innerHeight*t/100},vmin:function(t){return window.innerWidthn?o:n}n=nq.maxScrollInterval?q.maxScrollInterval:1.4*n}function it(){return ye}function xe(t){let e=T(t),n=window.getComputedStyle(t,null),o=A(n.getPropertyValue("padding-left")),r=A(n.getPropertyValue("padding-right"));return e.leftPadding=e.left+o,e.rightPadding=e.left+e.width-r,e.centrePadding=e.leftPadding+(e.width-o-r)/2,e}function Ee(t){let e=window.getComputedStyle(t,null).getPropertyValue("scroll-snap-align");return e.endsWith("start")?"left":e.endsWith("end")?"right":"centre"}function Se(t,e,n){let o=xe(t),r=T(e),i=Ee(e);t.scrollTo({top:t.scrollTop,left:t.scrollLeft+(i==="left"?r.left-o.leftPadding:i==="right"?r.right-o.rightPadding:r.left+r.width/2-o.centrePadding),behavior:n})}function Te(t,e){return Se(t,e,"smooth"),e}function B(t,e){return t.style.setProperty("scroll-behavior","auto","important"),Se(t,e,"auto"),t.style.setProperty("scroll-behavior",""),e}function Le(t,e){let{leftPadding:n,rightPadding:o,centrePadding:r}=xe(t),i=e.length,s;for(;s=e[--i];){let u=T(s);if(!u)continue;let f=Ee(s),l=u.width/2+(f==="left"?n:f==="right"?o:r);if((f==="left"?u.left:f==="right"?u.right:u.left+u.width/2)<=l)break}return s}function ke(t){return!!t.dataset.slideIndex}function Pe(t){let{scroller:e,elements:n,children:o}=t,r=Le(e,n);return ke(r)?o[r.dataset.slideIndex]:r}function Fe(t){let{scroller:e,children:n,elements:o}=t,r=Le(e,o),i;!r||(ke(r)?(i=n[r.dataset.slideIndex],B(e,i)):i=r,t.activations.push(i))}function to(t,e){t.style.setProperty("scroll-snap-type",""),e.stop()}var Oe=y((t,e)=>e.type,{pointerdown:function(t,e){return t.e0=e,t.x0=e.clientX,t.y0=e.clientY,t},pointermove:function(t,e){let n=e.clientX,o=e.clientY;if(!t.gesturing){if(Math.abs(n-t.x0)(clearTimeout(s),setTimeout(to,it()*1e3,n,l)))}return t.gesturing=!1,t.e0=void 0,t.x0=void 0,t.y0=void 0,t.pointers=void 0,t.scrollLeft0=void 0,t}});var eo=Object.assign,no={capture:!0,passive:!0};function oo(t,e){t.timer=void 0,t.stream.push(e);let n=t.times;n.length>1&&be(n),n.length=0}function Ae(t){this.element=t,this.times=[]}eo(Ae.prototype,m.prototype,{pipe:function(t){this.stream=t,this.element.addEventListener("scroll",this,no)},handleEvent:function(t){let e=t.timeStamp/1e3;this.times.push(e),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(oo,it()*1e3,this,t)},stop:function(){this.element.removeEventListener("scroll",this),m.prototype.stop.apply(this,arguments)}});function kt(t){return new g(new Ae(t))}function ro(t,e,n){let o=n.length,r=-1/0;for(;o--;){let l=T(n[o]),p=l.x+l.width;r=p>r?p:r}let i=T(e),s=getComputedStyle(t),u=A(s.paddingLeft||0),f=A(s.paddingRight||0);return u+f+r-i.x}function io(t,e,n){let o=ro(t,e,n);t.style.setProperty("--scroll-width",o+"px")}function so(t){return!t.dataset.slideIndex}var Ce={construct:function(t){let e=b("slot",{part:"slides"}),n=b("div",{class:"scroller",children:[e]}),o=b("nav",{part:"controls",children:[b("slot",{name:"controls"})]});t.append(n,o);let r=g.of(),i=g.combine({host:r,elements:x("slotchange",e).map(c=>a.elements=e.assignedElements())}).broadcast({memory:!0}),s=i.map(c=>{let E=c.elements.filter(so);return Zt(a.children,E)?void 0:a.children=E}).broadcast({memory:!0}),u=g.of(null),f=g.of(),l=f.filter(c=>a.active!==c&&Lt("slide-active",c)).map(c=>a.active=c).broadcast({memory:!0,hot:!0}),p=x("click",t).filter(fe).broadcast(),a=this[d]={clickSuppressTime:-1/0,host:this,style:window.getComputedStyle(this),scroller:n,slides:e,controls:o,load:r,views:u,activations:f,actives:l,slotchanges:i,mutations:s,clicks:p};g.merge(i,x("resize",window)).each(c=>io(n,e,a.elements)),g.combine({children:s,child:u}).map(c=>!a.active||a.active===c.child?B(n,c.children.includes(c.child)?c.child:c.children[0]):(Te(n,c.child),c.child.dataset.slideIndex?c.children[c.child.dataset.slideIndex]:c.child)).pipe(f),kt(n).filter(()=>!a.gesturing).each(c=>Fe(a)),Tt({threshold:"0.25rem",device:"mouse"},t).filter(()=>a.children.length>1).each(c=>{a.pointers=c,c.reduce(Oe,a)}),p.each(c=>{c.timeStamp-a.clickSuppressTime<120&&(c.preventDefault(),c.stopPropagation())}),x("fullscreenchange",window).each(c=>{(c.target===this||c.target.contains(this))&&B(n,a.active)}),x("focusin",this).map(c=>a.children.indexOf(c.target)!==-1?c.target:a.children.find(E=>E.contains(c.target))).pipe(u),x("keydown",this).filter(()=>document.activeElement===this||this.contains(document.activeElement)).map(y(H("keyCode"),{37:c=>(c.preventDefault(),a.elements[a.elements.indexOf(a.active)-1]),39:c=>(c.preventDefault(),a.elements[a.elements.indexOf(a.active)+1]),default:v})).pipe(u)},load:function(t){this[d].load.push(this)}};function st(t,e){function n(o,r){if(t.getState(o)!==r)return t[r?"enable":"disable"](o)}return{attribute:function(o){return n(this,o!==null)},set:function(o){return n(this,!!o)},get:function(){return t.getState(this)}}}function Pt(t,e){t.remove&&t.remove(e);let n;for(;(n=t.indexOf(e))!==-1;)t.splice(n,1);return e}var ls=w(Pt,!0);var co=Object.assign;function W(t,e){this.element=t,this.definitions=e,this.tokens=[]}co(W.prototype,{contains:function(t){return this.tokens.includes(t)},add:function(){let t=arguments.length;for(;t--;){let e=arguments[t];!this.tokens.includes(e)&&this.definitions[e]&&(this.definitions[e].enable(this.element),this.tokens.push(e))}},remove:function(){let t=arguments.length;for(;t--;){let e=arguments[t];this.tokens.includes(e)&&(this.definitions[e].disable(this.element),Pt(this.tokens,e))}},supports:function(t){return!!this.definitions[t]}});var uo=Array.prototype;function lo(t,e){let n=t.tokens.slice(),o=uo.slice.apply(e),r=n.length;for(;r--;)o.includes(n[r])&&n.splice(r,1);t.remove.apply(t,n),t.add.apply(t,o)}function Ft(t){let e=Symbol("TokenList");function n(o,r){let i=o[e]||(o[e]=new W(o,t));lo(i,r.trim().split(/\s+/))}return{attribute:function(o){n(this,o||"")},set:function(o){n(this,o+"")},get:function(){return this[e]||(this[e]=new W(this,t))}}}var Ot={};G(Ot,{disable:()=>ho,enable:()=>mo,getState:()=>go});var ao=J({s:S,ms:t=>t/1e3});function po(t){let{active:e,children:n,elements:o,host:r}=t,i=o.indexOf(e),s=o[i+1]||n[0];t.autoplay.timer=null,!!s&&(r.active=s)}function fo(t){let{active:e,style:n}=t,o=ao(window.getComputedStyle(e).getPropertyValue("--slide-duration")||n.getPropertyValue("--slide-duration"));clearTimeout(t.autoplay.timer),t.autoplay.timer=setTimeout(po,o*1e3,t)}function Ie(t){clearTimeout(t.autoplay.timer),t.autoplay.timer=null}function mo(t){let e=t[d],{actives:n}=e,o=e.autoplay={},r=g.merge([!1],x("pointerenter pointerleave",t).map(s=>s.type==="pointerenter")),i=g.merge([t.contains(document.activeElement)],x("focusin focusout",t).map(y(H("type"),{focusin:s=>!0,focusout:s=>t.contains(s.relatedTarget)}))).map((s=>u=>s===u?void 0:s=u)());o.updates=g.combine({active:n,hover:r,focus:i}).each(s=>s.hover||s.focus?Ie(e):fo(e))}function ho(t){let e=t[d];Ie(e),e.autoplay.updates.stop(),e.autoplay=void 0}function go(t){return!!t[d].autoplay}var At={};G(At,{disable:()=>yo,enable:()=>vo,getState:()=>bo});function je(t,e){let n=t.cloneNode(!0);return n.dataset.slideIndex=e,n.removeAttribute("id"),n.setAttribute("aria-hidden","true"),n.tabIndex="-1",n}function wo(t){let{active:e,children:n,host:o,scroller:r}=t;if(t.loop.prepends&&(t.loop.prepends.forEach(c=>c.remove()),t.loop.appends.forEach(c=>c.remove()),t.loop.prepends=void 0,t.loop.appends=void 0),n.length<2){t.elements=t.slides.assignedElements();return}let i=o.clientWidth,s=n.map(T),u=s[1].left,f=s[s.length-2].right,l=1;for(;s[++l]&&s[l].leftf-i;);let a=n.slice(++l).map((c,E)=>je(c,l+E));o.prepend.apply(o,a),o.append.apply(o,p),t.loop.prepends=a,t.loop.appends=p,t.elements=t.slides.assignedElements(),B(r,e||n[0])}function vo(t){let e=t[d],{mutations:n}=e,o=e.loop={};o.renders=n.each(r=>wo(e))}function yo(t){let e=t[d];e.loop&&(e.loop.prepends&&e.loop.prepends.forEach(n=>n.remove()),e.loop.appends&&e.loop.appends.forEach(n=>n.remove()),e.loop.renders.stop(),e.loop=void 0)}function bo(t){return!!t[d].loop}var Ct={};G(Ct,{disable:()=>Eo,enable:()=>xo,getState:()=>So});function C(t){if(typeof t!="object"||arguments.length>1)throw new Error("delegate() now takes an object of selector:fn pairs.");let e=Object.keys(t);return function(o){let r=o.target,i=-1;for(;e[++i];){let s=r.closest(e[i]);if(s)return t[e[i]](s,...arguments)}}}function He(t,e,n,o){o===0?t.hidden=!0:t.hidden=!1,o===n.length-1?e.hidden=!0:e.hidden=!1}function xo(t){let e=t[d],{actives:n,clicks:o,slotchanges:r}=e,i=e.navigation={prev:b("button",{part:"prev-button",type:"button",name:"navigation",value:"-1",html:"Previous"}),next:b("button",{part:"next-button",type:"button",name:"navigation",value:"1",html:"Next"})};e.controls.prepend(i.prev,i.next),i.updates=g.combine({active:n,changes:r}).each(s=>He(i.prev,i.next,s.changes.elements,s.changes.elements.indexOf(s.active))),i.clicks=o.each(C({'[name="navigation"]':function(s,u){let f=parseFloat(s.value),l=e.elements.indexOf(e.active)+f,p=e.elements[l];!p||(t.active=p,He(i.prev,i.next,e.elements,l))}}))}function Eo(t){let e=t[d];e.navigation.prev.remove(),e.navigation.next.remove(),e.navigation.updates.stop(),e.navigation.clicks.stop(),e.navigation=void 0}function So(t){return!!t[d].navigation}var It={};G(It,{disable:()=>ko,enable:()=>Lo,getState:()=>Po});function Me(t,e,n){let{active:o,buttons:r,index:i}=t;if(o===n)return;i>-1&&(t.activeSpan.remove(),r.children[i].part.remove("page-button-active"));let s=e.indexOf(n);s!==-1&&(r.children[s].part.add("page-button-active"),r.children[s].append(t.activeSpan),t.index=s,t.active=n)}function To(t,e,n,o){return e.buttons&&(e.buttons.remove(),e.buttons=void 0),o.length<2||(e.buttons=b("div",{part:"pagination",children:o.map((r,i)=>b("button",{part:"page-button",type:"button",name:"pagination",value:i}))}),t.append(e.buttons)),o.length}function Lo(t){let e=t[d],{shadow:n,actives:o,clicks:r,mutations:i}=e,s=e.pagination={activeSpan:b("span",{class:"invisible",text:"(Current slide)"})};s.mutations=i.each(()=>To(e.controls,s,n,e.children)),s.updates=g.combine({active:o,children:i}).filter(u=>u.children.length>1).each(u=>Me(s,e.children,e.active)),s.clicks=r.each(C({'[name="pagination"]':function(u,f){let{host:l}=e,p=e.children,a=p[u.value];!a||(l.active=a,Me(s,p,a))}}))}function ko(t){let e=t[d];e.pagination.buttons.remove(),e.pagination.mutations.stop(),e.pagination.updates.stop(),e.pagination.clicks.stop(),e.pagination=void 0}function Po(t){return!!t[d].pagination}var jt={};G(jt,{disable:()=>Oo,enable:()=>Fo,getState:()=>Ao});var De=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled;function ct(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement}function Be(t){return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():void 0}function ut(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}function Fo(t){let e=t[d];if(!De)return;let n=e.fullscreen={button:b("button",{part:"fullscreen-button",type:"button",name:"fullscreen",html:"Open in fullscreen"})};e.controls.append(n.button),n.changes=x("fullscreenchange",t).filter(o=>ct()===t).each(o=>{n.button.part.add("fullscreen-button-active"),n.button.innerHTML="Close fullscreen",document.activeElement!==t&&(n.tabIndex=t.tabIndex,t.tabIndex<0&&(t.tabIndex=0),t.focus());let r=x("fullscreenchange",t).each(i=>{n.button.part.remove("fullscreen-button-active"),n.button.innerHTML="Open in fullscreen",t.tabIndex=n.tabIndex,n.tabIndex=void 0,r.stop()})}),n.clicks=e.clicks.each(C({'[name="fullscreen"]':(o,r)=>{let i=ct();if(i===t){ut();return}i&&ut(),Be(t)}}))}function Oo(t){let e=t[d];ct()===t&&ut(),e.fullscreen.button.remove(),e.fullscreen.clicks.stop(),e.fullscreen.changes.stop(),e.fullscreen=void 0}function Ao(t){return!!t[d].fullscreen}var Ge={active:{attribute:function(t){this.active=t},set:function(t){let e=this[d],n=typeof t=="object"?t:/^\d/.test(t+"")?this.querySelector("#\\3"+(t+"")[0]+" "+(t+"").slice(1)):/^\#/.test(t+"")?this.querySelector(t):this.querySelector("#"+t);if(!n)throw new Error("Cannot set active – not a child of slide-show");e.views.push(n)},get:function(){return this[d].active}},autoplay:st(Ot,"autoplay"),controls:Ft({navigation:Ct,pagination:It,fullscreen:jt}),loop:st(At,"loop")};var Co=import.meta.url.replace(/\/[^\/]*\.js/,"/slide-show-shadow.css"),Qs=wt('
        ',Ce,Ge,Co);export{Qs as default}; +var qe=Object.defineProperty;var Mt=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var Dt=(t,e)=>{var n={};for(var o in t)We.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&Mt)for(var o of Mt(t))e.indexOf(o)<0&&$e.call(t,o)&&(n[o]=t[o]);return n};var G=(t,e)=>{for(var n in e)qe(t,n,{get:e[n],enumerable:!0})};function $(t){var e=new Map;return function(o){if(e.has(o))return e.get(o);var r=t(o);return e.set(o,r),r}}var Ne=Array.prototype;function Xe(t,e){return typeof t=="function"?t.apply(null,e):t}function Bt(t,e,n){n=n||t.length;var o=n===1?e?t:$(t):$(function(r){return Bt(function(){var i=[r];return i.push.apply(i,arguments),t.apply(null,i)},e,n-1)});return function r(i){return arguments.length===0?r:arguments.length===1?o(i):arguments.length>=n?t.apply(null,arguments):Xe(o(i),Ne.slice.call(arguments,1))}}var w=Bt;function Ye(t,e){return 1-Math.pow(1-e,t)}var Gt=w(Ye);function v(){}function at(t,e){return e(t)}function S(t){return t}var Ke=Array.prototype;function pt(){let t=arguments;return t.length?e=>Ke.reduce.call(t,at,e):S}function ft(t,e,n){return n*(e-t)+t}var Ze=window.performance,zt=window.requestAnimationFrame,Qe=window.cancelAnimationFrame;function dt(t,e,n){var o=Ze.now();function r(s){var l=(s-o)/(t*1e3);l<1?(l>0&&e(l),i=zt(r)):(e(1),n&&n())}var i=zt(r);return function(){Qe(i)}}function N(t,e,n,o,r,i){let s=o[n];return dt(t,pt(e,l=>ft(s,r,l),l=>o[n]=l),i)}function Je(){return{x:0,y:0,left:0,top:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}}function T(t){return t===window?Je():t.getClientRects()[0]||t.getBoundingClientRect()}var H={scrollDuration:.3,scrollDurationPerHeight:.125,scrollTransform:Gt(3)},_t=v;function tn(t,e){if(e.behavior==="smooth"){let n=t.style.getPropertyValue("scroll-snap-type"),o=()=>t.style.setProperty("scroll-snap-type",n);if(t.style.setProperty("scroll-snap-type","none"),e.left!==void 0){let r=t===document.body?window.innerWidth:T(t).width,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.left-t.scrollLeft)/r;_t=N(i,H.scrollTransform,"scrollLeft",t,e.left,o)}else{let r=t===document.body?window.innerHeight:T(t).height,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.top-t.scrollTop)/r;_t=N(i,H.scrollTransform,"scrollTop",t,e.top,o)}}else e.left!==void 0&&(t.scrollLeft=e.left),e.top!==void 0&&(t.scrollTop=e.top)}if(!("scrollBehavior"in document.documentElement.style)){console.log("Polyfilling Element.scrollTo(options).");let t="scrollTo"in Element.prototype?Element:HTMLElement,e=t.scrollIntoView;t.prototype.scrollTo=function(n){typeof n=="object"?tn(this,n):e.apply(this,arguments)}}function y(t,e){return function(){let o=t.apply(this,arguments),r=e[o]||e.default;if(!r)throw new Error('overload() no handler for "'+o+'"');return r.apply(this,arguments)}}var en=y(S,{is:v,tag:v,html:function(t,e,n){e.innerHTML=n},text:function(t,e,n){e.textContent=n},children:function(t,e,n){e.innerHTML="",n.forEach(o=>{e.appendChild(o)})},points:M,cx:M,cy:M,r:M,preserveAspectRatio:M,viewBox:M,default:function(t,e,n){t in e?e[t]=n:e.setAttribute(t,n)}});function M(t,e,n){e.setAttribute(t,n)}function nn(t,e){for(var n=Object.keys(e),o=n.length;o--;)en(n[o],t,e[n[o]]);return t}var mt=w(nn,!0);var on="http://www.w3.org/2000/svg",Rt=document.createElement("div");var Ut=(t,e)=>e&&typeof e;function Vt(t,e){let n=document.createRange();return n.selectNode(t),n.createContextualFragment(e)}function L(t,e){var n=document.createElementNS(on,t);return e&&(n.innerHTML=e),n}var rn=y(S,{comment:function(t,e){return document.createComment(e||"")},fragment:y(Ut,{string:function(t,e,n){if(n)return Vt(n,e);let o=document.createDocumentFragment();Rt.innerHTML=e;let r=Rt.childNodes;for(;r[0];)o.appendChild(r[0]);return o},object:function(t,e,n){let o=n?Vt(n):document.createDocumentFragment();return typeof e.length=="number"?o.append.apply(o,e):mt(o,e),o},default:()=>document.createDocumentFragment()}),text:function(t,e){return document.createTextNode(e||"")},circle:L,ellipse:L,g:L,glyph:L,image:L,line:L,rect:L,use:L,path:L,pattern:L,polygon:L,polyline:L,svg:L,default:y(Ut,{string:function(t,e){let n=document.createElement(t);return n.innerHTML=e,n},object:function(t,e){let n=document.createElement(t);return typeof e.length=="number"?n.append.apply(n,e):mt(n,e),n},default:t=>{if(typeof t!="string")throw new Error('create(tag, content) accepts only a string as tag "'+typeof t+'"');return document.createElement(t)}})}),b=rn;function ht(t,e,n){let o;typeof n!="string"&&n.input!==void 0&&n.index!==void 0&&(o=n,n=o.input.slice(n.index+n[0].length+(n.consumed||0)));let r=t.exec(n);if(!r)return;let i=e(r);return o&&(o.consumed=(o.consumed||0)+r.index+r[0].length+(r.consumed||0)),i}var fr=w(ht,!0);function sn(t,e,n){throw n.input!==void 0&&n.index!==void 0&&(n=n.input),new Error('Cannot parse string "'+n+'"')}function cn(t,e,n){let o=-1;for(;++ocn(e,n,i),o);return r===void 0?e.catch?e.catch(n,o):sn(t,e,o):r}var qt=w(un,!0);var gt=v;var k=Symbol("internals"),A=Symbol("shadow"),Wt=Object.defineProperties,ln={a:HTMLAnchorElement,dl:HTMLDListElement,p:HTMLParagraphElement,br:HTMLBRElement,fieldset:HTMLFieldSetElement,hr:HTMLHRElement,img:HTMLImageElement,li:HTMLLIElement,ol:HTMLOListElement,optgroup:HTMLOptGroupElement,q:HTMLQuoteElement,textarea:HTMLTextAreaElement,td:HTMLTableCellElement,th:HTMLTableCellElement,tr:HTMLTableRowElement,tbody:HTMLTableSectionElement,thead:HTMLTableSectionElement,tfoot:HTMLTableSectionElement,ul:HTMLUListElement},an={name:{set:function(t){return this.setAttribute("name",t)},get:function(){return this.getAttribute("name")||""}},form:{get:function(){return this[k].form}},labels:{get:function(){return this[k].labels}},validity:{get:function(){return this[k].validity}},validationMessage:{get:function(){return this[k].validationMessage}},willValidate:{get:function(){return this[k].willValidate}},checkValidity:{value:function(){return this[k].checkValidity()}},reportValidity:{value:function(){return this[k].reportValidity()}}},pn={},$t={once:!0},fn=0,Nt=!1;function dn(t){return ln[t]||window["HTML"+t[0].toUpperCase()+t.slice(1)+"Element"]||(()=>{throw new Error('Constructor not found for tag "'+t+'"')})()}var mn=qt(/^\s*?\s*$|^\s*?\s*$/,{1:(t,e)=>({name:e[1]}),2:(t,e)=>({name:e[3],tag:e[2]}),catch:function(t,e){throw new SyntaxError(`dom element() – name must be of the form 'element-name' or 'tag is="element-name"' (`+e+")")}},null);function hn(t,e){if(t.hasOwnProperty(e)){let n=t[e];delete t[e],t[e]=n}return t}function gn(t,e,n){t._initialLoad=!0;let o=t.attachShadow({mode:e.mode||"closed",delegatesFocus:e.focusable||!1});if(n){let r=b("link",{rel:"stylesheet",href:n});o.append(r)}return t[A]=o,o}function wn(t){var e;if(t.attachInternals){if(e=t.attachInternals(),e.setFormValue)return e}else e={shadowRoot:t.shadowRoot};return e.input=b("input",{type:"hidden",name:t.name}),t.appendChild(e.input),e.setFormValue=function(n){this.input.value=n},e}function vn(t){t._initialAttributes={},t._n=0}function yn(t,e,n){let o=t._initialAttributes;for(;t._nfn?gn(p,e,o||e.stylesheet):void 0,c=a.formAssociated&&wn(p);return i&&(Nt=!0),e.construct&&e.construct.call(p,u,c),l&&(vn(p),Promise.resolve(1).then(function(){Xt(p,a.observedAttributes,l)})),f&&Object.keys(f).reduce(hn,p),p}return a.prototype=Object.create(s.prototype,f),f&&f.value&&(a.formAssociated=!0,Wt(a.prototype,an),(e.enable||e.disable)&&(a.prototype.formDisabledCallback=function(p){return p?e.disable&&e.disable.call(this,this[A],this[k]):e.enable&&e.enable.call(this,this[A],this[k])}),e.reset&&(a.prototype.formResetCallback=function(){return e.reset.call(this,this[A],this[k])}),e.restore&&(a.prototype.formStateRestoreCallback=function(){return e.restore.call(this,this[A],this[k])})),l&&(a.observedAttributes=Object.keys(l),a.prototype.attributeChangedCallback=function(p,u,c){if(!this._initialAttributes)return l[p].call(this,c);this._initialAttributes[p]=c,yn(this,a.observedAttributes,l)}),a.prototype.connectedCallback=function(){let p=this,u=p[A],c=p[k];if(p._initialAttributes&&Xt(p,a.observedAttributes,l),p._initialLoad){let E=u.querySelectorAll('link[rel="stylesheet"]');if(E.length){let ze=0,lt=E.length,Ht=function(Ue){++ze>=E.length&&(delete p._initialLoad,e.load&&(gt("element()","loaded",Array.from(E).map(Ve=>Ve.href).join(` +`)),e.load.call(p,u)))},_e=Ht;for(;lt--;)E[lt].addEventListener("load",Ht,$t),E[lt].addEventListener("error",_e,$t);e.connect&&e.connect.call(this,u,c)}else e.connect&&e.connect.call(this,u,c),e.load&&e.load.call(this,u,c)}else e.connect&&e.connect.call(this,u,c)},e.disconnect&&(a.prototype.disconnectedCallback=function(){return e.disconnect.call(this,this[A],this[k])}),gt("element()","<"+(i?i+" is="+r:r)+">"),window.customElements.define(r,a,i&&{extends:i}),i&&!Nt&&document.querySelectorAll('[is="'+r+'"]').forEach(p=>{Wt(p,f),e.construct&&e.construct.apply(p);let u;for(u in l){let c=p.attributes[u];c&&l[u].call(p,c.value)}e.connect&&e.connect.apply(p)}),a}function Kt(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object")return!1;let n=Object.keys(t),o=Object.keys(e),r=n.length;for(;r--;){if(t[n[r]]===void 0){if(e[n[r]]!==void 0)return!1}else if(!e.hasOwnProperty(n[r])||!Kt(t[n[r]],e[n[r]]))return!1;let i=o.indexOf(n[r]);i>-1&&o.splice(i,1)}for(r=o.length;r--;)if(e[o[r]]===void 0){if(t[o[r]]!==void 0)return!1}else return!1;return!0}var Zt=w(Kt,!0);function En(t,e){return e[t]}var D=w(En,!0);var Sn=Object.freeze;function Qt(){return this}var P=Sn({shift:v,push:v,forEach:v,join:function(){return""},map:Qt,filter:Qt,includes:function(){return!1},reduce:function(t,e){return e},length:0,each:v,pipe:S,start:v,stop:v,done:v,valueOf:function(){return null}});function vt(){return this}function yt(t){return t&&t[Symbol.iterator]}var Tn=Object.assign;function Ln(t){return t.stop?t.stop():t()}function kn(t){t.forEach(Ln),t.length=0}function B(){}Tn(B.prototype,{stop:function(){return this.stopables&&kn(this.stopables),this},done:function(e){return(this.stopables||(this.stopables=[])).push(e),this}});var Pn=Object.assign;function X(t){B.prototype.stop.apply(t);let e=-1,n;for(;n=t[++e];)t[e]=void 0,X(n)}function m(){}Pn(m.prototype,{pipe:function(t){return this[0]=t,t},stop:function(){return X(this[0]),this}});var F=Object.assign,O=Object.create;function z(t,e){e!==void 0&&t[0].push(e)}function Fn(t,e){if(t[1]){let n=-1;for(;t[++n]&&t[n]!==e;);for(;t[n++];)t[n-1]=t[n];X(e)}else t.stop()}function h(t){this.input=t}F(h.prototype,B.prototype,{push:function(t){z(this,t)},pipe:function(t){if(this[0])throw new Error("Stream: Attempt to .pipe() a unicast stream multiple times. Create a multicast stream with stream.broadcast().");return this[0]=t,this.input.pipe(this),t},map:function(t){return new Jt(this,t)},filter:function(t){return new te(this,t)},chunk:function(t){return new ne(this,t)},flatMap:function(t){return new ee(this,t)},take:function(t){return new oe(this,t)},each:function(t){return new se(this,t)},reduce:function(t,e){return new re(this,t,e)},scan:function(t,e){return new ie(this,t,e)},stop:function(){return Fn(this.input,this),this}});function Jt(t,e){this.input=t,this.fn=e}Jt.prototype=F(O(h.prototype),{push:function(e){let n=this.fn;z(this,n(e))}});function te(t,e){this.input=t,this.fn=e}te.prototype=F(O(h.prototype),{push:function(e){this.fn(e)&&z(this,e)}});function ee(t,e){this.input=t,this.fn=e}ee.prototype=F(O(h.prototype),{push:function(e){let o=this.fn(e);if(o!==void 0)if(yt(o))for(let r of o)z(this,r);else throw new Error("Stream: Cannot .flatMap() non-iterable values")}});function ne(t,e){this.input=t,this.chunk=[],typeof e=="number"?this.n=e:typeof e=="function"&&(this.fn=e)}ne.prototype=F(O(h.prototype),{fn:function(t){return t.length===this.n},push:function(e){let n=this.chunk;n.push(e),this.fn(n)&&(z(this,n),this.chunk=[])}});function oe(t,e){this.input=t,this.count=e}oe.prototype=F(O(h.prototype),{push:function(e){this[0].push(e),--this.count||this.stop()}});function re(t,e,n){return this.input=t,this.fn=e,this.value=n,this.i=0,t.pipe(this),n}re.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t,this.i++,this)}});function ie(t,e,n){this.input=t,this.fn=e,this.value=n}ie.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t),this[0].push(this.value)}});function se(t,e){this.input=t,this.push=e,t.pipe(this)}se.prototype=F(O(h.prototype),{each:null,reduce:null,pipe:null});var On=Array.prototype,An=Object.assign,Cn=Object.create;function _(t){this.buffer=t||[]}_.prototype=An(Cn(h.prototype),m.prototype,{push:function(t){t!==void 0&&this.buffer.push(t)},pipe:function(t){for(this[0]=t;this.buffer.length;)this[0].push(On.shift.apply(this.buffer));return this.buffer=this[0],t}});var In=Object.assign,jn=Object.create;function R(t,e){this.input=t,this.memory=!!(e&&e.memory),e&&e.hot&&this.pipe(P)}R.prototype=In(jn(h.prototype),{push:function(t){if(t!==void 0){this.memory&&(this.value=t);let e=-1;for(;this[++e];)this[e].push(t)}},pipe:function(t){let e=-1;for(;this[++e];);return this[e]=t,this.value!==void 0&&t.push(this.value),e===0&&this.input.pipe(this),t}});var Hn=Object.assign;function Y(t){this.promise=t}Hn(Y.prototype,m.prototype,{pipe:function(t){let e=this.promise;this[0]=t,e.then(n=>this[0].push(n)).finally(n=>this.stop())},stop:function(){m.prototype.stop.apply(this,arguments),this[0]=P}});var ue=Object.assign,le=Object.keys;function ce(t,e,n){let o=t.values,r=t.names,i=t[0];o[e]=n,(t.active||(t.active=le(o).length===r.length))&&i.push(ue({},o))}function K(t){this.inputs=t,this.active=!1}ue(K.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this.values={},this.names=le(e),this[0]=t;for(let n in e){let o=e[n];o.pipe?t.done(o.each(r=>ce(this,n,r))):o.then?o.then(r=>ce(this,n,r)):console.log("Todo: combine() raw values ?")}}});var Mn=Object.assign;function Z(t){this.inputs=t}Mn(Z.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this[0]=t;let n=-1,o;for(;o=e[++n];)if(o.pipe)o.pipe(t);else if(o.then)o.then(r=>t.push(r));else{let r=-1;for(;++r0}function Gn(t,e,n){return t[n]=e.shift(),t}function zn(t){return[]}function bt(t,e,n,o){n.push(o),e.every(Bn)&&t.push(e.reduce(Gn,{}))}function Q(t){this.inputs=t,this.buffers=xt.map.call(t,zn)}Dn(Q.prototype,m.prototype,{pipe:function(t){let e=this.inputs,n=this.buffers;this[0]=t,xt.forEach.call(e,(o,r)=>{let i=n[r];o.each?t.done(o.each(s=>bt(t,n,i,s))):o.then?o.then(s=>bt(t,n,i,s)):xt.forEach.call(o,s=>bt(t,n,i,s))})},stop:function(){let t=this.inputs,e=-1,n;for(;n=t[++e];)n.stop();return m.prototype.stop.apply(this,arguments)}});var _n=Array.prototype,ae=Object.assign;function Rn(t){throw new TypeError("Stream: invalid source object cannot be read into stream")}var g=ae(h,{of:function(){return new _(_n.slice.apply(arguments))},from:function(t){return t.pipe?new h(t):t.then?new h(new Y(t)):typeof t.length=="number"?new _(t):Rn(t)},broadcast:function(e){return new R(P,e)},combine:function(e){return new h(new K(e))},merge:function(){return new h(new Z(arguments))},zip:function(){return new h(new Q(arguments))}});ae(h.prototype,{log:vt,broadcast:function(t){return new R(this,t)}});var Un=Object.assign,Vn=/\s+/,pe={fullscreenchange:"fullscreenElement"in document?"fullscreenchange":"webkitFullscreenElement"in document?"webkitfullscreenchange":"fullscreenchange"};function fe(t){return t.which===1&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}var de=0;window.addEventListener("click",t=>de=t.timeStamp);function qn(t,e){return t.node.addEventListener(pe[e]||e,t,t.options),t}function Wn(t,e){return t.node.removeEventListener(pe[e]||e,t),t}function me(t,e,n){this.types=t.split(Vn),this.options=e,this.node=n,this.select=e&&e.select}Un(me.prototype,m.prototype,{pipe:function(t){this[0]=t,this.types.reduce(qn,this)},handleEvent:function(t){if(!(t.type==="click"&&t.timeStamp<=de)){if(this.select){let e=t.target.closest(this.select);if(!e)return;t.selectedTarget=e}this[0].push(t)}},stop:function(){this.types.reduce(Wn,this),m.prototype.stop.apply(this,arguments)}});function x(t,e){let n;return typeof t=="object"&&(n=t,t=n.type),new g(new me(t,n,e))}function Et(t){return typeof t}var $n=/^\s*([+-]?\d*\.?\d+)([^\s\d]*)\s*$/;function Nn(t,e){if(typeof e=="number")return e;var n=$n.exec(e);if(!n||!t[n[2]||""]){if(!t.catch)throw new Error('Cannot parse value "'+e+'" with provided units '+Object.keys(t).join(", "));return n?t.catch(parseFloat(n[1]),n[2]):t.catch(parseFloat(e))}return t[n[2]||""](parseFloat(n[1]))}var J=w(Nn);var Xn=/px$/,he={"transform:translateX":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[4])},"transform:translateY":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[5])},"transform:scale":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.sqrt(o*o+r*r)},"transform:rotate":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.atan2(r,o)}};function tt(t){return t.split("(")[1].split(")")[0].split(/\s*,\s*/)}function U(t,e){return window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):0}function et(t,e){if(he[t])return he[t](e);var n=U(t,e);return typeof n=="string"&&Xn.test(n)?parseFloat(n):n}var nt,ot;function Yn(){if(!nt){let t=document.documentElement.style.fontSize;document.documentElement.style.fontSize="100%",nt=et("font-size",document.documentElement),document.documentElement.style.fontSize=t||""}return nt}function Kn(){return ot||(ot=et("font-size",document.documentElement)),ot}window.addEventListener("resize",()=>{nt=void 0,ot=void 0});var C=y(Et,{number:S,string:J({em:function(t){return Yn()*t},px:function(t){return t},rem:function(t){return Kn()*t},vw:function(t){return window.innerWidth*t/100},vh:function(t){return window.innerHeight*t/100},vmin:function(t){return window.innerWidthn?o:n}n=nq.maxScrollInterval?q.maxScrollInterval:1.4*n}function it(){return ye}function xe(t){let e=T(t),n=window.getComputedStyle(t,null),o=C(n.getPropertyValue("padding-left")),r=C(n.getPropertyValue("padding-right"));return e.leftPadding=e.left+o,e.rightPadding=e.left+e.width-r,e.centrePadding=e.leftPadding+(e.width-o-r)/2,e}function Ee(t){let e=window.getComputedStyle(t,null).getPropertyValue("scroll-snap-align");return e.endsWith("start")?"left":e.endsWith("end")?"right":"centre"}function Se(t,e,n){let o=xe(t),r=T(e),i=Ee(e);t.scrollTo({top:t.scrollTop,left:t.scrollLeft+(i==="left"?r.left-o.leftPadding:i==="right"?r.right-o.rightPadding:r.left+r.width/2-o.centrePadding),behavior:n})}function Te(t,e){return Se(t,e,"smooth"),e}function I(t,e){return t.style.setProperty("scroll-behavior","auto","important"),Se(t,e,"auto"),t.style.setProperty("scroll-behavior",""),e}function Le(t,e){let{leftPadding:n,rightPadding:o,centrePadding:r}=xe(t),i=e.length,s;for(;s=e[--i];){let l=T(s);if(!l)continue;let f=Ee(s),a=l.width/2+(f==="left"?n:f==="right"?o:r);if((f==="left"?l.left:f==="right"?l.right:l.left+l.width/2)<=a)break}return s}function ke(t){return!!t.dataset.slideIndex}function Pe(t){let{scroller:e,elements:n,children:o}=t,r=Le(e,n);return ke(r)?o[r.dataset.slideIndex]:r}function Fe(t){let{scroller:e,children:n,elements:o}=t,r=Le(e,o),i;!r||(ke(r)?(i=n[r.dataset.slideIndex],I(e,i)):i=r,t.activations.push(i))}function to(t,e){t.style.setProperty("scroll-snap-type",""),e.stop()}var Oe=y((t,e)=>e.type,{pointerdown:function(t,e){return t.e0=e,t.x0=e.clientX,t.y0=e.clientY,t},pointermove:function(t,e){let n=e.clientX,o=e.clientY;if(!t.gesturing){if(Math.abs(n-t.x0)(clearTimeout(s),setTimeout(to,it()*1e3,n,a)))}return t.gesturing=!1,t.e0=void 0,t.x0=void 0,t.y0=void 0,t.pointers=void 0,t.scrollLeft0=void 0,t}});var eo=Object.assign,no={capture:!0,passive:!0};function oo(t,e){t.timer=void 0,t.stream.push(e);let n=t.times;n.length>1&&be(n),n.length=0}function Ae(t){this.element=t,this.times=[]}eo(Ae.prototype,m.prototype,{pipe:function(t){this.stream=t,this.element.addEventListener("scroll",this,no)},handleEvent:function(t){let e=t.timeStamp/1e3;this.times.push(e),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(oo,it()*1e3,this,t)},stop:function(){this.element.removeEventListener("scroll",this),m.prototype.stop.apply(this,arguments)}});function kt(t){return new g(new Ae(t))}function ro(t,e,n){let o=n.length,r=-1/0;for(;o--;){let a=T(n[o]),p=a.x+a.width;r=p>r?p:r}let i=T(e),s=getComputedStyle(t),l=C(s.paddingLeft||0),f=C(s.paddingRight||0);return l+f+r-i.x}function io(t,e,n){let o=ro(t,e,n);t.style.setProperty("--scroll-width",o+"px")}function so(t){return!t.dataset.slideIndex}var Ce={construct:function(t){let e=b("slot",{part:"slides"}),n=b("div",{class:"scroller",children:[e]}),o=b("nav",{part:"controls",children:[b("slot",{name:"controls"})]});t.append(n,o);let r=g.of().broadcast({memory:!0}),i=g.combine({host:r,elements:x("slotchange",e).map(c=>u.elements=e.assignedElements())}).broadcast({memory:!0}),s=i.map(c=>{let E=c.elements.filter(so);return Zt(u.children,E)?void 0:u.children=E}).broadcast({memory:!0,hot:!0}),l=g.of(),f=g.of(),a=f.map(c=>c.dataset.slideIndex?u.children[c.dataset.slideIndex]:c).filter(c=>u.active!==c&&Lt("slide-active",c)).map(c=>u.active=c).broadcast({memory:!0,hot:!0}),p=x("click",t).filter(fe).broadcast(),u=this[d]={clickSuppressTime:-1/0,host:this,style:window.getComputedStyle(this),elements:P,children:P,scroller:n,slides:e,controls:o,load:r,views:l,activations:f,actives:a,slotchanges:i,mutations:s,clicks:p};g.merge(i,x("resize",window)).each(c=>io(n,e,u.elements)),i.map(c=>c.elements.includes(u.active)?u.active:u.children[0]).map(c=>I(n,c)).pipe(f),g.combine({host:r,child:l}).map(c=>u.elements.includes(c.child)&&u.active!==c.child?c.child:void 0).map(c=>u.active?Te(n,c):I(n,c)).pipe(f),kt(n).filter(()=>!u.gesturing).each(c=>Fe(u)),Tt({threshold:"0.25rem",device:"mouse"},t).filter(()=>u.children.length>1).each(c=>{u.pointers=c,c.reduce(Oe,u)}),p.each(c=>{c.timeStamp-u.clickSuppressTime<120&&(c.preventDefault(),c.stopPropagation())}),x("fullscreenchange",window).each(c=>{(c.target===this||c.target.contains(this))&&I(n,u.active)}),x("focusin",this).map(c=>u.children.indexOf(c.target)!==-1?c.target:u.children.find(E=>E.contains(c.target))).pipe(l),x("keydown",this).filter(()=>document.activeElement===this||this.contains(document.activeElement)).map(y(D("keyCode"),{37:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)-1]),39:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)+1]),default:v})).pipe(l)},load:function(t){this[d].load.push(this)}};function st(t,e){function n(o,r){if(t.getState(o)!==r)return t[r?"enable":"disable"](o)}return{attribute:function(o){return n(this,o!==null)},set:function(o){return n(this,!!o)},get:function(){return t.getState(this)}}}function Pt(t,e){t.remove&&t.remove(e);let n;for(;(n=t.indexOf(e))!==-1;)t.splice(n,1);return e}var as=w(Pt,!0);var co=Object.assign;function W(t,e){this.element=t,this.definitions=e,this.tokens=[]}co(W.prototype,{contains:function(t){return this.tokens.includes(t)},add:function(){let t=arguments.length;for(;t--;){let e=arguments[t];!this.tokens.includes(e)&&this.definitions[e]&&(this.definitions[e].enable(this.element),this.tokens.push(e))}},remove:function(){let t=arguments.length;for(;t--;){let e=arguments[t];this.tokens.includes(e)&&(this.definitions[e].disable(this.element),Pt(this.tokens,e))}},supports:function(t){return!!this.definitions[t]}});var uo=Array.prototype;function lo(t,e){let n=t.tokens.slice(),o=uo.slice.apply(e),r=n.length;for(;r--;)o.includes(n[r])&&n.splice(r,1);t.remove.apply(t,n),t.add.apply(t,o)}function Ft(t){let e=Symbol("TokenList");function n(o,r){let i=o[e]||(o[e]=new W(o,t));lo(i,r.trim().split(/\s+/))}return{attribute:function(o){n(this,o||"")},set:function(o){n(this,o+"")},get:function(){return this[e]||(this[e]=new W(this,t))}}}var Ot={};G(Ot,{disable:()=>ho,enable:()=>mo,getState:()=>go});var ao=J({s:S,ms:t=>t/1e3});function po(t){let{active:e,children:n,elements:o,host:r}=t,i=o.indexOf(e),s=o[i+1]||n[0];t.autoplay.timer=null,!!s&&(r.active=s)}function fo(t){let{active:e,style:n}=t,o=ao(window.getComputedStyle(e).getPropertyValue("--slide-duration")||n.getPropertyValue("--slide-duration"));clearTimeout(t.autoplay.timer),t.autoplay.timer=setTimeout(po,o*1e3,t)}function Ie(t){clearTimeout(t.autoplay.timer),t.autoplay.timer=null}function mo(t){let e=t[d],{actives:n}=e,o=e.autoplay={},r=g.merge([!1],x("pointerenter pointerleave",t).map(s=>s.type==="pointerenter")),i=g.merge([t.contains(document.activeElement)],x("focusin focusout",t).map(y(D("type"),{focusin:s=>!0,focusout:s=>t.contains(s.relatedTarget)}))).map((s=>l=>s===l?void 0:s=l)());o.updates=g.combine({active:n,hover:r,focus:i}).each(s=>s.hover||s.focus?Ie(e):fo(e))}function ho(t){let e=t[d];Ie(e),e.autoplay.updates.stop(),e.autoplay=void 0}function go(t){return!!t[d].autoplay}var At={};G(At,{disable:()=>yo,enable:()=>vo,getState:()=>bo});function je(t,e){let n=t.cloneNode(!0);return n.dataset.slideIndex=e,n.removeAttribute("id"),n.setAttribute("aria-hidden","true"),n.tabIndex="-1",n}function wo(t){let{active:e,children:n,host:o,scroller:r}=t;if(t.loop.prepends&&(t.loop.prepends.forEach(c=>c.remove()),t.loop.appends.forEach(c=>c.remove()),t.loop.prepends=void 0,t.loop.appends=void 0),n.length<2){t.elements=t.slides.assignedElements();return}let i=o.clientWidth,s=n.map(T),l=s[1].left,f=s[s.length-2].right,a=1;for(;s[++a]&&s[a].leftf-i;);let u=n.slice(++a).map((c,E)=>je(c,a+E));o.prepend.apply(o,u),o.append.apply(o,p),t.loop.prepends=u,t.loop.appends=p,t.elements=t.slides.assignedElements(),I(r,e||n[0])}function vo(t){let e=t[d],{mutations:n}=e,o=e.loop={};o.renders=n.each(r=>wo(e))}function yo(t){let e=t[d];e.loop&&(e.loop.prepends&&e.loop.prepends.forEach(n=>n.remove()),e.loop.appends&&e.loop.appends.forEach(n=>n.remove()),e.loop.renders.stop(),e.loop=void 0)}function bo(t){return!!t[d].loop}var Ct={};G(Ct,{disable:()=>Eo,enable:()=>xo,getState:()=>So});function j(t){if(typeof t!="object"||arguments.length>1)throw new Error("delegate() now takes an object of selector:fn pairs.");let e=Object.keys(t);return function(o){let r=o.target,i=-1;for(;e[++i];){let s=r.closest(e[i]);if(s)return t[e[i]](s,...arguments)}}}function He(t,e,n,o){o===0?t.hidden=!0:t.hidden=!1,o===n.length-1?e.hidden=!0:e.hidden=!1}function xo(t){let e=t[d],{actives:n,clicks:o,slotchanges:r}=e,i=e.navigation={prev:b("button",{part:"prev-button",type:"button",name:"navigation",value:"-1",html:"Previous"}),next:b("button",{part:"next-button",type:"button",name:"navigation",value:"1",html:"Next"})};e.controls.prepend(i.prev,i.next),i.updates=g.combine({active:n,changes:r}).each(s=>He(i.prev,i.next,s.changes.elements,s.changes.elements.indexOf(s.active))),i.clicks=o.each(j({'[name="navigation"]':function(s,l){let f=parseFloat(s.value),a=e.elements.indexOf(e.active)+f,p=e.elements[a];!p||(t.active=p,He(i.prev,i.next,e.elements,a))}}))}function Eo(t){let e=t[d];e.navigation.prev.remove(),e.navigation.next.remove(),e.navigation.updates.stop(),e.navigation.clicks.stop(),e.navigation=void 0}function So(t){return!!t[d].navigation}var It={};G(It,{disable:()=>ko,enable:()=>Lo,getState:()=>Po});function Me(t,e,n){let{active:o,buttons:r,index:i}=t;if(o===n)return;i>-1&&(t.activeSpan.remove(),r.children[i].part.remove("page-button-active"));let s=e.indexOf(n);s!==-1&&(r.children[s].part.add("page-button-active"),r.children[s].append(t.activeSpan),t.index=s,t.active=n)}function To(t,e,n,o){return e.buttons&&(e.buttons.remove(),e.buttons=void 0),o.length<2||(e.buttons=b("div",{part:"pagination",children:o.map((r,i)=>b("button",{part:"page-button",type:"button",name:"pagination",value:i}))}),t.append(e.buttons)),o.length}function Lo(t){let e=t[d],{shadow:n,actives:o,clicks:r,mutations:i}=e,s=e.pagination={activeSpan:b("span",{class:"invisible",text:"(Current slide)"})};s.mutations=i.each(()=>To(e.controls,s,n,e.children)),s.updates=g.combine({active:o,children:i}).filter(l=>l.children.length>1).each(l=>Me(s,e.children,e.active)),s.clicks=r.each(j({'[name="pagination"]':function(l,f){let{host:a}=e,p=e.children,u=p[l.value];!u||(a.active=u,Me(s,p,u))}}))}function ko(t){let e=t[d];e.pagination.buttons.remove(),e.pagination.mutations.stop(),e.pagination.updates.stop(),e.pagination.clicks.stop(),e.pagination=void 0}function Po(t){return!!t[d].pagination}var jt={};G(jt,{disable:()=>Oo,enable:()=>Fo,getState:()=>Ao});var De=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled;function ct(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement}function Be(t){return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():void 0}function ut(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}function Fo(t){let e=t[d];if(!De)return;let n=e.fullscreen={button:b("button",{part:"fullscreen-button",type:"button",name:"fullscreen",html:"Open in fullscreen"})};e.controls.append(n.button),n.changes=x("fullscreenchange",t).filter(o=>ct()===t).each(o=>{n.button.part.add("fullscreen-button-active"),n.button.innerHTML="Close fullscreen",document.activeElement!==t&&(n.tabIndex=t.tabIndex,t.tabIndex<0&&(t.tabIndex=0),t.focus());let r=x("fullscreenchange",t).each(i=>{n.button.part.remove("fullscreen-button-active"),n.button.innerHTML="Open in fullscreen",t.tabIndex=n.tabIndex,n.tabIndex=void 0,r.stop()})}),n.clicks=e.clicks.each(j({'[name="fullscreen"]':(o,r)=>{let i=ct();if(i===t){ut();return}i&&ut(),Be(t)}}))}function Oo(t){let e=t[d];ct()===t&&ut(),e.fullscreen.button.remove(),e.fullscreen.clicks.stop(),e.fullscreen.changes.stop(),e.fullscreen=void 0}function Ao(t){return!!t[d].fullscreen}var Ge={active:{attribute:function(t){this.active=t},set:function(t){let e=this[d],n=typeof t=="object"?t:/^\d/.test(t+"")?this.querySelector("#\\3"+(t+"")[0]+" "+(t+"").slice(1)):/^\#/.test(t+"")?this.querySelector(t):this.querySelector("#"+t);e.views.push(n)},get:function(){return this[d].active}},autoplay:st(Ot,"autoplay"),controls:Ft({navigation:Ct,pagination:It,fullscreen:jt}),loop:st(At,"loop")};var Co=import.meta.url.replace(/\/[^\/]*\.js/,"/slide-show-shadow.css"),Js=wt('
          ',Ce,Ge,Co);export{Js as default}; diff --git a/build/slide-show.css b/build/slide-show.css index 1aa3a96..d83e313 100644 --- a/build/slide-show.css +++ b/build/slide-show.css @@ -1,6 +1,6 @@ /* slide-show 1.1.5 By Stephen Band - Built 2022-05-16 23:59 */ + Built 2022-05-18 15:08 */ slide-show{display:grid;position:relative;box-sizing:border-box;padding:0;grid-auto-flow:column;grid-auto-columns:100%;grid-auto-rows:min-content;align-items:center;justify-items:stretch;scroll-snap-type:x mandatory;scroll-snap-stop:always;-webkit-scroll-behavior:smooth;scroll-behavior:smooth;overscroll-behavior-x:contain;-ms-overflow-style:none;scrollbar-width:none;padding-left:var(--padding-left, 0);padding-right:var(--padding-right, 0);scroll-padding-left:var(--padding-left, 0);scroll-padding-right:var(--padding-right, 0)}slide-show:not(:defined){overflow:scroll;overflow-y:hidden}.loading slide-show{-webkit-scroll-behavior:auto;scroll-behavior:auto}slide-show::-webkit-scrollbar{display:none}slide-show:not(:defined)>[slot]{display:none}slide-show>*{scroll-snap-align:center}slide-show:-webkit-full-screen{align-content:center}slide-show:fullscreen{align-content:center} diff --git a/build/slide-show.js b/build/slide-show.js index e57995b..6297303 100644 --- a/build/slide-show.js +++ b/build/slide-show.js @@ -1,7 +1,7 @@ /* slide-show 1.1.5 By Stephen Band - Built 2022-05-16 23:59 */ + Built 2022-05-18 15:08 */ -var qe=Object.defineProperty;var Mt=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var Dt=(t,e)=>{var n={};for(var o in t)We.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&Mt)for(var o of Mt(t))e.indexOf(o)<0&&$e.call(t,o)&&(n[o]=t[o]);return n};var G=(t,e)=>{for(var n in e)qe(t,n,{get:e[n],enumerable:!0})};function $(t){var e=new Map;return function(o){if(e.has(o))return e.get(o);var r=t(o);return e.set(o,r),r}}var Ne=Array.prototype;function Xe(t,e){return typeof t=="function"?t.apply(null,e):t}function Bt(t,e,n){n=n||t.length;var o=n===1?e?t:$(t):$(function(r){return Bt(function(){var i=[r];return i.push.apply(i,arguments),t.apply(null,i)},e,n-1)});return function r(i){return arguments.length===0?r:arguments.length===1?o(i):arguments.length>=n?t.apply(null,arguments):Xe(o(i),Ne.slice.call(arguments,1))}}var w=Bt;function Ye(t,e){return 1-Math.pow(1-e,t)}var Gt=w(Ye);function v(){}function at(t,e){return e(t)}function S(t){return t}var Ke=Array.prototype;function pt(){let t=arguments;return t.length?e=>Ke.reduce.call(t,at,e):S}function ft(t,e,n){return n*(e-t)+t}var Ze=window.performance,zt=window.requestAnimationFrame,Qe=window.cancelAnimationFrame;function dt(t,e,n){var o=Ze.now();function r(s){var u=(s-o)/(t*1e3);u<1?(u>0&&e(u),i=zt(r)):(e(1),n&&n())}var i=zt(r);return function(){Qe(i)}}function N(t,e,n,o,r,i){let s=o[n];return dt(t,pt(e,u=>ft(s,r,u),u=>o[n]=u),i)}function Je(){return{x:0,y:0,left:0,top:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}}function T(t){return t===window?Je():t.getClientRects()[0]||t.getBoundingClientRect()}var I={scrollDuration:.3,scrollDurationPerHeight:.125,scrollTransform:Gt(3)},_t=v;function tn(t,e){if(e.behavior==="smooth"){let n=t.style.getPropertyValue("scroll-snap-type"),o=()=>t.style.setProperty("scroll-snap-type",n);if(t.style.setProperty("scroll-snap-type","none"),e.left!==void 0){let r=t===document.body?window.innerWidth:T(t).width,i=I.scrollDuration+I.scrollDurationPerHeight*Math.abs(e.left-t.scrollLeft)/r;_t=N(i,I.scrollTransform,"scrollLeft",t,e.left,o)}else{let r=t===document.body?window.innerHeight:T(t).height,i=I.scrollDuration+I.scrollDurationPerHeight*Math.abs(e.top-t.scrollTop)/r;_t=N(i,I.scrollTransform,"scrollTop",t,e.top,o)}}else e.left!==void 0&&(t.scrollLeft=e.left),e.top!==void 0&&(t.scrollTop=e.top)}if(!("scrollBehavior"in document.documentElement.style)){console.log("Polyfilling Element.scrollTo(options).");let t="scrollTo"in Element.prototype?Element:HTMLElement,e=t.scrollIntoView;t.prototype.scrollTo=function(n){typeof n=="object"?tn(this,n):e.apply(this,arguments)}}function y(t,e){return function(){let o=t.apply(this,arguments),r=e[o]||e.default;if(!r)throw new Error('overload() no handler for "'+o+'"');return r.apply(this,arguments)}}var en=y(S,{is:v,tag:v,html:function(t,e,n){e.innerHTML=n},text:function(t,e,n){e.textContent=n},children:function(t,e,n){e.innerHTML="",n.forEach(o=>{e.appendChild(o)})},points:j,cx:j,cy:j,r:j,preserveAspectRatio:j,viewBox:j,default:function(t,e,n){t in e?e[t]=n:e.setAttribute(t,n)}});function j(t,e,n){e.setAttribute(t,n)}function nn(t,e){for(var n=Object.keys(e),o=n.length;o--;)en(n[o],t,e[n[o]]);return t}var mt=w(nn,!0);var on="http://www.w3.org/2000/svg",Rt=document.createElement("div");var Ut=(t,e)=>e&&typeof e;function Vt(t,e){let n=document.createRange();return n.selectNode(t),n.createContextualFragment(e)}function L(t,e){var n=document.createElementNS(on,t);return e&&(n.innerHTML=e),n}var rn=y(S,{comment:function(t,e){return document.createComment(e||"")},fragment:y(Ut,{string:function(t,e,n){if(n)return Vt(n,e);let o=document.createDocumentFragment();Rt.innerHTML=e;let r=Rt.childNodes;for(;r[0];)o.appendChild(r[0]);return o},object:function(t,e,n){let o=n?Vt(n):document.createDocumentFragment();return typeof e.length=="number"?o.append.apply(o,e):mt(o,e),o},default:()=>document.createDocumentFragment()}),text:function(t,e){return document.createTextNode(e||"")},circle:L,ellipse:L,g:L,glyph:L,image:L,line:L,rect:L,use:L,path:L,pattern:L,polygon:L,polyline:L,svg:L,default:y(Ut,{string:function(t,e){let n=document.createElement(t);return n.innerHTML=e,n},object:function(t,e){let n=document.createElement(t);return typeof e.length=="number"?n.append.apply(n,e):mt(n,e),n},default:t=>{if(typeof t!="string")throw new Error('create(tag, content) accepts only a string as tag "'+typeof t+'"');return document.createElement(t)}})}),b=rn;function ht(t,e,n){let o;typeof n!="string"&&n.input!==void 0&&n.index!==void 0&&(o=n,n=o.input.slice(n.index+n[0].length+(n.consumed||0)));let r=t.exec(n);if(!r)return;let i=e(r);return o&&(o.consumed=(o.consumed||0)+r.index+r[0].length+(r.consumed||0)),i}var fr=w(ht,!0);function sn(t,e,n){throw n.input!==void 0&&n.index!==void 0&&(n=n.input),new Error('Cannot parse string "'+n+'"')}function cn(t,e,n){let o=-1;for(;++ocn(e,n,i),o);return r===void 0?e.catch?e.catch(n,o):sn(t,e,o):r}var qt=w(un,!0);var gt=v;var k=Symbol("internals"),O=Symbol("shadow"),Wt=Object.defineProperties,ln={a:HTMLAnchorElement,dl:HTMLDListElement,p:HTMLParagraphElement,br:HTMLBRElement,fieldset:HTMLFieldSetElement,hr:HTMLHRElement,img:HTMLImageElement,li:HTMLLIElement,ol:HTMLOListElement,optgroup:HTMLOptGroupElement,q:HTMLQuoteElement,textarea:HTMLTextAreaElement,td:HTMLTableCellElement,th:HTMLTableCellElement,tr:HTMLTableRowElement,tbody:HTMLTableSectionElement,thead:HTMLTableSectionElement,tfoot:HTMLTableSectionElement,ul:HTMLUListElement},an={name:{set:function(t){return this.setAttribute("name",t)},get:function(){return this.getAttribute("name")||""}},form:{get:function(){return this[k].form}},labels:{get:function(){return this[k].labels}},validity:{get:function(){return this[k].validity}},validationMessage:{get:function(){return this[k].validationMessage}},willValidate:{get:function(){return this[k].willValidate}},checkValidity:{value:function(){return this[k].checkValidity()}},reportValidity:{value:function(){return this[k].reportValidity()}}},pn={},$t={once:!0},fn=0,Nt=!1;function dn(t){return ln[t]||window["HTML"+t[0].toUpperCase()+t.slice(1)+"Element"]||(()=>{throw new Error('Constructor not found for tag "'+t+'"')})()}var mn=qt(/^\s*?\s*$|^\s*?\s*$/,{1:(t,e)=>({name:e[1]}),2:(t,e)=>({name:e[3],tag:e[2]}),catch:function(t,e){throw new SyntaxError(`dom element() – name must be of the form 'element-name' or 'tag is="element-name"' (`+e+")")}},null);function hn(t,e){if(t.hasOwnProperty(e)){let n=t[e];delete t[e],t[e]=n}return t}function gn(t,e,n){t._initialLoad=!0;let o=t.attachShadow({mode:e.mode||"closed",delegatesFocus:e.focusable||!1});if(n){let r=b("link",{rel:"stylesheet",href:n});o.append(r)}return t[O]=o,o}function wn(t){var e;if(t.attachInternals){if(e=t.attachInternals(),e.setFormValue)return e}else e={shadowRoot:t.shadowRoot};return e.input=b("input",{type:"hidden",name:t.name}),t.appendChild(e.input),e.setFormValue=function(n){this.input.value=n},e}function vn(t){t._initialAttributes={},t._n=0}function yn(t,e,n){let o=t._initialAttributes;for(;t._nfn?gn(p,e,o||e.stylesheet):void 0,c=l.formAssociated&&wn(p);return i&&(Nt=!0),e.construct&&e.construct.call(p,a,c),u&&(vn(p),Promise.resolve(1).then(function(){Xt(p,l.observedAttributes,u)})),f&&Object.keys(f).reduce(hn,p),p}return l.prototype=Object.create(s.prototype,f),f&&f.value&&(l.formAssociated=!0,Wt(l.prototype,an),(e.enable||e.disable)&&(l.prototype.formDisabledCallback=function(p){return p?e.disable&&e.disable.call(this,this[O],this[k]):e.enable&&e.enable.call(this,this[O],this[k])}),e.reset&&(l.prototype.formResetCallback=function(){return e.reset.call(this,this[O],this[k])}),e.restore&&(l.prototype.formStateRestoreCallback=function(){return e.restore.call(this,this[O],this[k])})),u&&(l.observedAttributes=Object.keys(u),l.prototype.attributeChangedCallback=function(p,a,c){if(!this._initialAttributes)return u[p].call(this,c);this._initialAttributes[p]=c,yn(this,l.observedAttributes,u)}),l.prototype.connectedCallback=function(){let p=this,a=p[O],c=p[k];if(p._initialAttributes&&Xt(p,l.observedAttributes,u),p._initialLoad){let E=a.querySelectorAll('link[rel="stylesheet"]');if(E.length){let ze=0,lt=E.length,Ht=function(Ue){++ze>=E.length&&(delete p._initialLoad,e.load&&(gt("element()","loaded",Array.from(E).map(Ve=>Ve.href).join(` -`)),e.load.call(p,a)))},_e=Ht;for(;lt--;)E[lt].addEventListener("load",Ht,$t),E[lt].addEventListener("error",_e,$t);e.connect&&e.connect.call(this,a,c)}else e.connect&&e.connect.call(this,a,c),e.load&&e.load.call(this,a,c)}else e.connect&&e.connect.call(this,a,c)},e.disconnect&&(l.prototype.disconnectedCallback=function(){return e.disconnect.call(this,this[O],this[k])}),gt("element()","<"+(i?i+" is="+r:r)+">"),window.customElements.define(r,l,i&&{extends:i}),i&&!Nt&&document.querySelectorAll('[is="'+r+'"]').forEach(p=>{Wt(p,f),e.construct&&e.construct.apply(p);let a;for(a in u){let c=p.attributes[a];c&&u[a].call(p,c.value)}e.connect&&e.connect.apply(p)}),l}function Kt(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object")return!1;let n=Object.keys(t),o=Object.keys(e),r=n.length;for(;r--;){if(t[n[r]]===void 0){if(e[n[r]]!==void 0)return!1}else if(!e.hasOwnProperty(n[r])||!Kt(t[n[r]],e[n[r]]))return!1;let i=o.indexOf(n[r]);i>-1&&o.splice(i,1)}for(r=o.length;r--;)if(e[o[r]]===void 0){if(t[o[r]]!==void 0)return!1}else return!1;return!0}var Zt=w(Kt,!0);function En(t,e){return e[t]}var H=w(En,!0);var Sn=Object.freeze;function Qt(){return this}var M=Sn({shift:v,push:v,forEach:v,join:function(){return""},map:Qt,filter:Qt,reduce:function(t,e){return e},length:0,each:v,pipe:S,start:v,stop:v,done:v,valueOf:function(){return null}});function vt(){return this}function yt(t){return t&&t[Symbol.iterator]}var Tn=Object.assign;function Ln(t){return t.stop?t.stop():t()}function kn(t){t.forEach(Ln),t.length=0}function D(){}Tn(D.prototype,{stop:function(){return this.stopables&&kn(this.stopables),this},done:function(e){return(this.stopables||(this.stopables=[])).push(e),this}});var Pn=Object.assign;function X(t){D.prototype.stop.apply(t);let e=-1,n;for(;n=t[++e];)t[e]=void 0,X(n)}function m(){}Pn(m.prototype,{pipe:function(t){return this[0]=t,t},stop:function(){return X(this[0]),this}});var P=Object.assign,F=Object.create;function z(t,e){e!==void 0&&t[0].push(e)}function Fn(t,e){if(t[1]){let n=-1;for(;t[++n]&&t[n]!==e;);for(;t[n++];)t[n-1]=t[n];X(e)}else t.stop()}function h(t){this.input=t}P(h.prototype,D.prototype,{push:function(t){z(this,t)},pipe:function(t){if(this[0])throw new Error("Stream: Attempt to .pipe() a unicast stream multiple times. Create a multicast stream with stream.broadcast().");return this[0]=t,this.input.pipe(this),t},map:function(t){return new Jt(this,t)},filter:function(t){return new te(this,t)},chunk:function(t){return new ne(this,t)},flatMap:function(t){return new ee(this,t)},take:function(t){return new oe(this,t)},each:function(t){return new se(this,t)},reduce:function(t,e){return new re(this,t,e)},scan:function(t,e){return new ie(this,t,e)},stop:function(){return Fn(this.input,this),this}});function Jt(t,e){this.input=t,this.fn=e}Jt.prototype=P(F(h.prototype),{push:function(e){let n=this.fn;z(this,n(e))}});function te(t,e){this.input=t,this.fn=e}te.prototype=P(F(h.prototype),{push:function(e){this.fn(e)&&z(this,e)}});function ee(t,e){this.input=t,this.fn=e}ee.prototype=P(F(h.prototype),{push:function(e){let o=this.fn(e);if(o!==void 0)if(yt(o))for(let r of o)z(this,r);else throw new Error("Stream: Cannot .flatMap() non-iterable values")}});function ne(t,e){this.input=t,this.chunk=[],typeof e=="number"?this.n=e:typeof e=="function"&&(this.fn=e)}ne.prototype=P(F(h.prototype),{fn:function(t){return t.length===this.n},push:function(e){let n=this.chunk;n.push(e),this.fn(n)&&(z(this,n),this.chunk=[])}});function oe(t,e){this.input=t,this.count=e}oe.prototype=P(F(h.prototype),{push:function(e){this[0].push(e),--this.count||this.stop()}});function re(t,e,n){return this.input=t,this.fn=e,this.value=n,this.i=0,t.pipe(this),n}re.prototype=P(F(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t,this.i++,this)}});function ie(t,e,n){this.input=t,this.fn=e,this.value=n}ie.prototype=P(F(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t),this[0].push(this.value)}});function se(t,e){this.input=t,this.push=e,t.pipe(this)}se.prototype=P(F(h.prototype),{each:null,reduce:null,pipe:null});var On=Array.prototype,An=Object.assign,Cn=Object.create;function _(t){this.buffer=t||[]}_.prototype=An(Cn(h.prototype),m.prototype,{push:function(t){t!==void 0&&this.buffer.push(t)},pipe:function(t){for(this[0]=t;this.buffer.length;)this[0].push(On.shift.apply(this.buffer));return this.buffer=this[0],t}});var In=Object.assign,jn=Object.create;function R(t,e){this.input=t,this.memory=!!(e&&e.memory),e&&e.hot&&this.pipe(M)}R.prototype=In(jn(h.prototype),{push:function(t){if(t!==void 0){this.memory&&(this.value=t);let e=-1;for(;this[++e];)this[e].push(t)}},pipe:function(t){let e=-1;for(;this[++e];);return this[e]=t,this.value!==void 0&&t.push(this.value),e===0&&this.input.pipe(this),t}});var Hn=Object.assign;function Y(t){this.promise=t}Hn(Y.prototype,m.prototype,{pipe:function(t){let e=this.promise;this[0]=t,e.then(n=>this[0].push(n)).finally(n=>this.stop())},stop:function(){m.prototype.stop.apply(this,arguments),this[0]=M}});var ue=Object.assign,le=Object.keys;function ce(t,e,n){let o=t.values,r=t.names,i=t[0];o[e]=n,(t.active||(t.active=le(o).length===r.length))&&i.push(ue({},o))}function K(t){this.inputs=t,this.active=!1}ue(K.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this.values={},this.names=le(e),this[0]=t;for(let n in e){let o=e[n];o.pipe?t.done(o.each(r=>ce(this,n,r))):o.then?o.then(r=>ce(this,n,r)):console.log("Todo: combine() raw values ?")}}});var Mn=Object.assign;function Z(t){this.inputs=t}Mn(Z.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this[0]=t;let n=-1,o;for(;o=e[++n];)if(o.pipe)o.pipe(t);else if(o.then)o.then(r=>t.push(r));else{let r=-1;for(;++r0}function Gn(t,e,n){return t[n]=e.shift(),t}function zn(t){return[]}function bt(t,e,n,o){n.push(o),e.every(Bn)&&t.push(e.reduce(Gn,{}))}function Q(t){this.inputs=t,this.buffers=xt.map.call(t,zn)}Dn(Q.prototype,m.prototype,{pipe:function(t){let e=this.inputs,n=this.buffers;this[0]=t,xt.forEach.call(e,(o,r)=>{let i=n[r];o.each?t.done(o.each(s=>bt(t,n,i,s))):o.then?o.then(s=>bt(t,n,i,s)):xt.forEach.call(o,s=>bt(t,n,i,s))})},stop:function(){let t=this.inputs,e=-1,n;for(;n=t[++e];)n.stop();return m.prototype.stop.apply(this,arguments)}});var _n=Array.prototype,ae=Object.assign;function Rn(t){throw new TypeError("Stream: invalid source object cannot be read into stream")}var g=ae(h,{of:function(){return new _(_n.slice.apply(arguments))},from:function(t){return t.pipe?new h(t):t.then?new h(new Y(t)):typeof t.length=="number"?new _(t):Rn(t)},broadcast:function(e){return new R(M,e)},combine:function(e){return new h(new K(e))},merge:function(){return new h(new Z(arguments))},zip:function(){return new h(new Q(arguments))}});ae(h.prototype,{log:vt,broadcast:function(t){return new R(this,t)}});var Un=Object.assign,Vn=/\s+/,pe={fullscreenchange:"fullscreenElement"in document?"fullscreenchange":"webkitFullscreenElement"in document?"webkitfullscreenchange":"fullscreenchange"};function fe(t){return t.which===1&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}var de=0;window.addEventListener("click",t=>de=t.timeStamp);function qn(t,e){return t.node.addEventListener(pe[e]||e,t,t.options),t}function Wn(t,e){return t.node.removeEventListener(pe[e]||e,t),t}function me(t,e,n){this.types=t.split(Vn),this.options=e,this.node=n,this.select=e&&e.select}Un(me.prototype,m.prototype,{pipe:function(t){this[0]=t,this.types.reduce(qn,this)},handleEvent:function(t){if(!(t.type==="click"&&t.timeStamp<=de)){if(this.select){let e=t.target.closest(this.select);if(!e)return;t.selectedTarget=e}this[0].push(t)}},stop:function(){this.types.reduce(Wn,this),m.prototype.stop.apply(this,arguments)}});function x(t,e){let n;return typeof t=="object"&&(n=t,t=n.type),new g(new me(t,n,e))}function Et(t){return typeof t}var $n=/^\s*([+-]?\d*\.?\d+)([^\s\d]*)\s*$/;function Nn(t,e){if(typeof e=="number")return e;var n=$n.exec(e);if(!n||!t[n[2]||""]){if(!t.catch)throw new Error('Cannot parse value "'+e+'" with provided units '+Object.keys(t).join(", "));return n?t.catch(parseFloat(n[1]),n[2]):t.catch(parseFloat(e))}return t[n[2]||""](parseFloat(n[1]))}var J=w(Nn);var Xn=/px$/,he={"transform:translateX":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[4])},"transform:translateY":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[5])},"transform:scale":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.sqrt(o*o+r*r)},"transform:rotate":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.atan2(r,o)}};function tt(t){return t.split("(")[1].split(")")[0].split(/\s*,\s*/)}function U(t,e){return window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):0}function et(t,e){if(he[t])return he[t](e);var n=U(t,e);return typeof n=="string"&&Xn.test(n)?parseFloat(n):n}var nt,ot;function Yn(){if(!nt){let t=document.documentElement.style.fontSize;document.documentElement.style.fontSize="100%",nt=et("font-size",document.documentElement),document.documentElement.style.fontSize=t||""}return nt}function Kn(){return ot||(ot=et("font-size",document.documentElement)),ot}window.addEventListener("resize",()=>{nt=void 0,ot=void 0});var A=y(Et,{number:S,string:J({em:function(t){return Yn()*t},px:function(t){return t},rem:function(t){return Kn()*t},vw:function(t){return window.innerWidth*t/100},vh:function(t){return window.innerHeight*t/100},vmin:function(t){return window.innerWidthn?o:n}n=nq.maxScrollInterval?q.maxScrollInterval:1.4*n}function it(){return ye}function xe(t){let e=T(t),n=window.getComputedStyle(t,null),o=A(n.getPropertyValue("padding-left")),r=A(n.getPropertyValue("padding-right"));return e.leftPadding=e.left+o,e.rightPadding=e.left+e.width-r,e.centrePadding=e.leftPadding+(e.width-o-r)/2,e}function Ee(t){let e=window.getComputedStyle(t,null).getPropertyValue("scroll-snap-align");return e.endsWith("start")?"left":e.endsWith("end")?"right":"centre"}function Se(t,e,n){let o=xe(t),r=T(e),i=Ee(e);t.scrollTo({top:t.scrollTop,left:t.scrollLeft+(i==="left"?r.left-o.leftPadding:i==="right"?r.right-o.rightPadding:r.left+r.width/2-o.centrePadding),behavior:n})}function Te(t,e){return Se(t,e,"smooth"),e}function B(t,e){return t.style.setProperty("scroll-behavior","auto","important"),Se(t,e,"auto"),t.style.setProperty("scroll-behavior",""),e}function Le(t,e){let{leftPadding:n,rightPadding:o,centrePadding:r}=xe(t),i=e.length,s;for(;s=e[--i];){let u=T(s);if(!u)continue;let f=Ee(s),l=u.width/2+(f==="left"?n:f==="right"?o:r);if((f==="left"?u.left:f==="right"?u.right:u.left+u.width/2)<=l)break}return s}function ke(t){return!!t.dataset.slideIndex}function Pe(t){let{scroller:e,elements:n,children:o}=t,r=Le(e,n);return ke(r)?o[r.dataset.slideIndex]:r}function Fe(t){let{scroller:e,children:n,elements:o}=t,r=Le(e,o),i;!r||(ke(r)?(i=n[r.dataset.slideIndex],B(e,i)):i=r,t.activations.push(i))}function to(t,e){t.style.setProperty("scroll-snap-type",""),e.stop()}var Oe=y((t,e)=>e.type,{pointerdown:function(t,e){return t.e0=e,t.x0=e.clientX,t.y0=e.clientY,t},pointermove:function(t,e){let n=e.clientX,o=e.clientY;if(!t.gesturing){if(Math.abs(n-t.x0)(clearTimeout(s),setTimeout(to,it()*1e3,n,l)))}return t.gesturing=!1,t.e0=void 0,t.x0=void 0,t.y0=void 0,t.pointers=void 0,t.scrollLeft0=void 0,t}});var eo=Object.assign,no={capture:!0,passive:!0};function oo(t,e){t.timer=void 0,t.stream.push(e);let n=t.times;n.length>1&&be(n),n.length=0}function Ae(t){this.element=t,this.times=[]}eo(Ae.prototype,m.prototype,{pipe:function(t){this.stream=t,this.element.addEventListener("scroll",this,no)},handleEvent:function(t){let e=t.timeStamp/1e3;this.times.push(e),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(oo,it()*1e3,this,t)},stop:function(){this.element.removeEventListener("scroll",this),m.prototype.stop.apply(this,arguments)}});function kt(t){return new g(new Ae(t))}function ro(t,e,n){let o=n.length,r=-1/0;for(;o--;){let l=T(n[o]),p=l.x+l.width;r=p>r?p:r}let i=T(e),s=getComputedStyle(t),u=A(s.paddingLeft||0),f=A(s.paddingRight||0);return u+f+r-i.x}function io(t,e,n){let o=ro(t,e,n);t.style.setProperty("--scroll-width",o+"px")}function so(t){return!t.dataset.slideIndex}var Ce={construct:function(t){let e=b("slot",{part:"slides"}),n=b("div",{class:"scroller",children:[e]}),o=b("nav",{part:"controls",children:[b("slot",{name:"controls"})]});t.append(n,o);let r=g.of(),i=g.combine({host:r,elements:x("slotchange",e).map(c=>a.elements=e.assignedElements())}).broadcast({memory:!0}),s=i.map(c=>{let E=c.elements.filter(so);return Zt(a.children,E)?void 0:a.children=E}).broadcast({memory:!0}),u=g.of(null),f=g.of(),l=f.filter(c=>a.active!==c&&Lt("slide-active",c)).map(c=>a.active=c).broadcast({memory:!0,hot:!0}),p=x("click",t).filter(fe).broadcast(),a=this[d]={clickSuppressTime:-1/0,host:this,style:window.getComputedStyle(this),scroller:n,slides:e,controls:o,load:r,views:u,activations:f,actives:l,slotchanges:i,mutations:s,clicks:p};g.merge(i,x("resize",window)).each(c=>io(n,e,a.elements)),g.combine({children:s,child:u}).map(c=>!a.active||a.active===c.child?B(n,c.children.includes(c.child)?c.child:c.children[0]):(Te(n,c.child),c.child.dataset.slideIndex?c.children[c.child.dataset.slideIndex]:c.child)).pipe(f),kt(n).filter(()=>!a.gesturing).each(c=>Fe(a)),Tt({threshold:"0.25rem",device:"mouse"},t).filter(()=>a.children.length>1).each(c=>{a.pointers=c,c.reduce(Oe,a)}),p.each(c=>{c.timeStamp-a.clickSuppressTime<120&&(c.preventDefault(),c.stopPropagation())}),x("fullscreenchange",window).each(c=>{(c.target===this||c.target.contains(this))&&B(n,a.active)}),x("focusin",this).map(c=>a.children.indexOf(c.target)!==-1?c.target:a.children.find(E=>E.contains(c.target))).pipe(u),x("keydown",this).filter(()=>document.activeElement===this||this.contains(document.activeElement)).map(y(H("keyCode"),{37:c=>(c.preventDefault(),a.elements[a.elements.indexOf(a.active)-1]),39:c=>(c.preventDefault(),a.elements[a.elements.indexOf(a.active)+1]),default:v})).pipe(u)},load:function(t){this[d].load.push(this)}};function st(t,e){function n(o,r){if(t.getState(o)!==r)return t[r?"enable":"disable"](o)}return{attribute:function(o){return n(this,o!==null)},set:function(o){return n(this,!!o)},get:function(){return t.getState(this)}}}function Pt(t,e){t.remove&&t.remove(e);let n;for(;(n=t.indexOf(e))!==-1;)t.splice(n,1);return e}var ls=w(Pt,!0);var co=Object.assign;function W(t,e){this.element=t,this.definitions=e,this.tokens=[]}co(W.prototype,{contains:function(t){return this.tokens.includes(t)},add:function(){let t=arguments.length;for(;t--;){let e=arguments[t];!this.tokens.includes(e)&&this.definitions[e]&&(this.definitions[e].enable(this.element),this.tokens.push(e))}},remove:function(){let t=arguments.length;for(;t--;){let e=arguments[t];this.tokens.includes(e)&&(this.definitions[e].disable(this.element),Pt(this.tokens,e))}},supports:function(t){return!!this.definitions[t]}});var uo=Array.prototype;function lo(t,e){let n=t.tokens.slice(),o=uo.slice.apply(e),r=n.length;for(;r--;)o.includes(n[r])&&n.splice(r,1);t.remove.apply(t,n),t.add.apply(t,o)}function Ft(t){let e=Symbol("TokenList");function n(o,r){let i=o[e]||(o[e]=new W(o,t));lo(i,r.trim().split(/\s+/))}return{attribute:function(o){n(this,o||"")},set:function(o){n(this,o+"")},get:function(){return this[e]||(this[e]=new W(this,t))}}}var Ot={};G(Ot,{disable:()=>ho,enable:()=>mo,getState:()=>go});var ao=J({s:S,ms:t=>t/1e3});function po(t){let{active:e,children:n,elements:o,host:r}=t,i=o.indexOf(e),s=o[i+1]||n[0];t.autoplay.timer=null,!!s&&(r.active=s)}function fo(t){let{active:e,style:n}=t,o=ao(window.getComputedStyle(e).getPropertyValue("--slide-duration")||n.getPropertyValue("--slide-duration"));clearTimeout(t.autoplay.timer),t.autoplay.timer=setTimeout(po,o*1e3,t)}function Ie(t){clearTimeout(t.autoplay.timer),t.autoplay.timer=null}function mo(t){let e=t[d],{actives:n}=e,o=e.autoplay={},r=g.merge([!1],x("pointerenter pointerleave",t).map(s=>s.type==="pointerenter")),i=g.merge([t.contains(document.activeElement)],x("focusin focusout",t).map(y(H("type"),{focusin:s=>!0,focusout:s=>t.contains(s.relatedTarget)}))).map((s=>u=>s===u?void 0:s=u)());o.updates=g.combine({active:n,hover:r,focus:i}).each(s=>s.hover||s.focus?Ie(e):fo(e))}function ho(t){let e=t[d];Ie(e),e.autoplay.updates.stop(),e.autoplay=void 0}function go(t){return!!t[d].autoplay}var At={};G(At,{disable:()=>yo,enable:()=>vo,getState:()=>bo});function je(t,e){let n=t.cloneNode(!0);return n.dataset.slideIndex=e,n.removeAttribute("id"),n.setAttribute("aria-hidden","true"),n.tabIndex="-1",n}function wo(t){let{active:e,children:n,host:o,scroller:r}=t;if(t.loop.prepends&&(t.loop.prepends.forEach(c=>c.remove()),t.loop.appends.forEach(c=>c.remove()),t.loop.prepends=void 0,t.loop.appends=void 0),n.length<2){t.elements=t.slides.assignedElements();return}let i=o.clientWidth,s=n.map(T),u=s[1].left,f=s[s.length-2].right,l=1;for(;s[++l]&&s[l].leftf-i;);let a=n.slice(++l).map((c,E)=>je(c,l+E));o.prepend.apply(o,a),o.append.apply(o,p),t.loop.prepends=a,t.loop.appends=p,t.elements=t.slides.assignedElements(),B(r,e||n[0])}function vo(t){let e=t[d],{mutations:n}=e,o=e.loop={};o.renders=n.each(r=>wo(e))}function yo(t){let e=t[d];e.loop&&(e.loop.prepends&&e.loop.prepends.forEach(n=>n.remove()),e.loop.appends&&e.loop.appends.forEach(n=>n.remove()),e.loop.renders.stop(),e.loop=void 0)}function bo(t){return!!t[d].loop}var Ct={};G(Ct,{disable:()=>Eo,enable:()=>xo,getState:()=>So});function C(t){if(typeof t!="object"||arguments.length>1)throw new Error("delegate() now takes an object of selector:fn pairs.");let e=Object.keys(t);return function(o){let r=o.target,i=-1;for(;e[++i];){let s=r.closest(e[i]);if(s)return t[e[i]](s,...arguments)}}}function He(t,e,n,o){o===0?t.hidden=!0:t.hidden=!1,o===n.length-1?e.hidden=!0:e.hidden=!1}function xo(t){let e=t[d],{actives:n,clicks:o,slotchanges:r}=e,i=e.navigation={prev:b("button",{part:"prev-button",type:"button",name:"navigation",value:"-1",html:"Previous"}),next:b("button",{part:"next-button",type:"button",name:"navigation",value:"1",html:"Next"})};e.controls.prepend(i.prev,i.next),i.updates=g.combine({active:n,changes:r}).each(s=>He(i.prev,i.next,s.changes.elements,s.changes.elements.indexOf(s.active))),i.clicks=o.each(C({'[name="navigation"]':function(s,u){let f=parseFloat(s.value),l=e.elements.indexOf(e.active)+f,p=e.elements[l];!p||(t.active=p,He(i.prev,i.next,e.elements,l))}}))}function Eo(t){let e=t[d];e.navigation.prev.remove(),e.navigation.next.remove(),e.navigation.updates.stop(),e.navigation.clicks.stop(),e.navigation=void 0}function So(t){return!!t[d].navigation}var It={};G(It,{disable:()=>ko,enable:()=>Lo,getState:()=>Po});function Me(t,e,n){let{active:o,buttons:r,index:i}=t;if(o===n)return;i>-1&&(t.activeSpan.remove(),r.children[i].part.remove("page-button-active"));let s=e.indexOf(n);s!==-1&&(r.children[s].part.add("page-button-active"),r.children[s].append(t.activeSpan),t.index=s,t.active=n)}function To(t,e,n,o){return e.buttons&&(e.buttons.remove(),e.buttons=void 0),o.length<2||(e.buttons=b("div",{part:"pagination",children:o.map((r,i)=>b("button",{part:"page-button",type:"button",name:"pagination",value:i}))}),t.append(e.buttons)),o.length}function Lo(t){let e=t[d],{shadow:n,actives:o,clicks:r,mutations:i}=e,s=e.pagination={activeSpan:b("span",{class:"invisible",text:"(Current slide)"})};s.mutations=i.each(()=>To(e.controls,s,n,e.children)),s.updates=g.combine({active:o,children:i}).filter(u=>u.children.length>1).each(u=>Me(s,e.children,e.active)),s.clicks=r.each(C({'[name="pagination"]':function(u,f){let{host:l}=e,p=e.children,a=p[u.value];!a||(l.active=a,Me(s,p,a))}}))}function ko(t){let e=t[d];e.pagination.buttons.remove(),e.pagination.mutations.stop(),e.pagination.updates.stop(),e.pagination.clicks.stop(),e.pagination=void 0}function Po(t){return!!t[d].pagination}var jt={};G(jt,{disable:()=>Oo,enable:()=>Fo,getState:()=>Ao});var De=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled;function ct(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement}function Be(t){return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():void 0}function ut(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}function Fo(t){let e=t[d];if(!De)return;let n=e.fullscreen={button:b("button",{part:"fullscreen-button",type:"button",name:"fullscreen",html:"Open in fullscreen"})};e.controls.append(n.button),n.changes=x("fullscreenchange",t).filter(o=>ct()===t).each(o=>{n.button.part.add("fullscreen-button-active"),n.button.innerHTML="Close fullscreen",document.activeElement!==t&&(n.tabIndex=t.tabIndex,t.tabIndex<0&&(t.tabIndex=0),t.focus());let r=x("fullscreenchange",t).each(i=>{n.button.part.remove("fullscreen-button-active"),n.button.innerHTML="Open in fullscreen",t.tabIndex=n.tabIndex,n.tabIndex=void 0,r.stop()})}),n.clicks=e.clicks.each(C({'[name="fullscreen"]':(o,r)=>{let i=ct();if(i===t){ut();return}i&&ut(),Be(t)}}))}function Oo(t){let e=t[d];ct()===t&&ut(),e.fullscreen.button.remove(),e.fullscreen.clicks.stop(),e.fullscreen.changes.stop(),e.fullscreen=void 0}function Ao(t){return!!t[d].fullscreen}var Ge={active:{attribute:function(t){this.active=t},set:function(t){let e=this[d],n=typeof t=="object"?t:/^\d/.test(t+"")?this.querySelector("#\\3"+(t+"")[0]+" "+(t+"").slice(1)):/^\#/.test(t+"")?this.querySelector(t):this.querySelector("#"+t);if(!n)throw new Error("Cannot set active – not a child of slide-show");e.views.push(n)},get:function(){return this[d].active}},autoplay:st(Ot,"autoplay"),controls:Ft({navigation:Ct,pagination:It,fullscreen:jt}),loop:st(At,"loop")};var Co=import.meta.url.replace(/\/[^\/]*\.js/,"/slide-show-shadow.css"),Qs=wt("slide-show",Ce,Ge,Co);window.console&&window.console.log("%c%c registered (documentation at %chttps://stephen.band/slide-show/%c)","color: #3a8ab0; font-weight: 600;","color: #888888; font-weight: 400;","color: inherit; font-weight: 400;","color: #888888; font-weight: 400;");export{Qs as default}; +var qe=Object.defineProperty;var Mt=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var Dt=(t,e)=>{var n={};for(var o in t)We.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&Mt)for(var o of Mt(t))e.indexOf(o)<0&&$e.call(t,o)&&(n[o]=t[o]);return n};var G=(t,e)=>{for(var n in e)qe(t,n,{get:e[n],enumerable:!0})};function $(t){var e=new Map;return function(o){if(e.has(o))return e.get(o);var r=t(o);return e.set(o,r),r}}var Ne=Array.prototype;function Xe(t,e){return typeof t=="function"?t.apply(null,e):t}function Bt(t,e,n){n=n||t.length;var o=n===1?e?t:$(t):$(function(r){return Bt(function(){var i=[r];return i.push.apply(i,arguments),t.apply(null,i)},e,n-1)});return function r(i){return arguments.length===0?r:arguments.length===1?o(i):arguments.length>=n?t.apply(null,arguments):Xe(o(i),Ne.slice.call(arguments,1))}}var w=Bt;function Ye(t,e){return 1-Math.pow(1-e,t)}var Gt=w(Ye);function v(){}function at(t,e){return e(t)}function S(t){return t}var Ke=Array.prototype;function pt(){let t=arguments;return t.length?e=>Ke.reduce.call(t,at,e):S}function ft(t,e,n){return n*(e-t)+t}var Ze=window.performance,zt=window.requestAnimationFrame,Qe=window.cancelAnimationFrame;function dt(t,e,n){var o=Ze.now();function r(s){var l=(s-o)/(t*1e3);l<1?(l>0&&e(l),i=zt(r)):(e(1),n&&n())}var i=zt(r);return function(){Qe(i)}}function N(t,e,n,o,r,i){let s=o[n];return dt(t,pt(e,l=>ft(s,r,l),l=>o[n]=l),i)}function Je(){return{x:0,y:0,left:0,top:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}}function T(t){return t===window?Je():t.getClientRects()[0]||t.getBoundingClientRect()}var H={scrollDuration:.3,scrollDurationPerHeight:.125,scrollTransform:Gt(3)},_t=v;function tn(t,e){if(e.behavior==="smooth"){let n=t.style.getPropertyValue("scroll-snap-type"),o=()=>t.style.setProperty("scroll-snap-type",n);if(t.style.setProperty("scroll-snap-type","none"),e.left!==void 0){let r=t===document.body?window.innerWidth:T(t).width,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.left-t.scrollLeft)/r;_t=N(i,H.scrollTransform,"scrollLeft",t,e.left,o)}else{let r=t===document.body?window.innerHeight:T(t).height,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.top-t.scrollTop)/r;_t=N(i,H.scrollTransform,"scrollTop",t,e.top,o)}}else e.left!==void 0&&(t.scrollLeft=e.left),e.top!==void 0&&(t.scrollTop=e.top)}if(!("scrollBehavior"in document.documentElement.style)){console.log("Polyfilling Element.scrollTo(options).");let t="scrollTo"in Element.prototype?Element:HTMLElement,e=t.scrollIntoView;t.prototype.scrollTo=function(n){typeof n=="object"?tn(this,n):e.apply(this,arguments)}}function y(t,e){return function(){let o=t.apply(this,arguments),r=e[o]||e.default;if(!r)throw new Error('overload() no handler for "'+o+'"');return r.apply(this,arguments)}}var en=y(S,{is:v,tag:v,html:function(t,e,n){e.innerHTML=n},text:function(t,e,n){e.textContent=n},children:function(t,e,n){e.innerHTML="",n.forEach(o=>{e.appendChild(o)})},points:M,cx:M,cy:M,r:M,preserveAspectRatio:M,viewBox:M,default:function(t,e,n){t in e?e[t]=n:e.setAttribute(t,n)}});function M(t,e,n){e.setAttribute(t,n)}function nn(t,e){for(var n=Object.keys(e),o=n.length;o--;)en(n[o],t,e[n[o]]);return t}var mt=w(nn,!0);var on="http://www.w3.org/2000/svg",Rt=document.createElement("div");var Ut=(t,e)=>e&&typeof e;function Vt(t,e){let n=document.createRange();return n.selectNode(t),n.createContextualFragment(e)}function L(t,e){var n=document.createElementNS(on,t);return e&&(n.innerHTML=e),n}var rn=y(S,{comment:function(t,e){return document.createComment(e||"")},fragment:y(Ut,{string:function(t,e,n){if(n)return Vt(n,e);let o=document.createDocumentFragment();Rt.innerHTML=e;let r=Rt.childNodes;for(;r[0];)o.appendChild(r[0]);return o},object:function(t,e,n){let o=n?Vt(n):document.createDocumentFragment();return typeof e.length=="number"?o.append.apply(o,e):mt(o,e),o},default:()=>document.createDocumentFragment()}),text:function(t,e){return document.createTextNode(e||"")},circle:L,ellipse:L,g:L,glyph:L,image:L,line:L,rect:L,use:L,path:L,pattern:L,polygon:L,polyline:L,svg:L,default:y(Ut,{string:function(t,e){let n=document.createElement(t);return n.innerHTML=e,n},object:function(t,e){let n=document.createElement(t);return typeof e.length=="number"?n.append.apply(n,e):mt(n,e),n},default:t=>{if(typeof t!="string")throw new Error('create(tag, content) accepts only a string as tag "'+typeof t+'"');return document.createElement(t)}})}),b=rn;function ht(t,e,n){let o;typeof n!="string"&&n.input!==void 0&&n.index!==void 0&&(o=n,n=o.input.slice(n.index+n[0].length+(n.consumed||0)));let r=t.exec(n);if(!r)return;let i=e(r);return o&&(o.consumed=(o.consumed||0)+r.index+r[0].length+(r.consumed||0)),i}var fr=w(ht,!0);function sn(t,e,n){throw n.input!==void 0&&n.index!==void 0&&(n=n.input),new Error('Cannot parse string "'+n+'"')}function cn(t,e,n){let o=-1;for(;++ocn(e,n,i),o);return r===void 0?e.catch?e.catch(n,o):sn(t,e,o):r}var qt=w(un,!0);var gt=v;var k=Symbol("internals"),A=Symbol("shadow"),Wt=Object.defineProperties,ln={a:HTMLAnchorElement,dl:HTMLDListElement,p:HTMLParagraphElement,br:HTMLBRElement,fieldset:HTMLFieldSetElement,hr:HTMLHRElement,img:HTMLImageElement,li:HTMLLIElement,ol:HTMLOListElement,optgroup:HTMLOptGroupElement,q:HTMLQuoteElement,textarea:HTMLTextAreaElement,td:HTMLTableCellElement,th:HTMLTableCellElement,tr:HTMLTableRowElement,tbody:HTMLTableSectionElement,thead:HTMLTableSectionElement,tfoot:HTMLTableSectionElement,ul:HTMLUListElement},an={name:{set:function(t){return this.setAttribute("name",t)},get:function(){return this.getAttribute("name")||""}},form:{get:function(){return this[k].form}},labels:{get:function(){return this[k].labels}},validity:{get:function(){return this[k].validity}},validationMessage:{get:function(){return this[k].validationMessage}},willValidate:{get:function(){return this[k].willValidate}},checkValidity:{value:function(){return this[k].checkValidity()}},reportValidity:{value:function(){return this[k].reportValidity()}}},pn={},$t={once:!0},fn=0,Nt=!1;function dn(t){return ln[t]||window["HTML"+t[0].toUpperCase()+t.slice(1)+"Element"]||(()=>{throw new Error('Constructor not found for tag "'+t+'"')})()}var mn=qt(/^\s*?\s*$|^\s*?\s*$/,{1:(t,e)=>({name:e[1]}),2:(t,e)=>({name:e[3],tag:e[2]}),catch:function(t,e){throw new SyntaxError(`dom element() – name must be of the form 'element-name' or 'tag is="element-name"' (`+e+")")}},null);function hn(t,e){if(t.hasOwnProperty(e)){let n=t[e];delete t[e],t[e]=n}return t}function gn(t,e,n){t._initialLoad=!0;let o=t.attachShadow({mode:e.mode||"closed",delegatesFocus:e.focusable||!1});if(n){let r=b("link",{rel:"stylesheet",href:n});o.append(r)}return t[A]=o,o}function wn(t){var e;if(t.attachInternals){if(e=t.attachInternals(),e.setFormValue)return e}else e={shadowRoot:t.shadowRoot};return e.input=b("input",{type:"hidden",name:t.name}),t.appendChild(e.input),e.setFormValue=function(n){this.input.value=n},e}function vn(t){t._initialAttributes={},t._n=0}function yn(t,e,n){let o=t._initialAttributes;for(;t._nfn?gn(p,e,o||e.stylesheet):void 0,c=a.formAssociated&&wn(p);return i&&(Nt=!0),e.construct&&e.construct.call(p,u,c),l&&(vn(p),Promise.resolve(1).then(function(){Xt(p,a.observedAttributes,l)})),f&&Object.keys(f).reduce(hn,p),p}return a.prototype=Object.create(s.prototype,f),f&&f.value&&(a.formAssociated=!0,Wt(a.prototype,an),(e.enable||e.disable)&&(a.prototype.formDisabledCallback=function(p){return p?e.disable&&e.disable.call(this,this[A],this[k]):e.enable&&e.enable.call(this,this[A],this[k])}),e.reset&&(a.prototype.formResetCallback=function(){return e.reset.call(this,this[A],this[k])}),e.restore&&(a.prototype.formStateRestoreCallback=function(){return e.restore.call(this,this[A],this[k])})),l&&(a.observedAttributes=Object.keys(l),a.prototype.attributeChangedCallback=function(p,u,c){if(!this._initialAttributes)return l[p].call(this,c);this._initialAttributes[p]=c,yn(this,a.observedAttributes,l)}),a.prototype.connectedCallback=function(){let p=this,u=p[A],c=p[k];if(p._initialAttributes&&Xt(p,a.observedAttributes,l),p._initialLoad){let E=u.querySelectorAll('link[rel="stylesheet"]');if(E.length){let ze=0,lt=E.length,Ht=function(Ue){++ze>=E.length&&(delete p._initialLoad,e.load&&(gt("element()","loaded",Array.from(E).map(Ve=>Ve.href).join(` +`)),e.load.call(p,u)))},_e=Ht;for(;lt--;)E[lt].addEventListener("load",Ht,$t),E[lt].addEventListener("error",_e,$t);e.connect&&e.connect.call(this,u,c)}else e.connect&&e.connect.call(this,u,c),e.load&&e.load.call(this,u,c)}else e.connect&&e.connect.call(this,u,c)},e.disconnect&&(a.prototype.disconnectedCallback=function(){return e.disconnect.call(this,this[A],this[k])}),gt("element()","<"+(i?i+" is="+r:r)+">"),window.customElements.define(r,a,i&&{extends:i}),i&&!Nt&&document.querySelectorAll('[is="'+r+'"]').forEach(p=>{Wt(p,f),e.construct&&e.construct.apply(p);let u;for(u in l){let c=p.attributes[u];c&&l[u].call(p,c.value)}e.connect&&e.connect.apply(p)}),a}function Kt(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object")return!1;let n=Object.keys(t),o=Object.keys(e),r=n.length;for(;r--;){if(t[n[r]]===void 0){if(e[n[r]]!==void 0)return!1}else if(!e.hasOwnProperty(n[r])||!Kt(t[n[r]],e[n[r]]))return!1;let i=o.indexOf(n[r]);i>-1&&o.splice(i,1)}for(r=o.length;r--;)if(e[o[r]]===void 0){if(t[o[r]]!==void 0)return!1}else return!1;return!0}var Zt=w(Kt,!0);function En(t,e){return e[t]}var D=w(En,!0);var Sn=Object.freeze;function Qt(){return this}var P=Sn({shift:v,push:v,forEach:v,join:function(){return""},map:Qt,filter:Qt,includes:function(){return!1},reduce:function(t,e){return e},length:0,each:v,pipe:S,start:v,stop:v,done:v,valueOf:function(){return null}});function vt(){return this}function yt(t){return t&&t[Symbol.iterator]}var Tn=Object.assign;function Ln(t){return t.stop?t.stop():t()}function kn(t){t.forEach(Ln),t.length=0}function B(){}Tn(B.prototype,{stop:function(){return this.stopables&&kn(this.stopables),this},done:function(e){return(this.stopables||(this.stopables=[])).push(e),this}});var Pn=Object.assign;function X(t){B.prototype.stop.apply(t);let e=-1,n;for(;n=t[++e];)t[e]=void 0,X(n)}function m(){}Pn(m.prototype,{pipe:function(t){return this[0]=t,t},stop:function(){return X(this[0]),this}});var F=Object.assign,O=Object.create;function z(t,e){e!==void 0&&t[0].push(e)}function Fn(t,e){if(t[1]){let n=-1;for(;t[++n]&&t[n]!==e;);for(;t[n++];)t[n-1]=t[n];X(e)}else t.stop()}function h(t){this.input=t}F(h.prototype,B.prototype,{push:function(t){z(this,t)},pipe:function(t){if(this[0])throw new Error("Stream: Attempt to .pipe() a unicast stream multiple times. Create a multicast stream with stream.broadcast().");return this[0]=t,this.input.pipe(this),t},map:function(t){return new Jt(this,t)},filter:function(t){return new te(this,t)},chunk:function(t){return new ne(this,t)},flatMap:function(t){return new ee(this,t)},take:function(t){return new oe(this,t)},each:function(t){return new se(this,t)},reduce:function(t,e){return new re(this,t,e)},scan:function(t,e){return new ie(this,t,e)},stop:function(){return Fn(this.input,this),this}});function Jt(t,e){this.input=t,this.fn=e}Jt.prototype=F(O(h.prototype),{push:function(e){let n=this.fn;z(this,n(e))}});function te(t,e){this.input=t,this.fn=e}te.prototype=F(O(h.prototype),{push:function(e){this.fn(e)&&z(this,e)}});function ee(t,e){this.input=t,this.fn=e}ee.prototype=F(O(h.prototype),{push:function(e){let o=this.fn(e);if(o!==void 0)if(yt(o))for(let r of o)z(this,r);else throw new Error("Stream: Cannot .flatMap() non-iterable values")}});function ne(t,e){this.input=t,this.chunk=[],typeof e=="number"?this.n=e:typeof e=="function"&&(this.fn=e)}ne.prototype=F(O(h.prototype),{fn:function(t){return t.length===this.n},push:function(e){let n=this.chunk;n.push(e),this.fn(n)&&(z(this,n),this.chunk=[])}});function oe(t,e){this.input=t,this.count=e}oe.prototype=F(O(h.prototype),{push:function(e){this[0].push(e),--this.count||this.stop()}});function re(t,e,n){return this.input=t,this.fn=e,this.value=n,this.i=0,t.pipe(this),n}re.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t,this.i++,this)}});function ie(t,e,n){this.input=t,this.fn=e,this.value=n}ie.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t),this[0].push(this.value)}});function se(t,e){this.input=t,this.push=e,t.pipe(this)}se.prototype=F(O(h.prototype),{each:null,reduce:null,pipe:null});var On=Array.prototype,An=Object.assign,Cn=Object.create;function _(t){this.buffer=t||[]}_.prototype=An(Cn(h.prototype),m.prototype,{push:function(t){t!==void 0&&this.buffer.push(t)},pipe:function(t){for(this[0]=t;this.buffer.length;)this[0].push(On.shift.apply(this.buffer));return this.buffer=this[0],t}});var In=Object.assign,jn=Object.create;function R(t,e){this.input=t,this.memory=!!(e&&e.memory),e&&e.hot&&this.pipe(P)}R.prototype=In(jn(h.prototype),{push:function(t){if(t!==void 0){this.memory&&(this.value=t);let e=-1;for(;this[++e];)this[e].push(t)}},pipe:function(t){let e=-1;for(;this[++e];);return this[e]=t,this.value!==void 0&&t.push(this.value),e===0&&this.input.pipe(this),t}});var Hn=Object.assign;function Y(t){this.promise=t}Hn(Y.prototype,m.prototype,{pipe:function(t){let e=this.promise;this[0]=t,e.then(n=>this[0].push(n)).finally(n=>this.stop())},stop:function(){m.prototype.stop.apply(this,arguments),this[0]=P}});var ue=Object.assign,le=Object.keys;function ce(t,e,n){let o=t.values,r=t.names,i=t[0];o[e]=n,(t.active||(t.active=le(o).length===r.length))&&i.push(ue({},o))}function K(t){this.inputs=t,this.active=!1}ue(K.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this.values={},this.names=le(e),this[0]=t;for(let n in e){let o=e[n];o.pipe?t.done(o.each(r=>ce(this,n,r))):o.then?o.then(r=>ce(this,n,r)):console.log("Todo: combine() raw values ?")}}});var Mn=Object.assign;function Z(t){this.inputs=t}Mn(Z.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this[0]=t;let n=-1,o;for(;o=e[++n];)if(o.pipe)o.pipe(t);else if(o.then)o.then(r=>t.push(r));else{let r=-1;for(;++r0}function Gn(t,e,n){return t[n]=e.shift(),t}function zn(t){return[]}function bt(t,e,n,o){n.push(o),e.every(Bn)&&t.push(e.reduce(Gn,{}))}function Q(t){this.inputs=t,this.buffers=xt.map.call(t,zn)}Dn(Q.prototype,m.prototype,{pipe:function(t){let e=this.inputs,n=this.buffers;this[0]=t,xt.forEach.call(e,(o,r)=>{let i=n[r];o.each?t.done(o.each(s=>bt(t,n,i,s))):o.then?o.then(s=>bt(t,n,i,s)):xt.forEach.call(o,s=>bt(t,n,i,s))})},stop:function(){let t=this.inputs,e=-1,n;for(;n=t[++e];)n.stop();return m.prototype.stop.apply(this,arguments)}});var _n=Array.prototype,ae=Object.assign;function Rn(t){throw new TypeError("Stream: invalid source object cannot be read into stream")}var g=ae(h,{of:function(){return new _(_n.slice.apply(arguments))},from:function(t){return t.pipe?new h(t):t.then?new h(new Y(t)):typeof t.length=="number"?new _(t):Rn(t)},broadcast:function(e){return new R(P,e)},combine:function(e){return new h(new K(e))},merge:function(){return new h(new Z(arguments))},zip:function(){return new h(new Q(arguments))}});ae(h.prototype,{log:vt,broadcast:function(t){return new R(this,t)}});var Un=Object.assign,Vn=/\s+/,pe={fullscreenchange:"fullscreenElement"in document?"fullscreenchange":"webkitFullscreenElement"in document?"webkitfullscreenchange":"fullscreenchange"};function fe(t){return t.which===1&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}var de=0;window.addEventListener("click",t=>de=t.timeStamp);function qn(t,e){return t.node.addEventListener(pe[e]||e,t,t.options),t}function Wn(t,e){return t.node.removeEventListener(pe[e]||e,t),t}function me(t,e,n){this.types=t.split(Vn),this.options=e,this.node=n,this.select=e&&e.select}Un(me.prototype,m.prototype,{pipe:function(t){this[0]=t,this.types.reduce(qn,this)},handleEvent:function(t){if(!(t.type==="click"&&t.timeStamp<=de)){if(this.select){let e=t.target.closest(this.select);if(!e)return;t.selectedTarget=e}this[0].push(t)}},stop:function(){this.types.reduce(Wn,this),m.prototype.stop.apply(this,arguments)}});function x(t,e){let n;return typeof t=="object"&&(n=t,t=n.type),new g(new me(t,n,e))}function Et(t){return typeof t}var $n=/^\s*([+-]?\d*\.?\d+)([^\s\d]*)\s*$/;function Nn(t,e){if(typeof e=="number")return e;var n=$n.exec(e);if(!n||!t[n[2]||""]){if(!t.catch)throw new Error('Cannot parse value "'+e+'" with provided units '+Object.keys(t).join(", "));return n?t.catch(parseFloat(n[1]),n[2]):t.catch(parseFloat(e))}return t[n[2]||""](parseFloat(n[1]))}var J=w(Nn);var Xn=/px$/,he={"transform:translateX":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[4])},"transform:translateY":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[5])},"transform:scale":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.sqrt(o*o+r*r)},"transform:rotate":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.atan2(r,o)}};function tt(t){return t.split("(")[1].split(")")[0].split(/\s*,\s*/)}function U(t,e){return window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):0}function et(t,e){if(he[t])return he[t](e);var n=U(t,e);return typeof n=="string"&&Xn.test(n)?parseFloat(n):n}var nt,ot;function Yn(){if(!nt){let t=document.documentElement.style.fontSize;document.documentElement.style.fontSize="100%",nt=et("font-size",document.documentElement),document.documentElement.style.fontSize=t||""}return nt}function Kn(){return ot||(ot=et("font-size",document.documentElement)),ot}window.addEventListener("resize",()=>{nt=void 0,ot=void 0});var C=y(Et,{number:S,string:J({em:function(t){return Yn()*t},px:function(t){return t},rem:function(t){return Kn()*t},vw:function(t){return window.innerWidth*t/100},vh:function(t){return window.innerHeight*t/100},vmin:function(t){return window.innerWidthn?o:n}n=nq.maxScrollInterval?q.maxScrollInterval:1.4*n}function it(){return ye}function xe(t){let e=T(t),n=window.getComputedStyle(t,null),o=C(n.getPropertyValue("padding-left")),r=C(n.getPropertyValue("padding-right"));return e.leftPadding=e.left+o,e.rightPadding=e.left+e.width-r,e.centrePadding=e.leftPadding+(e.width-o-r)/2,e}function Ee(t){let e=window.getComputedStyle(t,null).getPropertyValue("scroll-snap-align");return e.endsWith("start")?"left":e.endsWith("end")?"right":"centre"}function Se(t,e,n){let o=xe(t),r=T(e),i=Ee(e);t.scrollTo({top:t.scrollTop,left:t.scrollLeft+(i==="left"?r.left-o.leftPadding:i==="right"?r.right-o.rightPadding:r.left+r.width/2-o.centrePadding),behavior:n})}function Te(t,e){return Se(t,e,"smooth"),e}function I(t,e){return t.style.setProperty("scroll-behavior","auto","important"),Se(t,e,"auto"),t.style.setProperty("scroll-behavior",""),e}function Le(t,e){let{leftPadding:n,rightPadding:o,centrePadding:r}=xe(t),i=e.length,s;for(;s=e[--i];){let l=T(s);if(!l)continue;let f=Ee(s),a=l.width/2+(f==="left"?n:f==="right"?o:r);if((f==="left"?l.left:f==="right"?l.right:l.left+l.width/2)<=a)break}return s}function ke(t){return!!t.dataset.slideIndex}function Pe(t){let{scroller:e,elements:n,children:o}=t,r=Le(e,n);return ke(r)?o[r.dataset.slideIndex]:r}function Fe(t){let{scroller:e,children:n,elements:o}=t,r=Le(e,o),i;!r||(ke(r)?(i=n[r.dataset.slideIndex],I(e,i)):i=r,t.activations.push(i))}function to(t,e){t.style.setProperty("scroll-snap-type",""),e.stop()}var Oe=y((t,e)=>e.type,{pointerdown:function(t,e){return t.e0=e,t.x0=e.clientX,t.y0=e.clientY,t},pointermove:function(t,e){let n=e.clientX,o=e.clientY;if(!t.gesturing){if(Math.abs(n-t.x0)(clearTimeout(s),setTimeout(to,it()*1e3,n,a)))}return t.gesturing=!1,t.e0=void 0,t.x0=void 0,t.y0=void 0,t.pointers=void 0,t.scrollLeft0=void 0,t}});var eo=Object.assign,no={capture:!0,passive:!0};function oo(t,e){t.timer=void 0,t.stream.push(e);let n=t.times;n.length>1&&be(n),n.length=0}function Ae(t){this.element=t,this.times=[]}eo(Ae.prototype,m.prototype,{pipe:function(t){this.stream=t,this.element.addEventListener("scroll",this,no)},handleEvent:function(t){let e=t.timeStamp/1e3;this.times.push(e),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(oo,it()*1e3,this,t)},stop:function(){this.element.removeEventListener("scroll",this),m.prototype.stop.apply(this,arguments)}});function kt(t){return new g(new Ae(t))}function ro(t,e,n){let o=n.length,r=-1/0;for(;o--;){let a=T(n[o]),p=a.x+a.width;r=p>r?p:r}let i=T(e),s=getComputedStyle(t),l=C(s.paddingLeft||0),f=C(s.paddingRight||0);return l+f+r-i.x}function io(t,e,n){let o=ro(t,e,n);t.style.setProperty("--scroll-width",o+"px")}function so(t){return!t.dataset.slideIndex}var Ce={construct:function(t){let e=b("slot",{part:"slides"}),n=b("div",{class:"scroller",children:[e]}),o=b("nav",{part:"controls",children:[b("slot",{name:"controls"})]});t.append(n,o);let r=g.of().broadcast({memory:!0}),i=g.combine({host:r,elements:x("slotchange",e).map(c=>u.elements=e.assignedElements())}).broadcast({memory:!0}),s=i.map(c=>{let E=c.elements.filter(so);return Zt(u.children,E)?void 0:u.children=E}).broadcast({memory:!0,hot:!0}),l=g.of(),f=g.of(),a=f.map(c=>c.dataset.slideIndex?u.children[c.dataset.slideIndex]:c).filter(c=>u.active!==c&&Lt("slide-active",c)).map(c=>u.active=c).broadcast({memory:!0,hot:!0}),p=x("click",t).filter(fe).broadcast(),u=this[d]={clickSuppressTime:-1/0,host:this,style:window.getComputedStyle(this),elements:P,children:P,scroller:n,slides:e,controls:o,load:r,views:l,activations:f,actives:a,slotchanges:i,mutations:s,clicks:p};g.merge(i,x("resize",window)).each(c=>io(n,e,u.elements)),i.map(c=>c.elements.includes(u.active)?u.active:u.children[0]).map(c=>I(n,c)).pipe(f),g.combine({host:r,child:l}).map(c=>u.elements.includes(c.child)&&u.active!==c.child?c.child:void 0).map(c=>u.active?Te(n,c):I(n,c)).pipe(f),kt(n).filter(()=>!u.gesturing).each(c=>Fe(u)),Tt({threshold:"0.25rem",device:"mouse"},t).filter(()=>u.children.length>1).each(c=>{u.pointers=c,c.reduce(Oe,u)}),p.each(c=>{c.timeStamp-u.clickSuppressTime<120&&(c.preventDefault(),c.stopPropagation())}),x("fullscreenchange",window).each(c=>{(c.target===this||c.target.contains(this))&&I(n,u.active)}),x("focusin",this).map(c=>u.children.indexOf(c.target)!==-1?c.target:u.children.find(E=>E.contains(c.target))).pipe(l),x("keydown",this).filter(()=>document.activeElement===this||this.contains(document.activeElement)).map(y(D("keyCode"),{37:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)-1]),39:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)+1]),default:v})).pipe(l)},load:function(t){this[d].load.push(this)}};function st(t,e){function n(o,r){if(t.getState(o)!==r)return t[r?"enable":"disable"](o)}return{attribute:function(o){return n(this,o!==null)},set:function(o){return n(this,!!o)},get:function(){return t.getState(this)}}}function Pt(t,e){t.remove&&t.remove(e);let n;for(;(n=t.indexOf(e))!==-1;)t.splice(n,1);return e}var as=w(Pt,!0);var co=Object.assign;function W(t,e){this.element=t,this.definitions=e,this.tokens=[]}co(W.prototype,{contains:function(t){return this.tokens.includes(t)},add:function(){let t=arguments.length;for(;t--;){let e=arguments[t];!this.tokens.includes(e)&&this.definitions[e]&&(this.definitions[e].enable(this.element),this.tokens.push(e))}},remove:function(){let t=arguments.length;for(;t--;){let e=arguments[t];this.tokens.includes(e)&&(this.definitions[e].disable(this.element),Pt(this.tokens,e))}},supports:function(t){return!!this.definitions[t]}});var uo=Array.prototype;function lo(t,e){let n=t.tokens.slice(),o=uo.slice.apply(e),r=n.length;for(;r--;)o.includes(n[r])&&n.splice(r,1);t.remove.apply(t,n),t.add.apply(t,o)}function Ft(t){let e=Symbol("TokenList");function n(o,r){let i=o[e]||(o[e]=new W(o,t));lo(i,r.trim().split(/\s+/))}return{attribute:function(o){n(this,o||"")},set:function(o){n(this,o+"")},get:function(){return this[e]||(this[e]=new W(this,t))}}}var Ot={};G(Ot,{disable:()=>ho,enable:()=>mo,getState:()=>go});var ao=J({s:S,ms:t=>t/1e3});function po(t){let{active:e,children:n,elements:o,host:r}=t,i=o.indexOf(e),s=o[i+1]||n[0];t.autoplay.timer=null,!!s&&(r.active=s)}function fo(t){let{active:e,style:n}=t,o=ao(window.getComputedStyle(e).getPropertyValue("--slide-duration")||n.getPropertyValue("--slide-duration"));clearTimeout(t.autoplay.timer),t.autoplay.timer=setTimeout(po,o*1e3,t)}function Ie(t){clearTimeout(t.autoplay.timer),t.autoplay.timer=null}function mo(t){let e=t[d],{actives:n}=e,o=e.autoplay={},r=g.merge([!1],x("pointerenter pointerleave",t).map(s=>s.type==="pointerenter")),i=g.merge([t.contains(document.activeElement)],x("focusin focusout",t).map(y(D("type"),{focusin:s=>!0,focusout:s=>t.contains(s.relatedTarget)}))).map((s=>l=>s===l?void 0:s=l)());o.updates=g.combine({active:n,hover:r,focus:i}).each(s=>s.hover||s.focus?Ie(e):fo(e))}function ho(t){let e=t[d];Ie(e),e.autoplay.updates.stop(),e.autoplay=void 0}function go(t){return!!t[d].autoplay}var At={};G(At,{disable:()=>yo,enable:()=>vo,getState:()=>bo});function je(t,e){let n=t.cloneNode(!0);return n.dataset.slideIndex=e,n.removeAttribute("id"),n.setAttribute("aria-hidden","true"),n.tabIndex="-1",n}function wo(t){let{active:e,children:n,host:o,scroller:r}=t;if(t.loop.prepends&&(t.loop.prepends.forEach(c=>c.remove()),t.loop.appends.forEach(c=>c.remove()),t.loop.prepends=void 0,t.loop.appends=void 0),n.length<2){t.elements=t.slides.assignedElements();return}let i=o.clientWidth,s=n.map(T),l=s[1].left,f=s[s.length-2].right,a=1;for(;s[++a]&&s[a].leftf-i;);let u=n.slice(++a).map((c,E)=>je(c,a+E));o.prepend.apply(o,u),o.append.apply(o,p),t.loop.prepends=u,t.loop.appends=p,t.elements=t.slides.assignedElements(),I(r,e||n[0])}function vo(t){let e=t[d],{mutations:n}=e,o=e.loop={};o.renders=n.each(r=>wo(e))}function yo(t){let e=t[d];e.loop&&(e.loop.prepends&&e.loop.prepends.forEach(n=>n.remove()),e.loop.appends&&e.loop.appends.forEach(n=>n.remove()),e.loop.renders.stop(),e.loop=void 0)}function bo(t){return!!t[d].loop}var Ct={};G(Ct,{disable:()=>Eo,enable:()=>xo,getState:()=>So});function j(t){if(typeof t!="object"||arguments.length>1)throw new Error("delegate() now takes an object of selector:fn pairs.");let e=Object.keys(t);return function(o){let r=o.target,i=-1;for(;e[++i];){let s=r.closest(e[i]);if(s)return t[e[i]](s,...arguments)}}}function He(t,e,n,o){o===0?t.hidden=!0:t.hidden=!1,o===n.length-1?e.hidden=!0:e.hidden=!1}function xo(t){let e=t[d],{actives:n,clicks:o,slotchanges:r}=e,i=e.navigation={prev:b("button",{part:"prev-button",type:"button",name:"navigation",value:"-1",html:"Previous"}),next:b("button",{part:"next-button",type:"button",name:"navigation",value:"1",html:"Next"})};e.controls.prepend(i.prev,i.next),i.updates=g.combine({active:n,changes:r}).each(s=>He(i.prev,i.next,s.changes.elements,s.changes.elements.indexOf(s.active))),i.clicks=o.each(j({'[name="navigation"]':function(s,l){let f=parseFloat(s.value),a=e.elements.indexOf(e.active)+f,p=e.elements[a];!p||(t.active=p,He(i.prev,i.next,e.elements,a))}}))}function Eo(t){let e=t[d];e.navigation.prev.remove(),e.navigation.next.remove(),e.navigation.updates.stop(),e.navigation.clicks.stop(),e.navigation=void 0}function So(t){return!!t[d].navigation}var It={};G(It,{disable:()=>ko,enable:()=>Lo,getState:()=>Po});function Me(t,e,n){let{active:o,buttons:r,index:i}=t;if(o===n)return;i>-1&&(t.activeSpan.remove(),r.children[i].part.remove("page-button-active"));let s=e.indexOf(n);s!==-1&&(r.children[s].part.add("page-button-active"),r.children[s].append(t.activeSpan),t.index=s,t.active=n)}function To(t,e,n,o){return e.buttons&&(e.buttons.remove(),e.buttons=void 0),o.length<2||(e.buttons=b("div",{part:"pagination",children:o.map((r,i)=>b("button",{part:"page-button",type:"button",name:"pagination",value:i}))}),t.append(e.buttons)),o.length}function Lo(t){let e=t[d],{shadow:n,actives:o,clicks:r,mutations:i}=e,s=e.pagination={activeSpan:b("span",{class:"invisible",text:"(Current slide)"})};s.mutations=i.each(()=>To(e.controls,s,n,e.children)),s.updates=g.combine({active:o,children:i}).filter(l=>l.children.length>1).each(l=>Me(s,e.children,e.active)),s.clicks=r.each(j({'[name="pagination"]':function(l,f){let{host:a}=e,p=e.children,u=p[l.value];!u||(a.active=u,Me(s,p,u))}}))}function ko(t){let e=t[d];e.pagination.buttons.remove(),e.pagination.mutations.stop(),e.pagination.updates.stop(),e.pagination.clicks.stop(),e.pagination=void 0}function Po(t){return!!t[d].pagination}var jt={};G(jt,{disable:()=>Oo,enable:()=>Fo,getState:()=>Ao});var De=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled;function ct(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement}function Be(t){return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():void 0}function ut(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}function Fo(t){let e=t[d];if(!De)return;let n=e.fullscreen={button:b("button",{part:"fullscreen-button",type:"button",name:"fullscreen",html:"Open in fullscreen"})};e.controls.append(n.button),n.changes=x("fullscreenchange",t).filter(o=>ct()===t).each(o=>{n.button.part.add("fullscreen-button-active"),n.button.innerHTML="Close fullscreen",document.activeElement!==t&&(n.tabIndex=t.tabIndex,t.tabIndex<0&&(t.tabIndex=0),t.focus());let r=x("fullscreenchange",t).each(i=>{n.button.part.remove("fullscreen-button-active"),n.button.innerHTML="Open in fullscreen",t.tabIndex=n.tabIndex,n.tabIndex=void 0,r.stop()})}),n.clicks=e.clicks.each(j({'[name="fullscreen"]':(o,r)=>{let i=ct();if(i===t){ut();return}i&&ut(),Be(t)}}))}function Oo(t){let e=t[d];ct()===t&&ut(),e.fullscreen.button.remove(),e.fullscreen.clicks.stop(),e.fullscreen.changes.stop(),e.fullscreen=void 0}function Ao(t){return!!t[d].fullscreen}var Ge={active:{attribute:function(t){this.active=t},set:function(t){let e=this[d],n=typeof t=="object"?t:/^\d/.test(t+"")?this.querySelector("#\\3"+(t+"")[0]+" "+(t+"").slice(1)):/^\#/.test(t+"")?this.querySelector(t):this.querySelector("#"+t);e.views.push(n)},get:function(){return this[d].active}},autoplay:st(Ot,"autoplay"),controls:Ft({navigation:Ct,pagination:It,fullscreen:jt}),loop:st(At,"loop")};var Co=import.meta.url.replace(/\/[^\/]*\.js/,"/slide-show-shadow.css"),Js=wt("slide-show",Ce,Ge,Co);window.console&&window.console.log("%c%c registered (documentation at %chttps://stephen.band/slide-show/%c)","color: #3a8ab0; font-weight: 600;","color: #888888; font-weight: 400;","color: inherit; font-weight: 400;","color: #888888; font-weight: 400;");export{Js as default}; diff --git a/modules/lifecycle.js b/modules/lifecycle.js index a2ef46d..7ba5aba 100644 --- a/modules/lifecycle.js +++ b/modules/lifecycle.js @@ -2,6 +2,7 @@ import equals from '../../fn/modules/equals.js'; import get from '../../fn/modules/get.js'; import noop from '../../fn/modules/noop.js'; +import nothing from '../../fn/modules/nothing.js'; import overload from '../../fn/modules/overload.js'; import Stream from '../../fn/modules/stream.js'; import create from '../../dom/modules/create.js'; @@ -65,7 +66,7 @@ export default { shadow.append(scroller, controls); // Stream to push load to - const load = Stream.of(); + const load = Stream.of().broadcast({ memory: true }); // In Chrome and FF initial `slotchange` event is always sent before // load, but not so in Safari where either order may happen (at a guess @@ -86,16 +87,20 @@ export default { undefined : (data.children = children) ; }) - .broadcast({ memory: true }); + .broadcast({ memory: true, hot: true }); // Buffer stream for pushing children to scroll into view then activate - const views = Stream.of(null); + const views = Stream.of(); // Buffer stream for pushing children to activate const activations = Stream.of(); // Broadcast stream for listening to changes to active const actives = activations + .map((child) => (child.dataset.slideIndex ? + data.children[child.dataset.slideIndex] : + child + )) .filter((child) => (data.active !== child && trigger('slide-active', child))) .map((child) => data.active = child) .broadcast({ memory: true, hot: true }); @@ -109,6 +114,8 @@ export default { clickSuppressTime: -Infinity, host: this, style: window.getComputedStyle(this), + elements: nothing, + children: nothing, scroller, slides, controls, @@ -126,31 +133,29 @@ export default { .merge(slotchanges, events('resize', window)) .each((e) => updateWidth(scroller, slides, data.elements)); - // Wait for fist slotchange/load, then on mutation maintain active - // position, or on activation scroll to new child, then pipe the child - // to be activated. - Stream - .combine({ children: mutations, child: views }) - .map((state) => { - // Is previous child not yet defined, or the new one the same as it? - if (!data.active || data.active === state.child) { - // This is a mutation, so jump to the active child if it is - // still there, or the first child if not - return jumpTo(scroller, state.children.includes(state.child) ? - state.child : - state.children[0] - ); - } - - // This is an activation, scroll to the new active child without - // a check for being in children, we may be activating a ghost - scrollTo(scroller, state.child); + // Wait for fist slotchange/load, then maintain active position + slotchanges + .map((state) => (state.elements.includes(data.active) ? + data.active : + data.children[0] + )) + .map((child) => jumpTo(scroller, child)) + .pipe(activations); - // If it is a ghost, activate the original not the ghost - return state.child.dataset.slideIndex ? - state.children[state.child.dataset.slideIndex] : - state.child ; - }) + // On change of .active view, check it is a child element that is not + // already active and scroll to it + Stream + .combine({ host: load, child: views }) + .map((state) => (data.elements.includes(state.child) && data.active !== state.child ? + state.child : + undefined + )) + .map((child) => (data.active ? + // This is a activation, scroll to the new active child + scrollTo(scroller, child) : + // If active is not yet defined jump to the newly active child + jumpTo(scroller, child) + )) .pipe(activations); // Update active when scroll comes to rest, but not mid-gesture. diff --git a/modules/properties.js b/modules/properties.js index 1c7ed26..952ae2f 100644 --- a/modules/properties.js +++ b/modules/properties.js @@ -59,10 +59,6 @@ export default { this.querySelector(id) : this.querySelector('#' + id) ; - if (!child) { - throw new Error('Cannot set active – not a child of slide-show'); - } - data.views.push(child); }, diff --git a/modules/test.js b/modules/test.js new file mode 100644 index 0000000..3b6ab1b --- /dev/null +++ b/modules/test.js @@ -0,0 +1,26 @@ +let promise = Promise.resolve(0); +let n = 0; + +function runTest(name, fn, value, values, resolve, reject) { + try { + fn(resolve, value, ...values); + } + catch(e) { + reject(e); + } +} + +export default function scheduleTest(time, name, fn, ...values) { + return promise = promise + .then((value) => new Promise((resolve, reject) => + setTimeout(runTest, time * 1000, name, fn, value, values, (value) => { + // Log pass + console.log('%c✓ Test ' + (++n) + ' %c' + name, 'color: #B6BD00; font-weight: 400;', 'color: #779AAB; font-weight: 400;'); + resolve(value); + }, (e) => { + // Log fail + console.log('%c✗ Test ' + (++n) + ' %c' + name, 'color: #ba4029; font-weight: 400;', 'color: #779AAB; font-weight: 400;', e.message); + reject(); + }) + )); +} diff --git a/test/1-structure.html b/test/1-structure.html index 0232c82..532ad5e 100644 --- a/test/1-structure.html +++ b/test/1-structure.html @@ -57,5 +57,10 @@ + + diff --git a/test/2-slide-show.html b/test/2-slide-show.html index 17c7ae8..05d2c92 100644 --- a/test/2-slide-show.html +++ b/test/2-slide-show.html @@ -65,7 +65,7 @@ -
          <slide-show loop autoplay controls="navigation pagination fullscreen"> - one child
          + From 47041dfd6575587eab7149d2861b27f6c4581cb7 Mon Sep 17 00:00:00 2001 From: Stephen Date: Wed, 18 May 2022 17:13:26 +0200 Subject: [PATCH 2/6] Build n bump --- build/slide-show-figure.js | 4 ++-- build/slide-show-ol.js | 4 ++-- build/slide-show-shadow.css | 4 ++-- build/slide-show-ul.js | 4 ++-- build/slide-show.css | 4 ++-- build/slide-show.js | 4 ++-- package.json | 2 +- test/2-slide-show.html | 17 +++++++++-------- 8 files changed, 22 insertions(+), 21 deletions(-) diff --git a/build/slide-show-figure.js b/build/slide-show-figure.js index d098b07..339ba5c 100644 --- a/build/slide-show-figure.js +++ b/build/slide-show-figure.js @@ -1,7 +1,7 @@ /* slide-show - 1.1.5 + 1.1.6 By Stephen Band - Built 2022-05-18 15:08 */ + Built 2022-05-18 15:13 */ var qe=Object.defineProperty;var Mt=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var Dt=(t,e)=>{var n={};for(var o in t)We.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&Mt)for(var o of Mt(t))e.indexOf(o)<0&&$e.call(t,o)&&(n[o]=t[o]);return n};var G=(t,e)=>{for(var n in e)qe(t,n,{get:e[n],enumerable:!0})};function $(t){var e=new Map;return function(o){if(e.has(o))return e.get(o);var r=t(o);return e.set(o,r),r}}var Ne=Array.prototype;function Xe(t,e){return typeof t=="function"?t.apply(null,e):t}function Bt(t,e,n){n=n||t.length;var o=n===1?e?t:$(t):$(function(r){return Bt(function(){var i=[r];return i.push.apply(i,arguments),t.apply(null,i)},e,n-1)});return function r(i){return arguments.length===0?r:arguments.length===1?o(i):arguments.length>=n?t.apply(null,arguments):Xe(o(i),Ne.slice.call(arguments,1))}}var w=Bt;function Ye(t,e){return 1-Math.pow(1-e,t)}var Gt=w(Ye);function v(){}function at(t,e){return e(t)}function S(t){return t}var Ke=Array.prototype;function pt(){let t=arguments;return t.length?e=>Ke.reduce.call(t,at,e):S}function ft(t,e,n){return n*(e-t)+t}var Ze=window.performance,zt=window.requestAnimationFrame,Qe=window.cancelAnimationFrame;function dt(t,e,n){var o=Ze.now();function r(s){var l=(s-o)/(t*1e3);l<1?(l>0&&e(l),i=zt(r)):(e(1),n&&n())}var i=zt(r);return function(){Qe(i)}}function N(t,e,n,o,r,i){let s=o[n];return dt(t,pt(e,l=>ft(s,r,l),l=>o[n]=l),i)}function Je(){return{x:0,y:0,left:0,top:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}}function T(t){return t===window?Je():t.getClientRects()[0]||t.getBoundingClientRect()}var H={scrollDuration:.3,scrollDurationPerHeight:.125,scrollTransform:Gt(3)},_t=v;function tn(t,e){if(e.behavior==="smooth"){let n=t.style.getPropertyValue("scroll-snap-type"),o=()=>t.style.setProperty("scroll-snap-type",n);if(t.style.setProperty("scroll-snap-type","none"),e.left!==void 0){let r=t===document.body?window.innerWidth:T(t).width,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.left-t.scrollLeft)/r;_t=N(i,H.scrollTransform,"scrollLeft",t,e.left,o)}else{let r=t===document.body?window.innerHeight:T(t).height,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.top-t.scrollTop)/r;_t=N(i,H.scrollTransform,"scrollTop",t,e.top,o)}}else e.left!==void 0&&(t.scrollLeft=e.left),e.top!==void 0&&(t.scrollTop=e.top)}if(!("scrollBehavior"in document.documentElement.style)){console.log("Polyfilling Element.scrollTo(options).");let t="scrollTo"in Element.prototype?Element:HTMLElement,e=t.scrollIntoView;t.prototype.scrollTo=function(n){typeof n=="object"?tn(this,n):e.apply(this,arguments)}}function y(t,e){return function(){let o=t.apply(this,arguments),r=e[o]||e.default;if(!r)throw new Error('overload() no handler for "'+o+'"');return r.apply(this,arguments)}}var en=y(S,{is:v,tag:v,html:function(t,e,n){e.innerHTML=n},text:function(t,e,n){e.textContent=n},children:function(t,e,n){e.innerHTML="",n.forEach(o=>{e.appendChild(o)})},points:M,cx:M,cy:M,r:M,preserveAspectRatio:M,viewBox:M,default:function(t,e,n){t in e?e[t]=n:e.setAttribute(t,n)}});function M(t,e,n){e.setAttribute(t,n)}function nn(t,e){for(var n=Object.keys(e),o=n.length;o--;)en(n[o],t,e[n[o]]);return t}var mt=w(nn,!0);var on="http://www.w3.org/2000/svg",Rt=document.createElement("div");var Ut=(t,e)=>e&&typeof e;function Vt(t,e){let n=document.createRange();return n.selectNode(t),n.createContextualFragment(e)}function L(t,e){var n=document.createElementNS(on,t);return e&&(n.innerHTML=e),n}var rn=y(S,{comment:function(t,e){return document.createComment(e||"")},fragment:y(Ut,{string:function(t,e,n){if(n)return Vt(n,e);let o=document.createDocumentFragment();Rt.innerHTML=e;let r=Rt.childNodes;for(;r[0];)o.appendChild(r[0]);return o},object:function(t,e,n){let o=n?Vt(n):document.createDocumentFragment();return typeof e.length=="number"?o.append.apply(o,e):mt(o,e),o},default:()=>document.createDocumentFragment()}),text:function(t,e){return document.createTextNode(e||"")},circle:L,ellipse:L,g:L,glyph:L,image:L,line:L,rect:L,use:L,path:L,pattern:L,polygon:L,polyline:L,svg:L,default:y(Ut,{string:function(t,e){let n=document.createElement(t);return n.innerHTML=e,n},object:function(t,e){let n=document.createElement(t);return typeof e.length=="number"?n.append.apply(n,e):mt(n,e),n},default:t=>{if(typeof t!="string")throw new Error('create(tag, content) accepts only a string as tag "'+typeof t+'"');return document.createElement(t)}})}),b=rn;function ht(t,e,n){let o;typeof n!="string"&&n.input!==void 0&&n.index!==void 0&&(o=n,n=o.input.slice(n.index+n[0].length+(n.consumed||0)));let r=t.exec(n);if(!r)return;let i=e(r);return o&&(o.consumed=(o.consumed||0)+r.index+r[0].length+(r.consumed||0)),i}var fr=w(ht,!0);function sn(t,e,n){throw n.input!==void 0&&n.index!==void 0&&(n=n.input),new Error('Cannot parse string "'+n+'"')}function cn(t,e,n){let o=-1;for(;++ocn(e,n,i),o);return r===void 0?e.catch?e.catch(n,o):sn(t,e,o):r}var qt=w(un,!0);var gt=v;var k=Symbol("internals"),A=Symbol("shadow"),Wt=Object.defineProperties,ln={a:HTMLAnchorElement,dl:HTMLDListElement,p:HTMLParagraphElement,br:HTMLBRElement,fieldset:HTMLFieldSetElement,hr:HTMLHRElement,img:HTMLImageElement,li:HTMLLIElement,ol:HTMLOListElement,optgroup:HTMLOptGroupElement,q:HTMLQuoteElement,textarea:HTMLTextAreaElement,td:HTMLTableCellElement,th:HTMLTableCellElement,tr:HTMLTableRowElement,tbody:HTMLTableSectionElement,thead:HTMLTableSectionElement,tfoot:HTMLTableSectionElement,ul:HTMLUListElement},an={name:{set:function(t){return this.setAttribute("name",t)},get:function(){return this.getAttribute("name")||""}},form:{get:function(){return this[k].form}},labels:{get:function(){return this[k].labels}},validity:{get:function(){return this[k].validity}},validationMessage:{get:function(){return this[k].validationMessage}},willValidate:{get:function(){return this[k].willValidate}},checkValidity:{value:function(){return this[k].checkValidity()}},reportValidity:{value:function(){return this[k].reportValidity()}}},pn={},$t={once:!0},fn=0,Nt=!1;function dn(t){return ln[t]||window["HTML"+t[0].toUpperCase()+t.slice(1)+"Element"]||(()=>{throw new Error('Constructor not found for tag "'+t+'"')})()}var mn=qt(/^\s*?\s*$|^\s*?\s*$/,{1:(t,e)=>({name:e[1]}),2:(t,e)=>({name:e[3],tag:e[2]}),catch:function(t,e){throw new SyntaxError(`dom element() – name must be of the form 'element-name' or 'tag is="element-name"' (`+e+")")}},null);function hn(t,e){if(t.hasOwnProperty(e)){let n=t[e];delete t[e],t[e]=n}return t}function gn(t,e,n){t._initialLoad=!0;let o=t.attachShadow({mode:e.mode||"closed",delegatesFocus:e.focusable||!1});if(n){let r=b("link",{rel:"stylesheet",href:n});o.append(r)}return t[A]=o,o}function wn(t){var e;if(t.attachInternals){if(e=t.attachInternals(),e.setFormValue)return e}else e={shadowRoot:t.shadowRoot};return e.input=b("input",{type:"hidden",name:t.name}),t.appendChild(e.input),e.setFormValue=function(n){this.input.value=n},e}function vn(t){t._initialAttributes={},t._n=0}function yn(t,e,n){let o=t._initialAttributes;for(;t._nfn?gn(p,e,o||e.stylesheet):void 0,c=a.formAssociated&&wn(p);return i&&(Nt=!0),e.construct&&e.construct.call(p,u,c),l&&(vn(p),Promise.resolve(1).then(function(){Xt(p,a.observedAttributes,l)})),f&&Object.keys(f).reduce(hn,p),p}return a.prototype=Object.create(s.prototype,f),f&&f.value&&(a.formAssociated=!0,Wt(a.prototype,an),(e.enable||e.disable)&&(a.prototype.formDisabledCallback=function(p){return p?e.disable&&e.disable.call(this,this[A],this[k]):e.enable&&e.enable.call(this,this[A],this[k])}),e.reset&&(a.prototype.formResetCallback=function(){return e.reset.call(this,this[A],this[k])}),e.restore&&(a.prototype.formStateRestoreCallback=function(){return e.restore.call(this,this[A],this[k])})),l&&(a.observedAttributes=Object.keys(l),a.prototype.attributeChangedCallback=function(p,u,c){if(!this._initialAttributes)return l[p].call(this,c);this._initialAttributes[p]=c,yn(this,a.observedAttributes,l)}),a.prototype.connectedCallback=function(){let p=this,u=p[A],c=p[k];if(p._initialAttributes&&Xt(p,a.observedAttributes,l),p._initialLoad){let E=u.querySelectorAll('link[rel="stylesheet"]');if(E.length){let ze=0,lt=E.length,Ht=function(Ue){++ze>=E.length&&(delete p._initialLoad,e.load&&(gt("element()","loaded",Array.from(E).map(Ve=>Ve.href).join(` `)),e.load.call(p,u)))},_e=Ht;for(;lt--;)E[lt].addEventListener("load",Ht,$t),E[lt].addEventListener("error",_e,$t);e.connect&&e.connect.call(this,u,c)}else e.connect&&e.connect.call(this,u,c),e.load&&e.load.call(this,u,c)}else e.connect&&e.connect.call(this,u,c)},e.disconnect&&(a.prototype.disconnectedCallback=function(){return e.disconnect.call(this,this[A],this[k])}),gt("element()","<"+(i?i+" is="+r:r)+">"),window.customElements.define(r,a,i&&{extends:i}),i&&!Nt&&document.querySelectorAll('[is="'+r+'"]').forEach(p=>{Wt(p,f),e.construct&&e.construct.apply(p);let u;for(u in l){let c=p.attributes[u];c&&l[u].call(p,c.value)}e.connect&&e.connect.apply(p)}),a}function Kt(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object")return!1;let n=Object.keys(t),o=Object.keys(e),r=n.length;for(;r--;){if(t[n[r]]===void 0){if(e[n[r]]!==void 0)return!1}else if(!e.hasOwnProperty(n[r])||!Kt(t[n[r]],e[n[r]]))return!1;let i=o.indexOf(n[r]);i>-1&&o.splice(i,1)}for(r=o.length;r--;)if(e[o[r]]===void 0){if(t[o[r]]!==void 0)return!1}else return!1;return!0}var Zt=w(Kt,!0);function En(t,e){return e[t]}var D=w(En,!0);var Sn=Object.freeze;function Qt(){return this}var P=Sn({shift:v,push:v,forEach:v,join:function(){return""},map:Qt,filter:Qt,includes:function(){return!1},reduce:function(t,e){return e},length:0,each:v,pipe:S,start:v,stop:v,done:v,valueOf:function(){return null}});function vt(){return this}function yt(t){return t&&t[Symbol.iterator]}var Tn=Object.assign;function Ln(t){return t.stop?t.stop():t()}function kn(t){t.forEach(Ln),t.length=0}function B(){}Tn(B.prototype,{stop:function(){return this.stopables&&kn(this.stopables),this},done:function(e){return(this.stopables||(this.stopables=[])).push(e),this}});var Pn=Object.assign;function X(t){B.prototype.stop.apply(t);let e=-1,n;for(;n=t[++e];)t[e]=void 0,X(n)}function m(){}Pn(m.prototype,{pipe:function(t){return this[0]=t,t},stop:function(){return X(this[0]),this}});var F=Object.assign,O=Object.create;function z(t,e){e!==void 0&&t[0].push(e)}function Fn(t,e){if(t[1]){let n=-1;for(;t[++n]&&t[n]!==e;);for(;t[n++];)t[n-1]=t[n];X(e)}else t.stop()}function h(t){this.input=t}F(h.prototype,B.prototype,{push:function(t){z(this,t)},pipe:function(t){if(this[0])throw new Error("Stream: Attempt to .pipe() a unicast stream multiple times. Create a multicast stream with stream.broadcast().");return this[0]=t,this.input.pipe(this),t},map:function(t){return new Jt(this,t)},filter:function(t){return new te(this,t)},chunk:function(t){return new ne(this,t)},flatMap:function(t){return new ee(this,t)},take:function(t){return new oe(this,t)},each:function(t){return new se(this,t)},reduce:function(t,e){return new re(this,t,e)},scan:function(t,e){return new ie(this,t,e)},stop:function(){return Fn(this.input,this),this}});function Jt(t,e){this.input=t,this.fn=e}Jt.prototype=F(O(h.prototype),{push:function(e){let n=this.fn;z(this,n(e))}});function te(t,e){this.input=t,this.fn=e}te.prototype=F(O(h.prototype),{push:function(e){this.fn(e)&&z(this,e)}});function ee(t,e){this.input=t,this.fn=e}ee.prototype=F(O(h.prototype),{push:function(e){let o=this.fn(e);if(o!==void 0)if(yt(o))for(let r of o)z(this,r);else throw new Error("Stream: Cannot .flatMap() non-iterable values")}});function ne(t,e){this.input=t,this.chunk=[],typeof e=="number"?this.n=e:typeof e=="function"&&(this.fn=e)}ne.prototype=F(O(h.prototype),{fn:function(t){return t.length===this.n},push:function(e){let n=this.chunk;n.push(e),this.fn(n)&&(z(this,n),this.chunk=[])}});function oe(t,e){this.input=t,this.count=e}oe.prototype=F(O(h.prototype),{push:function(e){this[0].push(e),--this.count||this.stop()}});function re(t,e,n){return this.input=t,this.fn=e,this.value=n,this.i=0,t.pipe(this),n}re.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t,this.i++,this)}});function ie(t,e,n){this.input=t,this.fn=e,this.value=n}ie.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t),this[0].push(this.value)}});function se(t,e){this.input=t,this.push=e,t.pipe(this)}se.prototype=F(O(h.prototype),{each:null,reduce:null,pipe:null});var On=Array.prototype,An=Object.assign,Cn=Object.create;function _(t){this.buffer=t||[]}_.prototype=An(Cn(h.prototype),m.prototype,{push:function(t){t!==void 0&&this.buffer.push(t)},pipe:function(t){for(this[0]=t;this.buffer.length;)this[0].push(On.shift.apply(this.buffer));return this.buffer=this[0],t}});var In=Object.assign,jn=Object.create;function R(t,e){this.input=t,this.memory=!!(e&&e.memory),e&&e.hot&&this.pipe(P)}R.prototype=In(jn(h.prototype),{push:function(t){if(t!==void 0){this.memory&&(this.value=t);let e=-1;for(;this[++e];)this[e].push(t)}},pipe:function(t){let e=-1;for(;this[++e];);return this[e]=t,this.value!==void 0&&t.push(this.value),e===0&&this.input.pipe(this),t}});var Hn=Object.assign;function Y(t){this.promise=t}Hn(Y.prototype,m.prototype,{pipe:function(t){let e=this.promise;this[0]=t,e.then(n=>this[0].push(n)).finally(n=>this.stop())},stop:function(){m.prototype.stop.apply(this,arguments),this[0]=P}});var ue=Object.assign,le=Object.keys;function ce(t,e,n){let o=t.values,r=t.names,i=t[0];o[e]=n,(t.active||(t.active=le(o).length===r.length))&&i.push(ue({},o))}function K(t){this.inputs=t,this.active=!1}ue(K.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this.values={},this.names=le(e),this[0]=t;for(let n in e){let o=e[n];o.pipe?t.done(o.each(r=>ce(this,n,r))):o.then?o.then(r=>ce(this,n,r)):console.log("Todo: combine() raw values ?")}}});var Mn=Object.assign;function Z(t){this.inputs=t}Mn(Z.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this[0]=t;let n=-1,o;for(;o=e[++n];)if(o.pipe)o.pipe(t);else if(o.then)o.then(r=>t.push(r));else{let r=-1;for(;++r0}function Gn(t,e,n){return t[n]=e.shift(),t}function zn(t){return[]}function bt(t,e,n,o){n.push(o),e.every(Bn)&&t.push(e.reduce(Gn,{}))}function Q(t){this.inputs=t,this.buffers=xt.map.call(t,zn)}Dn(Q.prototype,m.prototype,{pipe:function(t){let e=this.inputs,n=this.buffers;this[0]=t,xt.forEach.call(e,(o,r)=>{let i=n[r];o.each?t.done(o.each(s=>bt(t,n,i,s))):o.then?o.then(s=>bt(t,n,i,s)):xt.forEach.call(o,s=>bt(t,n,i,s))})},stop:function(){let t=this.inputs,e=-1,n;for(;n=t[++e];)n.stop();return m.prototype.stop.apply(this,arguments)}});var _n=Array.prototype,ae=Object.assign;function Rn(t){throw new TypeError("Stream: invalid source object cannot be read into stream")}var g=ae(h,{of:function(){return new _(_n.slice.apply(arguments))},from:function(t){return t.pipe?new h(t):t.then?new h(new Y(t)):typeof t.length=="number"?new _(t):Rn(t)},broadcast:function(e){return new R(P,e)},combine:function(e){return new h(new K(e))},merge:function(){return new h(new Z(arguments))},zip:function(){return new h(new Q(arguments))}});ae(h.prototype,{log:vt,broadcast:function(t){return new R(this,t)}});var Un=Object.assign,Vn=/\s+/,pe={fullscreenchange:"fullscreenElement"in document?"fullscreenchange":"webkitFullscreenElement"in document?"webkitfullscreenchange":"fullscreenchange"};function fe(t){return t.which===1&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}var de=0;window.addEventListener("click",t=>de=t.timeStamp);function qn(t,e){return t.node.addEventListener(pe[e]||e,t,t.options),t}function Wn(t,e){return t.node.removeEventListener(pe[e]||e,t),t}function me(t,e,n){this.types=t.split(Vn),this.options=e,this.node=n,this.select=e&&e.select}Un(me.prototype,m.prototype,{pipe:function(t){this[0]=t,this.types.reduce(qn,this)},handleEvent:function(t){if(!(t.type==="click"&&t.timeStamp<=de)){if(this.select){let e=t.target.closest(this.select);if(!e)return;t.selectedTarget=e}this[0].push(t)}},stop:function(){this.types.reduce(Wn,this),m.prototype.stop.apply(this,arguments)}});function x(t,e){let n;return typeof t=="object"&&(n=t,t=n.type),new g(new me(t,n,e))}function Et(t){return typeof t}var $n=/^\s*([+-]?\d*\.?\d+)([^\s\d]*)\s*$/;function Nn(t,e){if(typeof e=="number")return e;var n=$n.exec(e);if(!n||!t[n[2]||""]){if(!t.catch)throw new Error('Cannot parse value "'+e+'" with provided units '+Object.keys(t).join(", "));return n?t.catch(parseFloat(n[1]),n[2]):t.catch(parseFloat(e))}return t[n[2]||""](parseFloat(n[1]))}var J=w(Nn);var Xn=/px$/,he={"transform:translateX":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[4])},"transform:translateY":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[5])},"transform:scale":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.sqrt(o*o+r*r)},"transform:rotate":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.atan2(r,o)}};function tt(t){return t.split("(")[1].split(")")[0].split(/\s*,\s*/)}function U(t,e){return window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):0}function et(t,e){if(he[t])return he[t](e);var n=U(t,e);return typeof n=="string"&&Xn.test(n)?parseFloat(n):n}var nt,ot;function Yn(){if(!nt){let t=document.documentElement.style.fontSize;document.documentElement.style.fontSize="100%",nt=et("font-size",document.documentElement),document.documentElement.style.fontSize=t||""}return nt}function Kn(){return ot||(ot=et("font-size",document.documentElement)),ot}window.addEventListener("resize",()=>{nt=void 0,ot=void 0});var C=y(Et,{number:S,string:J({em:function(t){return Yn()*t},px:function(t){return t},rem:function(t){return Kn()*t},vw:function(t){return window.innerWidth*t/100},vh:function(t){return window.innerHeight*t/100},vmin:function(t){return window.innerWidthn?o:n}n=nq.maxScrollInterval?q.maxScrollInterval:1.4*n}function it(){return ye}function xe(t){let e=T(t),n=window.getComputedStyle(t,null),o=C(n.getPropertyValue("padding-left")),r=C(n.getPropertyValue("padding-right"));return e.leftPadding=e.left+o,e.rightPadding=e.left+e.width-r,e.centrePadding=e.leftPadding+(e.width-o-r)/2,e}function Ee(t){let e=window.getComputedStyle(t,null).getPropertyValue("scroll-snap-align");return e.endsWith("start")?"left":e.endsWith("end")?"right":"centre"}function Se(t,e,n){let o=xe(t),r=T(e),i=Ee(e);t.scrollTo({top:t.scrollTop,left:t.scrollLeft+(i==="left"?r.left-o.leftPadding:i==="right"?r.right-o.rightPadding:r.left+r.width/2-o.centrePadding),behavior:n})}function Te(t,e){return Se(t,e,"smooth"),e}function I(t,e){return t.style.setProperty("scroll-behavior","auto","important"),Se(t,e,"auto"),t.style.setProperty("scroll-behavior",""),e}function Le(t,e){let{leftPadding:n,rightPadding:o,centrePadding:r}=xe(t),i=e.length,s;for(;s=e[--i];){let l=T(s);if(!l)continue;let f=Ee(s),a=l.width/2+(f==="left"?n:f==="right"?o:r);if((f==="left"?l.left:f==="right"?l.right:l.left+l.width/2)<=a)break}return s}function ke(t){return!!t.dataset.slideIndex}function Pe(t){let{scroller:e,elements:n,children:o}=t,r=Le(e,n);return ke(r)?o[r.dataset.slideIndex]:r}function Fe(t){let{scroller:e,children:n,elements:o}=t,r=Le(e,o),i;!r||(ke(r)?(i=n[r.dataset.slideIndex],I(e,i)):i=r,t.activations.push(i))}function to(t,e){t.style.setProperty("scroll-snap-type",""),e.stop()}var Oe=y((t,e)=>e.type,{pointerdown:function(t,e){return t.e0=e,t.x0=e.clientX,t.y0=e.clientY,t},pointermove:function(t,e){let n=e.clientX,o=e.clientY;if(!t.gesturing){if(Math.abs(n-t.x0)(clearTimeout(s),setTimeout(to,it()*1e3,n,a)))}return t.gesturing=!1,t.e0=void 0,t.x0=void 0,t.y0=void 0,t.pointers=void 0,t.scrollLeft0=void 0,t}});var eo=Object.assign,no={capture:!0,passive:!0};function oo(t,e){t.timer=void 0,t.stream.push(e);let n=t.times;n.length>1&&be(n),n.length=0}function Ae(t){this.element=t,this.times=[]}eo(Ae.prototype,m.prototype,{pipe:function(t){this.stream=t,this.element.addEventListener("scroll",this,no)},handleEvent:function(t){let e=t.timeStamp/1e3;this.times.push(e),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(oo,it()*1e3,this,t)},stop:function(){this.element.removeEventListener("scroll",this),m.prototype.stop.apply(this,arguments)}});function kt(t){return new g(new Ae(t))}function ro(t,e,n){let o=n.length,r=-1/0;for(;o--;){let a=T(n[o]),p=a.x+a.width;r=p>r?p:r}let i=T(e),s=getComputedStyle(t),l=C(s.paddingLeft||0),f=C(s.paddingRight||0);return l+f+r-i.x}function io(t,e,n){let o=ro(t,e,n);t.style.setProperty("--scroll-width",o+"px")}function so(t){return!t.dataset.slideIndex}var Ce={construct:function(t){let e=b("slot",{part:"slides"}),n=b("div",{class:"scroller",children:[e]}),o=b("nav",{part:"controls",children:[b("slot",{name:"controls"})]});t.append(n,o);let r=g.of().broadcast({memory:!0}),i=g.combine({host:r,elements:x("slotchange",e).map(c=>u.elements=e.assignedElements())}).broadcast({memory:!0}),s=i.map(c=>{let E=c.elements.filter(so);return Zt(u.children,E)?void 0:u.children=E}).broadcast({memory:!0,hot:!0}),l=g.of(),f=g.of(),a=f.map(c=>c.dataset.slideIndex?u.children[c.dataset.slideIndex]:c).filter(c=>u.active!==c&&Lt("slide-active",c)).map(c=>u.active=c).broadcast({memory:!0,hot:!0}),p=x("click",t).filter(fe).broadcast(),u=this[d]={clickSuppressTime:-1/0,host:this,style:window.getComputedStyle(this),elements:P,children:P,scroller:n,slides:e,controls:o,load:r,views:l,activations:f,actives:a,slotchanges:i,mutations:s,clicks:p};g.merge(i,x("resize",window)).each(c=>io(n,e,u.elements)),i.map(c=>c.elements.includes(u.active)?u.active:u.children[0]).map(c=>I(n,c)).pipe(f),g.combine({host:r,child:l}).map(c=>u.elements.includes(c.child)&&u.active!==c.child?c.child:void 0).map(c=>u.active?Te(n,c):I(n,c)).pipe(f),kt(n).filter(()=>!u.gesturing).each(c=>Fe(u)),Tt({threshold:"0.25rem",device:"mouse"},t).filter(()=>u.children.length>1).each(c=>{u.pointers=c,c.reduce(Oe,u)}),p.each(c=>{c.timeStamp-u.clickSuppressTime<120&&(c.preventDefault(),c.stopPropagation())}),x("fullscreenchange",window).each(c=>{(c.target===this||c.target.contains(this))&&I(n,u.active)}),x("focusin",this).map(c=>u.children.indexOf(c.target)!==-1?c.target:u.children.find(E=>E.contains(c.target))).pipe(l),x("keydown",this).filter(()=>document.activeElement===this||this.contains(document.activeElement)).map(y(D("keyCode"),{37:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)-1]),39:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)+1]),default:v})).pipe(l)},load:function(t){this[d].load.push(this)}};function st(t,e){function n(o,r){if(t.getState(o)!==r)return t[r?"enable":"disable"](o)}return{attribute:function(o){return n(this,o!==null)},set:function(o){return n(this,!!o)},get:function(){return t.getState(this)}}}function Pt(t,e){t.remove&&t.remove(e);let n;for(;(n=t.indexOf(e))!==-1;)t.splice(n,1);return e}var as=w(Pt,!0);var co=Object.assign;function W(t,e){this.element=t,this.definitions=e,this.tokens=[]}co(W.prototype,{contains:function(t){return this.tokens.includes(t)},add:function(){let t=arguments.length;for(;t--;){let e=arguments[t];!this.tokens.includes(e)&&this.definitions[e]&&(this.definitions[e].enable(this.element),this.tokens.push(e))}},remove:function(){let t=arguments.length;for(;t--;){let e=arguments[t];this.tokens.includes(e)&&(this.definitions[e].disable(this.element),Pt(this.tokens,e))}},supports:function(t){return!!this.definitions[t]}});var uo=Array.prototype;function lo(t,e){let n=t.tokens.slice(),o=uo.slice.apply(e),r=n.length;for(;r--;)o.includes(n[r])&&n.splice(r,1);t.remove.apply(t,n),t.add.apply(t,o)}function Ft(t){let e=Symbol("TokenList");function n(o,r){let i=o[e]||(o[e]=new W(o,t));lo(i,r.trim().split(/\s+/))}return{attribute:function(o){n(this,o||"")},set:function(o){n(this,o+"")},get:function(){return this[e]||(this[e]=new W(this,t))}}}var Ot={};G(Ot,{disable:()=>ho,enable:()=>mo,getState:()=>go});var ao=J({s:S,ms:t=>t/1e3});function po(t){let{active:e,children:n,elements:o,host:r}=t,i=o.indexOf(e),s=o[i+1]||n[0];t.autoplay.timer=null,!!s&&(r.active=s)}function fo(t){let{active:e,style:n}=t,o=ao(window.getComputedStyle(e).getPropertyValue("--slide-duration")||n.getPropertyValue("--slide-duration"));clearTimeout(t.autoplay.timer),t.autoplay.timer=setTimeout(po,o*1e3,t)}function Ie(t){clearTimeout(t.autoplay.timer),t.autoplay.timer=null}function mo(t){let e=t[d],{actives:n}=e,o=e.autoplay={},r=g.merge([!1],x("pointerenter pointerleave",t).map(s=>s.type==="pointerenter")),i=g.merge([t.contains(document.activeElement)],x("focusin focusout",t).map(y(D("type"),{focusin:s=>!0,focusout:s=>t.contains(s.relatedTarget)}))).map((s=>l=>s===l?void 0:s=l)());o.updates=g.combine({active:n,hover:r,focus:i}).each(s=>s.hover||s.focus?Ie(e):fo(e))}function ho(t){let e=t[d];Ie(e),e.autoplay.updates.stop(),e.autoplay=void 0}function go(t){return!!t[d].autoplay}var At={};G(At,{disable:()=>yo,enable:()=>vo,getState:()=>bo});function je(t,e){let n=t.cloneNode(!0);return n.dataset.slideIndex=e,n.removeAttribute("id"),n.setAttribute("aria-hidden","true"),n.tabIndex="-1",n}function wo(t){let{active:e,children:n,host:o,scroller:r}=t;if(t.loop.prepends&&(t.loop.prepends.forEach(c=>c.remove()),t.loop.appends.forEach(c=>c.remove()),t.loop.prepends=void 0,t.loop.appends=void 0),n.length<2){t.elements=t.slides.assignedElements();return}let i=o.clientWidth,s=n.map(T),l=s[1].left,f=s[s.length-2].right,a=1;for(;s[++a]&&s[a].leftf-i;);let u=n.slice(++a).map((c,E)=>je(c,a+E));o.prepend.apply(o,u),o.append.apply(o,p),t.loop.prepends=u,t.loop.appends=p,t.elements=t.slides.assignedElements(),I(r,e||n[0])}function vo(t){let e=t[d],{mutations:n}=e,o=e.loop={};o.renders=n.each(r=>wo(e))}function yo(t){let e=t[d];e.loop&&(e.loop.prepends&&e.loop.prepends.forEach(n=>n.remove()),e.loop.appends&&e.loop.appends.forEach(n=>n.remove()),e.loop.renders.stop(),e.loop=void 0)}function bo(t){return!!t[d].loop}var Ct={};G(Ct,{disable:()=>Eo,enable:()=>xo,getState:()=>So});function j(t){if(typeof t!="object"||arguments.length>1)throw new Error("delegate() now takes an object of selector:fn pairs.");let e=Object.keys(t);return function(o){let r=o.target,i=-1;for(;e[++i];){let s=r.closest(e[i]);if(s)return t[e[i]](s,...arguments)}}}function He(t,e,n,o){o===0?t.hidden=!0:t.hidden=!1,o===n.length-1?e.hidden=!0:e.hidden=!1}function xo(t){let e=t[d],{actives:n,clicks:o,slotchanges:r}=e,i=e.navigation={prev:b("button",{part:"prev-button",type:"button",name:"navigation",value:"-1",html:"Previous"}),next:b("button",{part:"next-button",type:"button",name:"navigation",value:"1",html:"Next"})};e.controls.prepend(i.prev,i.next),i.updates=g.combine({active:n,changes:r}).each(s=>He(i.prev,i.next,s.changes.elements,s.changes.elements.indexOf(s.active))),i.clicks=o.each(j({'[name="navigation"]':function(s,l){let f=parseFloat(s.value),a=e.elements.indexOf(e.active)+f,p=e.elements[a];!p||(t.active=p,He(i.prev,i.next,e.elements,a))}}))}function Eo(t){let e=t[d];e.navigation.prev.remove(),e.navigation.next.remove(),e.navigation.updates.stop(),e.navigation.clicks.stop(),e.navigation=void 0}function So(t){return!!t[d].navigation}var It={};G(It,{disable:()=>ko,enable:()=>Lo,getState:()=>Po});function Me(t,e,n){let{active:o,buttons:r,index:i}=t;if(o===n)return;i>-1&&(t.activeSpan.remove(),r.children[i].part.remove("page-button-active"));let s=e.indexOf(n);s!==-1&&(r.children[s].part.add("page-button-active"),r.children[s].append(t.activeSpan),t.index=s,t.active=n)}function To(t,e,n,o){return e.buttons&&(e.buttons.remove(),e.buttons=void 0),o.length<2||(e.buttons=b("div",{part:"pagination",children:o.map((r,i)=>b("button",{part:"page-button",type:"button",name:"pagination",value:i}))}),t.append(e.buttons)),o.length}function Lo(t){let e=t[d],{shadow:n,actives:o,clicks:r,mutations:i}=e,s=e.pagination={activeSpan:b("span",{class:"invisible",text:"(Current slide)"})};s.mutations=i.each(()=>To(e.controls,s,n,e.children)),s.updates=g.combine({active:o,children:i}).filter(l=>l.children.length>1).each(l=>Me(s,e.children,e.active)),s.clicks=r.each(j({'[name="pagination"]':function(l,f){let{host:a}=e,p=e.children,u=p[l.value];!u||(a.active=u,Me(s,p,u))}}))}function ko(t){let e=t[d];e.pagination.buttons.remove(),e.pagination.mutations.stop(),e.pagination.updates.stop(),e.pagination.clicks.stop(),e.pagination=void 0}function Po(t){return!!t[d].pagination}var jt={};G(jt,{disable:()=>Oo,enable:()=>Fo,getState:()=>Ao});var De=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled;function ct(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement}function Be(t){return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():void 0}function ut(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}function Fo(t){let e=t[d];if(!De)return;let n=e.fullscreen={button:b("button",{part:"fullscreen-button",type:"button",name:"fullscreen",html:"Open in fullscreen"})};e.controls.append(n.button),n.changes=x("fullscreenchange",t).filter(o=>ct()===t).each(o=>{n.button.part.add("fullscreen-button-active"),n.button.innerHTML="Close fullscreen",document.activeElement!==t&&(n.tabIndex=t.tabIndex,t.tabIndex<0&&(t.tabIndex=0),t.focus());let r=x("fullscreenchange",t).each(i=>{n.button.part.remove("fullscreen-button-active"),n.button.innerHTML="Open in fullscreen",t.tabIndex=n.tabIndex,n.tabIndex=void 0,r.stop()})}),n.clicks=e.clicks.each(j({'[name="fullscreen"]':(o,r)=>{let i=ct();if(i===t){ut();return}i&&ut(),Be(t)}}))}function Oo(t){let e=t[d];ct()===t&&ut(),e.fullscreen.button.remove(),e.fullscreen.clicks.stop(),e.fullscreen.changes.stop(),e.fullscreen=void 0}function Ao(t){return!!t[d].fullscreen}var Ge={active:{attribute:function(t){this.active=t},set:function(t){let e=this[d],n=typeof t=="object"?t:/^\d/.test(t+"")?this.querySelector("#\\3"+(t+"")[0]+" "+(t+"").slice(1)):/^\#/.test(t+"")?this.querySelector(t):this.querySelector("#"+t);e.views.push(n)},get:function(){return this[d].active}},autoplay:st(Ot,"autoplay"),controls:Ft({navigation:Ct,pagination:It,fullscreen:jt}),loop:st(At,"loop")};var Co=import.meta.url.replace(/\/[^\/]*\.js/,"/slide-show-shadow.css"),Js=wt('
          ',Ce,Ge,Co);export{Js as default}; diff --git a/build/slide-show-ol.js b/build/slide-show-ol.js index 6c01c96..6cbc5a5 100644 --- a/build/slide-show-ol.js +++ b/build/slide-show-ol.js @@ -1,7 +1,7 @@ /* slide-show - 1.1.5 + 1.1.6 By Stephen Band - Built 2022-05-18 15:08 */ + Built 2022-05-18 15:13 */ var qe=Object.defineProperty;var Mt=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var Dt=(t,e)=>{var n={};for(var o in t)We.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&Mt)for(var o of Mt(t))e.indexOf(o)<0&&$e.call(t,o)&&(n[o]=t[o]);return n};var G=(t,e)=>{for(var n in e)qe(t,n,{get:e[n],enumerable:!0})};function $(t){var e=new Map;return function(o){if(e.has(o))return e.get(o);var r=t(o);return e.set(o,r),r}}var Ne=Array.prototype;function Xe(t,e){return typeof t=="function"?t.apply(null,e):t}function Bt(t,e,n){n=n||t.length;var o=n===1?e?t:$(t):$(function(r){return Bt(function(){var i=[r];return i.push.apply(i,arguments),t.apply(null,i)},e,n-1)});return function r(i){return arguments.length===0?r:arguments.length===1?o(i):arguments.length>=n?t.apply(null,arguments):Xe(o(i),Ne.slice.call(arguments,1))}}var w=Bt;function Ye(t,e){return 1-Math.pow(1-e,t)}var Gt=w(Ye);function v(){}function at(t,e){return e(t)}function S(t){return t}var Ke=Array.prototype;function pt(){let t=arguments;return t.length?e=>Ke.reduce.call(t,at,e):S}function ft(t,e,n){return n*(e-t)+t}var Ze=window.performance,zt=window.requestAnimationFrame,Qe=window.cancelAnimationFrame;function dt(t,e,n){var o=Ze.now();function r(s){var l=(s-o)/(t*1e3);l<1?(l>0&&e(l),i=zt(r)):(e(1),n&&n())}var i=zt(r);return function(){Qe(i)}}function N(t,e,n,o,r,i){let s=o[n];return dt(t,pt(e,l=>ft(s,r,l),l=>o[n]=l),i)}function Je(){return{x:0,y:0,left:0,top:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}}function T(t){return t===window?Je():t.getClientRects()[0]||t.getBoundingClientRect()}var H={scrollDuration:.3,scrollDurationPerHeight:.125,scrollTransform:Gt(3)},_t=v;function tn(t,e){if(e.behavior==="smooth"){let n=t.style.getPropertyValue("scroll-snap-type"),o=()=>t.style.setProperty("scroll-snap-type",n);if(t.style.setProperty("scroll-snap-type","none"),e.left!==void 0){let r=t===document.body?window.innerWidth:T(t).width,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.left-t.scrollLeft)/r;_t=N(i,H.scrollTransform,"scrollLeft",t,e.left,o)}else{let r=t===document.body?window.innerHeight:T(t).height,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.top-t.scrollTop)/r;_t=N(i,H.scrollTransform,"scrollTop",t,e.top,o)}}else e.left!==void 0&&(t.scrollLeft=e.left),e.top!==void 0&&(t.scrollTop=e.top)}if(!("scrollBehavior"in document.documentElement.style)){console.log("Polyfilling Element.scrollTo(options).");let t="scrollTo"in Element.prototype?Element:HTMLElement,e=t.scrollIntoView;t.prototype.scrollTo=function(n){typeof n=="object"?tn(this,n):e.apply(this,arguments)}}function y(t,e){return function(){let o=t.apply(this,arguments),r=e[o]||e.default;if(!r)throw new Error('overload() no handler for "'+o+'"');return r.apply(this,arguments)}}var en=y(S,{is:v,tag:v,html:function(t,e,n){e.innerHTML=n},text:function(t,e,n){e.textContent=n},children:function(t,e,n){e.innerHTML="",n.forEach(o=>{e.appendChild(o)})},points:M,cx:M,cy:M,r:M,preserveAspectRatio:M,viewBox:M,default:function(t,e,n){t in e?e[t]=n:e.setAttribute(t,n)}});function M(t,e,n){e.setAttribute(t,n)}function nn(t,e){for(var n=Object.keys(e),o=n.length;o--;)en(n[o],t,e[n[o]]);return t}var mt=w(nn,!0);var on="http://www.w3.org/2000/svg",Rt=document.createElement("div");var Ut=(t,e)=>e&&typeof e;function Vt(t,e){let n=document.createRange();return n.selectNode(t),n.createContextualFragment(e)}function L(t,e){var n=document.createElementNS(on,t);return e&&(n.innerHTML=e),n}var rn=y(S,{comment:function(t,e){return document.createComment(e||"")},fragment:y(Ut,{string:function(t,e,n){if(n)return Vt(n,e);let o=document.createDocumentFragment();Rt.innerHTML=e;let r=Rt.childNodes;for(;r[0];)o.appendChild(r[0]);return o},object:function(t,e,n){let o=n?Vt(n):document.createDocumentFragment();return typeof e.length=="number"?o.append.apply(o,e):mt(o,e),o},default:()=>document.createDocumentFragment()}),text:function(t,e){return document.createTextNode(e||"")},circle:L,ellipse:L,g:L,glyph:L,image:L,line:L,rect:L,use:L,path:L,pattern:L,polygon:L,polyline:L,svg:L,default:y(Ut,{string:function(t,e){let n=document.createElement(t);return n.innerHTML=e,n},object:function(t,e){let n=document.createElement(t);return typeof e.length=="number"?n.append.apply(n,e):mt(n,e),n},default:t=>{if(typeof t!="string")throw new Error('create(tag, content) accepts only a string as tag "'+typeof t+'"');return document.createElement(t)}})}),b=rn;function ht(t,e,n){let o;typeof n!="string"&&n.input!==void 0&&n.index!==void 0&&(o=n,n=o.input.slice(n.index+n[0].length+(n.consumed||0)));let r=t.exec(n);if(!r)return;let i=e(r);return o&&(o.consumed=(o.consumed||0)+r.index+r[0].length+(r.consumed||0)),i}var fr=w(ht,!0);function sn(t,e,n){throw n.input!==void 0&&n.index!==void 0&&(n=n.input),new Error('Cannot parse string "'+n+'"')}function cn(t,e,n){let o=-1;for(;++ocn(e,n,i),o);return r===void 0?e.catch?e.catch(n,o):sn(t,e,o):r}var qt=w(un,!0);var gt=v;var k=Symbol("internals"),A=Symbol("shadow"),Wt=Object.defineProperties,ln={a:HTMLAnchorElement,dl:HTMLDListElement,p:HTMLParagraphElement,br:HTMLBRElement,fieldset:HTMLFieldSetElement,hr:HTMLHRElement,img:HTMLImageElement,li:HTMLLIElement,ol:HTMLOListElement,optgroup:HTMLOptGroupElement,q:HTMLQuoteElement,textarea:HTMLTextAreaElement,td:HTMLTableCellElement,th:HTMLTableCellElement,tr:HTMLTableRowElement,tbody:HTMLTableSectionElement,thead:HTMLTableSectionElement,tfoot:HTMLTableSectionElement,ul:HTMLUListElement},an={name:{set:function(t){return this.setAttribute("name",t)},get:function(){return this.getAttribute("name")||""}},form:{get:function(){return this[k].form}},labels:{get:function(){return this[k].labels}},validity:{get:function(){return this[k].validity}},validationMessage:{get:function(){return this[k].validationMessage}},willValidate:{get:function(){return this[k].willValidate}},checkValidity:{value:function(){return this[k].checkValidity()}},reportValidity:{value:function(){return this[k].reportValidity()}}},pn={},$t={once:!0},fn=0,Nt=!1;function dn(t){return ln[t]||window["HTML"+t[0].toUpperCase()+t.slice(1)+"Element"]||(()=>{throw new Error('Constructor not found for tag "'+t+'"')})()}var mn=qt(/^\s*?\s*$|^\s*?\s*$/,{1:(t,e)=>({name:e[1]}),2:(t,e)=>({name:e[3],tag:e[2]}),catch:function(t,e){throw new SyntaxError(`dom element() – name must be of the form 'element-name' or 'tag is="element-name"' (`+e+")")}},null);function hn(t,e){if(t.hasOwnProperty(e)){let n=t[e];delete t[e],t[e]=n}return t}function gn(t,e,n){t._initialLoad=!0;let o=t.attachShadow({mode:e.mode||"closed",delegatesFocus:e.focusable||!1});if(n){let r=b("link",{rel:"stylesheet",href:n});o.append(r)}return t[A]=o,o}function wn(t){var e;if(t.attachInternals){if(e=t.attachInternals(),e.setFormValue)return e}else e={shadowRoot:t.shadowRoot};return e.input=b("input",{type:"hidden",name:t.name}),t.appendChild(e.input),e.setFormValue=function(n){this.input.value=n},e}function vn(t){t._initialAttributes={},t._n=0}function yn(t,e,n){let o=t._initialAttributes;for(;t._nfn?gn(p,e,o||e.stylesheet):void 0,c=a.formAssociated&&wn(p);return i&&(Nt=!0),e.construct&&e.construct.call(p,u,c),l&&(vn(p),Promise.resolve(1).then(function(){Xt(p,a.observedAttributes,l)})),f&&Object.keys(f).reduce(hn,p),p}return a.prototype=Object.create(s.prototype,f),f&&f.value&&(a.formAssociated=!0,Wt(a.prototype,an),(e.enable||e.disable)&&(a.prototype.formDisabledCallback=function(p){return p?e.disable&&e.disable.call(this,this[A],this[k]):e.enable&&e.enable.call(this,this[A],this[k])}),e.reset&&(a.prototype.formResetCallback=function(){return e.reset.call(this,this[A],this[k])}),e.restore&&(a.prototype.formStateRestoreCallback=function(){return e.restore.call(this,this[A],this[k])})),l&&(a.observedAttributes=Object.keys(l),a.prototype.attributeChangedCallback=function(p,u,c){if(!this._initialAttributes)return l[p].call(this,c);this._initialAttributes[p]=c,yn(this,a.observedAttributes,l)}),a.prototype.connectedCallback=function(){let p=this,u=p[A],c=p[k];if(p._initialAttributes&&Xt(p,a.observedAttributes,l),p._initialLoad){let E=u.querySelectorAll('link[rel="stylesheet"]');if(E.length){let ze=0,lt=E.length,Ht=function(Ue){++ze>=E.length&&(delete p._initialLoad,e.load&&(gt("element()","loaded",Array.from(E).map(Ve=>Ve.href).join(` `)),e.load.call(p,u)))},_e=Ht;for(;lt--;)E[lt].addEventListener("load",Ht,$t),E[lt].addEventListener("error",_e,$t);e.connect&&e.connect.call(this,u,c)}else e.connect&&e.connect.call(this,u,c),e.load&&e.load.call(this,u,c)}else e.connect&&e.connect.call(this,u,c)},e.disconnect&&(a.prototype.disconnectedCallback=function(){return e.disconnect.call(this,this[A],this[k])}),gt("element()","<"+(i?i+" is="+r:r)+">"),window.customElements.define(r,a,i&&{extends:i}),i&&!Nt&&document.querySelectorAll('[is="'+r+'"]').forEach(p=>{Wt(p,f),e.construct&&e.construct.apply(p);let u;for(u in l){let c=p.attributes[u];c&&l[u].call(p,c.value)}e.connect&&e.connect.apply(p)}),a}function Kt(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object")return!1;let n=Object.keys(t),o=Object.keys(e),r=n.length;for(;r--;){if(t[n[r]]===void 0){if(e[n[r]]!==void 0)return!1}else if(!e.hasOwnProperty(n[r])||!Kt(t[n[r]],e[n[r]]))return!1;let i=o.indexOf(n[r]);i>-1&&o.splice(i,1)}for(r=o.length;r--;)if(e[o[r]]===void 0){if(t[o[r]]!==void 0)return!1}else return!1;return!0}var Zt=w(Kt,!0);function En(t,e){return e[t]}var D=w(En,!0);var Sn=Object.freeze;function Qt(){return this}var P=Sn({shift:v,push:v,forEach:v,join:function(){return""},map:Qt,filter:Qt,includes:function(){return!1},reduce:function(t,e){return e},length:0,each:v,pipe:S,start:v,stop:v,done:v,valueOf:function(){return null}});function vt(){return this}function yt(t){return t&&t[Symbol.iterator]}var Tn=Object.assign;function Ln(t){return t.stop?t.stop():t()}function kn(t){t.forEach(Ln),t.length=0}function B(){}Tn(B.prototype,{stop:function(){return this.stopables&&kn(this.stopables),this},done:function(e){return(this.stopables||(this.stopables=[])).push(e),this}});var Pn=Object.assign;function X(t){B.prototype.stop.apply(t);let e=-1,n;for(;n=t[++e];)t[e]=void 0,X(n)}function m(){}Pn(m.prototype,{pipe:function(t){return this[0]=t,t},stop:function(){return X(this[0]),this}});var F=Object.assign,O=Object.create;function z(t,e){e!==void 0&&t[0].push(e)}function Fn(t,e){if(t[1]){let n=-1;for(;t[++n]&&t[n]!==e;);for(;t[n++];)t[n-1]=t[n];X(e)}else t.stop()}function h(t){this.input=t}F(h.prototype,B.prototype,{push:function(t){z(this,t)},pipe:function(t){if(this[0])throw new Error("Stream: Attempt to .pipe() a unicast stream multiple times. Create a multicast stream with stream.broadcast().");return this[0]=t,this.input.pipe(this),t},map:function(t){return new Jt(this,t)},filter:function(t){return new te(this,t)},chunk:function(t){return new ne(this,t)},flatMap:function(t){return new ee(this,t)},take:function(t){return new oe(this,t)},each:function(t){return new se(this,t)},reduce:function(t,e){return new re(this,t,e)},scan:function(t,e){return new ie(this,t,e)},stop:function(){return Fn(this.input,this),this}});function Jt(t,e){this.input=t,this.fn=e}Jt.prototype=F(O(h.prototype),{push:function(e){let n=this.fn;z(this,n(e))}});function te(t,e){this.input=t,this.fn=e}te.prototype=F(O(h.prototype),{push:function(e){this.fn(e)&&z(this,e)}});function ee(t,e){this.input=t,this.fn=e}ee.prototype=F(O(h.prototype),{push:function(e){let o=this.fn(e);if(o!==void 0)if(yt(o))for(let r of o)z(this,r);else throw new Error("Stream: Cannot .flatMap() non-iterable values")}});function ne(t,e){this.input=t,this.chunk=[],typeof e=="number"?this.n=e:typeof e=="function"&&(this.fn=e)}ne.prototype=F(O(h.prototype),{fn:function(t){return t.length===this.n},push:function(e){let n=this.chunk;n.push(e),this.fn(n)&&(z(this,n),this.chunk=[])}});function oe(t,e){this.input=t,this.count=e}oe.prototype=F(O(h.prototype),{push:function(e){this[0].push(e),--this.count||this.stop()}});function re(t,e,n){return this.input=t,this.fn=e,this.value=n,this.i=0,t.pipe(this),n}re.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t,this.i++,this)}});function ie(t,e,n){this.input=t,this.fn=e,this.value=n}ie.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t),this[0].push(this.value)}});function se(t,e){this.input=t,this.push=e,t.pipe(this)}se.prototype=F(O(h.prototype),{each:null,reduce:null,pipe:null});var On=Array.prototype,An=Object.assign,Cn=Object.create;function _(t){this.buffer=t||[]}_.prototype=An(Cn(h.prototype),m.prototype,{push:function(t){t!==void 0&&this.buffer.push(t)},pipe:function(t){for(this[0]=t;this.buffer.length;)this[0].push(On.shift.apply(this.buffer));return this.buffer=this[0],t}});var In=Object.assign,jn=Object.create;function R(t,e){this.input=t,this.memory=!!(e&&e.memory),e&&e.hot&&this.pipe(P)}R.prototype=In(jn(h.prototype),{push:function(t){if(t!==void 0){this.memory&&(this.value=t);let e=-1;for(;this[++e];)this[e].push(t)}},pipe:function(t){let e=-1;for(;this[++e];);return this[e]=t,this.value!==void 0&&t.push(this.value),e===0&&this.input.pipe(this),t}});var Hn=Object.assign;function Y(t){this.promise=t}Hn(Y.prototype,m.prototype,{pipe:function(t){let e=this.promise;this[0]=t,e.then(n=>this[0].push(n)).finally(n=>this.stop())},stop:function(){m.prototype.stop.apply(this,arguments),this[0]=P}});var ue=Object.assign,le=Object.keys;function ce(t,e,n){let o=t.values,r=t.names,i=t[0];o[e]=n,(t.active||(t.active=le(o).length===r.length))&&i.push(ue({},o))}function K(t){this.inputs=t,this.active=!1}ue(K.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this.values={},this.names=le(e),this[0]=t;for(let n in e){let o=e[n];o.pipe?t.done(o.each(r=>ce(this,n,r))):o.then?o.then(r=>ce(this,n,r)):console.log("Todo: combine() raw values ?")}}});var Mn=Object.assign;function Z(t){this.inputs=t}Mn(Z.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this[0]=t;let n=-1,o;for(;o=e[++n];)if(o.pipe)o.pipe(t);else if(o.then)o.then(r=>t.push(r));else{let r=-1;for(;++r0}function Gn(t,e,n){return t[n]=e.shift(),t}function zn(t){return[]}function bt(t,e,n,o){n.push(o),e.every(Bn)&&t.push(e.reduce(Gn,{}))}function Q(t){this.inputs=t,this.buffers=xt.map.call(t,zn)}Dn(Q.prototype,m.prototype,{pipe:function(t){let e=this.inputs,n=this.buffers;this[0]=t,xt.forEach.call(e,(o,r)=>{let i=n[r];o.each?t.done(o.each(s=>bt(t,n,i,s))):o.then?o.then(s=>bt(t,n,i,s)):xt.forEach.call(o,s=>bt(t,n,i,s))})},stop:function(){let t=this.inputs,e=-1,n;for(;n=t[++e];)n.stop();return m.prototype.stop.apply(this,arguments)}});var _n=Array.prototype,ae=Object.assign;function Rn(t){throw new TypeError("Stream: invalid source object cannot be read into stream")}var g=ae(h,{of:function(){return new _(_n.slice.apply(arguments))},from:function(t){return t.pipe?new h(t):t.then?new h(new Y(t)):typeof t.length=="number"?new _(t):Rn(t)},broadcast:function(e){return new R(P,e)},combine:function(e){return new h(new K(e))},merge:function(){return new h(new Z(arguments))},zip:function(){return new h(new Q(arguments))}});ae(h.prototype,{log:vt,broadcast:function(t){return new R(this,t)}});var Un=Object.assign,Vn=/\s+/,pe={fullscreenchange:"fullscreenElement"in document?"fullscreenchange":"webkitFullscreenElement"in document?"webkitfullscreenchange":"fullscreenchange"};function fe(t){return t.which===1&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}var de=0;window.addEventListener("click",t=>de=t.timeStamp);function qn(t,e){return t.node.addEventListener(pe[e]||e,t,t.options),t}function Wn(t,e){return t.node.removeEventListener(pe[e]||e,t),t}function me(t,e,n){this.types=t.split(Vn),this.options=e,this.node=n,this.select=e&&e.select}Un(me.prototype,m.prototype,{pipe:function(t){this[0]=t,this.types.reduce(qn,this)},handleEvent:function(t){if(!(t.type==="click"&&t.timeStamp<=de)){if(this.select){let e=t.target.closest(this.select);if(!e)return;t.selectedTarget=e}this[0].push(t)}},stop:function(){this.types.reduce(Wn,this),m.prototype.stop.apply(this,arguments)}});function x(t,e){let n;return typeof t=="object"&&(n=t,t=n.type),new g(new me(t,n,e))}function Et(t){return typeof t}var $n=/^\s*([+-]?\d*\.?\d+)([^\s\d]*)\s*$/;function Nn(t,e){if(typeof e=="number")return e;var n=$n.exec(e);if(!n||!t[n[2]||""]){if(!t.catch)throw new Error('Cannot parse value "'+e+'" with provided units '+Object.keys(t).join(", "));return n?t.catch(parseFloat(n[1]),n[2]):t.catch(parseFloat(e))}return t[n[2]||""](parseFloat(n[1]))}var J=w(Nn);var Xn=/px$/,he={"transform:translateX":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[4])},"transform:translateY":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[5])},"transform:scale":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.sqrt(o*o+r*r)},"transform:rotate":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.atan2(r,o)}};function tt(t){return t.split("(")[1].split(")")[0].split(/\s*,\s*/)}function U(t,e){return window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):0}function et(t,e){if(he[t])return he[t](e);var n=U(t,e);return typeof n=="string"&&Xn.test(n)?parseFloat(n):n}var nt,ot;function Yn(){if(!nt){let t=document.documentElement.style.fontSize;document.documentElement.style.fontSize="100%",nt=et("font-size",document.documentElement),document.documentElement.style.fontSize=t||""}return nt}function Kn(){return ot||(ot=et("font-size",document.documentElement)),ot}window.addEventListener("resize",()=>{nt=void 0,ot=void 0});var C=y(Et,{number:S,string:J({em:function(t){return Yn()*t},px:function(t){return t},rem:function(t){return Kn()*t},vw:function(t){return window.innerWidth*t/100},vh:function(t){return window.innerHeight*t/100},vmin:function(t){return window.innerWidthn?o:n}n=nq.maxScrollInterval?q.maxScrollInterval:1.4*n}function it(){return ye}function xe(t){let e=T(t),n=window.getComputedStyle(t,null),o=C(n.getPropertyValue("padding-left")),r=C(n.getPropertyValue("padding-right"));return e.leftPadding=e.left+o,e.rightPadding=e.left+e.width-r,e.centrePadding=e.leftPadding+(e.width-o-r)/2,e}function Ee(t){let e=window.getComputedStyle(t,null).getPropertyValue("scroll-snap-align");return e.endsWith("start")?"left":e.endsWith("end")?"right":"centre"}function Se(t,e,n){let o=xe(t),r=T(e),i=Ee(e);t.scrollTo({top:t.scrollTop,left:t.scrollLeft+(i==="left"?r.left-o.leftPadding:i==="right"?r.right-o.rightPadding:r.left+r.width/2-o.centrePadding),behavior:n})}function Te(t,e){return Se(t,e,"smooth"),e}function I(t,e){return t.style.setProperty("scroll-behavior","auto","important"),Se(t,e,"auto"),t.style.setProperty("scroll-behavior",""),e}function Le(t,e){let{leftPadding:n,rightPadding:o,centrePadding:r}=xe(t),i=e.length,s;for(;s=e[--i];){let l=T(s);if(!l)continue;let f=Ee(s),a=l.width/2+(f==="left"?n:f==="right"?o:r);if((f==="left"?l.left:f==="right"?l.right:l.left+l.width/2)<=a)break}return s}function ke(t){return!!t.dataset.slideIndex}function Pe(t){let{scroller:e,elements:n,children:o}=t,r=Le(e,n);return ke(r)?o[r.dataset.slideIndex]:r}function Fe(t){let{scroller:e,children:n,elements:o}=t,r=Le(e,o),i;!r||(ke(r)?(i=n[r.dataset.slideIndex],I(e,i)):i=r,t.activations.push(i))}function to(t,e){t.style.setProperty("scroll-snap-type",""),e.stop()}var Oe=y((t,e)=>e.type,{pointerdown:function(t,e){return t.e0=e,t.x0=e.clientX,t.y0=e.clientY,t},pointermove:function(t,e){let n=e.clientX,o=e.clientY;if(!t.gesturing){if(Math.abs(n-t.x0)(clearTimeout(s),setTimeout(to,it()*1e3,n,a)))}return t.gesturing=!1,t.e0=void 0,t.x0=void 0,t.y0=void 0,t.pointers=void 0,t.scrollLeft0=void 0,t}});var eo=Object.assign,no={capture:!0,passive:!0};function oo(t,e){t.timer=void 0,t.stream.push(e);let n=t.times;n.length>1&&be(n),n.length=0}function Ae(t){this.element=t,this.times=[]}eo(Ae.prototype,m.prototype,{pipe:function(t){this.stream=t,this.element.addEventListener("scroll",this,no)},handleEvent:function(t){let e=t.timeStamp/1e3;this.times.push(e),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(oo,it()*1e3,this,t)},stop:function(){this.element.removeEventListener("scroll",this),m.prototype.stop.apply(this,arguments)}});function kt(t){return new g(new Ae(t))}function ro(t,e,n){let o=n.length,r=-1/0;for(;o--;){let a=T(n[o]),p=a.x+a.width;r=p>r?p:r}let i=T(e),s=getComputedStyle(t),l=C(s.paddingLeft||0),f=C(s.paddingRight||0);return l+f+r-i.x}function io(t,e,n){let o=ro(t,e,n);t.style.setProperty("--scroll-width",o+"px")}function so(t){return!t.dataset.slideIndex}var Ce={construct:function(t){let e=b("slot",{part:"slides"}),n=b("div",{class:"scroller",children:[e]}),o=b("nav",{part:"controls",children:[b("slot",{name:"controls"})]});t.append(n,o);let r=g.of().broadcast({memory:!0}),i=g.combine({host:r,elements:x("slotchange",e).map(c=>u.elements=e.assignedElements())}).broadcast({memory:!0}),s=i.map(c=>{let E=c.elements.filter(so);return Zt(u.children,E)?void 0:u.children=E}).broadcast({memory:!0,hot:!0}),l=g.of(),f=g.of(),a=f.map(c=>c.dataset.slideIndex?u.children[c.dataset.slideIndex]:c).filter(c=>u.active!==c&&Lt("slide-active",c)).map(c=>u.active=c).broadcast({memory:!0,hot:!0}),p=x("click",t).filter(fe).broadcast(),u=this[d]={clickSuppressTime:-1/0,host:this,style:window.getComputedStyle(this),elements:P,children:P,scroller:n,slides:e,controls:o,load:r,views:l,activations:f,actives:a,slotchanges:i,mutations:s,clicks:p};g.merge(i,x("resize",window)).each(c=>io(n,e,u.elements)),i.map(c=>c.elements.includes(u.active)?u.active:u.children[0]).map(c=>I(n,c)).pipe(f),g.combine({host:r,child:l}).map(c=>u.elements.includes(c.child)&&u.active!==c.child?c.child:void 0).map(c=>u.active?Te(n,c):I(n,c)).pipe(f),kt(n).filter(()=>!u.gesturing).each(c=>Fe(u)),Tt({threshold:"0.25rem",device:"mouse"},t).filter(()=>u.children.length>1).each(c=>{u.pointers=c,c.reduce(Oe,u)}),p.each(c=>{c.timeStamp-u.clickSuppressTime<120&&(c.preventDefault(),c.stopPropagation())}),x("fullscreenchange",window).each(c=>{(c.target===this||c.target.contains(this))&&I(n,u.active)}),x("focusin",this).map(c=>u.children.indexOf(c.target)!==-1?c.target:u.children.find(E=>E.contains(c.target))).pipe(l),x("keydown",this).filter(()=>document.activeElement===this||this.contains(document.activeElement)).map(y(D("keyCode"),{37:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)-1]),39:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)+1]),default:v})).pipe(l)},load:function(t){this[d].load.push(this)}};function st(t,e){function n(o,r){if(t.getState(o)!==r)return t[r?"enable":"disable"](o)}return{attribute:function(o){return n(this,o!==null)},set:function(o){return n(this,!!o)},get:function(){return t.getState(this)}}}function Pt(t,e){t.remove&&t.remove(e);let n;for(;(n=t.indexOf(e))!==-1;)t.splice(n,1);return e}var as=w(Pt,!0);var co=Object.assign;function W(t,e){this.element=t,this.definitions=e,this.tokens=[]}co(W.prototype,{contains:function(t){return this.tokens.includes(t)},add:function(){let t=arguments.length;for(;t--;){let e=arguments[t];!this.tokens.includes(e)&&this.definitions[e]&&(this.definitions[e].enable(this.element),this.tokens.push(e))}},remove:function(){let t=arguments.length;for(;t--;){let e=arguments[t];this.tokens.includes(e)&&(this.definitions[e].disable(this.element),Pt(this.tokens,e))}},supports:function(t){return!!this.definitions[t]}});var uo=Array.prototype;function lo(t,e){let n=t.tokens.slice(),o=uo.slice.apply(e),r=n.length;for(;r--;)o.includes(n[r])&&n.splice(r,1);t.remove.apply(t,n),t.add.apply(t,o)}function Ft(t){let e=Symbol("TokenList");function n(o,r){let i=o[e]||(o[e]=new W(o,t));lo(i,r.trim().split(/\s+/))}return{attribute:function(o){n(this,o||"")},set:function(o){n(this,o+"")},get:function(){return this[e]||(this[e]=new W(this,t))}}}var Ot={};G(Ot,{disable:()=>ho,enable:()=>mo,getState:()=>go});var ao=J({s:S,ms:t=>t/1e3});function po(t){let{active:e,children:n,elements:o,host:r}=t,i=o.indexOf(e),s=o[i+1]||n[0];t.autoplay.timer=null,!!s&&(r.active=s)}function fo(t){let{active:e,style:n}=t,o=ao(window.getComputedStyle(e).getPropertyValue("--slide-duration")||n.getPropertyValue("--slide-duration"));clearTimeout(t.autoplay.timer),t.autoplay.timer=setTimeout(po,o*1e3,t)}function Ie(t){clearTimeout(t.autoplay.timer),t.autoplay.timer=null}function mo(t){let e=t[d],{actives:n}=e,o=e.autoplay={},r=g.merge([!1],x("pointerenter pointerleave",t).map(s=>s.type==="pointerenter")),i=g.merge([t.contains(document.activeElement)],x("focusin focusout",t).map(y(D("type"),{focusin:s=>!0,focusout:s=>t.contains(s.relatedTarget)}))).map((s=>l=>s===l?void 0:s=l)());o.updates=g.combine({active:n,hover:r,focus:i}).each(s=>s.hover||s.focus?Ie(e):fo(e))}function ho(t){let e=t[d];Ie(e),e.autoplay.updates.stop(),e.autoplay=void 0}function go(t){return!!t[d].autoplay}var At={};G(At,{disable:()=>yo,enable:()=>vo,getState:()=>bo});function je(t,e){let n=t.cloneNode(!0);return n.dataset.slideIndex=e,n.removeAttribute("id"),n.setAttribute("aria-hidden","true"),n.tabIndex="-1",n}function wo(t){let{active:e,children:n,host:o,scroller:r}=t;if(t.loop.prepends&&(t.loop.prepends.forEach(c=>c.remove()),t.loop.appends.forEach(c=>c.remove()),t.loop.prepends=void 0,t.loop.appends=void 0),n.length<2){t.elements=t.slides.assignedElements();return}let i=o.clientWidth,s=n.map(T),l=s[1].left,f=s[s.length-2].right,a=1;for(;s[++a]&&s[a].leftf-i;);let u=n.slice(++a).map((c,E)=>je(c,a+E));o.prepend.apply(o,u),o.append.apply(o,p),t.loop.prepends=u,t.loop.appends=p,t.elements=t.slides.assignedElements(),I(r,e||n[0])}function vo(t){let e=t[d],{mutations:n}=e,o=e.loop={};o.renders=n.each(r=>wo(e))}function yo(t){let e=t[d];e.loop&&(e.loop.prepends&&e.loop.prepends.forEach(n=>n.remove()),e.loop.appends&&e.loop.appends.forEach(n=>n.remove()),e.loop.renders.stop(),e.loop=void 0)}function bo(t){return!!t[d].loop}var Ct={};G(Ct,{disable:()=>Eo,enable:()=>xo,getState:()=>So});function j(t){if(typeof t!="object"||arguments.length>1)throw new Error("delegate() now takes an object of selector:fn pairs.");let e=Object.keys(t);return function(o){let r=o.target,i=-1;for(;e[++i];){let s=r.closest(e[i]);if(s)return t[e[i]](s,...arguments)}}}function He(t,e,n,o){o===0?t.hidden=!0:t.hidden=!1,o===n.length-1?e.hidden=!0:e.hidden=!1}function xo(t){let e=t[d],{actives:n,clicks:o,slotchanges:r}=e,i=e.navigation={prev:b("button",{part:"prev-button",type:"button",name:"navigation",value:"-1",html:"Previous"}),next:b("button",{part:"next-button",type:"button",name:"navigation",value:"1",html:"Next"})};e.controls.prepend(i.prev,i.next),i.updates=g.combine({active:n,changes:r}).each(s=>He(i.prev,i.next,s.changes.elements,s.changes.elements.indexOf(s.active))),i.clicks=o.each(j({'[name="navigation"]':function(s,l){let f=parseFloat(s.value),a=e.elements.indexOf(e.active)+f,p=e.elements[a];!p||(t.active=p,He(i.prev,i.next,e.elements,a))}}))}function Eo(t){let e=t[d];e.navigation.prev.remove(),e.navigation.next.remove(),e.navigation.updates.stop(),e.navigation.clicks.stop(),e.navigation=void 0}function So(t){return!!t[d].navigation}var It={};G(It,{disable:()=>ko,enable:()=>Lo,getState:()=>Po});function Me(t,e,n){let{active:o,buttons:r,index:i}=t;if(o===n)return;i>-1&&(t.activeSpan.remove(),r.children[i].part.remove("page-button-active"));let s=e.indexOf(n);s!==-1&&(r.children[s].part.add("page-button-active"),r.children[s].append(t.activeSpan),t.index=s,t.active=n)}function To(t,e,n,o){return e.buttons&&(e.buttons.remove(),e.buttons=void 0),o.length<2||(e.buttons=b("div",{part:"pagination",children:o.map((r,i)=>b("button",{part:"page-button",type:"button",name:"pagination",value:i}))}),t.append(e.buttons)),o.length}function Lo(t){let e=t[d],{shadow:n,actives:o,clicks:r,mutations:i}=e,s=e.pagination={activeSpan:b("span",{class:"invisible",text:"(Current slide)"})};s.mutations=i.each(()=>To(e.controls,s,n,e.children)),s.updates=g.combine({active:o,children:i}).filter(l=>l.children.length>1).each(l=>Me(s,e.children,e.active)),s.clicks=r.each(j({'[name="pagination"]':function(l,f){let{host:a}=e,p=e.children,u=p[l.value];!u||(a.active=u,Me(s,p,u))}}))}function ko(t){let e=t[d];e.pagination.buttons.remove(),e.pagination.mutations.stop(),e.pagination.updates.stop(),e.pagination.clicks.stop(),e.pagination=void 0}function Po(t){return!!t[d].pagination}var jt={};G(jt,{disable:()=>Oo,enable:()=>Fo,getState:()=>Ao});var De=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled;function ct(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement}function Be(t){return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():void 0}function ut(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}function Fo(t){let e=t[d];if(!De)return;let n=e.fullscreen={button:b("button",{part:"fullscreen-button",type:"button",name:"fullscreen",html:"Open in fullscreen"})};e.controls.append(n.button),n.changes=x("fullscreenchange",t).filter(o=>ct()===t).each(o=>{n.button.part.add("fullscreen-button-active"),n.button.innerHTML="Close fullscreen",document.activeElement!==t&&(n.tabIndex=t.tabIndex,t.tabIndex<0&&(t.tabIndex=0),t.focus());let r=x("fullscreenchange",t).each(i=>{n.button.part.remove("fullscreen-button-active"),n.button.innerHTML="Open in fullscreen",t.tabIndex=n.tabIndex,n.tabIndex=void 0,r.stop()})}),n.clicks=e.clicks.each(j({'[name="fullscreen"]':(o,r)=>{let i=ct();if(i===t){ut();return}i&&ut(),Be(t)}}))}function Oo(t){let e=t[d];ct()===t&&ut(),e.fullscreen.button.remove(),e.fullscreen.clicks.stop(),e.fullscreen.changes.stop(),e.fullscreen=void 0}function Ao(t){return!!t[d].fullscreen}var Ge={active:{attribute:function(t){this.active=t},set:function(t){let e=this[d],n=typeof t=="object"?t:/^\d/.test(t+"")?this.querySelector("#\\3"+(t+"")[0]+" "+(t+"").slice(1)):/^\#/.test(t+"")?this.querySelector(t):this.querySelector("#"+t);e.views.push(n)},get:function(){return this[d].active}},autoplay:st(Ot,"autoplay"),controls:Ft({navigation:Ct,pagination:It,fullscreen:jt}),loop:st(At,"loop")};var Co=import.meta.url.replace(/\/[^\/]*\.js/,"/slide-show-shadow.css"),Js=wt('
            ',Ce,Ge,Co);export{Js as default}; diff --git a/build/slide-show-shadow.css b/build/slide-show-shadow.css index eedf436..8a04bed 100644 --- a/build/slide-show-shadow.css +++ b/build/slide-show-shadow.css @@ -1,6 +1,6 @@ /* slide-show - 1.1.5 + 1.1.6 By Stephen Band - Built 2022-05-18 15:08 */ + Built 2022-05-18 15:13 */ :host,*{box-sizing:border-box;background-origin:padding-box;background-repeat:no-repeat;padding:0;margin:0}button{font-size:inherit}:host{--slide-duration: 8s;--padding-left: 0;--padding-right: 0;position:relative;display:block!important;padding-left:0!important;padding-right:0!important;align-content:center!important;align-items:stretch;justify-content:center!important;justify-items:stretch;grid-auto-flow:row!important;grid-auto-columns:100%;grid-template-columns:none;column-gap:0;grid-auto-rows:min-content;grid-template-rows:1fr;row-gap:0;scroll-snap-type:none!important;scroll-snap-stop:none!important;-webkit-scroll-behavior:smooth;scroll-behavior:smooth;overscroll-behavior-x:none!important;-ms-overflow-style:none!important;scrollbar-width:none!important;overflow:visible}:host(:-webkit-full-screen){width:100vw!important;height:100vh!important;margin:0!important;background-color:#121212}:host(:fullscreen){width:100vw!important;height:100vh!important;margin:0!important;background-color:#121212}.invisible{position:absolute;clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);width:1px;height:1px;padding:0;margin:0 -1px -1px 0;overflow:hidden;white-space:nowrap;border-width:0}.scroller{display:block;position:relative;height:100%;padding-left:var(--padding-left, 0);padding-right:var(--padding-right, 0);scroll-padding-left:var(--padding-left, 0);scroll-padding-right:var(--padding-right, 0);overflow:auto;overflow-y:hidden;overscroll-behavior-x:none;overscroll-behavior-x:contain;scrollbar-width:none;scroll-snap-type:x mandatory;scroll-snap-stop:always;-webkit-scroll-behavior:inherit;scroll-behavior:inherit;will-change:-webkit-scroll-behavior;will-change:scroll-behavior;grid-template-columns:inherit;grid-auto-columns:inherit;column-gap:inherit;justify-content:inherit;justify-items:inherit;grid-template-rows:inherit;grid-auto-rows:inherit;row-gap:inherit;align-content:inherit;align-items:inherit}.scroller:before{content:"";position:absolute;left:0;top:0;width:var(--scroll-width, 5000%);height:1px;z-index:-1}.scroller::-webkit-scrollbar{-webkit-appearance:none;display:var(--webkit-scrollbar-display, none);width:var(--webkit-scrollbar-width);height:var(--webkit-scrollbar-width);background:var(--webkit-scrollbar-background);border:var(--webkit-scrollbar-border);border-radius:var(--webkit-scrollbar-border-radius)}.scroller::-webkit-scrollbar-thumb:vertical,.scroller::-webkit-scrollbar-thumb:horizontal{background:var(--webkit-scrollbar-thumb-background);border:var(--webkit-scrollbar-thumb-border);border-radius:var(--webkit-scrollbar-thumb-border-radius)}.scroller>[part=slides]{position:relative;z-index:1}:host(:-webkit-full-screen) .scroller{height:calc(100% - 2.75rem)}:host(:fullscreen) .scroller{height:calc(100% - 2.75rem)}[part=slides]{display:grid;height:100%;margin-left:auto;margin-right:auto;grid-auto-flow:column;grid-template-columns:inherit;grid-auto-columns:inherit;column-gap:inherit;justify-content:start!important;justify-items:inherit;grid-template-rows:inherit;grid-auto-rows:inherit;row-gap:inherit;align-content:inherit;align-items:inherit}[part=slides]::slotted(*){scroll-snap-align:center}[part=controls]{display:grid;grid-template-columns:[left] 1fr [center] auto [right] 1fr;height:auto;padding-left:var(--padding-left);padding-right:var(--padding-right);align-content:center;align-items:center;justify-items:center;justify-content:stretch}[part=controls]:empty{display:none}@media print{:host>nav{display:none!important}}[part*=fullscreen-button]{vertical-align:baseline;overflow:hidden;z-index:2;grid-column:3;grid-row:1;justify-self:end;margin:.375em 0;width:0;min-width:0;line-height:inherit;text-decoration:none;padding:0 0 0 1.875em;height:1.875em;cursor:pointer;background-size:contain;background-position:50% 50%;background-repeat:no-repeat;background-color:transparent;background-image:url('data:image/svg+xml;utf8, ');border-width:0;border-radius:.3125em;color:inherit;transition:background-color .2s linear}[part*=fullscreen-button]:hover{transition:background-color .1s linear;background-color:#ffffff4d}[part*=fullscreen-button-active]{background-image:url('data:image/svg+xml;utf8, ')}:host(:fullscreen) [part*=fullscreen-button]{grid-column:auto;grid-row:auto;position:absolute;top:.75em;right:.75em;margin:0;bottom:auto}:host(:-webkit-full-screen) [part*=fullscreen-button]{grid-column:auto;grid-row:auto;position:absolute;top:.75em;right:.75em;margin:0;bottom:auto}[part=prev-button],[part=next-button]{vertical-align:baseline;overflow:hidden;position:absolute;top:50%;z-index:2;padding:0;width:0;min-width:0;line-height:inherit;text-decoration:none;padding-left:1.875rem;height:2.5rem;margin-top:-1.25rem;background-size:contain;background-position:50% 50%;background-repeat:no-repeat;background-color:transparent;border-width:0;border-radius:.3125rem;color:inherit;transition:background-color .2s linear;cursor:pointer}[part=prev-button]{left:.1875rem;background-image:url('data:image/svg+xml;utf8, ')}[part=next-button]{right:.1875rem;background-image:url('data:image/svg+xml;utf8, ')}[part=prev-button]:hover,[part=next-button]:hover{transition:background-color .1s linear;background-color:#ffffff4d}[part=pagination]{display:flex;justify-content:center;grid-column:2;grid-row:1;justify-self:center;margin:0;padding:.875em 0}[part*=page-button]{display:inline-block;padding:0 0 0 1.25em;height:1.25em;cursor:pointer;border-width:0;background-color:transparent;background-size:100% auto;background-position:50% 50%;background-image:url('data:image/svg+xml;utf8, ')}[part*=page-button-active]{background-image:url('data:image/svg+xml;utf8, ')}:host(:fullscreen) [part*=page-button-active]{background-image:url('data:image/svg+xml;utf8, ')}:host(:-webkit-full-screen) [part*=page-button-active]{background-image:url('data:image/svg+xml;utf8, ')}slot[name=optional]::slotted(*){grid-column:1;grid-row:1} diff --git a/build/slide-show-ul.js b/build/slide-show-ul.js index a23c424..6ac2f35 100644 --- a/build/slide-show-ul.js +++ b/build/slide-show-ul.js @@ -1,7 +1,7 @@ /* slide-show - 1.1.5 + 1.1.6 By Stephen Band - Built 2022-05-18 15:08 */ + Built 2022-05-18 15:13 */ var qe=Object.defineProperty;var Mt=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var Dt=(t,e)=>{var n={};for(var o in t)We.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&Mt)for(var o of Mt(t))e.indexOf(o)<0&&$e.call(t,o)&&(n[o]=t[o]);return n};var G=(t,e)=>{for(var n in e)qe(t,n,{get:e[n],enumerable:!0})};function $(t){var e=new Map;return function(o){if(e.has(o))return e.get(o);var r=t(o);return e.set(o,r),r}}var Ne=Array.prototype;function Xe(t,e){return typeof t=="function"?t.apply(null,e):t}function Bt(t,e,n){n=n||t.length;var o=n===1?e?t:$(t):$(function(r){return Bt(function(){var i=[r];return i.push.apply(i,arguments),t.apply(null,i)},e,n-1)});return function r(i){return arguments.length===0?r:arguments.length===1?o(i):arguments.length>=n?t.apply(null,arguments):Xe(o(i),Ne.slice.call(arguments,1))}}var w=Bt;function Ye(t,e){return 1-Math.pow(1-e,t)}var Gt=w(Ye);function v(){}function at(t,e){return e(t)}function S(t){return t}var Ke=Array.prototype;function pt(){let t=arguments;return t.length?e=>Ke.reduce.call(t,at,e):S}function ft(t,e,n){return n*(e-t)+t}var Ze=window.performance,zt=window.requestAnimationFrame,Qe=window.cancelAnimationFrame;function dt(t,e,n){var o=Ze.now();function r(s){var l=(s-o)/(t*1e3);l<1?(l>0&&e(l),i=zt(r)):(e(1),n&&n())}var i=zt(r);return function(){Qe(i)}}function N(t,e,n,o,r,i){let s=o[n];return dt(t,pt(e,l=>ft(s,r,l),l=>o[n]=l),i)}function Je(){return{x:0,y:0,left:0,top:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}}function T(t){return t===window?Je():t.getClientRects()[0]||t.getBoundingClientRect()}var H={scrollDuration:.3,scrollDurationPerHeight:.125,scrollTransform:Gt(3)},_t=v;function tn(t,e){if(e.behavior==="smooth"){let n=t.style.getPropertyValue("scroll-snap-type"),o=()=>t.style.setProperty("scroll-snap-type",n);if(t.style.setProperty("scroll-snap-type","none"),e.left!==void 0){let r=t===document.body?window.innerWidth:T(t).width,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.left-t.scrollLeft)/r;_t=N(i,H.scrollTransform,"scrollLeft",t,e.left,o)}else{let r=t===document.body?window.innerHeight:T(t).height,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.top-t.scrollTop)/r;_t=N(i,H.scrollTransform,"scrollTop",t,e.top,o)}}else e.left!==void 0&&(t.scrollLeft=e.left),e.top!==void 0&&(t.scrollTop=e.top)}if(!("scrollBehavior"in document.documentElement.style)){console.log("Polyfilling Element.scrollTo(options).");let t="scrollTo"in Element.prototype?Element:HTMLElement,e=t.scrollIntoView;t.prototype.scrollTo=function(n){typeof n=="object"?tn(this,n):e.apply(this,arguments)}}function y(t,e){return function(){let o=t.apply(this,arguments),r=e[o]||e.default;if(!r)throw new Error('overload() no handler for "'+o+'"');return r.apply(this,arguments)}}var en=y(S,{is:v,tag:v,html:function(t,e,n){e.innerHTML=n},text:function(t,e,n){e.textContent=n},children:function(t,e,n){e.innerHTML="",n.forEach(o=>{e.appendChild(o)})},points:M,cx:M,cy:M,r:M,preserveAspectRatio:M,viewBox:M,default:function(t,e,n){t in e?e[t]=n:e.setAttribute(t,n)}});function M(t,e,n){e.setAttribute(t,n)}function nn(t,e){for(var n=Object.keys(e),o=n.length;o--;)en(n[o],t,e[n[o]]);return t}var mt=w(nn,!0);var on="http://www.w3.org/2000/svg",Rt=document.createElement("div");var Ut=(t,e)=>e&&typeof e;function Vt(t,e){let n=document.createRange();return n.selectNode(t),n.createContextualFragment(e)}function L(t,e){var n=document.createElementNS(on,t);return e&&(n.innerHTML=e),n}var rn=y(S,{comment:function(t,e){return document.createComment(e||"")},fragment:y(Ut,{string:function(t,e,n){if(n)return Vt(n,e);let o=document.createDocumentFragment();Rt.innerHTML=e;let r=Rt.childNodes;for(;r[0];)o.appendChild(r[0]);return o},object:function(t,e,n){let o=n?Vt(n):document.createDocumentFragment();return typeof e.length=="number"?o.append.apply(o,e):mt(o,e),o},default:()=>document.createDocumentFragment()}),text:function(t,e){return document.createTextNode(e||"")},circle:L,ellipse:L,g:L,glyph:L,image:L,line:L,rect:L,use:L,path:L,pattern:L,polygon:L,polyline:L,svg:L,default:y(Ut,{string:function(t,e){let n=document.createElement(t);return n.innerHTML=e,n},object:function(t,e){let n=document.createElement(t);return typeof e.length=="number"?n.append.apply(n,e):mt(n,e),n},default:t=>{if(typeof t!="string")throw new Error('create(tag, content) accepts only a string as tag "'+typeof t+'"');return document.createElement(t)}})}),b=rn;function ht(t,e,n){let o;typeof n!="string"&&n.input!==void 0&&n.index!==void 0&&(o=n,n=o.input.slice(n.index+n[0].length+(n.consumed||0)));let r=t.exec(n);if(!r)return;let i=e(r);return o&&(o.consumed=(o.consumed||0)+r.index+r[0].length+(r.consumed||0)),i}var fr=w(ht,!0);function sn(t,e,n){throw n.input!==void 0&&n.index!==void 0&&(n=n.input),new Error('Cannot parse string "'+n+'"')}function cn(t,e,n){let o=-1;for(;++ocn(e,n,i),o);return r===void 0?e.catch?e.catch(n,o):sn(t,e,o):r}var qt=w(un,!0);var gt=v;var k=Symbol("internals"),A=Symbol("shadow"),Wt=Object.defineProperties,ln={a:HTMLAnchorElement,dl:HTMLDListElement,p:HTMLParagraphElement,br:HTMLBRElement,fieldset:HTMLFieldSetElement,hr:HTMLHRElement,img:HTMLImageElement,li:HTMLLIElement,ol:HTMLOListElement,optgroup:HTMLOptGroupElement,q:HTMLQuoteElement,textarea:HTMLTextAreaElement,td:HTMLTableCellElement,th:HTMLTableCellElement,tr:HTMLTableRowElement,tbody:HTMLTableSectionElement,thead:HTMLTableSectionElement,tfoot:HTMLTableSectionElement,ul:HTMLUListElement},an={name:{set:function(t){return this.setAttribute("name",t)},get:function(){return this.getAttribute("name")||""}},form:{get:function(){return this[k].form}},labels:{get:function(){return this[k].labels}},validity:{get:function(){return this[k].validity}},validationMessage:{get:function(){return this[k].validationMessage}},willValidate:{get:function(){return this[k].willValidate}},checkValidity:{value:function(){return this[k].checkValidity()}},reportValidity:{value:function(){return this[k].reportValidity()}}},pn={},$t={once:!0},fn=0,Nt=!1;function dn(t){return ln[t]||window["HTML"+t[0].toUpperCase()+t.slice(1)+"Element"]||(()=>{throw new Error('Constructor not found for tag "'+t+'"')})()}var mn=qt(/^\s*?\s*$|^\s*?\s*$/,{1:(t,e)=>({name:e[1]}),2:(t,e)=>({name:e[3],tag:e[2]}),catch:function(t,e){throw new SyntaxError(`dom element() – name must be of the form 'element-name' or 'tag is="element-name"' (`+e+")")}},null);function hn(t,e){if(t.hasOwnProperty(e)){let n=t[e];delete t[e],t[e]=n}return t}function gn(t,e,n){t._initialLoad=!0;let o=t.attachShadow({mode:e.mode||"closed",delegatesFocus:e.focusable||!1});if(n){let r=b("link",{rel:"stylesheet",href:n});o.append(r)}return t[A]=o,o}function wn(t){var e;if(t.attachInternals){if(e=t.attachInternals(),e.setFormValue)return e}else e={shadowRoot:t.shadowRoot};return e.input=b("input",{type:"hidden",name:t.name}),t.appendChild(e.input),e.setFormValue=function(n){this.input.value=n},e}function vn(t){t._initialAttributes={},t._n=0}function yn(t,e,n){let o=t._initialAttributes;for(;t._nfn?gn(p,e,o||e.stylesheet):void 0,c=a.formAssociated&&wn(p);return i&&(Nt=!0),e.construct&&e.construct.call(p,u,c),l&&(vn(p),Promise.resolve(1).then(function(){Xt(p,a.observedAttributes,l)})),f&&Object.keys(f).reduce(hn,p),p}return a.prototype=Object.create(s.prototype,f),f&&f.value&&(a.formAssociated=!0,Wt(a.prototype,an),(e.enable||e.disable)&&(a.prototype.formDisabledCallback=function(p){return p?e.disable&&e.disable.call(this,this[A],this[k]):e.enable&&e.enable.call(this,this[A],this[k])}),e.reset&&(a.prototype.formResetCallback=function(){return e.reset.call(this,this[A],this[k])}),e.restore&&(a.prototype.formStateRestoreCallback=function(){return e.restore.call(this,this[A],this[k])})),l&&(a.observedAttributes=Object.keys(l),a.prototype.attributeChangedCallback=function(p,u,c){if(!this._initialAttributes)return l[p].call(this,c);this._initialAttributes[p]=c,yn(this,a.observedAttributes,l)}),a.prototype.connectedCallback=function(){let p=this,u=p[A],c=p[k];if(p._initialAttributes&&Xt(p,a.observedAttributes,l),p._initialLoad){let E=u.querySelectorAll('link[rel="stylesheet"]');if(E.length){let ze=0,lt=E.length,Ht=function(Ue){++ze>=E.length&&(delete p._initialLoad,e.load&&(gt("element()","loaded",Array.from(E).map(Ve=>Ve.href).join(` `)),e.load.call(p,u)))},_e=Ht;for(;lt--;)E[lt].addEventListener("load",Ht,$t),E[lt].addEventListener("error",_e,$t);e.connect&&e.connect.call(this,u,c)}else e.connect&&e.connect.call(this,u,c),e.load&&e.load.call(this,u,c)}else e.connect&&e.connect.call(this,u,c)},e.disconnect&&(a.prototype.disconnectedCallback=function(){return e.disconnect.call(this,this[A],this[k])}),gt("element()","<"+(i?i+" is="+r:r)+">"),window.customElements.define(r,a,i&&{extends:i}),i&&!Nt&&document.querySelectorAll('[is="'+r+'"]').forEach(p=>{Wt(p,f),e.construct&&e.construct.apply(p);let u;for(u in l){let c=p.attributes[u];c&&l[u].call(p,c.value)}e.connect&&e.connect.apply(p)}),a}function Kt(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object")return!1;let n=Object.keys(t),o=Object.keys(e),r=n.length;for(;r--;){if(t[n[r]]===void 0){if(e[n[r]]!==void 0)return!1}else if(!e.hasOwnProperty(n[r])||!Kt(t[n[r]],e[n[r]]))return!1;let i=o.indexOf(n[r]);i>-1&&o.splice(i,1)}for(r=o.length;r--;)if(e[o[r]]===void 0){if(t[o[r]]!==void 0)return!1}else return!1;return!0}var Zt=w(Kt,!0);function En(t,e){return e[t]}var D=w(En,!0);var Sn=Object.freeze;function Qt(){return this}var P=Sn({shift:v,push:v,forEach:v,join:function(){return""},map:Qt,filter:Qt,includes:function(){return!1},reduce:function(t,e){return e},length:0,each:v,pipe:S,start:v,stop:v,done:v,valueOf:function(){return null}});function vt(){return this}function yt(t){return t&&t[Symbol.iterator]}var Tn=Object.assign;function Ln(t){return t.stop?t.stop():t()}function kn(t){t.forEach(Ln),t.length=0}function B(){}Tn(B.prototype,{stop:function(){return this.stopables&&kn(this.stopables),this},done:function(e){return(this.stopables||(this.stopables=[])).push(e),this}});var Pn=Object.assign;function X(t){B.prototype.stop.apply(t);let e=-1,n;for(;n=t[++e];)t[e]=void 0,X(n)}function m(){}Pn(m.prototype,{pipe:function(t){return this[0]=t,t},stop:function(){return X(this[0]),this}});var F=Object.assign,O=Object.create;function z(t,e){e!==void 0&&t[0].push(e)}function Fn(t,e){if(t[1]){let n=-1;for(;t[++n]&&t[n]!==e;);for(;t[n++];)t[n-1]=t[n];X(e)}else t.stop()}function h(t){this.input=t}F(h.prototype,B.prototype,{push:function(t){z(this,t)},pipe:function(t){if(this[0])throw new Error("Stream: Attempt to .pipe() a unicast stream multiple times. Create a multicast stream with stream.broadcast().");return this[0]=t,this.input.pipe(this),t},map:function(t){return new Jt(this,t)},filter:function(t){return new te(this,t)},chunk:function(t){return new ne(this,t)},flatMap:function(t){return new ee(this,t)},take:function(t){return new oe(this,t)},each:function(t){return new se(this,t)},reduce:function(t,e){return new re(this,t,e)},scan:function(t,e){return new ie(this,t,e)},stop:function(){return Fn(this.input,this),this}});function Jt(t,e){this.input=t,this.fn=e}Jt.prototype=F(O(h.prototype),{push:function(e){let n=this.fn;z(this,n(e))}});function te(t,e){this.input=t,this.fn=e}te.prototype=F(O(h.prototype),{push:function(e){this.fn(e)&&z(this,e)}});function ee(t,e){this.input=t,this.fn=e}ee.prototype=F(O(h.prototype),{push:function(e){let o=this.fn(e);if(o!==void 0)if(yt(o))for(let r of o)z(this,r);else throw new Error("Stream: Cannot .flatMap() non-iterable values")}});function ne(t,e){this.input=t,this.chunk=[],typeof e=="number"?this.n=e:typeof e=="function"&&(this.fn=e)}ne.prototype=F(O(h.prototype),{fn:function(t){return t.length===this.n},push:function(e){let n=this.chunk;n.push(e),this.fn(n)&&(z(this,n),this.chunk=[])}});function oe(t,e){this.input=t,this.count=e}oe.prototype=F(O(h.prototype),{push:function(e){this[0].push(e),--this.count||this.stop()}});function re(t,e,n){return this.input=t,this.fn=e,this.value=n,this.i=0,t.pipe(this),n}re.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t,this.i++,this)}});function ie(t,e,n){this.input=t,this.fn=e,this.value=n}ie.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t),this[0].push(this.value)}});function se(t,e){this.input=t,this.push=e,t.pipe(this)}se.prototype=F(O(h.prototype),{each:null,reduce:null,pipe:null});var On=Array.prototype,An=Object.assign,Cn=Object.create;function _(t){this.buffer=t||[]}_.prototype=An(Cn(h.prototype),m.prototype,{push:function(t){t!==void 0&&this.buffer.push(t)},pipe:function(t){for(this[0]=t;this.buffer.length;)this[0].push(On.shift.apply(this.buffer));return this.buffer=this[0],t}});var In=Object.assign,jn=Object.create;function R(t,e){this.input=t,this.memory=!!(e&&e.memory),e&&e.hot&&this.pipe(P)}R.prototype=In(jn(h.prototype),{push:function(t){if(t!==void 0){this.memory&&(this.value=t);let e=-1;for(;this[++e];)this[e].push(t)}},pipe:function(t){let e=-1;for(;this[++e];);return this[e]=t,this.value!==void 0&&t.push(this.value),e===0&&this.input.pipe(this),t}});var Hn=Object.assign;function Y(t){this.promise=t}Hn(Y.prototype,m.prototype,{pipe:function(t){let e=this.promise;this[0]=t,e.then(n=>this[0].push(n)).finally(n=>this.stop())},stop:function(){m.prototype.stop.apply(this,arguments),this[0]=P}});var ue=Object.assign,le=Object.keys;function ce(t,e,n){let o=t.values,r=t.names,i=t[0];o[e]=n,(t.active||(t.active=le(o).length===r.length))&&i.push(ue({},o))}function K(t){this.inputs=t,this.active=!1}ue(K.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this.values={},this.names=le(e),this[0]=t;for(let n in e){let o=e[n];o.pipe?t.done(o.each(r=>ce(this,n,r))):o.then?o.then(r=>ce(this,n,r)):console.log("Todo: combine() raw values ?")}}});var Mn=Object.assign;function Z(t){this.inputs=t}Mn(Z.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this[0]=t;let n=-1,o;for(;o=e[++n];)if(o.pipe)o.pipe(t);else if(o.then)o.then(r=>t.push(r));else{let r=-1;for(;++r0}function Gn(t,e,n){return t[n]=e.shift(),t}function zn(t){return[]}function bt(t,e,n,o){n.push(o),e.every(Bn)&&t.push(e.reduce(Gn,{}))}function Q(t){this.inputs=t,this.buffers=xt.map.call(t,zn)}Dn(Q.prototype,m.prototype,{pipe:function(t){let e=this.inputs,n=this.buffers;this[0]=t,xt.forEach.call(e,(o,r)=>{let i=n[r];o.each?t.done(o.each(s=>bt(t,n,i,s))):o.then?o.then(s=>bt(t,n,i,s)):xt.forEach.call(o,s=>bt(t,n,i,s))})},stop:function(){let t=this.inputs,e=-1,n;for(;n=t[++e];)n.stop();return m.prototype.stop.apply(this,arguments)}});var _n=Array.prototype,ae=Object.assign;function Rn(t){throw new TypeError("Stream: invalid source object cannot be read into stream")}var g=ae(h,{of:function(){return new _(_n.slice.apply(arguments))},from:function(t){return t.pipe?new h(t):t.then?new h(new Y(t)):typeof t.length=="number"?new _(t):Rn(t)},broadcast:function(e){return new R(P,e)},combine:function(e){return new h(new K(e))},merge:function(){return new h(new Z(arguments))},zip:function(){return new h(new Q(arguments))}});ae(h.prototype,{log:vt,broadcast:function(t){return new R(this,t)}});var Un=Object.assign,Vn=/\s+/,pe={fullscreenchange:"fullscreenElement"in document?"fullscreenchange":"webkitFullscreenElement"in document?"webkitfullscreenchange":"fullscreenchange"};function fe(t){return t.which===1&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}var de=0;window.addEventListener("click",t=>de=t.timeStamp);function qn(t,e){return t.node.addEventListener(pe[e]||e,t,t.options),t}function Wn(t,e){return t.node.removeEventListener(pe[e]||e,t),t}function me(t,e,n){this.types=t.split(Vn),this.options=e,this.node=n,this.select=e&&e.select}Un(me.prototype,m.prototype,{pipe:function(t){this[0]=t,this.types.reduce(qn,this)},handleEvent:function(t){if(!(t.type==="click"&&t.timeStamp<=de)){if(this.select){let e=t.target.closest(this.select);if(!e)return;t.selectedTarget=e}this[0].push(t)}},stop:function(){this.types.reduce(Wn,this),m.prototype.stop.apply(this,arguments)}});function x(t,e){let n;return typeof t=="object"&&(n=t,t=n.type),new g(new me(t,n,e))}function Et(t){return typeof t}var $n=/^\s*([+-]?\d*\.?\d+)([^\s\d]*)\s*$/;function Nn(t,e){if(typeof e=="number")return e;var n=$n.exec(e);if(!n||!t[n[2]||""]){if(!t.catch)throw new Error('Cannot parse value "'+e+'" with provided units '+Object.keys(t).join(", "));return n?t.catch(parseFloat(n[1]),n[2]):t.catch(parseFloat(e))}return t[n[2]||""](parseFloat(n[1]))}var J=w(Nn);var Xn=/px$/,he={"transform:translateX":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[4])},"transform:translateY":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[5])},"transform:scale":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.sqrt(o*o+r*r)},"transform:rotate":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.atan2(r,o)}};function tt(t){return t.split("(")[1].split(")")[0].split(/\s*,\s*/)}function U(t,e){return window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):0}function et(t,e){if(he[t])return he[t](e);var n=U(t,e);return typeof n=="string"&&Xn.test(n)?parseFloat(n):n}var nt,ot;function Yn(){if(!nt){let t=document.documentElement.style.fontSize;document.documentElement.style.fontSize="100%",nt=et("font-size",document.documentElement),document.documentElement.style.fontSize=t||""}return nt}function Kn(){return ot||(ot=et("font-size",document.documentElement)),ot}window.addEventListener("resize",()=>{nt=void 0,ot=void 0});var C=y(Et,{number:S,string:J({em:function(t){return Yn()*t},px:function(t){return t},rem:function(t){return Kn()*t},vw:function(t){return window.innerWidth*t/100},vh:function(t){return window.innerHeight*t/100},vmin:function(t){return window.innerWidthn?o:n}n=nq.maxScrollInterval?q.maxScrollInterval:1.4*n}function it(){return ye}function xe(t){let e=T(t),n=window.getComputedStyle(t,null),o=C(n.getPropertyValue("padding-left")),r=C(n.getPropertyValue("padding-right"));return e.leftPadding=e.left+o,e.rightPadding=e.left+e.width-r,e.centrePadding=e.leftPadding+(e.width-o-r)/2,e}function Ee(t){let e=window.getComputedStyle(t,null).getPropertyValue("scroll-snap-align");return e.endsWith("start")?"left":e.endsWith("end")?"right":"centre"}function Se(t,e,n){let o=xe(t),r=T(e),i=Ee(e);t.scrollTo({top:t.scrollTop,left:t.scrollLeft+(i==="left"?r.left-o.leftPadding:i==="right"?r.right-o.rightPadding:r.left+r.width/2-o.centrePadding),behavior:n})}function Te(t,e){return Se(t,e,"smooth"),e}function I(t,e){return t.style.setProperty("scroll-behavior","auto","important"),Se(t,e,"auto"),t.style.setProperty("scroll-behavior",""),e}function Le(t,e){let{leftPadding:n,rightPadding:o,centrePadding:r}=xe(t),i=e.length,s;for(;s=e[--i];){let l=T(s);if(!l)continue;let f=Ee(s),a=l.width/2+(f==="left"?n:f==="right"?o:r);if((f==="left"?l.left:f==="right"?l.right:l.left+l.width/2)<=a)break}return s}function ke(t){return!!t.dataset.slideIndex}function Pe(t){let{scroller:e,elements:n,children:o}=t,r=Le(e,n);return ke(r)?o[r.dataset.slideIndex]:r}function Fe(t){let{scroller:e,children:n,elements:o}=t,r=Le(e,o),i;!r||(ke(r)?(i=n[r.dataset.slideIndex],I(e,i)):i=r,t.activations.push(i))}function to(t,e){t.style.setProperty("scroll-snap-type",""),e.stop()}var Oe=y((t,e)=>e.type,{pointerdown:function(t,e){return t.e0=e,t.x0=e.clientX,t.y0=e.clientY,t},pointermove:function(t,e){let n=e.clientX,o=e.clientY;if(!t.gesturing){if(Math.abs(n-t.x0)(clearTimeout(s),setTimeout(to,it()*1e3,n,a)))}return t.gesturing=!1,t.e0=void 0,t.x0=void 0,t.y0=void 0,t.pointers=void 0,t.scrollLeft0=void 0,t}});var eo=Object.assign,no={capture:!0,passive:!0};function oo(t,e){t.timer=void 0,t.stream.push(e);let n=t.times;n.length>1&&be(n),n.length=0}function Ae(t){this.element=t,this.times=[]}eo(Ae.prototype,m.prototype,{pipe:function(t){this.stream=t,this.element.addEventListener("scroll",this,no)},handleEvent:function(t){let e=t.timeStamp/1e3;this.times.push(e),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(oo,it()*1e3,this,t)},stop:function(){this.element.removeEventListener("scroll",this),m.prototype.stop.apply(this,arguments)}});function kt(t){return new g(new Ae(t))}function ro(t,e,n){let o=n.length,r=-1/0;for(;o--;){let a=T(n[o]),p=a.x+a.width;r=p>r?p:r}let i=T(e),s=getComputedStyle(t),l=C(s.paddingLeft||0),f=C(s.paddingRight||0);return l+f+r-i.x}function io(t,e,n){let o=ro(t,e,n);t.style.setProperty("--scroll-width",o+"px")}function so(t){return!t.dataset.slideIndex}var Ce={construct:function(t){let e=b("slot",{part:"slides"}),n=b("div",{class:"scroller",children:[e]}),o=b("nav",{part:"controls",children:[b("slot",{name:"controls"})]});t.append(n,o);let r=g.of().broadcast({memory:!0}),i=g.combine({host:r,elements:x("slotchange",e).map(c=>u.elements=e.assignedElements())}).broadcast({memory:!0}),s=i.map(c=>{let E=c.elements.filter(so);return Zt(u.children,E)?void 0:u.children=E}).broadcast({memory:!0,hot:!0}),l=g.of(),f=g.of(),a=f.map(c=>c.dataset.slideIndex?u.children[c.dataset.slideIndex]:c).filter(c=>u.active!==c&&Lt("slide-active",c)).map(c=>u.active=c).broadcast({memory:!0,hot:!0}),p=x("click",t).filter(fe).broadcast(),u=this[d]={clickSuppressTime:-1/0,host:this,style:window.getComputedStyle(this),elements:P,children:P,scroller:n,slides:e,controls:o,load:r,views:l,activations:f,actives:a,slotchanges:i,mutations:s,clicks:p};g.merge(i,x("resize",window)).each(c=>io(n,e,u.elements)),i.map(c=>c.elements.includes(u.active)?u.active:u.children[0]).map(c=>I(n,c)).pipe(f),g.combine({host:r,child:l}).map(c=>u.elements.includes(c.child)&&u.active!==c.child?c.child:void 0).map(c=>u.active?Te(n,c):I(n,c)).pipe(f),kt(n).filter(()=>!u.gesturing).each(c=>Fe(u)),Tt({threshold:"0.25rem",device:"mouse"},t).filter(()=>u.children.length>1).each(c=>{u.pointers=c,c.reduce(Oe,u)}),p.each(c=>{c.timeStamp-u.clickSuppressTime<120&&(c.preventDefault(),c.stopPropagation())}),x("fullscreenchange",window).each(c=>{(c.target===this||c.target.contains(this))&&I(n,u.active)}),x("focusin",this).map(c=>u.children.indexOf(c.target)!==-1?c.target:u.children.find(E=>E.contains(c.target))).pipe(l),x("keydown",this).filter(()=>document.activeElement===this||this.contains(document.activeElement)).map(y(D("keyCode"),{37:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)-1]),39:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)+1]),default:v})).pipe(l)},load:function(t){this[d].load.push(this)}};function st(t,e){function n(o,r){if(t.getState(o)!==r)return t[r?"enable":"disable"](o)}return{attribute:function(o){return n(this,o!==null)},set:function(o){return n(this,!!o)},get:function(){return t.getState(this)}}}function Pt(t,e){t.remove&&t.remove(e);let n;for(;(n=t.indexOf(e))!==-1;)t.splice(n,1);return e}var as=w(Pt,!0);var co=Object.assign;function W(t,e){this.element=t,this.definitions=e,this.tokens=[]}co(W.prototype,{contains:function(t){return this.tokens.includes(t)},add:function(){let t=arguments.length;for(;t--;){let e=arguments[t];!this.tokens.includes(e)&&this.definitions[e]&&(this.definitions[e].enable(this.element),this.tokens.push(e))}},remove:function(){let t=arguments.length;for(;t--;){let e=arguments[t];this.tokens.includes(e)&&(this.definitions[e].disable(this.element),Pt(this.tokens,e))}},supports:function(t){return!!this.definitions[t]}});var uo=Array.prototype;function lo(t,e){let n=t.tokens.slice(),o=uo.slice.apply(e),r=n.length;for(;r--;)o.includes(n[r])&&n.splice(r,1);t.remove.apply(t,n),t.add.apply(t,o)}function Ft(t){let e=Symbol("TokenList");function n(o,r){let i=o[e]||(o[e]=new W(o,t));lo(i,r.trim().split(/\s+/))}return{attribute:function(o){n(this,o||"")},set:function(o){n(this,o+"")},get:function(){return this[e]||(this[e]=new W(this,t))}}}var Ot={};G(Ot,{disable:()=>ho,enable:()=>mo,getState:()=>go});var ao=J({s:S,ms:t=>t/1e3});function po(t){let{active:e,children:n,elements:o,host:r}=t,i=o.indexOf(e),s=o[i+1]||n[0];t.autoplay.timer=null,!!s&&(r.active=s)}function fo(t){let{active:e,style:n}=t,o=ao(window.getComputedStyle(e).getPropertyValue("--slide-duration")||n.getPropertyValue("--slide-duration"));clearTimeout(t.autoplay.timer),t.autoplay.timer=setTimeout(po,o*1e3,t)}function Ie(t){clearTimeout(t.autoplay.timer),t.autoplay.timer=null}function mo(t){let e=t[d],{actives:n}=e,o=e.autoplay={},r=g.merge([!1],x("pointerenter pointerleave",t).map(s=>s.type==="pointerenter")),i=g.merge([t.contains(document.activeElement)],x("focusin focusout",t).map(y(D("type"),{focusin:s=>!0,focusout:s=>t.contains(s.relatedTarget)}))).map((s=>l=>s===l?void 0:s=l)());o.updates=g.combine({active:n,hover:r,focus:i}).each(s=>s.hover||s.focus?Ie(e):fo(e))}function ho(t){let e=t[d];Ie(e),e.autoplay.updates.stop(),e.autoplay=void 0}function go(t){return!!t[d].autoplay}var At={};G(At,{disable:()=>yo,enable:()=>vo,getState:()=>bo});function je(t,e){let n=t.cloneNode(!0);return n.dataset.slideIndex=e,n.removeAttribute("id"),n.setAttribute("aria-hidden","true"),n.tabIndex="-1",n}function wo(t){let{active:e,children:n,host:o,scroller:r}=t;if(t.loop.prepends&&(t.loop.prepends.forEach(c=>c.remove()),t.loop.appends.forEach(c=>c.remove()),t.loop.prepends=void 0,t.loop.appends=void 0),n.length<2){t.elements=t.slides.assignedElements();return}let i=o.clientWidth,s=n.map(T),l=s[1].left,f=s[s.length-2].right,a=1;for(;s[++a]&&s[a].leftf-i;);let u=n.slice(++a).map((c,E)=>je(c,a+E));o.prepend.apply(o,u),o.append.apply(o,p),t.loop.prepends=u,t.loop.appends=p,t.elements=t.slides.assignedElements(),I(r,e||n[0])}function vo(t){let e=t[d],{mutations:n}=e,o=e.loop={};o.renders=n.each(r=>wo(e))}function yo(t){let e=t[d];e.loop&&(e.loop.prepends&&e.loop.prepends.forEach(n=>n.remove()),e.loop.appends&&e.loop.appends.forEach(n=>n.remove()),e.loop.renders.stop(),e.loop=void 0)}function bo(t){return!!t[d].loop}var Ct={};G(Ct,{disable:()=>Eo,enable:()=>xo,getState:()=>So});function j(t){if(typeof t!="object"||arguments.length>1)throw new Error("delegate() now takes an object of selector:fn pairs.");let e=Object.keys(t);return function(o){let r=o.target,i=-1;for(;e[++i];){let s=r.closest(e[i]);if(s)return t[e[i]](s,...arguments)}}}function He(t,e,n,o){o===0?t.hidden=!0:t.hidden=!1,o===n.length-1?e.hidden=!0:e.hidden=!1}function xo(t){let e=t[d],{actives:n,clicks:o,slotchanges:r}=e,i=e.navigation={prev:b("button",{part:"prev-button",type:"button",name:"navigation",value:"-1",html:"Previous"}),next:b("button",{part:"next-button",type:"button",name:"navigation",value:"1",html:"Next"})};e.controls.prepend(i.prev,i.next),i.updates=g.combine({active:n,changes:r}).each(s=>He(i.prev,i.next,s.changes.elements,s.changes.elements.indexOf(s.active))),i.clicks=o.each(j({'[name="navigation"]':function(s,l){let f=parseFloat(s.value),a=e.elements.indexOf(e.active)+f,p=e.elements[a];!p||(t.active=p,He(i.prev,i.next,e.elements,a))}}))}function Eo(t){let e=t[d];e.navigation.prev.remove(),e.navigation.next.remove(),e.navigation.updates.stop(),e.navigation.clicks.stop(),e.navigation=void 0}function So(t){return!!t[d].navigation}var It={};G(It,{disable:()=>ko,enable:()=>Lo,getState:()=>Po});function Me(t,e,n){let{active:o,buttons:r,index:i}=t;if(o===n)return;i>-1&&(t.activeSpan.remove(),r.children[i].part.remove("page-button-active"));let s=e.indexOf(n);s!==-1&&(r.children[s].part.add("page-button-active"),r.children[s].append(t.activeSpan),t.index=s,t.active=n)}function To(t,e,n,o){return e.buttons&&(e.buttons.remove(),e.buttons=void 0),o.length<2||(e.buttons=b("div",{part:"pagination",children:o.map((r,i)=>b("button",{part:"page-button",type:"button",name:"pagination",value:i}))}),t.append(e.buttons)),o.length}function Lo(t){let e=t[d],{shadow:n,actives:o,clicks:r,mutations:i}=e,s=e.pagination={activeSpan:b("span",{class:"invisible",text:"(Current slide)"})};s.mutations=i.each(()=>To(e.controls,s,n,e.children)),s.updates=g.combine({active:o,children:i}).filter(l=>l.children.length>1).each(l=>Me(s,e.children,e.active)),s.clicks=r.each(j({'[name="pagination"]':function(l,f){let{host:a}=e,p=e.children,u=p[l.value];!u||(a.active=u,Me(s,p,u))}}))}function ko(t){let e=t[d];e.pagination.buttons.remove(),e.pagination.mutations.stop(),e.pagination.updates.stop(),e.pagination.clicks.stop(),e.pagination=void 0}function Po(t){return!!t[d].pagination}var jt={};G(jt,{disable:()=>Oo,enable:()=>Fo,getState:()=>Ao});var De=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled;function ct(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement}function Be(t){return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():void 0}function ut(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}function Fo(t){let e=t[d];if(!De)return;let n=e.fullscreen={button:b("button",{part:"fullscreen-button",type:"button",name:"fullscreen",html:"Open in fullscreen"})};e.controls.append(n.button),n.changes=x("fullscreenchange",t).filter(o=>ct()===t).each(o=>{n.button.part.add("fullscreen-button-active"),n.button.innerHTML="Close fullscreen",document.activeElement!==t&&(n.tabIndex=t.tabIndex,t.tabIndex<0&&(t.tabIndex=0),t.focus());let r=x("fullscreenchange",t).each(i=>{n.button.part.remove("fullscreen-button-active"),n.button.innerHTML="Open in fullscreen",t.tabIndex=n.tabIndex,n.tabIndex=void 0,r.stop()})}),n.clicks=e.clicks.each(j({'[name="fullscreen"]':(o,r)=>{let i=ct();if(i===t){ut();return}i&&ut(),Be(t)}}))}function Oo(t){let e=t[d];ct()===t&&ut(),e.fullscreen.button.remove(),e.fullscreen.clicks.stop(),e.fullscreen.changes.stop(),e.fullscreen=void 0}function Ao(t){return!!t[d].fullscreen}var Ge={active:{attribute:function(t){this.active=t},set:function(t){let e=this[d],n=typeof t=="object"?t:/^\d/.test(t+"")?this.querySelector("#\\3"+(t+"")[0]+" "+(t+"").slice(1)):/^\#/.test(t+"")?this.querySelector(t):this.querySelector("#"+t);e.views.push(n)},get:function(){return this[d].active}},autoplay:st(Ot,"autoplay"),controls:Ft({navigation:Ct,pagination:It,fullscreen:jt}),loop:st(At,"loop")};var Co=import.meta.url.replace(/\/[^\/]*\.js/,"/slide-show-shadow.css"),Js=wt('
              ',Ce,Ge,Co);export{Js as default}; diff --git a/build/slide-show.css b/build/slide-show.css index d83e313..214b649 100644 --- a/build/slide-show.css +++ b/build/slide-show.css @@ -1,6 +1,6 @@ /* slide-show - 1.1.5 + 1.1.6 By Stephen Band - Built 2022-05-18 15:08 */ + Built 2022-05-18 15:13 */ slide-show{display:grid;position:relative;box-sizing:border-box;padding:0;grid-auto-flow:column;grid-auto-columns:100%;grid-auto-rows:min-content;align-items:center;justify-items:stretch;scroll-snap-type:x mandatory;scroll-snap-stop:always;-webkit-scroll-behavior:smooth;scroll-behavior:smooth;overscroll-behavior-x:contain;-ms-overflow-style:none;scrollbar-width:none;padding-left:var(--padding-left, 0);padding-right:var(--padding-right, 0);scroll-padding-left:var(--padding-left, 0);scroll-padding-right:var(--padding-right, 0)}slide-show:not(:defined){overflow:scroll;overflow-y:hidden}.loading slide-show{-webkit-scroll-behavior:auto;scroll-behavior:auto}slide-show::-webkit-scrollbar{display:none}slide-show:not(:defined)>[slot]{display:none}slide-show>*{scroll-snap-align:center}slide-show:-webkit-full-screen{align-content:center}slide-show:fullscreen{align-content:center} diff --git a/build/slide-show.js b/build/slide-show.js index 6297303..63ff4cd 100644 --- a/build/slide-show.js +++ b/build/slide-show.js @@ -1,7 +1,7 @@ /* slide-show - 1.1.5 + 1.1.6 By Stephen Band - Built 2022-05-18 15:08 */ + Built 2022-05-18 15:13 */ var qe=Object.defineProperty;var Mt=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var Dt=(t,e)=>{var n={};for(var o in t)We.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&Mt)for(var o of Mt(t))e.indexOf(o)<0&&$e.call(t,o)&&(n[o]=t[o]);return n};var G=(t,e)=>{for(var n in e)qe(t,n,{get:e[n],enumerable:!0})};function $(t){var e=new Map;return function(o){if(e.has(o))return e.get(o);var r=t(o);return e.set(o,r),r}}var Ne=Array.prototype;function Xe(t,e){return typeof t=="function"?t.apply(null,e):t}function Bt(t,e,n){n=n||t.length;var o=n===1?e?t:$(t):$(function(r){return Bt(function(){var i=[r];return i.push.apply(i,arguments),t.apply(null,i)},e,n-1)});return function r(i){return arguments.length===0?r:arguments.length===1?o(i):arguments.length>=n?t.apply(null,arguments):Xe(o(i),Ne.slice.call(arguments,1))}}var w=Bt;function Ye(t,e){return 1-Math.pow(1-e,t)}var Gt=w(Ye);function v(){}function at(t,e){return e(t)}function S(t){return t}var Ke=Array.prototype;function pt(){let t=arguments;return t.length?e=>Ke.reduce.call(t,at,e):S}function ft(t,e,n){return n*(e-t)+t}var Ze=window.performance,zt=window.requestAnimationFrame,Qe=window.cancelAnimationFrame;function dt(t,e,n){var o=Ze.now();function r(s){var l=(s-o)/(t*1e3);l<1?(l>0&&e(l),i=zt(r)):(e(1),n&&n())}var i=zt(r);return function(){Qe(i)}}function N(t,e,n,o,r,i){let s=o[n];return dt(t,pt(e,l=>ft(s,r,l),l=>o[n]=l),i)}function Je(){return{x:0,y:0,left:0,top:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}}function T(t){return t===window?Je():t.getClientRects()[0]||t.getBoundingClientRect()}var H={scrollDuration:.3,scrollDurationPerHeight:.125,scrollTransform:Gt(3)},_t=v;function tn(t,e){if(e.behavior==="smooth"){let n=t.style.getPropertyValue("scroll-snap-type"),o=()=>t.style.setProperty("scroll-snap-type",n);if(t.style.setProperty("scroll-snap-type","none"),e.left!==void 0){let r=t===document.body?window.innerWidth:T(t).width,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.left-t.scrollLeft)/r;_t=N(i,H.scrollTransform,"scrollLeft",t,e.left,o)}else{let r=t===document.body?window.innerHeight:T(t).height,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.top-t.scrollTop)/r;_t=N(i,H.scrollTransform,"scrollTop",t,e.top,o)}}else e.left!==void 0&&(t.scrollLeft=e.left),e.top!==void 0&&(t.scrollTop=e.top)}if(!("scrollBehavior"in document.documentElement.style)){console.log("Polyfilling Element.scrollTo(options).");let t="scrollTo"in Element.prototype?Element:HTMLElement,e=t.scrollIntoView;t.prototype.scrollTo=function(n){typeof n=="object"?tn(this,n):e.apply(this,arguments)}}function y(t,e){return function(){let o=t.apply(this,arguments),r=e[o]||e.default;if(!r)throw new Error('overload() no handler for "'+o+'"');return r.apply(this,arguments)}}var en=y(S,{is:v,tag:v,html:function(t,e,n){e.innerHTML=n},text:function(t,e,n){e.textContent=n},children:function(t,e,n){e.innerHTML="",n.forEach(o=>{e.appendChild(o)})},points:M,cx:M,cy:M,r:M,preserveAspectRatio:M,viewBox:M,default:function(t,e,n){t in e?e[t]=n:e.setAttribute(t,n)}});function M(t,e,n){e.setAttribute(t,n)}function nn(t,e){for(var n=Object.keys(e),o=n.length;o--;)en(n[o],t,e[n[o]]);return t}var mt=w(nn,!0);var on="http://www.w3.org/2000/svg",Rt=document.createElement("div");var Ut=(t,e)=>e&&typeof e;function Vt(t,e){let n=document.createRange();return n.selectNode(t),n.createContextualFragment(e)}function L(t,e){var n=document.createElementNS(on,t);return e&&(n.innerHTML=e),n}var rn=y(S,{comment:function(t,e){return document.createComment(e||"")},fragment:y(Ut,{string:function(t,e,n){if(n)return Vt(n,e);let o=document.createDocumentFragment();Rt.innerHTML=e;let r=Rt.childNodes;for(;r[0];)o.appendChild(r[0]);return o},object:function(t,e,n){let o=n?Vt(n):document.createDocumentFragment();return typeof e.length=="number"?o.append.apply(o,e):mt(o,e),o},default:()=>document.createDocumentFragment()}),text:function(t,e){return document.createTextNode(e||"")},circle:L,ellipse:L,g:L,glyph:L,image:L,line:L,rect:L,use:L,path:L,pattern:L,polygon:L,polyline:L,svg:L,default:y(Ut,{string:function(t,e){let n=document.createElement(t);return n.innerHTML=e,n},object:function(t,e){let n=document.createElement(t);return typeof e.length=="number"?n.append.apply(n,e):mt(n,e),n},default:t=>{if(typeof t!="string")throw new Error('create(tag, content) accepts only a string as tag "'+typeof t+'"');return document.createElement(t)}})}),b=rn;function ht(t,e,n){let o;typeof n!="string"&&n.input!==void 0&&n.index!==void 0&&(o=n,n=o.input.slice(n.index+n[0].length+(n.consumed||0)));let r=t.exec(n);if(!r)return;let i=e(r);return o&&(o.consumed=(o.consumed||0)+r.index+r[0].length+(r.consumed||0)),i}var fr=w(ht,!0);function sn(t,e,n){throw n.input!==void 0&&n.index!==void 0&&(n=n.input),new Error('Cannot parse string "'+n+'"')}function cn(t,e,n){let o=-1;for(;++ocn(e,n,i),o);return r===void 0?e.catch?e.catch(n,o):sn(t,e,o):r}var qt=w(un,!0);var gt=v;var k=Symbol("internals"),A=Symbol("shadow"),Wt=Object.defineProperties,ln={a:HTMLAnchorElement,dl:HTMLDListElement,p:HTMLParagraphElement,br:HTMLBRElement,fieldset:HTMLFieldSetElement,hr:HTMLHRElement,img:HTMLImageElement,li:HTMLLIElement,ol:HTMLOListElement,optgroup:HTMLOptGroupElement,q:HTMLQuoteElement,textarea:HTMLTextAreaElement,td:HTMLTableCellElement,th:HTMLTableCellElement,tr:HTMLTableRowElement,tbody:HTMLTableSectionElement,thead:HTMLTableSectionElement,tfoot:HTMLTableSectionElement,ul:HTMLUListElement},an={name:{set:function(t){return this.setAttribute("name",t)},get:function(){return this.getAttribute("name")||""}},form:{get:function(){return this[k].form}},labels:{get:function(){return this[k].labels}},validity:{get:function(){return this[k].validity}},validationMessage:{get:function(){return this[k].validationMessage}},willValidate:{get:function(){return this[k].willValidate}},checkValidity:{value:function(){return this[k].checkValidity()}},reportValidity:{value:function(){return this[k].reportValidity()}}},pn={},$t={once:!0},fn=0,Nt=!1;function dn(t){return ln[t]||window["HTML"+t[0].toUpperCase()+t.slice(1)+"Element"]||(()=>{throw new Error('Constructor not found for tag "'+t+'"')})()}var mn=qt(/^\s*?\s*$|^\s*?\s*$/,{1:(t,e)=>({name:e[1]}),2:(t,e)=>({name:e[3],tag:e[2]}),catch:function(t,e){throw new SyntaxError(`dom element() – name must be of the form 'element-name' or 'tag is="element-name"' (`+e+")")}},null);function hn(t,e){if(t.hasOwnProperty(e)){let n=t[e];delete t[e],t[e]=n}return t}function gn(t,e,n){t._initialLoad=!0;let o=t.attachShadow({mode:e.mode||"closed",delegatesFocus:e.focusable||!1});if(n){let r=b("link",{rel:"stylesheet",href:n});o.append(r)}return t[A]=o,o}function wn(t){var e;if(t.attachInternals){if(e=t.attachInternals(),e.setFormValue)return e}else e={shadowRoot:t.shadowRoot};return e.input=b("input",{type:"hidden",name:t.name}),t.appendChild(e.input),e.setFormValue=function(n){this.input.value=n},e}function vn(t){t._initialAttributes={},t._n=0}function yn(t,e,n){let o=t._initialAttributes;for(;t._nfn?gn(p,e,o||e.stylesheet):void 0,c=a.formAssociated&&wn(p);return i&&(Nt=!0),e.construct&&e.construct.call(p,u,c),l&&(vn(p),Promise.resolve(1).then(function(){Xt(p,a.observedAttributes,l)})),f&&Object.keys(f).reduce(hn,p),p}return a.prototype=Object.create(s.prototype,f),f&&f.value&&(a.formAssociated=!0,Wt(a.prototype,an),(e.enable||e.disable)&&(a.prototype.formDisabledCallback=function(p){return p?e.disable&&e.disable.call(this,this[A],this[k]):e.enable&&e.enable.call(this,this[A],this[k])}),e.reset&&(a.prototype.formResetCallback=function(){return e.reset.call(this,this[A],this[k])}),e.restore&&(a.prototype.formStateRestoreCallback=function(){return e.restore.call(this,this[A],this[k])})),l&&(a.observedAttributes=Object.keys(l),a.prototype.attributeChangedCallback=function(p,u,c){if(!this._initialAttributes)return l[p].call(this,c);this._initialAttributes[p]=c,yn(this,a.observedAttributes,l)}),a.prototype.connectedCallback=function(){let p=this,u=p[A],c=p[k];if(p._initialAttributes&&Xt(p,a.observedAttributes,l),p._initialLoad){let E=u.querySelectorAll('link[rel="stylesheet"]');if(E.length){let ze=0,lt=E.length,Ht=function(Ue){++ze>=E.length&&(delete p._initialLoad,e.load&&(gt("element()","loaded",Array.from(E).map(Ve=>Ve.href).join(` `)),e.load.call(p,u)))},_e=Ht;for(;lt--;)E[lt].addEventListener("load",Ht,$t),E[lt].addEventListener("error",_e,$t);e.connect&&e.connect.call(this,u,c)}else e.connect&&e.connect.call(this,u,c),e.load&&e.load.call(this,u,c)}else e.connect&&e.connect.call(this,u,c)},e.disconnect&&(a.prototype.disconnectedCallback=function(){return e.disconnect.call(this,this[A],this[k])}),gt("element()","<"+(i?i+" is="+r:r)+">"),window.customElements.define(r,a,i&&{extends:i}),i&&!Nt&&document.querySelectorAll('[is="'+r+'"]').forEach(p=>{Wt(p,f),e.construct&&e.construct.apply(p);let u;for(u in l){let c=p.attributes[u];c&&l[u].call(p,c.value)}e.connect&&e.connect.apply(p)}),a}function Kt(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object")return!1;let n=Object.keys(t),o=Object.keys(e),r=n.length;for(;r--;){if(t[n[r]]===void 0){if(e[n[r]]!==void 0)return!1}else if(!e.hasOwnProperty(n[r])||!Kt(t[n[r]],e[n[r]]))return!1;let i=o.indexOf(n[r]);i>-1&&o.splice(i,1)}for(r=o.length;r--;)if(e[o[r]]===void 0){if(t[o[r]]!==void 0)return!1}else return!1;return!0}var Zt=w(Kt,!0);function En(t,e){return e[t]}var D=w(En,!0);var Sn=Object.freeze;function Qt(){return this}var P=Sn({shift:v,push:v,forEach:v,join:function(){return""},map:Qt,filter:Qt,includes:function(){return!1},reduce:function(t,e){return e},length:0,each:v,pipe:S,start:v,stop:v,done:v,valueOf:function(){return null}});function vt(){return this}function yt(t){return t&&t[Symbol.iterator]}var Tn=Object.assign;function Ln(t){return t.stop?t.stop():t()}function kn(t){t.forEach(Ln),t.length=0}function B(){}Tn(B.prototype,{stop:function(){return this.stopables&&kn(this.stopables),this},done:function(e){return(this.stopables||(this.stopables=[])).push(e),this}});var Pn=Object.assign;function X(t){B.prototype.stop.apply(t);let e=-1,n;for(;n=t[++e];)t[e]=void 0,X(n)}function m(){}Pn(m.prototype,{pipe:function(t){return this[0]=t,t},stop:function(){return X(this[0]),this}});var F=Object.assign,O=Object.create;function z(t,e){e!==void 0&&t[0].push(e)}function Fn(t,e){if(t[1]){let n=-1;for(;t[++n]&&t[n]!==e;);for(;t[n++];)t[n-1]=t[n];X(e)}else t.stop()}function h(t){this.input=t}F(h.prototype,B.prototype,{push:function(t){z(this,t)},pipe:function(t){if(this[0])throw new Error("Stream: Attempt to .pipe() a unicast stream multiple times. Create a multicast stream with stream.broadcast().");return this[0]=t,this.input.pipe(this),t},map:function(t){return new Jt(this,t)},filter:function(t){return new te(this,t)},chunk:function(t){return new ne(this,t)},flatMap:function(t){return new ee(this,t)},take:function(t){return new oe(this,t)},each:function(t){return new se(this,t)},reduce:function(t,e){return new re(this,t,e)},scan:function(t,e){return new ie(this,t,e)},stop:function(){return Fn(this.input,this),this}});function Jt(t,e){this.input=t,this.fn=e}Jt.prototype=F(O(h.prototype),{push:function(e){let n=this.fn;z(this,n(e))}});function te(t,e){this.input=t,this.fn=e}te.prototype=F(O(h.prototype),{push:function(e){this.fn(e)&&z(this,e)}});function ee(t,e){this.input=t,this.fn=e}ee.prototype=F(O(h.prototype),{push:function(e){let o=this.fn(e);if(o!==void 0)if(yt(o))for(let r of o)z(this,r);else throw new Error("Stream: Cannot .flatMap() non-iterable values")}});function ne(t,e){this.input=t,this.chunk=[],typeof e=="number"?this.n=e:typeof e=="function"&&(this.fn=e)}ne.prototype=F(O(h.prototype),{fn:function(t){return t.length===this.n},push:function(e){let n=this.chunk;n.push(e),this.fn(n)&&(z(this,n),this.chunk=[])}});function oe(t,e){this.input=t,this.count=e}oe.prototype=F(O(h.prototype),{push:function(e){this[0].push(e),--this.count||this.stop()}});function re(t,e,n){return this.input=t,this.fn=e,this.value=n,this.i=0,t.pipe(this),n}re.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t,this.i++,this)}});function ie(t,e,n){this.input=t,this.fn=e,this.value=n}ie.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t),this[0].push(this.value)}});function se(t,e){this.input=t,this.push=e,t.pipe(this)}se.prototype=F(O(h.prototype),{each:null,reduce:null,pipe:null});var On=Array.prototype,An=Object.assign,Cn=Object.create;function _(t){this.buffer=t||[]}_.prototype=An(Cn(h.prototype),m.prototype,{push:function(t){t!==void 0&&this.buffer.push(t)},pipe:function(t){for(this[0]=t;this.buffer.length;)this[0].push(On.shift.apply(this.buffer));return this.buffer=this[0],t}});var In=Object.assign,jn=Object.create;function R(t,e){this.input=t,this.memory=!!(e&&e.memory),e&&e.hot&&this.pipe(P)}R.prototype=In(jn(h.prototype),{push:function(t){if(t!==void 0){this.memory&&(this.value=t);let e=-1;for(;this[++e];)this[e].push(t)}},pipe:function(t){let e=-1;for(;this[++e];);return this[e]=t,this.value!==void 0&&t.push(this.value),e===0&&this.input.pipe(this),t}});var Hn=Object.assign;function Y(t){this.promise=t}Hn(Y.prototype,m.prototype,{pipe:function(t){let e=this.promise;this[0]=t,e.then(n=>this[0].push(n)).finally(n=>this.stop())},stop:function(){m.prototype.stop.apply(this,arguments),this[0]=P}});var ue=Object.assign,le=Object.keys;function ce(t,e,n){let o=t.values,r=t.names,i=t[0];o[e]=n,(t.active||(t.active=le(o).length===r.length))&&i.push(ue({},o))}function K(t){this.inputs=t,this.active=!1}ue(K.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this.values={},this.names=le(e),this[0]=t;for(let n in e){let o=e[n];o.pipe?t.done(o.each(r=>ce(this,n,r))):o.then?o.then(r=>ce(this,n,r)):console.log("Todo: combine() raw values ?")}}});var Mn=Object.assign;function Z(t){this.inputs=t}Mn(Z.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this[0]=t;let n=-1,o;for(;o=e[++n];)if(o.pipe)o.pipe(t);else if(o.then)o.then(r=>t.push(r));else{let r=-1;for(;++r0}function Gn(t,e,n){return t[n]=e.shift(),t}function zn(t){return[]}function bt(t,e,n,o){n.push(o),e.every(Bn)&&t.push(e.reduce(Gn,{}))}function Q(t){this.inputs=t,this.buffers=xt.map.call(t,zn)}Dn(Q.prototype,m.prototype,{pipe:function(t){let e=this.inputs,n=this.buffers;this[0]=t,xt.forEach.call(e,(o,r)=>{let i=n[r];o.each?t.done(o.each(s=>bt(t,n,i,s))):o.then?o.then(s=>bt(t,n,i,s)):xt.forEach.call(o,s=>bt(t,n,i,s))})},stop:function(){let t=this.inputs,e=-1,n;for(;n=t[++e];)n.stop();return m.prototype.stop.apply(this,arguments)}});var _n=Array.prototype,ae=Object.assign;function Rn(t){throw new TypeError("Stream: invalid source object cannot be read into stream")}var g=ae(h,{of:function(){return new _(_n.slice.apply(arguments))},from:function(t){return t.pipe?new h(t):t.then?new h(new Y(t)):typeof t.length=="number"?new _(t):Rn(t)},broadcast:function(e){return new R(P,e)},combine:function(e){return new h(new K(e))},merge:function(){return new h(new Z(arguments))},zip:function(){return new h(new Q(arguments))}});ae(h.prototype,{log:vt,broadcast:function(t){return new R(this,t)}});var Un=Object.assign,Vn=/\s+/,pe={fullscreenchange:"fullscreenElement"in document?"fullscreenchange":"webkitFullscreenElement"in document?"webkitfullscreenchange":"fullscreenchange"};function fe(t){return t.which===1&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}var de=0;window.addEventListener("click",t=>de=t.timeStamp);function qn(t,e){return t.node.addEventListener(pe[e]||e,t,t.options),t}function Wn(t,e){return t.node.removeEventListener(pe[e]||e,t),t}function me(t,e,n){this.types=t.split(Vn),this.options=e,this.node=n,this.select=e&&e.select}Un(me.prototype,m.prototype,{pipe:function(t){this[0]=t,this.types.reduce(qn,this)},handleEvent:function(t){if(!(t.type==="click"&&t.timeStamp<=de)){if(this.select){let e=t.target.closest(this.select);if(!e)return;t.selectedTarget=e}this[0].push(t)}},stop:function(){this.types.reduce(Wn,this),m.prototype.stop.apply(this,arguments)}});function x(t,e){let n;return typeof t=="object"&&(n=t,t=n.type),new g(new me(t,n,e))}function Et(t){return typeof t}var $n=/^\s*([+-]?\d*\.?\d+)([^\s\d]*)\s*$/;function Nn(t,e){if(typeof e=="number")return e;var n=$n.exec(e);if(!n||!t[n[2]||""]){if(!t.catch)throw new Error('Cannot parse value "'+e+'" with provided units '+Object.keys(t).join(", "));return n?t.catch(parseFloat(n[1]),n[2]):t.catch(parseFloat(e))}return t[n[2]||""](parseFloat(n[1]))}var J=w(Nn);var Xn=/px$/,he={"transform:translateX":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[4])},"transform:translateY":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[5])},"transform:scale":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.sqrt(o*o+r*r)},"transform:rotate":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.atan2(r,o)}};function tt(t){return t.split("(")[1].split(")")[0].split(/\s*,\s*/)}function U(t,e){return window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):0}function et(t,e){if(he[t])return he[t](e);var n=U(t,e);return typeof n=="string"&&Xn.test(n)?parseFloat(n):n}var nt,ot;function Yn(){if(!nt){let t=document.documentElement.style.fontSize;document.documentElement.style.fontSize="100%",nt=et("font-size",document.documentElement),document.documentElement.style.fontSize=t||""}return nt}function Kn(){return ot||(ot=et("font-size",document.documentElement)),ot}window.addEventListener("resize",()=>{nt=void 0,ot=void 0});var C=y(Et,{number:S,string:J({em:function(t){return Yn()*t},px:function(t){return t},rem:function(t){return Kn()*t},vw:function(t){return window.innerWidth*t/100},vh:function(t){return window.innerHeight*t/100},vmin:function(t){return window.innerWidthn?o:n}n=nq.maxScrollInterval?q.maxScrollInterval:1.4*n}function it(){return ye}function xe(t){let e=T(t),n=window.getComputedStyle(t,null),o=C(n.getPropertyValue("padding-left")),r=C(n.getPropertyValue("padding-right"));return e.leftPadding=e.left+o,e.rightPadding=e.left+e.width-r,e.centrePadding=e.leftPadding+(e.width-o-r)/2,e}function Ee(t){let e=window.getComputedStyle(t,null).getPropertyValue("scroll-snap-align");return e.endsWith("start")?"left":e.endsWith("end")?"right":"centre"}function Se(t,e,n){let o=xe(t),r=T(e),i=Ee(e);t.scrollTo({top:t.scrollTop,left:t.scrollLeft+(i==="left"?r.left-o.leftPadding:i==="right"?r.right-o.rightPadding:r.left+r.width/2-o.centrePadding),behavior:n})}function Te(t,e){return Se(t,e,"smooth"),e}function I(t,e){return t.style.setProperty("scroll-behavior","auto","important"),Se(t,e,"auto"),t.style.setProperty("scroll-behavior",""),e}function Le(t,e){let{leftPadding:n,rightPadding:o,centrePadding:r}=xe(t),i=e.length,s;for(;s=e[--i];){let l=T(s);if(!l)continue;let f=Ee(s),a=l.width/2+(f==="left"?n:f==="right"?o:r);if((f==="left"?l.left:f==="right"?l.right:l.left+l.width/2)<=a)break}return s}function ke(t){return!!t.dataset.slideIndex}function Pe(t){let{scroller:e,elements:n,children:o}=t,r=Le(e,n);return ke(r)?o[r.dataset.slideIndex]:r}function Fe(t){let{scroller:e,children:n,elements:o}=t,r=Le(e,o),i;!r||(ke(r)?(i=n[r.dataset.slideIndex],I(e,i)):i=r,t.activations.push(i))}function to(t,e){t.style.setProperty("scroll-snap-type",""),e.stop()}var Oe=y((t,e)=>e.type,{pointerdown:function(t,e){return t.e0=e,t.x0=e.clientX,t.y0=e.clientY,t},pointermove:function(t,e){let n=e.clientX,o=e.clientY;if(!t.gesturing){if(Math.abs(n-t.x0)(clearTimeout(s),setTimeout(to,it()*1e3,n,a)))}return t.gesturing=!1,t.e0=void 0,t.x0=void 0,t.y0=void 0,t.pointers=void 0,t.scrollLeft0=void 0,t}});var eo=Object.assign,no={capture:!0,passive:!0};function oo(t,e){t.timer=void 0,t.stream.push(e);let n=t.times;n.length>1&&be(n),n.length=0}function Ae(t){this.element=t,this.times=[]}eo(Ae.prototype,m.prototype,{pipe:function(t){this.stream=t,this.element.addEventListener("scroll",this,no)},handleEvent:function(t){let e=t.timeStamp/1e3;this.times.push(e),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(oo,it()*1e3,this,t)},stop:function(){this.element.removeEventListener("scroll",this),m.prototype.stop.apply(this,arguments)}});function kt(t){return new g(new Ae(t))}function ro(t,e,n){let o=n.length,r=-1/0;for(;o--;){let a=T(n[o]),p=a.x+a.width;r=p>r?p:r}let i=T(e),s=getComputedStyle(t),l=C(s.paddingLeft||0),f=C(s.paddingRight||0);return l+f+r-i.x}function io(t,e,n){let o=ro(t,e,n);t.style.setProperty("--scroll-width",o+"px")}function so(t){return!t.dataset.slideIndex}var Ce={construct:function(t){let e=b("slot",{part:"slides"}),n=b("div",{class:"scroller",children:[e]}),o=b("nav",{part:"controls",children:[b("slot",{name:"controls"})]});t.append(n,o);let r=g.of().broadcast({memory:!0}),i=g.combine({host:r,elements:x("slotchange",e).map(c=>u.elements=e.assignedElements())}).broadcast({memory:!0}),s=i.map(c=>{let E=c.elements.filter(so);return Zt(u.children,E)?void 0:u.children=E}).broadcast({memory:!0,hot:!0}),l=g.of(),f=g.of(),a=f.map(c=>c.dataset.slideIndex?u.children[c.dataset.slideIndex]:c).filter(c=>u.active!==c&&Lt("slide-active",c)).map(c=>u.active=c).broadcast({memory:!0,hot:!0}),p=x("click",t).filter(fe).broadcast(),u=this[d]={clickSuppressTime:-1/0,host:this,style:window.getComputedStyle(this),elements:P,children:P,scroller:n,slides:e,controls:o,load:r,views:l,activations:f,actives:a,slotchanges:i,mutations:s,clicks:p};g.merge(i,x("resize",window)).each(c=>io(n,e,u.elements)),i.map(c=>c.elements.includes(u.active)?u.active:u.children[0]).map(c=>I(n,c)).pipe(f),g.combine({host:r,child:l}).map(c=>u.elements.includes(c.child)&&u.active!==c.child?c.child:void 0).map(c=>u.active?Te(n,c):I(n,c)).pipe(f),kt(n).filter(()=>!u.gesturing).each(c=>Fe(u)),Tt({threshold:"0.25rem",device:"mouse"},t).filter(()=>u.children.length>1).each(c=>{u.pointers=c,c.reduce(Oe,u)}),p.each(c=>{c.timeStamp-u.clickSuppressTime<120&&(c.preventDefault(),c.stopPropagation())}),x("fullscreenchange",window).each(c=>{(c.target===this||c.target.contains(this))&&I(n,u.active)}),x("focusin",this).map(c=>u.children.indexOf(c.target)!==-1?c.target:u.children.find(E=>E.contains(c.target))).pipe(l),x("keydown",this).filter(()=>document.activeElement===this||this.contains(document.activeElement)).map(y(D("keyCode"),{37:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)-1]),39:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)+1]),default:v})).pipe(l)},load:function(t){this[d].load.push(this)}};function st(t,e){function n(o,r){if(t.getState(o)!==r)return t[r?"enable":"disable"](o)}return{attribute:function(o){return n(this,o!==null)},set:function(o){return n(this,!!o)},get:function(){return t.getState(this)}}}function Pt(t,e){t.remove&&t.remove(e);let n;for(;(n=t.indexOf(e))!==-1;)t.splice(n,1);return e}var as=w(Pt,!0);var co=Object.assign;function W(t,e){this.element=t,this.definitions=e,this.tokens=[]}co(W.prototype,{contains:function(t){return this.tokens.includes(t)},add:function(){let t=arguments.length;for(;t--;){let e=arguments[t];!this.tokens.includes(e)&&this.definitions[e]&&(this.definitions[e].enable(this.element),this.tokens.push(e))}},remove:function(){let t=arguments.length;for(;t--;){let e=arguments[t];this.tokens.includes(e)&&(this.definitions[e].disable(this.element),Pt(this.tokens,e))}},supports:function(t){return!!this.definitions[t]}});var uo=Array.prototype;function lo(t,e){let n=t.tokens.slice(),o=uo.slice.apply(e),r=n.length;for(;r--;)o.includes(n[r])&&n.splice(r,1);t.remove.apply(t,n),t.add.apply(t,o)}function Ft(t){let e=Symbol("TokenList");function n(o,r){let i=o[e]||(o[e]=new W(o,t));lo(i,r.trim().split(/\s+/))}return{attribute:function(o){n(this,o||"")},set:function(o){n(this,o+"")},get:function(){return this[e]||(this[e]=new W(this,t))}}}var Ot={};G(Ot,{disable:()=>ho,enable:()=>mo,getState:()=>go});var ao=J({s:S,ms:t=>t/1e3});function po(t){let{active:e,children:n,elements:o,host:r}=t,i=o.indexOf(e),s=o[i+1]||n[0];t.autoplay.timer=null,!!s&&(r.active=s)}function fo(t){let{active:e,style:n}=t,o=ao(window.getComputedStyle(e).getPropertyValue("--slide-duration")||n.getPropertyValue("--slide-duration"));clearTimeout(t.autoplay.timer),t.autoplay.timer=setTimeout(po,o*1e3,t)}function Ie(t){clearTimeout(t.autoplay.timer),t.autoplay.timer=null}function mo(t){let e=t[d],{actives:n}=e,o=e.autoplay={},r=g.merge([!1],x("pointerenter pointerleave",t).map(s=>s.type==="pointerenter")),i=g.merge([t.contains(document.activeElement)],x("focusin focusout",t).map(y(D("type"),{focusin:s=>!0,focusout:s=>t.contains(s.relatedTarget)}))).map((s=>l=>s===l?void 0:s=l)());o.updates=g.combine({active:n,hover:r,focus:i}).each(s=>s.hover||s.focus?Ie(e):fo(e))}function ho(t){let e=t[d];Ie(e),e.autoplay.updates.stop(),e.autoplay=void 0}function go(t){return!!t[d].autoplay}var At={};G(At,{disable:()=>yo,enable:()=>vo,getState:()=>bo});function je(t,e){let n=t.cloneNode(!0);return n.dataset.slideIndex=e,n.removeAttribute("id"),n.setAttribute("aria-hidden","true"),n.tabIndex="-1",n}function wo(t){let{active:e,children:n,host:o,scroller:r}=t;if(t.loop.prepends&&(t.loop.prepends.forEach(c=>c.remove()),t.loop.appends.forEach(c=>c.remove()),t.loop.prepends=void 0,t.loop.appends=void 0),n.length<2){t.elements=t.slides.assignedElements();return}let i=o.clientWidth,s=n.map(T),l=s[1].left,f=s[s.length-2].right,a=1;for(;s[++a]&&s[a].leftf-i;);let u=n.slice(++a).map((c,E)=>je(c,a+E));o.prepend.apply(o,u),o.append.apply(o,p),t.loop.prepends=u,t.loop.appends=p,t.elements=t.slides.assignedElements(),I(r,e||n[0])}function vo(t){let e=t[d],{mutations:n}=e,o=e.loop={};o.renders=n.each(r=>wo(e))}function yo(t){let e=t[d];e.loop&&(e.loop.prepends&&e.loop.prepends.forEach(n=>n.remove()),e.loop.appends&&e.loop.appends.forEach(n=>n.remove()),e.loop.renders.stop(),e.loop=void 0)}function bo(t){return!!t[d].loop}var Ct={};G(Ct,{disable:()=>Eo,enable:()=>xo,getState:()=>So});function j(t){if(typeof t!="object"||arguments.length>1)throw new Error("delegate() now takes an object of selector:fn pairs.");let e=Object.keys(t);return function(o){let r=o.target,i=-1;for(;e[++i];){let s=r.closest(e[i]);if(s)return t[e[i]](s,...arguments)}}}function He(t,e,n,o){o===0?t.hidden=!0:t.hidden=!1,o===n.length-1?e.hidden=!0:e.hidden=!1}function xo(t){let e=t[d],{actives:n,clicks:o,slotchanges:r}=e,i=e.navigation={prev:b("button",{part:"prev-button",type:"button",name:"navigation",value:"-1",html:"Previous"}),next:b("button",{part:"next-button",type:"button",name:"navigation",value:"1",html:"Next"})};e.controls.prepend(i.prev,i.next),i.updates=g.combine({active:n,changes:r}).each(s=>He(i.prev,i.next,s.changes.elements,s.changes.elements.indexOf(s.active))),i.clicks=o.each(j({'[name="navigation"]':function(s,l){let f=parseFloat(s.value),a=e.elements.indexOf(e.active)+f,p=e.elements[a];!p||(t.active=p,He(i.prev,i.next,e.elements,a))}}))}function Eo(t){let e=t[d];e.navigation.prev.remove(),e.navigation.next.remove(),e.navigation.updates.stop(),e.navigation.clicks.stop(),e.navigation=void 0}function So(t){return!!t[d].navigation}var It={};G(It,{disable:()=>ko,enable:()=>Lo,getState:()=>Po});function Me(t,e,n){let{active:o,buttons:r,index:i}=t;if(o===n)return;i>-1&&(t.activeSpan.remove(),r.children[i].part.remove("page-button-active"));let s=e.indexOf(n);s!==-1&&(r.children[s].part.add("page-button-active"),r.children[s].append(t.activeSpan),t.index=s,t.active=n)}function To(t,e,n,o){return e.buttons&&(e.buttons.remove(),e.buttons=void 0),o.length<2||(e.buttons=b("div",{part:"pagination",children:o.map((r,i)=>b("button",{part:"page-button",type:"button",name:"pagination",value:i}))}),t.append(e.buttons)),o.length}function Lo(t){let e=t[d],{shadow:n,actives:o,clicks:r,mutations:i}=e,s=e.pagination={activeSpan:b("span",{class:"invisible",text:"(Current slide)"})};s.mutations=i.each(()=>To(e.controls,s,n,e.children)),s.updates=g.combine({active:o,children:i}).filter(l=>l.children.length>1).each(l=>Me(s,e.children,e.active)),s.clicks=r.each(j({'[name="pagination"]':function(l,f){let{host:a}=e,p=e.children,u=p[l.value];!u||(a.active=u,Me(s,p,u))}}))}function ko(t){let e=t[d];e.pagination.buttons.remove(),e.pagination.mutations.stop(),e.pagination.updates.stop(),e.pagination.clicks.stop(),e.pagination=void 0}function Po(t){return!!t[d].pagination}var jt={};G(jt,{disable:()=>Oo,enable:()=>Fo,getState:()=>Ao});var De=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled;function ct(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement}function Be(t){return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():void 0}function ut(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}function Fo(t){let e=t[d];if(!De)return;let n=e.fullscreen={button:b("button",{part:"fullscreen-button",type:"button",name:"fullscreen",html:"Open in fullscreen"})};e.controls.append(n.button),n.changes=x("fullscreenchange",t).filter(o=>ct()===t).each(o=>{n.button.part.add("fullscreen-button-active"),n.button.innerHTML="Close fullscreen",document.activeElement!==t&&(n.tabIndex=t.tabIndex,t.tabIndex<0&&(t.tabIndex=0),t.focus());let r=x("fullscreenchange",t).each(i=>{n.button.part.remove("fullscreen-button-active"),n.button.innerHTML="Open in fullscreen",t.tabIndex=n.tabIndex,n.tabIndex=void 0,r.stop()})}),n.clicks=e.clicks.each(j({'[name="fullscreen"]':(o,r)=>{let i=ct();if(i===t){ut();return}i&&ut(),Be(t)}}))}function Oo(t){let e=t[d];ct()===t&&ut(),e.fullscreen.button.remove(),e.fullscreen.clicks.stop(),e.fullscreen.changes.stop(),e.fullscreen=void 0}function Ao(t){return!!t[d].fullscreen}var Ge={active:{attribute:function(t){this.active=t},set:function(t){let e=this[d],n=typeof t=="object"?t:/^\d/.test(t+"")?this.querySelector("#\\3"+(t+"")[0]+" "+(t+"").slice(1)):/^\#/.test(t+"")?this.querySelector(t):this.querySelector("#"+t);e.views.push(n)},get:function(){return this[d].active}},autoplay:st(Ot,"autoplay"),controls:Ft({navigation:Ct,pagination:It,fullscreen:jt}),loop:st(At,"loop")};var Co=import.meta.url.replace(/\/[^\/]*\.js/,"/slide-show-shadow.css"),Js=wt("slide-show",Ce,Ge,Co);window.console&&window.console.log("%c%c registered (documentation at %chttps://stephen.band/slide-show/%c)","color: #3a8ab0; font-weight: 600;","color: #888888; font-weight: 400;","color: inherit; font-weight: 400;","color: #888888; font-weight: 400;");export{Js as default}; diff --git a/package.json b/package.json index 17b6217..86f75c9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "title": "slide-show", "name": "@stephband/slide-show", - "version": "1.1.5", + "version": "1.1.6", "description": "The accessible, scrollable, styleable, horizontal carousel custom element. No dependencies, about 12kB minified and gzipped.", "keywords": ["carousel", "slider", "slide", "slideshow", "gallery", "scroll", "web", "component", "custom", "element"], "author": { diff --git a/test/2-slide-show.html b/test/2-slide-show.html index 05d2c92..f8d728e 100644 --- a/test/2-slide-show.html +++ b/test/2-slide-show.html @@ -157,12 +157,12 @@ // ----- - test(0, 'create slide-show, no children', (done) => { + test(0, 'create with no children', (done) => { const show = document.createElement('slide-show'); done(show); }); - test(0, 'append slide-show', (done, show) => { + test(0, 'append to body', (done, show) => { const listener = (e) => { throw new Error('SHOULD NOT HAPPEN'); }; @@ -198,7 +198,7 @@ show.append(showImg0); }); - test(0.2, 'remove slide-show', (done, show) => { + test(0.2, 'remove ', (done, show) => { show.remove(); done(show); }); @@ -206,7 +206,7 @@ // ----- - test(0, 'create slide-show, 5 children', (done) => { + test(0, 'create with 5 children', (done) => { const assign = Object.assign; const show = document.createElement('slide-show'); @@ -227,7 +227,7 @@ done(show); }); - test(0, 'append slide-show', (done, show) => { + test(0, 'append to body', (done, show) => { show.children[0].addEventListener('slide-active', (e) => { done(show); }); @@ -235,7 +235,7 @@ document.body.append(show); }); - test(0.5, 'remove slide-show child', (done, show) => { + test(0.5, 'remove child', (done, show) => { show.children[1].addEventListener('slide-active', (e) => { done(show); }); @@ -257,12 +257,13 @@ show.active = show.children[1]; done(show); }); - - test(0.2, 'remove slide-show', (done, show) => { +/* + test(0.2, 'remove ', (done, show) => { // Here we are removing it mid-scroll show.remove(); done(show); }); +*/ From e84feb4298d5e2be4a999b5b3b885114eedee20c Mon Sep 17 00:00:00 2001 From: Stephen Date: Thu, 19 May 2022 13:51:35 +0200 Subject: [PATCH 3/6] Bug test --- modules/active.js | 10 ++++++++ modules/lifecycle.js | 53 ++++++++++++++++++++++++++++++++---------- test/2-slide-show.html | 43 ++++++++++++++++++++++++++++++++-- 3 files changed, 92 insertions(+), 14 deletions(-) diff --git a/modules/active.js b/modules/active.js index 3a8bf21..656a83a 100644 --- a/modules/active.js +++ b/modules/active.js @@ -39,6 +39,16 @@ function scrollToTarget(scroller, target, behavior) { const targetBox = rect(target); const snap = getSnapX(target); +console.log(target, targetBox, target.previousElementSibling && rect(target.previousElementSibling), { + top: scroller.scrollTop, + left: scroller.scrollLeft + ( + snap === 'left' ? targetBox.left - scrollerBox.leftPadding : + snap === 'right' ? targetBox.right - scrollerBox.rightPadding : + targetBox.left + (targetBox.width / 2) - scrollerBox.centrePadding + ), + behavior: behavior + }); + // Move scroll position to target slide, taking into account // scroll-snap-align of the slide scroller.scrollTo({ diff --git a/modules/lifecycle.js b/modules/lifecycle.js index 7ba5aba..5281997 100644 --- a/modules/lifecycle.js +++ b/modules/lifecycle.js @@ -56,7 +56,7 @@ Emitted by a slide when it is brought into scroll-snap alignment. export default { construct: function(shadow) { // Shadow DOM - const slides = create('slot', { part: 'slides' }); + const slides = create('slot', { part: 'slides', style: 'display: grid;' }); const scroller = create('div', { class: 'scroller', children: [slides] }); const controls = create('nav', { part: 'controls', children: [ create('slot', { name: 'controls' }) @@ -66,7 +66,8 @@ export default { shadow.append(scroller, controls); // Stream to push load to - const load = Stream.of().broadcast({ memory: true }); + const connects = Stream.broadcast(); + const load = Stream.broadcast(); // In Chrome and FF initial `slotchange` event is always sent before // load, but not so in Safari where either order may happen (at a guess @@ -112,6 +113,7 @@ export default { // Private data const data = this[$data] = { clickSuppressTime: -Infinity, + connected: false, host: this, style: window.getComputedStyle(this), elements: nothing, @@ -119,6 +121,7 @@ export default { scroller, slides, controls, + connects, load, views, activations, @@ -133,13 +136,19 @@ export default { .merge(slotchanges, events('resize', window)) .each((e) => updateWidth(scroller, slides, data.elements)); - // Wait for fist slotchange/load, then maintain active position - slotchanges - .map((state) => (state.elements.includes(data.active) ? + // Wait for fist slotchange/load, then maintain active position. In + // Chrome this fails on connect, as it appears the style is not applied + // immediately, so jumpTo() can't measure positions properly. + Stream + .combine({ slotchanges, connects }) + .map((state) => (data.elements.includes(data.active) ? data.active : data.children[0] )) - .map((child) => jumpTo(scroller, child)) + .map((child) => (data.connected ? + jumpTo(scroller, child) : + child + )) .pipe(activations); // On change of .active view, check it is a child element that is not @@ -150,17 +159,20 @@ export default { state.child : undefined )) - .map((child) => (data.active ? - // This is a activation, scroll to the new active child - scrollTo(scroller, child) : - // If active is not yet defined jump to the newly active child - jumpTo(scroller, child) + .map((child) => (data.connected ? + data.active ? + // This is a activation, scroll to the new active child + scrollTo(scroller, child) : + // If active is not yet defined jump to the newly active child + jumpTo(scroller, child) : + // If not connected pass the child through + child )) .pipe(activations); // Update active when scroll comes to rest, but not mid-gesture. scrollends(scroller) - .filter(() => !data.gesturing) + .filter((e) => (data.connected && !data.gesturing)) .each((e) => updateActive(data)); // Enable single finger scroll on mouse devices. Dodgy idea in my @@ -228,10 +240,27 @@ export default { default: noop })) .pipe(views); + + // Neuter streams intended as push-only, just as a sanity check + if (window.DEBUG) { + load.pipe = null; + } }, load: function (shadow) { const data = this[$data]; data.load.push(this); + }, + + connect: function(shadow) { + const data = this[$data]; + data.connected = true; + data.connects.push(true); + }, + + disconnect: function(shadow) { + const data = this[$data]; + data.connected = false; + //data.connects.push(false); } }; diff --git a/test/2-slide-show.html b/test/2-slide-show.html index f8d728e..3a9e5c5 100644 --- a/test/2-slide-show.html +++ b/test/2-slide-show.html @@ -257,13 +257,52 @@ show.active = show.children[1]; done(show); }); -/* + test(0.2, 'remove ', (done, show) => { // Here we are removing it mid-scroll show.remove(); done(show); }); -*/ + + test(0.2, 'remove child while disconnected', (done, show) => { + //show.children[1].addEventListener('slide-active', (e) => { + // throw new Error('Should not emit events while disconnected'); + //}); + + show.children[0].remove(); + setTimeout(() => { + done(show); + }, 200); + }); + + test(0.2, 'activate child while disconnected', (done, show) => { + //show.children[1].addEventListener('slide-active', (e) => { + // throw new Error('Should not emit events while disconnected'); + //}); + + show.active = show.children[1]; + setTimeout(() => { + done(show); + }, 200); + }); + + test(0.2, 'append to document.body again', (done, show) => { + console.log(show.active); + document.body.append(show); + + // In FF we don't need to wait any frames, its visible immediately + requestAnimationFrame(() => { + requestAnimationFrame(() => { + // In Safari its visible now + // In Chrome it's visible but style has not been applied + requestAnimationFrame(() => { + // In Chrome it's all right now + window.confirm('Is picture of rocks visible?') && done(show); + }) + }) + }); + }); + From 98043f00f53da2ce2cc278a1392bedd3e7a71592 Mon Sep 17 00:00:00 2001 From: Stephen Date: Thu, 19 May 2022 13:56:21 +0200 Subject: [PATCH 4/6] Fixes #15 --- modules/active.js | 10 ---------- test/2-slide-show.html | 20 +++++++++++--------- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/modules/active.js b/modules/active.js index 656a83a..3a8bf21 100644 --- a/modules/active.js +++ b/modules/active.js @@ -39,16 +39,6 @@ function scrollToTarget(scroller, target, behavior) { const targetBox = rect(target); const snap = getSnapX(target); -console.log(target, targetBox, target.previousElementSibling && rect(target.previousElementSibling), { - top: scroller.scrollTop, - left: scroller.scrollLeft + ( - snap === 'left' ? targetBox.left - scrollerBox.leftPadding : - snap === 'right' ? targetBox.right - scrollerBox.rightPadding : - targetBox.left + (targetBox.width / 2) - scrollerBox.centrePadding - ), - behavior: behavior - }); - // Move scroll position to target slide, taking into account // scroll-snap-align of the slide scroller.scrollTo({ diff --git a/test/2-slide-show.html b/test/2-slide-show.html index 3a9e5c5..e2e4d71 100644 --- a/test/2-slide-show.html +++ b/test/2-slide-show.html @@ -287,20 +287,22 @@ }); test(0.2, 'append to document.body again', (done, show) => { - console.log(show.active); document.body.append(show); // In FF we don't need to wait any frames, its visible immediately - requestAnimationFrame(() => { - requestAnimationFrame(() => { + requestAnimationFrame(() => + requestAnimationFrame(() => // In Safari its visible now // In Chrome it's visible but style has not been applied - requestAnimationFrame(() => { - // In Chrome it's all right now - window.confirm('Is picture of rocks visible?') && done(show); - }) - }) - }); + requestAnimationFrame(() => + // In Chrome it's all right now. Probably. Sometimes it + // needs one more. + requestAnimationFrame(() => { + window.confirm('Is picture of rocks visible?') && done(show); + }) + ) + ) + ); }); From 505c404ff1fada87658eef6a985320e34946039b Mon Sep 17 00:00:00 2001 From: Stephen Date: Thu, 19 May 2022 15:21:52 +0200 Subject: [PATCH 5/6] Fixes #13 --- build/slide-show-figure.js | 6 +++--- build/slide-show-ol.js | 6 +++--- build/slide-show-shadow.css | 2 +- build/slide-show-ul.js | 6 +++--- build/slide-show.css | 2 +- build/slide-show.js | 6 +++--- modules/active.js | 4 +++- modules/lifecycle.js | 2 ++ modules/test.js | 43 ++++++++++++++++++++++++++----------- test/2-slide-show.html | 13 +++++------ 10 files changed, 57 insertions(+), 33 deletions(-) diff --git a/build/slide-show-figure.js b/build/slide-show-figure.js index 339ba5c..e1f8faf 100644 --- a/build/slide-show-figure.js +++ b/build/slide-show-figure.js @@ -1,7 +1,7 @@ /* slide-show 1.1.6 By Stephen Band - Built 2022-05-18 15:13 */ + Built 2022-05-19 13:21 */ -var qe=Object.defineProperty;var Mt=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var Dt=(t,e)=>{var n={};for(var o in t)We.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&Mt)for(var o of Mt(t))e.indexOf(o)<0&&$e.call(t,o)&&(n[o]=t[o]);return n};var G=(t,e)=>{for(var n in e)qe(t,n,{get:e[n],enumerable:!0})};function $(t){var e=new Map;return function(o){if(e.has(o))return e.get(o);var r=t(o);return e.set(o,r),r}}var Ne=Array.prototype;function Xe(t,e){return typeof t=="function"?t.apply(null,e):t}function Bt(t,e,n){n=n||t.length;var o=n===1?e?t:$(t):$(function(r){return Bt(function(){var i=[r];return i.push.apply(i,arguments),t.apply(null,i)},e,n-1)});return function r(i){return arguments.length===0?r:arguments.length===1?o(i):arguments.length>=n?t.apply(null,arguments):Xe(o(i),Ne.slice.call(arguments,1))}}var w=Bt;function Ye(t,e){return 1-Math.pow(1-e,t)}var Gt=w(Ye);function v(){}function at(t,e){return e(t)}function S(t){return t}var Ke=Array.prototype;function pt(){let t=arguments;return t.length?e=>Ke.reduce.call(t,at,e):S}function ft(t,e,n){return n*(e-t)+t}var Ze=window.performance,zt=window.requestAnimationFrame,Qe=window.cancelAnimationFrame;function dt(t,e,n){var o=Ze.now();function r(s){var l=(s-o)/(t*1e3);l<1?(l>0&&e(l),i=zt(r)):(e(1),n&&n())}var i=zt(r);return function(){Qe(i)}}function N(t,e,n,o,r,i){let s=o[n];return dt(t,pt(e,l=>ft(s,r,l),l=>o[n]=l),i)}function Je(){return{x:0,y:0,left:0,top:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}}function T(t){return t===window?Je():t.getClientRects()[0]||t.getBoundingClientRect()}var H={scrollDuration:.3,scrollDurationPerHeight:.125,scrollTransform:Gt(3)},_t=v;function tn(t,e){if(e.behavior==="smooth"){let n=t.style.getPropertyValue("scroll-snap-type"),o=()=>t.style.setProperty("scroll-snap-type",n);if(t.style.setProperty("scroll-snap-type","none"),e.left!==void 0){let r=t===document.body?window.innerWidth:T(t).width,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.left-t.scrollLeft)/r;_t=N(i,H.scrollTransform,"scrollLeft",t,e.left,o)}else{let r=t===document.body?window.innerHeight:T(t).height,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.top-t.scrollTop)/r;_t=N(i,H.scrollTransform,"scrollTop",t,e.top,o)}}else e.left!==void 0&&(t.scrollLeft=e.left),e.top!==void 0&&(t.scrollTop=e.top)}if(!("scrollBehavior"in document.documentElement.style)){console.log("Polyfilling Element.scrollTo(options).");let t="scrollTo"in Element.prototype?Element:HTMLElement,e=t.scrollIntoView;t.prototype.scrollTo=function(n){typeof n=="object"?tn(this,n):e.apply(this,arguments)}}function y(t,e){return function(){let o=t.apply(this,arguments),r=e[o]||e.default;if(!r)throw new Error('overload() no handler for "'+o+'"');return r.apply(this,arguments)}}var en=y(S,{is:v,tag:v,html:function(t,e,n){e.innerHTML=n},text:function(t,e,n){e.textContent=n},children:function(t,e,n){e.innerHTML="",n.forEach(o=>{e.appendChild(o)})},points:M,cx:M,cy:M,r:M,preserveAspectRatio:M,viewBox:M,default:function(t,e,n){t in e?e[t]=n:e.setAttribute(t,n)}});function M(t,e,n){e.setAttribute(t,n)}function nn(t,e){for(var n=Object.keys(e),o=n.length;o--;)en(n[o],t,e[n[o]]);return t}var mt=w(nn,!0);var on="http://www.w3.org/2000/svg",Rt=document.createElement("div");var Ut=(t,e)=>e&&typeof e;function Vt(t,e){let n=document.createRange();return n.selectNode(t),n.createContextualFragment(e)}function L(t,e){var n=document.createElementNS(on,t);return e&&(n.innerHTML=e),n}var rn=y(S,{comment:function(t,e){return document.createComment(e||"")},fragment:y(Ut,{string:function(t,e,n){if(n)return Vt(n,e);let o=document.createDocumentFragment();Rt.innerHTML=e;let r=Rt.childNodes;for(;r[0];)o.appendChild(r[0]);return o},object:function(t,e,n){let o=n?Vt(n):document.createDocumentFragment();return typeof e.length=="number"?o.append.apply(o,e):mt(o,e),o},default:()=>document.createDocumentFragment()}),text:function(t,e){return document.createTextNode(e||"")},circle:L,ellipse:L,g:L,glyph:L,image:L,line:L,rect:L,use:L,path:L,pattern:L,polygon:L,polyline:L,svg:L,default:y(Ut,{string:function(t,e){let n=document.createElement(t);return n.innerHTML=e,n},object:function(t,e){let n=document.createElement(t);return typeof e.length=="number"?n.append.apply(n,e):mt(n,e),n},default:t=>{if(typeof t!="string")throw new Error('create(tag, content) accepts only a string as tag "'+typeof t+'"');return document.createElement(t)}})}),b=rn;function ht(t,e,n){let o;typeof n!="string"&&n.input!==void 0&&n.index!==void 0&&(o=n,n=o.input.slice(n.index+n[0].length+(n.consumed||0)));let r=t.exec(n);if(!r)return;let i=e(r);return o&&(o.consumed=(o.consumed||0)+r.index+r[0].length+(r.consumed||0)),i}var fr=w(ht,!0);function sn(t,e,n){throw n.input!==void 0&&n.index!==void 0&&(n=n.input),new Error('Cannot parse string "'+n+'"')}function cn(t,e,n){let o=-1;for(;++ocn(e,n,i),o);return r===void 0?e.catch?e.catch(n,o):sn(t,e,o):r}var qt=w(un,!0);var gt=v;var k=Symbol("internals"),A=Symbol("shadow"),Wt=Object.defineProperties,ln={a:HTMLAnchorElement,dl:HTMLDListElement,p:HTMLParagraphElement,br:HTMLBRElement,fieldset:HTMLFieldSetElement,hr:HTMLHRElement,img:HTMLImageElement,li:HTMLLIElement,ol:HTMLOListElement,optgroup:HTMLOptGroupElement,q:HTMLQuoteElement,textarea:HTMLTextAreaElement,td:HTMLTableCellElement,th:HTMLTableCellElement,tr:HTMLTableRowElement,tbody:HTMLTableSectionElement,thead:HTMLTableSectionElement,tfoot:HTMLTableSectionElement,ul:HTMLUListElement},an={name:{set:function(t){return this.setAttribute("name",t)},get:function(){return this.getAttribute("name")||""}},form:{get:function(){return this[k].form}},labels:{get:function(){return this[k].labels}},validity:{get:function(){return this[k].validity}},validationMessage:{get:function(){return this[k].validationMessage}},willValidate:{get:function(){return this[k].willValidate}},checkValidity:{value:function(){return this[k].checkValidity()}},reportValidity:{value:function(){return this[k].reportValidity()}}},pn={},$t={once:!0},fn=0,Nt=!1;function dn(t){return ln[t]||window["HTML"+t[0].toUpperCase()+t.slice(1)+"Element"]||(()=>{throw new Error('Constructor not found for tag "'+t+'"')})()}var mn=qt(/^\s*?\s*$|^\s*?\s*$/,{1:(t,e)=>({name:e[1]}),2:(t,e)=>({name:e[3],tag:e[2]}),catch:function(t,e){throw new SyntaxError(`dom element() – name must be of the form 'element-name' or 'tag is="element-name"' (`+e+")")}},null);function hn(t,e){if(t.hasOwnProperty(e)){let n=t[e];delete t[e],t[e]=n}return t}function gn(t,e,n){t._initialLoad=!0;let o=t.attachShadow({mode:e.mode||"closed",delegatesFocus:e.focusable||!1});if(n){let r=b("link",{rel:"stylesheet",href:n});o.append(r)}return t[A]=o,o}function wn(t){var e;if(t.attachInternals){if(e=t.attachInternals(),e.setFormValue)return e}else e={shadowRoot:t.shadowRoot};return e.input=b("input",{type:"hidden",name:t.name}),t.appendChild(e.input),e.setFormValue=function(n){this.input.value=n},e}function vn(t){t._initialAttributes={},t._n=0}function yn(t,e,n){let o=t._initialAttributes;for(;t._nfn?gn(p,e,o||e.stylesheet):void 0,c=a.formAssociated&&wn(p);return i&&(Nt=!0),e.construct&&e.construct.call(p,u,c),l&&(vn(p),Promise.resolve(1).then(function(){Xt(p,a.observedAttributes,l)})),f&&Object.keys(f).reduce(hn,p),p}return a.prototype=Object.create(s.prototype,f),f&&f.value&&(a.formAssociated=!0,Wt(a.prototype,an),(e.enable||e.disable)&&(a.prototype.formDisabledCallback=function(p){return p?e.disable&&e.disable.call(this,this[A],this[k]):e.enable&&e.enable.call(this,this[A],this[k])}),e.reset&&(a.prototype.formResetCallback=function(){return e.reset.call(this,this[A],this[k])}),e.restore&&(a.prototype.formStateRestoreCallback=function(){return e.restore.call(this,this[A],this[k])})),l&&(a.observedAttributes=Object.keys(l),a.prototype.attributeChangedCallback=function(p,u,c){if(!this._initialAttributes)return l[p].call(this,c);this._initialAttributes[p]=c,yn(this,a.observedAttributes,l)}),a.prototype.connectedCallback=function(){let p=this,u=p[A],c=p[k];if(p._initialAttributes&&Xt(p,a.observedAttributes,l),p._initialLoad){let E=u.querySelectorAll('link[rel="stylesheet"]');if(E.length){let ze=0,lt=E.length,Ht=function(Ue){++ze>=E.length&&(delete p._initialLoad,e.load&&(gt("element()","loaded",Array.from(E).map(Ve=>Ve.href).join(` -`)),e.load.call(p,u)))},_e=Ht;for(;lt--;)E[lt].addEventListener("load",Ht,$t),E[lt].addEventListener("error",_e,$t);e.connect&&e.connect.call(this,u,c)}else e.connect&&e.connect.call(this,u,c),e.load&&e.load.call(this,u,c)}else e.connect&&e.connect.call(this,u,c)},e.disconnect&&(a.prototype.disconnectedCallback=function(){return e.disconnect.call(this,this[A],this[k])}),gt("element()","<"+(i?i+" is="+r:r)+">"),window.customElements.define(r,a,i&&{extends:i}),i&&!Nt&&document.querySelectorAll('[is="'+r+'"]').forEach(p=>{Wt(p,f),e.construct&&e.construct.apply(p);let u;for(u in l){let c=p.attributes[u];c&&l[u].call(p,c.value)}e.connect&&e.connect.apply(p)}),a}function Kt(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object")return!1;let n=Object.keys(t),o=Object.keys(e),r=n.length;for(;r--;){if(t[n[r]]===void 0){if(e[n[r]]!==void 0)return!1}else if(!e.hasOwnProperty(n[r])||!Kt(t[n[r]],e[n[r]]))return!1;let i=o.indexOf(n[r]);i>-1&&o.splice(i,1)}for(r=o.length;r--;)if(e[o[r]]===void 0){if(t[o[r]]!==void 0)return!1}else return!1;return!0}var Zt=w(Kt,!0);function En(t,e){return e[t]}var D=w(En,!0);var Sn=Object.freeze;function Qt(){return this}var P=Sn({shift:v,push:v,forEach:v,join:function(){return""},map:Qt,filter:Qt,includes:function(){return!1},reduce:function(t,e){return e},length:0,each:v,pipe:S,start:v,stop:v,done:v,valueOf:function(){return null}});function vt(){return this}function yt(t){return t&&t[Symbol.iterator]}var Tn=Object.assign;function Ln(t){return t.stop?t.stop():t()}function kn(t){t.forEach(Ln),t.length=0}function B(){}Tn(B.prototype,{stop:function(){return this.stopables&&kn(this.stopables),this},done:function(e){return(this.stopables||(this.stopables=[])).push(e),this}});var Pn=Object.assign;function X(t){B.prototype.stop.apply(t);let e=-1,n;for(;n=t[++e];)t[e]=void 0,X(n)}function m(){}Pn(m.prototype,{pipe:function(t){return this[0]=t,t},stop:function(){return X(this[0]),this}});var F=Object.assign,O=Object.create;function z(t,e){e!==void 0&&t[0].push(e)}function Fn(t,e){if(t[1]){let n=-1;for(;t[++n]&&t[n]!==e;);for(;t[n++];)t[n-1]=t[n];X(e)}else t.stop()}function h(t){this.input=t}F(h.prototype,B.prototype,{push:function(t){z(this,t)},pipe:function(t){if(this[0])throw new Error("Stream: Attempt to .pipe() a unicast stream multiple times. Create a multicast stream with stream.broadcast().");return this[0]=t,this.input.pipe(this),t},map:function(t){return new Jt(this,t)},filter:function(t){return new te(this,t)},chunk:function(t){return new ne(this,t)},flatMap:function(t){return new ee(this,t)},take:function(t){return new oe(this,t)},each:function(t){return new se(this,t)},reduce:function(t,e){return new re(this,t,e)},scan:function(t,e){return new ie(this,t,e)},stop:function(){return Fn(this.input,this),this}});function Jt(t,e){this.input=t,this.fn=e}Jt.prototype=F(O(h.prototype),{push:function(e){let n=this.fn;z(this,n(e))}});function te(t,e){this.input=t,this.fn=e}te.prototype=F(O(h.prototype),{push:function(e){this.fn(e)&&z(this,e)}});function ee(t,e){this.input=t,this.fn=e}ee.prototype=F(O(h.prototype),{push:function(e){let o=this.fn(e);if(o!==void 0)if(yt(o))for(let r of o)z(this,r);else throw new Error("Stream: Cannot .flatMap() non-iterable values")}});function ne(t,e){this.input=t,this.chunk=[],typeof e=="number"?this.n=e:typeof e=="function"&&(this.fn=e)}ne.prototype=F(O(h.prototype),{fn:function(t){return t.length===this.n},push:function(e){let n=this.chunk;n.push(e),this.fn(n)&&(z(this,n),this.chunk=[])}});function oe(t,e){this.input=t,this.count=e}oe.prototype=F(O(h.prototype),{push:function(e){this[0].push(e),--this.count||this.stop()}});function re(t,e,n){return this.input=t,this.fn=e,this.value=n,this.i=0,t.pipe(this),n}re.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t,this.i++,this)}});function ie(t,e,n){this.input=t,this.fn=e,this.value=n}ie.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t),this[0].push(this.value)}});function se(t,e){this.input=t,this.push=e,t.pipe(this)}se.prototype=F(O(h.prototype),{each:null,reduce:null,pipe:null});var On=Array.prototype,An=Object.assign,Cn=Object.create;function _(t){this.buffer=t||[]}_.prototype=An(Cn(h.prototype),m.prototype,{push:function(t){t!==void 0&&this.buffer.push(t)},pipe:function(t){for(this[0]=t;this.buffer.length;)this[0].push(On.shift.apply(this.buffer));return this.buffer=this[0],t}});var In=Object.assign,jn=Object.create;function R(t,e){this.input=t,this.memory=!!(e&&e.memory),e&&e.hot&&this.pipe(P)}R.prototype=In(jn(h.prototype),{push:function(t){if(t!==void 0){this.memory&&(this.value=t);let e=-1;for(;this[++e];)this[e].push(t)}},pipe:function(t){let e=-1;for(;this[++e];);return this[e]=t,this.value!==void 0&&t.push(this.value),e===0&&this.input.pipe(this),t}});var Hn=Object.assign;function Y(t){this.promise=t}Hn(Y.prototype,m.prototype,{pipe:function(t){let e=this.promise;this[0]=t,e.then(n=>this[0].push(n)).finally(n=>this.stop())},stop:function(){m.prototype.stop.apply(this,arguments),this[0]=P}});var ue=Object.assign,le=Object.keys;function ce(t,e,n){let o=t.values,r=t.names,i=t[0];o[e]=n,(t.active||(t.active=le(o).length===r.length))&&i.push(ue({},o))}function K(t){this.inputs=t,this.active=!1}ue(K.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this.values={},this.names=le(e),this[0]=t;for(let n in e){let o=e[n];o.pipe?t.done(o.each(r=>ce(this,n,r))):o.then?o.then(r=>ce(this,n,r)):console.log("Todo: combine() raw values ?")}}});var Mn=Object.assign;function Z(t){this.inputs=t}Mn(Z.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this[0]=t;let n=-1,o;for(;o=e[++n];)if(o.pipe)o.pipe(t);else if(o.then)o.then(r=>t.push(r));else{let r=-1;for(;++r0}function Gn(t,e,n){return t[n]=e.shift(),t}function zn(t){return[]}function bt(t,e,n,o){n.push(o),e.every(Bn)&&t.push(e.reduce(Gn,{}))}function Q(t){this.inputs=t,this.buffers=xt.map.call(t,zn)}Dn(Q.prototype,m.prototype,{pipe:function(t){let e=this.inputs,n=this.buffers;this[0]=t,xt.forEach.call(e,(o,r)=>{let i=n[r];o.each?t.done(o.each(s=>bt(t,n,i,s))):o.then?o.then(s=>bt(t,n,i,s)):xt.forEach.call(o,s=>bt(t,n,i,s))})},stop:function(){let t=this.inputs,e=-1,n;for(;n=t[++e];)n.stop();return m.prototype.stop.apply(this,arguments)}});var _n=Array.prototype,ae=Object.assign;function Rn(t){throw new TypeError("Stream: invalid source object cannot be read into stream")}var g=ae(h,{of:function(){return new _(_n.slice.apply(arguments))},from:function(t){return t.pipe?new h(t):t.then?new h(new Y(t)):typeof t.length=="number"?new _(t):Rn(t)},broadcast:function(e){return new R(P,e)},combine:function(e){return new h(new K(e))},merge:function(){return new h(new Z(arguments))},zip:function(){return new h(new Q(arguments))}});ae(h.prototype,{log:vt,broadcast:function(t){return new R(this,t)}});var Un=Object.assign,Vn=/\s+/,pe={fullscreenchange:"fullscreenElement"in document?"fullscreenchange":"webkitFullscreenElement"in document?"webkitfullscreenchange":"fullscreenchange"};function fe(t){return t.which===1&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}var de=0;window.addEventListener("click",t=>de=t.timeStamp);function qn(t,e){return t.node.addEventListener(pe[e]||e,t,t.options),t}function Wn(t,e){return t.node.removeEventListener(pe[e]||e,t),t}function me(t,e,n){this.types=t.split(Vn),this.options=e,this.node=n,this.select=e&&e.select}Un(me.prototype,m.prototype,{pipe:function(t){this[0]=t,this.types.reduce(qn,this)},handleEvent:function(t){if(!(t.type==="click"&&t.timeStamp<=de)){if(this.select){let e=t.target.closest(this.select);if(!e)return;t.selectedTarget=e}this[0].push(t)}},stop:function(){this.types.reduce(Wn,this),m.prototype.stop.apply(this,arguments)}});function x(t,e){let n;return typeof t=="object"&&(n=t,t=n.type),new g(new me(t,n,e))}function Et(t){return typeof t}var $n=/^\s*([+-]?\d*\.?\d+)([^\s\d]*)\s*$/;function Nn(t,e){if(typeof e=="number")return e;var n=$n.exec(e);if(!n||!t[n[2]||""]){if(!t.catch)throw new Error('Cannot parse value "'+e+'" with provided units '+Object.keys(t).join(", "));return n?t.catch(parseFloat(n[1]),n[2]):t.catch(parseFloat(e))}return t[n[2]||""](parseFloat(n[1]))}var J=w(Nn);var Xn=/px$/,he={"transform:translateX":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[4])},"transform:translateY":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[5])},"transform:scale":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.sqrt(o*o+r*r)},"transform:rotate":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.atan2(r,o)}};function tt(t){return t.split("(")[1].split(")")[0].split(/\s*,\s*/)}function U(t,e){return window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):0}function et(t,e){if(he[t])return he[t](e);var n=U(t,e);return typeof n=="string"&&Xn.test(n)?parseFloat(n):n}var nt,ot;function Yn(){if(!nt){let t=document.documentElement.style.fontSize;document.documentElement.style.fontSize="100%",nt=et("font-size",document.documentElement),document.documentElement.style.fontSize=t||""}return nt}function Kn(){return ot||(ot=et("font-size",document.documentElement)),ot}window.addEventListener("resize",()=>{nt=void 0,ot=void 0});var C=y(Et,{number:S,string:J({em:function(t){return Yn()*t},px:function(t){return t},rem:function(t){return Kn()*t},vw:function(t){return window.innerWidth*t/100},vh:function(t){return window.innerHeight*t/100},vmin:function(t){return window.innerWidthn?o:n}n=nq.maxScrollInterval?q.maxScrollInterval:1.4*n}function it(){return ye}function xe(t){let e=T(t),n=window.getComputedStyle(t,null),o=C(n.getPropertyValue("padding-left")),r=C(n.getPropertyValue("padding-right"));return e.leftPadding=e.left+o,e.rightPadding=e.left+e.width-r,e.centrePadding=e.leftPadding+(e.width-o-r)/2,e}function Ee(t){let e=window.getComputedStyle(t,null).getPropertyValue("scroll-snap-align");return e.endsWith("start")?"left":e.endsWith("end")?"right":"centre"}function Se(t,e,n){let o=xe(t),r=T(e),i=Ee(e);t.scrollTo({top:t.scrollTop,left:t.scrollLeft+(i==="left"?r.left-o.leftPadding:i==="right"?r.right-o.rightPadding:r.left+r.width/2-o.centrePadding),behavior:n})}function Te(t,e){return Se(t,e,"smooth"),e}function I(t,e){return t.style.setProperty("scroll-behavior","auto","important"),Se(t,e,"auto"),t.style.setProperty("scroll-behavior",""),e}function Le(t,e){let{leftPadding:n,rightPadding:o,centrePadding:r}=xe(t),i=e.length,s;for(;s=e[--i];){let l=T(s);if(!l)continue;let f=Ee(s),a=l.width/2+(f==="left"?n:f==="right"?o:r);if((f==="left"?l.left:f==="right"?l.right:l.left+l.width/2)<=a)break}return s}function ke(t){return!!t.dataset.slideIndex}function Pe(t){let{scroller:e,elements:n,children:o}=t,r=Le(e,n);return ke(r)?o[r.dataset.slideIndex]:r}function Fe(t){let{scroller:e,children:n,elements:o}=t,r=Le(e,o),i;!r||(ke(r)?(i=n[r.dataset.slideIndex],I(e,i)):i=r,t.activations.push(i))}function to(t,e){t.style.setProperty("scroll-snap-type",""),e.stop()}var Oe=y((t,e)=>e.type,{pointerdown:function(t,e){return t.e0=e,t.x0=e.clientX,t.y0=e.clientY,t},pointermove:function(t,e){let n=e.clientX,o=e.clientY;if(!t.gesturing){if(Math.abs(n-t.x0)(clearTimeout(s),setTimeout(to,it()*1e3,n,a)))}return t.gesturing=!1,t.e0=void 0,t.x0=void 0,t.y0=void 0,t.pointers=void 0,t.scrollLeft0=void 0,t}});var eo=Object.assign,no={capture:!0,passive:!0};function oo(t,e){t.timer=void 0,t.stream.push(e);let n=t.times;n.length>1&&be(n),n.length=0}function Ae(t){this.element=t,this.times=[]}eo(Ae.prototype,m.prototype,{pipe:function(t){this.stream=t,this.element.addEventListener("scroll",this,no)},handleEvent:function(t){let e=t.timeStamp/1e3;this.times.push(e),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(oo,it()*1e3,this,t)},stop:function(){this.element.removeEventListener("scroll",this),m.prototype.stop.apply(this,arguments)}});function kt(t){return new g(new Ae(t))}function ro(t,e,n){let o=n.length,r=-1/0;for(;o--;){let a=T(n[o]),p=a.x+a.width;r=p>r?p:r}let i=T(e),s=getComputedStyle(t),l=C(s.paddingLeft||0),f=C(s.paddingRight||0);return l+f+r-i.x}function io(t,e,n){let o=ro(t,e,n);t.style.setProperty("--scroll-width",o+"px")}function so(t){return!t.dataset.slideIndex}var Ce={construct:function(t){let e=b("slot",{part:"slides"}),n=b("div",{class:"scroller",children:[e]}),o=b("nav",{part:"controls",children:[b("slot",{name:"controls"})]});t.append(n,o);let r=g.of().broadcast({memory:!0}),i=g.combine({host:r,elements:x("slotchange",e).map(c=>u.elements=e.assignedElements())}).broadcast({memory:!0}),s=i.map(c=>{let E=c.elements.filter(so);return Zt(u.children,E)?void 0:u.children=E}).broadcast({memory:!0,hot:!0}),l=g.of(),f=g.of(),a=f.map(c=>c.dataset.slideIndex?u.children[c.dataset.slideIndex]:c).filter(c=>u.active!==c&&Lt("slide-active",c)).map(c=>u.active=c).broadcast({memory:!0,hot:!0}),p=x("click",t).filter(fe).broadcast(),u=this[d]={clickSuppressTime:-1/0,host:this,style:window.getComputedStyle(this),elements:P,children:P,scroller:n,slides:e,controls:o,load:r,views:l,activations:f,actives:a,slotchanges:i,mutations:s,clicks:p};g.merge(i,x("resize",window)).each(c=>io(n,e,u.elements)),i.map(c=>c.elements.includes(u.active)?u.active:u.children[0]).map(c=>I(n,c)).pipe(f),g.combine({host:r,child:l}).map(c=>u.elements.includes(c.child)&&u.active!==c.child?c.child:void 0).map(c=>u.active?Te(n,c):I(n,c)).pipe(f),kt(n).filter(()=>!u.gesturing).each(c=>Fe(u)),Tt({threshold:"0.25rem",device:"mouse"},t).filter(()=>u.children.length>1).each(c=>{u.pointers=c,c.reduce(Oe,u)}),p.each(c=>{c.timeStamp-u.clickSuppressTime<120&&(c.preventDefault(),c.stopPropagation())}),x("fullscreenchange",window).each(c=>{(c.target===this||c.target.contains(this))&&I(n,u.active)}),x("focusin",this).map(c=>u.children.indexOf(c.target)!==-1?c.target:u.children.find(E=>E.contains(c.target))).pipe(l),x("keydown",this).filter(()=>document.activeElement===this||this.contains(document.activeElement)).map(y(D("keyCode"),{37:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)-1]),39:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)+1]),default:v})).pipe(l)},load:function(t){this[d].load.push(this)}};function st(t,e){function n(o,r){if(t.getState(o)!==r)return t[r?"enable":"disable"](o)}return{attribute:function(o){return n(this,o!==null)},set:function(o){return n(this,!!o)},get:function(){return t.getState(this)}}}function Pt(t,e){t.remove&&t.remove(e);let n;for(;(n=t.indexOf(e))!==-1;)t.splice(n,1);return e}var as=w(Pt,!0);var co=Object.assign;function W(t,e){this.element=t,this.definitions=e,this.tokens=[]}co(W.prototype,{contains:function(t){return this.tokens.includes(t)},add:function(){let t=arguments.length;for(;t--;){let e=arguments[t];!this.tokens.includes(e)&&this.definitions[e]&&(this.definitions[e].enable(this.element),this.tokens.push(e))}},remove:function(){let t=arguments.length;for(;t--;){let e=arguments[t];this.tokens.includes(e)&&(this.definitions[e].disable(this.element),Pt(this.tokens,e))}},supports:function(t){return!!this.definitions[t]}});var uo=Array.prototype;function lo(t,e){let n=t.tokens.slice(),o=uo.slice.apply(e),r=n.length;for(;r--;)o.includes(n[r])&&n.splice(r,1);t.remove.apply(t,n),t.add.apply(t,o)}function Ft(t){let e=Symbol("TokenList");function n(o,r){let i=o[e]||(o[e]=new W(o,t));lo(i,r.trim().split(/\s+/))}return{attribute:function(o){n(this,o||"")},set:function(o){n(this,o+"")},get:function(){return this[e]||(this[e]=new W(this,t))}}}var Ot={};G(Ot,{disable:()=>ho,enable:()=>mo,getState:()=>go});var ao=J({s:S,ms:t=>t/1e3});function po(t){let{active:e,children:n,elements:o,host:r}=t,i=o.indexOf(e),s=o[i+1]||n[0];t.autoplay.timer=null,!!s&&(r.active=s)}function fo(t){let{active:e,style:n}=t,o=ao(window.getComputedStyle(e).getPropertyValue("--slide-duration")||n.getPropertyValue("--slide-duration"));clearTimeout(t.autoplay.timer),t.autoplay.timer=setTimeout(po,o*1e3,t)}function Ie(t){clearTimeout(t.autoplay.timer),t.autoplay.timer=null}function mo(t){let e=t[d],{actives:n}=e,o=e.autoplay={},r=g.merge([!1],x("pointerenter pointerleave",t).map(s=>s.type==="pointerenter")),i=g.merge([t.contains(document.activeElement)],x("focusin focusout",t).map(y(D("type"),{focusin:s=>!0,focusout:s=>t.contains(s.relatedTarget)}))).map((s=>l=>s===l?void 0:s=l)());o.updates=g.combine({active:n,hover:r,focus:i}).each(s=>s.hover||s.focus?Ie(e):fo(e))}function ho(t){let e=t[d];Ie(e),e.autoplay.updates.stop(),e.autoplay=void 0}function go(t){return!!t[d].autoplay}var At={};G(At,{disable:()=>yo,enable:()=>vo,getState:()=>bo});function je(t,e){let n=t.cloneNode(!0);return n.dataset.slideIndex=e,n.removeAttribute("id"),n.setAttribute("aria-hidden","true"),n.tabIndex="-1",n}function wo(t){let{active:e,children:n,host:o,scroller:r}=t;if(t.loop.prepends&&(t.loop.prepends.forEach(c=>c.remove()),t.loop.appends.forEach(c=>c.remove()),t.loop.prepends=void 0,t.loop.appends=void 0),n.length<2){t.elements=t.slides.assignedElements();return}let i=o.clientWidth,s=n.map(T),l=s[1].left,f=s[s.length-2].right,a=1;for(;s[++a]&&s[a].leftf-i;);let u=n.slice(++a).map((c,E)=>je(c,a+E));o.prepend.apply(o,u),o.append.apply(o,p),t.loop.prepends=u,t.loop.appends=p,t.elements=t.slides.assignedElements(),I(r,e||n[0])}function vo(t){let e=t[d],{mutations:n}=e,o=e.loop={};o.renders=n.each(r=>wo(e))}function yo(t){let e=t[d];e.loop&&(e.loop.prepends&&e.loop.prepends.forEach(n=>n.remove()),e.loop.appends&&e.loop.appends.forEach(n=>n.remove()),e.loop.renders.stop(),e.loop=void 0)}function bo(t){return!!t[d].loop}var Ct={};G(Ct,{disable:()=>Eo,enable:()=>xo,getState:()=>So});function j(t){if(typeof t!="object"||arguments.length>1)throw new Error("delegate() now takes an object of selector:fn pairs.");let e=Object.keys(t);return function(o){let r=o.target,i=-1;for(;e[++i];){let s=r.closest(e[i]);if(s)return t[e[i]](s,...arguments)}}}function He(t,e,n,o){o===0?t.hidden=!0:t.hidden=!1,o===n.length-1?e.hidden=!0:e.hidden=!1}function xo(t){let e=t[d],{actives:n,clicks:o,slotchanges:r}=e,i=e.navigation={prev:b("button",{part:"prev-button",type:"button",name:"navigation",value:"-1",html:"Previous"}),next:b("button",{part:"next-button",type:"button",name:"navigation",value:"1",html:"Next"})};e.controls.prepend(i.prev,i.next),i.updates=g.combine({active:n,changes:r}).each(s=>He(i.prev,i.next,s.changes.elements,s.changes.elements.indexOf(s.active))),i.clicks=o.each(j({'[name="navigation"]':function(s,l){let f=parseFloat(s.value),a=e.elements.indexOf(e.active)+f,p=e.elements[a];!p||(t.active=p,He(i.prev,i.next,e.elements,a))}}))}function Eo(t){let e=t[d];e.navigation.prev.remove(),e.navigation.next.remove(),e.navigation.updates.stop(),e.navigation.clicks.stop(),e.navigation=void 0}function So(t){return!!t[d].navigation}var It={};G(It,{disable:()=>ko,enable:()=>Lo,getState:()=>Po});function Me(t,e,n){let{active:o,buttons:r,index:i}=t;if(o===n)return;i>-1&&(t.activeSpan.remove(),r.children[i].part.remove("page-button-active"));let s=e.indexOf(n);s!==-1&&(r.children[s].part.add("page-button-active"),r.children[s].append(t.activeSpan),t.index=s,t.active=n)}function To(t,e,n,o){return e.buttons&&(e.buttons.remove(),e.buttons=void 0),o.length<2||(e.buttons=b("div",{part:"pagination",children:o.map((r,i)=>b("button",{part:"page-button",type:"button",name:"pagination",value:i}))}),t.append(e.buttons)),o.length}function Lo(t){let e=t[d],{shadow:n,actives:o,clicks:r,mutations:i}=e,s=e.pagination={activeSpan:b("span",{class:"invisible",text:"(Current slide)"})};s.mutations=i.each(()=>To(e.controls,s,n,e.children)),s.updates=g.combine({active:o,children:i}).filter(l=>l.children.length>1).each(l=>Me(s,e.children,e.active)),s.clicks=r.each(j({'[name="pagination"]':function(l,f){let{host:a}=e,p=e.children,u=p[l.value];!u||(a.active=u,Me(s,p,u))}}))}function ko(t){let e=t[d];e.pagination.buttons.remove(),e.pagination.mutations.stop(),e.pagination.updates.stop(),e.pagination.clicks.stop(),e.pagination=void 0}function Po(t){return!!t[d].pagination}var jt={};G(jt,{disable:()=>Oo,enable:()=>Fo,getState:()=>Ao});var De=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled;function ct(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement}function Be(t){return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():void 0}function ut(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}function Fo(t){let e=t[d];if(!De)return;let n=e.fullscreen={button:b("button",{part:"fullscreen-button",type:"button",name:"fullscreen",html:"Open in fullscreen"})};e.controls.append(n.button),n.changes=x("fullscreenchange",t).filter(o=>ct()===t).each(o=>{n.button.part.add("fullscreen-button-active"),n.button.innerHTML="Close fullscreen",document.activeElement!==t&&(n.tabIndex=t.tabIndex,t.tabIndex<0&&(t.tabIndex=0),t.focus());let r=x("fullscreenchange",t).each(i=>{n.button.part.remove("fullscreen-button-active"),n.button.innerHTML="Open in fullscreen",t.tabIndex=n.tabIndex,n.tabIndex=void 0,r.stop()})}),n.clicks=e.clicks.each(j({'[name="fullscreen"]':(o,r)=>{let i=ct();if(i===t){ut();return}i&&ut(),Be(t)}}))}function Oo(t){let e=t[d];ct()===t&&ut(),e.fullscreen.button.remove(),e.fullscreen.clicks.stop(),e.fullscreen.changes.stop(),e.fullscreen=void 0}function Ao(t){return!!t[d].fullscreen}var Ge={active:{attribute:function(t){this.active=t},set:function(t){let e=this[d],n=typeof t=="object"?t:/^\d/.test(t+"")?this.querySelector("#\\3"+(t+"")[0]+" "+(t+"").slice(1)):/^\#/.test(t+"")?this.querySelector(t):this.querySelector("#"+t);e.views.push(n)},get:function(){return this[d].active}},autoplay:st(Ot,"autoplay"),controls:Ft({navigation:Ct,pagination:It,fullscreen:jt}),loop:st(At,"loop")};var Co=import.meta.url.replace(/\/[^\/]*\.js/,"/slide-show-shadow.css"),Js=wt('
              ',Ce,Ge,Co);export{Js as default}; +var qe=Object.defineProperty;var Dt=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable;var Bt=(t,e)=>{var n={};for(var o in t)We.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&Dt)for(var o of Dt(t))e.indexOf(o)<0&&Ne.call(t,o)&&(n[o]=t[o]);return n};var z=(t,e)=>{for(var n in e)qe(t,n,{get:e[n],enumerable:!0})};function $(t){var e=new Map;return function(o){if(e.has(o))return e.get(o);var r=t(o);return e.set(o,r),r}}var $e=Array.prototype;function Xe(t,e){return typeof t=="function"?t.apply(null,e):t}function Gt(t,e,n){n=n||t.length;var o=n===1?e?t:$(t):$(function(r){return Gt(function(){var i=[r];return i.push.apply(i,arguments),t.apply(null,i)},e,n-1)});return function r(i){return arguments.length===0?r:arguments.length===1?o(i):arguments.length>=n?t.apply(null,arguments):Xe(o(i),$e.slice.call(arguments,1))}}var v=Gt;function Ye(t,e){return 1-Math.pow(1-e,t)}var zt=v(Ye);function y(){}function pt(t,e){return e(t)}function S(t){return t}var Ke=Array.prototype;function ft(){let t=arguments;return t.length?e=>Ke.reduce.call(t,pt,e):S}function dt(t,e,n){return n*(e-t)+t}var Ze=window.performance,_t=window.requestAnimationFrame,Qe=window.cancelAnimationFrame;function mt(t,e,n){var o=Ze.now();function r(s){var a=(s-o)/(t*1e3);a<1?(a>0&&e(a),i=_t(r)):(e(1),n&&n())}var i=_t(r);return function(){Qe(i)}}function X(t,e,n,o,r,i){let s=o[n];return mt(t,ft(e,a=>dt(s,r,a),a=>o[n]=a),i)}function Je(){return{x:0,y:0,left:0,top:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}}function T(t){return t===window?Je():t.getClientRects()[0]||t.getBoundingClientRect()}var M={scrollDuration:.3,scrollDurationPerHeight:.125,scrollTransform:zt(3)},Rt=y;function tn(t,e){if(e.behavior==="smooth"){let n=t.style.getPropertyValue("scroll-snap-type"),o=()=>{let r=t.scrollLeft,i=t.scrollTop;t.style.setProperty("scroll-snap-type",n),t.scrollLeft=r,t.scrollTop=i};if(t.style.setProperty("scroll-snap-type","none"),e.left!==void 0){let r=t===document.body?window.innerWidth:T(t).width,i=M.scrollDuration+M.scrollDurationPerHeight*Math.abs(e.left-t.scrollLeft)/r;Rt=X(i,M.scrollTransform,"scrollLeft",t,e.left,o)}else{let r=t===document.body?window.innerHeight:T(t).height,i=M.scrollDuration+M.scrollDurationPerHeight*Math.abs(e.top-t.scrollTop)/r;Rt=X(i,M.scrollTransform,"scrollTop",t,e.top,o)}}else e.left!==void 0&&(t.scrollLeft=e.left),e.top!==void 0&&(t.scrollTop=e.top)}if(!("scrollBehavior"in document.documentElement.style)){window.console&&console.log("Polyfilling Element.scrollTo(options)");let t="scrollTo"in Element.prototype?Element:HTMLElement,e=t.scrollIntoView;t.prototype.scrollTo=function(n){typeof n=="object"?tn(this,n):e.apply(this,arguments)}}function b(t,e){return function(){let o=t.apply(this,arguments),r=e[o]||e.default;if(!r)throw new Error('overload() no handler for "'+o+'"');return r.apply(this,arguments)}}var en=b(S,{is:y,tag:y,html:function(t,e,n){e.innerHTML=n},text:function(t,e,n){e.textContent=n},children:function(t,e,n){e.innerHTML="",n.forEach(o=>{e.appendChild(o)})},points:D,cx:D,cy:D,r:D,preserveAspectRatio:D,viewBox:D,default:function(t,e,n){t in e?e[t]=n:e.setAttribute(t,n)}});function D(t,e,n){e.setAttribute(t,n)}function nn(t,e){for(var n=Object.keys(e),o=n.length;o--;)en(n[o],t,e[n[o]]);return t}var ht=v(nn,!0);var on="http://www.w3.org/2000/svg",Ut=document.createElement("div");var Vt=(t,e)=>e&&typeof e;function qt(t,e){let n=document.createRange();return n.selectNode(t),n.createContextualFragment(e)}function L(t,e){var n=document.createElementNS(on,t);return e&&(n.innerHTML=e),n}var rn=b(S,{comment:function(t,e){return document.createComment(e||"")},fragment:b(Vt,{string:function(t,e,n){if(n)return qt(n,e);let o=document.createDocumentFragment();Ut.innerHTML=e;let r=Ut.childNodes;for(;r[0];)o.appendChild(r[0]);return o},object:function(t,e,n){let o=n?qt(n):document.createDocumentFragment();return typeof e.length=="number"?o.append.apply(o,e):ht(o,e),o},default:()=>document.createDocumentFragment()}),text:function(t,e){return document.createTextNode(e||"")},circle:L,ellipse:L,g:L,glyph:L,image:L,line:L,rect:L,use:L,path:L,pattern:L,polygon:L,polyline:L,svg:L,default:b(Vt,{string:function(t,e){let n=document.createElement(t);return n.innerHTML=e,n},object:function(t,e){let n=document.createElement(t);return typeof e.length=="number"?n.append.apply(n,e):ht(n,e),n},default:t=>{if(typeof t!="string")throw new Error('create(tag, content) accepts only a string as tag "'+typeof t+'"');return document.createElement(t)}})}),x=rn;function gt(t,e,n){let o;typeof n!="string"&&n.input!==void 0&&n.index!==void 0&&(o=n,n=o.input.slice(n.index+n[0].length+(n.consumed||0)));let r=t.exec(n);if(!r)return;let i=e(r);return o&&(o.consumed=(o.consumed||0)+r.index+r[0].length+(r.consumed||0)),i}var fr=v(gt,!0);function sn(t,e,n){throw n.input!==void 0&&n.index!==void 0&&(n=n.input),new Error('Cannot parse string "'+n+'"')}function cn(t,e,n){let o=-1;for(;++ocn(e,n,i),o);return r===void 0?e.catch?e.catch(n,o):sn(t,e,o):r}var Wt=v(un,!0);var wt=y;var k=Symbol("internals"),A=Symbol("shadow"),Nt=Object.defineProperties,ln={a:HTMLAnchorElement,dl:HTMLDListElement,p:HTMLParagraphElement,br:HTMLBRElement,fieldset:HTMLFieldSetElement,hr:HTMLHRElement,img:HTMLImageElement,li:HTMLLIElement,ol:HTMLOListElement,optgroup:HTMLOptGroupElement,q:HTMLQuoteElement,textarea:HTMLTextAreaElement,td:HTMLTableCellElement,th:HTMLTableCellElement,tr:HTMLTableRowElement,tbody:HTMLTableSectionElement,thead:HTMLTableSectionElement,tfoot:HTMLTableSectionElement,ul:HTMLUListElement},an={name:{set:function(t){return this.setAttribute("name",t)},get:function(){return this.getAttribute("name")||""}},form:{get:function(){return this[k].form}},labels:{get:function(){return this[k].labels}},validity:{get:function(){return this[k].validity}},validationMessage:{get:function(){return this[k].validationMessage}},willValidate:{get:function(){return this[k].willValidate}},checkValidity:{value:function(){return this[k].checkValidity()}},reportValidity:{value:function(){return this[k].reportValidity()}}},pn={},$t={once:!0},fn=0,Xt=!1;function dn(t){return ln[t]||window["HTML"+t[0].toUpperCase()+t.slice(1)+"Element"]||(()=>{throw new Error('Constructor not found for tag "'+t+'"')})()}var mn=Wt(/^\s*?\s*$|^\s*?\s*$/,{1:(t,e)=>({name:e[1]}),2:(t,e)=>({name:e[3],tag:e[2]}),catch:function(t,e){throw new SyntaxError(`dom element() – name must be of the form 'element-name' or 'tag is="element-name"' (`+e+")")}},null);function hn(t,e){if(t.hasOwnProperty(e)){let n=t[e];delete t[e],t[e]=n}return t}function gn(t,e,n){t._initialLoad=!0;let o=t.attachShadow({mode:e.mode||"closed",delegatesFocus:e.focusable||!1});if(n){let r=x("link",{rel:"stylesheet",href:n});o.append(r)}return t[A]=o,o}function wn(t){var e;if(t.attachInternals){if(e=t.attachInternals(),e.setFormValue)return e}else e={shadowRoot:t.shadowRoot};return e.input=x("input",{type:"hidden",name:t.name}),t.appendChild(e.input),e.setFormValue=function(n){this.input.value=n},e}function vn(t){t._initialAttributes={},t._n=0}function yn(t,e,n){let o=t._initialAttributes;for(;t._nfn?gn(p,e,o||e.stylesheet):void 0,u=l.formAssociated&&wn(p);return i&&(Xt=!0),e.construct&&e.construct.call(p,g,u),a&&(vn(p),Promise.resolve(1).then(function(){Yt(p,l.observedAttributes,a)})),f&&Object.keys(f).reduce(hn,p),p}return l.prototype=Object.create(s.prototype,f),f&&f.value&&(l.formAssociated=!0,Nt(l.prototype,an),(e.enable||e.disable)&&(l.prototype.formDisabledCallback=function(p){return p?e.disable&&e.disable.call(this,this[A],this[k]):e.enable&&e.enable.call(this,this[A],this[k])}),e.reset&&(l.prototype.formResetCallback=function(){return e.reset.call(this,this[A],this[k])}),e.restore&&(l.prototype.formStateRestoreCallback=function(){return e.restore.call(this,this[A],this[k])})),a&&(l.observedAttributes=Object.keys(a),l.prototype.attributeChangedCallback=function(p,g,u){if(!this._initialAttributes)return a[p].call(this,u);this._initialAttributes[p]=u,yn(this,l.observedAttributes,a)}),l.prototype.connectedCallback=function(){let p=this,g=p[A],u=p[k];if(p._initialAttributes&&Yt(p,l.observedAttributes,a),p._initialLoad){let c=g.querySelectorAll('link[rel="stylesheet"]');if(c.length){let H=0,at=c.length,Mt=function(Ue){++H>=c.length&&(delete p._initialLoad,e.load&&(wt("element()","loaded",Array.from(c).map(Ve=>Ve.href).join(` +`)),e.load.call(p,g)))},_e=Mt;for(;at--;)c[at].addEventListener("load",Mt,$t),c[at].addEventListener("error",_e,$t);e.connect&&e.connect.call(this,g,u)}else e.connect&&e.connect.call(this,g,u),e.load&&e.load.call(this,g,u)}else e.connect&&e.connect.call(this,g,u)},e.disconnect&&(l.prototype.disconnectedCallback=function(){return e.disconnect.call(this,this[A],this[k])}),wt("element()","<"+(i?i+" is="+r:r)+">"),window.customElements.define(r,l,i&&{extends:i}),i&&!Xt&&document.querySelectorAll('[is="'+r+'"]').forEach(p=>{Nt(p,f),e.construct&&e.construct.apply(p);let g;for(g in a){let u=p.attributes[g];u&&a[g].call(p,u.value)}e.connect&&e.connect.apply(p)}),l}function Zt(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object")return!1;let n=Object.keys(t),o=Object.keys(e),r=n.length;for(;r--;){if(t[n[r]]===void 0){if(e[n[r]]!==void 0)return!1}else if(!e.hasOwnProperty(n[r])||!Zt(t[n[r]],e[n[r]]))return!1;let i=o.indexOf(n[r]);i>-1&&o.splice(i,1)}for(r=o.length;r--;)if(e[o[r]]===void 0){if(t[o[r]]!==void 0)return!1}else return!1;return!0}var Qt=v(Zt,!0);function En(t,e){return e[t]}var B=v(En,!0);var Sn=Object.freeze;function Jt(){return this}var P=Sn({shift:y,push:y,forEach:y,join:function(){return""},map:Jt,filter:Jt,includes:function(){return!1},reduce:function(t,e){return e},length:0,each:y,pipe:S,start:y,stop:y,done:y,valueOf:function(){return null}});function yt(){return this}function bt(t){return t&&t[Symbol.iterator]}var Tn=Object.assign;function Ln(t){return t.stop?t.stop():t()}function kn(t){t.forEach(Ln),t.length=0}function G(){}Tn(G.prototype,{stop:function(){return this.stopables&&kn(this.stopables),this},done:function(e){return(this.stopables||(this.stopables=[])).push(e),this}});var Pn=Object.assign;function Y(t){G.prototype.stop.apply(t);let e=-1,n;for(;n=t[++e];)t[e]=void 0,Y(n)}function m(){}Pn(m.prototype,{pipe:function(t){return this[0]=t,t},stop:function(){return Y(this[0]),this}});var F=Object.assign,O=Object.create;function _(t,e){e!==void 0&&t[0].push(e)}function Fn(t,e){if(t[1]){let n=-1;for(;t[++n]&&t[n]!==e;);for(;t[n++];)t[n-1]=t[n];Y(e)}else t.stop()}function w(t){this.input=t}F(w.prototype,G.prototype,{push:function(t){_(this,t)},pipe:function(t){if(this[0])throw new Error("Stream: Attempt to .pipe() a unicast stream multiple times. Create a multicast stream with stream.broadcast().");return this[0]=t,this.input.pipe(this),t},map:function(t){return new te(this,t)},filter:function(t){return new ee(this,t)},chunk:function(t){return new oe(this,t)},flatMap:function(t){return new ne(this,t)},take:function(t){return new re(this,t)},each:function(t){return new ce(this,t)},reduce:function(t,e){return new ie(this,t,e)},scan:function(t,e){return new se(this,t,e)},stop:function(){return Fn(this.input,this),this}});function te(t,e){this.input=t,this.fn=e}te.prototype=F(O(w.prototype),{push:function(e){let n=this.fn;_(this,n(e))}});function ee(t,e){this.input=t,this.fn=e}ee.prototype=F(O(w.prototype),{push:function(e){this.fn(e)&&_(this,e)}});function ne(t,e){this.input=t,this.fn=e}ne.prototype=F(O(w.prototype),{push:function(e){let o=this.fn(e);if(o!==void 0)if(bt(o))for(let r of o)_(this,r);else throw new Error("Stream: Cannot .flatMap() non-iterable values")}});function oe(t,e){this.input=t,this.chunk=[],typeof e=="number"?this.n=e:typeof e=="function"&&(this.fn=e)}oe.prototype=F(O(w.prototype),{fn:function(t){return t.length===this.n},push:function(e){let n=this.chunk;n.push(e),this.fn(n)&&(_(this,n),this.chunk=[])}});function re(t,e){this.input=t,this.count=e}re.prototype=F(O(w.prototype),{push:function(e){this[0].push(e),--this.count||this.stop()}});function ie(t,e,n){return this.input=t,this.fn=e,this.value=n,this.i=0,t.pipe(this),n}ie.prototype=F(O(w.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t,this.i++,this)}});function se(t,e,n){this.input=t,this.fn=e,this.value=n}se.prototype=F(O(w.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t),this[0].push(this.value)}});function ce(t,e){this.input=t,this.push=e,t.pipe(this)}ce.prototype=F(O(w.prototype),{each:null,reduce:null,pipe:null});var On=Array.prototype,An=Object.assign,Cn=Object.create;function R(t){this.buffer=t||[]}R.prototype=An(Cn(w.prototype),m.prototype,{push:function(t){t!==void 0&&this.buffer.push(t)},pipe:function(t){for(this[0]=t;this.buffer.length;)this[0].push(On.shift.apply(this.buffer));return this.buffer=this[0],t}});var In=Object.assign,jn=Object.create;function U(t,e){this.input=t,this.memory=!!(e&&e.memory),e&&e.hot&&this.pipe(P)}U.prototype=In(jn(w.prototype),{push:function(t){if(t!==void 0){this.memory&&(this.value=t);let e=-1;for(;this[++e];)this[e].push(t)}},pipe:function(t){let e=-1;for(;this[++e];);return this[e]=t,this.value!==void 0&&t.push(this.value),e===0&&this.input.pipe(this),t}});var Hn=Object.assign;function K(t){this.promise=t}Hn(K.prototype,m.prototype,{pipe:function(t){let e=this.promise;this[0]=t,e.then(n=>this[0].push(n)).finally(n=>this.stop())},stop:function(){m.prototype.stop.apply(this,arguments),this[0]=P}});var le=Object.assign,ae=Object.keys;function ue(t,e,n){let o=t.values,r=t.names,i=t[0];o[e]=n,(t.active||(t.active=ae(o).length===r.length))&&i.push(le({},o))}function Z(t){this.inputs=t,this.active=!1}le(Z.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this.values={},this.names=ae(e),this[0]=t;for(let n in e){let o=e[n];o.pipe?t.done(o.each(r=>ue(this,n,r))):o.then?o.then(r=>ue(this,n,r)):console.log("Todo: combine() raw values ?")}}});var Mn=Object.assign;function Q(t){this.inputs=t}Mn(Q.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this[0]=t;let n=-1,o;for(;o=e[++n];)if(o.pipe)o.pipe(t);else if(o.then)o.then(r=>t.push(r));else{let r=-1;for(;++r0}function Gn(t,e,n){return t[n]=e.shift(),t}function zn(t){return[]}function xt(t,e,n,o){n.push(o),e.every(Bn)&&t.push(e.reduce(Gn,{}))}function J(t){this.inputs=t,this.buffers=Et.map.call(t,zn)}Dn(J.prototype,m.prototype,{pipe:function(t){let e=this.inputs,n=this.buffers;this[0]=t,Et.forEach.call(e,(o,r)=>{let i=n[r];o.each?t.done(o.each(s=>xt(t,n,i,s))):o.then?o.then(s=>xt(t,n,i,s)):Et.forEach.call(o,s=>xt(t,n,i,s))})},stop:function(){let t=this.inputs,e=-1,n;for(;n=t[++e];)n.stop();return m.prototype.stop.apply(this,arguments)}});var _n=Array.prototype,pe=Object.assign;function Rn(t){throw new TypeError("Stream: invalid source object cannot be read into stream")}var h=pe(w,{of:function(){return new R(_n.slice.apply(arguments))},from:function(t){return t.pipe?new w(t):t.then?new w(new K(t)):typeof t.length=="number"?new R(t):Rn(t)},broadcast:function(e){return new U(P,e)},combine:function(e){return new w(new Z(e))},merge:function(){return new w(new Q(arguments))},zip:function(){return new w(new J(arguments))}});pe(w.prototype,{log:yt,broadcast:function(t){return new U(this,t)}});var Un=Object.assign,Vn=/\s+/,fe={fullscreenchange:"fullscreenElement"in document?"fullscreenchange":"webkitFullscreenElement"in document?"webkitfullscreenchange":"fullscreenchange"};function de(t){return t.which===1&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}var me=0;window.addEventListener("click",t=>me=t.timeStamp);function qn(t,e){return t.node.addEventListener(fe[e]||e,t,t.options),t}function Wn(t,e){return t.node.removeEventListener(fe[e]||e,t),t}function he(t,e,n){this.types=t.split(Vn),this.options=e,this.node=n,this.select=e&&e.select}Un(he.prototype,m.prototype,{pipe:function(t){this[0]=t,this.types.reduce(qn,this)},handleEvent:function(t){if(!(t.type==="click"&&t.timeStamp<=me)){if(this.select){let e=t.target.closest(this.select);if(!e)return;t.selectedTarget=e}this[0].push(t)}},stop:function(){this.types.reduce(Wn,this),m.prototype.stop.apply(this,arguments)}});function E(t,e){let n;return typeof t=="object"&&(n=t,t=n.type),new h(new he(t,n,e))}function St(t){return typeof t}var Nn=/^\s*([+-]?\d*\.?\d+)([^\s\d]*)\s*$/;function $n(t,e){if(typeof e=="number")return e;var n=Nn.exec(e);if(!n||!t[n[2]||""]){if(!t.catch)throw new Error('Cannot parse value "'+e+'" with provided units '+Object.keys(t).join(", "));return n?t.catch(parseFloat(n[1]),n[2]):t.catch(parseFloat(e))}return t[n[2]||""](parseFloat(n[1]))}var tt=v($n);var Xn=/px$/,ge={"transform:translateX":function(t){var e=V("transform",t);if(!e||e==="none")return 0;var n=et(e);return parseFloat(n[4])},"transform:translateY":function(t){var e=V("transform",t);if(!e||e==="none")return 0;var n=et(e);return parseFloat(n[5])},"transform:scale":function(t){var e=V("transform",t);if(!e||e==="none")return 0;var n=et(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.sqrt(o*o+r*r)},"transform:rotate":function(t){var e=V("transform",t);if(!e||e==="none")return 0;var n=et(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.atan2(r,o)}};function et(t){return t.split("(")[1].split(")")[0].split(/\s*,\s*/)}function V(t,e){return window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):0}function nt(t,e){if(ge[t])return ge[t](e);var n=V(t,e);return typeof n=="string"&&Xn.test(n)?parseFloat(n):n}var ot,rt;function Yn(){if(!ot){let t=document.documentElement.style.fontSize;document.documentElement.style.fontSize="100%",ot=nt("font-size",document.documentElement),document.documentElement.style.fontSize=t||""}return ot}function Kn(){return rt||(rt=nt("font-size",document.documentElement)),rt}window.addEventListener("resize",()=>{ot=void 0,rt=void 0});var C=b(St,{number:S,string:tt({em:function(t){return Yn()*t},px:function(t){return t},rem:function(t){return Kn()*t},vw:function(t){return window.innerWidth*t/100},vh:function(t){return window.innerHeight*t/100},vmin:function(t){return window.innerWidthn?o:n}n=nW.maxScrollInterval?W.maxScrollInterval:1.4*n}function st(){return be}function Ee(t){let e=T(t),n=window.getComputedStyle(t,null),o=C(n.getPropertyValue("padding-left")),r=C(n.getPropertyValue("padding-right"));return e.leftPadding=e.left+o,e.rightPadding=e.left+e.width-r,e.centrePadding=e.leftPadding+(e.width-o-r)/2,e}function Se(t){let e=window.getComputedStyle(t,null).getPropertyValue("scroll-snap-align");return e.endsWith("start")?"left":e.endsWith("end")?"right":"centre"}function Te(t,e,n){let o=Ee(t),r=T(e),i=Se(e);t.scrollTo({top:t.scrollTop,left:t.scrollLeft+(i==="left"?r.left-o.leftPadding:i==="right"?r.right-o.rightPadding:r.left+r.width/2-o.centrePadding),behavior:n})}function Le(t,e){return Te(t,e,"smooth"),e}function I(t,e){return t.style.setProperty("scroll-behavior","auto","important"),Te(t,e,"auto"),t.style.setProperty("scroll-behavior",""),e}function ke(t,e){let{leftPadding:n,rightPadding:o,centrePadding:r}=Ee(t),i=e.length,s;for(;s=e[--i];){let a=T(s);if(!a)continue;let f=Se(s),l=a.width/2+(f==="left"?n:f==="right"?o:r),p=f==="left"?a.left:f==="right"?a.right:a.left+a.width/2;if(p<=l){console.log(p,l,s);break}}return s}function Pe(t){return!!t.dataset.slideIndex}function Fe(t){let{scroller:e,elements:n,children:o}=t,r=ke(e,n);return Pe(r)?o[r.dataset.slideIndex]:r}function Oe(t){let{scroller:e,children:n,elements:o}=t,r=ke(e,o),i;console.log("CURRENT",r),!!r&&(Pe(r)?(i=n[r.dataset.slideIndex],I(e,i)):i=r,t.activations.push(i))}function to(t,e){t.style.setProperty("scroll-snap-type",""),e.stop()}var Ae=b((t,e)=>e.type,{pointerdown:function(t,e){return t.e0=e,t.x0=e.clientX,t.y0=e.clientY,t},pointermove:function(t,e){let n=e.clientX,o=e.clientY;if(!t.gesturing){if(Math.abs(n-t.x0)(clearTimeout(s),setTimeout(to,st()*1e3,n,l)))}return t.gesturing=!1,t.e0=void 0,t.x0=void 0,t.y0=void 0,t.pointers=void 0,t.scrollLeft0=void 0,t}});var eo=Object.assign,no={capture:!0,passive:!0};function oo(t,e){t.timer=void 0,t.stream.push(e);let n=t.times;n.length>1&&xe(n),n.length=0}function Ce(t){this.element=t,this.times=[]}eo(Ce.prototype,m.prototype,{pipe:function(t){this.stream=t,this.element.addEventListener("scroll",this,no)},handleEvent:function(t){let e=t.timeStamp/1e3;this.times.push(e),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(oo,st()*1e3,this,t)},stop:function(){this.element.removeEventListener("scroll",this),m.prototype.stop.apply(this,arguments)}});function Pt(t){return new h(new Ce(t))}function ro(t,e,n){let o=n.length,r=-1/0;for(;o--;){let l=T(n[o]),p=l.x+l.width;r=p>r?p:r}let i=T(e),s=getComputedStyle(t),a=C(s.paddingLeft||0),f=C(s.paddingRight||0);return a+f+r-i.x}function io(t,e,n){let o=ro(t,e,n);t.style.setProperty("--scroll-width",o+"px")}function so(t){return!t.dataset.slideIndex}var Ie={construct:function(t){let e=x("slot",{part:"slides",style:"display: grid;"}),n=x("div",{class:"scroller",children:[e]}),o=x("nav",{part:"controls",children:[x("slot",{name:"controls"})]});t.append(n,o);let r=h.broadcast(),i=h.broadcast(),s=h.combine({host:i,elements:E("slotchange",e).map(c=>u.elements=e.assignedElements())}).broadcast({memory:!0}),a=s.map(c=>{let H=c.elements.filter(so);return Qt(u.children,H)?void 0:u.children=H}).broadcast({memory:!0,hot:!0}),f=h.of(),l=h.of(),p=l.map(c=>c.dataset.slideIndex?u.children[c.dataset.slideIndex]:c).filter(c=>u.active!==c&&kt("slide-active",c)).map(c=>u.active=c).log("ACTIVE").broadcast({memory:!0,hot:!0}),g=E("click",t).filter(de).broadcast(),u=this[d]={clickSuppressTime:-1/0,connected:!1,host:this,style:window.getComputedStyle(this),elements:P,children:P,scroller:n,slides:e,controls:o,connects:r,load:i,views:f,activations:l,actives:p,slotchanges:s,mutations:a,clicks:g};h.merge(s,E("resize",window)).each(c=>io(n,e,u.elements)),h.combine({slotchanges:s,connects:r}).map(c=>u.elements.includes(u.active)?u.active:u.children[0]).map(c=>u.connected?I(n,c):c).pipe(l),h.combine({host:i,child:f}).map(c=>u.elements.includes(c.child)&&u.active!==c.child?c.child:void 0).map(c=>u.connected?u.active?Le(n,c):I(n,c):c).pipe(l),Pt(n).filter(c=>u.connected&&!u.gesturing).each(c=>Oe(u)),Lt({threshold:"0.25rem",device:"mouse"},t).filter(()=>u.children.length>1).each(c=>{u.pointers=c,c.reduce(Ae,u)}),g.each(c=>{c.timeStamp-u.clickSuppressTime<120&&(c.preventDefault(),c.stopPropagation())}),E("fullscreenchange",window).each(c=>{(c.target===this||c.target.contains(this))&&I(n,u.active)}),E("focusin",this).map(c=>u.children.indexOf(c.target)!==-1?c.target:u.children.find(H=>H.contains(c.target))).pipe(f),E("keydown",this).filter(()=>document.activeElement===this||this.contains(document.activeElement)).map(b(B("keyCode"),{37:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)-1]),39:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)+1]),default:y})).pipe(f)},load:function(t){this[d].load.push(this)},connect:function(t){let e=this[d];e.connected=!0,e.connects.push(!0)},disconnect:function(t){let e=this[d];e.connected=!1}};function ct(t,e){function n(o,r){if(t.getState(o)!==r)return t[r?"enable":"disable"](o)}return{attribute:function(o){return n(this,o!==null)},set:function(o){return n(this,!!o)},get:function(){return t.getState(this)}}}function Ft(t,e){t.remove&&t.remove(e);let n;for(;(n=t.indexOf(e))!==-1;)t.splice(n,1);return e}var as=v(Ft,!0);var co=Object.assign;function N(t,e){this.element=t,this.definitions=e,this.tokens=[]}co(N.prototype,{contains:function(t){return this.tokens.includes(t)},add:function(){let t=arguments.length;for(;t--;){let e=arguments[t];!this.tokens.includes(e)&&this.definitions[e]&&(this.definitions[e].enable(this.element),this.tokens.push(e))}},remove:function(){let t=arguments.length;for(;t--;){let e=arguments[t];this.tokens.includes(e)&&(this.definitions[e].disable(this.element),Ft(this.tokens,e))}},supports:function(t){return!!this.definitions[t]}});var uo=Array.prototype;function lo(t,e){let n=t.tokens.slice(),o=uo.slice.apply(e),r=n.length;for(;r--;)o.includes(n[r])&&n.splice(r,1);t.remove.apply(t,n),t.add.apply(t,o)}function Ot(t){let e=Symbol("TokenList");function n(o,r){let i=o[e]||(o[e]=new N(o,t));lo(i,r.trim().split(/\s+/))}return{attribute:function(o){n(this,o||"")},set:function(o){n(this,o+"")},get:function(){return this[e]||(this[e]=new N(this,t))}}}var At={};z(At,{disable:()=>ho,enable:()=>mo,getState:()=>go});var ao=tt({s:S,ms:t=>t/1e3});function po(t){let{active:e,children:n,elements:o,host:r}=t,i=o.indexOf(e),s=o[i+1]||n[0];t.autoplay.timer=null,!!s&&(r.active=s)}function fo(t){let{active:e,style:n}=t,o=ao(window.getComputedStyle(e).getPropertyValue("--slide-duration")||n.getPropertyValue("--slide-duration"));clearTimeout(t.autoplay.timer),t.autoplay.timer=setTimeout(po,o*1e3,t)}function je(t){clearTimeout(t.autoplay.timer),t.autoplay.timer=null}function mo(t){let e=t[d],{actives:n}=e,o=e.autoplay={},r=h.merge([!1],E("pointerenter pointerleave",t).map(s=>s.type==="pointerenter")),i=h.merge([t.contains(document.activeElement)],E("focusin focusout",t).map(b(B("type"),{focusin:s=>!0,focusout:s=>t.contains(s.relatedTarget)}))).map((s=>a=>s===a?void 0:s=a)());o.updates=h.combine({active:n,hover:r,focus:i}).each(s=>s.hover||s.focus?je(e):fo(e))}function ho(t){let e=t[d];je(e),e.autoplay.updates.stop(),e.autoplay=void 0}function go(t){return!!t[d].autoplay}var Ct={};z(Ct,{disable:()=>yo,enable:()=>vo,getState:()=>bo});function He(t,e){let n=t.cloneNode(!0);return n.dataset.slideIndex=e,n.removeAttribute("id"),n.setAttribute("aria-hidden","true"),n.tabIndex="-1",n}function wo(t){let{active:e,children:n,host:o,scroller:r}=t;if(t.loop.prepends&&(t.loop.prepends.forEach(u=>u.remove()),t.loop.appends.forEach(u=>u.remove()),t.loop.prepends=void 0,t.loop.appends=void 0),n.length<2){t.elements=t.slides.assignedElements();return}let i=o.clientWidth,s=n.map(T),a=s[1].left,f=s[s.length-2].right,l=1;for(;s[++l]&&s[l].leftf-i;);let g=n.slice(++l).map((u,c)=>He(u,l+c));o.prepend.apply(o,g),o.append.apply(o,p),t.loop.prepends=g,t.loop.appends=p,t.elements=t.slides.assignedElements(),I(r,e||n[0])}function vo(t){let e=t[d],{mutations:n}=e,o=e.loop={};o.renders=n.each(r=>wo(e))}function yo(t){let e=t[d];e.loop&&(e.loop.prepends&&e.loop.prepends.forEach(n=>n.remove()),e.loop.appends&&e.loop.appends.forEach(n=>n.remove()),e.loop.renders.stop(),e.loop=void 0)}function bo(t){return!!t[d].loop}var It={};z(It,{disable:()=>Eo,enable:()=>xo,getState:()=>So});function j(t){if(typeof t!="object"||arguments.length>1)throw new Error("delegate() now takes an object of selector:fn pairs.");let e=Object.keys(t);return function(o){let r=o.target,i=-1;for(;e[++i];){let s=r.closest(e[i]);if(s)return t[e[i]](s,...arguments)}}}function Me(t,e,n,o){o===0?t.hidden=!0:t.hidden=!1,o===n.length-1?e.hidden=!0:e.hidden=!1}function xo(t){let e=t[d],{actives:n,clicks:o,slotchanges:r}=e,i=e.navigation={prev:x("button",{part:"prev-button",type:"button",name:"navigation",value:"-1",html:"Previous"}),next:x("button",{part:"next-button",type:"button",name:"navigation",value:"1",html:"Next"})};e.controls.prepend(i.prev,i.next),i.updates=h.combine({active:n,changes:r}).each(s=>Me(i.prev,i.next,s.changes.elements,s.changes.elements.indexOf(s.active))),i.clicks=o.each(j({'[name="navigation"]':function(s,a){let f=parseFloat(s.value),l=e.elements.indexOf(e.active)+f,p=e.elements[l];!p||(t.active=p,Me(i.prev,i.next,e.elements,l))}}))}function Eo(t){let e=t[d];e.navigation.prev.remove(),e.navigation.next.remove(),e.navigation.updates.stop(),e.navigation.clicks.stop(),e.navigation=void 0}function So(t){return!!t[d].navigation}var jt={};z(jt,{disable:()=>ko,enable:()=>Lo,getState:()=>Po});function De(t,e,n){let{active:o,buttons:r,index:i}=t;if(o===n)return;i>-1&&(t.activeSpan.remove(),r.children[i].part.remove("page-button-active"));let s=e.indexOf(n);s!==-1&&(r.children[s].part.add("page-button-active"),r.children[s].append(t.activeSpan),t.index=s,t.active=n)}function To(t,e,n,o){return e.buttons&&(e.buttons.remove(),e.buttons=void 0),o.length<2||(e.buttons=x("div",{part:"pagination",children:o.map((r,i)=>x("button",{part:"page-button",type:"button",name:"pagination",value:i}))}),t.append(e.buttons)),o.length}function Lo(t){let e=t[d],{shadow:n,actives:o,clicks:r,mutations:i}=e,s=e.pagination={activeSpan:x("span",{class:"invisible",text:"(Current slide)"})};s.mutations=i.each(()=>To(e.controls,s,n,e.children)),s.updates=h.combine({active:o,children:i}).filter(a=>a.children.length>1).each(a=>De(s,e.children,e.active)),s.clicks=r.each(j({'[name="pagination"]':function(a,f){let{host:l}=e,p=e.children,g=p[a.value];!g||(l.active=g,De(s,p,g))}}))}function ko(t){let e=t[d];e.pagination.buttons.remove(),e.pagination.mutations.stop(),e.pagination.updates.stop(),e.pagination.clicks.stop(),e.pagination=void 0}function Po(t){return!!t[d].pagination}var Ht={};z(Ht,{disable:()=>Oo,enable:()=>Fo,getState:()=>Ao});var Be=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled;function ut(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement}function Ge(t){return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():void 0}function lt(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}function Fo(t){let e=t[d];if(!Be)return;let n=e.fullscreen={button:x("button",{part:"fullscreen-button",type:"button",name:"fullscreen",html:"Open in fullscreen"})};e.controls.append(n.button),n.changes=E("fullscreenchange",t).filter(o=>ut()===t).each(o=>{n.button.part.add("fullscreen-button-active"),n.button.innerHTML="Close fullscreen",document.activeElement!==t&&(n.tabIndex=t.tabIndex,t.tabIndex<0&&(t.tabIndex=0),t.focus());let r=E("fullscreenchange",t).each(i=>{n.button.part.remove("fullscreen-button-active"),n.button.innerHTML="Open in fullscreen",t.tabIndex=n.tabIndex,n.tabIndex=void 0,r.stop()})}),n.clicks=e.clicks.each(j({'[name="fullscreen"]':(o,r)=>{let i=ut();if(i===t){lt();return}i&<(),Ge(t)}}))}function Oo(t){let e=t[d];ut()===t&<(),e.fullscreen.button.remove(),e.fullscreen.clicks.stop(),e.fullscreen.changes.stop(),e.fullscreen=void 0}function Ao(t){return!!t[d].fullscreen}var ze={active:{attribute:function(t){this.active=t},set:function(t){let e=this[d],n=typeof t=="object"?t:/^\d/.test(t+"")?this.querySelector("#\\3"+(t+"")[0]+" "+(t+"").slice(1)):/^\#/.test(t+"")?this.querySelector(t):this.querySelector("#"+t);e.views.push(n)},get:function(){return this[d].active}},autoplay:ct(At,"autoplay"),controls:Ot({navigation:It,pagination:jt,fullscreen:Ht}),loop:ct(Ct,"loop")};var Co=import.meta.url.replace(/\/[^\/]*\.js/,"/slide-show-shadow.css"),Js=vt('
              ',Ie,ze,Co);export{Js as default}; diff --git a/build/slide-show-ol.js b/build/slide-show-ol.js index 6cbc5a5..9dfa4a5 100644 --- a/build/slide-show-ol.js +++ b/build/slide-show-ol.js @@ -1,7 +1,7 @@ /* slide-show 1.1.6 By Stephen Band - Built 2022-05-18 15:13 */ + Built 2022-05-19 13:21 */ -var qe=Object.defineProperty;var Mt=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var Dt=(t,e)=>{var n={};for(var o in t)We.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&Mt)for(var o of Mt(t))e.indexOf(o)<0&&$e.call(t,o)&&(n[o]=t[o]);return n};var G=(t,e)=>{for(var n in e)qe(t,n,{get:e[n],enumerable:!0})};function $(t){var e=new Map;return function(o){if(e.has(o))return e.get(o);var r=t(o);return e.set(o,r),r}}var Ne=Array.prototype;function Xe(t,e){return typeof t=="function"?t.apply(null,e):t}function Bt(t,e,n){n=n||t.length;var o=n===1?e?t:$(t):$(function(r){return Bt(function(){var i=[r];return i.push.apply(i,arguments),t.apply(null,i)},e,n-1)});return function r(i){return arguments.length===0?r:arguments.length===1?o(i):arguments.length>=n?t.apply(null,arguments):Xe(o(i),Ne.slice.call(arguments,1))}}var w=Bt;function Ye(t,e){return 1-Math.pow(1-e,t)}var Gt=w(Ye);function v(){}function at(t,e){return e(t)}function S(t){return t}var Ke=Array.prototype;function pt(){let t=arguments;return t.length?e=>Ke.reduce.call(t,at,e):S}function ft(t,e,n){return n*(e-t)+t}var Ze=window.performance,zt=window.requestAnimationFrame,Qe=window.cancelAnimationFrame;function dt(t,e,n){var o=Ze.now();function r(s){var l=(s-o)/(t*1e3);l<1?(l>0&&e(l),i=zt(r)):(e(1),n&&n())}var i=zt(r);return function(){Qe(i)}}function N(t,e,n,o,r,i){let s=o[n];return dt(t,pt(e,l=>ft(s,r,l),l=>o[n]=l),i)}function Je(){return{x:0,y:0,left:0,top:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}}function T(t){return t===window?Je():t.getClientRects()[0]||t.getBoundingClientRect()}var H={scrollDuration:.3,scrollDurationPerHeight:.125,scrollTransform:Gt(3)},_t=v;function tn(t,e){if(e.behavior==="smooth"){let n=t.style.getPropertyValue("scroll-snap-type"),o=()=>t.style.setProperty("scroll-snap-type",n);if(t.style.setProperty("scroll-snap-type","none"),e.left!==void 0){let r=t===document.body?window.innerWidth:T(t).width,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.left-t.scrollLeft)/r;_t=N(i,H.scrollTransform,"scrollLeft",t,e.left,o)}else{let r=t===document.body?window.innerHeight:T(t).height,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.top-t.scrollTop)/r;_t=N(i,H.scrollTransform,"scrollTop",t,e.top,o)}}else e.left!==void 0&&(t.scrollLeft=e.left),e.top!==void 0&&(t.scrollTop=e.top)}if(!("scrollBehavior"in document.documentElement.style)){console.log("Polyfilling Element.scrollTo(options).");let t="scrollTo"in Element.prototype?Element:HTMLElement,e=t.scrollIntoView;t.prototype.scrollTo=function(n){typeof n=="object"?tn(this,n):e.apply(this,arguments)}}function y(t,e){return function(){let o=t.apply(this,arguments),r=e[o]||e.default;if(!r)throw new Error('overload() no handler for "'+o+'"');return r.apply(this,arguments)}}var en=y(S,{is:v,tag:v,html:function(t,e,n){e.innerHTML=n},text:function(t,e,n){e.textContent=n},children:function(t,e,n){e.innerHTML="",n.forEach(o=>{e.appendChild(o)})},points:M,cx:M,cy:M,r:M,preserveAspectRatio:M,viewBox:M,default:function(t,e,n){t in e?e[t]=n:e.setAttribute(t,n)}});function M(t,e,n){e.setAttribute(t,n)}function nn(t,e){for(var n=Object.keys(e),o=n.length;o--;)en(n[o],t,e[n[o]]);return t}var mt=w(nn,!0);var on="http://www.w3.org/2000/svg",Rt=document.createElement("div");var Ut=(t,e)=>e&&typeof e;function Vt(t,e){let n=document.createRange();return n.selectNode(t),n.createContextualFragment(e)}function L(t,e){var n=document.createElementNS(on,t);return e&&(n.innerHTML=e),n}var rn=y(S,{comment:function(t,e){return document.createComment(e||"")},fragment:y(Ut,{string:function(t,e,n){if(n)return Vt(n,e);let o=document.createDocumentFragment();Rt.innerHTML=e;let r=Rt.childNodes;for(;r[0];)o.appendChild(r[0]);return o},object:function(t,e,n){let o=n?Vt(n):document.createDocumentFragment();return typeof e.length=="number"?o.append.apply(o,e):mt(o,e),o},default:()=>document.createDocumentFragment()}),text:function(t,e){return document.createTextNode(e||"")},circle:L,ellipse:L,g:L,glyph:L,image:L,line:L,rect:L,use:L,path:L,pattern:L,polygon:L,polyline:L,svg:L,default:y(Ut,{string:function(t,e){let n=document.createElement(t);return n.innerHTML=e,n},object:function(t,e){let n=document.createElement(t);return typeof e.length=="number"?n.append.apply(n,e):mt(n,e),n},default:t=>{if(typeof t!="string")throw new Error('create(tag, content) accepts only a string as tag "'+typeof t+'"');return document.createElement(t)}})}),b=rn;function ht(t,e,n){let o;typeof n!="string"&&n.input!==void 0&&n.index!==void 0&&(o=n,n=o.input.slice(n.index+n[0].length+(n.consumed||0)));let r=t.exec(n);if(!r)return;let i=e(r);return o&&(o.consumed=(o.consumed||0)+r.index+r[0].length+(r.consumed||0)),i}var fr=w(ht,!0);function sn(t,e,n){throw n.input!==void 0&&n.index!==void 0&&(n=n.input),new Error('Cannot parse string "'+n+'"')}function cn(t,e,n){let o=-1;for(;++ocn(e,n,i),o);return r===void 0?e.catch?e.catch(n,o):sn(t,e,o):r}var qt=w(un,!0);var gt=v;var k=Symbol("internals"),A=Symbol("shadow"),Wt=Object.defineProperties,ln={a:HTMLAnchorElement,dl:HTMLDListElement,p:HTMLParagraphElement,br:HTMLBRElement,fieldset:HTMLFieldSetElement,hr:HTMLHRElement,img:HTMLImageElement,li:HTMLLIElement,ol:HTMLOListElement,optgroup:HTMLOptGroupElement,q:HTMLQuoteElement,textarea:HTMLTextAreaElement,td:HTMLTableCellElement,th:HTMLTableCellElement,tr:HTMLTableRowElement,tbody:HTMLTableSectionElement,thead:HTMLTableSectionElement,tfoot:HTMLTableSectionElement,ul:HTMLUListElement},an={name:{set:function(t){return this.setAttribute("name",t)},get:function(){return this.getAttribute("name")||""}},form:{get:function(){return this[k].form}},labels:{get:function(){return this[k].labels}},validity:{get:function(){return this[k].validity}},validationMessage:{get:function(){return this[k].validationMessage}},willValidate:{get:function(){return this[k].willValidate}},checkValidity:{value:function(){return this[k].checkValidity()}},reportValidity:{value:function(){return this[k].reportValidity()}}},pn={},$t={once:!0},fn=0,Nt=!1;function dn(t){return ln[t]||window["HTML"+t[0].toUpperCase()+t.slice(1)+"Element"]||(()=>{throw new Error('Constructor not found for tag "'+t+'"')})()}var mn=qt(/^\s*?\s*$|^\s*?\s*$/,{1:(t,e)=>({name:e[1]}),2:(t,e)=>({name:e[3],tag:e[2]}),catch:function(t,e){throw new SyntaxError(`dom element() – name must be of the form 'element-name' or 'tag is="element-name"' (`+e+")")}},null);function hn(t,e){if(t.hasOwnProperty(e)){let n=t[e];delete t[e],t[e]=n}return t}function gn(t,e,n){t._initialLoad=!0;let o=t.attachShadow({mode:e.mode||"closed",delegatesFocus:e.focusable||!1});if(n){let r=b("link",{rel:"stylesheet",href:n});o.append(r)}return t[A]=o,o}function wn(t){var e;if(t.attachInternals){if(e=t.attachInternals(),e.setFormValue)return e}else e={shadowRoot:t.shadowRoot};return e.input=b("input",{type:"hidden",name:t.name}),t.appendChild(e.input),e.setFormValue=function(n){this.input.value=n},e}function vn(t){t._initialAttributes={},t._n=0}function yn(t,e,n){let o=t._initialAttributes;for(;t._nfn?gn(p,e,o||e.stylesheet):void 0,c=a.formAssociated&&wn(p);return i&&(Nt=!0),e.construct&&e.construct.call(p,u,c),l&&(vn(p),Promise.resolve(1).then(function(){Xt(p,a.observedAttributes,l)})),f&&Object.keys(f).reduce(hn,p),p}return a.prototype=Object.create(s.prototype,f),f&&f.value&&(a.formAssociated=!0,Wt(a.prototype,an),(e.enable||e.disable)&&(a.prototype.formDisabledCallback=function(p){return p?e.disable&&e.disable.call(this,this[A],this[k]):e.enable&&e.enable.call(this,this[A],this[k])}),e.reset&&(a.prototype.formResetCallback=function(){return e.reset.call(this,this[A],this[k])}),e.restore&&(a.prototype.formStateRestoreCallback=function(){return e.restore.call(this,this[A],this[k])})),l&&(a.observedAttributes=Object.keys(l),a.prototype.attributeChangedCallback=function(p,u,c){if(!this._initialAttributes)return l[p].call(this,c);this._initialAttributes[p]=c,yn(this,a.observedAttributes,l)}),a.prototype.connectedCallback=function(){let p=this,u=p[A],c=p[k];if(p._initialAttributes&&Xt(p,a.observedAttributes,l),p._initialLoad){let E=u.querySelectorAll('link[rel="stylesheet"]');if(E.length){let ze=0,lt=E.length,Ht=function(Ue){++ze>=E.length&&(delete p._initialLoad,e.load&&(gt("element()","loaded",Array.from(E).map(Ve=>Ve.href).join(` -`)),e.load.call(p,u)))},_e=Ht;for(;lt--;)E[lt].addEventListener("load",Ht,$t),E[lt].addEventListener("error",_e,$t);e.connect&&e.connect.call(this,u,c)}else e.connect&&e.connect.call(this,u,c),e.load&&e.load.call(this,u,c)}else e.connect&&e.connect.call(this,u,c)},e.disconnect&&(a.prototype.disconnectedCallback=function(){return e.disconnect.call(this,this[A],this[k])}),gt("element()","<"+(i?i+" is="+r:r)+">"),window.customElements.define(r,a,i&&{extends:i}),i&&!Nt&&document.querySelectorAll('[is="'+r+'"]').forEach(p=>{Wt(p,f),e.construct&&e.construct.apply(p);let u;for(u in l){let c=p.attributes[u];c&&l[u].call(p,c.value)}e.connect&&e.connect.apply(p)}),a}function Kt(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object")return!1;let n=Object.keys(t),o=Object.keys(e),r=n.length;for(;r--;){if(t[n[r]]===void 0){if(e[n[r]]!==void 0)return!1}else if(!e.hasOwnProperty(n[r])||!Kt(t[n[r]],e[n[r]]))return!1;let i=o.indexOf(n[r]);i>-1&&o.splice(i,1)}for(r=o.length;r--;)if(e[o[r]]===void 0){if(t[o[r]]!==void 0)return!1}else return!1;return!0}var Zt=w(Kt,!0);function En(t,e){return e[t]}var D=w(En,!0);var Sn=Object.freeze;function Qt(){return this}var P=Sn({shift:v,push:v,forEach:v,join:function(){return""},map:Qt,filter:Qt,includes:function(){return!1},reduce:function(t,e){return e},length:0,each:v,pipe:S,start:v,stop:v,done:v,valueOf:function(){return null}});function vt(){return this}function yt(t){return t&&t[Symbol.iterator]}var Tn=Object.assign;function Ln(t){return t.stop?t.stop():t()}function kn(t){t.forEach(Ln),t.length=0}function B(){}Tn(B.prototype,{stop:function(){return this.stopables&&kn(this.stopables),this},done:function(e){return(this.stopables||(this.stopables=[])).push(e),this}});var Pn=Object.assign;function X(t){B.prototype.stop.apply(t);let e=-1,n;for(;n=t[++e];)t[e]=void 0,X(n)}function m(){}Pn(m.prototype,{pipe:function(t){return this[0]=t,t},stop:function(){return X(this[0]),this}});var F=Object.assign,O=Object.create;function z(t,e){e!==void 0&&t[0].push(e)}function Fn(t,e){if(t[1]){let n=-1;for(;t[++n]&&t[n]!==e;);for(;t[n++];)t[n-1]=t[n];X(e)}else t.stop()}function h(t){this.input=t}F(h.prototype,B.prototype,{push:function(t){z(this,t)},pipe:function(t){if(this[0])throw new Error("Stream: Attempt to .pipe() a unicast stream multiple times. Create a multicast stream with stream.broadcast().");return this[0]=t,this.input.pipe(this),t},map:function(t){return new Jt(this,t)},filter:function(t){return new te(this,t)},chunk:function(t){return new ne(this,t)},flatMap:function(t){return new ee(this,t)},take:function(t){return new oe(this,t)},each:function(t){return new se(this,t)},reduce:function(t,e){return new re(this,t,e)},scan:function(t,e){return new ie(this,t,e)},stop:function(){return Fn(this.input,this),this}});function Jt(t,e){this.input=t,this.fn=e}Jt.prototype=F(O(h.prototype),{push:function(e){let n=this.fn;z(this,n(e))}});function te(t,e){this.input=t,this.fn=e}te.prototype=F(O(h.prototype),{push:function(e){this.fn(e)&&z(this,e)}});function ee(t,e){this.input=t,this.fn=e}ee.prototype=F(O(h.prototype),{push:function(e){let o=this.fn(e);if(o!==void 0)if(yt(o))for(let r of o)z(this,r);else throw new Error("Stream: Cannot .flatMap() non-iterable values")}});function ne(t,e){this.input=t,this.chunk=[],typeof e=="number"?this.n=e:typeof e=="function"&&(this.fn=e)}ne.prototype=F(O(h.prototype),{fn:function(t){return t.length===this.n},push:function(e){let n=this.chunk;n.push(e),this.fn(n)&&(z(this,n),this.chunk=[])}});function oe(t,e){this.input=t,this.count=e}oe.prototype=F(O(h.prototype),{push:function(e){this[0].push(e),--this.count||this.stop()}});function re(t,e,n){return this.input=t,this.fn=e,this.value=n,this.i=0,t.pipe(this),n}re.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t,this.i++,this)}});function ie(t,e,n){this.input=t,this.fn=e,this.value=n}ie.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t),this[0].push(this.value)}});function se(t,e){this.input=t,this.push=e,t.pipe(this)}se.prototype=F(O(h.prototype),{each:null,reduce:null,pipe:null});var On=Array.prototype,An=Object.assign,Cn=Object.create;function _(t){this.buffer=t||[]}_.prototype=An(Cn(h.prototype),m.prototype,{push:function(t){t!==void 0&&this.buffer.push(t)},pipe:function(t){for(this[0]=t;this.buffer.length;)this[0].push(On.shift.apply(this.buffer));return this.buffer=this[0],t}});var In=Object.assign,jn=Object.create;function R(t,e){this.input=t,this.memory=!!(e&&e.memory),e&&e.hot&&this.pipe(P)}R.prototype=In(jn(h.prototype),{push:function(t){if(t!==void 0){this.memory&&(this.value=t);let e=-1;for(;this[++e];)this[e].push(t)}},pipe:function(t){let e=-1;for(;this[++e];);return this[e]=t,this.value!==void 0&&t.push(this.value),e===0&&this.input.pipe(this),t}});var Hn=Object.assign;function Y(t){this.promise=t}Hn(Y.prototype,m.prototype,{pipe:function(t){let e=this.promise;this[0]=t,e.then(n=>this[0].push(n)).finally(n=>this.stop())},stop:function(){m.prototype.stop.apply(this,arguments),this[0]=P}});var ue=Object.assign,le=Object.keys;function ce(t,e,n){let o=t.values,r=t.names,i=t[0];o[e]=n,(t.active||(t.active=le(o).length===r.length))&&i.push(ue({},o))}function K(t){this.inputs=t,this.active=!1}ue(K.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this.values={},this.names=le(e),this[0]=t;for(let n in e){let o=e[n];o.pipe?t.done(o.each(r=>ce(this,n,r))):o.then?o.then(r=>ce(this,n,r)):console.log("Todo: combine() raw values ?")}}});var Mn=Object.assign;function Z(t){this.inputs=t}Mn(Z.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this[0]=t;let n=-1,o;for(;o=e[++n];)if(o.pipe)o.pipe(t);else if(o.then)o.then(r=>t.push(r));else{let r=-1;for(;++r0}function Gn(t,e,n){return t[n]=e.shift(),t}function zn(t){return[]}function bt(t,e,n,o){n.push(o),e.every(Bn)&&t.push(e.reduce(Gn,{}))}function Q(t){this.inputs=t,this.buffers=xt.map.call(t,zn)}Dn(Q.prototype,m.prototype,{pipe:function(t){let e=this.inputs,n=this.buffers;this[0]=t,xt.forEach.call(e,(o,r)=>{let i=n[r];o.each?t.done(o.each(s=>bt(t,n,i,s))):o.then?o.then(s=>bt(t,n,i,s)):xt.forEach.call(o,s=>bt(t,n,i,s))})},stop:function(){let t=this.inputs,e=-1,n;for(;n=t[++e];)n.stop();return m.prototype.stop.apply(this,arguments)}});var _n=Array.prototype,ae=Object.assign;function Rn(t){throw new TypeError("Stream: invalid source object cannot be read into stream")}var g=ae(h,{of:function(){return new _(_n.slice.apply(arguments))},from:function(t){return t.pipe?new h(t):t.then?new h(new Y(t)):typeof t.length=="number"?new _(t):Rn(t)},broadcast:function(e){return new R(P,e)},combine:function(e){return new h(new K(e))},merge:function(){return new h(new Z(arguments))},zip:function(){return new h(new Q(arguments))}});ae(h.prototype,{log:vt,broadcast:function(t){return new R(this,t)}});var Un=Object.assign,Vn=/\s+/,pe={fullscreenchange:"fullscreenElement"in document?"fullscreenchange":"webkitFullscreenElement"in document?"webkitfullscreenchange":"fullscreenchange"};function fe(t){return t.which===1&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}var de=0;window.addEventListener("click",t=>de=t.timeStamp);function qn(t,e){return t.node.addEventListener(pe[e]||e,t,t.options),t}function Wn(t,e){return t.node.removeEventListener(pe[e]||e,t),t}function me(t,e,n){this.types=t.split(Vn),this.options=e,this.node=n,this.select=e&&e.select}Un(me.prototype,m.prototype,{pipe:function(t){this[0]=t,this.types.reduce(qn,this)},handleEvent:function(t){if(!(t.type==="click"&&t.timeStamp<=de)){if(this.select){let e=t.target.closest(this.select);if(!e)return;t.selectedTarget=e}this[0].push(t)}},stop:function(){this.types.reduce(Wn,this),m.prototype.stop.apply(this,arguments)}});function x(t,e){let n;return typeof t=="object"&&(n=t,t=n.type),new g(new me(t,n,e))}function Et(t){return typeof t}var $n=/^\s*([+-]?\d*\.?\d+)([^\s\d]*)\s*$/;function Nn(t,e){if(typeof e=="number")return e;var n=$n.exec(e);if(!n||!t[n[2]||""]){if(!t.catch)throw new Error('Cannot parse value "'+e+'" with provided units '+Object.keys(t).join(", "));return n?t.catch(parseFloat(n[1]),n[2]):t.catch(parseFloat(e))}return t[n[2]||""](parseFloat(n[1]))}var J=w(Nn);var Xn=/px$/,he={"transform:translateX":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[4])},"transform:translateY":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[5])},"transform:scale":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.sqrt(o*o+r*r)},"transform:rotate":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.atan2(r,o)}};function tt(t){return t.split("(")[1].split(")")[0].split(/\s*,\s*/)}function U(t,e){return window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):0}function et(t,e){if(he[t])return he[t](e);var n=U(t,e);return typeof n=="string"&&Xn.test(n)?parseFloat(n):n}var nt,ot;function Yn(){if(!nt){let t=document.documentElement.style.fontSize;document.documentElement.style.fontSize="100%",nt=et("font-size",document.documentElement),document.documentElement.style.fontSize=t||""}return nt}function Kn(){return ot||(ot=et("font-size",document.documentElement)),ot}window.addEventListener("resize",()=>{nt=void 0,ot=void 0});var C=y(Et,{number:S,string:J({em:function(t){return Yn()*t},px:function(t){return t},rem:function(t){return Kn()*t},vw:function(t){return window.innerWidth*t/100},vh:function(t){return window.innerHeight*t/100},vmin:function(t){return window.innerWidthn?o:n}n=nq.maxScrollInterval?q.maxScrollInterval:1.4*n}function it(){return ye}function xe(t){let e=T(t),n=window.getComputedStyle(t,null),o=C(n.getPropertyValue("padding-left")),r=C(n.getPropertyValue("padding-right"));return e.leftPadding=e.left+o,e.rightPadding=e.left+e.width-r,e.centrePadding=e.leftPadding+(e.width-o-r)/2,e}function Ee(t){let e=window.getComputedStyle(t,null).getPropertyValue("scroll-snap-align");return e.endsWith("start")?"left":e.endsWith("end")?"right":"centre"}function Se(t,e,n){let o=xe(t),r=T(e),i=Ee(e);t.scrollTo({top:t.scrollTop,left:t.scrollLeft+(i==="left"?r.left-o.leftPadding:i==="right"?r.right-o.rightPadding:r.left+r.width/2-o.centrePadding),behavior:n})}function Te(t,e){return Se(t,e,"smooth"),e}function I(t,e){return t.style.setProperty("scroll-behavior","auto","important"),Se(t,e,"auto"),t.style.setProperty("scroll-behavior",""),e}function Le(t,e){let{leftPadding:n,rightPadding:o,centrePadding:r}=xe(t),i=e.length,s;for(;s=e[--i];){let l=T(s);if(!l)continue;let f=Ee(s),a=l.width/2+(f==="left"?n:f==="right"?o:r);if((f==="left"?l.left:f==="right"?l.right:l.left+l.width/2)<=a)break}return s}function ke(t){return!!t.dataset.slideIndex}function Pe(t){let{scroller:e,elements:n,children:o}=t,r=Le(e,n);return ke(r)?o[r.dataset.slideIndex]:r}function Fe(t){let{scroller:e,children:n,elements:o}=t,r=Le(e,o),i;!r||(ke(r)?(i=n[r.dataset.slideIndex],I(e,i)):i=r,t.activations.push(i))}function to(t,e){t.style.setProperty("scroll-snap-type",""),e.stop()}var Oe=y((t,e)=>e.type,{pointerdown:function(t,e){return t.e0=e,t.x0=e.clientX,t.y0=e.clientY,t},pointermove:function(t,e){let n=e.clientX,o=e.clientY;if(!t.gesturing){if(Math.abs(n-t.x0)(clearTimeout(s),setTimeout(to,it()*1e3,n,a)))}return t.gesturing=!1,t.e0=void 0,t.x0=void 0,t.y0=void 0,t.pointers=void 0,t.scrollLeft0=void 0,t}});var eo=Object.assign,no={capture:!0,passive:!0};function oo(t,e){t.timer=void 0,t.stream.push(e);let n=t.times;n.length>1&&be(n),n.length=0}function Ae(t){this.element=t,this.times=[]}eo(Ae.prototype,m.prototype,{pipe:function(t){this.stream=t,this.element.addEventListener("scroll",this,no)},handleEvent:function(t){let e=t.timeStamp/1e3;this.times.push(e),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(oo,it()*1e3,this,t)},stop:function(){this.element.removeEventListener("scroll",this),m.prototype.stop.apply(this,arguments)}});function kt(t){return new g(new Ae(t))}function ro(t,e,n){let o=n.length,r=-1/0;for(;o--;){let a=T(n[o]),p=a.x+a.width;r=p>r?p:r}let i=T(e),s=getComputedStyle(t),l=C(s.paddingLeft||0),f=C(s.paddingRight||0);return l+f+r-i.x}function io(t,e,n){let o=ro(t,e,n);t.style.setProperty("--scroll-width",o+"px")}function so(t){return!t.dataset.slideIndex}var Ce={construct:function(t){let e=b("slot",{part:"slides"}),n=b("div",{class:"scroller",children:[e]}),o=b("nav",{part:"controls",children:[b("slot",{name:"controls"})]});t.append(n,o);let r=g.of().broadcast({memory:!0}),i=g.combine({host:r,elements:x("slotchange",e).map(c=>u.elements=e.assignedElements())}).broadcast({memory:!0}),s=i.map(c=>{let E=c.elements.filter(so);return Zt(u.children,E)?void 0:u.children=E}).broadcast({memory:!0,hot:!0}),l=g.of(),f=g.of(),a=f.map(c=>c.dataset.slideIndex?u.children[c.dataset.slideIndex]:c).filter(c=>u.active!==c&&Lt("slide-active",c)).map(c=>u.active=c).broadcast({memory:!0,hot:!0}),p=x("click",t).filter(fe).broadcast(),u=this[d]={clickSuppressTime:-1/0,host:this,style:window.getComputedStyle(this),elements:P,children:P,scroller:n,slides:e,controls:o,load:r,views:l,activations:f,actives:a,slotchanges:i,mutations:s,clicks:p};g.merge(i,x("resize",window)).each(c=>io(n,e,u.elements)),i.map(c=>c.elements.includes(u.active)?u.active:u.children[0]).map(c=>I(n,c)).pipe(f),g.combine({host:r,child:l}).map(c=>u.elements.includes(c.child)&&u.active!==c.child?c.child:void 0).map(c=>u.active?Te(n,c):I(n,c)).pipe(f),kt(n).filter(()=>!u.gesturing).each(c=>Fe(u)),Tt({threshold:"0.25rem",device:"mouse"},t).filter(()=>u.children.length>1).each(c=>{u.pointers=c,c.reduce(Oe,u)}),p.each(c=>{c.timeStamp-u.clickSuppressTime<120&&(c.preventDefault(),c.stopPropagation())}),x("fullscreenchange",window).each(c=>{(c.target===this||c.target.contains(this))&&I(n,u.active)}),x("focusin",this).map(c=>u.children.indexOf(c.target)!==-1?c.target:u.children.find(E=>E.contains(c.target))).pipe(l),x("keydown",this).filter(()=>document.activeElement===this||this.contains(document.activeElement)).map(y(D("keyCode"),{37:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)-1]),39:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)+1]),default:v})).pipe(l)},load:function(t){this[d].load.push(this)}};function st(t,e){function n(o,r){if(t.getState(o)!==r)return t[r?"enable":"disable"](o)}return{attribute:function(o){return n(this,o!==null)},set:function(o){return n(this,!!o)},get:function(){return t.getState(this)}}}function Pt(t,e){t.remove&&t.remove(e);let n;for(;(n=t.indexOf(e))!==-1;)t.splice(n,1);return e}var as=w(Pt,!0);var co=Object.assign;function W(t,e){this.element=t,this.definitions=e,this.tokens=[]}co(W.prototype,{contains:function(t){return this.tokens.includes(t)},add:function(){let t=arguments.length;for(;t--;){let e=arguments[t];!this.tokens.includes(e)&&this.definitions[e]&&(this.definitions[e].enable(this.element),this.tokens.push(e))}},remove:function(){let t=arguments.length;for(;t--;){let e=arguments[t];this.tokens.includes(e)&&(this.definitions[e].disable(this.element),Pt(this.tokens,e))}},supports:function(t){return!!this.definitions[t]}});var uo=Array.prototype;function lo(t,e){let n=t.tokens.slice(),o=uo.slice.apply(e),r=n.length;for(;r--;)o.includes(n[r])&&n.splice(r,1);t.remove.apply(t,n),t.add.apply(t,o)}function Ft(t){let e=Symbol("TokenList");function n(o,r){let i=o[e]||(o[e]=new W(o,t));lo(i,r.trim().split(/\s+/))}return{attribute:function(o){n(this,o||"")},set:function(o){n(this,o+"")},get:function(){return this[e]||(this[e]=new W(this,t))}}}var Ot={};G(Ot,{disable:()=>ho,enable:()=>mo,getState:()=>go});var ao=J({s:S,ms:t=>t/1e3});function po(t){let{active:e,children:n,elements:o,host:r}=t,i=o.indexOf(e),s=o[i+1]||n[0];t.autoplay.timer=null,!!s&&(r.active=s)}function fo(t){let{active:e,style:n}=t,o=ao(window.getComputedStyle(e).getPropertyValue("--slide-duration")||n.getPropertyValue("--slide-duration"));clearTimeout(t.autoplay.timer),t.autoplay.timer=setTimeout(po,o*1e3,t)}function Ie(t){clearTimeout(t.autoplay.timer),t.autoplay.timer=null}function mo(t){let e=t[d],{actives:n}=e,o=e.autoplay={},r=g.merge([!1],x("pointerenter pointerleave",t).map(s=>s.type==="pointerenter")),i=g.merge([t.contains(document.activeElement)],x("focusin focusout",t).map(y(D("type"),{focusin:s=>!0,focusout:s=>t.contains(s.relatedTarget)}))).map((s=>l=>s===l?void 0:s=l)());o.updates=g.combine({active:n,hover:r,focus:i}).each(s=>s.hover||s.focus?Ie(e):fo(e))}function ho(t){let e=t[d];Ie(e),e.autoplay.updates.stop(),e.autoplay=void 0}function go(t){return!!t[d].autoplay}var At={};G(At,{disable:()=>yo,enable:()=>vo,getState:()=>bo});function je(t,e){let n=t.cloneNode(!0);return n.dataset.slideIndex=e,n.removeAttribute("id"),n.setAttribute("aria-hidden","true"),n.tabIndex="-1",n}function wo(t){let{active:e,children:n,host:o,scroller:r}=t;if(t.loop.prepends&&(t.loop.prepends.forEach(c=>c.remove()),t.loop.appends.forEach(c=>c.remove()),t.loop.prepends=void 0,t.loop.appends=void 0),n.length<2){t.elements=t.slides.assignedElements();return}let i=o.clientWidth,s=n.map(T),l=s[1].left,f=s[s.length-2].right,a=1;for(;s[++a]&&s[a].leftf-i;);let u=n.slice(++a).map((c,E)=>je(c,a+E));o.prepend.apply(o,u),o.append.apply(o,p),t.loop.prepends=u,t.loop.appends=p,t.elements=t.slides.assignedElements(),I(r,e||n[0])}function vo(t){let e=t[d],{mutations:n}=e,o=e.loop={};o.renders=n.each(r=>wo(e))}function yo(t){let e=t[d];e.loop&&(e.loop.prepends&&e.loop.prepends.forEach(n=>n.remove()),e.loop.appends&&e.loop.appends.forEach(n=>n.remove()),e.loop.renders.stop(),e.loop=void 0)}function bo(t){return!!t[d].loop}var Ct={};G(Ct,{disable:()=>Eo,enable:()=>xo,getState:()=>So});function j(t){if(typeof t!="object"||arguments.length>1)throw new Error("delegate() now takes an object of selector:fn pairs.");let e=Object.keys(t);return function(o){let r=o.target,i=-1;for(;e[++i];){let s=r.closest(e[i]);if(s)return t[e[i]](s,...arguments)}}}function He(t,e,n,o){o===0?t.hidden=!0:t.hidden=!1,o===n.length-1?e.hidden=!0:e.hidden=!1}function xo(t){let e=t[d],{actives:n,clicks:o,slotchanges:r}=e,i=e.navigation={prev:b("button",{part:"prev-button",type:"button",name:"navigation",value:"-1",html:"Previous"}),next:b("button",{part:"next-button",type:"button",name:"navigation",value:"1",html:"Next"})};e.controls.prepend(i.prev,i.next),i.updates=g.combine({active:n,changes:r}).each(s=>He(i.prev,i.next,s.changes.elements,s.changes.elements.indexOf(s.active))),i.clicks=o.each(j({'[name="navigation"]':function(s,l){let f=parseFloat(s.value),a=e.elements.indexOf(e.active)+f,p=e.elements[a];!p||(t.active=p,He(i.prev,i.next,e.elements,a))}}))}function Eo(t){let e=t[d];e.navigation.prev.remove(),e.navigation.next.remove(),e.navigation.updates.stop(),e.navigation.clicks.stop(),e.navigation=void 0}function So(t){return!!t[d].navigation}var It={};G(It,{disable:()=>ko,enable:()=>Lo,getState:()=>Po});function Me(t,e,n){let{active:o,buttons:r,index:i}=t;if(o===n)return;i>-1&&(t.activeSpan.remove(),r.children[i].part.remove("page-button-active"));let s=e.indexOf(n);s!==-1&&(r.children[s].part.add("page-button-active"),r.children[s].append(t.activeSpan),t.index=s,t.active=n)}function To(t,e,n,o){return e.buttons&&(e.buttons.remove(),e.buttons=void 0),o.length<2||(e.buttons=b("div",{part:"pagination",children:o.map((r,i)=>b("button",{part:"page-button",type:"button",name:"pagination",value:i}))}),t.append(e.buttons)),o.length}function Lo(t){let e=t[d],{shadow:n,actives:o,clicks:r,mutations:i}=e,s=e.pagination={activeSpan:b("span",{class:"invisible",text:"(Current slide)"})};s.mutations=i.each(()=>To(e.controls,s,n,e.children)),s.updates=g.combine({active:o,children:i}).filter(l=>l.children.length>1).each(l=>Me(s,e.children,e.active)),s.clicks=r.each(j({'[name="pagination"]':function(l,f){let{host:a}=e,p=e.children,u=p[l.value];!u||(a.active=u,Me(s,p,u))}}))}function ko(t){let e=t[d];e.pagination.buttons.remove(),e.pagination.mutations.stop(),e.pagination.updates.stop(),e.pagination.clicks.stop(),e.pagination=void 0}function Po(t){return!!t[d].pagination}var jt={};G(jt,{disable:()=>Oo,enable:()=>Fo,getState:()=>Ao});var De=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled;function ct(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement}function Be(t){return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():void 0}function ut(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}function Fo(t){let e=t[d];if(!De)return;let n=e.fullscreen={button:b("button",{part:"fullscreen-button",type:"button",name:"fullscreen",html:"Open in fullscreen"})};e.controls.append(n.button),n.changes=x("fullscreenchange",t).filter(o=>ct()===t).each(o=>{n.button.part.add("fullscreen-button-active"),n.button.innerHTML="Close fullscreen",document.activeElement!==t&&(n.tabIndex=t.tabIndex,t.tabIndex<0&&(t.tabIndex=0),t.focus());let r=x("fullscreenchange",t).each(i=>{n.button.part.remove("fullscreen-button-active"),n.button.innerHTML="Open in fullscreen",t.tabIndex=n.tabIndex,n.tabIndex=void 0,r.stop()})}),n.clicks=e.clicks.each(j({'[name="fullscreen"]':(o,r)=>{let i=ct();if(i===t){ut();return}i&&ut(),Be(t)}}))}function Oo(t){let e=t[d];ct()===t&&ut(),e.fullscreen.button.remove(),e.fullscreen.clicks.stop(),e.fullscreen.changes.stop(),e.fullscreen=void 0}function Ao(t){return!!t[d].fullscreen}var Ge={active:{attribute:function(t){this.active=t},set:function(t){let e=this[d],n=typeof t=="object"?t:/^\d/.test(t+"")?this.querySelector("#\\3"+(t+"")[0]+" "+(t+"").slice(1)):/^\#/.test(t+"")?this.querySelector(t):this.querySelector("#"+t);e.views.push(n)},get:function(){return this[d].active}},autoplay:st(Ot,"autoplay"),controls:Ft({navigation:Ct,pagination:It,fullscreen:jt}),loop:st(At,"loop")};var Co=import.meta.url.replace(/\/[^\/]*\.js/,"/slide-show-shadow.css"),Js=wt('
                ',Ce,Ge,Co);export{Js as default}; +var qe=Object.defineProperty;var Dt=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable;var Bt=(t,e)=>{var n={};for(var o in t)We.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&Dt)for(var o of Dt(t))e.indexOf(o)<0&&Ne.call(t,o)&&(n[o]=t[o]);return n};var z=(t,e)=>{for(var n in e)qe(t,n,{get:e[n],enumerable:!0})};function $(t){var e=new Map;return function(o){if(e.has(o))return e.get(o);var r=t(o);return e.set(o,r),r}}var $e=Array.prototype;function Xe(t,e){return typeof t=="function"?t.apply(null,e):t}function Gt(t,e,n){n=n||t.length;var o=n===1?e?t:$(t):$(function(r){return Gt(function(){var i=[r];return i.push.apply(i,arguments),t.apply(null,i)},e,n-1)});return function r(i){return arguments.length===0?r:arguments.length===1?o(i):arguments.length>=n?t.apply(null,arguments):Xe(o(i),$e.slice.call(arguments,1))}}var v=Gt;function Ye(t,e){return 1-Math.pow(1-e,t)}var zt=v(Ye);function y(){}function pt(t,e){return e(t)}function S(t){return t}var Ke=Array.prototype;function ft(){let t=arguments;return t.length?e=>Ke.reduce.call(t,pt,e):S}function dt(t,e,n){return n*(e-t)+t}var Ze=window.performance,_t=window.requestAnimationFrame,Qe=window.cancelAnimationFrame;function mt(t,e,n){var o=Ze.now();function r(s){var a=(s-o)/(t*1e3);a<1?(a>0&&e(a),i=_t(r)):(e(1),n&&n())}var i=_t(r);return function(){Qe(i)}}function X(t,e,n,o,r,i){let s=o[n];return mt(t,ft(e,a=>dt(s,r,a),a=>o[n]=a),i)}function Je(){return{x:0,y:0,left:0,top:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}}function T(t){return t===window?Je():t.getClientRects()[0]||t.getBoundingClientRect()}var M={scrollDuration:.3,scrollDurationPerHeight:.125,scrollTransform:zt(3)},Rt=y;function tn(t,e){if(e.behavior==="smooth"){let n=t.style.getPropertyValue("scroll-snap-type"),o=()=>{let r=t.scrollLeft,i=t.scrollTop;t.style.setProperty("scroll-snap-type",n),t.scrollLeft=r,t.scrollTop=i};if(t.style.setProperty("scroll-snap-type","none"),e.left!==void 0){let r=t===document.body?window.innerWidth:T(t).width,i=M.scrollDuration+M.scrollDurationPerHeight*Math.abs(e.left-t.scrollLeft)/r;Rt=X(i,M.scrollTransform,"scrollLeft",t,e.left,o)}else{let r=t===document.body?window.innerHeight:T(t).height,i=M.scrollDuration+M.scrollDurationPerHeight*Math.abs(e.top-t.scrollTop)/r;Rt=X(i,M.scrollTransform,"scrollTop",t,e.top,o)}}else e.left!==void 0&&(t.scrollLeft=e.left),e.top!==void 0&&(t.scrollTop=e.top)}if(!("scrollBehavior"in document.documentElement.style)){window.console&&console.log("Polyfilling Element.scrollTo(options)");let t="scrollTo"in Element.prototype?Element:HTMLElement,e=t.scrollIntoView;t.prototype.scrollTo=function(n){typeof n=="object"?tn(this,n):e.apply(this,arguments)}}function b(t,e){return function(){let o=t.apply(this,arguments),r=e[o]||e.default;if(!r)throw new Error('overload() no handler for "'+o+'"');return r.apply(this,arguments)}}var en=b(S,{is:y,tag:y,html:function(t,e,n){e.innerHTML=n},text:function(t,e,n){e.textContent=n},children:function(t,e,n){e.innerHTML="",n.forEach(o=>{e.appendChild(o)})},points:D,cx:D,cy:D,r:D,preserveAspectRatio:D,viewBox:D,default:function(t,e,n){t in e?e[t]=n:e.setAttribute(t,n)}});function D(t,e,n){e.setAttribute(t,n)}function nn(t,e){for(var n=Object.keys(e),o=n.length;o--;)en(n[o],t,e[n[o]]);return t}var ht=v(nn,!0);var on="http://www.w3.org/2000/svg",Ut=document.createElement("div");var Vt=(t,e)=>e&&typeof e;function qt(t,e){let n=document.createRange();return n.selectNode(t),n.createContextualFragment(e)}function L(t,e){var n=document.createElementNS(on,t);return e&&(n.innerHTML=e),n}var rn=b(S,{comment:function(t,e){return document.createComment(e||"")},fragment:b(Vt,{string:function(t,e,n){if(n)return qt(n,e);let o=document.createDocumentFragment();Ut.innerHTML=e;let r=Ut.childNodes;for(;r[0];)o.appendChild(r[0]);return o},object:function(t,e,n){let o=n?qt(n):document.createDocumentFragment();return typeof e.length=="number"?o.append.apply(o,e):ht(o,e),o},default:()=>document.createDocumentFragment()}),text:function(t,e){return document.createTextNode(e||"")},circle:L,ellipse:L,g:L,glyph:L,image:L,line:L,rect:L,use:L,path:L,pattern:L,polygon:L,polyline:L,svg:L,default:b(Vt,{string:function(t,e){let n=document.createElement(t);return n.innerHTML=e,n},object:function(t,e){let n=document.createElement(t);return typeof e.length=="number"?n.append.apply(n,e):ht(n,e),n},default:t=>{if(typeof t!="string")throw new Error('create(tag, content) accepts only a string as tag "'+typeof t+'"');return document.createElement(t)}})}),x=rn;function gt(t,e,n){let o;typeof n!="string"&&n.input!==void 0&&n.index!==void 0&&(o=n,n=o.input.slice(n.index+n[0].length+(n.consumed||0)));let r=t.exec(n);if(!r)return;let i=e(r);return o&&(o.consumed=(o.consumed||0)+r.index+r[0].length+(r.consumed||0)),i}var fr=v(gt,!0);function sn(t,e,n){throw n.input!==void 0&&n.index!==void 0&&(n=n.input),new Error('Cannot parse string "'+n+'"')}function cn(t,e,n){let o=-1;for(;++ocn(e,n,i),o);return r===void 0?e.catch?e.catch(n,o):sn(t,e,o):r}var Wt=v(un,!0);var wt=y;var k=Symbol("internals"),A=Symbol("shadow"),Nt=Object.defineProperties,ln={a:HTMLAnchorElement,dl:HTMLDListElement,p:HTMLParagraphElement,br:HTMLBRElement,fieldset:HTMLFieldSetElement,hr:HTMLHRElement,img:HTMLImageElement,li:HTMLLIElement,ol:HTMLOListElement,optgroup:HTMLOptGroupElement,q:HTMLQuoteElement,textarea:HTMLTextAreaElement,td:HTMLTableCellElement,th:HTMLTableCellElement,tr:HTMLTableRowElement,tbody:HTMLTableSectionElement,thead:HTMLTableSectionElement,tfoot:HTMLTableSectionElement,ul:HTMLUListElement},an={name:{set:function(t){return this.setAttribute("name",t)},get:function(){return this.getAttribute("name")||""}},form:{get:function(){return this[k].form}},labels:{get:function(){return this[k].labels}},validity:{get:function(){return this[k].validity}},validationMessage:{get:function(){return this[k].validationMessage}},willValidate:{get:function(){return this[k].willValidate}},checkValidity:{value:function(){return this[k].checkValidity()}},reportValidity:{value:function(){return this[k].reportValidity()}}},pn={},$t={once:!0},fn=0,Xt=!1;function dn(t){return ln[t]||window["HTML"+t[0].toUpperCase()+t.slice(1)+"Element"]||(()=>{throw new Error('Constructor not found for tag "'+t+'"')})()}var mn=Wt(/^\s*?\s*$|^\s*?\s*$/,{1:(t,e)=>({name:e[1]}),2:(t,e)=>({name:e[3],tag:e[2]}),catch:function(t,e){throw new SyntaxError(`dom element() – name must be of the form 'element-name' or 'tag is="element-name"' (`+e+")")}},null);function hn(t,e){if(t.hasOwnProperty(e)){let n=t[e];delete t[e],t[e]=n}return t}function gn(t,e,n){t._initialLoad=!0;let o=t.attachShadow({mode:e.mode||"closed",delegatesFocus:e.focusable||!1});if(n){let r=x("link",{rel:"stylesheet",href:n});o.append(r)}return t[A]=o,o}function wn(t){var e;if(t.attachInternals){if(e=t.attachInternals(),e.setFormValue)return e}else e={shadowRoot:t.shadowRoot};return e.input=x("input",{type:"hidden",name:t.name}),t.appendChild(e.input),e.setFormValue=function(n){this.input.value=n},e}function vn(t){t._initialAttributes={},t._n=0}function yn(t,e,n){let o=t._initialAttributes;for(;t._nfn?gn(p,e,o||e.stylesheet):void 0,u=l.formAssociated&&wn(p);return i&&(Xt=!0),e.construct&&e.construct.call(p,g,u),a&&(vn(p),Promise.resolve(1).then(function(){Yt(p,l.observedAttributes,a)})),f&&Object.keys(f).reduce(hn,p),p}return l.prototype=Object.create(s.prototype,f),f&&f.value&&(l.formAssociated=!0,Nt(l.prototype,an),(e.enable||e.disable)&&(l.prototype.formDisabledCallback=function(p){return p?e.disable&&e.disable.call(this,this[A],this[k]):e.enable&&e.enable.call(this,this[A],this[k])}),e.reset&&(l.prototype.formResetCallback=function(){return e.reset.call(this,this[A],this[k])}),e.restore&&(l.prototype.formStateRestoreCallback=function(){return e.restore.call(this,this[A],this[k])})),a&&(l.observedAttributes=Object.keys(a),l.prototype.attributeChangedCallback=function(p,g,u){if(!this._initialAttributes)return a[p].call(this,u);this._initialAttributes[p]=u,yn(this,l.observedAttributes,a)}),l.prototype.connectedCallback=function(){let p=this,g=p[A],u=p[k];if(p._initialAttributes&&Yt(p,l.observedAttributes,a),p._initialLoad){let c=g.querySelectorAll('link[rel="stylesheet"]');if(c.length){let H=0,at=c.length,Mt=function(Ue){++H>=c.length&&(delete p._initialLoad,e.load&&(wt("element()","loaded",Array.from(c).map(Ve=>Ve.href).join(` +`)),e.load.call(p,g)))},_e=Mt;for(;at--;)c[at].addEventListener("load",Mt,$t),c[at].addEventListener("error",_e,$t);e.connect&&e.connect.call(this,g,u)}else e.connect&&e.connect.call(this,g,u),e.load&&e.load.call(this,g,u)}else e.connect&&e.connect.call(this,g,u)},e.disconnect&&(l.prototype.disconnectedCallback=function(){return e.disconnect.call(this,this[A],this[k])}),wt("element()","<"+(i?i+" is="+r:r)+">"),window.customElements.define(r,l,i&&{extends:i}),i&&!Xt&&document.querySelectorAll('[is="'+r+'"]').forEach(p=>{Nt(p,f),e.construct&&e.construct.apply(p);let g;for(g in a){let u=p.attributes[g];u&&a[g].call(p,u.value)}e.connect&&e.connect.apply(p)}),l}function Zt(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object")return!1;let n=Object.keys(t),o=Object.keys(e),r=n.length;for(;r--;){if(t[n[r]]===void 0){if(e[n[r]]!==void 0)return!1}else if(!e.hasOwnProperty(n[r])||!Zt(t[n[r]],e[n[r]]))return!1;let i=o.indexOf(n[r]);i>-1&&o.splice(i,1)}for(r=o.length;r--;)if(e[o[r]]===void 0){if(t[o[r]]!==void 0)return!1}else return!1;return!0}var Qt=v(Zt,!0);function En(t,e){return e[t]}var B=v(En,!0);var Sn=Object.freeze;function Jt(){return this}var P=Sn({shift:y,push:y,forEach:y,join:function(){return""},map:Jt,filter:Jt,includes:function(){return!1},reduce:function(t,e){return e},length:0,each:y,pipe:S,start:y,stop:y,done:y,valueOf:function(){return null}});function yt(){return this}function bt(t){return t&&t[Symbol.iterator]}var Tn=Object.assign;function Ln(t){return t.stop?t.stop():t()}function kn(t){t.forEach(Ln),t.length=0}function G(){}Tn(G.prototype,{stop:function(){return this.stopables&&kn(this.stopables),this},done:function(e){return(this.stopables||(this.stopables=[])).push(e),this}});var Pn=Object.assign;function Y(t){G.prototype.stop.apply(t);let e=-1,n;for(;n=t[++e];)t[e]=void 0,Y(n)}function m(){}Pn(m.prototype,{pipe:function(t){return this[0]=t,t},stop:function(){return Y(this[0]),this}});var F=Object.assign,O=Object.create;function _(t,e){e!==void 0&&t[0].push(e)}function Fn(t,e){if(t[1]){let n=-1;for(;t[++n]&&t[n]!==e;);for(;t[n++];)t[n-1]=t[n];Y(e)}else t.stop()}function w(t){this.input=t}F(w.prototype,G.prototype,{push:function(t){_(this,t)},pipe:function(t){if(this[0])throw new Error("Stream: Attempt to .pipe() a unicast stream multiple times. Create a multicast stream with stream.broadcast().");return this[0]=t,this.input.pipe(this),t},map:function(t){return new te(this,t)},filter:function(t){return new ee(this,t)},chunk:function(t){return new oe(this,t)},flatMap:function(t){return new ne(this,t)},take:function(t){return new re(this,t)},each:function(t){return new ce(this,t)},reduce:function(t,e){return new ie(this,t,e)},scan:function(t,e){return new se(this,t,e)},stop:function(){return Fn(this.input,this),this}});function te(t,e){this.input=t,this.fn=e}te.prototype=F(O(w.prototype),{push:function(e){let n=this.fn;_(this,n(e))}});function ee(t,e){this.input=t,this.fn=e}ee.prototype=F(O(w.prototype),{push:function(e){this.fn(e)&&_(this,e)}});function ne(t,e){this.input=t,this.fn=e}ne.prototype=F(O(w.prototype),{push:function(e){let o=this.fn(e);if(o!==void 0)if(bt(o))for(let r of o)_(this,r);else throw new Error("Stream: Cannot .flatMap() non-iterable values")}});function oe(t,e){this.input=t,this.chunk=[],typeof e=="number"?this.n=e:typeof e=="function"&&(this.fn=e)}oe.prototype=F(O(w.prototype),{fn:function(t){return t.length===this.n},push:function(e){let n=this.chunk;n.push(e),this.fn(n)&&(_(this,n),this.chunk=[])}});function re(t,e){this.input=t,this.count=e}re.prototype=F(O(w.prototype),{push:function(e){this[0].push(e),--this.count||this.stop()}});function ie(t,e,n){return this.input=t,this.fn=e,this.value=n,this.i=0,t.pipe(this),n}ie.prototype=F(O(w.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t,this.i++,this)}});function se(t,e,n){this.input=t,this.fn=e,this.value=n}se.prototype=F(O(w.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t),this[0].push(this.value)}});function ce(t,e){this.input=t,this.push=e,t.pipe(this)}ce.prototype=F(O(w.prototype),{each:null,reduce:null,pipe:null});var On=Array.prototype,An=Object.assign,Cn=Object.create;function R(t){this.buffer=t||[]}R.prototype=An(Cn(w.prototype),m.prototype,{push:function(t){t!==void 0&&this.buffer.push(t)},pipe:function(t){for(this[0]=t;this.buffer.length;)this[0].push(On.shift.apply(this.buffer));return this.buffer=this[0],t}});var In=Object.assign,jn=Object.create;function U(t,e){this.input=t,this.memory=!!(e&&e.memory),e&&e.hot&&this.pipe(P)}U.prototype=In(jn(w.prototype),{push:function(t){if(t!==void 0){this.memory&&(this.value=t);let e=-1;for(;this[++e];)this[e].push(t)}},pipe:function(t){let e=-1;for(;this[++e];);return this[e]=t,this.value!==void 0&&t.push(this.value),e===0&&this.input.pipe(this),t}});var Hn=Object.assign;function K(t){this.promise=t}Hn(K.prototype,m.prototype,{pipe:function(t){let e=this.promise;this[0]=t,e.then(n=>this[0].push(n)).finally(n=>this.stop())},stop:function(){m.prototype.stop.apply(this,arguments),this[0]=P}});var le=Object.assign,ae=Object.keys;function ue(t,e,n){let o=t.values,r=t.names,i=t[0];o[e]=n,(t.active||(t.active=ae(o).length===r.length))&&i.push(le({},o))}function Z(t){this.inputs=t,this.active=!1}le(Z.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this.values={},this.names=ae(e),this[0]=t;for(let n in e){let o=e[n];o.pipe?t.done(o.each(r=>ue(this,n,r))):o.then?o.then(r=>ue(this,n,r)):console.log("Todo: combine() raw values ?")}}});var Mn=Object.assign;function Q(t){this.inputs=t}Mn(Q.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this[0]=t;let n=-1,o;for(;o=e[++n];)if(o.pipe)o.pipe(t);else if(o.then)o.then(r=>t.push(r));else{let r=-1;for(;++r0}function Gn(t,e,n){return t[n]=e.shift(),t}function zn(t){return[]}function xt(t,e,n,o){n.push(o),e.every(Bn)&&t.push(e.reduce(Gn,{}))}function J(t){this.inputs=t,this.buffers=Et.map.call(t,zn)}Dn(J.prototype,m.prototype,{pipe:function(t){let e=this.inputs,n=this.buffers;this[0]=t,Et.forEach.call(e,(o,r)=>{let i=n[r];o.each?t.done(o.each(s=>xt(t,n,i,s))):o.then?o.then(s=>xt(t,n,i,s)):Et.forEach.call(o,s=>xt(t,n,i,s))})},stop:function(){let t=this.inputs,e=-1,n;for(;n=t[++e];)n.stop();return m.prototype.stop.apply(this,arguments)}});var _n=Array.prototype,pe=Object.assign;function Rn(t){throw new TypeError("Stream: invalid source object cannot be read into stream")}var h=pe(w,{of:function(){return new R(_n.slice.apply(arguments))},from:function(t){return t.pipe?new w(t):t.then?new w(new K(t)):typeof t.length=="number"?new R(t):Rn(t)},broadcast:function(e){return new U(P,e)},combine:function(e){return new w(new Z(e))},merge:function(){return new w(new Q(arguments))},zip:function(){return new w(new J(arguments))}});pe(w.prototype,{log:yt,broadcast:function(t){return new U(this,t)}});var Un=Object.assign,Vn=/\s+/,fe={fullscreenchange:"fullscreenElement"in document?"fullscreenchange":"webkitFullscreenElement"in document?"webkitfullscreenchange":"fullscreenchange"};function de(t){return t.which===1&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}var me=0;window.addEventListener("click",t=>me=t.timeStamp);function qn(t,e){return t.node.addEventListener(fe[e]||e,t,t.options),t}function Wn(t,e){return t.node.removeEventListener(fe[e]||e,t),t}function he(t,e,n){this.types=t.split(Vn),this.options=e,this.node=n,this.select=e&&e.select}Un(he.prototype,m.prototype,{pipe:function(t){this[0]=t,this.types.reduce(qn,this)},handleEvent:function(t){if(!(t.type==="click"&&t.timeStamp<=me)){if(this.select){let e=t.target.closest(this.select);if(!e)return;t.selectedTarget=e}this[0].push(t)}},stop:function(){this.types.reduce(Wn,this),m.prototype.stop.apply(this,arguments)}});function E(t,e){let n;return typeof t=="object"&&(n=t,t=n.type),new h(new he(t,n,e))}function St(t){return typeof t}var Nn=/^\s*([+-]?\d*\.?\d+)([^\s\d]*)\s*$/;function $n(t,e){if(typeof e=="number")return e;var n=Nn.exec(e);if(!n||!t[n[2]||""]){if(!t.catch)throw new Error('Cannot parse value "'+e+'" with provided units '+Object.keys(t).join(", "));return n?t.catch(parseFloat(n[1]),n[2]):t.catch(parseFloat(e))}return t[n[2]||""](parseFloat(n[1]))}var tt=v($n);var Xn=/px$/,ge={"transform:translateX":function(t){var e=V("transform",t);if(!e||e==="none")return 0;var n=et(e);return parseFloat(n[4])},"transform:translateY":function(t){var e=V("transform",t);if(!e||e==="none")return 0;var n=et(e);return parseFloat(n[5])},"transform:scale":function(t){var e=V("transform",t);if(!e||e==="none")return 0;var n=et(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.sqrt(o*o+r*r)},"transform:rotate":function(t){var e=V("transform",t);if(!e||e==="none")return 0;var n=et(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.atan2(r,o)}};function et(t){return t.split("(")[1].split(")")[0].split(/\s*,\s*/)}function V(t,e){return window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):0}function nt(t,e){if(ge[t])return ge[t](e);var n=V(t,e);return typeof n=="string"&&Xn.test(n)?parseFloat(n):n}var ot,rt;function Yn(){if(!ot){let t=document.documentElement.style.fontSize;document.documentElement.style.fontSize="100%",ot=nt("font-size",document.documentElement),document.documentElement.style.fontSize=t||""}return ot}function Kn(){return rt||(rt=nt("font-size",document.documentElement)),rt}window.addEventListener("resize",()=>{ot=void 0,rt=void 0});var C=b(St,{number:S,string:tt({em:function(t){return Yn()*t},px:function(t){return t},rem:function(t){return Kn()*t},vw:function(t){return window.innerWidth*t/100},vh:function(t){return window.innerHeight*t/100},vmin:function(t){return window.innerWidthn?o:n}n=nW.maxScrollInterval?W.maxScrollInterval:1.4*n}function st(){return be}function Ee(t){let e=T(t),n=window.getComputedStyle(t,null),o=C(n.getPropertyValue("padding-left")),r=C(n.getPropertyValue("padding-right"));return e.leftPadding=e.left+o,e.rightPadding=e.left+e.width-r,e.centrePadding=e.leftPadding+(e.width-o-r)/2,e}function Se(t){let e=window.getComputedStyle(t,null).getPropertyValue("scroll-snap-align");return e.endsWith("start")?"left":e.endsWith("end")?"right":"centre"}function Te(t,e,n){let o=Ee(t),r=T(e),i=Se(e);t.scrollTo({top:t.scrollTop,left:t.scrollLeft+(i==="left"?r.left-o.leftPadding:i==="right"?r.right-o.rightPadding:r.left+r.width/2-o.centrePadding),behavior:n})}function Le(t,e){return Te(t,e,"smooth"),e}function I(t,e){return t.style.setProperty("scroll-behavior","auto","important"),Te(t,e,"auto"),t.style.setProperty("scroll-behavior",""),e}function ke(t,e){let{leftPadding:n,rightPadding:o,centrePadding:r}=Ee(t),i=e.length,s;for(;s=e[--i];){let a=T(s);if(!a)continue;let f=Se(s),l=a.width/2+(f==="left"?n:f==="right"?o:r),p=f==="left"?a.left:f==="right"?a.right:a.left+a.width/2;if(p<=l){console.log(p,l,s);break}}return s}function Pe(t){return!!t.dataset.slideIndex}function Fe(t){let{scroller:e,elements:n,children:o}=t,r=ke(e,n);return Pe(r)?o[r.dataset.slideIndex]:r}function Oe(t){let{scroller:e,children:n,elements:o}=t,r=ke(e,o),i;console.log("CURRENT",r),!!r&&(Pe(r)?(i=n[r.dataset.slideIndex],I(e,i)):i=r,t.activations.push(i))}function to(t,e){t.style.setProperty("scroll-snap-type",""),e.stop()}var Ae=b((t,e)=>e.type,{pointerdown:function(t,e){return t.e0=e,t.x0=e.clientX,t.y0=e.clientY,t},pointermove:function(t,e){let n=e.clientX,o=e.clientY;if(!t.gesturing){if(Math.abs(n-t.x0)(clearTimeout(s),setTimeout(to,st()*1e3,n,l)))}return t.gesturing=!1,t.e0=void 0,t.x0=void 0,t.y0=void 0,t.pointers=void 0,t.scrollLeft0=void 0,t}});var eo=Object.assign,no={capture:!0,passive:!0};function oo(t,e){t.timer=void 0,t.stream.push(e);let n=t.times;n.length>1&&xe(n),n.length=0}function Ce(t){this.element=t,this.times=[]}eo(Ce.prototype,m.prototype,{pipe:function(t){this.stream=t,this.element.addEventListener("scroll",this,no)},handleEvent:function(t){let e=t.timeStamp/1e3;this.times.push(e),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(oo,st()*1e3,this,t)},stop:function(){this.element.removeEventListener("scroll",this),m.prototype.stop.apply(this,arguments)}});function Pt(t){return new h(new Ce(t))}function ro(t,e,n){let o=n.length,r=-1/0;for(;o--;){let l=T(n[o]),p=l.x+l.width;r=p>r?p:r}let i=T(e),s=getComputedStyle(t),a=C(s.paddingLeft||0),f=C(s.paddingRight||0);return a+f+r-i.x}function io(t,e,n){let o=ro(t,e,n);t.style.setProperty("--scroll-width",o+"px")}function so(t){return!t.dataset.slideIndex}var Ie={construct:function(t){let e=x("slot",{part:"slides",style:"display: grid;"}),n=x("div",{class:"scroller",children:[e]}),o=x("nav",{part:"controls",children:[x("slot",{name:"controls"})]});t.append(n,o);let r=h.broadcast(),i=h.broadcast(),s=h.combine({host:i,elements:E("slotchange",e).map(c=>u.elements=e.assignedElements())}).broadcast({memory:!0}),a=s.map(c=>{let H=c.elements.filter(so);return Qt(u.children,H)?void 0:u.children=H}).broadcast({memory:!0,hot:!0}),f=h.of(),l=h.of(),p=l.map(c=>c.dataset.slideIndex?u.children[c.dataset.slideIndex]:c).filter(c=>u.active!==c&&kt("slide-active",c)).map(c=>u.active=c).log("ACTIVE").broadcast({memory:!0,hot:!0}),g=E("click",t).filter(de).broadcast(),u=this[d]={clickSuppressTime:-1/0,connected:!1,host:this,style:window.getComputedStyle(this),elements:P,children:P,scroller:n,slides:e,controls:o,connects:r,load:i,views:f,activations:l,actives:p,slotchanges:s,mutations:a,clicks:g};h.merge(s,E("resize",window)).each(c=>io(n,e,u.elements)),h.combine({slotchanges:s,connects:r}).map(c=>u.elements.includes(u.active)?u.active:u.children[0]).map(c=>u.connected?I(n,c):c).pipe(l),h.combine({host:i,child:f}).map(c=>u.elements.includes(c.child)&&u.active!==c.child?c.child:void 0).map(c=>u.connected?u.active?Le(n,c):I(n,c):c).pipe(l),Pt(n).filter(c=>u.connected&&!u.gesturing).each(c=>Oe(u)),Lt({threshold:"0.25rem",device:"mouse"},t).filter(()=>u.children.length>1).each(c=>{u.pointers=c,c.reduce(Ae,u)}),g.each(c=>{c.timeStamp-u.clickSuppressTime<120&&(c.preventDefault(),c.stopPropagation())}),E("fullscreenchange",window).each(c=>{(c.target===this||c.target.contains(this))&&I(n,u.active)}),E("focusin",this).map(c=>u.children.indexOf(c.target)!==-1?c.target:u.children.find(H=>H.contains(c.target))).pipe(f),E("keydown",this).filter(()=>document.activeElement===this||this.contains(document.activeElement)).map(b(B("keyCode"),{37:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)-1]),39:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)+1]),default:y})).pipe(f)},load:function(t){this[d].load.push(this)},connect:function(t){let e=this[d];e.connected=!0,e.connects.push(!0)},disconnect:function(t){let e=this[d];e.connected=!1}};function ct(t,e){function n(o,r){if(t.getState(o)!==r)return t[r?"enable":"disable"](o)}return{attribute:function(o){return n(this,o!==null)},set:function(o){return n(this,!!o)},get:function(){return t.getState(this)}}}function Ft(t,e){t.remove&&t.remove(e);let n;for(;(n=t.indexOf(e))!==-1;)t.splice(n,1);return e}var as=v(Ft,!0);var co=Object.assign;function N(t,e){this.element=t,this.definitions=e,this.tokens=[]}co(N.prototype,{contains:function(t){return this.tokens.includes(t)},add:function(){let t=arguments.length;for(;t--;){let e=arguments[t];!this.tokens.includes(e)&&this.definitions[e]&&(this.definitions[e].enable(this.element),this.tokens.push(e))}},remove:function(){let t=arguments.length;for(;t--;){let e=arguments[t];this.tokens.includes(e)&&(this.definitions[e].disable(this.element),Ft(this.tokens,e))}},supports:function(t){return!!this.definitions[t]}});var uo=Array.prototype;function lo(t,e){let n=t.tokens.slice(),o=uo.slice.apply(e),r=n.length;for(;r--;)o.includes(n[r])&&n.splice(r,1);t.remove.apply(t,n),t.add.apply(t,o)}function Ot(t){let e=Symbol("TokenList");function n(o,r){let i=o[e]||(o[e]=new N(o,t));lo(i,r.trim().split(/\s+/))}return{attribute:function(o){n(this,o||"")},set:function(o){n(this,o+"")},get:function(){return this[e]||(this[e]=new N(this,t))}}}var At={};z(At,{disable:()=>ho,enable:()=>mo,getState:()=>go});var ao=tt({s:S,ms:t=>t/1e3});function po(t){let{active:e,children:n,elements:o,host:r}=t,i=o.indexOf(e),s=o[i+1]||n[0];t.autoplay.timer=null,!!s&&(r.active=s)}function fo(t){let{active:e,style:n}=t,o=ao(window.getComputedStyle(e).getPropertyValue("--slide-duration")||n.getPropertyValue("--slide-duration"));clearTimeout(t.autoplay.timer),t.autoplay.timer=setTimeout(po,o*1e3,t)}function je(t){clearTimeout(t.autoplay.timer),t.autoplay.timer=null}function mo(t){let e=t[d],{actives:n}=e,o=e.autoplay={},r=h.merge([!1],E("pointerenter pointerleave",t).map(s=>s.type==="pointerenter")),i=h.merge([t.contains(document.activeElement)],E("focusin focusout",t).map(b(B("type"),{focusin:s=>!0,focusout:s=>t.contains(s.relatedTarget)}))).map((s=>a=>s===a?void 0:s=a)());o.updates=h.combine({active:n,hover:r,focus:i}).each(s=>s.hover||s.focus?je(e):fo(e))}function ho(t){let e=t[d];je(e),e.autoplay.updates.stop(),e.autoplay=void 0}function go(t){return!!t[d].autoplay}var Ct={};z(Ct,{disable:()=>yo,enable:()=>vo,getState:()=>bo});function He(t,e){let n=t.cloneNode(!0);return n.dataset.slideIndex=e,n.removeAttribute("id"),n.setAttribute("aria-hidden","true"),n.tabIndex="-1",n}function wo(t){let{active:e,children:n,host:o,scroller:r}=t;if(t.loop.prepends&&(t.loop.prepends.forEach(u=>u.remove()),t.loop.appends.forEach(u=>u.remove()),t.loop.prepends=void 0,t.loop.appends=void 0),n.length<2){t.elements=t.slides.assignedElements();return}let i=o.clientWidth,s=n.map(T),a=s[1].left,f=s[s.length-2].right,l=1;for(;s[++l]&&s[l].leftf-i;);let g=n.slice(++l).map((u,c)=>He(u,l+c));o.prepend.apply(o,g),o.append.apply(o,p),t.loop.prepends=g,t.loop.appends=p,t.elements=t.slides.assignedElements(),I(r,e||n[0])}function vo(t){let e=t[d],{mutations:n}=e,o=e.loop={};o.renders=n.each(r=>wo(e))}function yo(t){let e=t[d];e.loop&&(e.loop.prepends&&e.loop.prepends.forEach(n=>n.remove()),e.loop.appends&&e.loop.appends.forEach(n=>n.remove()),e.loop.renders.stop(),e.loop=void 0)}function bo(t){return!!t[d].loop}var It={};z(It,{disable:()=>Eo,enable:()=>xo,getState:()=>So});function j(t){if(typeof t!="object"||arguments.length>1)throw new Error("delegate() now takes an object of selector:fn pairs.");let e=Object.keys(t);return function(o){let r=o.target,i=-1;for(;e[++i];){let s=r.closest(e[i]);if(s)return t[e[i]](s,...arguments)}}}function Me(t,e,n,o){o===0?t.hidden=!0:t.hidden=!1,o===n.length-1?e.hidden=!0:e.hidden=!1}function xo(t){let e=t[d],{actives:n,clicks:o,slotchanges:r}=e,i=e.navigation={prev:x("button",{part:"prev-button",type:"button",name:"navigation",value:"-1",html:"Previous"}),next:x("button",{part:"next-button",type:"button",name:"navigation",value:"1",html:"Next"})};e.controls.prepend(i.prev,i.next),i.updates=h.combine({active:n,changes:r}).each(s=>Me(i.prev,i.next,s.changes.elements,s.changes.elements.indexOf(s.active))),i.clicks=o.each(j({'[name="navigation"]':function(s,a){let f=parseFloat(s.value),l=e.elements.indexOf(e.active)+f,p=e.elements[l];!p||(t.active=p,Me(i.prev,i.next,e.elements,l))}}))}function Eo(t){let e=t[d];e.navigation.prev.remove(),e.navigation.next.remove(),e.navigation.updates.stop(),e.navigation.clicks.stop(),e.navigation=void 0}function So(t){return!!t[d].navigation}var jt={};z(jt,{disable:()=>ko,enable:()=>Lo,getState:()=>Po});function De(t,e,n){let{active:o,buttons:r,index:i}=t;if(o===n)return;i>-1&&(t.activeSpan.remove(),r.children[i].part.remove("page-button-active"));let s=e.indexOf(n);s!==-1&&(r.children[s].part.add("page-button-active"),r.children[s].append(t.activeSpan),t.index=s,t.active=n)}function To(t,e,n,o){return e.buttons&&(e.buttons.remove(),e.buttons=void 0),o.length<2||(e.buttons=x("div",{part:"pagination",children:o.map((r,i)=>x("button",{part:"page-button",type:"button",name:"pagination",value:i}))}),t.append(e.buttons)),o.length}function Lo(t){let e=t[d],{shadow:n,actives:o,clicks:r,mutations:i}=e,s=e.pagination={activeSpan:x("span",{class:"invisible",text:"(Current slide)"})};s.mutations=i.each(()=>To(e.controls,s,n,e.children)),s.updates=h.combine({active:o,children:i}).filter(a=>a.children.length>1).each(a=>De(s,e.children,e.active)),s.clicks=r.each(j({'[name="pagination"]':function(a,f){let{host:l}=e,p=e.children,g=p[a.value];!g||(l.active=g,De(s,p,g))}}))}function ko(t){let e=t[d];e.pagination.buttons.remove(),e.pagination.mutations.stop(),e.pagination.updates.stop(),e.pagination.clicks.stop(),e.pagination=void 0}function Po(t){return!!t[d].pagination}var Ht={};z(Ht,{disable:()=>Oo,enable:()=>Fo,getState:()=>Ao});var Be=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled;function ut(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement}function Ge(t){return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():void 0}function lt(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}function Fo(t){let e=t[d];if(!Be)return;let n=e.fullscreen={button:x("button",{part:"fullscreen-button",type:"button",name:"fullscreen",html:"Open in fullscreen"})};e.controls.append(n.button),n.changes=E("fullscreenchange",t).filter(o=>ut()===t).each(o=>{n.button.part.add("fullscreen-button-active"),n.button.innerHTML="Close fullscreen",document.activeElement!==t&&(n.tabIndex=t.tabIndex,t.tabIndex<0&&(t.tabIndex=0),t.focus());let r=E("fullscreenchange",t).each(i=>{n.button.part.remove("fullscreen-button-active"),n.button.innerHTML="Open in fullscreen",t.tabIndex=n.tabIndex,n.tabIndex=void 0,r.stop()})}),n.clicks=e.clicks.each(j({'[name="fullscreen"]':(o,r)=>{let i=ut();if(i===t){lt();return}i&<(),Ge(t)}}))}function Oo(t){let e=t[d];ut()===t&<(),e.fullscreen.button.remove(),e.fullscreen.clicks.stop(),e.fullscreen.changes.stop(),e.fullscreen=void 0}function Ao(t){return!!t[d].fullscreen}var ze={active:{attribute:function(t){this.active=t},set:function(t){let e=this[d],n=typeof t=="object"?t:/^\d/.test(t+"")?this.querySelector("#\\3"+(t+"")[0]+" "+(t+"").slice(1)):/^\#/.test(t+"")?this.querySelector(t):this.querySelector("#"+t);e.views.push(n)},get:function(){return this[d].active}},autoplay:ct(At,"autoplay"),controls:Ot({navigation:It,pagination:jt,fullscreen:Ht}),loop:ct(Ct,"loop")};var Co=import.meta.url.replace(/\/[^\/]*\.js/,"/slide-show-shadow.css"),Js=vt('
                  ',Ie,ze,Co);export{Js as default}; diff --git a/build/slide-show-shadow.css b/build/slide-show-shadow.css index 8a04bed..4085aba 100644 --- a/build/slide-show-shadow.css +++ b/build/slide-show-shadow.css @@ -1,6 +1,6 @@ /* slide-show 1.1.6 By Stephen Band - Built 2022-05-18 15:13 */ + Built 2022-05-19 13:21 */ :host,*{box-sizing:border-box;background-origin:padding-box;background-repeat:no-repeat;padding:0;margin:0}button{font-size:inherit}:host{--slide-duration: 8s;--padding-left: 0;--padding-right: 0;position:relative;display:block!important;padding-left:0!important;padding-right:0!important;align-content:center!important;align-items:stretch;justify-content:center!important;justify-items:stretch;grid-auto-flow:row!important;grid-auto-columns:100%;grid-template-columns:none;column-gap:0;grid-auto-rows:min-content;grid-template-rows:1fr;row-gap:0;scroll-snap-type:none!important;scroll-snap-stop:none!important;-webkit-scroll-behavior:smooth;scroll-behavior:smooth;overscroll-behavior-x:none!important;-ms-overflow-style:none!important;scrollbar-width:none!important;overflow:visible}:host(:-webkit-full-screen){width:100vw!important;height:100vh!important;margin:0!important;background-color:#121212}:host(:fullscreen){width:100vw!important;height:100vh!important;margin:0!important;background-color:#121212}.invisible{position:absolute;clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);width:1px;height:1px;padding:0;margin:0 -1px -1px 0;overflow:hidden;white-space:nowrap;border-width:0}.scroller{display:block;position:relative;height:100%;padding-left:var(--padding-left, 0);padding-right:var(--padding-right, 0);scroll-padding-left:var(--padding-left, 0);scroll-padding-right:var(--padding-right, 0);overflow:auto;overflow-y:hidden;overscroll-behavior-x:none;overscroll-behavior-x:contain;scrollbar-width:none;scroll-snap-type:x mandatory;scroll-snap-stop:always;-webkit-scroll-behavior:inherit;scroll-behavior:inherit;will-change:-webkit-scroll-behavior;will-change:scroll-behavior;grid-template-columns:inherit;grid-auto-columns:inherit;column-gap:inherit;justify-content:inherit;justify-items:inherit;grid-template-rows:inherit;grid-auto-rows:inherit;row-gap:inherit;align-content:inherit;align-items:inherit}.scroller:before{content:"";position:absolute;left:0;top:0;width:var(--scroll-width, 5000%);height:1px;z-index:-1}.scroller::-webkit-scrollbar{-webkit-appearance:none;display:var(--webkit-scrollbar-display, none);width:var(--webkit-scrollbar-width);height:var(--webkit-scrollbar-width);background:var(--webkit-scrollbar-background);border:var(--webkit-scrollbar-border);border-radius:var(--webkit-scrollbar-border-radius)}.scroller::-webkit-scrollbar-thumb:vertical,.scroller::-webkit-scrollbar-thumb:horizontal{background:var(--webkit-scrollbar-thumb-background);border:var(--webkit-scrollbar-thumb-border);border-radius:var(--webkit-scrollbar-thumb-border-radius)}.scroller>[part=slides]{position:relative;z-index:1}:host(:-webkit-full-screen) .scroller{height:calc(100% - 2.75rem)}:host(:fullscreen) .scroller{height:calc(100% - 2.75rem)}[part=slides]{display:grid;height:100%;margin-left:auto;margin-right:auto;grid-auto-flow:column;grid-template-columns:inherit;grid-auto-columns:inherit;column-gap:inherit;justify-content:start!important;justify-items:inherit;grid-template-rows:inherit;grid-auto-rows:inherit;row-gap:inherit;align-content:inherit;align-items:inherit}[part=slides]::slotted(*){scroll-snap-align:center}[part=controls]{display:grid;grid-template-columns:[left] 1fr [center] auto [right] 1fr;height:auto;padding-left:var(--padding-left);padding-right:var(--padding-right);align-content:center;align-items:center;justify-items:center;justify-content:stretch}[part=controls]:empty{display:none}@media print{:host>nav{display:none!important}}[part*=fullscreen-button]{vertical-align:baseline;overflow:hidden;z-index:2;grid-column:3;grid-row:1;justify-self:end;margin:.375em 0;width:0;min-width:0;line-height:inherit;text-decoration:none;padding:0 0 0 1.875em;height:1.875em;cursor:pointer;background-size:contain;background-position:50% 50%;background-repeat:no-repeat;background-color:transparent;background-image:url('data:image/svg+xml;utf8, ');border-width:0;border-radius:.3125em;color:inherit;transition:background-color .2s linear}[part*=fullscreen-button]:hover{transition:background-color .1s linear;background-color:#ffffff4d}[part*=fullscreen-button-active]{background-image:url('data:image/svg+xml;utf8, ')}:host(:fullscreen) [part*=fullscreen-button]{grid-column:auto;grid-row:auto;position:absolute;top:.75em;right:.75em;margin:0;bottom:auto}:host(:-webkit-full-screen) [part*=fullscreen-button]{grid-column:auto;grid-row:auto;position:absolute;top:.75em;right:.75em;margin:0;bottom:auto}[part=prev-button],[part=next-button]{vertical-align:baseline;overflow:hidden;position:absolute;top:50%;z-index:2;padding:0;width:0;min-width:0;line-height:inherit;text-decoration:none;padding-left:1.875rem;height:2.5rem;margin-top:-1.25rem;background-size:contain;background-position:50% 50%;background-repeat:no-repeat;background-color:transparent;border-width:0;border-radius:.3125rem;color:inherit;transition:background-color .2s linear;cursor:pointer}[part=prev-button]{left:.1875rem;background-image:url('data:image/svg+xml;utf8, ')}[part=next-button]{right:.1875rem;background-image:url('data:image/svg+xml;utf8, ')}[part=prev-button]:hover,[part=next-button]:hover{transition:background-color .1s linear;background-color:#ffffff4d}[part=pagination]{display:flex;justify-content:center;grid-column:2;grid-row:1;justify-self:center;margin:0;padding:.875em 0}[part*=page-button]{display:inline-block;padding:0 0 0 1.25em;height:1.25em;cursor:pointer;border-width:0;background-color:transparent;background-size:100% auto;background-position:50% 50%;background-image:url('data:image/svg+xml;utf8, ')}[part*=page-button-active]{background-image:url('data:image/svg+xml;utf8, ')}:host(:fullscreen) [part*=page-button-active]{background-image:url('data:image/svg+xml;utf8, ')}:host(:-webkit-full-screen) [part*=page-button-active]{background-image:url('data:image/svg+xml;utf8, ')}slot[name=optional]::slotted(*){grid-column:1;grid-row:1} diff --git a/build/slide-show-ul.js b/build/slide-show-ul.js index 6ac2f35..33f5b36 100644 --- a/build/slide-show-ul.js +++ b/build/slide-show-ul.js @@ -1,7 +1,7 @@ /* slide-show 1.1.6 By Stephen Band - Built 2022-05-18 15:13 */ + Built 2022-05-19 13:21 */ -var qe=Object.defineProperty;var Mt=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var Dt=(t,e)=>{var n={};for(var o in t)We.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&Mt)for(var o of Mt(t))e.indexOf(o)<0&&$e.call(t,o)&&(n[o]=t[o]);return n};var G=(t,e)=>{for(var n in e)qe(t,n,{get:e[n],enumerable:!0})};function $(t){var e=new Map;return function(o){if(e.has(o))return e.get(o);var r=t(o);return e.set(o,r),r}}var Ne=Array.prototype;function Xe(t,e){return typeof t=="function"?t.apply(null,e):t}function Bt(t,e,n){n=n||t.length;var o=n===1?e?t:$(t):$(function(r){return Bt(function(){var i=[r];return i.push.apply(i,arguments),t.apply(null,i)},e,n-1)});return function r(i){return arguments.length===0?r:arguments.length===1?o(i):arguments.length>=n?t.apply(null,arguments):Xe(o(i),Ne.slice.call(arguments,1))}}var w=Bt;function Ye(t,e){return 1-Math.pow(1-e,t)}var Gt=w(Ye);function v(){}function at(t,e){return e(t)}function S(t){return t}var Ke=Array.prototype;function pt(){let t=arguments;return t.length?e=>Ke.reduce.call(t,at,e):S}function ft(t,e,n){return n*(e-t)+t}var Ze=window.performance,zt=window.requestAnimationFrame,Qe=window.cancelAnimationFrame;function dt(t,e,n){var o=Ze.now();function r(s){var l=(s-o)/(t*1e3);l<1?(l>0&&e(l),i=zt(r)):(e(1),n&&n())}var i=zt(r);return function(){Qe(i)}}function N(t,e,n,o,r,i){let s=o[n];return dt(t,pt(e,l=>ft(s,r,l),l=>o[n]=l),i)}function Je(){return{x:0,y:0,left:0,top:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}}function T(t){return t===window?Je():t.getClientRects()[0]||t.getBoundingClientRect()}var H={scrollDuration:.3,scrollDurationPerHeight:.125,scrollTransform:Gt(3)},_t=v;function tn(t,e){if(e.behavior==="smooth"){let n=t.style.getPropertyValue("scroll-snap-type"),o=()=>t.style.setProperty("scroll-snap-type",n);if(t.style.setProperty("scroll-snap-type","none"),e.left!==void 0){let r=t===document.body?window.innerWidth:T(t).width,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.left-t.scrollLeft)/r;_t=N(i,H.scrollTransform,"scrollLeft",t,e.left,o)}else{let r=t===document.body?window.innerHeight:T(t).height,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.top-t.scrollTop)/r;_t=N(i,H.scrollTransform,"scrollTop",t,e.top,o)}}else e.left!==void 0&&(t.scrollLeft=e.left),e.top!==void 0&&(t.scrollTop=e.top)}if(!("scrollBehavior"in document.documentElement.style)){console.log("Polyfilling Element.scrollTo(options).");let t="scrollTo"in Element.prototype?Element:HTMLElement,e=t.scrollIntoView;t.prototype.scrollTo=function(n){typeof n=="object"?tn(this,n):e.apply(this,arguments)}}function y(t,e){return function(){let o=t.apply(this,arguments),r=e[o]||e.default;if(!r)throw new Error('overload() no handler for "'+o+'"');return r.apply(this,arguments)}}var en=y(S,{is:v,tag:v,html:function(t,e,n){e.innerHTML=n},text:function(t,e,n){e.textContent=n},children:function(t,e,n){e.innerHTML="",n.forEach(o=>{e.appendChild(o)})},points:M,cx:M,cy:M,r:M,preserveAspectRatio:M,viewBox:M,default:function(t,e,n){t in e?e[t]=n:e.setAttribute(t,n)}});function M(t,e,n){e.setAttribute(t,n)}function nn(t,e){for(var n=Object.keys(e),o=n.length;o--;)en(n[o],t,e[n[o]]);return t}var mt=w(nn,!0);var on="http://www.w3.org/2000/svg",Rt=document.createElement("div");var Ut=(t,e)=>e&&typeof e;function Vt(t,e){let n=document.createRange();return n.selectNode(t),n.createContextualFragment(e)}function L(t,e){var n=document.createElementNS(on,t);return e&&(n.innerHTML=e),n}var rn=y(S,{comment:function(t,e){return document.createComment(e||"")},fragment:y(Ut,{string:function(t,e,n){if(n)return Vt(n,e);let o=document.createDocumentFragment();Rt.innerHTML=e;let r=Rt.childNodes;for(;r[0];)o.appendChild(r[0]);return o},object:function(t,e,n){let o=n?Vt(n):document.createDocumentFragment();return typeof e.length=="number"?o.append.apply(o,e):mt(o,e),o},default:()=>document.createDocumentFragment()}),text:function(t,e){return document.createTextNode(e||"")},circle:L,ellipse:L,g:L,glyph:L,image:L,line:L,rect:L,use:L,path:L,pattern:L,polygon:L,polyline:L,svg:L,default:y(Ut,{string:function(t,e){let n=document.createElement(t);return n.innerHTML=e,n},object:function(t,e){let n=document.createElement(t);return typeof e.length=="number"?n.append.apply(n,e):mt(n,e),n},default:t=>{if(typeof t!="string")throw new Error('create(tag, content) accepts only a string as tag "'+typeof t+'"');return document.createElement(t)}})}),b=rn;function ht(t,e,n){let o;typeof n!="string"&&n.input!==void 0&&n.index!==void 0&&(o=n,n=o.input.slice(n.index+n[0].length+(n.consumed||0)));let r=t.exec(n);if(!r)return;let i=e(r);return o&&(o.consumed=(o.consumed||0)+r.index+r[0].length+(r.consumed||0)),i}var fr=w(ht,!0);function sn(t,e,n){throw n.input!==void 0&&n.index!==void 0&&(n=n.input),new Error('Cannot parse string "'+n+'"')}function cn(t,e,n){let o=-1;for(;++ocn(e,n,i),o);return r===void 0?e.catch?e.catch(n,o):sn(t,e,o):r}var qt=w(un,!0);var gt=v;var k=Symbol("internals"),A=Symbol("shadow"),Wt=Object.defineProperties,ln={a:HTMLAnchorElement,dl:HTMLDListElement,p:HTMLParagraphElement,br:HTMLBRElement,fieldset:HTMLFieldSetElement,hr:HTMLHRElement,img:HTMLImageElement,li:HTMLLIElement,ol:HTMLOListElement,optgroup:HTMLOptGroupElement,q:HTMLQuoteElement,textarea:HTMLTextAreaElement,td:HTMLTableCellElement,th:HTMLTableCellElement,tr:HTMLTableRowElement,tbody:HTMLTableSectionElement,thead:HTMLTableSectionElement,tfoot:HTMLTableSectionElement,ul:HTMLUListElement},an={name:{set:function(t){return this.setAttribute("name",t)},get:function(){return this.getAttribute("name")||""}},form:{get:function(){return this[k].form}},labels:{get:function(){return this[k].labels}},validity:{get:function(){return this[k].validity}},validationMessage:{get:function(){return this[k].validationMessage}},willValidate:{get:function(){return this[k].willValidate}},checkValidity:{value:function(){return this[k].checkValidity()}},reportValidity:{value:function(){return this[k].reportValidity()}}},pn={},$t={once:!0},fn=0,Nt=!1;function dn(t){return ln[t]||window["HTML"+t[0].toUpperCase()+t.slice(1)+"Element"]||(()=>{throw new Error('Constructor not found for tag "'+t+'"')})()}var mn=qt(/^\s*?\s*$|^\s*?\s*$/,{1:(t,e)=>({name:e[1]}),2:(t,e)=>({name:e[3],tag:e[2]}),catch:function(t,e){throw new SyntaxError(`dom element() – name must be of the form 'element-name' or 'tag is="element-name"' (`+e+")")}},null);function hn(t,e){if(t.hasOwnProperty(e)){let n=t[e];delete t[e],t[e]=n}return t}function gn(t,e,n){t._initialLoad=!0;let o=t.attachShadow({mode:e.mode||"closed",delegatesFocus:e.focusable||!1});if(n){let r=b("link",{rel:"stylesheet",href:n});o.append(r)}return t[A]=o,o}function wn(t){var e;if(t.attachInternals){if(e=t.attachInternals(),e.setFormValue)return e}else e={shadowRoot:t.shadowRoot};return e.input=b("input",{type:"hidden",name:t.name}),t.appendChild(e.input),e.setFormValue=function(n){this.input.value=n},e}function vn(t){t._initialAttributes={},t._n=0}function yn(t,e,n){let o=t._initialAttributes;for(;t._nfn?gn(p,e,o||e.stylesheet):void 0,c=a.formAssociated&&wn(p);return i&&(Nt=!0),e.construct&&e.construct.call(p,u,c),l&&(vn(p),Promise.resolve(1).then(function(){Xt(p,a.observedAttributes,l)})),f&&Object.keys(f).reduce(hn,p),p}return a.prototype=Object.create(s.prototype,f),f&&f.value&&(a.formAssociated=!0,Wt(a.prototype,an),(e.enable||e.disable)&&(a.prototype.formDisabledCallback=function(p){return p?e.disable&&e.disable.call(this,this[A],this[k]):e.enable&&e.enable.call(this,this[A],this[k])}),e.reset&&(a.prototype.formResetCallback=function(){return e.reset.call(this,this[A],this[k])}),e.restore&&(a.prototype.formStateRestoreCallback=function(){return e.restore.call(this,this[A],this[k])})),l&&(a.observedAttributes=Object.keys(l),a.prototype.attributeChangedCallback=function(p,u,c){if(!this._initialAttributes)return l[p].call(this,c);this._initialAttributes[p]=c,yn(this,a.observedAttributes,l)}),a.prototype.connectedCallback=function(){let p=this,u=p[A],c=p[k];if(p._initialAttributes&&Xt(p,a.observedAttributes,l),p._initialLoad){let E=u.querySelectorAll('link[rel="stylesheet"]');if(E.length){let ze=0,lt=E.length,Ht=function(Ue){++ze>=E.length&&(delete p._initialLoad,e.load&&(gt("element()","loaded",Array.from(E).map(Ve=>Ve.href).join(` -`)),e.load.call(p,u)))},_e=Ht;for(;lt--;)E[lt].addEventListener("load",Ht,$t),E[lt].addEventListener("error",_e,$t);e.connect&&e.connect.call(this,u,c)}else e.connect&&e.connect.call(this,u,c),e.load&&e.load.call(this,u,c)}else e.connect&&e.connect.call(this,u,c)},e.disconnect&&(a.prototype.disconnectedCallback=function(){return e.disconnect.call(this,this[A],this[k])}),gt("element()","<"+(i?i+" is="+r:r)+">"),window.customElements.define(r,a,i&&{extends:i}),i&&!Nt&&document.querySelectorAll('[is="'+r+'"]').forEach(p=>{Wt(p,f),e.construct&&e.construct.apply(p);let u;for(u in l){let c=p.attributes[u];c&&l[u].call(p,c.value)}e.connect&&e.connect.apply(p)}),a}function Kt(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object")return!1;let n=Object.keys(t),o=Object.keys(e),r=n.length;for(;r--;){if(t[n[r]]===void 0){if(e[n[r]]!==void 0)return!1}else if(!e.hasOwnProperty(n[r])||!Kt(t[n[r]],e[n[r]]))return!1;let i=o.indexOf(n[r]);i>-1&&o.splice(i,1)}for(r=o.length;r--;)if(e[o[r]]===void 0){if(t[o[r]]!==void 0)return!1}else return!1;return!0}var Zt=w(Kt,!0);function En(t,e){return e[t]}var D=w(En,!0);var Sn=Object.freeze;function Qt(){return this}var P=Sn({shift:v,push:v,forEach:v,join:function(){return""},map:Qt,filter:Qt,includes:function(){return!1},reduce:function(t,e){return e},length:0,each:v,pipe:S,start:v,stop:v,done:v,valueOf:function(){return null}});function vt(){return this}function yt(t){return t&&t[Symbol.iterator]}var Tn=Object.assign;function Ln(t){return t.stop?t.stop():t()}function kn(t){t.forEach(Ln),t.length=0}function B(){}Tn(B.prototype,{stop:function(){return this.stopables&&kn(this.stopables),this},done:function(e){return(this.stopables||(this.stopables=[])).push(e),this}});var Pn=Object.assign;function X(t){B.prototype.stop.apply(t);let e=-1,n;for(;n=t[++e];)t[e]=void 0,X(n)}function m(){}Pn(m.prototype,{pipe:function(t){return this[0]=t,t},stop:function(){return X(this[0]),this}});var F=Object.assign,O=Object.create;function z(t,e){e!==void 0&&t[0].push(e)}function Fn(t,e){if(t[1]){let n=-1;for(;t[++n]&&t[n]!==e;);for(;t[n++];)t[n-1]=t[n];X(e)}else t.stop()}function h(t){this.input=t}F(h.prototype,B.prototype,{push:function(t){z(this,t)},pipe:function(t){if(this[0])throw new Error("Stream: Attempt to .pipe() a unicast stream multiple times. Create a multicast stream with stream.broadcast().");return this[0]=t,this.input.pipe(this),t},map:function(t){return new Jt(this,t)},filter:function(t){return new te(this,t)},chunk:function(t){return new ne(this,t)},flatMap:function(t){return new ee(this,t)},take:function(t){return new oe(this,t)},each:function(t){return new se(this,t)},reduce:function(t,e){return new re(this,t,e)},scan:function(t,e){return new ie(this,t,e)},stop:function(){return Fn(this.input,this),this}});function Jt(t,e){this.input=t,this.fn=e}Jt.prototype=F(O(h.prototype),{push:function(e){let n=this.fn;z(this,n(e))}});function te(t,e){this.input=t,this.fn=e}te.prototype=F(O(h.prototype),{push:function(e){this.fn(e)&&z(this,e)}});function ee(t,e){this.input=t,this.fn=e}ee.prototype=F(O(h.prototype),{push:function(e){let o=this.fn(e);if(o!==void 0)if(yt(o))for(let r of o)z(this,r);else throw new Error("Stream: Cannot .flatMap() non-iterable values")}});function ne(t,e){this.input=t,this.chunk=[],typeof e=="number"?this.n=e:typeof e=="function"&&(this.fn=e)}ne.prototype=F(O(h.prototype),{fn:function(t){return t.length===this.n},push:function(e){let n=this.chunk;n.push(e),this.fn(n)&&(z(this,n),this.chunk=[])}});function oe(t,e){this.input=t,this.count=e}oe.prototype=F(O(h.prototype),{push:function(e){this[0].push(e),--this.count||this.stop()}});function re(t,e,n){return this.input=t,this.fn=e,this.value=n,this.i=0,t.pipe(this),n}re.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t,this.i++,this)}});function ie(t,e,n){this.input=t,this.fn=e,this.value=n}ie.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t),this[0].push(this.value)}});function se(t,e){this.input=t,this.push=e,t.pipe(this)}se.prototype=F(O(h.prototype),{each:null,reduce:null,pipe:null});var On=Array.prototype,An=Object.assign,Cn=Object.create;function _(t){this.buffer=t||[]}_.prototype=An(Cn(h.prototype),m.prototype,{push:function(t){t!==void 0&&this.buffer.push(t)},pipe:function(t){for(this[0]=t;this.buffer.length;)this[0].push(On.shift.apply(this.buffer));return this.buffer=this[0],t}});var In=Object.assign,jn=Object.create;function R(t,e){this.input=t,this.memory=!!(e&&e.memory),e&&e.hot&&this.pipe(P)}R.prototype=In(jn(h.prototype),{push:function(t){if(t!==void 0){this.memory&&(this.value=t);let e=-1;for(;this[++e];)this[e].push(t)}},pipe:function(t){let e=-1;for(;this[++e];);return this[e]=t,this.value!==void 0&&t.push(this.value),e===0&&this.input.pipe(this),t}});var Hn=Object.assign;function Y(t){this.promise=t}Hn(Y.prototype,m.prototype,{pipe:function(t){let e=this.promise;this[0]=t,e.then(n=>this[0].push(n)).finally(n=>this.stop())},stop:function(){m.prototype.stop.apply(this,arguments),this[0]=P}});var ue=Object.assign,le=Object.keys;function ce(t,e,n){let o=t.values,r=t.names,i=t[0];o[e]=n,(t.active||(t.active=le(o).length===r.length))&&i.push(ue({},o))}function K(t){this.inputs=t,this.active=!1}ue(K.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this.values={},this.names=le(e),this[0]=t;for(let n in e){let o=e[n];o.pipe?t.done(o.each(r=>ce(this,n,r))):o.then?o.then(r=>ce(this,n,r)):console.log("Todo: combine() raw values ?")}}});var Mn=Object.assign;function Z(t){this.inputs=t}Mn(Z.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this[0]=t;let n=-1,o;for(;o=e[++n];)if(o.pipe)o.pipe(t);else if(o.then)o.then(r=>t.push(r));else{let r=-1;for(;++r0}function Gn(t,e,n){return t[n]=e.shift(),t}function zn(t){return[]}function bt(t,e,n,o){n.push(o),e.every(Bn)&&t.push(e.reduce(Gn,{}))}function Q(t){this.inputs=t,this.buffers=xt.map.call(t,zn)}Dn(Q.prototype,m.prototype,{pipe:function(t){let e=this.inputs,n=this.buffers;this[0]=t,xt.forEach.call(e,(o,r)=>{let i=n[r];o.each?t.done(o.each(s=>bt(t,n,i,s))):o.then?o.then(s=>bt(t,n,i,s)):xt.forEach.call(o,s=>bt(t,n,i,s))})},stop:function(){let t=this.inputs,e=-1,n;for(;n=t[++e];)n.stop();return m.prototype.stop.apply(this,arguments)}});var _n=Array.prototype,ae=Object.assign;function Rn(t){throw new TypeError("Stream: invalid source object cannot be read into stream")}var g=ae(h,{of:function(){return new _(_n.slice.apply(arguments))},from:function(t){return t.pipe?new h(t):t.then?new h(new Y(t)):typeof t.length=="number"?new _(t):Rn(t)},broadcast:function(e){return new R(P,e)},combine:function(e){return new h(new K(e))},merge:function(){return new h(new Z(arguments))},zip:function(){return new h(new Q(arguments))}});ae(h.prototype,{log:vt,broadcast:function(t){return new R(this,t)}});var Un=Object.assign,Vn=/\s+/,pe={fullscreenchange:"fullscreenElement"in document?"fullscreenchange":"webkitFullscreenElement"in document?"webkitfullscreenchange":"fullscreenchange"};function fe(t){return t.which===1&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}var de=0;window.addEventListener("click",t=>de=t.timeStamp);function qn(t,e){return t.node.addEventListener(pe[e]||e,t,t.options),t}function Wn(t,e){return t.node.removeEventListener(pe[e]||e,t),t}function me(t,e,n){this.types=t.split(Vn),this.options=e,this.node=n,this.select=e&&e.select}Un(me.prototype,m.prototype,{pipe:function(t){this[0]=t,this.types.reduce(qn,this)},handleEvent:function(t){if(!(t.type==="click"&&t.timeStamp<=de)){if(this.select){let e=t.target.closest(this.select);if(!e)return;t.selectedTarget=e}this[0].push(t)}},stop:function(){this.types.reduce(Wn,this),m.prototype.stop.apply(this,arguments)}});function x(t,e){let n;return typeof t=="object"&&(n=t,t=n.type),new g(new me(t,n,e))}function Et(t){return typeof t}var $n=/^\s*([+-]?\d*\.?\d+)([^\s\d]*)\s*$/;function Nn(t,e){if(typeof e=="number")return e;var n=$n.exec(e);if(!n||!t[n[2]||""]){if(!t.catch)throw new Error('Cannot parse value "'+e+'" with provided units '+Object.keys(t).join(", "));return n?t.catch(parseFloat(n[1]),n[2]):t.catch(parseFloat(e))}return t[n[2]||""](parseFloat(n[1]))}var J=w(Nn);var Xn=/px$/,he={"transform:translateX":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[4])},"transform:translateY":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[5])},"transform:scale":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.sqrt(o*o+r*r)},"transform:rotate":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.atan2(r,o)}};function tt(t){return t.split("(")[1].split(")")[0].split(/\s*,\s*/)}function U(t,e){return window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):0}function et(t,e){if(he[t])return he[t](e);var n=U(t,e);return typeof n=="string"&&Xn.test(n)?parseFloat(n):n}var nt,ot;function Yn(){if(!nt){let t=document.documentElement.style.fontSize;document.documentElement.style.fontSize="100%",nt=et("font-size",document.documentElement),document.documentElement.style.fontSize=t||""}return nt}function Kn(){return ot||(ot=et("font-size",document.documentElement)),ot}window.addEventListener("resize",()=>{nt=void 0,ot=void 0});var C=y(Et,{number:S,string:J({em:function(t){return Yn()*t},px:function(t){return t},rem:function(t){return Kn()*t},vw:function(t){return window.innerWidth*t/100},vh:function(t){return window.innerHeight*t/100},vmin:function(t){return window.innerWidthn?o:n}n=nq.maxScrollInterval?q.maxScrollInterval:1.4*n}function it(){return ye}function xe(t){let e=T(t),n=window.getComputedStyle(t,null),o=C(n.getPropertyValue("padding-left")),r=C(n.getPropertyValue("padding-right"));return e.leftPadding=e.left+o,e.rightPadding=e.left+e.width-r,e.centrePadding=e.leftPadding+(e.width-o-r)/2,e}function Ee(t){let e=window.getComputedStyle(t,null).getPropertyValue("scroll-snap-align");return e.endsWith("start")?"left":e.endsWith("end")?"right":"centre"}function Se(t,e,n){let o=xe(t),r=T(e),i=Ee(e);t.scrollTo({top:t.scrollTop,left:t.scrollLeft+(i==="left"?r.left-o.leftPadding:i==="right"?r.right-o.rightPadding:r.left+r.width/2-o.centrePadding),behavior:n})}function Te(t,e){return Se(t,e,"smooth"),e}function I(t,e){return t.style.setProperty("scroll-behavior","auto","important"),Se(t,e,"auto"),t.style.setProperty("scroll-behavior",""),e}function Le(t,e){let{leftPadding:n,rightPadding:o,centrePadding:r}=xe(t),i=e.length,s;for(;s=e[--i];){let l=T(s);if(!l)continue;let f=Ee(s),a=l.width/2+(f==="left"?n:f==="right"?o:r);if((f==="left"?l.left:f==="right"?l.right:l.left+l.width/2)<=a)break}return s}function ke(t){return!!t.dataset.slideIndex}function Pe(t){let{scroller:e,elements:n,children:o}=t,r=Le(e,n);return ke(r)?o[r.dataset.slideIndex]:r}function Fe(t){let{scroller:e,children:n,elements:o}=t,r=Le(e,o),i;!r||(ke(r)?(i=n[r.dataset.slideIndex],I(e,i)):i=r,t.activations.push(i))}function to(t,e){t.style.setProperty("scroll-snap-type",""),e.stop()}var Oe=y((t,e)=>e.type,{pointerdown:function(t,e){return t.e0=e,t.x0=e.clientX,t.y0=e.clientY,t},pointermove:function(t,e){let n=e.clientX,o=e.clientY;if(!t.gesturing){if(Math.abs(n-t.x0)(clearTimeout(s),setTimeout(to,it()*1e3,n,a)))}return t.gesturing=!1,t.e0=void 0,t.x0=void 0,t.y0=void 0,t.pointers=void 0,t.scrollLeft0=void 0,t}});var eo=Object.assign,no={capture:!0,passive:!0};function oo(t,e){t.timer=void 0,t.stream.push(e);let n=t.times;n.length>1&&be(n),n.length=0}function Ae(t){this.element=t,this.times=[]}eo(Ae.prototype,m.prototype,{pipe:function(t){this.stream=t,this.element.addEventListener("scroll",this,no)},handleEvent:function(t){let e=t.timeStamp/1e3;this.times.push(e),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(oo,it()*1e3,this,t)},stop:function(){this.element.removeEventListener("scroll",this),m.prototype.stop.apply(this,arguments)}});function kt(t){return new g(new Ae(t))}function ro(t,e,n){let o=n.length,r=-1/0;for(;o--;){let a=T(n[o]),p=a.x+a.width;r=p>r?p:r}let i=T(e),s=getComputedStyle(t),l=C(s.paddingLeft||0),f=C(s.paddingRight||0);return l+f+r-i.x}function io(t,e,n){let o=ro(t,e,n);t.style.setProperty("--scroll-width",o+"px")}function so(t){return!t.dataset.slideIndex}var Ce={construct:function(t){let e=b("slot",{part:"slides"}),n=b("div",{class:"scroller",children:[e]}),o=b("nav",{part:"controls",children:[b("slot",{name:"controls"})]});t.append(n,o);let r=g.of().broadcast({memory:!0}),i=g.combine({host:r,elements:x("slotchange",e).map(c=>u.elements=e.assignedElements())}).broadcast({memory:!0}),s=i.map(c=>{let E=c.elements.filter(so);return Zt(u.children,E)?void 0:u.children=E}).broadcast({memory:!0,hot:!0}),l=g.of(),f=g.of(),a=f.map(c=>c.dataset.slideIndex?u.children[c.dataset.slideIndex]:c).filter(c=>u.active!==c&&Lt("slide-active",c)).map(c=>u.active=c).broadcast({memory:!0,hot:!0}),p=x("click",t).filter(fe).broadcast(),u=this[d]={clickSuppressTime:-1/0,host:this,style:window.getComputedStyle(this),elements:P,children:P,scroller:n,slides:e,controls:o,load:r,views:l,activations:f,actives:a,slotchanges:i,mutations:s,clicks:p};g.merge(i,x("resize",window)).each(c=>io(n,e,u.elements)),i.map(c=>c.elements.includes(u.active)?u.active:u.children[0]).map(c=>I(n,c)).pipe(f),g.combine({host:r,child:l}).map(c=>u.elements.includes(c.child)&&u.active!==c.child?c.child:void 0).map(c=>u.active?Te(n,c):I(n,c)).pipe(f),kt(n).filter(()=>!u.gesturing).each(c=>Fe(u)),Tt({threshold:"0.25rem",device:"mouse"},t).filter(()=>u.children.length>1).each(c=>{u.pointers=c,c.reduce(Oe,u)}),p.each(c=>{c.timeStamp-u.clickSuppressTime<120&&(c.preventDefault(),c.stopPropagation())}),x("fullscreenchange",window).each(c=>{(c.target===this||c.target.contains(this))&&I(n,u.active)}),x("focusin",this).map(c=>u.children.indexOf(c.target)!==-1?c.target:u.children.find(E=>E.contains(c.target))).pipe(l),x("keydown",this).filter(()=>document.activeElement===this||this.contains(document.activeElement)).map(y(D("keyCode"),{37:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)-1]),39:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)+1]),default:v})).pipe(l)},load:function(t){this[d].load.push(this)}};function st(t,e){function n(o,r){if(t.getState(o)!==r)return t[r?"enable":"disable"](o)}return{attribute:function(o){return n(this,o!==null)},set:function(o){return n(this,!!o)},get:function(){return t.getState(this)}}}function Pt(t,e){t.remove&&t.remove(e);let n;for(;(n=t.indexOf(e))!==-1;)t.splice(n,1);return e}var as=w(Pt,!0);var co=Object.assign;function W(t,e){this.element=t,this.definitions=e,this.tokens=[]}co(W.prototype,{contains:function(t){return this.tokens.includes(t)},add:function(){let t=arguments.length;for(;t--;){let e=arguments[t];!this.tokens.includes(e)&&this.definitions[e]&&(this.definitions[e].enable(this.element),this.tokens.push(e))}},remove:function(){let t=arguments.length;for(;t--;){let e=arguments[t];this.tokens.includes(e)&&(this.definitions[e].disable(this.element),Pt(this.tokens,e))}},supports:function(t){return!!this.definitions[t]}});var uo=Array.prototype;function lo(t,e){let n=t.tokens.slice(),o=uo.slice.apply(e),r=n.length;for(;r--;)o.includes(n[r])&&n.splice(r,1);t.remove.apply(t,n),t.add.apply(t,o)}function Ft(t){let e=Symbol("TokenList");function n(o,r){let i=o[e]||(o[e]=new W(o,t));lo(i,r.trim().split(/\s+/))}return{attribute:function(o){n(this,o||"")},set:function(o){n(this,o+"")},get:function(){return this[e]||(this[e]=new W(this,t))}}}var Ot={};G(Ot,{disable:()=>ho,enable:()=>mo,getState:()=>go});var ao=J({s:S,ms:t=>t/1e3});function po(t){let{active:e,children:n,elements:o,host:r}=t,i=o.indexOf(e),s=o[i+1]||n[0];t.autoplay.timer=null,!!s&&(r.active=s)}function fo(t){let{active:e,style:n}=t,o=ao(window.getComputedStyle(e).getPropertyValue("--slide-duration")||n.getPropertyValue("--slide-duration"));clearTimeout(t.autoplay.timer),t.autoplay.timer=setTimeout(po,o*1e3,t)}function Ie(t){clearTimeout(t.autoplay.timer),t.autoplay.timer=null}function mo(t){let e=t[d],{actives:n}=e,o=e.autoplay={},r=g.merge([!1],x("pointerenter pointerleave",t).map(s=>s.type==="pointerenter")),i=g.merge([t.contains(document.activeElement)],x("focusin focusout",t).map(y(D("type"),{focusin:s=>!0,focusout:s=>t.contains(s.relatedTarget)}))).map((s=>l=>s===l?void 0:s=l)());o.updates=g.combine({active:n,hover:r,focus:i}).each(s=>s.hover||s.focus?Ie(e):fo(e))}function ho(t){let e=t[d];Ie(e),e.autoplay.updates.stop(),e.autoplay=void 0}function go(t){return!!t[d].autoplay}var At={};G(At,{disable:()=>yo,enable:()=>vo,getState:()=>bo});function je(t,e){let n=t.cloneNode(!0);return n.dataset.slideIndex=e,n.removeAttribute("id"),n.setAttribute("aria-hidden","true"),n.tabIndex="-1",n}function wo(t){let{active:e,children:n,host:o,scroller:r}=t;if(t.loop.prepends&&(t.loop.prepends.forEach(c=>c.remove()),t.loop.appends.forEach(c=>c.remove()),t.loop.prepends=void 0,t.loop.appends=void 0),n.length<2){t.elements=t.slides.assignedElements();return}let i=o.clientWidth,s=n.map(T),l=s[1].left,f=s[s.length-2].right,a=1;for(;s[++a]&&s[a].leftf-i;);let u=n.slice(++a).map((c,E)=>je(c,a+E));o.prepend.apply(o,u),o.append.apply(o,p),t.loop.prepends=u,t.loop.appends=p,t.elements=t.slides.assignedElements(),I(r,e||n[0])}function vo(t){let e=t[d],{mutations:n}=e,o=e.loop={};o.renders=n.each(r=>wo(e))}function yo(t){let e=t[d];e.loop&&(e.loop.prepends&&e.loop.prepends.forEach(n=>n.remove()),e.loop.appends&&e.loop.appends.forEach(n=>n.remove()),e.loop.renders.stop(),e.loop=void 0)}function bo(t){return!!t[d].loop}var Ct={};G(Ct,{disable:()=>Eo,enable:()=>xo,getState:()=>So});function j(t){if(typeof t!="object"||arguments.length>1)throw new Error("delegate() now takes an object of selector:fn pairs.");let e=Object.keys(t);return function(o){let r=o.target,i=-1;for(;e[++i];){let s=r.closest(e[i]);if(s)return t[e[i]](s,...arguments)}}}function He(t,e,n,o){o===0?t.hidden=!0:t.hidden=!1,o===n.length-1?e.hidden=!0:e.hidden=!1}function xo(t){let e=t[d],{actives:n,clicks:o,slotchanges:r}=e,i=e.navigation={prev:b("button",{part:"prev-button",type:"button",name:"navigation",value:"-1",html:"Previous"}),next:b("button",{part:"next-button",type:"button",name:"navigation",value:"1",html:"Next"})};e.controls.prepend(i.prev,i.next),i.updates=g.combine({active:n,changes:r}).each(s=>He(i.prev,i.next,s.changes.elements,s.changes.elements.indexOf(s.active))),i.clicks=o.each(j({'[name="navigation"]':function(s,l){let f=parseFloat(s.value),a=e.elements.indexOf(e.active)+f,p=e.elements[a];!p||(t.active=p,He(i.prev,i.next,e.elements,a))}}))}function Eo(t){let e=t[d];e.navigation.prev.remove(),e.navigation.next.remove(),e.navigation.updates.stop(),e.navigation.clicks.stop(),e.navigation=void 0}function So(t){return!!t[d].navigation}var It={};G(It,{disable:()=>ko,enable:()=>Lo,getState:()=>Po});function Me(t,e,n){let{active:o,buttons:r,index:i}=t;if(o===n)return;i>-1&&(t.activeSpan.remove(),r.children[i].part.remove("page-button-active"));let s=e.indexOf(n);s!==-1&&(r.children[s].part.add("page-button-active"),r.children[s].append(t.activeSpan),t.index=s,t.active=n)}function To(t,e,n,o){return e.buttons&&(e.buttons.remove(),e.buttons=void 0),o.length<2||(e.buttons=b("div",{part:"pagination",children:o.map((r,i)=>b("button",{part:"page-button",type:"button",name:"pagination",value:i}))}),t.append(e.buttons)),o.length}function Lo(t){let e=t[d],{shadow:n,actives:o,clicks:r,mutations:i}=e,s=e.pagination={activeSpan:b("span",{class:"invisible",text:"(Current slide)"})};s.mutations=i.each(()=>To(e.controls,s,n,e.children)),s.updates=g.combine({active:o,children:i}).filter(l=>l.children.length>1).each(l=>Me(s,e.children,e.active)),s.clicks=r.each(j({'[name="pagination"]':function(l,f){let{host:a}=e,p=e.children,u=p[l.value];!u||(a.active=u,Me(s,p,u))}}))}function ko(t){let e=t[d];e.pagination.buttons.remove(),e.pagination.mutations.stop(),e.pagination.updates.stop(),e.pagination.clicks.stop(),e.pagination=void 0}function Po(t){return!!t[d].pagination}var jt={};G(jt,{disable:()=>Oo,enable:()=>Fo,getState:()=>Ao});var De=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled;function ct(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement}function Be(t){return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():void 0}function ut(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}function Fo(t){let e=t[d];if(!De)return;let n=e.fullscreen={button:b("button",{part:"fullscreen-button",type:"button",name:"fullscreen",html:"Open in fullscreen"})};e.controls.append(n.button),n.changes=x("fullscreenchange",t).filter(o=>ct()===t).each(o=>{n.button.part.add("fullscreen-button-active"),n.button.innerHTML="Close fullscreen",document.activeElement!==t&&(n.tabIndex=t.tabIndex,t.tabIndex<0&&(t.tabIndex=0),t.focus());let r=x("fullscreenchange",t).each(i=>{n.button.part.remove("fullscreen-button-active"),n.button.innerHTML="Open in fullscreen",t.tabIndex=n.tabIndex,n.tabIndex=void 0,r.stop()})}),n.clicks=e.clicks.each(j({'[name="fullscreen"]':(o,r)=>{let i=ct();if(i===t){ut();return}i&&ut(),Be(t)}}))}function Oo(t){let e=t[d];ct()===t&&ut(),e.fullscreen.button.remove(),e.fullscreen.clicks.stop(),e.fullscreen.changes.stop(),e.fullscreen=void 0}function Ao(t){return!!t[d].fullscreen}var Ge={active:{attribute:function(t){this.active=t},set:function(t){let e=this[d],n=typeof t=="object"?t:/^\d/.test(t+"")?this.querySelector("#\\3"+(t+"")[0]+" "+(t+"").slice(1)):/^\#/.test(t+"")?this.querySelector(t):this.querySelector("#"+t);e.views.push(n)},get:function(){return this[d].active}},autoplay:st(Ot,"autoplay"),controls:Ft({navigation:Ct,pagination:It,fullscreen:jt}),loop:st(At,"loop")};var Co=import.meta.url.replace(/\/[^\/]*\.js/,"/slide-show-shadow.css"),Js=wt('
                    ',Ce,Ge,Co);export{Js as default}; +var qe=Object.defineProperty;var Dt=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable;var Bt=(t,e)=>{var n={};for(var o in t)We.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&Dt)for(var o of Dt(t))e.indexOf(o)<0&&Ne.call(t,o)&&(n[o]=t[o]);return n};var z=(t,e)=>{for(var n in e)qe(t,n,{get:e[n],enumerable:!0})};function $(t){var e=new Map;return function(o){if(e.has(o))return e.get(o);var r=t(o);return e.set(o,r),r}}var $e=Array.prototype;function Xe(t,e){return typeof t=="function"?t.apply(null,e):t}function Gt(t,e,n){n=n||t.length;var o=n===1?e?t:$(t):$(function(r){return Gt(function(){var i=[r];return i.push.apply(i,arguments),t.apply(null,i)},e,n-1)});return function r(i){return arguments.length===0?r:arguments.length===1?o(i):arguments.length>=n?t.apply(null,arguments):Xe(o(i),$e.slice.call(arguments,1))}}var v=Gt;function Ye(t,e){return 1-Math.pow(1-e,t)}var zt=v(Ye);function y(){}function pt(t,e){return e(t)}function S(t){return t}var Ke=Array.prototype;function ft(){let t=arguments;return t.length?e=>Ke.reduce.call(t,pt,e):S}function dt(t,e,n){return n*(e-t)+t}var Ze=window.performance,_t=window.requestAnimationFrame,Qe=window.cancelAnimationFrame;function mt(t,e,n){var o=Ze.now();function r(s){var a=(s-o)/(t*1e3);a<1?(a>0&&e(a),i=_t(r)):(e(1),n&&n())}var i=_t(r);return function(){Qe(i)}}function X(t,e,n,o,r,i){let s=o[n];return mt(t,ft(e,a=>dt(s,r,a),a=>o[n]=a),i)}function Je(){return{x:0,y:0,left:0,top:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}}function T(t){return t===window?Je():t.getClientRects()[0]||t.getBoundingClientRect()}var M={scrollDuration:.3,scrollDurationPerHeight:.125,scrollTransform:zt(3)},Rt=y;function tn(t,e){if(e.behavior==="smooth"){let n=t.style.getPropertyValue("scroll-snap-type"),o=()=>{let r=t.scrollLeft,i=t.scrollTop;t.style.setProperty("scroll-snap-type",n),t.scrollLeft=r,t.scrollTop=i};if(t.style.setProperty("scroll-snap-type","none"),e.left!==void 0){let r=t===document.body?window.innerWidth:T(t).width,i=M.scrollDuration+M.scrollDurationPerHeight*Math.abs(e.left-t.scrollLeft)/r;Rt=X(i,M.scrollTransform,"scrollLeft",t,e.left,o)}else{let r=t===document.body?window.innerHeight:T(t).height,i=M.scrollDuration+M.scrollDurationPerHeight*Math.abs(e.top-t.scrollTop)/r;Rt=X(i,M.scrollTransform,"scrollTop",t,e.top,o)}}else e.left!==void 0&&(t.scrollLeft=e.left),e.top!==void 0&&(t.scrollTop=e.top)}if(!("scrollBehavior"in document.documentElement.style)){window.console&&console.log("Polyfilling Element.scrollTo(options)");let t="scrollTo"in Element.prototype?Element:HTMLElement,e=t.scrollIntoView;t.prototype.scrollTo=function(n){typeof n=="object"?tn(this,n):e.apply(this,arguments)}}function b(t,e){return function(){let o=t.apply(this,arguments),r=e[o]||e.default;if(!r)throw new Error('overload() no handler for "'+o+'"');return r.apply(this,arguments)}}var en=b(S,{is:y,tag:y,html:function(t,e,n){e.innerHTML=n},text:function(t,e,n){e.textContent=n},children:function(t,e,n){e.innerHTML="",n.forEach(o=>{e.appendChild(o)})},points:D,cx:D,cy:D,r:D,preserveAspectRatio:D,viewBox:D,default:function(t,e,n){t in e?e[t]=n:e.setAttribute(t,n)}});function D(t,e,n){e.setAttribute(t,n)}function nn(t,e){for(var n=Object.keys(e),o=n.length;o--;)en(n[o],t,e[n[o]]);return t}var ht=v(nn,!0);var on="http://www.w3.org/2000/svg",Ut=document.createElement("div");var Vt=(t,e)=>e&&typeof e;function qt(t,e){let n=document.createRange();return n.selectNode(t),n.createContextualFragment(e)}function L(t,e){var n=document.createElementNS(on,t);return e&&(n.innerHTML=e),n}var rn=b(S,{comment:function(t,e){return document.createComment(e||"")},fragment:b(Vt,{string:function(t,e,n){if(n)return qt(n,e);let o=document.createDocumentFragment();Ut.innerHTML=e;let r=Ut.childNodes;for(;r[0];)o.appendChild(r[0]);return o},object:function(t,e,n){let o=n?qt(n):document.createDocumentFragment();return typeof e.length=="number"?o.append.apply(o,e):ht(o,e),o},default:()=>document.createDocumentFragment()}),text:function(t,e){return document.createTextNode(e||"")},circle:L,ellipse:L,g:L,glyph:L,image:L,line:L,rect:L,use:L,path:L,pattern:L,polygon:L,polyline:L,svg:L,default:b(Vt,{string:function(t,e){let n=document.createElement(t);return n.innerHTML=e,n},object:function(t,e){let n=document.createElement(t);return typeof e.length=="number"?n.append.apply(n,e):ht(n,e),n},default:t=>{if(typeof t!="string")throw new Error('create(tag, content) accepts only a string as tag "'+typeof t+'"');return document.createElement(t)}})}),x=rn;function gt(t,e,n){let o;typeof n!="string"&&n.input!==void 0&&n.index!==void 0&&(o=n,n=o.input.slice(n.index+n[0].length+(n.consumed||0)));let r=t.exec(n);if(!r)return;let i=e(r);return o&&(o.consumed=(o.consumed||0)+r.index+r[0].length+(r.consumed||0)),i}var fr=v(gt,!0);function sn(t,e,n){throw n.input!==void 0&&n.index!==void 0&&(n=n.input),new Error('Cannot parse string "'+n+'"')}function cn(t,e,n){let o=-1;for(;++ocn(e,n,i),o);return r===void 0?e.catch?e.catch(n,o):sn(t,e,o):r}var Wt=v(un,!0);var wt=y;var k=Symbol("internals"),A=Symbol("shadow"),Nt=Object.defineProperties,ln={a:HTMLAnchorElement,dl:HTMLDListElement,p:HTMLParagraphElement,br:HTMLBRElement,fieldset:HTMLFieldSetElement,hr:HTMLHRElement,img:HTMLImageElement,li:HTMLLIElement,ol:HTMLOListElement,optgroup:HTMLOptGroupElement,q:HTMLQuoteElement,textarea:HTMLTextAreaElement,td:HTMLTableCellElement,th:HTMLTableCellElement,tr:HTMLTableRowElement,tbody:HTMLTableSectionElement,thead:HTMLTableSectionElement,tfoot:HTMLTableSectionElement,ul:HTMLUListElement},an={name:{set:function(t){return this.setAttribute("name",t)},get:function(){return this.getAttribute("name")||""}},form:{get:function(){return this[k].form}},labels:{get:function(){return this[k].labels}},validity:{get:function(){return this[k].validity}},validationMessage:{get:function(){return this[k].validationMessage}},willValidate:{get:function(){return this[k].willValidate}},checkValidity:{value:function(){return this[k].checkValidity()}},reportValidity:{value:function(){return this[k].reportValidity()}}},pn={},$t={once:!0},fn=0,Xt=!1;function dn(t){return ln[t]||window["HTML"+t[0].toUpperCase()+t.slice(1)+"Element"]||(()=>{throw new Error('Constructor not found for tag "'+t+'"')})()}var mn=Wt(/^\s*?\s*$|^\s*?\s*$/,{1:(t,e)=>({name:e[1]}),2:(t,e)=>({name:e[3],tag:e[2]}),catch:function(t,e){throw new SyntaxError(`dom element() – name must be of the form 'element-name' or 'tag is="element-name"' (`+e+")")}},null);function hn(t,e){if(t.hasOwnProperty(e)){let n=t[e];delete t[e],t[e]=n}return t}function gn(t,e,n){t._initialLoad=!0;let o=t.attachShadow({mode:e.mode||"closed",delegatesFocus:e.focusable||!1});if(n){let r=x("link",{rel:"stylesheet",href:n});o.append(r)}return t[A]=o,o}function wn(t){var e;if(t.attachInternals){if(e=t.attachInternals(),e.setFormValue)return e}else e={shadowRoot:t.shadowRoot};return e.input=x("input",{type:"hidden",name:t.name}),t.appendChild(e.input),e.setFormValue=function(n){this.input.value=n},e}function vn(t){t._initialAttributes={},t._n=0}function yn(t,e,n){let o=t._initialAttributes;for(;t._nfn?gn(p,e,o||e.stylesheet):void 0,u=l.formAssociated&&wn(p);return i&&(Xt=!0),e.construct&&e.construct.call(p,g,u),a&&(vn(p),Promise.resolve(1).then(function(){Yt(p,l.observedAttributes,a)})),f&&Object.keys(f).reduce(hn,p),p}return l.prototype=Object.create(s.prototype,f),f&&f.value&&(l.formAssociated=!0,Nt(l.prototype,an),(e.enable||e.disable)&&(l.prototype.formDisabledCallback=function(p){return p?e.disable&&e.disable.call(this,this[A],this[k]):e.enable&&e.enable.call(this,this[A],this[k])}),e.reset&&(l.prototype.formResetCallback=function(){return e.reset.call(this,this[A],this[k])}),e.restore&&(l.prototype.formStateRestoreCallback=function(){return e.restore.call(this,this[A],this[k])})),a&&(l.observedAttributes=Object.keys(a),l.prototype.attributeChangedCallback=function(p,g,u){if(!this._initialAttributes)return a[p].call(this,u);this._initialAttributes[p]=u,yn(this,l.observedAttributes,a)}),l.prototype.connectedCallback=function(){let p=this,g=p[A],u=p[k];if(p._initialAttributes&&Yt(p,l.observedAttributes,a),p._initialLoad){let c=g.querySelectorAll('link[rel="stylesheet"]');if(c.length){let H=0,at=c.length,Mt=function(Ue){++H>=c.length&&(delete p._initialLoad,e.load&&(wt("element()","loaded",Array.from(c).map(Ve=>Ve.href).join(` +`)),e.load.call(p,g)))},_e=Mt;for(;at--;)c[at].addEventListener("load",Mt,$t),c[at].addEventListener("error",_e,$t);e.connect&&e.connect.call(this,g,u)}else e.connect&&e.connect.call(this,g,u),e.load&&e.load.call(this,g,u)}else e.connect&&e.connect.call(this,g,u)},e.disconnect&&(l.prototype.disconnectedCallback=function(){return e.disconnect.call(this,this[A],this[k])}),wt("element()","<"+(i?i+" is="+r:r)+">"),window.customElements.define(r,l,i&&{extends:i}),i&&!Xt&&document.querySelectorAll('[is="'+r+'"]').forEach(p=>{Nt(p,f),e.construct&&e.construct.apply(p);let g;for(g in a){let u=p.attributes[g];u&&a[g].call(p,u.value)}e.connect&&e.connect.apply(p)}),l}function Zt(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object")return!1;let n=Object.keys(t),o=Object.keys(e),r=n.length;for(;r--;){if(t[n[r]]===void 0){if(e[n[r]]!==void 0)return!1}else if(!e.hasOwnProperty(n[r])||!Zt(t[n[r]],e[n[r]]))return!1;let i=o.indexOf(n[r]);i>-1&&o.splice(i,1)}for(r=o.length;r--;)if(e[o[r]]===void 0){if(t[o[r]]!==void 0)return!1}else return!1;return!0}var Qt=v(Zt,!0);function En(t,e){return e[t]}var B=v(En,!0);var Sn=Object.freeze;function Jt(){return this}var P=Sn({shift:y,push:y,forEach:y,join:function(){return""},map:Jt,filter:Jt,includes:function(){return!1},reduce:function(t,e){return e},length:0,each:y,pipe:S,start:y,stop:y,done:y,valueOf:function(){return null}});function yt(){return this}function bt(t){return t&&t[Symbol.iterator]}var Tn=Object.assign;function Ln(t){return t.stop?t.stop():t()}function kn(t){t.forEach(Ln),t.length=0}function G(){}Tn(G.prototype,{stop:function(){return this.stopables&&kn(this.stopables),this},done:function(e){return(this.stopables||(this.stopables=[])).push(e),this}});var Pn=Object.assign;function Y(t){G.prototype.stop.apply(t);let e=-1,n;for(;n=t[++e];)t[e]=void 0,Y(n)}function m(){}Pn(m.prototype,{pipe:function(t){return this[0]=t,t},stop:function(){return Y(this[0]),this}});var F=Object.assign,O=Object.create;function _(t,e){e!==void 0&&t[0].push(e)}function Fn(t,e){if(t[1]){let n=-1;for(;t[++n]&&t[n]!==e;);for(;t[n++];)t[n-1]=t[n];Y(e)}else t.stop()}function w(t){this.input=t}F(w.prototype,G.prototype,{push:function(t){_(this,t)},pipe:function(t){if(this[0])throw new Error("Stream: Attempt to .pipe() a unicast stream multiple times. Create a multicast stream with stream.broadcast().");return this[0]=t,this.input.pipe(this),t},map:function(t){return new te(this,t)},filter:function(t){return new ee(this,t)},chunk:function(t){return new oe(this,t)},flatMap:function(t){return new ne(this,t)},take:function(t){return new re(this,t)},each:function(t){return new ce(this,t)},reduce:function(t,e){return new ie(this,t,e)},scan:function(t,e){return new se(this,t,e)},stop:function(){return Fn(this.input,this),this}});function te(t,e){this.input=t,this.fn=e}te.prototype=F(O(w.prototype),{push:function(e){let n=this.fn;_(this,n(e))}});function ee(t,e){this.input=t,this.fn=e}ee.prototype=F(O(w.prototype),{push:function(e){this.fn(e)&&_(this,e)}});function ne(t,e){this.input=t,this.fn=e}ne.prototype=F(O(w.prototype),{push:function(e){let o=this.fn(e);if(o!==void 0)if(bt(o))for(let r of o)_(this,r);else throw new Error("Stream: Cannot .flatMap() non-iterable values")}});function oe(t,e){this.input=t,this.chunk=[],typeof e=="number"?this.n=e:typeof e=="function"&&(this.fn=e)}oe.prototype=F(O(w.prototype),{fn:function(t){return t.length===this.n},push:function(e){let n=this.chunk;n.push(e),this.fn(n)&&(_(this,n),this.chunk=[])}});function re(t,e){this.input=t,this.count=e}re.prototype=F(O(w.prototype),{push:function(e){this[0].push(e),--this.count||this.stop()}});function ie(t,e,n){return this.input=t,this.fn=e,this.value=n,this.i=0,t.pipe(this),n}ie.prototype=F(O(w.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t,this.i++,this)}});function se(t,e,n){this.input=t,this.fn=e,this.value=n}se.prototype=F(O(w.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t),this[0].push(this.value)}});function ce(t,e){this.input=t,this.push=e,t.pipe(this)}ce.prototype=F(O(w.prototype),{each:null,reduce:null,pipe:null});var On=Array.prototype,An=Object.assign,Cn=Object.create;function R(t){this.buffer=t||[]}R.prototype=An(Cn(w.prototype),m.prototype,{push:function(t){t!==void 0&&this.buffer.push(t)},pipe:function(t){for(this[0]=t;this.buffer.length;)this[0].push(On.shift.apply(this.buffer));return this.buffer=this[0],t}});var In=Object.assign,jn=Object.create;function U(t,e){this.input=t,this.memory=!!(e&&e.memory),e&&e.hot&&this.pipe(P)}U.prototype=In(jn(w.prototype),{push:function(t){if(t!==void 0){this.memory&&(this.value=t);let e=-1;for(;this[++e];)this[e].push(t)}},pipe:function(t){let e=-1;for(;this[++e];);return this[e]=t,this.value!==void 0&&t.push(this.value),e===0&&this.input.pipe(this),t}});var Hn=Object.assign;function K(t){this.promise=t}Hn(K.prototype,m.prototype,{pipe:function(t){let e=this.promise;this[0]=t,e.then(n=>this[0].push(n)).finally(n=>this.stop())},stop:function(){m.prototype.stop.apply(this,arguments),this[0]=P}});var le=Object.assign,ae=Object.keys;function ue(t,e,n){let o=t.values,r=t.names,i=t[0];o[e]=n,(t.active||(t.active=ae(o).length===r.length))&&i.push(le({},o))}function Z(t){this.inputs=t,this.active=!1}le(Z.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this.values={},this.names=ae(e),this[0]=t;for(let n in e){let o=e[n];o.pipe?t.done(o.each(r=>ue(this,n,r))):o.then?o.then(r=>ue(this,n,r)):console.log("Todo: combine() raw values ?")}}});var Mn=Object.assign;function Q(t){this.inputs=t}Mn(Q.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this[0]=t;let n=-1,o;for(;o=e[++n];)if(o.pipe)o.pipe(t);else if(o.then)o.then(r=>t.push(r));else{let r=-1;for(;++r0}function Gn(t,e,n){return t[n]=e.shift(),t}function zn(t){return[]}function xt(t,e,n,o){n.push(o),e.every(Bn)&&t.push(e.reduce(Gn,{}))}function J(t){this.inputs=t,this.buffers=Et.map.call(t,zn)}Dn(J.prototype,m.prototype,{pipe:function(t){let e=this.inputs,n=this.buffers;this[0]=t,Et.forEach.call(e,(o,r)=>{let i=n[r];o.each?t.done(o.each(s=>xt(t,n,i,s))):o.then?o.then(s=>xt(t,n,i,s)):Et.forEach.call(o,s=>xt(t,n,i,s))})},stop:function(){let t=this.inputs,e=-1,n;for(;n=t[++e];)n.stop();return m.prototype.stop.apply(this,arguments)}});var _n=Array.prototype,pe=Object.assign;function Rn(t){throw new TypeError("Stream: invalid source object cannot be read into stream")}var h=pe(w,{of:function(){return new R(_n.slice.apply(arguments))},from:function(t){return t.pipe?new w(t):t.then?new w(new K(t)):typeof t.length=="number"?new R(t):Rn(t)},broadcast:function(e){return new U(P,e)},combine:function(e){return new w(new Z(e))},merge:function(){return new w(new Q(arguments))},zip:function(){return new w(new J(arguments))}});pe(w.prototype,{log:yt,broadcast:function(t){return new U(this,t)}});var Un=Object.assign,Vn=/\s+/,fe={fullscreenchange:"fullscreenElement"in document?"fullscreenchange":"webkitFullscreenElement"in document?"webkitfullscreenchange":"fullscreenchange"};function de(t){return t.which===1&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}var me=0;window.addEventListener("click",t=>me=t.timeStamp);function qn(t,e){return t.node.addEventListener(fe[e]||e,t,t.options),t}function Wn(t,e){return t.node.removeEventListener(fe[e]||e,t),t}function he(t,e,n){this.types=t.split(Vn),this.options=e,this.node=n,this.select=e&&e.select}Un(he.prototype,m.prototype,{pipe:function(t){this[0]=t,this.types.reduce(qn,this)},handleEvent:function(t){if(!(t.type==="click"&&t.timeStamp<=me)){if(this.select){let e=t.target.closest(this.select);if(!e)return;t.selectedTarget=e}this[0].push(t)}},stop:function(){this.types.reduce(Wn,this),m.prototype.stop.apply(this,arguments)}});function E(t,e){let n;return typeof t=="object"&&(n=t,t=n.type),new h(new he(t,n,e))}function St(t){return typeof t}var Nn=/^\s*([+-]?\d*\.?\d+)([^\s\d]*)\s*$/;function $n(t,e){if(typeof e=="number")return e;var n=Nn.exec(e);if(!n||!t[n[2]||""]){if(!t.catch)throw new Error('Cannot parse value "'+e+'" with provided units '+Object.keys(t).join(", "));return n?t.catch(parseFloat(n[1]),n[2]):t.catch(parseFloat(e))}return t[n[2]||""](parseFloat(n[1]))}var tt=v($n);var Xn=/px$/,ge={"transform:translateX":function(t){var e=V("transform",t);if(!e||e==="none")return 0;var n=et(e);return parseFloat(n[4])},"transform:translateY":function(t){var e=V("transform",t);if(!e||e==="none")return 0;var n=et(e);return parseFloat(n[5])},"transform:scale":function(t){var e=V("transform",t);if(!e||e==="none")return 0;var n=et(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.sqrt(o*o+r*r)},"transform:rotate":function(t){var e=V("transform",t);if(!e||e==="none")return 0;var n=et(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.atan2(r,o)}};function et(t){return t.split("(")[1].split(")")[0].split(/\s*,\s*/)}function V(t,e){return window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):0}function nt(t,e){if(ge[t])return ge[t](e);var n=V(t,e);return typeof n=="string"&&Xn.test(n)?parseFloat(n):n}var ot,rt;function Yn(){if(!ot){let t=document.documentElement.style.fontSize;document.documentElement.style.fontSize="100%",ot=nt("font-size",document.documentElement),document.documentElement.style.fontSize=t||""}return ot}function Kn(){return rt||(rt=nt("font-size",document.documentElement)),rt}window.addEventListener("resize",()=>{ot=void 0,rt=void 0});var C=b(St,{number:S,string:tt({em:function(t){return Yn()*t},px:function(t){return t},rem:function(t){return Kn()*t},vw:function(t){return window.innerWidth*t/100},vh:function(t){return window.innerHeight*t/100},vmin:function(t){return window.innerWidthn?o:n}n=nW.maxScrollInterval?W.maxScrollInterval:1.4*n}function st(){return be}function Ee(t){let e=T(t),n=window.getComputedStyle(t,null),o=C(n.getPropertyValue("padding-left")),r=C(n.getPropertyValue("padding-right"));return e.leftPadding=e.left+o,e.rightPadding=e.left+e.width-r,e.centrePadding=e.leftPadding+(e.width-o-r)/2,e}function Se(t){let e=window.getComputedStyle(t,null).getPropertyValue("scroll-snap-align");return e.endsWith("start")?"left":e.endsWith("end")?"right":"centre"}function Te(t,e,n){let o=Ee(t),r=T(e),i=Se(e);t.scrollTo({top:t.scrollTop,left:t.scrollLeft+(i==="left"?r.left-o.leftPadding:i==="right"?r.right-o.rightPadding:r.left+r.width/2-o.centrePadding),behavior:n})}function Le(t,e){return Te(t,e,"smooth"),e}function I(t,e){return t.style.setProperty("scroll-behavior","auto","important"),Te(t,e,"auto"),t.style.setProperty("scroll-behavior",""),e}function ke(t,e){let{leftPadding:n,rightPadding:o,centrePadding:r}=Ee(t),i=e.length,s;for(;s=e[--i];){let a=T(s);if(!a)continue;let f=Se(s),l=a.width/2+(f==="left"?n:f==="right"?o:r),p=f==="left"?a.left:f==="right"?a.right:a.left+a.width/2;if(p<=l){console.log(p,l,s);break}}return s}function Pe(t){return!!t.dataset.slideIndex}function Fe(t){let{scroller:e,elements:n,children:o}=t,r=ke(e,n);return Pe(r)?o[r.dataset.slideIndex]:r}function Oe(t){let{scroller:e,children:n,elements:o}=t,r=ke(e,o),i;console.log("CURRENT",r),!!r&&(Pe(r)?(i=n[r.dataset.slideIndex],I(e,i)):i=r,t.activations.push(i))}function to(t,e){t.style.setProperty("scroll-snap-type",""),e.stop()}var Ae=b((t,e)=>e.type,{pointerdown:function(t,e){return t.e0=e,t.x0=e.clientX,t.y0=e.clientY,t},pointermove:function(t,e){let n=e.clientX,o=e.clientY;if(!t.gesturing){if(Math.abs(n-t.x0)(clearTimeout(s),setTimeout(to,st()*1e3,n,l)))}return t.gesturing=!1,t.e0=void 0,t.x0=void 0,t.y0=void 0,t.pointers=void 0,t.scrollLeft0=void 0,t}});var eo=Object.assign,no={capture:!0,passive:!0};function oo(t,e){t.timer=void 0,t.stream.push(e);let n=t.times;n.length>1&&xe(n),n.length=0}function Ce(t){this.element=t,this.times=[]}eo(Ce.prototype,m.prototype,{pipe:function(t){this.stream=t,this.element.addEventListener("scroll",this,no)},handleEvent:function(t){let e=t.timeStamp/1e3;this.times.push(e),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(oo,st()*1e3,this,t)},stop:function(){this.element.removeEventListener("scroll",this),m.prototype.stop.apply(this,arguments)}});function Pt(t){return new h(new Ce(t))}function ro(t,e,n){let o=n.length,r=-1/0;for(;o--;){let l=T(n[o]),p=l.x+l.width;r=p>r?p:r}let i=T(e),s=getComputedStyle(t),a=C(s.paddingLeft||0),f=C(s.paddingRight||0);return a+f+r-i.x}function io(t,e,n){let o=ro(t,e,n);t.style.setProperty("--scroll-width",o+"px")}function so(t){return!t.dataset.slideIndex}var Ie={construct:function(t){let e=x("slot",{part:"slides",style:"display: grid;"}),n=x("div",{class:"scroller",children:[e]}),o=x("nav",{part:"controls",children:[x("slot",{name:"controls"})]});t.append(n,o);let r=h.broadcast(),i=h.broadcast(),s=h.combine({host:i,elements:E("slotchange",e).map(c=>u.elements=e.assignedElements())}).broadcast({memory:!0}),a=s.map(c=>{let H=c.elements.filter(so);return Qt(u.children,H)?void 0:u.children=H}).broadcast({memory:!0,hot:!0}),f=h.of(),l=h.of(),p=l.map(c=>c.dataset.slideIndex?u.children[c.dataset.slideIndex]:c).filter(c=>u.active!==c&&kt("slide-active",c)).map(c=>u.active=c).log("ACTIVE").broadcast({memory:!0,hot:!0}),g=E("click",t).filter(de).broadcast(),u=this[d]={clickSuppressTime:-1/0,connected:!1,host:this,style:window.getComputedStyle(this),elements:P,children:P,scroller:n,slides:e,controls:o,connects:r,load:i,views:f,activations:l,actives:p,slotchanges:s,mutations:a,clicks:g};h.merge(s,E("resize",window)).each(c=>io(n,e,u.elements)),h.combine({slotchanges:s,connects:r}).map(c=>u.elements.includes(u.active)?u.active:u.children[0]).map(c=>u.connected?I(n,c):c).pipe(l),h.combine({host:i,child:f}).map(c=>u.elements.includes(c.child)&&u.active!==c.child?c.child:void 0).map(c=>u.connected?u.active?Le(n,c):I(n,c):c).pipe(l),Pt(n).filter(c=>u.connected&&!u.gesturing).each(c=>Oe(u)),Lt({threshold:"0.25rem",device:"mouse"},t).filter(()=>u.children.length>1).each(c=>{u.pointers=c,c.reduce(Ae,u)}),g.each(c=>{c.timeStamp-u.clickSuppressTime<120&&(c.preventDefault(),c.stopPropagation())}),E("fullscreenchange",window).each(c=>{(c.target===this||c.target.contains(this))&&I(n,u.active)}),E("focusin",this).map(c=>u.children.indexOf(c.target)!==-1?c.target:u.children.find(H=>H.contains(c.target))).pipe(f),E("keydown",this).filter(()=>document.activeElement===this||this.contains(document.activeElement)).map(b(B("keyCode"),{37:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)-1]),39:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)+1]),default:y})).pipe(f)},load:function(t){this[d].load.push(this)},connect:function(t){let e=this[d];e.connected=!0,e.connects.push(!0)},disconnect:function(t){let e=this[d];e.connected=!1}};function ct(t,e){function n(o,r){if(t.getState(o)!==r)return t[r?"enable":"disable"](o)}return{attribute:function(o){return n(this,o!==null)},set:function(o){return n(this,!!o)},get:function(){return t.getState(this)}}}function Ft(t,e){t.remove&&t.remove(e);let n;for(;(n=t.indexOf(e))!==-1;)t.splice(n,1);return e}var as=v(Ft,!0);var co=Object.assign;function N(t,e){this.element=t,this.definitions=e,this.tokens=[]}co(N.prototype,{contains:function(t){return this.tokens.includes(t)},add:function(){let t=arguments.length;for(;t--;){let e=arguments[t];!this.tokens.includes(e)&&this.definitions[e]&&(this.definitions[e].enable(this.element),this.tokens.push(e))}},remove:function(){let t=arguments.length;for(;t--;){let e=arguments[t];this.tokens.includes(e)&&(this.definitions[e].disable(this.element),Ft(this.tokens,e))}},supports:function(t){return!!this.definitions[t]}});var uo=Array.prototype;function lo(t,e){let n=t.tokens.slice(),o=uo.slice.apply(e),r=n.length;for(;r--;)o.includes(n[r])&&n.splice(r,1);t.remove.apply(t,n),t.add.apply(t,o)}function Ot(t){let e=Symbol("TokenList");function n(o,r){let i=o[e]||(o[e]=new N(o,t));lo(i,r.trim().split(/\s+/))}return{attribute:function(o){n(this,o||"")},set:function(o){n(this,o+"")},get:function(){return this[e]||(this[e]=new N(this,t))}}}var At={};z(At,{disable:()=>ho,enable:()=>mo,getState:()=>go});var ao=tt({s:S,ms:t=>t/1e3});function po(t){let{active:e,children:n,elements:o,host:r}=t,i=o.indexOf(e),s=o[i+1]||n[0];t.autoplay.timer=null,!!s&&(r.active=s)}function fo(t){let{active:e,style:n}=t,o=ao(window.getComputedStyle(e).getPropertyValue("--slide-duration")||n.getPropertyValue("--slide-duration"));clearTimeout(t.autoplay.timer),t.autoplay.timer=setTimeout(po,o*1e3,t)}function je(t){clearTimeout(t.autoplay.timer),t.autoplay.timer=null}function mo(t){let e=t[d],{actives:n}=e,o=e.autoplay={},r=h.merge([!1],E("pointerenter pointerleave",t).map(s=>s.type==="pointerenter")),i=h.merge([t.contains(document.activeElement)],E("focusin focusout",t).map(b(B("type"),{focusin:s=>!0,focusout:s=>t.contains(s.relatedTarget)}))).map((s=>a=>s===a?void 0:s=a)());o.updates=h.combine({active:n,hover:r,focus:i}).each(s=>s.hover||s.focus?je(e):fo(e))}function ho(t){let e=t[d];je(e),e.autoplay.updates.stop(),e.autoplay=void 0}function go(t){return!!t[d].autoplay}var Ct={};z(Ct,{disable:()=>yo,enable:()=>vo,getState:()=>bo});function He(t,e){let n=t.cloneNode(!0);return n.dataset.slideIndex=e,n.removeAttribute("id"),n.setAttribute("aria-hidden","true"),n.tabIndex="-1",n}function wo(t){let{active:e,children:n,host:o,scroller:r}=t;if(t.loop.prepends&&(t.loop.prepends.forEach(u=>u.remove()),t.loop.appends.forEach(u=>u.remove()),t.loop.prepends=void 0,t.loop.appends=void 0),n.length<2){t.elements=t.slides.assignedElements();return}let i=o.clientWidth,s=n.map(T),a=s[1].left,f=s[s.length-2].right,l=1;for(;s[++l]&&s[l].leftf-i;);let g=n.slice(++l).map((u,c)=>He(u,l+c));o.prepend.apply(o,g),o.append.apply(o,p),t.loop.prepends=g,t.loop.appends=p,t.elements=t.slides.assignedElements(),I(r,e||n[0])}function vo(t){let e=t[d],{mutations:n}=e,o=e.loop={};o.renders=n.each(r=>wo(e))}function yo(t){let e=t[d];e.loop&&(e.loop.prepends&&e.loop.prepends.forEach(n=>n.remove()),e.loop.appends&&e.loop.appends.forEach(n=>n.remove()),e.loop.renders.stop(),e.loop=void 0)}function bo(t){return!!t[d].loop}var It={};z(It,{disable:()=>Eo,enable:()=>xo,getState:()=>So});function j(t){if(typeof t!="object"||arguments.length>1)throw new Error("delegate() now takes an object of selector:fn pairs.");let e=Object.keys(t);return function(o){let r=o.target,i=-1;for(;e[++i];){let s=r.closest(e[i]);if(s)return t[e[i]](s,...arguments)}}}function Me(t,e,n,o){o===0?t.hidden=!0:t.hidden=!1,o===n.length-1?e.hidden=!0:e.hidden=!1}function xo(t){let e=t[d],{actives:n,clicks:o,slotchanges:r}=e,i=e.navigation={prev:x("button",{part:"prev-button",type:"button",name:"navigation",value:"-1",html:"Previous"}),next:x("button",{part:"next-button",type:"button",name:"navigation",value:"1",html:"Next"})};e.controls.prepend(i.prev,i.next),i.updates=h.combine({active:n,changes:r}).each(s=>Me(i.prev,i.next,s.changes.elements,s.changes.elements.indexOf(s.active))),i.clicks=o.each(j({'[name="navigation"]':function(s,a){let f=parseFloat(s.value),l=e.elements.indexOf(e.active)+f,p=e.elements[l];!p||(t.active=p,Me(i.prev,i.next,e.elements,l))}}))}function Eo(t){let e=t[d];e.navigation.prev.remove(),e.navigation.next.remove(),e.navigation.updates.stop(),e.navigation.clicks.stop(),e.navigation=void 0}function So(t){return!!t[d].navigation}var jt={};z(jt,{disable:()=>ko,enable:()=>Lo,getState:()=>Po});function De(t,e,n){let{active:o,buttons:r,index:i}=t;if(o===n)return;i>-1&&(t.activeSpan.remove(),r.children[i].part.remove("page-button-active"));let s=e.indexOf(n);s!==-1&&(r.children[s].part.add("page-button-active"),r.children[s].append(t.activeSpan),t.index=s,t.active=n)}function To(t,e,n,o){return e.buttons&&(e.buttons.remove(),e.buttons=void 0),o.length<2||(e.buttons=x("div",{part:"pagination",children:o.map((r,i)=>x("button",{part:"page-button",type:"button",name:"pagination",value:i}))}),t.append(e.buttons)),o.length}function Lo(t){let e=t[d],{shadow:n,actives:o,clicks:r,mutations:i}=e,s=e.pagination={activeSpan:x("span",{class:"invisible",text:"(Current slide)"})};s.mutations=i.each(()=>To(e.controls,s,n,e.children)),s.updates=h.combine({active:o,children:i}).filter(a=>a.children.length>1).each(a=>De(s,e.children,e.active)),s.clicks=r.each(j({'[name="pagination"]':function(a,f){let{host:l}=e,p=e.children,g=p[a.value];!g||(l.active=g,De(s,p,g))}}))}function ko(t){let e=t[d];e.pagination.buttons.remove(),e.pagination.mutations.stop(),e.pagination.updates.stop(),e.pagination.clicks.stop(),e.pagination=void 0}function Po(t){return!!t[d].pagination}var Ht={};z(Ht,{disable:()=>Oo,enable:()=>Fo,getState:()=>Ao});var Be=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled;function ut(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement}function Ge(t){return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():void 0}function lt(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}function Fo(t){let e=t[d];if(!Be)return;let n=e.fullscreen={button:x("button",{part:"fullscreen-button",type:"button",name:"fullscreen",html:"Open in fullscreen"})};e.controls.append(n.button),n.changes=E("fullscreenchange",t).filter(o=>ut()===t).each(o=>{n.button.part.add("fullscreen-button-active"),n.button.innerHTML="Close fullscreen",document.activeElement!==t&&(n.tabIndex=t.tabIndex,t.tabIndex<0&&(t.tabIndex=0),t.focus());let r=E("fullscreenchange",t).each(i=>{n.button.part.remove("fullscreen-button-active"),n.button.innerHTML="Open in fullscreen",t.tabIndex=n.tabIndex,n.tabIndex=void 0,r.stop()})}),n.clicks=e.clicks.each(j({'[name="fullscreen"]':(o,r)=>{let i=ut();if(i===t){lt();return}i&<(),Ge(t)}}))}function Oo(t){let e=t[d];ut()===t&<(),e.fullscreen.button.remove(),e.fullscreen.clicks.stop(),e.fullscreen.changes.stop(),e.fullscreen=void 0}function Ao(t){return!!t[d].fullscreen}var ze={active:{attribute:function(t){this.active=t},set:function(t){let e=this[d],n=typeof t=="object"?t:/^\d/.test(t+"")?this.querySelector("#\\3"+(t+"")[0]+" "+(t+"").slice(1)):/^\#/.test(t+"")?this.querySelector(t):this.querySelector("#"+t);e.views.push(n)},get:function(){return this[d].active}},autoplay:ct(At,"autoplay"),controls:Ot({navigation:It,pagination:jt,fullscreen:Ht}),loop:ct(Ct,"loop")};var Co=import.meta.url.replace(/\/[^\/]*\.js/,"/slide-show-shadow.css"),Js=vt('
                      ',Ie,ze,Co);export{Js as default}; diff --git a/build/slide-show.css b/build/slide-show.css index 214b649..4f5ce92 100644 --- a/build/slide-show.css +++ b/build/slide-show.css @@ -1,6 +1,6 @@ /* slide-show 1.1.6 By Stephen Band - Built 2022-05-18 15:13 */ + Built 2022-05-19 13:21 */ slide-show{display:grid;position:relative;box-sizing:border-box;padding:0;grid-auto-flow:column;grid-auto-columns:100%;grid-auto-rows:min-content;align-items:center;justify-items:stretch;scroll-snap-type:x mandatory;scroll-snap-stop:always;-webkit-scroll-behavior:smooth;scroll-behavior:smooth;overscroll-behavior-x:contain;-ms-overflow-style:none;scrollbar-width:none;padding-left:var(--padding-left, 0);padding-right:var(--padding-right, 0);scroll-padding-left:var(--padding-left, 0);scroll-padding-right:var(--padding-right, 0)}slide-show:not(:defined){overflow:scroll;overflow-y:hidden}.loading slide-show{-webkit-scroll-behavior:auto;scroll-behavior:auto}slide-show::-webkit-scrollbar{display:none}slide-show:not(:defined)>[slot]{display:none}slide-show>*{scroll-snap-align:center}slide-show:-webkit-full-screen{align-content:center}slide-show:fullscreen{align-content:center} diff --git a/build/slide-show.js b/build/slide-show.js index 63ff4cd..33ab10b 100644 --- a/build/slide-show.js +++ b/build/slide-show.js @@ -1,7 +1,7 @@ /* slide-show 1.1.6 By Stephen Band - Built 2022-05-18 15:13 */ + Built 2022-05-19 13:21 */ -var qe=Object.defineProperty;var Mt=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var Dt=(t,e)=>{var n={};for(var o in t)We.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&Mt)for(var o of Mt(t))e.indexOf(o)<0&&$e.call(t,o)&&(n[o]=t[o]);return n};var G=(t,e)=>{for(var n in e)qe(t,n,{get:e[n],enumerable:!0})};function $(t){var e=new Map;return function(o){if(e.has(o))return e.get(o);var r=t(o);return e.set(o,r),r}}var Ne=Array.prototype;function Xe(t,e){return typeof t=="function"?t.apply(null,e):t}function Bt(t,e,n){n=n||t.length;var o=n===1?e?t:$(t):$(function(r){return Bt(function(){var i=[r];return i.push.apply(i,arguments),t.apply(null,i)},e,n-1)});return function r(i){return arguments.length===0?r:arguments.length===1?o(i):arguments.length>=n?t.apply(null,arguments):Xe(o(i),Ne.slice.call(arguments,1))}}var w=Bt;function Ye(t,e){return 1-Math.pow(1-e,t)}var Gt=w(Ye);function v(){}function at(t,e){return e(t)}function S(t){return t}var Ke=Array.prototype;function pt(){let t=arguments;return t.length?e=>Ke.reduce.call(t,at,e):S}function ft(t,e,n){return n*(e-t)+t}var Ze=window.performance,zt=window.requestAnimationFrame,Qe=window.cancelAnimationFrame;function dt(t,e,n){var o=Ze.now();function r(s){var l=(s-o)/(t*1e3);l<1?(l>0&&e(l),i=zt(r)):(e(1),n&&n())}var i=zt(r);return function(){Qe(i)}}function N(t,e,n,o,r,i){let s=o[n];return dt(t,pt(e,l=>ft(s,r,l),l=>o[n]=l),i)}function Je(){return{x:0,y:0,left:0,top:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}}function T(t){return t===window?Je():t.getClientRects()[0]||t.getBoundingClientRect()}var H={scrollDuration:.3,scrollDurationPerHeight:.125,scrollTransform:Gt(3)},_t=v;function tn(t,e){if(e.behavior==="smooth"){let n=t.style.getPropertyValue("scroll-snap-type"),o=()=>t.style.setProperty("scroll-snap-type",n);if(t.style.setProperty("scroll-snap-type","none"),e.left!==void 0){let r=t===document.body?window.innerWidth:T(t).width,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.left-t.scrollLeft)/r;_t=N(i,H.scrollTransform,"scrollLeft",t,e.left,o)}else{let r=t===document.body?window.innerHeight:T(t).height,i=H.scrollDuration+H.scrollDurationPerHeight*Math.abs(e.top-t.scrollTop)/r;_t=N(i,H.scrollTransform,"scrollTop",t,e.top,o)}}else e.left!==void 0&&(t.scrollLeft=e.left),e.top!==void 0&&(t.scrollTop=e.top)}if(!("scrollBehavior"in document.documentElement.style)){console.log("Polyfilling Element.scrollTo(options).");let t="scrollTo"in Element.prototype?Element:HTMLElement,e=t.scrollIntoView;t.prototype.scrollTo=function(n){typeof n=="object"?tn(this,n):e.apply(this,arguments)}}function y(t,e){return function(){let o=t.apply(this,arguments),r=e[o]||e.default;if(!r)throw new Error('overload() no handler for "'+o+'"');return r.apply(this,arguments)}}var en=y(S,{is:v,tag:v,html:function(t,e,n){e.innerHTML=n},text:function(t,e,n){e.textContent=n},children:function(t,e,n){e.innerHTML="",n.forEach(o=>{e.appendChild(o)})},points:M,cx:M,cy:M,r:M,preserveAspectRatio:M,viewBox:M,default:function(t,e,n){t in e?e[t]=n:e.setAttribute(t,n)}});function M(t,e,n){e.setAttribute(t,n)}function nn(t,e){for(var n=Object.keys(e),o=n.length;o--;)en(n[o],t,e[n[o]]);return t}var mt=w(nn,!0);var on="http://www.w3.org/2000/svg",Rt=document.createElement("div");var Ut=(t,e)=>e&&typeof e;function Vt(t,e){let n=document.createRange();return n.selectNode(t),n.createContextualFragment(e)}function L(t,e){var n=document.createElementNS(on,t);return e&&(n.innerHTML=e),n}var rn=y(S,{comment:function(t,e){return document.createComment(e||"")},fragment:y(Ut,{string:function(t,e,n){if(n)return Vt(n,e);let o=document.createDocumentFragment();Rt.innerHTML=e;let r=Rt.childNodes;for(;r[0];)o.appendChild(r[0]);return o},object:function(t,e,n){let o=n?Vt(n):document.createDocumentFragment();return typeof e.length=="number"?o.append.apply(o,e):mt(o,e),o},default:()=>document.createDocumentFragment()}),text:function(t,e){return document.createTextNode(e||"")},circle:L,ellipse:L,g:L,glyph:L,image:L,line:L,rect:L,use:L,path:L,pattern:L,polygon:L,polyline:L,svg:L,default:y(Ut,{string:function(t,e){let n=document.createElement(t);return n.innerHTML=e,n},object:function(t,e){let n=document.createElement(t);return typeof e.length=="number"?n.append.apply(n,e):mt(n,e),n},default:t=>{if(typeof t!="string")throw new Error('create(tag, content) accepts only a string as tag "'+typeof t+'"');return document.createElement(t)}})}),b=rn;function ht(t,e,n){let o;typeof n!="string"&&n.input!==void 0&&n.index!==void 0&&(o=n,n=o.input.slice(n.index+n[0].length+(n.consumed||0)));let r=t.exec(n);if(!r)return;let i=e(r);return o&&(o.consumed=(o.consumed||0)+r.index+r[0].length+(r.consumed||0)),i}var fr=w(ht,!0);function sn(t,e,n){throw n.input!==void 0&&n.index!==void 0&&(n=n.input),new Error('Cannot parse string "'+n+'"')}function cn(t,e,n){let o=-1;for(;++ocn(e,n,i),o);return r===void 0?e.catch?e.catch(n,o):sn(t,e,o):r}var qt=w(un,!0);var gt=v;var k=Symbol("internals"),A=Symbol("shadow"),Wt=Object.defineProperties,ln={a:HTMLAnchorElement,dl:HTMLDListElement,p:HTMLParagraphElement,br:HTMLBRElement,fieldset:HTMLFieldSetElement,hr:HTMLHRElement,img:HTMLImageElement,li:HTMLLIElement,ol:HTMLOListElement,optgroup:HTMLOptGroupElement,q:HTMLQuoteElement,textarea:HTMLTextAreaElement,td:HTMLTableCellElement,th:HTMLTableCellElement,tr:HTMLTableRowElement,tbody:HTMLTableSectionElement,thead:HTMLTableSectionElement,tfoot:HTMLTableSectionElement,ul:HTMLUListElement},an={name:{set:function(t){return this.setAttribute("name",t)},get:function(){return this.getAttribute("name")||""}},form:{get:function(){return this[k].form}},labels:{get:function(){return this[k].labels}},validity:{get:function(){return this[k].validity}},validationMessage:{get:function(){return this[k].validationMessage}},willValidate:{get:function(){return this[k].willValidate}},checkValidity:{value:function(){return this[k].checkValidity()}},reportValidity:{value:function(){return this[k].reportValidity()}}},pn={},$t={once:!0},fn=0,Nt=!1;function dn(t){return ln[t]||window["HTML"+t[0].toUpperCase()+t.slice(1)+"Element"]||(()=>{throw new Error('Constructor not found for tag "'+t+'"')})()}var mn=qt(/^\s*?\s*$|^\s*?\s*$/,{1:(t,e)=>({name:e[1]}),2:(t,e)=>({name:e[3],tag:e[2]}),catch:function(t,e){throw new SyntaxError(`dom element() – name must be of the form 'element-name' or 'tag is="element-name"' (`+e+")")}},null);function hn(t,e){if(t.hasOwnProperty(e)){let n=t[e];delete t[e],t[e]=n}return t}function gn(t,e,n){t._initialLoad=!0;let o=t.attachShadow({mode:e.mode||"closed",delegatesFocus:e.focusable||!1});if(n){let r=b("link",{rel:"stylesheet",href:n});o.append(r)}return t[A]=o,o}function wn(t){var e;if(t.attachInternals){if(e=t.attachInternals(),e.setFormValue)return e}else e={shadowRoot:t.shadowRoot};return e.input=b("input",{type:"hidden",name:t.name}),t.appendChild(e.input),e.setFormValue=function(n){this.input.value=n},e}function vn(t){t._initialAttributes={},t._n=0}function yn(t,e,n){let o=t._initialAttributes;for(;t._nfn?gn(p,e,o||e.stylesheet):void 0,c=a.formAssociated&&wn(p);return i&&(Nt=!0),e.construct&&e.construct.call(p,u,c),l&&(vn(p),Promise.resolve(1).then(function(){Xt(p,a.observedAttributes,l)})),f&&Object.keys(f).reduce(hn,p),p}return a.prototype=Object.create(s.prototype,f),f&&f.value&&(a.formAssociated=!0,Wt(a.prototype,an),(e.enable||e.disable)&&(a.prototype.formDisabledCallback=function(p){return p?e.disable&&e.disable.call(this,this[A],this[k]):e.enable&&e.enable.call(this,this[A],this[k])}),e.reset&&(a.prototype.formResetCallback=function(){return e.reset.call(this,this[A],this[k])}),e.restore&&(a.prototype.formStateRestoreCallback=function(){return e.restore.call(this,this[A],this[k])})),l&&(a.observedAttributes=Object.keys(l),a.prototype.attributeChangedCallback=function(p,u,c){if(!this._initialAttributes)return l[p].call(this,c);this._initialAttributes[p]=c,yn(this,a.observedAttributes,l)}),a.prototype.connectedCallback=function(){let p=this,u=p[A],c=p[k];if(p._initialAttributes&&Xt(p,a.observedAttributes,l),p._initialLoad){let E=u.querySelectorAll('link[rel="stylesheet"]');if(E.length){let ze=0,lt=E.length,Ht=function(Ue){++ze>=E.length&&(delete p._initialLoad,e.load&&(gt("element()","loaded",Array.from(E).map(Ve=>Ve.href).join(` -`)),e.load.call(p,u)))},_e=Ht;for(;lt--;)E[lt].addEventListener("load",Ht,$t),E[lt].addEventListener("error",_e,$t);e.connect&&e.connect.call(this,u,c)}else e.connect&&e.connect.call(this,u,c),e.load&&e.load.call(this,u,c)}else e.connect&&e.connect.call(this,u,c)},e.disconnect&&(a.prototype.disconnectedCallback=function(){return e.disconnect.call(this,this[A],this[k])}),gt("element()","<"+(i?i+" is="+r:r)+">"),window.customElements.define(r,a,i&&{extends:i}),i&&!Nt&&document.querySelectorAll('[is="'+r+'"]').forEach(p=>{Wt(p,f),e.construct&&e.construct.apply(p);let u;for(u in l){let c=p.attributes[u];c&&l[u].call(p,c.value)}e.connect&&e.connect.apply(p)}),a}function Kt(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object")return!1;let n=Object.keys(t),o=Object.keys(e),r=n.length;for(;r--;){if(t[n[r]]===void 0){if(e[n[r]]!==void 0)return!1}else if(!e.hasOwnProperty(n[r])||!Kt(t[n[r]],e[n[r]]))return!1;let i=o.indexOf(n[r]);i>-1&&o.splice(i,1)}for(r=o.length;r--;)if(e[o[r]]===void 0){if(t[o[r]]!==void 0)return!1}else return!1;return!0}var Zt=w(Kt,!0);function En(t,e){return e[t]}var D=w(En,!0);var Sn=Object.freeze;function Qt(){return this}var P=Sn({shift:v,push:v,forEach:v,join:function(){return""},map:Qt,filter:Qt,includes:function(){return!1},reduce:function(t,e){return e},length:0,each:v,pipe:S,start:v,stop:v,done:v,valueOf:function(){return null}});function vt(){return this}function yt(t){return t&&t[Symbol.iterator]}var Tn=Object.assign;function Ln(t){return t.stop?t.stop():t()}function kn(t){t.forEach(Ln),t.length=0}function B(){}Tn(B.prototype,{stop:function(){return this.stopables&&kn(this.stopables),this},done:function(e){return(this.stopables||(this.stopables=[])).push(e),this}});var Pn=Object.assign;function X(t){B.prototype.stop.apply(t);let e=-1,n;for(;n=t[++e];)t[e]=void 0,X(n)}function m(){}Pn(m.prototype,{pipe:function(t){return this[0]=t,t},stop:function(){return X(this[0]),this}});var F=Object.assign,O=Object.create;function z(t,e){e!==void 0&&t[0].push(e)}function Fn(t,e){if(t[1]){let n=-1;for(;t[++n]&&t[n]!==e;);for(;t[n++];)t[n-1]=t[n];X(e)}else t.stop()}function h(t){this.input=t}F(h.prototype,B.prototype,{push:function(t){z(this,t)},pipe:function(t){if(this[0])throw new Error("Stream: Attempt to .pipe() a unicast stream multiple times. Create a multicast stream with stream.broadcast().");return this[0]=t,this.input.pipe(this),t},map:function(t){return new Jt(this,t)},filter:function(t){return new te(this,t)},chunk:function(t){return new ne(this,t)},flatMap:function(t){return new ee(this,t)},take:function(t){return new oe(this,t)},each:function(t){return new se(this,t)},reduce:function(t,e){return new re(this,t,e)},scan:function(t,e){return new ie(this,t,e)},stop:function(){return Fn(this.input,this),this}});function Jt(t,e){this.input=t,this.fn=e}Jt.prototype=F(O(h.prototype),{push:function(e){let n=this.fn;z(this,n(e))}});function te(t,e){this.input=t,this.fn=e}te.prototype=F(O(h.prototype),{push:function(e){this.fn(e)&&z(this,e)}});function ee(t,e){this.input=t,this.fn=e}ee.prototype=F(O(h.prototype),{push:function(e){let o=this.fn(e);if(o!==void 0)if(yt(o))for(let r of o)z(this,r);else throw new Error("Stream: Cannot .flatMap() non-iterable values")}});function ne(t,e){this.input=t,this.chunk=[],typeof e=="number"?this.n=e:typeof e=="function"&&(this.fn=e)}ne.prototype=F(O(h.prototype),{fn:function(t){return t.length===this.n},push:function(e){let n=this.chunk;n.push(e),this.fn(n)&&(z(this,n),this.chunk=[])}});function oe(t,e){this.input=t,this.count=e}oe.prototype=F(O(h.prototype),{push:function(e){this[0].push(e),--this.count||this.stop()}});function re(t,e,n){return this.input=t,this.fn=e,this.value=n,this.i=0,t.pipe(this),n}re.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t,this.i++,this)}});function ie(t,e,n){this.input=t,this.fn=e,this.value=n}ie.prototype=F(O(h.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t),this[0].push(this.value)}});function se(t,e){this.input=t,this.push=e,t.pipe(this)}se.prototype=F(O(h.prototype),{each:null,reduce:null,pipe:null});var On=Array.prototype,An=Object.assign,Cn=Object.create;function _(t){this.buffer=t||[]}_.prototype=An(Cn(h.prototype),m.prototype,{push:function(t){t!==void 0&&this.buffer.push(t)},pipe:function(t){for(this[0]=t;this.buffer.length;)this[0].push(On.shift.apply(this.buffer));return this.buffer=this[0],t}});var In=Object.assign,jn=Object.create;function R(t,e){this.input=t,this.memory=!!(e&&e.memory),e&&e.hot&&this.pipe(P)}R.prototype=In(jn(h.prototype),{push:function(t){if(t!==void 0){this.memory&&(this.value=t);let e=-1;for(;this[++e];)this[e].push(t)}},pipe:function(t){let e=-1;for(;this[++e];);return this[e]=t,this.value!==void 0&&t.push(this.value),e===0&&this.input.pipe(this),t}});var Hn=Object.assign;function Y(t){this.promise=t}Hn(Y.prototype,m.prototype,{pipe:function(t){let e=this.promise;this[0]=t,e.then(n=>this[0].push(n)).finally(n=>this.stop())},stop:function(){m.prototype.stop.apply(this,arguments),this[0]=P}});var ue=Object.assign,le=Object.keys;function ce(t,e,n){let o=t.values,r=t.names,i=t[0];o[e]=n,(t.active||(t.active=le(o).length===r.length))&&i.push(ue({},o))}function K(t){this.inputs=t,this.active=!1}ue(K.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this.values={},this.names=le(e),this[0]=t;for(let n in e){let o=e[n];o.pipe?t.done(o.each(r=>ce(this,n,r))):o.then?o.then(r=>ce(this,n,r)):console.log("Todo: combine() raw values ?")}}});var Mn=Object.assign;function Z(t){this.inputs=t}Mn(Z.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this[0]=t;let n=-1,o;for(;o=e[++n];)if(o.pipe)o.pipe(t);else if(o.then)o.then(r=>t.push(r));else{let r=-1;for(;++r0}function Gn(t,e,n){return t[n]=e.shift(),t}function zn(t){return[]}function bt(t,e,n,o){n.push(o),e.every(Bn)&&t.push(e.reduce(Gn,{}))}function Q(t){this.inputs=t,this.buffers=xt.map.call(t,zn)}Dn(Q.prototype,m.prototype,{pipe:function(t){let e=this.inputs,n=this.buffers;this[0]=t,xt.forEach.call(e,(o,r)=>{let i=n[r];o.each?t.done(o.each(s=>bt(t,n,i,s))):o.then?o.then(s=>bt(t,n,i,s)):xt.forEach.call(o,s=>bt(t,n,i,s))})},stop:function(){let t=this.inputs,e=-1,n;for(;n=t[++e];)n.stop();return m.prototype.stop.apply(this,arguments)}});var _n=Array.prototype,ae=Object.assign;function Rn(t){throw new TypeError("Stream: invalid source object cannot be read into stream")}var g=ae(h,{of:function(){return new _(_n.slice.apply(arguments))},from:function(t){return t.pipe?new h(t):t.then?new h(new Y(t)):typeof t.length=="number"?new _(t):Rn(t)},broadcast:function(e){return new R(P,e)},combine:function(e){return new h(new K(e))},merge:function(){return new h(new Z(arguments))},zip:function(){return new h(new Q(arguments))}});ae(h.prototype,{log:vt,broadcast:function(t){return new R(this,t)}});var Un=Object.assign,Vn=/\s+/,pe={fullscreenchange:"fullscreenElement"in document?"fullscreenchange":"webkitFullscreenElement"in document?"webkitfullscreenchange":"fullscreenchange"};function fe(t){return t.which===1&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}var de=0;window.addEventListener("click",t=>de=t.timeStamp);function qn(t,e){return t.node.addEventListener(pe[e]||e,t,t.options),t}function Wn(t,e){return t.node.removeEventListener(pe[e]||e,t),t}function me(t,e,n){this.types=t.split(Vn),this.options=e,this.node=n,this.select=e&&e.select}Un(me.prototype,m.prototype,{pipe:function(t){this[0]=t,this.types.reduce(qn,this)},handleEvent:function(t){if(!(t.type==="click"&&t.timeStamp<=de)){if(this.select){let e=t.target.closest(this.select);if(!e)return;t.selectedTarget=e}this[0].push(t)}},stop:function(){this.types.reduce(Wn,this),m.prototype.stop.apply(this,arguments)}});function x(t,e){let n;return typeof t=="object"&&(n=t,t=n.type),new g(new me(t,n,e))}function Et(t){return typeof t}var $n=/^\s*([+-]?\d*\.?\d+)([^\s\d]*)\s*$/;function Nn(t,e){if(typeof e=="number")return e;var n=$n.exec(e);if(!n||!t[n[2]||""]){if(!t.catch)throw new Error('Cannot parse value "'+e+'" with provided units '+Object.keys(t).join(", "));return n?t.catch(parseFloat(n[1]),n[2]):t.catch(parseFloat(e))}return t[n[2]||""](parseFloat(n[1]))}var J=w(Nn);var Xn=/px$/,he={"transform:translateX":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[4])},"transform:translateY":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e);return parseFloat(n[5])},"transform:scale":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.sqrt(o*o+r*r)},"transform:rotate":function(t){var e=U("transform",t);if(!e||e==="none")return 0;var n=tt(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.atan2(r,o)}};function tt(t){return t.split("(")[1].split(")")[0].split(/\s*,\s*/)}function U(t,e){return window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):0}function et(t,e){if(he[t])return he[t](e);var n=U(t,e);return typeof n=="string"&&Xn.test(n)?parseFloat(n):n}var nt,ot;function Yn(){if(!nt){let t=document.documentElement.style.fontSize;document.documentElement.style.fontSize="100%",nt=et("font-size",document.documentElement),document.documentElement.style.fontSize=t||""}return nt}function Kn(){return ot||(ot=et("font-size",document.documentElement)),ot}window.addEventListener("resize",()=>{nt=void 0,ot=void 0});var C=y(Et,{number:S,string:J({em:function(t){return Yn()*t},px:function(t){return t},rem:function(t){return Kn()*t},vw:function(t){return window.innerWidth*t/100},vh:function(t){return window.innerHeight*t/100},vmin:function(t){return window.innerWidthn?o:n}n=nq.maxScrollInterval?q.maxScrollInterval:1.4*n}function it(){return ye}function xe(t){let e=T(t),n=window.getComputedStyle(t,null),o=C(n.getPropertyValue("padding-left")),r=C(n.getPropertyValue("padding-right"));return e.leftPadding=e.left+o,e.rightPadding=e.left+e.width-r,e.centrePadding=e.leftPadding+(e.width-o-r)/2,e}function Ee(t){let e=window.getComputedStyle(t,null).getPropertyValue("scroll-snap-align");return e.endsWith("start")?"left":e.endsWith("end")?"right":"centre"}function Se(t,e,n){let o=xe(t),r=T(e),i=Ee(e);t.scrollTo({top:t.scrollTop,left:t.scrollLeft+(i==="left"?r.left-o.leftPadding:i==="right"?r.right-o.rightPadding:r.left+r.width/2-o.centrePadding),behavior:n})}function Te(t,e){return Se(t,e,"smooth"),e}function I(t,e){return t.style.setProperty("scroll-behavior","auto","important"),Se(t,e,"auto"),t.style.setProperty("scroll-behavior",""),e}function Le(t,e){let{leftPadding:n,rightPadding:o,centrePadding:r}=xe(t),i=e.length,s;for(;s=e[--i];){let l=T(s);if(!l)continue;let f=Ee(s),a=l.width/2+(f==="left"?n:f==="right"?o:r);if((f==="left"?l.left:f==="right"?l.right:l.left+l.width/2)<=a)break}return s}function ke(t){return!!t.dataset.slideIndex}function Pe(t){let{scroller:e,elements:n,children:o}=t,r=Le(e,n);return ke(r)?o[r.dataset.slideIndex]:r}function Fe(t){let{scroller:e,children:n,elements:o}=t,r=Le(e,o),i;!r||(ke(r)?(i=n[r.dataset.slideIndex],I(e,i)):i=r,t.activations.push(i))}function to(t,e){t.style.setProperty("scroll-snap-type",""),e.stop()}var Oe=y((t,e)=>e.type,{pointerdown:function(t,e){return t.e0=e,t.x0=e.clientX,t.y0=e.clientY,t},pointermove:function(t,e){let n=e.clientX,o=e.clientY;if(!t.gesturing){if(Math.abs(n-t.x0)(clearTimeout(s),setTimeout(to,it()*1e3,n,a)))}return t.gesturing=!1,t.e0=void 0,t.x0=void 0,t.y0=void 0,t.pointers=void 0,t.scrollLeft0=void 0,t}});var eo=Object.assign,no={capture:!0,passive:!0};function oo(t,e){t.timer=void 0,t.stream.push(e);let n=t.times;n.length>1&&be(n),n.length=0}function Ae(t){this.element=t,this.times=[]}eo(Ae.prototype,m.prototype,{pipe:function(t){this.stream=t,this.element.addEventListener("scroll",this,no)},handleEvent:function(t){let e=t.timeStamp/1e3;this.times.push(e),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(oo,it()*1e3,this,t)},stop:function(){this.element.removeEventListener("scroll",this),m.prototype.stop.apply(this,arguments)}});function kt(t){return new g(new Ae(t))}function ro(t,e,n){let o=n.length,r=-1/0;for(;o--;){let a=T(n[o]),p=a.x+a.width;r=p>r?p:r}let i=T(e),s=getComputedStyle(t),l=C(s.paddingLeft||0),f=C(s.paddingRight||0);return l+f+r-i.x}function io(t,e,n){let o=ro(t,e,n);t.style.setProperty("--scroll-width",o+"px")}function so(t){return!t.dataset.slideIndex}var Ce={construct:function(t){let e=b("slot",{part:"slides"}),n=b("div",{class:"scroller",children:[e]}),o=b("nav",{part:"controls",children:[b("slot",{name:"controls"})]});t.append(n,o);let r=g.of().broadcast({memory:!0}),i=g.combine({host:r,elements:x("slotchange",e).map(c=>u.elements=e.assignedElements())}).broadcast({memory:!0}),s=i.map(c=>{let E=c.elements.filter(so);return Zt(u.children,E)?void 0:u.children=E}).broadcast({memory:!0,hot:!0}),l=g.of(),f=g.of(),a=f.map(c=>c.dataset.slideIndex?u.children[c.dataset.slideIndex]:c).filter(c=>u.active!==c&&Lt("slide-active",c)).map(c=>u.active=c).broadcast({memory:!0,hot:!0}),p=x("click",t).filter(fe).broadcast(),u=this[d]={clickSuppressTime:-1/0,host:this,style:window.getComputedStyle(this),elements:P,children:P,scroller:n,slides:e,controls:o,load:r,views:l,activations:f,actives:a,slotchanges:i,mutations:s,clicks:p};g.merge(i,x("resize",window)).each(c=>io(n,e,u.elements)),i.map(c=>c.elements.includes(u.active)?u.active:u.children[0]).map(c=>I(n,c)).pipe(f),g.combine({host:r,child:l}).map(c=>u.elements.includes(c.child)&&u.active!==c.child?c.child:void 0).map(c=>u.active?Te(n,c):I(n,c)).pipe(f),kt(n).filter(()=>!u.gesturing).each(c=>Fe(u)),Tt({threshold:"0.25rem",device:"mouse"},t).filter(()=>u.children.length>1).each(c=>{u.pointers=c,c.reduce(Oe,u)}),p.each(c=>{c.timeStamp-u.clickSuppressTime<120&&(c.preventDefault(),c.stopPropagation())}),x("fullscreenchange",window).each(c=>{(c.target===this||c.target.contains(this))&&I(n,u.active)}),x("focusin",this).map(c=>u.children.indexOf(c.target)!==-1?c.target:u.children.find(E=>E.contains(c.target))).pipe(l),x("keydown",this).filter(()=>document.activeElement===this||this.contains(document.activeElement)).map(y(D("keyCode"),{37:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)-1]),39:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)+1]),default:v})).pipe(l)},load:function(t){this[d].load.push(this)}};function st(t,e){function n(o,r){if(t.getState(o)!==r)return t[r?"enable":"disable"](o)}return{attribute:function(o){return n(this,o!==null)},set:function(o){return n(this,!!o)},get:function(){return t.getState(this)}}}function Pt(t,e){t.remove&&t.remove(e);let n;for(;(n=t.indexOf(e))!==-1;)t.splice(n,1);return e}var as=w(Pt,!0);var co=Object.assign;function W(t,e){this.element=t,this.definitions=e,this.tokens=[]}co(W.prototype,{contains:function(t){return this.tokens.includes(t)},add:function(){let t=arguments.length;for(;t--;){let e=arguments[t];!this.tokens.includes(e)&&this.definitions[e]&&(this.definitions[e].enable(this.element),this.tokens.push(e))}},remove:function(){let t=arguments.length;for(;t--;){let e=arguments[t];this.tokens.includes(e)&&(this.definitions[e].disable(this.element),Pt(this.tokens,e))}},supports:function(t){return!!this.definitions[t]}});var uo=Array.prototype;function lo(t,e){let n=t.tokens.slice(),o=uo.slice.apply(e),r=n.length;for(;r--;)o.includes(n[r])&&n.splice(r,1);t.remove.apply(t,n),t.add.apply(t,o)}function Ft(t){let e=Symbol("TokenList");function n(o,r){let i=o[e]||(o[e]=new W(o,t));lo(i,r.trim().split(/\s+/))}return{attribute:function(o){n(this,o||"")},set:function(o){n(this,o+"")},get:function(){return this[e]||(this[e]=new W(this,t))}}}var Ot={};G(Ot,{disable:()=>ho,enable:()=>mo,getState:()=>go});var ao=J({s:S,ms:t=>t/1e3});function po(t){let{active:e,children:n,elements:o,host:r}=t,i=o.indexOf(e),s=o[i+1]||n[0];t.autoplay.timer=null,!!s&&(r.active=s)}function fo(t){let{active:e,style:n}=t,o=ao(window.getComputedStyle(e).getPropertyValue("--slide-duration")||n.getPropertyValue("--slide-duration"));clearTimeout(t.autoplay.timer),t.autoplay.timer=setTimeout(po,o*1e3,t)}function Ie(t){clearTimeout(t.autoplay.timer),t.autoplay.timer=null}function mo(t){let e=t[d],{actives:n}=e,o=e.autoplay={},r=g.merge([!1],x("pointerenter pointerleave",t).map(s=>s.type==="pointerenter")),i=g.merge([t.contains(document.activeElement)],x("focusin focusout",t).map(y(D("type"),{focusin:s=>!0,focusout:s=>t.contains(s.relatedTarget)}))).map((s=>l=>s===l?void 0:s=l)());o.updates=g.combine({active:n,hover:r,focus:i}).each(s=>s.hover||s.focus?Ie(e):fo(e))}function ho(t){let e=t[d];Ie(e),e.autoplay.updates.stop(),e.autoplay=void 0}function go(t){return!!t[d].autoplay}var At={};G(At,{disable:()=>yo,enable:()=>vo,getState:()=>bo});function je(t,e){let n=t.cloneNode(!0);return n.dataset.slideIndex=e,n.removeAttribute("id"),n.setAttribute("aria-hidden","true"),n.tabIndex="-1",n}function wo(t){let{active:e,children:n,host:o,scroller:r}=t;if(t.loop.prepends&&(t.loop.prepends.forEach(c=>c.remove()),t.loop.appends.forEach(c=>c.remove()),t.loop.prepends=void 0,t.loop.appends=void 0),n.length<2){t.elements=t.slides.assignedElements();return}let i=o.clientWidth,s=n.map(T),l=s[1].left,f=s[s.length-2].right,a=1;for(;s[++a]&&s[a].leftf-i;);let u=n.slice(++a).map((c,E)=>je(c,a+E));o.prepend.apply(o,u),o.append.apply(o,p),t.loop.prepends=u,t.loop.appends=p,t.elements=t.slides.assignedElements(),I(r,e||n[0])}function vo(t){let e=t[d],{mutations:n}=e,o=e.loop={};o.renders=n.each(r=>wo(e))}function yo(t){let e=t[d];e.loop&&(e.loop.prepends&&e.loop.prepends.forEach(n=>n.remove()),e.loop.appends&&e.loop.appends.forEach(n=>n.remove()),e.loop.renders.stop(),e.loop=void 0)}function bo(t){return!!t[d].loop}var Ct={};G(Ct,{disable:()=>Eo,enable:()=>xo,getState:()=>So});function j(t){if(typeof t!="object"||arguments.length>1)throw new Error("delegate() now takes an object of selector:fn pairs.");let e=Object.keys(t);return function(o){let r=o.target,i=-1;for(;e[++i];){let s=r.closest(e[i]);if(s)return t[e[i]](s,...arguments)}}}function He(t,e,n,o){o===0?t.hidden=!0:t.hidden=!1,o===n.length-1?e.hidden=!0:e.hidden=!1}function xo(t){let e=t[d],{actives:n,clicks:o,slotchanges:r}=e,i=e.navigation={prev:b("button",{part:"prev-button",type:"button",name:"navigation",value:"-1",html:"Previous"}),next:b("button",{part:"next-button",type:"button",name:"navigation",value:"1",html:"Next"})};e.controls.prepend(i.prev,i.next),i.updates=g.combine({active:n,changes:r}).each(s=>He(i.prev,i.next,s.changes.elements,s.changes.elements.indexOf(s.active))),i.clicks=o.each(j({'[name="navigation"]':function(s,l){let f=parseFloat(s.value),a=e.elements.indexOf(e.active)+f,p=e.elements[a];!p||(t.active=p,He(i.prev,i.next,e.elements,a))}}))}function Eo(t){let e=t[d];e.navigation.prev.remove(),e.navigation.next.remove(),e.navigation.updates.stop(),e.navigation.clicks.stop(),e.navigation=void 0}function So(t){return!!t[d].navigation}var It={};G(It,{disable:()=>ko,enable:()=>Lo,getState:()=>Po});function Me(t,e,n){let{active:o,buttons:r,index:i}=t;if(o===n)return;i>-1&&(t.activeSpan.remove(),r.children[i].part.remove("page-button-active"));let s=e.indexOf(n);s!==-1&&(r.children[s].part.add("page-button-active"),r.children[s].append(t.activeSpan),t.index=s,t.active=n)}function To(t,e,n,o){return e.buttons&&(e.buttons.remove(),e.buttons=void 0),o.length<2||(e.buttons=b("div",{part:"pagination",children:o.map((r,i)=>b("button",{part:"page-button",type:"button",name:"pagination",value:i}))}),t.append(e.buttons)),o.length}function Lo(t){let e=t[d],{shadow:n,actives:o,clicks:r,mutations:i}=e,s=e.pagination={activeSpan:b("span",{class:"invisible",text:"(Current slide)"})};s.mutations=i.each(()=>To(e.controls,s,n,e.children)),s.updates=g.combine({active:o,children:i}).filter(l=>l.children.length>1).each(l=>Me(s,e.children,e.active)),s.clicks=r.each(j({'[name="pagination"]':function(l,f){let{host:a}=e,p=e.children,u=p[l.value];!u||(a.active=u,Me(s,p,u))}}))}function ko(t){let e=t[d];e.pagination.buttons.remove(),e.pagination.mutations.stop(),e.pagination.updates.stop(),e.pagination.clicks.stop(),e.pagination=void 0}function Po(t){return!!t[d].pagination}var jt={};G(jt,{disable:()=>Oo,enable:()=>Fo,getState:()=>Ao});var De=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled;function ct(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement}function Be(t){return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():void 0}function ut(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}function Fo(t){let e=t[d];if(!De)return;let n=e.fullscreen={button:b("button",{part:"fullscreen-button",type:"button",name:"fullscreen",html:"Open in fullscreen"})};e.controls.append(n.button),n.changes=x("fullscreenchange",t).filter(o=>ct()===t).each(o=>{n.button.part.add("fullscreen-button-active"),n.button.innerHTML="Close fullscreen",document.activeElement!==t&&(n.tabIndex=t.tabIndex,t.tabIndex<0&&(t.tabIndex=0),t.focus());let r=x("fullscreenchange",t).each(i=>{n.button.part.remove("fullscreen-button-active"),n.button.innerHTML="Open in fullscreen",t.tabIndex=n.tabIndex,n.tabIndex=void 0,r.stop()})}),n.clicks=e.clicks.each(j({'[name="fullscreen"]':(o,r)=>{let i=ct();if(i===t){ut();return}i&&ut(),Be(t)}}))}function Oo(t){let e=t[d];ct()===t&&ut(),e.fullscreen.button.remove(),e.fullscreen.clicks.stop(),e.fullscreen.changes.stop(),e.fullscreen=void 0}function Ao(t){return!!t[d].fullscreen}var Ge={active:{attribute:function(t){this.active=t},set:function(t){let e=this[d],n=typeof t=="object"?t:/^\d/.test(t+"")?this.querySelector("#\\3"+(t+"")[0]+" "+(t+"").slice(1)):/^\#/.test(t+"")?this.querySelector(t):this.querySelector("#"+t);e.views.push(n)},get:function(){return this[d].active}},autoplay:st(Ot,"autoplay"),controls:Ft({navigation:Ct,pagination:It,fullscreen:jt}),loop:st(At,"loop")};var Co=import.meta.url.replace(/\/[^\/]*\.js/,"/slide-show-shadow.css"),Js=wt("slide-show",Ce,Ge,Co);window.console&&window.console.log("%c%c registered (documentation at %chttps://stephen.band/slide-show/%c)","color: #3a8ab0; font-weight: 600;","color: #888888; font-weight: 400;","color: inherit; font-weight: 400;","color: #888888; font-weight: 400;");export{Js as default}; +var qe=Object.defineProperty;var Dt=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable;var Bt=(t,e)=>{var n={};for(var o in t)We.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&Dt)for(var o of Dt(t))e.indexOf(o)<0&&Ne.call(t,o)&&(n[o]=t[o]);return n};var z=(t,e)=>{for(var n in e)qe(t,n,{get:e[n],enumerable:!0})};function $(t){var e=new Map;return function(o){if(e.has(o))return e.get(o);var r=t(o);return e.set(o,r),r}}var $e=Array.prototype;function Xe(t,e){return typeof t=="function"?t.apply(null,e):t}function Gt(t,e,n){n=n||t.length;var o=n===1?e?t:$(t):$(function(r){return Gt(function(){var i=[r];return i.push.apply(i,arguments),t.apply(null,i)},e,n-1)});return function r(i){return arguments.length===0?r:arguments.length===1?o(i):arguments.length>=n?t.apply(null,arguments):Xe(o(i),$e.slice.call(arguments,1))}}var v=Gt;function Ye(t,e){return 1-Math.pow(1-e,t)}var zt=v(Ye);function y(){}function pt(t,e){return e(t)}function S(t){return t}var Ke=Array.prototype;function ft(){let t=arguments;return t.length?e=>Ke.reduce.call(t,pt,e):S}function dt(t,e,n){return n*(e-t)+t}var Ze=window.performance,_t=window.requestAnimationFrame,Qe=window.cancelAnimationFrame;function mt(t,e,n){var o=Ze.now();function r(s){var a=(s-o)/(t*1e3);a<1?(a>0&&e(a),i=_t(r)):(e(1),n&&n())}var i=_t(r);return function(){Qe(i)}}function X(t,e,n,o,r,i){let s=o[n];return mt(t,ft(e,a=>dt(s,r,a),a=>o[n]=a),i)}function Je(){return{x:0,y:0,left:0,top:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}}function T(t){return t===window?Je():t.getClientRects()[0]||t.getBoundingClientRect()}var M={scrollDuration:.3,scrollDurationPerHeight:.125,scrollTransform:zt(3)},Rt=y;function tn(t,e){if(e.behavior==="smooth"){let n=t.style.getPropertyValue("scroll-snap-type"),o=()=>{let r=t.scrollLeft,i=t.scrollTop;t.style.setProperty("scroll-snap-type",n),t.scrollLeft=r,t.scrollTop=i};if(t.style.setProperty("scroll-snap-type","none"),e.left!==void 0){let r=t===document.body?window.innerWidth:T(t).width,i=M.scrollDuration+M.scrollDurationPerHeight*Math.abs(e.left-t.scrollLeft)/r;Rt=X(i,M.scrollTransform,"scrollLeft",t,e.left,o)}else{let r=t===document.body?window.innerHeight:T(t).height,i=M.scrollDuration+M.scrollDurationPerHeight*Math.abs(e.top-t.scrollTop)/r;Rt=X(i,M.scrollTransform,"scrollTop",t,e.top,o)}}else e.left!==void 0&&(t.scrollLeft=e.left),e.top!==void 0&&(t.scrollTop=e.top)}if(!("scrollBehavior"in document.documentElement.style)){window.console&&console.log("Polyfilling Element.scrollTo(options)");let t="scrollTo"in Element.prototype?Element:HTMLElement,e=t.scrollIntoView;t.prototype.scrollTo=function(n){typeof n=="object"?tn(this,n):e.apply(this,arguments)}}function b(t,e){return function(){let o=t.apply(this,arguments),r=e[o]||e.default;if(!r)throw new Error('overload() no handler for "'+o+'"');return r.apply(this,arguments)}}var en=b(S,{is:y,tag:y,html:function(t,e,n){e.innerHTML=n},text:function(t,e,n){e.textContent=n},children:function(t,e,n){e.innerHTML="",n.forEach(o=>{e.appendChild(o)})},points:D,cx:D,cy:D,r:D,preserveAspectRatio:D,viewBox:D,default:function(t,e,n){t in e?e[t]=n:e.setAttribute(t,n)}});function D(t,e,n){e.setAttribute(t,n)}function nn(t,e){for(var n=Object.keys(e),o=n.length;o--;)en(n[o],t,e[n[o]]);return t}var ht=v(nn,!0);var on="http://www.w3.org/2000/svg",Ut=document.createElement("div");var Vt=(t,e)=>e&&typeof e;function qt(t,e){let n=document.createRange();return n.selectNode(t),n.createContextualFragment(e)}function L(t,e){var n=document.createElementNS(on,t);return e&&(n.innerHTML=e),n}var rn=b(S,{comment:function(t,e){return document.createComment(e||"")},fragment:b(Vt,{string:function(t,e,n){if(n)return qt(n,e);let o=document.createDocumentFragment();Ut.innerHTML=e;let r=Ut.childNodes;for(;r[0];)o.appendChild(r[0]);return o},object:function(t,e,n){let o=n?qt(n):document.createDocumentFragment();return typeof e.length=="number"?o.append.apply(o,e):ht(o,e),o},default:()=>document.createDocumentFragment()}),text:function(t,e){return document.createTextNode(e||"")},circle:L,ellipse:L,g:L,glyph:L,image:L,line:L,rect:L,use:L,path:L,pattern:L,polygon:L,polyline:L,svg:L,default:b(Vt,{string:function(t,e){let n=document.createElement(t);return n.innerHTML=e,n},object:function(t,e){let n=document.createElement(t);return typeof e.length=="number"?n.append.apply(n,e):ht(n,e),n},default:t=>{if(typeof t!="string")throw new Error('create(tag, content) accepts only a string as tag "'+typeof t+'"');return document.createElement(t)}})}),x=rn;function gt(t,e,n){let o;typeof n!="string"&&n.input!==void 0&&n.index!==void 0&&(o=n,n=o.input.slice(n.index+n[0].length+(n.consumed||0)));let r=t.exec(n);if(!r)return;let i=e(r);return o&&(o.consumed=(o.consumed||0)+r.index+r[0].length+(r.consumed||0)),i}var fr=v(gt,!0);function sn(t,e,n){throw n.input!==void 0&&n.index!==void 0&&(n=n.input),new Error('Cannot parse string "'+n+'"')}function cn(t,e,n){let o=-1;for(;++ocn(e,n,i),o);return r===void 0?e.catch?e.catch(n,o):sn(t,e,o):r}var Wt=v(un,!0);var wt=y;var k=Symbol("internals"),A=Symbol("shadow"),Nt=Object.defineProperties,ln={a:HTMLAnchorElement,dl:HTMLDListElement,p:HTMLParagraphElement,br:HTMLBRElement,fieldset:HTMLFieldSetElement,hr:HTMLHRElement,img:HTMLImageElement,li:HTMLLIElement,ol:HTMLOListElement,optgroup:HTMLOptGroupElement,q:HTMLQuoteElement,textarea:HTMLTextAreaElement,td:HTMLTableCellElement,th:HTMLTableCellElement,tr:HTMLTableRowElement,tbody:HTMLTableSectionElement,thead:HTMLTableSectionElement,tfoot:HTMLTableSectionElement,ul:HTMLUListElement},an={name:{set:function(t){return this.setAttribute("name",t)},get:function(){return this.getAttribute("name")||""}},form:{get:function(){return this[k].form}},labels:{get:function(){return this[k].labels}},validity:{get:function(){return this[k].validity}},validationMessage:{get:function(){return this[k].validationMessage}},willValidate:{get:function(){return this[k].willValidate}},checkValidity:{value:function(){return this[k].checkValidity()}},reportValidity:{value:function(){return this[k].reportValidity()}}},pn={},$t={once:!0},fn=0,Xt=!1;function dn(t){return ln[t]||window["HTML"+t[0].toUpperCase()+t.slice(1)+"Element"]||(()=>{throw new Error('Constructor not found for tag "'+t+'"')})()}var mn=Wt(/^\s*?\s*$|^\s*?\s*$/,{1:(t,e)=>({name:e[1]}),2:(t,e)=>({name:e[3],tag:e[2]}),catch:function(t,e){throw new SyntaxError(`dom element() – name must be of the form 'element-name' or 'tag is="element-name"' (`+e+")")}},null);function hn(t,e){if(t.hasOwnProperty(e)){let n=t[e];delete t[e],t[e]=n}return t}function gn(t,e,n){t._initialLoad=!0;let o=t.attachShadow({mode:e.mode||"closed",delegatesFocus:e.focusable||!1});if(n){let r=x("link",{rel:"stylesheet",href:n});o.append(r)}return t[A]=o,o}function wn(t){var e;if(t.attachInternals){if(e=t.attachInternals(),e.setFormValue)return e}else e={shadowRoot:t.shadowRoot};return e.input=x("input",{type:"hidden",name:t.name}),t.appendChild(e.input),e.setFormValue=function(n){this.input.value=n},e}function vn(t){t._initialAttributes={},t._n=0}function yn(t,e,n){let o=t._initialAttributes;for(;t._nfn?gn(p,e,o||e.stylesheet):void 0,u=l.formAssociated&&wn(p);return i&&(Xt=!0),e.construct&&e.construct.call(p,g,u),a&&(vn(p),Promise.resolve(1).then(function(){Yt(p,l.observedAttributes,a)})),f&&Object.keys(f).reduce(hn,p),p}return l.prototype=Object.create(s.prototype,f),f&&f.value&&(l.formAssociated=!0,Nt(l.prototype,an),(e.enable||e.disable)&&(l.prototype.formDisabledCallback=function(p){return p?e.disable&&e.disable.call(this,this[A],this[k]):e.enable&&e.enable.call(this,this[A],this[k])}),e.reset&&(l.prototype.formResetCallback=function(){return e.reset.call(this,this[A],this[k])}),e.restore&&(l.prototype.formStateRestoreCallback=function(){return e.restore.call(this,this[A],this[k])})),a&&(l.observedAttributes=Object.keys(a),l.prototype.attributeChangedCallback=function(p,g,u){if(!this._initialAttributes)return a[p].call(this,u);this._initialAttributes[p]=u,yn(this,l.observedAttributes,a)}),l.prototype.connectedCallback=function(){let p=this,g=p[A],u=p[k];if(p._initialAttributes&&Yt(p,l.observedAttributes,a),p._initialLoad){let c=g.querySelectorAll('link[rel="stylesheet"]');if(c.length){let H=0,at=c.length,Mt=function(Ue){++H>=c.length&&(delete p._initialLoad,e.load&&(wt("element()","loaded",Array.from(c).map(Ve=>Ve.href).join(` +`)),e.load.call(p,g)))},_e=Mt;for(;at--;)c[at].addEventListener("load",Mt,$t),c[at].addEventListener("error",_e,$t);e.connect&&e.connect.call(this,g,u)}else e.connect&&e.connect.call(this,g,u),e.load&&e.load.call(this,g,u)}else e.connect&&e.connect.call(this,g,u)},e.disconnect&&(l.prototype.disconnectedCallback=function(){return e.disconnect.call(this,this[A],this[k])}),wt("element()","<"+(i?i+" is="+r:r)+">"),window.customElements.define(r,l,i&&{extends:i}),i&&!Xt&&document.querySelectorAll('[is="'+r+'"]').forEach(p=>{Nt(p,f),e.construct&&e.construct.apply(p);let g;for(g in a){let u=p.attributes[g];u&&a[g].call(p,u.value)}e.connect&&e.connect.apply(p)}),l}function Zt(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object")return!1;let n=Object.keys(t),o=Object.keys(e),r=n.length;for(;r--;){if(t[n[r]]===void 0){if(e[n[r]]!==void 0)return!1}else if(!e.hasOwnProperty(n[r])||!Zt(t[n[r]],e[n[r]]))return!1;let i=o.indexOf(n[r]);i>-1&&o.splice(i,1)}for(r=o.length;r--;)if(e[o[r]]===void 0){if(t[o[r]]!==void 0)return!1}else return!1;return!0}var Qt=v(Zt,!0);function En(t,e){return e[t]}var B=v(En,!0);var Sn=Object.freeze;function Jt(){return this}var P=Sn({shift:y,push:y,forEach:y,join:function(){return""},map:Jt,filter:Jt,includes:function(){return!1},reduce:function(t,e){return e},length:0,each:y,pipe:S,start:y,stop:y,done:y,valueOf:function(){return null}});function yt(){return this}function bt(t){return t&&t[Symbol.iterator]}var Tn=Object.assign;function Ln(t){return t.stop?t.stop():t()}function kn(t){t.forEach(Ln),t.length=0}function G(){}Tn(G.prototype,{stop:function(){return this.stopables&&kn(this.stopables),this},done:function(e){return(this.stopables||(this.stopables=[])).push(e),this}});var Pn=Object.assign;function Y(t){G.prototype.stop.apply(t);let e=-1,n;for(;n=t[++e];)t[e]=void 0,Y(n)}function m(){}Pn(m.prototype,{pipe:function(t){return this[0]=t,t},stop:function(){return Y(this[0]),this}});var F=Object.assign,O=Object.create;function _(t,e){e!==void 0&&t[0].push(e)}function Fn(t,e){if(t[1]){let n=-1;for(;t[++n]&&t[n]!==e;);for(;t[n++];)t[n-1]=t[n];Y(e)}else t.stop()}function w(t){this.input=t}F(w.prototype,G.prototype,{push:function(t){_(this,t)},pipe:function(t){if(this[0])throw new Error("Stream: Attempt to .pipe() a unicast stream multiple times. Create a multicast stream with stream.broadcast().");return this[0]=t,this.input.pipe(this),t},map:function(t){return new te(this,t)},filter:function(t){return new ee(this,t)},chunk:function(t){return new oe(this,t)},flatMap:function(t){return new ne(this,t)},take:function(t){return new re(this,t)},each:function(t){return new ce(this,t)},reduce:function(t,e){return new ie(this,t,e)},scan:function(t,e){return new se(this,t,e)},stop:function(){return Fn(this.input,this),this}});function te(t,e){this.input=t,this.fn=e}te.prototype=F(O(w.prototype),{push:function(e){let n=this.fn;_(this,n(e))}});function ee(t,e){this.input=t,this.fn=e}ee.prototype=F(O(w.prototype),{push:function(e){this.fn(e)&&_(this,e)}});function ne(t,e){this.input=t,this.fn=e}ne.prototype=F(O(w.prototype),{push:function(e){let o=this.fn(e);if(o!==void 0)if(bt(o))for(let r of o)_(this,r);else throw new Error("Stream: Cannot .flatMap() non-iterable values")}});function oe(t,e){this.input=t,this.chunk=[],typeof e=="number"?this.n=e:typeof e=="function"&&(this.fn=e)}oe.prototype=F(O(w.prototype),{fn:function(t){return t.length===this.n},push:function(e){let n=this.chunk;n.push(e),this.fn(n)&&(_(this,n),this.chunk=[])}});function re(t,e){this.input=t,this.count=e}re.prototype=F(O(w.prototype),{push:function(e){this[0].push(e),--this.count||this.stop()}});function ie(t,e,n){return this.input=t,this.fn=e,this.value=n,this.i=0,t.pipe(this),n}ie.prototype=F(O(w.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t,this.i++,this)}});function se(t,e,n){this.input=t,this.fn=e,this.value=n}se.prototype=F(O(w.prototype),{push:function(t){let e=this.fn;this.value=e(this.value,t),this[0].push(this.value)}});function ce(t,e){this.input=t,this.push=e,t.pipe(this)}ce.prototype=F(O(w.prototype),{each:null,reduce:null,pipe:null});var On=Array.prototype,An=Object.assign,Cn=Object.create;function R(t){this.buffer=t||[]}R.prototype=An(Cn(w.prototype),m.prototype,{push:function(t){t!==void 0&&this.buffer.push(t)},pipe:function(t){for(this[0]=t;this.buffer.length;)this[0].push(On.shift.apply(this.buffer));return this.buffer=this[0],t}});var In=Object.assign,jn=Object.create;function U(t,e){this.input=t,this.memory=!!(e&&e.memory),e&&e.hot&&this.pipe(P)}U.prototype=In(jn(w.prototype),{push:function(t){if(t!==void 0){this.memory&&(this.value=t);let e=-1;for(;this[++e];)this[e].push(t)}},pipe:function(t){let e=-1;for(;this[++e];);return this[e]=t,this.value!==void 0&&t.push(this.value),e===0&&this.input.pipe(this),t}});var Hn=Object.assign;function K(t){this.promise=t}Hn(K.prototype,m.prototype,{pipe:function(t){let e=this.promise;this[0]=t,e.then(n=>this[0].push(n)).finally(n=>this.stop())},stop:function(){m.prototype.stop.apply(this,arguments),this[0]=P}});var le=Object.assign,ae=Object.keys;function ue(t,e,n){let o=t.values,r=t.names,i=t[0];o[e]=n,(t.active||(t.active=ae(o).length===r.length))&&i.push(le({},o))}function Z(t){this.inputs=t,this.active=!1}le(Z.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this.values={},this.names=ae(e),this[0]=t;for(let n in e){let o=e[n];o.pipe?t.done(o.each(r=>ue(this,n,r))):o.then?o.then(r=>ue(this,n,r)):console.log("Todo: combine() raw values ?")}}});var Mn=Object.assign;function Q(t){this.inputs=t}Mn(Q.prototype,m.prototype,{pipe:function(t){let e=this.inputs;this[0]=t;let n=-1,o;for(;o=e[++n];)if(o.pipe)o.pipe(t);else if(o.then)o.then(r=>t.push(r));else{let r=-1;for(;++r0}function Gn(t,e,n){return t[n]=e.shift(),t}function zn(t){return[]}function xt(t,e,n,o){n.push(o),e.every(Bn)&&t.push(e.reduce(Gn,{}))}function J(t){this.inputs=t,this.buffers=Et.map.call(t,zn)}Dn(J.prototype,m.prototype,{pipe:function(t){let e=this.inputs,n=this.buffers;this[0]=t,Et.forEach.call(e,(o,r)=>{let i=n[r];o.each?t.done(o.each(s=>xt(t,n,i,s))):o.then?o.then(s=>xt(t,n,i,s)):Et.forEach.call(o,s=>xt(t,n,i,s))})},stop:function(){let t=this.inputs,e=-1,n;for(;n=t[++e];)n.stop();return m.prototype.stop.apply(this,arguments)}});var _n=Array.prototype,pe=Object.assign;function Rn(t){throw new TypeError("Stream: invalid source object cannot be read into stream")}var h=pe(w,{of:function(){return new R(_n.slice.apply(arguments))},from:function(t){return t.pipe?new w(t):t.then?new w(new K(t)):typeof t.length=="number"?new R(t):Rn(t)},broadcast:function(e){return new U(P,e)},combine:function(e){return new w(new Z(e))},merge:function(){return new w(new Q(arguments))},zip:function(){return new w(new J(arguments))}});pe(w.prototype,{log:yt,broadcast:function(t){return new U(this,t)}});var Un=Object.assign,Vn=/\s+/,fe={fullscreenchange:"fullscreenElement"in document?"fullscreenchange":"webkitFullscreenElement"in document?"webkitfullscreenchange":"fullscreenchange"};function de(t){return t.which===1&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}var me=0;window.addEventListener("click",t=>me=t.timeStamp);function qn(t,e){return t.node.addEventListener(fe[e]||e,t,t.options),t}function Wn(t,e){return t.node.removeEventListener(fe[e]||e,t),t}function he(t,e,n){this.types=t.split(Vn),this.options=e,this.node=n,this.select=e&&e.select}Un(he.prototype,m.prototype,{pipe:function(t){this[0]=t,this.types.reduce(qn,this)},handleEvent:function(t){if(!(t.type==="click"&&t.timeStamp<=me)){if(this.select){let e=t.target.closest(this.select);if(!e)return;t.selectedTarget=e}this[0].push(t)}},stop:function(){this.types.reduce(Wn,this),m.prototype.stop.apply(this,arguments)}});function E(t,e){let n;return typeof t=="object"&&(n=t,t=n.type),new h(new he(t,n,e))}function St(t){return typeof t}var Nn=/^\s*([+-]?\d*\.?\d+)([^\s\d]*)\s*$/;function $n(t,e){if(typeof e=="number")return e;var n=Nn.exec(e);if(!n||!t[n[2]||""]){if(!t.catch)throw new Error('Cannot parse value "'+e+'" with provided units '+Object.keys(t).join(", "));return n?t.catch(parseFloat(n[1]),n[2]):t.catch(parseFloat(e))}return t[n[2]||""](parseFloat(n[1]))}var tt=v($n);var Xn=/px$/,ge={"transform:translateX":function(t){var e=V("transform",t);if(!e||e==="none")return 0;var n=et(e);return parseFloat(n[4])},"transform:translateY":function(t){var e=V("transform",t);if(!e||e==="none")return 0;var n=et(e);return parseFloat(n[5])},"transform:scale":function(t){var e=V("transform",t);if(!e||e==="none")return 0;var n=et(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.sqrt(o*o+r*r)},"transform:rotate":function(t){var e=V("transform",t);if(!e||e==="none")return 0;var n=et(e),o=parseFloat(n[0]),r=parseFloat(n[1]);return Math.atan2(r,o)}};function et(t){return t.split("(")[1].split(")")[0].split(/\s*,\s*/)}function V(t,e){return window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):0}function nt(t,e){if(ge[t])return ge[t](e);var n=V(t,e);return typeof n=="string"&&Xn.test(n)?parseFloat(n):n}var ot,rt;function Yn(){if(!ot){let t=document.documentElement.style.fontSize;document.documentElement.style.fontSize="100%",ot=nt("font-size",document.documentElement),document.documentElement.style.fontSize=t||""}return ot}function Kn(){return rt||(rt=nt("font-size",document.documentElement)),rt}window.addEventListener("resize",()=>{ot=void 0,rt=void 0});var C=b(St,{number:S,string:tt({em:function(t){return Yn()*t},px:function(t){return t},rem:function(t){return Kn()*t},vw:function(t){return window.innerWidth*t/100},vh:function(t){return window.innerHeight*t/100},vmin:function(t){return window.innerWidthn?o:n}n=nW.maxScrollInterval?W.maxScrollInterval:1.4*n}function st(){return be}function Ee(t){let e=T(t),n=window.getComputedStyle(t,null),o=C(n.getPropertyValue("padding-left")),r=C(n.getPropertyValue("padding-right"));return e.leftPadding=e.left+o,e.rightPadding=e.left+e.width-r,e.centrePadding=e.leftPadding+(e.width-o-r)/2,e}function Se(t){let e=window.getComputedStyle(t,null).getPropertyValue("scroll-snap-align");return e.endsWith("start")?"left":e.endsWith("end")?"right":"centre"}function Te(t,e,n){let o=Ee(t),r=T(e),i=Se(e);t.scrollTo({top:t.scrollTop,left:t.scrollLeft+(i==="left"?r.left-o.leftPadding:i==="right"?r.right-o.rightPadding:r.left+r.width/2-o.centrePadding),behavior:n})}function Le(t,e){return Te(t,e,"smooth"),e}function I(t,e){return t.style.setProperty("scroll-behavior","auto","important"),Te(t,e,"auto"),t.style.setProperty("scroll-behavior",""),e}function ke(t,e){let{leftPadding:n,rightPadding:o,centrePadding:r}=Ee(t),i=e.length,s;for(;s=e[--i];){let a=T(s);if(!a)continue;let f=Se(s),l=a.width/2+(f==="left"?n:f==="right"?o:r),p=f==="left"?a.left:f==="right"?a.right:a.left+a.width/2;if(p<=l){console.log(p,l,s);break}}return s}function Pe(t){return!!t.dataset.slideIndex}function Fe(t){let{scroller:e,elements:n,children:o}=t,r=ke(e,n);return Pe(r)?o[r.dataset.slideIndex]:r}function Oe(t){let{scroller:e,children:n,elements:o}=t,r=ke(e,o),i;console.log("CURRENT",r),!!r&&(Pe(r)?(i=n[r.dataset.slideIndex],I(e,i)):i=r,t.activations.push(i))}function to(t,e){t.style.setProperty("scroll-snap-type",""),e.stop()}var Ae=b((t,e)=>e.type,{pointerdown:function(t,e){return t.e0=e,t.x0=e.clientX,t.y0=e.clientY,t},pointermove:function(t,e){let n=e.clientX,o=e.clientY;if(!t.gesturing){if(Math.abs(n-t.x0)(clearTimeout(s),setTimeout(to,st()*1e3,n,l)))}return t.gesturing=!1,t.e0=void 0,t.x0=void 0,t.y0=void 0,t.pointers=void 0,t.scrollLeft0=void 0,t}});var eo=Object.assign,no={capture:!0,passive:!0};function oo(t,e){t.timer=void 0,t.stream.push(e);let n=t.times;n.length>1&&xe(n),n.length=0}function Ce(t){this.element=t,this.times=[]}eo(Ce.prototype,m.prototype,{pipe:function(t){this.stream=t,this.element.addEventListener("scroll",this,no)},handleEvent:function(t){let e=t.timeStamp/1e3;this.times.push(e),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(oo,st()*1e3,this,t)},stop:function(){this.element.removeEventListener("scroll",this),m.prototype.stop.apply(this,arguments)}});function Pt(t){return new h(new Ce(t))}function ro(t,e,n){let o=n.length,r=-1/0;for(;o--;){let l=T(n[o]),p=l.x+l.width;r=p>r?p:r}let i=T(e),s=getComputedStyle(t),a=C(s.paddingLeft||0),f=C(s.paddingRight||0);return a+f+r-i.x}function io(t,e,n){let o=ro(t,e,n);t.style.setProperty("--scroll-width",o+"px")}function so(t){return!t.dataset.slideIndex}var Ie={construct:function(t){let e=x("slot",{part:"slides",style:"display: grid;"}),n=x("div",{class:"scroller",children:[e]}),o=x("nav",{part:"controls",children:[x("slot",{name:"controls"})]});t.append(n,o);let r=h.broadcast(),i=h.broadcast(),s=h.combine({host:i,elements:E("slotchange",e).map(c=>u.elements=e.assignedElements())}).broadcast({memory:!0}),a=s.map(c=>{let H=c.elements.filter(so);return Qt(u.children,H)?void 0:u.children=H}).broadcast({memory:!0,hot:!0}),f=h.of(),l=h.of(),p=l.map(c=>c.dataset.slideIndex?u.children[c.dataset.slideIndex]:c).filter(c=>u.active!==c&&kt("slide-active",c)).map(c=>u.active=c).log("ACTIVE").broadcast({memory:!0,hot:!0}),g=E("click",t).filter(de).broadcast(),u=this[d]={clickSuppressTime:-1/0,connected:!1,host:this,style:window.getComputedStyle(this),elements:P,children:P,scroller:n,slides:e,controls:o,connects:r,load:i,views:f,activations:l,actives:p,slotchanges:s,mutations:a,clicks:g};h.merge(s,E("resize",window)).each(c=>io(n,e,u.elements)),h.combine({slotchanges:s,connects:r}).map(c=>u.elements.includes(u.active)?u.active:u.children[0]).map(c=>u.connected?I(n,c):c).pipe(l),h.combine({host:i,child:f}).map(c=>u.elements.includes(c.child)&&u.active!==c.child?c.child:void 0).map(c=>u.connected?u.active?Le(n,c):I(n,c):c).pipe(l),Pt(n).filter(c=>u.connected&&!u.gesturing).each(c=>Oe(u)),Lt({threshold:"0.25rem",device:"mouse"},t).filter(()=>u.children.length>1).each(c=>{u.pointers=c,c.reduce(Ae,u)}),g.each(c=>{c.timeStamp-u.clickSuppressTime<120&&(c.preventDefault(),c.stopPropagation())}),E("fullscreenchange",window).each(c=>{(c.target===this||c.target.contains(this))&&I(n,u.active)}),E("focusin",this).map(c=>u.children.indexOf(c.target)!==-1?c.target:u.children.find(H=>H.contains(c.target))).pipe(f),E("keydown",this).filter(()=>document.activeElement===this||this.contains(document.activeElement)).map(b(B("keyCode"),{37:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)-1]),39:c=>(c.preventDefault(),u.elements[u.elements.indexOf(u.active)+1]),default:y})).pipe(f)},load:function(t){this[d].load.push(this)},connect:function(t){let e=this[d];e.connected=!0,e.connects.push(!0)},disconnect:function(t){let e=this[d];e.connected=!1}};function ct(t,e){function n(o,r){if(t.getState(o)!==r)return t[r?"enable":"disable"](o)}return{attribute:function(o){return n(this,o!==null)},set:function(o){return n(this,!!o)},get:function(){return t.getState(this)}}}function Ft(t,e){t.remove&&t.remove(e);let n;for(;(n=t.indexOf(e))!==-1;)t.splice(n,1);return e}var as=v(Ft,!0);var co=Object.assign;function N(t,e){this.element=t,this.definitions=e,this.tokens=[]}co(N.prototype,{contains:function(t){return this.tokens.includes(t)},add:function(){let t=arguments.length;for(;t--;){let e=arguments[t];!this.tokens.includes(e)&&this.definitions[e]&&(this.definitions[e].enable(this.element),this.tokens.push(e))}},remove:function(){let t=arguments.length;for(;t--;){let e=arguments[t];this.tokens.includes(e)&&(this.definitions[e].disable(this.element),Ft(this.tokens,e))}},supports:function(t){return!!this.definitions[t]}});var uo=Array.prototype;function lo(t,e){let n=t.tokens.slice(),o=uo.slice.apply(e),r=n.length;for(;r--;)o.includes(n[r])&&n.splice(r,1);t.remove.apply(t,n),t.add.apply(t,o)}function Ot(t){let e=Symbol("TokenList");function n(o,r){let i=o[e]||(o[e]=new N(o,t));lo(i,r.trim().split(/\s+/))}return{attribute:function(o){n(this,o||"")},set:function(o){n(this,o+"")},get:function(){return this[e]||(this[e]=new N(this,t))}}}var At={};z(At,{disable:()=>ho,enable:()=>mo,getState:()=>go});var ao=tt({s:S,ms:t=>t/1e3});function po(t){let{active:e,children:n,elements:o,host:r}=t,i=o.indexOf(e),s=o[i+1]||n[0];t.autoplay.timer=null,!!s&&(r.active=s)}function fo(t){let{active:e,style:n}=t,o=ao(window.getComputedStyle(e).getPropertyValue("--slide-duration")||n.getPropertyValue("--slide-duration"));clearTimeout(t.autoplay.timer),t.autoplay.timer=setTimeout(po,o*1e3,t)}function je(t){clearTimeout(t.autoplay.timer),t.autoplay.timer=null}function mo(t){let e=t[d],{actives:n}=e,o=e.autoplay={},r=h.merge([!1],E("pointerenter pointerleave",t).map(s=>s.type==="pointerenter")),i=h.merge([t.contains(document.activeElement)],E("focusin focusout",t).map(b(B("type"),{focusin:s=>!0,focusout:s=>t.contains(s.relatedTarget)}))).map((s=>a=>s===a?void 0:s=a)());o.updates=h.combine({active:n,hover:r,focus:i}).each(s=>s.hover||s.focus?je(e):fo(e))}function ho(t){let e=t[d];je(e),e.autoplay.updates.stop(),e.autoplay=void 0}function go(t){return!!t[d].autoplay}var Ct={};z(Ct,{disable:()=>yo,enable:()=>vo,getState:()=>bo});function He(t,e){let n=t.cloneNode(!0);return n.dataset.slideIndex=e,n.removeAttribute("id"),n.setAttribute("aria-hidden","true"),n.tabIndex="-1",n}function wo(t){let{active:e,children:n,host:o,scroller:r}=t;if(t.loop.prepends&&(t.loop.prepends.forEach(u=>u.remove()),t.loop.appends.forEach(u=>u.remove()),t.loop.prepends=void 0,t.loop.appends=void 0),n.length<2){t.elements=t.slides.assignedElements();return}let i=o.clientWidth,s=n.map(T),a=s[1].left,f=s[s.length-2].right,l=1;for(;s[++l]&&s[l].leftf-i;);let g=n.slice(++l).map((u,c)=>He(u,l+c));o.prepend.apply(o,g),o.append.apply(o,p),t.loop.prepends=g,t.loop.appends=p,t.elements=t.slides.assignedElements(),I(r,e||n[0])}function vo(t){let e=t[d],{mutations:n}=e,o=e.loop={};o.renders=n.each(r=>wo(e))}function yo(t){let e=t[d];e.loop&&(e.loop.prepends&&e.loop.prepends.forEach(n=>n.remove()),e.loop.appends&&e.loop.appends.forEach(n=>n.remove()),e.loop.renders.stop(),e.loop=void 0)}function bo(t){return!!t[d].loop}var It={};z(It,{disable:()=>Eo,enable:()=>xo,getState:()=>So});function j(t){if(typeof t!="object"||arguments.length>1)throw new Error("delegate() now takes an object of selector:fn pairs.");let e=Object.keys(t);return function(o){let r=o.target,i=-1;for(;e[++i];){let s=r.closest(e[i]);if(s)return t[e[i]](s,...arguments)}}}function Me(t,e,n,o){o===0?t.hidden=!0:t.hidden=!1,o===n.length-1?e.hidden=!0:e.hidden=!1}function xo(t){let e=t[d],{actives:n,clicks:o,slotchanges:r}=e,i=e.navigation={prev:x("button",{part:"prev-button",type:"button",name:"navigation",value:"-1",html:"Previous"}),next:x("button",{part:"next-button",type:"button",name:"navigation",value:"1",html:"Next"})};e.controls.prepend(i.prev,i.next),i.updates=h.combine({active:n,changes:r}).each(s=>Me(i.prev,i.next,s.changes.elements,s.changes.elements.indexOf(s.active))),i.clicks=o.each(j({'[name="navigation"]':function(s,a){let f=parseFloat(s.value),l=e.elements.indexOf(e.active)+f,p=e.elements[l];!p||(t.active=p,Me(i.prev,i.next,e.elements,l))}}))}function Eo(t){let e=t[d];e.navigation.prev.remove(),e.navigation.next.remove(),e.navigation.updates.stop(),e.navigation.clicks.stop(),e.navigation=void 0}function So(t){return!!t[d].navigation}var jt={};z(jt,{disable:()=>ko,enable:()=>Lo,getState:()=>Po});function De(t,e,n){let{active:o,buttons:r,index:i}=t;if(o===n)return;i>-1&&(t.activeSpan.remove(),r.children[i].part.remove("page-button-active"));let s=e.indexOf(n);s!==-1&&(r.children[s].part.add("page-button-active"),r.children[s].append(t.activeSpan),t.index=s,t.active=n)}function To(t,e,n,o){return e.buttons&&(e.buttons.remove(),e.buttons=void 0),o.length<2||(e.buttons=x("div",{part:"pagination",children:o.map((r,i)=>x("button",{part:"page-button",type:"button",name:"pagination",value:i}))}),t.append(e.buttons)),o.length}function Lo(t){let e=t[d],{shadow:n,actives:o,clicks:r,mutations:i}=e,s=e.pagination={activeSpan:x("span",{class:"invisible",text:"(Current slide)"})};s.mutations=i.each(()=>To(e.controls,s,n,e.children)),s.updates=h.combine({active:o,children:i}).filter(a=>a.children.length>1).each(a=>De(s,e.children,e.active)),s.clicks=r.each(j({'[name="pagination"]':function(a,f){let{host:l}=e,p=e.children,g=p[a.value];!g||(l.active=g,De(s,p,g))}}))}function ko(t){let e=t[d];e.pagination.buttons.remove(),e.pagination.mutations.stop(),e.pagination.updates.stop(),e.pagination.clicks.stop(),e.pagination=void 0}function Po(t){return!!t[d].pagination}var Ht={};z(Ht,{disable:()=>Oo,enable:()=>Fo,getState:()=>Ao});var Be=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled;function ut(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement}function Ge(t){return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():void 0}function lt(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}function Fo(t){let e=t[d];if(!Be)return;let n=e.fullscreen={button:x("button",{part:"fullscreen-button",type:"button",name:"fullscreen",html:"Open in fullscreen"})};e.controls.append(n.button),n.changes=E("fullscreenchange",t).filter(o=>ut()===t).each(o=>{n.button.part.add("fullscreen-button-active"),n.button.innerHTML="Close fullscreen",document.activeElement!==t&&(n.tabIndex=t.tabIndex,t.tabIndex<0&&(t.tabIndex=0),t.focus());let r=E("fullscreenchange",t).each(i=>{n.button.part.remove("fullscreen-button-active"),n.button.innerHTML="Open in fullscreen",t.tabIndex=n.tabIndex,n.tabIndex=void 0,r.stop()})}),n.clicks=e.clicks.each(j({'[name="fullscreen"]':(o,r)=>{let i=ut();if(i===t){lt();return}i&<(),Ge(t)}}))}function Oo(t){let e=t[d];ut()===t&<(),e.fullscreen.button.remove(),e.fullscreen.clicks.stop(),e.fullscreen.changes.stop(),e.fullscreen=void 0}function Ao(t){return!!t[d].fullscreen}var ze={active:{attribute:function(t){this.active=t},set:function(t){let e=this[d],n=typeof t=="object"?t:/^\d/.test(t+"")?this.querySelector("#\\3"+(t+"")[0]+" "+(t+"").slice(1)):/^\#/.test(t+"")?this.querySelector(t):this.querySelector("#"+t);e.views.push(n)},get:function(){return this[d].active}},autoplay:ct(At,"autoplay"),controls:Ot({navigation:It,pagination:jt,fullscreen:Ht}),loop:ct(Ct,"loop")};var Co=import.meta.url.replace(/\/[^\/]*\.js/,"/slide-show-shadow.css"),Js=vt("slide-show",Ie,ze,Co);window.console&&window.console.log("%c%c registered (documentation at %chttps://stephen.band/slide-show/%c)","color: #3a8ab0; font-weight: 600;","color: #888888; font-weight: 400;","color: inherit; font-weight: 400;","color: #888888; font-weight: 400;");export{Js as default}; diff --git a/modules/active.js b/modules/active.js index 3a8bf21..b54179d 100644 --- a/modules/active.js +++ b/modules/active.js @@ -72,6 +72,7 @@ function getAligned(scroller, elements) { while ((slide = elements[--n])) { const slideRect = rect(slide); + if (!slideRect) { continue; } // Todo: do we need webkit property here? @@ -94,6 +95,7 @@ function getAligned(scroller, elements) { // If position has crossed the detection going left, we're in the money if (x <= detection) { + console.log(x, detection, slide); break; } } @@ -118,7 +120,7 @@ export function updateActive(data) { const { scroller, children, elements } = data; const current = getAligned(scroller, elements); let active; - +console.log('CURRENT', current); // If current is a loop ghost jump to the actual slide it references if (!current) { return; } if (isGhost(current)) { diff --git a/modules/lifecycle.js b/modules/lifecycle.js index 5281997..11b67d3 100644 --- a/modules/lifecycle.js +++ b/modules/lifecycle.js @@ -104,6 +104,7 @@ export default { )) .filter((child) => (data.active !== child && trigger('slide-active', child))) .map((child) => data.active = child) + .log('ACTIVE') .broadcast({ memory: true, hot: true }); const clicks = events('click', shadow) @@ -173,6 +174,7 @@ export default { // Update active when scroll comes to rest, but not mid-gesture. scrollends(scroller) .filter((e) => (data.connected && !data.gesturing)) + // Of course, this causes a scroll, which causes a scrollend... .each((e) => updateActive(data)); // Enable single finger scroll on mouse devices. Dodgy idea in my diff --git a/modules/test.js b/modules/test.js index 3b6ab1b..3c8dd76 100644 --- a/modules/test.js +++ b/modules/test.js @@ -1,26 +1,45 @@ + +import equals from '../../fn/modules/equals.js'; + let promise = Promise.resolve(0); let n = 0; -function runTest(name, fn, value, values, resolve, reject) { +function runTest(name, fn, expected, value, values, pass, fail) { try { - fn(resolve, value, ...values); + fn((value) => ( + // If value is an Error object + value instanceof Error ? + fail(value) : + // If value is expected + expected === undefined || equals(value, expected) ? + pass(value) : + // Otherwise + fail(new Error('done() value does not equal expected value')) + ), value, ...values); } catch(e) { - reject(e); + fail(e); } } -export default function scheduleTest(time, name, fn, ...values) { +export default function scheduleTest(time, name, fn, expected, ...values) { return promise = promise - .then((value) => new Promise((resolve, reject) => - setTimeout(runTest, time * 1000, name, fn, value, values, (value) => { - // Log pass + .then((value) => new Promise((resolve, reject) => { + const pass = (value) => { console.log('%c✓ Test ' + (++n) + ' %c' + name, 'color: #B6BD00; font-weight: 400;', 'color: #779AAB; font-weight: 400;'); resolve(value); - }, (e) => { - // Log fail - console.log('%c✗ Test ' + (++n) + ' %c' + name, 'color: #ba4029; font-weight: 400;', 'color: #779AAB; font-weight: 400;', e.message); + }; + + const fail = (e) => { + console.log('%c✗ Test ' + (++n) + ' %c' + name, 'color: #f02f2f; font-weight: 600;', 'color: #779AAB; font-weight: 400;', e.message); reject(); - }) - )); + }; + + return time === 'frame' ? + requestAnimationFrame(() => runTest(name, fn, expected, value, values, pass, fail)) : + time === 'tick' ? + Promise.resolve().then(() => runTest(name, fn, expected, value, values, pass, fail)) : + // Assume time is a number in seconds + setTimeout(runTest, time * 1000, name, fn, expected, value, values, pass, fail) ; + })); } diff --git a/test/2-slide-show.html b/test/2-slide-show.html index e2e4d71..9110e4c 100644 --- a/test/2-slide-show.html +++ b/test/2-slide-show.html @@ -81,7 +81,7 @@ -
                      <slide-show loop autoplay controls="navigation pagination fullscreen"> - one child
                      +
                      <slide-show loop autoplay controls="navigation pagination fullscreen"> - one child
                       
                           
                               
                      @@ -91,7 +91,7 @@
                               
                           
                       
                      -    
                      +    
                      +    
                      <slide-show loop autoplay controls="navigation pagination fullscreen"> - one child
                      @@ -91,7 +91,7 @@ - +