{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./inst/htmlwidgets/bindings/lfx-omnivore-bindings.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","r","value","n","__esModule","object","property","prototype","hasOwnProperty","p","s","getResetStyle","style","highlightStyle","resetStyle","$","isEmptyObject","each","k","v","addGeoJSONLayer","widget","geojsonLayerFunction","layerId","group","setStyle","markerType","markerIcons","markerIconProperty","markerOptions","markerIconFunction","clusterOptions","clusterId","labelProperty","labelOptions","popupProperty","popupOptions","pathOptions","highlightOptions","self","clusterGroup","layerManager","getLayer","cluster","L","markerClusterGroup","layerSupport","freezeAtZoom","clusterLayerStore","LeafletWidget","ClusterLayerStore","extraInfo","thisGroup","defaultStyle","highlightFeature","e","layer","target","bringToFront","resetFeature","sendToBack","bringToBack","globalStyle","extend","geojsonOptions","feature","properties","onEachFeature","featureExtraInfo","featureId","id","bindPopup","bindTooltip","permanent","showLabel","noHide","on","mouseover","mouseout","methods","mouseHandler","pointToLayer","latlng","circleMarker","marker","icon","gjlayer","add","addLayer","utils","parseXML","str","DOMParser","parseFromString","getParsedGeoJSON","data","geojson","trim","JSON","parse","type","topoJsonFeatures","key","objects","topoToGeo","topojson","Util","isArray","concat","features","push","isURL","url","RegExp","test","addGenericGeoJSONLayer","addGeoJSONv2","this","getJSON","geojsondata","geoJSONOptions","geoJson","addKML","kml","toGeoJSON","addCSV","csv","csvParserOptions","csv2geojson","err","addGPX","gpx","addGeoJSONChoropleth","legendOptions","choropleth","addKMLChoropleth"],"mappings":"aACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,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G,EAAAC,GACA,EACA,UACA,eACA,UACAS,EAAAC,EAAAC,EAAAC,EACAC,EAAAC,KAIAlB,EACAmB,EACA,SAAAiF,GACA,OAAA5E,EAAA0F,WACArF,cAAAwC,MAAAK,iBAAAE,GACAjF,EAAAgD,OAAA1B,EAAAmF,GAAAa,IAEA9G,EAAAC,GACA,EACA,UACA,eACA,UACAS,EAAAC,EAAAC,EAAAC,EACAC,EAAAC,IAKAW,cAAA8B,QAAAwD,iBAAA,SACAZ,EAAApG,EAAAC,EACAS,EAAAC,EAAAC,EAAAC,EACAC,EAAAC,EAAA+F,GAEA,IACAxH,EAAAyB,EACAe,EAAA1C,EAFA0B,EAEAxB,GAEAE,EAAAC,cAAAqH,KACAA,EAAAxH,iBACAwH,EAAAvH,WAAAuC,GAGA,IAAAd,EAAA8E,KACA,GAAApE,cAAAwC,MAAAsB,MAAAY,GACA5G,EAAAuG,QAAAK,EAAA,SAAA5B,GACA,IAAAwB,EAAAK,UAAAD,IAAA1E,cAAAwC,MAAAC,SAAAK,IACA3E,EACAmB,EACA,SAAAiF,GACA,OAAA5E,EAAA0F,WACArF,cAAAwC,MAAAK,iBAAAyB,GACAxG,EAAAgD,OAAA1B,EAAAmF,GAAAa,IAEA9G,EAAAC,GACA,EACA,UACA,eACA,UACAS,EAAAC,EAAAC,EAAAC,EACAC,EAAAC,SAGG,CACH,IAAAiF,EAAAK,UAAAD,IAAA1E,cAAAwC,MAAAC,SAAAiC,IACAvG,EACAmB,EACA,SAAAiF,GACA,OAAA5E,EAAA0F,WACArF,cAAAwC,MAAAK,iBAAAyB,GACAxG,EAAAgD,OAAA1B,EAAAmF,GAAAa,IAEA9G,EAAAC,GACA,EACA,UACA,eACA,UACAS,EAAAC,EAAAC,EAAAC,EACAC,EAAAC","file":"lfx-omnivore-bindings.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/* global LeafletWidget, $, L, topojson, csv2geojson, toGeoJSON */\n\n// parse an XML\nLeafletWidget.utils.parseXML = function(str) {\n  if (typeof str === 'string') {\n    return (new DOMParser()).parseFromString(str, 'text/xml');\n  } else {\n    return str;\n  }\n};\n\n// parse an GeoJSON/TopoJSON\nLeafletWidget.utils.getParsedGeoJSON = function(data) {\n  var geojson;\n\n  if(typeof data ==='undefined' || data === null ||\n    (typeof data === 'string' && data.trim() === '')) {\n    return geojson;\n  }\n\n  if(typeof data === 'string') {\n    geojson = JSON.parse(data);\n  } else {\n    geojson = data;\n  }\n\n  // if input is a TopoJSON\n  // iterate over each of its objects and add their coords\n  if (geojson.type === 'Topology') {\n    var topoJsonFeatures = [];\n    for (var key in geojson.objects) {\n      var topoToGeo = topojson.feature(geojson, geojson.objects[key]);\n      if(L.Util.isArray(topoToGeo)) {\n        topoJsonFeatures = topoJsonFeatures.concat(topoToGeo);\n      } else if('features' in topoToGeo ) {\n        topoJsonFeatures = topoJsonFeatures.concat(topoToGeo.features);\n      } else {\n        topoJsonFeatures.push(topoToGeo);\n      }\n    }\n    geojson = topoJsonFeatures;\n  }\n  return geojson;\n};\n\n// utility method to extract resetStyle from defaultStyle & highlightStyle\nfunction getResetStyle(style, highlightStyle) {\n  var resetStyle = {};\n  if(!$.isEmptyObject(highlightStyle)) {\n    $.each(highlightStyle, function (k, v) {\n      if(k != 'bringToFront' && k != 'sendToBack'){\n        if(style && style[k]) {\n          resetStyle[k] = style[k];\n        }\n      }\n    });\n  }\n  return resetStyle;\n}\n\n// is a given string a URL\nLeafletWidget.utils.isURL = function(url) {\n  if (typeof url !== 'string' || url.trim() === '' ) {\n    return false;\n  }\n  /* eslint-disable quotes */\n  var strRegex = '^((https|http|ftp|rtsp|mms)?://)'\n    + \"?(([0-9a-z_!~*'().&=+$%-]+: )?[0-9a-z_!~*'().&=+$%-]+@)?\" //ftp user@\n    + '(([0-9]{1,3}\\\\.){3}[0-9]{1,3}' // IP/URL- 199.194.52.184\n    + '|' // IP/DOMAIN\n    + \"([0-9a-z_!~*'()-]+\\\\.)*\" //  www.\n    + '([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\\\\.' //\n    + '[a-z]{2,6})' // first level domain- .com or .museum\n    + '(:[0-9]{1,4})?' // Port - :80\n    + '((/?)|' // a slash isn't required if there is no file name\n    + \"(/[0-9A-Za-z_!~*'().;?:@&=+$,%#-]+)+/?)$\";\n  /* eslint-enable quotes */\n  var re=new RegExp(strRegex);\n  return re.test(url);\n};\n\nfunction addGeoJSONLayer(\n  widget,\n  geojsonLayerFunction,\n  layerId, group,\n  setStyle,\n  markerType, markerIcons,\n  markerIconProperty, markerOptions, markerIconFunction,\n  clusterOptions, clusterId,\n  labelProperty, labelOptions, popupProperty, popupOptions,\n  pathOptions, highlightOptions\n) {\n  var self = widget;\n\n  // Initialize Clusering support if enabled.\n  var clusterGroup = self.layerManager.getLayer('cluster', clusterId),\n    cluster = clusterOptions !== null;\n  if (cluster && !clusterGroup) {\n    clusterGroup = L.markerClusterGroup.layerSupport(clusterOptions);\n    if(clusterOptions.freezeAtZoom) {\n      var freezeAtZoom = clusterOptions.freezeAtZoom;\n      delete clusterOptions.freezeAtZoom;\n      clusterGroup.freezeAtZoom(freezeAtZoom);\n    }\n    clusterGroup.clusterLayerStore = new LeafletWidget.ClusterLayerStore(clusterGroup);\n  }\n  var extraInfo = cluster ? { clusterId: clusterId } : {};\n  var thisGroup = cluster ? null : group;\n\n  // Initialize shape highlighting if enabled.\n  var style = pathOptions;\n  var highlightStyle = highlightOptions;\n  var defaultStyle = getResetStyle(style, highlightStyle);\n\n  function highlightFeature(e) {\n    var layer = e.target;\n    layer.setStyle(highlightStyle);\n    if(highlightStyle.bringToFront) {\n      layer.bringToFront();\n    }\n  }\n  function resetFeature(e){\n    var layer = e.target;\n    layer.setStyle(defaultStyle);\n    if(highlightStyle.sendToBack) {\n      layer.bringToBack();\n    }\n  }\n\n  var globalStyle = $.extend({}, style);\n\n  function styleFunction(feature) {\n    return $.extend(globalStyle, feature.style || {},\n      feature.properties.style || {});\n  }\n\n  function onEachFeatureFunction(feature, layer) {\n    var featureExtraInfo = $.extend({\n      featureId: feature.id,\n      properties: feature.properties\n    }, extraInfo || {});\n\n    // create and bind popups if enabled.\n    if (typeof popupProperty !== 'undefined' && popupProperty !== null) {\n      if(typeof popupProperty == 'string') {\n        if(!$.isEmptyObject(popupOptions)) {\n          layer.bindPopup(feature.properties[popupProperty], popupOptions);\n        } else {\n          layer.bindPopup(feature.properties[popupProperty]);\n        }\n      } else if(typeof popupProperty == 'function') {\n        if(!$.isEmptyObject(popupOptions)) {\n          layer.bindPopup(popupProperty(feature), popupOptions);\n        } else {\n          layer.bindPopup(popupProperty(feature));\n        }\n      }\n    }\n\n    // create and bind labels if enabled.\n    if (typeof labelProperty !== 'undefined' && labelProperty !== null) {\n      if(typeof labelProperty == 'string') {\n        if(!$.isEmptyObject(labelOptions)) {\n          if(labelOptions.permanent) {\n            layer.bindTooltip(feature.properties[labelProperty], labelOptions).showLabel();\n          } else {\n            layer.bindTooltip(feature.properties[labelProperty], labelOptions);\n          }\n        } else {\n          layer.bindTooltip(feature.properties[labelProperty]);\n        }\n      } else if(typeof labelProperty == 'function') {\n        if(!$.isEmptyObject(labelOptions)) {\n          if(labelOptions.noHide) {\n            layer.bindTooltip(labelProperty(feature), labelOptions).showLabel();\n          } else {\n            layer.bindTooltip(labelProperty(feature), labelOptions);\n          }\n        } else {\n          layer.bindTooltip(labelProperty(feature));\n        }\n      }\n    }\n\n    // add EventListeners to highlight shapes on hover if enabled.\n    if(!$.isEmptyObject(highlightStyle)) {\n      layer.on({\n        'mouseover': highlightFeature,\n        'mouseout': resetFeature});\n    }\n\n    layer.on('click', LeafletWidget.methods.mouseHandler(self.id, layerId,\n      thisGroup, 'geojson_click', featureExtraInfo), self);\n    layer.on('mouseover', LeafletWidget.methods.mouseHandler(self.id, layerId,\n      thisGroup, 'geojson_mouseover', featureExtraInfo), self);\n    layer.on('mouseout', LeafletWidget.methods.mouseHandler(self.id, layerId,\n      thisGroup, 'geojson_mouseout', featureExtraInfo), self);\n  }\n\n  // code for custom markers\n  function pointToLayerFunction(feature, latlng) {\n    var layer = null;\n    if(markerType === 'circleMarker') {\n      layer = L.circleMarker(latlng, markerOptions || {});\n    } else {\n      if (typeof markerIconProperty !== 'undefined' && markerIconProperty !== null) {\n        if(typeof markerIconProperty == 'string') {\n          layer = L.marker(latlng, $.extend({\n            icon: markerIconFunction(markerIcons[feature.properties[markerIconProperty]])\n          }, markerOptions || {}));\n        } else if(typeof markerIconProperty == 'function') {\n          layer = L.marker(latlng, $.extend({\n            icon: markerIconFunction(markerIcons[markerIconProperty(feature)])\n          }, markerOptions || {}));\n        }\n      } else {\n        layer = L.marker(latlng, $.extend({\n          icon: markerIconFunction(markerIcons)\n        }, markerOptions || {}));\n      }\n    }\n\n    return layer;\n  }\n\n  var geojsonOptions = {};\n  if(setStyle){\n    geojsonOptions.style = styleFunction;\n  }\n  geojsonOptions.onEachFeature = onEachFeatureFunction;\n\n  if(markerType === 'circleMarker' || !$.isEmptyObject(markerIcons)) {\n    geojsonOptions.pointToLayer = pointToLayerFunction;\n  }\n\n  var gjlayer = geojsonLayerFunction(geojsonOptions);\n\n  if (cluster) {\n    clusterGroup.clusterLayerStore.add(gjlayer);\n    self.layerManager.addLayer(clusterGroup, 'cluster', clusterId, group);\n  } else {\n    self.layerManager.addLayer(gjlayer, 'geojson', layerId, thisGroup);\n  }\n\n}\n\nLeafletWidget.methods.addGenericGeoJSONLayer = addGeoJSONLayer;\n\nLeafletWidget.methods.addGeoJSONv2 = function(\n  geojson, layerId, group,\n  markerType, markerIcons,\n  markerIconProperty, markerOptions, markerIconFunction,\n  clusterOptions, clusterId,\n  labelProperty, labelOptions, popupProperty, popupOptions,\n  pathOptions, highlightOptions\n) {\n  var self = this;\n  if(LeafletWidget.utils.isURL(geojson)) {\n    $.getJSON(geojson, function(geojsondata){\n      addGeoJSONLayer(\n        self,\n        function getGeoJSONLayer(geoJSONOptions){\n          return L.geoJson(\n            LeafletWidget.utils.getParsedGeoJSON(geojsondata), geoJSONOptions);\n        },\n        layerId, group,\n        true,\n        markerType, markerIcons,\n        markerIconProperty, markerOptions, markerIconFunction,\n        clusterOptions, clusterId,\n        labelProperty, labelOptions, popupProperty, popupOptions,\n        pathOptions, highlightOptions\n      );\n    });\n  } else {\n    addGeoJSONLayer(\n      self,\n      function getGeoJSONLayer(geoJSONOptions){\n        return L.geoJson(\n          LeafletWidget.utils.getParsedGeoJSON(geojson), geoJSONOptions);\n      },\n      layerId, group,\n      true,\n      markerType, markerIcons,\n      markerIconProperty, markerOptions, markerIconFunction,\n      clusterOptions, clusterId,\n      labelProperty, labelOptions, popupProperty, popupOptions,\n      pathOptions, highlightOptions\n    );\n  }\n};\n\nLeafletWidget.methods.addKML = function(\n  kml, layerId, group,\n  markerType, markerIcons,\n  markerIconProperty, markerOptions, markerIconFunction,\n  clusterOptions, clusterId,\n  labelProperty, labelOptions, popupProperty, popupOptions,\n  pathOptions, highlightOptions\n) {\n  var self = this;\n  if(LeafletWidget.utils.isURL(kml)) {\n    $.getJSON(kml, function(data){\n      var geojsondata = toGeoJSON.kml(\n        LeafletWidget.utils.parseXML(data));\n      addGeoJSONLayer(\n        self,\n        function getGeoJSONLayer(geoJSONOptions){\n          return L.geoJson(\n            LeafletWidget.utils.getParsedGeoJSON(geojsondata), geoJSONOptions);\n        },\n        layerId, group,\n        true,\n        markerType, markerIcons,\n        markerIconProperty, markerOptions, markerIconFunction,\n        clusterOptions, clusterId,\n        labelProperty, labelOptions, popupProperty, popupOptions,\n        pathOptions, highlightOptions\n      );\n    });\n  } else {\n    var geojsondata = toGeoJSON.kml(\n      LeafletWidget.utils.parseXML(kml));\n    addGeoJSONLayer(\n      self,\n      function getGeoJSONLayer(geoJSONOptions){\n        return L.geoJson(\n          LeafletWidget.utils.getParsedGeoJSON(geojsondata), geoJSONOptions);\n      },\n      layerId, group,\n      true,\n      markerType, markerIcons,\n      markerIconProperty, markerOptions, markerIconFunction,\n      clusterOptions, clusterId,\n      labelProperty, labelOptions, popupProperty, popupOptions,\n      pathOptions, highlightOptions\n    );\n  }\n};\n\nLeafletWidget.methods.addCSV = function(\n  csv, layerId, group,\n  markerType, markerIcons,\n  markerIconProperty, markerOptions, markerIconFunction,\n  clusterOptions, clusterId,\n  labelProperty, labelOptions, popupProperty, popupOptions,\n  pathOptions, highlightOptions, csvParserOptions\n) {\n  var self = this;\n  if(LeafletWidget.utils.isURL(csv)) {\n    $.getJSON(csv, function(data){\n      csv2geojson.csv2geojson(\n        data, csvParserOptions || {},\n        function(err, geojsondata) {\n          addGeoJSONLayer(\n            self,\n            function getGeoJSONLayer(geoJSONOptions){\n              return L.geoJson(\n                LeafletWidget.utils.getParsedGeoJSON(geojsondata), geoJSONOptions);\n            },\n            layerId, group,\n            true,\n            markerType, markerIcons,\n            markerIconProperty, markerOptions, markerIconFunction,\n            clusterOptions, clusterId,\n            labelProperty, labelOptions, popupProperty, popupOptions,\n            pathOptions, highlightOptions\n          );\n        }\n      );\n    });\n  } else {\n    csv2geojson.csv2geojson(\n      csv, csvParserOptions || {},\n      function(err, geojsondata) {\n        addGeoJSONLayer(\n          self,\n          function getGeoJSONLayer(geoJSONOptions){\n            return L.geoJson(\n              LeafletWidget.utils.getParsedGeoJSON(geojsondata), geoJSONOptions);\n          },\n          layerId, group,\n          true,\n          markerType, markerIcons,\n          markerIconProperty, markerOptions, markerIconFunction,\n          clusterOptions, clusterId,\n          labelProperty, labelOptions, popupProperty, popupOptions,\n          pathOptions, highlightOptions\n        );\n      }\n    );\n  }\n};\n\nLeafletWidget.methods.addGPX = function(\n  gpx, layerId, group,\n  markerType, markerIcons,\n  markerIconProperty, markerOptions, markerIconFunction,\n  clusterOptions, clusterId,\n  labelProperty, labelOptions, popupProperty, popupOptions,\n  pathOptions, highlightOptions\n) {\n  var self = this;\n  if(LeafletWidget.utils.isURL(gpx)) {\n    $.getJSON(gpx, function(data){\n      var geojsondata = toGeoJSON.gpx(\n        LeafletWidget.utils.parseXML(data));\n      addGeoJSONLayer(\n        self,\n        function getGeoJSONLayer(geoJSONOptions){\n          return L.geoJson(\n            LeafletWidget.utils.getParsedGeoJSON(geojsondata), geoJSONOptions);\n        },\n        layerId, group,\n        true,\n        markerType, markerIcons,\n        markerIconProperty, markerOptions, markerIconFunction,\n        clusterOptions, clusterId,\n        labelProperty, labelOptions, popupProperty, popupOptions,\n        pathOptions, highlightOptions\n      );\n    });\n  } else {\n    var geojsondata = toGeoJSON.gpx(\n      LeafletWidget.utils.parseXML(gpx));\n    addGeoJSONLayer(\n      self,\n      function getGeoJSONLayer(geoJSONOptions){\n        return L.geoJson(\n          LeafletWidget.utils.getParsedGeoJSON(geojsondata), geoJSONOptions);\n      },\n      layerId, group,\n      true,\n      markerType, markerIcons,\n      markerIconProperty, markerOptions, markerIconFunction,\n      clusterOptions, clusterId,\n      labelProperty, labelOptions, popupProperty, popupOptions,\n      pathOptions, highlightOptions\n    );\n  }\n};\n\n\n\nLeafletWidget.methods.addGeoJSONChoropleth = function(\n  geojson, layerId, group,\n  labelProperty, labelOptions, popupProperty, popupOptions,\n  pathOptions, highlightOptions, legendOptions\n) {\n\n  var style = pathOptions;\n  var highlightStyle = highlightOptions;\n  var defaultStyle = getResetStyle(style, highlightStyle);\n\n  if(!$.isEmptyObject(legendOptions)) {\n    legendOptions.highlightStyle = highlightStyle;\n    legendOptions.resetStyle = defaultStyle;\n  }\n\n  var self = this;\n  if(LeafletWidget.utils.isURL(geojson)) {\n    $.getJSON(geojson, function(geojsondata){\n      addGeoJSONLayer(\n        self,\n        function getGeoJSONLayer(geoJSONOptions){\n          return L.choropleth(\n            LeafletWidget.utils.getParsedGeoJSON(geojsondata),\n            $.extend(pathOptions, geoJSONOptions), legendOptions);\n        },\n        layerId, group,\n        false,\n        null, null,\n        null, null, null,\n        null, null,\n        labelProperty, labelOptions, popupProperty, popupOptions,\n        pathOptions, highlightOptions\n      );\n    });\n  } else {\n    addGeoJSONLayer(\n      self,\n      function getGeoJSONLayer(geoJSONOptions){\n        return L.choropleth(\n          LeafletWidget.utils.getParsedGeoJSON(geojson),\n          $.extend(pathOptions, geoJSONOptions), legendOptions);\n      },\n      layerId, group,\n      false,\n      null, null,\n      null, null, null,\n      null, null,\n      labelProperty, labelOptions, popupProperty, popupOptions,\n      pathOptions, highlightOptions\n    );\n  }\n};\n\nLeafletWidget.methods.addKMLChoropleth = function(\n  kml, layerId, group,\n  labelProperty, labelOptions, popupProperty, popupOptions,\n  pathOptions, highlightOptions, legendOptions\n) {\n  var style = pathOptions;\n  var highlightStyle = highlightOptions;\n  var defaultStyle = getResetStyle(style, highlightStyle);\n\n  if(!$.isEmptyObject(legendOptions)) {\n    legendOptions.highlightStyle = highlightStyle;\n    legendOptions.resetStyle = defaultStyle;\n  }\n\n  var self = this;\n  if(LeafletWidget.utils.isURL(kml)) {\n    $.getJSON(kml, function(data){\n      var geojsondata = toGeoJSON.kml(LeafletWidget.utils.parseXML(data));\n      addGeoJSONLayer(\n        self,\n        function getGeoJSONLayer(geoJSONOptions){\n          return L.choropleth(\n            LeafletWidget.utils.getParsedGeoJSON(geojsondata),\n            $.extend(pathOptions, geoJSONOptions), legendOptions);\n        },\n        layerId, group,\n        false,\n        null, null,\n        null, null, null,\n        null, null,\n        labelProperty, labelOptions, popupProperty, popupOptions,\n        pathOptions, highlightOptions\n      );\n    });\n  } else {\n    var geojsondata = toGeoJSON.kml(LeafletWidget.utils.parseXML(kml));\n    addGeoJSONLayer(\n      self,\n      function getGeoJSONLayer(geoJSONOptions){\n        return L.choropleth(\n          LeafletWidget.utils.getParsedGeoJSON(geojsondata),\n          $.extend(pathOptions, geoJSONOptions), legendOptions);\n      },\n      layerId, group,\n      false,\n      null, null,\n      null, null, null,\n      null, null,\n      labelProperty, labelOptions, popupProperty, popupOptions,\n      pathOptions, highlightOptions\n    );\n  }\n};\n"],"sourceRoot":""}