1(()=>{var __webpack_modules__={311:e=>{"use strict";e.exports=jQuery}},__webpack_module_cache__={};function __webpack_require__(e){var o=__webpack_module_cache__[e];if(void 0!==o)return o.exports;var t=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](t,t.exports,__webpack_require__),t.exports}var __webpack_exports__={};(()=>{var jQuery=__webpack_require__(311);function _typeof(e){return _typeof="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},_typeof(e)}(function($){"use strict";$((function(){var wpet_map_adpater=function wpet_map_adpater(type,options,url,windowParent){var scope=this;this.type=type,this.originalType=type,this.mapType=!1,this.mapTypeOptions={},this.options=options,this.mapOptions={},this.onlymap=!1,this.url=url,this.currentWindow=windowParent,this.idMap=null,this.map=null,this.bounds=null,this.infoWindow=null,this.currentMode=null,this.init=function(){var jsToLoad=[],mainLib={},styleToLoad=[];if(void 0!==scope.options.maps&&void 0!==scope.options.maps.default&&void 0!==scope.options.maps.default[scope.type]&&(scope.mapType=scope.options.maps.default[scope.type].type,void 0!==scope.options.maps.default[scope.type].default&&(scope.mapTypeOptions=scope.options.maps.default[scope.type].default)),!1===scope.mapType&&(scope.mapType="leaflet",void 0!==scope.options.selected&&-1!==scope.options.selected.indexOf("google")&&(scope.mapType="google-maps")),void 0===scope.currentWindowParent&&(scope.currentWindow=window),void 0!==options.maponly&&1==options.maponly&&(scope.onlymap=!0),void 0===scope.url&&void 0!==scope.options&&void 0!==scope.options.url_public&&(scope.url=scope.options.url_public),"google-maps"===scope.mapType){var api_key="";void 0!==scope.options&&void 0!==scope.options.maps&&void 0!==scope.options.maps[scope.type]&&void 0!==scope.options.maps[scope.type].google_map_key&&""!=scope.options.maps[scope.type].google_map_key&&(api_key=scope.options.maps[scope.type].google_map_key),mainLib.id="googlemaps",mainLib.src="https://maps.googleapis.com/maps/api/js?key="+api_key+"&libraries=geometry",mainLib.check='typeof google != "undefined" && typeof google.maps != "undefined"',jsToLoad.push({id:"infobox",src:this.url+"libs/js/infobox/infobox.js",check:"typeof InfoBox"}),jsToLoad.push({id:"markercluster",src:this.url+"libs/js/markercluster/markerclusterer.js",check:"typeof MarkerClusterer"})}else mainLib.id="leaflet-js",mainLib.src=this.url+"libs/js/leaflet/leaflet.js",mainLib.check='typeof L != "undefined" && typeof L.map != "undefined"',styleToLoad.push({id:"leaflet-css",src:this.url+"libs/css/leaflet/leaflet.css"}),jsToLoad.push({id:"leaflet-markercluster",src:this.url+"libs/js/leaflet/leaflet.markercluster.js",check:"typeof L.MarkerClusterGroup"});if(void 0!==scope.options&&void 0!==scope.options.maps&&void 0!==scope.options.maps[scope.type]&&(this.mapOptions=scope.options.maps[scope.type]),this.asyncLoadCss(styleToLoad),$(document).unbind("wpet_main_map_ready"),$(document).bind("wpet_main_map_ready",(function(){jsToLoad.length>0?scope.asyncLoad(jsToLoad):$(document).trigger("wpet_map_ready")})),void 0!==mainLib.check&&void 0!==eval(mainLib.check)&&!1!==eval(mainLib.check))setTimeout((function(){$(document).trigger("wpet_main_map_ready")}),0);else{var script=scope.currentWindow.document.createElement("script");script.type="text/javascript",script.src=mainLib.src,script.id=mainLib.id,"google-maps"!=scope.mapType?script.onload=function(){$(document).trigger("wpet_main_map_ready")}:script.onload=function(){"undefined"!=typeof google&&"undefined"!=typeof googlemaps?$(document).trigger("wpet_main_map_ready"):setTimeout((function(){$(document).trigger("wpet_main_map_ready")}),500)},scope.currentWindow.document.body.appendChild(script)}},this.Map=function(e,o){scope.idMap=e;var t=this;switch(this.currentKml={},this.currentKmlBounds=!1,this.currentKmlResize=!1,this.getTileLayer=function(e){var o=!1,t=!1,n={},s=!1,i={},a={},p="";if(void 0!==scope.options.maps[e]&&(i=scope.options.maps[e]),void 0!==scope.options.maps.default[e].default&&(a=scope.options.maps.default[e].default),"leaflet"===scope.options.maps.default[e].type){if(void 0!==i.tilesurl&&null!==i.tilesurl&&""!=i.tilesurl&&(t=i.tilesurl),void 0!==i.name&&null!==i.name&&""!=i.name&&(p=i.name),void 0!==i.tilesoptions&&null!=i.tilesoptions&&(n=i.tilesoptions),void 0!==i.wms&&"1"==i.wms&&(s=!0),!1===t&&void 0!==a.tileurl&&(t=a.tileurl),-1!==e.indexOf("-ign")){var l=!1;void 0!==i&&void 0!==i.layer&&(l=i.layer),!1===l&&void 0!==a.layerType&&(l=a.layerType);var r="image/jpeg";void 0!==i.imageformat&&"1"==i.imageformat&&(r="image/png"),t="https://data.geopf.fr/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER="+l+"&STYLE=normal&TILEMATRIXSET=PM&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&FORMAT="+r}void 0!==a.apikeyslug&&void 0!==i&&void 0!==i[a.apikeyslug]&&(void 0!==a.apikeyparam&&(-1!==t.indexOf("?")?t+="&":t+="?",t+=a.apikeyparam+"=%apikey%"),t=t.replace("%apikey%",i[a.apikeyslug])),void 0===n.attribution&&void 0!==a.copyright&&(n.attribution=a.copyright),void 0===n.id&&void 0!==a.id&&(n.id=a.id),""===p&&void 0!==a.name&&(p=a.name),o=s?{layer:L.tileLayer.wms(t,n),name:p}:{layer:L.tileLayer(t,n),name:p}}return o},this.initGoogleMap=function(){var e={zoom:10,draggable:Math.max(document.documentElement.clientWidth,window.innerWidth||0)>639,center:new google.maps.LatLng(0,0)};if(null!=scope.mapOptions&&void 0!==scope.mapOptions&&void 0!==scope.mapOptions.map_option&&(e=scope.mapOptions.map_option),void 0!==scope.options&&void 0!==scope.options.options){if(void 0!==scope.options.options.zoom&&""!=scope.options.options.zoom&&null!=scope.options.options.zoom){var n=scope.options.options.zoom;null!=o&&void 0!==o.zoom&&""!=o.zoom&&null!=o.zoom&&(n=o.zoom),e.zoom=parseInt(n)}void 0!==scope.options.options.latitude&&""!=scope.options.options.latitude&&null!=scope.options.options.latitude&&"undefined"!==scope.options.options.longitude&&""!=scope.options.options.longitude&&null!=scope.options.options.longitude&&(e.center=new google.maps.LatLng(scope.options.options.latitude,scope.options.options.longitude),null!=o&&void 0!==o.center&&""!=o.center&&null!=o.center&&(e.center=o.center))}if("google-maps-ign"===scope.type){var s;void 0!==scope.mapTypeOptions.layerType&&(s=scope.mapTypeOptions.layerType);var i={};void 0!==scope.mapOptions.layer&&(s=scope.mapOptions.layer),void 0!==scope.mapOptions.tilesoptions&&""!==scope.mapOptions.tilesoptions&&null!==scope.mapOptions.tilesoptions&&(i=scope.mapOptions.tilesoptions),i.getTileUrl=function(e,o){var t="image/jpeg";return void 0!==scope.mapOptions.imageformat&&"1"==scope.mapOptions.imageformat&&(t="image/png"),"https://data.geopf.fr/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER="+s+"&STYLE=normal&TILEMATRIXSET=PM&TILEMATRIX="+o+"&TILEROW="+e.y+"&TILECOL="+e.x+"&FORMAT="+t},void 0!==i.tileSize&&null!==i.tileSize||void 0!==scope.mapTypeOptions.tileSizeX&&void 0!==scope.mapTypeOptions.tileSizeY&&(i.tileSize=new google.maps.Size(scope.mapTypeOptions.tileSizeX,scope.mapTypeOptions.tileSizeY)),void 0!==i.maxZoom&&null!==i.maxZoom||void 0!==scope.mapTypeOptions.maxZoom&&(i.maxZoom=scope.mapTypeOptions.maxZoom),void 0!==i.name&&""!==i.name||(i.name="IGN");var a=new google.maps.ImageMapType(i)}if(t.map=new google.maps.Map(document.getElementById(scope.idMap),e),scope.map=t.map,null!=scope.mapOptions&&void 0!==scope.mapOptions&&void 0!==scope.mapOptions.style){var p=new google.maps.StyledMapType(scope.mapOptions.style,{name:"style"});t.map.mapTypes.set("customMap",p),t.map.setMapTypeId("customMap")}"google-maps-ign"===scope.type&&(t.map.mapTypes.set("IGNLayer",a),t.map.setMapTypeId("IGNLayer"))},this.initLeaflet=function(){var e,n,s,i={};s=10,e=0,n=0,void 0!==scope.options&&void 0!==scope.options.options&&(void 0!==scope.options.options.zoom&&""!=scope.options.options.zoom&&null!=scope.options.options.zoom&&(s=parseInt(scope.options.options.zoom),null!=o&&void 0!==o.zoom&&""!=o.zoom&&null!=o.zoom&&(s=o.zoom)),void 0!==scope.options.options.latitude&&""!=scope.options.options.latitude&&null!=scope.options.options.latitude&&"undefined"!==scope.options.options.longitude&&""!=scope.options.options.longitude&&null!=scope.options.options.longitude&&(e=scope.options.options.latitude,n=scope.options.options.longitude,null!=o&&void 0!==o.zoom&&""!=o.zoom&&null!=o.zoom&&void 0!==o.center.lat&&void 0!==o.center.lat&&(e=o.center.lat,n=o.center.lng))),null!=scope.mapOptions&&void 0!==scope.mapOptions&&"object"==_typeof(scope.mapOptions.map_option)&&(i=scope.mapOptions.map_option),void 0===i.scrollWheelZoom&&(i.scrollWheelZoom=!1),/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)&&(void 0===i.tap&&(i.tap=!1),void 0===i.dragging&&(i.dragging=!1)),t.map=L.map(scope.idMap,i),scope.map=t.map,t.map.on("load",(function(){$(document).trigger("wpet_map_adapter_initialized",{idMap:scope.idMap})}
1)).setView([e,n],s);var a={},p=!1,l=Object.keys(scope.options.maps);$(l).each((function(e,o){if("default"!==o){var n=t.getTileLayer(o);!1!==n&&(a[n.name]=n.layer,o===scope.type&&(p=n.layer))}})),Object.keys(a).length>1&&void 0!==scope.options.options.switchmode&&1==scope.options.options.switchmode&&L.control.layers(a).addTo(t.map),p.addTo(t.map)},scope.mapType){case"leaflet":t.initLeaflet();break;case"google-maps":t.initGoogleMap(),$(document).trigger("wpet_map_adapter_initialized",{idMap:scope.idMap})}return this.setCenter=function(e){switch(scope.mapType){case"leaflet":t.map.flyTo(e);break;case"google-maps":t.map.setCenter(e)}},this.getCenter=function(){switch(scope.mapType){case"leaflet":case"google-maps":return t.map.getCenter()}},this.setZoom=function(e){switch(scope.mapType){case"leaflet":case"google-maps":t.map.setZoom(e)}},this.panTo=function(e){switch(scope.mapType){case"leaflet":case"google-maps":t.map.panTo(e)}},this.fitBounds=function(e){switch(scope.mapType){case"leaflet":case"google-maps":t.map.fitBounds(e.bounds)}},this.panToBounds=function(e){switch(scope.mapType){case"leaflet":t.map.flyToBounds(e.bounds);break;case"google-maps":t.map.panToBounds(e.bounds)}},this.resize=function(){switch(scope.mapType){case"leaflet":t.map.invalidateSize();break;case"google-maps":google.maps.event.trigger(t.map,"resize")}},this.bindDragEnd=function(){switch(scope.mapType){case"leaflet":scope.map.off("dragend"),scope.map.on("dragend",(function(e){$(document).trigger("wpet_map_dragend",{origin:e})}));break;case"google-maps":google.maps.event.clearListeners(scope.map,"dragend"),scope.map.addListener("dragend",(function(e){$(document).trigger("wpet_map_dragend",{origin:e})}))}},this.bindZoomChange=function(){switch(scope.mapType){case"leaflet":scope.map.off("zoomanim"),scope.map.on("zoomanim",(function(e){setTimeout((function(){$(document).trigger("wpet_map_zoomchanged",{origin:e})}),500)}));break;case"google-maps":scope.map.addListener("zoom_changed",(function(e){$(document).trigger("wpet_map_zoomchanged",{origin:e})}))}},this.getCorner=function(){switch(scope.mapType){case"leaflet":var e=(n=scope.map.getBounds()).getSouthWest
1(),o=n.getNorthEast(),t={centerLat:(s=n.getCenter()).lat,centerLng:s.lng,minLat:e.lat,maxLat:o.lat,minLng:e.lng,maxLng:o.lng};break;case"google-maps":var n,s;o=(n=scope.map.getBounds()).getNorthEast(),e=n.getSouthWest(),t={centerLat:(s=n.getCenter()).lat(),centerLng:s.lng(),minLat:e.lat(),maxLat:o.lat(),minLng:e.lng(),maxLng:o.lng()}}return t},this.addKmlGpx=function(e,o,n,s,i){var a=this.map;if(void 0!==scope.options&&void 0!==scope.options.ajax_path){void 0===n&&(n=!0),void 0===s&&(s=!1);var p={url:e,action:"wpet_map_file_coordinates",type:scope.type,elevation:s};$.ajax({url:scope.options.ajax_path,beforeSend:function(e){e.setRequestHeader("X-Iris-Header",window.location.host)},type:"post",dataType:"JSON",data:p,success:function(p){switch(scope.mapType){case"leaflet":var l={};if(void 0!==p.content){null!=o?l.style=o:void 0!==p.style&&(l.style={},void 0!==p.style.stroke&&(l.style.stroke=!0,l.style.color=p.style.stroke),void 0!==p.style["stroke-width"]&&(l.style.weight=p.style["stroke-width"]),void 0!==p.style.fill&&(l.style.fill=!0,l.style.fillColor=p.style.fill)),null!=i&&void 0!==i.strokeColor&&(void 0===l.style&&(l.style={}),l.style.color=i.strokeColor);var r=L.geoJSON(p.content,l).addTo(a);!0===n&&(null===scope.bounds&&(scope.bounds=new scope.Bounds),scope.bounds.extend(r.getBounds().getSouthWest
1()),scope.bounds.extend(r.getBounds().getSouthEast()),scope.bounds.extend(r.getBounds().getNorthWest()),scope.bounds.extend(r.getBounds().getNorthEast()),a.fitBounds(scope.bounds.bounds)),t.currentKml[e]=r,t.currentKmlBounds=scope.bounds,t.currentKmlResize=n}break;case"google-maps":l={};if(void 0!==p.content){(r={type:"FeatureCollection",features:[{type:"Feature"}]}).features[0].geometry=p.content;var c=new google.maps.Data({map:a});c.addGeoJson(r),!0===n&&(null===scope.bounds&&(scope.bounds=new scope.Bounds),c.forEach((function(e){e.getGeometry().forEachLatLng((function(e){scope.bounds.extend(e)}))})),a.fitBounds(scope.bounds.bounds)),null!=o?l=o:void 0!==p.style&&(void 0!==p.style.stroke&&(l.strokeColor=p.style.stroke),void 0!==p.style["stroke-width"]&&(l.strokeWeight=p.style["stroke-width"]),void 0!==p.style.fill&&(l.fillColor=p.style.fill)),null!=i&&void 0!==i.strokeColor&&(l.strokeColor=i.strokeColor),c.setStyle(l),t.currentKml[e]=c,t.currentKmlBounds=scope.bounds}}if($(document).trigger("wpet_map_kml_ready",{result:p,url:e}),!0===s&&null!=p&&void 0!==p.points&&void 0!==p&&!0===p.elevation&&(t.showElevation(p,i),void 0!==p.points&&p.points.length>0)){var d=p.points.length-1;if(null!=i){if(void 0!==i.markerStart&&void 0!==p.points[0]){var m=new scope.LatLng(p.points[0][1],p.points[0][0]);new scope.Marker(m,scope.map,i.markerStart)}if(void 0!==i.markerEnd&&void 0!==p.points[d]){var u=new scope.LatLng(p.points[d][1],p.points[d][0]);new scope.Marker(u,scope.map,i.markerEnd)}}}}})}},this.resetKmlGpx=function(e){switch(scope.mapType){case"leaflet":void 0!==t.currentKml[e]&&scope.map.removeLayer(t.currentKml[e]);break;case"google-maps":void 0!==t.currentKml[e]&&t.currentKml[e].setMap(null)}},this.showElevation=function(e,o){var t=this;this.drawCurrentPath=function(e,n){var s,i=[];if($.each(n,(function(o,t){t.index<e&&(i.push(new scope.LatLng(t[1],t[0])),s=new scope.LatLng(t[1],t[0]))})),t.path=i,null==t.mouseMarker){var a=null;null!=o&&void 0!==o.markerHover&&(a=o.markerHover),t.mouseMarker=new scope.Marker(s,scope.map,a)}if(t.mouseMarker.setPosition(s),null==t.polyline){var p="#FF0000";null!=o&&void 0!==o.strokeColorHover&&(p=o.strokeColorHover),t.polyline=new scope.Polyline(t.path,p,3,1,50)}t.polyline.setPath(t.path)};var n=[];void 0!==e.min_alt&&void 0!==e.max_alt&&(n=[{x:e.min_alt.x,y:e.min_alt.y,marker:{size:2,cssClass:"apexcharts-alt-point"},label:{text:parseInt(e.min_alt.alt)+"m"}},{x:e.max_alt.x,y:e.max_alt.y,marker:{size:2,cssClass:"apexcharts-alt-point"},label:{text:parseInt(e.max_alt.alt)+"m"}}]);var s={series:[{name:"5% <",data:e.yellow},{name:"10% <",data:e.orange},{name:"15% <",data:e.red},{name:"> 15%",data:e.veryred}],annotations:{points:n},chart:{type:"area",height:250,animations:{enabled:!1},redrawOnParentResize:!1,redrawOnWindowResize:!1,selection:{enabled:!1},events:{mounted:function(e,o){setTimeout((function(){$("[data-wpet-graph-elevation] .apexcharts-menu-item.exportSVG").css("display","none"),$("[data-wpet-graph-elevation] .apexcharts-menu-item.exportSVG").css("display","none"),$("[data-wpet-graph-elevation] .apexcharts-menu-item.exportCSV").css("display","none")}),500)}},zoom:{enabled:!0},toolbar:{tools:{download:!0,selection:!0,zoom:!1,zoomin:!0,zoomout:!0,pan:!0,reset:!1}},defaultLocale:scope.options.locale,locales:[{name:scope.options.locale,options:{toolbar:{exportToSVG:"",exportToPNG:wpetMaps.legend.downloadpng,exportToCSV:"",download:"",selection:"",selectionZoom:"",zoomIn:"",zoomOut:"",pan:"",reset:""}}}]},dataLabels:{enabled:!1},fill:{opacity:1,type:"solid"},tooltip:{enabled:!0,enabledOnSeries:!1,followCursor:!1,x:{show:!1},y:{formatter:function(o,n){n.series;var s=n.seriesIndex,i=n.dataPointIndex,a=(n.w,e.indexed[i].index);t.drawCurrentPath(a,e.points);var p=null;return isNaN(o)||null===o||s!==e.indexed[i].serie||(p=wpetMaps.legend.distance+" : "+e.indexed[i].distance+"km",p+=" - "+wpetMaps.legend.altitude+" : "+e.indexed[i].altitude+"m",p+=" - "+wpetMaps.legend.elevation+" : "+e.indexed[i].ele+"%"),p},title:{formatter:function(){return null}}}},colors:["#EADD9C","#EA9D1F","#EA444B","#992F1C"],xaxis:{title:{text:wpetMaps.legend.distanceaxis},tickPlacement:"on",tickAmount:15,range:e.indexed.length,labels:{show:!0,rotate:0,formatter:function(o,t,n){var s=Math.ceil(o);return isNaN(o)?"":void 0!==e.indexed&&void 0!==e.indexed[s]?Math.
1ceil(e.indexed[s].distance):""}},tooltip:{enabled:!1}},yaxis:{title:{text:wpetMaps.legend.altitudeaxis}},markers:{size:0},stroke:{width:1},legend:{position:"top",horizontalAlign:"left"}};new ApexCharts(document.querySelector("[data-wpet-graph-elevation]"),s).render(),$("[data-wpet-graph-elevation]").show(),$("[data-wpet-graph-elevation] svg").css("overflow","visible"),$(document).trigger("wpet_map_elevation_graph_ready")},t},this.LatLng=function(e,o){var t=this;switch(scope.mapType){case"leaflet":t.latLng=new L.LatLng(e,o);break;case"google-maps":t.latLng=new google.maps.LatLng(e,o)}return t.latLng.getLat=function(){var e=null;switch(scope.mapType){case"leaflet":e=t.latLng.lat;break;case"google-maps":e=t.latLng.lat()}return e},t.latLng.getLng=function(){var e=null;switch(scope.mapType){case"leaflet":e=t.latLng.lng;break;case"google-maps":e=t.latLng.lng()}return e},t.latLng},this.Bounds=function(){var e=this;switch(scope.mapType){case"leaflet":e.bounds=[];break;case"google-maps":e.bounds=new google.maps.LatLngBounds}return this.extend=function(o){switch(scope.mapType){case"leaflet":e.bounds.push(o);break;case"google-maps":e.bounds.extend(o)}},scope.bounds=e,e},this.Marker=function(e,o,t,n,s){var i=this;switch(scope.mapType){case"leaflet":void 0!==n&&null!=n||(n={});var a=n;void 0!==scope.mapOptions&&void 0!==scope.mapOptions.markeroption&&Object.assign(a,scope.mapOptions.markeroption),a.className="wpet-marker",null!==typeof t&&null!==t&&""!==t&&(a.iconUrl=t),i.icon=new L.Icon(a),void 0===i.icon.options||void 0===i.icon.options.iconUrl||""==i.icon.options.iconUrl?i.marker=new L.marker(e):i.marker=new L.marker(e,{icon:i.icon}),void 0!==n.id&&(i.marker.id=n.id),void 0!==n.oldicon&&(i.marker.oldicon=n.oldicon);var p=!1;void 0!==s&&!0===s&&(p=!0),!0!==scope.onlymap&&"map"!=scope.currentMode&&!0!==p&&i.marker.addTo(o);break;case"google-maps":void 0!==n&&null!=n||(n={});var l=n;l.position=e,l.map=o,null!==typeof t&&null!==t&&""!==t&&(l.icon=t),i.marker=new google.maps.Marker(l)}return this.getPosition=function(){switch(scope.mapType){case"leaflet":return i.marker.getLatLng();case"google-maps":return i.marker.getPosition()}},this.setPosition=function(e){switch(scope.mapType){case"leaflet":i.marker.setLatLng(e);break;case"google-maps":i.marker.setPosition(e)}},this.setIcon=function(e){switch(scope.mapType){case"leaflet":var o=i.icon.options;o.iconUrl=e,i.icon=new L.Icon(o),""!=i.icon.options.iconUrl&&void 0!==i.icon.options.iconUrl&&i.marker.setIcon(i.icon);break;case"google-maps":i.marker.setIcon(e)}},this.setInfoWindow=function(e,o,t){var n={alignBottom:!0};switch(void 0!==o&&(n=o),void 0!==scope.mapOptions.infowindow&&Object.assign(n,scope.mapOptions.infowindow),scope.mapType){case"leaflet":i.infoWindow=e,i.marker.bindPopup(i.infoWindow),i.marker.on("popupopen",(function(e){$(document).trigger("wpet_map_popup_open",i.marker)})),i.marker.on("popupclose",(function(e){$(document).trigger("wpet_map_popup_close",i.marker)}));break;case"google-maps":n.content=e,i.infoWindow=new InfoBox(n),google.maps.event.addListener(i.marker,"click",(function(){$(document).trigger("wpet_map_popup_open",i.marker),null!==scope.infoWindow&&scope.infoWindow.close(),scope.infoWindow=i.infoWindow,void 0!==t?i.infoWindow.open(t,i.marker):i.infoWindow.open(scope.map,i.marker)})),google.maps.event.addListener(i.infoWindow,"closeclick",(function(){$(document).trigger("wpet_map_popup_close",i.marker)}))}},this.reset=function(e){switch(scope.mapType){case"leaflet":e.removeLayer(i.marker);break;case"google-maps":null!==scope.infoWindow&&scope.infoWindow.close(),i.marker.setMap(null)}},this.bindEvent=function(e,o){switch(scope.mapType){case"leaflet":i.marker.on(e,(function(){o()}));break;case"google-maps":google.maps.event.addListener(i.marker,e,(function(){o()}))}},this.open=function(){switch(scope.mapType){case"leaflet":i.marker.openPopup();break;case"google-maps":google.maps.event.trigger(i.marker,"click")}},i},this.Polyline=function(e,o,t,n,s){var i=this;switch(this.polyline=null,this.option={},scope.mapType){case"leaflet":null!=o&&(i.option.color=o),null!=t&&(i.option.weight=t),null!=n&&(i.option.opacity=n),i.polyline=L.polyline(e,i.option).addTo(scope.map);break;case"google-maps":null!=o&&(i.option.strokeColor=o),null!=t&&(i.option.strokeWeight=t),null!=n&&(i.option.strokeOpacity=n),null!=s&&(i.option.zIndex=s),i.option.path=e,i.option.geodesic=!0,i.polyline=new google.maps.Polyline(i.option),i.polyline.setMap(scope.map)}return this.setPath=function(e){switch(scope.mapType){case"leaflet":i.polyline.setLatLngs(e);break;case"google-maps":i.polyline.setPath(e)}},i}
1,this.MarkerCluster=function(e,o){var t=this;return this.cluster=null,this.markers=[],this.options={},this.init=function(o){switch(void 0!==o?t.options=o:void 0!==scope.mapOptions.cluster&&""!=scope.mapOptions.cluster&&(t.options=scope.mapOptions.cluster),t.markers=[],$(e).each((function(e,o){t.markers.push(o.marker)})),scope.mapType){case"leaflet":var n={removeOutsideVisibleBounds:!0};void 0!==t.options&&void 0!==t.options.customClass&&(n.iconCreateFunction=function(e){var o=e.getChildCount(),n=" marker-cluster-";return n+=o<10?"small":o<100?"medium":"large",new L.DivIcon({html:"<div><span>"+o+"</span></div>",className:t.options.customClass+" marker-cluster"+n,iconSize:new L.Point(40,40)})}),t.cluster=new L.MarkerClusterGroup(n),$(t.markers).each((function(e,o){t.cluster.addLayer(o)})),scope.map.addLayer(t.cluster);break;case"google-maps":t.cluster=new MarkerClusterer(scope.map,t.markers,t.options)}},this.cleanMarkers=function(){switch(scope.mapType){case"leaflet":scope.map.removeLayer(t.cluster);break;case"google-maps":t.cluster.clearMarkers()}},t.init(o),t},this.Route=function(e,o,t,n,s){var i=this;return this.route=null,null!=s&&(this.route=s),this.distance=null,this.distanceMeters=null,this.duration=null,this.durationSeconds=null,this.polyline=null,this.getRoute=function(){var t=new $.Deferred;if(null===i.route){if(void 0!==scope.options&&void 0!==scope.options.iti_path&&null!=e&&null!=o){var s={url,type:scope.type,origin:e,destination:o,directionType:n};$.ajax({url:scope.options.iti_path,beforeSend:function(e){e.setRequestHeader("X-Iris-Header",window.location.host)},type:"post",dataType:"JSON",data:s,success:function(e){if(i.route=e,"google-maps"==scope.type){if(void 0!==i.route&&null!==i.route&&void 0!==i.route.routes&&i.route.routes.length>0&&void 0!==i.route.routes[0]&&null!==i.route.routes[0]&&void 0!==i.route.routes[0].legs&&i.route.routes[0].legs.length>0){var o=i.route.routes[0].legs[0];void 0!==o.distance&&(i.distance=o.distance.text,i.distanceMeters=o.distance.value),void 0!==o.duration&&(i.duration=o.duration.text,i.durationSeconds=o.duration.value)}}else"leaflet-mapbox"==scope.type?(void 0!==e.distance&&(i.distanceMeters=e.distance),void 0!==e.duration&&(i.durationSeconds=e.duration)):null!=e&&(void 0!==e.distance&&(i.distance=e.distance),void 0!==e.distanceMeters&&
1(i.distanceMeters=e.distanceMeters),void 0!==e.duration&&(i.duration=e.duration),void 0!==e.durationSeconds&&(i.durationSeconds=e.durationSeconds));t.resolve()}})}}else t.resolve();return t.promise()},this.display=function(e){switch(scope.mapType){case"leaflet":if(void 0!==i.route&&null!==i.route&&void 0!==i.route.points&&i.route.points.length>0){var o=[];if($(i.route.points).each((function(e,t){o.push(new L.LatLng(t[1],t[0]))})),o.length>0){var t={};t.color=e,i.polyline=L.polyline(o,t).addTo(scope.map)}}break;case"google-maps":if("google-maps-ign"===scope.type){if(void 0!==i.route&&null!==i.route&&"undefined"!=i.route.points&&i.route.points.length>0){o=[];$(i.route.points).each((function(e,t){o.push(new google.maps.LatLng(t[1],t[0]))})),o.length>0&&(i.polyline=new google.maps.Polyline({strokeColor:e,map:scope.map,path:o}))}}else if(void 0!==i.route&&null!==i.route&&"undefined"!=i.route.routes&&i.route.routes.length>0&&void 0!==i.route.routes[0]&&null!==i.route.routes[0]&&void 0!==i.route.routes[0].overview_polyline){o=new google.maps.geometry.encoding.decodePath(i.route.routes[0].overview_polyline.points);i.polyline=new google.maps.Polyline({strokeColor:e,map:scope.map,path:o})}}},this.extendBounds=function(e){switch(scope.mapType){case"leaflet":void 0!==i.polyline&&null!==i.polyline&&i.polyline.getLatLngs().forEac
1h((function(o,t){e.extend(new L.LatLng(o.lat,o.lng))}));break;case"google-maps":void 0!==i.polyline&&i.polyline&&i.polyline.getPath().forEach((function(o,t){e.extend(new google.maps.LatLng(o.lat(),o.lng()))}))}},this.hide=function(){switch(scope.mapType){case"leaflet":null!==i.polyline&&scope.map.removeLayer(i.polyline);break;case"google-maps":null!==i.polyline&&i.polyline.setMap(null)}},i},this.asyncLoadCss=function(e){var o=scope.currentWindow.document.getElementsByTagName("link")[0];$.each(e,(function(e,t){var n=document.createElement("link");n.id=t.id,n.rel="stylesheet",n.type="text/css",n.href=t.src,o.parentNode.insertBefore(n,o)}))},this.asyncLoad=function(jsToLoad){var loaded=0;$.each(jsToLoad,(function(key,extension){var script=scope.currentWindow.document.createElement("script");if(script.type="text/javascript",script.src=extension.src,script.id=extension.id,void 0!==extension.attr){var attr=document.createAttribute(extension.attr.name);attr.value=extension.attr.value,script.setAttributeNode(attr)}void 0!==script.check&&void 0!==eval(script.check)?(loaded++,loaded==jsToLoad.length&&$(document).trigger("wpet_map_ready")):(script.onload=function(){++loaded==jsToLoad.length&&$(document).trigger("wpet_map_ready")},scope.currentWindow.document.body.appendChild(script))}))},this.init()};window.IRIS=window.IRIS||{},window.IRIS.WPETMapAdpater=wpet_map_adpater}))})(jQuery)})()})();
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.