PageSourceSearch

https://www.vimmerby.se/2.5fc07afd1885167231513b41/91.5fc07afd1885…/1789628149483/BODY/0/sv-template-asset.js

js vimmerby.se collected 2026-09-27 20:57:50 UTC 42,676 bytes, 973 lines download raw bytes

1(function(c){"function"===typeof define&&define.amd?define(["jquery"],c):"undefined"!==typeof module&&module.exports?module.exports=c(require("jquery")):c(jQuery)})(function(c){var p=-1,f=-1,g=function(a){return parseFloat(a)||0},q=function(a){var b=null,d=[];c(a).each(function(){var a=c(this),k=a.offset().top-g(a.css("margin-top")),l=0<d.length?d[d.length-1]:null;null===l?d.push(a):1>=Math.floor(Math.abs(b-k))?d[d.length-1]=l.add(a):d.push(a);b=k});return d},m=function(a){var b={byRow:!0,property:"height",
2target:null,remove:!1};if("object"===typeof a)return c.extend(b,a);"boolean"===typeof a?b.byRow=a:"remove"===a&&(b.remove=!0);return b},b=c.fn.matchHeight=function(a){a=m(a);if(a.remove){var e=this;this.css(a.property,"");c.each(b._groups,function(a,b){b.elements=b.elements.not(e)});return this}if(1>=this.length&&!a.target)return this;b._groups.push({elements:this,options:a});b._apply(this,a);return this};b.version="master";b._groups=[];b._throttle=80;b._maintainScroll=!1;b._beforeUpdate=null;b._afterUpdate=
3null;b._rows=q;b._parse=g;b._parseOptions=m;b._apply=function(a,e){var d=m(e),h=c(a),k=[h],l=c(window).scrollTop(),f=c("html").outerHeight(!0),n=h.parents().filter(":hidden");n.each(function(){var a=c(this);a.data("style-cache",a.attr("style"))});n.css("display","block");d.byRow&&!d.target&&(h.each(function(){var a=c(this),b=a.css("display");"inline-block"!==b&&"flex"!==b&&"inline-flex"!==b&&(b="block");a.data("style-cache",a.attr("style"));a.css({display:b,"padding-top":"0","padding-bottom":"0",
4"margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px",overflow:"hidden"})}),k=q(h),h.each(function(){var a=c(this);a.attr("style",a.data("style-cache")||"")}));c.each(k,function(a,b){var e=c(b),f=0;if(d.target)f=d.target.outerHeight(!1);else{if(d.byRow&&1>=e.length){e.css(d.property,"");return}e.each(function(){var a=c(this),b=a.attr("style"),e=a.css("display");"inline-block"!==e&&"flex"!==e&&"inline-flex"!==e&&(e="block");e={display:e};e[d.property]=
5"";a.css(e);a.outerHeight(!1)>f&&(f=a.outerHeight(!1));b?a.attr("style",b):a.css("display","")})}e.each(function(){var a=c(this),b=0;d.target&&a.is(d.target)||("border-box"!==a.css("box-sizing")&&(b+=g(a.css("border-top-width"))+g(a.css("border-bottom-width")),b+=g(a.css("padding-top"))+g(a.css("padding-bottom"))),a.css(d.property,f-b+"px"))})});n.each(function(){var a=c(this);a.attr("style",a.data("style-cache")||null)});b._maintainScroll&&c(window).scrollTop(l/f*c("html").outerHeight(!0));return this};
6b._applyDataApi=function(){var a={};c("[data-match-height], [data-mh]").each(function(){var b=c(this),d=b.attr("data-mh")||b.attr("data-match-height");a[d]=d in a?a[d].add(b):b});c.each(a,function(){this.matchHeight(!0)})};var r=function(a){b._beforeUpdate&&b._beforeUpdate(a,b._groups);c.each(b._groups,function(){b._apply(this.elements,this.options)});b._afterUpdate&&b._afterUpdate(a,b._groups)};b._update=function(a,e){if(e&&"resize"===e.type){var d=c(window).width();if(d===p)return;p=d}a?-1===f&&
7(f=setTimeout(function(){r(e);f=-1}
7,b._throttle)):r(e)};c(b._applyDataApi);var t=c.fn.on?"on":"bind";c(window)[t]("load",function(a){b._update(!1,a)});c(window)[t]("resize orientationchange",function(a){b._update(!0,a)})});
8!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).MicroModal=t()}(this,(function(){"use strict";function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function t(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}var n,i,a,r,s,l=(n=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex^="-"])'],i=function(){function o(e){var n=e.targetModal,i=e.triggers,a=void 0===i?[]:i,r=e.onShow,s=void 0===r?function(){}:r,l=e.onClose,c=void 0===l?function(){}:l,d=e.openTrigger,u=void 0===d?"data-micromodal-trigger":d,f=e.closeTrigger,h=void 0===f?"data-micromodal-close":f,v=e.openClass,g=void 0===v?"is-open":v,m=e.disableScroll,b=void 0!==m&&m,y=e.disableFocus,p=void 0!==y&&y,w=e.awaitCloseAnimation,E=void 0!==w&&w,k=e.awaitOpenAnimation,M=void 0!==k&&k,A=e.debugMode,C=void 0!==A&&A;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),this.modal=document.getElementById(n),this.config={debugMode:C,disableScroll:b,openTrigger:u,closeTrigger:h,openClass:g,onShow:s,onClose:c,awaitCloseAnimation:E,awaitOpenAnimation:M,disableFocus:p},a.length>0&&this.registerTriggers.apply(this,t(a)),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this)}var i,a,r;return i=o,(a=[{key:"registerTriggers",value:function(){for(var e=this,t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];o.filter(Boolean).forEach((function(t){t.addEventListener("click",(function(t){return e.showModal(t)}))}))}},{key:"showModal",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(this.activeElement=document.activeElement,this.modal.setAttribute("aria-hidden","false"),this.modal.classList.add(this.config.openClass),this.scrollBehaviour("disable"),this.addEventListeners(),this.config.awaitOpenAnimation){var o=function t(){e.modal.removeEventListener("animationend",t,!1),e.setFocusToFirstNode()};this.modal.addEventListener("animationend",o,!1)}else this.setFocusToFirstNode();this.config.onShow(this.modal,this.activeElement,t)}},{key:"closeModal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.modal;if(this.modal.setAttribute("aria-hidden","true"),this.removeEventListeners(),this.scrollBehaviour("enable"),this.activeElement&&this.activeElement.focus&&this.activeElement.focus(),this.config.onClose(this.modal,this.activeElement,e),this.config.awaitCloseAnimation){var o=this.config.openClass;this.modal.addEventListener("animationend",(function e(){t.classList.remove(o),t.removeEventListener("animationend",e,!1)}),!1)}else t.classList.remove(this.config.openClass)}},{key:"closeModalById",value:function(e){this.modal=document.getElementById(e),this.modal&&this.closeModal()}},{key:"scrollBehaviour",value:function(e){if(this.config.disableScroll){var t=document.querySelector("body");switch(e){case"enable":Object.assign(t.style,{overflow:""});break;case"disable":Object.assign(t.style,{overflow:"hidden"})}}}},{key:"addEventListeners",value:function(){this.modal.addEventListener("touchstart",this.onClick),this.modal.addEventListener("click",this.onClick),document.addEventListener("keydown",this.onKeydown)}},{key:"removeEventListeners",value:function(){this.modal.removeEventListener("touchstart",this.onClick),this.modal.removeEventListener("click",this.onClick),document.removeEventListener("keydown",this.onKeydown)}},{key:"onClick",value:function(e){(e.target.hasAttribute(this.config.closeTrigger)||e.target.parentNode.hasAttribute(this.config.closeTrigger))&&(e.preventDefault(),e.stopPropagation(),this.closeModal(e))}}
8,{key:"onKeydown",value:function(e){27===e.keyCode&&this.closeModal(e),9===e.keyCode&&this.retainFocus(e)}},{key:"getFocusableNodes",value:function(){var e=this.modal.querySelectorAll(n);return Array.apply(void 0,t(e))}},{key:"setFocusToFirstNode",value:function(){var e=this;if(!this.config.disableFocus){var t=this.getFocusableNodes();if(0!==t.length){var o=t.filter((function(t){return!t.hasAttribute(e.config.closeTrigger)}));o.length>0&&o[0].focus(),0===o.length&&t[0].focus()}}}},{key:"retainFocus",value:function(e){var t=this.getFocusableNodes();if(0!==t.length)if(t=t.filter((function(e){return null!==e.offsetParent})),this.modal.contains(document.activeElement)){var o=t.indexOf(document.activeElement);e.shiftKey&&0===o&&(t[t.length-1].focus(),e.preventDefault()),!e.shiftKey&&t.length>0&&o===t.length-1&&(t[0].focus(),e.preventDefault())}else t[0].focus()}}])&&e(i.prototype,a),r&&e(i,r),o}(),a=null,r=function(e){if(!document.getElementById(e))return console.warn("MicroModal: ❗Seems like you have missed %c'".concat(e,"'"),"background-color: #f8f9fa;color: #50596c;font-weight: bold;","ID somewhere in your code. Refer example below to resolve it."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'<div class="modal" id="'.concat(e,'"></div>')),!1},s=function(e,t){if(function(e){e.length<=0&&(console.warn("MicroModal: ❗Please specify at least one %c'micromodal-trigger'","background-color: #f8f9fa;color: #50596c;font-weight: bold;","data attribute."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'<a href="#" data-micromodal-trigger="my-modal"></a>'))}(e),!t)return!0;for(var o in t)r(o);return!0},{init:function(e){var o=Object.assign({},{openTrigger:"data-micromodal-trigger"},e),n=t(document.querySelectorAll("[".concat(o.openTrigger,"]"))),r=function(e,t){var o=[];return e.forEach((function(e){var n=e.attributes[t].value;void 0===o[n]&&(o[n]=[]),o[n].push(e)})),o}(n,o.openTrigger);if(!0!==o.debugMode||!1!==s(n,r))for(var l in r){var c=r[l];o.targetModal=l,o.triggers=t(c),a=new i(o)}},show:function(e,t){var o=t||{};o.targetModal=e,!0===o.debugMode&&!1===r(e)||(a&&a.removeEventListeners(),(a=new i(o)).showModal())},close:function(e){e?a.closeModalById(e):a.closeModal()}});return"undefined"!=typeof window&&(window.MicroModal=l),l}));
9
10// Top menu------------------------------
11
12jQuery(document).ready(function ($) {
13  $("a.expand-collapse-mobile-menu").on("click", function () {
14    $menu = $('.top-menu');
15    $(this).toggleAttr( 'aria-expanded', 'true', 'false' );
16
17    $(".below-top-menu").toggleClass("hide-below-top-menu");
18    $menu.slideToggle(500, function () {});
19    return false;
20  });
21});
22
23jQuery(document).ready(function ($) {
24  if (location.pathname != "/") {
25    $(".top-menu ul a[href='" + location.pathname + "']").each( function(){
26      var url = $(this).attr("href");
27      var parentLi = $(this).parent();
28      var parentUl = parentLi.parent();
29      if (parentUl.hasClass( "l1" )) {
30        parentLi.addClass('current in-path');
31      } else {
32        var grandParentLink = parentUl.parent().find("a").first();
33        if(url.indexOf(grandParentLink.attr("href")) == 0) {
34          parentLi.addClass('current in-path');
35        }
36      }
37    });
38    $(".top-menu .current").parents(".top-menu li").addClass('in-path');
39  }
40  $('.top-menu ul a').each( function(){
41    if ($(this).next().is('ul')) {
42      $(this).addClass('has-children');
43      if ($(this).parent().hasClass( "in-path" )) {
44        $(this).after('<a aria-expanded="true" href="#" class="expand-collapse icon-minus">Dölj undermeny</a>');
45      } else {
46        $(this).next().addClass('hidden');
47        $(this).after('<a aria-expanded="false" href="#" class="expand-collapse icon-plus">Visa undermeny</a>');
48      }
49    }
50  });
51});
52
53
54jQuery(document).ready(function ($) {
55  $(".top-menu ul a.expand-collapse").on("click", function () {
56    $(this).toggleAttr( 'aria-expanded', 'true', 'false' );
57    $(this).toggleClass("icon-plus icon-minus");
58    $(this).parent().find(">ul").slideToggle(500, function () {});
59    return false;
60
61  });
62});
63
64
65
66// Move links to mobile menu on mobile ------------------------------
67
68jQuery(document).on("load", jQuery(window).on("resize load", listenWidth3));
69
70function listenWidth3( e ) {
71  if (jQuery( ".header-links").length) {
72    jQuery(".header-links").show();
73    if(jQuery('#move-to-meny-on-mobile').css('display') == 'block') {
74      jQuery("#move-to-meny-on-mobile").remove().insertBefore(jQuery(".top-menu>ul"));
75    } else {
76      jQuery("#move-to-meny-on-mobile").remove().insertBefore(jQuery(".expand-collapse-mobile-menu"));
77    }
78  } else if (jQuery( ".header-links2").length) {
79    jQuery(".header-links2").show();
80    if(jQuery('#move-to-meny-on-mobile2').css('display') == 'block') {
81      jQuery("#move-to-meny-on-mobile2").remove().insertBefore(jQuery(".top-menu2>div>ul"));
82    } else {
83      jQuery("#move-to-meny-on-mobile2").remove().insertBefore(jQuery(".expand-collapse-mobile-menu"));
84    }
85  }
86}
87
88// Startpage tabs ------------------------------
89
90
91envision.tabs('.home-tabs');
92
93// Change focus style when click vs tab ------------------------------
94
95jQuery(document).ready(function ($) {
96  document.addEventListener('keydown', function(e) {
97    if (e.keyCode === 9) {
98      $('body').addClass('show-focus-outlines');
99    }
100  });
101
102  document.addEventListener('click', function(e) {
103    $('body').removeClass('show-focus-outlines');
104  });
105});
106
107
108// Micromodal ------------------------------
109
110jQuery(document).ready(function ($) {
111  MicroModal.init({
112    awaitOpenAnimation: true,
113    awaitCloseAnimation: true
114  });
115  //MicroModal.show('modal-1');
116});
117
118
119//  FIX SAME HEIGHT QUOTE-AS-IMAGE COLUMNS------------------------------
120
121
122jQuery(document).ready(function ($) {
123  $(function() {
124	  $('.quote-as-image .sv-column-6').matchHeight();
125  });
126});
127
128//  FIX SAME HEIGHT TOP-IMAGE.LARGE COLUMNS------------------------------
129
130
131jQuery(document).ready(function ($) {
132  $(function() {
133	  $('.top-image.large .sv-column-4>.sv-vertical').matchHeight();
134  });
135});
136
137//  FIX TOP-IMAGE.LARGE HEIGHT ON MOBILE ------------------------------
138
139jQuery(document).on("load", jQuery(window).on("resize load", listenWidth5));
140
141function listenWidth5( e ) {
142  if (jQuery( ".top-image.large").length) {
143    if (jQuery(window).width() < 768) {
144      // get the total height of the class .sv-row
145      if (jQuery( "html.sv-template-startsida-campus").length) {
146        var totalHeight = jQuery('.top-image.large .pagecontent').height() + 18; // lower this number for less padding
147      } else {
148        var totalHeight = jQuery('.top-image.large .pagecontent').height() + 100; // lower this number for less padding
149      }
150      // set the heoght to .top-image.large div.image
151
152      jQuery('.top-image.large').css('height', totalHeight);
153      jQuery('.top-image.large div.image').css('height', totalHeight);
154
155    }
156  }
157}
158
159//  FIX HEIGHT TOP VIDEO ------------------------------
160
161
162
163//  FIX SAME HEIGHT MENU-PUSHBOXES ------------------------------
164
165
166(function($) {
167    var reakaiMatchedHeightHasRun = false;
168    if ($(".menu-pushboxes .menu-box").length > 1) {
169      var intervalId = window.setInterval(function(){
170        //console.log($( ".menu-pushboxes .sv-marketplace-reakai-rekai-webapp .env-list__item").length);
171        if ( reakaiMatchedHeightHasRun == false) {
172          $('.menu-pushboxes .menu-box.entry-0, .menu-pushboxes .menu-box.entry-1, .menu-pushboxes .menu-box.entry-3').matchHeight();
173          $('.menu-pushboxes .menu-box').matchHeight();
174          reakaiMatchedHeightHasRun = true;
175
176        }
177        //$('.menu-pushboxes .sv-jcrmenu-portlet li, .menu-pushboxes .sv-marketplace-reakai-rekai-webapp').matchHeight({ remove: true });
178        //$('.menu-pushboxes .sv-jcrmenu-portlet li, .menu-pushboxes .sv-marketplace-reakai-rekai-webapp').matchHeight({ byRow: true });
179
180      }, 500);
181    }
182})( jQuery );
183
184
185(function($) {
186  var runTimes = 0
187  if ($(".menu-pushboxes .menu-box").length > 1) {
188    var intervalId = window.setInterval(function(){
189      //console.log($( ".menu-pushboxes .sv-marketplace-reakai-rekai-webapp .env-list__item").length);
190      if (runTimes < 3) {
191        $('.menu-pushboxes .menu-box').matchHeight();
192        //$('.menu-pushboxes .sv-jcrmenu-portlet li, .menu-pushboxes .sv-marketplace-reakai-rekai-webapp').matchHeight({ remove: true });
193      //$('.menu-pushboxes .sv-jcrmenu-portlet li, .menu-pushboxes .sv-marketplace-reakai-rekai-webapp').matchHeight({ byRow: true });
194        runTimes = runTimes + 1;
195      }
196      //$('.menu-pushboxes .sv-jcrmenu-portlet li, .menu-pushboxes .sv-marketplace-reakai-rekai-webapp').matchHeight({ remove: true });
197      //$('.menu-pushboxes .sv-jcrmenu-portlet li, .menu-pushboxes .sv-marketplace-reakai-rekai-webapp').matchHeight({ byRow: true });
198
199    }, 2000);
200  }
201}
201)( jQuery );
202
203// Push boxes ------------------------------
204
205
206jQuery(document).ready(function ($) {
207  $( 'body' ).on( 'click', '.push-box', function( ) {
208  //$(".push-box").on("click", function () {
209    if ( $( ".sv-editing-mode").length == 0 && $( ".sv-toolbar-loaded" ).length == 0 ) {
210      var link = $(this).find("a");
211      window.location = link.attr("href");
212    }
213  });
214});
215
216
217// .menu-pushboxes -> .custom-pushboxes ------------------------------
218
219
220jQuery(document).ready(function ($) {
221  $( '.menu-pushboxes .custom-pushboxes' ).on( 'click', '>.sv-vertical', function( ) {
222    if ( $( ".sv-editing-mode").length == 0 && $( ".sv-toolbar-loaded" ).length == 0 ) {
223      var link = $(this).find("a");
224      window.location = link.attr("href");
225    }
226  });
227});
228// bg-below-header open modal ------------------------------
229
230jQuery(document).ready(function ($) {
231  $(".top-image .modal-link").on("click", function () {
232    var linkUrl = $(".top-image .modal-link").data("load-from-url");
233    $('.external-content').load(linkUrl + ' .top-image-modal-content .pagecontent', function() {
234      var html = $(this).html();
235    });
236  });
237});
238
239
240// Alerts ------------------------------
241
242jQuery(document).ready(function ($) {
243
244  // only do something if there is any alerts
245  if ( $( ".wrapper-modal-alerts>.sv-vertical .sv-archive-portlet .sv-channel-item").length == 0) {
246    return;
247  }
248
249  // Do not show alerts if cookie is set
250  if (Cookies.get('showAlert') == '0') {
251    return;
252  }
253
254  // move alerts to modal
255  if ( $( ".wrapper-modal-alerts>.sv-vertical>.sv-archive-portlet").length == 1) {
256    $( ".wrapper-modal-alerts>.sv-vertical").appendTo( ".wrapper-modal-alerts .modal__content" );
257  }
258
259  //ändra till orange färg om någon varning är akut
260  let imgSrc = "/images/18.440110c6188ba188d1d4ae3/1687066908070/important-alert.jpg";
261  $('.wrapper-modal-alerts .sv-archive-portlet .sv-channel-item .alert-level span').each( function(){
262    if ($(this).text() == "Akut") {
263      $( ".modal-link-alerts").addClass("critical");
264      imgSrc = "/images/18.440110c6188ba188d1d4ae4/1687066908090/critical-alert.gif";
265    }
266  });
267
268  let numAlerts = $( ".wrapper-modal-alerts .sv-archive-portlet .sv-channel-item").length;
269  if (numAlerts == 1) {
270    var text = "<h2>Driftinformation</h2><span>Vi har för tillfället 1 störning.</span>";
271  } else {
272    var text = "<h2>Driftinformation</h2><span>Vi har för tillfället " + numAlerts + " störningar.</span>";
273  }
274  $( ".modal-link-alerts .modal-link").html('<img aria-hidden="true" class="bell" src="' + imgSrc + '" /><div>
274' + text + "</div>");
275  $( ".wrapper-modal-alerts").show();
276  $( ".modal-link-alerts").addClass("visible");
277
278  // close modal-link-alerts
279  $(".modal-link-alerts .close").on("click", function () {
280    $( ".modal-link-alerts").hide();
281    var in30Minutes = 1/48;
282    Cookies.set('showAlert', '0', {
283        expires: in30Minutes
284    });
285  });
286
287});
288
289
290
291// Home-tabs, slow scroll when click------------------------------
292
293jQuery(document).ready(function ($) {
294  $(".home-tabs li").on("click", function () {
295    var tabsTop = $(".home-tabs").offset().top;
296    var currentScroll = $(window).scrollTop();
297
298    if (currentScroll < (tabsTop - 200)) {
299      $([document.documentElement, document.body]).animate({
300        scrollTop: tabsTop
301      }, 900);
302    }
303
304    //var url = window.location.href + "#query/sfsdf";
305    //window.history.pushState(url, "", url);
306
307    //return false;
308  });
309});
310
311
312// News on home, portlet must be on page from start to work ------------------------------
313
314jQuery(document).ready(function ($) {
315
316  $( ".tab-content-news-portlet").appendTo( ".tab-content-news .sv-column-12" );
317
318});
319
320
321// News on home, Catch when clicking news-tab ------------------------------
322
323jQuery(document).ready(function ($) {
324
325  $(".home-tabs #env-2").on("click", function () {
326    if($('.tab-content-news-portlet').css('display') == 'none') {
327
328      $( ".tab-content-news-portlet").show();
329      $(".tab-content-news-portlet #search12_5fc07afd1885167231526b63" ).val( "*" );
330      $('.tab-content-news-portlet input[type="submit"]').trigger('focus').trigger('click');
331      $(".tab-content-news-portlet #search12_5fc07afd1885167231526b63" ).val( "" );
332    }
333  });
334  //$('.home-tabs #env-2').trigger('click');
335
336});
337
338// home -> When clicking on "more news", activate news-tab ------------------------------
339
340jQuery(document).ready(function ($) {
341  $(".tab-content-start>.grid1>div>div:first-child .sv-button-portlet").on("click", function () {
342    $([document.documentElement, document.body]).animate({
343      scrollTop: $("#env-2").offset().top
344    }, 1000);
345    $( "#env-2" ).trigger( "click" );
346
347    //var url = window.location.href + "#query/sfsdf";
348    //window.history.pushState(url, "", url);
349
350    return false;
351  });
352
353});
354
355// rek ai on home, portlet must be on page from start to work ------------------------------
356
357jQuery(document).ready(function ($) {
358  $(".home-tabs #env-3").on("click", function () {
359    $( ".home-tab-rekai-portlet").appendTo( ".tab-content-discover .grid1" );
360    $( ".home-tab-rekai-portlet").show();
361  });
362 //$('.home-tabs #env-3').trigger('click');
363});
364
365// rek ai on home, push-box ------------------------------
366
367jQuery(document).ready(function ($) {
368  $( 'body .home-tab-rekai-portlet' ).on( 'click', '.rekai-newsarticle-article-container', function( ) {
369  //$(".push-box").on("click", function () {
370    if ( $( ".sv-editing-mode").length == 0 && $( ".sv-toolbar-loaded" ).length == 0 ) {
371      var link = $(this).find("a");
372      window.location = link.attr("href");
373    }
374  });
375});
376
377// home -> When clicking on "more events", activate event-tab ------------------------------
378
379jQuery(document).ready(function ($) {
380  $(".tab-content-start>.grid1>div>div:last-child .sv-button-portlet").on("click", function () {
381    $([document.documentElement, document.body]).animate({
382      scrollTop: $("#env-5").offset().top
383    }, 1000);
384    $( "#env-5" ).trigger( "click" );
385
386    //var url = window.location.href + "#query/sfsdf";
387    //window.history.pushState(url, "", url);
388
389    return false;
390  });
391
392});
393
394
395// pushboxes-2023 med ikoner------------------------------
396
397jQuery(document).ready(function ($) {
398  if ( $( ".sv-editing-mode").length == 0 && $( ".sv-toolbar-loaded" ).length == 0 ) {
399
400    $('.pushboxes-2023>.sv-layout').matchHeight();
401
402    $( 'body .pushboxes-2023' ).on( 'click', '>.sv-layout', function( ) {
403      if ( $( ".sv-editing-mode").length == 0 && $( ".sv-toolbar-loaded" ).length == 0 ) {
404        var link = $(this).find("a");
405        window.location = link.attr("href");
406      }
407    });
408  }
409});
410
411// pushboxes-2023 med bilder------------------------------
412
413jQuery(document).ready(function ($) {
414  if ( $( ".sv-editing-mode").length == 0 && $( ".sv-toolbar-loaded" ).length == 0 ) {
415
416    $('.pushboxes-2023-b>.sv-layout').matchHeight();
417
418    $( 'body .pushboxes-2023-b' ).on( 'click', '>.sv-layout', function( ) {
419      if ( $( ".sv-editing-mode").length == 0 && $( ".sv-toolbar-loaded" ).length == 0 ) {
420        var link = $(this).find("a");
421        window.location = link.attr("href");
422      }
423    });
424  }
425});
426
427
428// pushboxes-2023 med text------------------------------
429
430jQuery(document).ready(function ($) {
431  if ( $( ".sv-editing-mode").length == 0 && $( ".sv-toolbar-loaded" ).length == 0 ) {
432
433    $('.pushboxes-2023-c>.sv-layout').matchHeight();
434
435    $( 'body .pushboxes-2023-c' ).on( 'click', '>.sv-layout', function( ) {
436      if ( $( ".sv-editing-mode").length == 0 && $( ".sv-toolbar-loaded" ).length == 0 ) {
437        var link = $(this).find("a");
438        window.location = link.attr("href");
439      }
440    });
441  }
442});
443
444// pushboxes-2023 med knapp på bild ------------------------------
445
446jQuery(document).ready(function ($) {
447  if ( $( ".sv-editing-mode").length == 0 && $( ".sv-toolbar-loaded" ).length == 0 ) {
448
449
450    $( 'body .pushboxes-2023-d' ).on( 'click', '>.sv-layout', function( ) {
451      if ( $( ".sv-editing-mode").length == 0 && $( ".sv-toolbar-loaded" ).length == 0 ) {
452        var link = $(this).find("a");
453        window.location = link.attr("href");
454      }
455    });
456  }
457});
458
459
460
461
462// infopanels ------------------------------
463
464jQuery(document).ready(function ($) {
465  if ( $( ".sv-editing-mode").length == 0 && $( ".sv-toolbar-loaded" ).length == 0 ) {
466
467    $('.infopanels>.grid1>.sv-row>.sv-layout>.sv-vertical').matchHeight();
468
469
470  }
471});
472
473// expandable push-boxes equal heigt ------------------------------
474
475jQuery(document).ready(function ($) {
476  if ( $( ".sv-editing-mode").length == 0 && $( ".sv-toolbar-loaded" ).length == 0 ) {
477    $('.pushboxes-2024 .sv-column-4>div>.sv-vertical').matchHeight();
478  }
479});
480
481
482
483
484// expandable click ------------------------------
485
486jQuery(document).ready(function ($) {
487  if ( $( ".sv-editing-mode").length == 0 && $( ".sv-toolbar-loaded" ).length == 0 ) {
488    if (window.innerWidth >= 768) {
489      $( '.pushboxes-2024 .sv-column-4' ).on( 'click', '>div', function( ) {
490        if ( $( ".sv-editing-mode").length == 0 && $( ".sv-toolbar-loaded" ).length == 0 ) {
491          var link = $(this).find("a");
492          window.location = link.attr("href");
493        }
494      });
495    }
496  }
497});
498
499// Mobile search regular  ------------------------------
500
501jQuery(document).ready(function ($) {
502  $(".header-links .search").on("click", function () {
503    $(this).toggleAttr( 'aria-expanded', 'true', 'false' );
504    $(".top-search-mobile-wrapper").slideToggle(500, function () {});
505    $('.top-search-mobile-wrapper input[type="text"].normal').focus();
506  });
507});
508
509
510// Go to content when tab is pressed  ------------------------------
511
512
513jQuery(document).ready(function ($) {
514  $( ".tab-is-pressed" ).on("focus", function() {
515    $('.jump-to-content-wrapper').show();
516    $('.jump-to-content-wrapper a').first().trigger('focus');
517  });
518});
519
520
521
522
523
524
525// Info-boxes ------------------------------
526
527
528(function($) {
529  $('.info-box>.sv-layout:last-child>.pagecontent').each( function(){
530    if ($(this).find(">.sv-layout").length > 1) {
531      $(this).addClass("multiple");
532      $(this).find(">.sv-layout").first().addClass("first");
533    }
534
535  });
536})( jQuery );
537
538
539jQuery(document).ready(function ($) {
540  $('.info-box .pagecontent .sv-text-portlet-content').each( function(){
541
542    $(this).parents(".info-box").addClass("with-content");
543  });
544});
545
546
547jQuery(document).ready(function ($) {
548  if ( $( ".sv-editing-mode").length == 0 && $( ".sv-toolbar-loaded" ).length == 0 ) {
549    if ($('.info-box.more-information .pagecontent .sv-text-portlet-content').length == 1 ) {
550      var textElement = $('.info-box.more-information .pagecontent .sv-text-portlet-content').first();
551      if (textElement.text() == "Länka till hemsida eller dokument") {
552        textElement.parents(".info-box").remove();
553      }
554    }
555  }
556});
557
558
559
560
561// auto-link-icon ------------------------------
562
563(function($) {
564  $('.auto-link-icon p a').each( function(){
565    linktype = getLinktype($(this));
566    $(this).addClass('link-' + linktype + ' icon-before');
567  });
568})( jQuery );
569
570jQuery(document).ready(function ($) {
571  $('.auto-link-icon ul a').each( function(){
572    linktype = getLinktype($(this));
573    $(this).addClass('link-' + linktype + ' icon-before');
574  });
575});
576
577(function($) {
578  $('.auto-link-icon table.sv-standard p a').each( function(){
579    linktype = getLinktype($(this));
580    $(this).addClass('link-' + linktype + ' icon-before');
581  });
582})( jQuery );
583
584// alt-text to cookie-info script ------------------------------
585
586jQuery(document).ready(function ($) {
587  $(".cookieinfo img").attr("alt","Tracking");
588});
589
590// SV sets aria-expanded which leads to accessibility errors ------------------------------
591
592jQuery(document).ready(function ($) {
593  $("input").removeAttr("aria-expanded");
594});
595
596
597// Move submenu to after content on mobile ------------------------------
598
599jQuery(document).on("load", jQuery(window).on("resize load", listenWidth4));
600
601//jQuery(document).on("load", listenWidth3());
602//jQuery(document).on("resize", listenWidth3());
603
604function listenWidth4( e ) {
605
606  if (jQuery( ".sidebar .sidebar-menu" ).length > 0) {
607    if(jQuery('.sidebar').css('margin-top') == '2px' || jQuery('.sidebar').css('margin-top') == undefined)  {
608      jQuery(".sidebar").remove().insertAfter(jQuery(".grid1>.content"));
609      jQuery('.sidebar').show();
610    } else {
611      //jQuery(".sidebar").remove().insertBefore(jQuery(".sv-grid-gridxforxxmenyxochxinnehall>.sv-row>.sv-column-8"));
612    }
613  }
614}
615
616
617
618
619
620
621
622
623// SUBMENU------------------------------
624
625
626jQuery(document).ready(function ($) {
627  if (location.pathname != "/") {
628    $(".submenu ul a[href='" + location.pathname + "']").each( function(){
629      var url = $(this).attr("href");
630      var parentLi = $(this).parent();
631      var parentUl = parentLi.parent();
632      if (parentUl.hasClass( "l1" )) {
633        parentLi.addClass('current in-path');
634      } else {
635        var grandParentLink = parentUl.parent().find("a").first();
636        //console.log(grandParentLink.attr("href"));
637        //TODO VIMMERBY: Om inte nedan rad fixas kommer struktursidor göra att fel undermeny expanderas
638        //if(url.indexOf(grandParentLink.attr("href")) == 0) {
639          parentLi.addClass('current in-path');
640        //}
641      }
642    });
643    $(".submenu .current").parents(".submenu li").addClass('in-path');
644  }
645  $('.submenu ul a').each( function(){
646    if ($(this).next().is('ul')) {
647      $(this).addClass('has-children');
648      if ($(this).parent().hasClass( "in-path" )) {
649        $(this).after('<a aria-expanded="true" href="#" class="expand-collapse icon-minus">Dölj undermeny</a>');
650      } else {
651        $(this).next().addClass('hidden');
652        $(this).after('<a aria-expanded="false" href="#" class="expand-collapse icon-plus">Visa undermeny</a>');
653      }
654    }
655  });
656});
657
658
659jQuery(document).ready(function ($) {
660  $(".submenu ul a.expand-collapse").on("click", function () {
661    // NEDAN RAD MÅSTE FIXAS
662    //$(this).toggleAttr( 'aria-expanded', 'true', 'false' );
663    $(this).toggleClass("icon-plus icon-minus");
664    $(this).parent().find(">ul").slideToggle(500, function () {});
665    return false;
666
667  });
668});
669
670
671// EXPANDABLES ------------------------------
672
673jQuery(document).ready(function ($) {
674  $('.expandables:not(.sv-editable-layout)>.sv-vertical>.sv-vertical:first-child .sv-text-portlet-content>*').append( $( '<i class="fa-regular fa-plus plus-circle-or-minus" aria-hidden="true"></i>' ) );
675  $('.expandables:not(.sv-editable-layout)>.sv-vertical>.sv-vertical:first-child .sv-text-portlet-content>*').wrapInner( '<a href="#" aria-expanded="false"></a>' );
676});
677
678jQuery(document).ready(function ($) {
679  $('.expandables>.sv-vertical>.sv-vertical:first-child a').each( function(){
680    originalText = $(this).html();
681    var textWithNBSpaceReplaced = originalText.replace(/&nbsp;/g, ' ');
682    $(this).html(textWithNBSpaceReplaced);
683  });
684});
685jQuery(document).ready(function ($) {
686$(".expandables>.sv-vertical>.sv-vertical:first-child a").on("click", function () {
687  $parent = $(this).closest(".sv-text-portlet-content").parents().eq(2);
688  $content = $parent.find(".sv-vertical:last-child");
689  $(this).toggleAttr( 'aria-expanded', 'true', 'false' );
690  $(this).find(".plus-circle-or-minus").toggleClass("fa-plus fa-minus");
691  $parent.toggleClass("active");
692  $content.slideToggle(500, function () {});
693  return false;
694});
695});
696
697// Så det är expanderade block om man kommer från söksidan
698jQuery(document).ready(function ($) {
699var referrer =  document.referrer;
700if (/sok/.test(referrer)) {
701  $('.expandables>.sv-vertical>.sv-vertical:first-child a').each( function(){
702    $(this).trigger( "click" );
703  });
704}
705
706});
707
708// Minska radhöjd om texten tar upp två rader
709jQuery(document).ready(function ($) {
710  $(window).on("load resize scroll",function(e){
711    $(".expandables>.sv-vertical>.sv-vertical:first-child .sv-text-portlet-content>*").each(function(){
712      aHeight = $(this).height();
713      if (aHeight > 100)  {
714        $(this).css("line-height", "1.44");
715      }
716    });
717  });
718  });
719
720// få plus/minus-tecken att hamna på rätt höjd
721jQuery(document).ready(function ($) {
722$(window).on("load resize scroll",function(e){
723  $(".expandables>.sv-vertical>.sv-vertical:first-child i").each(function(){
724    aHeight = $(this).closest("a").height();
725    marginTop = (aHeight/2) - 13;
726    $(this).css({'top': marginTop + 'px'});
727  });
728});
729});
730
731// BLADAT FRÅN 2022 OCH ÄLDRE ------------------------------
732
733
734jQuery(document).ready(function ($) {
735  $("#shareonsocial").on("click", function(){
736
737      if ($("#socialalt").hasClass("hidden")) {
738         $("#socialalt").show();
739            $("#socialalt").removeClass("hidden");
740   } else {
741         $("#socialalt").hide();
742         $("#socialalt").addClass( "hidden");
743   }
744
745  });
746
747
748
749 /*Lyssnafunktion start*/
750
751     $("#listenbutton").on("click", function(){
752
753      if ($("#svid10_1ea9f2b5161097babdc8f94").hasClass("doldmodul")) {
754         $("#svid10_1ea9f2b5161097babdc8f94").show();
755            $("#svid10_1ea9f2b5161097babdc8f94").removeClass("doldmodul");
756   } else {
757         /*$("#svid10_1ea9f2b5161097babdc8f94").collapse();*/
758         $("#svid10_1ea9f2b5161097babdc8f94").addClass( "doldmodul");
759        $('#svid10_1ea9f2b5161097babdc8f94').removeAttr('style');
760   }
761
762  });
763
764  /*Lyssnafunktion end*/
765
766
767
768/* visa dölj funktion av moduler start*/
769 $(".showhidemodule").on("click", function(){
770     /* alert("clicked"); */
771      var x = $(this).nextAll(".visamodul")[0];// document.getElementsByClassName("showdiv")[0];
772/* alert("collected x");*/
773  if (x.style.display === "none") {
774      x.style.display = "block";
775      /*alert("block");*/
776  } else {
777      x.style.display = "none";
778     /* alert("none");*/
779  }
780  });
781
782 /* visa dölj funktion av moduler end*/
783
784
785});
786
787// Radera ordet Cloud från redaktör ------------------------------
788
789jQuery(document).ready(function ($) {
790    if (jQuery( ".article-footer" ).length > 0) {
791      $(".article-footer").html($(".article-footer").html().replace("(Cloud)", ""));
792      $(".article-footer").html($(".article-footer").html().replace("(cloud)", ""));
793    }
794});
795
796// Radera Magnus som redaktör ------------------------------
797
798
799jQuery(document).ready(function ($) {
800  // Hitta den överordnade <div>-behållaren med klassen "article-footer"
801    var articleFooter = $(".article-footer");
802
803    // Hitta elementet du vill ta bort inuti den överordnade <div>-behållaren
804    var element = articleFooter.find("p.normal:contains('Magnus Johansson')");
805
806    // Kontrollera om elementet hittades
807    if (element.length > 0) {
808     // Ta bort elementet om det finns
809     element.remove();
810    }
811
812});
813
814// FUNCTIONS ------------------------------
815
816
817jQuery.fn.toggleAttr = function(attr, attr1, attr2) {
818return this.each(function() {
819  var self = jQuery(this);
820  if (self.attr(attr) == attr1)
821    self.attr(attr, attr2);
822  else
823    self.attr(attr, attr1);
824});
825};
826
827
828
829function getLinktype (element) {
830  var href = element.attr("href");
831  if (/\.pdf$/.test(href))
832    return "pdf"
833  if (/\.doc$/.test(href))
834    return "word"
835  if (/\.xls$/.test(href))
836    return "excel"
837  if (/\.ppt$/.test(href))
838    return "powerpoint"
839  if (/^mailto:/.test(href))
840    return "mail"
841  if (/^tel:/.test(href))
842    return "phone"
843  if ((/state=rss/.test(href)) || (/icon=rss/.test(href)))
844    return "rss"
845  else if ((/^\//.test(href)))
846    return "internal";
847  else if ((window.location.hostname == "www.vimmerby.se") && (/^https:\/\/www.vimmerby\./.test(href)))
848  {
849     return "internal";
850  }
851  else
852  {
853    if (/^https:\/\/www.facebook.com/.test(href)) {
854      return "facebook"
855    } else if (/^https:\/\/www.instagram.com/.test(href)) {
856      return "instagram"
857    } else if (/^https:\/\/www.tripadvisor/.test(href)) {
858       return "tripadvisor"
859    } else {
860      var parent = element.parent();
861      if (parent.hasClass("force-home-icon")) {
862        return "home";
863      } else {
864        return "generic";
865      }
866    }
867  }
868}
869// Kakdeklarationens rubriknivå ------------------------------
870// Cookie-Scripts kaklista skriver kategorierna som h4 direkt under sidans h2, och DIGG räknar överhoppade
871// rubriknivåer som brist mot 1.3.1. Kategorierna blir en nivå under närmaste rubrik ovanför listan.
872// Utseendet: sektionen med samma namn sist i vby.css. (Style4 2026-09-26)
873(function () {
874  function fix() {
875    var headings = document.querySelectorAll('h4[data-csr-i18n-text]');
876    if (!headings.length) return;
877    var level = 0;
878    document.querySelectorAll('h1, h2, h3, h4, h5, h6').forEach(function (h) {
879      if (h.hasAttribute('data-csr-i18n-text')) return;
880      if (h.compareDocumentPosition(headings[0]) & Node.DOCUMENT_POSITION_FOLLOWING) level = parseInt(h.tagName.charAt(1), 10);
881    });
882    var tag = 'h' + Math.min(level + 1, 6);
883    if (!level || tag === 'h4') return;
884    headings.forEach(function (h) {
885      var ny = document.createElement(tag);
886      for (var i = 0; i < h.attributes.length; i++) ny.setAttribute(h.attributes[i].name, h.attributes[i].value);
887      while (h.firstChild) ny.appendChild(h.firstChild);
888      h.parentNode.replaceChild(ny, h);
889    });
890  }
891
892  if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', fix);
893  else fix();
894  window.addEventListener('load', fix);
895})();
896
897// Rek.ai ------------------------------
898// Style4 2026-09-26, del av Cookie-Script-införandet.
899// Rekommendationerna visas för alla, men besöksdagar och besökarens väg sparas bara efter godkänd statistik
900// (Performance). Måste köras före Rek.ai-skriptet, som laddas med defer.
901(function () {
902  function performanceAccepted() {
903    try {
904      var raw = document.cookie.split("; ").filter(function (c) { return c.indexOf("CookieScriptConsent=") === 0; })[0];
905      if (!raw) return false;
906      var consent = JSON.parse(decodeURIComponent(raw.slice(20)));
907      var categories = typeof consent.categories === "string" ? JSON.parse(consent.categories) : consent.categories;
908      return consent.action === "accept" && categories.indexOf("performance") !== -1;
909    } catch (e) {
910      return false;
911    }
912  }
913
914  if (performanceAccepted()) return;
915  window.__rekai = window.__rekai || {};
916  window.__rekai.blockSaveToLocalStorage = true;
917  window.__rekai.blockSaveToSessionStorage = true;
918  window.__rekai.blockSendBeacon = true;
919  window.addEventListener("rekai.load", function () {
920    if (typeof window.__rekai.removeLocalAndSessionStorage === "function") window.__rekai.removeLocalAndSessionStorage();
921  });
922})();
923
924// YouTube-samtycke ------------------------------
925// Cookie-Script styr ensamt: godkänd Targeting visar filmen i modulen Bädda in, filmrutans knapp öppnar bannern.
926(function () {
927  var EMBED = ".sv-marketplace-sitevision-media-embed";
928  var COOKIES = ["sv-internal-sv-youtube-embed"];
929  var unlocked = false;
930
931  function targetingAccepted() {
932    try {
933      var s = window.CookieScript && CookieScript.instance.currentState();
934      return !!(s && s.categories && s.categories.indexOf("targeting") !== -1);
935    } catch (e) {
936      return false;
937    }
938  }
939
940  function unlock() {
941    if (!targetingAccepted() || !document.querySelector(EMBED + " form")) return;
942    unlocked = true;
943    document.dispatchEvent(new CustomEvent("sv-cookie-consent", {
944      detail: { cookieIdentifiers: COOKIES, categories: [] }
945    }));
946  }
947
948  function relock() {
949    if (unlocked && !targetingAccepted()) location.reload();
950  }
951
952  function openBanner(e) {
953    if (!window.CookieScript || !e.target.closest || !e.target.closest(EMBED + " form")) return;
954    e.preventDefault();
955    e.stopImmediatePropagation();
956    CookieScript.instance.show();
957  }
958
959  document.addEventListener("submit", openBanner, true);
960  document.addEventListener("click", function (e) {
961    if (e.target.closest && e.target.closest(EMBED + " form button")) openBanner(e);
962  }, true);
963  window.addEventListener("CookieScriptLoaded", unlock);
964  window.addEventListener("CookieScriptAcceptAll", unlock);
965  window.addEventListener("CookieScriptAccept", function () { unlock(); relock(); });
966  window.addEventListener("CookieScriptReject", relock);
967  window.addEventListener("load", unlock);
968})();
969
970(function(m){var h=!1;"function"===typeof define&&define.amd&&(define(m),h=!0);"object"===typeof exports&&(module.exports=m(),h=!0);if(!h){var f=window.Cookies,a=window.Cookies=m();a.noConflict=function(){window.Cookies=f;return a}}})(function(){function m(){for(var f=0,a={};f<arguments.length;f++){var b=arguments[f],d;for(d in b)a[d]=b[d]}return a}function h(f){function a(b,d,e){var c;if("undefined"!==typeof document){if(1<arguments.length){e=m({path:"/"},a.defaults,e);if("number"===typeof e.expires){var k=
971new Date;k.setMilliseconds(k.getMilliseconds()+864E5*e.expires);e.expires=k}e.expires=e.expires?e.expires.toUTCString():"";try{c=JSON.stringify(d),/^[\{\[]/.test(c)&&(d=c)}catch(h){}d=f.write?f.write(d,b):encodeURIComponent(String(d)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decode
971URIComponent);b=encodeURIComponent(String(b));b=b.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent);b=b.replace(/[\(\)]/g,escape);c="";for(var l in e)e[l]&&(c+="; "+l,!0!==e[l]&&(c+="\x3d"+
972e[l]));return document.cookie=b+"\x3d"+d+c}b||(c={});l=document.cookie?document.cookie.split("; "):[];for(var p=/(%[0-9A-Z]{2})+/g,n=0;n<l.length;n++){var q=l[n].split("\x3d"),g=q.slice(1).join("\x3d");'"'===g.charAt(0)&&(g=g.slice(1,-1));try{k=q[0].replace(p,decodeURIComponent);g=f.read?f.read(g,k):f(g,k)||g.replace(p,decodeURIComponent);if(this.json)try{g=JSON.parse(g)}catch(h){}if(b===k){c=g;break}b||(c[k]=g)}catch(h){}}return c}}a.set=a;a.get=function(b){return a.call(a,b)};a.getJSON=function(){return a.apply({json:!0},
973[].slice.call(arguments))};a.defaults={};a.remove=function(b,d){a(b,"",m(d,{expires:-1}))};a.withConverter=h;return a}return h(function(){})});

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.