PageSourceSearch

https://www.rureifel-tourismus.de/_assets/1798f66a72c0609b2ee5b404…/PageHeader.b21217161b40f08e75e9.js

js rureifel-tourismus.de collected 2026-10-02 16:18:01 UTC 13,880 bytes, 531 lines download raw bytes

vendor: 11,944 bytes, lines 1-477
1/******/ (() => { // webpackBootstrap
2/******/ 	var __webpack_modules__ = ({
3
4/***/ 3317:
5/***/ (function(module) {
6
7/*!
8 * headroom.js v0.12.0 - Give your page some headroom. Hide your header until you need it
9 * Copyright (c) 2020 Nick Williams - http://wicky.nillia.ms/headroom.js
10 * License: MIT
11 */
12
13(function (global, factory) {
14   true ? module.exports = factory() :
15  0;
16}(this, function () { 'use strict';
17
18  function isBrowser() {
19    return typeof window !== "undefined";
20  }
21
22  /**
23   * Used to detect browser support for adding an event listener with options
24   * Credit: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
25   */
26  function passiveEventsSupported() {
27    var supported = false;
28
29    try {
30      var options = {
31        // eslint-disable-next-line getter-return
32        get passive() {
33          supported = true;
34        }
35      };
36      window.addEventListener("test", options, options);
37      window.removeEventListener("test", options, options);
38    } catch (err) {
39      supported = false;
40    }
41
42    return supported;
43  }
44
45  function isSupported() {
46    return !!(
47      isBrowser() &&
48      function() {}.bind &&
49      "classList" in document.documentElement &&
50      Object.assign &&
51      Object.keys &&
52      requestAnimationFrame
53    );
54  }
55
56  function isDocument(obj) {
57    return obj.nodeType === 9; // Node.DOCUMENT_NODE === 9
58  }
59
60  function isWindow(obj) {
61    // `obj === window` or `obj instanceof Window` is not sufficient,
62    // as the obj may be the window of an iframe.
63    return obj && obj.document && isDocument(obj.document);
64  }
65
66  function windowScroller(win) {
67    var doc = win.document;
68    var body = doc.body;
69    var html = doc.documentElement;
70
71    return {
72      /**
73       * @see http://james.padolsey.com/javascript/get-document-height-cross-browser/
74       * @return {Number} the scroll height of the document in pixels
75       */
76      scrollHeight: function() {
77        return Math.max(
78          body.scrollHeight,
79          html.scrollHeight,
80          body.offsetHeight,
81          html.offsetHeight,
82          body.clientHeight,
83          html.clientHeight
84        );
85      },
86
87      /**
88       * @see http://andylangton.co.uk/blog/development/get-viewport-size-width-and-height-javascript
89       * @return {Number} the height of the viewport in pixels
90       */
91      height: function() {
92        return win.innerHeight || html.clientHeight || body.clientHeight;
93      },
94
95      /**
96       * Gets the Y scroll position
97       * @return {Number} pixels the page has scrolled along the Y-axis
98       */
99      scrollY: function() {
100        if (win.pageYOffset !== undefined) {
101          return win.pageYOffset;
102        }
103
104        return (html || body.parentNode || body).scrollTop;
105      }
106    };
107  }
108
109  function elementScroller(element) {
110    return {
111      /**
112       * @return {Number} the scroll height of the element in pixels
113       */
114      scrollHeight: function() {
115        return Math.max(
116          element.scrollHeight,
117          element.offsetHeight,
118          element.clientHeight
119        );
120      },
121
122      /**
123       * @return {Number} the height of the element in pixels
124       */
125      height: function() {
126        return Math.max(element.offsetHeight, element.clientHeight);
127      },
128
129      /**
130       * Gets the Y scroll position
131       * @return {Number} pixels the element has scrolled along the Y-axis
132       */
133      scrollY: function() {
134        return element.scrollTop;
135      }
136    };
137  }
138
139  function createScroller(element) {
140    return isWindow(element) ? windowScroller(element) : elementScroller(element);
141  }
142
143  /**
144   * @param element EventTarget
145   */
146  function trackScroll(element, options, callback) {
147    var isPassiveSupported = passiveEventsSupported();
148    var rafId;
149    var scrolled = false;
150    var scroller = createScroller(element);
151    var lastScrollY = scroller.scrollY();
152    var details = {};
153
154    function update() {
155      var scrollY = Math.round(scroller.scrollY());
156      var height = scroller.height();
157      var scrollHeight = scroller.scrollHeight();
158
159      // reuse object for less memory churn
160      details.scrollY = scrollY;
161      details.lastScrollY = lastScrollY;
162      details.direction = scrollY > lastScrollY ? "down" : "up";
163      details.distance = Math.abs(scrollY - lastScrollY);
164      details.isOutOfBounds = scrollY < 0 || scrollY + height > scrollHeight;
165      details.top = scrollY <= options.offset[details.direction];
166      details.bottom = scrollY + height >= scrollHeight;
167      details.toleranceExceeded =
168        details.distance > options.tolerance[details.direction];
169
170      callback(details);
171
172      lastScrollY = scrollY;
173      scrolled = false;
174    }
175
176    function handleScroll() {
177      if (!scrolled) {
178        scrolled = true;
179        rafId = requestAnimationFrame(update);
180      }
181    }
182
183    var eventOptions = isPassiveSupported
184      ? { passive: true, capture: false }
185      : false;
186
187    element.addEventListener("scroll", handleScroll, eventOptions);
188    update();
189
190    return {
191      destroy: function() {
192        cancelAnimationFrame(rafId);
193        element.removeEventListener("scroll", handleScroll, eventOptions);
194      }
195    };
196  }
197
198  function normalizeUpDown(t) {
199    return t === Object(t) ? t : { down: t, up: t };
200  }
201
202  /**
203   * UI enhancement for fixed headers.
204   * Hides header when scrolling down
205   * Shows header when scrolling up
206   * @constructor
207   * @param {DOMElement} elem the header element
208   * @param {Object} options options for the widget
209   */
210  function Headroom(elem, options) {
211    options = options || {};
212    Object.assign(this, Headroom.options, options);
213    this.classes = Object.assign({}, Headroom.options.classes, options.classes);
214
215    this.elem = elem;
216    this.tolerance = normalizeUpDown(this.tolerance);
217    this.offset = normalizeUpDown(this.offset);
218    this.initialised = false;
219    this.frozen = false;
220  }
221  Headroom.prototype = {
222    constructor: Headroom,
223
224    /**
225     * Start listening to scrolling
226     * @public
227     */
228    init: function() {
229      if (Headroom.cutsTheMustard && !this.initialised) {
230        this.addClass("initial");
231        this.initialised = true;
232
233        // defer event registration to handle browser
234        // potentially restoring previous scroll position
235        setTimeout(
236          function(self) {
237            self.scrollTracker = trackScroll(
238              self.scroller,
239              { offset: self.offset, tolerance: self.tolerance },
240              self.update.bind(self)
241            );
242          },
243          100,
244          this
245        );
246      }
247
248      return this;
249    },
250
251    /**
252     * Destroy the widget, clearing up after itself
253     * @public
254     */
255    destroy: function() {
256      this.initialised = false;
257      Object.keys(this.classes).forEach(this.removeClass, this);
258      this.scrollTracker.destroy();
259    },
260
261    /**
262     * Unpin the element
263     * @public
264     */
265    unpin: function() {
266      if (this.hasClass("pinned") || !this.hasClass("unpinned")) {
267        this.addClass("unpinned");
268        this.removeClass("pinned");
269
270        if (this.onUnpin) {
271          this.onUnpin.call(this);
272        }
273      }
274    },
275
276    /**
277     * Pin the element
278     * @public
279     */
280    pin: function() {
281      if (this.hasClass("unpinned")) {
282        this.addClass("pinned");
283        this.removeClass("unpinned");
284
285        if (this.onPin) {
286          this.onPin.call(this);
287        }
288      }
289    },
290
291    /**
292     * Freezes the current state of the widget
293     * @public
294     */
295    freeze: function() {
296      this.frozen = true;
297      this.addClass("frozen");
298    },
299
300    /**
301     * Re-enables the default behaviour of the widget
302     * @public
303     */
304    unfreeze: function() {
305      this.frozen = false;
306      this.removeClass("frozen");
307    },
308
309    top: function() {
310      if (!this.hasClass("top")) {
311        this.addClass("top");
312        this.removeClass("notTop");
313
314        if (this.onTop) {
315          this.onTop.call(this);
316        }
317      }
318    },
319
320    notTop: function() {
321      if (!this.hasClass("notTop")) {
322        this.addClass("notTop");
323        this.removeClass("top");
324
325        if (this.onNotTop) {
326          this.onNotTop.call(this);
327        }
328      }
329    },
330
331    bottom: function() {
332      if (!this.hasClass("bottom")) {
333        this.addClass("bottom");
334        this.removeClass("notBottom");
335
336        if (this.onBottom) {
337          this.onBottom.call(this);
338        }
339      }
340    },
341
342    notBottom: function() {
343      if (!this.hasClass("notBottom")) {
344        this.addClass("notBottom");
345        this.removeClass("bottom");
346
347        if (this.onNotBottom) {
348          this.onNotBottom.call(this);
349        }
350      }
351    },
352
353    shouldUnpin: function(details) {
354      var scrollingDown = details.direction === "down";
355
356      return scrollingDown && !details.top && details.toleranceExceeded;
357    },
358
359    shouldPin: function(details) {
360      var scrollingUp = details.direction === "up";
361
362      return (scrollingUp && details.toleranceExceeded) || details.top;
363    },
364
365    addClass: function(className) {
366      this.elem.classList.add.apply(
367        this.elem.classList,
368        this.classes[className].split(" ")
369      );
370    },
371
372    removeClass: function(className) {
373      this.elem.classList.remove.apply(
374        this.elem.classList,
375        this.classes[className].split(" ")
376      );
377    },
378
379    hasClass: function(className) {
380      return this.classes[className].split(" ").every(function(cls) {
381        return this.classList.contains(cls);
382      }, this.elem);
383    },
384
385    update: function(details) {
386      if (details.isOutOfBounds) {
387        // Ignore bouncy scrolling in OSX
388        return;
389      }
390
391      if (this.frozen === true) {
392        return;
393      }
394
395      if (details.top) {
396        this.top();
397      } else {
398        this.notTop();
399      }
400
401      if (details.bottom) {
402        this.bottom();
403      } else {
404        this.notBottom();
405      }
406
407      if (this.shouldUnpin(details)) {
408        this.unpin();
409      } else if (this.shouldPin(details)) {
410        this.pin();
411      }
412    }
413  };
414
415  /**
416   * Default options
417   * @type {Object}
418   */
419  Headroom.options = {
420    tolerance: {
421      up: 0,
422      down: 0
423    },
424    offset: 0,
425    scroller: isBrowser() ? window : null,
426    classes: {
427      frozen: "headroom--frozen",
428      pinned: "headroom--pinned",
429      unpinned: "headroom--unpinned",
430      top: "headroom--top",
431      notTop: "headroom--not-top",
432      bottom: "headroom--bottom",
433      notBottom: "headroom--not-bottom",
434      initial: "headroom"
435    }
436  };
437
438  Headroom.cutsTheMustard = isSupported();
439
440  return Headroom;
441
442}));
443
444
445/***/ })
446
447/******/ 	});
448/************************************************************************/
449/******/ 	// The module cache
450/******/ 	var __webpack_module_cache__ = {};
451/******/ 	
452/******/ 	// The require function
453/******/ 	function __webpack_require__(moduleId) {
454/******/ 		// Check if module is in cache
455/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
456/******/ 		if (cachedModule !== undefined) {
457/******/ 			return cachedModule.exports;
458/******/ 		}
459/******/ 		// Create a new module (and put it into the cache)
460/******/ 		var module = __webpack_module_cache__[moduleId] = {
461/******/ 			// no module.id needed
462/******/ 			// no module.loaded needed
463/******/ 			exports: {}
464/******/ 		};
465/******/ 	
466/******/ 		// Execute the module function
467/******/ 		__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
468/******/ 	
469/******/ 		// Return the exports of the module
470/******/ 		return module.exports;
471/******/ 	}
472/******/ 	
473/************************************************************************/
474/******/ 	/* webpack/runtime/compat get default export */
475/******/ 	(() => {
476/******/ 		// getDefaultExport function for compatibility with non-harmony modules
477/******/ 		__webpack_require__.n = (module) => {
478/******/ 			var getter = module && module.__esModule ?
479/******/ 				() => (module['default']) :
480/******/ 				() => (module);
481/******/ 			__webpack_require__.d(getter, { a: getter });
482/******/ 			return getter;
483/******/ 		};
484/******/ 	})();
485/******/ 	
486/******/ 	/* webpack/runtime/define property getters */
487/******/ 	(() => {
488/******/ 		// define getter functions for harmony exports
489/******/ 		__webpack_require__.d = (exports, definition) => {
490/******/ 			for(var key in definition) {
491/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
492/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
493/******/ 				}
494/******/ 			}
495/******/ 		};
496/******/ 	})();
497/******/ 	
498/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
499/******/ 	(() => {
500/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
501/******/ 	})();
502/******/ 	
503/************************************************************************/
504// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
505(() => {
506"use strict";
507// extracted by mini-css-extract-plugin
508
509})();
510
511// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
512(() => {
513"use strict";
514/* harmony import */ var headroom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3317);
515/* harmony import */ var headroom_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(headroom_js__WEBPACK_IMPORTED_MODULE_0__);
516
517const headerElement = document.querySelector('header');
518const mainElement = document.querySelector('main');
519if (mainElement && !mainElement.querySelector('section.stage')) {
520  document.body.classList.add('no-stage');
521}
522if (headerElement) {
523  let headroom = new (headroom_js__WEBPACK_IMPORTED_MODULE_0___default())(headerElement, {
524    offset: 100
525  });
526  headroom.init();
527}
528})();
529
530/******/ })()
531;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.