PageSourceSearch

https://www.rhenus.group/_assets/dd4c8fa1ee5c22322f0f9b991183519c/…icsGooglePlaces992fd6eafe16a7e0062d.lazy.js

js rhenus.group collected 2026-10-02 06:20:02 UTC 19,422 bytes, 2 lines download raw bytes

1/*! For license information please see dynamicsGooglePlaces992fd6eafe16a7e0062d.lazy.js.LICENSE.txt */
2"use strict";(self.webpackChunkrhenus_webpack=self.webpackChunkrhenus_webpack||[]).push([[768],{159:(e,t,r)=>{r.r(t),r.d(t,{DynamicsGooglePlaces:()=>m});function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function i(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}var a=function(){return e=function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("HandleDynamicsGooglePlacesPowermailValidation: Instance element is required.");if(this.instanceElement=t,this.hiddenJsonField=t.querySelector(".dynamics-google-places-autocomplete-json"),!this.hiddenJsonField)throw new Error("HandleDynamicsGooglePlacesPowermailValidation: Hidden JSON field not found.");if(this.searchInputField=t.querySelector(".dynamics-google-places-searchinput"),!this.searchInputField)throw new Error("HandleDynamicsGooglePlacesPowermailValidation: Search input field not found.");if(this.instanceFormElement=null==t?void 0:t.closest("form"),!this.instanceFormElement)throw new Error("HandleDynamicsGooglePlacesPowermailValidation: Instance form element not found.");this.extraFieldWrapper=t.querySelector(".dynamics-google-places-autocomplete-extra-fields"),this.extraFieldsElements=t.querySelectorAll(".dynamics-google-places-autocomplete-extra-fields .dynamics-google-places-autocomplete-input"),this.FORM_VALIDATION_CLASS="was-validated"},(t=[{key:"init",value:function(){var e=this;!1!==this.hiddenJsonField.hasAttribute("required")&&(this.instanceElement.classList.add("is-required"),this.extraFieldsElements.forEach((function(t){if(!t)throw new Error("HandleDynamicsGooglePlacesPowermailValidation: Extra field is required for validation.");t.addEventListener("input",(function(){e.isExtraFieldValid(t)})),t.addEventListener("change",(function(){e.isExtraFieldValid(t)})),new MutationObserver((function(){e.extraFieldWrapper.classList.contains("show")&&e.isExtraFieldValid(t)})).observe(e.extraFieldWrapper,{attributes:!0,attributeFilter:["class"]})})))}},{key:"hasFormValidated",value:function(){return this.instanceFormElement.classList.contains(this.FORM_VALIDATION_CLASS)}},{key:"isFieldValid",value:function(){var e=this.searchInputField.getAttribute("data-place-id");return!(null===e||""===e)}},{key:"isExtraFieldValid",value:function(e){if(!e)throw new Error("HandleDynamicsGooglePlacesPowermailValidation: Extra field is required for validation.");var t=e.querySelector("input");if(t||console.log("HandleDynamicsGooglePlacesPowermailValidation: No input found in the extra field."),t.value.length>0&&""!==t.value.trim()){if(e.classList.add("valid"),e.classList.remove("invalid"),this.isFieldMdcFloatingLabel(e)){var r=e.querySelector(".mdc-floating-label");r&&r.classList.add("mdc-floating-label--float-above")}return!0}if(e.classList.add("invalid"),e.classList.remove("valid"),this.isFieldMdcFloatingLabel(e)){var n=e.querySelector(".mdc-floating-label");n&&n.classList.remove("mdc-floating-label--float-above")}return!1}},{key:"isFieldMdcFloatingLabel",value:function(e){if(!e)throw new Error("HandleDynamicsGooglePlacesPowermailValidation: Field is required for MDC Floating Label check.");return null!==(null==e?void 0:e.querySelector(".mdc-floating-label"))}}])&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(){c=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof b?t:b,a=Object.create(i.prototype),l=new O(n||[]);return o(a,"_invoke",{value:F(e,r,l)}),a}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var v="suspendedStart",h="suspendedYield",m="executing",y="completed",g={};function b(){}function w(){}function E(){}var S={};d(S,a,(function(){return this}));var L=Object.getPrototypeOf,x=L&&L(L(P([])));x&&x!==r&&n.call(x,a)&&(S=x);var _=E.prototype=b.prototype=Object.create(S);function C(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}
vendor: 5,002 bytes, line 2
2))}function q(e,t){function r(o,i,a,c){var u=p(e[o],e,i);if("throw"!==u.type){var s=u.arg,d=s.value;return d&&"object"==l(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(d).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function F(t,r,n){var o=v;return function(i,a){if(o===m)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var l=n.delegate;if(l){var c=k(l,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=p(t,r,n);if("normal"===u.type){if(o=n.done?y:h,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function k(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function P(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(l(t)+" is not iterable")}return w.prototype=E,o(_,"constructor",{value:E,configurable:!0}),o(E,"constructor",{value:w,configurable:!0}),w.displayName=d(E,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,E):(e.__proto__=E,d(e,s,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},C(q.prototype),d(q.prototype,u,(function(){return this})),t.AsyncIterator=q,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new q(f(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},C(_),d(_,s,"Generator"),d(_,a,(function(){return this})),d(_,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=P,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return l.type="throw",l.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];
2if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function u(e,t,r,n,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,l,"next",e)}function l(e){u(i,n,o,a,l,"throw",e)}a(void 0)}))}}var d=function(e){e.extraFields.classList.add("show"),e.tabElements.forEach((function(e){e.setAttribute("tabindex",0)}))},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";return JSON.stringify({address1_line1:e+" "+t,address1_postalcode:n,address1_city:r,ad_country_id:o,companyname:i})},p=function(e,t){e.customAutocompleteBox.classList.remove("d-none");var r=e.customAutocompleteBox.querySelector("ul");r&&v(e.customAutocompleteBox,(function(){var n;t.forEach((function(t){var n=document.createElement("li");n.setAttribute("value",t.value),n.innerHTML=t.label,r.appendChild(n),n.addEventListener("click",s(c().mark((function r(){var n,o,i,a,l,u,s,p,v,h,m,y,g,b;return c().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(n=e.customAutocompleteBox.parentElement.querySelector(".dynamics-google-places-searchinput"))){r.next=14;break}return n.value=t.label,n.setAttribute("data-place-id",t.value),o=t.value,r.next=7,fetch("".concat(window.location.origin,"/api/maps/autocomplete/details/?place_id=").concat(o));case 7:return i=r.sent,r.next=10,i.json();case 10:a=r.sent,l=a.result,"OK"===(u=a.status)?(h="",m="",y="",g="",b="",(v=l).address_components.forEach((function(e){var t=e.types;t.includes("street_number")?m=e.long_name:t.includes("route")?h=e.long_name:t.includes("locality")?y=e.long_name:t.includes("postal_code")?g=e.long_name:t.includes("country")&&(e.long_name,b=e.short_name.toUpperCase())})),[{element:e.fieldStreet,value:h},{element:e.fieldStreetNumber,value:m},{element:e.fieldCity,value:y},{element:e.fieldZipCode,value:g},{element:e.fieldCountry,value:e.el.querySelector("[data-iso='"+b+"']").value}].forEach((function(e){e.element.value=e.value,e.value.length&&e.element.dispatchEvent(new Event("input"))})),null===(c=e.el,w=e.fieldCountry.value,s=w&&c?c.querySelector('li[value="'.concat(w,'"]')):null)||void 0===s||s.click(),v.name&&-1===v.name.indexOf(h)&&-1===v.name.indexOf(y)&&(e.fieldCompany.value=v.name,e.fieldCompany.dispatchEvent(new Event("input"))),d(e),e.fieldCompany.focus(),null===(p=e.addressInputWrapper)||void 0===p||p.classList.add("d-none"),e.addressInputWrapper&&(e.addressInputWrapper.querySelectorAll("input")[0].required=!1),e.hiddenJson.value=f(h,m,y,g,e.el.querySelector("[data-iso='"+b+"']").value,e.fieldCompany.value),setTimeout((function(){null==e||e.fieldCompany,null==e||e.fieldStreet,null==e||e.fieldStreetNumber,null==e||e.fieldCountry,null==e||e.fieldCity,null==e||e.fieldZipCode;document.querySelector("form").checkValidity()}),2e3)):console.error("placeDetailsError: "+u);case 14:e.customAutocompleteBox.classList.add("d-none");case 15:case"end":return r.stop()}var c,w}),r)}))),{once:!0}),e.addressInput.addEventListener("focusout",(function(){setTimeout((function(){e.customAutocompleteBox.classList.add("d-none"),e.addressInput.value=""}),500)}))}));var o=document.createElement("li");o.innerText=null===(n=e.addressInput)||void 0===n||null===(n=n.dataset)||void 0===n?void 0:n.textNoMatch,r.appendChild(o),o.addEventListener("click",(function(){var t;e.customAutocompleteBox.classList.add("d-none"),null===(t=e.addressInputWrapper)||void 0===t||t.classList.add("d-none"),d(e)}),{once:!0})}))},v=function(e,t){if(e)return e.querySelectorAll("li").forEach((function(e){e.remove()})),t?t():void 0},h=function(){var e=s(c().mark((function e(t,r){var n,o,i,a,l,u,s;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=null===(n=t.addressInput.value)||void 0===n?void 0:n.trim(),(c=o)&&("string"!=typeof c||""!==c)){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,fetch("".concat(window.location.origin,"/api/maps/autocomplete/?input=").concat(o));case 5:return i=e.sent,e.next=8,i.json();case 8:if(a=e.sent,l=a.predictions,"OK"!==(u=a.status)&&"ZERO_RESULTS"!==u||(s=l.map((function(e){return{label:e.description,value:e.place_id}})),p(t,s)),!r){e.next=14;break}return e.abrupt("return",r());case 14:case"end":return e.stop()}var c}),e)})));return function(t,r){return e.apply(this,arguments)}}(),m=function(){var e=document.querySelectorAll(".dynamics-google-places-autocomplete:not(.dynamics-google-places-autocomplete-initialized)");0!==e.length&&e.forEach((function(e){var t;new a(e).init();var r=function(e){if(e){e.classList.add("dynamics-google-places-autocomplete-initialized");var t=e.querySelector(".dynamics-google-places-autocomplete-json");if(t){var r=e.querySelector(".dynamics-google-places-searchinput");if(r){var n=e.querySelector(".dynamics-google-places-autocomplete-custom-autocomplete");if(n){var o=e.querySelector(".dynamics-google-places-autocomplete-searchbar");if(o){var i=e.querySelector(".dynamics-google-places-autocomplete-extra-fields");
2if(i){var a=e.querySelector(".dynamics-google-places-company");if(a){var l=e.querySelector(".dynamics-google-places-company-street");if(l){var c=e.querySelector(".dynamics-google-places-street-number");if(c){var u=e.querySelector(".dynamics-google-places-country");if(u){var s=e.querySelector(".dynamics-google-places-city");if(s){var d=e.querySelector(".dynamics-google-places-zipcode");if(d){var f=e.querySelector(".dynamics-google-places-autocomplete-reset");if(f){var p=e.querySelectorAll("[tabindex]");return{el:e,hiddenJson:t,addressInput:r,customAutocompleteBox:n,addressInputWrapper:o,extraFields:i,fieldCompany:a,fieldStreet:l,fieldStreetNumber:c,fieldCountry:u,fieldCity:s,fieldZipCode:d,isoCode:null,resetBtn:f,tabElements:p}}}}}}}}}}}}}}}(e),n=null===(t=document.querySelector(".dynamics-google-places-autocomplete-json"))||void 0===t?void 0:t.value;if(r.resetBtn&&r.resetBtn.addEventListener("click",(function(e){var t;e.preventDefault(),null===(t=r.extraFields)||void 0===t||t.classList.remove("show"),r.fieldCompany.value="",r.fieldStreet.value="",r.fieldStreetNumber.value="",r.fieldCountry.value="",r.fieldCity.value="",r.fieldZipCode.value="",r.addressInput.value="",r.hiddenJson.value="",r.addressInputWrapper.classList.remove("d-none"),r.addressInputWrapper.querySelectorAll("input")[0].required=!0,r.addressInput.focus(),r.tabElements.forEach((function(e){e.setAttribute("tabindex",-1)}))})),r.addressInput.addEventListener("input",(function(){var e;if(0===r.addressInput.value.length)return r.customAutocompleteBox.classList.add("d-none"),null===(e=r.extraFields)||void 0===e||e.classList.remove("show"),void(r.hiddenJson.value="");h(r)})),function(e){var t=-1;e.addressInput.addEventListener("keydown",(function(r){var n=e.customAutocompleteBox.querySelectorAll("li");if(0!==n.length)switch(r.key){case"ArrowDown":r.preventDefault(),t=(t+1)%n.length,n.forEach((function(e,r){e.classList.toggle("highlight",r===t)}));break;case"ArrowUp":r.preventDefault(),t=(t-1+n.length)%n.length,n.forEach((function(e,r){e.classList.toggle("highlight",r===t)}));break;case"Enter":r.preventDefault(),t>=0&&t<n.length&&n[t].click()}}))}(r),function(e){var t=function(){var t=e.fieldStreet.value,r=e.fieldStreetNumber.value,n=e.fieldCity.value,o=e.fieldZipCode.value,i=e.fieldCountry.parentElement.querySelectorAll(".vsb__wrapper__trigger input")[0].value,a=e.fieldCompany.value;e.hiddenJson.value=f(t,r,n,o,i,a)};[e.fieldStreet,e.fieldStreetNumber,e.fieldCity,e.fieldZipCode,e.fieldCompany,e.fieldCountry].forEach((function(e){e.addEventListener("change",t),e.addEventListener("input",t)}))}(r),function(e){new MutationObserver((function(){var t=[e.fieldCompany,e.fieldStreet,e.fieldStreetNumber,e.fieldCountry,e.fieldCity,e.fieldZipCode],r=e.hiddenJson.required;t.forEach((function(e){e.required=r}))})).observe(e.hiddenJson,{attributes:!0})}(r),n){d(r),r.addressInputWrapper.classList.add("d-none"),r.addressInputWrapper.querySelectorAll("input")[0].required=!1;var o=JSON.parse(n);r.fieldCompany.value=o.companyname,r.fieldStreet.value=o.address1_line1.trim().match(/^(.*\S)\s+(\d+\w*)$/)[1],r.fieldStreetNumber.value=o.address1_line1.trim().match(/^(.*\S)\s+(\d+\w*)$/)[2],r.fieldCity.value=o.address1_city,r.fieldZipCode.value=o.address1_postalcode,r.fieldCountry.value=o.ad_country_id,r.fieldCountry.vsbInstance.setValue(o.ad_country_id)}}))}}}]);

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.