{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"L\"","webpack:///./node_modules/leaflet-search/dist/leaflet-search.src.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","r","value","n","__esModule","object","property","prototype","hasOwnProperty","p","s","L","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","undefined","Control","Search","extend","includes","version","Evented","Mixin","Events","options","url","layer","sourceData","jsonpParam","propertyLoc","propertyName","formatData","filterData","moveToLocation","buildTip","container","zoom","minLength","initial","casesensitive","autoType","delayType","tooltipLimit","tipAutoSubmit","firstTipSubmit","autoResize","collapsed","autoCollapse","autoCollapseTime","textErr","textCancel","textPlaceholder","hideMarkerOnCollapse","position","marker","icon","animate","circle","radius","weight","color","stroke","fill","_getPath","obj","prop","parts","split","last","pop","len","length","cur","_isObject","toString","initialize","Util","setOptions","this","_inputMinSize","_layer","LayerGroup","_filterData","_defaultFilterData","_formatData","_defaultFormatData","_moveToLocation","_defaultMoveToLocation","_autoTypeTmp","_countertips","_recordsCache","_curReq","onAdd","map","_map","_container","DomUtil","create","_input","_createInput","_tooltip","_createTooltip","_cancel","_createCancel","_button","_createButton","_alert","_createAlert","expand","Marker","CircleMarker","_markerSearch","_isMarkerSearch","setLayer","on","resize","_handleAutoresize","addTo","_wrapper","style","appendChild","onRemove","showAlert","text","self","display","innerHTML","clearTimeout","timerAlert","setTimeout","hideAlert","cancel","_handleKeypress","keyCode","size","focus","_hideTooltip","toggle","addClass","collapse","fire","blur","removeClass","removeLayer","off","collapseDelayed","timerCollapse","collapseDelayedStop","className","alert","DomEvent","stop","label","input","type","autocomplete","autocorrect","autocapitalize","placeholder","role","id","htmlFor","disableClickPropagation","title","href","button","_handleSubmit","tool","e","stopPropagation","_createTip","val","tip","tmpNode","firstChild","_text","_getUrl","records","I","icase","regSearch","frecords","replace","key","RegExp","test","showTooltip","currentSelection","_autoType","scrollTop","json","propName","propLoc","jsonret","isArray","latLng","_recordsFromJsonp","callAfter","callJsonp","script","document","getElementsByTagName","template","src","abort","parentNode","removeChild","_recordsFromAjax","window","XMLHttpRequest","ActiveXObject","e1","e2","Error","request","Browser","ie","atob","querySelector","XDomainRequest","open","onload","JSON","parse","responseText","onreadystatechange","readyState","status","send","_searchInLayer","retRecords","loc","getLatLng","feature","properties","Path","Polyline","Polygon","getBounds","getCenter","eachLayer","_recordsFromLayer","start","firstRecord","end","indexOf","createTextRange","selRange","moveStart","moveEnd","select","setSelectionRange","selectionStart","selectionEnd","_hideAutoType","sel","selection","empty","getSelection","removeAllRanges","_handleArrowSelect","timerKeypress","_fillRecordsCache","searchText","code","charCodeAt","inputText","_retrieveData","data","maxWidth","offsetWidth","getStyle","velocity","searchTips","hasChildNodes","childNodes","tipOffsetTop","offsetTop","clientHeight","_getLocation","showLocation","latlng","setView","panTo","once","setLatLng","Icon","Default","_circleLoc","addLayer","_initIcon","_removeIcon","mr","parseInt","_radius","oldrad","newrad","acc","_timerAnimLoc","setInterval","setRadius","clearInterval","Map","addInitHook","searchControl","control","search","addControl","apply"],"mappings":"aACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAjB,GACAY,OAAAC,eAAAb,EAAA,cAAiDkB,OAAA,K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,OAAAzN,QAIAnE,EAAAmS,IAAAC,YAAA,WACAjO,KAAAtD,QAAAwR,gBACAlO,KAAAkO,cAAArS,EAAAsS,QAAAC,OAAApO,KAAAtD,QAAAwR,eACAlO,KAAAqO,WAAArO,KAAAkO,kBAIArS,EAAAsS,QAAAC,OAAA,SAAA1R,GACA,WAAAb,EAAAK,QAAAC,OAAAO,IAGAb,EAAAK,QAAAC,SAt7BAL,EAAAwS,MAAApU,EAAA6B,GAAAD,KAAA3B,EAAAD,QAAA8B","file":"lfx-search-prod.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n","module.exports = L;","/* \n * Leaflet Control Search v2.3.7 - 2017-11-13 \n * \n * Copyright 2017 Stefano Cudini \n * stefano.cudini@gmail.com \n * http://labs.easyblog.it/ \n * \n * Licensed under the MIT license. \n * \n * Demo: \n * http://labs.easyblog.it/maps/leaflet-search/ \n * \n * Source: \n * git@github.com:stefanocudini/leaflet-search.git \n * \n */\n/*\n\tName\t\t\t\t\tData passed\t\t\t Description\n\n\tManaged Events:\n\t search:locationfound\t{latlng, title, layer} fired after moved and show markerLocation\n\t search:expanded\t\t{}\t\t\t\t\t fired after control was expanded\n\t search:collapsed\t\t{}\t\t\t\t\t fired after control was collapsed\n\n\tPublic methods:\n\t setLayer()\t\t\t\tL.LayerGroup() set layer search at runtime\n\t showAlert() 'Text message' show alert message\n\t searchText()\t\t\t'Text searched' search text by external code\n*/\n\n//TODO implement can do research on multiple sources layers and remote\t\t\n//TODO history: false,\t\t//show latest searches in tooltip\t\t\n//FIXME option condition problem {autoCollapse: true, markerLocation: true} not show location\n//FIXME option condition problem {autoCollapse: false }\n//\n//TODO here insert function search inputText FIRST in _recordsCache keys and if not find results.. \n// run one of callbacks search(sourceData,jsonpUrl or options.layer) and run this.showTooltip\n//\n//TODO change structure of _recordsCache\n//\tlike this: _recordsCache = {\"text-key1\": {loc:[lat,lng], ..other attributes.. }, {\"text-key2\": {loc:[lat,lng]}...}, ...}\n//\tin this mode every record can have a free structure of attributes, only 'loc' is required\n//TODO important optimization!!! always append data in this._recordsCache\n// now _recordsCache content is emptied and replaced with new data founded\n// always appending data on _recordsCache give the possibility of caching ajax, jsonp and layersearch!\n//\n//TODO here insert function search inputText FIRST in _recordsCache keys and if not find results.. \n// run one of callbacks search(sourceData,jsonpUrl or options.layer) and run this.showTooltip\n//\n//TODO change structure of _recordsCache\n//\tlike this: _recordsCache = {\"text-key1\": {loc:[lat,lng], ..other attributes.. }, {\"text-key2\": {loc:[lat,lng]}...}, ...}\n//\tin this way every record can have a free structure of attributes, only 'loc' is required\n\n(function (factory) {\n if(typeof define === 'function' && define.amd) {\n //AMD\n define(['leaflet'], factory);\n } else if(typeof module !== 'undefined') {\n // Node/CommonJS\n module.exports = factory(require('leaflet'));\n } else {\n // Browser globals\n if(typeof window.L === 'undefined')\n throw 'Leaflet must be loaded first';\n factory(window.L);\n }\n})(function (L) {\n\n\nL.Control.Search = L.Control.extend({\n\t\n\tincludes: L.version[0]==='1' ? L.Evented.prototype : L.Mixin.Events,\n\n\toptions: {\n\t\turl: '',\t\t\t\t\t\t//url for search by ajax request, ex: \"search.php?q={s}\". Can be function to returns string for dynamic parameter setting\n\t\tlayer: null,\t\t\t\t\t//layer where search markers(is a L.LayerGroup)\t\t\t\t\n\t\tsourceData: null,\t\t\t\t//function to fill _recordsCache, passed searching text by first param and callback in second\t\t\t\t\n\t\t//TODO implements uniq option 'sourceData' to recognizes source type: url,array,callback or layer\t\t\t\t\n\t\tjsonpParam: null,\t\t\t\t//jsonp param name for search by jsonp service, ex: \"callback\"\n\t\tpropertyLoc: 'loc',\t\t\t\t//field for remapping location, using array: ['latname','lonname'] for select double fields(ex. ['lat','lon'] ) support dotted format: 'prop.subprop.title'\n\t\tpropertyName: 'title',\t\t\t//property in marker.options(or feature.properties for vector layer) trough filter elements in layer,\n\t\tformatData: null,\t\t\t\t//callback for reformat all data from source to indexed data object\n\t\tfilterData: null,\t\t\t\t//callback for filtering data from text searched, params: textSearch, allRecords\n\t\tmoveToLocation: null,\t\t\t//callback run on location found, params: latlng, title, map\n\t\tbuildTip: null,\t\t\t\t\t//function to return row tip html node(or html string), receive text tooltip in first param\n\t\tcontainer: '',\t\t\t\t\t//container id to insert Search Control\t\t\n\t\tzoom: null,\t\t\t\t\t\t//default zoom level for move to location\n\t\tminLength: 1,\t\t\t\t\t//minimal text length for autocomplete\n\t\tinitial: true,\t\t\t\t\t//search elements only by initial text\n\t\tcasesensitive: false,\t\t\t//search elements in case sensitive text\n\t\tautoType: true,\t\t\t\t\t//complete input with first suggested result and select this filled-in text.\n\t\tdelayType: 400,\t\t\t\t\t//delay while typing for show tooltip\n\t\ttooltipLimit: -1,\t\t\t\t//limit max results to show in tooltip. -1 for no limit, 0 for no results\n\t\ttipAutoSubmit: true,\t\t\t//auto map panTo when click on tooltip\n\t\tfirstTipSubmit: false,\t\t\t//auto select first result con enter click\n\t\tautoResize: true,\t\t\t\t//autoresize on input change\n\t\tcollapsed: true,\t\t\t\t//collapse search control at startup\n\t\tautoCollapse: false,\t\t\t//collapse search control after submit(on button or on tips if enabled tipAutoSubmit)\n\t\tautoCollapseTime: 1200,\t\t\t//delay for autoclosing alert and collapse after blur\n\t\ttextErr: 'Location not found',\t//error message\n\t\ttextCancel: 'Cancel',\t\t //title in cancel button\t\t\n\t\ttextPlaceholder: 'Search...', //placeholder value\t\t\t\n\t\thideMarkerOnCollapse: false, //remove circle and marker on search control collapsed\t\t\n\t\tposition: 'topleft',\t\t\n\t\tmarker: {\t\t\t\t\t\t//custom L.Marker or false for hide\n\t\t\ticon: false,\t\t\t\t//custom L.Icon for maker location or false for hide\n\t\t\tanimate: true,\t\t\t\t//animate a circle over location found\n\t\t\tcircle: {\t\t\t\t\t//draw a circle in location found\n\t\t\t\tradius: 10,\n\t\t\t\tweight: 3,\n\t\t\t\tcolor: '#e03',\n\t\t\t\tstroke: true,\n\t\t\t\tfill: false\n\t\t\t}\n\t\t}\n\t},\n\n\t_getPath: function(obj, prop) {\n\t\tvar parts = prop.split('.'),\n\t\t\tlast = parts.pop(),\n\t\t\tlen = parts.length,\n\t\t\tcur = parts[0],\n\t\t\ti = 1;\n\n\t\tif(len > 0)\n\t\t\twhile((obj = obj[cur]) && i < len)\n\t\t\t\tcur = parts[i++];\n\n\t\tif(obj)\n\t\t\treturn obj[last];\n\t},\n\n\t_isObject: function(obj) {\n\t\treturn Object.prototype.toString.call(obj) === \"[object Object]\";\n\t},\n\n\tinitialize: function(options) {\n\t\tL.Util.setOptions(this, options || {});\n\t\tthis._inputMinSize = this.options.textPlaceholder ? this.options.textPlaceholder.length : 10;\n\t\tthis._layer = this.options.layer || new L.LayerGroup();\n\t\tthis._filterData = this.options.filterData || this._defaultFilterData;\n\t\tthis._formatData = this.options.formatData || this._defaultFormatData;\n\t\tthis._moveToLocation = this.options.moveToLocation || this._defaultMoveToLocation;\n\t\tthis._autoTypeTmp = this.options.autoType;\t//useful for disable autoType temporarily in delete/backspace keydown\n\t\tthis._countertips = 0;\t\t//number of tips items\n\t\tthis._recordsCache = {};\t//key,value table! to store locations! format: key,latlng\n\t\tthis._curReq = null;\n\t},\n\n\tonAdd: function (map) {\n\t\tthis._map = map;\n\t\tthis._container = L.DomUtil.create('div', 'leaflet-control-search');\n\t\tthis._input = this._createInput(this.options.textPlaceholder, 'search-input');\n\t\tthis._tooltip = this._createTooltip('search-tooltip');\n\t\tthis._cancel = this._createCancel(this.options.textCancel, 'search-cancel');\n\t\tthis._button = this._createButton(this.options.textPlaceholder, 'search-button');\n\t\tthis._alert = this._createAlert('search-alert');\n\n\t\tif(this.options.collapsed===false)\n\t\t\tthis.expand(this.options.collapsed);\n\n\t\tif(this.options.marker) {\n\t\t\t\n\t\t\tif(this.options.marker instanceof L.Marker || this.options.marker instanceof L.CircleMarker)\n\t\t\t\tthis._markerSearch = this.options.marker;\n\n\t\t\telse if(this._isObject(this.options.marker))\n\t\t\t\tthis._markerSearch = new L.Control.Search.Marker([0,0], this.options.marker);\n\n\t\t\tthis._markerSearch._isMarkerSearch = true;\n\t\t}\n\n\t\tthis.setLayer( this._layer );\n\n\t\tmap.on({\n\t\t\t// \t\t'layeradd': this._onLayerAddRemove,\n\t\t\t// \t\t'layerremove': this._onLayerAddRemove\n\t\t\t'resize': this._handleAutoresize\n\t\t\t}, this);\n\t\treturn this._container;\n\t},\n\taddTo: function (map) {\n\n\t\tif(this.options.container) {\n\t\t\tthis._container = this.onAdd(map);\n\t\t\tthis._wrapper = L.DomUtil.get(this.options.container);\n\t\t\tthis._wrapper.style.position = 'relative';\n\t\t\tthis._wrapper.appendChild(this._container);\n\t\t}\n\t\telse\n\t\t\tL.Control.prototype.addTo.call(this, map);\n\n\t\treturn this;\n\t},\n\n\tonRemove: function(map) {\n\t\tthis._recordsCache = {};\n\t\t// map.off({\n\t\t// \t\t'layeradd': this._onLayerAddRemove,\n\t\t// \t\t'layerremove': this._onLayerAddRemove\n\t\t// \t}, this);\n\t},\n\n\t// _onLayerAddRemove: function(e) {\n\t// \t//without this, run setLayer also for each Markers!! to optimize!\n\t// \tif(e.layer instanceof L.LayerGroup)\n\t// \t\tif( L.stamp(e.layer) != L.stamp(this._layer) )\n\t// \t\t\tthis.setLayer(e.layer);\n\t// },\n\n\tsetLayer: function(layer) {\t//set search layer at runtime\n\t\t//this.options.layer = layer; //setting this, run only this._recordsFromLayer()\n\t\tthis._layer = layer;\n\t\tthis._layer.addTo(this._map);\n\t\treturn this;\n\t},\n\t\n\tshowAlert: function(text) {\n\t\tvar self = this;\n\t\ttext = text || this.options.textErr;\n\t\tthis._alert.style.display = 'block';\n\t\tthis._alert.innerHTML = text;\n\t\tclearTimeout(this.timerAlert);\n\t\t\n\t\tthis.timerAlert = setTimeout(function() {\n\t\t\tself.hideAlert();\n\t\t},this.options.autoCollapseTime);\n\t\treturn this;\n\t},\n\t\n\thideAlert: function() {\n\t\tthis._alert.style.display = 'none';\n\t\treturn this;\n\t},\n\t\t\n\tcancel: function() {\n\t\tthis._input.value = '';\n\t\tthis._handleKeypress({ keyCode: 8 });//simulate backspace keypress\n\t\tthis._input.size = this._inputMinSize;\n\t\tthis._input.focus();\n\t\tthis._cancel.style.display = 'none';\n\t\tthis._hideTooltip();\n\t\treturn this;\n\t},\n\t\n\texpand: function(toggle) {\n\t\ttoggle = typeof toggle === 'boolean' ? toggle : true;\n\t\tthis._input.style.display = 'block';\n\t\tL.DomUtil.addClass(this._container, 'search-exp');\n\t\tif ( toggle !== false ) {\n\t\t\tthis._input.focus();\n\t\t\tthis._map.on('dragstart click', this.collapse, this);\n\t\t}\n\t\tthis.fire('search:expanded');\n\t\treturn this;\t\n\t},\n\n\tcollapse: function() {\n\t\tthis._hideTooltip();\n\t\tthis.cancel();\n\t\tthis._alert.style.display = 'none';\n\t\tthis._input.blur();\n\t\tif(this.options.collapsed)\n\t\t{\n\t\t\tthis._input.style.display = 'none';\n\t\t\tthis._cancel.style.display = 'none';\t\t\t\n\t\t\tL.DomUtil.removeClass(this._container, 'search-exp');\t\t\n\t\t\tif (this.options.hideMarkerOnCollapse) {\n\t\t\t\tthis._map.removeLayer(this._markerSearch);\n\t\t\t}\n\t\t\tthis._map.off('dragstart click', this.collapse, this);\n\t\t}\n\t\tthis.fire('search:collapsed');\n\t\treturn this;\n\t},\n\t\n\tcollapseDelayed: function() {\t//collapse after delay, used on_input blur\n\t\tvar self = this;\n\t\tif (!this.options.autoCollapse) return this;\n\t\tclearTimeout(this.timerCollapse);\n\t\tthis.timerCollapse = setTimeout(function() {\n\t\t\tself.collapse();\n\t\t}, this.options.autoCollapseTime);\n\t\treturn this;\t\t\n\t},\n\n\tcollapseDelayedStop: function() {\n\t\tclearTimeout(this.timerCollapse);\n\t\treturn this;\t\t\n\t},\n\n\t////start DOM creations\n\t_createAlert: function(className) {\n\t\tvar alert = L.DomUtil.create('div', className, this._container);\n\t\talert.style.display = 'none';\n\n\t\tL.DomEvent\n\t\t\t.on(alert, 'click', L.DomEvent.stop, this)\n\t\t\t.on(alert, 'click', this.hideAlert, this);\n\n\t\treturn alert;\n\t},\n\n\t_createInput: function (text, className) {\n\t\tvar label = L.DomUtil.create('label', className, this._container);\n\t\tvar input = L.DomUtil.create('input', className, this._container);\n\t\tinput.type = 'text';\n\t\tinput.size = this._inputMinSize;\n\t\tinput.value = '';\n\t\tinput.autocomplete = 'off';\n\t\tinput.autocorrect = 'off';\n\t\tinput.autocapitalize = 'off';\n\t\tinput.placeholder = text;\n\t\tinput.style.display = 'none';\n\t\tinput.role = 'search';\n\t\tinput.id = input.role + input.type + input.size;\n\t\t\n\t\tlabel.htmlFor = input.id;\n\t\tlabel.style.display = 'none';\n\t\tlabel.value = text;\n\n\t\tL.DomEvent\n\t\t\t.disableClickPropagation(input)\n\t\t\t.on(input, 'keyup', this._handleKeypress, this)\n\t\t\t.on(input, 'blur', this.collapseDelayed, this)\n\t\t\t.on(input, 'focus', this.collapseDelayedStop, this);\n\t\t\n\t\treturn input;\n\t},\n\n\t_createCancel: function (title, className) {\n\t\tvar cancel = L.DomUtil.create('a', className, this._container);\n\t\tcancel.href = '#';\n\t\tcancel.title = title;\n\t\tcancel.style.display = 'none';\n\t\tcancel.innerHTML = \"\";//imageless(see css)\n\n\t\tL.DomEvent\n\t\t\t.on(cancel, 'click', L.DomEvent.stop, this)\n\t\t\t.on(cancel, 'click', this.cancel, this);\n\n\t\treturn cancel;\n\t},\n\t\n\t_createButton: function (title, className) {\n\t\tvar button = L.DomUtil.create('a', className, this._container);\n\t\tbutton.href = '#';\n\t\tbutton.title = title;\n\n\t\tL.DomEvent\n\t\t\t.on(button, 'click', L.DomEvent.stop, this)\n\t\t\t.on(button, 'click', this._handleSubmit, this)\t\t\t\n\t\t\t.on(button, 'focus', this.collapseDelayedStop, this)\n\t\t\t.on(button, 'blur', this.collapseDelayed, this);\n\n\t\treturn button;\n\t},\n\n\t_createTooltip: function(className) {\n\t\tvar self = this;\t\t\n\t\tvar tool = L.DomUtil.create('ul', className, this._container);\n\t\ttool.style.display = 'none';\n\t\tL.DomEvent\n\t\t\t.disableClickPropagation(tool)\n\t\t\t.on(tool, 'blur', this.collapseDelayed, this)\n\t\t\t.on(tool, 'mousewheel', function(e) {\n\t\t\t\tself.collapseDelayedStop();\n\t\t\t\tL.DomEvent.stopPropagation(e);//disable zoom map\n\t\t\t}, this)\n\t\t\t.on(tool, 'mouseover', function(e) {\n\t\t\t\tself.collapseDelayedStop();\n\t\t\t}, this);\n\t\treturn tool;\n\t},\n\n\t_createTip: function(text, val) {//val is object in recordCache, usually is Latlng\n\t\tvar tip;\n\t\t\n\t\tif(this.options.buildTip)\n\t\t{\n\t\t\ttip = this.options.buildTip.call(this, text, val); //custom tip node or html string\n\t\t\tif(typeof tip === 'string')\n\t\t\t{\n\t\t\t\tvar tmpNode = L.DomUtil.create('div');\n\t\t\t\ttmpNode.innerHTML = tip;\n\t\t\t\ttip = tmpNode.firstChild;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttip = L.DomUtil.create('li', '');\n\t\t\ttip.innerHTML = text;\n\t\t}\n\t\t\n\t\tL.DomUtil.addClass(tip, 'search-tip');\n\t\ttip._text = text; //value replaced in this._input and used by _autoType\n\n\t\tif(this.options.tipAutoSubmit)\n\t\t\tL.DomEvent\n\t\t\t\t.disableClickPropagation(tip)\t\t\n\t\t\t\t.on(tip, 'click', L.DomEvent.stop, this)\n\t\t\t\t.on(tip, 'click', function(e) {\n\t\t\t\t\tthis._input.value = text;\n\t\t\t\t\tthis._handleAutoresize();\n\t\t\t\t\tthis._input.focus();\n\t\t\t\t\tthis._hideTooltip();\t\n\t\t\t\t\tthis._handleSubmit();\n\t\t\t\t}, this);\n\n\t\treturn tip;\n\t},\n\n\t//////end DOM creations\n\n\t_getUrl: function(text) {\n\t\treturn (typeof this.options.url === 'function') ? this.options.url(text) : this.options.url;\n\t},\n\n\t_defaultFilterData: function(text, records) {\n\t\n\t\tvar I, icase, regSearch, frecords = {};\n\n\t\ttext = text.replace(/[.*+?^${}()|[\\]\\\\]/g, ''); //sanitize remove all special characters\n\t\tif(text==='')\n\t\t\treturn [];\n\n\t\tI = this.options.initial ? '^' : ''; //search only initial text\n\t\ticase = !this.options.casesensitive ? 'i' : undefined;\n\n\t\tregSearch = new RegExp(I + text, icase);\n\n\t\t//TODO use .filter or .map\n\t\tfor(var key in records) {\n\t\t\tif( regSearch.test(key) )\n\t\t\t\tfrecords[key]= records[key];\n\t\t}\n\t\t\n\t\treturn frecords;\n\t},\n\n\tshowTooltip: function(records) {\n\t\t\n\n\t\tthis._countertips = 0;\n\t\tthis._tooltip.innerHTML = '';\n\t\tthis._tooltip.currentSelection = -1; //inizialized for _handleArrowSelect()\n\n\t\tif(this.options.tooltipLimit)\n\t\t{\n\t\t\tfor(var key in records)//fill tooltip\n\t\t\t{\n\t\t\t\tif(this._countertips === this.options.tooltipLimit)\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tthis._countertips++;\n\n\t\t\t\tthis._tooltip.appendChild( this._createTip(key, records[key]) );\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(this._countertips > 0)\n\t\t{\n\t\t\tthis._tooltip.style.display = 'block';\n\t\t\t\n\t\t\tif(this._autoTypeTmp)\n\t\t\t\tthis._autoType();\n\n\t\t\tthis._autoTypeTmp = this.options.autoType;//reset default value\n\t\t}\n\t\telse\n\t\t\tthis._hideTooltip();\n\n\t\tthis._tooltip.scrollTop = 0;\n\n\t\treturn this._countertips;\n\t},\n\n\t_hideTooltip: function() {\n\t\tthis._tooltip.style.display = 'none';\n\t\tthis._tooltip.innerHTML = '';\n\t\treturn 0;\n\t},\n\n\t_defaultFormatData: function(json) {\t//default callback for format data to indexed data\n\t\tvar self = this,\n\t\t\tpropName = this.options.propertyName,\n\t\t\tpropLoc = this.options.propertyLoc,\n\t\t\ti, jsonret = {};\n\n\t\tif( L.Util.isArray(propLoc) )\n\t\t\tfor(i in json)\n\t\t\t\tjsonret[ self._getPath(json[i],propName) ]= L.latLng( json[i][ propLoc[0] ], json[i][ propLoc[1] ] );\n\t\telse\n\t\t\tfor(i in json)\n\t\t\t\tjsonret[ self._getPath(json[i],propName) ]= L.latLng( self._getPath(json[i],propLoc) );\n\t\t//TODO throw new Error(\"propertyName '\"+propName+\"' not found in JSON data\");\n\t\treturn jsonret;\n\t},\n\n\t_recordsFromJsonp: function(text, callAfter) { //extract searched records from remote jsonp service\n\t\tL.Control.Search.callJsonp = callAfter;\n\t\tvar script = L.DomUtil.create('script','leaflet-search-jsonp', document.getElementsByTagName('body')[0] ),\t\t\t\n\t\t\turl = L.Util.template(this._getUrl(text)+'&'+this.options.jsonpParam+'=L.Control.Search.callJsonp', {s: text}); //parsing url\n\t\t\t//rnd = '&_='+Math.floor(Math.random()*10000);\n\t\t\t//TODO add rnd param or randomize callback name! in recordsFromJsonp\n\t\tscript.type = 'text/javascript';\n\t\tscript.src = url;\n\t\treturn { abort: function() { script.parentNode.removeChild(script); } };\n\t},\n\n\t_recordsFromAjax: function(text, callAfter) {\t//Ajax request\n\t\tif (window.XMLHttpRequest === undefined) {\n\t\t\twindow.XMLHttpRequest = function() {\n\t\t\t\ttry { return new ActiveXObject(\"Microsoft.XMLHTTP.6.0\"); }\n\t\t\t\tcatch (e1) {\n\t\t\t\t\ttry { return new ActiveXObject(\"Microsoft.XMLHTTP.3.0\"); }\n\t\t\t\t\tcatch (e2) { throw new Error(\"XMLHttpRequest is not supported\"); }\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\tvar IE8or9 = ( L.Browser.ie && !window.atob && document.querySelector ),\n\t\t\trequest = IE8or9 ? new XDomainRequest() : new XMLHttpRequest(),\n\t\t\turl = L.Util.template(this._getUrl(text), {s: text});\n\n\t\t//rnd = '&_='+Math.floor(Math.random()*10000);\n\t\t//TODO add rnd param or randomize callback name! in recordsFromAjax\t\t\t\n\t\t\n\t\trequest.open(\"GET\", url);\n\t\t\n\n\t\trequest.onload = function() {\n\t\t\tcallAfter( JSON.parse(request.responseText) );\n\t\t};\n\t\trequest.onreadystatechange = function() {\n\t\t if(request.readyState === 4 && request.status === 200) {\n\t\t \tthis.onload();\n\t\t }\n\t\t};\n\n\t\trequest.send();\n\t\treturn request; \n\t},\n\n _searchInLayer: function(layer, retRecords, propName) {\n var self = this, loc;\n\n if(layer instanceof L.Control.Search.Marker) return;\n\n if(layer instanceof L.Marker || layer instanceof L.CircleMarker)\n {\n if(self._getPath(layer.options,propName))\n {\n loc = layer.getLatLng();\n loc.layer = layer;\n retRecords[ self._getPath(layer.options,propName) ] = loc;\n }\n else if(self._getPath(layer.feature.properties,propName))\n {\n loc = layer.getLatLng();\n loc.layer = layer;\n retRecords[ self._getPath(layer.feature.properties,propName) ] = loc;\n }\n else {\n //throw new Error(\"propertyName '\"+propName+\"' not found in marker\"); \n \n }\n }\n if(layer instanceof L.Path || layer instanceof L.Polyline || layer instanceof L.Polygon)\n {\n if(self._getPath(layer.options,propName))\n {\n loc = layer.getBounds().getCenter();\n loc.layer = layer;\n retRecords[ self._getPath(layer.options,propName) ] = loc;\n }\n else if(self._getPath(layer.feature.properties,propName))\n {\n loc = layer.getBounds().getCenter();\n loc.layer = layer;\n retRecords[ self._getPath(layer.feature.properties,propName) ] = loc;\n }\n else {\n //throw new Error(\"propertyName '\"+propName+\"' not found in shape\"); \n \n }\n }\n else if(layer.hasOwnProperty('feature'))//GeoJSON\n {\n if(layer.feature.properties.hasOwnProperty(propName))\n {\n if(layer.getLatLng && typeof layer.getLatLng === 'function') {\n loc = layer.getLatLng();\n loc.layer = layer;\t\t\t\n retRecords[ layer.feature.properties[propName] ] = loc;\n } else if(layer.getBounds && typeof layer.getBounds === 'function') {\n loc = layer.getBounds().getCenter();\n loc.layer = layer;\t\t\t\n retRecords[ layer.feature.properties[propName] ] = loc;\n } else {\n \n }\n }\n else {\n //throw new Error(\"propertyName '\"+propName+\"' not found in feature\");\n \n }\n }\n else if(layer instanceof L.LayerGroup)\n {\n layer.eachLayer(function (layer) {\n self._searchInLayer(layer, retRecords, propName);\n });\n }\n },\n\t\n\t_recordsFromLayer: function() {\t//return table: key,value from layer\n\t\tvar self = this,\n\t\t\tretRecords = {},\n\t\t\tpropName = this.options.propertyName;\n\t\t\n\t\tthis._layer.eachLayer(function (layer) {\n\t\t\tself._searchInLayer(layer, retRecords, propName);\n\t\t});\n\t\t\n\t\treturn retRecords;\n\t},\n\t\n\t_autoType: function() {\n\t\t\n\t\t//TODO implements autype without selection(useful for mobile device)\n\t\t\n\t\tvar start = this._input.value.length,\n\t\t\tfirstRecord = this._tooltip.firstChild ? this._tooltip.firstChild._text : '',\n\t\t\tend = firstRecord.length;\n\n\t\tif (firstRecord.indexOf(this._input.value) === 0) { // If prefix match\n\t\t\tthis._input.value = firstRecord;\n\t\t\tthis._handleAutoresize();\n\n\t\t\tif (this._input.createTextRange) {\n\t\t\t\tvar selRange = this._input.createTextRange();\n\t\t\t\tselRange.collapse(true);\n\t\t\t\tselRange.moveStart('character', start);\n\t\t\t\tselRange.moveEnd('character', end);\n\t\t\t\tselRange.select();\n\t\t\t}\n\t\t\telse if(this._input.setSelectionRange) {\n\t\t\t\tthis._input.setSelectionRange(start, end);\n\t\t\t}\n\t\t\telse if(this._input.selectionStart) {\n\t\t\t\tthis._input.selectionStart = start;\n\t\t\t\tthis._input.selectionEnd = end;\n\t\t\t}\n\t\t}\n\t},\n\n\t_hideAutoType: function() {\t// deselect text:\n\n\t\tvar sel;\n\t\tif ((sel = this._input.selection) && sel.empty) {\n\t\t\tsel.empty();\n\t\t}\n\t\telse if (this._input.createTextRange) {\n\t\t\tsel = this._input.createTextRange();\n\t\t\tsel.collapse(true);\n\t\t\tvar end = this._input.value.length;\n\t\t\tsel.moveStart('character', end);\n\t\t\tsel.moveEnd('character', end);\n\t\t\tsel.select();\n\t\t}\n\t\telse {\n\t\t\tif (this._input.getSelection) {\n\t\t\t\tthis._input.getSelection().removeAllRanges();\n\t\t\t}\n\t\t\tthis._input.selectionStart = this._input.selectionEnd;\n\t\t}\n\t},\n\t\n\t_handleKeypress: function (e) {\t//run _input keyup event\n\t\tvar self = this;\n\n\t\tswitch(e.keyCode)\n\t\t{\n\t\t\tcase 27://Esc\n\t\t\t\tthis.collapse();\n\t\t\tbreak;\n\t\t\tcase 13://Enter\n\t\t\t\tif(this._countertips == 1 || (this.options.firstTipSubmit && this._countertips > 0))\n if(this._tooltip.currentSelection == -1)\n\t\t\t\t\t this._handleArrowSelect(1);\n\t\t\t\tthis._handleSubmit();\t//do search\n\t\t\tbreak;\n\t\t\tcase 38://Up\n\t\t\t\tthis._handleArrowSelect(-1);\n\t\t\tbreak;\n\t\t\tcase 40://Down\n\t\t\t\tthis._handleArrowSelect(1);\n\t\t\tbreak;\n\t\t\tcase 8://Backspace\n\t\t\tcase 45://Insert\n\t\t\tcase 46://Delete\n\t\t\t\tthis._autoTypeTmp = false;//disable temporarily autoType\n\t\t\tbreak;\n\t\t\tcase 37://Left\n\t\t\tcase 39://Right\n\t\t\tcase 16://Shift\n\t\t\tcase 17://Ctrl\n\t\t\tcase 35://End\n\t\t\tcase 36://Home\n\t\t\tbreak;\n\t\t\tdefault://All keys\n\n\t\t\t\tif(this._input.value.length)\n\t\t\t\t\tthis._cancel.style.display = 'block';\n\t\t\t\telse\n\t\t\t\t\tthis._cancel.style.display = 'none';\n\n\t\t\t\tif(this._input.value.length >= this.options.minLength)\n\t\t\t\t{\n\t\t\t\t\tclearTimeout(this.timerKeypress);\t//cancel last search request while type in\t\t\t\t\n\t\t\t\t\tthis.timerKeypress = setTimeout(function() {\t//delay before request, for limit jsonp/ajax request\n\n\t\t\t\t\t\tself._fillRecordsCache();\n\t\t\t\t\t\n\t\t\t\t\t}, this.options.delayType);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tthis._hideTooltip();\n\t\t}\n\n\t\tthis._handleAutoresize();\n\t},\n\n\tsearchText: function(text) {\n\t\tvar code = text.charCodeAt(text.length);\n\n\t\tthis._input.value = text;\n\n\t\tthis._input.style.display = 'block';\n\t\tL.DomUtil.addClass(this._container, 'search-exp');\n\n\t\tthis._autoTypeTmp = false;\n\n\t\tthis._handleKeypress({keyCode: code});\n\t},\n\t\n\t_fillRecordsCache: function() {\n\n\t\tvar self = this,\n\t\t\tinputText = this._input.value, records;\n\n\t\tif(this._curReq && this._curReq.abort)\n\t\t\tthis._curReq.abort();\n\t\t//abort previous requests\n\n\t\tL.DomUtil.addClass(this._container, 'search-load');\t\n\n\t\tif(this.options.layer)\n\t\t{\n\t\t\t//TODO _recordsFromLayer must return array of objects, formatted from _formatData\n\t\t\tthis._recordsCache = this._recordsFromLayer();\n\t\t\t\n\t\t\trecords = this._filterData( this._input.value, this._recordsCache );\n\n\t\t\tthis.showTooltip( records );\n\n\t\t\tL.DomUtil.removeClass(this._container, 'search-load');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(this.options.sourceData)\n\t\t\t\tthis._retrieveData = this.options.sourceData;\n\n\t\t\telse if(this.options.url)\t//jsonp or ajax\n\t\t\t\tthis._retrieveData = this.options.jsonpParam ? this._recordsFromJsonp : this._recordsFromAjax;\n\n\t\t\tthis._curReq = this._retrieveData.call(this, inputText, function(data) {\n\t\t\t\t\n\t\t\t\tself._recordsCache = self._formatData.call(self, data);\n\n\t\t\t\t//TODO refact!\n\t\t\t\tif(self.options.sourceData)\n\t\t\t\t\trecords = self._filterData( self._input.value, self._recordsCache );\n\t\t\t\telse\n\t\t\t\t\trecords = self._recordsCache;\n\n\t\t\t\tself.showTooltip( records );\n \n\t\t\t\tL.DomUtil.removeClass(self._container, 'search-load');\n\t\t\t});\n\t\t}\n\t},\n\t\n\t_handleAutoresize: function() {\t//autoresize this._input\n\t //TODO refact _handleAutoresize now is not accurate\n\t if (this._input.style.maxWidth != this._map._container.offsetWidth) //If maxWidth isn't the same as when first set, reset to current Map width\n\t this._input.style.maxWidth = L.DomUtil.getStyle(this._map._container, 'width');\n\n\t\tif(this.options.autoResize && (this._container.offsetWidth + 45 < this._map._container.offsetWidth))\n\t\t\tthis._input.size = this._input.value.length= (searchTips.length - 1))) {// If at end of list.\n\t\t\tL.DomUtil.addClass(searchTips[this._tooltip.currentSelection], 'search-tip-select');\n\t\t}\n\t\telse if ((velocity == -1 ) && (this._tooltip.currentSelection <= 0)) { // Going back up to the search box.\n\t\t\tthis._tooltip.currentSelection = -1;\n\t\t}\n\t\telse if (this._tooltip.style.display != 'none') {\n\t\t\tthis._tooltip.currentSelection += velocity;\n\t\t\t\n\t\t\tL.DomUtil.addClass(searchTips[this._tooltip.currentSelection], 'search-tip-select');\n\t\t\t\n\t\t\tthis._input.value = searchTips[this._tooltip.currentSelection]._text;\n\n\t\t\t// scroll:\n\t\t\tvar tipOffsetTop = searchTips[this._tooltip.currentSelection].offsetTop;\n\t\t\t\n\t\t\tif (tipOffsetTop + searchTips[this._tooltip.currentSelection].clientHeight >= this._tooltip.scrollTop + this._tooltip.clientHeight) {\n\t\t\t\tthis._tooltip.scrollTop = tipOffsetTop - this._tooltip.clientHeight + searchTips[this._tooltip.currentSelection].clientHeight;\n\t\t\t}\n\t\t\telse if (tipOffsetTop <= this._tooltip.scrollTop) {\n\t\t\t\tthis._tooltip.scrollTop = tipOffsetTop;\n\t\t\t}\n\t\t}\n\t},\n\n\t_handleSubmit: function() {\t//button and tooltip click and enter submit\n\n\t\tthis._hideAutoType();\n\t\t\n\t\tthis.hideAlert();\n\t\tthis._hideTooltip();\n\n\t\tif(this._input.style.display == 'none')\t//on first click show _input only\n\t\t\tthis.expand();\n\t\telse\n\t\t{\n\t\t\tif(this._input.value === '')\t//hide _input only\n\t\t\t\tthis.collapse();\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar loc = this._getLocation(this._input.value);\n\t\t\t\t\n\t\t\t\tif(loc===false)\n\t\t\t\t\tthis.showAlert();\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tthis.showLocation(loc, this._input.value);\n\t\t\t\t\tthis.fire('search:locationfound', {\n\t\t\t\t\t\t\tlatlng: loc,\n\t\t\t\t\t\t\ttext: this._input.value,\n\t\t\t\t\t\t\tlayer: loc.layer ? loc.layer : null\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t_getLocation: function(key) {\t//extract latlng from _recordsCache\n\n\t\tif( this._recordsCache.hasOwnProperty(key) )\n\t\t\treturn this._recordsCache[key];//then after use .loc attribute\n\t\telse\n\t\t\treturn false;\n\t},\n\n\t_defaultMoveToLocation: function(latlng, title, map) {\n\t\tif(this.options.zoom)\n \t\t\tthis._map.setView(latlng, this.options.zoom);\n \t\telse\n\t\t\tthis._map.panTo(latlng);\n\t},\n\n\tshowLocation: function(latlng, title) {\t//set location on map from _recordsCache\n\t\tvar self = this;\n\n\t\tself._map.once('moveend zoomend', function(e) {\n\n\t\t\tif(self._markerSearch) {\n\t\t\t\tself._markerSearch.addTo(self._map).setLatLng(latlng);\n\t\t\t}\n\t\t\t\n\t\t});\n\n\t\tself._moveToLocation(latlng, title, self._map);\n\t\t//FIXME autoCollapse option hide self._markerSearch before visualized!!\n\t\tif(self.options.autoCollapse)\n\t\t\tself.collapse();\n\n\t\treturn self;\n\t}\n});\n\nL.Control.Search.Marker = L.Marker.extend({\n\n\tincludes: L.version[0]==='1' ? L.Evented.prototype : L.Mixin.Events,\n\t\n\toptions: {\n\t\ticon: new L.Icon.Default(),\n\t\tanimate: true,\n\t\tcircle: {\n\t\t\tradius: 10,\n\t\t\tweight: 3,\n\t\t\tcolor: '#e03',\n\t\t\tstroke: true,\n\t\t\tfill: false\n\t\t}\n\t},\n\t\n\tinitialize: function (latlng, options) {\n\t\tL.setOptions(this, options);\n\n\t\tif(options.icon === true)\n\t\t\toptions.icon = new L.Icon.Default();\n\n\t\tL.Marker.prototype.initialize.call(this, latlng, options);\n\t\t\n\t\tif( L.Control.Search.prototype._isObject(this.options.circle) )\n\t\t\tthis._circleLoc = new L.CircleMarker(latlng, this.options.circle);\n\t},\n\n\tonAdd: function (map) {\n\t\tL.Marker.prototype.onAdd.call(this, map);\n\t\tif(this._circleLoc) {\n\t\t\tmap.addLayer(this._circleLoc);\n\t\t\tif(this.options.animate)\n\t\t\t\tthis.animate();\n\t\t}\n\t},\n\n\tonRemove: function (map) {\n\t\tL.Marker.prototype.onRemove.call(this, map);\n\t\tif(this._circleLoc)\n\t\t\tmap.removeLayer(this._circleLoc);\n\t},\n\t\n\tsetLatLng: function (latlng) {\n\t\tL.Marker.prototype.setLatLng.call(this, latlng);\n\t\tif(this._circleLoc)\n\t\t\tthis._circleLoc.setLatLng(latlng);\n\t\treturn this;\n\t},\n\t\n\t_initIcon: function () {\n\t\tif(this.options.icon)\n\t\t\tL.Marker.prototype._initIcon.call(this);\n\t},\n\n\t_removeIcon: function () {\n\t\tif(this.options.icon)\n\t\t\tL.Marker.prototype._removeIcon.call(this);\n\t},\n\n\tanimate: function() {\n\t//TODO refact animate() more smooth! like this: http://goo.gl/DDlRs\n\t\tif(this._circleLoc)\n\t\t{\n\t\t\tvar circle = this._circleLoc,\n\t\t\t\ttInt = 200,\t//time interval\n\t\t\t\tss = 5,\t//frames\n\t\t\t\tmr = parseInt(circle._radius/ss),\n\t\t\t\toldrad = this.options.circle.radius,\n\t\t\t\tnewrad = circle._radius * 2,\n\t\t\t\tacc = 0;\n\n\t\t\tcircle._timerAnimLoc = setInterval(function() {\n\t\t\t\tacc += 0.5;\n\t\t\t\tmr += acc;\t//adding acceleration\n\t\t\t\tnewrad -= mr;\n\t\t\t\t\n\t\t\t\tcircle.setRadius(newrad);\n\n\t\t\t\tif(newrad