1/* @license GPL-2.0-or-later https://git.drupalcode.org/project/once/-/raw/v1.0.1/LICENSE.md */ 2/*! @drupal/once - v1.0.1 - 2021-06-12 */ 3var once=function(){"use strict";var n=/[\11\12\14\15\40]+/,e="data-once",t=document;function r(n,t,r){return n[t+"Attribute"](e,r)}function o(e){if("string"!=typeof e)throw new TypeError("once ID must be a string");if(""===e||n.test(e))throw new RangeError("once ID must not be empty or contain spaces");return'[data-once~="'+e+'"]'}function u(n){if(!(n instanceof Element))throw new TypeError("The element must be an instance of Element");return!0}function i(n,e){void 0===e&&(e=t);var r=n;if(null===n)r=[];else{if(!n)throw new TypeError("Selector must not be empty");"string"!=typeof n||e!==t&&!u(e)?n instanceof Element&&(r=[n]):r=e.querySelectorAll(n)}return Array.prototype.slice.call(r)}function c(n,e,t){return e.filter((function(e){var r=u(e)&&e.matches(n);return r&&t&&t(e),r}))}function f(e,t){var o=t.add,u=t.remove,i=[];r(e,"has")&&r(e,"get").trim().split(n).forEach((function(n){i.indexOf(n)<0&&n!==u&&i.push(n)})),o&&i.push(o);var c=i.join(" ");r(e,""===c?"remove":"set",c)}function a(n,e,t){return c(":not("+o(n)+")",i(e,t),(function(e){return f(e,{add:n})}))}return a.remove=function(n,e,t){return c(o(n),i(e,t),(function(e){return f(e,{remove:n})}))},a.filter=function(n,e,t){return c(o(n),i(e,t))},a.find=function(n,e){return i(n?o(n):"[data-once]",e)},a}(); 4 5; 6/* @license MIT https://raw.githubusercontent.com/focus-trap/tabbable/v6.3.0/LICENSE */ 7/*! 8* tabbable 6.3.0 9* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE 10*/ 11!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):(t="undefined"!=typeof globalThis?globalThis:t||self,function(){var n=t.tabbable,o=t.tabbable={};e(o),o.noConflict=function(){return t.tabbable=n,o}}())}(this,(function(t){"use strict";var e=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],n=e.join(","),o="undefined"==typeof Element,r=o?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,i=!o&&Element.prototype.getRootNode?function(t){var e;return null==t||null===(e=t.getRootNode)||void 0===e?void 0:e.call(t)}:function(t){return null==t?void 0:t.ownerDocument},a=function(t,e){var n;void 0===e&&(e=!0);var o=null==t||null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"inert");return""===o||"true"===o||e&&t&&a(t.parentNode)},l=function(t,e,o){if(a(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(n));return e&&r.call(t,n)&&i.unshift(t),i=i.filter(o)},u=function(t,e,o){for(var i=[],l=Array.from(t);l.length;){var c=l.shift();if(!a(c,!1))if("SLOT"===c.tagName){var d=c.assignedElements(),f=d.length?d:c.children,s=u(f,!0,o);o.flatten?i.push.apply(i,s):i.push({scopeParent:c,candidates:s})}else{r.call(c,n)&&o.filter(c)&&(e||!t.includes(c))&&i.push(c);var p=c.shadowRoot||"function"==typeof o.getShadowRoot&&o.getShadowRoot(c),h=!a(p,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(c));if(p&&h){var v=u(!0===p?c.children:p.children,!0,o);o.flatten?i.push.apply(i,v):i.push({scopeParent:c,candidates:v})}else l.unshift.apply(l,c.children)}}return i},c=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},d=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||function(t){var e,n=null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"contenteditable");return""===n||"true"===n}(t))&&!c(t)?0:t.tabIndex},f=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},s=function(t){return"INPUT"===t.tagName},p=function(t){return function(t){return s(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,n=t.form||i(t),o=function(t){return n.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=o(window.CSS.escape(t.name));else try{e=o(t.name)}catch(t){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),!1}var r=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]}(e,t.form);return!r||r===t}(t)},h=function(t){var e=t.getBoundingClientRect(),n=e.width,o=e.height;return 0===n&&0===o},v=function(t,e){var n=e.displayCheck,o=e.getShadowRoot;if("full-native"===n&&"checkVisibility"in t)return!t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(t).visibility)return!0;var a=r.call(t,"details>summary:first-of-type")?t.parentElement:t;if(r.call(a,"details:not([open]) *"))return!0;
11if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return h(t)}else{if("function"==typeof o){for(var l=t;t;){var u=t.parentElement,c=i(t);if(u&&!u.shadowRoot&&!0===o(u))return h(t);t=t.assignedSlot?t.assignedSlot:u||c===t.ownerDocument?u:c.host}t=l}if(function(t){var e,n,o,r,a=t&&i(t),l=null===(e=a)||void 0===e?void 0:e.host,u=!1;if(a&&a!==t)for(u=!!(null!==(n=l)&&void 0!==n&&null!==(o=n.ownerDocument)&&void 0!==o&&o.contains(l)||null!=t&&null!==(r=t.ownerDocument)&&void 0!==r&&r.contains(t));!u&&l;){var c,d,f;u=!(null===(d=l=null===(c=a=i(l))||void 0===c?void 0:c.host)||void 0===d||null===(f=d.ownerDocument)||void 0===f||!f.contains(l))}return u}(t))return!t.getClientRects().length;if("legacy-full"!==n)return!0}return!1},b=function(t,e){return!(e.disabled||a(e)||function(t){return s(t)&&"hidden"===t.type}(e)||v(e,t)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var n=0;n<e.children.length;n++){var o=e.children.item(n);if("LEGEND"===o.tagName)return!!r.call(e,"fieldset[disabled] *")||!o.contains(t)}return!0}e=e.parentElement}return!1}(e))},y=function(t,e){return!(p(e)||d(e)<0||!b(t,e))},m=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},g=function(t){var e=[],n=[];return t.forEach((function(t,o){var r=!!t.scopeParent,i=r?t.scopeParent:t,a=function(t,e){var n=d(t);return n<0&&e&&!c(t)?0:n}(i,r),l=r?g(t.candidates):i;0===a?r?e.push.apply(e,l):e.push(i):n.push({documentOrder:o,tabIndex:a,item:t,isScope:r,content:l})})),n.sort(f).reduce((function(t,e){return e.isScope?t.push.apply(t,e.content):t.push(e.content),t}),[]).concat(e)},w=e.concat("iframe").join(",");t.focusable=function(t,e){return(e=e||{}).getShadowRoot?u([t],e.includeContainer,{filter:b.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):l(t,e.includeContainer,b.bind(null,e))},t.getTabIndex=d,t.isFocusable=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==r.call(t,w)&&b(e,t)},t.isTabbable=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==r.call(t,n)&&y(e,t)},t.tabbable=function(t,e){var n;return n=(e=e||{}).getShadowRoot?u([t],e.includeContainer,{filter:y.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:m}):l(t,e.includeContainer,y.bind(null,e)),g(n)}})); 12 13; 14/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ 15(function(){Drupal.behaviors.dataLayer={langPrefixes:function langPrefixes(){var languages=Drupal.settings.dataLayer.languages,langList=[];for(var lang in languages)if(languages[lang].prefix!=='')langList.push(languages[lang].prefix);return langList;},attach:function(){return;}};})();; 16let checkbox=document.getElementById('edit-nl-info');if(checkbox)checkbox.addEventListener('change',function(){if(checkbox.checked)(function(){let token;fetchToken();window.datafactory={validate:async function(){let street=document.getElementById("street-address").value;let postalCode=document.getElementById("postalCode").value;let city=document.getElementById("city").value;let streetNumber=document.getElementById("street-number").value;try{return await checkAddress(street,postalCode,city);}catch(error){console.error("Fehler bei der Validierung der Adresse:",error);}async function checkAddress(street,postalCode,city){const apiUrl=`https://autocomplete2.postdirekt.de/autocomplete2/search/de/buildings?street=${encodeURIComponent(street)}&postal_code=${encodeURIComponent(postalCode)}&city=${encodeURIComponent(city)}&house_number=${streetNumber}`;try{const response=await fetch(apiUrl,{headers:{'Authorization':`Bearer ${token}`}});if(!response.ok)throw new Error(`HTTP error! Status: ${response.status}`);const data=await response.json();return data.buildings.find((b)=>b.street===street&&b.postalCode===postalCode&&b.city===city&&b.houseNumber===streetNumber);}catch(error){console.error("Fehler bei der API-Anfrage:",error);throw error;}}}};function fetchToken(){fetch('https://api.dlv.de/api/v1/postdirekttoken').then((response)=>{if(!response.ok)throw new Error(`HTTP error! Status: ${response.status}`);return response.json();}).then((data)=>{token=data.token;setTimeout(fetchToken,(data.expires_in-5)*1000);}).catch((error)=>{console.error("Fetch error:",error);});}let postalCodeInput=document.getElementById("postalCode");let streetInput=document.getElementById("street-address");let postalCodeDropdown=document.getElementById("postalCodeDropdown");let streetDropdown=document.getElementById("streetAddressDropdown");let cityDropdown=document.getElementById("cityDropdown");let countrySelect=document.getElementById("country");let cityInput=document.getElementById("city");streetInput.addEventListener("input",function(){if(document.activeElement!==this)return;let street=this.value;let postalCode=document.getElementById("postalCode").value;
16let city=document.getElementById("city").value;let selectedCountry=countrySelect.value;if(selectedCountry==="DE"){const streetUrl=`https://autocomplete2.postdirekt.de/autocomplete2/search/de/postalcodes_cities_districts_streets?address_type=A&street=${encodeURIComponent(street)}&postal_code=${encodeURIComponent(postalCode)}&city=${encodeURIComponent(city)}`;fetch(streetUrl,{method:'GET',headers:{'Authorization':`Bearer ${token}`}}).then((response)=>{if(!response.ok)throw new Error(`HTTP error! Status: ${response.status}`);return response.json();}).then((data)=>{let suggestions=data.addresses;displaySuggestions(streetDropdown,suggestions,streetInput,'street');}).catch((error)=>{console.error("Fetch error:",error);});}});postalCodeInput.addEventListener("input",function(){let postalCode=this.value;let selectedCountry=countrySelect.value;if(document.activeElement!==this)return;if(selectedCountry==="DE"){const tokenUrl="https://autocomplete2.postdirekt.de/autocomplete2/search/de/postalcodes_cities";fetch(`${tokenUrl}?postal_code=${postalCode}`,{method:'GET',headers:{'Authorization':`Bearer ${token}`}}).then((response)=>{if(!response.ok)throw new Error(`HTTP error! Status: ${response.status}`);return response.json();}).then((data)=>{let suggestions=data.addresses;displaySuggestions(postalCodeDropdown,suggestions,postalCodeInput,'postalCode');}).catch((error)=>{console.error("Fetch error:",error);});}});cityInput.addEventListener("input",function(){let city=this.value;if(document.activeElement!==this)return;let postalCode=document.getElementById("postalCode").value;let selectedCountry=countrySelect.value;if(selectedCountry==="DE"){const cityUrl=`https://autocomplete2.postdirekt.de/autocomplete2/search/de/postalcodes_cities?postal_code=${encodeURIComponent(postalCode)}&city=${encodeURIComponent(city)}`;fetch(cityUrl,{method:'GET',headers:{'Authorization':`Bearer ${token}`}}).then((response)=>{if(!response.ok)throw new Error(`HTTP error! Status: ${response.status}`);return response.json();}).then((data)=>{let suggestions=data.addresses;displaySuggestions(cityDropdown,suggestions,cityInput,'city');}).catch((error)=>{console.error("Fetch error:",error);});}});lastPlzSuggestions={};function displaySuggestions(dropdown,suggestions,inputField,labelPath){dropdown.innerHTML="";let plzsUnique=[];if(suggestions.length>0){suggestions.forEach((suggestion)=>{let option=document.createElement("div");option.className="datafactory-dropdown-option";option.textContent=suggestion[labelPath];if(suggestion.district)option.textContent+=`, ${suggestion.district}`;if(labelPath!=='postalCode'){option.textContent+=`, ${suggestion.postalCode}`;dropdown.appendChild(option);}else{option.textContent+=` ${suggestion.city}`;plzsUnique.push(suggestion);lastPlzSuggestions[suggestion.postalCode]=suggestion.city;dropdown.appendChild(option);if(!(plzsUnique.filter((suggs)=>suggs.postalCode===suggestion.postalCode).length===1))delete lastPlzSuggestions[suggestion.postalCode];}option.addEventListener("mousedown",function(){dropdown.style.display="none";inputField.value=suggestion[labelPath];let selectedPostalCode=suggestion[labelPath];if(!postalCodeInput.value)postalCodeInput.value=suggestion.postalCode;if(!cityInput.value||labelPath==='postalCode')cityInput.value=suggestion.city;});});dropdown.style.display="block";}else dropdown.style.display="none";}document.addEventListener("click",function(e){if(e.target!==postalCodeInput)postalCodeDropdown.style.display="none";if(e.target!==streetInput)streetDropdown.style.display="none";if(e.target!==cityInput)cityDropdown.style.display="none";});postalCodeInput.addEventListener('blur',function(){postalCodeDropdown.style.display="none";if(!cityInput.value)cityInput.value=lastPlzSuggestions[postalCodeInput.value]||'';});}());});;
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.