diff --git a/ckanext/spatial/public/js/vendor/leaflet.ajax/leaflet.ajax.min.js b/ckanext/spatial/public/js/vendor/leaflet.ajax/leaflet.ajax.min.js new file mode 100644 index 00000000..c430b017 --- /dev/null +++ b/ckanext/spatial/public/js/vendor/leaflet.ajax/leaflet.ajax.min.js @@ -0,0 +1 @@ +!function e(t,n,r){function a(i,s){if(!n[i]){if(!t[i]){var l="function"==typeof require&&require;if(!s&&l)return l(i,!0);if(o)return o(i,!0);var u=new Error("Cannot find module '"+i+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[i]={exports:{}};t[i][0].call(c.exports,function(e){var n=t[i][1][e];return a(n?n:e)},c,c.exports,e,t,n,r)}return n[i].exports}for(var o="function"==typeof require&&require,i=0;i0&&new r(function(e){e()}).then(function(){i.addUrl()})},clearLayers:function(){return this.urls=[],n.GeoJSON.prototype.clearLayers.call(this),this},addUrl:function(e){var t=this;e&&("string"==typeof e?t.urls.push(e):"function"==typeof e.pop&&(t.urls=t.urls.concat(e)));var r=t.urls.length,o=0;t.fire("data:loading"),t.urls.forEach(function(e){"json"===t.ajaxParams.dataType.toLowerCase()?a(e,t.ajaxParams).then(function(e){var n=t.ajaxParams.middleware(e);t.addData(n),t.fire("data:progress",n)},function(e){t.fire("data:progress",{error:e})}):"jsonp"===t.ajaxParams.dataType.toLowerCase()&&n.Util.jsonp(e,t.ajaxParams).then(function(e){var n=t.ajaxParams.middleware(e);t.addData(n),t.fire("data:progress",n)},function(e){t.fire("data:progress",{error:e})})}),t.on("data:progress",function(){++o===r&&t.fire("data:loaded")})},refresh:function(e){e=e||this.urls,this.clearLayers(),this.addUrl(e)},refilter:function(e){"function"!=typeof e?(this.filter=!1,this.eachLayer(function(e){e.setStyle({stroke:!0,clickable:!0})})):(this.filter=e,this.eachLayer(function(t){e(t.feature)?t.setStyle({stroke:!0,clickable:!0}):t.setStyle({stroke:!1,clickable:!1})}))}}),n.Util.Promise=r,n.Util.ajax=a,n.Util.jsonp=e("./jsonp"),n.geoJson.ajax=function(e,t){return new n.GeoJSON.AJAX(e,t)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./ajax":3,"./jsonp":5,leaflet:void 0,lie:1}],5:[function(e,t,n){(function(n){"use strict";var r=n.L||e("leaflet"),a=e("lie");t.exports=function(e,t){t=t||{};var o,i,s,l,u=document.getElementsByTagName("head")[0],c=r.DomUtil.create("script","",u),f=new a(function(r,a){l=a;var f=t.cbParam||"callback";t.callbackName?o=t.callbackName:(s="_"+(""+Math.random()).slice(2),o="_leafletJSONPcallbacks."+s),c.type="text/javascript",s&&(n._leafletJSONPcallbacks||(n._leafletJSONPcallbacks={length:0}),n._leafletJSONPcallbacks.length++,n._leafletJSONPcallbacks[s]=function(e){u.removeChild(c),delete n._leafletJSONPcallbacks[s],n._leafletJSONPcallbacks.length--,n._leafletJSONPcallbacks.length||delete n._leafletJSONPcallbacks,r(e)}),i=-1===e.indexOf("?")?e+"?"+f+"="+o:e+"&"+f+"="+o,c.src=i}).then(null,function(e){return u.removeChild(c),delete r.Util.ajax.cb[s],e});return f.abort=l,f}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{leaflet:void 0,lie:1}]},{},[4]);