PageSourceSearch

https://www.salasparbank.se/etc.clientlibs/wcms/clientlibs/search.…-93fce101e71f3f5e4297a30fd37a8b40-lc.min.js

js salasparbank.se collected 2026-10-02 20:52:03 UTC 6,019 bytes, 13 lines download raw bytes

1var __assign=this&&this.__assign||function(){__assign=Object.assign||function(b){for(var q,v=1,n=arguments.length;v<n;v++){q=arguments[v];for(var w in q)Object.prototype.hasOwnProperty.call(q,w)&&(b[w]=q[w])}return b};return __assign.apply(this,arguments)},Search;
2(function(b){b.resultsSelector="data-search-results";b.keyword="q";b.regelverket="regelverket";b.person="person";b.staffCatalog="staffCatalog";b.branchOffice="branches";b.branchOfficeInfo="branch-info";b.allResultsSelector="";b.PID="pid";var q,v=[b.PID,b.regelverket,b.branchOffice,b.branchOfficeInfo,b.staffCatalog,b.person];b.getUrlQueryDict=function(a){void 0===a&&(a=!1);var e={},g=window.location.search.slice(1).split("\x26");$.each(g,function(c,f){f=f.split(WcmsConstants.charEquals);c=f[0];f=f[1];
30!==c.length&&(e[c]=a?decodeURIComponent(f):f)});return e};var n=b.getUrlQueryDict(!0);b.highlight=function(a,e){void 0===e&&(e=n[b.keyword]);try{return a.replace(new RegExp("(".concat(e,")"),"gi"),"\x3cem\x3e$1\x3c/em\x3e")}catch(g){return a}};var w=function(a,e,g){var c=$(a).find(WcmsConstants.showMoreLessSelector);e.stats.totalHits>20*e.pagination.currentPage?(WcmsFunctions.showMoreLessButton($(a)),$(c).off("click.ShowMoreLess").on("click.ShowMoreLess",function(){WcmsFunctions.hideMoreLessButton($(a));
4WcmsFunctions.showLoader($(a));b.doSearch(__assign(__assign({},g),{page:(g.page||0)+1,hitsPerPage:20}))})):WcmsFunctions.hideMoreLessButton($(a))};b.showResults=function(a){var e=a.component,g=a.response,c=[];a.results.map(function(f,x){var k={};a.resultCallback&&(k=a.resultCallback(g,x,f),k.path.includes("/api")||(k.path="/api".concat(k.path)));x=c.push;var p=f.breadcrumbs;var l=f.content,u=f.description,r=f.title,y=f.title_snippet,z=f.url,d=f.description_snippet;f=f.content_snippet;k=WcmsFunctions.getDataAttributesAsOneString(k);
5k='\x3ca class\x3d"general-link large" '.concat(k,' href\x3d"').concat(z,'"\x3e').concat(y||r,"\x3c/a\x3e");r="";(l=d||u||f||l)&&(r='\x3cdiv class\x3d"content"\x3e'.concat(l,"\x3c/div\x3e"));l="";p&&(l='\x3cul class\x3d"breadcrumb"\x3e\x3cli\x3e'.concat(p.join("\x3c/li\x3e\x3cli\x3e"),"\x3c/li\x3e\x3c/ul\x3e"));p="\x3cli\x3e".concat(k).concat(r).concat(l,"\x3c/li\x3e");x.call(c,p)});c&&$(e).find("[".concat(b.resultsSelector,"]")).append(c.join(""))};b.initHistoryListener=function(a){window.onpopstate=
6function(){return a()}};b.initFormListener=function(a,e){a.find(WcmsConstants.form).on("submit",function(g){g.preventDefault();b.setFormDataIntoUrl($(g.target));a.find("".concat(WcmsConstants.input,":focus")).trigger("blur");e()})};b.setFormDataIntoUrl=function(a){a=WcmsFunctions.getFormSerializedData(a);a=WcmsFunctions.convertSerializedFormIntoObject(a);window.history.pushState(null,"",WcmsFunctions.convertObjectIntoURLParams(a))};b.initSearch=function(a,e){b.initFormListener(e,a);b.initHistoryListener(a);
7a()};b.searchAllowed=function(a){var e=$("#search-form");return WcmsFunctions.isItemInArray(a,v)?!0:!(!e||!Object.keys(n).length)};b.getSanitizedKeyword=function(a,e){void 0===a&&(a=n[b.keyword]);void 0===e&&(e=!1);if(!(a&&""!==a||e))return"";a=a.replace(WcmsConstants.regexPlusChar," ");a=decodeURIComponent(a);return WcmsFunctions.escapeHtmlLeaveSlashAndAmp(a)};b.doSearch=function(a,e){var g;n=b.getUrlQueryDict(!0);if(b.searchAllowed(a.type)&&a&&a.component){var c=a.component,f=a.type,x=a.hitsPerPage,
8k=a.query,p=a.saveParams,l=a.filters;q&&(l=q);p&&(q=l);var u=n[b.keyword];WcmsFunctions.getSiteId();WcmsFunctions.getLanguage();p=parseInt(a.page||n.page||1)||1;var r=$(c).attr(WcmsConstants.attrApiKey),y=$(c).attr(WcmsConstants.attrSearchEndpoint);if(y&&r){switch(f){case b.regelverket:u=b.getSanitizedKeyword(a.query,!0);break;case b.person:u=n[b.PID]}f&&f!==b.branchOffice||sessionStorage.getItem("coordinate")&&sessionStorage.getItem("coordinate");WcmsFunctions.hideHitsCounter(c);WcmsFunctions.hideMoreLessButton(c);
9WcmsFunctions.showLoader(c);1===p&&c.find("[".concat(b.resultsSelector,"]")).empty();var z=__assign({query:null!==(g=b.getSanitizedKeyword(k))&&void 0!==g?g:u,hitsPerPage:x||20,page:p},l?l:{});$.ajax({url:y,method:"POST",headers:{"X-API-Key":r,"X-Network-Origin":"ext"},dataType:"json",contentType:"application/json; charset\x3dutf-8",data:JSON.stringify(z)}).done(function(d){var h;(null===(h=d.stats)||void 0===h?0:h.totalHits)&&$(c).find(WcmsConstants.hitsCounter).attr("data-js-total",d.stats.totalHits);
10if(f)e&&e(d,c);else{var m;h=c.find("[".concat(b.resultsSelector,"]"));if(a.containerCallback){var t=a.containerCallback(d);h.attr(t)}e&&e(d);if(null===(m=d.documentList)||void 0===m?0:m.documents)d={results:d.documentList.documents,component:c,response:d},a.resultCallback&&(d.resultCallback=a.resultCallback),b.showResults(d),WcmsFunctions.hideLoader(c);document.dispatchEvent(new CustomEvent(WcmsConstants.eventSearchReady))}}).fail(function(d){console.warn("Search failed with keyword ".concat(u));
11WcmsFunctions.hideLoader(c);console.warn(d);a.failCallback&&a.failCallback(d)}).always(function(d){if(!f){var h=__assign(__assign({},z),{component:c});$(c).find(SearchInput.component).val(b.getSanitizedKeyword());SearchInput.showHideClear(c);if(d.stats){var m=d.stats.totalHits;d.documentList&&(m=d.stats.totalHits+d.documentList.numberOfAdditionalDocumentHits);w(c,d,h);if(m){h=$(c).find(WcmsConstants.hitsCounter);m=d.stats.totalHits;var t=$(h).html().trim(),A=20*d.pagination.currentPage<parseInt(m)?
1220*d.pagination.currentPage:parseInt(m);d=$(h).find("strong").html();A="1-".concat(A);t=t.replace(d,A);d=$(h).find(WcmsConstants.totalHitsCounter).html();t=t.replace(d,m);$(h).html(t);$(h).find('[data-js\x3d"keyword"]').html(b.getSanitizedKeyword());WcmsFunctions.showHitsCounter(c);WcmsFunctions.hideNoResultsNotification(c)}else $(WcmsConstants.noResultsNotification).find('[data-js\x3d"search-keyword"]').html(b.getSanitizedKeyword()),WcmsFunctions.hideHitsCounter(c),WcmsFunctions.showNoResultsNotification(c)}WcmsFunctions.hideLoader(c);
13SearchInput.closeSuggestions($(c).find(SearchInput.component))}})}}}})(Search||(Search={}));

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.