1"use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([[6284],{6284:(B,g,s)=>{s.r(g),s.d(g,{RecommendationsModule:()=>M,component:()=>$});var l=s(177),p=s(467),u=s(9379),o=s(3953),A=s(1210);const R={limit:5,weights:{source_target:50,recency:10,topicHierarchy:2,retentionTime:5},origin:"https://acm-dev.cloud.sprylabprojects.com/core",resourceBaseUrl:"https://acm-stage.sprylab.com/static/"};var C=s(4404),h=s(8179),T=s(8004),x=s(4748),D=s(7879);let y=(()=>{var t;class r extends A.${constructor(){super(...arguments),this.purpleEnv=(0,o.WQX)(D.r6),this.ssrService=(0,o.WQX)(x.i),this.eventActionService=(0,o.WQX)(T.G),this.defaultConfig=(0,u.A)({},R)}loadResources(){var e=this;return(0,p.A)(function*(){const n="".concat(e.config.resourceBaseUrl,"/acm.js"),a="".concat(e.config.resourceBaseUrl,"/setup/config.js"),E="".concat(e.config.resourceBaseUrl,"/acm.css");let i=document.querySelector('link[href="'.concat(E,'"]'));i||(i=document.createElement("link"),i.setAttribute("rel","stylesheet"),i.setAttribute("href",E),document.head.appendChild(i));const f=[];let m=document.querySelector('script[src="'.concat(n,'"]'));m||(m=document.createElement("script"),m.setAttribute("src",n),document.head.appendChild(m),f.push(new Promise(v=>m.addEventListener("load",v))));let d=document.querySelector('script[src="'.concat(a,'"]'));return d||(d=document.createElement("script"),d.setAttribute("src",a),document.head.appendChild(d),f.push(new Promise(v=>d.addEventListener("load",v)))),Promise.all(f)})()}onConfigChanges(){var e=this;return(0,p.A)(function*(){if((0,l.Vy)(e.platformId))return;yield e.loadResources();const n=e.contextService.getMetadata(),a=n[C.METADATA_KEY.ENTITLEMENT_LOGIN]||n[C.METADATA_KEY.DEVICE_ID];(0,l.UE)(e.platformId)&&e.purpleEnv.isUniversal&&(yield e.ssrService.prebootCompletedPromise),window.acm.recommend({acmConfig:{apiToken:e.config.apiToken}},{reader_id:a,item_id:e.config.item_id,limit:e.config.limit,weights:e.config.weights})})()}getEntryContext(e){return(0,u.A)((0,u.A)({},this.context),{},{acm_article:e})}onArticleClick(e){var n=this;return(0,p.A)(function*(){if(n.config.tapEntry){const a=(0,h.uQ)(n.config.tapEntry,n.getEntryContext(e),n.contextService.$functions,n.globalService.getGlobalData());yield n.eventActionService.processEventAction((0,h.v3)(a),n)}})()}getConfigEscapeProperties(){return[...super.getConfigEscapeProperties(),"tapEntry"]}}return(t=r).type="recommendations",t.\u0275fac=(()=>{let c;return function(n){return(c||(c=o.xGo(t)))(n||t)}})(),t.\u0275cmp=o.VBU({type:t,selectors:[["storefront-recommendations"]],standalone:!1,features:[o.Vt3],decls:1,vars:0,consts:[["id","acm-content-recommendations"]],template:function(e,n){1&e&&o.nrm(0,"div",0)},encapsulation:2}),r})();const S=["class","pxp-recommendations"];let L=(()=>{var t;class r extends y{}return(t=r).\u0275fac=(()=>{let c;return function(n){return(c||(c=o.xGo(t)))(n||t)}})(),t.\u0275cmp=o.VBU({type:t,selectors:[["div",8,"pxp-recommendations"]],standalone:!1,features:[o.Vt3],attrs:S,decls:1,vars:0,consts:[["id","acm-content-recommendations"]],template:function(e,n){1&e&&o.nrm(0,"div",0)},encapsulation:2}),r})(),M=(()=>{var t;class r{}return(t=r).\u0275fac=function(e){return new(e||t)},t.\u0275mod=o.$C({type:t}),t.\u0275inj=o.G2t({imports:[l.MD]}),r})();const $={component:y,leanDomComponent:L}}}]);
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.