@coveops/abi 1.5.7 → 1.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{p as e,b as r}from"./p-c10b6b7f.js";(()=>{const r=import.meta.url,t={};return""!==r&&(t.resourcesUrl=new URL(".",r).href),e(t)})().then((e=>r([["p-d5e62885",[[1,"faq-popup-component",{origin:[1],result:[32]}]]],["p-7282c5fe",[[1,"recs-initialization-helper",{userCountry:[1,"user-country"]}]]],["p-c0436bc1",[[0,"recs-results-manager"]]],["p-380ced38",[[0,"results-manager"]]],["p-9d42030c",[[1,"sample-component",{pagerState:[32],statusState:[32]}]]],["p-c602c74e",[[1,"standalone-searchbox-listener",null,[[8,"header/searchbox/query","handleStandaloneSearchbox"]]]]],["p-cd1744bb",[[1,"strip-html-component",{result:[32]}]]]],e)));
1
+ import{p as e,b as r}from"./p-c10b6b7f.js";(()=>{const r=import.meta.url,t={};return""!==r&&(t.resourcesUrl=new URL(".",r).href),e(t)})().then((e=>r([["p-d5e62885",[[1,"faq-popup-component",{origin:[1],result:[32]}]]],["p-b09970bf",[[1,"recs-initialization-helper",{userCountry:[1,"user-country"]}]]],["p-c0436bc1",[[0,"recs-results-manager"]]],["p-380ced38",[[0,"results-manager"]]],["p-9d42030c",[[1,"sample-component",{pagerState:[32],statusState:[32]}]]],["p-c602c74e",[[1,"standalone-searchbox-listener",null,[[8,"header/searchbox/query","handleStandaloneSearchbox"]]]]],["p-cd1744bb",[[1,"strip-html-component",{result:[32]}]]]],e)));
@@ -1 +1 @@
1
- import{w as i,a as c}from"./p-c82303fb.js";!async function(){await i();const I=document.querySelector("#search");I&&async function(i){await i.initialize({accessToken:"eyJhbGciOiJIUzI1NiJ9.eyJmaWx0ZXIiOiJAb2JqZWN0dHlwZT09RkFRIE9SIEBvYmplY3R0eXBlPT1BY2NvdW50IE9SIEB0YXJnZXRvcmc9PSh1YXQscHJvZHVjdGlvbikiLCJ2OCI6dHJ1ZSwidG9rZW5JZCI6InZ5MnJob3U0eTdjazJ2czd1Y3FwZDJzY3lhIiwib3JnYW5pemF0aW9uIjoiYW5oZXVzZXJidXNjaGluYmV2cHJvZCIsInVzZXJJZHMiOlt7InR5cGUiOiJVc2VyIiwibmFtZSI6ImFnbmllc3prYS5ub3Zha292YUBhYi1pbmJldi5jb20iLCJwcm92aWRlciI6IkVtYWlsIFNlY3VyaXR5IFByb3ZpZGVyIn1dLCJyb2xlcyI6WyJxdWVyeUV4ZWN1dG9yIl0sImlzcyI6IlNlYXJjaEFwaSIsImV4cCI6MTcyODQxOTcwNCwiaWF0IjoxNzI4MzMzMzA0fQ.KZjuzS5x8GlJY1E-wUAMpRFvUsMt0lurjDIS7bCBzEM",organizationId:"anheuserbuschinbevprod",platformUrl:"https://platform.cloud.coveo.com",preprocessRequest:(i,c,I)=>{if("searchApiFetch"==c&&"search"==(null==I?void 0:I.method)){i.url+="&viewAllContent=1";var e=JSON.parse(i.body);e.context={user_country_snow:"CZ"},i.body=JSON.stringify(e)}return i},search:{preprocessSearchResponseMiddleware:i=>(i.body.results.forEach((i=>(i.raw.snavatar&&(i.raw.resultpicture="https://abinbevwwdev.service-now.com/"+i.raw.snavatar),i))),i)}}),i.executeFirstSearch()}(I);const e=document.querySelector("#searchbox");e&&async function(i){await i.initialize({accessToken:"eyJhbGciOiJIUzI1NiJ9.eyJmaWx0ZXIiOiJAb2JqZWN0dHlwZT09RkFRIE9SIEBvYmplY3R0eXBlPT1BY2NvdW50IE9SIEB0YXJnZXRvcmc9PSh1YXQscHJvZHVjdGlvbikiLCJ2OCI6dHJ1ZSwidG9rZW5JZCI6InZ5MnJob3U0eTdjazJ2czd1Y3FwZDJzY3lhIiwib3JnYW5pemF0aW9uIjoiYW5oZXVzZXJidXNjaGluYmV2cHJvZCIsInVzZXJJZHMiOlt7InR5cGUiOiJVc2VyIiwibmFtZSI6ImFnbmllc3prYS5ub3Zha292YUBhYi1pbmJldi5jb20iLCJwcm92aWRlciI6IkVtYWlsIFNlY3VyaXR5IFByb3ZpZGVyIn1dLCJyb2xlcyI6WyJxdWVyeUV4ZWN1dG9yIl0sImlzcyI6IlNlYXJjaEFwaSIsImV4cCI6MTcyODQxOTcwNCwiaWF0IjoxNzI4MzMzMzA0fQ.KZjuzS5x8GlJY1E-wUAMpRFvUsMt0lurjDIS7bCBzEM",organizationId:"anheuserbuschinbevprod",platformUrl:"https://platform.cloud.coveo.com",preprocessRequest:(i,c,I)=>{if("searchApiFetch"==c&&"search"==(null==I?void 0:I.method)){i.url+="&viewAllContent=1";var e=JSON.parse(i.body);e.context={user_country_snow:"CZ"};var a=new CustomEvent("header/searchbox/query",{detail:e.q||""});window.dispatchEvent(a),i.body=JSON.stringify(e)}return i},analytics:{enabled:!1}})}(e),await c(),Array.from(document.querySelectorAll("atomic-recs-interface")).length&&async function(){var i;const c=document.querySelector("#recs");null===(i=c.querySelector("recs-initialization-helper"))||void 0===i||i.setAttribute("user-country","CZ"),await(null==c?void 0:c.initialize({accessToken:"eyJhbGciOiJIUzI1NiJ9.eyJmaWx0ZXIiOiJAb2JqZWN0dHlwZT09RkFRIE9SIEBvYmplY3R0eXBlPT1BY2NvdW50IE9SIEB0YXJnZXRvcmc9PSh1YXQscHJvZHVjdGlvbikiLCJ2OCI6dHJ1ZSwidG9rZW5JZCI6InZ5MnJob3U0eTdjazJ2czd1Y3FwZDJzY3lhIiwib3JnYW5pemF0aW9uIjoiYW5oZXVzZXJidXNjaGluYmV2cHJvZCIsInVzZXJJZHMiOlt7InR5cGUiOiJVc2VyIiwibmFtZSI6ImFnbmllc3prYS5ub3Zha292YUBhYi1pbmJldi5jb20iLCJwcm92aWRlciI6IkVtYWlsIFNlY3VyaXR5IFByb3ZpZGVyIn1dLCJyb2xlcyI6WyJxdWVyeUV4ZWN1dG9yIl0sImlzcyI6IlNlYXJjaEFwaSIsImV4cCI6MTcyODQxOTcwNCwiaWF0IjoxNzI4MzMzMzA0fQ.KZjuzS5x8GlJY1E-wUAMpRFvUsMt0lurjDIS7bCBzEM",organizationId:"anheuserbuschinbevprod",preprocessRequest:(i,c,I)=>{if("searchApiFetch"==c&&"recommendations"==(null==I?void 0:I.method)){var e=JSON.parse(i.body);e.context={user_country:"CZ",user_country_snow:"CZ",...e.context},i.body=JSON.stringify(e)}return i}}))}()}();
1
+ import{w as i,a as c}from"./p-c82303fb.js";!async function(){await i();const e=document.querySelector("#search");e&&async function(i){await i.initialize({accessToken:"eyJhbGciOiJIUzI1NiJ9.eyJmaWx0ZXIiOiJAb2JqZWN0dHlwZT09RkFRIE9SIEBvYmplY3R0eXBlPT1BY2NvdW50IE9SIEB0YXJnZXRvcmc9PSh1YXQscHJvZHVjdGlvbikiLCJ2OCI6dHJ1ZSwidG9rZW5JZCI6InZ5MnJob3U0eTdjazJ2czd1Y3FwZDJzY3lhIiwib3JnYW5pemF0aW9uIjoiYW5oZXVzZXJidXNjaGluYmV2cHJvZCIsInVzZXJJZHMiOlt7InR5cGUiOiJVc2VyIiwibmFtZSI6ImFnbmllc3prYS5ub3Zha292YUBhYi1pbmJldi5jb20iLCJwcm92aWRlciI6IkVtYWlsIFNlY3VyaXR5IFByb3ZpZGVyIn1dLCJyb2xlcyI6WyJxdWVyeUV4ZWN1dG9yIl0sImlzcyI6IlNlYXJjaEFwaSIsImV4cCI6MTcyODQxOTcwNCwiaWF0IjoxNzI4MzMzMzA0fQ.KZjuzS5x8GlJY1E-wUAMpRFvUsMt0lurjDIS7bCBzEM",organizationId:"anheuserbuschinbevprod",platformUrl:"https://platform.cloud.coveo.com",preprocessRequest:(i,c,e)=>{if("searchApiFetch"==c&&"search"==(null==e?void 0:e.method)){i.url+="&viewAllContent=1";var I=JSON.parse(i.body);I.context={user_country_snow:"CZ"},i.body=JSON.stringify(I)}return i},search:{preprocessSearchResponseMiddleware:i=>(i.body.results.forEach((i=>(i.raw.snavatar&&(i.raw.resultpicture="https://abinbevwwdev.service-now.com/"+i.raw.snavatar),i))),i)}}),i.executeFirstSearch()}(e);const I=document.querySelector("#searchbox");I&&async function(i){await i.initialize({accessToken:"eyJhbGciOiJIUzI1NiJ9.eyJmaWx0ZXIiOiJAb2JqZWN0dHlwZT09RkFRIE9SIEBvYmplY3R0eXBlPT1BY2NvdW50IE9SIEB0YXJnZXRvcmc9PSh1YXQscHJvZHVjdGlvbikiLCJ2OCI6dHJ1ZSwidG9rZW5JZCI6InZ5MnJob3U0eTdjazJ2czd1Y3FwZDJzY3lhIiwib3JnYW5pemF0aW9uIjoiYW5oZXVzZXJidXNjaGluYmV2cHJvZCIsInVzZXJJZHMiOlt7InR5cGUiOiJVc2VyIiwibmFtZSI6ImFnbmllc3prYS5ub3Zha292YUBhYi1pbmJldi5jb20iLCJwcm92aWRlciI6IkVtYWlsIFNlY3VyaXR5IFByb3ZpZGVyIn1dLCJyb2xlcyI6WyJxdWVyeUV4ZWN1dG9yIl0sImlzcyI6IlNlYXJjaEFwaSIsImV4cCI6MTcyODQxOTcwNCwiaWF0IjoxNzI4MzMzMzA0fQ.KZjuzS5x8GlJY1E-wUAMpRFvUsMt0lurjDIS7bCBzEM",organizationId:"anheuserbuschinbevprod",platformUrl:"https://platform.cloud.coveo.com",preprocessRequest:(i,c,e)=>{if("searchApiFetch"==c&&"search"==(null==e?void 0:e.method)){i.url+="&viewAllContent=1";var I=JSON.parse(i.body);I.context={user_country_snow:"CZ"};var n=new CustomEvent("header/searchbox/query",{detail:I.q||""});window.dispatchEvent(n),i.body=JSON.stringify(I)}return i},analytics:{enabled:!1}})}(I),await c(),Array.from(document.querySelectorAll("atomic-recs-interface")).length&&async function(){var i;const c=document.querySelector("#recs");null===(i=c.querySelector("recs-initialization-helper"))||void 0===i||i.setAttribute("user-country","BE"),await(null==c?void 0:c.initialize({accessToken:"eyJhbGciOiJIUzI1NiJ9.eyJmaWx0ZXIiOiJAb2JqZWN0dHlwZT09RkFRIE9SIEBvYmplY3R0eXBlPT1BY2NvdW50IE9SIEB0YXJnZXRvcmc9PSh1YXQscHJvZHVjdGlvbikiLCJ2OCI6dHJ1ZSwidG9rZW5JZCI6InZ5MnJob3U0eTdjazJ2czd1Y3FwZDJzY3lhIiwib3JnYW5pemF0aW9uIjoiYW5oZXVzZXJidXNjaGluYmV2cHJvZCIsInVzZXJJZHMiOlt7InR5cGUiOiJVc2VyIiwibmFtZSI6ImFnbmllc3prYS5ub3Zha292YUBhYi1pbmJldi5jb20iLCJwcm92aWRlciI6IkVtYWlsIFNlY3VyaXR5IFByb3ZpZGVyIn1dLCJyb2xlcyI6WyJxdWVyeUV4ZWN1dG9yIl0sImlzcyI6IlNlYXJjaEFwaSIsImV4cCI6MTcyODQxOTcwNCwiaWF0IjoxNzI4MzMzMzA0fQ.KZjuzS5x8GlJY1E-wUAMpRFvUsMt0lurjDIS7bCBzEM",organizationId:"anheuserbuschinbevprod",preprocessRequest:(i,c,e)=>{if("searchApiFetch"==c&&"recommendations"==(null==e?void 0:e.method)){i.url+="&viewAllContent=1";var I=JSON.parse(i.body);I.context={user_country:"CZ",user_country_snow:"CZ",...I.context},i.body=JSON.stringify(I)}return i}}))}()}();
@@ -0,0 +1 @@
1
+ import{r as t,g as e}from"./p-c10b6b7f.js";import{i as s,Q as o}from"./p-ac870f21.js";import{w as a}from"./p-c82303fb.js";import"./p-d20ee37c.js";const c=class{constructor(e){t(this,e)}async connectedCallback(){var t;try{await a(),this.bindings=await s(this.host);let e=(new Date).toISOString(),c=new Date;1==c.getMonth()?(c.setMonth(12),c.setFullYear(c.getFullYear()-1)):c.setMonth(c.getMonth()-1);let i=encodeURIComponent(`(clicks.c_context_user_country_snow=='${this.userCountry}')`),n=`https://${null===(t=this.bindings)||void 0===t?void 0:t.engine.state.configuration.organizationId}.admin.org.coveo.com/rest/ua/v15/stats/combinedData?from=${c.toISOString()}&to=${e}&m=DocumentView&d=documentTitle&d=documentURL&d=clicks.c_context_user_country_snow&d=documentSysUriHash&f=${i}&p=1&n=10&s=DocumentView&asc=false&includeMetadata=true`;const r=new Headers;r.append("authorization","Bearer xxf42da36f-db11-4565-8358-8bac8c307236");const d={method:"GET",headers:r};let m=await fetch(n,d);if(m=await m.json(),m.combinations.length>0){let t=m.combinations.map((t=>t.documentSysUriHash));o(this.bindings.engine).add("dqExp",t),this.bindings.interfaceElement.getRecommendations()}else this.bindings.interfaceElement.style.display="none"}catch(t){console.error(t)}}get host(){return e(this)}};export{c as recs_initialization_helper}