const inkeepSearchBarScript = document.createElement("script"); inkeepSearchBarScript.type = "module"; inkeepSearchBarScript.src = 'https://unpkg.com/@inkeep/uikit-js@0.3.19/dist/embed.js'; inkeepSearchBarScript.integrity = 'sha384-NrApcNv8E5NXyoaHq8Zbyi9byJkCkCJ7BZJRlZ+8ELzfp0qgixQYy4FXfkJcVkn3'; inkeepSearchBarScript.crossOrigin = "anonymous"; document.body.appendChild(inkeepSearchBarScript); inkeepSearchBarScript.addEventListener("load", function () { const inkeepConfigSearchBar = {"baseSettings":{"apiKey":"b1a4c4d73c9b48aa5b3cdae6e4c81f0bb3d1134eeb5a7100","integrationId":"cm6xmhn9h000gs601495fkkdx","organizationId":"org_map2JQEOco8U1ZYY","primaryBrandColor":"#010101"},"aiChatSettings":{"chatSubjectName":"Frigate","botAvatarSrcUrl":"https://frigate.video/images/favicon.png","getHelpCallToActions":[{"name":"GitHub","url":"https://github.com/blakeblackshear/frigate","icon":{"builtIn":"FaGithub"}}],"quickQuestions":["How to configure and setup camera settings?","How to setup notifications?","Supported builtin detectors?","How to restream video feed?","How can I get sound or audio in my recordings?"]}}; (function listenerFunction({ inkeepConfig, componentType }) { if (!inkeepConfig) { throw new Error( "Configuration Error: inkeepConfig is missing in the Docusaurus configuration file." ); } let inkeepWidget = null; const isChatButtonType = componentType === "ChatButton"; const renderWidgets = () => { const inkeepWidgetContainer = isChatButtonType ? undefined : document.getElementById("inkeepSearchBar"); if (isChatButtonType) { const backToTopButtonOffset = inkeepConfig.chatButtonType === "RECTANGLE_SHORTCUT" ? "6.8rem" : "5.4rem"; const backToTopButton = document.querySelector( ".theme-back-to-top-button" ); if (backToTopButton) { backToTopButton.style.bottom = backToTopButtonOffset; } } const shouldRender = !inkeepWidget && (isChatButtonType || inkeepWidgetContainer); const config = { componentType, targetElement: inkeepWidgetContainer, colorModeSync: { observedElement: document.documentElement, isDarkModeCallback: (observedElement) => observedElement.dataset.theme === "dark", colorModeAttribute: "data-theme", }, properties: { ...inkeepConfig, baseSettings: { ...inkeepConfig.baseSettings, theme: { ...(inkeepConfig.baseSettings?.theme || {}), components: { SearchBarTrigger: { defaultProps: { size: "shrink", }, }, ...(inkeepConfig.baseSettings?.theme?.components || {}), }, }, }, modalSettings: inkeepConfig.modalSettings, searchSettings: inkeepConfig.searchSettings, aiChatSettings: inkeepConfig.aiChatSettings, }, }; if (shouldRender) { inkeepWidget = Inkeep().embed(config); } }; renderWidgets(); // not totally sure this is necessary anymore but leaving for now just in case const observer = new MutationObserver(() => { renderWidgets(); }); observer.observe(document.documentElement, { attributes: true }); })({ inkeepConfig: inkeepConfigSearchBar, componentType: 'SearchBar', }) })