1/* 2 * Copyright 2024 DPD Polska Sp. z o.o. 3 * 4 * NOTICE OF LICENSE 5 * 6 * Licensed under the EUPL-1.2 or later. 7 * You may not use this work except in compliance with the Licence. 8 * 9 * You may obtain a copy of the Licence at: 10 * https://joinup.ec.europa.eu/software/page/eupl 11 * It is also bundled with this package in the file LICENSE.txt 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the Licence is distributed on an AS IS basis, 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 * See the Licence for the specific language governing permissions 17 * and limitations under the Licence. 18 * 19 * @author DPD Polska Sp. z o.o. 20 * @copyright 2024 DPD Polska Sp. z o.o. 21 * @license https://joinup.ec.europa.eu/software/page/eupl 22 */ 23 24// noinspection JSUnresolvedReference 25 26if (typeof dpsShippingSwipBoxEventCreated == 'undefined') { 27 var dpsShippingSwipBoxEventCreated = false; 28} 29 30var dpsShippingSwipBox_iframe = document.createElement("iframe"); 31dpsShippingSwipBox_iframe.setAttribute("id", "dpdshipping-widget-pudo-swipbox-iframe"); 32dpsShippingSwipBox_iframe.setAttribute("allow", "geolocation"); 33dpsShippingSwipBox_iframe.src = dpdshipping_iframe_swipbox_url; 34dpsShippingSwipBox_iframe.style.width = "100%"; 35dpsShippingSwipBox_iframe.style.border = "none"; 36dpsShippingSwipBox_iframe.style.minHeight = "400px"; 37dpsShippingSwipBox_iframe.style.height = "768px"; 38 39var dpsShippingSwipBox_script = document.getElementById("dpdshipping-widget-pudo-swipbox"); 40if (dpsShippingSwipBox_script) 41 dpsShippingSwipBox_script.parentNode.insertBefore(dpsShippingSwipBox_iframe, dpsShippingSwipBox_script); 42 43if (!dpsShippingSwipBoxEventCreated) { 44 var dpsShippingSwipBox_eventListener = window[window.addEventListener ? "addEventListener" : "attachEvent"]; 45 var dpsShippingSwipBox_messageEvent = ("attachEvent" === dpsShippingSwipBox_eventListener) ? "onmessage" : "message"; 46 dpsShippingSwipBox_eventListener(dpsShippingSwipBox_messageEvent, function (a) { 47 if (getDpdshippingIdPudoSwipBoxCarrier() === getDpdshippingSelectedCarrier()) { 48 if (a.data.height && !isNaN(a.data.height)) { 49 dpsShippingSwipBox_iframe.style.height = a.data.height + "px" 50 } else if (a.data.point_id) 51 dpdShippingSwipBoxPointSelected(a.data.point_id); 52 } 53 }, !1); 54 dpsShippingSwipBoxEventCreated = true 55} 56 57function dpdShippingSwipBoxPointSelected(pudoSwipBoxe) { 58 $('.container_dpdshipping_pudo_swipbox_error').css("display", "none"); 59 $('.dpdshipping-pudo-swipbox-new-point').css("display", "none"); 60 $('.dpdshipping-pudo-swipbox-selected-point').css("display", "block"); 61 62 dpdshippingSavePudoCode(pudoSwipBoxe, $('#dpdshippingPudoSwipBoxModal')); 63 dpdshippingGetPudoAddress(pudoSwipBoxe, $('.dpdshipping-swipbox-selected-point')) 64} 65
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.