PageSourceSearch

https://www.dambenois.fr/_assets/1bd6f15392ab946578be28156d4ce5df/…/cimeos-mapbox.min.js?1744719742

js dambenois.fr collected 2026-10-03 02:47:07 UTC 95,674 bytes, 1 lines download raw bytes

1!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).CimeosMapbox=t()}}(function(){return function(){return function t(e,n,r){function i(s,l){if(!n[s]){if(!e[s]){var a="function"==typeof require&&require;if(!l&&a)return a(s,!0);if(o)return o(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var h=n[s]={exports:{}};e[s][0].call(h.exports,function(t){return i(e[s][1][t]||t)},h,h.exports,t,e,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}}()({1:[function(t,e,n){"use strict";const r=t("xtend"),i=t("@turf/bbox").default,o=t("@turf/bbox-polygon").default,s=t("@turf/union").default,l=t("@turf/center-of-mass").default,a=(t("@turf/centroid").default,t("mapbox-gl-generic-geocoder/")),u=t("mapbox-gl-style-switcher"),h=t("./geocodeBanRequest");function c(t){let e=this;if(this.el=jQuery("#"+t.el),this.markers=[],this.layersIds=[],this.refresh=[],this.lastZoom=null,this.popup=null,this.popupCluster=null,this.clusterFeatures={type:"FeatureCollection",features:[]},this.highlightFeatures={type:"FeatureCollection",features:[]},this.geocoderFeatures={type:"FeatureCollection",features:[]},this.geometryFeatures={type:"FeatureCollection",features:[]},0===this.el.length)throw"Unable to find element by id "+t.el;let n=t.rootPath?t.rootPath:"./",i=t.configFile?t.configFile:this.options.configFile;return jQuery.get(n+"configuration/"+i+".json",function(n){e.options=r({},e.options,n,t),e._init()}),this}c.prototype={options:{el:"map",latitude:0,longitude:0,zoom:16,maxZoom:16,rootPath:"./",configFile:"default",scrollZoom:!0,controls:{navigation:{enable:!0},geolocate:{enable:!0},geocoder:{enable:!0,placeholder:"Rechercher une adresse"},style_switcher:{enabled:!1,styles:[]},scale:{enabled:!0}}},_init:async function(){let t=this;if(this.map=new maplibregl.Map({container:this.options.el,center:[this.options.longitude,this.options.latitude],zoom:this.options.zoom,maxZoom:this.options.maxZoom,maxBounds:this.options.bounds}),this.lastZoom=this.options.zoom,void 0!==this.options.maxBounds&&this.map.setMaxBounds(this.options.maxBounds),void 0!==this.options.source)if(Array.isArray(this.options.source)){let t={},e=[];for(const n in this.options.source){const r=await fetch(this.options.source[n]),i=await r.json();t=Object.assign({},t,i),e=e.concat(i.layers)}t.layers=e,this.map.setStyle(t)}else this.map.setStyle(this.options.rootPath+"styles/"+this.options.source+".json");return!1===this.options.scrollZoom&&this.map.scrollZoom.disable(),this.map.on("load",async()=>{jQuery(t).trigger("load"),t._setDefaultData(),t._loadIcons(),t._addEventsListener()}),this._addControls(),this},addMarker:function(t){if(void 0===t.longitude||void 0===t.latitude)throw"No longitude/latitude provided";let e=this._fixMarkerPosition([parseFloat(t.longitude),parseFloat(t.latitude)]);return this.markers.push(e),t.longitude=e[0],t.latitude=e[1],this._addMarkerToSourceWithFeatureCollection(t,"points",this.clusterFeatures)},addGeometry:function(t){if(void 0===t.geometry)throw"No geometry provided";if(void 0===t.geometry.coordinates)throw"No geometry coordinates provided";if(void 0===t.geometry.type)throw"No geometry type provided";let e={type:"Feature",geometry:t.geometry};return void 0!==t.properties&&(e.properties=t.properties),this.geometryFeatures.features.push(e),this._updateSourceWithFeatureCollection("geometry",this.geometryFeatures),e},fitBounds:function(){let t=[1/0,1/0,-1/0,-1/0],e=i(this.clusterFeatures),n=i(this.geometryFeatures);if(this.clusterFeatures.features.length>0&&this.geometryFeatures.features.length>0){let r=o(e),l=o(n),a=s(r,l);t=i(a)}else{if(this.clusterFeatures.features.length>0){if(1===this.clusterFeatures.features.length)return void this.map.jumpTo({center:this.clusterFeatures.features[0].geometry.coordinates,zoom:15});t=e}this.geometryFeatures.features.length>0&&(t=n)}this.map.setPadding({top:60,bottom:60,left:30,right:30}),this.map.fitBounds(t)},displayPopup:function(t){let e=this,n=t.eventArgs.fields,r="popup-point";
1""!==t.eventArgs.additionalCssClasses&&(r+=" "+t.eventArgs.additionalCssClasses),e.popup=new maplibregl.Popup({anchor:"top",className:r}),e.popup.setLngLat(t.coordinates).addTo(e.map),e.popup.setHTML("&nbsp;");let i=0;!1===(t.eventArgs.noPadding||!1)&&(i=jQuery(".maplibregl-popup").not(".popup-hover").outerWidth());let o={top:0,bottom:0,left:i},s=e.lastZoom>15?e.lastZoom:15;if(e.map.easeTo({center:t.coordinates,zoom:s,padding:o}),e.lastZoom=e.map.getZoom(),jQuery(e).trigger("clusterOpen"),void 0!==t.eventArgs.ajax)jQuery.ajax({url:t.eventArgs.ajax.url,method:"POST",data:t.eventArgs.ajax.data}).done(function(r){if(r.length>=1){let i,o="",s="";if(void 0!==t.eventArgs.ajax.useLocalTemplate&&1===t.eventArgs.ajax.useLocalTemplate){let l=jQuery("#"+t.eventArgs.templateId).get(0).innerHTML;i=r[0][t.eventArgs.ajax.valuesField],s=(o=e._parseTemplateWithFieldsAndValues(l,n,i)).get(0).outerHTML}else s=r;e.popup.setHTML(s),jQuery(e).trigger("popupOpen")}});else{let r=t.values,i=this._parseTemplateWithFieldsAndValues(template,n,r);e.popup.setHTML(i.get(0).outerHTML)}e.popup.on("close",function(t){e.map.isMoving()||e.map.easeTo({center:e.map.getCenter(),zoom:e.lastZoom,padding:{top:0,bottom:0,left:0,right:0}}),jQuery(e).trigger("clusterClose")})},displayPopupCluster:function(t){let e=this,n=t.eventArgs.additionalCssClasses;e.popupCluster=new maplibregl.Popup({anchor:"top",className:n}),e.popupCluster.setLngLat(t.coordinates).addTo(e.map),e.popupCluster.setHTML("&nbsp;");let r={top:0,bottom:0,left:jQuery(".maplibregl-popup").outerWidth()},i=e.lastZoom>15?e.lastZoom:15;e.map.easeTo({center:t.coordinates,zoom:i,padding:r}),e.lastZoom=e.map.getZoom(),jQuery(e).trigger("clusterOpen"),jQuery.ajax({url:t.eventArgs.ajax.url,method:"POST",data:t.eventArgs.ajax.data}).done(function(t){t.length>=1&&(e.popupCluster.setHTML(t),jQuery(e).trigger("clusterOpen"))}),e.popupCluster.on("close",function(n){void 0!==t.clusterId&&e.map.setFeatureState({id:t.clusterId,source:"points"},{active:0}),e.map.isMoving()||e.map.easeTo({center:e.map.getCenter(),zoom:e.lastZoom,padding:{top:0,bottom:0,left:0,right:0}}),jQuery(e).trigger("clusterClose")})},displayModal:function(t){let e=this,n=jQuery("#"+t.eventArgs.contentId),r=jQuery("#"+t.eventArgs.templateId).get(0).innerHTML,i=t.eventArgs.fields;if(void 0!==t.eventArgs.ajax)jQuery.ajax({url:t.eventArgs.ajax.url,method:"POST",data:t.eventArgs.ajax.data}).done(function(o){if(o.length>=1){let s,l="";void 0!==t.eventArgs.ajax.useLocalTemplate&&1===t.eventArgs.ajax.useLocalTemplate?(s=o[0][t.eventArgs.ajax.valuesField],l=e._parseTemplateWithFieldsAndValues(r,i,s)):l=o,n.html(l),jQuery(e).trigger("modalOpen")}});else{let e=t.values,o=this._parseTemplateWithFieldsAndValues(r,i,e);n.html(o)}n.hasClass("is-hidden")&&(n.foundation("toggle"),n.css("opacity",1)),jQuery(document).trigger("scroll")},displayListPopin:function(t){if("undefined"==typeof list||null===list)throw"list is not defined";if("function"!=typeof list.displayPopin)throw"displayPopin is not a function for argument list";list.displayPopin(t.eventArgs.urlShow,t.eventArgs.contentElementId,t.eventArgs.uid,t.eventArgs.title,t.eventArgs.url,t.eventArgs.popinId)},displayMapPopin:function(t){let e=t.values.document;jQuery("body").prepend('<div id="loaderMap" class="reveal-overlay load-popin"><div class="sk-circle"><div class="sk-circle1 sk-child"></div><div class="sk-circle2 sk-child"></div><div class="sk-circle3 sk-child"></div><div class="sk-circle4 sk-child"></div><div class="sk-circle5 sk-child"></div><div class="sk-circle6 sk-child"></div><div class="sk-circle7 sk-child"></div><div class="sk-circle8 sk-child"></div><div class="sk-circle9 sk-child"></div><div class="sk-circle10 sk-child"></div><div class="sk-circle11 sk-child"></div><div class="sk-circle12 sk-child"></div></div></div>');let n=jQuery("#"+t.popinId),r=jQuery("#"+t.listConfigId).attr("data-url-show");n.attr("data-title",e.title),n.attr("data-url",e.url),n.attr("aria-label",n.attr("data-label")+" "+e.title),n.removeAttr("data-label");let i=n.find(".wrap_popin"),o=[];o.push({name:"tx_cimsearchelastic_displaysearch[contentElementId]",value:e.contentElementId}),o.push({name:"tx_cimsearchelastic_displaysearch[itemUid]",value:e.uid}),jQuery.ajax({url:r,type:"POST",dataType:"html",data:o}).done(function(t){jQuery("#loaderMap").remove(),i.html(t),n.foundation(),n.foundation("open"),jQuery(document).trigger("popin")})},clearAll:function(){this.markers=[],this._clearSourceAndFeatureCollection("points",this.clusterFeatures),this._clearSourceAndFeatureCollection("highlight-point",this.highlightFeatures),this._clearSourceAndFeatureCollection("geocoder",this.geocoderFeatures),this._clearSourceAndFeatureCollection("geometry",this.geometryFeatures)},_parseTemplateWithFieldsAndValues:function(t,e,n){for(let e in n){let r=new RegExp("\\[\\["+e+"\\]\\]","g");t=t.replace(r,n[e])}let r=jQuery(t);for(let t in e){let i="popup-"+e[t];void 0===typeof n[e[t]]||void 0===n[e[t]]||""===n[e[t]]?r.find("#"+i).remove():r.find("#"+i).removeAttr(i)}return r},_addMarkerToSourceWithFeatureCollection:function(t,e,n){let r={type:"Feature",geometry:{type:"Point",coordinates:[parseFloat(t.longitude),parseFloat(t.latitude)]}};return void 0!==t.properties&&(r.properties=t.properties),n.features.push(r),this._updateSourceWithFeatureCollection(e,n),r},_clearSourceAndFeatureCollection:function(t,e){e.features=[],this._updateSourceWithFeatureCollection(t,e)},_updateSourceWithFeatureCollection:function(t,e){let n=this;void 0===n.refresh[t]&&(n.refresh[t]=setTimeout(function(){const r=setInterval(function(){void 0!==n.map&&n.map.loaded()&&void 0!==n.map.getSource(t)&&(n.map.getSource(t).setData(e),n.refreshIsActive=!1,clearInterval(r))},25);delete n.refresh[t]},15))},_setDefaultData:function(){this.map.getSource("points").setData(this.clusterFeatures),this.map.getSource("highlight-point").setData(this.highlightFeatures),this.map.getSource("geocoder").setData(this.geocoderFeatures),this.map.getSource("geometry").setData(this.geometryFeatures)},_updateAllSourcesWithFeaturesCollections:function(){this._updateSourceWithFeatureCollection("points",this.clusterFeatures),this._updateSourceWithFeatureCollection("highlight-point",this.highlightFeatures),this._updateSourceWithFeatureCollection("geocoder",this.geocoderFeatures),this._updateSourceWithFeatureCollection("geometry",this.geometryFeatures)}
1,_addControls:function(){let t=this;if(this.options.controls.navigation.enable&&this.map.addControl(new maplibregl.NavigationControl,"bottom-right"),this.options.controls.geolocate.enable&&this.map.addControl(new maplibregl.GeolocateControl({positionOptions:{enableHighAccuracy:!0},trackUserLocation:!0}),"bottom-right"),this.options.controls.geocoder.enable){let e=new a(this.options.controls.geocoder,h);this.map.addControl(e,"bottom-right"),e.on("result",function(e){t._clearSourceAndFeatureCollection("geocoder",t.geocoderFeatures),t._addMarkerToSourceWithFeatureCollection({latitude:e.result.lat,longitude:e.result.lon},"geocoder",t.geocoderFeatures),jQuery(t).trigger("addressChosen",[e.result.lat,e.result.lon])})}if(this.options.controls.style_switcher.enable){let e=this.options.controls.style_switcher.styles;this.map.addControl(new u.MapboxStyleSwitcherControl(e,{eventListeners:{onChange:function(){setTimeout(function(){t._updateAllSourcesWithFeaturesCollections()},500)}}}))}this.options.controls.scale.enable&&this.map.addControl(new maplibregl.ScaleControl,"bottom-left")},_addEventsListener:function(){let t=this;var e=new maplibregl.Popup({closeButton:!1,closeOnClick:!1,anchor:"top",className:"popup-hover"}),n=new maplibregl.Popup({closeButton:!1,closeOnClick:!1,anchor:"left",className:"popup-hover"}),r=!1,i=null;t.map.on("zoomend",function(){t.lastZoom=t.map.getZoom()}),t.map.on("mouseenter","unclustered-point-default",function(n){t.map.getCanvas().style.cursor="pointer";let i=n.features[0].geometry.coordinates.slice(),o=n.features[0].properties;if((o.shouldDisplayPopupOnHover||!1)&&!r){let n='<div class="contenu_bloc"><div class="content"><p class="subtitle">'+o.title+"</p></div></div>";e.setLngLat(i).setHTML(n).addTo(t.map),r=!0}}),t.map.on("mouseleave","unclustered-point-default",function(){t.map.getCanvas().style.cursor="",e.remove(),r=!1}),t.map.on("mouseenter","feature-point",function(){t.map.getCanvas().style.cursor="pointer"}),t.map.on("mouseleave","feature-point",function(){t.map.getCanvas().style.cursor=""}),t.map.on("mouseenter","feature-geometry-polygon",function(e){t.map.getCanvas().style.cursor="pointer"}),t.map.on("mousemove","feature-geometry-polygon",function(e){let r=e.lngLat,o=e.features[0].properties;if((o.shouldDisplayPopupOnHover||!1)&&i!==r){n.remove();let e='<div class="contenu_bloc"><div class="content"><p class="subtitle">'+o.title+"</p></div></div>";n.setLngLat(r).trackPointer().setHTML(e).addTo(t.map),i=r}}),t.map.on("mouseleave","feature-geometry-polygon",function(){t.map.getCanvas().style.cursor="",n.remove()}),t.map.on("mouseenter","feature-geometry-line",function(){t.map.getCanvas().style.cursor="pointer"}),t.map.on("mouseleave","feature-geometry-line",function(){t.map.getCanvas().style.cursor=""}),t.map.on("mouseenter","clusters",function(){t.map.getCanvas().style.cursor="pointer"}),t.map.on("mouseleave","clusters",function(){t.map.getCanvas().style.cursor=""}),t.map.on("click",function(e){let n=t.map.queryRenderedFeatures(e.point,{layers:["clusters"]}),r=t.map.queryRenderedFeatures(e.point,{layers:["feature-point","feature-geometry-polygon","feature-geometry-line"]});if(n.length>0&&void 0!==n[0].properties){let e=n[0].properties.cluster_id,r=n[0].properties.point_count,i=t.map.getSource("points");i.getClusterExpansionZoom(e,function(o,s){o||(s>=t.options.maxZoom?(t.map.setFeatureState({id:e,source:"points"},{active:1}),i.getClusterLeaves(e,r,0,function(r,i){let o=i[0].properties.onClick,s=o.args.ajax.data,l=[];jQuery.each(i,function(t,e){l.push(e.properties.pid+"_"+e.properties.uid)}),s.push({name:"tx_cimsearchelastic_displaysearch[identifiers]",value:l}),o.args.ajax.data=s,t.displayPopupCluster({eventArgs:o.args,coordinates:n[0].geometry.coordinates,clusterId:e})}),t.map.easeTo({center:n[0].geometry.coordinates,zoom:17,padding:{top:0,bottom:0,left:0,right:0}})):t.map.easeTo({center:n[0].geometry.coordinates,zoom:s,padding:{top:0,bottom:0,left:0,right:0}}))})}else if(r.length>0){let n;n="LineString"===r[0].geometry.type?e.lngLat:"Point"===r[0].geometry.type?r[0].geometry.coordinates.slice():l(r[0]).geometry.coordinates.slice();let i=r[0].properties||null;if(void 0!==i.onClick){let e=JSON.parse(i.onClick);if(void 0!==e.callback){t.lastZoom=t.map.getZoom();let o={top:10,bottom:10},s=t.lastZoom>15?t.lastZoom:15;t.map.easeTo({center:n,zoom:s,padding:o}),"function"==typeof t[e.callback]&&t[e.callback].apply(t,[{feature:r[0],values:i,eventArgs:e.args,coordinates:n}])}}}})},_loadIcons:function(){let t=this;jQuery.each(this.options.icons,async function(e,n){let r=await t.map.loadImage(t.options.rootPath+n.path);t.map.addImage(n.id,r.data),t.layersIds.push("unclustered-point-"+n.id),"default"!==n.id&&t.map.addLayer({id:"unclustered-point-"+n.id,type:"symbol",source:"points",filter:["all",["!has","point_count"],["==","icon",n.id]],layout:{"icon-image":n.id,"icon-anchor":"bottom","icon-allow-overlap":!0}})})},_fixMarkerPosition:function(t){if(this.markers.length>0)for(let e=0;e<=this.markers.length;e++)if(void 0!==this.markers[e]){let n=this.markers[e][0],r=this.markers[e][1];if(t[1]===r&&t[0]===n){let e=t[0]+(.8*Math.random()+.2-.5)/800,n=t[1]+(.8*Math.random()+.2-.5)/800;return[parseFloat(e),parseFloat(n)]}}return t}},e.exports=c},{"./geocodeBanRequest":2,"@turf/bbox":4,"@turf/bbox-polygon":3,"@turf/center-of-mass":5,"@turf/centroid":6,"@turf/union":11,"mapbox-gl-generic-geocoder/":16,"mapbox-gl-style-switcher":17,xtend:29}],2:[function(t,e,n){"use strict";e.exports=function(t,e,n){var r={q:t,limit:n.limit,postcode:n.postcode,citycode:n.citycode},i=new URLSearchParams(Object.entries(r));return fetch("https://api-adresse.data.gouv.fr/search/?"+i).then(function(t){return t.ok?t.json():[]}).then(function(t){return t.features.map(function(t){return{name:t.properties.label,lat:t.geometry.coordinates[1],lon:t.geometry.coordinates[0]}})})}},{}],3:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("@turf/helpers");n.default=function(t,e){void 0===e&&(e={});var n=Number(t[0]),i=Number(t[1]),o=Number(t[2]),s=Number(t[3]);if(6===t.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var l=[n,i],a=[n,s],u=[o,s],h=[o,i];return r.polygon([[l,h,u,a,l]],e.properties,{bbox:t,id:e.id})}}
1,{"@turf/helpers":8}],4:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("@turf/meta");function i(t){var e=[1/0,1/0,-1/0,-1/0];return r.coordEach(t,function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])}),e}i.default=i,n.default=i},{"@turf/meta":10}],5:[function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0});var i=r(t("@turf/convex")),o=r(t("@turf/centroid")),s=t("@turf/helpers"),l=t("@turf/invariant"),a=t("@turf/meta");n.default=function t(e,n){switch(void 0===n&&(n={}),l.getType(e)){case"Point":return s.point(l.getCoord(e),n.properties);case"Polygon":var r=[];a.coordEach(e,function(t){r.push(t)});var u,h,c,p,f,d,g,m,y=o.default(e,{properties:n.properties}),v=y.geometry.coordinates,x=0,b=0,_=0,w=r.map(function(t){return[t[0]-v[0],t[1]-v[1]]});for(u=0;u<r.length-1;u++)p=(h=w[u])[0],d=h[1],f=(c=w[u+1])[0],_+=m=p*(g=c[1])-f*d,x+=(p+f)*m,b+=(d+g)*m;if(0===_)return y;var E=1/(.5*_*6);return s.point([v[0]+E*x,v[1]+E*b],n.properties);default:var S=i.default(e);return S?t(S,{properties:n.properties}):o.default(e,{properties:n.properties})}}},{"@turf/centroid":6,"@turf/convex":7,"@turf/helpers":8,"@turf/invariant":9,"@turf/meta":10}],6:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("@turf/meta"),i=t("@turf/helpers");n.default=function(t,e){void 0===e&&(e={});var n=0,o=0,s=0;return r.coordEach(t,function(t){n+=t[0],o+=t[1],s++},!0),i.point([n/s,o/s],e.properties)}},{"@turf/helpers":8,"@turf/meta":10}],7:[function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0});var i=t("@turf/helpers"),o=t("@turf/meta"),s=r(t("concaveman"));n.default=function(t,e){void 0===e&&(e={}),e.concavity=e.concavity||1/0;var n=[];if(o.coordEach(t,function(t){n.push([t[0],t[1]])}),!n.length)return null;var r=s.default(n,e.concavity);return r.length>3?i.polygon([r]):null}},{"@turf/helpers":8,"@turf/meta":10,concaveman:12}],8:[function(t,e,n){"use strict";function r(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function i(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!d(t[0])||!d(t[1]))throw new Error("coordinates must contain numbers");return r({type:"Point",coordinates:t},e,n)}function o(t,e,n){void 0===n&&(n={});for(var i=0,o=t;i<o.length;i++){var s=o[i];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var l=0;l<s[s.length-1].length;l++)if(s[s.length-1][l]!==s[0][l])throw new Error("First and last Position are not equivalent.")}return r({type:"Polygon",coordinates:t},e,n)}function s(t,e,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return r({type:"LineString",coordinates:t},e,n)}function l(t,e){void 0===e&&(e={});var n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function a(t,e,n){return void 0===n&&(n={}),r({type:"MultiLineString",coordinates:t},e,n)}function u(t,e,n){return void 0===n&&(n={}),r({type:"MultiPoint",coordinates:t},e,n)}function h(t,e,n){return void 0===n&&(n={}),r({type:"MultiPolygon",coordinates:t},e,n)}function c(t,e){void 0===e&&(e="kilometers");var r=n.factors[e];
vendor: 3,610 bytes, line 1
1if(!r)throw new Error(e+" units is invalid");return t*r}function p(t,e){void 0===e&&(e="kilometers");var r=n.factors[e];if(!r)throw new Error(e+" units is invalid");return t/r}function f(t){return 180*(t%(2*Math.PI))/Math.PI}function d(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.earthRadius=6371008.8,n.factors={centimeters:100*n.earthRadius,centimetres:100*n.earthRadius,degrees:n.earthRadius/111325,feet:3.28084*n.earthRadius,inches:39.37*n.earthRadius,kilometers:n.earthRadius/1e3,kilometres:n.earthRadius/1e3,meters:n.earthRadius,metres:n.earthRadius,miles:n.earthRadius/1609.344,millimeters:1e3*n.earthRadius,millimetres:1e3*n.earthRadius,nauticalmiles:n.earthRadius/1852,radians:1,yards:1.0936*n.earthRadius},n.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/n.earthRadius,yards:1.0936133},n.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:3.86e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046},n.feature=r,n.geometry=function(t,e,n){switch(void 0===n&&(n={}),t){case"Point":return i(e).geometry;case"LineString":return s(e).geometry;case"Polygon":return o(e).geometry;case"MultiPoint":return u(e).geometry;case"MultiLineString":return a(e).geometry;case"MultiPolygon":return h(e).geometry;default:throw new Error(t+" is invalid")}},n.point=i,n.points=function(t,e,n){return void 0===n&&(n={}),l(t.map(function(t){return i(t,e)}),n)},n.polygon=o,n.polygons=function(t,e,n){return void 0===n&&(n={}),l(t.map(function(t){return o(t,e)}),n)},n.lineString=s,n.lineStrings=function(t,e,n){return void 0===n&&(n={}),l(t.map(function(t){return s(t,e)}),n)},n.featureCollection=l,n.multiLineString=a,n.multiPoint=u,n.multiPolygon=h,n.geometryCollection=function(t,e,n){return void 0===n&&(n={}),r({type:"GeometryCollection",geometries:t},e,n)},n.round=function(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n},n.radiansToLength=c,n.lengthToRadians=p,n.lengthToDegrees=function(t,e){return f(p(t,e))},n.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},n.radiansToDegrees=f,n.degreesToRadians=function(t){return t%360*Math.PI/180},n.convertLength=function(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return c(p(t,e),n)},n.convertArea=function(t,e,r){if(void 0===e&&(e="meters"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=n.areaFactors[e];if(!i)throw new Error("invalid original units");var o=n.areaFactors[r];if(!o)throw new Error("invalid final units");return t/i*o},n.isNumber=d,n.isObject=function(t){return!!t&&t.constructor===Object},n.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(t){if(!d(t))throw new Error("bbox must only contain numbers")})},n.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},{}],9:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("@turf/helpers");
vendor: 4,677 bytes, line 1
1n.getCoord=function(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")},n.getCoords=function(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")},n.containsNumber=function t(e){if(e.length>1&&r.isNumber(e[0])&&r.isNumber(e[1]))return!0;if(Array.isArray(e[0])&&e[0].length)return t(e[0]);throw new Error("coordinates must only contain numbers")},n.geojsonType=function(t,e,n){if(!e||!n)throw new Error("type and name required");if(!t||t.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.type)},n.featureOf=function(t,e,n){if(!t)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!t||"Feature"!==t.type||!t.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.geometry.type)},n.collectionOf=function(t,e,n){if(!t)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!t||"FeatureCollection"!==t.type)throw new Error("Invalid input to "+n+", FeatureCollection required");for(var r=0,i=t.features;r<i.length;r++){var o=i[r];if(!o||"Feature"!==o.type||!o.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!o.geometry||o.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+o.geometry.type)}},n.getGeom=function(t){return"Feature"===t.type?t.geometry:t},n.getType=function(t,e){return"FeatureCollection"===t.type?"FeatureCollection":"GeometryCollection"===t.type?"GeometryCollection":"Feature"===t.type&&null!==t.geometry?t.geometry.type:t.type}},{"@turf/helpers":8}],10:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("@turf/helpers");function i(t,e,n){if(null!==t)for(var r,o,s,l,a,u,h,c,p=0,f=0,d=t.type,g="FeatureCollection"===d,m="Feature"===d,y=g?t.features.length:1,v=0;v<y;v++){a=(c=!!(h=g?t.features[v].geometry:m?t.geometry:t)&&"GeometryCollection"===h.type)?h.geometries.length:1;for(var x=0;x<a;x++){var b=0,_=0;if(null!==(l=c?h.geometries[x]:h)){u=l.coordinates;var w=l.type;switch(p=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===e(u,f,v,b,_))return!1;f++,b++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(!1===e(u[r],f,v,b,_))return!1;f++,"MultiPoint"===w&&b++}"LineString"===w&&b++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(o=0;o<u[r].length-p;o++){if(!1===e(u[r][o],f,v,b,_))return!1;f++}"MultiLineString"===w&&b++,"Polygon"===w&&_++}"Polygon"===w&&b++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for(_=0,o=0;o<u[r].length;o++){for(s=0;s<u[r][o].length-p;s++){if(!1===e(u[r][o][s],f,v,b,_))return!1;f++}_++}b++}break;case"GeometryCollection":for(r=0;r<l.geometries.length;r++)if(!1===i(l.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function o(t,e){var n;switch(t.type){case"FeatureCollection":for(n=0;n<t.features.length&&!1!==e(t.features[n].properties,n);n++);break;case"Feature":e(t.properties,0)}}function s(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var n=0;n<t.features.length&&!1!==e(t.features[n],n);n++);}function l(t,e){var n,r,i,o,s,l,a,u,h,c,p=0,f="FeatureCollection"===t.type,d="Feature"===t.type,g=f?t.features.length:1;for(n=0;n<g;n++){for(l=f?t.features[n].geometry:d?t.geometry:t,u=f?t.features[n].properties:d?t.properties:{},h=f?t.features[n].bbox:d?t.bbox:void 0,c=f?t.features[n].id:d?t.id:void 0,s=(a=!!l&&"GeometryCollection"===l.type)?l.geometries.length:1,i=0;i<s;i++)if(null!==(o=a?l.geometries[i]:l))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,p,u,h,c))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],p,u,h,c))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,p,u,h,c))return!1;p++}}function a(t,e){l(t,function(t,n,i,o,s){var l,a=null===t?null:t.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return!1!==e(r.feature(t,i,{bbox:o,id:s}
1),n,0)&&void 0}switch(a){case"MultiPoint":l="Point";break;case"MultiLineString":l="LineString";break;case"MultiPolygon":l="Polygon"}for(var u=0;u<t.coordinates.length;u++){var h={type:l,coordinates:t.coordinates[u]};if(!1===e(r.feature(h,i),n,u))return!1}})}function u(t,e){a(t,function(t,n,o){var s=0;if(t.geometry){var l=t.geometry.type;if("Point"!==l&&"MultiPoint"!==l){var a,u=0,h=0,c=0;return!1!==i(t,function(i,l,p,f,d){if(void 0===a||n>u||f>h||d>c)return a=i,u=n,h=f,c=d,void(s=0);var g=r.lineString([a,i],t.properties);if(!1===e(g,n,o,d,s))return!1;s++,a=i})&&void 0}}})}function h(t,e){if(!t)throw new Error("geojson is required");a(t,function(t,n,i){if(null!==t.geometry){var o=t.geometry.type,s=t.geometry.coordinates;switch(o){case"LineString":if(!1===e(t,n,i,0,0))return!1;break;case"Polygon":for(var l=0;l<s.length;l++)if(!1===e(r.lineString(s[l],t.properties),n,i,l))return!1}}})}n.coordAll=function(t){var e=[];return i(t,function(t){e.push(t)}),e},n.coordEach=i,n.coordReduce=function(t,e,n,r){var o=n;return i(t,function(t,r,i,s,l){o=0===r&&void 0===n?t:e(o,t,r,i,s,l)},r),o},n.featureEach=s,n.featureReduce=function(t,e,n){var r=n;return s(t,function(t,i){r=0===i&&void 0===n?t:e(r,t,i)}),r},n.findPoint=function(t,e){if(e=e||{},!r.isObject(e))throw new Error("options is invalid");var n,i=e.featureIndex||0,o=e.multiFeatureIndex||0,s=e.geometryIndex||0,l=e.coordIndex||0,a=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),a=a||t.features[i].properties,n=t.features[i].geometry;break;case"Feature":a=a||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var u=n.coordinates;switch(n.type){case"Point":return r.point(u,a,e);case"MultiPoint":return o<0&&(o=u.length+o),r.point(u[o],a,e);case"LineString":return l<0&&(l=u.length+l),r.point(u[l],a,e);case"Polygon":return s<0&&(s=u.length+s),l<0&&(l=u[s].length+l),r.point(u[s][l],a,e);case"MultiLineString":return o<0&&(o=u.length+o),l<0&&(l=u[o].length+l),r.point(u[o][l],a,e);case"MultiPolygon":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),l<0&&(l=u[o][s].length-l),r.point(u[o][s][l],a,e)}throw new Error("geojson is invalid")},n.findSegment=function(t,e){if(e=e||{},!r.isObject(e))throw new Error("options is invalid");var n,i=e.featureIndex||0,o=e.multiFeatureIndex||0,s=e.geometryIndex||0,l=e.segmentIndex||0,a=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),a=a||t.features[i].properties,n=t.features[i].geometry;break;case"Feature":a=a||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var u=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return l<0&&(l=u.length+l-1),r.lineString([u[l],u[l+1]],a,e);case"Polygon":return s<0&&(s=u.length+s),l<0&&(l=u[s].length+l-1),r.lineString([u[s][l],u[s][l+1]],a,e);case"MultiLineString":return o<0&&(o=u.length+o),l<0&&(l=u[o].length+l-1),r.lineString([u[o][l],u[o][l+1]],a,e);case"MultiPolygon":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),l<0&&(l=u[o][s].length-l-1),r.lineString([u[o][s][l],u[o][s][l+1]],a,e)}throw new Error("geojson is invalid")},n.flattenEach=a,n.flattenReduce=function(t,e,n){var r=n;return a(t,function(t,i,o){r=0===i&&0===o&&void 0===n?t:e(r,t,i,o)}),r},n.geomEach=l,n.geomReduce=function(t,e,n){var r=n;return l(t,function(t,i,o,s,l){r=0===i&&void 0===n?t:e(r,t,i,o,s,l)}),r},n.lineEach=h,n.lineReduce=function(t,e,n){var r=n;return h(t,function(t,i,o,s){r=0===i&&void 0===n?t:e(r,t,i,o,s)}),r},n.propEach=o,n.propReduce=function(t,e,n){var r=n;return o(t,function(t,i){r=0===i&&void 0===n?t:e(r,t,i)}),r},n.segmentEach=u,n.segmentReduce=function(t,e,n){var r=n,i=!1;return u(t,function(t,o,s,l,a){r=!1===i&&void 0===n?t:e(r,t,o,s,l,a),i=!0}),r}},{"@turf/helpers":8}],11:[function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0});var i=r(t("polygon-clipping")),o=t("@turf/invariant"),s=t("@turf/helpers");n.default=function(t,e,n){void 0===n&&(n={});var r=o.getGeom(t),l=o.getGeom(e),a=i.default.union(r.coordinates,l.coordinates);
vendor: 4,549 bytes, line 1
1return 0===a.length?null:1===a.length?s.polygon(a[0],n.properties):s.multiPolygon(a,n.properties)}},{"@turf/helpers":8,"@turf/invariant":9,"polygon-clipping":21}],12:[function(t,e,n){"use strict";var r=t("rbush"),i=t("tinyqueue"),o=t("point-in-polygon"),s=t("robust-predicates/umd/orient2d.min.js").orient2d;function l(t,e,n){e=Math.max(0,void 0===e?2:e),n=n||0;var i=function(t){for(var e=t[0],n=t[0],r=t[0],i=t[0],s=0;s<t.length;s++){var l=t[s];l[0]<e[0]&&(e=l),l[0]>r[0]&&(r=l),l[1]<n[1]&&(n=l),l[1]>i[1]&&(i=l)}var a=[e,n,r,i],u=a.slice();for(s=0;s<t.length;s++)o(t[s],a)||u.push(t[s]);return function(t){t.sort(x);for(var e=[],n=0;n<t.length;n++){for(;e.length>=2&&f(e[e.length-2],e[e.length-1],t[n])<=0;)e.pop();e.push(t[n])}for(var r=[],i=t.length-1;i>=0;i--){for(;r.length>=2&&f(r[r.length-2],r[r.length-1],t[i])<=0;)r.pop();r.push(t[i])}return r.pop(),e.pop(),e.concat(r)}(u)}(t),s=new r(16);s.toBBox=function(t){return{minX:t[0],minY:t[1],maxX:t[0],maxY:t[1]}},s.compareMinX=function(t,e){return t[0]-e[0]},s.compareMinY=function(t,e){return t[1]-e[1]},s.load(t);for(var l,u=[],h=0;h<i.length;h++){var c=i[h];s.remove(c),l=g(c,l),u.push(l)}var p=new r(16);for(h=0;h<u.length;h++)p.insert(d(u[h]));for(var y=e*e,v=n*n;u.length;){var b=u.shift(),_=b.p,w=b.next.p,E=m(_,w);if(!(E<v)){var S=E/y;(c=a(s,b.prev.p,_,w,b.next.next.p,S,p))&&Math.min(m(c,_),m(c,w))<=S&&(u.push(b),u.push(g(c,b)),s.remove(c),p.remove(b),p.insert(d(b)),p.insert(d(b.next)))}}b=l;var k=[];do{k.push(b.p),b=b.next}while(b!==l);return k.push(b.p),k}function a(t,e,n,r,o,s,l){for(var a=new i([],u),c=t.data;c;){for(var f=0;f<c.children.length;f++){var d=c.children[f],g=c.leaf?y(d,n,r):h(n,r,d);g>s||a.push({node:d,dist:g})}for(;a.length&&!a.peek().node.children;){var m=a.pop(),v=m.node,x=y(v,e,n),b=y(v,r,o);if(m.dist<x&&m.dist<b&&p(n,v,l)&&p(r,v,l))return v}(c=a.pop())&&(c=c.node)}return null}function u(t,e){return t.dist-e.dist}function h(t,e,n){if(c(t,n)||c(e,n))return 0;var r=v(t[0],t[1],e[0],e[1],n.minX,n.minY,n.maxX,n.minY);if(0===r)return 0;var i=v(t[0],t[1],e[0],e[1],n.minX,n.minY,n.minX,n.maxY);if(0===i)return 0;var o=v(t[0],t[1],e[0],e[1],n.maxX,n.minY,n.maxX,n.maxY);if(0===o)return 0;var s=v(t[0],t[1],e[0],e[1],n.minX,n.maxY,n.maxX,n.maxY);return 0===s?0:Math.min(r,i,o,s)}function c(t,e){return t[0]>=e.minX&&t[0]<=e.maxX&&t[1]>=e.minY&&t[1]<=e.maxY}function p(t,e,n){for(var r,i,o,s,l=Math.min(t[0],e[0]),a=Math.min(t[1],e[1]),u=Math.max(t[0],e[0]),h=Math.max(t[1],e[1]),c=n.search({minX:l,minY:a,maxX:u,maxY:h}),p=0;p<c.length;p++)if(r=c[p].p,i=c[p].next.p,o=t,r!==(s=e)&&i!==o&&f(r,i,o)>0!=f(r,i,s)>0&&f(o,s,r)>0!=f(o,s,i)>0)return!1;return!0}function f(t,e,n){return s(t[0],t[1],e[0],e[1],n[0],n[1])}function d(t){var e=t.p,n=t.next.p;return t.minX=Math.min(e[0],n[0]),t.minY=Math.min(e[1],n[1]),t.maxX=Math.max(e[0],n[0]),t.maxY=Math.max(e[1],n[1]),t}function g(t,e){var n={p:t,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return e?(n.next=e.next,n.prev=e,e.next.prev=n,e.next=n):(n.prev=n,n.next=n),n}function m(t,e){var n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function y(t,e,n){var r=e[0],i=e[1],o=n[0]-r,s=n[1]-i;if(0!==o||0!==s){var l=((t[0]-r)*o+(t[1]-i)*s)/(o*o+s*s);l>1?(r=n[0],i=n[1]):l>0&&(r+=o*l,i+=s*l)}return(o=t[0]-r)*o+(s=t[1]-i)*s}function v(t,e,n,r,i,o,s,l){var a,u,h,c,p=n-t,f=r-e,d=s-i,g=l-o,m=t-i,y=e-o,v=p*p+f*f,x=p*d+f*g,b=d*d+g*g,_=p*m+f*y,w=d*m+g*y,E=v*b-x*x,S=E,k=E;0===E?(u=0,S=1,c=w,k=b):(c=v*w-x*_,(u=x*w-b*_)<0?(u=0,c=w,k=b):u>S&&(u=S,c=w+x,k=b)),c<0?(c=0,-_<0?u=0:-_>v?u=S:(u=-_,S=v)):c>k&&(c=k,-_+x<0?u=0:-_+x>v?u=S:(u=-_+x,S=v)),a=0===u?0:u/S;var M=(1-(h=0===c?0:c/k))*i+h*s-((1-a)*t+a*n),C=(1-h)*o+h*l-((1-a)*e+a*r);return M*M+C*C}function x(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]}i.default&&(i=i.default),e.exports=l,e.exports.default=l},{"point-in-polygon":19,rbush:23,"robust-predicates/umd/orient2d.min.js":24,tinyqueue:28}],13:[function(t,e,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function o(t){return"object"==typeof t&&null!==t}function s(t){return void 0===t}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,n,r,l,a,u;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((e
1=arguments[1])instanceof Error)throw e;var h=new Error('Uncaught, unspecified "error" event. ('+e+")");throw h.context=e,h}if(s(n=this._events[t]))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:l=Array.prototype.slice.call(arguments,1),n.apply(this,l)}else if(o(n))for(l=Array.prototype.slice.call(arguments,1),r=(u=n.slice()).length,a=0;a<r;a++)u[a].apply(this,l);return!0},r.prototype.addListener=function(t,e){var n;if(!i(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(n=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[t].length>n&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){if(!i(e))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(t,r),n||(n=!0,e.apply(this,arguments))}return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var n,r,s,l;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(s=(n=this._events[t]).length,r=-1,n===e||i(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(n)){for(l=s;l-- >0;)if(n[l]===e||n[l].listener&&n[l].listener===e){r=l;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(i(n=this._events[t]))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){return this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},{}],14:[function(t,e,n){!function(){var t={};void 0!==n?e.exports=t:this.fuzzy=t,t.simpleFilter=function(e,n){return n.filter(function(n){return t.test(e,n)})},t.test=function(e,n){return null!==t.match(e,n)},t.match=function(t,e,n){n=n||{};var r,i=0,o=[],s=e.length,l=0,a=0,u=n.pre||"",h=n.post||"",c=n.caseSensitive&&e||e.toLowerCase();t=n.caseSensitive&&t||t.toLowerCase();for(var p=0;p<s;p++)r=e[p],c[p]===t[i]?(r=u+r+h,i+=1,a+=1+a):a=0,l+=a,o[o.length]=r;return i===t.length?(l=c===t?1/0:l,{rendered:o.join(""),score:l}):null},t.filter=function(e,n,r){return n&&0!==n.length?"string"!=typeof e?n:(r=r||{},n.reduce(function(n,i,o,s){var l=i;r.extract&&(l=r.extract(i));var a=t.match(e,l,r);return null!=a&&(n[n.length]={string:a.rendered,score:a.score,index:o,original:i}),n},[]).sort(function(t,e){var n=e.score-t.score;return n||t.index-e.index})):[]}}()},{}],15:[function(t,e,n){(function(t){(function(){var n="Expected a function",r=NaN,i="[object Symbol]",o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,h="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,p=h||c||Function("return this")(),f=Object.prototype.toString,d=Math.max,g=Math.min,m=function(){return p.Date.now()};function y(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function v(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&f.call(t)==i}(t))return r;if(y(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=y(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var n=l.test(t);return n||a.test(t)?u(t.slice(2),n?2:8):s.test(t)?r:+t}e.exports=function(t,e,r){var i,o,s,l,a,u,h=0,c=!1,p=!1,f=!0;if("function"!=typeof t)throw new TypeError(n);function x(e){var n=i,r=o;return i=o=void 0,h=e,l=t.apply(r,n)}function b(t){var n=t-u;return void 0===u||n>=e||n<0||p&&t-h>=s}function _(){var t=m();if(b(t))return w(t);a=setTimeout(_,function(t){var n=e-(t-u);return p?g(n,s-(t-h)):n}(t))}function w(t){return a=void 0,f&&i?x(t):(i=o=void 0,l)}function E(){var t=m(),n=b(t);if(i=arguments,o=this,u=t,n){if(void 0===a)return function(t){return h=t,a=setTimeout(_,e),c?x(t):l}(u);if(p)return a=setTimeout(_,e),x(u)}return void 0===a&&(a=setTimeout(_,e)),l}return e=v(e)||0,y(r)&&(c=!!r.leading,s=(p="maxWait"in r)?d(v(r.maxWait)||0,e):s,f="trailing"in r?!!r.trailing:f),E.cancel=function(){void 0!==a&&clearTimeout(a),h=0,i=u=o=a=void 0},E.flush=function(){return void 0===a?l:w(m())},E}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],16:[function(t,e,n){"use strict";var r=t("suggestions"),i=t("lodash.debounce"),o=t("xtend"),s=t("events").EventEmitter;function l(t,e){this._eventEmitter=new s,this.options=o({},this.options,t),this.geocodeRequest=e}l.prototype={options:{placeholder:"Search for Place or Address",zoom:16,flyTo:!0,minLength:2,limit:5,fitBoundsOptions:{}},onAdd:function(t){this._map=t,this._onChange=this._onChange.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._clear=this._clear.bind(this);var e=this.container=document.createElement("div");e.className="mapboxgl-ctrl-generic-geocoder mapboxgl-ctrl";var n=document.createElement("span");n.className="geocoder-icon geocoder-icon-search",this._inputEl=document.createElement("input"),this._inputEl.type="text",this._inputEl.placeholder=this.options.placeholder,this._inputEl.addEventListener("keydown",this._onKeyDown),this._inputEl.addEventListener("change",this._onChange);var i=document.createElement("div");return i.classList.add("geocoder-pin-right"),this._clearEl=document.createElement("button"),this._clearEl.className="geocoder-icon geocoder-icon-close",this._clearEl.setAttribute("aria-label","Clear"),this._clearEl.addEventListener("click",this._clear),this._loadingEl=document.createElement("span"),this._loadingEl.className="geocoder-icon geocoder-icon-loading",i.appendChild(this._clearEl),i.appendChild(this._loadingEl),e.appendChild(n),e.appendChild(this._inputEl),e.appendChild(i),this._typeahead=new r(this._inputEl,[],{filter:!1,minLength:this.options.minLength,limit:this.options.limit}
1),this._typeahead.getItemValue=function(t){return t.name},e},onRemove:function(){return this.container.parentNode.removeChild(this.container),this._map=null,this},_onKeyDown:i(function(t){if(!t.target.value)return this._clearEl.style.display="none";-1===[9,27,37,39,13,38,40].indexOf(t.keyCode)&&t.target.value.length>=this.options.minLength&&this._geocode(t.target.value)},500),_onChange:function(){this._inputEl.value&&(this._clearEl.style.display="block");var t=this._typeahead.selected;if(t){if(this.options.flyTo){var e=t.bbox;e?this._map.fitBounds([[e[0],e[1]],[e[2],e[3]]],this.options.fitBoundsOptions):this._map.flyTo({center:[t.lon,t.lat],zoom:this.options.zoom})}this._eventEmitter.emit("result",{result:t})}},_geocode:function(t){this._loadingEl.style.display="block",this._eventEmitter.emit("loading",{query:t}),this.geocodeRequest(t,this._map.getBounds(),this.options).then(function(t){this._loadingEl.style.display="none",t.length?(t=t.slice(0,this.options.limit),this._clearEl.style.display="block"):(this._clearEl.style.display="none",this._typeahead.selected=null),this._eventEmitter.emit("results",t),this._typeahead.update(t)}.bind(this)).catch(function(t){this._loadingEl.style.display="none",this._eventEmitter.emit("error",{text:t.message,err:t})}.bind(this))},_clear:function(t){t&&t.preventDefault(),this._inputEl.value="",this._typeahead.selected=null,this._typeahead.clear(),this._onChange(),this._inputEl.focus(),this._clearEl.style.display="none",this._eventEmitter.emit("clear")},on:function(t,e){return this._eventEmitter.on(t,e),this},off:function(t,e){return this._eventEmitter.removeListener(t,e),this}},e.exports=l},{events:13,"lodash.debounce":15,suggestions:25,xtend:29}],17:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});class r{constructor(t,e){this.styles=t||r.DEFAULT_STYLES;const n="string"==typeof e?e:e?e.defaultStyle:void 0;this.defaultStyle=n||r.DEFAULT_STYLE,this.onDocumentClick=this.onDocumentClick.bind(this),this.events="string"!=typeof e&&e?e.eventListeners:void 0}getDefaultPosition(){return"top-right"}onAdd(t){this.map=t,this.controlContainer=document.createElement("div"),this.controlContainer.classList.add("mapboxgl-ctrl"),this.controlContainer.classList.add("mapboxgl-ctrl-group"),this.mapStyleContainer=document.createElement("div"),this.styleButton=document.createElement("button"),this.styleButton.type="button",this.mapStyleContainer.classList.add("mapboxgl-style-list");for(const t of this.styles){const e=document.createElement("button");e.type="button",e.innerText=t.title,e.classList.add(t.title.replace(/[^a-z0-9-]/gi,"_")),e.dataset.uri=JSON.stringify(t.uri),e.addEventListener("click",t=>{const e=t.srcElement;if(this.closeModal(),e.classList.contains("active"))return;if(this.events&&this.events.onOpen&&this.events.onOpen(t))return;const n=JSON.parse(e.dataset.uri);this.map.setStyle(n);const r=this.mapStyleContainer.getElementsByClassName("active");for(;r[0];)r[0].classList.remove("active");e.classList.add("active"),this.events&&this.events.onChange&&this.events.onChange(t,n)}),t.title===this.defaultStyle&&e.classList.add("active"),this.mapStyleContainer.appendChild(e)}return this.styleButton.classList.add("mapboxgl-ctrl-icon"),this.styleButton.classList.add("mapboxgl-style-switcher"),this.styleButton.addEventListener("click",t=>{this.events&&this.events.onSelect&&this.events.onSelect(t)||this.openModal()}),document.addEventListener("click",this.onDocumentClick),this.controlContainer.appendChild(this.styleButton),this.controlContainer.appendChild(this.mapStyleContainer),this.controlContainer}onRemove(){this.controlContainer&&this.controlContainer.parentNode&&this.map&&this.styleButton&&(this.styleButton.removeEventListener("click",this.onDocumentClick),this.controlContainer.parentNode.removeChild(this.controlContainer),document.removeEventListener("click",this.onDocumentClick),this.map=void 0)}closeModal(){this.mapStyleContainer&&this.styleButton&&(this.mapStyleContainer.style.display="none",this.styleButton.style.display="block")}openModal(){this.mapStyleContainer&&this.styleButton&&(this.mapStyleContainer.style.display="block",this.styleButton.style.display="none")}onDocumentClick(t){this.controlContainer&&!this.controlContainer.contains(t.target)&&this.closeModal()}}r.DEFAULT_STYLE="Streets",r.DEFAULT_STYLES=[{title:"Dark",uri:"mapbox://styles/mapbox/dark-v10"},{title:"Light",uri:"mapbox://styles/mapbox/light-v10"},{title:"Outdoors",uri:"mapbox://styles/mapbox/outdoors-v11"},{title:"Satellite",uri:"mapbox://styles/mapbox/satellite-streets-v11"},{title:"Streets",uri:"mapbox://styles/mapbox/streets-v11"}],n.MapboxStyleSwitcherControl=r},{}],18:[function(t,e,n){e.exports=function(t,e,n,r){var i=t[0],o=t[1],s=!1;void 0===n&&(n=0),void 0===r&&(r=e.length);for(var l=(r-n)/2,a=0,u=l-1;a<l;u=a++){var h=e[n+2*a+0],c=e[n+2*a+1],p=e[n+2*u+0],f=e[n+2*u+1];c>o!=f>o&&i<(p-h)*(o-c)/(f-c)+h&&(s=!s)}return s}},{}],19:[function(t,e,n){var r=t("./flat.js"),i=t("./nested.js");e.exports=function(t,e,n,o){return e.length>0&&Array.isArray(e[0])?i(t,e,n,o):r(t,e,n,o)},e.exports.nested=i,e.exports.flat=r},{"./flat.js":18,"./nested.js":20}],20:[function(t,e,n){e.exports=function(t,e,n,r){var i=t[0],o=t[1],s=!1;void 0===n&&(n=0),void 0===r&&(r=e.length);for(var l=r-n,a=0,u=l-1;a<l;u=a++){var h=e[a+n][0],c=e[a+n][1],p=e[u+n][0],f=e[u+n][1];c>o!=f>o&&i<(p-h)*(o-c)/(f-c)+h&&(s=!s)}return s}},{}],21:[function(t,e,n){(function(t){(function(){var r,i;r=this,i=function(){"use strict";function e(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;
vendor: 25,977 bytes, line 1
1function l(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}var n=function(){return function(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null}}();function r(t,e){return t>e?1:t<e?-1:0}function i(t,e,r){for(var i=new n(null,null),o=i,s=i;;){var l=r(t,e.key);if(l<0){if(null===e.left)break;if(r(t,e.left.key)<0){var a=e.left;if(e.left=a.right,a.right=e,null===(e=a).left)break}s.left=e,s=e,e=e.left}else{if(!(l>0))break;if(null===e.right)break;if(r(t,e.right.key)>0){a=e.right;if(e.right=a.left,a.left=e,null===(e=a).right)break}o.right=e,o=e,e=e.right}}return o.right=e.left,s.left=e.right,e.left=i.right,e.right=i.left,e}function o(t,e,r,o){var s=new n(t,e);if(null===r)return s.left=s.right=null,s;var l=o(t,(r=i(t,r,o)).key);return l<0?(s.left=r.left,s.right=r,r.left=null):l>=0&&(s.right=r.right,s.left=r,r.right=null),s}function s(t,e,n){var r=null,o=null;if(e){var s=n((e=i(t,e,n)).key,t);0===s?(r=e.left,o=e.right):s<0?(o=e.right,e.right=null,r=e):(r=e.left,e.left=null,o=e)}return{left:r,right:o}}var l=function(){function t(t){void 0===t&&(t=r),this._root=null,this._size=0,this._comparator=t}return t.prototype.insert=function(t,e){return this._size++,this._root=o(t,e,this._root,this._comparator)},t.prototype.add=function(t,e){var r=new n(t,e);null===this._root&&(r.left=r.right=null,this._size++,this._root=r);var o=this._comparator,s=i(t,this._root,o),l=o(t,s.key);return 0===l?this._root=s:(l<0?(r.left=s.left,r.right=s,s.left=null):l>0&&(r.right=s.right,r.left=s,s.right=null),this._size++,this._root=r),this._root},t.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},t.prototype._remove=function(t,e,n){var r;return null===e?null:0===n(t,(e=i(t,e,n)).key)?(null===e.left?r=e.right:(r=i(t,e.left,n)).right=e.right,this._size--,r):e},t.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=i(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},t.prototype.findStatic=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return e;e=r<0?e.left:e.right}return null},t.prototype.find=function(t){return this._root&&(this._root=i(t,this._root,this._comparator),0!==this._comparator(t,this._root.key))?null:this._root},t.prototype.contains=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return!0;e=r<0?e.left:e.right}return!1},t.prototype.forEach=function(t,e){for(var n=this._root,r=[],i=!1;!i;)null!==n?(r.push(n),n=n.left):0!==r.length?(n=r.pop(),t.call(e,n),n=n.right):i=!0;return this},t.prototype.range=function(t,e,n,r){for(var i=[],o=this._comparator,s=this._root;0!==i.length||s;)if(s)i.push(s),s=s.left;else{if(o((s=i.pop()).key,e)>0)break;if(o(s.key,t)>=0&&n.call(r,s))return this;s=s.right}return this},t.prototype.keys=function(){var t=[];return this.forEach(function(e){var n=e.key;return t.push(n)}),t},t.prototype.values=function(){var t=[];return this.forEach(function(e){var n=e.data;return t.push(n)}),t},t.prototype.min=function(){return this._root?this.minNode(this._root).key:null},t.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},t.prototype.minNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.left;)t=t.left;return t},t.prototype.maxNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.right;)t=t.right;return t},t.prototype.at=function(t){for(var e=this._root,n=!1,r=0,i=[];!n;)if(e)i.push(e),e=e.left;else if(i.length>0){if(e=i.pop(),r===t)return e;r++,e=e.right}else n=!0;return null},t.prototype.next=function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var r=this._comparator;e;){var i=r(t.key,e.key);if(0===i)break;i<0?(n=e,e=e.left):e=e.right}return n},t.prototype.prev=function(t){var e=this._root,n=null;if(null!==t.left){for(n=t.left;n.right;)n=n.right;return n}for(var r=this._comparator;e;){var i=r(t.key,e.key);if(0===i)break;i<0?e=e.left:(n=e,e=e.right)}return n},t.prototype.clear=function(){return this._root=null,this._size=0,this},t.prototype.toList=function(){return function(t){var e=t,r=[],i=!1,o=new n(null,null),s=o;for(;!i;)e?(r.push(e),e=e.left):r.length>0?e=(e=s=s.next=r.pop()).right:i=!0;return s.next=null,o.next}(this._root)},t.prototype.load=function(t,e,r){void 0===e&&(e=[]),void 0===r&&(r=!1);var i=t.length,o=this._comparator;if(r&&function t(e,n,r,i,o){if(r>=i)return;var s=e[r+i>>1];var l=r-1;var a=i+1;for(;;){do{l++}while(o(e[l],s)<0);do{a--}while(o(e[a],s)>0);if(l>=a)break;var u=e[l];e[l]=e[a],e[a]=u,u=n[l],n[l]=n[a],n[a]=u}t(e,n,r,a,o);t(e,n,a+1,i,o)}(t,e,0,i-1,o),null===this._root)this._root=function t(e,r,i,o){var s=o-i;if(s>0){var l=i+Math.floor(s/2),a=e[l],u=r[l],h=new n(a,u);return h.left=t(e,r,i,l),h.right=t(e,r,l+1,o),h}return null}(t,e,0,i),this._size=i;else{var s=function(t,e,r){var i=new n(null,null),o=i,s=t,l=e;for(;null!==s&&null!==l;)r(s.key,l.key)<0?(o.next=s,s=s.next):(o.next=l,l=l.next),o=o.next;null!==s?o.next=s:null!==l&&(o.next=l);return i.next}(this.toList(),function(t,e){for(var r=new n(null,null),i=r,o=0;o<t.length;o++)i=i.next=new n(t[o],e[o]);return i.next=null,r.next}(t,e),o);i=this._size+i,this._root=function t(e,n,r){var i=r-n;if(i>0){var o=n+Math.floor(i/2),s=t(e,n,o),l=e.head;return l.left=s,e.head=e.head.next,l.right=t(e,o+1,r),l}return null}({head:s},0,i)}return this},t.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),t.prototype.toString=function(t){void 0===t&&(t=function(t){return String(t.key)});var e=[];return function t(e,n,r,i,o){if(e){i(n+(r?"└── ":"├── ")+o(e)+"\n");var s=n+(r?"    ":"│   ");e.left&&t(e.left,s,!1,i,o),e.right&&t(e.right,s,!0,i,o)}}(this._root,"",!0,function(t){return e.push(t)},t),e.join("")},t.prototype.update=function(t,e,n){var r=this._comparator,l=s(t,this._root,r),a=l.left,u=l.right;r(t,e)<0?u=o(e,n,u,r):a=o(e,n,a,r),this._root=function(t,e,n){return null===e?t:null===t?e:((e=i(t.key,e,n)).left=t,e)}(a,u,r)},t.prototype.split=function(t){return s(t,this._root,this._comparator)},t.prototype[Symbol.iterator]=function(){var t,n,r;return e(this,function(e){switch(e.label){case 0:t=this._root,n=[],r=!1,e.label=1;case 1:return r?[3,6]:null===t?[3,2]:(n.push(t),t=t.left,[3,5]);case 2:return 0===n.length?[3,4]:[4,t=n.pop()];case 3:return e.sent(),t=t.right,[3,5];case 4:r=!0,e.label=5;case 5:return[3,1];case 6:return[2]}})},t}();const a=(t,e)=>t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y,u=(t,e)=>{if(e.ur.x<t.ll.x||t.ur.x<e.ll.x||e.ur.y<t.ll.y||t.ur.y<e.ll.y)return null;const n=t.ll.x<e.ll.x?e.ll.x:t.ll.x,r=t.ur.x<e.ur.x?t.ur.x:e.ur.x;return{ll:{x:n,y:t.ll.y<e.ll.y?e.ll.y:t.ll.y},ur:{x:r,y:t.ur.y<e.ur.y?t.ur.y:e.ur.y}}};let h=Number.EPSILON;void 0===h&&(h=Math.pow(2,-52));const c=h*h,p=(t,e)=>{if(-h<t&&t<h&&-h<e&&e<h)return 0;const n=t-e;return n*n<c*t*e?0:t<e?-1:1};class f{constructor(){this.tree=new l,this.round(0)}round(t){const e=this.tree.add(t),n=this.tree.prev(e);if(null!==n&&0===p(e.key,n.key))return this.tree.remove(t),n.key;const r=this.tree.next(e);return null!==r&&0===p(e.key,r.key)?(this.tree.remove(t),r.key):t}}const d=new class{constructor(){this.reset()}reset(){this.xRounder=new f,this.yRounder=new f}round(t,e){return{x:this.xRounder.round(t),y:this.yRounder.round(e)}}},g=1.1102230246251565e-16,m=134217729,y=(3+8*g)*g;function v(t,e,n,r,i){let o,s,l,a,u=e[0],h=r[0],c=0,p=0;h>u==h>-u?(o=u,u=e[++c]):(o=h,h=r[++p]);let f=0;if(c<t&&p<n)for(h>u==h>-u?(l=o-((s=u+o)-u),u=e[++c]):(l=o-((s=h+o)-h),h=r[++p]),o=s,0!==l&&(i[f++]=l);c<t&&p<n;)h>u==h>-u?(l=o-((s=o+u)-(a=s-o))+(u-a),u=e[++c]):(l=o-((s=o+h)-(a=s-o))+(h-a),h=r[++p]),o=s,0!==l&&(i[f++]=l);for(;c<t;)l=o-((s=o+u)-(a=s-o))+(u-a),u=e[++c],o=s,0!==l&&(i[f++]=l);for(;p<n;)l=o-((s=o+h)-(a=s-o))+(h-a),h=r[++p],o=s,0!==l&&(i[f++]=l);return 0===o&&0!==f||(i[f++]=o),f}function x(t){return new Float64Array(t)}const b=3.3306690738754716e-16,_=2.2204460492503146e-16,w=1.1093356479670487e-31,E=x(4),S=x(8),k=x(12),M=x(16),C=x(4);function L(t,e,n,r,i,o){const s=(e-o)*(n-i),l=(t-i)*(r-o),a=s-l,u=Math.abs(s+l);return Math.abs(a)>=b*u?a:-function(t,e,n,r,i,o,s){let l,a,u,h,c,p,f,d,g,x,b,L,P,F,I,A,T,j;const R=t-i,O=n-i,B=e-o,N=r-o;c=(I=(d=R-(f=(p=m*R)-(p-R)))*(x=N-(g=(p=m*N)-(p-N)))-((F=R*N)-f*g-d*g-f*x))-(b=I-(T=(d=B-(f=(p=m*B)-(p-B)))*(x=O-(g=(p=m*O)-(p-O)))-((A=B*O)-f*g-d*g-f*x))),E[0]=I-(b+c)+(c-T),c=(P=F-((L=F+b)-(c=L-F))+(b-c))-(b=P-A),E[1]=P-(b+c)+(c-A),c=(j=L+b)-L,E[2]=L-(j-c)+(b-c),E[3]=j;let Y=function(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}(4,E),X=_*s;if(Y>=X||-Y>=X)return Y;if(l=t-(R+(c=t-R))+(c-i),u=n-(O+(c=n-O))+(c-i),a=e-(B+(c=e-B))+(c-o),h=r-(N+(c=r-N))+(c-o),0===l&&0===a&&0===u&&0===h)return Y;if(X=w*s+y*Math.abs(Y),(Y+=R*h+N*l-(B*u+O*a))>=X||-Y>=X)return Y;c=(I=(d=l-(f=(p=m*l)-(p-l)))*(x=N-(g=(p=m*N)-(p-N)))-((F=l*N)-f*g-d*g-f*x))-(b=I-(T=(d=a-(f=(p=m*a)-(p-a)))*(x=O-(g=(p=m*O)-(p-O)))-((A=a*O)-f*g-d*g-f*x))),C[0]=I-(b+c)+(c-T),c=(P=F-((L=F+b)-(c=L-F))+(b-c))-(b=P-A),C[1]=P-(b+c)+(c-A),c=(j=L+b)-L,C[2]=L-(j-c)+(b-c),C[3]=j;const z=v(4,E,4,C,S);c=(I=(d=R-(f=(p=m*R)-(p-R)))*(x=h-(g=(p=m*h)-(p-h)))-((F=R*h)-f*g-d*g-f*x))-(b=I-(T=(d=B-(f=(p=m*B)-(p-B)))*(x=u-(g=(p=m*u)-(p-u)))-((A=B*u)-f*g-d*g-f*x))),C[0]=I-(b+c)+(c-T),c=(P=F-((L=F+b)-(c=L-F))+(b-c))-(b=P-A),C[1]=P-(b+c)+(c-A),c=(j=L+b)-L,C[2]=L-(j-c)+(b-c),C[3]=j;const D=v(z,S,4,C,k);c=(I=(d=l-(f=(p=m*l)-(p-l)))*(x=h-(g=(p=m*h)-(p-h)))-((F=l*h)-f*g-d*g-f*x))-(b=I-(T=(d=a-(f=(p=m*a)-(p-a)))*(x=u-(g=(p=m*u)-(p-u)))-((A=a*u)-f*g-d*g-f*x))),C[0]=I-(b+c)+(c-T),c=(P=F-((L=F+b)-(c=L-F))+(b-c))-(b=P-A),C[1]=P-(b+c)+(c-A),c=(j=L+b)-L,C[2]=L-(j-c)+(b-c),C[3]=j;const q=v(D,k,4,C,M);return M[q-1]}(t,e,n,r,i,o,u)}const P=(t,e)=>t.x*e.y-t.y*e.x,F=(t,e)=>t.x*e.x+t.y*e.y,I=(t,e,n)=>{const r=L(t.x,t.y,e.x,e.y,n.x,n.y);return r>0?-1:r<0?1:0},A=t=>Math.sqrt(F(t,t)),T=(t,e,n)=>{const r={x:e.x-t.x,y:e.y-t.y},i={x:n.x-t.x,y:n.y-t.y};return P(i,r)/A(i)/A(r)},j=(t,e,n)=>{const r={x:e.x-t.x,y:e.y-t.y},i={x:n.x-t.x,y:n.y-t.y};return F(i,r)/A(i)/A(r)},R=(t,e,n)=>0===e.y?null:{x:t.x+e.x/e.y*(n-t.y),y:n},O=(t,e,n)=>0===e.x?null:{x:n,y:t.y+e.y/e.x*(n-t.x)},B=(t,e,n,r)=>{if(0===e.x)return O(n,r,t.x);if(0===r.x)return O(t,e,n.x);if(0===e.y)return R(n,r,t.y);if(0===r.y)return R(t,e,n.y);const i=P(e,r);if(0==i)return null;const o={x:n.x-t.x,y:n.y-t.y},s=P(o,e)/i,l=P(o,r)/i;return{x:(t.x+l*e.x+(n.x+s*r.x))/2,y:(t.y+l*e.y+(n.y+s*r.y))/2}};class N{static compare(t,e){const n=N.comparePoints(t.point,e.point);return 0!==n?n:(t.point!==e.point&&t.link(e),t.isLeft!==e.isLeft?t.isLeft?1:-1:X.compare(t.segment,e.segment))}static comparePoints(t,e){return t.x<e.x?-1:t.x>e.x?1:t.y<e.y?-1:t.y>e.y?1:0}constructor(t,e){void 0===t.events?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}link(t){if(t.point===this.point)throw new Error("Tried to link already linked events");const e=t.point.events;for(let t=0,n=e.length;t<n;t++){const n=e[t];this.point.events.push(n),n.point=this.point}this.checkForConsuming()}checkForConsuming(){const t=this.point.events.length;for(let e=0;e<t;e++){const n=this.point.events[e];if(void 0===n.segment.consumedBy)for(let r=e+1;r<t;r++){const t=this.point.events[r];void 0===t.consumedBy&&(n.otherSE.point.events===t.otherSE.point.events&&n.segment.consume(t.segment))}}}getAvailableLinkedEvents(){const t=[];for(let e=0,n=this.point.events.length;e<n;e++){const n=this.point.events[e];n!==this&&!n.segment.ringOut&&n.segment.isInResult()&&t.push(n)}return t}getLeftmostComparator(t){const e=new Map,n=n=>{const r=n.otherSE;e.set(n,{sine:T(this.point,t.point,r.point),cosine:j(this.point,t.point,r.point)})};return(t,r)=>{e.has(t)||n(t),e.has(r)||n(r);const{sine:i,cosine:o}=e.get(t),{sine:s,cosine:l}=e.get(r);return i>=0&&s>=0?o<l?1:o>l?-1:0:i<0&&s<0?o<l?-1:o>l?1:0:s<i?-1:s>i?1:0}}}let Y=0;class X{static compare(t,e){const n=t.leftSE.point.x,r=e.leftSE.point.x,i=t.rightSE.point.x,o=e.rightSE.point.x;if(o<n)return 1;if(i<r)return-1;const s=t.leftSE.point.y,l=e.leftSE.point.y,a=t.rightSE.point.y,u=e.rightSE.point.y;if(n<r){if(l<s&&l<a)return 1;if(l>s&&l>a)return-1;const n=t.comparePoint(e.leftSE.point);if(n<0)return 1;if(n>0)return-1;const r=e.comparePoint(t.rightSE.point);return 0!==r?r:-1}if(n>r){if(s<l&&s<u)return-1;if(s>l&&s>u)return 1;const n=e.comparePoint(t.leftSE.point);if(0!==n)return n;const r=t.comparePoint(e.rightSE.point);return r<0?1:r>0?-1:1}if(s<l)return-1;if(s>l)return 1;if(i<o){const n=e.comparePoint(t.rightSE.point);if(0!==n)return n}if(i>o){const n=t.comparePoint(e.rightSE.point);if(n<0)return 1;if(n>0)return-1}if(i!==o){const t=a-s,e=i-n,h=u-l,c=o-r;if(t>e&&h<c)return 1;if(t<e&&h>c)return-1}return i>o?1:i<o?-1:a<u?-1:a>u?1:t.id<e.id?-1:t.id>e.id?1:0}constructor(t,e,n,r){this.id=++Y,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=n,this.windings=r}static fromRing(t,e,n){let r,i,o;const s=N.comparePoints(t,e);if(s<0)r=t,i=e,o=1;else{if(!(s>0))throw new Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);r=e,i=t,o=-1}const l=new N(r,!0),a=new N(i,!1);return new X(l,a,[n],[o])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<e?t:e},ur:{x:this.rightSE.point.x,y:t>e?t:e}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}comparePoint(t){if(this.isAnEndpoint(t))return 0;const e=this.leftSE.point,n=this.rightSE.point,r=this.vector();if(e.x===n.x)return t.x===e.x?0:t.x<e.x?1:-1;const i=(t.y-e.y)/r.y,o=e.x+i*r.x;if(t.x===o)return 0;const s=(t.x-e.x)/r.x,l=e.y+s*r.y;return t.y===l?0:t.y<l?-1:1}getIntersection(t){const e=this.bbox(),n=t.bbox(),r=u(e,n);if(null===r)return null;const i=this.leftSE.point,o=this.rightSE.point,s=t.leftSE.point,l=t.rightSE.point,h=a(e,s)&&0===this.comparePoint(s),c=a(n,i)&&0===t.comparePoint(i),p=a(e,l)&&0===this.comparePoint(l),f=a(n,o)&&0===t.comparePoint(o);if(c&&h)return f&&!p?o:!f&&p?l:null;if(c)return p&&i.x===l.x&&i.y===l.y?null:i;if(h)return f&&o.x===s.x&&o.y===s.y?null:s;if(f&&p)return null;if(f)return o;if(p)return l;const g=B(i,this.vector(),s,t.vector());return null===g?null:a(r,g)?d.round(g.x,g.y):null}split(t){const e=[],n=void 0!==t.events,r=new N(t,!0),i=new N(t,!1),o=this.rightSE;this.replaceRightSE(i),e.push(i),e.push(r);const s=new X(r,o,this.rings.slice(),this.windings.slice());return N.comparePoints(s.leftSE.point,s.rightSE.point)>0&&s.swapEvents(),N.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(r.checkForConsuming(),i.checkForConsuming()),e}swapEvents(){const t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let t=0,e=this.windings.length;t<e;t++)this.windings[t]*=-1}consume(t){let e=this,n=t;for(;e.consumedBy;)e=e.consumedBy;for(;n.consumedBy;)n=n.consumedBy;const r=X.compare(e,n);if(0!==r){if(r>0){const t=e;e=n,n=t}if(e.prev===n){const t=e;e=n,n=t}for(let t=0,r=n.rings.length;t<r;t++){const r=n.rings[t],i=n.windings[t],o=e.rings.indexOf(r);-1===o?(e.rings.push(r),e.windings.push(i)):e.windings[o]+=i}n.rings=null,n.windings=null,n.consumedBy=e,n.leftSE.consumedBy=e.leftSE,n.rightSE.consumedBy=e.rightSE}}prevInResult(){return void 0!==this._prevInResult?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(void 0!==this._beforeState)return this._beforeState;if(this.prev){const t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}afterState(){if(void 0!==this._afterState)return this._afterState;const t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};const e=this._afterState.rings,n=this._afterState.windings,r=this._afterState.multiPolys;for(let t=0,r=this.rings.length;t<r;t++){const r=this.rings[t],i=this.windings[t],o=e.indexOf(r);-1===o?(e.push(r),n.push(i)):n[o]+=i}const i=[],o=[];for(let t=0,r=e.length;t<r;t++){if(0===n[t])continue;const r=e[t],s=r.poly;if(-1===o.indexOf(s))if(r.isExterior)i.push(s);else{-1===o.indexOf(s)&&o.push(s);const t=i.indexOf(r.poly);-1!==t&&i.splice(t,1)}}for(let t=0,e=i.length;t<e;t++){const e=i[t].multiPoly;-1===r.indexOf(e)&&r.push(e)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(void 0!==this._isInResult)return this._isInResult;const t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(V.type){case"union":{const n=0===t.length,r=0===e.length;this._isInResult=n!==r;break}case"intersection":{let n,r;t.length<e.length?(n=t.length,r=e.length):(n=e.length,r=t.length),this._isInResult=r===V.numMultiPolys&&n<r;break}case"xor":{const n=Math.abs(t.length-e.length);this._isInResult=n%2==1;break}case"difference":{const n=t=>1===t.length&&t[0].isSubject;this._isInResult=n(t)!==n(e);break}default:throw new Error(`Unrecognized operation type found ${V.type}`)}return this._isInResult}}class z{constructor(t,e,n){if(!Array.isArray(t)||0===t.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=n,this.segments=[],"number"!=typeof t[0][0]||"number"!=typeof t[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const r=d.round(t[0][0],t[0][1]);this.bbox={ll:{x:r.x,y:r.y},ur:{x:r.x,y:r.y}};let i=r;for(let e=1,n=t.length;e<n;e++){if("number"!=typeof t[e][0]||"number"!=typeof t[e][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let n=d.round(t[e][0],t[e][1]);n.x===i.x&&n.y===i.y||(this.segments.push(X.fromRing(i,n,this)),n.x<this.bbox.ll.x&&(this.bbox.ll.x=n.x),n.y<this.bbox.ll.y&&(this.bbox.ll.y=n.y),n.x>this.bbox.ur.x&&(this.bbox.ur.x=n.x),n.y>this.bbox.ur.y&&(this.bbox.ur.y=n.y),i=n)}r.x===i.x&&r.y===i.y||this.segments.push(X.fromRing(i,r,this))}getSweepEvents(){const t=[];for(let e=0,n=this.segments.length;e<n;e++){const n=this.segments[e];t.push(n.leftSE),t.push(n.rightSE)}return t}}class D{constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new z(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let e=1,n=t.length;e<n;e++){const n=new z(t[e],this,!1);n.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=n.bbox.ll.x),n.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=n.bbox.ll.y),n.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=n.bbox.ur.x),n.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=n.bbox.ur.y),this.interiorRings.push(n)}this.multiPoly=e}getSweepEvents(){const t=this.exteriorRing.getSweepEvents();for(let e=0,n=this.interiorRings.length;e<n;e++){const n=this.interiorRings[e].getSweepEvents();for(let e=0,r=n.length;e<r;e++)t.push(n[e])}return t}}class q{constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{"number"==typeof t[0][0][0]&&(t=[t])}catch(t){}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(let e=0,n=t.length;e<n;e++){const n=new D(t[e],this);n.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=n.bbox.ll.x),n.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=n.bbox.ll.y),n.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=n.bbox.ur.x),n.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=n.bbox.ur.y),this.polys.push(n)}this.isSubject=e}getSweepEvents(){const t=[];for(let e=0,n=this.polys.length;e<n;e++){const n=this.polys[e].getSweepEvents();for(let e=0,r=n.length;e<r;e++)t.push(n[e])}return t}}class G{static factory(t){const e=[];for(let n=0,r=t.length;n<r;n++){const r=t[n];if(!r.isInResult()||r.ringOut)continue;let i=null,o=r.leftSE,s=r.rightSE;const l=[o],a=o.point,u=[];for(;i=o,o=s,l.push(o),o.point!==a;)for(;;){const t=o.getAvailableLinkedEvents();if(0===t.length){const t=l[0].point,e=l[l.length-1].point;throw new Error(`Unable to complete output ring starting at [${t.x},`+` ${t.y}]. Last matching segment found ends at`+` [${e.x}, ${e.y}].`)}if(1===t.length){s=t[0].otherSE;break}let n=null;for(let t=0,e=u.length;t<e;t++)if(u[t].point===o.point){n=t;break}if(null!==n){const t=u.splice(n)[0],r=l.splice(t.index);r.unshift(r[0].otherSE),e.push(new G(r.reverse()));continue}u.push({index:l.length,point:o.point});const r=o.getLeftmostComparator(i);s=t.sort(r)[0].otherSE;break}e.push(new G(l))}return e}constructor(t){this.events=t;for(let e=0,n=t.length;e<n;e++)t[e].segment.ringOut=this;this.poly=null}getGeom(){let t=this.events[0].point;const e=[t];for(let n=1,r=this.events.length-1;n<r;n++){const r=this.events[n].point,i=this.events[n+1].point;0!==I(r,t,i)&&(e.push(r),t=r)}if(1===e.length)return null;const n=e[0],r=e[1];0===I(n,t,r)&&e.shift(),e.push(e[0]);const i=this.isExteriorRing()?1:-1,o=this.isExteriorRing()?0:e.length-1,s=this.isExteriorRing()?e.length:-1,l=[];for(let t=o;t!=s;t+=i)l.push([e[t].x,e[t].y]);return l}isExteriorRing(){if(void 0===this._isExteriorRing){const t=this.enclosingRing();this._isExteriorRing=!t||!t.isExteriorRing()}return this._isExteriorRing}enclosingRing(){return void 0===this._enclosingRing&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let t=this.events[0];for(let e=1,n=this.events.length;e<n;e++){const n=this.events[e];N.compare(t,n)>0&&(t=n)}let e=t.segment.prevInResult(),n=e?e.prevInResult():null;for(;;){if(!e)return null;if(!n)return e.ringOut;if(n.ringOut!==e.ringOut)return n.ringOut.enclosingRing()!==e.ringOut?e.ringOut:e.ringOut.enclosingRing();n=(e=n.prevInResult())?e.prevInResult():null}}}class Q{constructor(t){this.exteriorRing=t,t.poly=this,this.interiorRings=[]}addInterior(t){this.interiorRings.push(t),t.poly=this}getGeom(){const t=[this.exteriorRing.getGeom()];if(null===t[0])return null;for(let e=0,n=this.interiorRings.length;e<n;e++){const n=this.interiorRings[e].getGeom();null!==n&&t.push(n)}return t}}class Z{constructor(t){this.rings=t,this.polys=this._composePolys(t)}getGeom(){const t=[];for(let e=0,n=this.polys.length;e<n;e++){const n=this.polys[e].getGeom();null!==n&&t.push(n)}return t}_composePolys(t){const e=[];for(let n=0,r=t.length;n<r;n++){const r=t[n];if(!r.poly)if(r.isExteriorRing())e.push(new Q(r));else{const t=r.enclosingRing();t.poly||e.push(new Q(t)),t.poly.addInterior(r)}}return e}}class U{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:X.compare;this.queue=t,this.tree=new l(e),this.segments=[]}process(t){const e=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),n;const r=t.isLeft?this.tree.add(e):this.tree.find(e);if(!r)throw new Error(`Unable to find segment #${e.id} `+`[${e.leftSE.point.x}, ${e.leftSE.point.y}] -> `+`[${e.rightSE.point.x}, ${e.rightSE.point.y}] `+"in SweepLine tree.");let i=r,o=r,s=void 0,l=void 0;for(;void 0===s;)null===(i=this.tree.prev(i))?s=null:void 0===i.key.consumedBy&&(s=i.key);for(;void 0===l;)null===(o=this.tree.next(o))?l=null:void 0===o.key.consumedBy&&(l=o.key);if(t.isLeft){let r=null;if(s){const t=s.getIntersection(e);if(null!==t&&(e.isAnEndpoint(t)||(r=t),!s.isAnEndpoint(t))){const e=this._splitSafely(s,t);for(let t=0,r=e.length;t<r;t++)n.push(e[t])}}let i=null;if(l){const t=l.getIntersection(e);if(null!==t&&(e.isAnEndpoint(t)||(i=t),!l.isAnEndpoint(t))){const e=this._splitSafely(l,t);for(let t=0,r=e.length;t<r;t++)n.push(e[t])}}if(null!==r||null!==i){let t=null;if(null===r)t=i;else if(null===i)t=r;else{t=N.comparePoints(r,i)<=0?r:i}this.queue.remove(e.rightSE),n.push(e.rightSE);const o=e.split(t);for(let t=0,e=o.length;t<e;t++)n.push(o[t])}n.length>0?(this.tree.remove(e),n.push(t)):(this.segments.push(e),e.prev=s)}else{if(s&&l){const t=s.getIntersection(l);if(null!==t){if(!s.isAnEndpoint(t)){const e=this._splitSafely(s,t);for(let t=0,r=e.length;t<r;t++)n.push(e[t])}if(!l.isAnEndpoint(t)){const e=this._splitSafely(l,t);for(let t=0,r=e.length;t<r;t++)n.push(e[t])}}}this.tree.remove(e)}return n}_splitSafely(t,e){this.tree.remove(t);const n=t.rightSE;this.queue.remove(n);const r=t.split(e);return r.push(n),void 0===t.consumedBy&&this.tree.add(t),r}}const $=void 0!==t&&t.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,W=void 0!==t&&t.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;const V=new class{run(t,e,n){V.type=t,d.reset();const r=[new q(e,!0)];for(let t=0,e=n.length;t<e;t++)r.push(new q(n[t],!1));if(V.numMultiPolys=r.length,"difference"===V.type){const t=r[0];let e=1;for(;e<r.length;)null!==u(r[e].bbox,t.bbox)?e++:r.splice(e,1)}if("intersection"===V.type)for(let t=0,e=r.length;t<e;t++){const e=r[t];
1for(let n=t+1,i=r.length;n<i;n++)if(null===u(e.bbox,r[n].bbox))return[]}const i=new l(N.compare);for(let t=0,e=r.length;t<e;t++){const e=r[t].getSweepEvents();for(let t=0,n=e.length;t<n;t++)if(i.insert(e[t]),i.size>$)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const o=new U(i);let s=i.size,a=i.pop();for(;a;){const t=a.key;if(i.size===s){const e=t.segment;throw new Error(`Unable to pop() ${t.isLeft?"left":"right"} SweepEvent `+`[${t.point.x}, ${t.point.y}] from segment #${e.id} `+`[${e.leftSE.point.x}, ${e.leftSE.point.y}] -> `+`[${e.rightSE.point.x}, ${e.rightSE.point.y}] from queue.`)}if(i.size>$)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(o.segments.length>W)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const e=o.process(t);for(let t=0,n=e.length;t<n;t++){const n=e[t];void 0===n.consumedBy&&i.insert(n)}s=i.size,a=i.pop()}d.reset();const h=G.factory(o.segments);return new Z(h).getGeom()}};return{union:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return V.run("union",t,n)},intersection:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return V.run("intersection",t,n)},xor:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return V.run("xor",t,n)},difference:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return V.run("difference",t,n)}}},"object"==typeof n&&void 0!==e?e.exports=i():(r="undefined"!=typeof globalThis?globalThis:r||self).polygonClipping=i()}).call(this)}).call(this,t("_process"))},{_process:22}],22:[function(t,e,n){var r,i,o=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===s||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:s}catch(t){r=s}try{i="function"==typeof clearTimeout?clearTimeout:l}catch(t){i=l}}();var u,h=[],c=!1,p=-1;function f(){c&&u&&(c=!1,u.length?h=u.concat(h):p=-1,h.length&&d())}function d(){if(!c){var t=a(f);c=!0;for(var e=h.length;e;){for(u=h,h=[];++p<e;)u&&u[p].run();p=-1,e=h.length}u=null,c=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===l||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function g(t,e){this.fun=t,this.array=e}function m(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];h.push(new g(t,e)),1!==h.length||c||a(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],23:[function(t,e,n){var r,i;r=this,i=function(){"use strict";function t(t,r,i,o,s){!function t(n,r,i,o,s){for(;o>i;){if(o-i>600){var l=o-i+1,a=r-i+1,u=Math.log(l),h=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*h*(l-h)/l)*(a-l/2<0?-1:1);t(n,r,Math.max(i,Math.floor(r-a*h/l+c)),Math.min(o,Math.floor(r+(l-a)*h/l+c)),s)}var p=n[r],f=i,d=o;for(e(n,i,r),s(n[o],p)>0&&e(n,i,o);f<d;){for(e(n,f,d),f++,d--;s(n[f],p)<0;)f++;for(;s(n[d],p)>0;)d--}0===s(n[i],p)?e(n,i,d):e(n,++d,o),d<=r&&(i=d+1),r<=d&&(o=d-1)}}(t,r,i||0,o||t.length-1,s||n)}function e(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function n(t,e){return t<e?-1:t>e?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}function o(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,r,i){i||(i=d(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=e;o<n;o++){var s=t.children[o];l(i,t.leaf?r(s):s)}return i}function l(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function a(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}
vendor: 4,279 bytes, line 1
1function h(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function c(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,n,r,i,o){for(var s=[n,r];s.length;)if(!((r=s.pop())-(n=s.pop())<=i)){var l=n+Math.ceil((r-n)/i/2)*i;t(e,l,n,r,o),s.push(n,l,l,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var s=e.children[o],l=e.leaf?r(s):s;f(t,l)&&(e.leaf?n.push(s):p(t,l)?this._all(s,n):i.push(s))}e=i.pop()}return n},r.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],o=e.leaf?this.toBBox(i):i;if(f(t,o)){if(e.leaf||p(t,o))return!0;n.push(i)}}e=n.pop()}return!1},r.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=d([]),this},r.prototype.remove=function(t,e){if(!t)return this;for(var n,r,o,s=this.data,l=this.toBBox(t),a=[],u=[];s||a.length;){if(s||(s=a.pop(),r=a[a.length-1],n=u.pop(),o=!0),s.leaf){var h=i(t,s.children,e);if(-1!==h)return s.children.splice(h,1),a.push(s),this._condense(a),this}o||s.leaf||!p(s,l)?r?(n++,s=r.children[n],o=!1):s=null:(a.push(s),u.push(n),n=0,r=s,s=s.children[0])}return this},r.prototype.toBBox=function(t){return t},r.prototype.compareMinX=function(t,e){return t.minX-e.minX},r.prototype.compareMinY=function(t,e){return t.minY-e.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(t){return this.data=t,this},r.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},r.prototype._build=function(t,e,n,r){var i,s=n-e+1,l=this._maxEntries;if(s<=l)return o(i=d(t.slice(e,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(s)/Math.log(l)),l=Math.ceil(s/Math.pow(l,r-1))),(i=d([])).leaf=!1,i.height=r;var a=Math.ceil(s/l),u=a*Math.ceil(Math.sqrt(l));g(t,e,n,u,this.compareMinX);for(var h=e;h<=n;h+=u){var c=Math.min(h+u-1,n);g(t,h,c,a,this.compareMinY);for(var p=h;p<=c;p+=a){var f=Math.min(p+a-1,c);i.children.push(this._build(t,p,f,r-1))}}return o(i,this.toBBox),i},r.prototype._chooseSubtree=function(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,s=void 0,l=0;l<e.children.length;l++){var a=e.children[l],u=h(a),c=(p=t,f=a,(Math.max(f.maxX,p.maxX)-Math.min(f.minX,p.minX))*(Math.max(f.maxY,p.maxY)-Math.min(f.minY,p.minY))-u);c<o?(o=c,i=u<i?u:i,s=a):c===o&&u<i&&(i=u,s=a)}e=s||e.children[0]}var p,f;return e},r.prototype._insert=function(t,e,n){var r=n?t:this.toBBox(t),i=[],o=this._chooseSubtree(r,this.data,e,i);for(o.children.push(t),l(o,r);e>=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(r,i,e)},r.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var s=this._chooseSplitIndex(n,i,r),l=d(n.children.splice(s,n.children.length-s));l.height=n.height,l.leaf=n.leaf,o(n,this.toBBox),o(l,this.toBBox),e?t[e-1].children.push(l):this._splitRoot(n,l)},r.prototype._splitRoot=function(t,e){this.data=d([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,o,l,a,u,c,p=1/0,f=1/0,d=e;d<=n-e;d++){var g=s(t,0,d,this.toBBox),m=s(t,d,n,this.toBBox),y=(i=g,o=m,l=void 0,a=void 0,u=void 0,c=void 0,l=Math.max(i.minX,o.minX),a=Math.max(i.minY,o.minY),u=Math.min(i.maxX,o.maxX),c=Math.min(i.maxY,o.maxY),Math.max(0,u-l)*Math.max(0,c-a)),v=h(g)+h(m);
1y<p?(p=y,r=d,f=v<f?v:f):y===p&&v<f&&(f=v,r=d)}return r||n-e},r.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:a,i=t.leaf?this.compareMinY:u;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,o=s(t,0,e,i),a=s(t,n-e,n,i),u=c(o)+c(a),h=e;h<n-e;h++){var p=t.children[h];l(o,t.leaf?i(p):p),u+=c(o)}for(var f=n-e-1;f>=e;f--){var d=t.children[f];l(a,t.leaf?i(d):d),u+=c(a)}return u},r.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;r>=0;r--)l(e[r],t)},r.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},r},"object"==typeof n&&void 0!==e?e.exports=i():(r=r||self).RBush=i()},{}],24:[function(t,e,n){var r;r=this,function(t){"use strict";const e=134217729;function n(t,e,n,r,i){let o,s,l,a,u=e[0],h=r[0],c=0,p=0;h>u==h>-u?(o=u,u=e[++c]):(o=h,h=r[++p]);let f=0;if(c<t&&p<n)for(h>u==h>-u?(l=o-((s=u+o)-u),u=e[++c]):(l=o-((s=h+o)-h),h=r[++p]),o=s,0!==l&&(i[f++]=l);c<t&&p<n;)h>u==h>-u?(l=o-((s=o+u)-(a=s-o))+(u-a),u=e[++c]):(l=o-((s=o+h)-(a=s-o))+(h-a),h=r[++p]),o=s,0!==l&&(i[f++]=l);for(;c<t;)l=o-((s=o+u)-(a=s-o))+(u-a),u=e[++c],o=s,0!==l&&(i[f++]=l);for(;p<n;)l=o-((s=o+h)-(a=s-o))+(h-a),h=r[++p],o=s,0!==l&&(i[f++]=l);return 0===o&&0!==f||(i[f++]=o),f}function r(t){return new Float64Array(t)}const i=r(4),o=r(8),s=r(12),l=r(16),a=r(4);t.orient2d=function(t,r,u,h,c,p){const f=(r-p)*(u-c),d=(t-c)*(h-p),g=f-d;if(0===f||0===d||f>0!=d>0)return g;const m=Math.abs(f+d);return Math.abs(g)>=3.3306690738754716e-16*m?g:-function(t,r,u,h,c,p,f){let d,g,m,y,v,x,b,_,w,E,S,k,M,C,L,P,F,I;const A=t-c,T=u-c,j=r-p,R=h-p;v=(L=(_=A-(b=(x=e*A)-(x-A)))*(E=R-(w=(x=e*R)-(x-R)))-((C=A*R)-b*w-_*w-b*E))-(S=L-(F=(_=j-(b=(x=e*j)-(x-j)))*(E=T-(w=(x=e*T)-(x-T)))-((P=j*T)-b*w-_*w-b*E))),i[0]=L-(S+v)+(v-F),v=(M=C-((k=C+S)-(v=k-C))+(S-v))-(S=M-P),i[1]=M-(S+v)+(v-P),v=(I=k+S)-k,i[2]=k-(I-v)+(S-v),i[3]=I;let O=function(t,e){let n=e[0];for(let t=1;t<4;t++)n+=e[t];return n}(0,i),B=2.2204460492503146e-16*f;if(O>=B||-O>=B)return O;if(d=t-(A+(v=t-A))+(v-c),m=u-(T+(v=u-T))+(v-c),g=r-(j+(v=r-j))+(v-p),y=h-(R+(v=h-R))+(v-p),0===d&&0===g&&0===m&&0===y)return O;if(B=1.1093356479670487e-31*f+3.3306690738754706e-16*Math.abs(O),(O+=A*y+R*d-(j*m+T*g))>=B||-O>=B)return O;v=(L=(_=d-(b=(x=e*d)-(x-d)))*(E=R-(w=(x=e*R)-(x-R)))-((C=d*R)-b*w-_*w-b*E))-(S=L-(F=(_=g-(b=(x=e*g)-(x-g)))*(E=T-(w=(x=e*T)-(x-T)))-((P=g*T)-b*w-_*w-b*E))),a[0]=L-(S+v)+(v-F),v=(M=C-((k=C+S)-(v=k-C))+(S-v))-(S=M-P),a[1]=M-(S+v)+(v-P),v=(I=k+S)-k,a[2]=k-(I-v)+(S-v),a[3]=I;const N=n(4,i,4,a,o);v=(L=(_=A-(b=(x=e*A)-(x-A)))*(E=y-(w=(x=e*y)-(x-y)))-((C=A*y)-b*w-_*w-b*E))-(S=L-(F=(_=j-(b=(x=e*j)-(x-j)))*(E=m-(w=(x=e*m)-(x-m)))-((P=j*m)-b*w-_*w-b*E))),a[0]=L-(S+v)+(v-F),v=(M=C-((k=C+S)-(v=k-C))+(S-v))-(S=M-P),a[1]=M-(S+v)+(v-P),v=(I=k+S)-k,a[2]=k-(I-v)+(S-v),a[3]=I;const Y=n(N,o,4,a,s);v=(L=(_=d-(b=(x=e*d)-(x-d)))*(E=y-(w=(x=e*y)-(x-y)))-((C=d*y)-b*w-_*w-b*E))-(S=L-(F=(_=g-(b=(x=e*g)-(x-g)))*(E=m-(w=(x=e*m)-(x-m)))-((P=g*m)-b*w-_*w-b*E))),a[0]=L-(S+v)+(v-F),v=(M=C-((k=C+S)-(v=k-C))+(S-v))-(S=M-P),a[1]=M-(S+v)+(v-P),v=(I=k+S)-k,a[2]=k-(I-v)+(S-v),a[3]=I;const X=n(Y,s,4,a,l);return l[X-1]}(t,r,u,h,c,p,m)},t.orient2dfast=function(t,e,n,r,i,o){return(e-o)*(n-i)-(t-i)*(r-o)},Object.defineProperty(t,"__esModule",{value:!0})}("object"==typeof n&&void 0!==e?n:(r=r||self).predicates={})},{}],25:[function(t,e,n){"use strict";var r=t("./src/suggestions");e.exports=r,"undefined"!=typeof window&&(window.Suggestions=r)},{"./src/suggestions":27}],26:[function(t,e,n){"use strict";var r=function(t){return this.component=t,this.items=[],this.active=0,this.wrapper=document.createElement("div"),this.wrapper.className="suggestions-wrapper",this.element=document.createElement("ul"),this.element.className="suggestions",this.wrapper.appendChild(this.element),this.selectingListItem=!1,t.el.parentNode.insertBefore(this.wrapper,t.el.nextSibling),this};r.prototype.show=function(){this.element.style.display="block"},r.prototype.hide=function(){this.element.style.display="none"},r.prototype.add=function(t){this.items.push(t)},r.prototype.clear=function(){this.items=[],this.active=0},r.prototype.isEmpty=function(){return!this.items.length},r.prototype.isVisible=function(){return"block"===this.element.style.display},r.prototype.draw=function(){if(this.element.innerHTML="",0!==this.items.length){for(var t=0;t<this.items.length;t++)this.drawItem(this.items[t],this.active===t);this.show()}else this.hide()},r.prototype.drawItem=function(t,e){var n=document.createElement("li"),r=document.createElement("a");e&&(n.className+=" active"),r.innerHTML=t.string,n.appendChild(r),this.element.appendChild(n),n.addEventListener("mousedown",function(){this.selectingListItem=!0}.bind(this)),n.addEventListener("mouseup",function(){this.handleMouseUp.call(this,t)}.bind(this))},r.prototype.handleMouseUp=function(t){this.selectingListItem=!1,this.component.value(t.original),this.clear(),this.draw()},r.prototype.move=function(t){this.active=t,this.draw()},r.prototype.previous=function(){this.move(0===this.active?this.items.length-1:this.active-1)},r.prototype.next=function(){this.move(this.active===this.items.length-1?0:this.active+1)},r.prototype.drawError=function(t){var e=document.createElement("li");e.innerHTML=t,this.element.appendChild(e),this.show()},e.exports=r},{}],27:[function(t,e,n){"use strict";var r=t("xtend"),i=t("fuzzy"),o=t("./list"),s=function(t,e,n){return n=n||{},this.options=r({minLength:2,limit:5,filter:!0,hideOnBlur:!0},n),this.el=t,this.data=e||[],this.list=new o(this),this.query="",this.selected=null,this.list.draw(),this.el.addEventListener("keyup",function(t){this.handleKeyUp(t.keyCode)}.bind(this),!1),this.el.addEventListener("keydown",function(t){this.handleKeyDown(t)}.bind(this)),this.el.addEventListener("focus",function(){this.handleFocus()}.bind(this)),this.el.addEventListener("blur",function(){this.handleBlur()}.bind(this)),this.el.addEventListener("paste",function(t){this.handlePaste(t)}
vendor: 2,194 bytes, line 1
1.bind(this)),this.render=this.options.render?this.options.render.bind(this):this.render.bind(this),this.getItemValue=this.options.getItemValue?this.options.getItemValue.bind(this):this.getItemValue.bind(this),this};s.prototype.handleKeyUp=function(t){40!==t&&38!==t&&27!==t&&13!==t&&9!==t&&this.handleInputChange(this.el.value)},s.prototype.handleKeyDown=function(t){switch(t.keyCode){case 13:case 9:this.list.isEmpty()||(this.list.isVisible()&&t.preventDefault(),this.value(this.list.items[this.list.active].original),this.list.hide());break;case 27:this.list.isEmpty()||this.list.hide();break;case 38:this.list.previous();break;case 40:this.list.next()}},s.prototype.handleBlur=function(){!this.list.selectingListItem&&this.options.hideOnBlur&&this.list.hide()},s.prototype.handlePaste=function(t){if(t.clipboardData)this.handleInputChange(t.clipboardData.getData("Text"));else{var e=this;setTimeout(function(){e.handleInputChange(t.target.value)},100)}},s.prototype.handleInputChange=function(t){this.query=this.normalize(t),this.list.clear(),this.query.length<this.options.minLength?this.list.draw():this.getCandidates(function(t){for(var e=0;e<t.length&&(this.list.add(t[e]),e!==this.options.limit-1);e++);this.list.draw()}.bind(this))},s.prototype.handleFocus=function(){this.list.isEmpty()||this.list.show(),this.list.selectingListItem=!1},s.prototype.update=function(t){this.data=t,this.handleKeyUp()},s.prototype.clear=function(){this.data=[],this.list.clear()},s.prototype.normalize=function(t){return t=t.toLowerCase()},s.prototype.match=function(t,e){return t.indexOf(e)>-1},s.prototype.value=function(t){if(this.selected=t,this.el.value=this.getItemValue(t),document.createEvent){var e=document.createEvent("HTMLEvents");e.initEvent("change",!0,!1),this.el.dispatchEvent(e)}else this.el.fireEvent("onchange")},s.prototype.getCandidates=function(t){var e={pre:"<strong>",post:"</strong>",extract:function(t){return this.getItemValue(t)}.bind(this)};t(this.options.filter?i.filter(this.query,this.data,e).map(function(t){return{original:t.original,string:this.render(t.original,t.string)}}.bind(this)):this.data.map(function(t){return{original:t,string:this.render(t)}}.bind(this)))}
1,s.prototype.getItemValue=function(t){return t},s.prototype.render=function(t,e){if(e)return e;for(var n=t.original?this.getItemValue(t.original):this.getItemValue(t),r=this.normalize(n),i=r.lastIndexOf(this.query);i>-1;){var o=i+this.query.length;n=n.slice(0,i)+"<strong>"+n.slice(i,o)+"</strong>"+n.slice(o),i=r.slice(0,i).lastIndexOf(this.query)}return n},s.prototype.renderError=function(t){this.list.drawError(t)},e.exports=s},{"./list":26,fuzzy:14,xtend:29}],28:[function(t,e,n){var r,i;r=this,i=function(){"use strict";var t=function(t,n){if(void 0===t&&(t=[]),void 0===n&&(n=e),this.data=t,this.length=this.data.length,this.compare=n,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function e(t,e){return t<e?-1:t>e?1:0}return t.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},t.prototype.pop=function(){if(0!==this.length){var t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}},t.prototype.peek=function(){return this.data[0]},t.prototype._up=function(t){for(var e=this.data,n=this.compare,r=e[t];t>0;){var i=t-1>>1,o=e[i];if(n(r,o)>=0)break;e[t]=o,t=i}e[t]=r},t.prototype._down=function(t){for(var e=this.data,n=this.compare,r=this.length>>1,i=e[t];t<r;){var o=1+(t<<1),s=e[o],l=o+1;if(l<this.length&&n(e[l],s)<0&&(o=l,s=e[l]),n(s,i)>=0)break;e[t]=s,t=o}e[t]=i},t},"object"==typeof n&&void 0!==e?e.exports=i():(r=r||self).TinyQueue=i()},{}],29:[function(t,e,n){e.exports=function(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var i in n)r.call(n,i)&&(t[i]=n[i])}return t};var r=Object.prototype.hasOwnProperty},{}]},{},[1])(1)});

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.