PageSourceSearch

https://www.med24.se/resources/compiled/js/1791279962/med24/modules/bm-clerk.js?c=1ELcdq

js med24.se collected 2026-10-06 11:12:42 UTC 2,451 bytes, 2 lines download raw bytes

1import request from"request-promise";import Clerk from"clerk";const BMClerk={};var methodSpecifications={addPopularProducts:{method:"getPopularProducts",parameters:["callback","filter","limit","labels"],required:[]},addTrendingProducts:{method:"getTrendingProducts",parameters:["callback","filter","limit","labels"],required:[]},addRelatedProducts:{method:"getRelatedProducts",parameters:["productIDs","callback","filter","limit","labels"],required:["productIDs"]},addAlternativeProducts:{method:"getAlternativeProducts",parameters:["productIDs","callback","filter","limit","labels"],required:["productIDs"]},addPopularInCategory:{method:"getPopularInCategory",parameters:["categoryID","callback","filter","limit","labels"],required:["categoryID"]},addSearchResults:{method:"search",parameters:["query","callback","filter","limit","labels"],required:["query"]}};const createDocFragFromHTML=htmlString=>{return document.createRange().createContextualFragment(htmlString)};Object.keys(methodSpecifications).forEach(methodName=>{var spec=methodSpecifications[methodName];BMClerk[methodName]=(container,options)=>{if(void 0===container)throw'The "container" parameter is required for '+methodName+"(container, options)";if(options=options||{},spec.required.forEach(paramName=>{if(void 0===options[paramName])throw"The option "+paramName+" is required for "+methodName+"(container, options)"}),void 0!==options.callback)throw'The callback option can\'t be used as it is used internally, use the "completed" callback option instead';return new Promise(async(resolve,reject)=>{options.callback=clerkResponse=>{clerkResponse=clerkResponse.result;request.postURL("/esi/get-products-html",{products:JSON.stringify(clerkResponse)}).then(response=>{createDocFragFromHTML(response).querySelectorAll(".productThumb").forEach(productElement=>{productElement.classList.add("splide__slide");const productID=productElement.getAttribute("data-product-id");productElement.addEventListener("click",()=>{Clerk.logClick(productID)}),container.appendChild(productElement)}),resolve()}).catch(errData=>{console.error(errData),reject("BMClerk: Failed to load product objects",errData)})};var parameters=[];spec.parameters.forEach(paramName=>{parameters.push(options[paramName])}),Clerk[spec.method].apply(Clerk,parameters).catch((message,errData)=>{reject(message,errData)})})}});export default BMClerk;
2//# sourceMappingURL=/resources/compiled/js/med24/modules/bm-clerk.js.map

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.