vendor: 11 bytes, lines 1-2
1(() => { 2
2// src/assets/js/editor/BreadcrumbsNotification.js 3 function BreadcrumbsNotification() { 4 const targetElement = document.getElementById("breadcrumbs-warning"); 5 if (targetElement === null) { 6 return; 7 } 8 const { createElement, createRoot } = wp.element; 9 createRoot(targetElement).render(createElement(renderNotification, {}, [])); 10 function renderNotification() { 11 const { useSelect } = wp.data; 12 const { createElement: createElement2 } = wp.element; 13 const { parentId, postType } = useSelect((select) => { 14 return { 15 parentId: select("core/editor").getEditedPostAttribute("parent"), 16 postType: select("core/editor").getCurrentPostType() 17 }; 18 }, []); 19 const page = useDisabledAncestor(parentId, postType); 20 if (page === null) { 21 return null; 22 } 23 const editPostsUrl = `/wp-admin/post.php?post=${page.id}&action=edit`; 24 return createElement2("p", {}, [ 25 "The parent page ", 26 createElement2("strong", {}, [createElement2("a", { href: editPostsUrl }, page.title.rendered)]), 27 " has breadcrumbs disabled, this will also disable it on this page" 28 ]); 29 } 30 function useDisabledAncestor(parentId, postType) { 31 const { resolveSelect, useDispatch } = wp.data; 32 const { useEffect, useState, useCallback } = wp.element; 33 const [page, setPage] = useState(null); 34 const { invalidateResolution } = useDispatch("core"); 35 const findDisabledAncestor = useCallback(async (parentId2, postType2, disableCache = false) => { 36 if (!parentId2) { 37 return setPage(null); 38 } 39 const selectors = ["postType", postType2, parentId2, { context: "view" }]; 40 if (disableCache === true) { 41 invalidateResolution("getEntityRecord", selectors); 42 } 43 const page2 = await resolveSelect("core").getEntityRecord(...selectors); 44 const { parent, acf } = page2; 45 const { breadcrumbs_enabled: breadcrumbsEnabled } = acf; 46 if (!breadcrumbsEnabled) { 47 return setPage(page2); 48 } 49 if (parent === 0) { 50 return setPage(null); 51 } 52 return findDisabledAncestor(parent, postType2, disableCache); 53 }, []); 54 useEffect(() => { 55 findDisabledAncestor(parentId, postType); 56 const handleVisibilityChange = () => document.hidden === false && findDisabledAncestor(parentId, postType, true); 57 document.addEventListener("visibilitychange", handleVisibilityChange); 58 window.addEventListener("focus", handleVisibilityChange); 59 return () => { 60 document.removeEventListener("visibilitychange", handleVisibilityChange); 61 window.removeEventListener("focus", handleVisibilityChange); 62 }; 63 }, [findDisabledAncestor, parentId, postType]); 64 return page; 65 } 66 } 67 var BreadcrumbsNotification_default = BreadcrumbsNotification; 68 69
69// src/assets/js/lunar-editor.js 70 document.addEventListener("DOMContentLoaded", function() { 71 const prefixRepeater = document.querySelector('[data-name="connectors_prefixes"]'); 72 if (prefixRepeater) { 73 const textFields = prefixRepeater.querySelectorAll( 74 'input[type="text"]:not(.acf-repeater-hidden-input):not([disabled])' 75 ); 76 const connectorPrefixFields = prefixRepeater.querySelectorAll(".connector-prefix"); 77 const connectorCards = prefixRepeater.querySelectorAll(".connector-card"); 78 textFields.forEach((textField, index) => { 79 textField.addEventListener("keyup", (e) => connectorPrefixFields[index].textContent = e.target.value); 80 }); 81 connectorCards.forEach((card) => { 82 const cardStyles = getComputedStyle(card); 83 const cardMinWidth = cardStyles.getPropertyValue("min-width"); 84 card.style.maxWidth = cardMinWidth; 85 }); 86 } 87 const pdfFields = document.querySelector('[data-name="pdf_fields"]'); 88 if (pdfFields) { 89 const inputDescription = pdfFields.querySelector('[data-name="description"] textarea'); 90 const connectorBlockInfo = document.querySelector(".connector-block .connector-block-info-inner"); 91 if (inputDescription && connectorBlockInfo) { 92 updateVisualGuidanceContentOnChange(inputDescription, connectorBlockInfo, "p", { 93 class: "p3" 94 }); 95 } 96 const inputKeyFeatures = pdfFields.querySelector('[data-name="key_features"] textarea'); 97 const connectorBlockKeyFeatures = document.querySelector( 98 ".connector-block .connector-block-features .callout-text ul" 99 ); 100 if (inputKeyFeatures && connectorBlockKeyFeatures) { 101 updateVisualGuidanceContentOnChange(inputKeyFeatures, connectorBlockKeyFeatures, "li", { 102 class: "p4" 103 }); 104 } 105 const inputCapture = pdfFields.querySelector('[data-name="what_does_it_capture"] textarea'); 106 const connectorBlockCapture = document.querySelector( 107 ".connector-block .connector-block-capture .callout-text ul" 108 ); 109 if (inputCapture && connectorBlockCapture) { 110 updateVisualGuidanceContentOnChange(inputCapture, connectorBlockCapture, "li", { 111 class: "p4" 112 }); 113 } 114 } 115 if (document.body.classList.contains("post-type-event") && document.body.classList.contains("edit-php")) { 116 const customTaxonomies = ["event-type", "event-region"]; 117 customTaxonomies.forEach((customTaxonomy) => { 118 document.querySelectorAll(`.${customTaxonomy}-checklist input`).forEach((el) => { 119 el.type = "radio"; 120 }); 121 const wpInlineEditFunction = window.inlineEditPost.edit; 122 window.inlineEditPost.edit = function(postID) { 123 wpInlineEditFunction.apply(this, arguments); 124 if (typeof postID === "object") { 125 postID = parseInt(this.getId(postID)); 126 } 127 let postSelectedTerm; 128 const postInlineData = document.getElementById(customTaxonomy + "_" + postID)?.textContent; 129 if (postInlineData) { 130 const postSelectedTerms = postInlineData.split(","); 131 postSelectedTerm = parseInt(postSelectedTerms[0]); 132 } 133 if (postSelectedTerm) { 134 const editRow = document.getElementById(`edit-${postID}`); 135 if (editRow) { 136 const selectedInput = editRow.querySelector(`input[value="${postSelectedTerm}"]`); 137 if (selectedInput) { 138 selectedInput.checked = true; 139 } 140 } 141 } 142 }; 143 }); 144 } 145 BreadcrumbsNotification_default(); 146 }); 147 var updateVisualGuidanceContentOnChange = (inputElement, outputSelector, outputElement, outputElementAttributes) => { 148 inputElement.addEventListener("input", (e) => { 149 const inputContent = e.target.value.split(/\r?\n/); 150 if (inputContent) { 151 outputSelector.innerHTML = ""; 152 inputContent.map((content) => { 153 if (content) { 154 const outputTag = document.createElement(outputElement); 155 if (outputElementAttributes) {
156 Object.entries(outputElementAttributes).forEach((atts) => { 157 const [attsKey, attsValue] = atts; 158 outputTag.setAttribute(attsKey, attsValue); 159 }); 160 } 161 const nodeContent = document.createTextNode(content); 162 outputTag.appendChild(nodeContent); 163 outputSelector.appendChild(outputTag); 164 } 165 }); 166 } 167 }); 168 }; 169 (function() { 170 window.addEventListener("keydown", handleBlockLevelTabbing, true); 171 function handleBlockLevelTabbing(e) { 172 if (e.key !== "Tab") return; 173 if (!window.wp || !wp.data || !wp.data.select) return; 174 const select = wp.data.select("core/block-editor"); 175 const dispatch = wp.data.dispatch("core/block-editor"); 176 const activeBlockId = select.getSelectedBlockClientId(); 177 if (!activeBlockId) return; 178 function getAllBlockIdsFlattened(blocksList = select.getBlocks()) { 179 let ids = []; 180 for (const block of blocksList) { 181 ids.push(block.clientId); 182 if (block.innerBlocks && block.innerBlocks.length > 0) { 183 ids = ids.concat(getAllBlockIdsFlattened(block.innerBlocks)); 184 } 185 } 186 return ids; 187 } 188 const flattenedBlockIds = getAllBlockIdsFlattened(); 189 const currentIndex = flattenedBlockIds.indexOf(activeBlockId); 190 if (currentIndex === -1) return; 191 const direction = e.shiftKey ? -1 : 1; 192 const targetIndex = currentIndex + direction; 193 if (targetIndex < 0 || targetIndex >= flattenedBlockIds.length) return; 194 e.preventDefault(); 195 e.stopPropagation(); 196 const targetBlockId = flattenedBlockIds[targetIndex]; 197 dispatch.selectBlock(targetBlockId); 198 } 199 })(); 200})();
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.