polyfill element.closest for ie11
This commit is contained in:
1 parent
e6244a57b5
commit
b7487b8b4f
10 files changed
+45
-34
No files matched your search
Vendored
+1
-1
@@ -5,5 +5,5 @@
|
|||||||
*
|
*
|
||||||
* Copyright (C) 2020 Hakim El Hattab, https://hakim.se
|
* Copyright (C) 2020 Hakim El Hattab, https://hakim.se
|
||||||
*/
|
*/
|
||||||
var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t,i){return e(i={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&i.path)}},i.exports),i.exports}var i,n=function(e){return e&&e.Math==Math&&e},a=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")(),s={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},r=function(e){try{return!!e()}catch(e){return!0}},o={}.toString,l=function(e){return o.call(e).slice(8,-1)},d="".split,c=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==l(e)?d.call(e,""):Object(e)}:Object,u=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},h=function(e){return c(u(e))},g=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),v=function(e){return"object"==typeof e?null!==e:"function"==typeof e},p=a.document,f=v(p)&&v(p.createElement),m=function(e){return f?p.createElement(e):{}},b=!g&&!r((function(){return 7!=Object.defineProperty(m("div"),"a",{get:function(){return 7}}).a})),y=function(e){if(!v(e))throw TypeError(String(e)+" is not an object");return e},w=function(e,t){if(!v(e))return e;var i,n;if(t&&"function"==typeof(i=e.toString)&&!v(n=i.call(e)))return n;if("function"==typeof(i=e.valueOf)&&!v(n=i.call(e)))return n;if(!t&&"function"==typeof(i=e.toString)&&!v(n=i.call(e)))return n;throw TypeError("Can't convert object to primitive value")},R=Object.defineProperty,E={f:g?R:function(e,t,i){if(y(e),t=w(t,!0),y(i),b)try{return R(e,t,i)}catch(e){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},S=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},A=g?function(e,t,i){return E.f(e,t,S(1,i))}:function(e,t,i){return e[t]=i,e},k=function(e,t){try{A(a,e,t)}catch(i){a[e]=t}return t},L=a["__core-js_shared__"]||k("__core-js_shared__",{}),x=t((function(e){(e.exports=function(e,t){return L[e]||(L[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),C={}.hasOwnProperty,P=function(e,t){return C.call(e,t)},N=0,M=Math.random(),I=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++N+M).toString(36)},T=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())})),D=T&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,O=x("wks"),H=a.Symbol,B=D?H:H&&H.withoutSetter||I,U=function(e){return P(O,e)||(T&&P(H,e)?O[e]=H[e]:O[e]=B("Symbol."+e)),O[e]},j=Math.ceil,z=Math.floor,q=function(e){return isNaN(e=+e)?0:(e>0?z:j)(e)},F=Math.min,_=function(e){return e>0?F(q(e),9007199254740991):0},W=Math.max,V=Math.min,K=function(e){return function(t,i,n){var a,s=h(t),r=_(s.length),o=function(e,t){var i=q(e);return i<0?W(i+t,0):V(i,t)}(n,r);if(e&&i!=i){for(;r>o;)if((a=s[o++])!=a)return!0}else for(;r>o;o++)if((e||o in s)&&s[o]===i)return e||o||0;return!e&&-1}},X={includes:K(!0),indexOf:K(!1)},$={},Y=X.indexOf,G=function(e,t){var i,n=h(e),a=0,s=[];for(i in n)!P($,i)&&P(n,i)&&s.push(i);for(;t.length>a;)P(n,i=t[a++])&&(~Y(s,i)||s.push(i));return s},J=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Q=Object.keys||function(e){return G(e,J)},Z=g?Object.defineProperties:function(e,t){y(e);for(var i,n=Q(t),a=n.length,s=0;a>s;)E.f(e,i=n[s++],t[i]);return e},ee=a,te=function(e){return"function"==typeof e?e:void 0},ie=function(e,t){return arguments.length<2?te(ee[e])||te(a[e]):ee[e]&&ee[e][t]||a[e]&&a[e][t]},ne=ie("document","documentElement"),ae=x("keys"),se=function(e){return ae[e]||(ae[e]=I(e))},re=se("IE_PROTO"),oe=function(){},le=function(e){return"<script>"+e+"<\/script>"},de=function(){try{i=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;de=i?function(e){e.write(le("")),e.close();var t=e.parentWindow.Object;return e=null,t}(i):((t=m("iframe")).style.display="none",ne.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(le("document.F=Object")),e.close(),e.F);for(var n=J.length;n--;)delete de.prototype[J[n]];return de()};$[re]=!0;var ce=Object.create||function(e,t){var i;return null!==e?(oe.prototype=y(e),i=new oe,oe.prototype=null,i[re]=e):i=de(),void 0===t?i:Z(i,t)},ue=U("unscopablesLine truncated
|
var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var n,i=function(e){return e&&e.Math==Math&&e},r=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof e&&e)||Function("return this")(),a={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},o=function(e){try{return!!e()}catch(e){return!0}},s={}.toString,l=function(e){return s.call(e).slice(8,-1)},c="".split,u=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==l(e)?c.call(e,""):Object(e)}:Object,d=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},h=function(e){return u(d(e))},f=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),v=function(e){return"object"==typeof e?null!==e:"function"==typeof e},g=r.document,p=v(g)&&v(g.createElement),m=function(e){return p?g.createElement(e):{}},y=!f&&!o((function(){return 7!=Object.defineProperty(m("div"),"a",{get:function(){return 7}}).a})),b=function(e){if(!v(e))throw TypeError(String(e)+" is not an object");return e},w=function(e,t){if(!v(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!v(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!v(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!v(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")},S=Object.defineProperty,E={f:f?S:function(e,t,n){if(b(e),t=w(t,!0),b(n),y)try{return S(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},A=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},R=f?function(e,t,n){return E.f(e,t,A(1,n))}:function(e,t,n){return e[t]=n,e},k=function(e,t){try{R(r,e,t)}catch(n){r[e]=t}return t},x=r["__core-js_shared__"]||k("__core-js_shared__",{}),L=t((function(e){(e.exports=function(e,t){return x[e]||(x[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),C={}.hasOwnProperty,P=function(e,t){return C.call(e,t)},N=0,M=Math.random(),I=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++N+M).toString(36)},T=!!Object.getOwnPropertySymbols&&!o((function(){return!String(Symbol())})),O=T&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,D=L("wks"),j=r.Symbol,H=O?j:j&&j.withoutSetter||I,B=function(e){return P(D,e)||(T&&P(j,e)?D[e]=j[e]:D[e]=H("Symbol."+e)),D[e]},U=Math.ceil,F=Math.floor,z=function(e){return isNaN(e=+e)?0:(e>0?F:U)(e)},q=Math.min,_=function(e){return e>0?q(z(e),9007199254740991):0},V=Math.max,W=Math.min,K=function(e,t){var n=z(e);return n<0?V(n+t,0):W(n,t)},X=function(e){return function(t,n,i){var r,a=h(t),o=_(a.length),s=K(i,o);if(e&&n!=n){for(;o>s;)if((r=a[s++])!=r)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},$={includes:X(!0),indexOf:X(!1)},Y={},G=$.indexOf,J=function(e,t){var n,i=h(e),r=0,a=[];for(n in i)!P(Y,n)&&P(i,n)&&a.push(n);for(;t.length>r;)P(i,n=t[r++])&&(~G(a,n)||a.push(n));return a},Q=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Z=Object.keys||function(e){return J(e,Q)},ee=f?Object.defineProperties:function(e,t){b(e);for(var n,i=Z(t),r=i.length,a=0;r>a;)E.f(e,n=i[a++],t[n]);return e},te=r,ne=function(e){return"function"==typeof e?e:void 0},ie=function(e,t){return arguments.length<2?ne(te[e])||ne(r[e]):te[e]&&te[e][t]||r[e]&&r[e][t]},re=ie("document","documentElement"),ae=L("keys"),oe=function(e){return ae[e]||(ae[e]=I(e))},se=oe("IE_PROTO"),le=function(){},ce=function(e){return"<script>"+e+"<\/script>"},ue=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;ue=n?function(e){e.write(ce("")),e.close();var t=e.parentWindow.Object;return e=null,t}(n):((t=m("iframe")).style.display="none",re.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(ce("document.F=Object")),e.close(),e.F);for(var i=Q.length;i--;)delete ue.prototype[Q[i]];return ue()};Y[se]=!0;var de=Object.create||function(e,t){var n;return null!==e?(le.prototype=b(e),n=new le,le.prototype=null,n[se]=e):n=ue(),void 0===t?n:ee(n,t)},he=B("unscoLine truncated
|
||||||
//# sourceMappingURL=reveal.esm.js.map
|
//# sourceMappingURL=reveal.esm.js.map
|
||||||
Vendored
+1
-1
@@ -5,5 +5,5 @@
|
|||||||
*
|
*
|
||||||
* Copyright (C) 2020 Hakim El Hattab, https://hakim.se
|
* Copyright (C) 2020 Hakim El Hattab, https://hakim.se
|
||||||
*/
|
*/
|
||||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Reveal=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var n=function(e){return e&&e.Math==Math&&e},i=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")(),r=function(e){try{return!!e()}catch(e){return!0}},a=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),o={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,l={f:s&&!o.call({1:2},1)?function(e){var t=s(this,e);return!!t&&t.enumerable}:o},c=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},u={}.toString,d=function(e){return u.call(e).slice(8,-1)},h="".split,f=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==d(e)?h.call(e,""):Object(e)}:Object,v=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},g=function(e){return f(v(e))},p=function(e){return"object"==typeof e?null!==e:"function"==typeof e},m=function(e,t){if(!p(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!p(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!p(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!p(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")},y={}.hasOwnProperty,b=function(e,t){return y.call(e,t)},w=i.document,S=p(w)&&p(w.createElement),E=function(e){return S?w.createElement(e):{}},k=!a&&!r((function(){return 7!=Object.defineProperty(E("div"),"a",{get:function(){return 7}}).a})),A=Object.getOwnPropertyDescriptor,R={f:a?A:function(e,t){if(e=g(e),t=m(t,!0),k)try{return A(e,t)}catch(e){}if(b(e,t))return c(!l.f.call(e,t),e[t])}},x=function(e){if(!p(e))throw TypeError(String(e)+" is not an object");return e},L=Object.defineProperty,C={f:a?L:function(e,t,n){if(x(e),t=m(t,!0),x(n),k)try{return L(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},P=a?function(e,t,n){return C.f(e,t,c(1,n))}:function(e,t,n){return e[t]=n,e},N=function(e,t){try{P(i,e,t)}catch(n){i[e]=t}return t},M=i["__core-js_shared__"]||N("__core-js_shared__",{}),I=Function.toString;"function"!=typeof M.inspectSource&&(M.inspectSource=function(e){return I.call(e)});var O,T,D,j=M.inspectSource,H=i.WeakMap,U="function"==typeof H&&/native code/.test(j(H)),B=t((function(e){(e.exports=function(e,t){return M[e]||(M[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),F=0,z=Math.random(),q=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++F+z).toString(36)},_=B("keys"),V=function(e){return _[e]||(_[e]=q(e))},W={},K=i.WeakMap;if(U){var $=new K,X=$.get,Y=$.has,G=$.set;O=function(e,t){return G.call($,e,t),t},T=function(e){return X.call($,e)||{}},D=function(e){return Y.call($,e)}}else{var J=V("state");W[J]=!0,O=function(e,t){return P(e,J,t),t},T=function(e){return b(e,J)?e[J]:{}},D=function(e){return b(e,J)}}var Q,Z,ee={set:O,get:T,has:D,enforce:function(e){return D(e)?T(e):O(e,{})},getterFor:function(e){return function(t){var n;if(!p(t)||(n=T(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},te=t((function(e){var t=ee.get,n=ee.enforce,r=String(String).split("String");(e.exports=function(e,t,a,o){var s=!!o&&!!o.unsafe,l=!!o&&!!o.enumerable,c=!!o&&!!o.noTargetGet;"function"==typeof a&&("string"!=typeof t||b(a,"name")||P(a,"name",t),n(a).source=r.join("string"==typeof t?t:"")),e!==i?(s?!c&&e[t]&&(l=!0):delete e[t],l?e[t]=a:P(e,t,a)):l?e[t]=a:N(t,a)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||j(this)}))})),ne=i,ie=function(e){return"function"==typeof e?e:void 0},re=function(e,t){return arguments.length<2?ie(ne[e])||ie(i[e]):ne[e]&&ne[e][t]||i[e]&&i[e][t]},ae=Math.ceil,oe=Math.floor,se=function(e){return isNaN(e=+e)?0:(e>0?oe:ae)(e)},le=Math.min,ce=function(e){return e>0?le(se(e),9007199254740991):0},ue=Math.max,de=Math.min,he=function(e,t){var n=se(e);return n<0?ue(n+t,0):de(n,t)},fe=function(e){return function(t,n,i){var r,a=g(t),o=ce(a.length),s=he(i,o);if(e&&n!=n){for(;o>s;)if((r=a[s++])!=r)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},ve={includes:fe(!0),indexOf:fe(!1)},ge=ve.indexOf,pe=function(e,t){var n,i=g(e),r=0,a=[];for(n in i)!b(W,n)&&b(i,n)&&a.push(n);for(;t.length>r;)b(i,n=t[r++])&&(~ge(a,n)||a.push(n));return a},me=["constructor","hasOwnProperty","isProtLine truncated
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Reveal=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var n=function(e){return e&&e.Math==Math&&e},i=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")(),r=function(e){try{return!!e()}catch(e){return!0}},a=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),o={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,l={f:s&&!o.call({1:2},1)?function(e){var t=s(this,e);return!!t&&t.enumerable}:o},c=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},u={}.toString,d=function(e){return u.call(e).slice(8,-1)},h="".split,f=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==d(e)?h.call(e,""):Object(e)}:Object,v=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},g=function(e){return f(v(e))},p=function(e){return"object"==typeof e?null!==e:"function"==typeof e},m=function(e,t){if(!p(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!p(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!p(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!p(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")},y={}.hasOwnProperty,b=function(e,t){return y.call(e,t)},w=i.document,S=p(w)&&p(w.createElement),E=function(e){return S?w.createElement(e):{}},k=!a&&!r((function(){return 7!=Object.defineProperty(E("div"),"a",{get:function(){return 7}}).a})),A=Object.getOwnPropertyDescriptor,R={f:a?A:function(e,t){if(e=g(e),t=m(t,!0),k)try{return A(e,t)}catch(e){}if(b(e,t))return c(!l.f.call(e,t),e[t])}},x=function(e){if(!p(e))throw TypeError(String(e)+" is not an object");return e},L=Object.defineProperty,C={f:a?L:function(e,t,n){if(x(e),t=m(t,!0),x(n),k)try{return L(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},P=a?function(e,t,n){return C.f(e,t,c(1,n))}:function(e,t,n){return e[t]=n,e},N=function(e,t){try{P(i,e,t)}catch(n){i[e]=t}return t},M=i["__core-js_shared__"]||N("__core-js_shared__",{}),I=Function.toString;"function"!=typeof M.inspectSource&&(M.inspectSource=function(e){return I.call(e)});var O,T,D,j=M.inspectSource,H=i.WeakMap,U="function"==typeof H&&/native code/.test(j(H)),B=t((function(e){(e.exports=function(e,t){return M[e]||(M[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),F=0,z=Math.random(),q=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++F+z).toString(36)},_=B("keys"),V=function(e){return _[e]||(_[e]=q(e))},W={},K=i.WeakMap;if(U){var $=new K,X=$.get,Y=$.has,G=$.set;O=function(e,t){return G.call($,e,t),t},T=function(e){return X.call($,e)||{}},D=function(e){return Y.call($,e)}}else{var J=V("state");W[J]=!0,O=function(e,t){return P(e,J,t),t},T=function(e){return b(e,J)?e[J]:{}},D=function(e){return b(e,J)}}var Q,Z,ee={set:O,get:T,has:D,enforce:function(e){return D(e)?T(e):O(e,{})},getterFor:function(e){return function(t){var n;if(!p(t)||(n=T(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},te=t((function(e){var t=ee.get,n=ee.enforce,r=String(String).split("String");(e.exports=function(e,t,a,o){var s=!!o&&!!o.unsafe,l=!!o&&!!o.enumerable,c=!!o&&!!o.noTargetGet;"function"==typeof a&&("string"!=typeof t||b(a,"name")||P(a,"name",t),n(a).source=r.join("string"==typeof t?t:"")),e!==i?(s?!c&&e[t]&&(l=!0):delete e[t],l?e[t]=a:P(e,t,a)):l?e[t]=a:N(t,a)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||j(this)}))})),ne=i,ie=function(e){return"function"==typeof e?e:void 0},re=function(e,t){return arguments.length<2?ie(ne[e])||ie(i[e]):ne[e]&&ne[e][t]||i[e]&&i[e][t]},ae=Math.ceil,oe=Math.floor,se=function(e){return isNaN(e=+e)?0:(e>0?oe:ae)(e)},le=Math.min,ce=function(e){return e>0?le(se(e),9007199254740991):0},ue=Math.max,de=Math.min,he=function(e,t){var n=se(e);return n<0?ue(n+t,0):de(n,t)},fe=function(e){return function(t,n,i){var r,a=g(t),o=ce(a.length),s=he(i,o);if(e&&n!=n){for(;o>s;)if((r=a[s++])!=r)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},ve={includes:fe(!0),indexOf:fe(!1)},ge=ve.indexOf,pe=function(e,t){var n,i=g(e),r=0,a=[];for(n in i)!b(W,n)&&b(i,n)&&a.push(n);for(;t.length>r;)b(i,n=t[r++])&&(~ge(a,n)||a.push(n));return a},me=["constructor","hasOwnProperty","isProtLine truncated
|
||||||
//# sourceMappingURL=reveal.js.map
|
//# sourceMappingURL=reveal.js.map
|
||||||
File renamed without changes.
@@ -36,6 +36,18 @@
|
|||||||
<audio src="assets/beeping.wav" data-autoplay></audio>
|
<audio src="assets/beeping.wav" data-autoplay></audio>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<h2>Audio inside slide fragments</h2>
|
||||||
|
<div class="fragment">
|
||||||
|
Beep 1
|
||||||
|
<audio src="assets/beeping.wav" data-autoplay></audio>
|
||||||
|
</div>
|
||||||
|
<div class="fragment">
|
||||||
|
Beep 2
|
||||||
|
<audio src="assets/beeping.wav" data-autoplay></audio>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<h2>Audio with controls</h2>
|
<h2>Audio with controls</h2>
|
||||||
<audio src="assets/beeping.wav" controls></audio>
|
<audio src="assets/beeping.wav" controls></audio>
|
||||||
|
|||||||
File renamed without changes.
@@ -1,4 +1,4 @@
|
|||||||
import { queryAll, extend, createStyleSheet, matchesSelector } from '../utils/util.js'
|
import { queryAll, extend, createStyleSheet, matches, closest } from '../utils/util.js'
|
||||||
import { FRAGMENT_STYLE_REGEX } from '../utils/constants.js'
|
import { FRAGMENT_STYLE_REGEX } from '../utils/constants.js'
|
||||||
|
|
||||||
// Counter used to generate unique IDs for auto-animated elements
|
// Counter used to generate unique IDs for auto-animated elements
|
||||||
@@ -299,8 +299,8 @@ export default class AutoAnimate {
|
|||||||
options = extend( options, inheritedOptions );
|
options = extend( options, inheritedOptions );
|
||||||
|
|
||||||
// Inherit options from parent elements
|
// Inherit options from parent elements
|
||||||
if( element.closest && element.parentNode ) {
|
if( element.parentNode ) {
|
||||||
let autoAnimatedParent = element.parentNode.closest( '[data-auto-animate-target]' );
|
let autoAnimatedParent = closest( element.parentNode, '[data-auto-animate-target]' );
|
||||||
if( autoAnimatedParent ) {
|
if( autoAnimatedParent ) {
|
||||||
options = this.getAutoAnimateOptions( autoAnimatedParent, options );
|
options = this.getAutoAnimateOptions( autoAnimatedParent, options );
|
||||||
}
|
}
|
||||||
@@ -463,11 +463,11 @@ export default class AutoAnimate {
|
|||||||
|
|
||||||
// Disable scale transformations on text nodes, we transiition
|
// Disable scale transformations on text nodes, we transiition
|
||||||
// each individual text property instead
|
// each individual text property instead
|
||||||
if( matchesSelector( pair.from, textNodes ) ) {
|
if( matches( pair.from, textNodes ) ) {
|
||||||
pair.options = { scale: false };
|
pair.options = { scale: false };
|
||||||
}
|
}
|
||||||
// Animate individual lines of code
|
// Animate individual lines of code
|
||||||
else if( matchesSelector( pair.from, codeNodes ) ) {
|
else if( matches( pair.from, codeNodes ) ) {
|
||||||
|
|
||||||
// Transition the code block's width and height instead of scaling
|
// Transition the code block's width and height instead of scaling
|
||||||
// to prevent its content from being squished
|
// to prevent its content from being squished
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import { closest } from '../utils/util.js'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages focus when a presentation is embedded. This
|
* Manages focus when a presentation is embedded. This
|
||||||
* helps us only capture keyboard from the presentation
|
* helps us only capture keyboard from the presentation
|
||||||
@@ -85,7 +87,7 @@ export default class Focus {
|
|||||||
|
|
||||||
onDocumentPointerDown( event ) {
|
onDocumentPointerDown( event ) {
|
||||||
|
|
||||||
let revealElement = event.target.closest( '.reveal' );
|
let revealElement = closest( event.target, '.reveal' );
|
||||||
if( !revealElement || revealElement !== this.Reveal.getRevealElement() ) {
|
if( !revealElement || revealElement !== this.Reveal.getRevealElement() ) {
|
||||||
this.blur();
|
this.blur();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { HORIZONTAL_SLIDES_SELECTOR, VERTICAL_SLIDES_SELECTOR } from '../utils/constants.js'
|
import { HORIZONTAL_SLIDES_SELECTOR, VERTICAL_SLIDES_SELECTOR } from '../utils/constants.js'
|
||||||
import { extend, queryAll, closestParent } from '../utils/util.js'
|
import { extend, queryAll, closest } from '../utils/util.js'
|
||||||
import { isMobile } from '../utils/device.js'
|
import { isMobile } from '../utils/device.js'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -240,7 +240,7 @@ export default class SlideContent {
|
|||||||
|
|
||||||
// HTML5 media elements
|
// HTML5 media elements
|
||||||
queryAll( element, 'video, audio' ).forEach( el => {
|
queryAll( element, 'video, audio' ).forEach( el => {
|
||||||
if( closestParent( el, '.fragment' ) && !closestParent( el, '.fragment.visible' ) ) {
|
if( closest( el, '.fragment' ) && !closest( el, '.fragment.visible' ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -250,7 +250,7 @@ export default class SlideContent {
|
|||||||
// If no global setting is available, fall back on the element's
|
// If no global setting is available, fall back on the element's
|
||||||
// own autoplay setting
|
// own autoplay setting
|
||||||
if( typeof autoplay !== 'boolean' ) {
|
if( typeof autoplay !== 'boolean' ) {
|
||||||
autoplay = el.hasAttribute( 'data-autoplay' ) || !!closestParent( el, '.slide-background' );
|
autoplay = el.hasAttribute( 'data-autoplay' ) || !!closest( el, '.slide-background' );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( autoplay && typeof el.play === 'function' ) {
|
if( autoplay && typeof el.play === 'function' ) {
|
||||||
@@ -288,7 +288,7 @@ export default class SlideContent {
|
|||||||
|
|
||||||
// Normal iframes
|
// Normal iframes
|
||||||
queryAll( element, 'iframe[src]' ).forEach( el => {
|
queryAll( element, 'iframe[src]' ).forEach( el => {
|
||||||
if( closestParent( el, '.fragment' ) && !closestParent( el, '.fragment.visible' ) ) {
|
if( closest( el, '.fragment' ) && !closest( el, '.fragment.visible' ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -297,7 +297,7 @@ export default class SlideContent {
|
|||||||
|
|
||||||
// Lazy loading iframes
|
// Lazy loading iframes
|
||||||
queryAll( element, 'iframe[data-src]' ).forEach( el => {
|
queryAll( element, 'iframe[data-src]' ).forEach( el => {
|
||||||
if( closestParent( el, '.fragment' ) && !closestParent( el, '.fragment.visible' ) ) {
|
if( closest( el, '.fragment' ) && !closest( el, '.fragment.visible' ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -320,8 +320,8 @@ export default class SlideContent {
|
|||||||
*/
|
*/
|
||||||
startEmbeddedMedia( event ) {
|
startEmbeddedMedia( event ) {
|
||||||
|
|
||||||
let isAttachedToDOM = !!closestParent( event.target, 'html' ),
|
let isAttachedToDOM = !!closest( event.target, 'html' ),
|
||||||
isVisible = !!closestParent( event.target, '.present' );
|
isVisible = !!closest( event.target, '.present' );
|
||||||
|
|
||||||
if( isAttachedToDOM && isVisible ) {
|
if( isAttachedToDOM && isVisible ) {
|
||||||
event.target.currentTime = 0;
|
event.target.currentTime = 0;
|
||||||
@@ -344,8 +344,8 @@ export default class SlideContent {
|
|||||||
|
|
||||||
if( iframe && iframe.contentWindow ) {
|
if( iframe && iframe.contentWindow ) {
|
||||||
|
|
||||||
let isAttachedToDOM = !!closestParent( event.target, 'html' ),
|
let isAttachedToDOM = !!closest( event.target, 'html' ),
|
||||||
isVisible = !!closestParent( event.target, '.present' );
|
isVisible = !!closest( event.target, '.present' );
|
||||||
|
|
||||||
if( isAttachedToDOM && isVisible ) {
|
if( isAttachedToDOM && isVisible ) {
|
||||||
|
|
||||||
@@ -355,7 +355,7 @@ export default class SlideContent {
|
|||||||
// If no global setting is available, fall back on the element's
|
// If no global setting is available, fall back on the element's
|
||||||
// own autoplay setting
|
// own autoplay setting
|
||||||
if( typeof autoplay !== 'boolean' ) {
|
if( typeof autoplay !== 'boolean' ) {
|
||||||
autoplay = iframe.hasAttribute( 'data-autoplay' ) || !!closestParent( iframe, '.slide-background' );
|
autoplay = iframe.hasAttribute( 'data-autoplay' ) || !!closest( iframe, '.slide-background' );
|
||||||
}
|
}
|
||||||
|
|
||||||
// YouTube postMessage API
|
// YouTube postMessage API
|
||||||
|
|||||||
+1
-1
@@ -148,7 +148,7 @@ export default function( revealElement, options ) {
|
|||||||
|
|
||||||
// Embedded decks use the reveal element as their viewport
|
// Embedded decks use the reveal element as their viewport
|
||||||
if( config.embedded === true ) {
|
if( config.embedded === true ) {
|
||||||
dom.viewport = revealElement.closest( '.reveal-viewport' ) || revealElement;
|
dom.viewport = Util.closest( revealElement, '.reveal-viewport' ) || revealElement;
|
||||||
}
|
}
|
||||||
// Full-page decks use the body as their viewport
|
// Full-page decks use the body as their viewport
|
||||||
else {
|
else {
|
||||||
|
|||||||
+12
-15
@@ -94,14 +94,10 @@ export const transformElement = ( element, transform ) => {
|
|||||||
*
|
*
|
||||||
* @return {Boolean}
|
* @return {Boolean}
|
||||||
*/
|
*/
|
||||||
export const matchesSelector = ( target, selector ) => {
|
export const matches = ( target, selector ) => {
|
||||||
|
|
||||||
// There's some overhead doing this each time, we don't
|
let matchesMethod = target.matches || target.matchesSelector || target.msMatchesSelector;
|
||||||
// want to rewrite the element prototype but should still
|
|
||||||
// be enough to feature detect once at startup...
|
|
||||||
let matchesMethod = parent.matches || parent.matchesSelector || parent.msMatchesSelector;
|
|
||||||
|
|
||||||
// If we find a match, we're all set
|
|
||||||
return !!( matchesMethod && matchesMethod.call( target, selector ) );
|
return !!( matchesMethod && matchesMethod.call( target, selector ) );
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -117,20 +113,21 @@ export const matchesSelector = ( target, selector ) => {
|
|||||||
* @return {HTMLElement} The matched parent or null
|
* @return {HTMLElement} The matched parent or null
|
||||||
* if no matching parent was found
|
* if no matching parent was found
|
||||||
*/
|
*/
|
||||||
export const closestParent = ( target, selector ) => {
|
export const closest = ( target, selector ) => {
|
||||||
|
|
||||||
let parent = target.parentNode;
|
// Native Element.closest
|
||||||
|
if( typeof target.closest === 'function' ) {
|
||||||
|
return target.closest( selector );
|
||||||
|
}
|
||||||
|
|
||||||
while( parent ) {
|
// Polyfill
|
||||||
|
while( target ) {
|
||||||
// If we find a match, we're all set
|
if( matches( target, selector ) ) {
|
||||||
if( matchesSelector( parent, selector ) ) {
|
return target;
|
||||||
return parent;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Keep searching
|
// Keep searching
|
||||||
parent = parent.parentNode;
|
target = target.parentNode;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in new issue
Block a user