diff --git a/blocks/header/coveo-body-requests.js b/blocks/header/coveo-body-requests.js new file mode 100644 index 00000000..c06d37cd --- /dev/null +++ b/blocks/header/coveo-body-requests.js @@ -0,0 +1,819 @@ +export const suggestions = { + count: 8, + q: '', + locale: 'en', + timezone: 'America/New_York', + pipeline: 'Danaher Marketplace', + searchHub: 'DanaherMainSearch', + visitorId: 'd8c6a2a1-84e4-4d6f-b262-b91ad50a4c44', +}; + +const common = { + locale: 'en', + debug: false, + tab: 'default', + numberOfResults: 10, + enableDidYouMean: true, + enableQuerySyntax: false, + sortCriteria: 'relevancy', + timezone: 'America/New_York', + visitorId: '147f954b-ddc1-4834-8f71-0de880f7283f', + referrer: 'https://stage.lifesciences.danaher.com', + q: '', + actionsHistory: [ + { + name: 'Query', + time: '\'2024-03-04T22:26:29.769Z\'', + }, + { + name: 'Query', + time: '\'2024-03-04T22:25:42.258Z\'', + value: 'men', + }, + { + name: 'Query', + time: '\'2024-03-04T22:25:35.892Z\'', + }, + { + name: 'Query', + time: '\'2024-03-04T22:25:02.692Z\'', + value: 'sand', + }, + { + name: 'Query', + time: '\'2024-03-04T22:24:46.716Z\'', + }, + ], + fieldsToInclude: [ + 'author', + 'language', + 'urihash', + 'objecttype', + 'collection', + 'source', + 'permanentid', + 'date', + 'filetype', + 'parents', + 'ec_price', + 'ec_name', + 'ec_description', + 'ec_brand', + 'ec_category', + 'ec_item_group_id', + 'ec_shortdesc', + 'ec_thumbnails', + 'ec_images', + 'ec_promo_price', + 'ec_in_stock', + 'ec_rating', + 'cat_rating_count', + 'brand', + 'images', + 'sku', + 'title', + 'description', + 'richdescription', + 'opco', + 'contenttype', + 'documenttype', + 'pagetype', + 'shortspecifications', + 'specificationsjson', + 'bundlepreviewjson', + ], + analytics: { + clientId: '147f954b-ddc1-4834-8f71-0de880f7283f', + clientTimestamp: '2024-03-04T22:28:18.381Z', + documentReferrer: 'default', + originContext: 'Search', + documentLocation: 'https://atomicv2-mcgfqb.stackblitz.io/examples/fashion.html', + capture: false, + }, + context: { + host: 'stage.lifesciences.danaher.com', + internal: false, + }, + facetOptions: { + freezeFacetOrder: true, + }, +}; + +export const facets = [ + { + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 8, + sortCriteria: 'automatic', + resultsMustMatch: 'atLeastOneValue', + type: 'specific', + currentValues: [ + { + value: 'Document', + state: 'idle', + }, + { + value: 'Product', + state: 'idle', + }, + { + value: 'Webpage', + state: 'idle', + }, + ], + freezeCurrentValues: true, + isFieldExpanded: false, + preventAutoSelect: true, + facetId: 'ContentType', + field: 'contenttype', + }, + { + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 8, + sortCriteria: 'automatic', + resultsMustMatch: 'atLeastOneValue', + type: 'specific', + currentValues: [ + { + value: 'Blog', + state: 'idle', + }, + { + value: 'Document', + state: 'idle', + }, + { + value: 'News', + state: 'idle', + }, + { + value: 'Other', + state: 'idle', + }, + { + value: 'Product', + state: 'idle', + }, + { + value: 'Technical Library', + state: 'idle', + }, + { + value: 'Workflow', + state: 'idle', + }, + ], + freezeCurrentValues: false, + isFieldExpanded: false, + preventAutoSelect: false, + facetId: 'PageType', + field: 'pagetype', + }, + { + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 8, + sortCriteria: 'automatic', + resultsMustMatch: 'atLeastOneValue', + type: 'specific', + currentValues: [ + { + value: 'Beckman Coulter Life Sciences', + state: 'idle', + }, + { + value: 'Phenomenex', + state: 'idle', + }, + { + value: 'Leica Microsystems', + state: 'idle', + }, + { + value: 'Molecular Devices', + state: 'idle', + }, + { + value: 'SCIEX', + state: 'idle', + }, + { + value: 'Beckman Coulter', + state: 'idle', + }, + { + value: 'IDBS', + state: 'idle', + }, + { + value: 'Leica Microsystems;Molecular Devices', + state: 'idle', + }, + ], + freezeCurrentValues: false, + isFieldExpanded: false, + preventAutoSelect: false, + facetId: 'Brand', + field: 'opco', + }, + { + delimitingCharacter: '|', + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 8, + sortCriteria: 'occurrences', + basePath: [], + filterByBasePath: true, + resultsMustMatch: 'atLeastOneValue', + currentValues: [], + preventAutoSelect: false, + type: 'hierarchical', + facetId: 'ProductType', + field: 'categoriesname', + }, + { + delimitingCharacter: '|', + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 8, + sortCriteria: 'occurrences', + basePath: [], + filterByBasePath: true, + resultsMustMatch: 'atLeastOneValue', + currentValues: [], + preventAutoSelect: false, + type: 'hierarchical', + facetId: 'ProcessStep', + field: 'workflowname', + }, + { + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 8, + sortCriteria: 'automatic', + resultsMustMatch: 'atLeastOneValue', + type: 'specific', + currentValues: [], + freezeCurrentValues: false, + isFieldExpanded: false, + preventAutoSelect: false, + facetId: 'SubBrand', + field: 'brand', + }, + { + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 8, + sortCriteria: 'automatic', + resultsMustMatch: 'atLeastOneValue', + type: 'specific', + currentValues: [], + freezeCurrentValues: false, + isFieldExpanded: false, + preventAutoSelect: false, + facetId: 'ProductClass', + field: 'productclass', + }, + { + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 8, + sortCriteria: 'automatic', + resultsMustMatch: 'atLeastOneValue', + type: 'specific', + currentValues: [], + freezeCurrentValues: false, + isFieldExpanded: false, + preventAutoSelect: false, + facetId: 'DocumentType', + field: 'documenttype', + }, +]; + +export const facetSelect = { + pipeline: 'Danaher Marketplace', + searchHub: 'DanaherMainSearch', + ...common, + facets: [...facets], +}; + +export const finishType = { + pipeline: 'Search', + searchHub: 'MainSearch', + ...common, + facets: [...facets], +}; + +export const quickSearch = { + locale: 'en', + timezone: 'America/New_York', + searchHub: 'default', + visitorId: '48e4da72-35f0-43ec-9c61-a6aed682e6c3', + debug: false, + tab: 'default', + referrer: 'default', + actionsHistory: [ + { + name: 'Query', + time: '\'2024-03-04T22:19:01.829Z\'', + value: 'this is beacon testing', + }, + { + name: 'Query', + time: '\'2024-03-04T22:17:18.017Z\'', + value: 'promega corporation', + }, + { + name: 'Query', + time: '\'2024-03-04T22:17:10.215Z\'', + }, + { + name: 'Query', + time: '\'2024-03-04T20:02:41.386Z\'', + value: 'bank', + }, + { + name: 'Query', + time: '\'2024-03-04T20:02:32.491Z\'', + }, + { + name: 'Query', + time: '\'2024-03-04T18:21:47.520Z\'', + }, + { + name: 'Query', + time: '\'2024-03-04T18:20:23.534Z\'', + }, + { + name: 'Query', + time: '\'2024-03-04T16:53:48.016Z\'', + value: 'bank', + }, + { + name: 'Query', + time: '\'2024-03-04T16:52:20.699Z\'', + }, + { + name: 'Query', + time: '\'2024-03-04T16:47:47.427Z\'', + }, + { + name: 'Query', + time: '\'2024-02-21T14:10:02.721Z\'', + }, + { + name: 'Query', + time: '\'2024-02-20T18:58:45.364Z\'', + }, + { + name: 'Query', + time: '\'2024-02-20T18:45:48.757Z\'', + }, + { + name: 'Query', + time: '\'2024-02-20T18:43:58.682Z\'', + }, + { + name: 'Query', + time: '\'2023-12-07T19:35:58.897Z\'', + }, + { + name: 'Query', + time: '\'2023-12-07T19:34:42.960Z\'', + }, + { + name: 'Query', + time: '\'2023-12-07T19:34:33.361Z\'', + value: 'covid', + }, + { + name: 'Query', + time: '\'2023-12-07T19:33:31.851Z\'', + }, + { + name: 'Query', + time: '\'2023-12-07T19:33:28.699Z\'', + value: 'bank', + }, + { + name: 'Query', + time: '\'2023-12-07T19:33:26.959Z\'', + value: 'the bank', + }, + ], + fieldsToInclude: [ + 'author', + 'language', + 'urihash', + 'objecttype', + 'collection', + 'source', + 'permanentid', + 'date', + 'filetype', + 'parents', + 'ec_price', + 'ec_name', + 'ec_description', + 'ec_brand', + 'ec_category', + 'ec_item_group_id', + 'ec_shortdesc', + 'ec_thumbnails', + 'ec_images', + 'ec_promo_price', + 'ec_in_stock', + 'ec_rating', + 'snrating', + 'sncost', + ], + q: '', + enableQuerySyntax: false, + sortCriteria: 'relevancy', + queryCorrection: { + enabled: false, + options: { + automaticallyCorrect: 'whenNoResults', + }, + }, + enableDidYouMean: true, + facets: [ + { + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 6, + sortCriteria: 'occurrences', + resultsMustMatch: 'atLeastOneValue', + type: 'specific', + currentValues: [ + { + value: 'Image', + state: 'idle', + }, + { + value: 'lithiummessage', + state: 'idle', + }, + { + value: 'lithiumthread', + state: 'idle', + }, + { + value: 'pdf', + state: 'idle', + }, + ], + freezeCurrentValues: false, + isFieldExpanded: false, + preventAutoSelect: false, + facetId: 'filetype', + field: 'filetype', + }, + { + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 8, + sortCriteria: 'automatic', + resultsMustMatch: 'atLeastOneValue', + type: 'specific', + currentValues: [ + { + value: 'Coveo Sample - Lithium Community', + state: 'idle', + }, + ], + freezeCurrentValues: false, + isFieldExpanded: false, + preventAutoSelect: false, + facetId: 'source', + field: 'source', + }, + { + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 8, + sortCriteria: 'automatic', + resultsMustMatch: 'atLeastOneValue', + type: 'specific', + currentValues: [ + { + value: '2021', + state: 'idle', + }, + { + value: '2022', + state: 'idle', + }, + { + value: '2023', + state: 'idle', + }, + ], + freezeCurrentValues: false, + isFieldExpanded: false, + preventAutoSelect: false, + facetId: 'year', + field: 'year', + }, + { + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 7, + sortCriteria: 'descending', + rangeAlgorithm: 'even', + resultsMustMatch: 'atLeastOneValue', + currentValues: [ + { + start: '2024/03/04@17:19:01', + end: '2034/03/04@17:19:01', + endInclusive: false, + state: 'idle', + }, + { + start: '2024/03/04@16:19:01', + end: '2024/03/04@17:19:01', + endInclusive: false, + state: 'idle', + }, + { + start: '2024/03/03@17:19:01', + end: '2024/03/04@17:19:01', + endInclusive: false, + state: 'idle', + }, + { + start: '2024/02/26@17:19:01', + end: '2024/03/04@17:19:01', + endInclusive: false, + state: 'idle', + }, + { + start: '2024/02/04@17:19:01', + end: '2024/03/04@17:19:01', + endInclusive: false, + state: 'idle', + }, + { + start: '2023/12/04@17:19:01', + end: '2024/03/04@17:19:01', + endInclusive: false, + state: 'idle', + }, + { + start: '2023/03/04@17:19:01', + end: '2024/03/04@17:19:01', + endInclusive: false, + state: 'idle', + }, + ], + preventAutoSelect: false, + type: 'dateRange', + facetId: 'date', + field: 'date', + generateAutomaticRanges: false, + }, + { + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 1, + sortCriteria: 'ascending', + rangeAlgorithm: 'even', + resultsMustMatch: 'atLeastOneValue', + currentValues: [], + preventAutoSelect: false, + type: 'dateRange', + facetId: 'date_input_range', + generateAutomaticRanges: true, + field: 'date', + }, + { + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 0, + sortCriteria: 'ascending', + rangeAlgorithm: 'even', + resultsMustMatch: 'atLeastOneValue', + currentValues: [], + preventAutoSelect: false, + type: 'dateRange', + facetId: 'date_input', + field: 'date', + generateAutomaticRanges: false, + }, + { + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 6, + sortCriteria: 'automatic', + resultsMustMatch: 'atLeastOneValue', + type: 'specific', + currentValues: [], + freezeCurrentValues: false, + isFieldExpanded: false, + preventAutoSelect: false, + facetId: 'inat_kingdom', + field: 'inat_kingdom', + hasBreadcrumbs: false, + }, + { + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 8, + sortCriteria: 'automatic', + resultsMustMatch: 'atLeastOneValue', + type: 'specific', + currentValues: [ + { + value: 'mardueng', + state: 'idle', + }, + ], + freezeCurrentValues: false, + isFieldExpanded: false, + preventAutoSelect: false, + facetId: 'author', + field: 'author', + }, + { + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 8, + sortCriteria: 'automatic', + resultsMustMatch: 'atLeastOneValue', + type: 'specific', + currentValues: [], + freezeCurrentValues: false, + isFieldExpanded: false, + preventAutoSelect: false, + facetId: 'inat_family', + field: 'inat_family', + }, + { + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 8, + sortCriteria: 'automatic', + resultsMustMatch: 'atLeastOneValue', + type: 'specific', + currentValues: [], + freezeCurrentValues: false, + isFieldExpanded: false, + preventAutoSelect: false, + facetId: 'inat_class', + field: 'inat_class', + }, + { + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 8, + sortCriteria: 'ascending', + rangeAlgorithm: 'equiprobable', + resultsMustMatch: 'atLeastOneValue', + currentValues: [], + preventAutoSelect: false, + type: 'numericalRange', + facetId: 'sncost', + field: 'sncost', + generateAutomaticRanges: true, + }, + { + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 1, + sortCriteria: 'ascending', + rangeAlgorithm: 'equiprobable', + resultsMustMatch: 'atLeastOneValue', + currentValues: [], + preventAutoSelect: false, + type: 'numericalRange', + generateAutomaticRanges: true, + facetId: 'ytviewcount_input_range', + field: 'ytviewcount', + }, + { + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 0, + sortCriteria: 'ascending', + rangeAlgorithm: 'even', + resultsMustMatch: 'atLeastOneValue', + currentValues: [], + preventAutoSelect: false, + type: 'numericalRange', + facetId: 'ytviewcount_input', + field: 'ytviewcount', + generateAutomaticRanges: false, + }, + { + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 5, + sortCriteria: 'descending', + rangeAlgorithm: 'even', + resultsMustMatch: 'atLeastOneValue', + currentValues: [ + { + start: 5, + end: 5, + endInclusive: true, + state: 'idle', + }, + { + start: 4, + end: 5, + endInclusive: true, + state: 'idle', + }, + { + start: 3, + end: 5, + endInclusive: true, + state: 'idle', + }, + { + start: 2, + end: 5, + endInclusive: true, + state: 'idle', + }, + { + start: 1, + end: 5, + endInclusive: true, + state: 'idle', + }, + ], + preventAutoSelect: false, + type: 'numericalRange', + facetId: 'snrating_range', + field: 'snrating', + generateAutomaticRanges: false, + }, + { + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 5, + sortCriteria: 'descending', + rangeAlgorithm: 'even', + resultsMustMatch: 'atLeastOneValue', + currentValues: [ + { + start: 5, + end: 6, + endInclusive: false, + state: 'idle', + }, + { + start: 4, + end: 5, + endInclusive: false, + state: 'idle', + }, + { + start: 3, + end: 4, + endInclusive: false, + state: 'idle', + }, + { + start: 2, + end: 3, + endInclusive: false, + state: 'idle', + }, + { + start: 1, + end: 2, + endInclusive: false, + state: 'idle', + }, + ], + preventAutoSelect: false, + type: 'numericalRange', + facetId: 'snrating', + field: 'snrating', + generateAutomaticRanges: false, + }, + { + delimitingCharacter: ';', + filterFacetCount: true, + injectionDepth: 1000, + numberOfValues: 8, + sortCriteria: 'occurrences', + basePath: [], + filterByBasePath: true, + resultsMustMatch: 'atLeastOneValue', + currentValues: [], + preventAutoSelect: false, + type: 'hierarchical', + facetId: 'geographicalhierarchy', + field: 'geographicalhierarchy', + }, + ], + numberOfResults: 10, + firstResult: 0, + facetOptions: { + freezeFacetOrder: false, + }, +}; diff --git a/blocks/header/header.js b/blocks/header/header.js index 1cfd142e..8c04f81d 100644 --- a/blocks/header/header.js +++ b/blocks/header/header.js @@ -1,12 +1,21 @@ import { - span, div, a, input, button, h4, ul, li, + span, div, a, input, button, h3, h4, ul, li, p, h1, } from '../../scripts/dom-builder.js'; import { decorateIcons } from '../../scripts/lib-franklin.js'; import { getAuthorization, getCommerceBase, isLoggedInUser, makeCoveoApiRequest, } from '../../scripts/commerce.js'; -import { getCookie } from '../../scripts/scripts.js'; +import { createRequest, debounce, getCookie } from '../../scripts/scripts.js'; +import { + facetSelect, + finishType, + suggestions, +} from './coveo-body-requests.js'; + +let payload = { ...finishType }; +const facetsCollection = {}; +let searchString = ''; const baseURL = getCommerceBase(); @@ -14,6 +23,9 @@ const COVEO_SEARCH_HUB = 'DanaherMainSearch'; const COVEO_PIPELINE = 'Danaher Marketplace'; const COVEO_MAX_RECENT_SEARCHES = 3; +const organizationId = window.DanaherConfig.searchOrg; +const bearerToken = window.DanaherConfig.searchKey; + let selectedSuggestionIndex = -1; function shortName(user) { @@ -30,10 +42,6 @@ function getUser() { return undefined; } -function formatSuggestionString(highlightedText, inputText) { - return highlightedText.replace(/\[([^\]]+)\]/g, inputText ? '$1' : '$1').replace(/\{([^}]+)\}/g, '$1'); -} - function getRecentSearches() { const recentSearchesString = localStorage.getItem('coveo-recent-queries'); const recentSearches = recentSearchesString ? JSON.parse(recentSearchesString) : []; @@ -62,7 +70,7 @@ function getCoveoApiPayload(searchValue, type) { const clientId = getCookie('coveo_visitorId'); const searchHistoryString = localStorage.getItem('__coveo.analytics.history'); const searchHistory = searchHistoryString ? JSON.parse(searchHistoryString) : []; - const payload = { + const coveoPayload = { analytics: { clientId, clientTimestamp: userTimestamp, @@ -79,14 +87,15 @@ function getCoveoApiPayload(searchValue, type) { }; if (type === 'search') { - payload.actionsHistory = searchHistory.map(({ time, value, name }) => ({ time, value, name })); - payload.clientId = clientId; - payload.clientTimestamp = userTimestamp; - payload.originContext = 'Search'; - payload.count = 8; - payload.referrer = document.referrer; + // eslint-disable-next-line max-len + coveoPayload.actionsHistory = searchHistory.map(({ time, value, name }) => ({ time, value, name })); + coveoPayload.clientId = clientId; + coveoPayload.clientTimestamp = userTimestamp; + coveoPayload.originContext = 'Search'; + coveoPayload.count = 8; + coveoPayload.referrer = document.referrer; } - return payload; + return coveoPayload; } async function submitSearchQuery(searchInput, actionCause = '') { @@ -119,75 +128,6 @@ async function submitSearchQuery(searchInput, actionCause = '') { } } -function buildSearchSuggestion(searchText, suggestionType = 'suggestion') { - const searchSuggestion = button( - { - class: 'suggestion flex px-4 min-h-[40px] items-center text-left cursor-pointer hover:bg-danahergray-100', - 'data-suggestion-type': suggestionType, - }, - div( - { - class: 'flex items-center', - }, - span({ - class: 'w-4 h-4 mr-2 shrink-0 search-suggestion-icon', - }), - span({ class: 'search-suggestion-text break-all line-clamp-2' }), - ), - ); - searchSuggestion.querySelector('span.search-suggestion-icon').innerHTML = suggestionType === 'recent' - ? ` - - - - ` - : ` - - - - `; - searchSuggestion.querySelector('span.search-suggestion-text').innerHTML = searchText; - searchSuggestion.addEventListener('click', async (e) => { - const searchInput = e.target.closest('.searchbox').querySelector('input'); - searchInput.value = e.target.closest('button').querySelector('span.search-suggestion-text').innerText; - searchInput.focus(); - await submitSearchQuery(searchInput, suggestionType === 'recent' ? 'searchFromLink' : 'omniboxFromLink'); - }); - return searchSuggestion; -} - -async function buildSearchSuggestions(searchbox) { - selectedSuggestionIndex = -1; - const searchboxInput = searchbox.querySelector('input'); - const inputText = searchboxInput.value; - const requestPayload = getCoveoApiPayload(inputText, 'search'); - const suggestionsResponseData = await makeCoveoApiRequest('/rest/search/v2/querySuggest', 'searchKey', requestPayload); - const suggestions = suggestionsResponseData.completions; - const wrapper = searchbox.querySelector('.search-suggestions-wrapper'); - const searchSuggestions = wrapper.querySelector('.search-suggestions'); - searchSuggestions.innerHTML = ''; - const recentSearches = getRecentSearches(); - if (!inputText && recentSearches.length > 0) { - const recentSearchesHeading = div( - { class: 'flex items-center px-4 py-2 text-danahergrey-900' }, - span({ class: 'font-bold' }, 'Recent Searches'), - button({ - class: 'ml-auto text-sm hover:text-cyan-600', - onclick: () => { - localStorage.removeItem('coveo-recent-queries'); - buildSearchSuggestions(searchbox); - searchboxInput.focus(); - }, - }, 'Clear'), - ); - searchSuggestions.append(recentSearchesHeading); - recentSearches.forEach((recentSearch) => searchSuggestions.append(buildSearchSuggestion(recentSearch, 'recent'))); - } - suggestions.forEach((suggestion) => searchSuggestions.append( - buildSearchSuggestion(formatSuggestionString(suggestion.highlighted, inputText), 'suggestion'), - )); -} - function handleSearchClear(searchBox, searchInput) { const clearIcon = searchBox.querySelector('.searchbox-clear'); if (searchInput.value) { @@ -201,22 +141,13 @@ async function handleSearchInput(e) { const { target } = e; const searchBox = target.closest('.searchbox'); handleSearchClear(searchBox, target); - await buildSearchSuggestions(searchBox); } function addEventToSearchInput(searchBlock) { const searchbox = searchBlock.querySelector('.searchbox'); const searchInput = searchbox.querySelector('input'); - searchBlock.querySelector('.searchbox-clear').addEventListener('click', async (e) => { - const { target } = e; - searchInput.value = ''; - searchInput.focus(); - target.closest('.searchbox-clear').classList.add('hidden'); - await buildSearchSuggestions(searchbox); - }); searchInput.addEventListener('input', handleSearchInput); searchInput.addEventListener('focusin', async () => { - await buildSearchSuggestions(searchbox); searchbox.querySelector('.search-suggestions-wrapper').classList.remove('hidden'); }); searchInput.addEventListener('focusout', (e) => { @@ -264,21 +195,23 @@ function addEventToSearchInput(searchBlock) { } function getSearchInput() { + const coveoSearch = div( + { + class: 'grow flex items-center', + }, + input({ + type: 'text', + placeholder: 'Search', + id: 'search-by-coveo', + class: 'h-full outline-none bg-transparent w-full grow px-4 py-3.5 text-lg', + title: 'Search field with suggestions. Suggestions may be available under this field. To send, press Enter.', + }), + ); const inputWrapper = div( { class: 'w-full relative flex bg-gray-50 border border-gray-600 rounded-lg focus-within:ring focus-within:border-primary focus-within:ring-ring-primary', }, - div( - { - class: 'grow flex items-center', - }, - input({ - type: 'text', - placeholder: 'Search', - class: 'h-full outline-none bg-transparent w-full grow px-4 py-3.5 text-lg', - title: 'Search field with suggestions. Suggestions may be available under this field. To send, press Enter.', - }), - ), + coveoSearch, div( { class: 'py-2' }, button( @@ -402,11 +335,7 @@ function buildLoginBlock(loginLink) { loginLink.className = 'text-black hover:text-black relative lg:inline-flex text-xs font-semibold'; const loginIcon = loginLink.querySelector('span'); loginIcon.className = ''; - loginIcon.innerHTML = ` - - `; + loginIcon.append(span({ class: 'icon icon-user [&_svg]:w-7 [&_svg]:h-7' })); const loginSpan = span({ class: 'w-12 pl-2 lg:block hidden lg:inline' }, loginLink.textContent); loginLink.setAttribute('aria-label', loginLink.textContent.trim()); loginLink.textContent = ''; @@ -517,9 +446,6 @@ function buildSearchBlock(headerBlock) { sortFlyoutMenus('Menu'); }); addEventToSearchInput(searchHtmlBlock); - // searchIcon.addEventListener('click', () => { - // console.log('CLicked'); - // }); } function buildNavBlock(headerBlock) { @@ -680,6 +606,308 @@ async function getQuote(headerBlock, authHeader) { } } +async function makeCoveoSearchRequest(url, stringifiedPayload) { + const request = await createRequest({ + url, + method: 'POST', + authToken: bearerToken, + body: stringifiedPayload, + }); + // eslint-disable-next-line no-unused-vars + const response = await request.json(); + return response; +} + +function decorateViewResultsURL() { + const queryParam = new URLSearchParams(''); + if ( + ( + Object.keys(payload).length > 0 + && payload.q && payload.q !== '' + ) + || Object.keys(facetsCollection).length > 0 + ) { + if (Object.keys(payload).length > 0 && payload.q && payload.q !== '') { + queryParam.append('q', encodeURI(payload.q)); + } + if (Object.keys(facetsCollection).length > 0) { + Object.keys(facetsCollection).forEach((facetCollectKey) => { + queryParam.append(`f-${facetCollectKey}`, encodeURI(facetsCollection[facetCollectKey].join(','))); + }); + } + const allSearchResultAnchors = document.querySelectorAll('#search-container a'); + const queryParameters = queryParam.toString().replaceAll('25', '').replaceAll('%2C', ','); + if (allSearchResultAnchors.length > 0) { + allSearchResultAnchors.forEach((searchResultAnchors) => { + searchResultAnchors.href = `https://lifesciences.danaher.com/us/en/search.html#${queryParameters}`; + }); + document.querySelector('#search-container .icon-search').addEventListener('click', () => { + window.location = `https://lifesciences.danaher.com/us/en/search.html#${queryParameters}`; + }); + } + } +} + +const facetAction = debounce(async (selected, listType, mode) => { + const url = `https://${organizationId}.org.coveo.com/rest/search/v2`; + const query = document.querySelector('#search-input')?.value; + const payloadJSON = { + ...payload, + ...{ + facets: payload?.facets.map((facet) => { + if (facet.facetId === listType) { + facet.currentValues.forEach((curFacVal, curFacValIndex) => { + if (curFacVal.value === selected.value) { + facet.currentValues[curFacValIndex].state = (mode === 'select') ? 'selected' : 'idle'; + } + }); + } + return facet; + }), + q: query, + fieldsToInclude: facetSelect.fieldsToInclude, + pipeline: facetSelect.pipeline, + context: facetSelect.context, + searchHub: facetSelect.searchHub, + sortCriteria: facetSelect.sortCriteria, + }, + }; + const { facets, totalCount = 0 } = await makeCoveoSearchRequest(url, JSON.stringify(payloadJSON)); + payload = { ...payload, ...{ q: query, facets: payloadJSON?.facets } }; + // eslint-disable-next-line no-use-before-define + decorateSearchPopup(facets, totalCount); +}, 100); + +function decorateSearchPopup(facets, totalCount) { + const searchContent = document.querySelector('#search-content'); + searchContent.innerHTML = ''; + if (facets && facets.length > 0) { + const facetWithContent = facets.filter((facet) => facet.values.length > 0); + for ( + let facetCategoryIndex = 0; + facetCategoryIndex < facetWithContent.length; + facetCategoryIndex += 1 + ) { + const { values: facetValues, facetId } = facetWithContent[facetCategoryIndex]; + const listType = facetId; + const facetGroup = div({ class: 'flex flex-col' }); + const facetList = ul({ class: 'flex flex-row flex-wrap md:flex-col gap-x-2 gap-y-3 pl-3 border-l-0 md:border-l border-black' }); + if (facetValues.length > 0) { + for (let facetIndex = 0; facetIndex < facetValues.length; facetIndex += 1) { + const searchExistingFacet = listType in facetsCollection + && facetsCollection[listType].includes(facetValues[facetIndex].value); + if ( + facetValues[facetIndex].value + && (!searchExistingFacet) + && facetValues[facetIndex].numberOfResults + && facetValues[facetIndex].numberOfResults > 0 + ) { + const facetElement = li( + { + class: 'w-max px-4 py-2 rounded-full select-none bg-danaherpurple-25 hover:bg-danaherpurple-50 text-base leading-5 text-danaherpurple-800 font-normal flex items-center gap-x-2 cursor-pointer', + title: facetValues[facetIndex].value, + onclick: () => { + facetsCollection[listType] = Object.keys(facetsCollection).length > 0 + && listType in facetsCollection ? facetsCollection[listType] : []; + facetsCollection[listType].push(facetValues[facetIndex].value); + facetAction(facetValues[facetIndex], listType, 'select'); + const searchInput = document.querySelector('#search-input'); + const selectedFacet = span( + { + id: `facet-${facetValues[facetIndex].value}`, + class: 'flex gap-x-2 pr-[5px] py-[5px] pl-4 text-white bg-danaherpurple-500 rounded-full select-none cursor-pointer facet-selected group', + title: facetValues[facetIndex].value, + onclick: () => { + if (listType in facetsCollection) { + if (facetsCollection[listType].length === 0) { + delete facetsCollection[listType]; + } else { + // eslint-disable-next-line max-len + const facetItemIndex = facetsCollection[listType].indexOf(facetValues[facetIndex].value); + facetsCollection[listType].splice(facetItemIndex, 1); + } + } + facetAction(facetValues[facetIndex], listType, 'idle'); + searchInput.parentElement.removeChild(selectedFacet); + }, + }, + span( + { class: 'max-w-24 truncate' }, + facetValues[facetIndex].value, + ), + span({ class: 'icon icon-close w-5 h-5 my-auto p-1 text-black fill-current cursor-pointer bg-danaherpurple-25 group-hover:bg-danaherpurple-25/60 rounded-full [&_svg]:transition-transform [&_svg]:group-hover:scale-110' }), + ); + decorateIcons(selectedFacet); + searchInput.parentElement.insertBefore(selectedFacet, searchInput); + }, + }, + span( + { class: 'max-w-[7rem] truncate' }, + facetValues[facetIndex].value, + ), + span( + { class: 'text-xs font-normal bg-white text-danaher-purple-800 rounded-full py-1 px-2' }, + facetValues[facetIndex]?.numberOfResults, + ), + ); + facetList.append(facetElement); + } + } + if (facetList.children.length > 0) { + facetGroup.append(h3({ class: 'font-medium text-black text-2xl leading-8 mb-2 pl-3 md:pl-0' }, facetId.replace(/([A-Z])/g, ' $&'))); + facetGroup.append(facetList); + searchContent.append(facetGroup); + } + } + } + decorateViewResultsURL(); + } + document.querySelector('#total-result-count').innerHTML = totalCount; +} + +const fetchFinishType = debounce(async (value) => { + const url = `https://${organizationId}.org.coveo.com/rest/search/v2`; + let facetContainer = []; + if (payload.facets) { + facetContainer = [...payload.facets]; + } else { + facetContainer = [...finishType.facets]; + } + const selectedFacets = { + ...finishType, + q: value, + facets: facetContainer, + }; + // eslint-disable-next-line max-len + const { facets, totalCount = 0 } = await makeCoveoSearchRequest(url, JSON.stringify(selectedFacets)); + payload = { ...payload, ...{ q: value, facets: facetContainer } }; + // CREATING THE LAYOUT + decorateSearchPopup(facets, totalCount); +}, 800); + +const fetchSuggestions = debounce(async (value) => { + try { + const url = `https://${organizationId}.org.coveo.com/rest/search/v2/querySuggest`; + suggestions.q = value; + const { completions } = await makeCoveoSearchRequest(url, JSON.stringify(suggestions)); + // CREATING THE LAYOUT + const suggestionsBox = document.querySelector('#search-suggestions'); + suggestionsBox.innerHTML = ''; + if (completions && completions.length > 0) { + for ( + let suggestionIndex = 0; + suggestionIndex < completions.length; + suggestionIndex += 1 + ) { + const suggestionRes = completions[suggestionIndex]; + const suggestion = li( + { + class: 'flex items-center gap-x-3 px-1 py-1 select-none cursor-pointer hover:bg-gray-600/40', + onclick: () => { + document.querySelector('#search-input').value = suggestionRes.expression; + fetchFinishType(suggestionRes.expression); + document.querySelector('#search-suggestions').innerHTML = ''; + }, + }, + span({ class: 'icon w-min h-min icon-arrow-up [&_svg]:w-4 [&_svg]:h-4 [&_svg]:fill-current' }), + span(suggestionRes.expression), + ); + suggestionsBox.append(suggestion); + } + } else { + suggestionsBox.append(li({ class: 'text-center' }, 'No Results Found')); + setTimeout(() => { + suggestionsBox.innerHTML = ''; + }, 1500); + } + decorateIcons(suggestionsBox); + } catch (e) { + // eslint-disable-next-line no-console + console.error('Something happenned during request submission', e); + } +}); + +function buildSearchBackdrop(headerBlock) { + const searchBackdropContainer = div( + { id: 'search-container', class: 'w-screen h-screen fixed top-0 left-0 bg-white opacity-100 z-50 transition-all -translate-y-full [&_#search-product]:hidden [&_#search-content]:hidden' }, + div( + { + id: 'search-product', + class: 'container mx-auto sm:pt-7', + }, + div( + { class: 'flex justify-between items-center mb-0 md:mb-4 px-4 md:px-0' }, + h1({ class: 'text-2xl md:text-5xl font-normal tracking-wide text-black mb-3' }, 'Search'), + p({ class: 'hidden md:block w-96 ml-28' }, 'Search by keyword phrase, products, or applications across the Life Science Companies of Danaher'), + p( + { class: 'flex items-center' }, + 'Close', + span({ id: 'close-search-container', class: 'icon icon-close w-12 h-12 text-black/70 fill-current p-3 mx-auto cursor-pointer' }), + ), + ), + div( + { class: 'relative' }, + div( + { class: 'flex flex-col md:flex-row gap-x-2 gap-y-4 px-4 md:px-0' }, + div( + { class: 'w-full relative sm:border border-b sm:border-solid rounded flex flex-wrap gap-1 py-2 pl-8 pr-0 md:px-14 bg-[#F5EFFF]' }, + span({ + class: 'icon icon-search bg-transparent text-black absolute ms-2 md:ms-1 p-1 md:p-0 inset-y-0 start-0 w-6 my-auto md:w-10 [&_svg]:fill-current cursor-pointer', + }), + input({ + class: 'w-auto relative py-1 pl-2 md:pl-0 flex flex-grow text-gray-400 font-medium bg-transparent tracking-wider text-lg sm:text-xl placeholder-grey-300 outline-none', + id: 'search-input', + placeholder: 'Search here...', + type: 'text', + autocomplete: 'off', + }), + span({ class: 'icon icon-close hidden md:block absolute me-2 md:me-1 inset-y-0 right-0 w-6 my-auto md:w-10 text-black fill-current cursor-pointer', id: 'empty-searchbar' }), + ), + a({ href: '#', class: 'btn btn-primary-purple flex h-max my-auto px-5 py-3 rounded-full font-bold' }, 'View Results'), + ), + div( + { class: 'absolute bg-black text-white z-10' }, + ul({ id: 'search-suggestions', class: 'min-w-80 max-w-xl flex flex-col gap-y-2 px-4 py-2 empty:hidden' }), + ), + ), + ), + div({ id: 'search-content', class: 'container h-4/6 md:h-3/5 overflow-y-scroll mt-4 mx-auto mb-3 grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 auto-rows-max gap-x-12 gap-y-3' }), + div( + { class: 'w-full fixed bottom-0 text-black font-normal hidden' }, + div( + { class: 'grid grid-cols-5' }, + div( + { class: 'hidden md:col-span-2 lg:col-span-3 md:flex flex-col bg-danaherpurple-50 px-8 py-3 text-danaherpurple-800 text-sm place-content-center' }, + 'Spotlight', + a( + { class: 'flex items-center text-base text-black' }, + 'Discover the all new CellXpress.ai Automated Cell Culture System', + span({ class: 'icon icon-arrow-right flex items-center [&_svg]:w-4 [&_svg]:h-4 [&_svg]:stroke-1 [&_svg]:text-danaherpurple-500 ml-2' }), + ), + ), + div( + { class: 'col-span-5 md:col-span-3 lg:col-span-2 bg-danaherpurple-500 px-8 py-3 text-white flex justify-between' }, + div( + { class: 'flex flex-col place-content-center [&_p]:leading-4' }, + p({ class: 'text-2xl md:text-3xl' }, 'Total results'), + a( + { + href: '#', + class: 'flex items-center text-base font-bold mt-2', + }, + 'Visit Results', + span({ class: 'icon icon-arrow-right flex items-center [&_svg]:w-4 [&_svg]:h-4 [&_svg]:fill-white ml-2' }), + ), + ), + p({ id: 'total-result-count', class: 'text-5xl md:text-7xl lg:text-8xl' }, '0'), + ), + ), + ), + ); + decorateIcons(searchBackdropContainer); + headerBlock.append(searchBackdropContainer); +} + /** * decorates the header, mainly the nav * @param {Element} block The header block element @@ -699,6 +927,7 @@ export default async function decorate(block) { buildNavBlock(headerBlock); const flyout = buildFlyoutMenus(headerBlock); + buildSearchBackdrop(headerBlock); decorateIcons(headerBlock); window.addEventListener('scroll', handleScroll); @@ -710,8 +939,62 @@ export default async function decorate(block) { if (authHeader && (authHeader.has('authentication-token') || authHeader.has('Authorization'))) { getQuote(headerBlock, authHeader); } - document.querySelector('div.search-icon').addEventListener('click', toggleSearchBoxMobile); } + // DISPLAY COVEO { BACKDROP } ON DESKTOP + document.querySelector('#search-by-coveo').addEventListener('click', () => { + document.querySelector('#search-container')?.classList.remove(...'-translate-y-full [&_#search-product]:hidden [&_#search-content]:hidden'.split(' ')); + document.querySelector('#search-input').focus(); + }); + document.querySelector('div.search-icon').addEventListener('click', () => { + const searchContainer = document.querySelector('#search-container'); + searchContainer?.classList.remove(...'-translate-y-full [&_#search-product]:hidden [&_#search-content]:hidden'.split(' ')); + document.querySelector('#search-input').focus(); + }); + // CLOSE COVEO { BACKDROP } ON DESKTOP/MOBILE + document.querySelector('#close-search-container').addEventListener('click', () => { + document.querySelector('#search-container')?.classList.add(...'-translate-y-full [&_#search-product]:hidden [&_#search-content]:hidden'.split(' ')); + }); + document.querySelector('#search-input').addEventListener('keyup', (event) => { + document.querySelector('#search-content').nextSibling.classList.remove('hidden'); + let { value } = event.target; + value = value.trim(); + if (value === '' && value !== searchString) { + document.querySelector('#search-content').innerHTML = ''; + document.querySelector('#search-suggestions').innerHTML = ''; + } + if (value !== searchString) { + fetchSuggestions(value); + fetchFinishType(value); + } + searchString = value; + }); + document.querySelector('#search-input').addEventListener('blur', () => { + setTimeout(() => { + document.querySelector('#search-suggestions').innerHTML = ''; + }, 200); + }); + // NULLIFY COVEO SEARCH TYPE-VALUE & SUGGESTIONS + document.querySelector('#empty-searchbar').addEventListener('click', () => { + fetchFinishType(''); + document.querySelector('#search-input').value = ''; + document.querySelector('#search-suggestions').innerHTML = ''; + const allSelectedFacets = document.querySelectorAll('#search-product span.facet-selected'); + if (allSelectedFacets.length > 0) { + allSelectedFacets.forEach((selectedFacet) => selectedFacet.remove()); + payload = { + ...payload, + ...{ + facets: payload?.facets.map((facet) => { + facet.currentValues.forEach((curFacVal, curFacValIndex) => { + facet.currentValues[curFacValIndex].state = 'idle'; + }); + return facet; + }), + }, + }; + } + }); + return block; } diff --git a/icons/arrow-right.svg b/icons/arrow-right.svg index d80fcd45..cb45818b 100644 --- a/icons/arrow-right.svg +++ b/icons/arrow-right.svg @@ -1,3 +1,3 @@ - - + + diff --git a/icons/arrow-up.svg b/icons/arrow-up.svg new file mode 100644 index 00000000..ef667440 --- /dev/null +++ b/icons/arrow-up.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/icons/chevron-up.svg b/icons/chevron-up.svg index 37070fb2..39e0c688 100644 --- a/icons/chevron-up.svg +++ b/icons/chevron-up.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/icons/icon-arrow-right.svg b/icons/icon-arrow-right.svg index 45edd6b6..06cae9ed 100644 --- a/icons/icon-arrow-right.svg +++ b/icons/icon-arrow-right.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/icons/user.svg b/icons/user.svg new file mode 100644 index 00000000..b9d8cb3a --- /dev/null +++ b/icons/user.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/scripts/carousel.js b/scripts/carousel.js index 91866b96..4c6183ef 100644 --- a/scripts/carousel.js +++ b/scripts/carousel.js @@ -1,10 +1,4 @@ -function debounce(func, timeout = 300) { - let timer; - return (...args) => { - clearTimeout(timer); - timer = setTimeout(() => { func.apply(this, args); }, timeout); - }; -} +import { debounce } from './scripts.js'; export default function Carousel({ wrapperEl, diff --git a/scripts/scripts-dev.js b/scripts/scripts-dev.js index 83d8df98..40cda706 100644 --- a/scripts/scripts-dev.js +++ b/scripts/scripts-dev.js @@ -34,6 +34,36 @@ const TEMPLATE_LIST = { info: 'library', }; +export function debounce(func, timeout = 300) { + let timer; + return (...args) => { + clearTimeout(timer); + timer = setTimeout(() => { func.apply(this, args); }, timeout); + }; +} + +export function createRequest(config) { + const { + url, + method = 'GET', + authToken, + type = 'application/json', + body, + } = config; + const headers = { + 'Content-Type': type, + Accept: 'application/json', + }; + const configuration = { method, headers }; + if (body) { + configuration.body = body; + } + if (authToken && authToken.trim() !== '') { + headers.Authorization = `Bearer ${authToken}`; + } + return fetch(url, configuration); +} + /** * Get the Image URL from Scene7 and Optimize the picture * @param {string} imageUrl diff --git a/scripts/scripts.js b/scripts/scripts.js index 2b7c0bc6..15eb6203 100644 --- a/scripts/scripts.js +++ b/scripts/scripts.js @@ -1 +1 @@ -import{sampleRUM,loadHeader,loadFooter,decorateButtons,decorateIcons,decorateSections,decorateBlocks,decorateTemplateAndTheme,waitForLCP,loadBlocks,loadCSS,toClassName,getMetadata,createOptimizedPicture,loadBlock,decorateBlock}from"./lib-franklin.js";import{div,domEl,img}from"./dom-builder.js";const LCP_BLOCKS=["breadcrumb","product-hero","carousel"],TEMPLATE_LIST={blog:"blog",news:"blog",productdetail:"productDetail",processstep:"processstep",topic:"topic",library:"library",info:"library"};function imageHelper(e,t,a=!1){return-1{null==e.closest(".embed, .hero")&&t(e.parentNode)})}}async function loadFonts(){await loadCSS(window.hlx.codeBasePath+"/styles/fonts.css");try{window.location.hostname.includes("localhost")||sessionStorage.setItem("fonts-loaded","true")}catch(e){}}function buildAutoBlocks(e){try{buildVideo(e)}catch(e){console.error("Auto Blocking failed",e)}}function decorateModals(e){const t=e.querySelector(".show-modal-btn"),a=()=>t.getAttribute("data-dialog-message")?t.getAttribute("dialog-message"):"";t?.addEventListener("click",async e=>{e.preventDefault();e=(await import("./modal.js")).default;(await e("custom-modal",a,e=>{e.querySelector('p[name="close"]')?.addEventListener("click",()=>e.close())})).showModal()})}function decorateTwoColumnSection(e){e.querySelectorAll(".section.container-two-col").forEach(o=>{o.querySelectorAll(":scope > .default-content-wrapper").forEach(e=>{[...e.children].forEach(e=>{o.appendChild(e)});let t=e.nextSibling;for(var a=[];t;)t.className.includes("-wrapper")&&a.push(t),t=t.nextSibling;o.append(...a),o.removeChild(e)});const t=div();let a=null;[...o.children].forEach(e=>{"H1"===e.tagName&&(t.appendChild(div({class:"col-left lg:w-1/3 xl:w-1/4 pt-4"})),a=div({class:"col-right w-full mt-0 md:mt-4 lg:mt-0 lg:w-2/3 xl:w-3/4 pt-6 pb-0 md:pb-10"}));e=e.cloneNode(!0);"H2"===e.tagName&&e.querySelector(":scope > strong")?(a?.classList.contains("col-right")&&t.appendChild(a),e.className="text-gray-900 text-base leading-6 font-bold pt-6 pb-4 my-0",t.appendChild(div({class:"col-left lg:w-1/3 xl:w-1/4 pt-4"},e,domEl("hr",{style:"height: 10px; width: 54px; border-width: 0px; color: rgb(216, 244, 250); background-color: rgb(216, 244, 250);"}))),a=div({class:"col-right w-full mt-4 lg:mt-0 lg:w-2/3 xl:w-3/4 pt-6 pb-10"})):a?.classList.contains("col-right")&&a.appendChild(e)}),a&&t.appendChild(a),t.classList.add("w-full","flex","flex-wrap","break-normal"),o.innerHTML=t.outerHTML,o.classList.add("mx-auto","w-full","flex","flex-wrap","mb-5")})}function updateExternalLinks(l){const c=[window.location.origin];l.querySelectorAll("a[href]").forEach(t=>{try{var{origin:e,pathname:a,hash:o}=new URL(t.href,window.location.href),n=o&&o.startsWith("#_"),r="pdf"===a.split(".").pop();e&&e!==window.location.origin&&!n||r?(t.setAttribute("target","_blank"),c.includes(e)||t.setAttribute("rel","noopener")):n&&(t.setAttribute("target",o.replace("#","")),t.href=t.href.replace(o,""))}catch(e){console.warn(`Invalid link in ${l}: `+t.href)}})}function lazyLoadHiddenPageNavTabs(e,t){var a=window.location.hash;const n=a?a.substring(1,a.length).toLowerCase():t;e.forEach(t=>{if(!t.className.includes("breadcrumb-container")&&t.getAttribute("aria-labelledby")!==n){t.querySelectorAll(".block").forEach(e=>{e.setAttribute("data-block-status","loaded"),e.setAttribute("data-block-lazy-load",!0),e.parentElement.style.display="none"});const a=e=>{e.querySelectorAll(".block[data-block-lazy-load]").forEach(async e=>{e.removeAttribute("data-block-lazy-load"),e.setAttribute("data-block-status","initialized"),await loadBlock(e),e.parentElement.style.display=""}),t.setAttribute("data-section-status","loaded")},o=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(o.disconnect(),a(t))});o.observe(t),setTimeout(()=>{o.disconnect(),a(t)},5e3)}})}function decoratePageNav(t){var o=t.querySelector(".page-tabs");if(o){o=o.closest("div.section");let e=[...t.querySelectorAll("div.section")];const n=(e=e.slice(e.indexOf(o)+1)).filter(e=>e.hasAttribute("data-tabname"));let a=0;e.forEach(e=>{var t;a div").forEach(decorateBlock)}async function processEmbedFragment(e){const t=div({class:"embed-fragment"});[...e.classList].forEach(e=>{t.classList.add(e)});var a=e.textContent;return a&&((a=await getFragmentFromFile(a+".plain.html"))?(t.innerHTML=a,[...t.querySelectorAll(".embed-fragment > div")].forEach(e=>{e.classList.add("section")}),decorateEmbeddedBlocks(t),decorateSections(t),loadBlocks(t)):(a=e.innerHTML,t.append(div({class:"section"})),t.querySelector(".section").innerHTML=a)),decorateButtons(t),decorateIcons(t),t}function loadATPageParams(){var e=window.location.pathname.replaceAll("/","_").replace(/\.html$/,"").substring(1),t=getMetadata("sku"),a=getMetadata("fullcategory").split("|").pop(),o=getMetadata("og:image"),n=getMetadata("og:title");return{id:e,skuId:t,categoryId:a,thumbnailURL:o,name:-1{import(t).then(e)})}function onDecoratedElement(t){document.querySelector('[data-block-status="loaded"],[data-section-status="loaded"]')&&t();var e=new MutationObserver(e=>{e.some(e=>"BODY"===e.target.tagName||"loaded"===e.target.dataset.sectionStatus||"loaded"===e.target.dataset.blockStatus)&&t()});e.observe(document.querySelector("main"),{subtree:!0,attributes:!0,attributeFilter:["data-block-status","data-section-status"]}),e.observe(document.querySelector("body"),{childList:!0})}function toCssSelector(e){return e.replace(/(\.\S+)?:eq\((\d+)\)/g,(e,t,a)=>":nth-child("+(Number(a)+1)+(t?` of ${t})`:""))}async function getElementForOffer(e){e=e.cssSelector||toCssSelector(e.selector);return document.querySelector(e)}async function getElementForMetric(e){e=toCssSelector(e.selector);return document.querySelector(e)}async function getAndApplyOffers(){const e=await window.adobe.target.getOffers({request:{execute:{pageLoad:{}}}}),{options:t=[],metrics:a=[]}=e.execute.pageLoad;onDecoratedElement(()=>{window.adobe.target.applyOffers({response:e}),t.forEach(e=>e.content=e.content.filter(e=>!getElementForOffer(e))),a.map((e,t)=>getElementForMetric(e)?t:-1).filter(e=>0<=e).reverse().map(e=>a.splice(e,1))})}let atjsPromise=Promise.resolve();const urlTarget=window.location.pathname,regex=/^\/(us\/en\/products\.html)?$/;async function loadEager(e){document.documentElement.lang="en",decorateTemplateAndTheme(),await window.hlx.plugins.run("loadEager");e=e.querySelector("main");e&&(await decorateTemplates(e),decorateMain(e),await atjsPromise,await new Promise(e=>{window.requestAnimationFrame(async()=>{document.body.classList.add("appear"),await waitForLCP(LCP_BLOCKS),e()})}));try{(900<=window.innerWidth||sessionStorage.getItem("fonts-loaded"))&&loadFonts()}catch(e){}}function getParameterByName(e,t=window.location.href){e=e.replace(/[[\]]/g,"$&"),e=new RegExp(`[?&]${e}(=([^&#]*)|&|#|$)`).exec(t);return e?e[2]?decodeURIComponent(e[2].replace(/\+/g," ")):"":null}function loadUTMprams(){["utm_campaign","utm_source","utm_medium","utm_content","utm_term","utm_previouspage"].forEach(e=>{var t=getParameterByName(e);null!==t&&window.localStorage.setItem("danaher_"+e,t)})}async function loadLazy(e){var t=e.querySelector("main"),a=(await loadBlocks(t),window.location)["hash"],o=!!a&&e.getElementById(a.substring(1));a&&o&&o.scrollIntoView(),loadFooter(e.querySelector("footer")),loadCSS(window.hlx.codeBasePath+"/styles/lazy-styles.css"),loadFonts(),window.hlx.plugins.run("loadLazy"),sampleRUM("lazy"),sampleRUM.observe(t.querySelectorAll("div[data-block-name]")),sampleRUM.observe(t.querySelectorAll("picture > img")),loadUTMprams()}function loadDelayed(){window.setTimeout(()=>(window.hlx.plugins.load("delayed"),window.hlx.plugins.run("loadDelayed"),import("./delayed.js")),4e3)}async function loadPage(){setFavicon(),await window.hlx.plugins.load("eager"),await loadEager(document),await window.hlx.plugins.load("lazy"),await loadLazy(document),loadDelayed()}function getDLPage(){var e={title:document.querySelector("title").textContent.replace(/[\n\t]/gm,""),language:"en",locale:"US",level:"top",type:"webpage",keywords:"",creationDate:getMetadata("creationdate"),updateDate:getMetadata("updatedate")},t=window.location.pathname;return"/"===t||"/us/en"===t||"/us/en.html"===t?(e.level="top",e.type="home"):t.includes("/us/en/news")?(e.level="top",e.type="news"):t.includes("/us/en/blog")?(e.level="middle",e.type="blog"):t.includes("/us/en/solutions")?(e.level="middle",e.type="solutions"):t.includes("/us/en/applications")?(e.level="middle",e.type="applications"):t.includes("/us/en/products")?t.includes("/us/en/products/family")?(e.level="bottom",e.type="family"):t.includes("/us/en/products/bundles")?(e.level="bottom",e.type="bundles"):t.includes("/us/en/products/sku")?(e.level="bottom",e.type="sku"):t.includes("/topics")?(e.level="other",e.type="topics"):(e.level="bottom",e.type="products"):t.includes("/us/en/library")?(e.level="other",e.type="library"):t.includes("/us/en/about-us")?(e.level="top",e.type="about-us"):t.includes("/us/en/expert")?(e.level="top",e.type="expert"):t.includes("/us/en/search")||t.includes("/us/en/danahersearch")?(e.level="top",e.type="search"):t.includes("/us/en/signin")?(e.level="top",e.type="signin"):t.includes("/us/en/legal")&&(e.level="top",e.type="legal"),e}regex.test(urlTarget)||(atjsPromise=initATJS("./at.js",{clientCode:"danaher",serverDomain:"danaher.tt.omtrdc.net",imsOrgId:"08333E7B636A2D4D0A495C34@AdobeOrg",bodyHidingEnabled:!1,cookieDomain:window.location.hostname,pageLoadEnabled:!1,secureOnly:!0,viewsEnabled:!1,withWebGLRenderer:!1}).catch(e=>{console.error("Error loading at.js",e)}),document.addEventListener("at-library-loaded",()=>getAndApplyOffers()));const urlParams=new URLSearchParams(window.location.search),useProd=urlParams.get("useProd");"lifesciences.danaher.com"===window.location.host||"true"===useProd?window.DanaherConfig={siteID:"ls-us-en",gtmID:"GTM-THXPLCS",munchkinID:"306-EHG-641",marketoDomain:"//306-EHG-641.mktoweb.com",quoteCartPath:"/us/en/quote-cart.html",cartPath:"/us/en/cart.html",addressesPath:"/us/en/addresses.html",shippingPath:"/us/en/shipping.html",paymentPath:"/us/en/payment.html",receiptPath:"/us/en/receipt.html",quoteSubmitPath:"/us/en/submit-quote.html",intershopDomain:"https://shop.lifesciences.danaher.com",intershopPath:"/INTERSHOP/rest/WFS/DANAHERLS-LSIG-Site/-",searchOrg:"danaherproductionrfl96bkr",searchKey:"xxf2f10385-5a54-4a18-bb48-fd8025d6b5d2",workflowProductKey:"xx3d1b8da5-d1e9-4989-bbed-264a248a9e22",workflowResourceKey:"xxf6a8b387-10f2-4660-af5d-6d304d0a789d",productKey:"xxfb161aa6-0fa0-419f-af37-9c6d7784bf76",familyProductKey:"xx1ecd2a4f-8391-4c70-b3c0-2d589bda56b7",familyResourceKey:"xx9dd85afc-64b6-4295-bc5d-eb8285f96d52",categoryProductKey:"xx2a299d60-2cf1-48ab-b9d5-94daeb25f1d6",categoryDetailKey:"xx61910369-c1ab-4df9-8d8a-3092b1323fcc",productRecommendationsKey:"xx107716c0-1ccd-4a61-8717-6ca36b6cdb0e",megaMenuPath:"/content/dam/danaher/system/navigation/megamenu_items_us.json",coveoProductPageTitle:"Product Page",pdfEmbedKey:"4a472c386025439d8a4ce2493557f6e7",host:"lifesciences.danaher.com"}:window.DanaherConfig={siteID:"ls-us-en",gtmID:"GTM-KCBGM2N",munchkinID:"439-KNJ-322",marketoDomain:"//439-KNJ-322.mktoweb.com",quoteCartPath:"/us/en/quote-cart.html",cartPath:"/us/en/cart.html",addressesPath:"/us/en/addresses.html",shippingPath:"/us/en/shipping.html",paymentPath:"/us/en/payment.html",receiptPath:"/us/en/receipt.html",quoteSubmitPath:"/us/en/submit-quote.html",intershopDomain:"https://stage.shop.lifesciences.danaher.com",intershopPath:"/INTERSHOP/rest/WFS/DANAHERLS-LSIG-Site/-",searchOrg:"danahernonproduction1892f3fhz",searchKey:"xx2a2e7271-78c3-4e3b-bac3-2fcbab75323b",workflowProductKey:"xx26ffc727-cc72-4bbd-98e3-34052f296382",workflowResourceKey:"xx14676f1d-cf4a-4a38-94f0-eda56e9920f1",productKey:"xx32da148e-dfd0-4725-a443-c05a7793afea",familyProductKey:"xx4e3989d6-93aa-4140-a227-19da35fcd1cc",familyResourceKey:"xx8274a91e-b29c-4267-8b3a-5022a2698605",categoryProductKey:"xxdf9d160d-f6e5-4c8c-969b-8570d7b81418",categoryDetailKey:"xxf2ea9bfd-bccb-4195-90fd-7757504fdc33",productRecommendationsKey:"xxea4d2c40-26e7-4e98-9377-d8ebe3f435ea",megaMenuPath:"/content/dam/danaher/system/navigation/megamenu_items_us.json",coveoProductPageTitle:"Product Page",pdfEmbedKey:"4a472c386025439d8a4ce2493557f6e7",host:"stage.lifesciences.danaher.com"},window.dataLayer=[],window.dataLayer.push({user:{customerID:"",accountType:"guest",marketCode:"",company:"",role:"",city:"",state:"",country:"",postalCode:"",lastVisit:""}}),window.dataLayer.push({page:getDLPage()}),loadPage();export{imageHelper,createOptimizedS7Picture,formatDateUTCSeconds,generateUUID,makePublicUrl,setJsonLd,getFragmentFromFile,getCookie,isOTEnabled,setCookie,decorateModals,decorateMain,processEmbedFragment}; \ No newline at end of file +import{sampleRUM,loadHeader,loadFooter,decorateButtons,decorateIcons,decorateSections,decorateBlocks,decorateTemplateAndTheme,waitForLCP,loadBlocks,loadCSS,toClassName,getMetadata,createOptimizedPicture,loadBlock,decorateBlock}from"./lib-franklin.js";import{div,domEl,img}from"./dom-builder.js";const LCP_BLOCKS=["breadcrumb","product-hero","carousel"],TEMPLATE_LIST={blog:"blog",news:"blog",productdetail:"productDetail",processstep:"processstep",topic:"topic",library:"library",info:"library"};function debounce(t,a=300){let o;return(...e)=>{clearTimeout(o),o=setTimeout(()=>{t.apply(this,e)},a)}}function createRequest(e){var{url:e,method:t="GET",authToken:a,type:o="application/json",body:n}=e,o={"Content-Type":o,Accept:"application/json"},t={method:t,headers:o};return n&&(t.body=n),a&&""!==a.trim()&&(o.Authorization="Bearer "+a),fetch(e,t)}function imageHelper(e,t,a=!1){return-1{null==e.closest(".embed, .hero")&&t(e.parentNode)})}}async function loadFonts(){await loadCSS(window.hlx.codeBasePath+"/styles/fonts.css");try{window.location.hostname.includes("localhost")||sessionStorage.setItem("fonts-loaded","true")}catch(e){}}function buildAutoBlocks(e){try{buildVideo(e)}catch(e){console.error("Auto Blocking failed",e)}}function decorateModals(e){const t=e.querySelector(".show-modal-btn"),a=()=>t.getAttribute("data-dialog-message")?t.getAttribute("dialog-message"):"";t?.addEventListener("click",async e=>{e.preventDefault();e=(await import("./modal.js")).default;(await e("custom-modal",a,e=>{e.querySelector('p[name="close"]')?.addEventListener("click",()=>e.close())})).showModal()})}function decorateTwoColumnSection(e){e.querySelectorAll(".section.container-two-col").forEach(o=>{o.querySelectorAll(":scope > .default-content-wrapper").forEach(e=>{[...e.children].forEach(e=>{o.appendChild(e)});let t=e.nextSibling;for(var a=[];t;)t.className.includes("-wrapper")&&a.push(t),t=t.nextSibling;o.append(...a),o.removeChild(e)});const t=div();let a=null;[...o.children].forEach(e=>{"H1"===e.tagName&&(t.appendChild(div({class:"col-left lg:w-1/3 xl:w-1/4 pt-4"})),a=div({class:"col-right w-full mt-0 md:mt-4 lg:mt-0 lg:w-2/3 xl:w-3/4 pt-6 pb-0 md:pb-10"}));e=e.cloneNode(!0);"H2"===e.tagName&&e.querySelector(":scope > strong")?(a?.classList.contains("col-right")&&t.appendChild(a),e.className="text-gray-900 text-base leading-6 font-bold pt-6 pb-4 my-0",t.appendChild(div({class:"col-left lg:w-1/3 xl:w-1/4 pt-4"},e,domEl("hr",{style:"height: 10px; width: 54px; border-width: 0px; color: rgb(216, 244, 250); background-color: rgb(216, 244, 250);"}))),a=div({class:"col-right w-full mt-4 lg:mt-0 lg:w-2/3 xl:w-3/4 pt-6 pb-10"})):a?.classList.contains("col-right")&&a.appendChild(e)}),a&&t.appendChild(a),t.classList.add("w-full","flex","flex-wrap","break-normal"),o.innerHTML=t.outerHTML,o.classList.add("mx-auto","w-full","flex","flex-wrap","mb-5")})}function updateExternalLinks(l){const c=[window.location.origin];l.querySelectorAll("a[href]").forEach(t=>{try{var{origin:e,pathname:a,hash:o}=new URL(t.href,window.location.href),n=o&&o.startsWith("#_"),r="pdf"===a.split(".").pop();e&&e!==window.location.origin&&!n||r?(t.setAttribute("target","_blank"),c.includes(e)||t.setAttribute("rel","noopener")):n&&(t.setAttribute("target",o.replace("#","")),t.href=t.href.replace(o,""))}catch(e){console.warn(`Invalid link in ${l}: `+t.href)}})}function lazyLoadHiddenPageNavTabs(e,t){var a=window.location.hash;const n=a?a.substring(1,a.length).toLowerCase():t;e.forEach(t=>{if(!t.className.includes("breadcrumb-container")&&t.getAttribute("aria-labelledby")!==n){t.querySelectorAll(".block").forEach(e=>{e.setAttribute("data-block-status","loaded"),e.setAttribute("data-block-lazy-load",!0),e.parentElement.style.display="none"});const a=e=>{e.querySelectorAll(".block[data-block-lazy-load]").forEach(async e=>{e.removeAttribute("data-block-lazy-load"),e.setAttribute("data-block-status","initialized"),await loadBlock(e),e.parentElement.style.display=""}),t.setAttribute("data-section-status","loaded")},o=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(o.disconnect(),a(t))});o.observe(t),setTimeout(()=>{o.disconnect(),a(t)},5e3)}})}function decoratePageNav(t){var o=t.querySelector(".page-tabs");if(o){o=o.closest("div.section");let e=[...t.querySelectorAll("div.section")];const n=(e=e.slice(e.indexOf(o)+1)).filter(e=>e.hasAttribute("data-tabname"));let a=0;e.forEach(e=>{var t;a div").forEach(decorateBlock)}async function processEmbedFragment(e){const t=div({class:"embed-fragment"});[...e.classList].forEach(e=>{t.classList.add(e)});var a=e.textContent;return a&&((a=await getFragmentFromFile(a+".plain.html"))?(t.innerHTML=a,[...t.querySelectorAll(".embed-fragment > div")].forEach(e=>{e.classList.add("section")}),decorateEmbeddedBlocks(t),decorateSections(t),loadBlocks(t)):(a=e.innerHTML,t.append(div({class:"section"})),t.querySelector(".section").innerHTML=a)),decorateButtons(t),decorateIcons(t),t}function loadATPageParams(){var e=window.location.pathname.replaceAll("/","_").replace(/\.html$/,"").substring(1),t=getMetadata("sku"),a=getMetadata("fullcategory").split("|").pop(),o=getMetadata("og:image"),n=getMetadata("og:title");return{id:e,skuId:t,categoryId:a,thumbnailURL:o,name:-1{import(t).then(e)})}function onDecoratedElement(t){document.querySelector('[data-block-status="loaded"],[data-section-status="loaded"]')&&t();var e=new MutationObserver(e=>{e.some(e=>"BODY"===e.target.tagName||"loaded"===e.target.dataset.sectionStatus||"loaded"===e.target.dataset.blockStatus)&&t()});e.observe(document.querySelector("main"),{subtree:!0,attributes:!0,attributeFilter:["data-block-status","data-section-status"]}),e.observe(document.querySelector("body"),{childList:!0})}function toCssSelector(e){return e.replace(/(\.\S+)?:eq\((\d+)\)/g,(e,t,a)=>":nth-child("+(Number(a)+1)+(t?` of ${t})`:""))}async function getElementForOffer(e){e=e.cssSelector||toCssSelector(e.selector);return document.querySelector(e)}async function getElementForMetric(e){e=toCssSelector(e.selector);return document.querySelector(e)}async function getAndApplyOffers(){const e=await window.adobe.target.getOffers({request:{execute:{pageLoad:{}}}}),{options:t=[],metrics:a=[]}=e.execute.pageLoad;onDecoratedElement(()=>{window.adobe.target.applyOffers({response:e}),t.forEach(e=>e.content=e.content.filter(e=>!getElementForOffer(e))),a.map((e,t)=>getElementForMetric(e)?t:-1).filter(e=>0<=e).reverse().map(e=>a.splice(e,1))})}let atjsPromise=Promise.resolve();const urlTarget=window.location.pathname,regex=/^\/(us\/en\/products\.html)?$/;async function loadEager(e){document.documentElement.lang="en",decorateTemplateAndTheme(),await window.hlx.plugins.run("loadEager");e=e.querySelector("main");e&&(await decorateTemplates(e),decorateMain(e),await atjsPromise,await new Promise(e=>{window.requestAnimationFrame(async()=>{document.body.classList.add("appear"),await waitForLCP(LCP_BLOCKS),e()})}));try{(900<=window.innerWidth||sessionStorage.getItem("fonts-loaded"))&&loadFonts()}catch(e){}}function getParameterByName(e,t=window.location.href){e=e.replace(/[[\]]/g,"$&"),e=new RegExp(`[?&]${e}(=([^&#]*)|&|#|$)`).exec(t);return e?e[2]?decodeURIComponent(e[2].replace(/\+/g," ")):"":null}function loadUTMprams(){["utm_campaign","utm_source","utm_medium","utm_content","utm_term","utm_previouspage"].forEach(e=>{var t=getParameterByName(e);null!==t&&window.localStorage.setItem("danaher_"+e,t)})}async function loadLazy(e){var t=e.querySelector("main"),a=(await loadBlocks(t),window.location)["hash"],o=!!a&&e.getElementById(a.substring(1));a&&o&&o.scrollIntoView(),loadFooter(e.querySelector("footer")),loadCSS(window.hlx.codeBasePath+"/styles/lazy-styles.css"),loadFonts(),window.hlx.plugins.run("loadLazy"),sampleRUM("lazy"),sampleRUM.observe(t.querySelectorAll("div[data-block-name]")),sampleRUM.observe(t.querySelectorAll("picture > img")),loadUTMprams()}function loadDelayed(){window.setTimeout(()=>(window.hlx.plugins.load("delayed"),window.hlx.plugins.run("loadDelayed"),import("./delayed.js")),4e3)}async function loadPage(){setFavicon(),await window.hlx.plugins.load("eager"),await loadEager(document),await window.hlx.plugins.load("lazy"),await loadLazy(document),loadDelayed()}function getDLPage(){var e={title:document.querySelector("title").textContent.replace(/[\n\t]/gm,""),language:"en",locale:"US",level:"top",type:"webpage",keywords:"",creationDate:getMetadata("creationdate"),updateDate:getMetadata("updatedate")},t=window.location.pathname;return"/"===t||"/us/en"===t||"/us/en.html"===t?(e.level="top",e.type="home"):t.includes("/us/en/news")?(e.level="top",e.type="news"):t.includes("/us/en/blog")?(e.level="middle",e.type="blog"):t.includes("/us/en/solutions")?(e.level="middle",e.type="solutions"):t.includes("/us/en/applications")?(e.level="middle",e.type="applications"):t.includes("/us/en/products")?t.includes("/us/en/products/family")?(e.level="bottom",e.type="family"):t.includes("/us/en/products/bundles")?(e.level="bottom",e.type="bundles"):t.includes("/us/en/products/sku")?(e.level="bottom",e.type="sku"):t.includes("/topics")?(e.level="other",e.type="topics"):(e.level="bottom",e.type="products"):t.includes("/us/en/library")?(e.level="other",e.type="library"):t.includes("/us/en/about-us")?(e.level="top",e.type="about-us"):t.includes("/us/en/expert")?(e.level="top",e.type="expert"):t.includes("/us/en/search")||t.includes("/us/en/danahersearch")?(e.level="top",e.type="search"):t.includes("/us/en/signin")?(e.level="top",e.type="signin"):t.includes("/us/en/legal")&&(e.level="top",e.type="legal"),e}regex.test(urlTarget)||(atjsPromise=initATJS("./at.js",{clientCode:"danaher",serverDomain:"danaher.tt.omtrdc.net",imsOrgId:"08333E7B636A2D4D0A495C34@AdobeOrg",bodyHidingEnabled:!1,cookieDomain:window.location.hostname,pageLoadEnabled:!1,secureOnly:!0,viewsEnabled:!1,withWebGLRenderer:!1}).catch(e=>{console.error("Error loading at.js",e)}),document.addEventListener("at-library-loaded",()=>getAndApplyOffers()));const urlParams=new URLSearchParams(window.location.search),useProd=urlParams.get("useProd");"lifesciences.danaher.com"===window.location.host||"true"===useProd?window.DanaherConfig={siteID:"ls-us-en",gtmID:"GTM-THXPLCS",munchkinID:"306-EHG-641",marketoDomain:"//306-EHG-641.mktoweb.com",quoteCartPath:"/us/en/quote-cart.html",cartPath:"/us/en/cart.html",addressesPath:"/us/en/addresses.html",shippingPath:"/us/en/shipping.html",paymentPath:"/us/en/payment.html",receiptPath:"/us/en/receipt.html",quoteSubmitPath:"/us/en/submit-quote.html",intershopDomain:"https://shop.lifesciences.danaher.com",intershopPath:"/INTERSHOP/rest/WFS/DANAHERLS-LSIG-Site/-",searchOrg:"danaherproductionrfl96bkr",searchKey:"xxf2f10385-5a54-4a18-bb48-fd8025d6b5d2",workflowProductKey:"xx3d1b8da5-d1e9-4989-bbed-264a248a9e22",workflowResourceKey:"xxf6a8b387-10f2-4660-af5d-6d304d0a789d",productKey:"xxfb161aa6-0fa0-419f-af37-9c6d7784bf76",familyProductKey:"xx1ecd2a4f-8391-4c70-b3c0-2d589bda56b7",familyResourceKey:"xx9dd85afc-64b6-4295-bc5d-eb8285f96d52",categoryProductKey:"xx2a299d60-2cf1-48ab-b9d5-94daeb25f1d6",categoryDetailKey:"xx61910369-c1ab-4df9-8d8a-3092b1323fcc",productRecommendationsKey:"xx107716c0-1ccd-4a61-8717-6ca36b6cdb0e",megaMenuPath:"/content/dam/danaher/system/navigation/megamenu_items_us.json",coveoProductPageTitle:"Product Page",pdfEmbedKey:"4a472c386025439d8a4ce2493557f6e7",host:"lifesciences.danaher.com"}:window.DanaherConfig={siteID:"ls-us-en",gtmID:"GTM-KCBGM2N",munchkinID:"439-KNJ-322",marketoDomain:"//439-KNJ-322.mktoweb.com",quoteCartPath:"/us/en/quote-cart.html",cartPath:"/us/en/cart.html",addressesPath:"/us/en/addresses.html",shippingPath:"/us/en/shipping.html",paymentPath:"/us/en/payment.html",receiptPath:"/us/en/receipt.html",quoteSubmitPath:"/us/en/submit-quote.html",intershopDomain:"https://stage.shop.lifesciences.danaher.com",intershopPath:"/INTERSHOP/rest/WFS/DANAHERLS-LSIG-Site/-",searchOrg:"danahernonproduction1892f3fhz",searchKey:"xx2a2e7271-78c3-4e3b-bac3-2fcbab75323b",workflowProductKey:"xx26ffc727-cc72-4bbd-98e3-34052f296382",workflowResourceKey:"xx14676f1d-cf4a-4a38-94f0-eda56e9920f1",productKey:"xx32da148e-dfd0-4725-a443-c05a7793afea",familyProductKey:"xx4e3989d6-93aa-4140-a227-19da35fcd1cc",familyResourceKey:"xx8274a91e-b29c-4267-8b3a-5022a2698605",categoryProductKey:"xxdf9d160d-f6e5-4c8c-969b-8570d7b81418",categoryDetailKey:"xxf2ea9bfd-bccb-4195-90fd-7757504fdc33",productRecommendationsKey:"xxea4d2c40-26e7-4e98-9377-d8ebe3f435ea",megaMenuPath:"/content/dam/danaher/system/navigation/megamenu_items_us.json",coveoProductPageTitle:"Product Page",pdfEmbedKey:"4a472c386025439d8a4ce2493557f6e7",host:"stage.lifesciences.danaher.com"},window.dataLayer=[],window.dataLayer.push({user:{customerID:"",accountType:"guest",marketCode:"",company:"",role:"",city:"",state:"",country:"",postalCode:"",lastVisit:""}}),window.dataLayer.push({page:getDLPage()}),loadPage();export{debounce,createRequest,imageHelper,createOptimizedS7Picture,formatDateUTCSeconds,generateUUID,makePublicUrl,setJsonLd,getFragmentFromFile,getCookie,isOTEnabled,setCookie,decorateModals,decorateMain,processEmbedFragment}; \ No newline at end of file diff --git a/styles/styles.css b/styles/styles.css index 6210b8b1..8c48fdc4 100644 --- a/styles/styles.css +++ b/styles/styles.css @@ -1438,6 +1438,11 @@ main .top-border > div.columns-wrapper:first-child { right: 0px; } +.inset-y-0 { + top: 0px; + bottom: 0px; +} + .bottom-0 { bottom: 0px; } @@ -1470,6 +1475,10 @@ main .top-border > div.columns-wrapper:first-child { right: 0px; } +.start-0 { + inset-inline-start: 0px; +} + .top-0 { top: 0px; } @@ -1554,6 +1563,10 @@ main .top-border > div.columns-wrapper:first-child { grid-column: span 4 / span 4; } +.col-span-5 { + grid-column: span 5 / span 5; +} + .col-span-8 { grid-column: span 8 / span 8; } @@ -1707,6 +1720,10 @@ main .top-border > div.columns-wrapper:first-child { margin-bottom: 2px; } +.me-2 { + margin-inline-end: 0.5rem; +} + .ml-0 { margin-left: 0px; } @@ -1727,6 +1744,10 @@ main .top-border > div.columns-wrapper:first-child { margin-left: 0.5rem; } +.ml-28 { + margin-left: 7rem; +} + .ml-4 { margin-left: 1rem; } @@ -1751,6 +1772,10 @@ main .top-border > div.columns-wrapper:first-child { margin-right: 1.75rem; } +.ms-2 { + margin-inline-start: 0.5rem; +} + .mt-0 { margin-top: 0px; } @@ -1941,6 +1966,10 @@ main .top-border > div.columns-wrapper:first-child { height: 1rem; } +.h-4\/6 { + height: 66.666667%; +} + .h-48 { height: 12rem; } @@ -2002,6 +2031,11 @@ main .top-border > div.columns-wrapper:first-child { height: max-content; } +.h-min { + height: -moz-min-content; + height: min-content; +} + .h-screen { height: 100vh; } @@ -2014,10 +2048,6 @@ main .top-border > div.columns-wrapper:first-child { min-height: 30rem; } -.min-h-\[40px\] { - min-height: 40px; -} - .\!w-\[15\%\] { width: 15% !important; } @@ -2118,6 +2148,10 @@ main .top-border > div.columns-wrapper:first-child { width: 2.25rem; } +.w-96 { + width: 24rem; +} + .w-\[15rem\] { width: 15rem; } @@ -2155,6 +2189,15 @@ main .top-border > div.columns-wrapper:first-child { width: max-content; } +.w-min { + width: -moz-min-content; + width: min-content; +} + +.w-screen { + width: 100vw; +} + .min-w-\[40\%\] { min-width: 40%; } @@ -2187,6 +2230,10 @@ main .top-border > div.columns-wrapper:first-child { max-width: 400px; } +.max-w-\[7rem\] { + max-width: 7rem; +} + .max-w-full { max-width: 100%; } @@ -2253,6 +2300,11 @@ main .top-border > div.columns-wrapper:first-child { transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } +.-translate-y-full { + --tw-translate-y: -100%; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + .rotate-0 { --tw-rotate: 0deg; transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); @@ -2339,6 +2391,10 @@ main .top-border > div.columns-wrapper:first-child { grid-auto-flow: column; } +.auto-rows-max { + grid-auto-rows: max-content; +} + .grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); } @@ -2355,6 +2411,10 @@ main .top-border > div.columns-wrapper:first-child { grid-template-columns: repeat(3, minmax(0, 1fr)); } +.grid-cols-5 { + grid-template-columns: repeat(5, minmax(0, 1fr)); +} + .grid-rows-1 { grid-template-rows: repeat(1, minmax(0, 1fr)); } @@ -2375,6 +2435,10 @@ main .top-border > div.columns-wrapper:first-child { flex-wrap: wrap; } +.place-content-center { + place-content: center; +} + .\!content-center { align-content: center !important; } @@ -2517,6 +2581,10 @@ main .top-border > div.columns-wrapper:first-child { row-gap: 0.5rem; } +.gap-y-3 { + row-gap: 0.75rem; +} + .gap-y-4 { row-gap: 1rem; } @@ -2624,6 +2692,10 @@ main .top-border > div.columns-wrapper:first-child { overflow-x: auto; } +.overflow-y-scroll { + overflow-y: scroll; +} + .scroll-auto { scroll-behavior: auto; } @@ -2744,6 +2816,10 @@ main .top-border > div.columns-wrapper:first-child { border-left-width: 1px; } +.border-l-0 { + border-left-width: 0px; +} + .border-l-\[0\.5px\] { border-left-width: 0.5px; } @@ -2828,6 +2904,11 @@ main .top-border > div.columns-wrapper:first-child { background-color: rgb(117 35 255 / var(--tw-bg-opacity)) !important; } +.bg-\[\#F5EFFF\] { + --tw-bg-opacity: 1; + background-color: rgb(245 239 255 / var(--tw-bg-opacity)); +} + .bg-black { --tw-bg-opacity: 1; background-color: rgb(0 0 0 / var(--tw-bg-opacity)); @@ -3165,6 +3246,11 @@ main .top-border > div.columns-wrapper:first-child { padding-bottom: 0.625rem; } +.py-\[5px\] { + padding-top: 5px; + padding-bottom: 5px; +} + .\!pb-0 { padding-bottom: 0px !important; } @@ -3237,6 +3323,10 @@ main .top-border > div.columns-wrapper:first-child { padding-left: 2rem; } +.pr-0 { + padding-right: 0px; +} + .pr-2 { padding-right: 0.5rem; } @@ -3253,6 +3343,10 @@ main .top-border > div.columns-wrapper:first-child { padding-right: 2rem; } +.pr-\[5px\] { + padding-right: 5px; +} + .pt-0 { padding-top: 0px; } @@ -3350,6 +3444,11 @@ main .top-border > div.columns-wrapper:first-child { font-size: 2.5rem; } +.text-5xl { + font-size: 3rem; + line-height: 1; +} + .text-6xl { font-size: 3.75rem; line-height: 1; @@ -3491,6 +3590,10 @@ main .top-border > div.columns-wrapper:first-child { color: rgb(0 0 0 / var(--tw-text-opacity)); } +.text-black\/70 { + color: rgb(0 0 0 / 0.7); +} + .text-danaherblack-500 { --tw-text-opacity: 1; color: rgb(51 51 51 / var(--tw-text-opacity)); @@ -3630,6 +3733,10 @@ main .top-border > div.columns-wrapper:first-child { opacity: 0; } +.opacity-100 { + opacity: 1; +} + .opacity-50 { opacity: 0.5; } @@ -3827,6 +3934,10 @@ main .section.top-border { color: rgb(55 65 81 / var(--tw-text-opacity)); } +.empty\:hidden:empty { + display: none; +} + .focus-within\:ring:focus-within { --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color); @@ -3874,11 +3985,6 @@ main .section.top-border { background-color: rgb(117 35 255 / var(--tw-bg-opacity)); } -.hover\:bg-danahergray-100:hover { - --tw-bg-opacity: 1; - background-color: rgb(243 244 246 / var(--tw-bg-opacity)); -} - .hover\:bg-danaherlightblue-50:hover { --tw-bg-opacity: 1; background-color: rgb(239 251 253 / var(--tw-bg-opacity)); @@ -3913,6 +4019,10 @@ main .section.top-border { background-color: rgb(229 231 235 / 0.3); } +.hover\:bg-gray-600\/40:hover { + background-color: rgb(75 85 99 / 0.4); +} + .hover\:bg-purple-200:hover { --tw-bg-opacity: 1; background-color: rgb(125 86 164 / var(--tw-bg-opacity)); @@ -3943,11 +4053,6 @@ main .section.top-border { color: rgb(0 0 0 / var(--tw-text-opacity)); } -.hover\:text-cyan-600:hover { - --tw-text-opacity: 1; - color: rgb(8 145 178 / var(--tw-text-opacity)); -} - .hover\:text-danaherblue-500:hover { --tw-text-opacity: 1; color: rgb(0 74 89 / var(--tw-text-opacity)); @@ -4039,6 +4144,10 @@ main .section.top-border { background-color: rgb(97 97 97 / var(--tw-bg-opacity)); } +.group:hover .group-hover\:bg-danaherpurple-25\/60 { + background-color: rgb(245 239 255 / 0.6); +} + .group:hover .group-hover\:bg-danaherpurple-500 { --tw-bg-opacity: 1; background-color: rgb(117 35 255 / var(--tw-bg-opacity)); @@ -4148,6 +4257,14 @@ main .section.top-border { align-items: center; } + .sm\:border { + border-width: 1px; + } + + .sm\:border-solid { + border-style: solid; + } + .sm\:px-0 { padding-left: 0px; padding-right: 0px; @@ -4162,6 +4279,10 @@ main .section.top-border { padding-top: 4rem; } + .sm\:pt-7 { + padding-top: 1.75rem; + } + .sm\:pt-8 { padding-top: 2rem; } @@ -4185,6 +4306,11 @@ main .section.top-border { font-size: 0.875rem; line-height: 1.25rem; } + + .sm\:text-xl { + font-size: 1.25rem; + line-height: 1.75rem; + } } @media (min-width: 768px) { @@ -4208,6 +4334,10 @@ main .section.top-border { grid-column: span 2 / span 2; } + .md\:col-span-3 { + grid-column: span 3 / span 3; + } + .md\:col-span-6 { grid-column: span 6 / span 6; } @@ -4225,6 +4355,14 @@ main .section.top-border { margin-bottom: 4rem; } + .md\:mb-4 { + margin-bottom: 1rem; + } + + .md\:me-1 { + margin-inline-end: 0.25rem; + } + .md\:ml-14 { margin-left: 3.5rem; } @@ -4233,6 +4371,10 @@ main .section.top-border { margin-right: 1rem; } + .md\:ms-1 { + margin-inline-start: 0.25rem; + } + .md\:mt-12 { margin-top: 3rem; } @@ -4272,6 +4414,10 @@ main .section.top-border { height: 5rem; } + .md\:h-3\/5 { + height: 60%; + } + .md\:h-36 { height: 9rem; } @@ -4360,6 +4506,10 @@ main .section.top-border { flex-direction: row; } + .md\:flex-col { + flex-direction: column; + } + .md\:flex-wrap { flex-wrap: wrap; } @@ -4387,6 +4537,10 @@ main .section.top-border { word-break: normal; } + .md\:border-l { + border-left-width: 1px; + } + .md\:p-0 { padding: 0px; } @@ -4395,11 +4549,21 @@ main .section.top-border { padding: 1.5rem; } + .md\:px-0 { + padding-left: 0px; + padding-right: 0px; + } + .md\:px-12 { padding-left: 3rem; padding-right: 3rem; } + .md\:px-14 { + padding-left: 3.5rem; + padding-right: 3.5rem; + } + .md\:px-4 { padding-left: 1rem; padding-right: 1rem; @@ -4437,11 +4601,30 @@ main .section.top-border { padding-bottom: 6rem; } + .md\:pl-0 { + padding-left: 0px; + } + + .md\:text-3xl { + font-size: 1.875rem; + line-height: 2.25rem; + } + .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; } + .md\:text-5xl { + font-size: 3rem; + line-height: 1; + } + + .md\:text-7xl { + font-size: 4.5rem; + line-height: 1; + } + .md\:leading-7 { line-height: 1.75rem; } @@ -4493,6 +4676,10 @@ main .section.top-border { grid-column: span 10 / span 10; } + .lg\:col-span-2 { + grid-column: span 2 / span 2; + } + .lg\:col-span-3 { grid-column: span 3 / span 3; } @@ -4747,6 +4934,11 @@ main .section.top-border { text-align: center; } + .lg\:text-8xl { + font-size: 6rem; + line-height: 1; + } + .lg\:text-\[11rem\] { font-size: 11rem; } @@ -4859,6 +5051,14 @@ main .section.top-border { width: max-content; } +.\[\&_\#search-content\]\:hidden #search-content { + display: none; +} + +.\[\&_\#search-product\]\:hidden #search-product { + display: none; +} + .peer:checked ~ .peer-checked\:\[\&_\*\]\:text-white * { --tw-text-opacity: 1; color: rgb(255 255 255 / var(--tw-text-opacity)); @@ -4913,6 +5113,10 @@ main .section.top-border { display: none; } +.\[\&_p\]\:leading-4 p { + line-height: 1rem; +} + .peer:checked ~ .peer-checked\:\[\&_span\.minus\]\:rotate-180 span.minus { --tw-rotate: 180deg; transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); @@ -4955,14 +5159,34 @@ main .section.top-border { stroke: #4000A5; } +.\[\&_svg\]\:h-4 svg { + height: 1rem; +} + .\[\&_svg\]\:h-6 svg { height: 1.5rem; } +.\[\&_svg\]\:h-7 svg { + height: 1.75rem; +} + +.\[\&_svg\]\:w-4 svg { + width: 1rem; +} + .\[\&_svg\]\:w-6 svg { width: 1.5rem; } +.\[\&_svg\]\:w-7 svg { + width: 1.75rem; +} + +.\[\&_svg\]\:fill-current svg { + fill: currentColor; +} + .\[\&_svg\]\:fill-white svg { fill: #fff; } @@ -4979,6 +5203,17 @@ main .section.top-border { stroke-width: 1; } +.\[\&_svg\]\:text-danaherpurple-500 svg { + --tw-text-opacity: 1; + color: rgb(117 35 255 / var(--tw-text-opacity)); +} + +.\[\&_svg\]\:transition-transform svg { + transition-property: transform; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; +} + .\[\&_svg\]\:duration-300 svg { transition-duration: 300ms; } @@ -4988,6 +5223,12 @@ main .section.top-border { transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } +.group:hover .\[\&_svg\]\:group-hover\:scale-110 svg { + --tw-scale-x: 1.1; + --tw-scale-y: 1.1; + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); +} + .group:hover .\[\&_svg\]\:group-hover\:stroke-white svg { stroke: #fff; }