PageSourceSearch

https://www.bakertilly.de/typo3temp/assets/compressed/merged-814d4…16bdef7bce749d4f1e2d7d9cdfd9f.1789636948.js

js bakertilly.de collected 2026-09-24 18:15:03 UTC 149,570 bytes, 2,974 lines download raw bytes

1
2$(function() {
3    chosenSelects.init();
4    personSelect.init();
5    filterPerson.init();
6});
7
8/**
9 * 2024 Version
10 * @type {type}
11 */
12var filterPerson = {
13    selector: '#psearch form.filter',
14    selectorSelect: '.select-filter',
15    init: function() {
16        // 2024 Version
17        if($(this.selector).length) {
18            var form = $(this.selector);
19            var _this = this;
20            $(this.selectorSelect).on('change', function(e) {
21                form.submit();
22                form.find('.catfilter').addClass('disabled');
23                form.find('input, button, select').attr('disabled', 'disabled');
24            });
25        }
26    }
27};
28
29/**
30 * Coosen Select boxes version
31 *
32 * @type object
33 */
34var personSelect = {
35    selector: '.select-person',
36    init: function() {
37        if($('.teamlist').length) {
38            this.onChange();
39        }
40    },
41    onChange: function() {
42        $(this.selector).on('change', function() {
43            $(this).closest('form').submit();
44        });
45    }
46};
47
48var chosenSelects = {
49    init: function() {
50        if($('.teamlist').length) {
51            $('.tx-nnaddress-search .chosen-container-single').on('click', function() {
52                if($(this).prev('select').hasClass('services')) {
53                    $('.tx-nnaddress-search select.chosen.competence').val(0).trigger('chosen:updated');
54                }
55
56                if($(this).prev('select').hasClass('competence')) {
57                    $('.tx-nnaddress-search select.chosen.services').val(0).trigger('chosen:updated');
58                }
59            });
60        }
61    }
62};
63
64/*!
65 * shariff - v3.2.1 - Mon, 27 May 2019 08:23:32 GMT
66 * https://github.com/heiseonline/shariff
67 * Copyright (c) 2019 Ines Pauer, Philipp Busse, Sebastian Hilbig, Erich Kramer, Deniz Sesli
68 * Licensed under the MIT license
69 */
70!function(e){function t(a){if(r[a])return r[a].exports;var n=r[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var r={};t.m=e,t.c=r,t.d=function(e,r,a){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=2)}([function(e,t,r){"use strict";function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function n(e,t,r){if(e&&p.isObject(e)&&e instanceof a)return e;var n=new a;return n.parse(e,t,r),n}function i(e){return p.isString(e)&&(e=n(e)),e instanceof a?e.format():a.prototype.format.call(e)}function o(e,t){return n(e,!1,!0).resolve(t)}function s(e,t){return e?n(e,!1,!0).resolveObject(t):t}var l=r(10),p=r(12);t.parse=n,t.resolve=o,t.resolveObject=s,t.format=i,t.Url=a;var u=/^([a-z0-9.+-]+:)/i,h=/:[0-9]*$/,d=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["<",">",'"',"`"," ","\r","\n","\t"],f=["{","}","|","\\","^","`"].concat(c),m=["'"].concat(f),b=["%","/","?",";","#"].concat(m),g=["/","?","#"],v=/^[+a-z0-9A-Z_-]{0,63}$/,k=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,j={javascript:!0,"javascript:":!0},z={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},P=r(13);a.prototype.parse=function(e,t,r){if(!p.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),n=-1!==a&&a<e.indexOf("#")?"?":"#",i=e.split(n),o=/\\/g;i[0]=i[0].replace(o,"/"),e=i.join(n);var s=e;if(s=s.trim(),!r&&1===e.split("#").length){var h=d.exec(s);if(h)return this.path=s,this.href=s,this.pathname=h[1],h[2]?(this.search=h[2],this.query=t?P.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var c=u.exec(s);if(c){c=c[0];var f=c.toLowerCase();this.protocol=f,s=s.substr(c.length)}if(r||c||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var T="//"===s.substr(0,2);!T||c&&z[c]||(s=s.substr(2),this.slashes=!0)}if(!z[c]&&(T||c&&!y[c])){for(var w=-1,x=0;x<g.length;x++){var U=s.indexOf(g[x]);-1!==U&&(-1===w||U<w)&&(w=U)}var C,R;R=-1===w?s.lastIndexOf("@"):s.lastIndexOf("@",w),-1!==R&&(C=s.slice(0,R),s=s.slice(R+1),this.auth=decodeURIComponent(C)),w=-1;for(var x=0;x<b.length;x++){var U=s.indexOf(b[x]);-1!==U&&(-1===w||U<w)&&(w=U)}-1===w&&(w=s.length),this.host=s.slice(0,w),s=s.slice(w),this.parseHost(),this.hostname=this.hostname||"";var I="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!I)for(var D=this.hostname.split(/\./),x=0,S=D.length;x<S;x++){var L=D[x];if(L&&!L.match(v)){for(var N="",O=0,F=L.length;O<F;O++)L.charCodeAt(O)>127?N+="x":N+=L[O];
70if(!N.match(v)){var A=D.slice(0,x),q=D.slice(x+1),M=L.match(k);M&&(A.push(M[1]),q.unshift(M[2])),q.length&&(s="/"+q.join(".")+s),this.hostname=A.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=l.toASCII(this.hostname));var J=this.port?":"+this.port:"",V=this.hostname||"";this.host=V+J,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!j[f])for(var x=0,S=m.length;x<S;x++){var W=m[x];if(-1!==s.indexOf(W)){var G=encodeURIComponent(W);G===W&&(G=escape(W)),s=s.split(W).join(G)}}var Q=s.indexOf("#");-1!==Q&&(this.hash=s.substr(Q),s=s.slice(0,Q));var B=s.indexOf("?");if(-1!==B?(this.search=s.substr(B),this.query=s.substr(B+1),t&&(this.query=P.parse(this.query)),s=s.slice(0,B)):t&&(this.search="",this.query={}),s&&(this.pathname=s),y[f]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var J=this.pathname||"",X=this.search||"";this.path=J+X}return this.href=this.format(),this},a.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",a=this.hash||"",n=!1,i="";this.host?n=e+this.host:this.hostname&&(n=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(n+=":"+this.port)),this.query&&p.isObject(this.query)&&Object.keys(this.query).length&&(i=P.stringify(this.query));var o=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||y[t])&&!1!==n?(n="//"+(n||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):n||(n=""),a&&"#"!==a.charAt(0)&&(a="#"+a),o&&"?"!==o.charAt(0)&&(o="?"+o),r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),o=o.replace("#","%23"),t+n+r+o+a},a.prototype.resolve=function(e){return this.resolveObject(n(e,!1,!0)).format()},a.prototype.resolveObject=function(e){if(p.isString(e)){var t=new a;t.parse(e,!1,!0),e=t}for(var r=new a,n=Object.keys(this),i=0;i<n.length;i++){var o=n[i];r[o]=this[o]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),l=0;l<s.length;l++){var u=s[l];"protocol"!==u&&(r[u]=e[u])}return y[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!y[e.protocol]){for(var h=Object.keys(e),d=0;d<h.length;d++){var c=h[d];r[c]=e[c]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||z[e.protocol])r.pathname=e.pathname;else{for(var f=(e.pathname||"").split("/");f.length&&!(e.host=f.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==f[0]&&f.unshift(""),f.length<2&&f.unshift(""),r.pathname=f.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var m=r.pathname||"",b=r.search||"";r.path=m+b}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var g=r.pathname&&"/"===r.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),k=v||g||r.host&&e.pathname,j=k,P=r.pathname&&r.pathname.split("/")||[],f=e.pathname&&e.pathname.split("/")||[],T=r.protocol&&!y[r.protocol];if(T&&(r.hostname="",r.port=null,r.host&&(""===P[0]?P[0]=r.host:P.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===f[0]?f[0]=e.host:f.unshift(e.host)),e.host=null),k=k&&(""===f[0]||""===P[0])),v)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,P=f;else if(f.length)P||(P=[]),P.pop(),P=P.concat(f),r.search=e.search,r.query=e.query;else if(!p.isNullOrUndefined(e.search)){if(T){r.hostname=r.host=P.shift();var w=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");w&&(r.auth=w.shift(),r.host=r.hostname=w.shift())}return r.search=e.search,r.query=e.query,p.isNull(r.pathname)&&p.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!P.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var x=P.slice(-1)[0],U=(r.host||e.host||P.length>1)&&("."===x||".."===x)||""===x,C=0,R=P.length;R>=0;R--)x=P[R],"."===x?P.splice(R,1):".."===x?(P.splice(R,1),C++):C&&(P.splice(R,1),C--);if(!k&&!j)for(;C--;C)P.unshift("..");!k||""===P[0]||P[0]&&"/"===P[0].charAt(0)||P.unshift(""),U&&"/"!==P.join("/").substr(-1)&&P.push("");var I=""===P[0]||P[0]&&"/"===P[0].charAt(0);if(T){r.hostname=r.host=I?"":P.length?P.shift():"";var w=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");w&&(r.auth=w.shift(),r.host=r.hostname=w.shift())}return k=k||r.host&&P.length,k&&!I&&P.unshift(""),P.length?r.pathname=P.join("/"):(r.pathname=null,r.path=null),p.isNull(r.pathname)&&p.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},a.prototype.parseHost=function(){var e=this.host,t=h.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";r(3),e.exports=r(4)},function(e,t){},function(e,t,r){"use strict";(function(t){function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}(),o=r(5),s=r(6),l=r(0),p={theme:"color",backendUrl:null,infoUrl:"http://ct.de/-2467514",infoDisplay:"blank",lang:"de",langFallback:"en",mailUrl:function(){var e=l.parse(this.getURL(),!0);return e.query.view="mail",delete e.search,l.format(e)},mailBody:function(){return this.getURL()},mediaUrl:null,orientation:"horizontal",buttonStyle:"standard",referrerTrack:null,services:["twitter","facebook","info"],title:t.document.title,twitterVia:null,flattrUser:null,flattrCategory:null,url:function(){var e=t.document.location.href,r=o("link[rel=canonical]").attr("href")||this.getMeta("og:url")||"";return r.length>0&&(r.indexOf("http")<0&&(r=0!==r.indexOf("//")?t.document.location.protocol+"//"+t.document.location.host+r:t.document.location.protocol+r),e=r),e}},u=function(){function e(t,r){var n=this;a(this,e),this.element=t,o(t).empty(),this.options=o.extend({},p,r,o(t).data()),this.services=Object.keys(s).filter(function(e){return n.isEnabledService(e)}).sort(function(e,t){var r=n.options.services;return r.indexOf(e)-r.indexOf(t)}).map(function(e){return s[e](n)}),this._addButtonList(),null!==this.options.backendUrl&&"icon"!==this.options.buttonStyle&&this.get
70Shares(this._updateCounts.bind(this))}return i(e,[{key:"isEnabledService",value:function(e){return this.options.services.indexOf(e)>-1}},{key:"$socialshareElement",value:function(){return o(this.element)}},{key:"getLocalized",value:function(e,t){return"object"===n(e[t])?void 0===e[t][this.options.lang]?e[t][this.options.langFallback]:e[t][this.options.lang]:"string"==typeof e[t]?e[t]:void 0}},{key:"getMeta",value:function(e){return o('meta[name="'+e+'"],[property="'+e+'"]').attr("content")||""}},{key:"getInfoUrl",value:function(){return this.options.infoUrl}},{key:"getInfoDisplayPopup",value:function(){return"popup"===this.options.infoDisplay}},{key:"getInfoDisplayBlank",value:function(){return"popup"!==this.options.infoDisplay&&"self"!==this.options.infoDisplay}},{key:"getURL",value:function(){return this.getOption("url")}},{key:"getOption",value:function(e){var t=this.options[e];return"function"==typeof t?t.call(this):t}},{key:"getTitle",value:function(){var e=this.getOption("title");if(o(this.element).data().title)return e;e=e||this.getMeta("DC.title");var t=this.getMeta("DC.creator");return e&&t?e+" - "+t:e}},{key:"getReferrerTrack",value:function(){return this.options.referrerTrack||""}},{key:"getShares",value:function(e){var t=l.parse(this.options.backendUrl,!0);return t.query.url=this.getURL(),delete t.search,o.getJSON(l.format(t),e)}},{key:"_updateCounts",value:function(e,t,r){var a=this;e&&o.each(e,function(e,t){a.isEnabledService(e)&&(t>=1e3&&(t=Math.round(t/1e3)+"k"),o(a.element).find("."+e+" a").append(o("<span/>").addClass("share_count").text(t)))})}},{key:"_addButtonList",value:function(){var e=this,r=o("<ul/>").addClass(["theme-"+this.options.theme,"orientation-"+this.options.orientation,"button-style-"+this.options.buttonStyle,"shariff-col-"+this.options.services.length].join(" "));this.services.forEach(function(t){var a=o("<li/>").addClass("shariff-button "+t.name),n=o("<a/>").attr("href",t.shareUrl);if("standard"===e.options.buttonStyle){var i=o("<span/>").addClass("share_text").text(e.getLocalized(t,"shareText"));n.append(i)}void 0!==t.faPrefix&&void 0!==t.faName&&n.prepend(o("<span/>").addClass(t.faPrefix+" "+t.faName)),t.popup?(n.attr("data-rel","popup"),"info"!==t.name&&n.attr("rel","nofollow")):t.blank?(n.attr("target","_blank"),"info"===t.name?n.attr("rel","noopener noreferrer"):n.attr("rel","nofollow noopener noreferrer")):"info"!==t.name&&n.attr("rel","nofollow"),n.attr("title",e.getLocalized(t,"title")),n.attr("role","button"),n.attr("aria-label",e.getLocalized(t,"title")),a.append(n),r.append(a)}),r.on("click",'[data-rel="popup"]',function(e){e.preventDefault();var r=o(this).attr("href");if(r.match(/twitter\.com\/intent\/(\w+)/)){var a=t.window;if(a.__twttr&&a.__twttr.widgets&&a.__twttr.widgets.loaded)return}t.window.open(r,"_blank","width=600,height=460")}),this.$socialshareElement().append(r)}}]),e}();e.exports=u,t.Shariff=u,o(function(){o(".shariff").each(function(){this.hasOwnProperty("shariff")||(this.shariff=new u(this))})})}).call(t,r(1))},function(e,t){e.exports=jQuery},function(e,t,r){"use strict";e.exports={addthis:r(7),buffer:r(8),diaspora:r(9),facebook:r(16),flattr:r(17),flipboard:r(18),info:r(19),linkedin:r(20),mail:r(21),pinterest:r(22),pocket:r(23),print:r(24),qzone:r(25),reddit:r(26),stumbleupon:r(27),telegram:r(28),tencent:r(29),threema:r(30),tumblr:r(31),twitter:r(32),vk:r(33),weibo:r(34),whatsapp:r(35),xing:r(36)}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"addthis",faPrefix:"fas",faName:"fa-plus",title:{bg:"Сподели в AddThis",cs:"Sdílet na AddThis",da:"Del på AddThis",de:"Bei AddThis teilen",en:"Share on AddThis",es:"Compartir en AddThis",fi:"Jaa AddThisissä",fr:"Partager sur AddThis",hr:"Podijelite na AddThis",hu:"Megosztás AddThisen",it:"Condividi su AddThis",ja:"AddThis上で共有",ko:"AddThis에서 공유하기",nl:"Delen op AddThis",no:"Del på AddThis",pl:"Udostępnij przez AddThis",pt:"Compartilhar no AddThis",ro:"Partajează pe AddThis",ru:"Поделиться на AddThis",sk:"Zdieľať na AddThis",sl:"Deli na AddThis",sr:"Podeli na AddThis",sv:"Dela på AddThis",tr:"AddThis'ta payla
70ş",zh:"在AddThis上分享"},shareUrl:"http://api.addthis.com/oexchange/0.8/offer?url="+encodeURIComponent(e.getURL())+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL());return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"buffer",faPrefix:"fab",faName:"fa-buffer",title:{bg:"Сподели в buffer",cs:"Sdílet na buffer",da:"Del på buffer",de:"Bei buffer teilen",en:"Share on buffer",es:"Compartir en buffer",fi:"Jaa bufferissä",fr:"Partager sur buffer",hr:"Podijelite na buffer",hu:"Megosztás bufferen",it:"Condividi su buffer",ja:"buffer上で共有",ko:"buffer에서 공유하기",nl:"Delen op buffer",no:"Del på buffer",pl:"Udostępnij przez buffer",pt:"Compartilhar no buffer",ro:"Partajează pe buffer",ru:"Поделиться на buffer",sk:"Zdieľať na buffer",sl:"Deli na buffer",sr:"Podeli na buffer",sv:"Dela på buffer",tr:"buffer'ta paylaş",zh:"在buffer上分享"},shareUrl:"https://buffer.com/add?text="+encodeURIComponent(e.getTitle())+"&url="+t+e.getReferrerTrack()}}},function(e,t,r){"use strict";var a=r(0);e.exports=function(e){var t=a.parse("https://share.diasporafoundation.org/",!0);return t.query.url=e.getURL(),t.query.title=e.getTitle(),t.protocol="https",delete t.search,{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"diaspora",faPrefix:"fas",faName:"fa-asterisk",title:{bg:"Сподели в diaspora*",cs:"Sdílet na diaspora*",da:"Del på diaspora*",de:"Bei diaspora* teilen",en:"Share on diaspora*",es:"Compartir en diaspora*",fi:"Jaa Diasporaissä",fr:"Partager sur diaspora*",hr:"Podijelite na diaspora*",hu:"Megosztás diaspora*",it:"Condividi su diaspora*",ja:"diaspora*上で共有",ko:"diaspora*에서 공유하기",nl:"Delen op diaspora*",no:"Del på diaspora*",pl:"Udostępnij przez diaspora*",pt:"Compartilhar no diaspora*",ro:"Partajează pe diaspora*",ru:"Поделиться на diaspora*",sk:"Zdieľať na diaspora*",sl:"Deli na diaspora*",sr:"Podeli na diaspora*-u",sv:"Dela på diaspora*",tr:"diaspora*'ta paylaş",zh:"分享至diaspora*"},shareUrl:a.format(t)+e.getReferrerTrack()}}},function(e,t,r){(function(e,a){var n;!function(a){function i(e){throw new RangeError(I[e])}function o(e,t){for(var r=e.length,a=[];r--;)a[r]=t(e[r]);return a}function s(e,t){var r=e.split("@"),a="";return r.length>1&&(a=r[0]+"@",e=r[1]),e=e.replace(R,"."),a+o(e.split("."),t).join(".")}function l(e){for(var t,r,a=[],n=0,i=e.length;n<i;)t=e.charCodeAt(n++),t>=55296&&t<=56319&&n<i?(r=e.charCodeAt(n++),56320==(64512&r)?a.push(((1023&t)<<10)+(1023&r)+65536):(a.push(t),n--)):a.push(t);return a}function p(e){return o(e,function(e){var t="";return e>65535&&(e-=65536,t+=L(e>>>10&1023|55296),e=56320|1023&e),t+=L(e)}).join("")}function u(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:k}function h(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function d(e,t,r){var a=0;for(e=r?S(e/P):e>>1,e+=S(e/t);e>D*z>>1;a+=k)e=S(e/D);return S(a+(D+1)*e/(e+y))}function c(e){var t,r,a,n,o,s,l,h,c,f,m=[],b=e.length,g=0,y=w,P=T;for(r=e.lastIndexOf(x),r<0&&(r=0),a=0;a<r;++a)e.charCodeAt(a)>=128&&i("not-basic"),m.push(e.charCodeAt(a));for(n=r>0?r+1:0;n<b;){for(o=g,s=1,l=k;n>=b&&i("invalid-input"),h=u(e.charCodeAt(n++)),(h>=k||h>S((v-g)/s))&&i("overflow"),g+=h*s,c=l<=P?j:l>=P+z?z:l-P,!(h<c);l+=k)f=k-c,s>S(v/f)&&i("overflow"),s*=f;t=m.length+1,P=d(g-o,t,0==o),S(g/t)>v-y&&i("overflow"),y+=S(g/t),g%=t,m.splice(g++,0,y)}return p(m)}function f(e){var t,r,a,n,o,s,p,u,c,f,m,b,g,y,P,U=[];for(e=l(e),b=e.length,t=w,r=0,o=T,s=0;s<b;
70++s)(m=e[s])<128&&U.push(L(m));for(a=n=U.length,n&&U.push(x);a<b;){for(p=v,s=0;s<b;++s)(m=e[s])>=t&&m<p&&(p=m);for(g=a+1,p-t>S((v-r)/g)&&i("overflow"),r+=(p-t)*g,t=p,s=0;s<b;++s)if(m=e[s],m<t&&++r>v&&i("overflow"),m==t){for(u=r,c=k;f=c<=o?j:c>=o+z?z:c-o,!(u<f);c+=k)P=u-f,y=k-f,U.push(L(h(f+P%y,0))),u=S(P/y);U.push(L(h(u,0))),o=d(r,g,a==n),r=0,++a}++r,++t}return U.join("")}function m(e){return s(e,function(e){return U.test(e)?c(e.slice(4).toLowerCase()):e})}function b(e){return s(e,function(e){return C.test(e)?"xn--"+f(e):e})}var g,v=("object"==typeof t&&t&&t.nodeType,"object"==typeof e&&e&&e.nodeType,2147483647),k=36,j=1,z=26,y=38,P=700,T=72,w=128,x="-",U=/^xn--/,C=/[^\x20-\x7E]/,R=/[\x2E\u3002\uFF0E\uFF61]/g,I={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},D=k-j,S=Math.floor,L=String.fromCharCode;g={version:"1.4.1",ucs2:{decode:l,encode:p},decode:c,encode:f,toASCII:b,toUnicode:m},void 0!==(n=function(){return g}.call(t,r,t,e))&&(e.exports=n)}()}).call(t,r(11)(e),r(1))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,r){"use strict";t.decode=t.parse=r(14),t.encode=t.stringify=r(15)},function(e,t,r){"use strict";function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,i){t=t||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var l=1e3;i&&"number"==typeof i.maxKeys&&(l=i.maxKeys);var p=e.length;l>0&&p>l&&(p=l);for(var u=0;u<p;++u){var h,d,c,f,m=e[u].replace(s,"%20"),b=m.indexOf(r);b>=0?(h=m.substr(0,b),d=m.substr(b+1)):(h=m,d=""),c=decodeURIComponent(h),f=decodeURIComponent(d),a(o,c)?n(o[c])?o[c].push(f):o[c]=[o[c],f]:o[c]=f}return o};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,r){"use strict";function a(e,t){if(e.map)return e.map(t);for(var r=[],a=0;a<e.length;a++)r.push(t(e[a],a));return r}var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,s){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?a(o(e),function(o){var s=encodeURIComponent(n(o))+r;return i(e[o])?a(e[o],function(e){return s+encodeURIComponent(n(e))}).join(t):s+encodeURIComponent(n(e[o]))}).join(t):s?encodeURIComponent(n(s))+r+encodeURIComponent(n(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"facebook",faPrefix:"fab",faName:"fa-facebook-f",title:{bg:"Сподели във Facebook",cs:"Sdílet na Facebooku",da:"Del på Facebook",de:"Bei Facebook teilen",en:"Share on Facebook",es:"Compartir en Facebook",fi:"Jaa Facebookissa",fr:"Partager sur Facebook",hr:"Podijelite na Facebooku",hu:"Megosztás Facebookon",it:"Condividi su Facebook",ja:"フェイスブック上で共有",ko:"페이스북에서 공유하기",nl:"Delen op Facebook",no:"Del på Facebook",pl:"Udostępnij na Facebooku",pt:"Compartilhar no Facebook",ro:"Partajează pe Facebook",ru:"Поделиться на Facebook",sk:"Zdieľať na Facebooku",sl:"Deli na Facebooku",sr:"Podeli na Facebook-u",sv:"Dela på Facebook",tr:"Facebook'ta payla
70ş",zh:"在Facebook上分享"},shareUrl:"https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(e.getURL())+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL()),r=e.getTitle(),a=e.getMeta("description");return{popup:!0,shareText:"Flattr",name:"flattr",faPrefix:"far",faName:"fa-money-bill-alt",title:{de:"Artikel flattrn",en:"Flattr this"},shareUrl:"https://flattr.com/submit/auto?title="+encodeURIComponent(r)+"&description="+encodeURIComponent(a)+"&category="+encodeURIComponent(e.options.flattrCategory||"text")+"&user_id="+encodeURIComponent(e.options.flattrUser)+"&url="+t+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL());return{popup:!0,shareText:"flip it",name:"flipboard",faPrefix:"fab",faName:"fa-flipboard",title:{bg:"Сподели в Flipboard",cs:"Sdílet na Flipboardu",da:"Del på Flipboard",de:"Bei Flipboard teilen",en:"Share on Flipboard",es:"Compartir en Flipboard",fi:"Jaa Flipboardissä",fr:"Partager sur Flipboard",hr:"Podijelite na Flipboardu",hu:"Megosztás Flipboardon",it:"Condividi su Flipboard",ja:"Flipboard上で共有",ko:"Flipboard에서 공유하기",nl:"Delen op Flipboard",no:"Del på Flipboard",pl:"Udostępnij na Flipboardu",pt:"Compartilhar no Flipboard",ro:"Partajează pe Flipboard",ru:"Поделиться на Flipboard",sk:"Zdieľať na Flipboardu",sl:"Deli na Flipboardu",sr:"Podeli na Flipboard-u",sv:"Dela på Flipboard",tr:"Flipboard'ta paylaş",zh:"在Flipboard上分享"},shareUrl:"https://share.flipboard.com/bookmarklet/popout?v=2&title="+encodeURIComponent(e.getTitle())+"&url="+t+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{blank:e.getInfoDisplayBlank(),popup:e.getInfoDisplayPopup(),shareText:"Info",name:"info",faPrefix:"fas",faName:"fa-info",title:{bg:"Повече информация",cs:"Více informací",da:"Flere oplysninger",de:"Weitere Informationen",en:"More information",es:"Más informaciones",fi:"Lisätietoja",fr:"Plus d'informations",hr:"Više informacija",hu:"Több információ",it:"Maggiori informazioni",ja:"詳しい情報",ko:"추가 정보",nl:"Verdere informatie",no:"Mer informasjon",pl:"Więcej informacji",pt:"Mais informações",ro:"Mai multe informatii",ru:"Больше информации",sk:"Viac informácií",sl:"Več informacij",sr:"Više informacija",sv:"Mer information",tr:"Daha fazla bilgi",zh:"更多信息"},shareUrl:e.getInfoUrl()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL()),r=encodeURIComponent(e.getTitle());return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"mitteilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"シェア",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"distribuiți",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"linkedin",faPrefix:"fab",faName:"fa-linkedin-in",title:{bg:"Сподели в LinkedIn",cs:"Sdílet na LinkedIn",da:"Del på LinkedIn",de:"Bei LinkedIn teilen",en:"Share on LinkedIn",es:"Compartir en LinkedIn",fi:"Jaa LinkedInissä",fr:"Partager sur LinkedIn",hr:"Podijelite na LinkedIn",hu:"Megosztás LinkedInen",it:"Condividi su LinkedIn",ja:"LinkedIn上で共有",ko:"LinkedIn에서 공유하기",nl:"Delen op LinkedIn",no:"Del på LinkedIn",pl:"Udostępnij przez LinkedIn",pt:"Compartilhar no LinkedIn",ro:"Partajează pe LinkedIn",ru:"Поделиться на LinkedIn",sk:"Zdieľať na LinkedIn",sl:"Deli na LinkedIn",sr:"Podeli na LinkedIn-u",sv:"Dela på LinkedIn",tr:"LinkedIn'ta paylaş",zh:"在LinkedIn上分享"},shareUrl:"https://www.linkedin.com/shareArticle?mini=true&summary="+encodeURIComponent(e.getMeta("description"))+"&title="+r+"&url="+t}}},function(e,t,r){"use strict";e.exports=function(e){var t=e.getOption("mailUrl");return 0===t.indexOf("mailto:")&&(t+="?subject="+encodeURIComponent(e.getOption("mailSubject")||e.getTitle()),t+="&body="+encodeURIComponent(e.getOption("mailBody").replace(/\{url\}/i,e.getURL()))),{blank:0===t.indexOf("http"),popup:!1,shareText:{en:"mail",zh:"分享"},name:"mail",faPrefix:"fas",faName:"fa-envelope",title:{bg:"Изпрати по имейл",cs:"Poslat mailem",da:"Sende via e-mail",de:"Per E-Mail versenden",en:"Send by email",es:"Enviar por email",fi:"Lähetä sähköpostitse",fr:"Envoyer par courriel",hr:"Pošaljite emailom",hu:"Elküldés e-mailben",it:"Inviare via email",ja:"電子メールで送信",ko:"이메일로 보내기",nl:"Sturen via e-mail",no:"Send via epost",pl:"Wyślij e-mailem",pt:"Enviar por e-mail",ro:"Trimite prin e-mail",ru:"Отправить по эл. почте",sk:"Poslať e-mailom",sl:"Pošlji po elektronski pošti",sr:"Pošalji putem email-a",sv:"Skicka via e-post",tr:"E-posta ile gönder",zh:"通过电子邮件传送"},shareUrl:t}}},function(e,t,r){"use strict";var a=r(0);e.exports=function(e){var t=e.getTitle(),r=e.getMeta("DC.creator");r.length>0&&(t+=" - "+r);var n=e.getOption("mediaUrl");(!n||n.length<=0)&&(n=e.getMeta("og:image"));var i=a.parse("https://www.pinterest.com/pin/create/link/",!0);return i.query.url=e.getURL(),i.query.media=n,i.query.description=t,delete i.search,{popup:!0,shareText:"pin it",name:"pinterest",faPrefix:"fab",faName:"fa-pinterest-p",title:{bg:"Сподели в Pinterest",cs:"Přidat na Pinterest",da:"Del på Pinterest",de:"Bei Pinterest pinnen",en:"Pin it on Pinterest",es:"Compartir en Pinterest",fi:"Jaa Pinterestissä",fr:"Partager sur Pinterest",hr:"Podijelite na Pinterest",hu:"Megosztás Pinteresten",it:"Condividi su Pinterest",ja:"Pinterest上で共有",ko:"Pinterest에서 공유하기",nl:"Delen op Pinterest",no:"Del på Pinterest",pl:"Udostępnij przez Pinterest",pt:"Compartilhar no Pinterest",ro:"Partajează pe Pinterest",ru:"Поделиться на Pinterest",sk:"Zdieľať na Pinterest",sl:"Deli na Pinterest",sr:"Podeli na Pinterest-u",sv:"Dela på Pinterest",tr:"Pinterest'ta payla
70ş",zh:"分享至Pinterest"},shareUrl:a.format(i)+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL());return{popup:!0,shareText:"Pocket",name:"pocket",faPrefix:"fab",faName:"fa-get-pocket",title:{bg:"Запазване в Pocket",cs:"Uložit do Pocket",da:"Gem i Pocket",de:"In Pocket speichern",en:"Save to Pocket",es:"Guardar en Pocket",fi:"Tallenna kohtaan Pocket",fr:"Enregistrer dans Pocket",hr:"Spremi u Pocket",hu:'Mentés "Pocket"-be',it:"Salva in Pocket",ja:"「ポケット」に保存",ko:"Pocket에 저장",nl:"Opslaan in Pocket",no:"Lagre i Pocket",pl:"Zapisz w Pocket",pt:"Salvar em Pocket",ro:"Salvați în Pocket",ru:"Сохранить в Pocket",sk:"Uložiť do priečinka Pocket",sl:"Shrani v Pocket",sr:"Sačuvaj u Pocket",sv:"Spara till Pocket",tr:"Pocket e kaydet",zh:"保存到Pocket"},shareUrl:"https://getpocket.com/save?title="+encodeURIComponent(e.getTitle())+"&url="+t+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{name:"print",faPrefix:"fas",faName:"fa-print",popup:!1,shareText:{bg:"",cs:"tlačit",da:"",de:"drucken",en:"print",es:"impresión",fi:"",fr:"imprimer",hr:"",hu:"",it:"stampa",ja:"",ko:"",nl:"afdrukken",no:"",pl:"drukuj",pt:"",ro:"",ru:"Распечатать",sk:"",sl:"",sr:"",sv:"",tr:"",zh:""},title:{bg:"",cs:"tlačit",da:"",de:"drucken",en:"print",es:"impresión",fi:"",fr:"imprimer",hr:"",hu:"",it:"stampa",ja:"",ko:"",nl:"afdrukken",no:"",pl:"drukuj",pt:"",ro:"",ru:"Распечатать",sk:"",sl:"",sr:"",sv:"",tr:"",zh:""},shareUrl:"javascript:window.print();"}}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"qzone",faPrefix:"fab",faName:"fa-qq",title:{bg:"Сподели в Qzone",cs:"Sdílet na Qzone",da:"Del på Qzone",de:"Bei Qzone teilen",en:"Share on Qzone",es:"Compartir en Qzone",fi:"Jaa Qzoneissä",fr:"Partager sur Qzone",hr:"Podijelite na Qzone",hu:"Megosztás Qzone",it:"Condividi su Qzone",ja:"Qzone上で共有",ko:"Qzone에서 공유하기",nl:"Delen op Qzone",no:"Del på Qzone",pl:"Udostępnij przez Qzone",pt:"Compartilhar no Qzone",ro:"Partajează pe Qzone",ru:"Поделиться на Qzone",sk:"Zdieľať na Qzone",sl:"Deli na Qzone",sr:"Podeli na Qzone-u",sv:"Dela på Qzone",tr:"Qzone'ta paylaş",zh:"分享至QQ空间"},shareUrl:"http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+encodeURIComponent(e.getURL())+"&title="+e.getTitle()+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL()),r=encodeURIComponent(e.getTitle());return""!==r&&(r="&title="+r),{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"reddit",faPrefix:"fab",faName:"fa-reddit-alien",title:{bg:"Сподели в Reddit",cs:"Sdílet na Redditu",da:"Del på Reddit",de:"Bei Reddit teilen",en:"Share on Reddit",es:"Compartir en Reddit",fi:"Jaa Redditissä",fr:"Partager sur Reddit",hr:"Podijelite na Reddit",hu:"Megosztás Redditen",it:"Condividi su Reddit",ja:"Reddit上で共有",ko:"Reddit에서 공유하기",nl:"Delen op Reddit",no:"Del på Reddit",pl:"Udostępnij przez Reddit",pt:"Compartilhar no Reddit",ro:"Partajează pe Reddit",ru:"Поделиться на Reddit",sk:"Zdieľať na Reddit",sl:"Deli na Reddit",sr:"Podeli na Reddit-u",sv:"Dela på Reddit",tr:"Reddit'ta paylaş",zh:"分享至Reddit"},shareUrl:"https://reddit.com/submit?url="+t+r+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL()),r=encodeURIComponent(e.getTitle());return""!==r&&(r="&title="+r),{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"stumbleupon",faPrefix:"fab",faName:"fa-stumbleupon",title:{bg:"Сподели в Stumbleupon",cs:"Sdílet na Stumbleuponu",da:"Del på Stumbleupon",de
70:"Bei Stumbleupon teilen",en:"Share on Stumbleupon",es:"Compartir en Stumbleupon",fi:"Jaa Stumbleuponissä",fr:"Partager sur Stumbleupon",hr:"Podijelite na Stumbleupon",hu:"Megosztás Stumbleupon",it:"Condividi su Stumbleupon",ja:"Stumbleupon上で共有",ko:"Stumbleupon에서 공유하기",nl:"Delen op Stumbleupon",no:"Del på Stumbleupon",pl:"Udostępnij przez Stumbleupon",pt:"Compartilhar no Stumbleupon",ro:"Partajează pe Stumbleupon",ru:"Поделиться на Stumbleupon",sk:"Zdieľať na Stumbleupon",sl:"Deli na Stumbleupon",sr:"Podeli na Stumbleupon-u",sv:"Dela på Stumbleupon",tr:"Stumbleupon'ta paylaş",zh:"分享至Stumbleupon"},shareUrl:"https://www.stumbleupon.com/submit?url="+t+r+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"telegram",faPrefix:"fab",faName:"fa-telegram",title:{bg:"Сподели в Telegram",cs:"Sdílet na Telegramu",da:"Del på Telegram",de:"Bei Telegram teilen",en:"Share on Telegram",es:"Compartir en Telegram",fi:"Jaa Telegramissä",fr:"Partager sur Telegram",hr:"Podijelite na Telegram",hu:"Megosztás Telegramen",it:"Condividi su Telegram",ja:"Telegram上で共有",ko:"Telegram에서 공유하기",nl:"Delen op Telegram",no:"Del på Telegram",pl:"Udostępnij przez Telegram",pt:"Compartilhar no Telegram",ro:"Partajează pe Telegram",ru:"Поделиться на Telegram",sk:"Zdieľať na Telegram",sl:"Deli na Telegram",sr:"Podeli na Telegram-u",sv:"Dela på Telegram",tr:"Telegram'ta paylaş",zh:"在Telegram上分享"},shareUrl:"https://t.me/share/url?url="+encodeURIComponent(e.getURL())+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"tencent-weibo",faPrefix:"fab",faName:"fa-tencent-weibo",title:{bg:"Сподели в tencent weibo",cs:"Sdílet na tencent weibo",da:"Del på tencent weibo",de:"Bei tencent weibo teilen",en:"Share on tencent weibo",es:"Compartir en tencent weibo",fi:"Jaa tencent weiboissä",fr:"Partager sur tencent weibo",hr:"Podijelite na tencent weibo",hu:"Megosztás tencent weiboen",it:"Condividi su tencent weibo",ja:"Tencent weibo上で共有",ko:"Tencent weibo에서 공유하기",nl:"Delen op tencent weibo",no:"Del på tencent weibo",pl:"Udostępnij przez tencent weibo",pt:"Compartilhar no tencent weibo",ro:"Partajează pe tencent weibo",ru:"Поделиться на tencent weibo",sk:"Zdieľať na tencent weibo",sl:"Deli na tencent weibo",sr:"Podeli na tencent weibo-u",sv:"Dela på tencent weibo",tr:"Tencent weibo'ta paylaş",zh:"分享至腾讯微博"},shareUrl:"http://v.t.qq.com/share/share.php?url="+encodeURIComponent(e.getURL())+"&title="+e.getTitle()+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL()),r=e.getTitle();return{popup:!1,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"threema",faPrefix:"fas",faName:"fa-lock",title:{bg:"Сподели в Threema",cs:"Sdílet na Threema",da:"Del på Threema",de:"Bei Threema teilen",en:"Share on Threema",es:"Compartir en Threema",fi:"Jaa Threemaissä",fr:"Partager sur Threema",hr:"Podijelite na Threema",hu:"Megosztás Threemaen",it:"Condividi su Threema",ja:"Threema上で共有",ko:"Threema에서 공유하기",nl:"Delen op Threema",no:"Del på Threema",pl:"Udostępnij przez Threema",pt:"Compartilhar no Threema",ro:"Partajează pe Threema",ru:"Поделиться на Threema",sk:"Zdieľať na Threema",sl:"Deli na Threema",sr:"Podeli na Threema-u",sv:"Dela på Threema",tr:"Threema'ta payla
70ş",zh:"在Threema上分享"},shareUrl:"threema://compose?text="+encodeURIComponent(r)+"%20"+t+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"tumblr",faPrefix:"fab",faName:"fa-tumblr",title:{bg:"Сподели в tumblr",cs:"Sdílet na tumblru",da:"Del på tumblr",de:"Bei tumblr teilen",en:"Share on tumblr",es:"Compartir en tumblr",fi:"Jaa tumblrissä",fr:"Partager sur tumblr",hr:"Podijelite na tumblr",hu:"Megosztás tumblren",it:"Condividi su tumblr",ja:"tumblr上で共有",ko:"tumblr에서 공유하기",nl:"Delen op tumblr",no:"Del på tumblr",pl:"Udostępnij przez tumblr",pt:"Compartilhar no tumblr",ro:"Partajează pe tumblr",ru:"Поделиться на tumblr",sk:"Zdieľať na tumblr",sl:"Deli na tumblr",sr:"Podeli na tumblr-u",sv:"Dela på tumblr",tr:"tumblr'ta paylaş",zh:"在tumblr上分享"},shareUrl:"http://tumblr.com/widgets/share/tool?canonicalUrl="+encodeURIComponent(e.getURL())+e.getReferrerTrack()}}},function(e,t,r){"use strict";var a=r(0),n=function(e,t){var r=document.createElement("div"),a=document.createTextNode(e);r.appendChild(a);var n=r.textContent;if(n.length<=t)return e;var i=n.substring(0,t-1).lastIndexOf(" ");return n=n.substring(0,i)+"…"};e.exports=function(e){var t=a.parse("https://twitter.com/intent/tweet",!0),r=e.getTitle();return t.query.text=n(r,120),t.query.url=e.getURL(),null!==e.options.twitterVia&&(t.query.via=e.options.twitterVia),delete t.search,{popup:!0,shareText:{en:"tweet",ja:"のつぶやき",ko:"짹짹",ru:"твит",sr:"твеет",zh:"鸣叫"},name:"twitter",faPrefix:"fab",faName:"fa-twitter",title:{bg:"Сподели в Twitter",cs:"Sdílet na Twiiteru",da:"Del på Twitter",de:"Bei Twitter teilen",en:"Share on Twitter",es:"Compartir en Twitter",fi:"Jaa Twitterissä",fr:"Partager sur Twitter",hr:"Podijelite na Twitteru",hu:"Megosztás Twitteren",it:"Condividi su Twitter",ja:"ツイッター上で共有",ko:"트위터에서 공유하기",nl:"Delen op Twitter",no:"Del på Twitter",pl:"Udostępnij na Twitterze",pt:"Compartilhar no Twitter",ro:"Partajează pe Twitter",ru:"Поделиться на Twitter",sk:"Zdieľať na Twitteri",sl:"Deli na Twitterju",sr:"Podeli na Twitter-u",sv:"Dela på Twitter",tr:"Twitter'da paylaş",zh:"在Twitter上分享"},shareUrl:a.format(t)+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"vk",faPrefix:"fab",faName:"fa-vk",title:{bg:"Сподели във VK",cs:"Sdílet na VKu",da:"Del på VK",de
70:"Bei VK teilen",en:"Share on VK",es:"Compartir en VK",fi:"Jaa VKissa",fr:"Partager sur VK",hr:"Podijelite na VKu",hu:"Megosztás VKon",it:"Condividi su VK",ja:"フェイスブック上で共有",ko:"페이스북에서 공유하기",nl:"Delen op VK",no:"Del på VK",pl:"Udostępnij na VKu",pt:"Compartilhar no VK",ro:"Partajează pe VK",ru:"Поделиться на ВКонтакте",sk:"Zdieľať na VKu",sl:"Deli na VKu",sr:"Podeli na VK-u",sv:"Dela på VK",tr:"VK'ta paylaş",zh:"在VK上分享"},shareUrl:"https://vk.com/share.php?url="+encodeURIComponent(e.getURL())+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"weibo",faPrefix:"fab",faName:"fa-weibo",title:{bg:"Сподели в weibo",cs:"Sdílet na weibo",da:"Del på weibo",de:"Bei weibo teilen",en:"Share on weibo",es:"Compartir en weibo",fi:"Jaa weiboissä",fr:"Partager sur weibo",hr:"Podijelite na weibo",hu:"Megosztás weiboen",it:"Condividi su weibo",ja:"Weibo上で共有",ko:"Weibo에서 공유하기",nl:"Delen op weibo",no:"Del på weibo",pl:"Udostępnij przez weibo",pt:"Compartilhar no weibo",ro:"Partajează pe weibo",ru:"Поделиться на weibo",sk:"Zdieľať na weibo",sl:"Deli na weibo",sr:"Podeli na weibo-u",sv:"Dela på weibo",tr:"Weibo'ta paylaş",zh:"分享至新浪微博"},shareUrl:"http://service.weibo.com/share/share.php?url="+encodeURIComponent(e.getURL())+"&title="+e.getTitle()+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL()),r=e.getTitle();return{popup:!1,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"whatsapp",faPrefix:"fab",faName:"fa-whatsapp",title:{bg:"Сподели в Whatsapp",cs:"Sdílet na Whatsappu",da:"Del på Whatsapp",de:"Bei Whatsapp teilen",en:"Share on Whatsapp",es:"Compartir en Whatsapp",fi:"Jaa WhatsAppissä",fr:"Partager sur Whatsapp",hr:"Podijelite na Whatsapp",hu:"Megosztás WhatsAppen",it:"Condividi su Whatsapp",ja:"Whatsapp上で共有",ko:"Whatsapp에서 공유하기",nl:"Delen op Whatsapp",no:"Del på Whatsapp",pl:"Udostępnij przez WhatsApp",pt:"Compartilhar no Whatsapp",ro:"Partajează pe Whatsapp",ru:"Поделиться на Whatsapp",sk:"Zdieľať na Whatsapp",sl:"Deli na Whatsapp",sr:"Podeli na WhatsApp-u",sv:"Dela på Whatsapp",tr:"Whatsapp'ta paylaş",zh:"在Whatsapp上分享"},shareUrl:"whatsapp://send?text="+encodeURIComponent(r)+"%20"+t+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"xing",faPrefix:"fab",faName:"fa-xing",title:{bg:"Сподели в XING",cs:"Sdílet na XINGu",da:"Del på XING",de:"Bei XING teilen",en:"Share on XING",es:"Compartir en XING",fi:"Jaa XINGissä",fr:"Partager sur XING",hr:"Podijelite na XING",hu:"Megosztás XINGen",it:"Condividi su XING",ja:"XING上で共有",ko:"XING에서 공유하기",nl:"Delen op XING",no:"Del på XING",pl:"Udostępnij przez XING",pt:"Compartilhar no XING",ro:"Partajează pe XING",ru:"Поделиться на XING",sk:"Zdieľať na XING",sl:"Deli na XING",sr:"Podeli na XING-u",sv:"Dela på XING",tr:"XING'ta payla
70ş",zh:"分享至XING"},shareUrl:"https://www.xing.com/spi/shares/new?url="+encodeURIComponent(e.getURL())+e.getReferrerTrack()}}}]);
71$(() => newsFeedback.init());
72
73const newsFeedback = {
74    init() {
75        $('[data-toggle="tooltip"]').tooltip();
76        $('#news-feedback-widget').each((_, el) => this.initButtons($(el)));
77    },
78
79    initButtons(widget) {
80        const uid = widget.data('uid');
81        this.csrfToken = widget.data('ajax-token') || '';
82        this.highlight(widget, this.getStatus(uid));
83        this.ajaxUrl = widget.data('url') || '/?type=9090100';
84        this.languageUid = parseInt(widget.data('language-uid'), 10) || 0;
85
86        widget.find('button').on('click', (e) => {
87            e.preventDefault();
88            const btn = $(e.currentTarget);
89            if (btn.prop('disabled')) return;
90
91            const isLike = btn.hasClass('btn-like');
92            const current = this.getStatus(uid);
93            const next = current === (isLike ? 'like' : 'dislike') ? null : (isLike ? 'like' : 'dislike');
94            if (next === current) return;
95
96            widget.find('button').prop('disabled', true);
97
98            const commonOptions = {
99                widget,
100                uid,
101                btn,
102                next,
103                isLike,
104                current
105            };
106
107            if (isLike || current === 'dislike') {
108                this.sendFeedback(commonOptions);
109            } else {
110                this.showFeedbackDialog(commonOptions);
111            }
112        });
113    },
114
115    sendFeedback({ widget, uid, btn, next, isLike, current, text = '', onSuccess = () => {} }) {
116
117        $.post({
118            url: this.ajaxUrl,
119            method: 'POST',
120            contentType: 'application/json',
121            headers: {
122                'X-TYPO3-Token': this.csrfToken
123            },
124            data: JSON.stringify({
125                newsUid: uid,
126                type: next || 'reset',
127                btn: isLike ? 'like' : 'dislike',
128                hasStatus: current,
129                text: text,
130                languageUid: this.languageUid
131            })
132        })
133        .done(() => {
134            this.setStatus(uid, next);
135            this.highlight(widget, next);
136            this.tooltip(btn, btn.data('success-title'), 1500, btn.data('title-like'));
137            onSuccess();
138        })
139        .fail(xhr => {
140            let message = widget.data('error-message');
141            try {
142                const response = $.parseJSON(xhr.responseText);
143                if (response?.message) message = response.message;
144            } catch (_) {}
145            this.tooltip(btn, message, 5000, btn.data('title-like'));
146        })
147        .always(() => widget.find('button').prop('disabled', false));
148    },
149
150    showFeedbackDialog({ widget, uid, btn, next, isLike, current }) {
151        const modal = $(`#news-feedback-modal-${uid}`);
152        if (!modal.length) return;
153
154        const feedbackField = modal.find('[data-feedback-text]');
155        const submitBtn = modal.find('[data-send-feedback]');
156
157        // Falls bereits registriert: abmelden
158        submitBtn.off('click');
159        modal.off('hidden.bs.modal');
160
161        // Option 1: manuell über "Senden"-Button
162        submitBtn.on('click', () => {
163            modal.modal('hide');
164        });
165
166        // Option 2: automatisch beim Schließen speichern
167        modal.on('hidden.bs.modal', () => {
168            const feedbackText = feedbackField.val()?.trim();
169            this.sendFeedback({
170                widget,
171                uid,
172                btn,
173                next,
174                isLike,
175                current,
176                text: feedbackText,
177                onSuccess: () => {
178                    feedbackField.val('');
179                }
180            });
181        });
182
183        modal.modal('show');
184    },
185
186    getStatus(uid) {
187        return localStorage.getItem(`newsfeedback_${uid}`);
188    },
189
190    setStatus(uid, status) {
191        const key = `newsfeedback_${uid}`;
192        status ? localStorage.setItem(key, status) : localStorage.removeItem(key);
193    },
194
195    highlight(widget, status) {
196        widget.find('button').removeClass('active');
197        if (status) widget.find(`.btn-${status}`).addClass('active');
198    },
199
200    tooltip(btn, title, delay, fallback) {
201        btn.tooltip('dispose').tooltip({ title, trigger: 'manual' }).tooltip('show').blur();
202        setTimeout(() => {
203            btn.tooltip('dispose').tooltip({ title: fallback, trigger: 'hover focus' });
204        }, delay);
205    }
206};
207$(() => {
208    preloadFAFont.init();
209    siteFeedback.init();
210});
211
212const siteFeedback = {
213    init() {
214        const $w = $('#site-feedback-widget');
215        this.$w = $w;
216        this.$like = $w.find('.btn-like');
217        this.$dislike = $w.find('.btn-dislike');
218        this.$modal = $('#site-feedback-modal-' + $w.data('page-id'));
219        this.$form = this.$modal.find('form');
220        this.pageId = +$w.data('page-id');
221        this.ajaxUrl = $w.data('url') || '/?type=8090100';
222        this.token = $w.data('ajax-token') || '';
223        this.type = $w.data('record-type') || 'page';
224        this.id = +$w.data('record-id') || 0;
225        this.lang = +$w.data('language-uid') || 0;
226        this.key = `feedback-rating-${this.type}-${this.id}-${this.lang}`;
227        this.feedbackUid = null;
228        this.rating = null;
229        this.feedbackSent = false;
230        this.restore();
231        this.bind();
232    },
233
234    bind() {
235        this.$like.on('click', () => this.vote(5));
236        this.$dislike.on('click', () => this.vote(1));
237        this.$form.on('submit', e => {
238            e.preventDefault();
239            this.send({ showModal: true });
240        });
241        this.$modal.find('.btn-primary').on('click', e => {
242            e.preventDefault();
243            this.send({ showModal: true });
244        });
245        this.$form.find('input[type="checkbox"]').on('change', () => this.toggleSubmitButton());
246        this.$modal.on('hidden.bs.modal', () => this.resetPending());
247    },
248
249    vote(value) {
250        if (this.rating === value) return this.reset(value);
251        this.rating = value;
252        this.store();
253        this.mark(value);
254
255        if (value === 1) {
256            this.feedbackSent = false;
257            this.$modal.modal('show');
258            this.toggleSubmitButton();
259        } else {
260            this.disableButtons(60000); // Antispam
261            this.send({ showModal: false });
262            this.showThanks();
263        }
264    },
265
266    reset(prev) {
267        localStorage.removeItem(this.key);
268        this.rating = null;
269        this.feedbackUid = null;
270        this.mark(null);
271        this.ajax({ rating: prev, reset: true });
272        this.toggleMessage(true, '');
273    },
274
275    resetPending() {
276        if (this.rating === 1 && !this.feedbackSent) {
277            this.reset(1);
278        }
279        this.resetForm();
280        this.feedbackSent = false;
281    },
282
283    send({ showModal }) {
284        const data = {
285            pageId: this.pageId,
286            rating: this.rating,
287            recordType: this.type,
288            recordId: this.id,
289            languageUid: this.lang,
290            feedbackUid: this.feedbackUid,
291            aspects: this.$form.find('input[type="checkbox"]:checked').map((_, el) => el.value).get(),
292            topic: this.$form.find('textarea[name="topic"]').val() || ''
293        };
294        this.ajax(data, res => {
295            if (res?.feedbackUid) this.feedbackUid = res.feedbackUid;
296            this.feedbackSent = true;
297            if (showModal) {
298                this.$modal.modal('hide');
299                this.resetForm();
300                this.showThanks();
301                this.disableButtons(60000);
302            }
303        });
304    },
305
306    ajax(data, success) {
307        $.ajax({
308            url: this.ajaxUrl,
309            method: 'POST',
310            contentType: 'application/json',
311            headers: { 'X-TYPO3-Token': this.token },
312            data: JSON.stringify(data),
313            success,
314            error: () => console.warn('Feedback-Fehler')
315        });
316    },
317
318    mark(val) {
319        this.$like.add(this.$dislike).removeClass('active');
320        if (val === 5) this.$like.addClass('active');
321        if (val === 1) this.$dislike.addClass('active');
322    },
323
324    restore() {
325        const val = localStorage.getItem(this.key);
326        if (val === '5' || val === '1') {
327            this.rating = +val;
328            this.mark(this.rating);
329            this.showThanks();
330        }
331    },
332
333    store() {
334        localStorage.setItem(this.key, this.rating);
335    },
336
337    resetForm() {
338        this.$form.find('input[type="checkbox"]').prop('checked', false);
339        this.$form.find('textarea').val('');
340        this.toggleSubmitButton();
341    },
342
343    toggleSubmitButton() {
344        const anyChecked = this.$form.find('input[type="checkbox"]:checked').length > 0;
345        this.$modal.find('.btn-primary').prop('disabled', !anyChecked);
346    },
347
348    showThanks() {
349        const msg = this.$like.data('success-title') || 'Vielen Dank für Ihre Rückmeldung!';
350        this.toggleMessage(false, msg);
351    },
352
353    toggleMessage(showLabel, msg) {
354        const $m = $('#site-feedback-messages');
355        $m.find('.site-feedback-label').toggleClass('d-none', !showLabel);
356        $m.find('.site-feedback-message').text(msg).toggleClass('d-none', showLabel);
357    },
358
359    disableButtons(ms) {
360        this.$like.add(this.$dislike).prop('disabled', true);
361        setTimeout(() => this.$like.add(this.$dislike).prop('disabled', false), ms);
362    }
363};
364
365const preloadFAFont = {
366    init() {
367        const base = '/typo3conf/ext/zw_provider/Resources/Public/Fonts/Font-Awesome/webfonts/';
368        ['fa-solid-900.woff2', 'fa-brands-400.woff2', 'fa-light-300.woff2'].forEach((f, i) => {
369            const w = ['900', '400', '300'][i];
370            const font = new FontFace('Font Awesome', `url('${base}${f}') format('woff2')`, { weight: w });
371            font.load().then(loaded => document.fonts.add(loaded)).catch(e => console.warn('Font-Fehler:', e));
372        });
373    }
374};
375
376$(function() {
377    // AOS
378    if(typeof AOS !== 'undefined'){
379        AOS.init();
380    }
381
382    // @see objects below
383    breakpoints.init();
384    fixedHeaderHeight.init();
385    detectMobile.init();
386    containerHd.init();
387    mobileNavBt.init();
388    desktopNavBt.init();
389    hoverIntent.init();
390    eventCalendar.init();
391    toaster.init();
392    //datepicker.init();
393    responsiveimage.init();
394    searchbar.init();
395    autocomplete.init();
396    equalHeight.init();
397    choosen.init();
398    sidebar.init();
399    scrollToTop.init();
400    affixSidemenu.init();
401    autohide.init();
402    stickySubnav.init();
403    autoCollapseAccordion.init();
404    printFormButton.init();
405    backgroundOverlay.init();
406    powermailObj.init();
407    fixWrongParamsOnPagination.init();
408    productbox.init();
409    fancybox.init();
410    sectionJumpVisibility.init();
411    landingpageJumpMenu.init();
412    quickstartNav.init();
413    onpageNavigation.init();
414    weSetParams.init();
415    esNewsletter.init();
416    crNewsletter.init();
417    checkboxSwitch.init();
418    offcanvas.init();
419    telephoneLinkHandler.init();
420    modalLinks.init();
421    simpleNumberCounter.init();
422    powermailRandomSelect.init();
423    stickyOffset.init();
424    powermailMorestepEnhancements.init();
425});
426
427/**
428 * powermailMorestepEnhancements
429 *
430 * Erweiterung für Powermail-Morestep-Formulare (TYPO3) zur Verbesserung von Layout und UX.
431 *
432 * Ziel
433 * - Stabiler Morestep-Flow mit fixer Navigation, gleich hohen Steps und sauberem Scroll-Verhalten.
434 * - Optionale Step-Validierung beim Wechsel zwischen den Seiten (Next/Prev separat schaltbar).
435 *
436 * Technischer Ansatz
437 * - Powermail bindet Klick-Listener direkt an Buttons mit `data-powermail-morestep-show`.
438 *   Damit unsere Logik (Validierung, Mehrfachklick-Schutz, Progress-Animation) zuverlässig greift,
439 *   wird ein globaler Click-Listener im CAPTURE-Phase-Modus genutzt (document.addEventListener(..., true)).
440 *   So laufen wir vor den Powermail-Listenern.
441 *
442 * Step-Validierung
443 * - Powermail-Validation selbst arbeitet über Listener auf `input`, `change`, `blur`.
444 * - Für Felder im aktuellen Fieldset dispatchen wir Events, damit Powermail seine
445 *   Fehlerklassen (`.powermail_field_error`) und Fehlermeldungen (`ul.powermail-errors-list.filled`) setzt.
446 * - Danach prüfen wir im aktuellen Fieldset auf Fehler. Bei Fehlern:
447 *   - Stepwechsel wird verhindert
448 *   - Scroll zum ersten Fehler
449 *
450 * Voraussetzungen
451 * - jQuery muss verfügbar sein (Powermail-Kontext).
452 * - Markup entspricht Powermail-Morestep Struktur (Fieldsets `.powermail_fieldset`,
453 *   Navigation Buttons mit `data-powermail-morestep-show`).
454 */
455const powermailMorestepEnhancements = {
456
457    /**
458     * Konfigurationswerte (anpassbar)
459     */
460    config: {
461        /** Abstand (px) zwischen Step-Inhalt und fixer Navigation */
462        safeGap: 20,
463
464        /** Dauer (ms) der Progressbar-Animation nach Stepwechsel */
465        progressDuration: 350,
466
467        /**
468         * Step-Validierung beim Klick auf "weiter"
469         * true  = Stepwechsel nur, wenn aktueller Step valide
470         * false = keine Stepvalidierung beim Vorwärtsnavigieren
471         */
472        validateOnNext: true,
473
474        /**
475         * Step-Validierung beim Klick auf "zurück"
476         * true  = auch beim Rückwärtsnavigieren validieren (selten sinnvoll)
477         * false = rückwärts immer erlauben (Standard)
478         */
479        validateOnPrev: false,
480    },
481
482    /**
483     * Interner Zustand: blockiert parallel laufende Stepwechsel
484     * @type {boolean}
485     */
486    isSwitching: false,
487
488    /**
489     * Initialisierung:
490     * - findet `.pm-morestep-form` + zugehöriges `<form>`
491     * - cached Fieldsets
492     * - initiale Layoutberechnungen
493     * - Event-Bindings
494     *
495     * @returns {void}
496     */
497    init() {
498
499        this.$form = $('.pm-morestep-form').first();
500        if (!this.$form.length) return;
501
502        this.$nativeForm = this.$form.closest('form');
503        if (!this.$nativeForm.length) return;
504
505        this.$fieldsets = this.$form.find('.powermail_fieldset');
506        if (this.$fieldsets.length < 2) return;
507
508        this.$form.addClass('js-morestep-fixednav');
509
510        this.mergeLastStepButtons();
511        this.updateBottomPaddingStable();
512        this.recalcMinHeight();
513
514        this.bindEvents();
515    },
516
517    /**
518     * Event-Bindings:
519     * - Capturing-Click auf `data-powermail-morestep-show`:
520     *   Validierung (optional) + kontrollierter Stepwechsel
521     * - Resize: Layout neu berechnen (debounced)
522     *
523     * @returns {void}
524     */
525    bindEvents() {
526
527        document.addEventListener('click', (e) => {
528
529            const btn = e.target?.closest?.('[data-powermail-morestep-show]');
530            if (!btn) return;
531
532            // Unser synthetischer Klick darf Powermail durchlaufen
533            if (btn.dataset.pmBypass === '1') {
534                delete btn.dataset.pmBypass;
535                return;
536            }
537
538            if (this.isSwitching) {
539                e.preventDefault();
540                e.stopPropagation();
541                return;
542            }
543
544            const $btn = $(btn);
545            const targetIndex = parseInt(btn.getAttribute('data-powermail-morestep-show'), 10);
546            const $currentFieldset = $btn.closest('.powermail_fieldset');
547            const currentIndex = this.$fieldsets.index($currentFieldset);
548
549            // Wenn nicht interpretierbar -> Powermail normal arbeiten lassen
550            if (Number.isNaN(targetIndex) || currentIndex < 0) return;
551
552            const isForward = targetIndex > currentIndex;
553            const isBackward = targetIndex < currentIndex;
554
555            const mustValidate =
556                (isForward && this.config.validateOnNext) ||
557                (isBackward && this.config.validateOnPrev);
558
559            if (mustValidate && !this.validateFieldset($currentFieldset)) {
560                e.preventDefault();
561                e.stopPropagation();
562                return;
563            }
564
565            // Stepwechsel kontrolliert ausführen (Powermail nicht sofort laufen lassen)
566            e.preventDefault();
567            e.stopPropagation();
568
569            this.isSwitching = true;
570            this.toggleProgressAnimation(true);
571
572            setTimeout(() => {
573
574                // Powermail Stepwechsel auslösen
575                btn.dataset.pmBypass = '1';
576                btn.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }));
577
578                // Danach Layout/UX reparieren
579                setTimeout(() => {
580
581                    this.mergeLastStepButtons();
582                    this.updateBottomPaddingStable();
583                    this.recalcMinHeight();
584                    this.scrollToActiveStep();
585
586                    setTimeout(() => {
587                        this.toggleProgressAnimation(false);
588                        this.isSwitching = false;
589                    }, this.config.progressDuration);
590
591                }, 0);
592
593            }, 0);
594
595        }, true);
596
597        $(window).on(
598            'resize',
599            this.debounce(() => {
600                this.mergeLastStepButtons();
601                this.updateBottomPaddingStable();
602                this.recalcMinHeight();
603            }, 200)
604        );
605    },
606
607    /**
608     * Validiert alle Felder im übergebenen Fieldset.
609     *
610     * Umsetzung:
611     * - Dispatch von Events, die Powermail-Validation triggert:
612     *   - SELECT / CHECKBOX / RADIO: `change`
613     *   - Text/Email/etc.: `input` (plus optional `blur`)
614     * - Anschließend wird geprüft, ob Powermail Fehler markiert hat:
615     *   - `.powermail_field_error`
616     *   - `ul.powermail-errors-list.filled`
617     *
618     * @param {jQuery} $fs Das zu validierende Powermail-Fieldset
619     * @returns {boolean} true = keine Fehler, false = Fehler vorhanden
620     */
621    validateFieldset($fs) {
622
623        if (!$fs?.length) return true;
624
625        const $fields = $fs.find(
626            'input:not([data-powermail-validation="disabled"]):not([type="hidden"]):not([type="reset"]):not([type="submit"]), ' +
627            'textarea:not([data-powermail-validation="disabled"]), ' +
628            'select:not([data-powermail-validation="disabled"])'
629        );
630
631        $fields.each((_, el) => {
632            const tag = (el.tagName || '').toUpperCase();
633            const type = ((el.getAttribute('type') || '') + '').toLowerCase();
634
635            if (tag === 'SELECT' || type === 'checkbox' || type === 'radio') {
636                el.dispatchEvent(new Event('change', { bubbles: true }));
637            } else {
638                el.dispatchEvent(new Event('input', { bubbles: true }));
639                el.dispatchEvent(new Event('blur', { bubbles: false }));
640            }
641        });
642
643        const hasErrors =
644            $fs.find('.powermail_field_error').length > 0 ||
645            $fs.find('ul.powermail-errors-list.filled').length > 0;
646
647        if (hasErrors) {
648            this.scrollToFirstErrorInFieldset($fs);
649            return false;
650        }
651
652        return true;
653    },
654
655    /**
656     * Scrollt zum ersten sichtbaren Fehler im Fieldset.
657     *
658     * Priorität:
659     * 1) Element mit `.powermail_field_error` (sichtbar)
660     * 2) erste Fehlermeldung `ul.powermail-errors-list.filled` (sichtbar)
661     * 3) Fallback: Fieldset-Top
662     *
663     * @param {jQuery} $fs Fieldset
664     * @returns {void}
665     */
666    scrollToFirstErrorInFieldset($fs) {
667
668        const $target =
669            $fs.find('.powermail_field_error:visible').first().length
670                ? $fs.find('.powermail_field_error:visible').first()
671                : $fs.find('ul.powermail-errors-list.filled:visible').first();
672
673        const top = $target.length
674            ? Math.max(0, $target.offset().top - 20)
675            : Math.max(0, $fs.offset().top - 20);
676
677        window.scrollTo({ top, behavior: 'auto' });
678    },
679
680    /**
681     * Liefert das aktuell sichtbare Fieldset (display != 'none').
682     *
683     * Hinweis:
684     * Für Validierung nutzen wir bewusst nicht diese Methode,
685     * sondern das Fieldset des geklickten Buttons (robuster).
686     *
687     * @returns {jQuery}
688     */
689    getVisibleFieldset() {
690        return this.$fieldsets.filter(function () {
691            return $(this).css('display') !== 'none';
692        }).first();
693    },
694
695    /**
696     * Schaltet die Progressbar im aktuellen Step in den "animierten" Zustand.
697     *
698     * @param {boolean} isOn true = an, false = aus
699     * @returns {void}
700     */
701    toggleProgressAnimation(isOn) {
702
703        const $active = this.getVisibleFieldset();
704        const $bar = $active.find('.progress-bar');
705
706        if (!$bar.length) return;
707
708        $bar.toggleClass('progress-bar-striped progress-bar-animated', !!isOn);
709    },
710
711    /**
712     * Scrollt zum aktuell sichtbaren Fieldset (leicht nach oben versetzt),
713     * um "Sprünge" nach Stepwechsel zu vermeiden.
714     *
715     * @returns {void}
716     */
717    scrollToActiveStep() {
718
719        const $visible = this.getVisibleFieldset();
720        if (!$visible.length) return;
721
722        window.scrollTo({
723            top: Math.max(0, $visible.offset().top - 20),
724            behavior: 'auto'
725        });
726    },
727
728    /**
729     * Setzt min-height für alle Fieldsets auf die maximale Step-Höhe.
730     *
731     * Warum:
732     * - verhindert Layout-Jumps bei Stepwechsel (unterschiedliche Step-Höhen)
733     *
734     * Umsetzung:
735     * - Alle Fieldsets kurz "messbar" machen (display:block, hidden, absolute)
736     * - Maximalhöhe ermitteln
737     * - Original-Styles wiederherstellen
738     *
739     * @returns {void}
740     */
741    recalcMinHeight() {
742
743        const width = this.$form.width();
744        let max = 0;
745
746        this.$fieldsets.css('min-height', '');
747
748        this.$fieldsets.each(function () {
749            const $el = $(this);
750            $el.data('style', $el.attr('style') || '')
751                .css({ display: 'block', visibility: 'hidden', position: 'absolute', width });
752        });
753
754        this.$fieldsets.each(function () {
755            max = Math.max(max, $(this).outerHeight(true));
756        });
757
758        this.$fieldsets.each(function () {
759            const $el = $(this);
760            const old = $el.data('style');
761            old ? $el.attr('style', old) : $el.removeAttr('style');
762        });
763
764        this.$fieldsets.css('min-height', max);
765    },
766
767    /**
768     * Verschiebt im letzten Step den Submit-Button in die Navigation.
769     *
770     * Erwartete Struktur:
771     * - `.pm-morestep-page-3 .powermail_fieldset`
772     * - `.powermail_fieldwrap_send` (leer gerendertes Submit-Wrap)
773     * - `.powermail_tab_navigation` (Nav-Container)
774     *
775     * @returns {void}
776     */
777    mergeLastStepButtons() {
778
779        const $lastFieldset = this.$form.find('.pm-morestep-page-3 .powermail_fieldset');
780        if (!$lastFieldset.length) return;
781
782        const $sendWrap = $lastFieldset.find('.powermail_fieldwrap_send');
783        const $navWrap = $lastFieldset.find('.powermail_tab_navigation');
784        if (!$sendWrap.length || !$navWrap.length) return;
785
786        $navWrap.addClass('last-step');
787
788        const $submitBtn = $sendWrap.find('button[type="submit"].powermail_submit').first();
789        if (!$submitBtn.length) return;
790
791        const $navCol = $navWrap.find('> .col-12').first();
792        if (!$navCol.length) return;
793
794        if ($navCol.find('button[type="submit"].powermail_submit').length) return;
795
796        $submitBtn.prependTo($navCol);
797    },
798
799    /**
800     * Setzt ein stabiles padding-bottom auf alle Fieldsets,
801     * basierend auf der maximalen Navigation-Höhe.
802     *
803     * Warum:
804     * - Navigation ist (optisch) am unteren Rand fixiert
805     * - ohne Reserve würde Content darunter rutschen / überdeckt werden
806     *
807     * @returns {void}
808     */
809    updateBottomPaddingStable() {
810
811        this.$fieldsets.css('padding-bottom', '');
812        this.$fieldsets.find('> .powermail_tab_navigation').css('min-height', '');
813
814        let maxNavH = 0;
815
816        this.$fieldsets.each(function () {
817            const $nav = $(this).find('> .powermail_tab_navigation');
818            if (!$nav.length) return;
819            maxNavH = Math.max(maxNavH, $nav.outerHeight(true) || 0);
820        });
821
822        this.$fieldsets.each((_, el) => {
823            const $fs = $(el);
824            const $nav = $fs.find('> .powermail_tab_navigation');
825            if (!$nav.length) return;
826
827            $nav.css('min-height', maxNavH);
828            $fs.css('padding-bottom', maxNavH + this.config.safeGap);
829        });
830    },
831
832    /**
833     * Debounce: bündelt schnelle Aufrufe (z.B. resize) in einen.
834     *
835     * @param {Function} fn Callback
836     * @param {number} wait Delay in ms
837     * @returns {Function}
838     */
839    debounce(fn, wait) {
840
841        let t;
842
843        return () => {
844            clearTimeout(t);
845            t = setTimeout(fn, wait);
846        };
847    }
848};
849
850/**
851 * StickyOffset
852 *
853 * Berechnet dynamisch den `top`-Wert für `.sticky-lg-top`
854 * anhand der Höhe von `.header.fixed-top`.
855 *
856 * Aktiv nur ab Bootstrap Breakpoint lg (>= 992px).
857 */
858const stickyOffset = {
859    init() {
860        this.update();
861        $(window).on('resize orientationchange', () => this.update());
862    },
863
864    /**
865     * Ermittelt die aktuelle Header-Höhe
866     * und setzt den `top`-Wert der Sticky-Elemente.
867     */
868    update() {
869        // Wichtig: inline top entfernen, sonst überschreibt es CSS
870        $('.sticky-lg-top').css('top', '');
871
872        document.documentElement.style.setProperty(
873          '--header-offset',
874          window.innerWidth >= 992
875            ? `${Math.ceil(($('header.fixed-top')[0]?.getBoundingClientRect().height || 0) + 50)}px`
876            : '0px'
877        );
878    }
879};
880
881
882/**
883 * PowermailRandomSelect
884 *
885 * Randomisiert die Optionen eines Powermail-Select-Feldes,
886 * wobei die erste und letzte Option unverändert bleiben.
887 * Initialisierung erfolgt nur einmal und nur,
888 * wenn das Feld im DOM vorhanden ist.
889 */
890const powermailRandomSelect = {
891    init: function () {
892        const $select = jQuery('#powermail_field_referenz');
893        if (!$select.length || $select.data('randomized')) return;
894
895        const $options = $select.find('option');
896        if ($options.length < 3) return;
897
898        const currentValue = $select.val();                 // ✅ Auswahl merken
899        const hadFocus = document.activeElement === $select[0];
900
901        const middle = $options.slice(1, -1).toArray();
902
903        for (let i = middle.length - 1; i > 0; i--) {
904            const j = Math.floor(Math.random() * (i + 1));
905            [middle[i], middle[j]] = [middle[j], middle[i]];
906        }
907
908        $select.empty().append($options.first(), middle, $options.last());
909
910        // ✅ Firefox-Fix: Auswahl wiederherstellen (oder auf erste Option zwingen)
911        if (currentValue != null && $select.find(`option[value="${CSS.escape(String(currentValue))}"]`).length) {
912            $select.val(currentValue);
913        } else {
914            $select.prop('selectedIndex', 0);
915        }
916
917        // Optional: Fokus wieder korrekt setzen (nur wenn vorher Fokus drauf war)
918        if (hadFocus) $select.trigger('focus');
919
920        $select.data('randomized', true);
921    }
922};
923
924/**
925 * Stattet Telefonlinks auf Desktops mit einem Modal aus
926 */
927var telephoneLinkHandler = {
928    phonebtnSelector: '.col-person-info a.call[href^="tel"], .contact-cards-wrap .person-contakt .item.phone a.phone[href^="tel"]',
929    init: function() {
930        if($(this.phonebtnSelector).length) {
931            if(!detectMobile.isMobile) {
932                $(this.phonebtnSelector).each(function() {
933                    const $callbtn = $(this);
934                    $callbtn.attr('rel', 'modal');
935                    $callbtn.attr('href', $callbtn.attr('href').replace(/tel/, 'notel'));
936                });
937            }
938        }
939    }
940};
941
942var modalLinks = {
943    init: function() {
944        $('[rel=modal]').each(function() {
945            $(this).click(function(e) {
946                e.preventDefault();
947                if(e.currentTarget.href.match(/tel:/)) {
948                    modalLinks.phoneContent(e.currentTarget, '#page-modal-popup');
949                }
950                $('#page-modal-popup').modal('show');
951                return false;
952            });
953        });
954    },
955    phoneContent: function(target, modalId) {
956        var person = {
957            name: $(target).data('personname'),
958            title: $(target).data('persontitle'),
959            phonenumber: $(target).data('personphone'),
960            phoneshort: $(target).data('phoneshort')
961        };
962
963        //var modal = $(modalId).html().replace(/#name#/, person.name);
964        $(modalId + ' #modal-personname').text(person.name);
965        $(modalId + ' #modal-phonenumber').text(person.phonenumber);
966        $(modalId + ' #modal-phonenumberlink').attr('href', 'tel:' + person.phoneshort);
967        $(modalId + ' #modal-phonenumberlink').attr('title', person.title);
968        modalLinks.copyFunction(modalId, person.phoneshort);
969        $(modalId).modal('show');
970    },
971    copyFunction: function(modalId, phoneshort) {
972        $(modalId).find('.fa-copy').on('click', function() {
973            if(navigator.clipboard) {
974                navigator.clipboard.writeText(phoneshort).then(function() {
975                    var icon = $(modalId).find('.fa-copy');
976                    icon.attr('title', icon.data('title')).tooltip('show');
977                }, function(err) {
978                    console.log('Could not copy phone number', err);
979                });
980            }
981        });
982    }
983};
984
985var offcanvas = {
986    selector: '.bs-canvas',
987    selectorButton: '#offcanvas-toggler',
988    selectorCloseButton: '.bs-canvas-close',
989    selectorOverlay: '.bs-canvas-overlay',
990    init: function() {
991        if(this.selector.length) {
992            var _this = this;
993            $(this.selectorButton).on('click.offcanvasCloase', function(e) {
994                e.preventDefault();
995                _this.open();
996            });
997        }
998    },
999    open: function() {
1000        var _this = this;
1001        $('body').prepend('<div class="bs-canvas-overlay bg-dark position-fixed w-100 h-100"></div>').addClass('no-bodyscroll');
1002        $('.bs-canvas-right').addClass('mr-0');
1003
1004        $(this.selectorOverlay + ', ' + this.selectorCloseButton).on('click.offcanvasOverlay', function(e) {
1005            e.preventDefault();
1006            _this.close();
1007        });
1008
1009        return false;
1010    },
1011    close: function() {
1012        var elm = $(this.selector);
1013        elm.removeClass('mr-0 ml-0');
1014        $('.bs-canvas-overlay').remove();
1015        $('body').removeClass('no-bodyscroll');
1016        $(this.selectorOverlay + ', ' + this.selectorCloseButton).off('click.offcanvasOverlay');
1017        return false;
1018    }
1019};
1020
1021/**
1022 *
1023 * EasyAutocomplete Autocomplete search field
1024 *
1025 * @see http://easyautocomplete.com/
1026 *
1027 * @type object
1028 */
1029var autocomplete = {
1030    selectorSearchFieldNavigationDesktop: '#sword-dt',
1031    selectorSearchFieldNavigationMobile: '#sword-mb',
1032    selectorSearchField: '#ke_search_sword',
1033    selectorSearchForm: 'form#form_kesearch_pi1',
1034    searchUrl: '/index.php?eID=keSearchPremiumAutoComplete',
1035    init: function() {
1036        if($.fn.easyAutocomplete !== 'undefined') {
1037            this.initAc(this.selectorSearchField);
1038            this.initAc(this.selectorSearchFieldNavigationDesktop);
1039            this.initAc(this.selectorSearchFieldNavigationMobile);
1040        }
1041        if($(this.selectorSearchField).length) {
1042            this.focusSearch(this.selectorSearchField);
1043        }
1044    },
1045    initAc: function(selector) {
1046        if($(selector).length) {
1047            var options = {
1048                url: function(wordStartsWith) {
1049                    return autocomplete.searchUrl;
1050                },
1051                getValue: function(element) {
1052                    return element.value;
1053                },
1054                ajaxSettings: {
1055                    dataType: "json",
1056                    method: "GET",
1057                    data: {
1058                        amount: 10,
1059                        pid: 1
1060                    }
1061                },
1062                preparePostData: function(data) {
1063                    data.wordStartsWith = $(selector).val();
1064                    return data;
1065                },
1066                list: {
1067                    onChooseEvent: function (e) {
1068                        $(selector).closest("form").submit();
1069                    }
1070                },
1071                requestDelay: 250,
1072                minCharNumber: 1,
1073                adjustWidth: false,
1074                cssClasses: ' col px-0'
1075            };
1076            $(selector).easyAutocomplete(options);
1077        }
1078    },
1079    focusSearch: function(selector) {
1080        setTimeout(function(){
1081            // Set Focus After Last Character in Text Box
1082            var num = $(selector).val();
1083            $(selector).focus().val('').val(num);
1084        }, 500);
1085    }
1086};
1087
1088/**
1089 * flatpickr v4.x
1090 *
1091 * @link    https://flatpickr.js.org/
1092 * @type    object
1093 */
1094var flatpickrLib = {
1095    selector: 'input.datepicker',
1096    options: {
1097        dateFormat: null,
1098        mode: null,
1099        disableMobile: false,
1100        allowInput: true,
1101        onOpen: null,
1102        onClose: null
1103    },
1104    init: function(lang) {
1105        if(typeof $.fn.flatpickr !== 'undefined' && $(flatpickrLib.selector).length) {
1106            this.options.mode       = $(this.selector).first().data('datepicker-mode') ? $(this.selector).first().data('datepicker-mode') : 'single';
1107            this.options.dateFormat = $(this.selector).first().data('datepicker-format') ? $(this.selector).first().data('datepicker-format') : 'd.m.Y';
1108            this.options.onOpen     = function(selDate, dateStr, instance) {
1109                if(detectMobile.isMobile) {
1110                    $(instance._input).attr('readonly', 'readonly');
1111                }
1112            };
1113            this.options.onClose = function(selDate, dateStr, instance) {
1114                instance._input.blur();
1115            };
1116
1117            if(lang != 'en') {
1118                var localize = eval('flatpickr.l10ns.'+lang);
1119                flatpickr.localize(localize);
1120            }
1121            var _this = this;
1122            $(this.selector).each(function(){
1123                $(this).flatpickr(_this.options);
1124            });
1125        }
1126    }
1127};
1128
1129/**
1130 *
1131 * @type object
1132 */
1133var onpageNavigation = {
1134    selector: '#onpagenavigation',
1135    selectorTitle: '.quicknav-titel',
1136    init: function() {
1137        if($(this.selector).length && $(this.selectorTitle).length) {
1138            this.collectHeadlines();
1139        }
1140    },
1141    collectHeadlines: function() {
1142        var _this = this;
1143        var collect = '';
1144        var ctn = 0;
1145        $('body ' + this.selectorTitle).each(function(){
1146            var id = '';
1147            if($(this).attr('id')) {
1148                id = $(this).attr('id');
1149            }
1150            else {
1151                id = $(this).closest('div[id]').attr('id');
1152            }
1153            collect += '<li><a href="#'+ id +'" class="quickstart-nav-link"><span class="quicknav-icon"><i class="far fa-arrow-down"></i></span><spann class="quicknav-link-text">' + $.trim($(this).text()) + '</span></a></li>';
1154            ctn++;
1155        });
1156        if(collect.length) {
1157            $(this.selector).removeClass('d-none');
1158            $(this.selector + ' ul').append(collect);
1159            setTimeout(function() {
1160                $(_this.selector).addClass('is-present');
1161            }, '500');
1162            sectionJumpVisibility.selector = this.selector;
1163            sectionJumpVisibility.init();
1164        }
1165    }
1166};
1167
1168/**
1169 *
1170 * @type object
1171 */
1172var quickstartNav = {
1173    selector: '#quickstartnav',
1174    selectorToggleBtn: '.toggle-btn',
1175    isMobile: false,
1176    breakpoint: 768, // Burgermenu breakpoint xl=1200, lg=992, md=768 (change it in quicknav Sass to)
1177    init: function() {
1178        if(!$(this.selector).hasClass('qsn-jb')) {
1179            this.collectHeadlines();
1180        }
1181        var _this = this;
1182
1183        $(this.selector + ' ' + this.selectorToggleBtn).click(function() {
1184            $(_this.selector).toggleClass('expanded');
1185            if(_this.isMobile) {
1186                autohide.hide();
1187            }
1188        });
1189
1190        $('.quickstart-nav-link').click(function() {
1191            if(_this.isMobile) {
1192                $(_this.selector + ' ' + _this.selectorToggleBtn).click();
1193            }
1194        });
1195
1196        this.checkQuickstartNav();
1197        this.onResize();
1198    },
1199    collectHeadlines: function() {
1200        var _this = this;
1201        var collect = '';
1202        var ctn = 0;
1203        $('body .quicknav-titel').each(function(){
1204            var id = '';
1205            if($(this).attr('id')) {
1206                id = $(this).attr('id');
1207            }
1208            else {
1209                id = $(this).closest('div[id]').attr('id');
1210            }
1211            var text = "";
1212            if(typeof $(this).data('quicknav-titel') !== 'undefined') {
1213                text = $(this).data('quicknav-titel');
1214            }
1215            else {
1216                text = $(this).text();
1217            }
1218            collect += '<li><a href="#'+ id +'" class="quickstart-nav-link">
1218' + text + '</a></li>';
1219            ctn++;
1220        });
1221        if(collect.length) {
1222            $(this.selector).removeClass('d-none');
1223            $(this.selector + ' ul').append(collect);
1224            setTimeout(function() {
1225                if(_this.isMobile) {
1226                    $(_this.selector).addClass('is-present');
1227                }
1228                else {
1229                    $(_this.selector).addClass('is-present expanded');
1230                }
1231            }, '500');
1232            sectionJumpVisibility.selector = this.selector;
1233            sectionJumpVisibility.init();
1234        }
1235        if (ctn < 2) {
1236            $(this.selector +  ' .toggle-btn-bg-lower').css('height', '36px');
1237        }
1238    },
1239    onResize: function () {
1240        var _this = this;
1241        $(window).on('resize.quickstartNav', (function() {
1242            _this.checkQuickstartNav();
1243        }));
1244    },
1245    offResize: function() {
1246        $(window).off('resize.quickstartNav');
1247    },
1248    checkQuickstartNav: function() {
1249        this.isMobileDevice();
1250        // Auto hidden black background layer
1251        if (this.isMobile && $(this.selector).hasClass('expanded')) {
1252            $(this.selectorToggleBtn).click();
1253        }
1254    },
1255    isMobileDevice: function() {
1256        if ($(window).width() <= this.breakpoint) {
1257            this.isMobile = true;
1258        }
1259        else {
1260            this.isMobile = false;
1261        }
1262    }
1263};
1264
1265/**
1266 * scroll after jump, to make the target visible (under fixed menu)
1267 */
1268var sectionJumpVisibility = {
1269    selector: 'main, .buehne .gridcontainer',
1270    init: function() {
1271        // get links with section hash
1272        if($(this.selector).find('a[href^="#"][rel!="modal"]').length) {
1273            $(this.selector).find('a[href^="#"]:not([href="#"], [rel="modal"])').each(function() {
1274                $(this).on('click', function(e) {
1275                    e.preventDefault();
1276                    var href = $(this).attr('href').match(/#\w+$/);
1277                    if(href && href.length) var target = href[0];
1278                    else var target = '';
1279                    var header = $('header').outerHeight() + 10;
1280                    if($(target).length) {
1281                        var top = $(target).offset().top - header;
1282                        var topicnavi = $('.container-topicnavi').length ? $('.container-topicnavi').outerHeight() : 0;
1283                        $('html,body').animate({ scrollTop: (top - topicnavi) +'px' }, 750);
1284                    }
1285                    if($('.nav-jump-menu-collapse.collapse').hasClass('show')) {
1286                        $('.nav-jump-menu-collapse.collapse').collapse('toggle');
1287                    }
1288                });
1289            });
1290        }
1291        if(location.hash.length) {
1292            this.makeRoom();
1293        }
1294    },
1295    makeRoom: function(am) {
1296        //return;
1297        if(typeof am === 'undefined'){
1298             am = 10;
1299        }
1300        var amount = $('header').outerHeight();
1301        var topicnavi = $('.container-topicnavi').length ? $('.container-topicnavi').outerHeight() : 0;
1302        var searchStr = decodeURI(window.location);
1303        if(am) amount = amount + am;
1304        if(searchStr.indexOf('tx_powermail_pi1') > 0) {
1305            amount = amount + 120;
1306        }
1307        if(searchStr.indexOf('tx_powermail_pi1[field][ismodal]=1') > 0) {
1308            $('.pageshortform-modal').modal('show');
1309        }
1310        if(location.hash != '#sc_inspector') {
1311            setTimeout(function() {
1312                $(window).scrollTop($(location.hash).offset().top - (amount + topicnavi));
1313            }, '300');
1314        }
1315    }
1316};
1317
1318/**
1319 *
1320 * @type object
1321 */
1322var landingpageJumpMenu = {
1323    selector: '.navbar-nav.landingpage-navigation li',
1324    init: function() {
1325        // get links with section hash
1326        if($(this.selector).find('a[href^="#"][rel!="modal"]').length) {
1327            $(this.selector).find('a[href^="#"][rel!="modal"]').each(function() {
1328                $(this).on('click', function(e) {
1329                    e.preventDefault();
1330                    var href = $(this).attr('href').match(/#\w+$/);
1331                    if(href && href.length) {
1332                         var target = href[0];
1333                    }
1334                    else {
1335                        var target = '';
1336                    }
1337                    var header = $('header .inner-header').outerHeight() + 30;
1338                    if($(target).length) {
1339                        var top = $(target).offset().top - header;
1340                        $('html,body').animate({ scrollTop: (top) +'px' }, 750);
1341                    }
1342                });
1343            });
1344        }
1345    }
1346};
1347
1348/**
1349 * Fancybox
1350 *
1351 * @type object
1352 */
1353var fancybox = {
1354    selector: '.lightbox',
1355    options: {
1356        loop: true, // Enable infinite gallery navigation
1357        selector: '.lightbox',
1358        buttons: [
1359          "zoom",
1360          //"share",
1361          "slideShow",
1362          "fullScreen",
1363          "download",
1364          "thumbs",
1365          "close"
1366        ],
1367        thumbs : {
1368            autoStart : false // show thumbnails by default
1369        },
1370        caption : function( instance, item ) {
1371            var caption = $(this).parent().find('figcaption').clone();
1372            if(caption.length) {
1373                caption.find('.image-caption-title').removeClass('d-none');
1374                return caption.html();
1375            }
1376            return "";
1377        },
1378        // Alt Text
1379        // https://stackoverflow.com/questions/47493849/how-to-insert-alt-tag-for-fancy-box-images-fancybox3
1380        // https://codepen.io/anon/pen/QOBgqz?editors=1010
1381        afterLoad : function(instance, current) {
1382            current.$image.attr('alt', current.opts.$orig.find('img').attr('alt') );
1383        }
1384    },
1385    init: function() {
1386        if(this.selector.length && typeof $.fn.fancybox !== 'undefined') {
1387            $(this.selector).fancybox(this.options);
1388        }
1389    }
1390};
1391
1392let lazyloadBackgrouds = document.querySelectorAll(".lazy-backgroud");
1393if ("IntersectionObserver" in window) {
1394    let imageObserver = new IntersectionObserver (function (entries, observer, test) {
1395        entries.forEach (function (entry) {
1396            if (entry.isIntersecting) {
1397                const image = entry.target;
1398                image.classList.remove ("lazy-backgroud");
1399                imageObserver.unobserve (image);
1400            }
1401        });
1402    });
1403    lazyloadBackgrouds.forEach (function (backgroundItem) {
1404        imageObserver.observe (backgroundItem);
1405    });
1406}
1407
1408/**
1409 * Event booking
1410 *
1411 * @type object
1412 */
1413var powermailObj = {
1414    init: function() {
1415        if(typeof recruiter !== 'undefined' && $('#powermail_field_recruiter').length) {
1416            $('#powermail_field_recruiter').val(recruiter);
1417            $('#recruiterHeader').text($('#recruiterHeader').text() + ' an ' + recruiter);
1418        }
1419    }
1420};
1421
1422/**
1423 * Bootstrap 4.x Dropdowns events
1424 *
1425 * @link https://getbootstrap.com/docs/4.0/components/dropdowns/
1426 * @type object
1427 */
1428var backgroundOverlay = {
1429    breakpoint: 1199, // Burgermenu breakpoint xl=1200, lg=992
1430    selectorBgOverlay: '.black_overlay',
1431    selectorDesktopDropdown: '.dropdown-menu.desktop',
1432    selectorMobileDropdown: '#navbarCollapse',
1433    selectorSearchDropdown: '#searchbar.searchbar2024',
1434    selectorPageHeader: '#pagenavheader',
1435    pageHeaderPositionClasses: 'position-absolutex pagerheader',
1436    init: function() {
1437        if(typeof $.fn.dropdown !== 'undefined' && typeof $.fn.collapse !== 'undefined') {
1438            var _this = this;
1439
1440            // Burger Menü Steuerung
1441            // Auf backgroundOverlay.selectorMobileDropdown
1442            $(this.selectorDesktopDropdown).on('shown.bs.collapse', function (e) {
1443                if($(_this.selectorSearchDropdown).hasClass('show')) {
1444                    $(_this.selectorSearchDropdown).collapse('hide');
1445                    setTimeout(function() {
1446                        _this.collapseOnShow();
1447                    }, 500);
1448                }
1449                else {
1450                    _this.collapseOnShow();
1451                }
1452            });
1453            // Zu
1454            $(this.selectorDesktopDropdown).on('hidden.bs.collapse', function (e) {
1455                _this.collapseOnHide();
1456            });
1457        }
1458    },
1459    layerOn: function() {
1460        $(this.selectorBgOverlay).fadeIn('1');
1461    },
1462    layerShow: function() {
1463        $(this.selectorBgOverlay).show();
1464    },
1465    layerOff: function() {
1466        $(this.selectorBgOverlay).fadeOut('1');
1467    },
1468    layerHide: function() {
1469        $(this.selectorBgOverlay).hide();
1470    },
1471    checkCollapseMenu: function() {
1472        // Auto hidden black background layer
1473        if ($(window).width() >= this.breakpoint && $(this.selectorDesktopDropdown).hasClass('show')) {
1474            $(this.selectorDesktopDropdown).collapse('toggle');
1475        }
1476    },
1477    onResize: function () {
1478        var _this = this;
1479        $(window).on('resize.backgroundOverlay', (function() {
1480            _this.checkCollapseMenu();
1481        }));
1482    },
1483    offResize: function() {
1484        $(window).off('resize.backgroundOverlay');
1485    },
1486    onClickClose: function() {
1487        var _this = this;
1488        $('.black_overlay').on('click.backgroundOverlay', function(){
1489            $(_this.selectorDesktopDropdown).collapse('hide');
1490        });
1491    },
1492    offClickClose: function() {
1493        $(this.selectorBgOverlay).off('click.backgroundOverlay');
1494    },
1495    collapseOnShow: function() {
1496        //$(this.selectorPageHeader).addClass(this.pageHeaderPositionClasses);
1497        //scrollToTop.scroll2top();
1498        this.layerOn();
1499        this.onResize();
1500        this.onClickClose();
1501        autohide.disable();
1502    },
1503    collapseOnHide: function() {
1504        $(this.selectorPageHeader).removeClass(this.pageHeaderPositionClasses);
1505        this.layerOff();
1506        this.offResize();
1507        this.offClickClose();
1508        autohide.enable();
1509        //fixedHeaderHeight.fixHeight();
1510    }
1511};
1512
1513/**
1514 * Ajax News Calendar
1515 * @type object
1516 */
1517var eventCalendar = {
1518    selector: '',
1519    init: function() {
1520        if($('#eventnews-prev, #eventnews-next').length) {
1521            this.initCalendar();
1522        }
1523    },
1524    initCalendar: function(){
1525        $('#eventnews-prev, #eventnews-next').click(function(e) {
1526            var href= $(this).attr('href');
1527            e.preventDefault();
1528            //$('#eventnews-month-year').html('<img class="noscale" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHdpZHRoPSIxNjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMTI4IDE2IiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBmaWxsPSIjOWJjNmUzIiBkPSJNNi40LDQuOEEzLjIsMy4yLDAsMSwxLDMuMiw4LDMuMiwzLjIsMCwwLDEsNi40LDQuOFptMTIuOCwwQTMuMiwzLjIsMCwxLDEsMTYsOCwzLjIsMy4yLDAsMCwxLDE5LjIsNC44Wk0zMiw0LjhBMy4yLDMuMiwwLDEsMSwyOC44LDgsMy4yLDMuMiwwLDAsMSwzMiw0LjhabTEyLjgsMEEzLjIsMy4yLDAsMSwxLDQxLjYsOCwzLjIsMy4yLDAsMCwxLDQ0LjgsNC44Wm0xMi44LDBBMy4yLDMuMiwwLDEsMSw1NC40LDgsMy4yLDMuMiwwLDAsMSw1Ny42LDQuOFptMTIuOCwwQTMuMiwzLjIsMCwxLDEsNjcuMiw4LDMuMiwzLjIsMCwwLDEsNzAuNCw0LjhabTEyLjgsMEEzLjIsMy4yLDAsMSwxLDgwLDgsMy4yLDMuMiwwLDAsMSw4My4yLDQuOFpNOTYsNC44QTMuMiwzLjIsMCwxLDEsOTIuOCw4LDMuMiwzLjIsMCwwLDEsOTYsNC44Wm0xMi44LDBBMy4yLDMuMiwwLDEsMSwxMDUuNiw4LDMuMiwzLjIsMCwwLDEsMTA4LjgsNC44Wm0xMi44LDBBMy4yLDMuMiwwLDEsMSwxMTguNCw4LDMuMiwzLjIsMCwwLDEsMTIxLjYsNC44WiIvPjxnPjxwYXRoIGZpbGw9IiMxMDc4YmQiIGQ9Ik0tNDIuNywzLjg0QTQuMTYsNC4xNiwwLDAsMS0zOC41NCw4YTQuMTYsNC4xNiwwLDAsMS00LjE2LDQuMTZBNC4xNiw0LjE2LDAsMCwxLTQ2Ljg2LDgsNC4xNiw0LjE2LDAsMCwxLTQyLjcsMy44NFptMTIuOC0uNjRBNC44LDQuOCwwLDAsMS0yNS4xLDhhNC44LDQuOCwwLDAsMS00LjgsNC44QTQuOCw0LjgsMCwwLDEtMzQuNyw4LDQuOCw0LjgsMCwwLDEtMjkuOSwzLjJabTEyLjgtLjY0QTUuNDQsNS40NCwwLDAsMS0xMS42Niw4YTUuNDQsNS40NCwwLDAsMS01LjQ0LDUuNDRBNS40NCw1LjQ0LDAsMCwxLTIyLjU0LDgsNS40NCw1LjQ0LDAsMCwxLTE3LjEsMi41NloiLz48YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InRyYW5zbGF0ZSIgdmFsdWVzPSIyMyAwOzM2IDA7NDkgMDs2MiAwOzc0LjUgMDs4Ny41IDA7MTAwIDA7MTEzIDA7MTI1LjUgMDsxMzguNSAwOzE1MS41IDA7MTY0LjUgMDsxNzggMCIgY2FsY01vZGU9ImRpc2NyZXRlIiBkdXI9Ijc4MG1zIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIvPjwvZz48L3N2Zz4=" title="wird geladen..."/>');
1529            $('#eventnews-month-year').html('<img class="noscale" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHdpZHRoPSIxNThweCIgaGVpZ2h0PSIyNHB4IiB2aWV3Qm94PSIwIDAgMTU4IDI0IiB4bWw6c3BhY2U9InByZXNlcnZlIj48c2NyaXB0IHR5cGU9InRleHQvZWNtYXNjcmlwdCIgeGxpbms6aHJlZj0iLy9wcmVsb2FkZXJzLm5ldC9qc2NyaXB0cy9zbWlsLnVzZXIuanMiLz48cGF0aCBmaWxsPSIjZTNlM2UzIiBmaWxsLW9wYWNpdHk9IjAuMTEiIGQ9Ik02NCA0aDEwdjEwSDY0VjR6bTIwIDBoMTB2MTBIODRWNHptMjAgMGgxMHYxMGgtMTBWNHptMjAgMGgxMHYxMGgtMTBWNHptMjAgMGgxMHYxMGgtMTBWNHpNNCA0aDEwdjEwSDRWNHptMjAgMGgxMHYxMEgyNFY0em0yMCAwaDEwdjEwSDQ0VjR6Ii8+PHBhdGggZmlsbD0iI2JkYmRiZCIgZmlsbC1vcGFjaXR5PSIwLjI2IiBkPSJNMTQ0IDE0VjRoMTB2MTBoLTEwem05LTloLTh2OGg4VjV6bS0yOSA5VjRoMTB2MTBoLTEwem05LTloLTh2OGg4VjV6bS0yOSA5VjRoMTB2MTBoLTEwem05LTloLTh2OGg4VjV6bS0yOSA5VjRoMTB2MTBIODR6bTktOWgtOHY4aDhWNXptLTI5IDlWNGgxMHYxMEg2NHptOS05aC04djhoOFY1em0tMjkgOVY0aDEwdjEwSDQ0em05LTloLTh2OGg4VjV6bS0yOSA5VjRoMTB2MTBIMjR6bTktOWgtOHY4aDhWNXpNNCAxNFY0aDEwdjEwSDR6bTktOUg1djhoOFY1eiIvPjxnPjxwYXRoIGZpbGw9IiNkOWQ5ZDkiIGZpbGwtb3BhY2l0eT0iMC4xNSIgZD0iTS01OCAxNlYyaDE0djE0aC0xNHptMTMtMTNoLTEydjEyaDEyVjN6Ii8+PHBhdGggZmlsbD0iIzljOWM5YyIgZmlsbC1vcGFjaXR5PSIwLjM5IiAgZD0iTS00MCAwaDE4djE4aC0xOHoiLz48cGF0aCBmaWxsPSIjYjJiMmIyIiBmaWxsLW9wYWNpdHk9IjAuMyIgZD0iTS00MCAxOFYwaDE4djE4aC0xOHptMTctMTdoLTE2djE2aDE2VjF6Ii8+PHBhdGggZmlsbD0iIzljOWM5YyIgZmlsbC1vcGFjaXR5PSIwLjM5IiAgZD0iTS0yMCAwaDE4djE4aC0xOHoiLz48cGF0aCBmaWxsPSIjNGM0YzRjIiBmaWxsLW9wYWNpdHk9IjAuNyIgZD0iTS0yMCAxOFYwaDE4djE4aC0xOHpNLTMgMWgtMTZ2MTZoMTZWMXoiLz48YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InRyYW5zbGF0ZSIgdmFsdWVzPSIyMCAwOzQwIDA7NjAgMDs4MCAwOzEwMCAwOzEyMCAwOzE0MCAwOzE2MCAwOzE4MCAwOzIwMCAwIiBjYWxjTW9kZT0iZGlzY3JldGUiIGR1cj0iMTAwMG1zIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIvPjwvZz48L3N2Zz4=" width="30" title="wird geladen..."/>');
1530            setTimeout(function(){
1531                eventCalendar.ajaxLoad(href);
1532            }, 1);
1533        });
1534    },
1535    ajaxLoad: function (href){
1536        $.ajax({
1537            type: 'GET',
1538            url: href,
1539            data: null,
1540            dataType : 'text',
1541            //cache: false,
1542            success: function (data) {
1543                $('#eventnews-calendar').remove();
1544                //$("#eventnews-calendar-wrapper").hide();
1545                $('#eventnews-calendar-items').remove();
1546                $("#eventnews-calendar-items-wrapper").hide();
1547                $("#eventnews-calendar-wrapper").append($(data).find('#eventnews-calendar'));
1548                //$("#eventnews-calendar-wrapper").fadeIn('300');
1549                $("#eventnews-calendar-items-wrapper").append($(data).find('#eventnews-calendar-items'));
1550                $("#eventnews-calendar-items-wrapper").fadeIn('300');
1551            },
1552            complete : function(){
1553                eventCalendar.initCalendar();
1554            }
1555        });
1556    }
1557};
1558
1559/**
1560 * DateTimePicker
1561 * @link    https://xdsoft.net/jqplugins/datetimepicker/
1562 * @type    object
1563 */
1564var datepicker = {
1565    selector: 'input.datepicker',
1566    init: function() {
1567        if(typeof ($.fn.datetimepicker !== 'undefined') && $(datepicker.selector).length) {
1568            /**
1569             * Die Kapselung in each ist nötig, damit kein Fehler ausgelöst wird, wenn es kein .datepicker gibt
1570             * @TODO: Multilanguage
1571             * @see Resources/Private/Extensions/Eventnews/Templates/News/Month.html
1572             **/
1573            $(datepicker.selector).each(function(){
1574                options = {
1575                    format: $(this).data('datepicker-format'),
1576                    timepicker: false,
1577                    datepicker: true,
1578                    lang: "de",
1579                    i18n: {
1580                        en: {
1581                            months: $(this).data("datepicker-months") ? $(this).data("datepicker-months").split(",") : '',
1582                            dayOfWeek: $(this).data("datepicker-days") ? $(this).data("datepicker-days").split(",") : ''
1583                        }
1584                    }
1585                };
1586                $(this).datetimepicker(options);
1587            });
1588        }
1589    }
1590};
1591
1592/**
1593 * Bootstrap Package v9.1.0 (http://www.bk2k.info)
1594 * Responsive Images
1595 *
1596 * @link https://github.com/pixelcog/parallax.js/issues/23 *
1597 * @type object
1598 */
1599var responsiveimage = {
1600    init: function() {
1601        if(typeof ($.fn.matchHeight !== 'undefined')) {
1602            $(window).on('loaded.bk2k.responsiveimage', function(e){
1603                setTimeout(function(){
1604                    $.fn.matchHeight._update();
1605                }, 250);
1606            });
1607        }
1608    }
1609};
1610
1611/**
1612 * Nur für die Lupe in der Desktop Ansicht
1613 *
1614 * @type object
1615 */
1616var searchbar = {
1617    selector: '.searchbar-toggler.collapsed',
1618    selectorToggleDropdown: '#searchbar-toggler',
1619    selectorSearchDropdown: '#searchbar.searchbar2024',
1620    selectorSearchField: '#ke_search_sword',
1621    init: function() {
1622        if($(this.selector).length) {
1623            var _this = this;
1624
1625            $(this.selectorSearchDropdown).on('shown.bs.collapse', function () {
1626                _this.dropdownOn();
1627            });
1628            $(this.selectorSearchDropdown).on('hidden.bs.collapse', function () {
1629                _this.dropdownOff();
1630            });
1631        }
1632        if($(this.selectorSearchField).length) {
1633            this.focusSearch(this.selectorSearchField);
1634        }
1635    },
1636    dropdownOn: function() {
1637        var title = $(this.selectorToggleDropdown).data('search-lang-close');
1638        $(this.selectorToggleDropdown).text(title);
1639        $(this.selectorToggleDropdown).attr('title', title);
1640        setTimeout(function() {
1641            $('#sword-dt').focus();
1642        }, 500);
1643        if($('.dropdown-menu').hasClass('show')) {
1644            $('.dropdown-menu').collapse('hide');
1645            setTimeout(function() {
1646                backgroundOverlay.collapseOnShow();
1647            }, 500);
1648        }
1649        backgroundOverlay.layerOn();
1650        this.onClickClose();
1651        autohide.disable();
1652    },
1653    dropdownOff: function() {
1654        var title = $(this.selectorToggleDropdown).data('search-lang-open');
1655        $(this.selectorToggleDropdown).text(title);
1656        $(this.selectorToggleDropdown).attr('title', title);
1657        $('#pagenavheader').removeClass('position-absolute pagerheader');
1658        //fixedHeaderHeight.fixHeight();
1659        backgroundOverlay.layerOff();
1660        this.offClickClose();
1661        autohide.enable();
1662    },
1663    onClickClose: function() {
1664        var _this = this;
1665        $(backgroundOverlay.selectorBgOverlay).on('click.backgroundOverlaySearch', function(){
1666            $(_this.selectorSearchDropdown).collapse('hide');
1667        });
1668    },
1669    offClickClose: function() {
1670        $(backgroundOverlay.selectorBgOverlay).off('click.backgroundOverlaySearch');
1671    },
1672    focusSearch: function(selector) {
1673        setTimeout(function(){
1674            // Set Focus After Last Character in Text Box
1675            var num = $(selector).val();
1676            $(selector).focus().val('').val(num);
1677        }, 500);
1678    }
1679};
1680
1681/**
1682 * jquery-match-height 0.7.2 by @liabru
1683 *
1684 * @link http://brm.io/jquery-match-height/
1685 * @type object
1686 */
1687var equalHeight = {
1688    selectorDefault: '.equal-height', // $('.equal-height').matchHeight._update();
1689    selectorSpecial: '.card-body.match-height, .card.match-height',
1690    selectorModalIcons: '.modal-equal-height',
1691    init: function() {
1692        if(typeof ($.fn.matchHeight !== 'undefined')) {
1693            if($(equalHeight.selectorDefault).length) {
1694                var _this = this;
1695                $(this.selectorDefault).matchHeight();
1696                setTimeout(function() {
1697                    _this.update();
1698                }, 500);
1699            }
1700            if($(equalHeight.selectorSpecial).length) {
1701                // apply matchHeight to each item container's items
1702                $(equalHeight.selectorSpecial).matchHeight({
1703                    byRow: true
1704                });
1705                setTimeout(function() {
1706                    $(equalHeight.selectorSpecial).matchHeight._update();
1707                }, 500);
1708            }
1709            if($(equalHeight.selectorModalIcons).length) {
1710                $(equalHeight.selectorModalIcons).matchHeight({
1711                    byRow: false
1712                });
1713                setTimeout(function() {
1714                    $(equalHeight.selectorModalIcons).matchHeight._update();
1715                }, 500);
1716            }
1717        }
1718    },
1719    update: function() {
1720        $(this.selectorDefault).matchHeight._update();
1721        var _this = this;
1722        setTimeout(function() {
1723            $(_this.selectorDefault).matchHeight._update();
1724            setTimeout(function() {
1725                $(_this.selectorDefault).matchHeight._update();
1726            }, 1000);
1727        }, 1000);
1728    }
1729};
1730
1731/**
1732 * Canvas Sidebar, Phone, Contact, Map etc.
1733 *
1734 * @type object
1735 */
1736var sidebar = {
1737    selector: '.sidebar',
1738    init: function() {
1739        if($(sidebar.selector).length) {
1740            $(sidebar.selector + ' li').click(function(){
1741                if(!$(this).attr('id') && !$(this).find('> a').length) {
1742                    if($(sidebar.selector).hasClass('locked')) {
1743                        if($(sidebar.selector).hasClass($(this).attr('class'))) {
1744                            $(sidebar.selector).removeClass('locked ' + $(this).attr('class'));
1745                        } else {
1746                            $(this).siblings().each(function(){
1747                                $(sidebar.selector).removeClass($(this).attr('class'));
1748                            });
1749                            $(sidebar.selector).addClass($(this).attr('class'));
1750                        }
1751                    } else {
1752                        $(sidebar.selector).addClass('locked ' + $(this).attr('class'));
1753                    }
1754                }
1755            });
1756        }
1757    }
1758};
1759
1760/**
1761 * Coosen Select boxes
1762 *
1763 * @type object
1764 */
1765var choosen = {
1766    selector: 'select.chosen',
1767    init: function() {
1768        if(typeof ($.fn.chosen !== 'undefined')) {
1769            if($(choosen.selector).length) {
1770                $(choosen.selector).chosen({
1771                    disable_search_threshold:15,
1772                    inherit_select_classes:true
1773                });
1774                $(choosen.selector).closest('.col-12,.col-9, .col-6,.col-3').css('position', 'static');
1775                this.onChange();
1776            }
1777        }
1778    },
1779    onChange: function() {
1780        $(choosen.selector+'.submit').on('change', function() {
1781            $(this).closest('form').submit();
1782        });
1783    }
1784};
1785
1786/**
1787 * Responsive Scroll to Top Button
1788 *
1789 * @type object
1790 */
1791var breakPoint = 767; // From `breakPoint` display slider
1792var scrollToTop = {
1793    top: 0, // px: Show button when top position reached, @see setTop()
1794    mobile: 1500, // px: Mobile top position to show buttons
1795    desktop: 100, // px: Desktop top position to show buttons
1796    animSpeed: 800, // ms: Milliseconds to animations end
1797    scrollTop: 0, // px: scroll to this top position
1798    button: '.scrollToTop', // Button class selector
1799
1800    init: function () {
1801        $(scrollToTop.button).hide();
1802        this.setTop();
1803        this.onResize();
1804        this.initButton();
1805        this.initScrollTop();
1806    },
1807    onResize: function () {
1808        $(window).resize(function () {
1809            scrollToTop.setTop();
1810        });
1811    },
1812    initButton: function () {
1813        //Click event to scroll to top
1814        $(this.button).click(function () {
1815            $('html, body').animate({scrollTop: scrollToTop.scrollTop}, scrollToTop.animSpeed);
1816            return false;
1817        });
1818    },
1819    initScrollTop: function () {
1820        //Check to see if the window is top if not then display button
1821        $(window).scroll(function () {
1822            if ($(this).scrollTop() > scrollToTop.top) {
1823                $(scrollToTop.button).fadeIn();
1824            } else {
1825                $(scrollToTop.button).fadeOut();
1826            }
1827        });
1828    },
1829    setTop: function () {
1830        if ($(window).width() <= breakPoint) {
1831            this.top = this.mobile;
1832        } else {
1833            this.top = this.desktop;
1834        }
1835    },
1836    scroll2top: function() {
1837        $('html, body').animate({scrollTop: scrollToTop.scrollTop}, 1);
1838        return false;
1839    }
1840};
1841
1842/**
1843 * Auto reserve space für fixed header
1844 *
1845 * @type object
1846 */
1847var fixedHeaderHeight = {
1848    header: null,
1849    containerHD: null,
1850    headerClass: 'header.fixed-top',
1851    containerHDClass: '.container-hd:not(.landingpage2col)',
1852
1853    init: function () {
1854        this.header = $(this.headerClass);
1855        this.containerHD = $(this.containerHDClass);
1856
1857        if(this.header.length && this.containerHD.length) {
1858            this.fixHeight();
1859            this.onResize();
1860        }
1861    },
1862    fixHeight: function () {
1863        var _this = this;
1864        this.header.each(function () {
1865            _this.containerHD.css('padding-top', $(this).height());
1866        });
1867    },
1868    onResize: function () {
1869        var _this = this;
1870        $(window).on('resize.fixedHeaderHeight', (function() {
1871            _this.fixHeight();
1872        }));
1873    },
1874    disable: function() {
1875        var _this = this;
1876        $(window).off('resize.fixedHeaderHeight');
1877        $(_this.containerHDClass).css({
1878            padding: '0',
1879            transition: 'unset',
1880        });
1881        $(_this.headerClass).addClass('position-relative');
1882        autohide.disable();
1883    },
1884    enable: function() {
1885        $(this.headerClass).removeClass('position-relative');
1886        this.init();
1887        autohide.enable();
1888    }
1889};
1890
1891/**
1892 * bootstrap-autohide-navbar
1893 *
1894 * @version 1.0.0
1895 * @link https://github.com/iamrelos/bootstrap-autohide-navbar#readme
1896 * @type object
1897 */
1898var autohide = {
1899    obj: null,
1900    header: null,
1901    fixedTopClass: 'header.fixed-top:not(.landingpage25)',
1902    init: function () {
1903        return;
1904        if(typeof $.fn.bootstrapAutoHideNavbar !== 'undefined') {
1905            this.header = $(autohide.fixedTopClass);
1906            if(this.header.length) {
1907                this.obj = this.header.bootstrapAutoHideNavbar({
1908                    disableAutoHide: false,
1909                    delta: 4, // How many pixels the user needs to scroll down before effect get trigger
1910                    duration: 250,
1911                    shadow: false
1912                });
1913            }
1914        }
1915    },
1916    hide: function () {
1917        return;
1918        if(this.obj) {
1919            this.obj.hide();
1920        }
1921    },
1922    show: function () {
1923        return;
1924        if(this.obj) {
1925            this.obj.show();
1926        }
1927    },
1928    disable: function () {
1929        return;
1930        if(this.obj && this.obj.setDisableAutoHide) {
1931            this.obj.setDisableAutoHide(true);
1932            //$(this.fixedTopClass).removeAttr('style');
1933        }
1934    },
1935    enable: function () {
1936        return;
1937        if(this.obj && this.obj.setDisableAutoHide) {
1938            this.obj.setDisableAutoHide(false);
1939        }
1940    },
1941    isDisabled: function () {
1942        return null;
1943        if(this.obj && this.obj.disableAutoHide) {
1944            return this.obj.settings.disableAutoHide;
1945        }
1946        return null;
1947    }
1948};
1949
1950/**
1951 * Bootstrap: affix.js v3.3.6
1952 * affix sidemenu
1953 *
1954 * @see Partials\Page\Navigation\Subnavigation.html
1955 * @link http://getbootstrap.com/javascript/#affix
1956 * @type object
1957 */
1958var affixSidemenu = {
1959    affixToPosition: 0,
1960    selector: '#sidemenu',
1961    obj: null,
1962    init: function () {
1963        if(typeof $.fn.affix !== 'undefined') {
1964            if ($(affixSidemenu.selector).length) {
1965                this.obj = $(affixSidemenu.selector);
1966                this.setHeight();
1967                this.setAffixContainerSize();
1968                this.initAffix();
1969                this.onResize();
1970            }
1971        }
1972    },
1973    initAffix: function () {
1974        this.obj.affix({
1975            offset: {
1976                top: affixSidemenu.affixToPosition + 60,
1977                bottom: $('footer').outerHeight() + 50
1978            }
1979        }).on('affix.bs.affix', function () {
1980            affixSidemenu.setAffixContainerSize();
1981        });
1982    },
1983    setHeight: function () {
1984        if ($('nav.breadcrumb-section').length) {
1985            this.affixToPosition += $('nav.breadcrumb-section').outerHeight();
1986        }
1987        if ($('.buehne').length) {
1988            this.affixToPosition += $('.buehne').outerHeight();
1989        }
1990        if ($('header.fixed-top').length) {
1991            this.affixToPosition += $('header.fixed-top').outerHeight();
1992        }
1993        if ($('#career-subnav').length) {
1994            this.affixToPosition += $('#career-subnav').outerHeight();
1995        }
1996    },
1997    setAffixContainerSize: function () {
1998        $(affixSidemenu.selector).width($(affixSidemenu.selector).parent().innerWidth());
1999    },
2000    onResize: function () {
2001        $(window).resize(function () {
2002            affixSidemenu.setHeight();
2003            affixSidemenu.setAffixContainerSize();
2004            affixSidemenu.initAffix();
2005
2006        });
2007    }
2008};
2009
2010/**
2011 * The second subnavigation is fixed-top while scrolling up.
2012 * When scrolling down, fixed-top will be removed again.
2013 * Autohide navi disabled when the second subnavigation is fixed-top and only
2014 * activated if the subnavigation fixed-top class removed.
2015 *
2016 * @author [email protected]
2017 * @type object
2018 */
2019var stickySubnav = {
2020    settings: {
2021        fixed: false,
2022        fixedSelector: 'fixed-top',
2023        autohideEnabled: false,
2024        mainnav: {
2025            selector: 'header.fixed-top',
2026            obj: null,
2027            height: 0
2028        },
2029        buehne: {
2030            selector: '.buehne',
2031            obj: null,
2032            offset: null,
2033            top: 0,
2034            height: 0
2035        },
2036        subnav: {
2037            selector: '#career-subnav',
2038            obj: null,
2039            offset: null,
2040            top: 0
2041        },
2042        searchbox: {
2043            selector: '#searchbar.career-searchbox',
2044            fixedSelector: 'fixed-searchbox-top'
2045        },
2046        window: {
2047            top: 0
2048        }
2049    },
2050    init: function () {
2051        this.settings.mainnav.obj    = $(stickySubnav.settings.mainnav.selector);
2052        this.settings.buehne.obj     = $(stickySubnav.settings.buehne.selector);
2053        this.settings.subnav.obj     = $(stickySubnav.settings.subnav.selector);
2054        this.settings.searchbox.obj  = $(stickySubnav.settings.searchbox.selector);
2055        if (this.settings.subnav.obj.length && this.settings.buehne.obj.length) {
2056            this.refresh();
2057            this.onScroll();
2058            this.onResize();
2059        }
2060        if(typeof $.fn.bootstrapAutoHideNavbar !== 'undefined') {
2061            this.autohideEnabled = true;
2062        }
2063    },
2064    refresh: function () {
2065        this.setOffset();
2066        this.setTop();
2067        this.setHeight();
2068        this.sticky();
2069    },
2070    setOffset: function() {
2071        this.settings.subnav.offset = this.settings.subnav.obj.offset();
2072        this.settings.buehne.offset = this.settings.buehne.obj.offset();
2073    },
2074    setTop: function () {
2075        this.settings.window.top = $(document).scrollTop();
2076        this.settings.subnav.top = this.settings.subnav.offset.top - this.settings.window.top;
2077        this.settings.buehne.top = this.settings.buehne.offset.top - this.settings.window.top;
2078    },
2079    setHeight: function() {
2080        this.settings.mainnav.height = this.settings.mainnav.obj.outerHeight();
2081        this.settings.buehne.height = this.settings.buehne.obj.outerHeight();
2082    },
2083    sticky: function () {
2084        // add class fixed-top
2085        if (this.settings.subnav.top < 0 && this.settings.fixed === false) {
2086            this.settings.subnav.obj.addClass(this.settings.fixedSelector);
2087            this.settings.searchbox.obj.addClass(this.settings.searchbox.fixedSelector);
2088            this.settings.searchbox.obj.css('top', this.settings.subnav.obj.outerHeight());
2089            this.settings.fixed = true;
2090        }
2091        // remove class fixed-top
2092        if (this.settings.subnav.top >= 0 && this.settings.fixed === true) {
2093            this.settings.subnav.obj.removeClass(this.settings.fixedSelector);
2094            this.settings.searchbox.obj.removeClass(this.settings.searchbox.fixedSelector);
2095            this.settings.searchbox.obj.css('top', '');
2096            this.settings.fixed = false;
2097        }
2098        if(this.autohideEnabled) {
2099            // disable autohide navbar
2100            if (this.settings.subnav.top - this.settings.mainnav.height < 1 && autohide.isDisabled() === false) {
2101                autohide.hide();
2102                autohide.disable();
2103            }
2104            // enable autohide navbar
2105            if (this.settings.window.top - this.settings.buehne.height < 1 && autohide.isDisabled() === true) {
2106                autohide.enable();
2107            }
2108        }
2109    },
2110    onScroll: function () {
2111        $(window).scroll(function () {
2112            stickySubnav.setTop();
2113            stickySubnav.sticky();
2114            var top = $(window).scrollTop();
2115            if(top < 10) autohide.show();
2116        });
2117    },
2118    onResize: function () {
2119        $(window).resize(function () {
2120            stickySubnav.refresh();
2121        });
2122    }
2123};
2124
2125/**
2126 *
2127 * @link
2128 * @type object
2129 */
2130var autoCollapseAccordion = {
2131    selector: '.accordion-toggle.collapsed',
2132    init: function() {
2133        if($(this.selector).length) {
2134            if(-1 < location.hash.search(/^#c\d+$/)) {
2135                var theToggle = $(location.hash).parents('.panel').find(this.selector);
2136                if(theToggle.length) {
2137                    theToggle.click();
2138                    location = location.hash.replace(/c/, "z");
2139                }
2140            }
2141        }
2142    }
2143};
2144
2145var printFormButton = {
2146    init: function() {
2147        $('#printform').click(function() {
2148            window.print();
2149        });
2150    }
2151};
2152
2153
2154/**
2155 * Aus irgend einen Grund werden die "[__referrer]" Parameter falsch ausgeliefert.
2156 * Anstatt "tx_news_pi1[__referrer]" werden die Parameter als "tx_news_pi1[][referrer]"
2157 * geliefert, welches bei der Paginirung zur Fehlern führt.
2158 * Dieser Methode behebt den Fehler.
2159 *
2160 * Es kommt manschmal vor, dass die URL in der Paginations mit /page/2/feed.rss generiert werden
2161 * z.B: https://www.bakertilly.de/news/newsroom/page/2/feed.rss
2162 * Richtig müsste es aber sein https://www.bakertilly.de/news/newsroom/page/2.html
2163 */
2164fixWrongParamsOnPagination = {
2165    init: function() {
2166        if($('ul.pagination').length) {
2167            $('ul.pagination').each(function() {
2168                $(this).find('a').each(function(){
2169                    var url = $(this).attr('href');
2170                    if(url.length) {
2171                        url = decodeURIComponent(url);
2172                        url = url.split("[][referrer]").join("[__referrer]");
2173                        url = url.split("[][trustedProperties]").join("[__trustedProperties]");
2174                        url = url.split("/feed.rss").join(".html");
2175                        $(this).attr('href', url);
2176                    }
2177                });
2178            });
2179        }
2180    }
2181};
2182
2183var productbox = {
2184    selector: '.product-box',
2185    selectorWrapper: '.product-box-wrapper',
2186    selectorClosebutton: '.product-box button.close',
2187    selectorCollapse: '.product-box-body',
2188    minOffset: 200,
2189    hidden: true,
2190    collapsed: false,
2191    init: function() {
2192        if($(this.selector).length && typeof Cookies !== 'undefined') {
2193            if(typeof Cookies.get('disable_productbox') === 'undefined') {
2194
2195                // Offset
2196                this.minOffset = typeof $(this.selector).data('productbox-minoffset') !== 'undefined' ? $(this.selector).data('productbox-minoffset') : this.minOffset;
2197
2198                // Collapse
2199                if(typeof Cookies.get('collapse_productbox') !== 'undefined') {
2200                    this.collapse();
2201                }
2202
2203                // Close
2204                var _this = this;
2205                $(this.selectorClosebutton).click(function() {
2206                    Cookies.set('disable_productbox', 1);
2207                    _this.remove();
2208                });
2209
2210                // Init
2211                this.onCollapse();
2212                this.onScroll();
2213            }
2214            else {
2215               this.remove();
2216            }
2217        }
2218    },
2219    onScroll: function() {
2220        if ($(window).scrollTop() > this.minOffset) {
2221            this.show();
2222        }
2223        var _this = this;
2224        $(window).scroll(function () {
2225            if (_this.hidden && $(window).scrollTop() >= _this.minOffset) {
2226                _this.show();
2227            }
2228            else if (!_this.hidden && $(window).scrollTop() < _this.minOffset) {
2229                _this.hide();
2230            }
2231        });
2232    },
2233    show: function() {
2234        $(this.selector).removeClass('d-none');
2235        this.hidden = false;
2236        var _this = this;
2237        setTimeout(function() {
2238            $(_this.selectorWrapper).addClass('in');
2239        }, 300);
2240    },
2241    hide: function() {
2242        $(this.selectorWrapper).removeClass('in');
2243        this.hidden = true;
2244        var _this = this;
2245        setTimeout(function() {
2246            $(_this.selector).addClass('d-none');
2247        }, 300);
2248    },
2249    remove: function() {
2250        Cookies.remove('collapse_productbox');
2251        $(this.selector).remove();
2252    },
2253    onCollapse: function() {
2254        $('.product-box-body').on('hidden.bs.collapse', function () {
2255            Cookies.set('collapse_productbox', 1);
2256            this.collapsed = true;
2257        });
2258
2259        $('.product-box-body').on('shown.bs.collapse', function () {
2260            Cookies.remove('collapse_productbox');
2261            this.collapsed = false;
2262        });
2263    },
2264    collapse: function() {
2265        if(!this.collapsed) {
2266            $('.product-box-body').collapse({toggle: true});
2267            this.collapsed = true;
2268        }
2269    }
2270};
2271
2272var weSetParams = {
2273    init: function() {
2274        $('.powermail_form').on('submit', function() {
2275            if(typeof ScarabQueue !== "undefined") {
2276                let email = $('#powermail_field_email').val();
2277                if(email && /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(email)) {
2278                    ScarabQueue.push(['setEmail', email]);
2279                    ScarabQueue.push(['go']);
2280                    // Cookies.set('scarab.emailIsSet', 1, {expires: 365});
2281                }
2282            }
2283        });
2284        // if(Cookies.get('scarab.emailIsSet')) {
2285            let searchTerm = $('#ke_search_sword').val();
2286            if(searchTerm) {
2287                ScarabQueue.push(['searchTerm', searchTerm]);
2288                ScarabQueue.push(['go']);
2289            }
2290        // }
2291    }
2292}
2293
2294var esNewsletter = {
2295    selectorNewsletterform: '.es-newsletter-form',
2296    init: function() {
2297        if($(this.selectorNewsletterform).length) {
2298            this.main();
2299        }
2300    },
2301    main: function() {
2302        var old_src;
2303        $(document).ready(function () {
2304            let email;
2305            if ((email = new URLSearchParams(location.search).get('email'))) {
2306                $('#powermail_field_email').val(email);
2307            }
2308            $(esNewsletter.selectorNewsletterform).submit(function () {
2309                $(this).find(".is-invalid").removeClass("is-invalid");
2310                // $(this).find(".clever_form_note").remove();
2311                $(this)
2312                    .find(".musthave")
2313                    .find("input, select, textarea")
2314                    .each(function () {
2315                        let invalidEmail = this.id == 'powermail_field_email' ? !/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(this.value) : false;
2316                        if (jQuery.trim($(this).val()) == "" || $(this).is(":checkbox") || $(this).is(":radio") || invalidEmail) {
2317                            if ($(this).is(":checkbox") || $(this).is(":radio")) {
2318                                if (!$(this).parent().find(":checked").is(":checked")) {
2319                                    $(this).parent().addClass("is-invalid");
2320                                }
2321                            } else {
2322                                $(this).addClass("is-invalid");
2323                            }
2324                        }
2325                    })
2326                ;
2327                if ($(this).find(".is-invalid").length) {
2328                    return false;
2329                }
2330                return true;
2331            });
2332
2333            let src = $('#emarsys-msg');
2334            let dst = $('.emarsys-msg .body-text-container');
2335            if (dst.length) {
2336                if (src.length) {
2337                    dst.empty().append(src.contents());
2338                }
2339                dst.find('p').removeClass('d-none');
2340            }
2341
2342        });
2343    }
2344};
2345
2346var crNewsletter = {
2347    selectorNewsletterform: '.cr-newsletter-form',
2348    init: function() {
2349        if($(this.selectorNewsletterform).length) {
2350            this.main();
2351
2352            // Values aus Newsletter Teaser
2353            const searchParams = new URLSearchParams(window.location.search);
2354            if(searchParams.has('email')) {
2355                $('#text5543674').val(searchParams.get('email'));
2356            }
2357        }
2358    },
2359    main: function() {
2360        var old_src;
2361        $(document).ready(function () {
2362            $(crNewsletter.selectorNewsletterform).submit(function () {
2363                $(this).find(".is-invalid").removeClass("is-invalid");
2364                $(this).find(".clever_form_note").remove();
2365                $(this)
2366                        .find(".musthave")
2367                        .find("input, textarea")
2368                        .each(function () {
2369                            if (jQuery.trim($(this).val()) == "" || $(this).is(":checkbox") || $(this).is(":radio")) {
2370                                if ($(this).is(":checkbox") || $(this).is(":radio")) {
2371                                    if (!$(this).parent().find(":checked").is(":checked")) {
2372                                        $(this).parent().addClass("is-invalid");
2373                                    }
2374                                } else {
2375                                    $(this).addClass("is-invalid");
2376                                }
2377                            }
2378                        });
2379                if ($(this).attr("action").search(document.domain) > 0 && $(".cr_form").attr("action").search("wcs") > 0) {
2380                    var cr_email = $(this).find("input[name=email]");
2381                    var unsub = false;
2382                    if ($("input['name=cr_subunsubscribe'][value='false']").length) {
2383                        if ($("input['name=cr_subunsubscribe'][value='false']").is(":checked")) {
2384                            unsub = true;
2385                        }
2386                    }
2387                    if (cr_email.val() && !unsub) {
2388                        $.ajax({
2389                            type: "GET",
2390                            url: $(crNewsletter.selectorNewsletterform).attr("action").replace("wcs", "check_email") + $(this).find("input[name=email]").val(),
2391                            success: function (data) {
2392                                if (data) {
2393                                    cr_email.addClass("is-invalid").before("<div class='clever_form_note cr_font'>" + data + "</div>");
2394                                    return false;
2395                                }
2396                            },
2397                            async: false,
2398                        });
2399                    }
2400                    var cr_captcha = $(this).find("input[name=captcha]");
2401                    if (cr_captcha.val()) {
2402                        $.ajax({
2403                            type: "GET",
2404                            url: $(crNewsletter.selectorNewsletterform).attr("action").replace("wcs", "check_captcha") + $(this).find("input[name=captcha]").val(),
2405                            success: function (data) {
2406                                if (data) {
2407                                    cr_captcha.addClass("is-invalid").after("<div style='display:block' class='clever_form_note cr_font'>" + data + "</div>");
2408                                    return false;
2409                                }
2410                            },
2411                            async: false,
2412                        });
2413                    }
2414                }
2415                if ($(this).find(".is-invalid").length) {
2416                    return false;
2417                }
2418                return true;
2419            });
2420            $('input[class*="cr_number"]').change(function () {
2421                if (isNaN($(this).val())) {
2422                    $(this).val(1);
2423                }
2424                if ($(this).attr("min")) {
2425                    if ($(this).val() * 1 < $(this).attr("min") * 1) {
2426                        $(this).val($(this).attr("min"));
2427                    }
2428                }
2429                if ($(this).attr("max")) {
2430                    if ($(this).val() * 1 > $(this).attr("max") * 1) {
2431                        $(this).val($(this).attr("max"));
2432                    }
2433                }
2434            });
2435            old_src = $("div[rel='captcha'] img:not(.captcha2_reload)").attr("src");
2436            if ($("div[rel='captcha'] img:not(.captcha2_reload)").length != 0) {
2437                crNewsletter.captcha_reload();
2438            }
2439        });
2440    },
2441    captcha_reload: function() {
2442        var timestamp = new Date().getTime();
2443        $("div[rel='captcha'] img:not(.captcha2_reload)").attr("src", "");
2444        $("div[rel='captcha'] img:not(.captcha2_reload)").attr("src", old_src + "?t=" + timestamp);
2445        return false;
2446    }
2447};
2448
2449/**
2450 * custom checkbox switch as in Bootstrap 5
2451 * function: toggle complete block
2452 */
2453var checkboxSwitch = {
2454    selectorForm: 'form.cr-newsletter-form, form.es-newsletter-form',
2455    selectorInput: '.custom-switch input.custom-control-input',
2456    selectorToggle1: '#toggle-all-1',
2457    selectorToggle2: '#toggle-all-2',
2458    selectorT1: 'input.thema1',
2459    selectorT2: 'input.thema2',
2460    selectorNewsletterThemen: '.custom-switch input.thema1, .custom-switch input.thema2',
2461    init: function() {
2462        $(this.selectorInput).on('change', function() {
2463            var $label = $(this).siblings('label');
2464            if($(this).is(':checked')) {
2465                $label.addClass('act');
2466            } else {
2467                $label.removeClass('act');
2468            }
2469        });
2470        $(this.selectorForm).on('submit', function() {
2471            return checkboxSwitch.selectNewsletterCheck();
2472        });
2473        this.toggleAll(1);
2474        this.toggleAll(2);
2475    },
2476    toggleAll: function(no) {
2477        $('#toggle-all-'+ no).on('change', function() {
2478            if($(this).is(':checked')) {
2479                $('input.thema'+ no).each(function() {
2480                    $(this).prop('checked', true).siblings('label').addClass('act');
2481                });
2482            } else {
2483                $('input.thema'+ no).each(function() {
2484                    $(this).prop('checked', false).siblings('label').removeClass('act');
2485                });
2486            }
2487        });
2488    },
2489    selectNewsletterCheck: function() {
2490        var isSelected = false;
2491        $(this.selectorNewsletterThemen).each(function(n, item) {
2492            if($(item).is(':checked')) {
2493                if($('div.invalid-msg').length) $('div.invalid-msg').remove();
2494                isSelected = true;
2495            }
2496        });
2497        if(!isSelected) {
2498            if(!$('div.invalid-msg').length) {
2499                $('div.submit_container').before(`
2500                    <div class="invalid-msg mb-2">
2501                        Bitte wählen Sie einen Newsletter oder ein Update aus.
2502                    </div>
2503                `);
2504            }
2505            return false;
2506        } else {
2507            return true;
2508        }
2509    }
2510};
2511
2512
2513/**
2514 * Fix für veränderte Haupt-Navigation
2515 **/
2516var mobileNavBt = {
2517    mainnavSelector: '#navbar-main.navbar-2024 > li > a.dropdown-toggle-off',
2518    landingpageSelector: '.navbar-collapse.landingpage25 li > a',
2519    navbarTogglerSelector: 'button.navbar-toggler',
2520    init: function() {
2521        var _this = this;
2522        this.onMobileMenuShow();
2523        $(this.mainnavSelector).on('click', function() {
2524            if($(_this.navbarTogglerSelector).is(':visible')) {
2525                var linkhref = $(this).attr('href');
2526                location.href = linkhref;
2527            }
2528        });
2529    },
2530    onMobileMenuShow: function() {
2531        var _this = this;
2532        // Burger Menü
2533        // Auf
2534        $(backgroundOverlay.selectorMobileDropdown).on('shown.bs.collapse', function (e) {
2535            _this.dropdownOn();
2536        });
2537        // Zu
2538        $(backgroundOverlay.selectorMobileDropdown).on('hidden.bs.collapse', function (e) {
2539            _this.dropdownOff();
2540        });
2541    },
2542    dropdownOn: function() {
2543        if(breakpoints.isHamburgerMenu) {
2544            $('html').addClass('scroll-disabled');
2545            this.setHeight();
2546            backgroundOverlay.layerOn();
2547            this.onClickClose();
2548            this.landingpageOnClick();
2549            autohide.disable();
2550        }
2551    },
2552    dropdownOff: function() {
2553        if(breakpoints.isHamburgerMenu) {
2554            $('html').removeClass('scroll-disabled');
2555            backgroundOverlay.layerOff();
2556            this.offClickClose();
2557            autohide.enable();
2558        }
2559        this.landingpageOffClick();
2560    },
2561    onClickClose: function() {
2562        //var _this = this;
2563        $('.black_overlay').on('click.backgroundOverlayMobileNavBt', function(){
2564            $(backgroundOverlay.selectorMobileDropdown).collapse('hide');
2565        });
2566    },
2567    offClickClose: function() {
2568        $(backgroundOverlay.selectorMobileDropdown).off('click.backgroundOverlayMobileNavBt');
2569    },
2570    setHeight: function() {
2571        if(breakpoints.isHamburgerMenu) {
2572            var navbarHeight = $('.container-mobile-search').outerHeight() + 2;
2573            var headerHeight = $('.navbar-header.navbar-header-main').outerHeight() + 0;
2574            $('#navbar-main').css({
2575                height: 'calc(100% - ' + (navbarHeight) + 'px'
2576            });
2577            $('.navbar-collapse').css({
2578                height: 'calc(100vh - ' + (headerHeight) + 'px'
2579            });
2580        }
2581        else {
2582            $('#navbar-main').removeAttr('style');
2583            $('.navbar-collapse').removeAttr('style');
2584        }
2585    },
2586    landingpageOnClick: function() {
2587        if($(this.landingpageSelector).length && breakpoints.isHamburgerMenu) {
2588            var _this = this;
2589            $(this.landingpageSelector).on('click.landingpageSelector', function() {
2590                setTimeout(function(){
2591                    $(_this.navbarTogglerSelector).click();
2592                }, 1);
2593            });
2594        }
2595    },
2596    landingpageOffClick: function() {
2597        $(this.landingpageSelector).off('click.landingpageSelector');
2598    }
2599};
2600
2601/**
2602 * @see containerHd.addClass and containerHd.removeClass
2603 **/
2604var desktopNavBt = {
2605    subNavSelector: '.dropdown-submenu-wrap li.sub a[data-target-uid]',
2606    mainNavSelector: '.nav-link.desktop',
2607    isOnHover: false,
2608    isOnClick: false,
2609    init: function() {
2610        if(!this.isOnHover && !this.isOnClick) {
2611            this.onHover();
2612            //this.onClick();
2613        }
2614    },
2615    onHover: function() {
2616        var _this = this;
2617        this.offClick();
2618        $(this.subNavSelector).hover(function() {
2619            _this.run($(this));
2620        });
2621        $(this.mainNavSelector).hover(function() {
2622            _this.run($(this));
2623        });
2624        this.isOnHover = true;
2625    },
2626    offHover: function() {
2627        $(this.subNavSelector).unbind('mouseenter mouseleave');
2628        $(this.mainNavSelector).unbind('mouseenter mouseleave');
2629        this.isOnHover = false;
2630    },
2631    onClick: function() {
2632        var _this = this;
2633        this.offHover();
2634        $(this.subNavSelector).on('click.submenu-desktop', function(e) {
2635            e.preventDefault();
2636            _this.run($(this));
2637        });
2638        this.isOnClick = true;
2639    },
2640    offClick: function() {
2641        $(this.subNavSelector).off('click.submenu-desktop');
2642        this.isOnClick = false;
2643    },
2644    run: function(obj) {
2645        $('.dropdown-menu.desktop .dropdown-submenu-wrap li.sub').removeClass('actived');
2646        obj.parent().addClass('actived');
2647        $('.dropdown-submenu-right .sub-nav-links').hide();
2648        $('.dropdown-submenu-right .sub-nav-links.overview').show();
2649        $('.dropdown-submenu-right .sub-nav-links.overview#nav-uid' + obj.data('target-pid')).hide();
2650        $('.dropdown-submenu-right .sub-nav-links#nav-uid' + obj.data('target-uid')).show();
2651    },
2652    checkOverview: function() {
2653        var hasActiveClass = false;
2654        $('.side-by-side-menu-items li').each(function() {
2655            if($(this).hasClass('active')) {
2656                hasActiveClass = true;
2657            }
2658        });
2659        if(!hasActiveClass) {
2660            $('.side-by-side-menu-items li').each(function() {
2661                $(this).removeClass('actived');
2662                setTimeout(function() {
2663                    $('.dropdown-submenu-right .sub-nav-links').hide();
2664                    $('.dropdown-submenu-right .sub-nav-links.overview').show();
2665                }, 350);
2666            });
2667        }
2668    }
2669};
2670
2671/**
2672 * stellt die breakpoints aus den Konstanten zur Verfügung.
2673 * Da die JS per defer geladen werden, können die Werte u.U.
2674 * nicht da sein. In dem Fall untenstehende Fkt. kopieren.
2675 *
2676 * @type object
2677 */
2678var breakpoints = {
2679    hamburger: 1199,
2680    isHamburgerMenu: false,
2681    init: function() {
2682        this.isHamburger();
2683        this.onResize();
2684    },
2685    isHamburger: function() {
2686        if(window.innerWidth <= this.hamburger) {
2687            this.isHamburgerMenu = true;
2688        }
2689        else {
2690            this.isHamburgerMenu = false;
2691        }
2692    },
2693    onResize: function() {
2694        var _this = this;
2695        $(window).on('resize.breakpoints', (function() {
2696            _this.isHamburger();
2697            _this.batch();
2698        }));
2699    },
2700    batch: function() {
2701        var _this = this;
2702        if(_this.isHamburgerMenu && !detectMobile.isMobile) {
2703            // Suche Schliessen, wenn geöffnet
2704            if($(searchbar.selectorSearchDropdown).hasClass('show')) {
2705                $(searchbar.selectorSearchDropdown).collapse('hide');
2706            }
2707            //, backgroundOverlay.selectorMobileDropdown
2708            if($(backgroundOverlay.selectorDesktopDropdown).hasClass('show')) {
2709                $(backgroundOverlay.selectorDesktopDropdown).collapse('hide');
2710            }
2711            if($(backgroundOverlay.selectorMobileDropdown).hasClass('show')) {
2712                $(backgroundOverlay.selectorMobileDropdown).collapse('hide');
2713            }
2714        }
2715    }
2716};
2717
2718/**
2719 * Move Taost messages into Toast container
2720 *
2721 * @see https://getbootstrap.com/docs/4.3/components/toasts/
2722 * @type object
2723 */
2724var toaster = {
2725    selectorModal: '.modal',
2726    selectorModalTarget: '#modalboxcontainer',
2727    init: function() {
2728        if($(this.selectorModal).length) {
2729            $(this.selectorModal).detach().appendTo(this.selectorModalTarget);
2730        }
2731    }
2732};
2733
2734/**
2735 * Fügt eine Klasse in body ein, wenn mobiles Gerät und Bildschirm > data('navigation-hamburger-breakpoint')
2736 *
2737 * @type object
2738 */
2739var containerHd = {
2740    selector: 'body',
2741    mobileSelector: 'mobiledevice',
2742    hamburger_breakpoint: 1199.5,
2743    hamburger: 'xl',
2744    backgroundOverlayBreakpoint: 0,
2745    init: function() {
2746        this.backgroundOverlayBreakpoint = backgroundOverlay.breakpoint; // Backup original value
2747        this.hamburger_breakpoint = $('#container-hd-wrapper').data('navigation-hamburger-breakpoint') ? $('#container-hd-wrapper').data('navigation-hamburger-breakpoint') : this.hamburger_breakpoint;
2748        this.hamburger = $('#container-hd-wrapper').data('navigation-hamburger') ? $('#container-hd-wrapper').data('navigation-hamburger') : this.hamburger;
2749
2750        // Reset
2751        if($(this.selector).hasClass(this.mobileSelector) && !$('header.fixed-top').hasClass('pagerheader')) {
2752            this.removeClass();
2753        }
2754
2755        if((typeof detectMobile !=='undefined' && detectMobile.isMobile) ||  location.search.match(/mobiledevice/) ) {
2756            this.addClass();
2757        }
2758        // iPad Pro ab iOS 13.x werden nicht über detectMobile erkannt
2759        else if(typeof navigator !== 'undefined' && navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 0 && window.innerWidth >= this.hamburger_breakpoint) {
2760            this.addClass();
2761        }
2762        else if(breakpoints.isHamburgerMenu) {
2763            this.addClass();
2764        }
2765        this.endResize();
2766        this.onWIndowsResize();
2767    },
2768    addClass: function() {
2769        $(this.selector).addClass(this.mobileSelector);
2770        //$(this.selector + ' .navbar-expand-' + this.hamburger).removeClass('navbar-expand-' + this.hamburger).addClass('navbar-expand-' + this.mobileSelector);
2771        //$(this.selector + ' .d-' + this.hamburger + '-none').removeClass('d-' + this.hamburger + '-none').addClass('d-' + this.mobileSelector + '-none');
2772        fixedHeaderHeight.fixHeight();
2773        backgroundOverlay.breakpoint = 3000000;
2774        this.toggleOn();
2775        desktopNavBt.onClick();
2776    },
2777    removeClass: function() {
2778        $(this.selector).removeClass(this.mobileSelector);
2779        //$(this.selector + ' .navbar-expand-' + this.mobileSelector).removeClass('navbar-expand-' + this.mobileSelector).addClass('navbar-expand-' + this.hamburger);
2780        //$(this.selector + ' .d-' + this.mobileSelector + '-none').removeClass('d-' + this.mobileSelector + '-none').addClass('d-' + this.hamburger + '-none');
2781        fixedHeaderHeight.fixHeight();
2782        backgroundOverlay.breakpoint = this.backgroundOverlayBreakpoint;
2783        this.toggleOff();
2784        hoverIntent.init();
2785        backgroundOverlay.layerOff();
2786        desktopNavBt.onHover();
2787    },
2788    onWIndowsResize: function () {
2789        //if(typeof detectMobile !=='undefined' && detectMobile.isMobile) {
2790        //    this.onResize();
2791        //}
2792        //// iPad Pro ab iOS 13.x werden nicht über detectMobile erkannt
2793        //else if(typeof navigator !== 'undefined' && navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 0) {
2794        //    this.onResize();
2795        //}
2796        //else if(breakpoints.isHamburgerMenu) {
2797        //    this.onResize();
2798        //}
2799        this.onResize();
2800    },
2801    toggleOn: function() {
2802        $('#navbar-main .nav-item.dropdown .nav-link.firstlevel').each(function(){
2803            $(this).attr('data-toggle', 'collapse');
2804//            $(this).on('click.navtoggle', function(e){
2805//                e.preventDefault();
2806//            });
2807        });
2808    },
2809    toggleOff: function() {
2810        $('#navbar-main .nav-item.dropdown .nav-link.firstlevel').each(function(){
2811            $(this).removeAttr('data-toggle');
2812            $(this).off('click.navtoggle');
2813        });
2814    },
2815    onResize: function() {
2816        $(window).on("resize.containerHd",(function() {
2817            containerHd.init();
2818        }));
2819    },
2820    endResize: function () {
2821        $(window).off("resize.containerHd");
2822    }
2823};
2824
2825/**
2826 * hoverIntent v1.9.0 // 2017.09.01 // jQuery v1.7.0+
2827 *
2828 * @link    http://briancherne.github.io/jquery-hoverIntent/
2829 * @type    object
2830 * Debug: hoverIntent.destroy() ; $('#services-3388').addClass('active').find('#sub-3388').removeClass('d-none').addClass('d-block');
2831 */
2832var hoverIntent = {
2833    isInit: false,
2834    navbarObj: null,
2835    dropdownMenuClass24: '.dropdown-menu.desktop:not(.mobile)',
2836    dropdownMenuClass: '.dropdown-menu',
2837    navbarMainId: '#navbar-main',
2838    hoverSelector24: 'li.nav-item.sub.dropdown.md-hover',
2839    hoverSelector: 'li',
2840    init: function () {
2841        if(typeof hoverIntentOff !== 'undefined' && hoverIntentOff) {
2842            return null;
2843        }
2844
2845        if(typeof ($.fn.hoverIntent !== 'undefined') && !$('body').hasClass('mobiledevice')) {
2846            this.check24();
2847            this.navbarObj = $(hoverIntent.navbarMainId);
2848            if(this.navbarObj.length) {
2849                var config = {
2850                    over: hoverIntent.makeTall,
2851                    out: hoverIntent.makeShort,
2852                    timeout: 380, // number = milliseconds delay before onMouseOut
2853                    selector: this.hoverSelector
2854                };
2855
2856                if (window.innerWidth >= 1200) {
2857                    this.navbarObj.hoverIntent(config);
2858                }
2859            }
2860            this.onResize();
2861        }
2862    },
2863    onResize: function () {
2864        $(window).on("resize.hoverIntent",(function() {
2865            if (!hoverIntent.isInit && window.innerWidth <= 1200) {
2866                hoverIntent.destroy();
2867                hoverIntent.isInit = true;
2868            } else if (hoverIntent.isInit && window.innerWidth >= 1200) {
2869                hoverIntent.init();
2870                hoverIntent.isInit = false;
2871            }
2872        }));
2873    },
2874    destroy: function () {
2875        $(hoverIntent.navbarMainId + ' ' + hoverIntent.dropdownMenuClass).removeClass('d-block').removeClass('d-none');
2876        this.navbarObj.unbind();
2877    },
2878    makeTall: function () {
2879        $(this).addClass('active');
2880        $(this).find(hoverIntent.dropdownMenuClass).removeClass('d-none').fadeIn('150');
2881        desktopNavBt.checkOverview();
2882    },
2883    makeShort: function () {
2884        $(this).removeClass('active');
2885        $(this).find(hoverIntent.dropdownMenuClass).removeClass('d-block').fadeOut('150');
2886        desktopNavBt.checkOverview();
2887    },
2888    check24: function() {
2889        if($('header.fixed-top').hasClass('pagenavheader24')) {
2890            this.dropdownMenuClass = this.dropdownMenuClass24;
2891            this.hoverSelector = this.hoverSelector24;
2892        }
2893    }
2894};
2895
2896/**
2897 *
2898 * Mobile Device detection
2899 *
2900 * @type object
2901 */
2902var detectMobile = {
2903    isMobile: false,
2904    init: function() {
2905        if(typeof MobileDetect !== 'undefined') {
2906            var md = new MobileDetect(window.navigator.userAgent);
2907            if(md.mobile()) {
2908                this.isMobile = true;
2909            }
2910            // iPad Pro ab iOS 13.x werden nicht über detectMobile erkannt
2911            else if(typeof navigator !== 'undefined' && navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 0) {
2912                this.isMobile = true;
2913            }
2914        }
2915    }
2916};
2917
2918$.fn.isInViewport = function () {
2919    var elementTop = $(this).offset().top;
2920    var elementBottom = elementTop + $(this).outerHeight();
2921    var viewportTop = $(window).scrollTop();
2922    var viewportBottom = viewportTop + $(window).height();
2923    return (viewportTop < elementBottom) && (elementTop < viewportBottom);
2924};
2925
2926/**
2927 * Simple Counter
2928 *
2929 * @type object
2930 */
2931var simpleNumberCounter = {
2932    selector: '.count',
2933    selectorDiv: '#counter-block',
2934    complete: false,
2935    init: function () {
2936        if($(this.selector).length && $(simpleNumberCounter.selectorDiv).length) {
2937            $(this.selector).each(function () {
2938                if($(this).isInViewport()) {
2939                    $(this).addClass('ivp');
2940                }
2941            });
2942            simpleNumberCounter.count('.ivp');
2943            $(window).scroll(function() {
2944                var oTop = $(simpleNumberCounter.selectorDiv).offset().top - window.innerHeight;
2945                if (!simpleNumberCounter.complete && $(window).scrollTop() > oTop) {
2946                    simpleNumberCounter.count();
2947                    simpleNumberCounter.complete = true;
2948                }
2949            });
2950        }
2951    },
2952    count: function (sfx = '') {
2953        $(this.selector + sfx).each(function () {
2954            let val = $(this).data('val').toString();
2955            if(val) {
2956                let en = (0 === document.location.pathname.search(/^\/en\//));
2957                let targetValue = en ? parseFloat(val.replace(/\,/g, '')) : parseFloat(val.replace(/\./g, '').replace(/,/, '.'));
2958                let isInteger = Number.isInteger(targetValue);
2959
2960                $(this).prop('Counter', 0).animate({
2961                    Counter: targetValue
2962                }, {
2963                    duration: 1500,
2964                    easing: 'swing',
2965                    step: function (now) {
2966                        let formattedValue = isInteger ? Math.round(now) : parseFloat(now.toFixed(1));
2967                        $(this).text(formattedValue.toLocaleString(en ? 'en-GB' : 'de-DE'));
2968                    }
2969                });
2970                $(this).data('val', '')
2971            }
2972        });
2973    }
2974};

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.