!function (e, t) { "object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.sal = t() : e.sal = t() }(this, (function () { return (() => { "use strict"; var e = { 855: (e, t, n) => { function r(e, t) { var n = object.keys(e); if (object.getownpropertysymbols) { var r = object.getownpropertysymbols(e); t && (r = r.filter((function (t) { return object.getownpropertydescriptor(e, t).enumerable }))), n.push.apply(n, r) } return n } function o(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? r(object(n), !0).foreach((function (t) { a(e, t, n[t]) })) : object.getownpropertydescriptors ? object.defineproperties(e, object.getownpropertydescriptors(n)) : r(object(n)).foreach((function (t) { object.defineproperty(e, t, object.getownpropertydescriptor(n, t)) })) } return e } function a(e, t, n) { return t in e ? object.defineproperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e } n.d(t, { default: () => e }); var s = "sal was not initialised! probably it is used in ssr.", i = "your browser does not support intersectionobserver!\nget a polyfill from here:\nhttps://github.com/w3c/intersectionobserver/tree/master/polyfill", l = { root: null, rootmargin: "0% 50%", threshold: .5, animateclassname: "sal-animate", disabledclassname: "sal-disabled", entereventname: "sal:in", exiteventname: "sal:out", selector: "[data-sal]", once: !0, disabled: !1 }, c = [], u = null, d = function (e) { e && e !== l && (l = o(o({}, l), e)) }, f = function (e) { e.classlist.remove(l.animateclassname) }, b = function (e, t) { var n = new customevent(e, { bubbles: !0, detail: t }); t.target.dispatchevent(n) }, p = function () { document.body.classlist.add(l.disabledclassname) }, m = function () { u.disconnect(), u = null }, v = function () { return l.disabled || "function" == typeof l.disabled && l.disabled() }, y = function (e, t) { e.foreach((function (e) { var n = e.target, r = void 0 !== n.dataset.salrepeat, o = void 0 !== n.dataset.salonce, a = r || !(o || l.once); e.intersectionratio >= l.threshold ? (function (e) { e.target.classlist.add(l.animateclassname), b(l.entereventname, e) }(e), a || t.unobserve(n)) : a && function (e) { f(e.target), b(l.exiteventname, e) }(e) })) }, o = function () { var e = [].filter.call(document.queryselectorall(l.selector), (function (e) { return !function (e) { return e.classlist.contains(l.animateclassname) }(e, l.animateclassname) })); return e.foreach((function (e) { return u.observe(e) })), e }, h = function () { p(), m() }, g = function () { document.body.classlist.remove(l.disabledclassname), u = new intersectionobserver(y, { root: l.root, rootmargin: l.rootmargin, threshold: l.threshold }), c = o() }, w = function () { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; m(), array.from(document.queryselectorall(l.selector)).foreach(f), d(e), g() }, j = function () { var e = o(); c.push(e) }; const e = function () { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : l; if (d(e), "undefined" == typeof window) return console.warn(s), { elements: c, disable: h, enable: g, reset: w, update: j }; if (!window.intersectionobserver) throw p(), error(i); return v() ? p() : g(), { elements: c, disable: h, enable: g, reset: w, update: j } } } }, t = {}; function n(r) { if (t[r]) return t[r].exports; var o = t[r] = { exports: {} }; return e[r](o, o.exports, n), o.exports } return n.d = (e, t) => { for (var r in t) n.o(t, r) && !n.o(e, r) && object.defineproperty(e, r, { enumerable: !0, get: t[r] }) }, n.o = (e, t) => object.prototype.hasownproperty.call(e, t), n(855) })().default })); //# sourcemappingurl=sal.js.map