{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/@terraformer/arcgis/dist/t-arcgis.esm.js","webpack:///./node_modules/esri-leaflet-geocoder/dist/esri-leaflet-geocoder-debug.js","webpack:///./node_modules/esri-leaflet/src/EsriLeaflet.js","webpack:///./node_modules/esri-leaflet/src/Layers/BasemapLayer.js","webpack:///./node_modules/esri-leaflet/src/Layers/DynamicMapLayer.js","webpack:///./node_modules/esri-leaflet/src/Layers/FeatureLayer/FeatureGrid.js","webpack:///./node_modules/esri-leaflet/src/Layers/FeatureLayer/FeatureLayer.js","webpack:///./node_modules/esri-leaflet/src/Layers/FeatureLayer/FeatureManager.js","webpack:///./node_modules/esri-leaflet/src/Layers/ImageMapLayer.js","webpack:///./node_modules/esri-leaflet/src/Layers/RasterLayer.js","webpack:///./node_modules/esri-leaflet/src/Layers/TiledMapLayer.js","webpack:///./node_modules/esri-leaflet/src/Options.js","webpack:///./node_modules/esri-leaflet/src/Request.js","webpack:///./node_modules/esri-leaflet/src/Services/FeatureLayerService.js","webpack:///./node_modules/esri-leaflet/src/Services/ImageService.js","webpack:///./node_modules/esri-leaflet/src/Services/MapService.js","webpack:///./node_modules/esri-leaflet/src/Services/Service.js","webpack:///./node_modules/esri-leaflet/src/Support.js","webpack:///./node_modules/esri-leaflet/src/Tasks/Find.js","webpack:///./node_modules/esri-leaflet/src/Tasks/Identify.js","webpack:///./node_modules/esri-leaflet/src/Tasks/IdentifyFeatures.js","webpack:///./node_modules/esri-leaflet/src/Tasks/IdentifyImage.js","webpack:///./node_modules/esri-leaflet/src/Tasks/Query.js","webpack:///./node_modules/esri-leaflet/src/Tasks/Task.js","webpack:///./node_modules/esri-leaflet/src/Util.js","webpack:///./node_modules/leaflet/dist/leaflet-src.js","webpack:///./node_modules/leaflet/dist/leaflet.js","webpack:///./node_modules/tiny-binary-search/index.js","webpack:///./webpack/plugins/custom/leaflet/leaflet.js","webpack:///./webpack/plugins/custom/leaflet/leaflet.scss"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qDAAqD,SAAS;AAC9D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,cAAc;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAS,iBAAiB;AAC1B;AACA;AACA;AACA;;AAEA;AACA,EAAE;AACF;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;AACF;;;AAGA;AACA;AACA;AACA,QAAQ;;AAER,gBAAgB;;AAEhB,WAAW;AACX;;AAEA,iBAAiB,kBAAkB;AACnC;;AAEA;AACA;AACA,KAAK;;;AAGL;AACA,6CAA6C;;AAE7C,+BAA+B;AAC/B,KAAK;AACL,yCAAyC;AACzC;AACA;;AAEA,4BAA4B;;AAE5B;AACA;AACA,uBAAuB;;AAEvB;;AAEA,mCAAmC,QAAQ;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;;AAGA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA,kCAAkC;;AAElC;;AAEA,mCAAmC,QAAQ;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,iBAAiB;AAClC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,mBAAmB,4BAA4B;AAC/C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO,cAAc;AACrB;AACA;AACA,GAAG;;;AAGH,4DAA4D;AAC5D;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,mBAAmB,oBAAoB;AACvC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;AACF;;;AAGA;AACA;;AAEA,iBAAiB,kBAAkB;AACnC;;AAEA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,iBAAiB,6BAA6B;AAC9C;AACA;;AAEA;;AAEA;AACA;;AAEA,iBAAiB,+BAA+B;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAE4C;;;;;;;;;;;;ACja5C;AACA;AACA;AACA;AACA,EAAE,KAA4D,oBAAoB,mBAAO,CAAC,2DAAS,GAAG,mBAAO,CAAC,oEAAc;AAC5H,EAAE,SAC2J;AAC7J,CAAC,kDAAkD;;AAEnD;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,OAAO;AACP,KAAK;;AAEL;AACA;;AAEA,qBAAqB,gCAAgC;AACrD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;;AAEA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;;AAEA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,OAAO;AACP,uBAAuB,4BAA4B;AACnD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,2BAA2B,wBAAwB;AACnD;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT,OAAO;;AAEP;;AAEA,qBAAqB,4BAA4B;AACjD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,sCAAsC,QAAQ;AAC9C;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,qBAAqB,yBAAyB;AAC9C;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA,qBAAqB,sBAAsB;AAC3C;AACA;AACA;AACA;;AAEA;AACA;;AAEA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,2CAA2C;AAChE;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,wBAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT,yBAAyB,4BAA4B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,sCAAsC,QAAQ;AAC9C;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,qBAAqB,yBAAyB;AAC9C;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA,qBAAqB,mCAAmC;AACxD;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA,qBAAqB,4BAA4B;AACjD;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,qBAAqB,mCAAmC;AACxD;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;;AAEP;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oDAAoD;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,OAAO;;AAEP;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,8BAA8B;AACrD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;;AAEA,wDAAwD,QAAQ;AAChE;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAyB,WAAW;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAyB,8BAA8B;AACvD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;;AAEL;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA,uBAAuB,4BAA4B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;;AAEL;AACA;AACA;AACA;AACA,qBAAqB,gCAAgC;AACrD;AACA,0BAA0B;AAC1B;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gDAAgD,cAAc;;AAE9D,CAAC;AACD;;;;;;;;;;;;;;;;;;;;;;;;AClwCA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACmD;;AAEnD;AACoC;AACA;AACM;AACK;;AAE/C;AAC0C;AACG;AACH;AACY;AACwB;AACT;;AAErE;AACsD;AACS;AACM;AACqB;;AAE1F;AACmE;AACG;AACnB;AACmB;AACM;AACN;AACU;;;;;;;;;;;;;AC9BhF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA0C;AACC;AACN;AAKpB;;AAEjB;;AAEO,mBAAmB,iDAAS;AACnC;AACA;AACA;AACA,wCAAwC,EAAE,wEAAwE,EAAE,EAAE,EAAE,EAAE,EAAE;AAC5H;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,wCAAwC,EAAE,sEAAsE,EAAE,EAAE,EAAE,EAAE,EAAE;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,wCAAwC,EAAE,8EAA8E,EAAE,EAAE,EAAE,EAAE,EAAE;AAClI;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,wCAAwC,EAAE,mFAAmF,EAAE,EAAE,EAAE,EAAE,EAAE;AACvI;AACA;AACA;AACA;AACA,iBAAiB,sDAAa;AAC9B;AACA;AACA,OAAO;AACP;AACA,wCAAwC,EAAE,wEAAwE,EAAE,EAAE,EAAE,EAAE,EAAE;AAC5H;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,wCAAwC,EAAE,mFAAmF,EAAE,EAAE,EAAE,EAAE,EAAE;AACvI;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA,OAAO;AACP;AACA,wCAAwC,EAAE,wFAAwF,EAAE,EAAE,EAAE,EAAE,EAAE;AAC5I;AACA;AACA;AACA;AACA,iBAAiB,sDAAa;AAC9B;;AAEA;AACA,OAAO;AACP;AACA,wCAAwC,EAAE,oFAAoF,EAAE,EAAE,EAAE,EAAE,EAAE;AACxI;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA,OAAO;AACP;AACA,wCAAwC,EAAE,yFAAyF,EAAE,EAAE,EAAE,EAAE,EAAE;AAC7I;AACA;AACA;AACA;AACA,iBAAiB,sDAAa;AAC9B;AACA;AACA,OAAO;AACP;AACA,wCAAwC,EAAE,qEAAqE,EAAE,EAAE,EAAE,EAAE,EAAE;AACzH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,wCAAwC,EAAE,6FAA6F,EAAE,EAAE,EAAE,EAAE,EAAE;AACjJ;AACA;AACA;AACA;AACA,iBAAiB,sDAAa;AAC9B;AACA;AACA,OAAO;AACP;AACA,wCAAwC,EAAE,sFAAsF,EAAE,EAAE,EAAE,EAAE,EAAE;AAC1I;AACA;AACA;AACA;AACA,iBAAiB,sDAAa;AAC9B;AACA;AACA,OAAO;AACP;AACA,wCAAwC,EAAE,2EAA2E,EAAE,EAAE,EAAE,EAAE,EAAE;AAC/H;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,wCAAwC,EAAE,uGAAuG,EAAE,EAAE,EAAE,EAAE,EAAE;AAC3J;AACA;AACA;AACA;AACA,iBAAiB,sDAAa;AAC9B;AACA;AACA,OAAO;AACP;AACA,wCAAwC,EAAE,0EAA0E,EAAE,EAAE,EAAE,EAAE,EAAE;AAC9H;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,wCAAwC,EAAE,yFAAyF,EAAE,EAAE,EAAE,EAAE,EAAE;AAC7I;AACA;AACA;AACA;AACA,iBAAiB,sDAAa;AAC9B;AACA;AACA,OAAO;AACP;AACA,wCAAwC,EAAE,qEAAqE,EAAE,EAAE,EAAE,EAAE,EAAE;AACzH;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,sHAAsH,EAAE,EAAE,EAAE,EAAE,EAAE;AAChI;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,wCAAwC,EAAE,0EAA0E,EAAE,EAAE,EAAE,EAAE,EAAE;AAC9H;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,0HAA0H,EAAE,EAAE,EAAE,EAAE,EAAE;AACpI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;AACA,sBAAsB,4CAAI;;AAE1B,IAAI,4CAAI;;AAER;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI,iDAAS;AACb,GAAG;;AAEH;AACA;AACA,IAAI,gEAAkB;;AAEtB;AACA;AACA;AACA;AACA;AACA,MAAM,iEAAmB;AACzB;;AAEA,sBAAsB,2DAAqB;;AAE3C;AACA;AACA;AACA;;AAEA,IAAI,iDAAS;AACb,GAAG;;AAEH;AACA,uBAAuB,2DAAqB;AAC5C,IAAI,iDAAS;AACb,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,aAAa,QAAQ;;AAErB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kBAAkB,4CAAI,qBAAqB,4CAAI;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA,IAAI,wDAAO,eAAe;AAC1B;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEO;AACP;AACA;;AAEe,2EAAY,EAAC;;;;;;;;;;;;;ACzU5B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA+B;AACa;AACL;AACS;;AAEzC,sBAAsB,wDAAW;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,cAAc,0DAAY;AAC1B,mBAAmB,oEAAU;AAC7B;;AAEA;AACA;AACA;;AAEA,IAAI,4CAAI;AACR,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA,mBAAmB,4CAAI;AACvB,kBAAkB,QAAQ,EAAE;AAC5B,iBAAiB,4CAAI;AACrB;AACA,OAAO;AACP,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA,oBAAoB,QAAQ,EAAE;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,sDAAsD,4CAAI;AAC1D;AACA;AACA,CAAC;;AAEM;AACP;AACA;;AAEe,8EAAe,EAAC;;;;;;;;;;;;;AC5M/B;AAAA;AAAA;AAAA;AAQiB;;AAEV,kBAAkB,6CAAK;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,+CAAO;;AAE3B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA,IAAI,4CAAI;AACR,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,4CAAI;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,wBAAwB,6CAAK,WAAW,6CAAK;AAC7C,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,sBAAsB,6CAAK;AAC3B;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA,uBAAuB,eAAe;AACtC,yBAAyB,eAAe;AACxC,yBAAyB,6CAAK;AAC9B;;AAEA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,8CAAM;AACrB;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2BAA2B,8CAAM;AACjC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mCAAmC,6CAAK;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iCAAiC,sBAAsB;AACvD,mCAAmC,sBAAsB;AACzD,yBAAyB,6CAAK;AAC9B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,kBAAkB;AACnC;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,WAAW,8DAAY;AACvB,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA,qBAAqB,oDAAY;;AAEjC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,qBAAqB,6CAAK;;AAE1B;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA,IAAI,4CAAI;AACR,GAAG;;AAEH;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA,wBAAwB,6CAAK;AAC7B,oBAAoB,4CAAI;AACxB,oBAAoB,4CAAI;AACxB;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,eAAe,8CAAM;AACrB;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;AChjBD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAsD;AACJ;AAChB;;AAE3B,mBAAmB,8DAAc;;AAExC;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,IAAI,8DAAc;AAClB;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA,WAAW,8DAAc;AACzB,GAAG;;AAEH;AACA,gBAAgB,+CAAO;AACvB;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,wDAAwD,+CAAO;;AAE/D;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,+CAAO;AACzB;AACA;AACA;AACA,kBAAkB,+CAAO;AACzB;AACA;AACA;AACA,kBAAkB,+CAAO;AACzB;AACA;AACA;AACA,kBAAkB,+CAAO;AACzB;AACA;AACA;AACA,kBAAkB,+CAAO;AACzB;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA,qCAAqC,QAAQ;AAC7C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,UAAU,kDAAI;AACd,SAAS;AACT;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,MAAM,4CAAI,kBAAkB,4CAAI;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA,MAAM,4CAAI,kBAAkB,4CAAI;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,mBAAmB;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;;AAEH;AACA;AACA,uCAAuC,4CAAI;AAC3C;AACA,MAAM,4CAAI;AACV;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,yDAAyD,sDAAM;AAC/D;AACA;AACA;AACA;;AAEA;AACA;AACA,wDAAwD,sDAAM;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAEM;AACP;AACA;;AAEe,2EAAY,EAAC;;;;;;;;;;;;;ACnV5B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA+B;AACsC;AACD;AACxB;AACO;;AAE5C,qBAAqB,wDAAW;AACvC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA,IAAI,wDAAW;;AAEf,cAAc,0DAAY;AAC1B,cAAc,4CAAI;;AAElB,mBAAmB,6EAAmB;AACtC;;AAEA;AACA;AACA;AACA,qBAAqB,gCAAgC;AACrD;AACA;AACA;AACA;AACA;AACA,QAAQ,kDAAI;AACZ;AACA;AACA;AACA;;AAEA;AACA,iCAAiC,0DAAiB;AAClD,+BAA+B,0DAAiB;AAChD,KAAK;AACL,4BAA4B,0DAAiB;AAC7C;;AAEA;AACA,+BAA+B;AAC/B;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA,IAAI,gEAAkB;;AAEtB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA,WAAW,wDAAW;AACtB,GAAG;;AAEH;AACA;;AAEA,WAAW,wDAAW;AACtB,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ,4CAAI;AACZ,UAAU,4CAAI;AACd;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA,qCAAqC,QAAQ;AAC7C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,MAAM,4CAAI;AACV;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B,4CAAI;AAC9B;AACA;AACA;;AAEA;AACA,2DAA2D,QAAQ;AACnE;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,QAAQ,4CAAI;AACZ,UAAU,4CAAI;AACd;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,KAAK;;AAEL,kDAAkD,QAAQ;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,0BAA0B,4CAAI;AAC9B;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,wBAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI,4CAAI;AACR,MAAM,4CAAI;AACV;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL,MAAM,kDAAI;AACV;AACA;AACA;AACA;;AAEA,mCAAmC,QAAQ;AAC3C;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,QAAQ,4CAAI;AACZ;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA,MAAM,4CAAI;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,4CAAI;AACd;AACA,oDAAoD,QAAQ;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;ACtnBD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA+B;AACa;AACL;AACa;;AAE7C,oBAAoB,wDAAW;;AAEtC;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA,cAAc,0DAAY;AAC1B,mBAAmB,sEAAY;AAC/B;;AAEA,IAAI,4CAAI;AACR,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA,QAAQ,4CAAI;AACZ;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA,QAAQ,4CAAI;AACZ;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA,mBAAmB,4CAAI;AACvB,kBAAkB,QAAQ,EAAE;AAC5B,iBAAiB,4CAAI;AACrB;AACA,OAAO;AACP,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA,oBAAoB,QAAQ,EAAE;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA,2DAA2D,4CAAI;AAC/D;AACA;AACA,CAAC;;AAEM;AACP;AACA;;AAEe,4EAAa,EAAC;;;;;;;;;;;;;ACzM7B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAyF;AACvD;AACW;;AAE7C,cAAc,oDAAY;AAC1B;AACA;AACA,IAAI,oDAAY;AAChB,GAAG;AACH;AACA,kCAAkC,2CAAG;AACrC,MAAM,oDAAY;AAClB,KAAK;AACL,MAAM,+CAAO;AACb;AACA;AACA,CAAC;;AAEM,kBAAkB,6CAAK;AAC9B;AACA;AACA;AACA;AACA,aAAa,6CAAI;AACjB;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,IAAI,gEAAkB;;AAEtB;AACA;AACA;;AAEA,mBAAmB,4CAAI;;AAEvB;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA,kBAAkB,qDAAK;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD,gDAAgD,SAAS;AACzD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,wCAAwC;AACxC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI,4CAAI;;AAER;AACA;;AAEA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,GAAG;;AAEH;AACA,aAAa,sDAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,0BAA0B,sDAAM;;AAEhC;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;;;;;;;;;;;;ACpWD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAyD;AACQ;AACjB;;AAEzC,oBAAoB,iDAAS;AACpC;AACA;AACA,kCAAkC;AAClC,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,cAAc,4CAAI;;AAElB;AACA,cAAc,0DAAY;AAC1B,qFAAqF,EAAE,EAAE,EAAE,EAAE,EAAE,8EAA8E,4CAAI;AACjL;AACA;AACA,8BAA8B,EAAE;AAChC,0CAA0C,EAAE;AAC5C;AACA,mBAAmB,oEAAU;AAC7B;;AAEA;AACA;AACA,gEAAgE,EAAE;AAClE;AACA;;AAEA;AACA;AACA;;AAEA;AACA,IAAI,iDAAS;AACb,GAAG;;AAEH;AACA;;AAEA,WAAW,4CAAI,wBAAwB,4CAAI;AAC3C;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;;AAEA,IAAI,gDAAQ,kBAAkB,4CAAI;AAClC,IAAI,gDAAQ,mBAAmB,4CAAI;;AAEnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,OAAO;AACP;;AAEA;AACA,GAAG;;AAEH;AACA;AACA,IAAI,gEAAkB;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAkC,2CAAG;AACrC;AACA;AACA;AACA;;AAEA,2BAA2B,uBAAuB;AAClD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW;AACX;AACA,WAAW;AACX;AACA,YAAY,kDAAI;AAChB;AACA;AACA,OAAO;AACP;;AAEA,IAAI,iDAAS;AACb,GAAG;;AAEH;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,CAAC;;AAEM;AACP;AACA;;AAEe,4EAAa,EAAC;;;;;;;;;;;;;AC9L7B;AAAA;AAAO;AACP;AACA;;AAEe,sEAAO,EAAC;;;;;;;;;;;;;ACJvB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAwC;AACJ;;AAEpC;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,qCAAqC,4CAAI;;AAEzC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,4CAAI;;AAEhC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kFAAkF;AAClF;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACO;AACP;AACA;AACA;;AAEA;AACA,+BAA+B,gDAAO;AACtC;AACA,GAAG,kCAAkC,gDAAO;AAC5C;AACA,oFAAoF;AACpF;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B,gDAAO;AACtC;;AAEA;AACA,GAAG,kCAAkC,gDAAO;AAC5C;;AAEA;AACA,GAAG,oCAAoC,gDAAO;AAC9C;;AAEA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,eAAe,+CAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE,+CAAO;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA,YAAY,gDAAO;AACnB;AACA;;AAEO;AACP;AACA;AACA;AACA;;AAEA;AACe;;AAEf;AAC+B;;AAE/B;AACO;AACP;AACA;AACA;AACA;;AAEe,sEAAO,EAAC;;;;;;;;;;;;;ACjPvB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAoC;AACD;AACO;;AAEnC,0BAA0B,gDAAO;;AAExC;AACA;AACA,GAAG;;AAEH;AACA,WAAW,4DAAK;AAChB,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA,0CAA0C,QAAQ;AAClD;AACA;AACA,eAAe,6DAAe;AAC9B;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA,eAAe,6DAAe;AAC9B;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;;AAEM;AACP;AACA;;AAEe,kFAAmB,EAAC;;;;;;;;;;;;;AChFnC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAoC;AACe;AAChB;;AAE5B,mBAAmB,gDAAO;;AAEjC;AACA,WAAW,4DAAK;AAChB,GAAG;;AAEH;AACA,WAAW,oEAAa;AACxB;AACA,CAAC;;AAEM;AACP;AACA;;AAEe,2EAAY,EAAC;;;;;;;;;;;;;ACnB5B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAoC;AACqB;AACtB;AACF;;AAE1B,iBAAiB,gDAAO;;AAE/B;AACA,WAAW,uEAAgB;AAC3B,GAAG;;AAEH;AACA,WAAW,2DAAI;AACf,GAAG;;AAEH;AACA,WAAW,4DAAK;AAChB;;AAEA,CAAC;;AAEM;AACP;AACA;;AAEe,yEAAU,EAAC;;;;;;;;;;;;;ACzB1B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAwC;AACR;AACe;AACd;;AAE1B,cAAc,+CAAO;;AAE5B;AACA;AACA,aAAa,6CAAI;AACjB;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,IAAI,4CAAI;AACR,uBAAuB,sDAAQ;AAC/B,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA,sCAAsC;AACtC,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,MAAM,4CAAI;AACV;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,eAAe,gDAAO;AACtB,OAAO;AACP,eAAe,gDAAO;AACtB;AACA;AACA,GAAG;;AAEH;AACA,WAAW,4CAAI;AACf;AACA;;AAEA;;AAEA;AACA;AACA,wBAAwB,4CAAI;AAC5B,SAAS;;AAET;AACA,6BAA6B,4CAAI;AACjC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;;AAEH;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAEM;AACP,YAAY,0DAAY;AACxB;AACA;;AAEe,sEAAO,EAAC;;;;;;;;;;;;;AC3IvB;AAAA;AAAA;AAAA;AAAO;AACA;;AAEA;AACP;AACA;AACA;;AAEe,sEAAO,EAAC;;;;;;;;;;;;;ACRvB;AAAA;AAAA;AAAA;AAAA;AAA8B;AACwB;;AAE/C,WAAW,0CAAI;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,gFAAgF;AAChF;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,iDAAiD,yEAA2B;AAC5E,KAAK;AACL;AACA,CAAC;;AAEM;AACP;AACA;;AAEe,mEAAI,EAAC;;;;;;;;;;;;;ACzDpB;AAAA;AAAA;AAAA;AAA8B;;AAEvB,eAAe,0CAAI;AAC1B;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAEM;AACP;AACA;;AAEe,uEAAQ,EAAC;;;;;;;;;;;;;ACfxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAiC;AACK;AAIrB;;AAEV,uBAAuB,kDAAQ;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,iBAAiB,4DAAc;AAC/B;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,iBAAiB,sDAAM;AACvB;AACA;AACA;AACA,GAAG;;AAEH;AACA,gFAAgF;AAChF;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO;AACP,gCAAgC,yEAA2B;AAC3D;AACA,uBAAuB,uCAAuC;AAC9D;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA,oBAAoB,0DAAY;AAChC;AACA;AACA;AACA,CAAC;;AAEM;AACP;AACA;;AAEe,+EAAgB,EAAC;;;;;;;;;;;;;ACpFhC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAiC;AACK;AACgB;;AAE/C,oBAAoB,kDAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA,aAAa,sDAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,6BAA6B,yEAA2B;AACxD;AACA,wDAAwD,QAAQ;AAChE;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAEM;AACP;AACA;;AAEe,4EAAa,EAAC;;;;;;;;;;;;;AClG7B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAwC;AACV;AAOb;;AAEV,YAAY,0CAAI;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,sDAAsD;AACtD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,oDAAoD;AACpD;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,6DAA6D;AAC7D;AACA,GAAG;;AAEH;AACA;AACA,aAAa,sDAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA,iCAAiC,4DAAc;AAC/C;;AAEA;AACA;AACA;AACA,OAAO;;AAEP;AACA,KAAK;AACL;AACA;AACA,mDAAmD,yEAA2B;AAC9E,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,yCAAyC,4DAAc;AACvD,sCAAsC,4DAAc;AACpD,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,oBAAoB,qDAAK;AACzB;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,QAAQ,kDAAI;AACZ;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,oBAAoB,0DAAY;AAChC;AACA;AACA;;AAEA,CAAC;;AAEM;AACP;AACA;;AAEe,oEAAK,EAAC;;;;;;;;;;;;;AChOrB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAsC;AACN;AACiB;AAChB;;AAE1B,WAAW,6CAAK;;AAEvB;AACA;AACA,aAAa,6CAAI;AACjB,GAAG;;AAEH;AACA;AACA,WAAW,4CAAI;AACf;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;AACA,MAAM,4CAAI;AACV,KAAK;AACL,MAAM,4CAAI;AACV,yBAAyB,sDAAQ;AACjC;;AAEA;AACA,kBAAkB,4CAAI,UAAU,mBAAmB;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,MAAM,4CAAI;AACV;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA,aAAa,gDAAO;AACpB;;AAEA,WAAW,gDAAO;AAClB;AACA,CAAC;;AAEM;AACP,YAAY,0DAAY;AACxB;AACA;;AAEe,mEAAI,EAAC;;;;;;;;;;;;;ACrFpB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA6F;AACnD;AACN;AACA;;AAKP;;AAEtB;AACP,SAAS,2EAAG;AACZ;;AAEO;AACP,SAAS,2EAAG;AACZ;;AAEA;AACO;AACP;AACA;AACA,aAAa,sDAAM;AACnB,aAAa,sDAAM;AACnB,WAAW,4DAAY;AACvB,GAAG;AACH;AACA;AACA;;AAEA;AACO;AACP,WAAW,4DAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACO;AACP;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,mBAAmB,iCAAiC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iCAAiC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACO;AACP;AACA,QAAQ,4CAAI;;AAEZ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,yCAAyC,gGAAgG;AACzI;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEO;AACP;AACA,4BAA4B,gDAAO;AACnC;;AAEO;AACP;AACA;;AAEA;AACA;AACA,0EAA0E;AAC1E,2BAA2B;AAC3B,MAAM;;AAEN;AACA,IAAI,+CAAO;;AAEX;AACA;AACA;AACA,+DAA+D;AAC/D,4BAA4B;AAC5B,2BAA2B;AAC3B,wBAAwB;AACxB,+BAA+B;AAC/B,6BAA6B;AAC7B,kCAAkC;AAClC,4BAA4B;AAC5B,oDAAoD;AACpD,MAAM;;AAEN;AACA,IAAI,+CAAO;;AAEX;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,oDAAY;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,8CAAM;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,+CAAO;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE,qDAAI;;AAEN;AACA;;AAEO;AACP,MAAM,gDAAO;AACb,IAAI,wDAAO,QAAQ,EAAE,4CAAI;AACzB,kBAAkB,QAAQ;AAC1B;AACA,qBAAqB,sCAAsC;AAC3D;;AAEA,uBAAuB,sCAAsC;AAC7D;AACA,0BAA0B,sDAAM;AAChC,0BAA0B,sDAAM;AAChC;AACA;AACA;AACA,oBAAoB,4DAAY;AAChC;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA,OAAO;;AAEP;AACA,iBAAiB;AACjB;AACA,KAAK;AACL;AACA;;AAEO;AACP;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,wBAAwB,4DAAY;AACpC;AACA;AACA;AACA;;AAEA,mBAAmB,4BAA4B;AAC/C;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACgB;;AAET;AACP,QAAQ,6CAAI;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEe,uEAAQ,EAAC;;;;;;;;;;;;AC1WxB;AACA;AACA;AACA;;AAEA;AACA,CAAC,KAA4D;AAC7D,CAAC,SAC0B;AAC3B,CAAC,4BAA4B;;AAE7B;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gCAAgC,YAAY;;AAE5C;AACA;AACA;AACA;;AAEA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,cAAc;;AAElC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0DAA0D,mBAAmB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB,eAAe;;AAEnC;AACA,8EAA8E,EAAE,GAAG,EAAE;AACrF,4BAA4B,mBAAmB;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC,wBAAwB,UAAU;AAClC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,+DAA+D,yBAAyB;;AAExF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA,8BAA8B,QAAQ;;AAEtC;AACA;AACA;;AAEA;;AAEA,gDAAgD,SAAS;AACzD;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC;AACnC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,kDAAkD,QAAQ;;AAE1D;;AAEA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,uCAAuC;AACrF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAG;AACH;AACA;;AAEA,sCAAsC,SAAS;AAC/C;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;;AAEA,GAAG;AACH;;AAEA,sCAAsC,SAAS;AAC/C;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB,qBAAqB;AAC1C;;AAEA;AACA,yCAAyC,SAAS;AAClD;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA,sBAAsB,QAAQ;;AAE9B;;AAEA;AACA;AACA;;AAEA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,sCAAsC,SAAS;AAC/C;AACA,4BAA4B,UAAU;AACtC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,uCAAuC,aAAa;;AAEpD,uBAAuB;AACvB;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,2CAA2C,SAAS;AACpD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,sCAAsC,aAAa;;AAEnD;AACA;AACA;AACA,0DAA0D,aAAa;AACvE;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA,WAAW;;AAEX;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB;AACxB;AACA,wBAAwB;AACxB;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,wCAAwC,qBAAqB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,QAAQ;;AAElB;;AAEA,qCAAqC,SAAS;AAC9C;AACA;AACA;;AAEA;AACA;AACA;AACA,2BAA2B;AAC3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,2BAA2B;AAC3B;AACA,EAAE;;AAEF;AACA;AACA;AACA,kBAAkB;AAClB,EAAE;;AAEF;AACA;AACA;AACA,kBAAkB;AAClB,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,gCAAgC;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA,8BAA8B;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC;AACzC,gBAAgB,QAAQ;;AAExB;;AAEA,sCAAsC,SAAS;AAC/C;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,GAAG;AACH;AACA;;AAEA,sBAAsB,aAAa;;AAEnC,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,gBAAgB,cAAc;;AAE9B;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iBAAiB;AAC/B,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,cAAc;;AAE3B;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;;;AAIA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,yCAAyC,yBAAyB,OAAO,sCAAsC;;AAE/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,sBAAsB,aAAa;;AAEnC;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wBAAwB;AACxB;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF,CAAC;;AAED,0BAA0B;AAC1B;AACA,CAAC;;AAED,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,gCAAgC,SAAS;AACzC;;AAEA,mCAAmC,UAAU;AAC7C;AACA;AACA;;AAEA,kCAAkC;AAClC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,yBAAyB;AACzB;;AAEA,4BAA4B;AAC5B;;AAEA,2BAA2B;AAC3B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,gCAAgC;AAChC;;AAEA;AACA,gFAAgF;AAChF,mCAAmC;AACnC;;AAEA,4BAA4B;AAC5B;;AAEA,6BAA6B;AAC7B;;AAEA,4BAA4B;AAC5B;;AAEA,6BAA6B;AAC7B;;AAEA;;AAEA;AACA;AACA;;AAEA,0BAA0B;AAC1B;;AAEA,2BAA2B;AAC3B;;AAEA,+BAA+B;AAC/B;;AAEA,8BAA8B;AAC9B;;AAEA;AACA;AACA;;AAEA,6BAA6B;AAC7B;;AAEA,mCAAmC;AACnC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC;AAClC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,EAAE;AACF;AACA;AACA,CAAC;;;AAGD;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,EAAE;AACF;;AAEA,EAAE;AACF;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,EAAE;AACF;;AAEA,EAAE;AACF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,mGAAmG,QAAQ;;AAE3G;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,8CAA8C,QAAQ;AACtD;AACA,GAAG;AACH;AACA;;AAEA,kBAAkB,QAAQ;;AAE1B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kEAAkE,eAAe;AACjF,8DAA8D,eAAe;;AAE7E;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mEAAmE,eAAe;AAClF,+DAA+D,eAAe;AAC9E;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uCAAuC,SAAS;AAChD;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,oBAAoB,QAAQ;AAC5B;;AAEA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAwB,QAAQ;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4CAA4C;;AAE5C;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6CAA6C,uCAAuC;AACpF;;AAEA;AACA;AACA;AACA;AACA,EAAE;AACF;;AAEA,qCAAqC,SAAS;AAC9C;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,gDAAgD,uCAAuC;AACvF;;AAEA;AACA;AACA;AACA;AACA,EAAE;AACF;;AAEA,qCAAqC,SAAS;AAC9C;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,4CAA4C,aAAa;;AAEzD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,EAAE;AACF;AACA;AACA;AACA;;AAEA,EAAE;;AAEF;AACA,6FAA6F,eAAe;;AAE5G,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAE;AACF;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,gBAAgB,aAAa;;AAE7B;AACA;;AAEA,EAAE;AACF;AACA;;AAEA,EAAE;;AAEF;AACA,gGAAgG,eAAe;;AAE/G,GAAG;AACH;AACA;AACA;AACA;;AAEA,EAAE;AACF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,EAAE,4BAA4B;AAC9B;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uCAAuC;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,gBAAgB,aAAa;;AAE7B;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA,0BAA0B,QAAQ;;AAElC;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF,qCAAqC;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,yDAAyD,YAAY;AACrE;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;;AAGF;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,2BAA2B,yBAAyB;AACpD,0BAA0B,qDAAqD;AAC/E;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,cAAc;AAC7D,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,wCAAwC,cAAc;AACtD,EAAE;;AAEF;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,oCAAoC;AACpC,2CAA2C,aAAa;AACxD,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,oBAAoB,yCAAyC;AAC7D,oBAAoB,yCAAyC;AAC7D,oBAAoB,0BAA0B;;AAE9C;;AAEA,iBAAiB,6CAA6C;AAC9D,iBAAiB,+DAA+D;;AAEhF,uBAAuB,iCAAiC;;AAExD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM,YAAY;;AAElB,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;;AAEnC;AACA;AACA;AACA,GAAG,sBAAsB,cAAc;;AAEvC;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,+BAA+B,aAAa;;AAE5C;AACA;;AAEA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,EAAE;;AAEF;AACA,iEAAiE,YAAY;AAC7E;AACA,MAAM,cAAc;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,sBAAsB,aAAa;;AAEnC;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,yDAAyD;AACzD;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;;AAGF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,+CAA+C;AAC/C;AACA,EAAE;;AAEF;AACA;AACA;AACA,+CAA+C;AAC/C;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,mCAAmC;AACnC;AACA,EAAE;;;AAGF;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;;AAGF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,uBAAuB,sBAAsB,sBAAsB,EAAE,EAAE;AACvE,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA,kBAAkB,OAAO;AACzB;AACA,iCAAiC,OAAO;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA,oCAAoC,QAAQ;;AAE5C;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;;AAEA,mBAAmB,QAAQ;;AAE3B;AACA;;AAEA,wBAAwB,QAAQ;;AAEhC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,oBAAoB;AACrC;AACA;AACA,oGAAoG,QAAQ;AAC5G;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA,8CAA8C,SAAS;AACvD;AACA;AACA,EAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,aAAa;AAChD,GAAG;AACH;AACA;AACA;AACA,EAAE;;;AAGF;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA,gBAAgB,eAAe;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA,gBAAgB,eAAe;;AAE/B;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA,kFAAkF,cAAc;;AAEhG;;AAEA;AACA,EAAE;;AAEF;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;;AAEA,4BAA4B,aAAa;;AAEzC;;AAEA;AACA;AACA,8EAA8E,cAAc;;AAE5F;AACA;AACA;;AAEA;AACA,qEAAqE,cAAc;;AAEnF;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,EAAE;;AAEF;AACA,uBAAuB,QAAQ;;AAE/B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,EAAE;;AAEF;AACA,6BAA6B,QAAQ;;AAErC;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA,yCAAyC;AACzC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,yBAAyB;AAC1C;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA,iBAAiB,yBAAyB;AAC1C;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA,iBAAiB,yBAAyB;;AAE1C;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA,yBAAyB,aAAa;;AAEtC;AACA;;AAEA;AACA;;AAEA,aAAa,yBAAyB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;;AAEA,iCAAiC,QAAQ;AACzC;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA,aAAa,0BAA0B;AACvC;AACA;AACA;AACA;AACA,aAAa,wBAAwB;AACrC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA,CAAC;;;AAGD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4CAA4C;AAC5C;AACA,wBAAwB;;AAExB;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;;AAGD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA,uDAAuD;AACvD;AACA,cAAc,aAAa;;AAE3B;AACA;AACA;AACA;;AAEA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA,cAAc,aAAa;;AAE3B;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA,mBAAmB,QAAQ;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,sBAAsB,aAAa;;AAEnC;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,uBAAuB,aAAa;;AAEpC;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,sBAAsB,QAAQ;;AAE9B;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA,uBAAuB,QAAQ;;AAE/B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA,sBAAsB;AACtB;AACA,uCAAuC;AACvC;AACA,uCAAuC,QAAQ;;AAE/C;;AAEA,qDAAqD,QAAQ;;AAE7D,iGAAiG,QAAQ;AACzG,6BAA6B;;AAE7B;AACA;AACA;;AAEA;AACA;;AAEA,qBAAqB,QAAQ;;AAE7B;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA,sBAAsB;AACtB;AACA,uCAAuC;AACvC;AACA,uCAAuC,QAAQ;;AAE/C;AACA;AACA;AACA;;AAEA;AACA;;AAEA,+BAA+B,QAAQ;AACvC,8EAA8E,QAAQ;;AAEtF;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,sBAAsB;AACtB;AACA,uCAAuC;AACvC;AACA,uCAAuC,QAAQ;AAC/C;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA,YAAY,SAAS;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA,oBAAoB,eAAe;AACnC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB;AAChB;AACA;;AAEA,EAAE,qBAAqB;AACvB;AACA;;AAEA,EAAE,qBAAqB;AACvB;AACA;;AAEA,EAAE,qBAAqB;AACvB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,0BAA0B;AAC1B;AACA,EAAE,+BAA+B;AACjC;AACA;;AAEA,0BAA0B;AAC1B;AACA,EAAE,+BAA+B;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,SAAS;AAC1C;AACA;;AAEA;AACA,YAAY,OAAO;AACnB;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,iCAAiC;AACnE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;AAKA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wBAAwB;AACxB;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB;AACtB;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA,4BAA4B,QAAQ;;AAEpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,wBAAwB,YAAY;AACpC;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,yBAAyB;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB,aAAa;AACtC;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA,0BAA0B,aAAa;;AAEvC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,6BAA6B,aAAa;AAC1C;AACA;;AAEA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA,sCAAsC,SAAS;AAC/C;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,CAAC;;;AAGD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,4CAA4C,EAAE;AAC3E;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,gCAAgC,aAAa;AAC7C,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,mCAAmC,aAAa;AAChD,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,8BAA8B,aAAa;AAC3C;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,CAAC;;;AAGD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA,+BAA+B;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,6CAA6C;;AAE7C;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,wBAAwB,eAAe;;AAEvC;AACA;;AAEA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,4BAA4B,2CAA2C;AACvE,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA,EAAE;;AAEF;;AAEA,kCAAkC,QAAQ;;AAE1C;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,CAAC;;;AAGD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,4BAA4B,2CAA2C;AACvE,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,CAAC;;;AAGD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,YAAY;AACvC;AACA;;AAEA;;AAEA;AACA;AACA;AACA,sBAAsB,kBAAkB,gBAAgB;AACxD;AACA;AACA;;AAEA,mCAAmC,gDAAgD;;AAEnF;AACA;AACA,4BAA4B;AAC5B;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD;AAChD;;AAEA;AACA;AACA;;AAEA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,aAAa;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,4CAA4C,UAAU;AACtD;;AAEA,uCAAuC,SAAS;AAChD;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,aAAa,aAAa;;AAE1B,iCAAiC;;AAEjC,2BAA2B,aAAa;AACxC;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uBAAuB,aAAa;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF,mEAAmE;AACnE;AACA;AACA;;AAEA,uCAAuC,SAAS;AAChD;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA,GAAG;AACH,cAAc,SAAS;AACvB;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,8CAA8C,SAAS;AACvD;;AAEA,oCAAoC,cAAc;AAClD;;AAEA,mBAAmB,UAAU;;AAE7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA,qCAAqC,SAAS;AAC9C;AACA;AACA,EAAE;;AAEF;AACA,mBAAmB,QAAQ;;AAE3B;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA,uDAAuD,cAAc;;AAErE;AACA,uCAAuC,SAAS;AAChD;;AAEA,gDAAgD,UAAU;AAC1D,+BAA+B,UAAU;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,aAAa;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,aAAa,aAAa;;AAE1B,gCAAgC;;AAEhC;;AAEA,0BAA0B,SAAS;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,oDAAoD,SAAS;AAC7D;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA,uDAAuD,cAAc;;AAErE;AACA,uCAAuC,SAAS;AAChD;;AAEA,gDAAgD,UAAU;AAC1D;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;;AAGD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,mDAAmD,aAAa;;AAEhE;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,kCAAkC,SAAS;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,6CAA6C,SAAS;AACtD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,kBAAkB,sBAAsB;AACnD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;;;AAGD;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF,8CAA8C;AAC9C;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA,2BAA2B,wCAAwC;AACnE,+BAA+B,uCAAuC;;AAEtE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA,2BAA2B,wCAAwC;AACnE,+BAA+B,uCAAuC;;AAEtE;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,2BAA2B;AAC7C;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,yBAAyB;;AAErD,+EAA+E,iCAAiC;AAChH;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;;;AAGD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,2BAA2B,uCAAuC;AAClE,+BAA+B,sCAAsC;;AAErE;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;;;AAGD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,mBAAmB,QAAQ;;AAE3B;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA,uBAAuB,QAAQ;;AAE/B;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA,mBAAmB,QAAQ;;AAE3B;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA,yBAAyB,YAAY;;AAErC;AACA;AACA;AACA;AACA;AACA,mCAAmC,YAAY;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B,YAAY;;AAEtC;AACA;AACA;AACA;AACA;AACA,oCAAoC,YAAY;AAChD;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA,8BAA8B,QAAQ;AACtC,2BAA2B,2BAA2B;;AAEtD;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,+DAA+D;AAC/D;AACA;AACA,8CAA8C;AAC9C;AACA;AACA,gEAAgE;AAChE;AACA;AACA,8CAA8C;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2BAA2B,cAAc;;AAEzC;AACA;AACA;AACA;AACA;AACA,qCAAqC,cAAc;AACnD;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA,4BAA4B,cAAc;;AAE1C;AACA;AACA;AACA;AACA;AACA,sCAAsC,cAAc;AACpD;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA,EAAE;;AAEF,8BAA8B;;AAE9B,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA,iDAAiD,QAAQ;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,yBAAyB;AACpD;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA,iDAAiD;;AAEjD,8CAA8C,SAAS;;AAEvD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA,mBAAmB,QAAQ;;AAE3B;AACA,cAAc,QAAQ;;AAEtB;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uCAAuC,UAAU;;AAEjD;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA,oCAAoC,oBAAoB;;AAExD;AACA;AACA;AACA;AACA,EAAE;;AAEF;;AAEA;AACA,wBAAwB,QAAQ;;AAEhC;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;;AAEA;AACA;;AAEA,2BAA2B,kBAAkB;;AAE7C;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,EAAE;;AAEF;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;;AAEA,qBAAqB,eAAe;AACpC,sBAAsB,eAAe;;AAErC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA,+CAA+C,QAAQ;;AAEvD;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA,6BAA6B,0BAA0B;AACvD,qCAAqC,QAAQ,EAAE;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qCAAqC,kEAAkE;;AAEvG;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,4CAA4C,6BAA6B,QAAQ;;AAEjF;AACA,+BAA+B,sBAAsB;AACrD,gCAAgC,sBAAsB;AACtD;AACA;;AAEA,qCAAqC,UAAU;;AAE/C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,cAAc,kBAAkB;AAChC;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA,gFAAgF,cAAc;AAC9F;;AAEA,6BAA6B,aAAa;;AAE1C;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,cAAc,QAAQ;;AAEtB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;;AAEA;AACA,cAAc,QAAQ;;AAEtB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,kCAAkC,cAAc;AAChD;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,EAAE,yBAAyB,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,IAAI,IAAI,yCAAyC,kJAAkJ;AACvQ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,EAAE,wBAAwB,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE;AACnD;AACA;AACA,KAAK,EAAE,wHAAwH,2CAA2C,gDAAgD,EAAE,kBAAkB,EAAE,QAAQ,EAAE,wBAAwB,EAAE,8BAA8B;AAClT;AACA;AACA;AACA;AACA,wBAAwB,EAAE,iBAAiB,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,QAAQ,WAAW;AAC9E;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,cAAc,QAAQ;;AAEtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;;AAGD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;;AAEA;;AAEA,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,EAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;;AAGD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,eAAe;AAC7C,wCAAwC,uBAAuB;AAC/D,mCAAmC,uBAAuB;AAC1D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA,kCAAkC,QAAQ;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA,iDAAiD,QAAQ;;AAEzD;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,wCAAwC;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uBAAuB,6BAA6B;AACpD;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,EAAE;;AAEF;AACA,mBAAmB,QAAQ;;AAE3B;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gBAAgB;AAChB,eAAe;;AAEf;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;;AAEA;;AAEA,sBAAsB;AACtB,EAAE;;AAEF;AACA,uBAAuB,QAAQ;;AAE/B;AACA;AACA;AACA;;AAEA,aAAa,QAAQ;;AAErB;;AAEA,aAAa,SAAS;AACtB,sCAAsC,UAAU;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,EAAE;;AAEF;;AAEA,yCAAyC,QAAQ;;AAEjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA,8EAA8E,QAAQ;;AAEtF;AACA;AACA,EAAE;;;AAGF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;;AAEA,eAAe,QAAQ;;AAEvB;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;;AAEA,eAAe,QAAQ;;AAEvB;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,CAAC;;;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C,wCAAwC,uBAAuB;AAC/D,mCAAmC,uBAAuB;AAC1D;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA,iDAAiD;AACjD;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA,iDAAiD,QAAQ;;AAEzD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA,yBAAyB,uBAAuB;AAChD;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA,cAAc,QAAQ;;AAEtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA,oCAAoC,WAAW;AAC/C;AACA;AACA;AACA,EAAE;;AAEF;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,4BAA4B;AACpD;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;AAGD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA,6DAA6D,cAAc;;AAE3E;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA,4CAA4C,QAAQ;;AAEpD;;AAEA,qBAAqB,QAAQ;AAC7B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,wBAAwB,sBAAsB;AAC9C,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA,+CAA+C,QAAQ;;AAEvD;;AAEA;AACA,+BAA+B,sDAAsD;AACrF,+BAA+B,sDAAsD;AACrF,+BAA+B,sDAAsD;AACrF,+BAA+B,sDAAsD;;AAErF;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,KAAK;AACL;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA,sBAAsB,QAAQ;;AAE9B;AACA;AACA;AACA;;AAEA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA,+BAA+B;AAC/B;AACA;;AAEA,sCAAsC,SAAS;AAC/C;AACA;AACA,uCAAuC,SAAS;AAChD;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA,EAAE;;AAEF;AACA,gCAAgC;AAChC;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;AACA,yCAAyC,SAAS;AAClD;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA,2CAA2C,QAAQ;;AAEnD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA,GAAG;AACH;;AAEA,GAAG;AACH;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA,cAAc;;AAEd;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,eAAe,QAAQ;;AAEvB;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA,mBAAmB,QAAQ;;AAE3B;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,oFAAoF,QAAQ;;AAE5F;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA,+DAA+D,QAAQ;;AAEvE;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,QAAQ;AAC7B,GAAG;AACH;AACA;AACA,uDAAuD,QAAQ;AAC/D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,+DAA+D,0BAA0B;AACzF;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;AACD;;;;;;;;;;;;AC/vbA;AACA;AACA;AACA;AACA,eAAe,KAAoD,YAAY,SAAqE,CAAC,kBAAkB,aAAa,oBAAoB,cAAc,YAAY,2BAA2B,IAAI,sCAAsC,SAAS,0BAA0B,UAAU,iCAAiC,4BAA4B,cAAc,gBAAgB,4BAA4B,qDAAqD,0BAA0B,kBAAkB,kEAAkE,QAAQ,cAAc,sDAAsD,kBAAkB,YAAY,oBAAoB,4BAA4B,cAAc,2DAA2D,kBAAkB,wBAAwB,kCAAkC,aAAa,SAAS,gBAAgB,kCAAkC,yBAAyB,cAAc,kDAAkD,cAAc,yBAAyB,gBAAgB,8EAA8E,sBAAsB,iBAAiB,kBAAkB,SAAS,4FAA4F,mDAAmD,SAAS,eAAe,GAAG,gBAAgB,iCAAiC,WAAW,mEAAmE,uCAAuC,EAAE,iCAAiC,4DAA4D,gBAAgB,YAAY,WAAW,yBAAyB,SAAS,sBAAsB,6CAA6C,cAAc,2DAA2D,QAAQ,cAAc,uCAAuC,oCAAoC,0KAA0K,wBAAwB,kBAAkB,0CAA0C,UAAU,cAAc,oBAAoB,+BAA+B,2PAA2P,EAAE,cAAc,qBAAqB,aAAa,4EAA4E,wCAAwC,wHAAwH,6EAA6E,8CAA8C,aAAa,YAAY,WAAW,4LAA4L,wKAAwK,2BAA2B,qEAAqE,kCAAkC,IAAI,gCAAgC,GAAG,uBAAuB,gCAAgC,4BAA4B,wCAAwC,2BAA2B,kFAAkF,uBAAuB,uGAAuG,OAAO,mBAAmB,wDAAwD,mCAAmC,IAAI,uBAAuB,YAAY,qBAAqB,8DAA8D,mCAAmC,IAAI,wBAAwB,yBAAyB,YAAY,qBAAqB,8BAA8B,sBAAsB,iDAAiD,WAAW,WAAW,oBAAoB,IAAI,wCAAwC,UAAU,sBAAsB,UAAU,2CAA2C,6CAA6C,IAAI,KAAK,WAAW,0GAA0G,KAAK,mBAAmB,IAAI,cAAc,wBAAwB,sBAAsB,kCAAkC,UAAU,IAAI,wDAAwD,EAAE,iBAAiB,sBAAsB,MAAM,yCAAyC,uBAAuB,IAAI,KAAK,WAAW,yBAAyB,qBAAqB,uCAAuC,uBAAuB,oCAAoC,wBAAwB,oFAAoF,SAAS,sBAAsB,uBAAuB,mCAAmC,YAAY,mBAAmB,2BAA2B,OAAO,gCAAgC,4BAA4B,gDAAgD,iCAAiC,+BAA+B,gEAAgE,6BAA6B,qEAAqE,uCAAuC,UAAU,+JAA+J,kBAAkB,kBAAkB,kDAAkD,8BAA8B,uCAAuC,kBAAkB,yHAAyH,gBAAgB,wCAAwC,IAAI,sBAAsB,gBAAgB,sCAAsC,gBAAgB,wCAAwC,IAAI,sBAAsB,gBAAgB,mCAAmC,kBAAkB,+EAA+E,kDAAkD,kBAAkB,wOAAwO,aAAa,iBAAiB,4BAA4B,iBAAiB,+BAA+B,kBAAkB,oCAAoC,sBAAsB,oCAAoC,uBAAuB,oCAAoC,sBAAsB,iCAAiC,uBAAuB,gCAAgC,wBAAwB,mCAAmC,yBAAyB,gCAAgC,qBAAqB,oCAAoC,uBAAuB,oCAAoC,kBAAkB,6BAA6B,mBAAmB,gEAAgE,kBAAkB,6BAA6B,mBAAmB,gEAAgE,iBAAiB,4BAA4B,kBAAkB,8DAA8D,kBAAkB,6BAA6B,mBAAmB,8CAA8C,wBAAwB,qCAAqC,0BAA0B,oBAAoB,wCAAwC,sBAAsB,+EAA+E,qBAAqB,6CAA6C,cAAc,mBAAmB,gOAAgO,uBAAuB,oEAAoE,0BAA0B,oCAAoC,wBAAwB,oCAAoC,uBAAuB,gBAAgB,2BAA2B,gBAAgB,oBAAoB,mCAAmC,sBAAsB,QAAQ,iKAAiK,wBAAwB,OAAO,oFAAoF,YAAY,sBAAsB,OAAO,gFAAgF,YAAY,oBAAoB,+BAA+B,cAAc,mBAAmB,4CAA4C,wBAAwB,KAAK,2DAA2D,oDAAoD,2MAA2M,iBAAiB,4FAA4F,4DAA4D,sBAAsB,sGAAsG,yBAAyB,uBAAuB,yBAAyB,uBAAuB,yBAAyB,6CAA6C,yBAAyB,6CAA6C,oBAAoB,2BAA2B,qBAAqB,2BAA2B,oBAAoB,2BAA2B,qBAAqB,2BAA2B,sBAAsB,6DAA6D,4CAA4C,2HAA2H,wBAAwB,OAAO,wIAAwI,YAAY,sBAAsB,OAAO,oIAAoI,YAAY,yBAAyB,gFAAgF,sBAAsB,2GAA2G,oBAAoB,8CAA8C,SAAS,4BAA4B,iDAAiD,2CAA2C,6BAA6B,2DAA2D,oCAAoC,qBAAqB,kCAAkC,uBAAuB,oCAAoC,mBAAmB,yBAAyB,kBAAkB,gCAAgC,gCAAgC,6BAA6B,6CAA6C,4FAA4F,yBAAyB,qBAAqB,qGAAqG,sBAAsB,qDAAqD,wBAAwB,6BAA6B,iBAAiB,0BAA0B,sBAAsB,wDAAwD,0DAA0D,kBAAkB,0CAA0C,yBAAyB,kDAAkD,kEAAkE,8BAA8B,qEAAqE,uBAAuB,0CAA0C,6DAA6D,OAAO,IAAI,mDAAmD,gLAAgL,iBAAiB,eAAe,mDAAmD,uFAAuF,4DAA4D,uBAAuB,kBAAkB,2EAA2E,4CAA4C,oBAAoB,yEAAyE,wCAAwC,oBAAoB,sBAAsB,aAAa,wBAAwB,oCAAoC,0BAA0B,wEAAwE,2BAA2B,uEAAuE,YAAY,IAAI,gFAAgF,QAAQ,IAAI,mBAAmB,EAAE,cAAc,gEAAgE,gBAAgB,qBAAqB,mBAAmB,IAAI,KAAK,0BAA0B,IAAI,sCAAsC,mBAAmB,iBAAiB,2iCAA2iC,SAAS,IAAI,8BAA8B,YAAY,eAAe,MAAM,EAAE,iHAAiH,UAAU,SAAS,8HAA8H,IAAI,oCAAoC,iCAAiC,mBAAmB,sEAAsE,SAAS,UAAU,GAAG,eAAe,uDAAuD,gCAAgC,kVAAkV,sLAAsL,YAAY,qBAAqB,uCAAuC,oBAAoB,4FAA4F,4CAA4C,MAAM,QAAQ,EAAE,qRAAqR,wCAAwC,cAAc,0FAA0F,wDAAwD,wCAAwC,cAAc,QAAQ,mFAAmF,aAAa,eAAe,uBAAuB,eAAe,qCAAqC,eAAe,4BAA4B,iBAAiB,mDAAmD,0BAA0B,qHAAqH,mBAAmB,aAAa,cAAc,MAAM,OAAO,uCAAuC,KAAK,wBAAwB,WAAW,4BAA4B,8CAA8C,cAAc,uBAAuB,OAAO,uCAAuC,aAAa,6CAA6C,IAAI,0CAA0C,qFAAqF,WAAW,iCAAiC,WAAW,2CAA2C,iBAAiB,mDAAmD,yCAAyC,WAAW,oCAAoC,WAAW,kDAAkD,kQAAkQ,eAAe,sDAAsD,iBAAiB,oDAAoD,2CAA2C,oDAAoD,cAAc,wBAAwB,mBAAmB,gCAAgC,+CAA+C,eAAe,mBAAmB,oBAAoB,eAAe,KAAK,aAAa,6BAA6B,eAAe,mBAAmB,qCAAqC,eAAe,mBAAmB,oDAAoD,iBAAiB,uDAAuD,YAAY,6DAA6D,iBAAiB,sDAAsD,IAAI,0BAA0B,kBAAkB,YAAY,sBAAsB,iBAAiB,2FAA2F,iBAAiB,iEAAiE,eAAe,uHAAuH,iBAAiB,wEAAwE,8CAA8C,IAAI,oBAAoB,SAAS,gBAAgB,qGAAqG,MAAM,eAAe,6CAA6C,WAAW,4BAA4B,SAAS,mBAAmB,oBAAoB,8GAA8G,iBAAiB,yEAAyE,eAAe,kCAAkC,4CAA4C,4BAA4B,eAAe,6BAA6B,KAAK,0FAA0F,cAAc,OAAO,qCAAqC,uBAAuB,eAAe,uDAAuD,cAAc,0BAA0B,cAAc,0BAA0B,eAAe,KAAK,gBAAgB,gBAAgB,uFAAuF,cAAc,+DAA+D,eAAe,KAAK,mEAAmE,EAAE,SAAS,eAAe,gCAAgC,OAAO,8EAA8E,gCAAgC,qZAAqZ,EAAE,qBAAqB,oDAAoD,mCAAmC,IAAI,mBAAmB,YAAY,yBAAyB,qBAAqB,oDAAoD,wCAAwC,IAAI,mBAAmB,KAAK,oCAAoC,aAAa,YAAY,qBAAqB,6BAA6B,+BAA+B,kBAAkB,oCAAoC,KAAK,0KAA0K,WAAW,oDAAoD,gCAAgC,oGAAoG,eAAe,yEAAyE,yEAAyE,UAAU,MAAM,kGAAkG,YAAY,qBAAqB,+CAA+C,kBAAkB,2CAA2C,yBAAyB,+KAA+K,iJAAiJ,WAAW,0JAA0J,eAAe,sHAAsH,eAAe,kCAAkC,eAAe,sEAAsE,eAAe,iEAAiE,eAAe,wBAAwB,iBAAiB,wCAAwC,mCAAmC,oFAAoF,qEAAqE,eAAe,+RAA+R,aAAa,eAAe,cAAc,eAAe,iBAAiB,uBAAuB,iBAAiB,sBAAsB,eAAe,IAAI,KAAK,SAAS,gBAAgB,SAAS,SAAS,aAAa,gCAAgC,kOAAkO,eAAe,sBAAsB,mOAAmO,iBAAiB,oDAAoD,qBAAqB,gDAAgD,mBAAmB,qDAAqD,8EAA8E,yBAAyB,qDAAqD,+CAA+C,sBAAsB,qDAAqD,sBAAsB,2CAA2C,eAAe,SAAS,0PAA0P,0BAA0B,6CAA6C,yBAAyB,uRAAuR,SAAS,sNAAsN,yBAAyB,yGAAyG,+EAA+E,kBAAkB,kBAAkB,sCAAsC,0JAA0J,iCAAiC,uBAAuB,qDAAqD,OAAO,sBAAsB,sBAAsB,uEAAuE,uBAAuB,uEAAuE,+BAA+B,kLAAkL,yBAAyB,OAAO,EAAE,oCAAoC,OAAO,kCAAkC,4HAA4H,uEAAuE,6BAA6B,sGAAsG,OAAO,6DAA6D,yBAAyB,gEAAgE,qCAAqC,uCAAuC,sBAAsB,+CAA+C,qBAAqB,kCAAkC,MAAM,EAAE,qBAAqB,UAAU,uDAAuD,iJAAiJ,0DAA0D,4DAA4D,8DAA8D,qCAAqC,gDAAgD,mEAAmE,yDAAyD,YAAY,uBAAuB,gBAAgB,0CAA0C,aAAa,qFAAqF,wBAAwB,qFAAqF,cAAc,sEAAsE,8BAA8B,cAAc,mCAAmC,cAAc,mCAAmC,WAAW,cAAc,2BAA2B,iBAAiB,gBAAgB,mEAAmE,sDAAsD,qCAAqC,2BAA2B,MAAM,sIAAsI,yBAAyB,QAAQ,SAAS,gCAAgC,iBAAiB,2BAA2B,qCAAqC,qCAAqC,0BAA0B,yRAAyR,wBAAwB,2BAA2B,4IAA4I,wBAAwB,2BAA2B,4IAA4I,+BAA+B,yBAAyB,8DAA8D,kEAAkE,yBAAyB,gBAAgB,+NAA+N,mBAAmB,yBAAyB,yCAAyC,6MAA6M,YAAY,4BAA4B,6BAA6B,KAAK,kBAAkB,SAAS,WAAW,IAAI,qBAAqB,2CAA2C,qFAAqF,oPAAoP,oBAAoB,QAAQ,iBAAiB,4GAA4G,oBAAoB,4BAA4B,qBAAqB,sEAAsE,4CAA4C,OAAO,qFAAqF,qIAAqI,uBAAuB,mLAAmL,qCAAqC,6FAA6F,uFAAuF,2CAA2C,EAAE,wCAAwC,0GAA0G,cAAc,4BAA4B,kDAAkD,OAAO,yCAAyC,uEAAuE,6BAA6B,0BAA0B,kBAAkB,0BAA0B,+DAA+D,mBAAmB,6IAA6I,IAAI,4DAA4D,SAAS,4DAA4D,MAAM,8SAA8S,wCAAwC,sFAAsF,0BAA0B,gGAAgG,+BAA+B,sBAAsB,oIAAoI,oBAAoB,kBAAkB,sBAAsB,4BAA4B,gFAAgF,uBAAuB,iFAAiF,uBAAuB,+GAA+G,+BAA+B,qBAAqB,uQAAuQ,sIAAsI,oBAAoB,kKAAkK,8BAA8B,iCAAiC,sCAAsC,2BAA2B,+CAA+C,iCAAiC,wEAAwE,qBAAqB,0CAA0C,qBAAqB,mBAAmB,yBAAyB,uBAAuB,4BAA4B,uBAAuB,uDAAuD,4BAA4B,uBAAuB,0BAA0B,2BAA2B,sBAAsB,uBAAuB,wEAAwE,yBAAyB,wEAAwE,gCAAgC,sCAAsC,yBAAyB,gCAAgC,oEAAoE,wBAAwB,yCAAyC,8BAA8B,+CAA+C,wBAAwB,4CAA4C,wCAAwC,4CAA4C,wCAAwC,uCAAuC,oCAAoC,4CAA4C,kCAAkC,oCAAoC,sEAAsE,wCAAwC,6BAA6B,oCAAoC,2EAA2E,gCAAgC,+DAA+D,4BAA4B,4BAA4B,kDAAkD,0EAA0E,0DAA0D,wBAAwB,sBAAsB,+NAA+N,uBAAuB,0IAA0I,uBAAuB,qBAAqB,sBAAsB,wXAAwX,0BAA0B,6BAA6B,oBAAoB,+DAA+D,qBAAqB,yFAAyF,0BAA0B,gEAAgE,uBAAuB,2BAA2B,qBAAqB,6IAA6I,sBAAsB,oDAAoD,kBAAkB,oEAAoE,uBAAuB,oDAAoD,yBAAyB,2CAA2C,gCAAgC,oEAAoE,2BAA2B,mEAAmE,yBAAyB,iBAAiB,cAAc,kVAAkV,sBAAsB,wDAAwD,qBAAqB,mBAAmB,EAAE,OAAO,sBAAsB,yDAAyD,uBAAuB,4BAA4B,uHAAuH,iCAAiC,+EAA+E,EAAE,EAAE,mGAAmG,KAAK,MAAM,uBAAuB,qBAAqB,qBAAqB,6BAA6B,eAAe,8CAA8C,6BAA6B,yBAAyB,aAAa,iHAAiH,sGAAsG,qBAAqB,UAAU,IAAI,iDAAiD,wEAAwE,WAAW,0CAA0C,OAAO,iBAAiB,8DAA8D,+CAA+C,+NAA+N,YAAY,WAAW,8HAA8H,6BAA6B,mHAAmH,2BAA2B,oCAAoC,IAAI,gCAAgC,yBAAyB,oCAAoC,YAAY,2BAA2B,2BAA2B,qCAAqC,mBAAmB,4BAA4B,2BAA2B,gCAAgC,yGAAyG,kCAAkC,kCAAkC,2EAA2E,wCAAwC,mCAAmC,sCAAsC,+CAA+C,mCAAmC,oMAAoM,iCAAiC,oEAAoE,8BAA8B,wEAAwE,8BAA8B,eAAe,oHAAoH,4DAA4D,4BAA4B,eAAe,+DAA+D,yCAAyC,kCAAkC,2HAA2H,8DAA8D,wBAAwB,kFAAkF,wBAAwB,yEAAyE,0DAA0D,iCAAiC,kBAAkB,gCAAgC,0DAA0D,+BAA+B,wCAAwC,gFAAgF,6BAA6B,kEAAkE,kEAAkE,gCAAgC,qJAAqJ,qGAAqG,8BAA8B,mFAAmF,yBAAyB,wCAAwC,yDAAyD,iCAAiC,yFAAyF,8BAA8B,8EAA8E,kCAAkC,gCAAgC,UAAU,oIAAoI,uEAAuE,oEAAoE,4CAA4C,WAAW,gCAAgC,sJAAsJ,2BAA2B,qDAAqD,iCAAiC,qKAAqK,kBAAkB,SAAS,EAAE,eAAe,iBAAiB,iBAAiB,SAAS,oBAAoB,wBAAwB,UAAU,wBAAwB,6BAA6B,yBAAyB,gBAAgB,mFAAmF,yBAAyB,uBAAuB,mBAAmB,0BAA0B,gFAAgF,qJAAqJ,mBAAmB,6IAA6I,2BAA2B,0EAA0E,EAAE,YAAY,uBAAuB,0BAA0B,2BAA2B,uBAAuB,4BAA4B,6BAA6B,uFAAuF,gBAAgB,kBAAkB,qBAAqB,wEAAwE,6BAA6B,8DAA8D,sFAAsF,EAAE,kBAAkB,SAAS,8GAA8G,uBAAuB,4BAA4B,sIAAsI,qCAAqC,mBAAmB,6FAA6F,YAAY,sBAAsB,oEAAoE,uBAAuB,mBAAmB,oEAAoE,qBAAqB,wDAAwD,YAAY,sBAAsB,qEAAqE,4BAA4B,yDAAyD,0BAA0B,4DAA4D,yBAAyB,6CAA6C,2BAA2B,uFAAuF,mBAAmB,sFAAsF,2DAA2D,mNAAmN,qBAAqB,kEAAkE,wBAAwB,sFAAsF,+CAA+C,4CAA4C,uDAAuD,gDAAgD,QAAQ,6CAA6C,qRAAqR,uBAAuB,YAAY,sBAAsB,4EAA4E,2BAA2B,0EAA0E,yBAAyB,6DAA6D,gEAAgE,8HAA8H,oBAAoB,gCAAgC,4EAA4E,gBAAgB,QAAQ,sBAAsB,uFAAuF,gJAAgJ,4BAA4B,oCAAoC,gIAAgI,uBAAuB,mCAAmC,kJAAkJ,kCAAkC,sBAAsB,sEAAsE,0RAA0R,qCAAqC,uBAAuB,oCAAoC,2JAA2J,0BAA0B,6CAA6C,uBAAuB,qBAAqB,KAAK,sFAAsF,QAAQ,WAAW,0DAA0D,QAAQ,WAAW,uDAAuD,4CAA4C,iCAAiC,0EAA0E,KAAK,yJAAyJ,kCAAkC,8DAA8D,oBAAoB,qBAAqB,sBAAsB,wBAAwB,gBAAgB,SAAS,6EAA6E,0BAA0B,mBAAmB,yEAAyE,kRAAkR,sBAAsB,4DAA4D,oBAAoB,qDAAqD,mBAAmB,qDAAqD,qBAAqB,wHAAwH,sBAAsB,yHAAyH,mCAAmC,kBAAkB,6LAA6L,4BAA4B,qCAAqC,6LAA6L,EAAE,iBAAiB,eAAe,4BAA4B,sFAAsF,EAAE,kBAAkB,SAAS,yDAAyD,mBAAmB,2DAA2D,iIAAiI,sBAAsB,sEAAsE,4BAA4B,gFAAgF,oBAAoB,oIAAoI,sBAAsB,2BAA2B,gGAAgG,2BAA2B,sDAAsD,sCAAsC,6BAA6B,wBAAwB,0JAA0J,8BAA8B,qEAAqE,0BAA0B,qDAAqD,8CAA8C,gBAAgB,SAAS,sHAAsH,wBAAwB,gCAAgC,mBAAmB,yMAAyM,sCAAsC,uBAAuB,iDAAiD,4BAA4B,yGAAyG,+BAA+B,+EAA+E,oBAAoB,cAAc,SAAS,iEAAiE,SAAS,0HAA0H,EAAE,iBAAiB,sBAAsB,4BAA4B,sDAAsD,EAAE,gFAAgF,qBAAqB,qBAAqB,iBAAiB,sBAAsB,iBAAiB,4BAA4B,kBAAkB,iBAAiB,uBAAuB,YAAY,mBAAmB,8DAA8D,oBAAoB,iEAAiE,oBAAoB,uBAAuB,EAAE,uBAAuB,kCAAkC,WAAW,SAAS,8CAA8C,0FAA0F,KAAK,+FAA+F,cAAc,SAAS,iBAAiB,8BAA8B,4EAA4E,mBAAmB,iFAAiF,oBAAoB,uIAAuI,qBAAqB,+OAA+O,kBAAkB,mDAAmD,uJAAuJ,qBAAqB,gFAAgF,KAAK,8GAA8G,+mBAA+mB,4BAA4B,OAAO,+BAA+B,0EAA0E,mBAAmB,gDAAgD,uBAAuB,kNAAkN,gFAAgF,iDAAiD,oCAAoC,EAAE,iBAAiB,kCAAkC,UAAU,uBAAuB,uEAAuE,oCAAoC,cAAc,UAAU,OAAO,2CAA2C,wCAAwC,cAAc,WAAW,QAAQ,IAAI,uBAAuB,SAAS,iBAAiB,oCAAoC,IAAI,2EAA2E,YAAY,sBAAsB,SAAS,SAAS,mBAAmB,+BAA+B,uBAAuB,mCAAmC,UAAU,EAAE,sBAAsB,gBAAgB,wDAAwD,uBAAuB,4CAA4C,qJAAqJ,iBAAiB,QAAQ,mFAAmF,qBAAqB,4CAA4C,oHAAoH,eAAe,2DAA2D,eAAe,4FAA4F,gCAAgC,4EAA4E,iBAAiB,sGAAsG,EAAE,mBAAmB,kCAAkC,mBAAmB,IAAI,0BAA0B,QAAQ,IAAI,KAAK,qCAAqC,IAAI,wJAAwJ,IAAI,SAAS,mCAAmC,eAAe,MAAM,oBAAoB,0BAA0B,uBAAuB,sBAAsB,mCAAmC,KAAK,wIAAwI,6IAA6I,2DAA2D,uBAAuB,4HAA4H,uBAAuB,kFAAkF,2BAA2B,6BAA6B,0CAA0C,SAAS,IAAI,qFAAqF,SAAS,IAAI,mEAAmE,SAAS,IAAI,2DAA2D,qBAAqB,kBAAkB,4BAA4B,wBAAwB,gCAAgC,0BAA0B,aAAa,EAAE,8EAA8E,iBAAiB,SAAS,2DAA2D,mBAAmB,6BAA6B,mBAAmB,kDAAkD,wBAAwB,mCAAmC,qBAAqB,iEAAiE,kCAAkC,qCAAqC,qCAAqC,4CAA4C,2BAA2B,gCAAgC,uBAAuB,eAAe,qBAAqB,kEAAkE,uBAAuB,2CAA2C,cAAc,OAAO,wJAAwJ,WAAW,IAAI,EAAE,YAAY,qBAAqB,uEAAuE,WAAW,+HAA+H,yBAAyB,WAAW,gOAAgO,QAAQ,kDAAkD,sBAAsB,+BAA+B,yBAAyB,oDAAoD,YAAY,wBAAwB,yCAAyC,IAAI,wBAAwB,2BAA2B,8GAA8G,8BAA8B,WAAW,qFAAqF,8BAA8B,uCAAuC,oCAAoC,uCAAuC,0FAA0F,uXAAuX,EAAE,kBAAkB,yBAAyB,QAAQ,4BAA4B,sBAAsB,IAAI,wBAAwB,sBAAsB,yBAAyB,+DAA+D,yBAAyB,6CAA6C,sGAAsG,sBAAsB,kEAAkE,wBAAwB,6CAA6C,oBAAoB,kDAAkD,8DAA8D,YAAY,mBAAmB,6BAA6B,sBAAsB,gCAAgC,yBAAyB,oDAAoD,YAAY,sBAAsB,uBAAuB,sBAAsB,SAAS,kCAAkC,uBAAuB,kCAAkC,wBAAwB,aAAa,gBAAgB,qBAAqB,8GAA8G,QAAQ,GAAG,yBAAyB,yJAAyJ,QAAQ,QAAQ,sBAAsB,iCAAiC,yBAAyB,mCAAmC,wBAAwB,kCAAkC,sBAAsB,YAAY,2BAA2B,sBAAsB,kDAAkD,UAAU,eAAe,SAAS,sCAAsC,wBAAwB,UAAU,wBAAwB,kCAAkC,0BAA0B,oCAAoC,2BAA2B,0BAA0B,OAAO,iFAAiF,YAAY,qDAAqD,kCAAkC,8BAA8B,iCAAiC,8BAA8B,gFAAgF,wKAAwK,0BAA0B,mDAAmD,yBAAyB,+DAA+D,EAAE,kBAAkB,SAAS,6LAA6L,yBAAyB,wIAAwI,4BAA4B,8GAA8G,4IAA4I,gBAAgB,uBAAuB,eAAe,qBAAqB,yBAAyB,sEAAsE,8FAA8F,iDAAiD,wBAAwB,qBAAqB,8FAA8F,uFAAuF,kBAAkB,+CAA+C,wBAAwB,4NAA4N,mBAAmB,+NAA+N,WAAW,WAAW,0KAA0K,yBAAyB,uGAAuG,wBAAwB,qGAAqG,qBAAqB,4EAA4E,8FAA8F,wBAAwB,2FAA2F,gBAAgB,SAAS,8OAA8O,0BAA0B,4BAA4B,mBAAmB,gKAAgK,sBAAsB,0NAA0N,sBAAsB,OAAO,wCAAwC,sBAAsB,oBAAoB,uBAAuB,mBAAmB,yDAAyD,gCAAgC,EAAE,6BAA6B,iDAAiD,oBAAoB,yBAAyB,qBAAqB,yIAAyI,uBAAuB,kBAAkB,mBAAmB,0BAA0B,yDAAyD,gBAAgB,YAAY,sBAAsB,iHAAiH,gMAAgM,wDAAwD,EAAE,6CAA6C,mPAAmP,wBAAwB,oCAAoC,wDAAwD,0EAA0E,0BAA0B,iDAAiD,qBAAqB,6HAA6H,2BAA2B,qDAAqD,0BAA0B,6EAA6E,gBAAgB,6BAA6B,8GAA8G,6BAA6B,yHAAyH,wBAAwB,oEAAoE,2BAA2B,2BAA2B,8DAA8D,0BAA0B,4CAA4C,yBAAyB,sBAAsB,4BAA4B,6CAA6C,8BAA8B,gDAAgD,EAAE,kBAAkB,SAAS,4MAA4M,uBAAuB,mCAAmC,kBAAkB,2EAA2E,qBAAqB,iCAAiC,mBAAmB,wDAAwD,sBAAsB,mJAAmJ,yBAAyB,+DAA+D,wBAAwB,8DAA8D,uBAAuB,kBAAkB,mBAAmB,+BAA+B,4BAA4B,sFAAsF,gBAAgB,SAAS,kBAAkB,0BAA0B,6DAA6D,uBAAuB,mBAAmB,yDAAyD,gCAAgC,EAAE,sBAAsB,oBAAoB,uBAAuB,wDAAwD,sBAAsB,oBAAoB,sBAAsB,gCAAgC,iEAAiE,qBAAqB,4EAA4E,0BAA0B,2EAA2E,iEAAiE,oBAAoB,8BAA8B,wBAAwB,mCAAmC,mBAAmB,wEAAwE,4BAA4B,uEAAuE,EAAE,kBAAkB,2BAA2B,8BAA8B,IAAI,SAAS,yGAAyG,kCAAkC,uBAAuB,qCAAqC,sBAAsB,qBAAqB,sBAAsB,iDAAiD,qHAAqH,oDAAoD,sEAAsE,4BAA4B,uNAAuN,kKAAkK,KAAK,uEAAuE,oGAAoG,sBAAsB,EAAE,kBAAkB,SAAS,yBAAyB,0BAA0B,8BAA8B,uBAAuB,qBAAqB,wBAAwB,yCAAyC,oBAAoB,4BAA4B,+BAA+B,uDAAuD,IAAI,4CAA4C,IAAI,KAAK,8BAA8B,sBAAsB,sCAAsC,sBAAsB,gFAAgF,8CAA8C,kBAAkB,UAAU,MAAM,iCAAiC,mDAAmD,UAAU,MAAM,iIAAiI,sBAAsB,oBAAoB,yBAAyB,uFAAuF,yBAAyB,yDAAyD,0BAA0B,wDAAwD,6BAA6B,oCAAoC,IAAI,+EAA+E,SAAS,qBAAqB,YAAY,iJAAiJ,0BAA0B,0CAA0C,uFAAuF,iCAAiC,sCAAsC,MAAM,aAAa,IAAI,2DAA2D,UAAU,aAAa,IAAI,mCAAmC,wBAAwB,6BAA6B,8GAA8G,KAAK,gCAAgC,+BAA+B,IAAI,wCAAwC,MAAM,+GAA+G,4BAA4B,iEAAiE,IAAI,oBAAoB,oBAAoB,0EAA0E,wBAAwB,iCAAiC,8BAA8B,yCAAyC,yDAAyD,6BAA6B,IAAI,8CAA8C,IAAI,iDAAiD,UAAU,EAAE,YAAY,kBAAkB,SAAS,QAAQ,oBAAoB,sDAAsD,sBAAsB,gFAAgF,kDAAkD,kBAAkB,sBAAsB,IAAI,2EAA2E,8DAA8D,6BAA6B,2DAA2D,8DAA8D,yBAAyB,yFAAyF,0BAA0B,iEAAiE,wBAAwB,gEAAgE,sJAAsJ,wCAAwC,IAAI,4DAA4D,wBAAwB,oCAAoC,4BAA4B,yBAAyB,yDAAyD,6BAA6B,IAAI,8CAA8C,IAAI,oFAAoF,uDAAuD,EAAE,kBAAkB,yBAAyB,yBAAyB,oBAAoB,qBAAqB,8BAA8B,MAAM,mBAAmB,IAAI,kFAAkF,YAAY,mBAAmB,sCAAsC,cAAc,qIAAqI,wBAAwB,sEAAsE,mEAAmE,sBAAsB,kCAAkC,yBAAyB,OAAO,8BAA8B,oEAAoE,EAAE,iBAAiB,wHAAwH,sBAAsB,eAAe,oCAAoC,oCAAoC,IAAI,kCAAkC,iBAAiB,8FAA8F,qFAAqF,uDAAuD,IAAI,KAAK,UAAU,gEAAgE,IAAI,aAAa,iBAAiB,oDAAoD,qBAAqB,wDAAwD,eAAe,6BAA6B,mBAAmB,8BAA8B,IAAI,+CAA+C,SAAS,iBAAiB,0GAA0G,qBAAqB,4BAA4B,IAAI,0CAA0C,4BAA4B,iBAAiB,qBAAqB,YAAY,WAAW,QAAQ,eAAe,0DAA0D,4BAA4B,aAAa,QAAQ,sBAAsB,gBAAgB,gDAAgD,IAAI,iBAAiB,mBAAmB,yDAAyD,sBAAsB,yBAAyB,gBAAgB,0EAA0E,GAAG,cAAc,sBAAsB,uFAAuF,2BAA2B,4CAA4C,GAAG,cAAc,yBAAyB,SAAS,kCAAkC,4CAA4C,WAAW,gCAAgC,EAAE,uBAAuB,sEAAsE,gDAAgD,oCAAoC,kCAAkC,gBAAgB,qBAAqB,wBAAwB,KAAK,YAAY,oEAAoE,aAAa,uCAAuC,GAAG,sCAAsC,EAAE,wBAAwB,SAAS,wFAAwF,4BAA4B,wCAAwC,kBAAkB,8OAA8O,qBAAqB,oFAAoF,wBAAwB,sEAAsE,sBAAsB,kDAAkD,yBAAyB,uCAAuC,wBAAwB,uCAAuC,oBAAoB,yDAAyD,uBAAuB,uDAAuD,sBAAsB,OAAO,wCAAwC,4DAA4D,uBAAuB,uDAAuD,sBAAsB,oBAAoB,uBAAuB,mBAAmB,uBAAuB,oEAAoE,+dAA+d,0BAA0B,iHAAiH,oBAAoB,mBAAmB,6JAA6J,2DAA2D,2BAA2B,qCAAqC,0BAA0B,sHAAsH,4BAA4B,mBAAmB,mCAAmC,mDAAmD,gBAAgB,SAAS,uCAAuC,uBAAuB,wEAAwE,mNAAmN,oDAAoD,WAAW,qBAAqB,+BAA+B,KAAK,mMAAmM,YAAY,mBAAmB,KAAK,mBAAmB,uCAAuC,EAAE,kBAAkB,sBAAsB,4BAA4B,sKAAsK,EAAE,kBAAkB,SAAS,2CAA2C,0BAA0B,yBAAyB,mBAAmB,qQAAqQ,sBAAsB,6HAA6H,sBAAsB,oBAAoB,uBAAuB,oFAAoF,uBAAuB,qBAAqB,wBAAwB,0CAA0C,uBAAuB,uBAAuB,mBAAmB,+KAA+K,sBAAsB,OAAO,0DAA0D,4DAA4D,mBAAmB,4CAA4C,yBAAyB,2CAA2C,wBAAwB,2CAA2C,8BAA8B,sEAAsE,eAAe,MAAM,qCAAqC,KAAK,sEAAsE,gBAAgB,sCAAsC,2BAA2B,kBAAkB,2GAA2G,oCAAoC,KAAK,KAAK,kBAAkB,6BAA6B,iBAAiB,4BAA4B,4BAA4B,cAAc,8FAA8F,kEAAkE,+FAA+F,uEAAuE,uBAAuB,aAAa,gBAAgB,SAAS,6MAA6M,oBAAoB,8BAA8B,mBAAmB,oDAAoD,WAAW,gDAAgD,WAAW,iEAAiE,sBAAsB,wDAAwD,WAAW,iDAAiD,WAAW,kEAAkE,sBAAsB,wCAAwC,0LAA0L,mBAAmB,sCAAsC,wBAAwB,+JAA+J,6NAA6N,oDAAoD,mCAAmC,+CAA+C,0BAA0B,kCAAkC,iCAAiC,oBAAoB,qHAAqH,yEAAyE,0FAA0F,0BAA0B,yFAAyF,6BAA6B,uBAAuB,yBAAyB,8CAA8C,mLAAmL,4BAA4B,uLAAuL,iKAAiK,iCAAiC,oBAAoB,uBAAuB,2FAA2F,EAAE,iBAAiB,qBAAqB,cAAc,0BAA0B,2LAA2L,wBAAwB,yFAAyF,cAAc,wBAAwB,2KAA2K,4FAA4F,oCAAoC,wBAAwB,+BAA+B,4FAA4F,qDAAqD,yBAAyB,8GAA8G,uBAAuB,8CAA8C,yBAAyB,gFAAgF,wBAAwB,0CAA0C,6BAA6B,mDAAmD,qBAAqB,mBAAmB,wBAAwB,wBAAwB,iMAAiM,wBAAwB,gCAAgC,yBAAyB,kDAAkD,EAAE,kBAAkB,SAAS,kGAAkG,mBAAmB,4FAA4F,aAAa,iDAAiD,aAAa,KAAK,sBAAsB,0DAA0D,aAAa,kDAAkD,aAAa,KAAK,sBAAsB,wCAAwC,+DAA+D,mBAAmB,wCAAwC,wBAAwB,8GAA8G,8CAA8C,2BAA2B,wBAAwB,0BAA0B,qNAAqN,saAAsa,4BAA4B,iDAAiD,qBAAqB,wBAAwB,8DAA8D,0BAA0B,qEAAqE,qBAAqB,uBAAuB,qHAAqH,EAAE,YAAY,4BAA4B,6GAA6G,0BAA0B,oCAAoC,cAAc,0BAA0B,6QAA6Q,0BAA0B,sGAAsG,sCAAsC,mCAAmC,sBAAsB,iDAAiD,6PAA6P,2BAA2B,0RAA0R,yBAAyB,2NAA2N,2BAA2B,wFAAwF,0BAA0B,8BAA8B,+BAA+B,uDAAuD,uBAAuB,qBAAqB,0BAA0B,wBAAwB,2FAA2F,0BAA0B,mBAAmB,iNAAiN,EAAE,kBAAkB,SAAS,iEAAiE,wBAAwB,0EAA0E,sGAAsG,iBAAiB,gDAAgD,uCAAuC,yBAAyB,aAAa,EAAE,cAAc,kBAAkB,SAAS,6NAA6N,wBAAwB,UAAU,kBAAkB,qCAAqC,eAAe,kCAAkC,uBAAuB,sBAAsB,sBAAsB,+GAA+G,yBAAyB,2EAA2E,wBAAwB,2EAA2E,yBAAyB,uBAAuB,wBAAwB,yDAAyD,uBAAuB,uDAAuD,sBAAsB,qBAAqB,mBAAmB,+DAA+D,sBAAsB,OAAO,yGAAyG,gMAAgM,uBAAuB,qCAAqC,wBAAwB,4BAA4B,mCAAmC,0BAA0B,8HAA8H,4BAA4B,kEAAkE,IAAI,+DAA+D,kEAAkE,2BAA2B,mBAAmB,yCAAyC,0BAA0B,0BAA0B,qBAAqB,wBAAwB,mCAAmC,uEAAuE,2GAA2G,2CAA2C,0MAA0M,0BAA0B,4CAA4C,eAAe,+OAA+O,kCAAkC,gCAAgC,qRAAqR,2EAA2E,cAAc,8BAA8B,yEAAyE,KAAK,yDAAyD,+DAA+D,eAAe,+EAA+E,kEAAkE,gCAAgC,0EAA0E,4BAA4B,6CAA6C,2BAA2B,+FAA+F,6CAA6C,iCAAiC,6DAA6D,OAAO,gDAAgD,6FAA6F,mCAAmC,cAAc,QAAQ,kBAAkB,QAAQ,KAAK,iBAAiB,QAAQ,gDAAgD,6FAA6F,wBAAwB,4BAA4B,6DAA6D,0BAA0B,6CAA6C,wBAAwB,mBAAmB,iIAAiI,4BAA4B,qCAAqC,2HAA2H,yDAAyD,2MAA2M,kCAAkC,sEAAsE,mCAAmC,oHAAoH,2BAA2B,uBAAuB,qIAAqI,oVAAoV,uBAAuB,qDAAqD,kCAAkC,2LAA2L,qCAAqC,qBAAqB,gBAAgB,MAAM,mCAAmC,0DAA0D,yLAAyL,kJAAkJ,0BAA0B,4BAA4B,8EAA8E,mDAAmD,KAAK,kBAAkB,WAAW,sBAAsB,WAAW,KAAK,iBAAiB,4CAA4C,4CAA4C,0BAA0B,wBAAwB,uCAAuC,gBAAgB,uDAAuD,wCAAwC,QAAQ,WAAW,0BAA0B,kCAAkC,0BAA0B,4BAA4B,gBAAgB,4BAA4B,2FAA2F,iCAAiC,kCAAkC,0CAA0C,0BAA0B,0DAA0D,+BAA+B,+DAA+D,8CAA8C,iCAAiC,mDAAmD,gEAAgE,8BAA8B,2BAA2B,8BAA8B,wCAAwC,mBAAmB,yBAAyB,qBAAqB,2DAA2D,0CAA0C,GAAG,uBAAuB,qBAAqB,yBAAyB,6LAA6L,wBAAwB,sHAAsH,wGAAwG,yBAAyB,6CAA6C,gBAAgB,EAAE,4BAA4B,0BAA0B,wBAAwB,EAAE,+BAA+B,sOAAsO,mBAAmB,+JAA+J,yBAAyB,kEAAkE,yBAAyB,mFAAmF,iBAAiB,kCAAkC,yBAAyB,mFAAmF,2BAA2B,4DAA4D,UAAU,EAAE,kBAAkB,SAAS,wHAAwH,0BAA0B,yTAAyT,sBAAsB,2EAA2E,0BAA0B,oCAAoC,2SAA2S,wBAAwB,OAAO,2EAA2E,+CAA+C,sCAAsC,oCAAoC,sCAAsC,2BAA2B,4CAA4C,8BAA8B,gCAAgC,+CAA+C,2BAA2B,mBAAmB,2BAA2B,4CAA4C,mEAAmE,2BAA2B,uDAAuD,kCAAkC,0BAA0B,QAAQ,8JAA8J,yBAAyB,qBAAqB,iFAAiF,4BAA4B,+FAA+F,EAAE,iBAAiB,mBAAmB,kBAAkB,kBAAkB,sGAAsG,UAAU,sBAAsB,0BAA0B,YAAY,UAAU,wBAAwB,8CAA8C,8DAA8D,8CAA8C,mBAAmB,8FAA8F,wCAAwC,iEAAiE,wBAAwB,gOAAgO,iGAAiG,yBAAyB,kDAAkD,EAAE,+BAA+B,oBAAoB,kBAAkB,SAAS,uBAAuB,wBAAwB,gDAAgD,kBAAkB,6MAA6M,qBAAqB,mEAAmE,sBAAsB,OAAO,sFAAsF,2DAA2D,yBAAyB,uCAAuC,oBAAoB,iEAAiE,gCAAgC,iPAAiP,iDAAiD,mBAAmB,iHAAiH,uBAAuB,qDAAqD,yBAAyB,oDAAoD,oBAAoB,kHAAkH,4HAA4H,gBAAgB,qBAAqB,wCAAwC,6CAA6C,4BAA4B,6BAA6B,kBAAkB,2CAA2C,2BAA2B,uDAAuD,yLAAyL,8BAA8B,uGAAuG,yBAAyB,+BAA+B,4EAA4E,gBAAgB,oBAAoB,6CAA6C,gCAAgC,4DAA4D,6KAA6K,mBAAmB,6GAA6G,uBAAuB,yBAAyB,qCAAqC,uCAAuC,yGAAyG,sBAAsB,uBAAuB,yBAAyB,iCAAiC,0HAA0H,yBAAyB,4EAA4E,0BAA0B,gDAAgD,8BAA8B,yCAAyC,kDAAkD,QAAQ,WAAW,KAAK,kCAAkC,UAAU,uBAAuB,8CAA8C,4BAA4B,uGAAuG,iCAAiC,gBAAgB,8BAA8B,+JAA+J,oBAAoB,iKAAiK,mBAAmB,yBAAyB,MAAM,kBAAkB,6CAA6C,2EAA2E,kBAAkB,2BAA2B,uBAAuB,kBAAkB,+EAA+E,iBAAiB,0BAA0B,EAAE,iFAAiF,qCAAqC,2BAA2B,kBAAkB,8CAA8C,MAAM,sBAAsB,IAAI,KAAK,sBAAsB,IAAI,8CAA8C,iBAAiB,wBAAwB,2BAA2B,+BAA+B,2GAA2G,uHAAuH,2BAA2B,gBAAgB,yTAAyT,sBAAsB,oEAAoE,EAAE,oGAAoG,kCAAkC,0BAA0B,uEAAuE,0CAA0C,6BAA6B,6BAA6B,yBAAyB,sIAAsI,iCAAiC,+BAA+B,8BAA8B,EAAE,qEAAqE,+QAA+Q,6BAA6B,YAAY,4BAA4B,uCAAuC,2BAA2B,eAAe,MAAM,sBAAsB,iJAAiJ,0BAA0B,eAAe,MAAM,sBAAsB,oJAAoJ,EAAE,eAAe,yBAAyB,kBAAkB,IAAI,mFAAmF,4DAA4D,SAAS,mBAAmB,8FAA8F,OAAO,0BAA0B,kDAAkD,oBAAoB,gFAAgF,uBAAuB,+BAA+B,8JAA8J,sBAAsB,mBAAmB,gFAAgF,yBAAyB,mBAAmB,6DAA6D,0BAA0B,qDAAqD,8fAA8f,2BAA2B,2EAA2E,+EAA+E,wBAAwB,YAAY,2BAA2B,iBAAiB,0BAA0B,kBAAkB,0BAA0B,qBAAqB,wCAAwC,uCAAuC,2BAA2B,qJAAqJ,8BAA8B,2GAA2G,yBAAyB,eAAe,oBAAoB,6CAA6C,gCAAgC,mDAAmD,kNAAkN,uBAAuB,yBAAyB,4IAA4I,sBAAsB,4GAA4G,yBAAyB,yEAAyE,yBAAyB,yBAAyB,0BAA0B,0BAA0B,onBAAonB,2BAA2B,+BAA+B,2BAA2B,kLAAkL,mBAAmB,wBAAwB,4BAA4B,2BAA2B,YAAY,0BAA0B,aAAa,EAAE,eAAe,6BAA6B,+BAA+B,wBAAwB,uGAAuG,yFAAyF,8BAA8B,0CAA0C,6BAA6B,4CAA4C,OAAO,8BAA8B,6BAA6B,gDAAgD,EAAE,kBAAkB,yBAAyB,8DAA8D,uBAAuB,iDAAiD,8BAA8B,oFAAoF,EAAE,6LAA6L,WAAW,EAAE,kBAAkB,uBAAuB,qIAAqI,qBAAqB,uDAAuD,wBAAwB,uDAAuD,kBAAkB,mBAAmB,qBAAqB,iCAAiC,wBAAwB,yCAAyC,qCAAqC,+FAA+F,0BAA0B,mDAAmD,mIAAmI,2FAA2F,OAAO,0BAA0B,gNAAgN,wDAAwD,mFAAmF,oBAAoB,4FAA4F,2FAA2F,OAAO,wBAAwB,8DAA8D,+FAA+F,8GAA8G,0CAA0C,gBAAgB,GAAG,wBAAwB,gCAAgC,EAAE,2DAA2D,mBAAmB,EAAE,kBAAkB,oBAAoB,kDAAkD,wBAAwB,mDAAmD,4BAA4B,uFAAuF,uFAAuF,EAAE,mEAAmE,4HAA4H,EAAE,kBAAkB,oBAAoB,qBAAqB,gBAAgB,oEAAoE,sEAAsE,wNAAwN,sHAAsH,wBAAwB,gHAAgH,kBAAkB,+CAA+C,mBAAmB,gDAAgD,yBAAyB,gBAAgB,gFAAgF,qCAAqC,+PAA+P,4BAA4B,6FAA6F,qBAAqB,8BAA8B,gGAAgG,oEAAoE,wCAAwC,6BAA6B,KAAK,8CAA8C,6CAA6C,uBAAuB,4EAA4E,sGAAsG,6BAA6B,+BAA+B,4BAA4B,uCAAuC,sFAAsF,sQAAsQ,2BAA2B,kKAAkK,oFAAoF,wBAAwB,+DAA+D,2CAA2C,KAAK,gCAAgC,kQAAkQ,+DAA+D,WAAW,qDAAqD,EAAE,uBAAuB,EAAE,4DAA4D,gCAAgC,EAAE,kBAAkB,UAAU,wFAAwF,wBAAwB,kGAAkG,qBAAqB,2BAA2B,sCAAsC,kEAAkE,qBAAqB,4CAA4C,OAAO,wBAAwB,6CAA6C,kEAAkE,sBAAsB,4CAA4C,OAAO,yBAAyB,mBAAmB,uGAAuG,mDAAmD,qBAAqB,yCAAyC,oBAAoB,wCAAwC,0BAA0B,0BAA0B,iBAAiB,wBAAwB,IAAI,0BAA0B,yBAAyB,IAAI,wBAAwB,wBAAwB,IAAI,uBAAuB,sBAAsB,IAAI,wBAAwB,2BAA2B,2BAA2B,iBAAiB,0BAA0B,IAAI,qBAAqB,2BAA2B,IAAI,uBAAuB,sBAAsB,4CAA4C,yBAAyB,4CAA4C,wBAAwB,sCAAsC,8BAA8B,yLAAyL,sFAAsF,KAAK,gEAAgE,eAAe,QAAQ,EAAE,4DAA4D,+DAA+D,EAAE,kBAAkB,oBAAoB,6EAA6E,wBAAwB,+DAA+D,4BAA4B,kDAAkD,uHAAuH,gDAAgD,oFAAoF,yBAAyB,8DAA8D,UAAU,gLAAgL,qIAAqI,EAAE,mEAAmE,uBAAuB,EAAE,kBAAkB,oBAAoB,wDAAwD,wBAAwB,wDAAwD,qBAAqB,cAAc,8GAA8G,8BAA8B,kKAAkK,2FAA2F,4DAA4D,2CAA2C,QAAQ,mBAAmB,gDAAgD,2CAA2C,6CAA6C,qCAAqC,yJAAyJ,wBAAwB,+EAA+E,qBAAqB,mBAAmB,2EAA2E,8BAA8B,0CAA0C,qKAAqK,EAAE,gEAAgE,wCAAwC,EAAE,kBAAkB,oBAAoB,4GAA4G,wBAAwB,4GAA4G,2BAA2B,gBAAgB,uEAAuE,8FAA8F,6ZAA6Z,0BAA0B,mDAAmD,4IAA4I,uNAAuN,8CAA8C,KAAK,0DAA0D,iCAAiC,8FAA8F,uEAAuE,2CAA2C,kBAAkB,EAAE,sCAAsC,wBAAwB,iXAAiX,EAAE,4pBAA4pB,mBAAmB,8CAA8C,iBAAiB,kDAAkD,qBAAqB,kDAAkD,qBAAqB,8CAA8C,qBAAqB,kDAAkD,mBAAmB,sCAAsC,mBAAmB,8BAA8B,iBAAiB,oCAAoC,iBAAiB,oCAAoC,mBAAmB,sEAAsE,iBAAiB,kHAAkH,mBAAmB,sCAAsC,qBAAqB,wCAAwC,mBAAmB,sCAAsC,mBAAmB,0CAA0C,mBAAmB,8BAA8B,oBAAoB,gBAAgB,wBAAwB,wBAAwB,YAAY,E;;;;;;;;;;;;ACJ/m2I;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEe,gFAAiB,EAAC;;;;;;;;;;;;AClFjC;;AAEA,WAAW,mBAAO,CAAC,uEAAyB;AAC5C,mBAAO,CAAC,oEAAc;AACtB,gBAAgB,mBAAO,CAAC,uGAAuB;;AAE/C,mBAAO,CAAC,qEAAgB;;;;;;;;;;;;ACNxB,uC","file":"plugins/custom/leaflet/leaflet.bundle.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, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\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 = \"./webpack/plugins/custom/leaflet/leaflet.js\");\n","/* @preserve\n* @terraformer/arcgis - v2.0.6 - MIT\n* Copyright (c) 2012-2020 Environmental Systems Research Institute, Inc.\n* Mon May 18 2020 14:30:35 GMT-0700 (Pacific Daylight Time)\n*/\n/* Copyright (c) 2012-2019 Environmental Systems Research Institute, Inc.\n * Apache-2.0 */\n\nvar edgeIntersectsEdge = function edgeIntersectsEdge(a1, a2, b1, b2) {\n var uaT = (b2[0] - b1[0]) * (a1[1] - b1[1]) - (b2[1] - b1[1]) * (a1[0] - b1[0]);\n var ubT = (a2[0] - a1[0]) * (a1[1] - b1[1]) - (a2[1] - a1[1]) * (a1[0] - b1[0]);\n var uB = (b2[1] - b1[1]) * (a2[0] - a1[0]) - (b2[0] - b1[0]) * (a2[1] - a1[1]);\n\n if (uB !== 0) {\n var ua = uaT / uB;\n var ub = ubT / uB;\n\n if (ua >= 0 && ua <= 1 && ub >= 0 && ub <= 1) {\n return true;\n }\n }\n\n return false;\n};\nvar coordinatesContainPoint = function coordinatesContainPoint(coordinates, point) {\n var contains = false;\n\n for (var i = -1, l = coordinates.length, j = l - 1; ++i < l; j = i) {\n if ((coordinates[i][1] <= point[1] && point[1] < coordinates[j][1] || coordinates[j][1] <= point[1] && point[1] < coordinates[i][1]) && point[0] < (coordinates[j][0] - coordinates[i][0]) * (point[1] - coordinates[i][1]) / (coordinates[j][1] - coordinates[i][1]) + coordinates[i][0]) {\n contains = !contains;\n }\n }\n\n return contains;\n};\nvar pointsEqual = function pointsEqual(a, b) {\n for (var i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n\n return true;\n};\nvar arrayIntersectsArray = function arrayIntersectsArray(a, b) {\n for (var i = 0; i < a.length - 1; i++) {\n for (var j = 0; j < b.length - 1; j++) {\n if (edgeIntersectsEdge(a[i], a[i + 1], b[j], b[j + 1])) {\n return true;\n }\n }\n }\n\n return false;\n};\n\n/* Copyright (c) 2012-2019 Environmental Systems Research Institute, Inc.\n * Apache-2.0 */\n\nvar closeRing = function closeRing(coordinates) {\n if (!pointsEqual(coordinates[0], coordinates[coordinates.length - 1])) {\n coordinates.push(coordinates[0]);\n }\n\n return coordinates;\n}; // determine if polygon ring coordinates are clockwise. clockwise signifies outer ring, counter-clockwise an inner ring\n// or hole. this logic was found at http://stackoverflow.com/questions/1165647/how-to-determine-if-a-list-of-polygon-\n// points-are-in-clockwise-order\n\nvar ringIsClockwise = function ringIsClockwise(ringToTest) {\n var total = 0;\n var i = 0;\n var rLength = ringToTest.length;\n var pt1 = ringToTest[i];\n var pt2;\n\n for (i; i < rLength - 1; i++) {\n pt2 = ringToTest[i + 1];\n total += (pt2[0] - pt1[0]) * (pt2[1] + pt1[1]);\n pt1 = pt2;\n }\n\n return total >= 0;\n}; // This function ensures that rings are oriented in the right directions\n// from http://jsperf.com/cloning-an-object/2\n\nvar shallowClone = function shallowClone(obj) {\n var target = {};\n\n for (var i in obj) {\n // both arcgis attributes and geojson props are just hardcoded keys\n if (obj.hasOwnProperty(i)) {\n // eslint-disable-line no-prototype-builtins\n target[i] = obj[i];\n }\n }\n\n return target;\n};\n\n/* Copyright (c) 2012-2019 Environmental Systems Research Institute, Inc.\n * Apache-2.0 */\n\nvar coordinatesContainCoordinates = function coordinatesContainCoordinates(outer, inner) {\n var intersects = arrayIntersectsArray(outer, inner);\n var contains = coordinatesContainPoint(outer, inner[0]);\n\n if (!intersects && contains) {\n return true;\n }\n\n return false;\n}; // do any polygons in this array contain any other polygons in this array?\n// used for checking for holes in arcgis rings\n\n\nvar convertRingsToGeoJSON = function convertRingsToGeoJSON(rings) {\n var outerRings = [];\n var holes = [];\n var x; // iterator\n\n var outerRing; // current outer ring being evaluated\n\n var hole; // current hole being evaluated\n // for each ring\n\n for (var r = 0; r < rings.length; r++) {\n var ring = closeRing(rings[r].slice(0));\n\n if (ring.length < 4) {\n continue;\n } // is this ring an outer ring? is it clockwise?\n\n\n if (ringIsClockwise(ring)) {\n var polygon = [ring.slice().reverse()]; // wind outer rings counterclockwise for RFC 7946 compliance\n\n outerRings.push(polygon); // push to outer rings\n } else {\n holes.push(ring.slice().reverse()); // wind inner rings clockwise for RFC 7946 compliance\n }\n }\n\n var uncontainedHoles = []; // while there are holes left...\n\n while (holes.length) {\n // pop a hole off out stack\n hole = holes.pop(); // loop over all outer rings and see if they contain our hole.\n\n var contained = false;\n\n for (x = outerRings.length - 1; x >= 0; x--) {\n outerRing = outerRings[x][0];\n\n if (coordinatesContainCoordinates(outerRing, hole)) {\n // the hole is contained push it into our polygon\n outerRings[x].push(hole);\n contained = true;\n break;\n }\n } // ring is not contained in any outer ring\n // sometimes this happens https://github.com/Esri/esri-leaflet/issues/320\n\n\n if (!contained) {\n uncontainedHoles.push(hole);\n }\n } // if we couldn't match any holes using contains we can try intersects...\n\n\n while (uncontainedHoles.length) {\n // pop a hole off out stack\n hole = uncontainedHoles.pop(); // loop over all outer rings and see if any intersect our hole.\n\n var intersects = false;\n\n for (x = outerRings.length - 1; x >= 0; x--) {\n outerRing = outerRings[x][0];\n\n if (arrayIntersectsArray(outerRing, hole)) {\n // the hole is contained push it into our polygon\n outerRings[x].push(hole);\n intersects = true;\n break;\n }\n }\n\n if (!intersects) {\n outerRings.push([hole.reverse()]);\n }\n }\n\n if (outerRings.length === 1) {\n return {\n type: 'Polygon',\n coordinates: outerRings[0]\n };\n } else {\n return {\n type: 'MultiPolygon',\n coordinates: outerRings\n };\n }\n};\n\nvar getId = function getId(attributes, idAttribute) {\n var keys = idAttribute ? [idAttribute, 'OBJECTID', 'FID'] : ['OBJECTID', 'FID'];\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key in attributes && (typeof attributes[key] === 'string' || typeof attributes[key] === 'number')) {\n return attributes[key];\n }\n }\n\n throw Error('No valid id attribute found');\n};\n\nvar arcgisToGeoJSON = function arcgisToGeoJSON(arcgis, idAttribute) {\n var geojson = {};\n\n if (arcgis.features) {\n geojson.type = 'FeatureCollection';\n geojson.features = [];\n\n for (var i = 0; i < arcgis.features.length; i++) {\n geojson.features.push(arcgisToGeoJSON(arcgis.features[i], idAttribute));\n }\n }\n\n if (typeof arcgis.x === 'number' && typeof arcgis.y === 'number') {\n geojson.type = 'Point';\n geojson.coordinates = [arcgis.x, arcgis.y];\n\n if (typeof arcgis.z === 'number') {\n geojson.coordinates.push(arcgis.z);\n }\n }\n\n if (arcgis.points) {\n geojson.type = 'MultiPoint';\n geojson.coordinates = arcgis.points.slice(0);\n }\n\n if (arcgis.paths) {\n if (arcgis.paths.length === 1) {\n geojson.type = 'LineString';\n geojson.coordinates = arcgis.paths[0].slice(0);\n } else {\n geojson.type = 'MultiLineString';\n geojson.coordinates = arcgis.paths.slice(0);\n }\n }\n\n if (arcgis.rings) {\n geojson = convertRingsToGeoJSON(arcgis.rings.slice(0));\n }\n\n if (typeof arcgis.xmin === 'number' && typeof arcgis.ymin === 'number' && typeof arcgis.xmax === 'number' && typeof arcgis.ymax === 'number') {\n geojson.type = 'Polygon';\n geojson.coordinates = [[[arcgis.xmax, arcgis.ymax], [arcgis.xmin, arcgis.ymax], [arcgis.xmin, arcgis.ymin], [arcgis.xmax, arcgis.ymin], [arcgis.xmax, arcgis.ymax]]];\n }\n\n if (arcgis.geometry || arcgis.attributes) {\n geojson.type = 'Feature';\n geojson.geometry = arcgis.geometry ? arcgisToGeoJSON(arcgis.geometry) : null;\n geojson.properties = arcgis.attributes ? shallowClone(arcgis.attributes) : null;\n\n if (arcgis.attributes) {\n try {\n geojson.id = getId(arcgis.attributes, idAttribute);\n } catch (err) {// don't set an id\n }\n }\n } // if no valid geometry was encountered\n\n\n if (JSON.stringify(geojson.geometry) === JSON.stringify({})) {\n geojson.geometry = null;\n }\n\n if (arcgis.spatialReference && arcgis.spatialReference.wkid && arcgis.spatialReference.wkid !== 4326) {\n console.warn('Object converted in non-standard crs - ' + JSON.stringify(arcgis.spatialReference));\n }\n\n return geojson;\n};\n\n/* Copyright (c) 2012-2019 Environmental Systems Research Institute, Inc.\n * Apache-2.0 */\n// outer rings are clockwise, holes are counterclockwise\n// used for converting GeoJSON Polygons to ArcGIS Polygons\n\nvar orientRings = function orientRings(poly) {\n var output = [];\n var polygon = poly.slice(0);\n var outerRing = closeRing(polygon.shift().slice(0));\n\n if (outerRing.length >= 4) {\n if (!ringIsClockwise(outerRing)) {\n outerRing.reverse();\n }\n\n output.push(outerRing);\n\n for (var i = 0; i < polygon.length; i++) {\n var hole = closeRing(polygon[i].slice(0));\n\n if (hole.length >= 4) {\n if (ringIsClockwise(hole)) {\n hole.reverse();\n }\n\n output.push(hole);\n }\n }\n }\n\n return output;\n}; // This function flattens holes in multipolygons to one array of polygons\n// used for converting GeoJSON Polygons to ArcGIS Polygons\n\n\nvar flattenMultiPolygonRings = function flattenMultiPolygonRings(rings) {\n var output = [];\n\n for (var i = 0; i < rings.length; i++) {\n var polygon = orientRings(rings[i]);\n\n for (var x = polygon.length - 1; x >= 0; x--) {\n var ring = polygon[x].slice(0);\n output.push(ring);\n }\n }\n\n return output;\n};\n\nvar geojsonToArcGIS = function geojsonToArcGIS(geojson, idAttribute) {\n idAttribute = idAttribute || 'OBJECTID';\n var spatialReference = {\n wkid: 4326\n };\n var result = {};\n var i;\n\n switch (geojson.type) {\n case 'Point':\n result.x = geojson.coordinates[0];\n result.y = geojson.coordinates[1];\n result.spatialReference = spatialReference;\n break;\n\n case 'MultiPoint':\n result.points = geojson.coordinates.slice(0);\n result.spatialReference = spatialReference;\n break;\n\n case 'LineString':\n result.paths = [geojson.coordinates.slice(0)];\n result.spatialReference = spatialReference;\n break;\n\n case 'MultiLineString':\n result.paths = geojson.coordinates.slice(0);\n result.spatialReference = spatialReference;\n break;\n\n case 'Polygon':\n result.rings = orientRings(geojson.coordinates.slice(0));\n result.spatialReference = spatialReference;\n break;\n\n case 'MultiPolygon':\n result.rings = flattenMultiPolygonRings(geojson.coordinates.slice(0));\n result.spatialReference = spatialReference;\n break;\n\n case 'Feature':\n if (geojson.geometry) {\n result.geometry = geojsonToArcGIS(geojson.geometry, idAttribute);\n }\n\n result.attributes = geojson.properties ? shallowClone(geojson.properties) : {};\n\n if (geojson.id) {\n result.attributes[idAttribute] = geojson.id;\n }\n\n break;\n\n case 'FeatureCollection':\n result = [];\n\n for (i = 0; i < geojson.features.length; i++) {\n result.push(geojsonToArcGIS(geojson.features[i], idAttribute));\n }\n\n break;\n\n case 'GeometryCollection':\n result = [];\n\n for (i = 0; i < geojson.geometries.length; i++) {\n result.push(geojsonToArcGIS(geojson.geometries[i], idAttribute));\n }\n\n break;\n }\n\n return result;\n};\n\n/* Copyright (c) 2012-2019 Environmental Systems Research Institute, Inc.\n * Apache-2.0 */\n\nexport { arcgisToGeoJSON, geojsonToArcGIS };\n","/* esri-leaflet-geocoder - v2.3.3 - Fri May 29 2020 15:01:40 GMT-0500 (Central Daylight Time)\n * Copyright (c) 2020 Environmental Systems Research Institute, Inc.\n * Apache-2.0 */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('leaflet'), require('esri-leaflet')) :\n typeof define === 'function' && define.amd ? define(['exports', 'leaflet', 'esri-leaflet'], factory) :\n (global = global || self, factory((global.L = global.L || {}, global.L.esri = global.L.esri || {}, global.L.esri.Geocoding = {}), global.L, global.L.esri));\n}(this, (function (exports, leaflet, esriLeaflet) { 'use strict';\n\n var version = \"2.3.3\";\n\n var WorldGeocodingServiceUrl = 'https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/';\n\n var Geocode = esriLeaflet.Task.extend({\r\n path: 'findAddressCandidates',\r\n\r\n params: {\r\n outSr: 4326,\r\n forStorage: false,\r\n outFields: '*',\r\n maxLocations: 20\r\n },\r\n\r\n setters: {\r\n 'address': 'address',\r\n 'neighborhood': 'neighborhood',\r\n 'city': 'city',\r\n 'subregion': 'subregion',\r\n 'region': 'region',\r\n 'postal': 'postal',\r\n 'country': 'country',\r\n 'text': 'singleLine',\r\n 'category': 'category',\r\n 'token': 'token',\r\n 'key': 'magicKey',\r\n 'fields': 'outFields',\r\n 'forStorage': 'forStorage',\r\n 'maxLocations': 'maxLocations',\r\n // World Geocoding Service (only works with singleLine)\r\n 'countries': 'sourceCountry'\r\n },\r\n\r\n initialize: function (options) {\r\n options = options || {};\r\n options.url = options.url || WorldGeocodingServiceUrl;\r\n esriLeaflet.Task.prototype.initialize.call(this, options);\r\n },\r\n\r\n within: function (bounds) {\r\n bounds = leaflet.latLngBounds(bounds);\r\n this.params.searchExtent = esriLeaflet.Util.boundsToExtent(bounds);\r\n return this;\r\n },\r\n\r\n nearby: function (coords, radius) {\r\n var centroid = leaflet.latLng(coords);\r\n this.params.location = centroid.lng + ',' + centroid.lat;\r\n this.params.distance = Math.min(Math.max(radius, 2000), 50000);\r\n return this;\r\n },\r\n\r\n run: function (callback, context) {\r\n if (this.options.customParam) {\r\n this.params[this.options.customParam] = this.params.singleLine;\r\n delete this.params.singleLine;\r\n }\r\n\r\n return this.request(function (error, response) {\r\n var processor = this._processGeocoderResponse;\r\n var results = (!error) ? processor(response) : undefined;\r\n callback.call(context, error, { results: results }, response);\r\n }, this);\r\n },\r\n\r\n _processGeocoderResponse: function (response) {\r\n var results = [];\r\n\r\n for (var i = 0; i < response.candidates.length; i++) {\r\n var candidate = response.candidates[i];\r\n if (candidate.extent) {\r\n var bounds = esriLeaflet.Util.extentToBounds(candidate.extent);\r\n }\r\n\r\n results.push({\r\n text: candidate.address,\r\n bounds: bounds,\r\n score: candidate.score,\r\n latlng: leaflet.latLng(candidate.location.y, candidate.location.x),\r\n properties: candidate.attributes\r\n });\r\n }\r\n return results;\r\n }\r\n });\r\n\r\n function geocode (options) {\r\n return new Geocode(options);\r\n }\n\n var ReverseGeocode = esriLeaflet.Task.extend({\r\n path: 'reverseGeocode',\r\n\r\n params: {\r\n outSR: 4326,\r\n returnIntersection: false\r\n },\r\n\r\n setters: {\r\n 'distance': 'distance',\r\n 'language': 'langCode',\r\n 'intersection': 'returnIntersection'\r\n },\r\n\r\n initialize: function (options) {\r\n options = options || {};\r\n options.url = options.url || WorldGeocodingServiceUrl;\r\n esriLeaflet.Task.prototype.initialize.call(this, options);\r\n },\r\n\r\n latlng: function (coords) {\r\n var centroid = leaflet.latLng(coords);\r\n this.params.location = centroid.lng + ',' + centroid.lat;\r\n return this;\r\n },\r\n\r\n run: function (callback, context) {\r\n return this.request(function (error, response) {\r\n var result;\r\n\r\n if (!error) {\r\n result = {\r\n latlng: leaflet.latLng(response.location.y, response.location.x),\r\n address: response.address\r\n };\r\n } else {\r\n result = undefined;\r\n }\r\n\r\n callback.call(context, error, result, response);\r\n }, this);\r\n }\r\n });\r\n\r\n function reverseGeocode (options) {\r\n return new ReverseGeocode(options);\r\n }\n\n var Suggest = esriLeaflet.Task.extend({\r\n path: 'suggest',\r\n\r\n params: {},\r\n\r\n setters: {\r\n text: 'text',\r\n category: 'category',\r\n countries: 'countryCode',\r\n maxSuggestions: 'maxSuggestions'\r\n },\r\n\r\n initialize: function (options) {\r\n options = options || {};\r\n if (!options.url) {\r\n options.url = WorldGeocodingServiceUrl;\r\n options.supportsSuggest = true;\r\n }\r\n esriLeaflet.Task.prototype.initialize.call(this, options);\r\n },\r\n\r\n within: function (bounds) {\r\n bounds = leaflet.latLngBounds(bounds);\r\n bounds = bounds.pad(0.5);\r\n var center = bounds.getCenter();\r\n var ne = bounds.getNorthWest();\r\n this.params.location = center.lng + ',' + center.lat;\r\n this.params.distance = Math.min(Math.max(center.distanceTo(ne), 2000), 50000);\r\n this.params.searchExtent = esriLeaflet.Util.boundsToExtent(bounds);\r\n return this;\r\n },\r\n\r\n nearby: function (coords, radius) {\r\n var centroid = leaflet.latLng(coords);\r\n this.params.location = centroid.lng + ',' + centroid.lat;\r\n this.params.distance = Math.min(Math.max(radius, 2000), 50000);\r\n return this;\r\n },\r\n\r\n run: function (callback, context) {\r\n if (this.options.supportsSuggest) {\r\n return this.request(function (error, response) {\r\n callback.call(context, error, response, response);\r\n }, this);\r\n } else {\r\n console.warn('this geocoding service does not support asking for suggestions');\r\n }\r\n }\r\n\r\n });\r\n\r\n function suggest (options) {\r\n return new Suggest(options);\r\n }\n\n var GeocodeService = esriLeaflet.Service.extend({\r\n initialize: function (options) {\r\n options = options || {};\r\n if (options.url) {\r\n esriLeaflet.Service.prototype.initialize.call(this, options);\r\n this._confirmSuggestSupport();\r\n } else {\r\n options.url = WorldGeocodingServiceUrl;\r\n options.supportsSuggest = true;\r\n esriLeaflet.Service.prototype.initialize.call(this, options);\r\n }\r\n },\r\n\r\n geocode: function () {\r\n return geocode(this);\r\n },\r\n\r\n reverse: function () {\r\n return reverseGeocode(this);\r\n },\r\n\r\n suggest: function () {\r\n // requires either the Esri World Geocoding Service or a <10.3 ArcGIS Server Geocoding Service that supports suggest.\r\n return suggest(this);\r\n },\r\n\r\n _confirmSuggestSupport: function () {\r\n this.metadata(function (error, response) {\r\n if (error) { return; }\r\n // pre 10.3 geocoding services dont list capabilities (and dont support maxLocations)\r\n // only SOME individual services have been configured to support asking for suggestions\r\n if (!response.capabilities) {\r\n this.options.supportsSuggest = false;\r\n } else if (response.capabilities.indexOf('Suggest') > -1) {\r\n this.options.supportsSuggest = true;\r\n } else {\r\n this.options.supportsSuggest = false;\r\n }\r\n // whether the service supports suggest or not, utilize the metadata response to determine the appropriate parameter name for single line geocoding requests\r\n this.options.customParam = response.singleLineAddressField.name;\r\n }, this);\r\n }\r\n });\r\n\r\n function geocodeService (options) {\r\n return new GeocodeService(options);\r\n }\n\n var GeosearchCore = leaflet.Evented.extend({\r\n\r\n options: {\r\n zoomToResult: true,\r\n useMapBounds: 12,\r\n searchBounds: null\r\n },\r\n\r\n initialize: function (control, options) {\r\n leaflet.Util.setOptions(this, options);\r\n this._control = control;\r\n\r\n if (!options || !options.providers || !options.providers.length) {\r\n throw new Error('You must specify at least one provider');\r\n }\r\n\r\n this._providers = options.providers;\r\n },\r\n\r\n _geocode: function (text, key, provider) {\r\n var activeRequests = 0;\r\n var allResults = [];\r\n var bounds;\r\n\r\n var callback = leaflet.Util.bind(function (error, results) {\r\n activeRequests--;\r\n if (error) {\r\n return;\r\n }\r\n\r\n if (results) {\r\n allResults = allResults.concat(results);\r\n }\r\n\r\n if (activeRequests <= 0) {\r\n bounds = this._boundsFromResults(allResults);\r\n\r\n this.fire('results', {\r\n results: allResults,\r\n bounds: bounds,\r\n latlng: (bounds) ? bounds.getCenter() : undefined,\r\n text: text\r\n }, true);\r\n\r\n if (this.options.zoomToResult && bounds) {\r\n this._control._map.fitBounds(bounds);\r\n }\r\n\r\n this.fire('load');\r\n }\r\n }, this);\r\n\r\n if (key) {\r\n activeRequests++;\r\n provider.results(text, key, this._searchBounds(), callback);\r\n } else {\r\n for (var i = 0; i < this._providers.length; i++) {\r\n activeRequests++;\r\n this._providers[i].results(text, key, this._searchBounds(), callback);\r\n }\r\n }\r\n },\r\n\r\n _suggest: function (text) {\r\n var activeRequests = this._providers.length;\r\n var suggestionsLength = 0;\r\n\r\n var createCallback = leaflet.Util.bind(function (text, provider) {\r\n return leaflet.Util.bind(function (error, suggestions) {\r\n activeRequests = activeRequests - 1;\r\n suggestionsLength += suggestions.length;\r\n\r\n if (error) {\r\n // an error occurred for one of the providers' suggest requests\r\n this._control._clearProviderSuggestions(provider);\r\n\r\n // perform additional cleanup when all requests are finished\r\n this._control._finalizeSuggestions(activeRequests, suggestionsLength);\r\n\r\n return;\r\n }\r\n\r\n if (suggestions.length) {\r\n for (var i = 0; i < suggestions.length; i++) {\r\n suggestions[i].provider = provider;\r\n }\r\n } else {\r\n // we still need to update the UI\r\n this._control._renderSuggestions(suggestions);\r\n }\r\n\r\n if (provider._lastRender !== text) {\r\n this._control._clearProviderSuggestions(provider);\r\n }\r\n\r\n if (suggestions.length && this._control._input.value === text) {\r\n provider._lastRender = text;\r\n this._control._renderSuggestions(suggestions);\r\n }\r\n\r\n // perform additional cleanup when all requests are finished\r\n this._control._finalizeSuggestions(activeRequests, suggestionsLength);\r\n }, this);\r\n }, this);\r\n\r\n this._pendingSuggestions = [];\r\n\r\n for (var i = 0; i < this._providers.length; i++) {\r\n var provider = this._providers[i];\r\n var request = provider.suggestions(text, this._searchBounds(), createCallback(text, provider));\r\n this._pendingSuggestions.push(request);\r\n }\r\n },\r\n\r\n _searchBounds: function () {\r\n if (this.options.searchBounds !== null) {\r\n return this.options.searchBounds;\r\n }\r\n\r\n if (this.options.useMapBounds === false) {\r\n return null;\r\n }\r\n\r\n if (this.options.useMapBounds === true) {\r\n return this._control._map.getBounds();\r\n }\r\n\r\n if (this.options.useMapBounds <= this._control._map.getZoom()) {\r\n return this._control._map.getBounds();\r\n }\r\n\r\n return null;\r\n },\r\n\r\n _boundsFromResults: function (results) {\r\n if (!results.length) {\r\n return;\r\n }\r\n\r\n var nullIsland = leaflet.latLngBounds([0, 0], [0, 0]);\r\n var resultBounds = [];\r\n var resultLatlngs = [];\r\n\r\n // collect the bounds and center of each result\r\n for (var i = results.length - 1; i >= 0; i--) {\r\n var result = results[i];\r\n\r\n resultLatlngs.push(result.latlng);\r\n\r\n // make sure bounds are valid and not 0,0. sometimes bounds are incorrect or not present\r\n if (result.bounds && result.bounds.isValid() && !result.bounds.equals(nullIsland)) {\r\n resultBounds.push(result.bounds);\r\n }\r\n }\r\n\r\n // form a bounds object containing all center points\r\n var bounds = leaflet.latLngBounds(resultLatlngs);\r\n\r\n // and extend it to contain all bounds objects\r\n for (var j = 0; j < resultBounds.length; j++) {\r\n bounds.extend(resultBounds[j]);\r\n }\r\n\r\n return bounds;\r\n },\r\n\r\n _getAttribution: function () {\r\n var attribs = [];\r\n var providers = this._providers;\r\n\r\n for (var i = 0; i < providers.length; i++) {\r\n if (providers[i].options.attribution) {\r\n attribs.push(providers[i].options.attribution);\r\n }\r\n }\r\n\r\n return attribs.join(', ');\r\n }\r\n\r\n });\r\n\r\n function geosearchCore (control, options) {\r\n return new GeosearchCore(control, options);\r\n }\n\n var ArcgisOnlineProvider = GeocodeService.extend({\r\n options: {\r\n label: 'Places and Addresses',\r\n maxResults: 5\r\n },\r\n\r\n suggestions: function (text, bounds, callback) {\r\n var request = this.suggest().text(text);\r\n\r\n if (bounds) {\r\n request.within(bounds);\r\n }\r\n\r\n if (this.options.countries) {\r\n request.countries(this.options.countries);\r\n }\r\n\r\n if (this.options.categories) {\r\n request.category(this.options.categories);\r\n }\r\n\r\n // 15 is the maximum number of suggestions that can be returned\r\n request.maxSuggestions(this.options.maxResults);\r\n\r\n return request.run(function (error, results, response) {\r\n var suggestions = [];\r\n if (!error) {\r\n while (response.suggestions.length && suggestions.length <= (this.options.maxResults - 1)) {\r\n var suggestion = response.suggestions.shift();\r\n if (!suggestion.isCollection) {\r\n suggestions.push({\r\n text: suggestion.text,\r\n unformattedText: suggestion.text,\r\n magicKey: suggestion.magicKey\r\n });\r\n }\r\n }\r\n }\r\n callback(error, suggestions);\r\n }, this);\r\n },\r\n\r\n results: function (text, key, bounds, callback) {\r\n var request = this.geocode().text(text);\r\n\r\n if (key) {\r\n request.key(key);\r\n }\r\n // in the future Address/StreetName geocoding requests that include a magicKey will always only return one match\r\n request.maxLocations(this.options.maxResults);\r\n\r\n if (bounds) {\r\n request.within(bounds);\r\n }\r\n\r\n if (this.options.forStorage) {\r\n request.forStorage(true);\r\n }\r\n\r\n if (this.options.countries) {\r\n request.countries(this.options.countries);\r\n }\r\n\r\n if (this.options.categories) {\r\n request.category(this.options.categories);\r\n }\r\n\r\n return request.run(function (error, response) {\r\n callback(error, response.results);\r\n }, this);\r\n }\r\n });\r\n\r\n function arcgisOnlineProvider (options) {\r\n return new ArcgisOnlineProvider(options);\r\n }\n\n var Geosearch = leaflet.Control.extend({\r\n includes: leaflet.Evented.prototype,\r\n\r\n options: {\r\n position: 'topleft',\r\n collapseAfterResult: true,\r\n expanded: false,\r\n allowMultipleResults: true,\r\n placeholder: 'Search for places or addresses',\r\n title: 'Location Search'\r\n },\r\n\r\n initialize: function (options) {\r\n leaflet.Util.setOptions(this, options);\r\n\r\n if (!options || !options.providers || !options.providers.length) {\r\n if (!options) {\r\n options = {};\r\n }\r\n options.providers = [ arcgisOnlineProvider() ];\r\n }\r\n\r\n // instantiate the underlying class and pass along options\r\n this._geosearchCore = geosearchCore(this, options);\r\n this._geosearchCore._providers = options.providers;\r\n\r\n // bubble each providers events to the control\r\n this._geosearchCore.addEventParent(this);\r\n for (var i = 0; i < this._geosearchCore._providers.length; i++) {\r\n this._geosearchCore._providers[i].addEventParent(this);\r\n }\r\n\r\n this._geosearchCore._pendingSuggestions = [];\r\n\r\n leaflet.Control.prototype.initialize.call(this, options);\r\n },\r\n\r\n _renderSuggestions: function (suggestions) {\r\n var currentGroup;\r\n\r\n if (suggestions.length > 0) {\r\n this._suggestions.style.display = 'block';\r\n }\r\n\r\n var list;\r\n var header;\r\n var suggestionTextArray = [];\r\n\r\n for (var i = 0; i < suggestions.length; i++) {\r\n var suggestion = suggestions[i];\r\n if (!header && this._geosearchCore._providers.length > 1 && currentGroup !== suggestion.provider.options.label) {\r\n header = leaflet.DomUtil.create('div', 'geocoder-control-header', suggestion.provider._contentsElement);\r\n header.textContent = suggestion.provider.options.label;\r\n header.innerText = suggestion.provider.options.label;\r\n currentGroup = suggestion.provider.options.label;\r\n }\r\n\r\n if (!list) {\r\n list = leaflet.DomUtil.create('ul', 'geocoder-control-list', suggestion.provider._contentsElement);\r\n }\r\n\r\n if (suggestionTextArray.indexOf(suggestion.text) === -1) {\r\n var suggestionItem = leaflet.DomUtil.create('li', 'geocoder-control-suggestion', list);\r\n\r\n suggestionItem.innerHTML = suggestion.text;\r\n suggestionItem.provider = suggestion.provider;\r\n suggestionItem['data-magic-key'] = suggestion.magicKey;\r\n suggestionItem.unformattedText = suggestion.unformattedText;\r\n } else {\r\n for (var j = 0; j < list.childNodes.length; j++) {\r\n // if the same text already appears in the list of suggestions, append an additional ObjectID to its magicKey instead\r\n if (list.childNodes[j].innerHTML === suggestion.text) {\r\n list.childNodes[j]['data-magic-key'] += ',' + suggestion.magicKey;\r\n }\r\n }\r\n }\r\n suggestionTextArray.push(suggestion.text);\r\n }\r\n\r\n // when the geocoder position is either \"topleft\" or \"topright\":\r\n // set the maxHeight of the suggestions box to:\r\n // map height\r\n // - suggestions offset (distance from top of suggestions to top of control)\r\n // - control offset (distance from top of control to top of map)\r\n // - 10 (extra padding)\r\n if (this.getPosition().indexOf('top') > -1) {\r\n this._suggestions.style.maxHeight = (this._map.getSize().y - this._suggestions.offsetTop - this._wrapper.offsetTop - 10) + 'px';\r\n }\r\n\r\n // when the geocoder position is either \"bottomleft\" or \"bottomright\":\r\n // 1. set the maxHeight of the suggestions box to:\r\n // map height\r\n // - corner control container offsetHeight (height of container of bottom corner)\r\n // - control offsetHeight (height of geocoder control wrapper, the main expandable button)\r\n // 2. to move it up, set the top of the suggestions box to:\r\n // negative offsetHeight of suggestions box (its own negative height now that it has children elements\r\n // - control offsetHeight (height of geocoder control wrapper, the main expandable button)\r\n // + 20 (extra spacing)\r\n if (this.getPosition().indexOf('bottom') > -1) {\r\n this._setSuggestionsBottomPosition();\r\n }\r\n },\r\n\r\n _setSuggestionsBottomPosition: function () {\r\n this._suggestions.style.maxHeight = (this._map.getSize().y - this._map._controlCorners[this.getPosition()].offsetHeight - this._wrapper.offsetHeight) + 'px';\r\n this._suggestions.style.top = (-this._suggestions.offsetHeight - this._wrapper.offsetHeight + 20) + 'px';\r\n },\r\n\r\n _boundsFromResults: function (results) {\r\n if (!results.length) {\r\n return;\r\n }\r\n\r\n var nullIsland = leaflet.latLngBounds([0, 0], [0, 0]);\r\n var resultBounds = [];\r\n var resultLatlngs = [];\r\n\r\n // collect the bounds and center of each result\r\n for (var i = results.length - 1; i >= 0; i--) {\r\n var result = results[i];\r\n\r\n resultLatlngs.push(result.latlng);\r\n\r\n // make sure bounds are valid and not 0,0. sometimes bounds are incorrect or not present\r\n if (result.bounds && result.bounds.isValid() && !result.bounds.equals(nullIsland)) {\r\n resultBounds.push(result.bounds);\r\n }\r\n }\r\n\r\n // form a bounds object containing all center points\r\n var bounds = leaflet.latLngBounds(resultLatlngs);\r\n\r\n // and extend it to contain all bounds objects\r\n for (var j = 0; j < resultBounds.length; j++) {\r\n bounds.extend(resultBounds[j]);\r\n }\r\n\r\n return bounds;\r\n },\r\n\r\n clear: function () {\r\n this._clearAllSuggestions();\r\n\r\n if (this.options.collapseAfterResult) {\r\n this._input.value = '';\r\n this._lastValue = '';\r\n this._input.placeholder = '';\r\n leaflet.DomUtil.removeClass(this._wrapper, 'geocoder-control-expanded');\r\n }\r\n\r\n if (!this._map.scrollWheelZoom.enabled() && this._map.options.scrollWheelZoom) {\r\n this._map.scrollWheelZoom.enable();\r\n }\r\n },\r\n\r\n _clearAllSuggestions: function () {\r\n this._suggestions.style.display = 'none';\r\n\r\n for (var i = 0; i < this.options.providers.length; i++) {\r\n this._clearProviderSuggestions(this.options.providers[i]);\r\n }\r\n },\r\n\r\n _clearProviderSuggestions: function (provider) {\r\n provider._contentsElement.innerHTML = '';\r\n },\r\n\r\n _finalizeSuggestions: function (activeRequests, suggestionsLength) {\r\n // check if all requests are finished to remove the loading indicator\r\n if (!activeRequests) {\r\n leaflet.DomUtil.removeClass(this._input, 'geocoder-control-loading');\r\n\r\n // when the geocoder position is either \"bottomleft\" or \"bottomright\",\r\n // it is necessary in some cases to recalculate the maxHeight and top values of the this._suggestions element,\r\n // even though this is also being done after each provider returns their own suggestions\r\n if (this.getPosition().indexOf('bottom') > -1) {\r\n this._setSuggestionsBottomPosition();\r\n }\r\n\r\n // also check if there were 0 total suggest results to clear the parent suggestions element\r\n // otherwise its display value may be \"block\" instead of \"none\"\r\n if (!suggestionsLength) {\r\n this._clearAllSuggestions();\r\n }\r\n }\r\n },\r\n\r\n _setupClick: function () {\r\n leaflet.DomUtil.addClass(this._wrapper, 'geocoder-control-expanded');\r\n this._input.focus();\r\n },\r\n\r\n disable: function () {\r\n this._input.disabled = true;\r\n leaflet.DomUtil.addClass(this._input, 'geocoder-control-input-disabled');\r\n leaflet.DomEvent.removeListener(this._wrapper, 'click', this._setupClick, this);\r\n },\r\n\r\n enable: function () {\r\n this._input.disabled = false;\r\n leaflet.DomUtil.removeClass(this._input, 'geocoder-control-input-disabled');\r\n leaflet.DomEvent.addListener(this._wrapper, 'click', this._setupClick, this);\r\n },\r\n\r\n getAttribution: function () {\r\n var attribs = [];\r\n\r\n for (var i = 0; i < this._providers.length; i++) {\r\n if (this._providers[i].options.attribution) {\r\n attribs.push(this._providers[i].options.attribution);\r\n }\r\n }\r\n\r\n return attribs.join(', ');\r\n },\r\n\r\n geocodeSuggestion: function (e) {\r\n var suggestionItem = e.target || e.srcElement;\r\n\r\n if (\r\n suggestionItem.classList.contains('geocoder-control-suggestions') ||\r\n suggestionItem.classList.contains('geocoder-control-header')\r\n ) {\r\n return;\r\n }\r\n\r\n // make sure and point at the actual 'geocoder-control-suggestion'\r\n if (suggestionItem.classList.length < 1) {\r\n suggestionItem = suggestionItem.parentNode;\r\n }\r\n\r\n this._geosearchCore._geocode(suggestionItem.unformattedText, suggestionItem['data-magic-key'], suggestionItem.provider);\r\n this.clear();\r\n },\r\n\r\n onAdd: function (map) {\r\n // include 'Powered by Esri' in map attribution\r\n esriLeaflet.Util.setEsriAttribution(map);\r\n\r\n this._map = map;\r\n this._wrapper = leaflet.DomUtil.create('div', 'geocoder-control');\r\n this._input = leaflet.DomUtil.create('input', 'geocoder-control-input leaflet-bar', this._wrapper);\r\n this._input.title = this.options.title;\r\n\r\n if (this.options.expanded) {\r\n leaflet.DomUtil.addClass(this._wrapper, 'geocoder-control-expanded');\r\n this._input.placeholder = this.options.placeholder;\r\n }\r\n\r\n // create the main suggested results container element\r\n this._suggestions = leaflet.DomUtil.create('div', 'geocoder-control-suggestions leaflet-bar', this._wrapper);\r\n\r\n // create a child contents container element for each provider inside of this._suggestions\r\n // to maintain the configured order of providers for suggested results\r\n for (var i = 0; i < this.options.providers.length; i++) {\r\n this.options.providers[i]._contentsElement = leaflet.DomUtil.create('div', null, this._suggestions);\r\n }\r\n\r\n var credits = this._geosearchCore._getAttribution();\r\n\r\n if (map.attributionControl) {\r\n map.attributionControl.addAttribution(credits);\r\n }\r\n\r\n leaflet.DomEvent.addListener(this._input, 'focus', function (e) {\r\n this._input.placeholder = this.options.placeholder;\r\n leaflet.DomUtil.addClass(this._wrapper, 'geocoder-control-expanded');\r\n }, this);\r\n\r\n leaflet.DomEvent.addListener(this._wrapper, 'click', this._setupClick, this);\r\n\r\n // make sure both click and touch spawn an address/poi search\r\n leaflet.DomEvent.addListener(this._suggestions, 'mousedown', this.geocodeSuggestion, this);\r\n\r\n leaflet.DomEvent.addListener(this._input, 'blur', function (e) {\r\n // TODO: this is too greedy and should not \"clear\"\r\n // when trying to use the scrollbar or clicking on a non-suggestion item (such as a provider header)\r\n this.clear();\r\n }, this);\r\n\r\n leaflet.DomEvent.addListener(this._input, 'keydown', function (e) {\r\n var text = (e.target || e.srcElement).value;\r\n\r\n leaflet.DomUtil.addClass(this._wrapper, 'geocoder-control-expanded');\r\n\r\n var list = this._suggestions.querySelectorAll('.' + 'geocoder-control-suggestion');\r\n var selected = this._suggestions.querySelectorAll('.' + 'geocoder-control-selected')[0];\r\n var selectedPosition;\r\n\r\n for (var i = 0; i < list.length; i++) {\r\n if (list[i] === selected) {\r\n selectedPosition = i;\r\n break;\r\n }\r\n }\r\n\r\n switch (e.keyCode) {\r\n case 13:\r\n /*\r\n if an item has been selected, geocode it\r\n if focus is on the input textbox, geocode only if multiple results are allowed and more than two characters are present, or if a single suggestion is displayed.\r\n if less than two characters have been typed, abort the geocode\r\n */\r\n if (selected) {\r\n this._input.value = selected.innerText;\r\n this._geosearchCore._geocode(selected.unformattedText, selected['data-magic-key'], selected.provider);\r\n this.clear();\r\n } else if (this.options.allowMultipleResults && text.length >= 2) {\r\n this._geosearchCore._geocode(this._input.value, undefined);\r\n this.clear();\r\n } else {\r\n if (list.length === 1) {\r\n leaflet.DomUtil.addClass(list[0], 'geocoder-control-selected');\r\n this._geosearchCore._geocode(list[0].innerHTML, list[0]['data-magic-key'], list[0].provider);\r\n } else {\r\n this.clear();\r\n this._input.blur();\r\n }\r\n }\r\n leaflet.DomEvent.preventDefault(e);\r\n break;\r\n case 38:\r\n if (selected) {\r\n leaflet.DomUtil.removeClass(selected, 'geocoder-control-selected');\r\n }\r\n\r\n var previousItem = list[selectedPosition - 1];\r\n\r\n if (selected && previousItem) {\r\n leaflet.DomUtil.addClass(previousItem, 'geocoder-control-selected');\r\n } else {\r\n leaflet.DomUtil.addClass(list[list.length - 1], 'geocoder-control-selected');\r\n }\r\n leaflet.DomEvent.preventDefault(e);\r\n break;\r\n case 40:\r\n if (selected) {\r\n leaflet.DomUtil.removeClass(selected, 'geocoder-control-selected');\r\n }\r\n\r\n var nextItem = list[selectedPosition + 1];\r\n\r\n if (selected && nextItem) {\r\n leaflet.DomUtil.addClass(nextItem, 'geocoder-control-selected');\r\n } else {\r\n leaflet.DomUtil.addClass(list[0], 'geocoder-control-selected');\r\n }\r\n leaflet.DomEvent.preventDefault(e);\r\n break;\r\n default:\r\n // when the input changes we should cancel all pending suggestion requests if possible to avoid result collisions\r\n for (var x = 0; x < this._geosearchCore._pendingSuggestions.length; x++) {\r\n var request = this._geosearchCore._pendingSuggestions[x];\r\n if (request && request.abort && !request.id) {\r\n request.abort();\r\n }\r\n }\r\n break;\r\n }\r\n }, this);\r\n\r\n leaflet.DomEvent.addListener(this._input, 'keyup', leaflet.Util.throttle(function (e) {\r\n var key = e.which || e.keyCode;\r\n var text = (e.target || e.srcElement).value;\r\n\r\n // require at least 2 characters for suggestions\r\n if (text.length < 2) {\r\n this._lastValue = this._input.value;\r\n this._clearAllSuggestions();\r\n leaflet.DomUtil.removeClass(this._input, 'geocoder-control-loading');\r\n return;\r\n }\r\n\r\n // if this is the escape key it will clear the input so clear suggestions\r\n if (key === 27) {\r\n this._clearAllSuggestions();\r\n return;\r\n }\r\n\r\n // if this is NOT the up/down arrows or enter make a suggestion\r\n if (key !== 13 && key !== 38 && key !== 40) {\r\n if (this._input.value !== this._lastValue) {\r\n this._lastValue = this._input.value;\r\n leaflet.DomUtil.addClass(this._input, 'geocoder-control-loading');\r\n this._geosearchCore._suggest(text);\r\n }\r\n }\r\n }, 50, this), this);\r\n\r\n leaflet.DomEvent.disableClickPropagation(this._wrapper);\r\n\r\n // when mouse moves over suggestions disable scroll wheel zoom if its enabled\r\n leaflet.DomEvent.addListener(this._suggestions, 'mouseover', function (e) {\r\n if (map.scrollWheelZoom.enabled() && map.options.scrollWheelZoom) {\r\n map.scrollWheelZoom.disable();\r\n }\r\n });\r\n\r\n // when mouse moves leaves suggestions enable scroll wheel zoom if its disabled\r\n leaflet.DomEvent.addListener(this._suggestions, 'mouseout', function (e) {\r\n if (!map.scrollWheelZoom.enabled() && map.options.scrollWheelZoom) {\r\n map.scrollWheelZoom.enable();\r\n }\r\n });\r\n\r\n this._geosearchCore.on('load', function (e) {\r\n leaflet.DomUtil.removeClass(this._input, 'geocoder-control-loading');\r\n this.clear();\r\n this._input.blur();\r\n }, this);\r\n\r\n return this._wrapper;\r\n }\r\n });\r\n\r\n function geosearch (options) {\r\n return new Geosearch(options);\r\n }\n\n var FeatureLayerProvider = esriLeaflet.FeatureLayerService.extend({\r\n options: {\r\n label: 'Feature Layer',\r\n maxResults: 5,\r\n bufferRadius: 1000,\r\n searchMode: 'contain',\r\n formatSuggestion: function (feature) {\r\n return feature.properties[this.options.searchFields[0]];\r\n }\r\n },\r\n\r\n initialize: function (options) {\r\n esriLeaflet.FeatureLayerService.prototype.initialize.call(this, options);\r\n if (typeof this.options.searchFields === 'string') {\r\n this.options.searchFields = [this.options.searchFields];\r\n }\r\n this._suggestionsQuery = this.query();\r\n this._resultsQuery = this.query();\r\n },\r\n\r\n suggestions: function (text, bounds, callback) {\r\n var query = this._suggestionsQuery.where(this._buildQuery(text))\r\n .returnGeometry(false);\r\n\r\n if (bounds) {\r\n query.intersects(bounds);\r\n }\r\n\r\n if (this.options.idField) {\r\n query.fields([this.options.idField].concat(this.options.searchFields));\r\n }\r\n\r\n var request = query.run(function (error, results, raw) {\r\n if (error) {\r\n callback(error, []);\r\n } else {\r\n this.options.idField = raw.objectIdFieldName;\r\n var suggestions = [];\r\n for (var i = results.features.length - 1; i >= 0; i--) {\r\n var feature = results.features[i];\r\n suggestions.push({\r\n text: this.options.formatSuggestion.call(this, feature),\r\n unformattedText: feature.properties[this.options.searchFields[0]],\r\n magicKey: feature.id\r\n });\r\n }\r\n callback(error, suggestions.slice(0, this.options.maxResults));\r\n }\r\n }, this);\r\n\r\n return request;\r\n },\r\n\r\n results: function (text, key, bounds, callback) {\r\n var query = this._resultsQuery;\r\n\r\n if (key) {\r\n delete query.params.where;\r\n query.featureIds([key]);\r\n } else {\r\n query.where(this._buildQuery(text));\r\n }\r\n\r\n if (bounds) {\r\n query.within(bounds);\r\n }\r\n\r\n return query.run(leaflet.Util.bind(function (error, features) {\r\n var results = [];\r\n for (var i = 0; i < features.features.length; i++) {\r\n var feature = features.features[i];\r\n if (feature) {\r\n var bounds = this._featureBounds(feature);\r\n\r\n var result = {\r\n latlng: bounds.getCenter(),\r\n bounds: bounds,\r\n text: this.options.formatSuggestion.call(this, feature),\r\n properties: feature.properties,\r\n geojson: feature\r\n };\r\n\r\n results.push(result);\r\n\r\n // clear query parameters for the next search\r\n delete this._resultsQuery.params['objectIds'];\r\n }\r\n }\r\n callback(error, results);\r\n }, this));\r\n },\r\n\r\n orderBy: function (fieldName, order) {\r\n this._suggestionsQuery.orderBy(fieldName, order);\r\n },\r\n\r\n _buildQuery: function (text) {\r\n var queryString = [];\r\n\r\n for (var i = this.options.searchFields.length - 1; i >= 0; i--) {\r\n var field = 'upper(\"' + this.options.searchFields[i] + '\")';\r\n if (this.options.searchMode === 'contain') {\r\n queryString.push(field + \" LIKE upper('%\" + text + \"%')\");\r\n } else if (this.options.searchMode === 'startWith') {\r\n queryString.push(field + \" LIKE upper('\" + text + \"%')\");\r\n } else if (this.options.searchMode === 'endWith') {\r\n queryString.push(field + \" LIKE upper('%\" + text + \"')\");\r\n } else if (this.options.searchMode === 'strict') {\r\n queryString.push(field + \" LIKE upper('\" + text + \"')\");\r\n } else {\r\n throw new Error('L.esri.Geocoding.featureLayerProvider: Invalid parameter for \"searchMode\". Use one of \"contain\", \"startWith\", \"endWith\", or \"strict\"');\r\n }\r\n }\r\n if (this.options.where) {\r\n return this.options.where + ' AND (' + queryString.join(' OR ') + ')';\r\n } else {\r\n return queryString.join(' OR ');\r\n }\r\n },\r\n\r\n _featureBounds: function (feature) {\r\n var geojson = leaflet.geoJson(feature);\r\n if (feature.geometry.type === 'Point') {\r\n var center = geojson.getBounds().getCenter();\r\n var lngRadius = ((this.options.bufferRadius / 40075017) * 360) / Math.cos((180 / Math.PI) * center.lat);\r\n var latRadius = (this.options.bufferRadius / 40075017) * 360;\r\n return leaflet.latLngBounds([center.lat - latRadius, center.lng - lngRadius], [center.lat + latRadius, center.lng + lngRadius]);\r\n } else {\r\n return geojson.getBounds();\r\n }\r\n }\r\n });\r\n\r\n function featureLayerProvider (options) {\r\n return new FeatureLayerProvider(options);\r\n }\n\n var MapServiceProvider = esriLeaflet.MapService.extend({\r\n options: {\r\n layers: [0],\r\n label: 'Map Service',\r\n bufferRadius: 1000,\r\n maxResults: 5,\r\n formatSuggestion: function (feature) {\r\n return feature.properties[feature.displayFieldName] + ' ' + feature.layerName + '';\r\n }\r\n },\r\n\r\n initialize: function (options) {\r\n esriLeaflet.MapService.prototype.initialize.call(this, options);\r\n this._getIdFields();\r\n },\r\n\r\n suggestions: function (text, bounds, callback) {\r\n var request = this.find().text(text).fields(this.options.searchFields).returnGeometry(false).layers(this.options.layers);\r\n\r\n return request.run(function (error, results, raw) {\r\n var suggestions = [];\r\n if (!error) {\r\n var count = Math.min(this.options.maxResults, results.features.length);\r\n raw.results = raw.results.reverse();\r\n for (var i = 0; i < count; i++) {\r\n var feature = results.features[i];\r\n var result = raw.results[i];\r\n var layer = result.layerId;\r\n var idField = this._idFields[layer];\r\n feature.layerId = layer;\r\n feature.layerName = this._layerNames[layer];\r\n feature.displayFieldName = this._displayFields[layer];\r\n if (idField) {\r\n suggestions.push({\r\n text: this.options.formatSuggestion.call(this, feature),\r\n unformattedText: feature.properties[feature.displayFieldName],\r\n magicKey: result.attributes[idField] + ':' + layer\r\n });\r\n }\r\n }\r\n }\r\n callback(error, suggestions.reverse());\r\n }, this);\r\n },\r\n\r\n results: function (text, key, bounds, callback) {\r\n var results = [];\r\n var request;\r\n\r\n if (key) {\r\n var featureId = key.split(':')[0];\r\n var layer = key.split(':')[1];\r\n request = this.query().layer(layer).featureIds(featureId);\r\n } else {\r\n request = this.find().text(text).fields(this.options.searchFields).layers(this.options.layers);\r\n }\r\n\r\n return request.run(function (error, features, response) {\r\n if (!error) {\r\n if (response.results) {\r\n response.results = response.results.reverse();\r\n }\r\n for (var i = 0; i < features.features.length; i++) {\r\n var feature = features.features[i];\r\n layer = layer || response.results[i].layerId;\r\n\r\n if (feature && layer !== undefined) {\r\n var bounds = this._featureBounds(feature);\r\n feature.layerId = layer;\r\n feature.layerName = this._layerNames[layer];\r\n feature.displayFieldName = this._displayFields[layer];\r\n\r\n var result = {\r\n latlng: bounds.getCenter(),\r\n bounds: bounds,\r\n text: this.options.formatSuggestion.call(this, feature),\r\n properties: feature.properties,\r\n geojson: feature\r\n };\r\n\r\n results.push(result);\r\n }\r\n }\r\n }\r\n callback(error, results.reverse());\r\n }, this);\r\n },\r\n\r\n _featureBounds: function (feature) {\r\n var geojson = leaflet.geoJson(feature);\r\n if (feature.geometry.type === 'Point') {\r\n var center = geojson.getBounds().getCenter();\r\n var lngRadius = ((this.options.bufferRadius / 40075017) * 360) / Math.cos((180 / Math.PI) * center.lat);\r\n var latRadius = (this.options.bufferRadius / 40075017) * 360;\r\n return leaflet.latLngBounds([center.lat - latRadius, center.lng - lngRadius], [center.lat + latRadius, center.lng + lngRadius]);\r\n } else {\r\n return geojson.getBounds();\r\n }\r\n },\r\n\r\n _layerMetadataCallback: function (layerid) {\r\n return leaflet.Util.bind(function (error, metadata) {\r\n if (error) { return; }\r\n this._displayFields[layerid] = metadata.displayField;\r\n this._layerNames[layerid] = metadata.name;\r\n for (var i = 0; i < metadata.fields.length; i++) {\r\n var field = metadata.fields[i];\r\n if (field.type === 'esriFieldTypeOID') {\r\n this._idFields[layerid] = field.name;\r\n break;\r\n }\r\n }\r\n }, this);\r\n },\r\n\r\n _getIdFields: function () {\r\n this._idFields = {};\r\n this._displayFields = {};\r\n this._layerNames = {};\r\n for (var i = 0; i < this.options.layers.length; i++) {\r\n var layer = this.options.layers[i];\r\n this.get(layer, {}, this._layerMetadataCallback(layer));\r\n }\r\n }\r\n });\r\n\r\n function mapServiceProvider (options) {\r\n return new MapServiceProvider(options);\r\n }\n\n var GeocodeServiceProvider = GeocodeService.extend({\r\n options: {\r\n label: 'Geocode Server',\r\n maxResults: 5\r\n },\r\n\r\n suggestions: function (text, bounds, callback) {\r\n if (this.options.supportsSuggest) {\r\n var request = this.suggest().text(text);\r\n if (bounds) {\r\n request.within(bounds);\r\n }\r\n\r\n return request.run(function (error, results, response) {\r\n var suggestions = [];\r\n if (!error) {\r\n while (response.suggestions.length && suggestions.length <= (this.options.maxResults - 1)) {\r\n var suggestion = response.suggestions.shift();\r\n if (!suggestion.isCollection) {\r\n suggestions.push({\r\n text: suggestion.text,\r\n unformattedText: suggestion.text,\r\n magicKey: suggestion.magicKey\r\n });\r\n }\r\n }\r\n }\r\n callback(error, suggestions);\r\n }, this);\r\n } else {\r\n callback(undefined, []);\r\n return false;\r\n }\r\n },\r\n\r\n results: function (text, key, bounds, callback) {\r\n var request = this.geocode().text(text);\r\n\r\n if (key) {\r\n request.key(key);\r\n }\r\n\r\n request.maxLocations(this.options.maxResults);\r\n\r\n if (bounds) {\r\n request.within(bounds);\r\n }\r\n\r\n return request.run(function (error, response) {\r\n callback(error, response.results);\r\n }, this);\r\n }\r\n });\r\n\r\n function geocodeServiceProvider (options) {\r\n return new GeocodeServiceProvider(options);\r\n }\n\n exports.ArcgisOnlineProvider = ArcgisOnlineProvider;\n exports.FeatureLayerProvider = FeatureLayerProvider;\n exports.Geocode = Geocode;\n exports.GeocodeService = GeocodeService;\n exports.GeocodeServiceProvider = GeocodeServiceProvider;\n exports.Geosearch = Geosearch;\n exports.GeosearchCore = GeosearchCore;\n exports.MapServiceProvider = MapServiceProvider;\n exports.ReverseGeocode = ReverseGeocode;\n exports.Suggest = Suggest;\n exports.VERSION = version;\n exports.WorldGeocodingServiceUrl = WorldGeocodingServiceUrl;\n exports.arcgisOnlineProvider = arcgisOnlineProvider;\n exports.featureLayerProvider = featureLayerProvider;\n exports.geocode = geocode;\n exports.geocodeService = geocodeService;\n exports.geocodeServiceProvider = geocodeServiceProvider;\n exports.geosearch = geosearch;\n exports.geosearchCore = geosearchCore;\n exports.mapServiceProvider = mapServiceProvider;\n exports.reverseGeocode = reverseGeocode;\n exports.suggest = suggest;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=esri-leaflet-geocoder-debug.js.map\n","// export version\r\nexport {version as VERSION} from '../package.json';\r\n\r\n// import base\r\nexport { Support } from './Support';\r\nexport { options } from './Options';\r\nexport { EsriUtil as Util } from './Util';\r\nexport { get, post, request } from './Request';\r\n\r\n// export tasks\r\nexport { Task, task } from './Tasks/Task';\r\nexport { Query, query } from './Tasks/Query';\r\nexport { Find, find } from './Tasks/Find';\r\nexport { Identify, identify } from './Tasks/Identify';\r\nexport { IdentifyFeatures, identifyFeatures } from './Tasks/IdentifyFeatures';\r\nexport { IdentifyImage, identifyImage } from './Tasks/IdentifyImage';\r\n\r\n// export services\r\nexport { Service, service } from './Services/Service';\r\nexport { MapService, mapService } from './Services/MapService';\r\nexport { ImageService, imageService } from './Services/ImageService';\r\nexport { FeatureLayerService, featureLayerService } from './Services/FeatureLayerService';\r\n\r\n// export layers\r\nexport { BasemapLayer, basemapLayer } from './Layers/BasemapLayer';\r\nexport { TiledMapLayer, tiledMapLayer } from './Layers/TiledMapLayer';\r\nexport { RasterLayer } from './Layers/RasterLayer';\r\nexport { ImageMapLayer, imageMapLayer } from './Layers/ImageMapLayer';\r\nexport { DynamicMapLayer, dynamicMapLayer } from './Layers/DynamicMapLayer';\r\nexport { FeatureManager } from './Layers/FeatureLayer/FeatureManager';\r\nexport { FeatureLayer, featureLayer } from './Layers/FeatureLayer/FeatureLayer';\r\n","import { TileLayer, Util } from 'leaflet';\r\nimport { pointerEvents } from '../Support';\r\nimport { request } from '../Request';\r\nimport {\r\n setEsriAttribution,\r\n _getAttributionData,\r\n _updateMapAttribution\r\n} from '../Util';\r\n\r\nvar tileProtocol = (window.location.protocol !== 'https:') ? 'http:' : 'https:';\r\n\r\nexport var BasemapLayer = TileLayer.extend({\r\n statics: {\r\n TILES: {\r\n Streets: {\r\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}',\r\n options: {\r\n minZoom: 1,\r\n maxZoom: 19,\r\n subdomains: ['server', 'services'],\r\n attribution: 'USGS, NOAA',\r\n attributionUrl: 'https://static.arcgis.com/attribution/World_Street_Map'\r\n }\r\n },\r\n Topographic: {\r\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}',\r\n options: {\r\n minZoom: 1,\r\n maxZoom: 19,\r\n subdomains: ['server', 'services'],\r\n attribution: 'USGS, NOAA',\r\n attributionUrl: 'https://static.arcgis.com/attribution/World_Topo_Map'\r\n }\r\n },\r\n Oceans: {\r\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer/tile/{z}/{y}/{x}',\r\n options: {\r\n minZoom: 1,\r\n maxZoom: 16,\r\n subdomains: ['server', 'services'],\r\n attribution: 'USGS, NOAA',\r\n attributionUrl: 'https://static.arcgis.com/attribution/Ocean_Basemap'\r\n }\r\n },\r\n OceansLabels: {\r\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer/tile/{z}/{y}/{x}',\r\n options: {\r\n minZoom: 1,\r\n maxZoom: 16,\r\n subdomains: ['server', 'services'],\r\n pane: (pointerEvents) ? 'esri-labels' : 'tilePane',\r\n attribution: ''\r\n }\r\n },\r\n NationalGeographic: {\r\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}',\r\n options: {\r\n minZoom: 1,\r\n maxZoom: 16,\r\n subdomains: ['server', 'services'],\r\n attribution: 'National Geographic, DeLorme, HERE, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, increment P Corp.'\r\n }\r\n },\r\n DarkGray: {\r\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer/tile/{z}/{y}/{x}',\r\n options: {\r\n minZoom: 1,\r\n maxZoom: 16,\r\n subdomains: ['server', 'services'],\r\n attribution: 'HERE, DeLorme, MapmyIndia, © OpenStreetMap contributors'\r\n }\r\n },\r\n DarkGrayLabels: {\r\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer/tile/{z}/{y}/{x}',\r\n options: {\r\n minZoom: 1,\r\n maxZoom: 16,\r\n subdomains: ['server', 'services'],\r\n pane: (pointerEvents) ? 'esri-labels' : 'tilePane',\r\n attribution: ''\r\n\r\n }\r\n },\r\n Gray: {\r\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}',\r\n options: {\r\n minZoom: 1,\r\n maxZoom: 16,\r\n subdomains: ['server', 'services'],\r\n attribution: 'HERE, DeLorme, MapmyIndia, © OpenStreetMap contributors'\r\n }\r\n },\r\n GrayLabels: {\r\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer/tile/{z}/{y}/{x}',\r\n options: {\r\n minZoom: 1,\r\n maxZoom: 16,\r\n subdomains: ['server', 'services'],\r\n pane: (pointerEvents) ? 'esri-labels' : 'tilePane',\r\n attribution: ''\r\n }\r\n },\r\n Imagery: {\r\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',\r\n options: {\r\n minZoom: 1,\r\n maxZoom: 22,\r\n maxNativeZoom: 22,\r\n downsampled: false,\r\n subdomains: ['server', 'services'],\r\n attribution: 'DigitalGlobe, GeoEye, i-cubed, USDA, USGS, AEX, Getmapping, Aerogrid, IGN, IGP, swisstopo, and the GIS User Community',\r\n attributionUrl: 'https://static.arcgis.com/attribution/World_Imagery'\r\n }\r\n },\r\n ImageryLabels: {\r\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer/tile/{z}/{y}/{x}',\r\n options: {\r\n minZoom: 1,\r\n maxZoom: 19,\r\n subdomains: ['server', 'services'],\r\n pane: (pointerEvents) ? 'esri-labels' : 'tilePane',\r\n attribution: ''\r\n }\r\n },\r\n ImageryTransportation: {\r\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Transportation/MapServer/tile/{z}/{y}/{x}',\r\n options: {\r\n minZoom: 1,\r\n maxZoom: 19,\r\n subdomains: ['server', 'services'],\r\n pane: (pointerEvents) ? 'esri-labels' : 'tilePane',\r\n attribution: ''\r\n }\r\n },\r\n ShadedRelief: {\r\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer/tile/{z}/{y}/{x}',\r\n options: {\r\n minZoom: 1,\r\n maxZoom: 13,\r\n subdomains: ['server', 'services'],\r\n attribution: 'USGS'\r\n }\r\n },\r\n ShadedReliefLabels: {\r\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/MapServer/tile/{z}/{y}/{x}',\r\n options: {\r\n minZoom: 1,\r\n maxZoom: 12,\r\n subdomains: ['server', 'services'],\r\n pane: (pointerEvents) ? 'esri-labels' : 'tilePane',\r\n attribution: ''\r\n }\r\n },\r\n Terrain: {\r\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer/tile/{z}/{y}/{x}',\r\n options: {\r\n minZoom: 1,\r\n maxZoom: 13,\r\n subdomains: ['server', 'services'],\r\n attribution: 'USGS, NOAA'\r\n }\r\n },\r\n TerrainLabels: {\r\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer/tile/{z}/{y}/{x}',\r\n options: {\r\n minZoom: 1,\r\n maxZoom: 13,\r\n subdomains: ['server', 'services'],\r\n pane: (pointerEvents) ? 'esri-labels' : 'tilePane',\r\n attribution: ''\r\n }\r\n },\r\n USATopo: {\r\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer/tile/{z}/{y}/{x}',\r\n options: {\r\n minZoom: 1,\r\n maxZoom: 15,\r\n subdomains: ['server', 'services'],\r\n attribution: 'USGS, National Geographic Society, i-cubed'\r\n }\r\n },\r\n ImageryClarity: {\r\n urlTemplate: tileProtocol + '//clarity.maptiles.arcgis.com/arcgis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',\r\n options: {\r\n minZoom: 1,\r\n maxZoom: 19,\r\n attribution: 'Esri, DigitalGlobe, GeoEye, Earthstar Geographics, CNES/Airbus DS, USDA, USGS, AeroGRID, IGN, and the GIS User Community'\r\n }\r\n },\r\n Physical: {\r\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/arcgis/rest/services/World_Physical_Map/MapServer/tile/{z}/{y}/{x}',\r\n options: {\r\n minZoom: 1,\r\n maxZoom: 8,\r\n subdomains: ['server', 'services'],\r\n attribution: 'U.S. National Park Service'\r\n }\r\n },\r\n ImageryFirefly: {\r\n urlTemplate: tileProtocol + '//fly.maptiles.arcgis.com/arcgis/rest/services/World_Imagery_Firefly/MapServer/tile/{z}/{y}/{x}',\r\n options: {\r\n minZoom: 1,\r\n maxZoom: 19,\r\n attribution: 'Esri, DigitalGlobe, GeoEye, Earthstar Geographics, CNES/Airbus DS, USDA, USGS, AeroGRID, IGN, and the GIS User Community',\r\n attributionUrl: 'https://static.arcgis.com/attribution/World_Imagery'\r\n }\r\n }\r\n }\r\n },\r\n\r\n initialize: function (key, options) {\r\n var config;\r\n\r\n // set the config variable with the appropriate config object\r\n if (typeof key === 'object' && key.urlTemplate && key.options) {\r\n config = key;\r\n } else if (typeof key === 'string' && BasemapLayer.TILES[key]) {\r\n config = BasemapLayer.TILES[key];\r\n } else {\r\n throw new Error('L.esri.BasemapLayer: Invalid parameter. Use one of \"Streets\", \"Topographic\", \"Oceans\", \"OceansLabels\", \"NationalGeographic\", \"Physical\", \"Gray\", \"GrayLabels\", \"DarkGray\", \"DarkGrayLabels\", \"Imagery\", \"ImageryLabels\", \"ImageryTransportation\", \"ImageryClarity\", \"ImageryFirefly\", ShadedRelief\", \"ShadedReliefLabels\", \"Terrain\", \"TerrainLabels\" or \"USATopo\"');\r\n }\r\n\r\n // merge passed options into the config options\r\n var tileOptions = Util.extend(config.options, options);\r\n\r\n Util.setOptions(this, tileOptions);\r\n\r\n if (this.options.token && config.urlTemplate.indexOf('token=') === -1) {\r\n config.urlTemplate += ('?token=' + this.options.token);\r\n }\r\n if (this.options.proxy) {\r\n config.urlTemplate = this.options.proxy + '?' + config.urlTemplate;\r\n }\r\n\r\n // call the initialize method on L.TileLayer to set everything up\r\n TileLayer.prototype.initialize.call(this, config.urlTemplate, tileOptions);\r\n },\r\n\r\n onAdd: function (map) {\r\n // include 'Powered by Esri' in map attribution\r\n setEsriAttribution(map);\r\n\r\n if (this.options.pane === 'esri-labels') {\r\n this._initPane();\r\n }\r\n // some basemaps can supply dynamic attribution\r\n if (this.options.attributionUrl) {\r\n _getAttributionData((this.options.proxy ? this.options.proxy + '?' : '') + this.options.attributionUrl, map);\r\n }\r\n\r\n map.on('moveend', _updateMapAttribution);\r\n\r\n // Esri World Imagery is cached all the way to zoom 22 in select regions\r\n if (this._url.indexOf('World_Imagery') !== -1) {\r\n map.on('zoomanim', _fetchTilemap, this);\r\n }\r\n\r\n TileLayer.prototype.onAdd.call(this, map);\r\n },\r\n\r\n onRemove: function (map) {\r\n map.off('moveend', _updateMapAttribution);\r\n TileLayer.prototype.onRemove.call(this, map);\r\n },\r\n\r\n _initPane: function () {\r\n if (!this._map.getPane(this.options.pane)) {\r\n var pane = this._map.createPane(this.options.pane);\r\n pane.style.pointerEvents = 'none';\r\n pane.style.zIndex = 500;\r\n }\r\n },\r\n\r\n getAttribution: function () {\r\n if (this.options.attribution) {\r\n var attribution = '' + this.options.attribution + '';\r\n }\r\n return attribution;\r\n }\r\n});\r\n\r\nfunction _fetchTilemap (evt) {\r\n var map = evt.target;\r\n if (!map) { return; }\r\n\r\n var oldZoom = map.getZoom();\r\n var newZoom = evt.zoom;\r\n var newCenter = map.wrapLatLng(evt.center);\r\n\r\n if (newZoom > oldZoom && newZoom > 13 && !this.options.downsampled) {\r\n // convert wrapped lat/long into tile coordinates and use them to generate the tilemap url\r\n var tilePoint = map.project(newCenter, newZoom).divideBy(256).floor();\r\n\r\n // use new coords to determine the tilemap url\r\n var tileUrl = Util.template(this._url, Util.extend({\r\n s: this._getSubdomain(tilePoint),\r\n x: tilePoint.x,\r\n y: tilePoint.y,\r\n z: newZoom\r\n }, this.options));\r\n\r\n // 8x8 grids are cached\r\n var tilemapUrl = tileUrl.replace(/tile/, 'tilemap') + '/8/8';\r\n\r\n // an array of booleans in the response indicate missing tiles\r\n request(tilemapUrl, {}, function (err, response) {\r\n if (!err) {\r\n for (var i = 0; i < response.data.length; i++) {\r\n if (!response.data[i]) {\r\n // if necessary, resample a lower zoom\r\n this.options.maxNativeZoom = newZoom - 1;\r\n this.options.downsampled = true;\r\n break;\r\n }\r\n // if no tiles are missing, reset the original maxZoom\r\n this.options.maxNativeZoom = 22;\r\n }\r\n }\r\n }, this);\r\n } else if (newZoom < 13) {\r\n // if the user moves to a new region, time for a fresh test\r\n this.options.downsampled = false;\r\n }\r\n}\r\n\r\nexport function basemapLayer (key, options) {\r\n return new BasemapLayer(key, options);\r\n}\r\n\r\nexport default basemapLayer;\r\n","import { Util } from 'leaflet';\r\nimport { RasterLayer } from './RasterLayer';\r\nimport { getUrlParams } from '../Util';\r\nimport mapService from '../Services/MapService';\r\n\r\nexport var DynamicMapLayer = RasterLayer.extend({\r\n\r\n options: {\r\n updateInterval: 150,\r\n layers: false,\r\n layerDefs: false,\r\n timeOptions: false,\r\n format: 'png24',\r\n transparent: true,\r\n f: 'json'\r\n },\r\n\r\n initialize: function (options) {\r\n options = getUrlParams(options);\r\n this.service = mapService(options);\r\n this.service.addEventParent(this);\r\n\r\n if (options.proxy && options.f !== 'json') {\r\n options.f = 'json';\r\n }\r\n\r\n Util.setOptions(this, options);\r\n },\r\n\r\n getDynamicLayers: function () {\r\n return this.options.dynamicLayers;\r\n },\r\n\r\n setDynamicLayers: function (dynamicLayers) {\r\n this.options.dynamicLayers = dynamicLayers;\r\n this._update();\r\n return this;\r\n },\r\n\r\n getLayers: function () {\r\n return this.options.layers;\r\n },\r\n\r\n setLayers: function (layers) {\r\n this.options.layers = layers;\r\n this._update();\r\n return this;\r\n },\r\n\r\n getLayerDefs: function () {\r\n return this.options.layerDefs;\r\n },\r\n\r\n setLayerDefs: function (layerDefs) {\r\n this.options.layerDefs = layerDefs;\r\n this._update();\r\n return this;\r\n },\r\n\r\n getTimeOptions: function () {\r\n return this.options.timeOptions;\r\n },\r\n\r\n setTimeOptions: function (timeOptions) {\r\n this.options.timeOptions = timeOptions;\r\n this._update();\r\n return this;\r\n },\r\n\r\n query: function () {\r\n return this.service.query();\r\n },\r\n\r\n identify: function () {\r\n return this.service.identify();\r\n },\r\n\r\n find: function () {\r\n return this.service.find();\r\n },\r\n\r\n _getPopupData: function (e) {\r\n var callback = Util.bind(function (error, featureCollection, response) {\r\n if (error) { return; } // we really can't do anything here but authenticate or requesterror will fire\r\n setTimeout(Util.bind(function () {\r\n this._renderPopup(e.latlng, error, featureCollection, response);\r\n }, this), 300);\r\n }, this);\r\n\r\n var identifyRequest;\r\n if (this.options.popup) {\r\n identifyRequest = this.options.popup.on(this._map).at(e.latlng);\r\n } else {\r\n identifyRequest = this.identify().on(this._map).at(e.latlng);\r\n }\r\n\r\n // remove extraneous vertices from response features if it has not already been done\r\n identifyRequest.params.maxAllowableOffset ? true : identifyRequest.simplify(this._map, 0.5);\r\n\r\n if (!(this.options.popup && this.options.popup.params && this.options.popup.params.layers)) {\r\n if (this.options.layers) {\r\n identifyRequest.layers('visible:' + this.options.layers.join(','));\r\n } else {\r\n identifyRequest.layers('visible');\r\n }\r\n }\r\n\r\n // if present, pass layer ids and sql filters through to the identify task\r\n if (this.options.layerDefs && typeof this.options.layerDefs !== 'string' && !identifyRequest.params.layerDefs) {\r\n for (var id in this.options.layerDefs) {\r\n if (this.options.layerDefs.hasOwnProperty(id)) {\r\n identifyRequest.layerDef(id, this.options.layerDefs[id]);\r\n }\r\n }\r\n }\r\n\r\n identifyRequest.run(callback);\r\n\r\n // set the flags to show the popup\r\n this._shouldRenderPopup = true;\r\n this._lastClick = e.latlng;\r\n },\r\n\r\n _buildExportParams: function () {\r\n var sr = parseInt(this._map.options.crs.code.split(':')[1], 10);\r\n\r\n var params = {\r\n bbox: this._calculateBbox(),\r\n size: this._calculateImageSize(),\r\n dpi: 96,\r\n format: this.options.format,\r\n transparent: this.options.transparent,\r\n bboxSR: sr,\r\n imageSR: sr\r\n };\r\n\r\n if (this.options.dynamicLayers) {\r\n params.dynamicLayers = this.options.dynamicLayers;\r\n }\r\n\r\n if (this.options.layers) {\r\n if (this.options.layers.length === 0) {\r\n return;\r\n } else {\r\n params.layers = 'show:' + this.options.layers.join(',');\r\n }\r\n }\r\n\r\n if (this.options.layerDefs) {\r\n params.layerDefs = typeof this.options.layerDefs === 'string' ? this.options.layerDefs : JSON.stringify(this.options.layerDefs);\r\n }\r\n\r\n if (this.options.timeOptions) {\r\n params.timeOptions = JSON.stringify(this.options.timeOptions);\r\n }\r\n\r\n if (this.options.from && this.options.to) {\r\n params.time = this.options.from.valueOf() + ',' + this.options.to.valueOf();\r\n }\r\n\r\n if (this.service.options.token) {\r\n params.token = this.service.options.token;\r\n }\r\n\r\n if (this.options.proxy) {\r\n params.proxy = this.options.proxy;\r\n }\r\n\r\n // use a timestamp to bust server cache\r\n if (this.options.disableCache) {\r\n params._ts = Date.now();\r\n }\r\n\r\n return params;\r\n },\r\n\r\n _requestExport: function (params, bounds) {\r\n if (this.options.f === 'json') {\r\n this.service.request('export', params, function (error, response) {\r\n if (error) { return; } // we really can't do anything here but authenticate or requesterror will fire\r\n\r\n if (this.options.token && response.href) {\r\n response.href += ('?token=' + this.options.token);\r\n }\r\n if (this.options.proxy && response.href) {\r\n response.href = this.options.proxy + '?' + response.href;\r\n }\r\n if (response.href) {\r\n this._renderImage(response.href, bounds);\r\n } else {\r\n this._renderImage(response.imageData, bounds, response.contentType);\r\n }\r\n }, this);\r\n } else {\r\n params.f = 'image';\r\n this._renderImage(this.options.url + 'export' + Util.getParamString(params), bounds);\r\n }\r\n }\r\n});\r\n\r\nexport function dynamicMapLayer (url, options) {\r\n return new DynamicMapLayer(url, options);\r\n}\r\n\r\nexport default dynamicMapLayer;\r\n","import {\r\n LatLngBounds,\r\n toLatLngBounds as latLngBounds,\r\n Layer,\r\n Browser,\r\n Util,\r\n Point,\r\n Bounds\r\n} from 'leaflet';\r\n\r\nexport var FeatureGrid = Layer.extend({\r\n // @section\r\n // @aka GridLayer options\r\n options: {\r\n // @option cellSize: Number|Point = 256\r\n // Width and height of cells in the grid. Use a number if width and height are equal, or `L.point(width, height)` otherwise.\r\n cellSize: 512,\r\n\r\n // @option updateWhenIdle: Boolean = (depends)\r\n // Load new cells only when panning ends.\r\n // `true` by default on mobile browsers, in order to avoid too many requests and keep smooth navigation.\r\n // `false` otherwise in order to display new cells _during_ panning, since it is easy to pan outside the\r\n // [`keepBuffer`](#gridlayer-keepbuffer) option in desktop browsers.\r\n updateWhenIdle: Browser.mobile,\r\n\r\n // @option updateInterval: Number = 150\r\n // Cells will not update more than once every `updateInterval` milliseconds when panning.\r\n updateInterval: 150,\r\n\r\n // @option noWrap: Boolean = false\r\n // Whether the layer is wrapped around the antimeridian. If `true`, the\r\n // GridLayer will only be displayed once at low zoom levels. Has no\r\n // effect when the [map CRS](#map-crs) doesn't wrap around. Can be used\r\n // in combination with [`bounds`](#gridlayer-bounds) to prevent requesting\r\n // cells outside the CRS limits.\r\n noWrap: false,\r\n\r\n // @option keepBuffer: Number = 1.5\r\n // When panning the map, keep this many rows and columns of cells before unloading them.\r\n keepBuffer: 1.5\r\n },\r\n\r\n initialize: function (options) {\r\n Util.setOptions(this, options);\r\n },\r\n\r\n onAdd: function () {\r\n this._cells = {};\r\n this._activeCells = {};\r\n this._resetView();\r\n this._update();\r\n },\r\n\r\n onRemove: function (map) {\r\n this._removeAllCells();\r\n this._cellZoom = undefined;\r\n },\r\n\r\n // @method isLoading: Boolean\r\n // Returns `true` if any cell in the grid layer has not finished loading.\r\n isLoading: function () {\r\n return this._loading;\r\n },\r\n\r\n // @method redraw: this\r\n // Causes the layer to clear all the cells and request them again.\r\n redraw: function () {\r\n if (this._map) {\r\n this._removeAllCells();\r\n this._update();\r\n }\r\n return this;\r\n },\r\n\r\n getEvents: function () {\r\n var events = {\r\n viewprereset: this._invalidateAll,\r\n viewreset: this._resetView,\r\n zoom: this._resetView,\r\n moveend: this._onMoveEnd\r\n };\r\n\r\n if (!this.options.updateWhenIdle) {\r\n // update cells on move, but not more often than once per given interval\r\n if (!this._onMove) {\r\n this._onMove = Util.throttle(\r\n this._onMoveEnd,\r\n this.options.updateInterval,\r\n this\r\n );\r\n }\r\n\r\n events.move = this._onMove;\r\n }\r\n\r\n return events;\r\n },\r\n\r\n // @section Extension methods\r\n // Layers extending `GridLayer` shall reimplement the following method.\r\n // @method createCell(coords: Object, done?: Function): HTMLElement\r\n // Called only internally, must be overridden by classes extending `GridLayer`.\r\n // Returns the `HTMLElement` corresponding to the given `coords`. If the `done` callback\r\n // is specified, it must be called when the cell has finished loading and drawing.\r\n createCell: function () {\r\n return document.createElement('div');\r\n },\r\n\r\n removeCell: function () {\r\n return;\r\n },\r\n\r\n reuseCell: function () {\r\n return;\r\n },\r\n\r\n cellLeave: function () {\r\n return;\r\n },\r\n\r\n // @section\r\n // @method getCellSize: Point\r\n // Normalizes the [cellSize option](#gridlayer-cellsize) into a point. Used by the `createCell()` method.\r\n getCellSize: function () {\r\n var s = this.options.cellSize;\r\n return s instanceof Point ? s : new Point(s, s);\r\n },\r\n\r\n _pruneCells: function () {\r\n if (!this._map) {\r\n return;\r\n }\r\n\r\n var key, cell;\r\n\r\n for (key in this._cells) {\r\n cell = this._cells[key];\r\n cell.retain = cell.current;\r\n }\r\n\r\n for (key in this._cells) {\r\n cell = this._cells[key];\r\n if (cell.current && !cell.active) {\r\n var coords = cell.coords;\r\n if (!this._retainParent(coords.x, coords.y, coords.z, coords.z - 5)) {\r\n this._retainChildren(coords.x, coords.y, coords.z, coords.z + 2);\r\n }\r\n }\r\n }\r\n\r\n for (key in this._cells) {\r\n if (!this._cells[key].retain) {\r\n this._removeCell(key);\r\n }\r\n }\r\n },\r\n\r\n _removeAllCells: function () {\r\n for (var key in this._cells) {\r\n this._removeCell(key);\r\n }\r\n },\r\n\r\n _invalidateAll: function () {\r\n this._removeAllCells();\r\n\r\n this._cellZoom = undefined;\r\n },\r\n\r\n _retainParent: function (x, y, z, minZoom) {\r\n var x2 = Math.floor(x / 2);\r\n var y2 = Math.floor(y / 2);\r\n var z2 = z - 1;\r\n var coords2 = new Point(+x2, +y2);\r\n coords2.z = +z2;\r\n\r\n var key = this._cellCoordsToKey(coords2);\r\n var cell = this._cells[key];\r\n\r\n if (cell && cell.active) {\r\n cell.retain = true;\r\n return true;\r\n } else if (cell && cell.loaded) {\r\n cell.retain = true;\r\n }\r\n\r\n if (z2 > minZoom) {\r\n return this._retainParent(x2, y2, z2, minZoom);\r\n }\r\n\r\n return false;\r\n },\r\n\r\n _retainChildren: function (x, y, z, maxZoom) {\r\n for (var i = 2 * x; i < 2 * x + 2; i++) {\r\n for (var j = 2 * y; j < 2 * y + 2; j++) {\r\n var coords = new Point(i, j);\r\n coords.z = z + 1;\r\n\r\n var key = this._cellCoordsToKey(coords);\r\n var cell = this._cells[key];\r\n\r\n if (cell && cell.active) {\r\n cell.retain = true;\r\n continue;\r\n } else if (cell && cell.loaded) {\r\n cell.retain = true;\r\n }\r\n\r\n if (z + 1 < maxZoom) {\r\n this._retainChildren(i, j, z + 1, maxZoom);\r\n }\r\n }\r\n }\r\n },\r\n\r\n _resetView: function (e) {\r\n var animating = e && (e.pinch || e.flyTo);\r\n\r\n if (animating) {\r\n return;\r\n }\r\n\r\n this._setView(\r\n this._map.getCenter(),\r\n this._map.getZoom(),\r\n animating,\r\n animating\r\n );\r\n },\r\n\r\n _setView: function (center, zoom, noPrune, noUpdate) {\r\n var cellZoom = Math.round(zoom);\r\n\r\n if (!noUpdate) {\r\n this._cellZoom = cellZoom;\r\n\r\n if (this._abortLoading) {\r\n this._abortLoading();\r\n }\r\n\r\n this._resetGrid();\r\n\r\n if (cellZoom !== undefined) {\r\n this._update(center);\r\n }\r\n\r\n if (!noPrune) {\r\n this._pruneCells();\r\n }\r\n\r\n // Flag to prevent _updateOpacity from pruning cells during\r\n // a zoom anim or a pinch gesture\r\n this._noPrune = !!noPrune;\r\n }\r\n },\r\n\r\n _resetGrid: function () {\r\n var map = this._map;\r\n var crs = map.options.crs;\r\n var cellSize = (this._cellSize = this.getCellSize());\r\n var cellZoom = this._cellZoom;\r\n\r\n var bounds = this._map.getPixelWorldBounds(this._cellZoom);\r\n if (bounds) {\r\n this._globalCellRange = this._pxBoundsToCellRange(bounds);\r\n }\r\n\r\n this._wrapX = crs.wrapLng &&\r\n !this.options.noWrap && [\r\n Math.floor(map.project([0, crs.wrapLng[0]], cellZoom).x / cellSize.x),\r\n Math.ceil(map.project([0, crs.wrapLng[1]], cellZoom).x / cellSize.y)\r\n ];\r\n this._wrapY = crs.wrapLat &&\r\n !this.options.noWrap && [\r\n Math.floor(map.project([crs.wrapLat[0], 0], cellZoom).y / cellSize.x),\r\n Math.ceil(map.project([crs.wrapLat[1], 0], cellZoom).y / cellSize.y)\r\n ];\r\n },\r\n\r\n _onMoveEnd: function (e) {\r\n var animating = e && (e.pinch || e.flyTo);\r\n\r\n if (animating || !this._map || this._map._animatingZoom) {\r\n return;\r\n }\r\n\r\n this._update();\r\n },\r\n\r\n _getCelldPixelBounds: function (center) {\r\n var map = this._map;\r\n var mapZoom = map._animatingZoom\r\n ? Math.max(map._animateToZoom, map.getZoom())\r\n : map.getZoom();\r\n var scale = map.getZoomScale(mapZoom, this._cellZoom);\r\n var pixelCenter = map.project(center, this._cellZoom).floor();\r\n var halfSize = map.getSize().divideBy(scale * 2);\r\n\r\n return new Bounds(\r\n pixelCenter.subtract(halfSize),\r\n pixelCenter.add(halfSize)\r\n );\r\n },\r\n\r\n // Private method to load cells in the grid's active zoom level according to map bounds\r\n _update: function (center) {\r\n var map = this._map;\r\n if (!map) {\r\n return;\r\n }\r\n var zoom = Math.round(map.getZoom());\r\n\r\n if (center === undefined) {\r\n center = map.getCenter();\r\n }\r\n\r\n var pixelBounds = this._getCelldPixelBounds(center);\r\n var cellRange = this._pxBoundsToCellRange(pixelBounds);\r\n var cellCenter = cellRange.getCenter();\r\n var queue = [];\r\n var margin = this.options.keepBuffer;\r\n var noPruneRange = new Bounds(\r\n cellRange.getBottomLeft().subtract([margin, -margin]),\r\n cellRange.getTopRight().add([margin, -margin])\r\n );\r\n\r\n // Sanity check: panic if the cell range contains Infinity somewhere.\r\n if (\r\n !(\r\n isFinite(cellRange.min.x) &&\r\n isFinite(cellRange.min.y) &&\r\n isFinite(cellRange.max.x) &&\r\n isFinite(cellRange.max.y)\r\n )\r\n ) {\r\n throw new Error('Attempted to load an infinite number of cells');\r\n }\r\n\r\n for (var key in this._cells) {\r\n var c = this._cells[key].coords;\r\n if (\r\n c.z !== this._cellZoom ||\r\n !noPruneRange.contains(new Point(c.x, c.y))\r\n ) {\r\n this._cells[key].current = false;\r\n }\r\n }\r\n\r\n // _update just loads more cells. If the cell zoom level differs too much\r\n // from the map's, let _setView reset levels and prune old cells.\r\n if (Math.abs(zoom - this._cellZoom) > 1) {\r\n this._setView(center, zoom);\r\n return;\r\n }\r\n\r\n // create a queue of coordinates to load cells from\r\n for (var j = cellRange.min.y; j <= cellRange.max.y; j++) {\r\n for (var i = cellRange.min.x; i <= cellRange.max.x; i++) {\r\n var coords = new Point(i, j);\r\n coords.z = this._cellZoom;\r\n\r\n if (!this._isValidCell(coords)) {\r\n continue;\r\n }\r\n\r\n var cell = this._cells[this._cellCoordsToKey(coords)];\r\n if (cell) {\r\n cell.current = true;\r\n } else {\r\n queue.push(coords);\r\n }\r\n }\r\n }\r\n\r\n // sort cell queue to load cells in order of their distance to center\r\n queue.sort(function (a, b) {\r\n return a.distanceTo(cellCenter) - b.distanceTo(cellCenter);\r\n });\r\n\r\n if (queue.length !== 0) {\r\n // if it's the first batch of cells to load\r\n if (!this._loading) {\r\n this._loading = true;\r\n }\r\n\r\n for (i = 0; i < queue.length; i++) {\r\n if (this._activeCells[this._cellCoordsToKey(queue[i])]) {\r\n this._reuseCell(queue[i]);\r\n } else {\r\n this._createCell(queue[i]);\r\n }\r\n }\r\n }\r\n },\r\n\r\n _isValidCell: function (coords) {\r\n var crs = this._map.options.crs;\r\n\r\n if (!crs.infinite) {\r\n // don't load cell if it's out of bounds and not wrapped\r\n var bounds = this._globalCellRange;\r\n if (\r\n (!crs.wrapLng &&\r\n (coords.x < bounds.min.x || coords.x > bounds.max.x)) ||\r\n (!crs.wrapLat && (coords.y < bounds.min.y || coords.y > bounds.max.y))\r\n ) {\r\n return false;\r\n }\r\n }\r\n\r\n if (!this.options.bounds) {\r\n return true;\r\n }\r\n\r\n // don't load cell if it doesn't intersect the bounds in options\r\n var cellBounds = this._cellCoordsToBounds(coords);\r\n return latLngBounds(this.options.bounds).overlaps(cellBounds);\r\n },\r\n\r\n _keyToBounds: function (key) {\r\n return this._cellCoordsToBounds(this._keyToCellCoords(key));\r\n },\r\n\r\n _cellCoordsToNwSe: function (coords) {\r\n var map = this._map;\r\n var cellSize = this.getCellSize();\r\n var nwPoint = coords.scaleBy(cellSize);\r\n var sePoint = nwPoint.add(cellSize);\r\n var nw = map.unproject(nwPoint, coords.z);\r\n var se = map.unproject(sePoint, coords.z);\r\n\r\n return [nw, se];\r\n },\r\n\r\n // converts cell coordinates to its geographical bounds\r\n _cellCoordsToBounds: function (coords) {\r\n var bp = this._cellCoordsToNwSe(coords);\r\n var bounds = new LatLngBounds(bp[0], bp[1]);\r\n\r\n if (!this.options.noWrap) {\r\n bounds = this._map.wrapLatLngBounds(bounds);\r\n }\r\n return bounds;\r\n },\r\n // converts cell coordinates to key for the cell cache\r\n _cellCoordsToKey: function (coords) {\r\n return coords.x + ':' + coords.y + ':' + coords.z;\r\n },\r\n\r\n // converts cell cache key to coordinates\r\n _keyToCellCoords: function (key) {\r\n var k = key.split(':');\r\n var coords = new Point(+k[0], +k[1]);\r\n\r\n coords.z = +k[2];\r\n return coords;\r\n },\r\n\r\n _removeCell: function (key) {\r\n var cell = this._cells[key];\r\n\r\n if (!cell) {\r\n return;\r\n }\r\n\r\n var coords = this._keyToCellCoords(key);\r\n var wrappedCoords = this._wrapCoords(coords);\r\n var cellBounds = this._cellCoordsToBounds(this._wrapCoords(coords));\r\n\r\n cell.current = false;\r\n\r\n delete this._cells[key];\r\n this._activeCells[key] = cell;\r\n\r\n this.cellLeave(cellBounds, wrappedCoords, key);\r\n\r\n this.fire('cellleave', {\r\n key: key,\r\n coords: wrappedCoords,\r\n bounds: cellBounds\r\n });\r\n },\r\n\r\n _reuseCell: function (coords) {\r\n var key = this._cellCoordsToKey(coords);\r\n\r\n // save cell in cache\r\n this._cells[key] = this._activeCells[key];\r\n this._cells[key].current = true;\r\n\r\n var wrappedCoords = this._wrapCoords(coords);\r\n var cellBounds = this._cellCoordsToBounds(this._wrapCoords(coords));\r\n\r\n this.cellEnter(cellBounds, wrappedCoords, key);\r\n\r\n this.fire('cellenter', {\r\n key: key,\r\n coords: wrappedCoords,\r\n bounds: cellBounds\r\n });\r\n },\r\n\r\n _createCell: function (coords) {\r\n var key = this._cellCoordsToKey(coords);\r\n\r\n var wrappedCoords = this._wrapCoords(coords);\r\n var cellBounds = this._cellCoordsToBounds(this._wrapCoords(coords));\r\n\r\n this.createCell(cellBounds, wrappedCoords, key);\r\n\r\n this.fire('cellcreate', {\r\n key: key,\r\n coords: wrappedCoords,\r\n bounds: cellBounds\r\n });\r\n\r\n // save cell in cache\r\n this._cells[key] = {\r\n coords: coords,\r\n current: true\r\n };\r\n\r\n Util.requestAnimFrame(this._pruneCells, this);\r\n },\r\n\r\n _cellReady: function (coords, err, cell) {\r\n var key = this._cellCoordsToKey(coords);\r\n\r\n cell = this._cells[key];\r\n\r\n if (!cell) {\r\n return;\r\n }\r\n\r\n cell.loaded = +new Date();\r\n\r\n cell.active = true;\r\n },\r\n\r\n _getCellPos: function (coords) {\r\n return coords.scaleBy(this.getCellSize());\r\n },\r\n\r\n _wrapCoords: function (coords) {\r\n var newCoords = new Point(\r\n this._wrapX ? Util.wrapNum(coords.x, this._wrapX) : coords.x,\r\n this._wrapY ? Util.wrapNum(coords.y, this._wrapY) : coords.y\r\n );\r\n newCoords.z = coords.z;\r\n return newCoords;\r\n },\r\n\r\n _pxBoundsToCellRange: function (bounds) {\r\n var cellSize = this.getCellSize();\r\n return new Bounds(\r\n bounds.min.unscaleBy(cellSize).floor(),\r\n bounds.max.unscaleBy(cellSize).ceil().subtract([1, 1])\r\n );\r\n }\r\n});\r\n","import { Path, Util, GeoJSON, latLng } from 'leaflet';\r\nimport { FeatureManager } from './FeatureManager';\r\nimport { warn } from '../../Util';\r\n\r\nexport var FeatureLayer = FeatureManager.extend({\r\n\r\n options: {\r\n cacheLayers: true\r\n },\r\n\r\n /**\r\n * Constructor\r\n */\r\n initialize: function (options) {\r\n FeatureManager.prototype.initialize.call(this, options);\r\n this._originalStyle = this.options.style;\r\n this._layers = {};\r\n },\r\n\r\n /**\r\n * Layer Interface\r\n */\r\n\r\n onRemove: function (map) {\r\n for (var i in this._layers) {\r\n map.removeLayer(this._layers[i]);\r\n // trigger the event when the entire featureLayer is removed from the map\r\n this.fire('removefeature', {\r\n feature: this._layers[i].feature,\r\n permanent: false\r\n }, true);\r\n }\r\n\r\n return FeatureManager.prototype.onRemove.call(this, map);\r\n },\r\n\r\n createNewLayer: function (geojson) {\r\n var layer = GeoJSON.geometryToLayer(geojson, this.options);\r\n // trap for GeoJSON without geometry\r\n if (layer) {\r\n layer.defaultOptions = layer.options;\r\n }\r\n return layer;\r\n },\r\n\r\n _updateLayer: function (layer, geojson) {\r\n // convert the geojson coordinates into a Leaflet LatLng array/nested arrays\r\n // pass it to setLatLngs to update layer geometries\r\n var latlngs = [];\r\n var coordsToLatLng = this.options.coordsToLatLng || GeoJSON.coordsToLatLng;\r\n\r\n // copy new attributes, if present\r\n if (geojson.properties) {\r\n layer.feature.properties = geojson.properties;\r\n }\r\n\r\n switch (geojson.geometry.type) {\r\n case 'Point':\r\n latlngs = GeoJSON.coordsToLatLng(geojson.geometry.coordinates);\r\n layer.setLatLng(latlngs);\r\n break;\r\n case 'LineString':\r\n latlngs = GeoJSON.coordsToLatLngs(geojson.geometry.coordinates, 0, coordsToLatLng);\r\n layer.setLatLngs(latlngs);\r\n break;\r\n case 'MultiLineString':\r\n latlngs = GeoJSON.coordsToLatLngs(geojson.geometry.coordinates, 1, coordsToLatLng);\r\n layer.setLatLngs(latlngs);\r\n break;\r\n case 'Polygon':\r\n latlngs = GeoJSON.coordsToLatLngs(geojson.geometry.coordinates, 1, coordsToLatLng);\r\n layer.setLatLngs(latlngs);\r\n break;\r\n case 'MultiPolygon':\r\n latlngs = GeoJSON.coordsToLatLngs(geojson.geometry.coordinates, 2, coordsToLatLng);\r\n layer.setLatLngs(latlngs);\r\n break;\r\n }\r\n },\r\n\r\n /**\r\n * Feature Management Methods\r\n */\r\n\r\n createLayers: function (features) {\r\n for (var i = features.length - 1; i >= 0; i--) {\r\n var geojson = features[i];\r\n\r\n var layer = this._layers[geojson.id];\r\n var newLayer;\r\n\r\n if (this._visibleZoom() && layer && !this._map.hasLayer(layer) && (!this.options.timeField || this._featureWithinTimeRange(geojson))) {\r\n this._map.addLayer(layer);\r\n this.fire('addfeature', {\r\n feature: layer.feature\r\n }, true);\r\n }\r\n\r\n // update geometry if necessary\r\n if (layer && this.options.simplifyFactor > 0 && (layer.setLatLngs || layer.setLatLng)) {\r\n this._updateLayer(layer, geojson);\r\n }\r\n\r\n if (!layer) {\r\n newLayer = this.createNewLayer(geojson);\r\n\r\n if (!newLayer) {\r\n warn('invalid GeoJSON encountered');\r\n } else {\r\n newLayer.feature = geojson;\r\n\r\n // bubble events from individual layers to the feature layer\r\n newLayer.addEventParent(this);\r\n\r\n if (this.options.onEachFeature) {\r\n this.options.onEachFeature(newLayer.feature, newLayer);\r\n }\r\n\r\n // cache the layer\r\n this._layers[newLayer.feature.id] = newLayer;\r\n\r\n // style the layer\r\n this.setFeatureStyle(newLayer.feature.id, this.options.style);\r\n\r\n this.fire('createfeature', {\r\n feature: newLayer.feature\r\n }, true);\r\n\r\n // add the layer if the current zoom level is inside the range defined for the layer, it is within the current time bounds or our layer is not time enabled\r\n if (this._visibleZoom() && (!this.options.timeField || (this.options.timeField && this._featureWithinTimeRange(geojson)))) {\r\n this._map.addLayer(newLayer);\r\n }\r\n }\r\n }\r\n }\r\n },\r\n\r\n addLayers: function (ids) {\r\n for (var i = ids.length - 1; i >= 0; i--) {\r\n var layer = this._layers[ids[i]];\r\n if (layer && (!this.options.timeField || this._featureWithinTimeRange(layer.feature))) {\r\n this._map.addLayer(layer);\r\n }\r\n }\r\n },\r\n\r\n removeLayers: function (ids, permanent) {\r\n for (var i = ids.length - 1; i >= 0; i--) {\r\n var id = ids[i];\r\n var layer = this._layers[id];\r\n if (layer) {\r\n this.fire('removefeature', {\r\n feature: layer.feature,\r\n permanent: permanent\r\n }, true);\r\n this._map.removeLayer(layer);\r\n }\r\n if (layer && permanent) {\r\n delete this._layers[id];\r\n }\r\n }\r\n },\r\n\r\n cellEnter: function (bounds, coords) {\r\n if (this._visibleZoom() && !this._zooming && this._map) {\r\n Util.requestAnimFrame(Util.bind(function () {\r\n var cacheKey = this._cacheKey(coords);\r\n var cellKey = this._cellCoordsToKey(coords);\r\n var layers = this._cache[cacheKey];\r\n if (this._activeCells[cellKey] && layers) {\r\n this.addLayers(layers);\r\n }\r\n }, this));\r\n }\r\n },\r\n\r\n cellLeave: function (bounds, coords) {\r\n if (!this._zooming) {\r\n Util.requestAnimFrame(Util.bind(function () {\r\n if (this._map) {\r\n var cacheKey = this._cacheKey(coords);\r\n var cellKey = this._cellCoordsToKey(coords);\r\n var layers = this._cache[cacheKey];\r\n var mapBounds = this._map.getBounds();\r\n if (!this._activeCells[cellKey] && layers) {\r\n var removable = true;\r\n\r\n for (var i = 0; i < layers.length; i++) {\r\n var layer = this._layers[layers[i]];\r\n if (layer && layer.getBounds && mapBounds.intersects(layer.getBounds())) {\r\n removable = false;\r\n }\r\n }\r\n\r\n if (removable) {\r\n this.removeLayers(layers, !this.options.cacheLayers);\r\n }\r\n\r\n if (!this.options.cacheLayers && removable) {\r\n delete this._cache[cacheKey];\r\n delete this._cells[cellKey];\r\n delete this._activeCells[cellKey];\r\n }\r\n }\r\n }\r\n }, this));\r\n }\r\n },\r\n\r\n /**\r\n * Styling Methods\r\n */\r\n\r\n resetStyle: function () {\r\n this.options.style = this._originalStyle;\r\n this.eachFeature(function (layer) {\r\n this.resetFeatureStyle(layer.feature.id);\r\n }, this);\r\n return this;\r\n },\r\n\r\n setStyle: function (style) {\r\n this.options.style = style;\r\n this.eachFeature(function (layer) {\r\n this.setFeatureStyle(layer.feature.id, style);\r\n }, this);\r\n return this;\r\n },\r\n\r\n resetFeatureStyle: function (id) {\r\n var layer = this._layers[id];\r\n var style = this._originalStyle || Path.prototype.options;\r\n if (layer) {\r\n Util.extend(layer.options, layer.defaultOptions);\r\n this.setFeatureStyle(id, style);\r\n }\r\n return this;\r\n },\r\n\r\n setFeatureStyle: function (id, style) {\r\n var layer = this._layers[id];\r\n if (typeof style === 'function') {\r\n style = style(layer.feature);\r\n }\r\n if (layer.setStyle) {\r\n layer.setStyle(style);\r\n }\r\n return this;\r\n },\r\n\r\n /**\r\n * Utility Methods\r\n */\r\n\r\n eachActiveFeature: function (fn, context) {\r\n // figure out (roughly) which layers are in view\r\n if (this._map) {\r\n var activeBounds = this._map.getBounds();\r\n for (var i in this._layers) {\r\n if (this._currentSnapshot.indexOf(this._layers[i].feature.id) !== -1) {\r\n // a simple point in poly test for point geometries\r\n if (typeof this._layers[i].getLatLng === 'function' && activeBounds.contains(this._layers[i].getLatLng())) {\r\n fn.call(context, this._layers[i]);\r\n } else if (typeof this._layers[i].getBounds === 'function' && activeBounds.intersects(this._layers[i].getBounds())) {\r\n // intersecting bounds check for polyline and polygon geometries\r\n fn.call(context, this._layers[i]);\r\n }\r\n }\r\n }\r\n }\r\n return this;\r\n },\r\n\r\n eachFeature: function (fn, context) {\r\n for (var i in this._layers) {\r\n fn.call(context, this._layers[i]);\r\n }\r\n return this;\r\n },\r\n\r\n getFeature: function (id) {\r\n return this._layers[id];\r\n },\r\n\r\n bringToBack: function () {\r\n this.eachFeature(function (layer) {\r\n if (layer.bringToBack) {\r\n layer.bringToBack();\r\n }\r\n });\r\n },\r\n\r\n bringToFront: function () {\r\n this.eachFeature(function (layer) {\r\n if (layer.bringToFront) {\r\n layer.bringToFront();\r\n }\r\n });\r\n },\r\n\r\n redraw: function (id) {\r\n if (id) {\r\n this._redraw(id);\r\n }\r\n return this;\r\n },\r\n\r\n _redraw: function (id) {\r\n var layer = this._layers[id];\r\n var geojson = layer.feature;\r\n\r\n // if this looks like a marker\r\n if (layer && layer.setIcon && this.options.pointToLayer) {\r\n // update custom symbology, if necessary\r\n if (this.options.pointToLayer) {\r\n var getIcon = this.options.pointToLayer(geojson, latLng(geojson.geometry.coordinates[1], geojson.geometry.coordinates[0]));\r\n var updatedIcon = getIcon.options.icon;\r\n layer.setIcon(updatedIcon);\r\n }\r\n }\r\n\r\n // looks like a vector marker (circleMarker)\r\n if (layer && layer.setStyle && this.options.pointToLayer) {\r\n var getStyle = this.options.pointToLayer(geojson, latLng(geojson.geometry.coordinates[1], geojson.geometry.coordinates[0]));\r\n var updatedStyle = getStyle.options;\r\n this.setFeatureStyle(geojson.id, updatedStyle);\r\n }\r\n\r\n // looks like a path (polygon/polyline)\r\n if (layer && layer.setStyle && this.options.style) {\r\n this.resetStyle(geojson.id);\r\n }\r\n }\r\n});\r\n\r\nexport function featureLayer (options) {\r\n return new FeatureLayer(options);\r\n}\r\n\r\nexport default featureLayer;\r\n","import { Util } from 'leaflet';\r\nimport featureLayerService from '../../Services/FeatureLayerService';\r\nimport { getUrlParams, warn, setEsriAttribution } from '../../Util';\r\nimport { FeatureGrid } from './FeatureGrid';\r\nimport BinarySearchIndex from 'tiny-binary-search';\r\n\r\nexport var FeatureManager = FeatureGrid.extend({\r\n /**\r\n * Options\r\n */\r\n\r\n options: {\r\n attribution: null,\r\n where: '1=1',\r\n fields: ['*'],\r\n from: false,\r\n to: false,\r\n timeField: false,\r\n timeFilterMode: 'server',\r\n simplifyFactor: 0,\r\n precision: 6\r\n },\r\n\r\n /**\r\n * Constructor\r\n */\r\n\r\n initialize: function (options) {\r\n FeatureGrid.prototype.initialize.call(this, options);\r\n\r\n options = getUrlParams(options);\r\n options = Util.setOptions(this, options);\r\n\r\n this.service = featureLayerService(options);\r\n this.service.addEventParent(this);\r\n\r\n // use case insensitive regex to look for common fieldnames used for indexing\r\n if (this.options.fields[0] !== '*') {\r\n var oidCheck = false;\r\n for (var i = 0; i < this.options.fields.length; i++) {\r\n if (this.options.fields[i].match(/^(OBJECTID|FID|OID|ID)$/i)) {\r\n oidCheck = true;\r\n }\r\n }\r\n if (oidCheck === false) {\r\n warn(\r\n 'no known esriFieldTypeOID field detected in fields Array. Please add an attribute field containing unique IDs to ensure the layer can be drawn correctly.'\r\n );\r\n }\r\n }\r\n\r\n if (this.options.timeField.start && this.options.timeField.end) {\r\n this._startTimeIndex = new BinarySearchIndex();\r\n this._endTimeIndex = new BinarySearchIndex();\r\n } else if (this.options.timeField) {\r\n this._timeIndex = new BinarySearchIndex();\r\n }\r\n\r\n this._cache = {};\r\n this._currentSnapshot = []; // cache of what layers should be active\r\n this._activeRequests = 0;\r\n },\r\n\r\n /**\r\n * Layer Interface\r\n */\r\n\r\n onAdd: function (map) {\r\n // include 'Powered by Esri' in map attribution\r\n setEsriAttribution(map);\r\n\r\n this.service.metadata(function (err, metadata) {\r\n if (!err) {\r\n var supportedFormats = metadata.supportedQueryFormats;\r\n\r\n // Check if someone has requested that we don't use geoJSON, even if it's available\r\n var forceJsonFormat = false;\r\n if (this.service.options.isModern === false) {\r\n forceJsonFormat = true;\r\n }\r\n\r\n // Unless we've been told otherwise, check to see whether service can emit GeoJSON natively\r\n if (\r\n !forceJsonFormat &&\r\n supportedFormats &&\r\n supportedFormats.indexOf('geoJSON') !== -1\r\n ) {\r\n this.service.options.isModern = true;\r\n }\r\n\r\n if (metadata.objectIdField) {\r\n this.service.options.idAttribute = metadata.objectIdField;\r\n }\r\n\r\n // add copyright text listed in service metadata\r\n if (\r\n !this.options.attribution &&\r\n map.attributionControl &&\r\n metadata.copyrightText\r\n ) {\r\n this.options.attribution = metadata.copyrightText;\r\n map.attributionControl.addAttribution(this.getAttribution());\r\n }\r\n }\r\n }, this);\r\n\r\n map.on('zoomend', this._handleZoomChange, this);\r\n\r\n return FeatureGrid.prototype.onAdd.call(this, map);\r\n },\r\n\r\n onRemove: function (map) {\r\n map.off('zoomend', this._handleZoomChange, this);\r\n\r\n return FeatureGrid.prototype.onRemove.call(this, map);\r\n },\r\n\r\n getAttribution: function () {\r\n return this.options.attribution;\r\n },\r\n\r\n /**\r\n * Feature Management\r\n */\r\n\r\n createCell: function (bounds, coords) {\r\n // dont fetch features outside the scale range defined for the layer\r\n if (this._visibleZoom()) {\r\n this._requestFeatures(bounds, coords);\r\n }\r\n },\r\n\r\n _requestFeatures: function (bounds, coords, callback) {\r\n this._activeRequests++;\r\n\r\n // our first active request fires loading\r\n if (this._activeRequests === 1) {\r\n this.fire(\r\n 'loading',\r\n {\r\n bounds: bounds\r\n },\r\n true\r\n );\r\n }\r\n\r\n return this._buildQuery(bounds).run(function (\r\n error,\r\n featureCollection,\r\n response\r\n ) {\r\n if (response && response.exceededTransferLimit) {\r\n this.fire('drawlimitexceeded');\r\n }\r\n\r\n // no error, features\r\n if (!error && featureCollection && featureCollection.features.length) {\r\n // schedule adding features until the next animation frame\r\n Util.requestAnimFrame(\r\n Util.bind(function () {\r\n this._addFeatures(featureCollection.features, coords);\r\n this._postProcessFeatures(bounds);\r\n }, this)\r\n );\r\n }\r\n\r\n // no error, no features\r\n if (!error && featureCollection && !featureCollection.features.length) {\r\n this._postProcessFeatures(bounds);\r\n }\r\n\r\n if (error) {\r\n this._postProcessFeatures(bounds);\r\n }\r\n\r\n if (callback) {\r\n callback.call(this, error, featureCollection);\r\n }\r\n },\r\n this);\r\n },\r\n\r\n _postProcessFeatures: function (bounds) {\r\n // deincrement the request counter now that we have processed features\r\n this._activeRequests--;\r\n\r\n // if there are no more active requests fire a load event for this view\r\n if (this._activeRequests <= 0) {\r\n this.fire('load', {\r\n bounds: bounds\r\n });\r\n }\r\n },\r\n\r\n _cacheKey: function (coords) {\r\n return coords.z + ':' + coords.x + ':' + coords.y;\r\n },\r\n\r\n _addFeatures: function (features, coords) {\r\n var key = this._cacheKey(coords);\r\n this._cache[key] = this._cache[key] || [];\r\n\r\n for (var i = features.length - 1; i >= 0; i--) {\r\n var id = features[i].id;\r\n\r\n if (this._currentSnapshot.indexOf(id) === -1) {\r\n this._currentSnapshot.push(id);\r\n }\r\n if (this._cache[key].indexOf(id) === -1) {\r\n this._cache[key].push(id);\r\n }\r\n }\r\n\r\n if (this.options.timeField) {\r\n this._buildTimeIndexes(features);\r\n }\r\n\r\n this.createLayers(features);\r\n },\r\n\r\n _buildQuery: function (bounds) {\r\n var query = this.service\r\n .query()\r\n .intersects(bounds)\r\n .where(this.options.where)\r\n .fields(this.options.fields)\r\n .precision(this.options.precision);\r\n\r\n query.params['resultType'] = 'tile';\r\n\r\n if (this.options.requestParams) {\r\n Util.extend(query.params, this.options.requestParams);\r\n }\r\n\r\n if (this.options.simplifyFactor) {\r\n query.simplify(this._map, this.options.simplifyFactor);\r\n }\r\n\r\n if (\r\n this.options.timeFilterMode === 'server' &&\r\n this.options.from &&\r\n this.options.to\r\n ) {\r\n query.between(this.options.from, this.options.to);\r\n }\r\n\r\n return query;\r\n },\r\n\r\n /**\r\n * Where Methods\r\n */\r\n\r\n setWhere: function (where, callback, context) {\r\n this.options.where = where && where.length ? where : '1=1';\r\n\r\n var oldSnapshot = [];\r\n var newSnapshot = [];\r\n var pendingRequests = 0;\r\n var requestError = null;\r\n var requestCallback = Util.bind(function (error, featureCollection) {\r\n if (error) {\r\n requestError = error;\r\n }\r\n\r\n if (featureCollection) {\r\n for (var i = featureCollection.features.length - 1; i >= 0; i--) {\r\n newSnapshot.push(featureCollection.features[i].id);\r\n }\r\n }\r\n\r\n pendingRequests--;\r\n\r\n if (pendingRequests <= 0 && this._visibleZoom()) {\r\n this._currentSnapshot = newSnapshot;\r\n // schedule adding features for the next animation frame\r\n Util.requestAnimFrame(\r\n Util.bind(function () {\r\n this.removeLayers(oldSnapshot);\r\n this.addLayers(newSnapshot);\r\n if (callback) {\r\n callback.call(context, requestError);\r\n }\r\n }, this)\r\n );\r\n }\r\n }, this);\r\n\r\n for (var i = this._currentSnapshot.length - 1; i >= 0; i--) {\r\n oldSnapshot.push(this._currentSnapshot[i]);\r\n }\r\n for (var key in this._cells) {\r\n pendingRequests++;\r\n var coords = this._keyToCellCoords(key);\r\n var bounds = this._cellCoordsToBounds(coords);\r\n this._requestFeatures(bounds, key, requestCallback);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n getWhere: function () {\r\n return this.options.where;\r\n },\r\n\r\n /**\r\n * Time Range Methods\r\n */\r\n\r\n getTimeRange: function () {\r\n return [this.options.from, this.options.to];\r\n },\r\n\r\n setTimeRange: function (from, to, callback, context) {\r\n var oldFrom = this.options.from;\r\n var oldTo = this.options.to;\r\n var pendingRequests = 0;\r\n var requestError = null;\r\n var requestCallback = Util.bind(function (error) {\r\n if (error) {\r\n requestError = error;\r\n }\r\n this._filterExistingFeatures(oldFrom, oldTo, from, to);\r\n\r\n pendingRequests--;\r\n\r\n if (callback && pendingRequests <= 0) {\r\n callback.call(context, requestError);\r\n }\r\n }, this);\r\n\r\n this.options.from = from;\r\n this.options.to = to;\r\n\r\n this._filterExistingFeatures(oldFrom, oldTo, from, to);\r\n\r\n if (this.options.timeFilterMode === 'server') {\r\n for (var key in this._cells) {\r\n pendingRequests++;\r\n var coords = this._keyToCellCoords(key);\r\n var bounds = this._cellCoordsToBounds(coords);\r\n this._requestFeatures(bounds, key, requestCallback);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n refresh: function () {\r\n for (var key in this._cells) {\r\n var coords = this._keyToCellCoords(key);\r\n var bounds = this._cellCoordsToBounds(coords);\r\n this._requestFeatures(bounds, key);\r\n }\r\n\r\n if (this.redraw) {\r\n this.once(\r\n 'load',\r\n function () {\r\n this.eachFeature(function (layer) {\r\n this._redraw(layer.feature.id);\r\n }, this);\r\n },\r\n this\r\n );\r\n }\r\n },\r\n\r\n _filterExistingFeatures: function (oldFrom, oldTo, newFrom, newTo) {\r\n var layersToRemove =\r\n oldFrom && oldTo\r\n ? this._getFeaturesInTimeRange(oldFrom, oldTo)\r\n : this._currentSnapshot;\r\n var layersToAdd = this._getFeaturesInTimeRange(newFrom, newTo);\r\n\r\n if (layersToAdd.indexOf) {\r\n for (var i = 0; i < layersToAdd.length; i++) {\r\n var shouldRemoveLayer = layersToRemove.indexOf(layersToAdd[i]);\r\n if (shouldRemoveLayer >= 0) {\r\n layersToRemove.splice(shouldRemoveLayer, 1);\r\n }\r\n }\r\n }\r\n\r\n // schedule adding features until the next animation frame\r\n Util.requestAnimFrame(\r\n Util.bind(function () {\r\n this.removeLayers(layersToRemove);\r\n this.addLayers(layersToAdd);\r\n }, this)\r\n );\r\n },\r\n\r\n _getFeaturesInTimeRange: function (start, end) {\r\n var ids = [];\r\n var search;\r\n\r\n if (this.options.timeField.start && this.options.timeField.end) {\r\n var startTimes = this._startTimeIndex.between(start, end);\r\n var endTimes = this._endTimeIndex.between(start, end);\r\n search = startTimes.concat(endTimes);\r\n } else if (this._timeIndex) {\r\n search = this._timeIndex.between(start, end);\r\n } else {\r\n warn(\r\n 'You must set timeField in the layer constructor in order to manipulate the start and end time filter.'\r\n );\r\n return [];\r\n }\r\n\r\n for (var i = search.length - 1; i >= 0; i--) {\r\n ids.push(search[i].id);\r\n }\r\n\r\n return ids;\r\n },\r\n\r\n _buildTimeIndexes: function (geojson) {\r\n var i;\r\n var feature;\r\n if (this.options.timeField.start && this.options.timeField.end) {\r\n var startTimeEntries = [];\r\n var endTimeEntries = [];\r\n for (i = geojson.length - 1; i >= 0; i--) {\r\n feature = geojson[i];\r\n startTimeEntries.push({\r\n id: feature.id,\r\n value: new Date(feature.properties[this.options.timeField.start])\r\n });\r\n endTimeEntries.push({\r\n id: feature.id,\r\n value: new Date(feature.properties[this.options.timeField.end])\r\n });\r\n }\r\n this._startTimeIndex.bulkAdd(startTimeEntries);\r\n this._endTimeIndex.bulkAdd(endTimeEntries);\r\n } else {\r\n var timeEntries = [];\r\n for (i = geojson.length - 1; i >= 0; i--) {\r\n feature = geojson[i];\r\n timeEntries.push({\r\n id: feature.id,\r\n value: new Date(feature.properties[this.options.timeField])\r\n });\r\n }\r\n\r\n this._timeIndex.bulkAdd(timeEntries);\r\n }\r\n },\r\n\r\n _featureWithinTimeRange: function (feature) {\r\n if (!this.options.from || !this.options.to) {\r\n return true;\r\n }\r\n\r\n var from = +this.options.from.valueOf();\r\n var to = +this.options.to.valueOf();\r\n\r\n if (typeof this.options.timeField === 'string') {\r\n var date = +feature.properties[this.options.timeField];\r\n return date >= from && date <= to;\r\n }\r\n\r\n if (this.options.timeField.start && this.options.timeField.end) {\r\n var startDate = +feature.properties[this.options.timeField.start];\r\n var endDate = +feature.properties[this.options.timeField.end];\r\n return (\r\n (startDate >= from && startDate <= to) ||\r\n (endDate >= from && endDate <= to) ||\r\n (startDate <= from && endDate >= to)\r\n );\r\n }\r\n },\r\n\r\n _visibleZoom: function () {\r\n // check to see whether the current zoom level of the map is within the optional limit defined for the FeatureLayer\r\n if (!this._map) {\r\n return false;\r\n }\r\n var zoom = this._map.getZoom();\r\n if (zoom > this.options.maxZoom || zoom < this.options.minZoom) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n },\r\n\r\n _handleZoomChange: function () {\r\n if (!this._visibleZoom()) {\r\n this.removeLayers(this._currentSnapshot);\r\n this._currentSnapshot = [];\r\n } else {\r\n /*\r\n for every cell in this._cells\r\n 1. Get the cache key for the coords of the cell\r\n 2. If this._cache[key] exists it will be an array of feature IDs.\r\n 3. Call this.addLayers(this._cache[key]) to instruct the feature layer to add the layers back.\r\n */\r\n for (var i in this._cells) {\r\n var coords = this._cells[i].coords;\r\n var key = this._cacheKey(coords);\r\n if (this._cache[key]) {\r\n this.addLayers(this._cache[key]);\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Service Methods\r\n */\r\n\r\n authenticate: function (token) {\r\n this.service.authenticate(token);\r\n return this;\r\n },\r\n\r\n metadata: function (callback, context) {\r\n this.service.metadata(callback, context);\r\n return this;\r\n },\r\n\r\n query: function () {\r\n return this.service.query();\r\n },\r\n\r\n _getMetadata: function (callback) {\r\n if (this._metadata) {\r\n var error;\r\n callback(error, this._metadata);\r\n } else {\r\n this.metadata(\r\n Util.bind(function (error, response) {\r\n this._metadata = response;\r\n callback(error, this._metadata);\r\n }, this)\r\n );\r\n }\r\n },\r\n\r\n addFeature: function (feature, callback, context) {\r\n this.addFeatures(feature, callback, context);\r\n },\r\n\r\n addFeatures: function (features, callback, context) {\r\n this._getMetadata(\r\n Util.bind(function (error, metadata) {\r\n if (error) {\r\n if (callback) {\r\n callback.call(this, error, null);\r\n }\r\n return;\r\n }\r\n // GeoJSON featureCollection or simple feature\r\n var featuresArray = features.features ? features.features : [features];\r\n\r\n this.service.addFeatures(\r\n features,\r\n Util.bind(function (error, response) {\r\n if (!error) {\r\n for (var i = featuresArray.length - 1; i >= 0; i--) {\r\n // assign ID from result to appropriate objectid field from service metadata\r\n featuresArray[i].properties[metadata.objectIdField] =\r\n featuresArray.length > 1\r\n ? response[i].objectId\r\n : response.objectId;\r\n // we also need to update the geojson id for createLayers() to function\r\n featuresArray[i].id =\r\n featuresArray.length > 1\r\n ? response[i].objectId\r\n : response.objectId;\r\n }\r\n this.createLayers(featuresArray);\r\n }\r\n\r\n if (callback) {\r\n callback.call(context, error, response);\r\n }\r\n }, this)\r\n );\r\n }, this)\r\n );\r\n },\r\n\r\n updateFeature: function (feature, callback, context) {\r\n this.updateFeatures(feature, callback, context);\r\n },\r\n\r\n updateFeatures: function (features, callback, context) {\r\n // GeoJSON featureCollection or simple feature\r\n var featuresArray = features.features ? features.features : [features];\r\n this.service.updateFeatures(\r\n features,\r\n function (error, response) {\r\n if (!error) {\r\n for (var i = featuresArray.length - 1; i >= 0; i--) {\r\n this.removeLayers([featuresArray[i].id], true);\r\n }\r\n this.createLayers(featuresArray);\r\n }\r\n\r\n if (callback) {\r\n callback.call(context, error, response);\r\n }\r\n },\r\n this\r\n );\r\n },\r\n\r\n deleteFeature: function (id, callback, context) {\r\n this.deleteFeatures(id, callback, context);\r\n },\r\n\r\n deleteFeatures: function (ids, callback, context) {\r\n return this.service.deleteFeatures(\r\n ids,\r\n function (error, response) {\r\n var responseArray = response.length ? response : [response];\r\n if (!error && responseArray.length > 0) {\r\n for (var i = responseArray.length - 1; i >= 0; i--) {\r\n this.removeLayers([responseArray[i].objectId], true);\r\n }\r\n }\r\n if (callback) {\r\n callback.call(context, error, response);\r\n }\r\n },\r\n this\r\n );\r\n }\r\n});\r\n","import { Util } from 'leaflet';\r\nimport { RasterLayer } from './RasterLayer';\r\nimport { getUrlParams } from '../Util';\r\nimport imageService from '../Services/ImageService';\r\n\r\nexport var ImageMapLayer = RasterLayer.extend({\r\n\r\n options: {\r\n updateInterval: 150,\r\n format: 'jpgpng',\r\n transparent: true,\r\n f: 'image'\r\n },\r\n\r\n query: function () {\r\n return this.service.query();\r\n },\r\n\r\n identify: function () {\r\n return this.service.identify();\r\n },\r\n\r\n initialize: function (options) {\r\n options = getUrlParams(options);\r\n this.service = imageService(options);\r\n this.service.addEventParent(this);\r\n\r\n Util.setOptions(this, options);\r\n },\r\n\r\n setPixelType: function (pixelType) {\r\n this.options.pixelType = pixelType;\r\n this._update();\r\n return this;\r\n },\r\n\r\n getPixelType: function () {\r\n return this.options.pixelType;\r\n },\r\n\r\n setBandIds: function (bandIds) {\r\n if (Util.isArray(bandIds)) {\r\n this.options.bandIds = bandIds.join(',');\r\n } else {\r\n this.options.bandIds = bandIds.toString();\r\n }\r\n this._update();\r\n return this;\r\n },\r\n\r\n getBandIds: function () {\r\n return this.options.bandIds;\r\n },\r\n\r\n setNoData: function (noData, noDataInterpretation) {\r\n if (Util.isArray(noData)) {\r\n this.options.noData = noData.join(',');\r\n } else {\r\n this.options.noData = noData.toString();\r\n }\r\n if (noDataInterpretation) {\r\n this.options.noDataInterpretation = noDataInterpretation;\r\n }\r\n this._update();\r\n return this;\r\n },\r\n\r\n getNoData: function () {\r\n return this.options.noData;\r\n },\r\n\r\n getNoDataInterpretation: function () {\r\n return this.options.noDataInterpretation;\r\n },\r\n\r\n setRenderingRule: function (renderingRule) {\r\n this.options.renderingRule = renderingRule;\r\n this._update();\r\n },\r\n\r\n getRenderingRule: function () {\r\n return this.options.renderingRule;\r\n },\r\n\r\n setMosaicRule: function (mosaicRule) {\r\n this.options.mosaicRule = mosaicRule;\r\n this._update();\r\n },\r\n\r\n getMosaicRule: function () {\r\n return this.options.mosaicRule;\r\n },\r\n\r\n _getPopupData: function (e) {\r\n var callback = Util.bind(function (error, results, response) {\r\n if (error) { return; } // we really can't do anything here but authenticate or requesterror will fire\r\n setTimeout(Util.bind(function () {\r\n this._renderPopup(e.latlng, error, results, response);\r\n }, this), 300);\r\n }, this);\r\n\r\n var identifyRequest = this.identify().at(e.latlng);\r\n\r\n // set mosaic rule for identify task if it is set for layer\r\n if (this.options.mosaicRule) {\r\n identifyRequest.setMosaicRule(this.options.mosaicRule);\r\n // @TODO: force return catalog items too?\r\n }\r\n\r\n // @TODO: set rendering rule? Not sure,\r\n // sometimes you want raw pixel values\r\n // if (this.options.renderingRule) {\r\n // identifyRequest.setRenderingRule(this.options.renderingRule);\r\n // }\r\n\r\n identifyRequest.run(callback);\r\n\r\n // set the flags to show the popup\r\n this._shouldRenderPopup = true;\r\n this._lastClick = e.latlng;\r\n },\r\n\r\n _buildExportParams: function () {\r\n var sr = parseInt(this._map.options.crs.code.split(':')[1], 10);\r\n\r\n var params = {\r\n bbox: this._calculateBbox(),\r\n size: this._calculateImageSize(),\r\n format: this.options.format,\r\n transparent: this.options.transparent,\r\n bboxSR: sr,\r\n imageSR: sr\r\n };\r\n\r\n if (this.options.from && this.options.to) {\r\n params.time = this.options.from.valueOf() + ',' + this.options.to.valueOf();\r\n }\r\n\r\n if (this.options.pixelType) {\r\n params.pixelType = this.options.pixelType;\r\n }\r\n\r\n if (this.options.interpolation) {\r\n params.interpolation = this.options.interpolation;\r\n }\r\n\r\n if (this.options.compressionQuality) {\r\n params.compressionQuality = this.options.compressionQuality;\r\n }\r\n\r\n if (this.options.bandIds) {\r\n params.bandIds = this.options.bandIds;\r\n }\r\n\r\n // 0 is falsy *and* a valid input parameter\r\n if (this.options.noData === 0 || this.options.noData) {\r\n params.noData = this.options.noData;\r\n }\r\n\r\n if (this.options.noDataInterpretation) {\r\n params.noDataInterpretation = this.options.noDataInterpretation;\r\n }\r\n\r\n if (this.service.options.token) {\r\n params.token = this.service.options.token;\r\n }\r\n\r\n if (this.options.renderingRule) {\r\n params.renderingRule = JSON.stringify(this.options.renderingRule);\r\n }\r\n\r\n if (this.options.mosaicRule) {\r\n params.mosaicRule = JSON.stringify(this.options.mosaicRule);\r\n }\r\n\r\n return params;\r\n },\r\n\r\n _requestExport: function (params, bounds) {\r\n if (this.options.f === 'json') {\r\n this.service.request('exportImage', params, function (error, response) {\r\n if (error) { return; } // we really can't do anything here but authenticate or requesterror will fire\r\n if (this.options.token) {\r\n response.href += ('?token=' + this.options.token);\r\n }\r\n if (this.options.proxy) {\r\n response.href = this.options.proxy + '?' + response.href;\r\n }\r\n this._renderImage(response.href, bounds);\r\n }, this);\r\n } else {\r\n params.f = 'image';\r\n this._renderImage(this.options.url + 'exportImage' + Util.getParamString(params), bounds);\r\n }\r\n }\r\n});\r\n\r\nexport function imageMapLayer (url, options) {\r\n return new ImageMapLayer(url, options);\r\n}\r\n\r\nexport default imageMapLayer;\r\n","import { ImageOverlay, CRS, DomUtil, Util, Layer, popup, latLng, bounds } from 'leaflet';\r\nimport { cors } from '../Support';\r\nimport { setEsriAttribution } from '../Util';\r\n\r\nvar Overlay = ImageOverlay.extend({\r\n onAdd: function (map) {\r\n this._topLeft = map.getPixelBounds().min;\r\n ImageOverlay.prototype.onAdd.call(this, map);\r\n },\r\n _reset: function () {\r\n if (this._map.options.crs === CRS.EPSG3857) {\r\n ImageOverlay.prototype._reset.call(this);\r\n } else {\r\n DomUtil.setPosition(this._image, this._topLeft.subtract(this._map.getPixelOrigin()));\r\n }\r\n }\r\n});\r\n\r\nexport var RasterLayer = Layer.extend({\r\n options: {\r\n opacity: 1,\r\n position: 'front',\r\n f: 'image',\r\n useCors: cors,\r\n attribution: null,\r\n interactive: false,\r\n alt: ''\r\n },\r\n\r\n onAdd: function (map) {\r\n // include 'Powered by Esri' in map attribution\r\n setEsriAttribution(map);\r\n\r\n if (this.options.zIndex) {\r\n this.options.position = null;\r\n }\r\n\r\n this._update = Util.throttle(this._update, this.options.updateInterval, this);\r\n\r\n map.on('moveend', this._update, this);\r\n\r\n // if we had an image loaded and it matches the\r\n // current bounds show the image otherwise remove it\r\n if (this._currentImage && this._currentImage._bounds.equals(this._map.getBounds())) {\r\n map.addLayer(this._currentImage);\r\n } else if (this._currentImage) {\r\n this._map.removeLayer(this._currentImage);\r\n this._currentImage = null;\r\n }\r\n\r\n this._update();\r\n\r\n if (this._popup) {\r\n this._map.on('click', this._getPopupData, this);\r\n this._map.on('dblclick', this._resetPopupState, this);\r\n }\r\n\r\n // add copyright text listed in service metadata\r\n this.metadata(function (err, metadata) {\r\n if (!err && !this.options.attribution && map.attributionControl && metadata.copyrightText) {\r\n this.options.attribution = metadata.copyrightText;\r\n map.attributionControl.addAttribution(this.getAttribution());\r\n }\r\n }, this);\r\n },\r\n\r\n onRemove: function (map) {\r\n if (this._currentImage) {\r\n this._map.removeLayer(this._currentImage);\r\n }\r\n\r\n if (this._popup) {\r\n this._map.off('click', this._getPopupData, this);\r\n this._map.off('dblclick', this._resetPopupState, this);\r\n }\r\n\r\n this._map.off('moveend', this._update, this);\r\n },\r\n\r\n bindPopup: function (fn, popupOptions) {\r\n this._shouldRenderPopup = false;\r\n this._lastClick = false;\r\n this._popup = popup(popupOptions);\r\n this._popupFunction = fn;\r\n if (this._map) {\r\n this._map.on('click', this._getPopupData, this);\r\n this._map.on('dblclick', this._resetPopupState, this);\r\n }\r\n return this;\r\n },\r\n\r\n unbindPopup: function () {\r\n if (this._map) {\r\n this._map.closePopup(this._popup);\r\n this._map.off('click', this._getPopupData, this);\r\n this._map.off('dblclick', this._resetPopupState, this);\r\n }\r\n this._popup = false;\r\n return this;\r\n },\r\n\r\n bringToFront: function () {\r\n this.options.position = 'front';\r\n if (this._currentImage) {\r\n this._currentImage.bringToFront();\r\n this._setAutoZIndex(Math.max);\r\n }\r\n return this;\r\n },\r\n\r\n bringToBack: function () {\r\n this.options.position = 'back';\r\n if (this._currentImage) {\r\n this._currentImage.bringToBack();\r\n this._setAutoZIndex(Math.min);\r\n }\r\n return this;\r\n },\r\n\r\n setZIndex: function (value) {\r\n this.options.zIndex = value;\r\n if (this._currentImage) {\r\n this._currentImage.setZIndex(value);\r\n }\r\n return this;\r\n },\r\n\r\n _setAutoZIndex: function (compare) {\r\n // go through all other layers of the same pane, set zIndex to max + 1 (front) or min - 1 (back)\r\n if (!this._currentImage) {\r\n return;\r\n }\r\n var layers = this._currentImage.getPane().children;\r\n var edgeZIndex = -compare(-Infinity, Infinity); // -Infinity for max, Infinity for min\r\n for (var i = 0, len = layers.length, zIndex; i < len; i++) {\r\n zIndex = layers[i].style.zIndex;\r\n if (layers[i] !== this._currentImage._image && zIndex) {\r\n edgeZIndex = compare(edgeZIndex, +zIndex);\r\n }\r\n }\r\n\r\n if (isFinite(edgeZIndex)) {\r\n this.options.zIndex = edgeZIndex + compare(-1, 1);\r\n this.setZIndex(this.options.zIndex);\r\n }\r\n },\r\n\r\n getAttribution: function () {\r\n return this.options.attribution;\r\n },\r\n\r\n getOpacity: function () {\r\n return this.options.opacity;\r\n },\r\n\r\n setOpacity: function (opacity) {\r\n this.options.opacity = opacity;\r\n if (this._currentImage) {\r\n this._currentImage.setOpacity(opacity);\r\n }\r\n return this;\r\n },\r\n\r\n getTimeRange: function () {\r\n return [this.options.from, this.options.to];\r\n },\r\n\r\n setTimeRange: function (from, to) {\r\n this.options.from = from;\r\n this.options.to = to;\r\n this._update();\r\n return this;\r\n },\r\n\r\n metadata: function (callback, context) {\r\n this.service.metadata(callback, context);\r\n return this;\r\n },\r\n\r\n authenticate: function (token) {\r\n this.service.authenticate(token);\r\n return this;\r\n },\r\n\r\n redraw: function () {\r\n this._update();\r\n },\r\n\r\n _renderImage: function (url, bounds, contentType) {\r\n if (this._map) {\r\n // if no output directory has been specified for a service, MIME data will be returned\r\n if (contentType) {\r\n url = 'data:' + contentType + ';base64,' + url;\r\n }\r\n\r\n // if server returns an inappropriate response, abort.\r\n if (!url) return;\r\n\r\n // create a new image overlay and add it to the map\r\n // to start loading the image\r\n // opacity is 0 while the image is loading\r\n var image = new Overlay(url, bounds, {\r\n opacity: 0,\r\n crossOrigin: this.options.useCors,\r\n alt: this.options.alt,\r\n pane: this.options.pane || this.getPane(),\r\n interactive: this.options.interactive\r\n }).addTo(this._map);\r\n\r\n var onOverlayError = function () {\r\n this._map.removeLayer(image);\r\n this.fire('error');\r\n image.off('load', onOverlayLoad, this);\r\n };\r\n\r\n var onOverlayLoad = function (e) {\r\n image.off('error', onOverlayLoad, this);\r\n if (this._map) {\r\n var newImage = e.target;\r\n var oldImage = this._currentImage;\r\n\r\n // if the bounds of this image matches the bounds that\r\n // _renderImage was called with and we have a map with the same bounds\r\n // hide the old image if there is one and set the opacity\r\n // of the new image otherwise remove the new image\r\n if (newImage._bounds.equals(bounds) && newImage._bounds.equals(this._map.getBounds())) {\r\n this._currentImage = newImage;\r\n\r\n if (this.options.position === 'front') {\r\n this.bringToFront();\r\n } else if (this.options.position === 'back') {\r\n this.bringToBack();\r\n }\r\n\r\n if (this.options.zIndex) {\r\n this.setZIndex(this.options.zIndex);\r\n }\r\n\r\n if (this._map && this._currentImage._map) {\r\n this._currentImage.setOpacity(this.options.opacity);\r\n } else {\r\n this._currentImage._map.removeLayer(this._currentImage);\r\n }\r\n\r\n if (oldImage && this._map) {\r\n this._map.removeLayer(oldImage);\r\n }\r\n\r\n if (oldImage && oldImage._map) {\r\n oldImage._map.removeLayer(oldImage);\r\n }\r\n } else {\r\n this._map.removeLayer(newImage);\r\n }\r\n }\r\n\r\n this.fire('load', {\r\n bounds: bounds\r\n });\r\n };\r\n\r\n // If loading the image fails\r\n image.once('error', onOverlayError, this);\r\n\r\n // once the image loads\r\n image.once('load', onOverlayLoad, this);\r\n }\r\n },\r\n\r\n _update: function () {\r\n if (!this._map) {\r\n return;\r\n }\r\n\r\n var zoom = this._map.getZoom();\r\n var bounds = this._map.getBounds();\r\n\r\n if (this._animatingZoom) {\r\n return;\r\n }\r\n\r\n if (this._map._panTransition && this._map._panTransition._inProgress) {\r\n return;\r\n }\r\n\r\n if (zoom > this.options.maxZoom || zoom < this.options.minZoom) {\r\n if (this._currentImage) {\r\n this._currentImage._map.removeLayer(this._currentImage);\r\n this._currentImage = null;\r\n }\r\n return;\r\n }\r\n\r\n var params = this._buildExportParams();\r\n Util.extend(params, this.options.requestParams);\r\n\r\n if (params) {\r\n this._requestExport(params, bounds);\r\n\r\n this.fire('loading', {\r\n bounds: bounds\r\n });\r\n } else if (this._currentImage) {\r\n this._currentImage._map.removeLayer(this._currentImage);\r\n this._currentImage = null;\r\n }\r\n },\r\n\r\n _renderPopup: function (latlng, error, results, response) {\r\n latlng = latLng(latlng);\r\n if (this._shouldRenderPopup && this._lastClick.equals(latlng)) {\r\n // add the popup to the map where the mouse was clicked at\r\n var content = this._popupFunction(error, results, response);\r\n if (content) {\r\n this._popup.setLatLng(latlng).setContent(content).openOn(this._map);\r\n }\r\n }\r\n },\r\n\r\n _resetPopupState: function (e) {\r\n this._shouldRenderPopup = false;\r\n this._lastClick = e.latlng;\r\n },\r\n\r\n _calculateBbox: function () {\r\n var pixelBounds = this._map.getPixelBounds();\r\n\r\n var sw = this._map.unproject(pixelBounds.getBottomLeft());\r\n var ne = this._map.unproject(pixelBounds.getTopRight());\r\n\r\n var neProjected = this._map.options.crs.project(ne);\r\n var swProjected = this._map.options.crs.project(sw);\r\n\r\n // this ensures ne/sw are switched in polar maps where north/top bottom/south is inverted\r\n var boundsProjected = bounds(neProjected, swProjected);\r\n\r\n return [boundsProjected.getBottomLeft().x, boundsProjected.getBottomLeft().y, boundsProjected.getTopRight().x, boundsProjected.getTopRight().y].join(',');\r\n },\r\n\r\n _calculateImageSize: function () {\r\n // ensure that we don't ask ArcGIS Server for a taller image than we have actual map displaying within the div\r\n var bounds = this._map.getPixelBounds();\r\n var size = this._map.getSize();\r\n\r\n var sw = this._map.unproject(bounds.getBottomLeft());\r\n var ne = this._map.unproject(bounds.getTopRight());\r\n\r\n var top = this._map.latLngToLayerPoint(ne).y;\r\n var bottom = this._map.latLngToLayerPoint(sw).y;\r\n\r\n if (top > 0 || bottom < size.y) {\r\n size.y = bottom - top;\r\n }\r\n\r\n return size.x + ',' + size.y;\r\n }\r\n});\r\n","import { CRS, DomEvent, TileLayer, Util } from 'leaflet';\r\nimport { warn, getUrlParams, setEsriAttribution } from '../Util';\r\nimport mapService from '../Services/MapService';\r\n\r\nexport var TiledMapLayer = TileLayer.extend({\r\n options: {\r\n zoomOffsetAllowance: 0.1,\r\n errorTileUrl: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEABAMAAACuXLVVAAAAA1BMVEUzNDVszlHHAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAAAAAAAAAB6mUWpAAAADZJREFUeJztwQEBAAAAgiD/r25IQAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA7waBAAABw08RwAAAAABJRU5ErkJggg=='\r\n },\r\n\r\n statics: {\r\n MercatorZoomLevels: {\r\n '0': 156543.03392799999,\r\n '1': 78271.516963999893,\r\n '2': 39135.758482000099,\r\n '3': 19567.879240999901,\r\n '4': 9783.9396204999593,\r\n '5': 4891.9698102499797,\r\n '6': 2445.9849051249898,\r\n '7': 1222.9924525624899,\r\n '8': 611.49622628138002,\r\n '9': 305.74811314055802,\r\n '10': 152.874056570411,\r\n '11': 76.437028285073197,\r\n '12': 38.218514142536598,\r\n '13': 19.109257071268299,\r\n '14': 9.5546285356341496,\r\n '15': 4.7773142679493699,\r\n '16': 2.38865713397468,\r\n '17': 1.1943285668550501,\r\n '18': 0.59716428355981699,\r\n '19': 0.29858214164761698,\r\n '20': 0.14929107082381,\r\n '21': 0.07464553541191,\r\n '22': 0.0373227677059525,\r\n '23': 0.0186613838529763\r\n }\r\n },\r\n\r\n initialize: function (options) {\r\n options = Util.setOptions(this, options);\r\n\r\n // set the urls\r\n options = getUrlParams(options);\r\n this.tileUrl = (options.proxy ? options.proxy + '?' : '') + options.url + 'tile/{z}/{y}/{x}' + (options.requestParams && Object.keys(options.requestParams).length > 0 ? Util.getParamString(options.requestParams) : '');\r\n // Remove subdomain in url\r\n // https://github.com/Esri/esri-leaflet/issues/991\r\n if (options.url.indexOf('{s}') !== -1 && options.subdomains) {\r\n options.url = options.url.replace('{s}', options.subdomains[0]);\r\n }\r\n this.service = mapService(options);\r\n this.service.addEventParent(this);\r\n\r\n var arcgisonline = new RegExp(/tiles.arcgis(online)?\\.com/g);\r\n if (arcgisonline.test(options.url)) {\r\n this.tileUrl = this.tileUrl.replace('://tiles', '://tiles{s}');\r\n options.subdomains = ['1', '2', '3', '4'];\r\n }\r\n\r\n if (this.options.token) {\r\n this.tileUrl += ('?token=' + this.options.token);\r\n }\r\n\r\n // init layer by calling TileLayers initialize method\r\n TileLayer.prototype.initialize.call(this, this.tileUrl, options);\r\n },\r\n\r\n getTileUrl: function (tilePoint) {\r\n var zoom = this._getZoomForUrl();\r\n\r\n return Util.template(this.tileUrl, Util.extend({\r\n s: this._getSubdomain(tilePoint),\r\n x: tilePoint.x,\r\n y: tilePoint.y,\r\n // try lod map first, then just default to zoom level\r\n z: (this._lodMap && this._lodMap[zoom]) ? this._lodMap[zoom] : zoom\r\n }, this.options));\r\n },\r\n\r\n createTile: function (coords, done) {\r\n var tile = document.createElement('img');\r\n\r\n DomEvent.on(tile, 'load', Util.bind(this._tileOnLoad, this, done, tile));\r\n DomEvent.on(tile, 'error', Util.bind(this._tileOnError, this, done, tile));\r\n\r\n if (this.options.crossOrigin) {\r\n tile.crossOrigin = '';\r\n }\r\n\r\n /*\r\n Alt tag is set to empty string to keep screen readers from reading URL and for compliance reasons\r\n http://www.w3.org/TR/WCAG20-TECHS/H67\r\n */\r\n tile.alt = '';\r\n\r\n // if there is no lod map or an lod map with a proper zoom load the tile\r\n // otherwise wait for the lod map to become available\r\n if (!this._lodMap || (this._lodMap && this._lodMap[this._getZoomForUrl()])) {\r\n tile.src = this.getTileUrl(coords);\r\n } else {\r\n this.once('lodmap', function () {\r\n tile.src = this.getTileUrl(coords);\r\n }, this);\r\n }\r\n\r\n return tile;\r\n },\r\n\r\n onAdd: function (map) {\r\n // include 'Powered by Esri' in map attribution\r\n setEsriAttribution(map);\r\n\r\n if (!this._lodMap) {\r\n this.metadata(function (error, metadata) {\r\n if (!error && metadata.spatialReference) {\r\n var sr = metadata.spatialReference.latestWkid || metadata.spatialReference.wkid;\r\n // display the copyright text from the service using leaflet's attribution control\r\n if (!this.options.attribution && map.attributionControl && metadata.copyrightText) {\r\n this.options.attribution = metadata.copyrightText;\r\n map.attributionControl.addAttribution(this.getAttribution());\r\n }\r\n\r\n // if the service tiles were published in web mercator using conventional LODs but missing levels, we can try and remap them\r\n if (map.options.crs === CRS.EPSG3857 && (sr === 102100 || sr === 3857)) {\r\n this._lodMap = {};\r\n // create the zoom level data\r\n var arcgisLODs = metadata.tileInfo.lods;\r\n var correctResolutions = TiledMapLayer.MercatorZoomLevels;\r\n\r\n for (var i = 0; i < arcgisLODs.length; i++) {\r\n var arcgisLOD = arcgisLODs[i];\r\n for (var ci in correctResolutions) {\r\n var correctRes = correctResolutions[ci];\r\n\r\n if (this._withinPercentage(arcgisLOD.resolution, correctRes, this.options.zoomOffsetAllowance)) {\r\n this._lodMap[ci] = arcgisLOD.level;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n this.fire('lodmap');\r\n } else if (map.options.crs && map.options.crs.code && (map.options.crs.code.indexOf(sr) > -1)) {\r\n // if the projection is WGS84, or the developer is using Proj4 to define a custom CRS, no action is required\r\n } else {\r\n // if the service was cached in a custom projection and an appropriate LOD hasn't been defined in the map, guide the developer to our Proj4 sample\r\n warn('L.esri.TiledMapLayer is using a non-mercator spatial reference. Support may be available through Proj4Leaflet http://esri.github.io/esri-leaflet/examples/non-mercator-projection.html');\r\n }\r\n }\r\n }, this);\r\n }\r\n\r\n TileLayer.prototype.onAdd.call(this, map);\r\n },\r\n\r\n metadata: function (callback, context) {\r\n this.service.metadata(callback, context);\r\n return this;\r\n },\r\n\r\n identify: function () {\r\n return this.service.identify();\r\n },\r\n\r\n find: function () {\r\n return this.service.find();\r\n },\r\n\r\n query: function () {\r\n return this.service.query();\r\n },\r\n\r\n authenticate: function (token) {\r\n var tokenQs = '?token=' + token;\r\n this.tileUrl = (this.options.token) ? this.tileUrl.replace(/\\?token=(.+)/g, tokenQs) : this.tileUrl + tokenQs;\r\n this.options.token = token;\r\n this.service.authenticate(token);\r\n return this;\r\n },\r\n\r\n _withinPercentage: function (a, b, percentage) {\r\n var diff = Math.abs((a / b) - 1);\r\n return diff < percentage;\r\n }\r\n});\r\n\r\nexport function tiledMapLayer (url, options) {\r\n return new TiledMapLayer(url, options);\r\n}\r\n\r\nexport default tiledMapLayer;\r\n","export var options = {\r\n attributionWidthOffset: 55\r\n};\r\n\r\nexport default options;\r\n","import { Util, DomUtil } from 'leaflet';\r\nimport { Support } from './Support';\r\n\r\nvar callbacks = 0;\r\n\r\nfunction serialize (params) {\r\n var data = '';\r\n\r\n params.f = params.f || 'json';\r\n\r\n for (var key in params) {\r\n if (params.hasOwnProperty(key)) {\r\n var param = params[key];\r\n var type = Object.prototype.toString.call(param);\r\n var value;\r\n\r\n if (data.length) {\r\n data += '&';\r\n }\r\n\r\n if (type === '[object Array]') {\r\n value = (Object.prototype.toString.call(param[0]) === '[object Object]') ? JSON.stringify(param) : param.join(',');\r\n } else if (type === '[object Object]') {\r\n value = JSON.stringify(param);\r\n } else if (type === '[object Date]') {\r\n value = param.valueOf();\r\n } else {\r\n value = param;\r\n }\r\n\r\n data += encodeURIComponent(key) + '=' + encodeURIComponent(value);\r\n }\r\n }\r\n\r\n return data;\r\n}\r\n\r\nfunction createRequest (callback, context) {\r\n var httpRequest = new window.XMLHttpRequest();\r\n\r\n httpRequest.onerror = function (e) {\r\n httpRequest.onreadystatechange = Util.falseFn;\r\n\r\n callback.call(context, {\r\n error: {\r\n code: 500,\r\n message: 'XMLHttpRequest error'\r\n }\r\n }, null);\r\n };\r\n\r\n httpRequest.onreadystatechange = function () {\r\n var response;\r\n var error;\r\n\r\n if (httpRequest.readyState === 4) {\r\n try {\r\n response = JSON.parse(httpRequest.responseText);\r\n } catch (e) {\r\n response = null;\r\n error = {\r\n code: 500,\r\n message: 'Could not parse response as JSON. This could also be caused by a CORS or XMLHttpRequest error.'\r\n };\r\n }\r\n\r\n if (!error && response.error) {\r\n error = response.error;\r\n response = null;\r\n }\r\n\r\n httpRequest.onerror = Util.falseFn;\r\n\r\n callback.call(context, error, response);\r\n }\r\n };\r\n\r\n httpRequest.ontimeout = function () {\r\n this.onerror();\r\n };\r\n\r\n return httpRequest;\r\n}\r\n\r\nfunction xmlHttpPost (url, params, callback, context) {\r\n var httpRequest = createRequest(callback, context);\r\n httpRequest.open('POST', url);\r\n\r\n if (typeof context !== 'undefined' && context !== null) {\r\n if (typeof context.options !== 'undefined') {\r\n httpRequest.timeout = context.options.timeout;\r\n }\r\n }\r\n httpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');\r\n httpRequest.send(serialize(params));\r\n\r\n return httpRequest;\r\n}\r\n\r\nfunction xmlHttpGet (url, params, callback, context) {\r\n var httpRequest = createRequest(callback, context);\r\n httpRequest.open('GET', url + '?' + serialize(params), true);\r\n\r\n if (typeof context !== 'undefined' && context !== null) {\r\n if (typeof context.options !== 'undefined') {\r\n httpRequest.timeout = context.options.timeout;\r\n }\r\n }\r\n httpRequest.send(null);\r\n\r\n return httpRequest;\r\n}\r\n\r\n// AJAX handlers for CORS (modern browsers) or JSONP (older browsers)\r\nexport function request (url, params, callback, context) {\r\n var paramString = serialize(params);\r\n var httpRequest = createRequest(callback, context);\r\n var requestLength = (url + '?' + paramString).length;\r\n\r\n // ie10/11 require the request be opened before a timeout is applied\r\n if (requestLength <= 2000 && Support.cors) {\r\n httpRequest.open('GET', url + '?' + paramString);\r\n } else if (requestLength > 2000 && Support.cors) {\r\n httpRequest.open('POST', url);\r\n httpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');\r\n }\r\n\r\n if (typeof context !== 'undefined' && context !== null) {\r\n if (typeof context.options !== 'undefined') {\r\n httpRequest.timeout = context.options.timeout;\r\n }\r\n }\r\n\r\n // request is less than 2000 characters and the browser supports CORS, make GET request with XMLHttpRequest\r\n if (requestLength <= 2000 && Support.cors) {\r\n httpRequest.send(null);\r\n\r\n // request is more than 2000 characters and the browser supports CORS, make POST request with XMLHttpRequest\r\n } else if (requestLength > 2000 && Support.cors) {\r\n httpRequest.send(paramString);\r\n\r\n // request is less than 2000 characters and the browser does not support CORS, make a JSONP request\r\n } else if (requestLength <= 2000 && !Support.cors) {\r\n return jsonp(url, params, callback, context);\r\n\r\n // request is longer then 2000 characters and the browser does not support CORS, log a warning\r\n } else {\r\n warn('a request to ' + url + ' was longer then 2000 characters and this browser cannot make a cross-domain post request. Please use a proxy http://esri.github.io/esri-leaflet/api-reference/request.html');\r\n return;\r\n }\r\n\r\n return httpRequest;\r\n}\r\n\r\nexport function jsonp (url, params, callback, context) {\r\n window._EsriLeafletCallbacks = window._EsriLeafletCallbacks || {};\r\n var callbackId = 'c' + callbacks;\r\n params.callback = 'window._EsriLeafletCallbacks.' + callbackId;\r\n\r\n window._EsriLeafletCallbacks[callbackId] = function (response) {\r\n if (window._EsriLeafletCallbacks[callbackId] !== true) {\r\n var error;\r\n var responseType = Object.prototype.toString.call(response);\r\n\r\n if (!(responseType === '[object Object]' || responseType === '[object Array]')) {\r\n error = {\r\n error: {\r\n code: 500,\r\n message: 'Expected array or object as JSONP response'\r\n }\r\n };\r\n response = null;\r\n }\r\n\r\n if (!error && response.error) {\r\n error = response;\r\n response = null;\r\n }\r\n\r\n callback.call(context, error, response);\r\n window._EsriLeafletCallbacks[callbackId] = true;\r\n }\r\n };\r\n\r\n var script = DomUtil.create('script', null, document.body);\r\n script.type = 'text/javascript';\r\n script.src = url + '?' + serialize(params);\r\n script.id = callbackId;\r\n script.onerror = function (error) {\r\n if (error && window._EsriLeafletCallbacks[callbackId] !== true) {\r\n // Can't get true error code: it can be 404, or 401, or 500\r\n var err = {\r\n error: {\r\n code: 500,\r\n message: 'An unknown error occurred'\r\n }\r\n };\r\n\r\n callback.call(context, err);\r\n window._EsriLeafletCallbacks[callbackId] = true;\r\n }\r\n };\r\n DomUtil.addClass(script, 'esri-leaflet-jsonp');\r\n\r\n callbacks++;\r\n\r\n return {\r\n id: callbackId,\r\n url: script.src,\r\n abort: function () {\r\n window._EsriLeafletCallbacks._callback[callbackId]({\r\n code: 0,\r\n message: 'Request aborted.'\r\n });\r\n }\r\n };\r\n}\r\n\r\nvar get = ((Support.cors) ? xmlHttpGet : jsonp);\r\nget.CORS = xmlHttpGet;\r\nget.JSONP = jsonp;\r\n\r\nexport function warn () {\r\n if (console && console.warn) {\r\n console.warn.apply(console, arguments);\r\n }\r\n}\r\n\r\n// choose the correct AJAX handler depending on CORS support\r\nexport { get };\r\n\r\n// always use XMLHttpRequest for posts\r\nexport { xmlHttpPost as post };\r\n\r\n// export the Request object to call the different handlers for debugging\r\nexport var Request = {\r\n request: request,\r\n get: get,\r\n post: xmlHttpPost\r\n};\r\n\r\nexport default Request;\r\n","import { Service } from './Service';\r\nimport query from '../Tasks/Query';\r\nimport { geojsonToArcGIS } from '../Util';\r\n\r\nexport var FeatureLayerService = Service.extend({\r\n\r\n options: {\r\n idAttribute: 'OBJECTID'\r\n },\r\n\r\n query: function () {\r\n return query(this);\r\n },\r\n\r\n addFeature: function (feature, callback, context) {\r\n this.addFeatures(feature, callback, context);\r\n },\r\n\r\n addFeatures: function (features, callback, context) {\r\n var featuresArray = features.features ? features.features : [features];\r\n for (var i = featuresArray.length - 1; i >= 0; i--) {\r\n delete featuresArray[i].id;\r\n }\r\n features = geojsonToArcGIS(features);\r\n features = featuresArray.length > 1 ? features : [features];\r\n return this.post('addFeatures', {\r\n features: features\r\n }, function (error, response) {\r\n // For compatibility reason with former addFeature function,\r\n // we return the object in the array and not the array itself\r\n var result = (response && response.addResults) ? response.addResults.length > 1 ? response.addResults : response.addResults[0] : undefined;\r\n if (callback) {\r\n callback.call(context, error || response.addResults[0].error, result);\r\n }\r\n }, context);\r\n },\r\n\r\n updateFeature: function (feature, callback, context) {\r\n this.updateFeatures(feature, callback, context);\r\n },\r\n\r\n updateFeatures: function (features, callback, context) {\r\n var featuresArray = features.features ? features.features : [features];\r\n features = geojsonToArcGIS(features, this.options.idAttribute);\r\n features = featuresArray.length > 1 ? features : [features];\r\n\r\n return this.post('updateFeatures', {\r\n features: features\r\n }, function (error, response) {\r\n // For compatibility reason with former updateFeature function,\r\n // we return the object in the array and not the array itself\r\n var result = (response && response.updateResults) ? response.updateResults.length > 1 ? response.updateResults : response.updateResults[0] : undefined;\r\n if (callback) {\r\n callback.call(context, error || response.updateResults[0].error, result);\r\n }\r\n }, context);\r\n },\r\n\r\n deleteFeature: function (id, callback, context) {\r\n this.deleteFeatures(id, callback, context);\r\n },\r\n\r\n deleteFeatures: function (ids, callback, context) {\r\n return this.post('deleteFeatures', {\r\n objectIds: ids\r\n }, function (error, response) {\r\n // For compatibility reason with former deleteFeature function,\r\n // we return the object in the array and not the array itself\r\n var result = (response && response.deleteResults) ? response.deleteResults.length > 1 ? response.deleteResults : response.deleteResults[0] : undefined;\r\n if (callback) {\r\n callback.call(context, error || response.deleteResults[0].error, result);\r\n }\r\n }, context);\r\n }\r\n});\r\n\r\nexport function featureLayerService (options) {\r\n return new FeatureLayerService(options);\r\n}\r\n\r\nexport default featureLayerService;\r\n","import { Service } from './Service';\r\nimport identifyImage from '../Tasks/IdentifyImage';\r\nimport query from '../Tasks/Query';\r\n\r\nexport var ImageService = Service.extend({\r\n\r\n query: function () {\r\n return query(this);\r\n },\r\n\r\n identify: function () {\r\n return identifyImage(this);\r\n }\r\n});\r\n\r\nexport function imageService (options) {\r\n return new ImageService(options);\r\n}\r\n\r\nexport default imageService;\r\n","import { Service } from './Service';\r\nimport identifyFeatures from '../Tasks/IdentifyFeatures';\r\nimport query from '../Tasks/Query';\r\nimport find from '../Tasks/Find';\r\n\r\nexport var MapService = Service.extend({\r\n\r\n identify: function () {\r\n return identifyFeatures(this);\r\n },\r\n\r\n find: function () {\r\n return find(this);\r\n },\r\n\r\n query: function () {\r\n return query(this);\r\n }\r\n\r\n});\r\n\r\nexport function mapService (options) {\r\n return new MapService(options);\r\n}\r\n\r\nexport default mapService;\r\n","import { Util, Evented } from 'leaflet';\r\nimport {cors} from '../Support';\r\nimport {cleanUrl, getUrlParams} from '../Util';\r\nimport Request from '../Request';\r\n\r\nexport var Service = Evented.extend({\r\n\r\n options: {\r\n proxy: false,\r\n useCors: cors,\r\n timeout: 0\r\n },\r\n\r\n initialize: function (options) {\r\n options = options || {};\r\n this._requestQueue = [];\r\n this._authenticating = false;\r\n Util.setOptions(this, options);\r\n this.options.url = cleanUrl(this.options.url);\r\n },\r\n\r\n get: function (path, params, callback, context) {\r\n return this._request('get', path, params, callback, context);\r\n },\r\n\r\n post: function (path, params, callback, context) {\r\n return this._request('post', path, params, callback, context);\r\n },\r\n\r\n request: function (path, params, callback, context) {\r\n return this._request('request', path, params, callback, context);\r\n },\r\n\r\n metadata: function (callback, context) {\r\n return this._request('get', '', {}, callback, context);\r\n },\r\n\r\n authenticate: function (token) {\r\n this._authenticating = false;\r\n this.options.token = token;\r\n this._runQueue();\r\n return this;\r\n },\r\n\r\n getTimeout: function () {\r\n return this.options.timeout;\r\n },\r\n\r\n setTimeout: function (timeout) {\r\n this.options.timeout = timeout;\r\n },\r\n\r\n _request: function (method, path, params, callback, context) {\r\n this.fire('requeststart', {\r\n url: this.options.url + path,\r\n params: params,\r\n method: method\r\n }, true);\r\n\r\n var wrappedCallback = this._createServiceCallback(method, path, params, callback, context);\r\n\r\n if (this.options.token) {\r\n params.token = this.options.token;\r\n }\r\n if (this.options.requestParams) {\r\n Util.extend(params, this.options.requestParams);\r\n }\r\n if (this._authenticating) {\r\n this._requestQueue.push([method, path, params, callback, context]);\r\n return;\r\n } else {\r\n var url = (this.options.proxy) ? this.options.proxy + '?' + this.options.url + path : this.options.url + path;\r\n\r\n if ((method === 'get' || method === 'request') && !this.options.useCors) {\r\n return Request.get.JSONP(url, params, wrappedCallback, context);\r\n } else {\r\n return Request[method](url, params, wrappedCallback, context);\r\n }\r\n }\r\n },\r\n\r\n _createServiceCallback: function (method, path, params, callback, context) {\r\n return Util.bind(function (error, response) {\r\n if (error && (error.code === 499 || error.code === 498)) {\r\n this._authenticating = true;\r\n\r\n this._requestQueue.push([method, path, params, callback, context]);\r\n\r\n // fire an event for users to handle and re-authenticate\r\n this.fire('authenticationrequired', {\r\n authenticate: Util.bind(this.authenticate, this)\r\n }, true);\r\n\r\n // if the user has access to a callback they can handle the auth error\r\n error.authenticate = Util.bind(this.authenticate, this);\r\n }\r\n\r\n callback.call(context, error, response);\r\n\r\n if (error) {\r\n this.fire('requesterror', {\r\n url: this.options.url + path,\r\n params: params,\r\n message: error.message,\r\n code: error.code,\r\n method: method\r\n }, true);\r\n } else {\r\n this.fire('requestsuccess', {\r\n url: this.options.url + path,\r\n params: params,\r\n response: response,\r\n method: method\r\n }, true);\r\n }\r\n\r\n this.fire('requestend', {\r\n url: this.options.url + path,\r\n params: params,\r\n method: method\r\n }, true);\r\n }, this);\r\n },\r\n\r\n _runQueue: function () {\r\n for (var i = this._requestQueue.length - 1; i >= 0; i--) {\r\n var request = this._requestQueue[i];\r\n var method = request.shift();\r\n this[method].apply(this, request);\r\n }\r\n this._requestQueue = [];\r\n }\r\n});\r\n\r\nexport function service (options) {\r\n options = getUrlParams(options);\r\n return new Service(options);\r\n}\r\n\r\nexport default service;\r\n","export var cors = ((window.XMLHttpRequest && 'withCredentials' in new window.XMLHttpRequest()));\r\nexport var pointerEvents = document.documentElement.style.pointerEvents === '';\r\n\r\nexport var Support = {\r\n cors: cors,\r\n pointerEvents: pointerEvents\r\n};\r\n\r\nexport default Support;\r\n","import { Task } from './Task';\r\nimport { responseToFeatureCollection } from '../Util';\r\n\r\nexport var Find = Task.extend({\r\n setters: {\r\n // method name > param name\r\n 'contains': 'contains',\r\n 'text': 'searchText',\r\n 'fields': 'searchFields', // denote an array or single string\r\n 'spatialReference': 'sr',\r\n 'sr': 'sr',\r\n 'layers': 'layers',\r\n 'returnGeometry': 'returnGeometry',\r\n 'maxAllowableOffset': 'maxAllowableOffset',\r\n 'precision': 'geometryPrecision',\r\n 'dynamicLayers': 'dynamicLayers',\r\n 'returnZ': 'returnZ',\r\n 'returnM': 'returnM',\r\n 'gdbVersion': 'gdbVersion',\r\n // skipped implementing this (for now) because the REST service implementation isnt consistent between operations\r\n // 'transform': 'datumTransformations',\r\n 'token': 'token'\r\n },\r\n\r\n path: 'find',\r\n\r\n params: {\r\n sr: 4326,\r\n contains: true,\r\n returnGeometry: true,\r\n returnZ: true,\r\n returnM: false\r\n },\r\n\r\n layerDefs: function (id, where) {\r\n this.params.layerDefs = (this.params.layerDefs) ? this.params.layerDefs + ';' : '';\r\n this.params.layerDefs += ([id, where]).join(':');\r\n return this;\r\n },\r\n\r\n simplify: function (map, factor) {\r\n var mapWidth = Math.abs(map.getBounds().getWest() - map.getBounds().getEast());\r\n this.params.maxAllowableOffset = (mapWidth / map.getSize().y) * factor;\r\n return this;\r\n },\r\n\r\n run: function (callback, context) {\r\n return this.request(function (error, response) {\r\n callback.call(context, error, (response && responseToFeatureCollection(response)), response);\r\n }, context);\r\n }\r\n});\r\n\r\nexport function find (options) {\r\n return new Find(options);\r\n}\r\n\r\nexport default find;\r\n","import { Task } from './Task';\r\n\r\nexport var Identify = Task.extend({\r\n path: 'identify',\r\n\r\n between: function (start, end) {\r\n this.params.time = [start.valueOf(), end.valueOf()];\r\n return this;\r\n }\r\n});\r\n\r\nexport function identify (options) {\r\n return new Identify(options);\r\n}\r\n\r\nexport default identify;\r\n","import { latLng } from 'leaflet';\r\nimport { Identify } from './Identify';\r\nimport { responseToFeatureCollection,\r\n boundsToExtent,\r\n _setGeometry\r\n} from '../Util';\r\n\r\nexport var IdentifyFeatures = Identify.extend({\r\n setters: {\r\n 'layers': 'layers',\r\n 'precision': 'geometryPrecision',\r\n 'tolerance': 'tolerance',\r\n // skipped implementing this (for now) because the REST service implementation isnt consistent between operations.\r\n // 'transform': 'datumTransformations'\r\n 'returnGeometry': 'returnGeometry'\r\n },\r\n\r\n params: {\r\n sr: 4326,\r\n layers: 'all',\r\n tolerance: 3,\r\n returnGeometry: true\r\n },\r\n\r\n on: function (map) {\r\n var extent = boundsToExtent(map.getBounds());\r\n var size = map.getSize();\r\n this.params.imageDisplay = [size.x, size.y, 96];\r\n this.params.mapExtent = [extent.xmin, extent.ymin, extent.xmax, extent.ymax];\r\n return this;\r\n },\r\n\r\n at: function (geometry) {\r\n // cast lat, long pairs in raw array form manually\r\n if (geometry.length === 2) {\r\n geometry = latLng(geometry);\r\n }\r\n this._setGeometryParams(geometry);\r\n return this;\r\n },\r\n\r\n layerDef: function (id, where) {\r\n this.params.layerDefs = (this.params.layerDefs) ? this.params.layerDefs + ';' : '';\r\n this.params.layerDefs += ([id, where]).join(':');\r\n return this;\r\n },\r\n\r\n simplify: function (map, factor) {\r\n var mapWidth = Math.abs(map.getBounds().getWest() - map.getBounds().getEast());\r\n this.params.maxAllowableOffset = (mapWidth / map.getSize().y) * factor;\r\n return this;\r\n },\r\n\r\n run: function (callback, context) {\r\n return this.request(function (error, response) {\r\n // immediately invoke with an error\r\n if (error) {\r\n callback.call(context, error, undefined, response);\r\n return;\r\n\r\n // ok no error lets just assume we have features...\r\n } else {\r\n var featureCollection = responseToFeatureCollection(response);\r\n response.results = response.results.reverse();\r\n for (var i = 0; i < featureCollection.features.length; i++) {\r\n var feature = featureCollection.features[i];\r\n feature.layerId = response.results[i].layerId;\r\n }\r\n callback.call(context, undefined, featureCollection, response);\r\n }\r\n });\r\n },\r\n\r\n _setGeometryParams: function (geometry) {\r\n var converted = _setGeometry(geometry);\r\n this.params.geometry = converted.geometry;\r\n this.params.geometryType = converted.geometryType;\r\n }\r\n});\r\n\r\nexport function identifyFeatures (options) {\r\n return new IdentifyFeatures(options);\r\n}\r\n\r\nexport default identifyFeatures;\r\n","import { latLng } from 'leaflet';\r\nimport { Identify } from './Identify';\r\nimport { responseToFeatureCollection } from '../Util';\r\n\r\nexport var IdentifyImage = Identify.extend({\r\n setters: {\r\n 'setMosaicRule': 'mosaicRule',\r\n 'setRenderingRule': 'renderingRule',\r\n 'setPixelSize': 'pixelSize',\r\n 'returnCatalogItems': 'returnCatalogItems',\r\n 'returnGeometry': 'returnGeometry'\r\n },\r\n\r\n params: {\r\n returnGeometry: false\r\n },\r\n\r\n at: function (latlng) {\r\n latlng = latLng(latlng);\r\n this.params.geometry = JSON.stringify({\r\n x: latlng.lng,\r\n y: latlng.lat,\r\n spatialReference: {\r\n wkid: 4326\r\n }\r\n });\r\n this.params.geometryType = 'esriGeometryPoint';\r\n return this;\r\n },\r\n\r\n getMosaicRule: function () {\r\n return this.params.mosaicRule;\r\n },\r\n\r\n getRenderingRule: function () {\r\n return this.params.renderingRule;\r\n },\r\n\r\n getPixelSize: function () {\r\n return this.params.pixelSize;\r\n },\r\n\r\n run: function (callback, context) {\r\n return this.request(function (error, response) {\r\n callback.call(context, error, (response && this._responseToGeoJSON(response)), response);\r\n }, this);\r\n },\r\n\r\n // get pixel data and return as geoJSON point\r\n // populate catalog items (if any)\r\n // merging in any catalogItemVisibilities as a propery of each feature\r\n _responseToGeoJSON: function (response) {\r\n var location = response.location;\r\n var catalogItems = response.catalogItems;\r\n var catalogItemVisibilities = response.catalogItemVisibilities;\r\n var geoJSON = {\r\n 'pixel': {\r\n 'type': 'Feature',\r\n 'geometry': {\r\n 'type': 'Point',\r\n 'coordinates': [location.x, location.y]\r\n },\r\n 'crs': {\r\n 'type': 'EPSG',\r\n 'properties': {\r\n 'code': location.spatialReference.wkid\r\n }\r\n },\r\n 'properties': {\r\n 'OBJECTID': response.objectId,\r\n 'name': response.name,\r\n 'value': response.value\r\n },\r\n 'id': response.objectId\r\n }\r\n };\r\n\r\n if (response.properties && response.properties.Values) {\r\n geoJSON.pixel.properties.values = response.properties.Values;\r\n }\r\n\r\n if (catalogItems && catalogItems.features) {\r\n geoJSON.catalogItems = responseToFeatureCollection(catalogItems);\r\n if (catalogItemVisibilities && catalogItemVisibilities.length === geoJSON.catalogItems.features.length) {\r\n for (var i = catalogItemVisibilities.length - 1; i >= 0; i--) {\r\n geoJSON.catalogItems.features[i].properties.catalogItemVisibility = catalogItemVisibilities[i];\r\n }\r\n }\r\n }\r\n return geoJSON;\r\n }\r\n\r\n});\r\n\r\nexport function identifyImage (params) {\r\n return new IdentifyImage(params);\r\n}\r\n\r\nexport default identifyImage;\r\n","import { point, latLng } from 'leaflet';\r\nimport { Task } from './Task';\r\nimport {\r\n warn,\r\n responseToFeatureCollection,\r\n isArcgisOnline,\r\n extentToBounds,\r\n _setGeometry\r\n} from '../Util';\r\n\r\nexport var Query = Task.extend({\r\n setters: {\r\n 'offset': 'resultOffset',\r\n 'limit': 'resultRecordCount',\r\n 'fields': 'outFields',\r\n 'precision': 'geometryPrecision',\r\n 'featureIds': 'objectIds',\r\n 'returnGeometry': 'returnGeometry',\r\n 'returnM': 'returnM',\r\n 'transform': 'datumTransformation',\r\n 'token': 'token'\r\n },\r\n\r\n path: 'query',\r\n\r\n params: {\r\n returnGeometry: true,\r\n where: '1=1',\r\n outSR: 4326,\r\n outFields: '*'\r\n },\r\n\r\n // Returns a feature if its shape is wholly contained within the search geometry. Valid for all shape type combinations.\r\n within: function (geometry) {\r\n this._setGeometryParams(geometry);\r\n this.params.spatialRel = 'esriSpatialRelContains'; // to the REST api this reads geometry **contains** layer\r\n return this;\r\n },\r\n\r\n // Returns a feature if any spatial relationship is found. Applies to all shape type combinations.\r\n intersects: function (geometry) {\r\n this._setGeometryParams(geometry);\r\n this.params.spatialRel = 'esriSpatialRelIntersects';\r\n return this;\r\n },\r\n\r\n // Returns a feature if its shape wholly contains the search geometry. Valid for all shape type combinations.\r\n contains: function (geometry) {\r\n this._setGeometryParams(geometry);\r\n this.params.spatialRel = 'esriSpatialRelWithin'; // to the REST api this reads geometry **within** layer\r\n return this;\r\n },\r\n\r\n // Returns a feature if the intersection of the interiors of the two shapes is not empty and has a lower dimension than the maximum dimension of the two shapes. Two lines that share an endpoint in common do not cross. Valid for Line/Line, Line/Area, Multi-point/Area, and Multi-point/Line shape type combinations.\r\n crosses: function (geometry) {\r\n this._setGeometryParams(geometry);\r\n this.params.spatialRel = 'esriSpatialRelCrosses';\r\n return this;\r\n },\r\n\r\n // Returns a feature if the two shapes share a common boundary. However, the intersection of the interiors of the two shapes must be empty. In the Point/Line case, the point may touch an endpoint only of the line. Applies to all combinations except Point/Point.\r\n touches: function (geometry) {\r\n this._setGeometryParams(geometry);\r\n this.params.spatialRel = 'esriSpatialRelTouches';\r\n return this;\r\n },\r\n\r\n // Returns a feature if the intersection of the two shapes results in an object of the same dimension, but different from both of the shapes. Applies to Area/Area, Line/Line, and Multi-point/Multi-point shape type combinations.\r\n overlaps: function (geometry) {\r\n this._setGeometryParams(geometry);\r\n this.params.spatialRel = 'esriSpatialRelOverlaps';\r\n return this;\r\n },\r\n\r\n // Returns a feature if the envelope of the two shapes intersects.\r\n bboxIntersects: function (geometry) {\r\n this._setGeometryParams(geometry);\r\n this.params.spatialRel = 'esriSpatialRelEnvelopeIntersects';\r\n return this;\r\n },\r\n\r\n // if someone can help decipher the ArcObjects explanation and translate to plain speak, we should mention this method in the doc\r\n indexIntersects: function (geometry) {\r\n this._setGeometryParams(geometry);\r\n this.params.spatialRel = 'esriSpatialRelIndexIntersects'; // Returns a feature if the envelope of the query geometry intersects the index entry for the target geometry\r\n return this;\r\n },\r\n\r\n // only valid for Feature Services running on ArcGIS Server 10.3+ or ArcGIS Online\r\n nearby: function (latlng, radius) {\r\n latlng = latLng(latlng);\r\n this.params.geometry = [latlng.lng, latlng.lat];\r\n this.params.geometryType = 'esriGeometryPoint';\r\n this.params.spatialRel = 'esriSpatialRelIntersects';\r\n this.params.units = 'esriSRUnit_Meter';\r\n this.params.distance = radius;\r\n this.params.inSr = 4326;\r\n return this;\r\n },\r\n\r\n where: function (string) {\r\n // instead of converting double-quotes to single quotes, pass as is, and provide a more informative message if a 400 is encountered\r\n this.params.where = string;\r\n return this;\r\n },\r\n\r\n between: function (start, end) {\r\n this.params.time = [start.valueOf(), end.valueOf()];\r\n return this;\r\n },\r\n\r\n simplify: function (map, factor) {\r\n var mapWidth = Math.abs(map.getBounds().getWest() - map.getBounds().getEast());\r\n this.params.maxAllowableOffset = (mapWidth / map.getSize().y) * factor;\r\n return this;\r\n },\r\n\r\n orderBy: function (fieldName, order) {\r\n order = order || 'ASC';\r\n this.params.orderByFields = (this.params.orderByFields) ? this.params.orderByFields + ',' : '';\r\n this.params.orderByFields += ([fieldName, order]).join(' ');\r\n return this;\r\n },\r\n\r\n run: function (callback, context) {\r\n this._cleanParams();\r\n\r\n // services hosted on ArcGIS Online and ArcGIS Server 10.3.1+ support requesting geojson directly\r\n if (this.options.isModern || isArcgisOnline(this.options.url)) {\r\n this.params.f = 'geojson';\r\n\r\n return this.request(function (error, response) {\r\n this._trapSQLerrors(error);\r\n callback.call(context, error, response, response);\r\n }, this);\r\n\r\n // otherwise convert it in the callback then pass it on\r\n } else {\r\n return this.request(function (error, response) {\r\n this._trapSQLerrors(error);\r\n callback.call(context, error, (response && responseToFeatureCollection(response)), response);\r\n }, this);\r\n }\r\n },\r\n\r\n count: function (callback, context) {\r\n this._cleanParams();\r\n this.params.returnCountOnly = true;\r\n return this.request(function (error, response) {\r\n callback.call(this, error, (response && response.count), response);\r\n }, context);\r\n },\r\n\r\n ids: function (callback, context) {\r\n this._cleanParams();\r\n this.params.returnIdsOnly = true;\r\n return this.request(function (error, response) {\r\n callback.call(this, error, (response && response.objectIds), response);\r\n }, context);\r\n },\r\n\r\n // only valid for Feature Services running on ArcGIS Server 10.3+ or ArcGIS Online\r\n bounds: function (callback, context) {\r\n this._cleanParams();\r\n this.params.returnExtentOnly = true;\r\n return this.request(function (error, response) {\r\n if (response && response.extent && extentToBounds(response.extent)) {\r\n callback.call(context, error, extentToBounds(response.extent), response);\r\n } else {\r\n error = {\r\n message: 'Invalid Bounds'\r\n };\r\n callback.call(context, error, null, response);\r\n }\r\n }, context);\r\n },\r\n\r\n distinct: function () {\r\n // geometry must be omitted for queries requesting distinct values\r\n this.params.returnGeometry = false;\r\n this.params.returnDistinctValues = true;\r\n return this;\r\n },\r\n\r\n // only valid for image services\r\n pixelSize: function (rawPoint) {\r\n var castPoint = point(rawPoint);\r\n this.params.pixelSize = [castPoint.x, castPoint.y];\r\n return this;\r\n },\r\n\r\n // only valid for map services\r\n layer: function (layer) {\r\n this.path = layer + '/query';\r\n return this;\r\n },\r\n\r\n _trapSQLerrors: function (error) {\r\n if (error) {\r\n if (error.code === '400') {\r\n warn('one common syntax error in query requests is encasing string values in double quotes instead of single quotes');\r\n }\r\n }\r\n },\r\n\r\n _cleanParams: function () {\r\n delete this.params.returnIdsOnly;\r\n delete this.params.returnExtentOnly;\r\n delete this.params.returnCountOnly;\r\n },\r\n\r\n _setGeometryParams: function (geometry) {\r\n this.params.inSr = 4326;\r\n var converted = _setGeometry(geometry);\r\n this.params.geometry = converted.geometry;\r\n this.params.geometryType = converted.geometryType;\r\n }\r\n\r\n});\r\n\r\nexport function query (options) {\r\n return new Query(options);\r\n}\r\n\r\nexport default query;\r\n","import { Class, Util } from 'leaflet';\r\nimport {cors} from '../Support';\r\nimport { cleanUrl, getUrlParams } from '../Util';\r\nimport Request from '../Request';\r\n\r\nexport var Task = Class.extend({\r\n\r\n options: {\r\n proxy: false,\r\n useCors: cors\r\n },\r\n\r\n // Generate a method for each methodName:paramName in the setters for this task.\r\n generateSetter: function (param, context) {\r\n return Util.bind(function (value) {\r\n this.params[param] = value;\r\n return this;\r\n }, context);\r\n },\r\n\r\n initialize: function (endpoint) {\r\n // endpoint can be either a url (and options) for an ArcGIS Rest Service or an instance of EsriLeaflet.Service\r\n if (endpoint.request && endpoint.options) {\r\n this._service = endpoint;\r\n Util.setOptions(this, endpoint.options);\r\n } else {\r\n Util.setOptions(this, endpoint);\r\n this.options.url = cleanUrl(endpoint.url);\r\n }\r\n\r\n // clone default params into this object\r\n this.params = Util.extend({}, this.params || {});\r\n\r\n // generate setter methods based on the setters object implimented a child class\r\n if (this.setters) {\r\n for (var setter in this.setters) {\r\n var param = this.setters[setter];\r\n this[setter] = this.generateSetter(param, this);\r\n }\r\n }\r\n },\r\n\r\n token: function (token) {\r\n if (this._service) {\r\n this._service.authenticate(token);\r\n } else {\r\n this.params.token = token;\r\n }\r\n return this;\r\n },\r\n\r\n // ArcGIS Server Find/Identify 10.5+\r\n format: function (boolean) {\r\n // use double negative to expose a more intuitive positive method name\r\n this.params.returnUnformattedValues = !boolean;\r\n return this;\r\n },\r\n\r\n request: function (callback, context) {\r\n if (this.options.requestParams) {\r\n Util.extend(this.params, this.options.requestParams);\r\n }\r\n if (this._service) {\r\n return this._service.request(this.path, this.params, callback, context);\r\n }\r\n\r\n return this._request('request', this.path, this.params, callback, context);\r\n },\r\n\r\n _request: function (method, path, params, callback, context) {\r\n var url = (this.options.proxy) ? this.options.proxy + '?' + this.options.url + path : this.options.url + path;\r\n\r\n if ((method === 'get' || method === 'request') && !this.options.useCors) {\r\n return Request.get.JSONP(url, params, callback, context);\r\n }\r\n\r\n return Request[method](url, params, callback, context);\r\n }\r\n});\r\n\r\nexport function task (options) {\r\n options = getUrlParams(options);\r\n return new Task(options);\r\n}\r\n\r\nexport default task;\r\n","import { latLng, latLngBounds, LatLng, LatLngBounds, Util, DomUtil, GeoJSON } from 'leaflet';\r\nimport { request, warn } from './Request';\r\nimport { options } from './Options';\r\nimport { Support } from './Support';\r\n\r\nimport {\r\n geojsonToArcGIS as g2a,\r\n arcgisToGeoJSON as a2g\r\n} from '@terraformer/arcgis';\r\n\r\nexport function geojsonToArcGIS (geojson, idAttr) {\r\n return g2a(geojson, idAttr);\r\n}\r\n\r\nexport function arcgisToGeoJSON (arcgis, idAttr) {\r\n return a2g(arcgis, idAttr);\r\n}\r\n\r\n// convert an extent (ArcGIS) to LatLngBounds (Leaflet)\r\nexport function extentToBounds (extent) {\r\n // \"NaN\" coordinates from ArcGIS Server indicate a null geometry\r\n if (extent.xmin !== 'NaN' && extent.ymin !== 'NaN' && extent.xmax !== 'NaN' && extent.ymax !== 'NaN') {\r\n var sw = latLng(extent.ymin, extent.xmin);\r\n var ne = latLng(extent.ymax, extent.xmax);\r\n return latLngBounds(sw, ne);\r\n } else {\r\n return null;\r\n }\r\n}\r\n\r\n// convert an LatLngBounds (Leaflet) to extent (ArcGIS)\r\nexport function boundsToExtent (bounds) {\r\n bounds = latLngBounds(bounds);\r\n return {\r\n 'xmin': bounds.getSouthWest().lng,\r\n 'ymin': bounds.getSouthWest().lat,\r\n 'xmax': bounds.getNorthEast().lng,\r\n 'ymax': bounds.getNorthEast().lat,\r\n 'spatialReference': {\r\n 'wkid': 4326\r\n }\r\n };\r\n}\r\n\r\nvar knownFieldNames = /^(OBJECTID|FID|OID|ID)$/i;\r\n\r\n// Attempts to find the ID Field from response\r\nexport function _findIdAttributeFromResponse (response) {\r\n var result;\r\n\r\n if (response.objectIdFieldName) {\r\n // Find Id Field directly\r\n result = response.objectIdFieldName;\r\n } else if (response.fields) {\r\n // Find ID Field based on field type\r\n for (var j = 0; j <= response.fields.length - 1; j++) {\r\n if (response.fields[j].type === 'esriFieldTypeOID') {\r\n result = response.fields[j].name;\r\n break;\r\n }\r\n }\r\n if (!result) {\r\n // If no field was marked as being the esriFieldTypeOID try well known field names\r\n for (j = 0; j <= response.fields.length - 1; j++) {\r\n if (response.fields[j].name.match(knownFieldNames)) {\r\n result = response.fields[j].name;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n return result;\r\n}\r\n\r\n// This is the 'last' resort, find the Id field from the specified feature\r\nexport function _findIdAttributeFromFeature (feature) {\r\n for (var key in feature.attributes) {\r\n if (key.match(knownFieldNames)) {\r\n return key;\r\n }\r\n }\r\n}\r\n\r\nexport function responseToFeatureCollection (response, idAttribute) {\r\n var objectIdField;\r\n var features = response.features || response.results;\r\n var count = features.length;\r\n\r\n if (idAttribute) {\r\n objectIdField = idAttribute;\r\n } else {\r\n objectIdField = _findIdAttributeFromResponse(response);\r\n }\r\n\r\n var featureCollection = {\r\n type: 'FeatureCollection',\r\n features: []\r\n };\r\n\r\n if (count) {\r\n for (var i = features.length - 1; i >= 0; i--) {\r\n var feature = arcgisToGeoJSON(features[i], objectIdField || _findIdAttributeFromFeature(features[i]));\r\n featureCollection.features.push(feature);\r\n }\r\n }\r\n\r\n return featureCollection;\r\n}\r\n\r\n // trim url whitespace and add a trailing slash if needed\r\nexport function cleanUrl (url) {\r\n // trim leading and trailing spaces, but not spaces inside the url\r\n url = Util.trim(url);\r\n\r\n // add a trailing slash to the url if the user omitted it\r\n if (url[url.length - 1] !== '/') {\r\n url += '/';\r\n }\r\n\r\n return url;\r\n}\r\n\r\n/* Extract url params if any and store them in requestParams attribute.\r\n Return the options params updated */\r\nexport function getUrlParams (options) {\r\n if (options.url.indexOf('?') !== -1) {\r\n options.requestParams = options.requestParams || {};\r\n var queryString = options.url.substring(options.url.indexOf('?') + 1);\r\n options.url = options.url.split('?')[0];\r\n options.requestParams = JSON.parse('{\"' + decodeURI(queryString).replace(/\"/g, '\\\\\"').replace(/&/g, '\",\"').replace(/=/g, '\":\"') + '\"}');\r\n }\r\n options.url = cleanUrl(options.url.split('?')[0]);\r\n return options;\r\n}\r\n\r\nexport function isArcgisOnline (url) {\r\n /* hosted feature services support geojson as an output format\r\n utility.arcgis.com services are proxied from a variety of ArcGIS Server vintages, and may not */\r\n return (/^(?!.*utility\\.arcgis\\.com).*\\.arcgis\\.com.*FeatureServer/i).test(url);\r\n}\r\n\r\nexport function geojsonTypeToArcGIS (geoJsonType) {\r\n var arcgisGeometryType;\r\n switch (geoJsonType) {\r\n case 'Point':\r\n arcgisGeometryType = 'esriGeometryPoint';\r\n break;\r\n case 'MultiPoint':\r\n arcgisGeometryType = 'esriGeometryMultipoint';\r\n break;\r\n case 'LineString':\r\n arcgisGeometryType = 'esriGeometryPolyline';\r\n break;\r\n case 'MultiLineString':\r\n arcgisGeometryType = 'esriGeometryPolyline';\r\n break;\r\n case 'Polygon':\r\n arcgisGeometryType = 'esriGeometryPolygon';\r\n break;\r\n case 'MultiPolygon':\r\n arcgisGeometryType = 'esriGeometryPolygon';\r\n break;\r\n }\r\n\r\n return arcgisGeometryType;\r\n}\r\n\r\nexport function calcAttributionWidth (map) {\r\n // either crop at 55px or user defined buffer\r\n return (map.getSize().x - options.attributionWidthOffset) + 'px';\r\n}\r\n\r\nexport function setEsriAttribution (map) {\r\n if (map.attributionControl && !map.attributionControl._esriAttributionAdded) {\r\n map.attributionControl.setPrefix('Leaflet | Powered by Esri');\r\n\r\n var hoverAttributionStyle = document.createElement('style');\r\n hoverAttributionStyle.type = 'text/css';\r\n hoverAttributionStyle.innerHTML = '.esri-truncated-attribution:hover {' +\r\n 'white-space: normal;' +\r\n '}';\r\n\r\n document.getElementsByTagName('head')[0].appendChild(hoverAttributionStyle);\r\n DomUtil.addClass(map.attributionControl._container, 'esri-truncated-attribution:hover');\r\n\r\n // define a new css class in JS to trim attribution into a single line\r\n var attributionStyle = document.createElement('style');\r\n attributionStyle.type = 'text/css';\r\n attributionStyle.innerHTML = '.esri-truncated-attribution {' +\r\n 'vertical-align: -3px;' +\r\n 'white-space: nowrap;' +\r\n 'overflow: hidden;' +\r\n 'text-overflow: ellipsis;' +\r\n 'display: inline-block;' +\r\n 'transition: 0s white-space;' +\r\n 'transition-delay: 1s;' +\r\n 'max-width: ' + calcAttributionWidth(map) + ';' +\r\n '}';\r\n\r\n document.getElementsByTagName('head')[0].appendChild(attributionStyle);\r\n DomUtil.addClass(map.attributionControl._container, 'esri-truncated-attribution');\r\n\r\n // update the width used to truncate when the map itself is resized\r\n map.on('resize', function (e) {\r\n map.attributionControl._container.style.maxWidth = calcAttributionWidth(e.target);\r\n });\r\n\r\n map.attributionControl._esriAttributionAdded = true;\r\n }\r\n}\r\n\r\nexport function _setGeometry (geometry) {\r\n var params = {\r\n geometry: null,\r\n geometryType: null\r\n };\r\n\r\n // convert bounds to extent and finish\r\n if (geometry instanceof LatLngBounds) {\r\n // set geometry + geometryType\r\n params.geometry = boundsToExtent(geometry);\r\n params.geometryType = 'esriGeometryEnvelope';\r\n return params;\r\n }\r\n\r\n // convert L.Marker > L.LatLng\r\n if (geometry.getLatLng) {\r\n geometry = geometry.getLatLng();\r\n }\r\n\r\n // convert L.LatLng to a geojson point and continue;\r\n if (geometry instanceof LatLng) {\r\n geometry = {\r\n type: 'Point',\r\n coordinates: [geometry.lng, geometry.lat]\r\n };\r\n }\r\n\r\n // handle L.GeoJSON, pull out the first geometry\r\n if (geometry instanceof GeoJSON) {\r\n // reassign geometry to the GeoJSON value (we are assuming that only one feature is present)\r\n geometry = geometry.getLayers()[0].feature.geometry;\r\n params.geometry = geojsonToArcGIS(geometry);\r\n params.geometryType = geojsonTypeToArcGIS(geometry.type);\r\n }\r\n\r\n // Handle L.Polyline and L.Polygon\r\n if (geometry.toGeoJSON) {\r\n geometry = geometry.toGeoJSON();\r\n }\r\n\r\n // handle GeoJSON feature by pulling out the geometry\r\n if (geometry.type === 'Feature') {\r\n // get the geometry of the geojson feature\r\n geometry = geometry.geometry;\r\n }\r\n\r\n // confirm that our GeoJSON is a point, line or polygon\r\n if (geometry.type === 'Point' || geometry.type === 'LineString' || geometry.type === 'Polygon' || geometry.type === 'MultiPolygon') {\r\n params.geometry = geojsonToArcGIS(geometry);\r\n params.geometryType = geojsonTypeToArcGIS(geometry.type);\r\n return params;\r\n }\r\n\r\n // warn the user if we havn't found an appropriate object\r\n warn('invalid geometry passed to spatial query. Should be L.LatLng, L.LatLngBounds, L.Marker or a GeoJSON Point, Line, Polygon or MultiPolygon object');\r\n\r\n return;\r\n}\r\n\r\nexport function _getAttributionData (url, map) {\r\n if (Support.cors) {\r\n request(url, {}, Util.bind(function (error, attributions) {\r\n if (error) { return; }\r\n map._esriAttributions = [];\r\n for (var c = 0; c < attributions.contributors.length; c++) {\r\n var contributor = attributions.contributors[c];\r\n\r\n for (var i = 0; i < contributor.coverageAreas.length; i++) {\r\n var coverageArea = contributor.coverageAreas[i];\r\n var southWest = latLng(coverageArea.bbox[0], coverageArea.bbox[1]);\r\n var northEast = latLng(coverageArea.bbox[2], coverageArea.bbox[3]);\r\n map._esriAttributions.push({\r\n attribution: contributor.attribution,\r\n score: coverageArea.score,\r\n bounds: latLngBounds(southWest, northEast),\r\n minZoom: coverageArea.zoomMin,\r\n maxZoom: coverageArea.zoomMax\r\n });\r\n }\r\n }\r\n\r\n map._esriAttributions.sort(function (a, b) {\r\n return b.score - a.score;\r\n });\r\n\r\n // pass the same argument as the map's 'moveend' event\r\n var obj = { target: map };\r\n _updateMapAttribution(obj);\r\n }, this));\r\n }\r\n}\r\n\r\nexport function _updateMapAttribution (evt) {\r\n var map = evt.target;\r\n var oldAttributions = map._esriAttributions;\r\n\r\n if (!map || !map.attributionControl) return;\r\n\r\n var attributionElement = map.attributionControl._container.querySelector('.esri-dynamic-attribution');\r\n\r\n if (attributionElement && oldAttributions) {\r\n var newAttributions = '';\r\n var bounds = map.getBounds();\r\n var wrappedBounds = latLngBounds(\r\n bounds.getSouthWest().wrap(),\r\n bounds.getNorthEast().wrap()\r\n );\r\n var zoom = map.getZoom();\r\n\r\n for (var i = 0; i < oldAttributions.length; i++) {\r\n var attribution = oldAttributions[i];\r\n var text = attribution.attribution;\r\n\r\n if (!newAttributions.match(text) && attribution.bounds.intersects(wrappedBounds) && zoom >= attribution.minZoom && zoom <= attribution.maxZoom) {\r\n newAttributions += (', ' + text);\r\n }\r\n }\r\n\r\n newAttributions = newAttributions.substr(2);\r\n attributionElement.innerHTML = newAttributions;\r\n attributionElement.style.maxWidth = calcAttributionWidth(map);\r\n\r\n map.fire('attributionupdated', {\r\n attribution: newAttributions\r\n });\r\n }\r\n}\r\n\r\n// for backwards compatibility\r\nexport { warn };\r\n\r\nexport var EsriUtil = {\r\n warn: warn,\r\n cleanUrl: cleanUrl,\r\n getUrlParams: getUrlParams,\r\n isArcgisOnline: isArcgisOnline,\r\n geojsonTypeToArcGIS: geojsonTypeToArcGIS,\r\n responseToFeatureCollection: responseToFeatureCollection,\r\n geojsonToArcGIS: geojsonToArcGIS,\r\n arcgisToGeoJSON: arcgisToGeoJSON,\r\n boundsToExtent: boundsToExtent,\r\n extentToBounds: extentToBounds,\r\n calcAttributionWidth: calcAttributionWidth,\r\n setEsriAttribution: setEsriAttribution,\r\n _setGeometry: _setGeometry,\r\n _getAttributionData: _getAttributionData,\r\n _updateMapAttribution: _updateMapAttribution,\r\n _findIdAttributeFromFeature: _findIdAttributeFromFeature,\r\n _findIdAttributeFromResponse: _findIdAttributeFromResponse\r\n};\r\n\r\nexport default EsriUtil;\r\n","/* @preserve\n * Leaflet 1.6.0, a JS library for interactive maps. http://leafletjs.com\n * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade\n */\n\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\t(factory((global.L = {})));\n}(this, (function (exports) { 'use strict';\n\nvar version = \"1.6.0\";\n\n/*\r\n * @namespace Util\r\n *\r\n * Various utility functions, used by Leaflet internally.\r\n */\r\n\r\nvar freeze = Object.freeze;\r\nObject.freeze = function (obj) { return obj; };\r\n\r\n// @function extend(dest: Object, src?: Object): Object\r\n// Merges the properties of the `src` object (or multiple objects) into `dest` object and returns the latter. Has an `L.extend` shortcut.\r\nfunction extend(dest) {\r\n\tvar i, j, len, src;\r\n\r\n\tfor (j = 1, len = arguments.length; j < len; j++) {\r\n\t\tsrc = arguments[j];\r\n\t\tfor (i in src) {\r\n\t\t\tdest[i] = src[i];\r\n\t\t}\r\n\t}\r\n\treturn dest;\r\n}\r\n\r\n// @function create(proto: Object, properties?: Object): Object\r\n// Compatibility polyfill for [Object.create](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/create)\r\nvar create = Object.create || (function () {\r\n\tfunction F() {}\r\n\treturn function (proto) {\r\n\t\tF.prototype = proto;\r\n\t\treturn new F();\r\n\t};\r\n})();\r\n\r\n// @function bind(fn: Function, …): Function\r\n// Returns a new function bound to the arguments passed, like [Function.prototype.bind](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).\r\n// Has a `L.bind()` shortcut.\r\nfunction bind(fn, obj) {\r\n\tvar slice = Array.prototype.slice;\r\n\r\n\tif (fn.bind) {\r\n\t\treturn fn.bind.apply(fn, slice.call(arguments, 1));\r\n\t}\r\n\r\n\tvar args = slice.call(arguments, 2);\r\n\r\n\treturn function () {\r\n\t\treturn fn.apply(obj, args.length ? args.concat(slice.call(arguments)) : arguments);\r\n\t};\r\n}\r\n\r\n// @property lastId: Number\r\n// Last unique ID used by [`stamp()`](#util-stamp)\r\nvar lastId = 0;\r\n\r\n// @function stamp(obj: Object): Number\r\n// Returns the unique ID of an object, assigning it one if it doesn't have it.\r\nfunction stamp(obj) {\r\n\t/*eslint-disable */\r\n\tobj._leaflet_id = obj._leaflet_id || ++lastId;\r\n\treturn obj._leaflet_id;\r\n\t/* eslint-enable */\r\n}\r\n\r\n// @function throttle(fn: Function, time: Number, context: Object): Function\r\n// Returns a function which executes function `fn` with the given scope `context`\r\n// (so that the `this` keyword refers to `context` inside `fn`'s code). The function\r\n// `fn` will be called no more than one time per given amount of `time`. The arguments\r\n// received by the bound function will be any arguments passed when binding the\r\n// function, followed by any arguments passed when invoking the bound function.\r\n// Has an `L.throttle` shortcut.\r\nfunction throttle(fn, time, context) {\r\n\tvar lock, args, wrapperFn, later;\r\n\r\n\tlater = function () {\r\n\t\t// reset lock and call if queued\r\n\t\tlock = false;\r\n\t\tif (args) {\r\n\t\t\twrapperFn.apply(context, args);\r\n\t\t\targs = false;\r\n\t\t}\r\n\t};\r\n\r\n\twrapperFn = function () {\r\n\t\tif (lock) {\r\n\t\t\t// called too soon, queue to call later\r\n\t\t\targs = arguments;\r\n\r\n\t\t} else {\r\n\t\t\t// call and lock until later\r\n\t\t\tfn.apply(context, arguments);\r\n\t\t\tsetTimeout(later, time);\r\n\t\t\tlock = true;\r\n\t\t}\r\n\t};\r\n\r\n\treturn wrapperFn;\r\n}\r\n\r\n// @function wrapNum(num: Number, range: Number[], includeMax?: Boolean): Number\r\n// Returns the number `num` modulo `range` in such a way so it lies within\r\n// `range[0]` and `range[1]`. The returned value will be always smaller than\r\n// `range[1]` unless `includeMax` is set to `true`.\r\nfunction wrapNum(x, range, includeMax) {\r\n\tvar max = range[1],\r\n\t min = range[0],\r\n\t d = max - min;\r\n\treturn x === max && includeMax ? x : ((x - min) % d + d) % d + min;\r\n}\r\n\r\n// @function falseFn(): Function\r\n// Returns a function which always returns `false`.\r\nfunction falseFn() { return false; }\r\n\r\n// @function formatNum(num: Number, digits?: Number): Number\r\n// Returns the number `num` rounded to `digits` decimals, or to 6 decimals by default.\r\nfunction formatNum(num, digits) {\r\n\tvar pow = Math.pow(10, (digits === undefined ? 6 : digits));\r\n\treturn Math.round(num * pow) / pow;\r\n}\r\n\r\n// @function trim(str: String): String\r\n// Compatibility polyfill for [String.prototype.trim](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim)\r\nfunction trim(str) {\r\n\treturn str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\r\n}\r\n\r\n// @function splitWords(str: String): String[]\r\n// Trims and splits the string on whitespace and returns the array of parts.\r\nfunction splitWords(str) {\r\n\treturn trim(str).split(/\\s+/);\r\n}\r\n\r\n// @function setOptions(obj: Object, options: Object): Object\r\n// Merges the given properties to the `options` of the `obj` object, returning the resulting options. See `Class options`. Has an `L.setOptions` shortcut.\r\nfunction setOptions(obj, options) {\r\n\tif (!obj.hasOwnProperty('options')) {\r\n\t\tobj.options = obj.options ? create(obj.options) : {};\r\n\t}\r\n\tfor (var i in options) {\r\n\t\tobj.options[i] = options[i];\r\n\t}\r\n\treturn obj.options;\r\n}\r\n\r\n// @function getParamString(obj: Object, existingUrl?: String, uppercase?: Boolean): String\r\n// Converts an object into a parameter URL string, e.g. `{a: \"foo\", b: \"bar\"}`\r\n// translates to `'?a=foo&b=bar'`. If `existingUrl` is set, the parameters will\r\n// be appended at the end. If `uppercase` is `true`, the parameter names will\r\n// be uppercased (e.g. `'?A=foo&B=bar'`)\r\nfunction getParamString(obj, existingUrl, uppercase) {\r\n\tvar params = [];\r\n\tfor (var i in obj) {\r\n\t\tparams.push(encodeURIComponent(uppercase ? i.toUpperCase() : i) + '=' + encodeURIComponent(obj[i]));\r\n\t}\r\n\treturn ((!existingUrl || existingUrl.indexOf('?') === -1) ? '?' : '&') + params.join('&');\r\n}\r\n\r\nvar templateRe = /\\{ *([\\w_-]+) *\\}/g;\r\n\r\n// @function template(str: String, data: Object): String\r\n// Simple templating facility, accepts a template string of the form `'Hello {a}, {b}'`\r\n// and a data object like `{a: 'foo', b: 'bar'}`, returns evaluated string\r\n// `('Hello foo, bar')`. You can also specify functions instead of strings for\r\n// data values — they will be evaluated passing `data` as an argument.\r\nfunction template(str, data) {\r\n\treturn str.replace(templateRe, function (str, key) {\r\n\t\tvar value = data[key];\r\n\r\n\t\tif (value === undefined) {\r\n\t\t\tthrow new Error('No value provided for variable ' + str);\r\n\r\n\t\t} else if (typeof value === 'function') {\r\n\t\t\tvalue = value(data);\r\n\t\t}\r\n\t\treturn value;\r\n\t});\r\n}\r\n\r\n// @function isArray(obj): Boolean\r\n// Compatibility polyfill for [Array.isArray](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray)\r\nvar isArray = Array.isArray || function (obj) {\r\n\treturn (Object.prototype.toString.call(obj) === '[object Array]');\r\n};\r\n\r\n// @function indexOf(array: Array, el: Object): Number\r\n// Compatibility polyfill for [Array.prototype.indexOf](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf)\r\nfunction indexOf(array, el) {\r\n\tfor (var i = 0; i < array.length; i++) {\r\n\t\tif (array[i] === el) { return i; }\r\n\t}\r\n\treturn -1;\r\n}\r\n\r\n// @property emptyImageUrl: String\r\n// Data URI string containing a base64-encoded empty GIF image.\r\n// Used as a hack to free memory from unused images on WebKit-powered\r\n// mobile devices (by setting image `src` to this string).\r\nvar emptyImageUrl = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';\r\n\r\n// inspired by http://paulirish.com/2011/requestanimationframe-for-smart-animating/\r\n\r\nfunction getPrefixed(name) {\r\n\treturn window['webkit' + name] || window['moz' + name] || window['ms' + name];\r\n}\r\n\r\nvar lastTime = 0;\r\n\r\n// fallback for IE 7-8\r\nfunction timeoutDefer(fn) {\r\n\tvar time = +new Date(),\r\n\t timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n\tlastTime = time + timeToCall;\r\n\treturn window.setTimeout(fn, timeToCall);\r\n}\r\n\r\nvar requestFn = window.requestAnimationFrame || getPrefixed('RequestAnimationFrame') || timeoutDefer;\r\nvar cancelFn = window.cancelAnimationFrame || getPrefixed('CancelAnimationFrame') ||\r\n\t\tgetPrefixed('CancelRequestAnimationFrame') || function (id) { window.clearTimeout(id); };\r\n\r\n// @function requestAnimFrame(fn: Function, context?: Object, immediate?: Boolean): Number\r\n// Schedules `fn` to be executed when the browser repaints. `fn` is bound to\r\n// `context` if given. When `immediate` is set, `fn` is called immediately if\r\n// the browser doesn't have native support for\r\n// [`window.requestAnimationFrame`](https://developer.mozilla.org/docs/Web/API/window/requestAnimationFrame),\r\n// otherwise it's delayed. Returns a request ID that can be used to cancel the request.\r\nfunction requestAnimFrame(fn, context, immediate) {\r\n\tif (immediate && requestFn === timeoutDefer) {\r\n\t\tfn.call(context);\r\n\t} else {\r\n\t\treturn requestFn.call(window, bind(fn, context));\r\n\t}\r\n}\r\n\r\n// @function cancelAnimFrame(id: Number): undefined\r\n// Cancels a previous `requestAnimFrame`. See also [window.cancelAnimationFrame](https://developer.mozilla.org/docs/Web/API/window/cancelAnimationFrame).\r\nfunction cancelAnimFrame(id) {\r\n\tif (id) {\r\n\t\tcancelFn.call(window, id);\r\n\t}\r\n}\r\n\n\nvar Util = (Object.freeze || Object)({\n\tfreeze: freeze,\n\textend: extend,\n\tcreate: create,\n\tbind: bind,\n\tlastId: lastId,\n\tstamp: stamp,\n\tthrottle: throttle,\n\twrapNum: wrapNum,\n\tfalseFn: falseFn,\n\tformatNum: formatNum,\n\ttrim: trim,\n\tsplitWords: splitWords,\n\tsetOptions: setOptions,\n\tgetParamString: getParamString,\n\ttemplate: template,\n\tisArray: isArray,\n\tindexOf: indexOf,\n\temptyImageUrl: emptyImageUrl,\n\trequestFn: requestFn,\n\tcancelFn: cancelFn,\n\trequestAnimFrame: requestAnimFrame,\n\tcancelAnimFrame: cancelAnimFrame\n});\n\n// @class Class\r\n// @aka L.Class\r\n\r\n// @section\r\n// @uninheritable\r\n\r\n// Thanks to John Resig and Dean Edwards for inspiration!\r\n\r\nfunction Class() {}\r\n\r\nClass.extend = function (props) {\r\n\r\n\t// @function extend(props: Object): Function\r\n\t// [Extends the current class](#class-inheritance) given the properties to be included.\r\n\t// Returns a Javascript function that is a class constructor (to be called with `new`).\r\n\tvar NewClass = function () {\r\n\r\n\t\t// call the constructor\r\n\t\tif (this.initialize) {\r\n\t\t\tthis.initialize.apply(this, arguments);\r\n\t\t}\r\n\r\n\t\t// call all constructor hooks\r\n\t\tthis.callInitHooks();\r\n\t};\r\n\r\n\tvar parentProto = NewClass.__super__ = this.prototype;\r\n\r\n\tvar proto = create(parentProto);\r\n\tproto.constructor = NewClass;\r\n\r\n\tNewClass.prototype = proto;\r\n\r\n\t// inherit parent's statics\r\n\tfor (var i in this) {\r\n\t\tif (this.hasOwnProperty(i) && i !== 'prototype' && i !== '__super__') {\r\n\t\t\tNewClass[i] = this[i];\r\n\t\t}\r\n\t}\r\n\r\n\t// mix static properties into the class\r\n\tif (props.statics) {\r\n\t\textend(NewClass, props.statics);\r\n\t\tdelete props.statics;\r\n\t}\r\n\r\n\t// mix includes into the prototype\r\n\tif (props.includes) {\r\n\t\tcheckDeprecatedMixinEvents(props.includes);\r\n\t\textend.apply(null, [proto].concat(props.includes));\r\n\t\tdelete props.includes;\r\n\t}\r\n\r\n\t// merge options\r\n\tif (proto.options) {\r\n\t\tprops.options = extend(create(proto.options), props.options);\r\n\t}\r\n\r\n\t// mix given properties into the prototype\r\n\textend(proto, props);\r\n\r\n\tproto._initHooks = [];\r\n\r\n\t// add method for calling all hooks\r\n\tproto.callInitHooks = function () {\r\n\r\n\t\tif (this._initHooksCalled) { return; }\r\n\r\n\t\tif (parentProto.callInitHooks) {\r\n\t\t\tparentProto.callInitHooks.call(this);\r\n\t\t}\r\n\r\n\t\tthis._initHooksCalled = true;\r\n\r\n\t\tfor (var i = 0, len = proto._initHooks.length; i < len; i++) {\r\n\t\t\tproto._initHooks[i].call(this);\r\n\t\t}\r\n\t};\r\n\r\n\treturn NewClass;\r\n};\r\n\r\n\r\n// @function include(properties: Object): this\r\n// [Includes a mixin](#class-includes) into the current class.\r\nClass.include = function (props) {\r\n\textend(this.prototype, props);\r\n\treturn this;\r\n};\r\n\r\n// @function mergeOptions(options: Object): this\r\n// [Merges `options`](#class-options) into the defaults of the class.\r\nClass.mergeOptions = function (options) {\r\n\textend(this.prototype.options, options);\r\n\treturn this;\r\n};\r\n\r\n// @function addInitHook(fn: Function): this\r\n// Adds a [constructor hook](#class-constructor-hooks) to the class.\r\nClass.addInitHook = function (fn) { // (Function) || (String, args...)\r\n\tvar args = Array.prototype.slice.call(arguments, 1);\r\n\r\n\tvar init = typeof fn === 'function' ? fn : function () {\r\n\t\tthis[fn].apply(this, args);\r\n\t};\r\n\r\n\tthis.prototype._initHooks = this.prototype._initHooks || [];\r\n\tthis.prototype._initHooks.push(init);\r\n\treturn this;\r\n};\r\n\r\nfunction checkDeprecatedMixinEvents(includes) {\r\n\tif (typeof L === 'undefined' || !L || !L.Mixin) { return; }\r\n\r\n\tincludes = isArray(includes) ? includes : [includes];\r\n\r\n\tfor (var i = 0; i < includes.length; i++) {\r\n\t\tif (includes[i] === L.Mixin.Events) {\r\n\t\t\tconsole.warn('Deprecated include of L.Mixin.Events: ' +\r\n\t\t\t\t'this property will be removed in future releases, ' +\r\n\t\t\t\t'please inherit from L.Evented instead.', new Error().stack);\r\n\t\t}\r\n\t}\r\n}\n\n/*\r\n * @class Evented\r\n * @aka L.Evented\r\n * @inherits Class\r\n *\r\n * A set of methods shared between event-powered classes (like `Map` and `Marker`). Generally, events allow you to execute some function when something happens with an object (e.g. the user clicks on the map, causing the map to fire `'click'` event).\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * map.on('click', function(e) {\r\n * \talert(e.latlng);\r\n * } );\r\n * ```\r\n *\r\n * Leaflet deals with event listeners by reference, so if you want to add a listener and then remove it, define it as a function:\r\n *\r\n * ```js\r\n * function onClick(e) { ... }\r\n *\r\n * map.on('click', onClick);\r\n * map.off('click', onClick);\r\n * ```\r\n */\r\n\r\nvar Events = {\r\n\t/* @method on(type: String, fn: Function, context?: Object): this\r\n\t * Adds a listener function (`fn`) to a particular event type of the object. You can optionally specify the context of the listener (object the this keyword will point to). You can also pass several space-separated types (e.g. `'click dblclick'`).\r\n\t *\r\n\t * @alternative\r\n\t * @method on(eventMap: Object): this\r\n\t * Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`\r\n\t */\r\n\ton: function (types, fn, context) {\r\n\r\n\t\t// types can be a map of types/handlers\r\n\t\tif (typeof types === 'object') {\r\n\t\t\tfor (var type in types) {\r\n\t\t\t\t// we don't process space-separated events here for performance;\r\n\t\t\t\t// it's a hot path since Layer uses the on(obj) syntax\r\n\t\t\t\tthis._on(type, types[type], fn);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\t// types can be a string of space-separated words\r\n\t\t\ttypes = splitWords(types);\r\n\r\n\t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n\t\t\t\tthis._on(types[i], fn, context);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t/* @method off(type: String, fn?: Function, context?: Object): this\r\n\t * Removes a previously added listener function. If no function is specified, it will remove all the listeners of that particular event from the object. Note that if you passed a custom context to `on`, you must pass the same context to `off` in order to remove the listener.\r\n\t *\r\n\t * @alternative\r\n\t * @method off(eventMap: Object): this\r\n\t * Removes a set of type/listener pairs.\r\n\t *\r\n\t * @alternative\r\n\t * @method off: this\r\n\t * Removes all listeners to all events on the object. This includes implicitly attached events.\r\n\t */\r\n\toff: function (types, fn, context) {\r\n\r\n\t\tif (!types) {\r\n\t\t\t// clear all listeners if called without arguments\r\n\t\t\tdelete this._events;\r\n\r\n\t\t} else if (typeof types === 'object') {\r\n\t\t\tfor (var type in types) {\r\n\t\t\t\tthis._off(type, types[type], fn);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\ttypes = splitWords(types);\r\n\r\n\t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n\t\t\t\tthis._off(types[i], fn, context);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// attach listener (without syntactic sugar now)\r\n\t_on: function (type, fn, context) {\r\n\t\tthis._events = this._events || {};\r\n\r\n\t\t/* get/init listeners for type */\r\n\t\tvar typeListeners = this._events[type];\r\n\t\tif (!typeListeners) {\r\n\t\t\ttypeListeners = [];\r\n\t\t\tthis._events[type] = typeListeners;\r\n\t\t}\r\n\r\n\t\tif (context === this) {\r\n\t\t\t// Less memory footprint.\r\n\t\t\tcontext = undefined;\r\n\t\t}\r\n\t\tvar newListener = {fn: fn, ctx: context},\r\n\t\t listeners = typeListeners;\r\n\r\n\t\t// check if fn already there\r\n\t\tfor (var i = 0, len = listeners.length; i < len; i++) {\r\n\t\t\tif (listeners[i].fn === fn && listeners[i].ctx === context) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlisteners.push(newListener);\r\n\t},\r\n\r\n\t_off: function (type, fn, context) {\r\n\t\tvar listeners,\r\n\t\t i,\r\n\t\t len;\r\n\r\n\t\tif (!this._events) { return; }\r\n\r\n\t\tlisteners = this._events[type];\r\n\r\n\t\tif (!listeners) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!fn) {\r\n\t\t\t// Set all removed listeners to noop so they are not called if remove happens in fire\r\n\t\t\tfor (i = 0, len = listeners.length; i < len; i++) {\r\n\t\t\t\tlisteners[i].fn = falseFn;\r\n\t\t\t}\r\n\t\t\t// clear all listeners for a type if function isn't specified\r\n\t\t\tdelete this._events[type];\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (context === this) {\r\n\t\t\tcontext = undefined;\r\n\t\t}\r\n\r\n\t\tif (listeners) {\r\n\r\n\t\t\t// find fn and remove it\r\n\t\t\tfor (i = 0, len = listeners.length; i < len; i++) {\r\n\t\t\t\tvar l = listeners[i];\r\n\t\t\t\tif (l.ctx !== context) { continue; }\r\n\t\t\t\tif (l.fn === fn) {\r\n\r\n\t\t\t\t\t// set the removed listener to noop so that's not called if remove happens in fire\r\n\t\t\t\t\tl.fn = falseFn;\r\n\r\n\t\t\t\t\tif (this._firingCount) {\r\n\t\t\t\t\t\t/* copy array in case events are being fired */\r\n\t\t\t\t\t\tthis._events[type] = listeners = listeners.slice();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlisteners.splice(i, 1);\r\n\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t// @method fire(type: String, data?: Object, propagate?: Boolean): this\r\n\t// Fires an event of the specified type. You can optionally provide an data\r\n\t// object — the first argument of the listener function will contain its\r\n\t// properties. The event can optionally be propagated to event parents.\r\n\tfire: function (type, data, propagate) {\r\n\t\tif (!this.listens(type, propagate)) { return this; }\r\n\r\n\t\tvar event = extend({}, data, {\r\n\t\t\ttype: type,\r\n\t\t\ttarget: this,\r\n\t\t\tsourceTarget: data && data.sourceTarget || this\r\n\t\t});\r\n\r\n\t\tif (this._events) {\r\n\t\t\tvar listeners = this._events[type];\r\n\r\n\t\t\tif (listeners) {\r\n\t\t\t\tthis._firingCount = (this._firingCount + 1) || 1;\r\n\t\t\t\tfor (var i = 0, len = listeners.length; i < len; i++) {\r\n\t\t\t\t\tvar l = listeners[i];\r\n\t\t\t\t\tl.fn.call(l.ctx || this, event);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._firingCount--;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (propagate) {\r\n\t\t\t// propagate the event to parents (set with addEventParent)\r\n\t\t\tthis._propagateEvent(event);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method listens(type: String): Boolean\r\n\t// Returns `true` if a particular event type has any listeners attached to it.\r\n\tlistens: function (type, propagate) {\r\n\t\tvar listeners = this._events && this._events[type];\r\n\t\tif (listeners && listeners.length) { return true; }\r\n\r\n\t\tif (propagate) {\r\n\t\t\t// also check parents for listeners if event propagates\r\n\t\t\tfor (var id in this._eventParents) {\r\n\t\t\t\tif (this._eventParents[id].listens(type, propagate)) { return true; }\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\t// @method once(…): this\r\n\t// Behaves as [`on(…)`](#evented-on), except the listener will only get fired once and then removed.\r\n\tonce: function (types, fn, context) {\r\n\r\n\t\tif (typeof types === 'object') {\r\n\t\t\tfor (var type in types) {\r\n\t\t\t\tthis.once(type, types[type], fn);\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tvar handler = bind(function () {\r\n\t\t\tthis\r\n\t\t\t .off(types, fn, context)\r\n\t\t\t .off(types, handler, context);\r\n\t\t}, this);\r\n\r\n\t\t// add a listener that's executed once and removed after that\r\n\t\treturn this\r\n\t\t .on(types, fn, context)\r\n\t\t .on(types, handler, context);\r\n\t},\r\n\r\n\t// @method addEventParent(obj: Evented): this\r\n\t// Adds an event parent - an `Evented` that will receive propagated events\r\n\taddEventParent: function (obj) {\r\n\t\tthis._eventParents = this._eventParents || {};\r\n\t\tthis._eventParents[stamp(obj)] = obj;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method removeEventParent(obj: Evented): this\r\n\t// Removes an event parent, so it will stop receiving propagated events\r\n\tremoveEventParent: function (obj) {\r\n\t\tif (this._eventParents) {\r\n\t\t\tdelete this._eventParents[stamp(obj)];\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_propagateEvent: function (e) {\r\n\t\tfor (var id in this._eventParents) {\r\n\t\t\tthis._eventParents[id].fire(e.type, extend({\r\n\t\t\t\tlayer: e.target,\r\n\t\t\t\tpropagatedFrom: e.target\r\n\t\t\t}, e), true);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n// aliases; we should ditch those eventually\r\n\r\n// @method addEventListener(…): this\r\n// Alias to [`on(…)`](#evented-on)\r\nEvents.addEventListener = Events.on;\r\n\r\n// @method removeEventListener(…): this\r\n// Alias to [`off(…)`](#evented-off)\r\n\r\n// @method clearAllEventListeners(…): this\r\n// Alias to [`off()`](#evented-off)\r\nEvents.removeEventListener = Events.clearAllEventListeners = Events.off;\r\n\r\n// @method addOneTimeEventListener(…): this\r\n// Alias to [`once(…)`](#evented-once)\r\nEvents.addOneTimeEventListener = Events.once;\r\n\r\n// @method fireEvent(…): this\r\n// Alias to [`fire(…)`](#evented-fire)\r\nEvents.fireEvent = Events.fire;\r\n\r\n// @method hasEventListeners(…): Boolean\r\n// Alias to [`listens(…)`](#evented-listens)\r\nEvents.hasEventListeners = Events.listens;\r\n\r\nvar Evented = Class.extend(Events);\n\n/*\r\n * @class Point\r\n * @aka L.Point\r\n *\r\n * Represents a point with `x` and `y` coordinates in pixels.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var point = L.point(200, 300);\r\n * ```\r\n *\r\n * All Leaflet methods and options that accept `Point` objects also accept them in a simple Array form (unless noted otherwise), so these lines are equivalent:\r\n *\r\n * ```js\r\n * map.panBy([200, 300]);\r\n * map.panBy(L.point(200, 300));\r\n * ```\r\n *\r\n * Note that `Point` does not inherit from Leafet's `Class` object,\r\n * which means new classes can't inherit from it, and new methods\r\n * can't be added to it with the `include` function.\r\n */\r\n\r\nfunction Point(x, y, round) {\r\n\t// @property x: Number; The `x` coordinate of the point\r\n\tthis.x = (round ? Math.round(x) : x);\r\n\t// @property y: Number; The `y` coordinate of the point\r\n\tthis.y = (round ? Math.round(y) : y);\r\n}\r\n\r\nvar trunc = Math.trunc || function (v) {\r\n\treturn v > 0 ? Math.floor(v) : Math.ceil(v);\r\n};\r\n\r\nPoint.prototype = {\r\n\r\n\t// @method clone(): Point\r\n\t// Returns a copy of the current point.\r\n\tclone: function () {\r\n\t\treturn new Point(this.x, this.y);\r\n\t},\r\n\r\n\t// @method add(otherPoint: Point): Point\r\n\t// Returns the result of addition of the current and the given points.\r\n\tadd: function (point) {\r\n\t\t// non-destructive, returns a new point\r\n\t\treturn this.clone()._add(toPoint(point));\r\n\t},\r\n\r\n\t_add: function (point) {\r\n\t\t// destructive, used directly for performance in situations where it's safe to modify existing point\r\n\t\tthis.x += point.x;\r\n\t\tthis.y += point.y;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method subtract(otherPoint: Point): Point\r\n\t// Returns the result of subtraction of the given point from the current.\r\n\tsubtract: function (point) {\r\n\t\treturn this.clone()._subtract(toPoint(point));\r\n\t},\r\n\r\n\t_subtract: function (point) {\r\n\t\tthis.x -= point.x;\r\n\t\tthis.y -= point.y;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method divideBy(num: Number): Point\r\n\t// Returns the result of division of the current point by the given number.\r\n\tdivideBy: function (num) {\r\n\t\treturn this.clone()._divideBy(num);\r\n\t},\r\n\r\n\t_divideBy: function (num) {\r\n\t\tthis.x /= num;\r\n\t\tthis.y /= num;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method multiplyBy(num: Number): Point\r\n\t// Returns the result of multiplication of the current point by the given number.\r\n\tmultiplyBy: function (num) {\r\n\t\treturn this.clone()._multiplyBy(num);\r\n\t},\r\n\r\n\t_multiplyBy: function (num) {\r\n\t\tthis.x *= num;\r\n\t\tthis.y *= num;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method scaleBy(scale: Point): Point\r\n\t// Multiply each coordinate of the current point by each coordinate of\r\n\t// `scale`. In linear algebra terms, multiply the point by the\r\n\t// [scaling matrix](https://en.wikipedia.org/wiki/Scaling_%28geometry%29#Matrix_representation)\r\n\t// defined by `scale`.\r\n\tscaleBy: function (point) {\r\n\t\treturn new Point(this.x * point.x, this.y * point.y);\r\n\t},\r\n\r\n\t// @method unscaleBy(scale: Point): Point\r\n\t// Inverse of `scaleBy`. Divide each coordinate of the current point by\r\n\t// each coordinate of `scale`.\r\n\tunscaleBy: function (point) {\r\n\t\treturn new Point(this.x / point.x, this.y / point.y);\r\n\t},\r\n\r\n\t// @method round(): Point\r\n\t// Returns a copy of the current point with rounded coordinates.\r\n\tround: function () {\r\n\t\treturn this.clone()._round();\r\n\t},\r\n\r\n\t_round: function () {\r\n\t\tthis.x = Math.round(this.x);\r\n\t\tthis.y = Math.round(this.y);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method floor(): Point\r\n\t// Returns a copy of the current point with floored coordinates (rounded down).\r\n\tfloor: function () {\r\n\t\treturn this.clone()._floor();\r\n\t},\r\n\r\n\t_floor: function () {\r\n\t\tthis.x = Math.floor(this.x);\r\n\t\tthis.y = Math.floor(this.y);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method ceil(): Point\r\n\t// Returns a copy of the current point with ceiled coordinates (rounded up).\r\n\tceil: function () {\r\n\t\treturn this.clone()._ceil();\r\n\t},\r\n\r\n\t_ceil: function () {\r\n\t\tthis.x = Math.ceil(this.x);\r\n\t\tthis.y = Math.ceil(this.y);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method trunc(): Point\r\n\t// Returns a copy of the current point with truncated coordinates (rounded towards zero).\r\n\ttrunc: function () {\r\n\t\treturn this.clone()._trunc();\r\n\t},\r\n\r\n\t_trunc: function () {\r\n\t\tthis.x = trunc(this.x);\r\n\t\tthis.y = trunc(this.y);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method distanceTo(otherPoint: Point): Number\r\n\t// Returns the cartesian distance between the current and the given points.\r\n\tdistanceTo: function (point) {\r\n\t\tpoint = toPoint(point);\r\n\r\n\t\tvar x = point.x - this.x,\r\n\t\t y = point.y - this.y;\r\n\r\n\t\treturn Math.sqrt(x * x + y * y);\r\n\t},\r\n\r\n\t// @method equals(otherPoint: Point): Boolean\r\n\t// Returns `true` if the given point has the same coordinates.\r\n\tequals: function (point) {\r\n\t\tpoint = toPoint(point);\r\n\r\n\t\treturn point.x === this.x &&\r\n\t\t point.y === this.y;\r\n\t},\r\n\r\n\t// @method contains(otherPoint: Point): Boolean\r\n\t// Returns `true` if both coordinates of the given point are less than the corresponding current point coordinates (in absolute values).\r\n\tcontains: function (point) {\r\n\t\tpoint = toPoint(point);\r\n\r\n\t\treturn Math.abs(point.x) <= Math.abs(this.x) &&\r\n\t\t Math.abs(point.y) <= Math.abs(this.y);\r\n\t},\r\n\r\n\t// @method toString(): String\r\n\t// Returns a string representation of the point for debugging purposes.\r\n\ttoString: function () {\r\n\t\treturn 'Point(' +\r\n\t\t formatNum(this.x) + ', ' +\r\n\t\t formatNum(this.y) + ')';\r\n\t}\r\n};\r\n\r\n// @factory L.point(x: Number, y: Number, round?: Boolean)\r\n// Creates a Point object with the given `x` and `y` coordinates. If optional `round` is set to true, rounds the `x` and `y` values.\r\n\r\n// @alternative\r\n// @factory L.point(coords: Number[])\r\n// Expects an array of the form `[x, y]` instead.\r\n\r\n// @alternative\r\n// @factory L.point(coords: Object)\r\n// Expects a plain object of the form `{x: Number, y: Number}` instead.\r\nfunction toPoint(x, y, round) {\r\n\tif (x instanceof Point) {\r\n\t\treturn x;\r\n\t}\r\n\tif (isArray(x)) {\r\n\t\treturn new Point(x[0], x[1]);\r\n\t}\r\n\tif (x === undefined || x === null) {\r\n\t\treturn x;\r\n\t}\r\n\tif (typeof x === 'object' && 'x' in x && 'y' in x) {\r\n\t\treturn new Point(x.x, x.y);\r\n\t}\r\n\treturn new Point(x, y, round);\r\n}\n\n/*\r\n * @class Bounds\r\n * @aka L.Bounds\r\n *\r\n * Represents a rectangular area in pixel coordinates.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var p1 = L.point(10, 10),\r\n * p2 = L.point(40, 60),\r\n * bounds = L.bounds(p1, p2);\r\n * ```\r\n *\r\n * All Leaflet methods that accept `Bounds` objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this:\r\n *\r\n * ```js\r\n * otherBounds.intersects([[10, 10], [40, 60]]);\r\n * ```\r\n *\r\n * Note that `Bounds` does not inherit from Leafet's `Class` object,\r\n * which means new classes can't inherit from it, and new methods\r\n * can't be added to it with the `include` function.\r\n */\r\n\r\nfunction Bounds(a, b) {\r\n\tif (!a) { return; }\r\n\r\n\tvar points = b ? [a, b] : a;\r\n\r\n\tfor (var i = 0, len = points.length; i < len; i++) {\r\n\t\tthis.extend(points[i]);\r\n\t}\r\n}\r\n\r\nBounds.prototype = {\r\n\t// @method extend(point: Point): this\r\n\t// Extends the bounds to contain the given point.\r\n\textend: function (point) { // (Point)\r\n\t\tpoint = toPoint(point);\r\n\r\n\t\t// @property min: Point\r\n\t\t// The top left corner of the rectangle.\r\n\t\t// @property max: Point\r\n\t\t// The bottom right corner of the rectangle.\r\n\t\tif (!this.min && !this.max) {\r\n\t\t\tthis.min = point.clone();\r\n\t\t\tthis.max = point.clone();\r\n\t\t} else {\r\n\t\t\tthis.min.x = Math.min(point.x, this.min.x);\r\n\t\t\tthis.max.x = Math.max(point.x, this.max.x);\r\n\t\t\tthis.min.y = Math.min(point.y, this.min.y);\r\n\t\t\tthis.max.y = Math.max(point.y, this.max.y);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getCenter(round?: Boolean): Point\r\n\t// Returns the center point of the bounds.\r\n\tgetCenter: function (round) {\r\n\t\treturn new Point(\r\n\t\t (this.min.x + this.max.x) / 2,\r\n\t\t (this.min.y + this.max.y) / 2, round);\r\n\t},\r\n\r\n\t// @method getBottomLeft(): Point\r\n\t// Returns the bottom-left point of the bounds.\r\n\tgetBottomLeft: function () {\r\n\t\treturn new Point(this.min.x, this.max.y);\r\n\t},\r\n\r\n\t// @method getTopRight(): Point\r\n\t// Returns the top-right point of the bounds.\r\n\tgetTopRight: function () { // -> Point\r\n\t\treturn new Point(this.max.x, this.min.y);\r\n\t},\r\n\r\n\t// @method getTopLeft(): Point\r\n\t// Returns the top-left point of the bounds (i.e. [`this.min`](#bounds-min)).\r\n\tgetTopLeft: function () {\r\n\t\treturn this.min; // left, top\r\n\t},\r\n\r\n\t// @method getBottomRight(): Point\r\n\t// Returns the bottom-right point of the bounds (i.e. [`this.max`](#bounds-max)).\r\n\tgetBottomRight: function () {\r\n\t\treturn this.max; // right, bottom\r\n\t},\r\n\r\n\t// @method getSize(): Point\r\n\t// Returns the size of the given bounds\r\n\tgetSize: function () {\r\n\t\treturn this.max.subtract(this.min);\r\n\t},\r\n\r\n\t// @method contains(otherBounds: Bounds): Boolean\r\n\t// Returns `true` if the rectangle contains the given one.\r\n\t// @alternative\r\n\t// @method contains(point: Point): Boolean\r\n\t// Returns `true` if the rectangle contains the given point.\r\n\tcontains: function (obj) {\r\n\t\tvar min, max;\r\n\r\n\t\tif (typeof obj[0] === 'number' || obj instanceof Point) {\r\n\t\t\tobj = toPoint(obj);\r\n\t\t} else {\r\n\t\t\tobj = toBounds(obj);\r\n\t\t}\r\n\r\n\t\tif (obj instanceof Bounds) {\r\n\t\t\tmin = obj.min;\r\n\t\t\tmax = obj.max;\r\n\t\t} else {\r\n\t\t\tmin = max = obj;\r\n\t\t}\r\n\r\n\t\treturn (min.x >= this.min.x) &&\r\n\t\t (max.x <= this.max.x) &&\r\n\t\t (min.y >= this.min.y) &&\r\n\t\t (max.y <= this.max.y);\r\n\t},\r\n\r\n\t// @method intersects(otherBounds: Bounds): Boolean\r\n\t// Returns `true` if the rectangle intersects the given bounds. Two bounds\r\n\t// intersect if they have at least one point in common.\r\n\tintersects: function (bounds) { // (Bounds) -> Boolean\r\n\t\tbounds = toBounds(bounds);\r\n\r\n\t\tvar min = this.min,\r\n\t\t max = this.max,\r\n\t\t min2 = bounds.min,\r\n\t\t max2 = bounds.max,\r\n\t\t xIntersects = (max2.x >= min.x) && (min2.x <= max.x),\r\n\t\t yIntersects = (max2.y >= min.y) && (min2.y <= max.y);\r\n\r\n\t\treturn xIntersects && yIntersects;\r\n\t},\r\n\r\n\t// @method overlaps(otherBounds: Bounds): Boolean\r\n\t// Returns `true` if the rectangle overlaps the given bounds. Two bounds\r\n\t// overlap if their intersection is an area.\r\n\toverlaps: function (bounds) { // (Bounds) -> Boolean\r\n\t\tbounds = toBounds(bounds);\r\n\r\n\t\tvar min = this.min,\r\n\t\t max = this.max,\r\n\t\t min2 = bounds.min,\r\n\t\t max2 = bounds.max,\r\n\t\t xOverlaps = (max2.x > min.x) && (min2.x < max.x),\r\n\t\t yOverlaps = (max2.y > min.y) && (min2.y < max.y);\r\n\r\n\t\treturn xOverlaps && yOverlaps;\r\n\t},\r\n\r\n\tisValid: function () {\r\n\t\treturn !!(this.min && this.max);\r\n\t}\r\n};\r\n\r\n\r\n// @factory L.bounds(corner1: Point, corner2: Point)\r\n// Creates a Bounds object from two corners coordinate pairs.\r\n// @alternative\r\n// @factory L.bounds(points: Point[])\r\n// Creates a Bounds object from the given array of points.\r\nfunction toBounds(a, b) {\r\n\tif (!a || a instanceof Bounds) {\r\n\t\treturn a;\r\n\t}\r\n\treturn new Bounds(a, b);\r\n}\n\n/*\r\n * @class LatLngBounds\r\n * @aka L.LatLngBounds\r\n *\r\n * Represents a rectangular geographical area on a map.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var corner1 = L.latLng(40.712, -74.227),\r\n * corner2 = L.latLng(40.774, -74.125),\r\n * bounds = L.latLngBounds(corner1, corner2);\r\n * ```\r\n *\r\n * All Leaflet methods that accept LatLngBounds objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this:\r\n *\r\n * ```js\r\n * map.fitBounds([\r\n * \t[40.712, -74.227],\r\n * \t[40.774, -74.125]\r\n * ]);\r\n * ```\r\n *\r\n * Caution: if the area crosses the antimeridian (often confused with the International Date Line), you must specify corners _outside_ the [-180, 180] degrees longitude range.\r\n *\r\n * Note that `LatLngBounds` does not inherit from Leafet's `Class` object,\r\n * which means new classes can't inherit from it, and new methods\r\n * can't be added to it with the `include` function.\r\n */\r\n\r\nfunction LatLngBounds(corner1, corner2) { // (LatLng, LatLng) or (LatLng[])\r\n\tif (!corner1) { return; }\r\n\r\n\tvar latlngs = corner2 ? [corner1, corner2] : corner1;\r\n\r\n\tfor (var i = 0, len = latlngs.length; i < len; i++) {\r\n\t\tthis.extend(latlngs[i]);\r\n\t}\r\n}\r\n\r\nLatLngBounds.prototype = {\r\n\r\n\t// @method extend(latlng: LatLng): this\r\n\t// Extend the bounds to contain the given point\r\n\r\n\t// @alternative\r\n\t// @method extend(otherBounds: LatLngBounds): this\r\n\t// Extend the bounds to contain the given bounds\r\n\textend: function (obj) {\r\n\t\tvar sw = this._southWest,\r\n\t\t ne = this._northEast,\r\n\t\t sw2, ne2;\r\n\r\n\t\tif (obj instanceof LatLng) {\r\n\t\t\tsw2 = obj;\r\n\t\t\tne2 = obj;\r\n\r\n\t\t} else if (obj instanceof LatLngBounds) {\r\n\t\t\tsw2 = obj._southWest;\r\n\t\t\tne2 = obj._northEast;\r\n\r\n\t\t\tif (!sw2 || !ne2) { return this; }\r\n\r\n\t\t} else {\r\n\t\t\treturn obj ? this.extend(toLatLng(obj) || toLatLngBounds(obj)) : this;\r\n\t\t}\r\n\r\n\t\tif (!sw && !ne) {\r\n\t\t\tthis._southWest = new LatLng(sw2.lat, sw2.lng);\r\n\t\t\tthis._northEast = new LatLng(ne2.lat, ne2.lng);\r\n\t\t} else {\r\n\t\t\tsw.lat = Math.min(sw2.lat, sw.lat);\r\n\t\t\tsw.lng = Math.min(sw2.lng, sw.lng);\r\n\t\t\tne.lat = Math.max(ne2.lat, ne.lat);\r\n\t\t\tne.lng = Math.max(ne2.lng, ne.lng);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method pad(bufferRatio: Number): LatLngBounds\r\n\t// Returns bounds created by extending or retracting the current bounds by a given ratio in each direction.\r\n\t// For example, a ratio of 0.5 extends the bounds by 50% in each direction.\r\n\t// Negative values will retract the bounds.\r\n\tpad: function (bufferRatio) {\r\n\t\tvar sw = this._southWest,\r\n\t\t ne = this._northEast,\r\n\t\t heightBuffer = Math.abs(sw.lat - ne.lat) * bufferRatio,\r\n\t\t widthBuffer = Math.abs(sw.lng - ne.lng) * bufferRatio;\r\n\r\n\t\treturn new LatLngBounds(\r\n\t\t new LatLng(sw.lat - heightBuffer, sw.lng - widthBuffer),\r\n\t\t new LatLng(ne.lat + heightBuffer, ne.lng + widthBuffer));\r\n\t},\r\n\r\n\t// @method getCenter(): LatLng\r\n\t// Returns the center point of the bounds.\r\n\tgetCenter: function () {\r\n\t\treturn new LatLng(\r\n\t\t (this._southWest.lat + this._northEast.lat) / 2,\r\n\t\t (this._southWest.lng + this._northEast.lng) / 2);\r\n\t},\r\n\r\n\t// @method getSouthWest(): LatLng\r\n\t// Returns the south-west point of the bounds.\r\n\tgetSouthWest: function () {\r\n\t\treturn this._southWest;\r\n\t},\r\n\r\n\t// @method getNorthEast(): LatLng\r\n\t// Returns the north-east point of the bounds.\r\n\tgetNorthEast: function () {\r\n\t\treturn this._northEast;\r\n\t},\r\n\r\n\t// @method getNorthWest(): LatLng\r\n\t// Returns the north-west point of the bounds.\r\n\tgetNorthWest: function () {\r\n\t\treturn new LatLng(this.getNorth(), this.getWest());\r\n\t},\r\n\r\n\t// @method getSouthEast(): LatLng\r\n\t// Returns the south-east point of the bounds.\r\n\tgetSouthEast: function () {\r\n\t\treturn new LatLng(this.getSouth(), this.getEast());\r\n\t},\r\n\r\n\t// @method getWest(): Number\r\n\t// Returns the west longitude of the bounds\r\n\tgetWest: function () {\r\n\t\treturn this._southWest.lng;\r\n\t},\r\n\r\n\t// @method getSouth(): Number\r\n\t// Returns the south latitude of the bounds\r\n\tgetSouth: function () {\r\n\t\treturn this._southWest.lat;\r\n\t},\r\n\r\n\t// @method getEast(): Number\r\n\t// Returns the east longitude of the bounds\r\n\tgetEast: function () {\r\n\t\treturn this._northEast.lng;\r\n\t},\r\n\r\n\t// @method getNorth(): Number\r\n\t// Returns the north latitude of the bounds\r\n\tgetNorth: function () {\r\n\t\treturn this._northEast.lat;\r\n\t},\r\n\r\n\t// @method contains(otherBounds: LatLngBounds): Boolean\r\n\t// Returns `true` if the rectangle contains the given one.\r\n\r\n\t// @alternative\r\n\t// @method contains (latlng: LatLng): Boolean\r\n\t// Returns `true` if the rectangle contains the given point.\r\n\tcontains: function (obj) { // (LatLngBounds) or (LatLng) -> Boolean\r\n\t\tif (typeof obj[0] === 'number' || obj instanceof LatLng || 'lat' in obj) {\r\n\t\t\tobj = toLatLng(obj);\r\n\t\t} else {\r\n\t\t\tobj = toLatLngBounds(obj);\r\n\t\t}\r\n\r\n\t\tvar sw = this._southWest,\r\n\t\t ne = this._northEast,\r\n\t\t sw2, ne2;\r\n\r\n\t\tif (obj instanceof LatLngBounds) {\r\n\t\t\tsw2 = obj.getSouthWest();\r\n\t\t\tne2 = obj.getNorthEast();\r\n\t\t} else {\r\n\t\t\tsw2 = ne2 = obj;\r\n\t\t}\r\n\r\n\t\treturn (sw2.lat >= sw.lat) && (ne2.lat <= ne.lat) &&\r\n\t\t (sw2.lng >= sw.lng) && (ne2.lng <= ne.lng);\r\n\t},\r\n\r\n\t// @method intersects(otherBounds: LatLngBounds): Boolean\r\n\t// Returns `true` if the rectangle intersects the given bounds. Two bounds intersect if they have at least one point in common.\r\n\tintersects: function (bounds) {\r\n\t\tbounds = toLatLngBounds(bounds);\r\n\r\n\t\tvar sw = this._southWest,\r\n\t\t ne = this._northEast,\r\n\t\t sw2 = bounds.getSouthWest(),\r\n\t\t ne2 = bounds.getNorthEast(),\r\n\r\n\t\t latIntersects = (ne2.lat >= sw.lat) && (sw2.lat <= ne.lat),\r\n\t\t lngIntersects = (ne2.lng >= sw.lng) && (sw2.lng <= ne.lng);\r\n\r\n\t\treturn latIntersects && lngIntersects;\r\n\t},\r\n\r\n\t// @method overlaps(otherBounds: Bounds): Boolean\r\n\t// Returns `true` if the rectangle overlaps the given bounds. Two bounds overlap if their intersection is an area.\r\n\toverlaps: function (bounds) {\r\n\t\tbounds = toLatLngBounds(bounds);\r\n\r\n\t\tvar sw = this._southWest,\r\n\t\t ne = this._northEast,\r\n\t\t sw2 = bounds.getSouthWest(),\r\n\t\t ne2 = bounds.getNorthEast(),\r\n\r\n\t\t latOverlaps = (ne2.lat > sw.lat) && (sw2.lat < ne.lat),\r\n\t\t lngOverlaps = (ne2.lng > sw.lng) && (sw2.lng < ne.lng);\r\n\r\n\t\treturn latOverlaps && lngOverlaps;\r\n\t},\r\n\r\n\t// @method toBBoxString(): String\r\n\t// Returns a string with bounding box coordinates in a 'southwest_lng,southwest_lat,northeast_lng,northeast_lat' format. Useful for sending requests to web services that return geo data.\r\n\ttoBBoxString: function () {\r\n\t\treturn [this.getWest(), this.getSouth(), this.getEast(), this.getNorth()].join(',');\r\n\t},\r\n\r\n\t// @method equals(otherBounds: LatLngBounds, maxMargin?: Number): Boolean\r\n\t// Returns `true` if the rectangle is equivalent (within a small margin of error) to the given bounds. The margin of error can be overridden by setting `maxMargin` to a small number.\r\n\tequals: function (bounds, maxMargin) {\r\n\t\tif (!bounds) { return false; }\r\n\r\n\t\tbounds = toLatLngBounds(bounds);\r\n\r\n\t\treturn this._southWest.equals(bounds.getSouthWest(), maxMargin) &&\r\n\t\t this._northEast.equals(bounds.getNorthEast(), maxMargin);\r\n\t},\r\n\r\n\t// @method isValid(): Boolean\r\n\t// Returns `true` if the bounds are properly initialized.\r\n\tisValid: function () {\r\n\t\treturn !!(this._southWest && this._northEast);\r\n\t}\r\n};\r\n\r\n// TODO International date line?\r\n\r\n// @factory L.latLngBounds(corner1: LatLng, corner2: LatLng)\r\n// Creates a `LatLngBounds` object by defining two diagonally opposite corners of the rectangle.\r\n\r\n// @alternative\r\n// @factory L.latLngBounds(latlngs: LatLng[])\r\n// Creates a `LatLngBounds` object defined by the geographical points it contains. Very useful for zooming the map to fit a particular set of locations with [`fitBounds`](#map-fitbounds).\r\nfunction toLatLngBounds(a, b) {\r\n\tif (a instanceof LatLngBounds) {\r\n\t\treturn a;\r\n\t}\r\n\treturn new LatLngBounds(a, b);\r\n}\n\n/* @class LatLng\r\n * @aka L.LatLng\r\n *\r\n * Represents a geographical point with a certain latitude and longitude.\r\n *\r\n * @example\r\n *\r\n * ```\r\n * var latlng = L.latLng(50.5, 30.5);\r\n * ```\r\n *\r\n * All Leaflet methods that accept LatLng objects also accept them in a simple Array form and simple object form (unless noted otherwise), so these lines are equivalent:\r\n *\r\n * ```\r\n * map.panTo([50, 30]);\r\n * map.panTo({lon: 30, lat: 50});\r\n * map.panTo({lat: 50, lng: 30});\r\n * map.panTo(L.latLng(50, 30));\r\n * ```\r\n *\r\n * Note that `LatLng` does not inherit from Leaflet's `Class` object,\r\n * which means new classes can't inherit from it, and new methods\r\n * can't be added to it with the `include` function.\r\n */\r\n\r\nfunction LatLng(lat, lng, alt) {\r\n\tif (isNaN(lat) || isNaN(lng)) {\r\n\t\tthrow new Error('Invalid LatLng object: (' + lat + ', ' + lng + ')');\r\n\t}\r\n\r\n\t// @property lat: Number\r\n\t// Latitude in degrees\r\n\tthis.lat = +lat;\r\n\r\n\t// @property lng: Number\r\n\t// Longitude in degrees\r\n\tthis.lng = +lng;\r\n\r\n\t// @property alt: Number\r\n\t// Altitude in meters (optional)\r\n\tif (alt !== undefined) {\r\n\t\tthis.alt = +alt;\r\n\t}\r\n}\r\n\r\nLatLng.prototype = {\r\n\t// @method equals(otherLatLng: LatLng, maxMargin?: Number): Boolean\r\n\t// Returns `true` if the given `LatLng` point is at the same position (within a small margin of error). The margin of error can be overridden by setting `maxMargin` to a small number.\r\n\tequals: function (obj, maxMargin) {\r\n\t\tif (!obj) { return false; }\r\n\r\n\t\tobj = toLatLng(obj);\r\n\r\n\t\tvar margin = Math.max(\r\n\t\t Math.abs(this.lat - obj.lat),\r\n\t\t Math.abs(this.lng - obj.lng));\r\n\r\n\t\treturn margin <= (maxMargin === undefined ? 1.0E-9 : maxMargin);\r\n\t},\r\n\r\n\t// @method toString(): String\r\n\t// Returns a string representation of the point (for debugging purposes).\r\n\ttoString: function (precision) {\r\n\t\treturn 'LatLng(' +\r\n\t\t formatNum(this.lat, precision) + ', ' +\r\n\t\t formatNum(this.lng, precision) + ')';\r\n\t},\r\n\r\n\t// @method distanceTo(otherLatLng: LatLng): Number\r\n\t// Returns the distance (in meters) to the given `LatLng` calculated using the [Spherical Law of Cosines](https://en.wikipedia.org/wiki/Spherical_law_of_cosines).\r\n\tdistanceTo: function (other) {\r\n\t\treturn Earth.distance(this, toLatLng(other));\r\n\t},\r\n\r\n\t// @method wrap(): LatLng\r\n\t// Returns a new `LatLng` object with the longitude wrapped so it's always between -180 and +180 degrees.\r\n\twrap: function () {\r\n\t\treturn Earth.wrapLatLng(this);\r\n\t},\r\n\r\n\t// @method toBounds(sizeInMeters: Number): LatLngBounds\r\n\t// Returns a new `LatLngBounds` object in which each boundary is `sizeInMeters/2` meters apart from the `LatLng`.\r\n\ttoBounds: function (sizeInMeters) {\r\n\t\tvar latAccuracy = 180 * sizeInMeters / 40075017,\r\n\t\t lngAccuracy = latAccuracy / Math.cos((Math.PI / 180) * this.lat);\r\n\r\n\t\treturn toLatLngBounds(\r\n\t\t [this.lat - latAccuracy, this.lng - lngAccuracy],\r\n\t\t [this.lat + latAccuracy, this.lng + lngAccuracy]);\r\n\t},\r\n\r\n\tclone: function () {\r\n\t\treturn new LatLng(this.lat, this.lng, this.alt);\r\n\t}\r\n};\r\n\r\n\r\n\r\n// @factory L.latLng(latitude: Number, longitude: Number, altitude?: Number): LatLng\r\n// Creates an object representing a geographical point with the given latitude and longitude (and optionally altitude).\r\n\r\n// @alternative\r\n// @factory L.latLng(coords: Array): LatLng\r\n// Expects an array of the form `[Number, Number]` or `[Number, Number, Number]` instead.\r\n\r\n// @alternative\r\n// @factory L.latLng(coords: Object): LatLng\r\n// Expects an plain object of the form `{lat: Number, lng: Number}` or `{lat: Number, lng: Number, alt: Number}` instead.\r\n\r\nfunction toLatLng(a, b, c) {\r\n\tif (a instanceof LatLng) {\r\n\t\treturn a;\r\n\t}\r\n\tif (isArray(a) && typeof a[0] !== 'object') {\r\n\t\tif (a.length === 3) {\r\n\t\t\treturn new LatLng(a[0], a[1], a[2]);\r\n\t\t}\r\n\t\tif (a.length === 2) {\r\n\t\t\treturn new LatLng(a[0], a[1]);\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\tif (a === undefined || a === null) {\r\n\t\treturn a;\r\n\t}\r\n\tif (typeof a === 'object' && 'lat' in a) {\r\n\t\treturn new LatLng(a.lat, 'lng' in a ? a.lng : a.lon, a.alt);\r\n\t}\r\n\tif (b === undefined) {\r\n\t\treturn null;\r\n\t}\r\n\treturn new LatLng(a, b, c);\r\n}\n\n/*\r\n * @namespace CRS\r\n * @crs L.CRS.Base\r\n * Object that defines coordinate reference systems for projecting\r\n * geographical points into pixel (screen) coordinates and back (and to\r\n * coordinates in other units for [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services). See\r\n * [spatial reference system](http://en.wikipedia.org/wiki/Coordinate_reference_system).\r\n *\r\n * Leaflet defines the most usual CRSs by default. If you want to use a\r\n * CRS not defined by default, take a look at the\r\n * [Proj4Leaflet](https://github.com/kartena/Proj4Leaflet) plugin.\r\n *\r\n * Note that the CRS instances do not inherit from Leafet's `Class` object,\r\n * and can't be instantiated. Also, new classes can't inherit from them,\r\n * and methods can't be added to them with the `include` function.\r\n */\r\n\r\nvar CRS = {\r\n\t// @method latLngToPoint(latlng: LatLng, zoom: Number): Point\r\n\t// Projects geographical coordinates into pixel coordinates for a given zoom.\r\n\tlatLngToPoint: function (latlng, zoom) {\r\n\t\tvar projectedPoint = this.projection.project(latlng),\r\n\t\t scale = this.scale(zoom);\r\n\r\n\t\treturn this.transformation._transform(projectedPoint, scale);\r\n\t},\r\n\r\n\t// @method pointToLatLng(point: Point, zoom: Number): LatLng\r\n\t// The inverse of `latLngToPoint`. Projects pixel coordinates on a given\r\n\t// zoom into geographical coordinates.\r\n\tpointToLatLng: function (point, zoom) {\r\n\t\tvar scale = this.scale(zoom),\r\n\t\t untransformedPoint = this.transformation.untransform(point, scale);\r\n\r\n\t\treturn this.projection.unproject(untransformedPoint);\r\n\t},\r\n\r\n\t// @method project(latlng: LatLng): Point\r\n\t// Projects geographical coordinates into coordinates in units accepted for\r\n\t// this CRS (e.g. meters for EPSG:3857, for passing it to WMS services).\r\n\tproject: function (latlng) {\r\n\t\treturn this.projection.project(latlng);\r\n\t},\r\n\r\n\t// @method unproject(point: Point): LatLng\r\n\t// Given a projected coordinate returns the corresponding LatLng.\r\n\t// The inverse of `project`.\r\n\tunproject: function (point) {\r\n\t\treturn this.projection.unproject(point);\r\n\t},\r\n\r\n\t// @method scale(zoom: Number): Number\r\n\t// Returns the scale used when transforming projected coordinates into\r\n\t// pixel coordinates for a particular zoom. For example, it returns\r\n\t// `256 * 2^zoom` for Mercator-based CRS.\r\n\tscale: function (zoom) {\r\n\t\treturn 256 * Math.pow(2, zoom);\r\n\t},\r\n\r\n\t// @method zoom(scale: Number): Number\r\n\t// Inverse of `scale()`, returns the zoom level corresponding to a scale\r\n\t// factor of `scale`.\r\n\tzoom: function (scale) {\r\n\t\treturn Math.log(scale / 256) / Math.LN2;\r\n\t},\r\n\r\n\t// @method getProjectedBounds(zoom: Number): Bounds\r\n\t// Returns the projection's bounds scaled and transformed for the provided `zoom`.\r\n\tgetProjectedBounds: function (zoom) {\r\n\t\tif (this.infinite) { return null; }\r\n\r\n\t\tvar b = this.projection.bounds,\r\n\t\t s = this.scale(zoom),\r\n\t\t min = this.transformation.transform(b.min, s),\r\n\t\t max = this.transformation.transform(b.max, s);\r\n\r\n\t\treturn new Bounds(min, max);\r\n\t},\r\n\r\n\t// @method distance(latlng1: LatLng, latlng2: LatLng): Number\r\n\t// Returns the distance between two geographical coordinates.\r\n\r\n\t// @property code: String\r\n\t// Standard code name of the CRS passed into WMS services (e.g. `'EPSG:3857'`)\r\n\t//\r\n\t// @property wrapLng: Number[]\r\n\t// An array of two numbers defining whether the longitude (horizontal) coordinate\r\n\t// axis wraps around a given range and how. Defaults to `[-180, 180]` in most\r\n\t// geographical CRSs. If `undefined`, the longitude axis does not wrap around.\r\n\t//\r\n\t// @property wrapLat: Number[]\r\n\t// Like `wrapLng`, but for the latitude (vertical) axis.\r\n\r\n\t// wrapLng: [min, max],\r\n\t// wrapLat: [min, max],\r\n\r\n\t// @property infinite: Boolean\r\n\t// If true, the coordinate space will be unbounded (infinite in both axes)\r\n\tinfinite: false,\r\n\r\n\t// @method wrapLatLng(latlng: LatLng): LatLng\r\n\t// Returns a `LatLng` where lat and lng has been wrapped according to the\r\n\t// CRS's `wrapLat` and `wrapLng` properties, if they are outside the CRS's bounds.\r\n\twrapLatLng: function (latlng) {\r\n\t\tvar lng = this.wrapLng ? wrapNum(latlng.lng, this.wrapLng, true) : latlng.lng,\r\n\t\t lat = this.wrapLat ? wrapNum(latlng.lat, this.wrapLat, true) : latlng.lat,\r\n\t\t alt = latlng.alt;\r\n\r\n\t\treturn new LatLng(lat, lng, alt);\r\n\t},\r\n\r\n\t// @method wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds\r\n\t// Returns a `LatLngBounds` with the same size as the given one, ensuring\r\n\t// that its center is within the CRS's bounds.\r\n\t// Only accepts actual `L.LatLngBounds` instances, not arrays.\r\n\twrapLatLngBounds: function (bounds) {\r\n\t\tvar center = bounds.getCenter(),\r\n\t\t newCenter = this.wrapLatLng(center),\r\n\t\t latShift = center.lat - newCenter.lat,\r\n\t\t lngShift = center.lng - newCenter.lng;\r\n\r\n\t\tif (latShift === 0 && lngShift === 0) {\r\n\t\t\treturn bounds;\r\n\t\t}\r\n\r\n\t\tvar sw = bounds.getSouthWest(),\r\n\t\t ne = bounds.getNorthEast(),\r\n\t\t newSw = new LatLng(sw.lat - latShift, sw.lng - lngShift),\r\n\t\t newNe = new LatLng(ne.lat - latShift, ne.lng - lngShift);\r\n\r\n\t\treturn new LatLngBounds(newSw, newNe);\r\n\t}\r\n};\n\n/*\n * @namespace CRS\n * @crs L.CRS.Earth\n *\n * Serves as the base for CRS that are global such that they cover the earth.\n * Can only be used as the base for other CRS and cannot be used directly,\n * since it does not have a `code`, `projection` or `transformation`. `distance()` returns\n * meters.\n */\n\nvar Earth = extend({}, CRS, {\n\twrapLng: [-180, 180],\n\n\t// Mean Earth Radius, as recommended for use by\n\t// the International Union of Geodesy and Geophysics,\n\t// see http://rosettacode.org/wiki/Haversine_formula\n\tR: 6371000,\n\n\t// distance between two geographical points using spherical law of cosines approximation\n\tdistance: function (latlng1, latlng2) {\n\t\tvar rad = Math.PI / 180,\n\t\t lat1 = latlng1.lat * rad,\n\t\t lat2 = latlng2.lat * rad,\n\t\t sinDLat = Math.sin((latlng2.lat - latlng1.lat) * rad / 2),\n\t\t sinDLon = Math.sin((latlng2.lng - latlng1.lng) * rad / 2),\n\t\t a = sinDLat * sinDLat + Math.cos(lat1) * Math.cos(lat2) * sinDLon * sinDLon,\n\t\t c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\t\treturn this.R * c;\n\t}\n});\n\n/*\r\n * @namespace Projection\r\n * @projection L.Projection.SphericalMercator\r\n *\r\n * Spherical Mercator projection — the most common projection for online maps,\r\n * used by almost all free and commercial tile providers. Assumes that Earth is\r\n * a sphere. Used by the `EPSG:3857` CRS.\r\n */\r\n\r\nvar earthRadius = 6378137;\r\n\r\nvar SphericalMercator = {\r\n\r\n\tR: earthRadius,\r\n\tMAX_LATITUDE: 85.0511287798,\r\n\r\n\tproject: function (latlng) {\r\n\t\tvar d = Math.PI / 180,\r\n\t\t max = this.MAX_LATITUDE,\r\n\t\t lat = Math.max(Math.min(max, latlng.lat), -max),\r\n\t\t sin = Math.sin(lat * d);\r\n\r\n\t\treturn new Point(\r\n\t\t\tthis.R * latlng.lng * d,\r\n\t\t\tthis.R * Math.log((1 + sin) / (1 - sin)) / 2);\r\n\t},\r\n\r\n\tunproject: function (point) {\r\n\t\tvar d = 180 / Math.PI;\r\n\r\n\t\treturn new LatLng(\r\n\t\t\t(2 * Math.atan(Math.exp(point.y / this.R)) - (Math.PI / 2)) * d,\r\n\t\t\tpoint.x * d / this.R);\r\n\t},\r\n\r\n\tbounds: (function () {\r\n\t\tvar d = earthRadius * Math.PI;\r\n\t\treturn new Bounds([-d, -d], [d, d]);\r\n\t})()\r\n};\n\n/*\r\n * @class Transformation\r\n * @aka L.Transformation\r\n *\r\n * Represents an affine transformation: a set of coefficients `a`, `b`, `c`, `d`\r\n * for transforming a point of a form `(x, y)` into `(a*x + b, c*y + d)` and doing\r\n * the reverse. Used by Leaflet in its projections code.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var transformation = L.transformation(2, 5, -1, 10),\r\n * \tp = L.point(1, 2),\r\n * \tp2 = transformation.transform(p), // L.point(7, 8)\r\n * \tp3 = transformation.untransform(p2); // L.point(1, 2)\r\n * ```\r\n */\r\n\r\n\r\n// factory new L.Transformation(a: Number, b: Number, c: Number, d: Number)\r\n// Creates a `Transformation` object with the given coefficients.\r\nfunction Transformation(a, b, c, d) {\r\n\tif (isArray(a)) {\r\n\t\t// use array properties\r\n\t\tthis._a = a[0];\r\n\t\tthis._b = a[1];\r\n\t\tthis._c = a[2];\r\n\t\tthis._d = a[3];\r\n\t\treturn;\r\n\t}\r\n\tthis._a = a;\r\n\tthis._b = b;\r\n\tthis._c = c;\r\n\tthis._d = d;\r\n}\r\n\r\nTransformation.prototype = {\r\n\t// @method transform(point: Point, scale?: Number): Point\r\n\t// Returns a transformed point, optionally multiplied by the given scale.\r\n\t// Only accepts actual `L.Point` instances, not arrays.\r\n\ttransform: function (point, scale) { // (Point, Number) -> Point\r\n\t\treturn this._transform(point.clone(), scale);\r\n\t},\r\n\r\n\t// destructive transform (faster)\r\n\t_transform: function (point, scale) {\r\n\t\tscale = scale || 1;\r\n\t\tpoint.x = scale * (this._a * point.x + this._b);\r\n\t\tpoint.y = scale * (this._c * point.y + this._d);\r\n\t\treturn point;\r\n\t},\r\n\r\n\t// @method untransform(point: Point, scale?: Number): Point\r\n\t// Returns the reverse transformation of the given point, optionally divided\r\n\t// by the given scale. Only accepts actual `L.Point` instances, not arrays.\r\n\tuntransform: function (point, scale) {\r\n\t\tscale = scale || 1;\r\n\t\treturn new Point(\r\n\t\t (point.x / scale - this._b) / this._a,\r\n\t\t (point.y / scale - this._d) / this._c);\r\n\t}\r\n};\r\n\r\n// factory L.transformation(a: Number, b: Number, c: Number, d: Number)\r\n\r\n// @factory L.transformation(a: Number, b: Number, c: Number, d: Number)\r\n// Instantiates a Transformation object with the given coefficients.\r\n\r\n// @alternative\r\n// @factory L.transformation(coefficients: Array): Transformation\r\n// Expects an coefficients array of the form\r\n// `[a: Number, b: Number, c: Number, d: Number]`.\r\n\r\nfunction toTransformation(a, b, c, d) {\r\n\treturn new Transformation(a, b, c, d);\r\n}\n\n/*\r\n * @namespace CRS\r\n * @crs L.CRS.EPSG3857\r\n *\r\n * The most common CRS for online maps, used by almost all free and commercial\r\n * tile providers. Uses Spherical Mercator projection. Set in by default in\r\n * Map's `crs` option.\r\n */\r\n\r\nvar EPSG3857 = extend({}, Earth, {\r\n\tcode: 'EPSG:3857',\r\n\tprojection: SphericalMercator,\r\n\r\n\ttransformation: (function () {\r\n\t\tvar scale = 0.5 / (Math.PI * SphericalMercator.R);\r\n\t\treturn toTransformation(scale, 0.5, -scale, 0.5);\r\n\t}())\r\n});\r\n\r\nvar EPSG900913 = extend({}, EPSG3857, {\r\n\tcode: 'EPSG:900913'\r\n});\n\n// @namespace SVG; @section\n// There are several static functions which can be called without instantiating L.SVG:\n\n// @function create(name: String): SVGElement\n// Returns a instance of [SVGElement](https://developer.mozilla.org/docs/Web/API/SVGElement),\n// corresponding to the class name passed. For example, using 'line' will return\n// an instance of [SVGLineElement](https://developer.mozilla.org/docs/Web/API/SVGLineElement).\nfunction svgCreate(name) {\n\treturn document.createElementNS('http://www.w3.org/2000/svg', name);\n}\n\n// @function pointsToPath(rings: Point[], closed: Boolean): String\n// Generates a SVG path string for multiple rings, with each ring turning\n// into \"M..L..L..\" instructions\nfunction pointsToPath(rings, closed) {\n\tvar str = '',\n\ti, j, len, len2, points, p;\n\n\tfor (i = 0, len = rings.length; i < len; i++) {\n\t\tpoints = rings[i];\n\n\t\tfor (j = 0, len2 = points.length; j < len2; j++) {\n\t\t\tp = points[j];\n\t\t\tstr += (j ? 'L' : 'M') + p.x + ' ' + p.y;\n\t\t}\n\n\t\t// closes the ring for polygons; \"x\" is VML syntax\n\t\tstr += closed ? (svg ? 'z' : 'x') : '';\n\t}\n\n\t// SVG complains about empty path strings\n\treturn str || 'M0 0';\n}\n\n/*\r\n * @namespace Browser\r\n * @aka L.Browser\r\n *\r\n * A namespace with static properties for browser/feature detection used by Leaflet internally.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * if (L.Browser.ielt9) {\r\n * alert('Upgrade your browser, dude!');\r\n * }\r\n * ```\r\n */\r\n\r\nvar style$1 = document.documentElement.style;\r\n\r\n// @property ie: Boolean; `true` for all Internet Explorer versions (not Edge).\r\nvar ie = 'ActiveXObject' in window;\r\n\r\n// @property ielt9: Boolean; `true` for Internet Explorer versions less than 9.\r\nvar ielt9 = ie && !document.addEventListener;\r\n\r\n// @property edge: Boolean; `true` for the Edge web browser.\r\nvar edge = 'msLaunchUri' in navigator && !('documentMode' in document);\r\n\r\n// @property webkit: Boolean;\r\n// `true` for webkit-based browsers like Chrome and Safari (including mobile versions).\r\nvar webkit = userAgentContains('webkit');\r\n\r\n// @property android: Boolean\r\n// `true` for any browser running on an Android platform.\r\nvar android = userAgentContains('android');\r\n\r\n// @property android23: Boolean; `true` for browsers running on Android 2 or Android 3.\r\nvar android23 = userAgentContains('android 2') || userAgentContains('android 3');\r\n\r\n/* See https://stackoverflow.com/a/17961266 for details on detecting stock Android */\r\nvar webkitVer = parseInt(/WebKit\\/([0-9]+)|$/.exec(navigator.userAgent)[1], 10); // also matches AppleWebKit\r\n// @property androidStock: Boolean; `true` for the Android stock browser (i.e. not Chrome)\r\nvar androidStock = android && userAgentContains('Google') && webkitVer < 537 && !('AudioNode' in window);\r\n\r\n// @property opera: Boolean; `true` for the Opera browser\r\nvar opera = !!window.opera;\r\n\r\n// @property chrome: Boolean; `true` for the Chrome browser.\r\nvar chrome = userAgentContains('chrome');\r\n\r\n// @property gecko: Boolean; `true` for gecko-based browsers like Firefox.\r\nvar gecko = userAgentContains('gecko') && !webkit && !opera && !ie;\r\n\r\n// @property safari: Boolean; `true` for the Safari browser.\r\nvar safari = !chrome && userAgentContains('safari');\r\n\r\nvar phantom = userAgentContains('phantom');\r\n\r\n// @property opera12: Boolean\r\n// `true` for the Opera browser supporting CSS transforms (version 12 or later).\r\nvar opera12 = 'OTransition' in style$1;\r\n\r\n// @property win: Boolean; `true` when the browser is running in a Windows platform\r\nvar win = navigator.platform.indexOf('Win') === 0;\r\n\r\n// @property ie3d: Boolean; `true` for all Internet Explorer versions supporting CSS transforms.\r\nvar ie3d = ie && ('transition' in style$1);\r\n\r\n// @property webkit3d: Boolean; `true` for webkit-based browsers supporting CSS transforms.\r\nvar webkit3d = ('WebKitCSSMatrix' in window) && ('m11' in new window.WebKitCSSMatrix()) && !android23;\r\n\r\n// @property gecko3d: Boolean; `true` for gecko-based browsers supporting CSS transforms.\r\nvar gecko3d = 'MozPerspective' in style$1;\r\n\r\n// @property any3d: Boolean\r\n// `true` for all browsers supporting CSS transforms.\r\nvar any3d = !window.L_DISABLE_3D && (ie3d || webkit3d || gecko3d) && !opera12 && !phantom;\r\n\r\n// @property mobile: Boolean; `true` for all browsers running in a mobile device.\r\nvar mobile = typeof orientation !== 'undefined' || userAgentContains('mobile');\r\n\r\n// @property mobileWebkit: Boolean; `true` for all webkit-based browsers in a mobile device.\r\nvar mobileWebkit = mobile && webkit;\r\n\r\n// @property mobileWebkit3d: Boolean\r\n// `true` for all webkit-based browsers in a mobile device supporting CSS transforms.\r\nvar mobileWebkit3d = mobile && webkit3d;\r\n\r\n// @property msPointer: Boolean\r\n// `true` for browsers implementing the Microsoft touch events model (notably IE10).\r\nvar msPointer = !window.PointerEvent && window.MSPointerEvent;\r\n\r\n// @property pointer: Boolean\r\n// `true` for all browsers supporting [pointer events](https://msdn.microsoft.com/en-us/library/dn433244%28v=vs.85%29.aspx).\r\nvar pointer = !webkit && !!(window.PointerEvent || msPointer);\r\n\r\n// @property touch: Boolean\r\n// `true` for all browsers supporting [touch events](https://developer.mozilla.org/docs/Web/API/Touch_events).\r\n// This does not necessarily mean that the browser is running in a computer with\r\n// a touchscreen, it only means that the browser is capable of understanding\r\n// touch events.\r\nvar touch = !window.L_NO_TOUCH && (pointer || 'ontouchstart' in window ||\r\n\t\t(window.DocumentTouch && document instanceof window.DocumentTouch));\r\n\r\n// @property mobileOpera: Boolean; `true` for the Opera browser in a mobile device.\r\nvar mobileOpera = mobile && opera;\r\n\r\n// @property mobileGecko: Boolean\r\n// `true` for gecko-based browsers running in a mobile device.\r\nvar mobileGecko = mobile && gecko;\r\n\r\n// @property retina: Boolean\r\n// `true` for browsers on a high-resolution \"retina\" screen or on any screen when browser's display zoom is more than 100%.\r\nvar retina = (window.devicePixelRatio || (window.screen.deviceXDPI / window.screen.logicalXDPI)) > 1;\r\n\r\n// @property passiveEvents: Boolean\r\n// `true` for browsers that support passive events.\r\nvar passiveEvents = (function () {\r\n\tvar supportsPassiveOption = false;\r\n\ttry {\r\n\t\tvar opts = Object.defineProperty({}, 'passive', {\r\n\t\t\tget: function () {\r\n\t\t\t\tsupportsPassiveOption = true;\r\n\t\t\t}\r\n\t\t});\r\n\t\twindow.addEventListener('testPassiveEventSupport', falseFn, opts);\r\n\t\twindow.removeEventListener('testPassiveEventSupport', falseFn, opts);\r\n\t} catch (e) {\r\n\t\t// Errors can safely be ignored since this is only a browser support test.\r\n\t}\r\n\treturn supportsPassiveOption;\r\n});\r\n\r\n// @property canvas: Boolean\r\n// `true` when the browser supports [``](https://developer.mozilla.org/docs/Web/API/Canvas_API).\r\nvar canvas = (function () {\r\n\treturn !!document.createElement('canvas').getContext;\r\n}());\r\n\r\n// @property svg: Boolean\r\n// `true` when the browser supports [SVG](https://developer.mozilla.org/docs/Web/SVG).\r\nvar svg = !!(document.createElementNS && svgCreate('svg').createSVGRect);\r\n\r\n// @property vml: Boolean\r\n// `true` if the browser supports [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language).\r\nvar vml = !svg && (function () {\r\n\ttry {\r\n\t\tvar div = document.createElement('div');\r\n\t\tdiv.innerHTML = '';\r\n\r\n\t\tvar shape = div.firstChild;\r\n\t\tshape.style.behavior = 'url(#default#VML)';\r\n\r\n\t\treturn shape && (typeof shape.adj === 'object');\r\n\r\n\t} catch (e) {\r\n\t\treturn false;\r\n\t}\r\n}());\r\n\r\n\r\nfunction userAgentContains(str) {\r\n\treturn navigator.userAgent.toLowerCase().indexOf(str) >= 0;\r\n}\r\n\n\nvar Browser = (Object.freeze || Object)({\n\tie: ie,\n\tielt9: ielt9,\n\tedge: edge,\n\twebkit: webkit,\n\tandroid: android,\n\tandroid23: android23,\n\tandroidStock: androidStock,\n\topera: opera,\n\tchrome: chrome,\n\tgecko: gecko,\n\tsafari: safari,\n\tphantom: phantom,\n\topera12: opera12,\n\twin: win,\n\tie3d: ie3d,\n\twebkit3d: webkit3d,\n\tgecko3d: gecko3d,\n\tany3d: any3d,\n\tmobile: mobile,\n\tmobileWebkit: mobileWebkit,\n\tmobileWebkit3d: mobileWebkit3d,\n\tmsPointer: msPointer,\n\tpointer: pointer,\n\ttouch: touch,\n\tmobileOpera: mobileOpera,\n\tmobileGecko: mobileGecko,\n\tretina: retina,\n\tpassiveEvents: passiveEvents,\n\tcanvas: canvas,\n\tsvg: svg,\n\tvml: vml\n});\n\n/*\n * Extends L.DomEvent to provide touch support for Internet Explorer and Windows-based devices.\n */\n\n\nvar POINTER_DOWN = msPointer ? 'MSPointerDown' : 'pointerdown';\nvar POINTER_MOVE = msPointer ? 'MSPointerMove' : 'pointermove';\nvar POINTER_UP = msPointer ? 'MSPointerUp' : 'pointerup';\nvar POINTER_CANCEL = msPointer ? 'MSPointerCancel' : 'pointercancel';\nvar TAG_WHITE_LIST = ['INPUT', 'SELECT', 'OPTION'];\n\nvar _pointers = {};\nvar _pointerDocListener = false;\n\n// DomEvent.DoubleTap needs to know about this\nvar _pointersCount = 0;\n\n// Provides a touch events wrapper for (ms)pointer events.\n// ref http://www.w3.org/TR/pointerevents/ https://www.w3.org/Bugs/Public/show_bug.cgi?id=22890\n\nfunction addPointerListener(obj, type, handler, id) {\n\tif (type === 'touchstart') {\n\t\t_addPointerStart(obj, handler, id);\n\n\t} else if (type === 'touchmove') {\n\t\t_addPointerMove(obj, handler, id);\n\n\t} else if (type === 'touchend') {\n\t\t_addPointerEnd(obj, handler, id);\n\t}\n\n\treturn this;\n}\n\nfunction removePointerListener(obj, type, id) {\n\tvar handler = obj['_leaflet_' + type + id];\n\n\tif (type === 'touchstart') {\n\t\tobj.removeEventListener(POINTER_DOWN, handler, false);\n\n\t} else if (type === 'touchmove') {\n\t\tobj.removeEventListener(POINTER_MOVE, handler, false);\n\n\t} else if (type === 'touchend') {\n\t\tobj.removeEventListener(POINTER_UP, handler, false);\n\t\tobj.removeEventListener(POINTER_CANCEL, handler, false);\n\t}\n\n\treturn this;\n}\n\nfunction _addPointerStart(obj, handler, id) {\n\tvar onDown = bind(function (e) {\n\t\tif (e.pointerType !== 'mouse' && e.MSPOINTER_TYPE_MOUSE && e.pointerType !== e.MSPOINTER_TYPE_MOUSE) {\n\t\t\t// In IE11, some touch events needs to fire for form controls, or\n\t\t\t// the controls will stop working. We keep a whitelist of tag names that\n\t\t\t// need these events. For other target tags, we prevent default on the event.\n\t\t\tif (TAG_WHITE_LIST.indexOf(e.target.tagName) < 0) {\n\t\t\t\tpreventDefault(e);\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t_handlePointer(e, handler);\n\t});\n\n\tobj['_leaflet_touchstart' + id] = onDown;\n\tobj.addEventListener(POINTER_DOWN, onDown, false);\n\n\t// need to keep track of what pointers and how many are active to provide e.touches emulation\n\tif (!_pointerDocListener) {\n\t\t// we listen documentElement as any drags that end by moving the touch off the screen get fired there\n\t\tdocument.documentElement.addEventListener(POINTER_DOWN, _globalPointerDown, true);\n\t\tdocument.documentElement.addEventListener(POINTER_MOVE, _globalPointerMove, true);\n\t\tdocument.documentElement.addEventListener(POINTER_UP, _globalPointerUp, true);\n\t\tdocument.documentElement.addEventListener(POINTER_CANCEL, _globalPointerUp, true);\n\n\t\t_pointerDocListener = true;\n\t}\n}\n\nfunction _globalPointerDown(e) {\n\t_pointers[e.pointerId] = e;\n\t_pointersCount++;\n}\n\nfunction _globalPointerMove(e) {\n\tif (_pointers[e.pointerId]) {\n\t\t_pointers[e.pointerId] = e;\n\t}\n}\n\nfunction _globalPointerUp(e) {\n\tdelete _pointers[e.pointerId];\n\t_pointersCount--;\n}\n\nfunction _handlePointer(e, handler) {\n\te.touches = [];\n\tfor (var i in _pointers) {\n\t\te.touches.push(_pointers[i]);\n\t}\n\te.changedTouches = [e];\n\n\thandler(e);\n}\n\nfunction _addPointerMove(obj, handler, id) {\n\tvar onMove = function (e) {\n\t\t// don't fire touch moves when mouse isn't down\n\t\tif ((e.pointerType === e.MSPOINTER_TYPE_MOUSE || e.pointerType === 'mouse') && e.buttons === 0) { return; }\n\n\t\t_handlePointer(e, handler);\n\t};\n\n\tobj['_leaflet_touchmove' + id] = onMove;\n\tobj.addEventListener(POINTER_MOVE, onMove, false);\n}\n\nfunction _addPointerEnd(obj, handler, id) {\n\tvar onUp = function (e) {\n\t\t_handlePointer(e, handler);\n\t};\n\n\tobj['_leaflet_touchend' + id] = onUp;\n\tobj.addEventListener(POINTER_UP, onUp, false);\n\tobj.addEventListener(POINTER_CANCEL, onUp, false);\n}\n\n/*\r\n * Extends the event handling code with double tap support for mobile browsers.\r\n */\r\n\r\nvar _touchstart = msPointer ? 'MSPointerDown' : pointer ? 'pointerdown' : 'touchstart';\r\nvar _touchend = msPointer ? 'MSPointerUp' : pointer ? 'pointerup' : 'touchend';\r\nvar _pre = '_leaflet_';\r\n\r\n// inspired by Zepto touch code by Thomas Fuchs\r\nfunction addDoubleTapListener(obj, handler, id) {\r\n\tvar last, touch$$1,\r\n\t doubleTap = false,\r\n\t delay = 250;\r\n\r\n\tfunction onTouchStart(e) {\r\n\t\tvar count;\r\n\r\n\t\tif (pointer) {\r\n\t\t\tif ((!edge) || e.pointerType === 'mouse') { return; }\r\n\t\t\tcount = _pointersCount;\r\n\t\t} else {\r\n\t\t\tcount = e.touches.length;\r\n\t\t}\r\n\r\n\t\tif (count > 1) { return; }\r\n\r\n\t\tvar now = Date.now(),\r\n\t\t delta = now - (last || now);\r\n\r\n\t\ttouch$$1 = e.touches ? e.touches[0] : e;\r\n\t\tdoubleTap = (delta > 0 && delta <= delay);\r\n\t\tlast = now;\r\n\t}\r\n\r\n\tfunction onTouchEnd(e) {\r\n\t\tif (doubleTap && !touch$$1.cancelBubble) {\r\n\t\t\tif (pointer) {\r\n\t\t\t\tif ((!edge) || e.pointerType === 'mouse') { return; }\r\n\t\t\t\t// work around .type being readonly with MSPointer* events\r\n\t\t\t\tvar newTouch = {},\r\n\t\t\t\t prop, i;\r\n\r\n\t\t\t\tfor (i in touch$$1) {\r\n\t\t\t\t\tprop = touch$$1[i];\r\n\t\t\t\t\tnewTouch[i] = prop && prop.bind ? prop.bind(touch$$1) : prop;\r\n\t\t\t\t}\r\n\t\t\t\ttouch$$1 = newTouch;\r\n\t\t\t}\r\n\t\t\ttouch$$1.type = 'dblclick';\r\n\t\t\ttouch$$1.button = 0;\r\n\t\t\thandler(touch$$1);\r\n\t\t\tlast = null;\r\n\t\t}\r\n\t}\r\n\r\n\tobj[_pre + _touchstart + id] = onTouchStart;\r\n\tobj[_pre + _touchend + id] = onTouchEnd;\r\n\tobj[_pre + 'dblclick' + id] = handler;\r\n\r\n\tobj.addEventListener(_touchstart, onTouchStart, passiveEvents ? {passive: false} : false);\r\n\tobj.addEventListener(_touchend, onTouchEnd, passiveEvents ? {passive: false} : false);\r\n\r\n\t// On some platforms (notably, chrome<55 on win10 + touchscreen + mouse),\r\n\t// the browser doesn't fire touchend/pointerup events but does fire\r\n\t// native dblclicks. See #4127.\r\n\t// Edge 14 also fires native dblclicks, but only for pointerType mouse, see #5180.\r\n\tobj.addEventListener('dblclick', handler, false);\r\n\r\n\treturn this;\r\n}\r\n\r\nfunction removeDoubleTapListener(obj, id) {\r\n\tvar touchstart = obj[_pre + _touchstart + id],\r\n\t touchend = obj[_pre + _touchend + id],\r\n\t dblclick = obj[_pre + 'dblclick' + id];\r\n\r\n\tobj.removeEventListener(_touchstart, touchstart, passiveEvents ? {passive: false} : false);\r\n\tobj.removeEventListener(_touchend, touchend, passiveEvents ? {passive: false} : false);\r\n\tif (!edge) {\r\n\t\tobj.removeEventListener('dblclick', dblclick, false);\r\n\t}\r\n\r\n\treturn this;\r\n}\n\n/*\r\n * @namespace DomUtil\r\n *\r\n * Utility functions to work with the [DOM](https://developer.mozilla.org/docs/Web/API/Document_Object_Model)\r\n * tree, used by Leaflet internally.\r\n *\r\n * Most functions expecting or returning a `HTMLElement` also work for\r\n * SVG elements. The only difference is that classes refer to CSS classes\r\n * in HTML and SVG classes in SVG.\r\n */\r\n\r\n\r\n// @property TRANSFORM: String\r\n// Vendor-prefixed transform style name (e.g. `'webkitTransform'` for WebKit).\r\nvar TRANSFORM = testProp(\r\n\t['transform', 'webkitTransform', 'OTransform', 'MozTransform', 'msTransform']);\r\n\r\n// webkitTransition comes first because some browser versions that drop vendor prefix don't do\r\n// the same for the transitionend event, in particular the Android 4.1 stock browser\r\n\r\n// @property TRANSITION: String\r\n// Vendor-prefixed transition style name.\r\nvar TRANSITION = testProp(\r\n\t['webkitTransition', 'transition', 'OTransition', 'MozTransition', 'msTransition']);\r\n\r\n// @property TRANSITION_END: String\r\n// Vendor-prefixed transitionend event name.\r\nvar TRANSITION_END =\r\n\tTRANSITION === 'webkitTransition' || TRANSITION === 'OTransition' ? TRANSITION + 'End' : 'transitionend';\r\n\r\n\r\n// @function get(id: String|HTMLElement): HTMLElement\r\n// Returns an element given its DOM id, or returns the element itself\r\n// if it was passed directly.\r\nfunction get(id) {\r\n\treturn typeof id === 'string' ? document.getElementById(id) : id;\r\n}\r\n\r\n// @function getStyle(el: HTMLElement, styleAttrib: String): String\r\n// Returns the value for a certain style attribute on an element,\r\n// including computed values or values set through CSS.\r\nfunction getStyle(el, style) {\r\n\tvar value = el.style[style] || (el.currentStyle && el.currentStyle[style]);\r\n\r\n\tif ((!value || value === 'auto') && document.defaultView) {\r\n\t\tvar css = document.defaultView.getComputedStyle(el, null);\r\n\t\tvalue = css ? css[style] : null;\r\n\t}\r\n\treturn value === 'auto' ? null : value;\r\n}\r\n\r\n// @function create(tagName: String, className?: String, container?: HTMLElement): HTMLElement\r\n// Creates an HTML element with `tagName`, sets its class to `className`, and optionally appends it to `container` element.\r\nfunction create$1(tagName, className, container) {\r\n\tvar el = document.createElement(tagName);\r\n\tel.className = className || '';\r\n\r\n\tif (container) {\r\n\t\tcontainer.appendChild(el);\r\n\t}\r\n\treturn el;\r\n}\r\n\r\n// @function remove(el: HTMLElement)\r\n// Removes `el` from its parent element\r\nfunction remove(el) {\r\n\tvar parent = el.parentNode;\r\n\tif (parent) {\r\n\t\tparent.removeChild(el);\r\n\t}\r\n}\r\n\r\n// @function empty(el: HTMLElement)\r\n// Removes all of `el`'s children elements from `el`\r\nfunction empty(el) {\r\n\twhile (el.firstChild) {\r\n\t\tel.removeChild(el.firstChild);\r\n\t}\r\n}\r\n\r\n// @function toFront(el: HTMLElement)\r\n// Makes `el` the last child of its parent, so it renders in front of the other children.\r\nfunction toFront(el) {\r\n\tvar parent = el.parentNode;\r\n\tif (parent && parent.lastChild !== el) {\r\n\t\tparent.appendChild(el);\r\n\t}\r\n}\r\n\r\n// @function toBack(el: HTMLElement)\r\n// Makes `el` the first child of its parent, so it renders behind the other children.\r\nfunction toBack(el) {\r\n\tvar parent = el.parentNode;\r\n\tif (parent && parent.firstChild !== el) {\r\n\t\tparent.insertBefore(el, parent.firstChild);\r\n\t}\r\n}\r\n\r\n// @function hasClass(el: HTMLElement, name: String): Boolean\r\n// Returns `true` if the element's class attribute contains `name`.\r\nfunction hasClass(el, name) {\r\n\tif (el.classList !== undefined) {\r\n\t\treturn el.classList.contains(name);\r\n\t}\r\n\tvar className = getClass(el);\r\n\treturn className.length > 0 && new RegExp('(^|\\\\s)' + name + '(\\\\s|$)').test(className);\r\n}\r\n\r\n// @function addClass(el: HTMLElement, name: String)\r\n// Adds `name` to the element's class attribute.\r\nfunction addClass(el, name) {\r\n\tif (el.classList !== undefined) {\r\n\t\tvar classes = splitWords(name);\r\n\t\tfor (var i = 0, len = classes.length; i < len; i++) {\r\n\t\t\tel.classList.add(classes[i]);\r\n\t\t}\r\n\t} else if (!hasClass(el, name)) {\r\n\t\tvar className = getClass(el);\r\n\t\tsetClass(el, (className ? className + ' ' : '') + name);\r\n\t}\r\n}\r\n\r\n// @function removeClass(el: HTMLElement, name: String)\r\n// Removes `name` from the element's class attribute.\r\nfunction removeClass(el, name) {\r\n\tif (el.classList !== undefined) {\r\n\t\tel.classList.remove(name);\r\n\t} else {\r\n\t\tsetClass(el, trim((' ' + getClass(el) + ' ').replace(' ' + name + ' ', ' ')));\r\n\t}\r\n}\r\n\r\n// @function setClass(el: HTMLElement, name: String)\r\n// Sets the element's class.\r\nfunction setClass(el, name) {\r\n\tif (el.className.baseVal === undefined) {\r\n\t\tel.className = name;\r\n\t} else {\r\n\t\t// in case of SVG element\r\n\t\tel.className.baseVal = name;\r\n\t}\r\n}\r\n\r\n// @function getClass(el: HTMLElement): String\r\n// Returns the element's class.\r\nfunction getClass(el) {\r\n\t// Check if the element is an SVGElementInstance and use the correspondingElement instead\r\n\t// (Required for linked SVG elements in IE11.)\r\n\tif (el.correspondingElement) {\r\n\t\tel = el.correspondingElement;\r\n\t}\r\n\treturn el.className.baseVal === undefined ? el.className : el.className.baseVal;\r\n}\r\n\r\n// @function setOpacity(el: HTMLElement, opacity: Number)\r\n// Set the opacity of an element (including old IE support).\r\n// `opacity` must be a number from `0` to `1`.\r\nfunction setOpacity(el, value) {\r\n\tif ('opacity' in el.style) {\r\n\t\tel.style.opacity = value;\r\n\t} else if ('filter' in el.style) {\r\n\t\t_setOpacityIE(el, value);\r\n\t}\r\n}\r\n\r\nfunction _setOpacityIE(el, value) {\r\n\tvar filter = false,\r\n\t filterName = 'DXImageTransform.Microsoft.Alpha';\r\n\r\n\t// filters collection throws an error if we try to retrieve a filter that doesn't exist\r\n\ttry {\r\n\t\tfilter = el.filters.item(filterName);\r\n\t} catch (e) {\r\n\t\t// don't set opacity to 1 if we haven't already set an opacity,\r\n\t\t// it isn't needed and breaks transparent pngs.\r\n\t\tif (value === 1) { return; }\r\n\t}\r\n\r\n\tvalue = Math.round(value * 100);\r\n\r\n\tif (filter) {\r\n\t\tfilter.Enabled = (value !== 100);\r\n\t\tfilter.Opacity = value;\r\n\t} else {\r\n\t\tel.style.filter += ' progid:' + filterName + '(opacity=' + value + ')';\r\n\t}\r\n}\r\n\r\n// @function testProp(props: String[]): String|false\r\n// Goes through the array of style names and returns the first name\r\n// that is a valid style name for an element. If no such name is found,\r\n// it returns false. Useful for vendor-prefixed styles like `transform`.\r\nfunction testProp(props) {\r\n\tvar style = document.documentElement.style;\r\n\r\n\tfor (var i = 0; i < props.length; i++) {\r\n\t\tif (props[i] in style) {\r\n\t\t\treturn props[i];\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}\r\n\r\n// @function setTransform(el: HTMLElement, offset: Point, scale?: Number)\r\n// Resets the 3D CSS transform of `el` so it is translated by `offset` pixels\r\n// and optionally scaled by `scale`. Does not have an effect if the\r\n// browser doesn't support 3D CSS transforms.\r\nfunction setTransform(el, offset, scale) {\r\n\tvar pos = offset || new Point(0, 0);\r\n\r\n\tel.style[TRANSFORM] =\r\n\t\t(ie3d ?\r\n\t\t\t'translate(' + pos.x + 'px,' + pos.y + 'px)' :\r\n\t\t\t'translate3d(' + pos.x + 'px,' + pos.y + 'px,0)') +\r\n\t\t(scale ? ' scale(' + scale + ')' : '');\r\n}\r\n\r\n// @function setPosition(el: HTMLElement, position: Point)\r\n// Sets the position of `el` to coordinates specified by `position`,\r\n// using CSS translate or top/left positioning depending on the browser\r\n// (used by Leaflet internally to position its layers).\r\nfunction setPosition(el, point) {\r\n\r\n\t/*eslint-disable */\r\n\tel._leaflet_pos = point;\r\n\t/* eslint-enable */\r\n\r\n\tif (any3d) {\r\n\t\tsetTransform(el, point);\r\n\t} else {\r\n\t\tel.style.left = point.x + 'px';\r\n\t\tel.style.top = point.y + 'px';\r\n\t}\r\n}\r\n\r\n// @function getPosition(el: HTMLElement): Point\r\n// Returns the coordinates of an element previously positioned with setPosition.\r\nfunction getPosition(el) {\r\n\t// this method is only used for elements previously positioned using setPosition,\r\n\t// so it's safe to cache the position for performance\r\n\r\n\treturn el._leaflet_pos || new Point(0, 0);\r\n}\r\n\r\n// @function disableTextSelection()\r\n// Prevents the user from generating `selectstart` DOM events, usually generated\r\n// when the user drags the mouse through a page with text. Used internally\r\n// by Leaflet to override the behaviour of any click-and-drag interaction on\r\n// the map. Affects drag interactions on the whole document.\r\n\r\n// @function enableTextSelection()\r\n// Cancels the effects of a previous [`L.DomUtil.disableTextSelection`](#domutil-disabletextselection).\r\nvar disableTextSelection;\r\nvar enableTextSelection;\r\nvar _userSelect;\r\nif ('onselectstart' in document) {\r\n\tdisableTextSelection = function () {\r\n\t\ton(window, 'selectstart', preventDefault);\r\n\t};\r\n\tenableTextSelection = function () {\r\n\t\toff(window, 'selectstart', preventDefault);\r\n\t};\r\n} else {\r\n\tvar userSelectProperty = testProp(\r\n\t\t['userSelect', 'WebkitUserSelect', 'OUserSelect', 'MozUserSelect', 'msUserSelect']);\r\n\r\n\tdisableTextSelection = function () {\r\n\t\tif (userSelectProperty) {\r\n\t\t\tvar style = document.documentElement.style;\r\n\t\t\t_userSelect = style[userSelectProperty];\r\n\t\t\tstyle[userSelectProperty] = 'none';\r\n\t\t}\r\n\t};\r\n\tenableTextSelection = function () {\r\n\t\tif (userSelectProperty) {\r\n\t\t\tdocument.documentElement.style[userSelectProperty] = _userSelect;\r\n\t\t\t_userSelect = undefined;\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// @function disableImageDrag()\r\n// As [`L.DomUtil.disableTextSelection`](#domutil-disabletextselection), but\r\n// for `dragstart` DOM events, usually generated when the user drags an image.\r\nfunction disableImageDrag() {\r\n\ton(window, 'dragstart', preventDefault);\r\n}\r\n\r\n// @function enableImageDrag()\r\n// Cancels the effects of a previous [`L.DomUtil.disableImageDrag`](#domutil-disabletextselection).\r\nfunction enableImageDrag() {\r\n\toff(window, 'dragstart', preventDefault);\r\n}\r\n\r\nvar _outlineElement;\nvar _outlineStyle;\r\n// @function preventOutline(el: HTMLElement)\r\n// Makes the [outline](https://developer.mozilla.org/docs/Web/CSS/outline)\r\n// of the element `el` invisible. Used internally by Leaflet to prevent\r\n// focusable elements from displaying an outline when the user performs a\r\n// drag interaction on them.\r\nfunction preventOutline(element) {\r\n\twhile (element.tabIndex === -1) {\r\n\t\telement = element.parentNode;\r\n\t}\r\n\tif (!element.style) { return; }\r\n\trestoreOutline();\r\n\t_outlineElement = element;\r\n\t_outlineStyle = element.style.outline;\r\n\telement.style.outline = 'none';\r\n\ton(window, 'keydown', restoreOutline);\r\n}\r\n\r\n// @function restoreOutline()\r\n// Cancels the effects of a previous [`L.DomUtil.preventOutline`]().\r\nfunction restoreOutline() {\r\n\tif (!_outlineElement) { return; }\r\n\t_outlineElement.style.outline = _outlineStyle;\r\n\t_outlineElement = undefined;\r\n\t_outlineStyle = undefined;\r\n\toff(window, 'keydown', restoreOutline);\r\n}\r\n\r\n// @function getSizedParentNode(el: HTMLElement): HTMLElement\r\n// Finds the closest parent node which size (width and height) is not null.\r\nfunction getSizedParentNode(element) {\r\n\tdo {\r\n\t\telement = element.parentNode;\r\n\t} while ((!element.offsetWidth || !element.offsetHeight) && element !== document.body);\r\n\treturn element;\r\n}\r\n\r\n// @function getScale(el: HTMLElement): Object\r\n// Computes the CSS scale currently applied on the element.\r\n// Returns an object with `x` and `y` members as horizontal and vertical scales respectively,\r\n// and `boundingClientRect` as the result of [`getBoundingClientRect()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect).\r\nfunction getScale(element) {\r\n\tvar rect = element.getBoundingClientRect(); // Read-only in old browsers.\r\n\r\n\treturn {\r\n\t\tx: rect.width / element.offsetWidth || 1,\r\n\t\ty: rect.height / element.offsetHeight || 1,\r\n\t\tboundingClientRect: rect\r\n\t};\r\n}\r\n\n\nvar DomUtil = (Object.freeze || Object)({\n\tTRANSFORM: TRANSFORM,\n\tTRANSITION: TRANSITION,\n\tTRANSITION_END: TRANSITION_END,\n\tget: get,\n\tgetStyle: getStyle,\n\tcreate: create$1,\n\tremove: remove,\n\tempty: empty,\n\ttoFront: toFront,\n\ttoBack: toBack,\n\thasClass: hasClass,\n\taddClass: addClass,\n\tremoveClass: removeClass,\n\tsetClass: setClass,\n\tgetClass: getClass,\n\tsetOpacity: setOpacity,\n\ttestProp: testProp,\n\tsetTransform: setTransform,\n\tsetPosition: setPosition,\n\tgetPosition: getPosition,\n\tdisableTextSelection: disableTextSelection,\n\tenableTextSelection: enableTextSelection,\n\tdisableImageDrag: disableImageDrag,\n\tenableImageDrag: enableImageDrag,\n\tpreventOutline: preventOutline,\n\trestoreOutline: restoreOutline,\n\tgetSizedParentNode: getSizedParentNode,\n\tgetScale: getScale\n});\n\n/*\r\n * @namespace DomEvent\r\n * Utility functions to work with the [DOM events](https://developer.mozilla.org/docs/Web/API/Event), used by Leaflet internally.\r\n */\r\n\r\n// Inspired by John Resig, Dean Edwards and YUI addEvent implementations.\r\n\r\n// @function on(el: HTMLElement, types: String, fn: Function, context?: Object): this\r\n// Adds a listener function (`fn`) to a particular DOM event type of the\r\n// element `el`. You can optionally specify the context of the listener\r\n// (object the `this` keyword will point to). You can also pass several\r\n// space-separated types (e.g. `'click dblclick'`).\r\n\r\n// @alternative\r\n// @function on(el: HTMLElement, eventMap: Object, context?: Object): this\r\n// Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`\r\nfunction on(obj, types, fn, context) {\r\n\r\n\tif (typeof types === 'object') {\r\n\t\tfor (var type in types) {\r\n\t\t\taddOne(obj, type, types[type], fn);\r\n\t\t}\r\n\t} else {\r\n\t\ttypes = splitWords(types);\r\n\r\n\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n\t\t\taddOne(obj, types[i], fn, context);\r\n\t\t}\r\n\t}\r\n\r\n\treturn this;\r\n}\r\n\r\nvar eventsKey = '_leaflet_events';\r\n\r\n// @function off(el: HTMLElement, types: String, fn: Function, context?: Object): this\r\n// Removes a previously added listener function.\r\n// Note that if you passed a custom context to on, you must pass the same\r\n// context to `off` in order to remove the listener.\r\n\r\n// @alternative\r\n// @function off(el: HTMLElement, eventMap: Object, context?: Object): this\r\n// Removes a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`\r\nfunction off(obj, types, fn, context) {\r\n\r\n\tif (typeof types === 'object') {\r\n\t\tfor (var type in types) {\r\n\t\t\tremoveOne(obj, type, types[type], fn);\r\n\t\t}\r\n\t} else if (types) {\r\n\t\ttypes = splitWords(types);\r\n\r\n\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n\t\t\tremoveOne(obj, types[i], fn, context);\r\n\t\t}\r\n\t} else {\r\n\t\tfor (var j in obj[eventsKey]) {\r\n\t\t\tremoveOne(obj, j, obj[eventsKey][j]);\r\n\t\t}\r\n\t\tdelete obj[eventsKey];\r\n\t}\r\n\r\n\treturn this;\r\n}\r\n\r\nfunction addOne(obj, type, fn, context) {\r\n\tvar id = type + stamp(fn) + (context ? '_' + stamp(context) : '');\r\n\r\n\tif (obj[eventsKey] && obj[eventsKey][id]) { return this; }\r\n\r\n\tvar handler = function (e) {\r\n\t\treturn fn.call(context || obj, e || window.event);\r\n\t};\r\n\r\n\tvar originalHandler = handler;\r\n\r\n\tif (pointer && type.indexOf('touch') === 0) {\r\n\t\t// Needs DomEvent.Pointer.js\r\n\t\taddPointerListener(obj, type, handler, id);\r\n\r\n\t} else if (touch && (type === 'dblclick') && addDoubleTapListener &&\r\n\t !(pointer && chrome)) {\r\n\t\t// Chrome >55 does not need the synthetic dblclicks from addDoubleTapListener\r\n\t\t// See #5180\r\n\t\taddDoubleTapListener(obj, handler, id);\r\n\r\n\t} else if ('addEventListener' in obj) {\r\n\r\n\t\tif (type === 'mousewheel') {\r\n\t\t\tobj.addEventListener('onwheel' in obj ? 'wheel' : 'mousewheel', handler, passiveEvents ? {passive: false} : false);\r\n\r\n\t\t} else if ((type === 'mouseenter') || (type === 'mouseleave')) {\r\n\t\t\thandler = function (e) {\r\n\t\t\t\te = e || window.event;\r\n\t\t\t\tif (isExternalTarget(obj, e)) {\r\n\t\t\t\t\toriginalHandler(e);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\tobj.addEventListener(type === 'mouseenter' ? 'mouseover' : 'mouseout', handler, false);\r\n\r\n\t\t} else {\r\n\t\t\tif (type === 'click' && android) {\r\n\t\t\t\thandler = function (e) {\r\n\t\t\t\t\tfilterClick(e, originalHandler);\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\tobj.addEventListener(type, handler, false);\r\n\t\t}\r\n\r\n\t} else if ('attachEvent' in obj) {\r\n\t\tobj.attachEvent('on' + type, handler);\r\n\t}\r\n\r\n\tobj[eventsKey] = obj[eventsKey] || {};\r\n\tobj[eventsKey][id] = handler;\r\n}\r\n\r\nfunction removeOne(obj, type, fn, context) {\r\n\r\n\tvar id = type + stamp(fn) + (context ? '_' + stamp(context) : ''),\r\n\t handler = obj[eventsKey] && obj[eventsKey][id];\r\n\r\n\tif (!handler) { return this; }\r\n\r\n\tif (pointer && type.indexOf('touch') === 0) {\r\n\t\tremovePointerListener(obj, type, id);\r\n\r\n\t} else if (touch && (type === 'dblclick') && removeDoubleTapListener &&\r\n\t !(pointer && chrome)) {\r\n\t\tremoveDoubleTapListener(obj, id);\r\n\r\n\t} else if ('removeEventListener' in obj) {\r\n\r\n\t\tif (type === 'mousewheel') {\r\n\t\t\tobj.removeEventListener('onwheel' in obj ? 'wheel' : 'mousewheel', handler, passiveEvents ? {passive: false} : false);\r\n\r\n\t\t} else {\r\n\t\t\tobj.removeEventListener(\r\n\t\t\t\ttype === 'mouseenter' ? 'mouseover' :\r\n\t\t\t\ttype === 'mouseleave' ? 'mouseout' : type, handler, false);\r\n\t\t}\r\n\r\n\t} else if ('detachEvent' in obj) {\r\n\t\tobj.detachEvent('on' + type, handler);\r\n\t}\r\n\r\n\tobj[eventsKey][id] = null;\r\n}\r\n\r\n// @function stopPropagation(ev: DOMEvent): this\r\n// Stop the given event from propagation to parent elements. Used inside the listener functions:\r\n// ```js\r\n// L.DomEvent.on(div, 'click', function (ev) {\r\n// \tL.DomEvent.stopPropagation(ev);\r\n// });\r\n// ```\r\nfunction stopPropagation(e) {\r\n\r\n\tif (e.stopPropagation) {\r\n\t\te.stopPropagation();\r\n\t} else if (e.originalEvent) { // In case of Leaflet event.\r\n\t\te.originalEvent._stopped = true;\r\n\t} else {\r\n\t\te.cancelBubble = true;\r\n\t}\r\n\tskipped(e);\r\n\r\n\treturn this;\r\n}\r\n\r\n// @function disableScrollPropagation(el: HTMLElement): this\r\n// Adds `stopPropagation` to the element's `'mousewheel'` events (plus browser variants).\r\nfunction disableScrollPropagation(el) {\r\n\taddOne(el, 'mousewheel', stopPropagation);\r\n\treturn this;\r\n}\r\n\r\n// @function disableClickPropagation(el: HTMLElement): this\r\n// Adds `stopPropagation` to the element's `'click'`, `'doubleclick'`,\r\n// `'mousedown'` and `'touchstart'` events (plus browser variants).\r\nfunction disableClickPropagation(el) {\r\n\ton(el, 'mousedown touchstart dblclick', stopPropagation);\r\n\taddOne(el, 'click', fakeStop);\r\n\treturn this;\r\n}\r\n\r\n// @function preventDefault(ev: DOMEvent): this\r\n// Prevents the default action of the DOM Event `ev` from happening (such as\r\n// following a link in the href of the a element, or doing a POST request\r\n// with page reload when a `
` is submitted).\r\n// Use it inside listener functions.\r\nfunction preventDefault(e) {\r\n\tif (e.preventDefault) {\r\n\t\te.preventDefault();\r\n\t} else {\r\n\t\te.returnValue = false;\r\n\t}\r\n\treturn this;\r\n}\r\n\r\n// @function stop(ev: DOMEvent): this\r\n// Does `stopPropagation` and `preventDefault` at the same time.\r\nfunction stop(e) {\r\n\tpreventDefault(e);\r\n\tstopPropagation(e);\r\n\treturn this;\r\n}\r\n\r\n// @function getMousePosition(ev: DOMEvent, container?: HTMLElement): Point\r\n// Gets normalized mouse position from a DOM event relative to the\r\n// `container` (border excluded) or to the whole page if not specified.\r\nfunction getMousePosition(e, container) {\r\n\tif (!container) {\r\n\t\treturn new Point(e.clientX, e.clientY);\r\n\t}\r\n\r\n\tvar scale = getScale(container),\r\n\t offset = scale.boundingClientRect; // left and top values are in page scale (like the event clientX/Y)\r\n\r\n\treturn new Point(\r\n\t\t// offset.left/top values are in page scale (like clientX/Y),\r\n\t\t// whereas clientLeft/Top (border width) values are the original values (before CSS scale applies).\r\n\t\t(e.clientX - offset.left) / scale.x - container.clientLeft,\r\n\t\t(e.clientY - offset.top) / scale.y - container.clientTop\r\n\t);\r\n}\r\n\r\n// Chrome on Win scrolls double the pixels as in other platforms (see #4538),\r\n// and Firefox scrolls device pixels, not CSS pixels\r\nvar wheelPxFactor =\r\n\t(win && chrome) ? 2 * window.devicePixelRatio :\r\n\tgecko ? window.devicePixelRatio : 1;\r\n\r\n// @function getWheelDelta(ev: DOMEvent): Number\r\n// Gets normalized wheel delta from a mousewheel DOM event, in vertical\r\n// pixels scrolled (negative if scrolling down).\r\n// Events from pointing devices without precise scrolling are mapped to\r\n// a best guess of 60 pixels.\r\nfunction getWheelDelta(e) {\r\n\treturn (edge) ? e.wheelDeltaY / 2 : // Don't trust window-geometry-based delta\r\n\t (e.deltaY && e.deltaMode === 0) ? -e.deltaY / wheelPxFactor : // Pixels\r\n\t (e.deltaY && e.deltaMode === 1) ? -e.deltaY * 20 : // Lines\r\n\t (e.deltaY && e.deltaMode === 2) ? -e.deltaY * 60 : // Pages\r\n\t (e.deltaX || e.deltaZ) ? 0 :\t// Skip horizontal/depth wheel events\r\n\t e.wheelDelta ? (e.wheelDeltaY || e.wheelDelta) / 2 : // Legacy IE pixels\r\n\t (e.detail && Math.abs(e.detail) < 32765) ? -e.detail * 20 : // Legacy Moz lines\r\n\t e.detail ? e.detail / -32765 * 60 : // Legacy Moz pages\r\n\t 0;\r\n}\r\n\r\nvar skipEvents = {};\r\n\r\nfunction fakeStop(e) {\r\n\t// fakes stopPropagation by setting a special event flag, checked/reset with skipped(e)\r\n\tskipEvents[e.type] = true;\r\n}\r\n\r\nfunction skipped(e) {\r\n\tvar events = skipEvents[e.type];\r\n\t// reset when checking, as it's only used in map container and propagates outside of the map\r\n\tskipEvents[e.type] = false;\r\n\treturn events;\r\n}\r\n\r\n// check if element really left/entered the event target (for mouseenter/mouseleave)\r\nfunction isExternalTarget(el, e) {\r\n\r\n\tvar related = e.relatedTarget;\r\n\r\n\tif (!related) { return true; }\r\n\r\n\ttry {\r\n\t\twhile (related && (related !== el)) {\r\n\t\t\trelated = related.parentNode;\r\n\t\t}\r\n\t} catch (err) {\r\n\t\treturn false;\r\n\t}\r\n\treturn (related !== el);\r\n}\r\n\r\nvar lastClick;\r\n\r\n// this is a horrible workaround for a bug in Android where a single touch triggers two click events\r\nfunction filterClick(e, handler) {\r\n\tvar timeStamp = (e.timeStamp || (e.originalEvent && e.originalEvent.timeStamp)),\r\n\t elapsed = lastClick && (timeStamp - lastClick);\r\n\r\n\t// are they closer together than 500ms yet more than 100ms?\r\n\t// Android typically triggers them ~300ms apart while multiple listeners\r\n\t// on the same event should be triggered far faster;\r\n\t// or check if click is simulated on the element, and if it is, reject any non-simulated events\r\n\r\n\tif ((elapsed && elapsed > 100 && elapsed < 500) || (e.target._simulatedClick && !e._simulated)) {\r\n\t\tstop(e);\r\n\t\treturn;\r\n\t}\r\n\tlastClick = timeStamp;\r\n\r\n\thandler(e);\r\n}\r\n\r\n\r\n\n\nvar DomEvent = (Object.freeze || Object)({\n\ton: on,\n\toff: off,\n\tstopPropagation: stopPropagation,\n\tdisableScrollPropagation: disableScrollPropagation,\n\tdisableClickPropagation: disableClickPropagation,\n\tpreventDefault: preventDefault,\n\tstop: stop,\n\tgetMousePosition: getMousePosition,\n\tgetWheelDelta: getWheelDelta,\n\tfakeStop: fakeStop,\n\tskipped: skipped,\n\tisExternalTarget: isExternalTarget,\n\taddListener: on,\n\tremoveListener: off\n});\n\n/*\n * @class PosAnimation\n * @aka L.PosAnimation\n * @inherits Evented\n * Used internally for panning animations, utilizing CSS3 Transitions for modern browsers and a timer fallback for IE6-9.\n *\n * @example\n * ```js\n * var fx = new L.PosAnimation();\n * fx.run(el, [300, 500], 0.5);\n * ```\n *\n * @constructor L.PosAnimation()\n * Creates a `PosAnimation` object.\n *\n */\n\nvar PosAnimation = Evented.extend({\n\n\t// @method run(el: HTMLElement, newPos: Point, duration?: Number, easeLinearity?: Number)\n\t// Run an animation of a given element to a new position, optionally setting\n\t// duration in seconds (`0.25` by default) and easing linearity factor (3rd\n\t// argument of the [cubic bezier curve](http://cubic-bezier.com/#0,0,.5,1),\n\t// `0.5` by default).\n\trun: function (el, newPos, duration, easeLinearity) {\n\t\tthis.stop();\n\n\t\tthis._el = el;\n\t\tthis._inProgress = true;\n\t\tthis._duration = duration || 0.25;\n\t\tthis._easeOutPower = 1 / Math.max(easeLinearity || 0.5, 0.2);\n\n\t\tthis._startPos = getPosition(el);\n\t\tthis._offset = newPos.subtract(this._startPos);\n\t\tthis._startTime = +new Date();\n\n\t\t// @event start: Event\n\t\t// Fired when the animation starts\n\t\tthis.fire('start');\n\n\t\tthis._animate();\n\t},\n\n\t// @method stop()\n\t// Stops the animation (if currently running).\n\tstop: function () {\n\t\tif (!this._inProgress) { return; }\n\n\t\tthis._step(true);\n\t\tthis._complete();\n\t},\n\n\t_animate: function () {\n\t\t// animation loop\n\t\tthis._animId = requestAnimFrame(this._animate, this);\n\t\tthis._step();\n\t},\n\n\t_step: function (round) {\n\t\tvar elapsed = (+new Date()) - this._startTime,\n\t\t duration = this._duration * 1000;\n\n\t\tif (elapsed < duration) {\n\t\t\tthis._runFrame(this._easeOut(elapsed / duration), round);\n\t\t} else {\n\t\t\tthis._runFrame(1);\n\t\t\tthis._complete();\n\t\t}\n\t},\n\n\t_runFrame: function (progress, round) {\n\t\tvar pos = this._startPos.add(this._offset.multiplyBy(progress));\n\t\tif (round) {\n\t\t\tpos._round();\n\t\t}\n\t\tsetPosition(this._el, pos);\n\n\t\t// @event step: Event\n\t\t// Fired continuously during the animation.\n\t\tthis.fire('step');\n\t},\n\n\t_complete: function () {\n\t\tcancelAnimFrame(this._animId);\n\n\t\tthis._inProgress = false;\n\t\t// @event end: Event\n\t\t// Fired when the animation ends.\n\t\tthis.fire('end');\n\t},\n\n\t_easeOut: function (t) {\n\t\treturn 1 - Math.pow(1 - t, this._easeOutPower);\n\t}\n});\n\n/*\r\n * @class Map\r\n * @aka L.Map\r\n * @inherits Evented\r\n *\r\n * The central class of the API — it is used to create a map on a page and manipulate it.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * // initialize the map on the \"map\" div with a given center and zoom\r\n * var map = L.map('map', {\r\n * \tcenter: [51.505, -0.09],\r\n * \tzoom: 13\r\n * });\r\n * ```\r\n *\r\n */\r\n\r\nvar Map = Evented.extend({\r\n\r\n\toptions: {\r\n\t\t// @section Map State Options\r\n\t\t// @option crs: CRS = L.CRS.EPSG3857\r\n\t\t// The [Coordinate Reference System](#crs) to use. Don't change this if you're not\r\n\t\t// sure what it means.\r\n\t\tcrs: EPSG3857,\r\n\r\n\t\t// @option center: LatLng = undefined\r\n\t\t// Initial geographic center of the map\r\n\t\tcenter: undefined,\r\n\r\n\t\t// @option zoom: Number = undefined\r\n\t\t// Initial map zoom level\r\n\t\tzoom: undefined,\r\n\r\n\t\t// @option minZoom: Number = *\r\n\t\t// Minimum zoom level of the map.\r\n\t\t// If not specified and at least one `GridLayer` or `TileLayer` is in the map,\r\n\t\t// the lowest of their `minZoom` options will be used instead.\r\n\t\tminZoom: undefined,\r\n\r\n\t\t// @option maxZoom: Number = *\r\n\t\t// Maximum zoom level of the map.\r\n\t\t// If not specified and at least one `GridLayer` or `TileLayer` is in the map,\r\n\t\t// the highest of their `maxZoom` options will be used instead.\r\n\t\tmaxZoom: undefined,\r\n\r\n\t\t// @option layers: Layer[] = []\r\n\t\t// Array of layers that will be added to the map initially\r\n\t\tlayers: [],\r\n\r\n\t\t// @option maxBounds: LatLngBounds = null\r\n\t\t// When this option is set, the map restricts the view to the given\r\n\t\t// geographical bounds, bouncing the user back if the user tries to pan\r\n\t\t// outside the view. To set the restriction dynamically, use\r\n\t\t// [`setMaxBounds`](#map-setmaxbounds) method.\r\n\t\tmaxBounds: undefined,\r\n\r\n\t\t// @option renderer: Renderer = *\r\n\t\t// The default method for drawing vector layers on the map. `L.SVG`\r\n\t\t// or `L.Canvas` by default depending on browser support.\r\n\t\trenderer: undefined,\r\n\r\n\r\n\t\t// @section Animation Options\r\n\t\t// @option zoomAnimation: Boolean = true\r\n\t\t// Whether the map zoom animation is enabled. By default it's enabled\r\n\t\t// in all browsers that support CSS3 Transitions except Android.\r\n\t\tzoomAnimation: true,\r\n\r\n\t\t// @option zoomAnimationThreshold: Number = 4\r\n\t\t// Won't animate zoom if the zoom difference exceeds this value.\r\n\t\tzoomAnimationThreshold: 4,\r\n\r\n\t\t// @option fadeAnimation: Boolean = true\r\n\t\t// Whether the tile fade animation is enabled. By default it's enabled\r\n\t\t// in all browsers that support CSS3 Transitions except Android.\r\n\t\tfadeAnimation: true,\r\n\r\n\t\t// @option markerZoomAnimation: Boolean = true\r\n\t\t// Whether markers animate their zoom with the zoom animation, if disabled\r\n\t\t// they will disappear for the length of the animation. By default it's\r\n\t\t// enabled in all browsers that support CSS3 Transitions except Android.\r\n\t\tmarkerZoomAnimation: true,\r\n\r\n\t\t// @option transform3DLimit: Number = 2^23\r\n\t\t// Defines the maximum size of a CSS translation transform. The default\r\n\t\t// value should not be changed unless a web browser positions layers in\r\n\t\t// the wrong place after doing a large `panBy`.\r\n\t\ttransform3DLimit: 8388608, // Precision limit of a 32-bit float\r\n\r\n\t\t// @section Interaction Options\r\n\t\t// @option zoomSnap: Number = 1\r\n\t\t// Forces the map's zoom level to always be a multiple of this, particularly\r\n\t\t// right after a [`fitBounds()`](#map-fitbounds) or a pinch-zoom.\r\n\t\t// By default, the zoom level snaps to the nearest integer; lower values\r\n\t\t// (e.g. `0.5` or `0.1`) allow for greater granularity. A value of `0`\r\n\t\t// means the zoom level will not be snapped after `fitBounds` or a pinch-zoom.\r\n\t\tzoomSnap: 1,\r\n\r\n\t\t// @option zoomDelta: Number = 1\r\n\t\t// Controls how much the map's zoom level will change after a\r\n\t\t// [`zoomIn()`](#map-zoomin), [`zoomOut()`](#map-zoomout), pressing `+`\r\n\t\t// or `-` on the keyboard, or using the [zoom controls](#control-zoom).\r\n\t\t// Values smaller than `1` (e.g. `0.5`) allow for greater granularity.\r\n\t\tzoomDelta: 1,\r\n\r\n\t\t// @option trackResize: Boolean = true\r\n\t\t// Whether the map automatically handles browser window resize to update itself.\r\n\t\ttrackResize: true\r\n\t},\r\n\r\n\tinitialize: function (id, options) { // (HTMLElement or String, Object)\r\n\t\toptions = setOptions(this, options);\r\n\r\n\t\t// Make sure to assign internal flags at the beginning,\r\n\t\t// to avoid inconsistent state in some edge cases.\r\n\t\tthis._handlers = [];\r\n\t\tthis._layers = {};\r\n\t\tthis._zoomBoundLayers = {};\r\n\t\tthis._sizeChanged = true;\r\n\r\n\t\tthis._initContainer(id);\r\n\t\tthis._initLayout();\r\n\r\n\t\t// hack for https://github.com/Leaflet/Leaflet/issues/1980\r\n\t\tthis._onResize = bind(this._onResize, this);\r\n\r\n\t\tthis._initEvents();\r\n\r\n\t\tif (options.maxBounds) {\r\n\t\t\tthis.setMaxBounds(options.maxBounds);\r\n\t\t}\r\n\r\n\t\tif (options.zoom !== undefined) {\r\n\t\t\tthis._zoom = this._limitZoom(options.zoom);\r\n\t\t}\r\n\r\n\t\tif (options.center && options.zoom !== undefined) {\r\n\t\t\tthis.setView(toLatLng(options.center), options.zoom, {reset: true});\r\n\t\t}\r\n\r\n\t\tthis.callInitHooks();\r\n\r\n\t\t// don't animate on browsers without hardware-accelerated transitions or old Android/Opera\r\n\t\tthis._zoomAnimated = TRANSITION && any3d && !mobileOpera &&\r\n\t\t\t\tthis.options.zoomAnimation;\r\n\r\n\t\t// zoom transitions run with the same duration for all layers, so if one of transitionend events\r\n\t\t// happens after starting zoom animation (propagating to the map pane), we know that it ended globally\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tthis._createAnimProxy();\r\n\t\t\ton(this._proxy, TRANSITION_END, this._catchTransitionEnd, this);\r\n\t\t}\r\n\r\n\t\tthis._addLayers(this.options.layers);\r\n\t},\r\n\r\n\r\n\t// @section Methods for modifying map state\r\n\r\n\t// @method setView(center: LatLng, zoom: Number, options?: Zoom/pan options): this\r\n\t// Sets the view of the map (geographical center and zoom) with the given\r\n\t// animation options.\r\n\tsetView: function (center, zoom, options) {\r\n\r\n\t\tzoom = zoom === undefined ? this._zoom : this._limitZoom(zoom);\r\n\t\tcenter = this._limitCenter(toLatLng(center), zoom, this.options.maxBounds);\r\n\t\toptions = options || {};\r\n\r\n\t\tthis._stop();\r\n\r\n\t\tif (this._loaded && !options.reset && options !== true) {\r\n\r\n\t\t\tif (options.animate !== undefined) {\r\n\t\t\t\toptions.zoom = extend({animate: options.animate}, options.zoom);\r\n\t\t\t\toptions.pan = extend({animate: options.animate, duration: options.duration}, options.pan);\r\n\t\t\t}\r\n\r\n\t\t\t// try animating pan or zoom\r\n\t\t\tvar moved = (this._zoom !== zoom) ?\r\n\t\t\t\tthis._tryAnimatedZoom && this._tryAnimatedZoom(center, zoom, options.zoom) :\r\n\t\t\t\tthis._tryAnimatedPan(center, options.pan);\r\n\r\n\t\t\tif (moved) {\r\n\t\t\t\t// prevent resize handler call, the view will refresh after animation anyway\r\n\t\t\t\tclearTimeout(this._sizeTimer);\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// animation didn't start, just reset the map view\r\n\t\tthis._resetView(center, zoom);\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method setZoom(zoom: Number, options?: Zoom/pan options): this\r\n\t// Sets the zoom of the map.\r\n\tsetZoom: function (zoom, options) {\r\n\t\tif (!this._loaded) {\r\n\t\t\tthis._zoom = zoom;\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\treturn this.setView(this.getCenter(), zoom, {zoom: options});\r\n\t},\r\n\r\n\t// @method zoomIn(delta?: Number, options?: Zoom options): this\r\n\t// Increases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default).\r\n\tzoomIn: function (delta, options) {\r\n\t\tdelta = delta || (any3d ? this.options.zoomDelta : 1);\r\n\t\treturn this.setZoom(this._zoom + delta, options);\r\n\t},\r\n\r\n\t// @method zoomOut(delta?: Number, options?: Zoom options): this\r\n\t// Decreases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default).\r\n\tzoomOut: function (delta, options) {\r\n\t\tdelta = delta || (any3d ? this.options.zoomDelta : 1);\r\n\t\treturn this.setZoom(this._zoom - delta, options);\r\n\t},\r\n\r\n\t// @method setZoomAround(latlng: LatLng, zoom: Number, options: Zoom options): this\r\n\t// Zooms the map while keeping a specified geographical point on the map\r\n\t// stationary (e.g. used internally for scroll zoom and double-click zoom).\r\n\t// @alternative\r\n\t// @method setZoomAround(offset: Point, zoom: Number, options: Zoom options): this\r\n\t// Zooms the map while keeping a specified pixel on the map (relative to the top-left corner) stationary.\r\n\tsetZoomAround: function (latlng, zoom, options) {\r\n\t\tvar scale = this.getZoomScale(zoom),\r\n\t\t viewHalf = this.getSize().divideBy(2),\r\n\t\t containerPoint = latlng instanceof Point ? latlng : this.latLngToContainerPoint(latlng),\r\n\r\n\t\t centerOffset = containerPoint.subtract(viewHalf).multiplyBy(1 - 1 / scale),\r\n\t\t newCenter = this.containerPointToLatLng(viewHalf.add(centerOffset));\r\n\r\n\t\treturn this.setView(newCenter, zoom, {zoom: options});\r\n\t},\r\n\r\n\t_getBoundsCenterZoom: function (bounds, options) {\r\n\r\n\t\toptions = options || {};\r\n\t\tbounds = bounds.getBounds ? bounds.getBounds() : toLatLngBounds(bounds);\r\n\r\n\t\tvar paddingTL = toPoint(options.paddingTopLeft || options.padding || [0, 0]),\r\n\t\t paddingBR = toPoint(options.paddingBottomRight || options.padding || [0, 0]),\r\n\r\n\t\t zoom = this.getBoundsZoom(bounds, false, paddingTL.add(paddingBR));\r\n\r\n\t\tzoom = (typeof options.maxZoom === 'number') ? Math.min(options.maxZoom, zoom) : zoom;\r\n\r\n\t\tif (zoom === Infinity) {\r\n\t\t\treturn {\r\n\t\t\t\tcenter: bounds.getCenter(),\r\n\t\t\t\tzoom: zoom\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tvar paddingOffset = paddingBR.subtract(paddingTL).divideBy(2),\r\n\r\n\t\t swPoint = this.project(bounds.getSouthWest(), zoom),\r\n\t\t nePoint = this.project(bounds.getNorthEast(), zoom),\r\n\t\t center = this.unproject(swPoint.add(nePoint).divideBy(2).add(paddingOffset), zoom);\r\n\r\n\t\treturn {\r\n\t\t\tcenter: center,\r\n\t\t\tzoom: zoom\r\n\t\t};\r\n\t},\r\n\r\n\t// @method fitBounds(bounds: LatLngBounds, options?: fitBounds options): this\r\n\t// Sets a map view that contains the given geographical bounds with the\r\n\t// maximum zoom level possible.\r\n\tfitBounds: function (bounds, options) {\r\n\r\n\t\tbounds = toLatLngBounds(bounds);\r\n\r\n\t\tif (!bounds.isValid()) {\r\n\t\t\tthrow new Error('Bounds are not valid.');\r\n\t\t}\r\n\r\n\t\tvar target = this._getBoundsCenterZoom(bounds, options);\r\n\t\treturn this.setView(target.center, target.zoom, options);\r\n\t},\r\n\r\n\t// @method fitWorld(options?: fitBounds options): this\r\n\t// Sets a map view that mostly contains the whole world with the maximum\r\n\t// zoom level possible.\r\n\tfitWorld: function (options) {\r\n\t\treturn this.fitBounds([[-90, -180], [90, 180]], options);\r\n\t},\r\n\r\n\t// @method panTo(latlng: LatLng, options?: Pan options): this\r\n\t// Pans the map to a given center.\r\n\tpanTo: function (center, options) { // (LatLng)\r\n\t\treturn this.setView(center, this._zoom, {pan: options});\r\n\t},\r\n\r\n\t// @method panBy(offset: Point, options?: Pan options): this\r\n\t// Pans the map by a given number of pixels (animated).\r\n\tpanBy: function (offset, options) {\r\n\t\toffset = toPoint(offset).round();\r\n\t\toptions = options || {};\r\n\r\n\t\tif (!offset.x && !offset.y) {\r\n\t\t\treturn this.fire('moveend');\r\n\t\t}\r\n\t\t// If we pan too far, Chrome gets issues with tiles\r\n\t\t// and makes them disappear or appear in the wrong place (slightly offset) #2602\r\n\t\tif (options.animate !== true && !this.getSize().contains(offset)) {\r\n\t\t\tthis._resetView(this.unproject(this.project(this.getCenter()).add(offset)), this.getZoom());\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif (!this._panAnim) {\r\n\t\t\tthis._panAnim = new PosAnimation();\r\n\r\n\t\t\tthis._panAnim.on({\r\n\t\t\t\t'step': this._onPanTransitionStep,\r\n\t\t\t\t'end': this._onPanTransitionEnd\r\n\t\t\t}, this);\r\n\t\t}\r\n\r\n\t\t// don't fire movestart if animating inertia\r\n\t\tif (!options.noMoveStart) {\r\n\t\t\tthis.fire('movestart');\r\n\t\t}\r\n\r\n\t\t// animate pan unless animate: false specified\r\n\t\tif (options.animate !== false) {\r\n\t\t\taddClass(this._mapPane, 'leaflet-pan-anim');\r\n\r\n\t\t\tvar newPos = this._getMapPanePos().subtract(offset).round();\r\n\t\t\tthis._panAnim.run(this._mapPane, newPos, options.duration || 0.25, options.easeLinearity);\r\n\t\t} else {\r\n\t\t\tthis._rawPanBy(offset);\r\n\t\t\tthis.fire('move').fire('moveend');\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method flyTo(latlng: LatLng, zoom?: Number, options?: Zoom/pan options): this\r\n\t// Sets the view of the map (geographical center and zoom) performing a smooth\r\n\t// pan-zoom animation.\r\n\tflyTo: function (targetCenter, targetZoom, options) {\r\n\r\n\t\toptions = options || {};\r\n\t\tif (options.animate === false || !any3d) {\r\n\t\t\treturn this.setView(targetCenter, targetZoom, options);\r\n\t\t}\r\n\r\n\t\tthis._stop();\r\n\r\n\t\tvar from = this.project(this.getCenter()),\r\n\t\t to = this.project(targetCenter),\r\n\t\t size = this.getSize(),\r\n\t\t startZoom = this._zoom;\r\n\r\n\t\ttargetCenter = toLatLng(targetCenter);\r\n\t\ttargetZoom = targetZoom === undefined ? startZoom : targetZoom;\r\n\r\n\t\tvar w0 = Math.max(size.x, size.y),\r\n\t\t w1 = w0 * this.getZoomScale(startZoom, targetZoom),\r\n\t\t u1 = (to.distanceTo(from)) || 1,\r\n\t\t rho = 1.42,\r\n\t\t rho2 = rho * rho;\r\n\r\n\t\tfunction r(i) {\r\n\t\t\tvar s1 = i ? -1 : 1,\r\n\t\t\t s2 = i ? w1 : w0,\r\n\t\t\t t1 = w1 * w1 - w0 * w0 + s1 * rho2 * rho2 * u1 * u1,\r\n\t\t\t b1 = 2 * s2 * rho2 * u1,\r\n\t\t\t b = t1 / b1,\r\n\t\t\t sq = Math.sqrt(b * b + 1) - b;\r\n\r\n\t\t\t // workaround for floating point precision bug when sq = 0, log = -Infinite,\r\n\t\t\t // thus triggering an infinite loop in flyTo\r\n\t\t\t var log = sq < 0.000000001 ? -18 : Math.log(sq);\r\n\r\n\t\t\treturn log;\r\n\t\t}\r\n\r\n\t\tfunction sinh(n) { return (Math.exp(n) - Math.exp(-n)) / 2; }\r\n\t\tfunction cosh(n) { return (Math.exp(n) + Math.exp(-n)) / 2; }\r\n\t\tfunction tanh(n) { return sinh(n) / cosh(n); }\r\n\r\n\t\tvar r0 = r(0);\r\n\r\n\t\tfunction w(s) { return w0 * (cosh(r0) / cosh(r0 + rho * s)); }\r\n\t\tfunction u(s) { return w0 * (cosh(r0) * tanh(r0 + rho * s) - sinh(r0)) / rho2; }\r\n\r\n\t\tfunction easeOut(t) { return 1 - Math.pow(1 - t, 1.5); }\r\n\r\n\t\tvar start = Date.now(),\r\n\t\t S = (r(1) - r0) / rho,\r\n\t\t duration = options.duration ? 1000 * options.duration : 1000 * S * 0.8;\r\n\r\n\t\tfunction frame() {\r\n\t\t\tvar t = (Date.now() - start) / duration,\r\n\t\t\t s = easeOut(t) * S;\r\n\r\n\t\t\tif (t <= 1) {\r\n\t\t\t\tthis._flyToFrame = requestAnimFrame(frame, this);\r\n\r\n\t\t\t\tthis._move(\r\n\t\t\t\t\tthis.unproject(from.add(to.subtract(from).multiplyBy(u(s) / u1)), startZoom),\r\n\t\t\t\t\tthis.getScaleZoom(w0 / w(s), startZoom),\r\n\t\t\t\t\t{flyTo: true});\r\n\r\n\t\t\t} else {\r\n\t\t\t\tthis\r\n\t\t\t\t\t._move(targetCenter, targetZoom)\r\n\t\t\t\t\t._moveEnd(true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._moveStart(true, options.noMoveStart);\r\n\r\n\t\tframe.call(this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method flyToBounds(bounds: LatLngBounds, options?: fitBounds options): this\r\n\t// Sets the view of the map with a smooth animation like [`flyTo`](#map-flyto),\r\n\t// but takes a bounds parameter like [`fitBounds`](#map-fitbounds).\r\n\tflyToBounds: function (bounds, options) {\r\n\t\tvar target = this._getBoundsCenterZoom(bounds, options);\r\n\t\treturn this.flyTo(target.center, target.zoom, options);\r\n\t},\r\n\r\n\t// @method setMaxBounds(bounds: Bounds): this\r\n\t// Restricts the map view to the given bounds (see the [maxBounds](#map-maxbounds) option).\r\n\tsetMaxBounds: function (bounds) {\r\n\t\tbounds = toLatLngBounds(bounds);\r\n\r\n\t\tif (!bounds.isValid()) {\r\n\t\t\tthis.options.maxBounds = null;\r\n\t\t\treturn this.off('moveend', this._panInsideMaxBounds);\r\n\t\t} else if (this.options.maxBounds) {\r\n\t\t\tthis.off('moveend', this._panInsideMaxBounds);\r\n\t\t}\r\n\r\n\t\tthis.options.maxBounds = bounds;\r\n\r\n\t\tif (this._loaded) {\r\n\t\t\tthis._panInsideMaxBounds();\r\n\t\t}\r\n\r\n\t\treturn this.on('moveend', this._panInsideMaxBounds);\r\n\t},\r\n\r\n\t// @method setMinZoom(zoom: Number): this\r\n\t// Sets the lower limit for the available zoom levels (see the [minZoom](#map-minzoom) option).\r\n\tsetMinZoom: function (zoom) {\r\n\t\tvar oldZoom = this.options.minZoom;\r\n\t\tthis.options.minZoom = zoom;\r\n\r\n\t\tif (this._loaded && oldZoom !== zoom) {\r\n\t\t\tthis.fire('zoomlevelschange');\r\n\r\n\t\t\tif (this.getZoom() < this.options.minZoom) {\r\n\t\t\t\treturn this.setZoom(zoom);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method setMaxZoom(zoom: Number): this\r\n\t// Sets the upper limit for the available zoom levels (see the [maxZoom](#map-maxzoom) option).\r\n\tsetMaxZoom: function (zoom) {\r\n\t\tvar oldZoom = this.options.maxZoom;\r\n\t\tthis.options.maxZoom = zoom;\r\n\r\n\t\tif (this._loaded && oldZoom !== zoom) {\r\n\t\t\tthis.fire('zoomlevelschange');\r\n\r\n\t\t\tif (this.getZoom() > this.options.maxZoom) {\r\n\t\t\t\treturn this.setZoom(zoom);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method panInsideBounds(bounds: LatLngBounds, options?: Pan options): this\r\n\t// Pans the map to the closest view that would lie inside the given bounds (if it's not already), controlling the animation using the options specific, if any.\r\n\tpanInsideBounds: function (bounds, options) {\r\n\t\tthis._enforcingBounds = true;\r\n\t\tvar center = this.getCenter(),\r\n\t\t newCenter = this._limitCenter(center, this._zoom, toLatLngBounds(bounds));\r\n\r\n\t\tif (!center.equals(newCenter)) {\r\n\t\t\tthis.panTo(newCenter, options);\r\n\t\t}\r\n\r\n\t\tthis._enforcingBounds = false;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method panInside(latlng: LatLng, options?: options): this\r\n\t// Pans the map the minimum amount to make the `latlng` visible. Use\r\n\t// `padding`, `paddingTopLeft` and `paddingTopRight` options to fit\r\n\t// the display to more restricted bounds, like [`fitBounds`](#map-fitbounds).\r\n\t// If `latlng` is already within the (optionally padded) display bounds,\r\n\t// the map will not be panned.\r\n\tpanInside: function (latlng, options) {\r\n\t\toptions = options || {};\r\n\r\n\t\tvar paddingTL = toPoint(options.paddingTopLeft || options.padding || [0, 0]),\r\n\t\t paddingBR = toPoint(options.paddingBottomRight || options.padding || [0, 0]),\r\n\t\t center = this.getCenter(),\r\n\t\t pixelCenter = this.project(center),\r\n\t\t pixelPoint = this.project(latlng),\r\n\t\t pixelBounds = this.getPixelBounds(),\r\n\t\t halfPixelBounds = pixelBounds.getSize().divideBy(2),\r\n\t\t paddedBounds = toBounds([pixelBounds.min.add(paddingTL), pixelBounds.max.subtract(paddingBR)]);\r\n\r\n\t\tif (!paddedBounds.contains(pixelPoint)) {\r\n\t\t\tthis._enforcingBounds = true;\r\n\t\t\tvar diff = pixelCenter.subtract(pixelPoint),\r\n\t\t\t newCenter = toPoint(pixelPoint.x + diff.x, pixelPoint.y + diff.y);\r\n\r\n\t\t\tif (pixelPoint.x < paddedBounds.min.x || pixelPoint.x > paddedBounds.max.x) {\r\n\t\t\t\tnewCenter.x = pixelCenter.x - diff.x;\r\n\t\t\t\tif (diff.x > 0) {\r\n\t\t\t\t\tnewCenter.x += halfPixelBounds.x - paddingTL.x;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tnewCenter.x -= halfPixelBounds.x - paddingBR.x;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (pixelPoint.y < paddedBounds.min.y || pixelPoint.y > paddedBounds.max.y) {\r\n\t\t\t\tnewCenter.y = pixelCenter.y - diff.y;\r\n\t\t\t\tif (diff.y > 0) {\r\n\t\t\t\t\tnewCenter.y += halfPixelBounds.y - paddingTL.y;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tnewCenter.y -= halfPixelBounds.y - paddingBR.y;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthis.panTo(this.unproject(newCenter), options);\r\n\t\t\tthis._enforcingBounds = false;\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method invalidateSize(options: Zoom/pan options): this\r\n\t// Checks if the map container size changed and updates the map if so —\r\n\t// call it after you've changed the map size dynamically, also animating\r\n\t// pan by default. If `options.pan` is `false`, panning will not occur.\r\n\t// If `options.debounceMoveend` is `true`, it will delay `moveend` event so\r\n\t// that it doesn't happen often even if the method is called many\r\n\t// times in a row.\r\n\r\n\t// @alternative\r\n\t// @method invalidateSize(animate: Boolean): this\r\n\t// Checks if the map container size changed and updates the map if so —\r\n\t// call it after you've changed the map size dynamically, also animating\r\n\t// pan by default.\r\n\tinvalidateSize: function (options) {\r\n\t\tif (!this._loaded) { return this; }\r\n\r\n\t\toptions = extend({\r\n\t\t\tanimate: false,\r\n\t\t\tpan: true\r\n\t\t}, options === true ? {animate: true} : options);\r\n\r\n\t\tvar oldSize = this.getSize();\r\n\t\tthis._sizeChanged = true;\r\n\t\tthis._lastCenter = null;\r\n\r\n\t\tvar newSize = this.getSize(),\r\n\t\t oldCenter = oldSize.divideBy(2).round(),\r\n\t\t newCenter = newSize.divideBy(2).round(),\r\n\t\t offset = oldCenter.subtract(newCenter);\r\n\r\n\t\tif (!offset.x && !offset.y) { return this; }\r\n\r\n\t\tif (options.animate && options.pan) {\r\n\t\t\tthis.panBy(offset);\r\n\r\n\t\t} else {\r\n\t\t\tif (options.pan) {\r\n\t\t\t\tthis._rawPanBy(offset);\r\n\t\t\t}\r\n\r\n\t\t\tthis.fire('move');\r\n\r\n\t\t\tif (options.debounceMoveend) {\r\n\t\t\t\tclearTimeout(this._sizeTimer);\r\n\t\t\t\tthis._sizeTimer = setTimeout(bind(this.fire, this, 'moveend'), 200);\r\n\t\t\t} else {\r\n\t\t\t\tthis.fire('moveend');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// @section Map state change events\r\n\t\t// @event resize: ResizeEvent\r\n\t\t// Fired when the map is resized.\r\n\t\treturn this.fire('resize', {\r\n\t\t\toldSize: oldSize,\r\n\t\t\tnewSize: newSize\r\n\t\t});\r\n\t},\r\n\r\n\t// @section Methods for modifying map state\r\n\t// @method stop(): this\r\n\t// Stops the currently running `panTo` or `flyTo` animation, if any.\r\n\tstop: function () {\r\n\t\tthis.setZoom(this._limitZoom(this._zoom));\r\n\t\tif (!this.options.zoomSnap) {\r\n\t\t\tthis.fire('viewreset');\r\n\t\t}\r\n\t\treturn this._stop();\r\n\t},\r\n\r\n\t// @section Geolocation methods\r\n\t// @method locate(options?: Locate options): this\r\n\t// Tries to locate the user using the Geolocation API, firing a [`locationfound`](#map-locationfound)\r\n\t// event with location data on success or a [`locationerror`](#map-locationerror) event on failure,\r\n\t// and optionally sets the map view to the user's location with respect to\r\n\t// detection accuracy (or to the world view if geolocation failed).\r\n\t// Note that, if your page doesn't use HTTPS, this method will fail in\r\n\t// modern browsers ([Chrome 50 and newer](https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-powerful-features-on-insecure-origins))\r\n\t// See `Locate options` for more details.\r\n\tlocate: function (options) {\r\n\r\n\t\toptions = this._locateOptions = extend({\r\n\t\t\ttimeout: 10000,\r\n\t\t\twatch: false\r\n\t\t\t// setView: false\r\n\t\t\t// maxZoom: \r\n\t\t\t// maximumAge: 0\r\n\t\t\t// enableHighAccuracy: false\r\n\t\t}, options);\r\n\r\n\t\tif (!('geolocation' in navigator)) {\r\n\t\t\tthis._handleGeolocationError({\r\n\t\t\t\tcode: 0,\r\n\t\t\t\tmessage: 'Geolocation not supported.'\r\n\t\t\t});\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tvar onResponse = bind(this._handleGeolocationResponse, this),\r\n\t\t onError = bind(this._handleGeolocationError, this);\r\n\r\n\t\tif (options.watch) {\r\n\t\t\tthis._locationWatchId =\r\n\t\t\t navigator.geolocation.watchPosition(onResponse, onError, options);\r\n\t\t} else {\r\n\t\t\tnavigator.geolocation.getCurrentPosition(onResponse, onError, options);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method stopLocate(): this\r\n\t// Stops watching location previously initiated by `map.locate({watch: true})`\r\n\t// and aborts resetting the map view if map.locate was called with\r\n\t// `{setView: true}`.\r\n\tstopLocate: function () {\r\n\t\tif (navigator.geolocation && navigator.geolocation.clearWatch) {\r\n\t\t\tnavigator.geolocation.clearWatch(this._locationWatchId);\r\n\t\t}\r\n\t\tif (this._locateOptions) {\r\n\t\t\tthis._locateOptions.setView = false;\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_handleGeolocationError: function (error) {\r\n\t\tvar c = error.code,\r\n\t\t message = error.message ||\r\n\t\t (c === 1 ? 'permission denied' :\r\n\t\t (c === 2 ? 'position unavailable' : 'timeout'));\r\n\r\n\t\tif (this._locateOptions.setView && !this._loaded) {\r\n\t\t\tthis.fitWorld();\r\n\t\t}\r\n\r\n\t\t// @section Location events\r\n\t\t// @event locationerror: ErrorEvent\r\n\t\t// Fired when geolocation (using the [`locate`](#map-locate) method) failed.\r\n\t\tthis.fire('locationerror', {\r\n\t\t\tcode: c,\r\n\t\t\tmessage: 'Geolocation error: ' + message + '.'\r\n\t\t});\r\n\t},\r\n\r\n\t_handleGeolocationResponse: function (pos) {\r\n\t\tvar lat = pos.coords.latitude,\r\n\t\t lng = pos.coords.longitude,\r\n\t\t latlng = new LatLng(lat, lng),\r\n\t\t bounds = latlng.toBounds(pos.coords.accuracy * 2),\r\n\t\t options = this._locateOptions;\r\n\r\n\t\tif (options.setView) {\r\n\t\t\tvar zoom = this.getBoundsZoom(bounds);\r\n\t\t\tthis.setView(latlng, options.maxZoom ? Math.min(zoom, options.maxZoom) : zoom);\r\n\t\t}\r\n\r\n\t\tvar data = {\r\n\t\t\tlatlng: latlng,\r\n\t\t\tbounds: bounds,\r\n\t\t\ttimestamp: pos.timestamp\r\n\t\t};\r\n\r\n\t\tfor (var i in pos.coords) {\r\n\t\t\tif (typeof pos.coords[i] === 'number') {\r\n\t\t\t\tdata[i] = pos.coords[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// @event locationfound: LocationEvent\r\n\t\t// Fired when geolocation (using the [`locate`](#map-locate) method)\r\n\t\t// went successfully.\r\n\t\tthis.fire('locationfound', data);\r\n\t},\r\n\r\n\t// TODO Appropriate docs section?\r\n\t// @section Other Methods\r\n\t// @method addHandler(name: String, HandlerClass: Function): this\r\n\t// Adds a new `Handler` to the map, given its name and constructor function.\r\n\taddHandler: function (name, HandlerClass) {\r\n\t\tif (!HandlerClass) { return this; }\r\n\r\n\t\tvar handler = this[name] = new HandlerClass(this);\r\n\r\n\t\tthis._handlers.push(handler);\r\n\r\n\t\tif (this.options[name]) {\r\n\t\t\thandler.enable();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method remove(): this\r\n\t// Destroys the map and clears all related event listeners.\r\n\tremove: function () {\r\n\r\n\t\tthis._initEvents(true);\r\n\r\n\t\tif (this._containerId !== this._container._leaflet_id) {\r\n\t\t\tthrow new Error('Map container is being reused by another instance');\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\t// throws error in IE6-8\r\n\t\t\tdelete this._container._leaflet_id;\r\n\t\t\tdelete this._containerId;\r\n\t\t} catch (e) {\r\n\t\t\t/*eslint-disable */\r\n\t\t\tthis._container._leaflet_id = undefined;\r\n\t\t\t/* eslint-enable */\r\n\t\t\tthis._containerId = undefined;\r\n\t\t}\r\n\r\n\t\tif (this._locationWatchId !== undefined) {\r\n\t\t\tthis.stopLocate();\r\n\t\t}\r\n\r\n\t\tthis._stop();\r\n\r\n\t\tremove(this._mapPane);\r\n\r\n\t\tif (this._clearControlPos) {\r\n\t\t\tthis._clearControlPos();\r\n\t\t}\r\n\t\tif (this._resizeRequest) {\r\n\t\t\tcancelAnimFrame(this._resizeRequest);\r\n\t\t\tthis._resizeRequest = null;\r\n\t\t}\r\n\r\n\t\tthis._clearHandlers();\r\n\r\n\t\tif (this._loaded) {\r\n\t\t\t// @section Map state change events\r\n\t\t\t// @event unload: Event\r\n\t\t\t// Fired when the map is destroyed with [remove](#map-remove) method.\r\n\t\t\tthis.fire('unload');\r\n\t\t}\r\n\r\n\t\tvar i;\r\n\t\tfor (i in this._layers) {\r\n\t\t\tthis._layers[i].remove();\r\n\t\t}\r\n\t\tfor (i in this._panes) {\r\n\t\t\tremove(this._panes[i]);\r\n\t\t}\r\n\r\n\t\tthis._layers = [];\r\n\t\tthis._panes = [];\r\n\t\tdelete this._mapPane;\r\n\t\tdelete this._renderer;\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @section Other Methods\r\n\t// @method createPane(name: String, container?: HTMLElement): HTMLElement\r\n\t// Creates a new [map pane](#map-pane) with the given name if it doesn't exist already,\r\n\t// then returns it. The pane is created as a child of `container`, or\r\n\t// as a child of the main map pane if not set.\r\n\tcreatePane: function (name, container) {\r\n\t\tvar className = 'leaflet-pane' + (name ? ' leaflet-' + name.replace('Pane', '') + '-pane' : ''),\r\n\t\t pane = create$1('div', className, container || this._mapPane);\r\n\r\n\t\tif (name) {\r\n\t\t\tthis._panes[name] = pane;\r\n\t\t}\r\n\t\treturn pane;\r\n\t},\r\n\r\n\t// @section Methods for Getting Map State\r\n\r\n\t// @method getCenter(): LatLng\r\n\t// Returns the geographical center of the map view\r\n\tgetCenter: function () {\r\n\t\tthis._checkIfLoaded();\r\n\r\n\t\tif (this._lastCenter && !this._moved()) {\r\n\t\t\treturn this._lastCenter;\r\n\t\t}\r\n\t\treturn this.layerPointToLatLng(this._getCenterLayerPoint());\r\n\t},\r\n\r\n\t// @method getZoom(): Number\r\n\t// Returns the current zoom level of the map view\r\n\tgetZoom: function () {\r\n\t\treturn this._zoom;\r\n\t},\r\n\r\n\t// @method getBounds(): LatLngBounds\r\n\t// Returns the geographical bounds visible in the current map view\r\n\tgetBounds: function () {\r\n\t\tvar bounds = this.getPixelBounds(),\r\n\t\t sw = this.unproject(bounds.getBottomLeft()),\r\n\t\t ne = this.unproject(bounds.getTopRight());\r\n\r\n\t\treturn new LatLngBounds(sw, ne);\r\n\t},\r\n\r\n\t// @method getMinZoom(): Number\r\n\t// Returns the minimum zoom level of the map (if set in the `minZoom` option of the map or of any layers), or `0` by default.\r\n\tgetMinZoom: function () {\r\n\t\treturn this.options.minZoom === undefined ? this._layersMinZoom || 0 : this.options.minZoom;\r\n\t},\r\n\r\n\t// @method getMaxZoom(): Number\r\n\t// Returns the maximum zoom level of the map (if set in the `maxZoom` option of the map or of any layers).\r\n\tgetMaxZoom: function () {\r\n\t\treturn this.options.maxZoom === undefined ?\r\n\t\t\t(this._layersMaxZoom === undefined ? Infinity : this._layersMaxZoom) :\r\n\t\t\tthis.options.maxZoom;\r\n\t},\r\n\r\n\t// @method getBoundsZoom(bounds: LatLngBounds, inside?: Boolean, padding?: Point): Number\r\n\t// Returns the maximum zoom level on which the given bounds fit to the map\r\n\t// view in its entirety. If `inside` (optional) is set to `true`, the method\r\n\t// instead returns the minimum zoom level on which the map view fits into\r\n\t// the given bounds in its entirety.\r\n\tgetBoundsZoom: function (bounds, inside, padding) { // (LatLngBounds[, Boolean, Point]) -> Number\r\n\t\tbounds = toLatLngBounds(bounds);\r\n\t\tpadding = toPoint(padding || [0, 0]);\r\n\r\n\t\tvar zoom = this.getZoom() || 0,\r\n\t\t min = this.getMinZoom(),\r\n\t\t max = this.getMaxZoom(),\r\n\t\t nw = bounds.getNorthWest(),\r\n\t\t se = bounds.getSouthEast(),\r\n\t\t size = this.getSize().subtract(padding),\r\n\t\t boundsSize = toBounds(this.project(se, zoom), this.project(nw, zoom)).getSize(),\r\n\t\t snap = any3d ? this.options.zoomSnap : 1,\r\n\t\t scalex = size.x / boundsSize.x,\r\n\t\t scaley = size.y / boundsSize.y,\r\n\t\t scale = inside ? Math.max(scalex, scaley) : Math.min(scalex, scaley);\r\n\r\n\t\tzoom = this.getScaleZoom(scale, zoom);\r\n\r\n\t\tif (snap) {\r\n\t\t\tzoom = Math.round(zoom / (snap / 100)) * (snap / 100); // don't jump if within 1% of a snap level\r\n\t\t\tzoom = inside ? Math.ceil(zoom / snap) * snap : Math.floor(zoom / snap) * snap;\r\n\t\t}\r\n\r\n\t\treturn Math.max(min, Math.min(max, zoom));\r\n\t},\r\n\r\n\t// @method getSize(): Point\r\n\t// Returns the current size of the map container (in pixels).\r\n\tgetSize: function () {\r\n\t\tif (!this._size || this._sizeChanged) {\r\n\t\t\tthis._size = new Point(\r\n\t\t\t\tthis._container.clientWidth || 0,\r\n\t\t\t\tthis._container.clientHeight || 0);\r\n\r\n\t\t\tthis._sizeChanged = false;\r\n\t\t}\r\n\t\treturn this._size.clone();\r\n\t},\r\n\r\n\t// @method getPixelBounds(): Bounds\r\n\t// Returns the bounds of the current map view in projected pixel\r\n\t// coordinates (sometimes useful in layer and overlay implementations).\r\n\tgetPixelBounds: function (center, zoom) {\r\n\t\tvar topLeftPoint = this._getTopLeftPoint(center, zoom);\r\n\t\treturn new Bounds(topLeftPoint, topLeftPoint.add(this.getSize()));\r\n\t},\r\n\r\n\t// TODO: Check semantics - isn't the pixel origin the 0,0 coord relative to\r\n\t// the map pane? \"left point of the map layer\" can be confusing, specially\r\n\t// since there can be negative offsets.\r\n\t// @method getPixelOrigin(): Point\r\n\t// Returns the projected pixel coordinates of the top left point of\r\n\t// the map layer (useful in custom layer and overlay implementations).\r\n\tgetPixelOrigin: function () {\r\n\t\tthis._checkIfLoaded();\r\n\t\treturn this._pixelOrigin;\r\n\t},\r\n\r\n\t// @method getPixelWorldBounds(zoom?: Number): Bounds\r\n\t// Returns the world's bounds in pixel coordinates for zoom level `zoom`.\r\n\t// If `zoom` is omitted, the map's current zoom level is used.\r\n\tgetPixelWorldBounds: function (zoom) {\r\n\t\treturn this.options.crs.getProjectedBounds(zoom === undefined ? this.getZoom() : zoom);\r\n\t},\r\n\r\n\t// @section Other Methods\r\n\r\n\t// @method getPane(pane: String|HTMLElement): HTMLElement\r\n\t// Returns a [map pane](#map-pane), given its name or its HTML element (its identity).\r\n\tgetPane: function (pane) {\r\n\t\treturn typeof pane === 'string' ? this._panes[pane] : pane;\r\n\t},\r\n\r\n\t// @method getPanes(): Object\r\n\t// Returns a plain object containing the names of all [panes](#map-pane) as keys and\r\n\t// the panes as values.\r\n\tgetPanes: function () {\r\n\t\treturn this._panes;\r\n\t},\r\n\r\n\t// @method getContainer: HTMLElement\r\n\t// Returns the HTML element that contains the map.\r\n\tgetContainer: function () {\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\r\n\t// @section Conversion Methods\r\n\r\n\t// @method getZoomScale(toZoom: Number, fromZoom: Number): Number\r\n\t// Returns the scale factor to be applied to a map transition from zoom level\r\n\t// `fromZoom` to `toZoom`. Used internally to help with zoom animations.\r\n\tgetZoomScale: function (toZoom, fromZoom) {\r\n\t\t// TODO replace with universal implementation after refactoring projections\r\n\t\tvar crs = this.options.crs;\r\n\t\tfromZoom = fromZoom === undefined ? this._zoom : fromZoom;\r\n\t\treturn crs.scale(toZoom) / crs.scale(fromZoom);\r\n\t},\r\n\r\n\t// @method getScaleZoom(scale: Number, fromZoom: Number): Number\r\n\t// Returns the zoom level that the map would end up at, if it is at `fromZoom`\r\n\t// level and everything is scaled by a factor of `scale`. Inverse of\r\n\t// [`getZoomScale`](#map-getZoomScale).\r\n\tgetScaleZoom: function (scale, fromZoom) {\r\n\t\tvar crs = this.options.crs;\r\n\t\tfromZoom = fromZoom === undefined ? this._zoom : fromZoom;\r\n\t\tvar zoom = crs.zoom(scale * crs.scale(fromZoom));\r\n\t\treturn isNaN(zoom) ? Infinity : zoom;\r\n\t},\r\n\r\n\t// @method project(latlng: LatLng, zoom: Number): Point\r\n\t// Projects a geographical coordinate `LatLng` according to the projection\r\n\t// of the map's CRS, then scales it according to `zoom` and the CRS's\r\n\t// `Transformation`. The result is pixel coordinate relative to\r\n\t// the CRS origin.\r\n\tproject: function (latlng, zoom) {\r\n\t\tzoom = zoom === undefined ? this._zoom : zoom;\r\n\t\treturn this.options.crs.latLngToPoint(toLatLng(latlng), zoom);\r\n\t},\r\n\r\n\t// @method unproject(point: Point, zoom: Number): LatLng\r\n\t// Inverse of [`project`](#map-project).\r\n\tunproject: function (point, zoom) {\r\n\t\tzoom = zoom === undefined ? this._zoom : zoom;\r\n\t\treturn this.options.crs.pointToLatLng(toPoint(point), zoom);\r\n\t},\r\n\r\n\t// @method layerPointToLatLng(point: Point): LatLng\r\n\t// Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin),\r\n\t// returns the corresponding geographical coordinate (for the current zoom level).\r\n\tlayerPointToLatLng: function (point) {\r\n\t\tvar projectedPoint = toPoint(point).add(this.getPixelOrigin());\r\n\t\treturn this.unproject(projectedPoint);\r\n\t},\r\n\r\n\t// @method latLngToLayerPoint(latlng: LatLng): Point\r\n\t// Given a geographical coordinate, returns the corresponding pixel coordinate\r\n\t// relative to the [origin pixel](#map-getpixelorigin).\r\n\tlatLngToLayerPoint: function (latlng) {\r\n\t\tvar projectedPoint = this.project(toLatLng(latlng))._round();\r\n\t\treturn projectedPoint._subtract(this.getPixelOrigin());\r\n\t},\r\n\r\n\t// @method wrapLatLng(latlng: LatLng): LatLng\r\n\t// Returns a `LatLng` where `lat` and `lng` has been wrapped according to the\r\n\t// map's CRS's `wrapLat` and `wrapLng` properties, if they are outside the\r\n\t// CRS's bounds.\r\n\t// By default this means longitude is wrapped around the dateline so its\r\n\t// value is between -180 and +180 degrees.\r\n\twrapLatLng: function (latlng) {\r\n\t\treturn this.options.crs.wrapLatLng(toLatLng(latlng));\r\n\t},\r\n\r\n\t// @method wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds\r\n\t// Returns a `LatLngBounds` with the same size as the given one, ensuring that\r\n\t// its center is within the CRS's bounds.\r\n\t// By default this means the center longitude is wrapped around the dateline so its\r\n\t// value is between -180 and +180 degrees, and the majority of the bounds\r\n\t// overlaps the CRS's bounds.\r\n\twrapLatLngBounds: function (latlng) {\r\n\t\treturn this.options.crs.wrapLatLngBounds(toLatLngBounds(latlng));\r\n\t},\r\n\r\n\t// @method distance(latlng1: LatLng, latlng2: LatLng): Number\r\n\t// Returns the distance between two geographical coordinates according to\r\n\t// the map's CRS. By default this measures distance in meters.\r\n\tdistance: function (latlng1, latlng2) {\r\n\t\treturn this.options.crs.distance(toLatLng(latlng1), toLatLng(latlng2));\r\n\t},\r\n\r\n\t// @method containerPointToLayerPoint(point: Point): Point\r\n\t// Given a pixel coordinate relative to the map container, returns the corresponding\r\n\t// pixel coordinate relative to the [origin pixel](#map-getpixelorigin).\r\n\tcontainerPointToLayerPoint: function (point) { // (Point)\r\n\t\treturn toPoint(point).subtract(this._getMapPanePos());\r\n\t},\r\n\r\n\t// @method layerPointToContainerPoint(point: Point): Point\r\n\t// Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin),\r\n\t// returns the corresponding pixel coordinate relative to the map container.\r\n\tlayerPointToContainerPoint: function (point) { // (Point)\r\n\t\treturn toPoint(point).add(this._getMapPanePos());\r\n\t},\r\n\r\n\t// @method containerPointToLatLng(point: Point): LatLng\r\n\t// Given a pixel coordinate relative to the map container, returns\r\n\t// the corresponding geographical coordinate (for the current zoom level).\r\n\tcontainerPointToLatLng: function (point) {\r\n\t\tvar layerPoint = this.containerPointToLayerPoint(toPoint(point));\r\n\t\treturn this.layerPointToLatLng(layerPoint);\r\n\t},\r\n\r\n\t// @method latLngToContainerPoint(latlng: LatLng): Point\r\n\t// Given a geographical coordinate, returns the corresponding pixel coordinate\r\n\t// relative to the map container.\r\n\tlatLngToContainerPoint: function (latlng) {\r\n\t\treturn this.layerPointToContainerPoint(this.latLngToLayerPoint(toLatLng(latlng)));\r\n\t},\r\n\r\n\t// @method mouseEventToContainerPoint(ev: MouseEvent): Point\r\n\t// Given a MouseEvent object, returns the pixel coordinate relative to the\r\n\t// map container where the event took place.\r\n\tmouseEventToContainerPoint: function (e) {\r\n\t\treturn getMousePosition(e, this._container);\r\n\t},\r\n\r\n\t// @method mouseEventToLayerPoint(ev: MouseEvent): Point\r\n\t// Given a MouseEvent object, returns the pixel coordinate relative to\r\n\t// the [origin pixel](#map-getpixelorigin) where the event took place.\r\n\tmouseEventToLayerPoint: function (e) {\r\n\t\treturn this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e));\r\n\t},\r\n\r\n\t// @method mouseEventToLatLng(ev: MouseEvent): LatLng\r\n\t// Given a MouseEvent object, returns geographical coordinate where the\r\n\t// event took place.\r\n\tmouseEventToLatLng: function (e) { // (MouseEvent)\r\n\t\treturn this.layerPointToLatLng(this.mouseEventToLayerPoint(e));\r\n\t},\r\n\r\n\r\n\t// map initialization methods\r\n\r\n\t_initContainer: function (id) {\r\n\t\tvar container = this._container = get(id);\r\n\r\n\t\tif (!container) {\r\n\t\t\tthrow new Error('Map container not found.');\r\n\t\t} else if (container._leaflet_id) {\r\n\t\t\tthrow new Error('Map container is already initialized.');\r\n\t\t}\r\n\r\n\t\ton(container, 'scroll', this._onScroll, this);\r\n\t\tthis._containerId = stamp(container);\r\n\t},\r\n\r\n\t_initLayout: function () {\r\n\t\tvar container = this._container;\r\n\r\n\t\tthis._fadeAnimated = this.options.fadeAnimation && any3d;\r\n\r\n\t\taddClass(container, 'leaflet-container' +\r\n\t\t\t(touch ? ' leaflet-touch' : '') +\r\n\t\t\t(retina ? ' leaflet-retina' : '') +\r\n\t\t\t(ielt9 ? ' leaflet-oldie' : '') +\r\n\t\t\t(safari ? ' leaflet-safari' : '') +\r\n\t\t\t(this._fadeAnimated ? ' leaflet-fade-anim' : ''));\r\n\r\n\t\tvar position = getStyle(container, 'position');\r\n\r\n\t\tif (position !== 'absolute' && position !== 'relative' && position !== 'fixed') {\r\n\t\t\tcontainer.style.position = 'relative';\r\n\t\t}\r\n\r\n\t\tthis._initPanes();\r\n\r\n\t\tif (this._initControlPos) {\r\n\t\t\tthis._initControlPos();\r\n\t\t}\r\n\t},\r\n\r\n\t_initPanes: function () {\r\n\t\tvar panes = this._panes = {};\r\n\t\tthis._paneRenderers = {};\r\n\r\n\t\t// @section\r\n\t\t//\r\n\t\t// Panes are DOM elements used to control the ordering of layers on the map. You\r\n\t\t// can access panes with [`map.getPane`](#map-getpane) or\r\n\t\t// [`map.getPanes`](#map-getpanes) methods. New panes can be created with the\r\n\t\t// [`map.createPane`](#map-createpane) method.\r\n\t\t//\r\n\t\t// Every map has the following default panes that differ only in zIndex.\r\n\t\t//\r\n\t\t// @pane mapPane: HTMLElement = 'auto'\r\n\t\t// Pane that contains all other map panes\r\n\r\n\t\tthis._mapPane = this.createPane('mapPane', this._container);\r\n\t\tsetPosition(this._mapPane, new Point(0, 0));\r\n\r\n\t\t// @pane tilePane: HTMLElement = 200\r\n\t\t// Pane for `GridLayer`s and `TileLayer`s\r\n\t\tthis.createPane('tilePane');\r\n\t\t// @pane overlayPane: HTMLElement = 400\r\n\t\t// Pane for vectors (`Path`s, like `Polyline`s and `Polygon`s), `ImageOverlay`s and `VideoOverlay`s\r\n\t\tthis.createPane('shadowPane');\r\n\t\t// @pane shadowPane: HTMLElement = 500\r\n\t\t// Pane for overlay shadows (e.g. `Marker` shadows)\r\n\t\tthis.createPane('overlayPane');\r\n\t\t// @pane markerPane: HTMLElement = 600\r\n\t\t// Pane for `Icon`s of `Marker`s\r\n\t\tthis.createPane('markerPane');\r\n\t\t// @pane tooltipPane: HTMLElement = 650\r\n\t\t// Pane for `Tooltip`s.\r\n\t\tthis.createPane('tooltipPane');\r\n\t\t// @pane popupPane: HTMLElement = 700\r\n\t\t// Pane for `Popup`s.\r\n\t\tthis.createPane('popupPane');\r\n\r\n\t\tif (!this.options.markerZoomAnimation) {\r\n\t\t\taddClass(panes.markerPane, 'leaflet-zoom-hide');\r\n\t\t\taddClass(panes.shadowPane, 'leaflet-zoom-hide');\r\n\t\t}\r\n\t},\r\n\r\n\r\n\t// private methods that modify map state\r\n\r\n\t// @section Map state change events\r\n\t_resetView: function (center, zoom) {\r\n\t\tsetPosition(this._mapPane, new Point(0, 0));\r\n\r\n\t\tvar loading = !this._loaded;\r\n\t\tthis._loaded = true;\r\n\t\tzoom = this._limitZoom(zoom);\r\n\r\n\t\tthis.fire('viewprereset');\r\n\r\n\t\tvar zoomChanged = this._zoom !== zoom;\r\n\t\tthis\r\n\t\t\t._moveStart(zoomChanged, false)\r\n\t\t\t._move(center, zoom)\r\n\t\t\t._moveEnd(zoomChanged);\r\n\r\n\t\t// @event viewreset: Event\r\n\t\t// Fired when the map needs to redraw its content (this usually happens\r\n\t\t// on map zoom or load). Very useful for creating custom overlays.\r\n\t\tthis.fire('viewreset');\r\n\r\n\t\t// @event load: Event\r\n\t\t// Fired when the map is initialized (when its center and zoom are set\r\n\t\t// for the first time).\r\n\t\tif (loading) {\r\n\t\t\tthis.fire('load');\r\n\t\t}\r\n\t},\r\n\r\n\t_moveStart: function (zoomChanged, noMoveStart) {\r\n\t\t// @event zoomstart: Event\r\n\t\t// Fired when the map zoom is about to change (e.g. before zoom animation).\r\n\t\t// @event movestart: Event\r\n\t\t// Fired when the view of the map starts changing (e.g. user starts dragging the map).\r\n\t\tif (zoomChanged) {\r\n\t\t\tthis.fire('zoomstart');\r\n\t\t}\r\n\t\tif (!noMoveStart) {\r\n\t\t\tthis.fire('movestart');\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_move: function (center, zoom, data) {\r\n\t\tif (zoom === undefined) {\r\n\t\t\tzoom = this._zoom;\r\n\t\t}\r\n\t\tvar zoomChanged = this._zoom !== zoom;\r\n\r\n\t\tthis._zoom = zoom;\r\n\t\tthis._lastCenter = center;\r\n\t\tthis._pixelOrigin = this._getNewPixelOrigin(center);\r\n\r\n\t\t// @event zoom: Event\r\n\t\t// Fired repeatedly during any change in zoom level, including zoom\r\n\t\t// and fly animations.\r\n\t\tif (zoomChanged || (data && data.pinch)) {\t// Always fire 'zoom' if pinching because #3530\r\n\t\t\tthis.fire('zoom', data);\r\n\t\t}\r\n\r\n\t\t// @event move: Event\r\n\t\t// Fired repeatedly during any movement of the map, including pan and\r\n\t\t// fly animations.\r\n\t\treturn this.fire('move', data);\r\n\t},\r\n\r\n\t_moveEnd: function (zoomChanged) {\r\n\t\t// @event zoomend: Event\r\n\t\t// Fired when the map has changed, after any animations.\r\n\t\tif (zoomChanged) {\r\n\t\t\tthis.fire('zoomend');\r\n\t\t}\r\n\r\n\t\t// @event moveend: Event\r\n\t\t// Fired when the center of the map stops changing (e.g. user stopped\r\n\t\t// dragging the map).\r\n\t\treturn this.fire('moveend');\r\n\t},\r\n\r\n\t_stop: function () {\r\n\t\tcancelAnimFrame(this._flyToFrame);\r\n\t\tif (this._panAnim) {\r\n\t\t\tthis._panAnim.stop();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_rawPanBy: function (offset) {\r\n\t\tsetPosition(this._mapPane, this._getMapPanePos().subtract(offset));\r\n\t},\r\n\r\n\t_getZoomSpan: function () {\r\n\t\treturn this.getMaxZoom() - this.getMinZoom();\r\n\t},\r\n\r\n\t_panInsideMaxBounds: function () {\r\n\t\tif (!this._enforcingBounds) {\r\n\t\t\tthis.panInsideBounds(this.options.maxBounds);\r\n\t\t}\r\n\t},\r\n\r\n\t_checkIfLoaded: function () {\r\n\t\tif (!this._loaded) {\r\n\t\t\tthrow new Error('Set map center and zoom first.');\r\n\t\t}\r\n\t},\r\n\r\n\t// DOM event handling\r\n\r\n\t// @section Interaction events\r\n\t_initEvents: function (remove$$1) {\r\n\t\tthis._targets = {};\r\n\t\tthis._targets[stamp(this._container)] = this;\r\n\r\n\t\tvar onOff = remove$$1 ? off : on;\r\n\r\n\t\t// @event click: MouseEvent\r\n\t\t// Fired when the user clicks (or taps) the map.\r\n\t\t// @event dblclick: MouseEvent\r\n\t\t// Fired when the user double-clicks (or double-taps) the map.\r\n\t\t// @event mousedown: MouseEvent\r\n\t\t// Fired when the user pushes the mouse button on the map.\r\n\t\t// @event mouseup: MouseEvent\r\n\t\t// Fired when the user releases the mouse button on the map.\r\n\t\t// @event mouseover: MouseEvent\r\n\t\t// Fired when the mouse enters the map.\r\n\t\t// @event mouseout: MouseEvent\r\n\t\t// Fired when the mouse leaves the map.\r\n\t\t// @event mousemove: MouseEvent\r\n\t\t// Fired while the mouse moves over the map.\r\n\t\t// @event contextmenu: MouseEvent\r\n\t\t// Fired when the user pushes the right mouse button on the map, prevents\r\n\t\t// default browser context menu from showing if there are listeners on\r\n\t\t// this event. Also fired on mobile when the user holds a single touch\r\n\t\t// for a second (also called long press).\r\n\t\t// @event keypress: KeyboardEvent\r\n\t\t// Fired when the user presses a key from the keyboard that produces a character value while the map is focused.\r\n\t\t// @event keydown: KeyboardEvent\r\n\t\t// Fired when the user presses a key from the keyboard while the map is focused. Unlike the `keypress` event,\r\n\t\t// the `keydown` event is fired for keys that produce a character value and for keys\r\n\t\t// that do not produce a character value.\r\n\t\t// @event keyup: KeyboardEvent\r\n\t\t// Fired when the user releases a key from the keyboard while the map is focused.\r\n\t\tonOff(this._container, 'click dblclick mousedown mouseup ' +\r\n\t\t\t'mouseover mouseout mousemove contextmenu keypress keydown keyup', this._handleDOMEvent, this);\r\n\r\n\t\tif (this.options.trackResize) {\r\n\t\t\tonOff(window, 'resize', this._onResize, this);\r\n\t\t}\r\n\r\n\t\tif (any3d && this.options.transform3DLimit) {\r\n\t\t\t(remove$$1 ? this.off : this.on).call(this, 'moveend', this._onMoveEnd);\r\n\t\t}\r\n\t},\r\n\r\n\t_onResize: function () {\r\n\t\tcancelAnimFrame(this._resizeRequest);\r\n\t\tthis._resizeRequest = requestAnimFrame(\r\n\t\t function () { this.invalidateSize({debounceMoveend: true}); }, this);\r\n\t},\r\n\r\n\t_onScroll: function () {\r\n\t\tthis._container.scrollTop = 0;\r\n\t\tthis._container.scrollLeft = 0;\r\n\t},\r\n\r\n\t_onMoveEnd: function () {\r\n\t\tvar pos = this._getMapPanePos();\r\n\t\tif (Math.max(Math.abs(pos.x), Math.abs(pos.y)) >= this.options.transform3DLimit) {\r\n\t\t\t// https://bugzilla.mozilla.org/show_bug.cgi?id=1203873 but Webkit also have\r\n\t\t\t// a pixel offset on very high values, see: http://jsfiddle.net/dg6r5hhb/\r\n\t\t\tthis._resetView(this.getCenter(), this.getZoom());\r\n\t\t}\r\n\t},\r\n\r\n\t_findEventTargets: function (e, type) {\r\n\t\tvar targets = [],\r\n\t\t target,\r\n\t\t isHover = type === 'mouseout' || type === 'mouseover',\r\n\t\t src = e.target || e.srcElement,\r\n\t\t dragging = false;\r\n\r\n\t\twhile (src) {\r\n\t\t\ttarget = this._targets[stamp(src)];\r\n\t\t\tif (target && (type === 'click' || type === 'preclick') && !e._simulated && this._draggableMoved(target)) {\r\n\t\t\t\t// Prevent firing click after you just dragged an object.\r\n\t\t\t\tdragging = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (target && target.listens(type, true)) {\r\n\t\t\t\tif (isHover && !isExternalTarget(src, e)) { break; }\r\n\t\t\t\ttargets.push(target);\r\n\t\t\t\tif (isHover) { break; }\r\n\t\t\t}\r\n\t\t\tif (src === this._container) { break; }\r\n\t\t\tsrc = src.parentNode;\r\n\t\t}\r\n\t\tif (!targets.length && !dragging && !isHover && isExternalTarget(src, e)) {\r\n\t\t\ttargets = [this];\r\n\t\t}\r\n\t\treturn targets;\r\n\t},\r\n\r\n\t_handleDOMEvent: function (e) {\r\n\t\tif (!this._loaded || skipped(e)) { return; }\r\n\r\n\t\tvar type = e.type;\r\n\r\n\t\tif (type === 'mousedown' || type === 'keypress' || type === 'keyup' || type === 'keydown') {\r\n\t\t\t// prevents outline when clicking on keyboard-focusable element\r\n\t\t\tpreventOutline(e.target || e.srcElement);\r\n\t\t}\r\n\r\n\t\tthis._fireDOMEvent(e, type);\r\n\t},\r\n\r\n\t_mouseEvents: ['click', 'dblclick', 'mouseover', 'mouseout', 'contextmenu'],\r\n\r\n\t_fireDOMEvent: function (e, type, targets) {\r\n\r\n\t\tif (e.type === 'click') {\r\n\t\t\t// Fire a synthetic 'preclick' event which propagates up (mainly for closing popups).\r\n\t\t\t// @event preclick: MouseEvent\r\n\t\t\t// Fired before mouse click on the map (sometimes useful when you\r\n\t\t\t// want something to happen on click before any existing click\r\n\t\t\t// handlers start running).\r\n\t\t\tvar synth = extend({}, e);\r\n\t\t\tsynth.type = 'preclick';\r\n\t\t\tthis._fireDOMEvent(synth, synth.type, targets);\r\n\t\t}\r\n\r\n\t\tif (e._stopped) { return; }\r\n\r\n\t\t// Find the layer the event is propagating from and its parents.\r\n\t\ttargets = (targets || []).concat(this._findEventTargets(e, type));\r\n\r\n\t\tif (!targets.length) { return; }\r\n\r\n\t\tvar target = targets[0];\r\n\t\tif (type === 'contextmenu' && target.listens(type, true)) {\r\n\t\t\tpreventDefault(e);\r\n\t\t}\r\n\r\n\t\tvar data = {\r\n\t\t\toriginalEvent: e\r\n\t\t};\r\n\r\n\t\tif (e.type !== 'keypress' && e.type !== 'keydown' && e.type !== 'keyup') {\r\n\t\t\tvar isMarker = target.getLatLng && (!target._radius || target._radius <= 10);\r\n\t\t\tdata.containerPoint = isMarker ?\r\n\t\t\t\tthis.latLngToContainerPoint(target.getLatLng()) : this.mouseEventToContainerPoint(e);\r\n\t\t\tdata.layerPoint = this.containerPointToLayerPoint(data.containerPoint);\r\n\t\t\tdata.latlng = isMarker ? target.getLatLng() : this.layerPointToLatLng(data.layerPoint);\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < targets.length; i++) {\r\n\t\t\ttargets[i].fire(type, data, true);\r\n\t\t\tif (data.originalEvent._stopped ||\r\n\t\t\t\t(targets[i].options.bubblingMouseEvents === false && indexOf(this._mouseEvents, type) !== -1)) { return; }\r\n\t\t}\r\n\t},\r\n\r\n\t_draggableMoved: function (obj) {\r\n\t\tobj = obj.dragging && obj.dragging.enabled() ? obj : this;\r\n\t\treturn (obj.dragging && obj.dragging.moved()) || (this.boxZoom && this.boxZoom.moved());\r\n\t},\r\n\r\n\t_clearHandlers: function () {\r\n\t\tfor (var i = 0, len = this._handlers.length; i < len; i++) {\r\n\t\t\tthis._handlers[i].disable();\r\n\t\t}\r\n\t},\r\n\r\n\t// @section Other Methods\r\n\r\n\t// @method whenReady(fn: Function, context?: Object): this\r\n\t// Runs the given function `fn` when the map gets initialized with\r\n\t// a view (center and zoom) and at least one layer, or immediately\r\n\t// if it's already initialized, optionally passing a function context.\r\n\twhenReady: function (callback, context) {\r\n\t\tif (this._loaded) {\r\n\t\t\tcallback.call(context || this, {target: this});\r\n\t\t} else {\r\n\t\t\tthis.on('load', callback, context);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\r\n\t// private methods for getting map state\r\n\r\n\t_getMapPanePos: function () {\r\n\t\treturn getPosition(this._mapPane) || new Point(0, 0);\r\n\t},\r\n\r\n\t_moved: function () {\r\n\t\tvar pos = this._getMapPanePos();\r\n\t\treturn pos && !pos.equals([0, 0]);\r\n\t},\r\n\r\n\t_getTopLeftPoint: function (center, zoom) {\r\n\t\tvar pixelOrigin = center && zoom !== undefined ?\r\n\t\t\tthis._getNewPixelOrigin(center, zoom) :\r\n\t\t\tthis.getPixelOrigin();\r\n\t\treturn pixelOrigin.subtract(this._getMapPanePos());\r\n\t},\r\n\r\n\t_getNewPixelOrigin: function (center, zoom) {\r\n\t\tvar viewHalf = this.getSize()._divideBy(2);\r\n\t\treturn this.project(center, zoom)._subtract(viewHalf)._add(this._getMapPanePos())._round();\r\n\t},\r\n\r\n\t_latLngToNewLayerPoint: function (latlng, zoom, center) {\r\n\t\tvar topLeft = this._getNewPixelOrigin(center, zoom);\r\n\t\treturn this.project(latlng, zoom)._subtract(topLeft);\r\n\t},\r\n\r\n\t_latLngBoundsToNewLayerBounds: function (latLngBounds, zoom, center) {\r\n\t\tvar topLeft = this._getNewPixelOrigin(center, zoom);\r\n\t\treturn toBounds([\r\n\t\t\tthis.project(latLngBounds.getSouthWest(), zoom)._subtract(topLeft),\r\n\t\t\tthis.project(latLngBounds.getNorthWest(), zoom)._subtract(topLeft),\r\n\t\t\tthis.project(latLngBounds.getSouthEast(), zoom)._subtract(topLeft),\r\n\t\t\tthis.project(latLngBounds.getNorthEast(), zoom)._subtract(topLeft)\r\n\t\t]);\r\n\t},\r\n\r\n\t// layer point of the current center\r\n\t_getCenterLayerPoint: function () {\r\n\t\treturn this.containerPointToLayerPoint(this.getSize()._divideBy(2));\r\n\t},\r\n\r\n\t// offset of the specified place to the current center in pixels\r\n\t_getCenterOffset: function (latlng) {\r\n\t\treturn this.latLngToLayerPoint(latlng).subtract(this._getCenterLayerPoint());\r\n\t},\r\n\r\n\t// adjust center for view to get inside bounds\r\n\t_limitCenter: function (center, zoom, bounds) {\r\n\r\n\t\tif (!bounds) { return center; }\r\n\r\n\t\tvar centerPoint = this.project(center, zoom),\r\n\t\t viewHalf = this.getSize().divideBy(2),\r\n\t\t viewBounds = new Bounds(centerPoint.subtract(viewHalf), centerPoint.add(viewHalf)),\r\n\t\t offset = this._getBoundsOffset(viewBounds, bounds, zoom);\r\n\r\n\t\t// If offset is less than a pixel, ignore.\r\n\t\t// This prevents unstable projections from getting into\r\n\t\t// an infinite loop of tiny offsets.\r\n\t\tif (offset.round().equals([0, 0])) {\r\n\t\t\treturn center;\r\n\t\t}\r\n\r\n\t\treturn this.unproject(centerPoint.add(offset), zoom);\r\n\t},\r\n\r\n\t// adjust offset for view to get inside bounds\r\n\t_limitOffset: function (offset, bounds) {\r\n\t\tif (!bounds) { return offset; }\r\n\r\n\t\tvar viewBounds = this.getPixelBounds(),\r\n\t\t newBounds = new Bounds(viewBounds.min.add(offset), viewBounds.max.add(offset));\r\n\r\n\t\treturn offset.add(this._getBoundsOffset(newBounds, bounds));\r\n\t},\r\n\r\n\t// returns offset needed for pxBounds to get inside maxBounds at a specified zoom\r\n\t_getBoundsOffset: function (pxBounds, maxBounds, zoom) {\r\n\t\tvar projectedMaxBounds = toBounds(\r\n\t\t this.project(maxBounds.getNorthEast(), zoom),\r\n\t\t this.project(maxBounds.getSouthWest(), zoom)\r\n\t\t ),\r\n\t\t minOffset = projectedMaxBounds.min.subtract(pxBounds.min),\r\n\t\t maxOffset = projectedMaxBounds.max.subtract(pxBounds.max),\r\n\r\n\t\t dx = this._rebound(minOffset.x, -maxOffset.x),\r\n\t\t dy = this._rebound(minOffset.y, -maxOffset.y);\r\n\r\n\t\treturn new Point(dx, dy);\r\n\t},\r\n\r\n\t_rebound: function (left, right) {\r\n\t\treturn left + right > 0 ?\r\n\t\t\tMath.round(left - right) / 2 :\r\n\t\t\tMath.max(0, Math.ceil(left)) - Math.max(0, Math.floor(right));\r\n\t},\r\n\r\n\t_limitZoom: function (zoom) {\r\n\t\tvar min = this.getMinZoom(),\r\n\t\t max = this.getMaxZoom(),\r\n\t\t snap = any3d ? this.options.zoomSnap : 1;\r\n\t\tif (snap) {\r\n\t\t\tzoom = Math.round(zoom / snap) * snap;\r\n\t\t}\r\n\t\treturn Math.max(min, Math.min(max, zoom));\r\n\t},\r\n\r\n\t_onPanTransitionStep: function () {\r\n\t\tthis.fire('move');\r\n\t},\r\n\r\n\t_onPanTransitionEnd: function () {\r\n\t\tremoveClass(this._mapPane, 'leaflet-pan-anim');\r\n\t\tthis.fire('moveend');\r\n\t},\r\n\r\n\t_tryAnimatedPan: function (center, options) {\r\n\t\t// difference between the new and current centers in pixels\r\n\t\tvar offset = this._getCenterOffset(center)._trunc();\r\n\r\n\t\t// don't animate too far unless animate: true specified in options\r\n\t\tif ((options && options.animate) !== true && !this.getSize().contains(offset)) { return false; }\r\n\r\n\t\tthis.panBy(offset, options);\r\n\r\n\t\treturn true;\r\n\t},\r\n\r\n\t_createAnimProxy: function () {\r\n\r\n\t\tvar proxy = this._proxy = create$1('div', 'leaflet-proxy leaflet-zoom-animated');\r\n\t\tthis._panes.mapPane.appendChild(proxy);\r\n\r\n\t\tthis.on('zoomanim', function (e) {\r\n\t\t\tvar prop = TRANSFORM,\r\n\t\t\t transform = this._proxy.style[prop];\r\n\r\n\t\t\tsetTransform(this._proxy, this.project(e.center, e.zoom), this.getZoomScale(e.zoom, 1));\r\n\r\n\t\t\t// workaround for case when transform is the same and so transitionend event is not fired\r\n\t\t\tif (transform === this._proxy.style[prop] && this._animatingZoom) {\r\n\t\t\t\tthis._onZoomTransitionEnd();\r\n\t\t\t}\r\n\t\t}, this);\r\n\r\n\t\tthis.on('load moveend', this._animMoveEnd, this);\r\n\r\n\t\tthis._on('unload', this._destroyAnimProxy, this);\r\n\t},\r\n\r\n\t_destroyAnimProxy: function () {\r\n\t\tremove(this._proxy);\r\n\t\tthis.off('load moveend', this._animMoveEnd, this);\r\n\t\tdelete this._proxy;\r\n\t},\r\n\r\n\t_animMoveEnd: function () {\r\n\t\tvar c = this.getCenter(),\r\n\t\t z = this.getZoom();\r\n\t\tsetTransform(this._proxy, this.project(c, z), this.getZoomScale(z, 1));\r\n\t},\r\n\r\n\t_catchTransitionEnd: function (e) {\r\n\t\tif (this._animatingZoom && e.propertyName.indexOf('transform') >= 0) {\r\n\t\t\tthis._onZoomTransitionEnd();\r\n\t\t}\r\n\t},\r\n\r\n\t_nothingToAnimate: function () {\r\n\t\treturn !this._container.getElementsByClassName('leaflet-zoom-animated').length;\r\n\t},\r\n\r\n\t_tryAnimatedZoom: function (center, zoom, options) {\r\n\r\n\t\tif (this._animatingZoom) { return true; }\r\n\r\n\t\toptions = options || {};\r\n\r\n\t\t// don't animate if disabled, not supported or zoom difference is too large\r\n\t\tif (!this._zoomAnimated || options.animate === false || this._nothingToAnimate() ||\r\n\t\t Math.abs(zoom - this._zoom) > this.options.zoomAnimationThreshold) { return false; }\r\n\r\n\t\t// offset is the pixel coords of the zoom origin relative to the current center\r\n\t\tvar scale = this.getZoomScale(zoom),\r\n\t\t offset = this._getCenterOffset(center)._divideBy(1 - 1 / scale);\r\n\r\n\t\t// don't animate if the zoom origin isn't within one screen from the current center, unless forced\r\n\t\tif (options.animate !== true && !this.getSize().contains(offset)) { return false; }\r\n\r\n\t\trequestAnimFrame(function () {\r\n\t\t\tthis\r\n\t\t\t ._moveStart(true, false)\r\n\t\t\t ._animateZoom(center, zoom, true);\r\n\t\t}, this);\r\n\r\n\t\treturn true;\r\n\t},\r\n\r\n\t_animateZoom: function (center, zoom, startAnim, noUpdate) {\r\n\t\tif (!this._mapPane) { return; }\r\n\r\n\t\tif (startAnim) {\r\n\t\t\tthis._animatingZoom = true;\r\n\r\n\t\t\t// remember what center/zoom to set after animation\r\n\t\t\tthis._animateToCenter = center;\r\n\t\t\tthis._animateToZoom = zoom;\r\n\r\n\t\t\taddClass(this._mapPane, 'leaflet-zoom-anim');\r\n\t\t}\r\n\r\n\t\t// @section Other Events\r\n\t\t// @event zoomanim: ZoomAnimEvent\r\n\t\t// Fired at least once per zoom animation. For continuous zoom, like pinch zooming, fired once per frame during zoom.\r\n\t\tthis.fire('zoomanim', {\r\n\t\t\tcenter: center,\r\n\t\t\tzoom: zoom,\r\n\t\t\tnoUpdate: noUpdate\r\n\t\t});\r\n\r\n\t\t// Work around webkit not firing 'transitionend', see https://github.com/Leaflet/Leaflet/issues/3689, 2693\r\n\t\tsetTimeout(bind(this._onZoomTransitionEnd, this), 250);\r\n\t},\r\n\r\n\t_onZoomTransitionEnd: function () {\r\n\t\tif (!this._animatingZoom) { return; }\r\n\r\n\t\tif (this._mapPane) {\r\n\t\t\tremoveClass(this._mapPane, 'leaflet-zoom-anim');\r\n\t\t}\r\n\r\n\t\tthis._animatingZoom = false;\r\n\r\n\t\tthis._move(this._animateToCenter, this._animateToZoom);\r\n\r\n\t\t// This anim frame should prevent an obscure iOS webkit tile loading race condition.\r\n\t\trequestAnimFrame(function () {\r\n\t\t\tthis._moveEnd(true);\r\n\t\t}, this);\r\n\t}\r\n});\r\n\r\n// @section\r\n\r\n// @factory L.map(id: String, options?: Map options)\r\n// Instantiates a map object given the DOM ID of a `
` element\r\n// and optionally an object literal with `Map options`.\r\n//\r\n// @alternative\r\n// @factory L.map(el: HTMLElement, options?: Map options)\r\n// Instantiates a map object given an instance of a `
` HTML element\r\n// and optionally an object literal with `Map options`.\r\nfunction createMap(id, options) {\r\n\treturn new Map(id, options);\r\n}\n\n/*\r\n * @class Control\r\n * @aka L.Control\r\n * @inherits Class\r\n *\r\n * L.Control is a base class for implementing map controls. Handles positioning.\r\n * All other controls extend from this class.\r\n */\r\n\r\nvar Control = Class.extend({\r\n\t// @section\r\n\t// @aka Control options\r\n\toptions: {\r\n\t\t// @option position: String = 'topright'\r\n\t\t// The position of the control (one of the map corners). Possible values are `'topleft'`,\r\n\t\t// `'topright'`, `'bottomleft'` or `'bottomright'`\r\n\t\tposition: 'topright'\r\n\t},\r\n\r\n\tinitialize: function (options) {\r\n\t\tsetOptions(this, options);\r\n\t},\r\n\r\n\t/* @section\r\n\t * Classes extending L.Control will inherit the following methods:\r\n\t *\r\n\t * @method getPosition: string\r\n\t * Returns the position of the control.\r\n\t */\r\n\tgetPosition: function () {\r\n\t\treturn this.options.position;\r\n\t},\r\n\r\n\t// @method setPosition(position: string): this\r\n\t// Sets the position of the control.\r\n\tsetPosition: function (position) {\r\n\t\tvar map = this._map;\r\n\r\n\t\tif (map) {\r\n\t\t\tmap.removeControl(this);\r\n\t\t}\r\n\r\n\t\tthis.options.position = position;\r\n\r\n\t\tif (map) {\r\n\t\t\tmap.addControl(this);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getContainer: HTMLElement\r\n\t// Returns the HTMLElement that contains the control.\r\n\tgetContainer: function () {\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\t// @method addTo(map: Map): this\r\n\t// Adds the control to the given map.\r\n\taddTo: function (map) {\r\n\t\tthis.remove();\r\n\t\tthis._map = map;\r\n\r\n\t\tvar container = this._container = this.onAdd(map),\r\n\t\t pos = this.getPosition(),\r\n\t\t corner = map._controlCorners[pos];\r\n\r\n\t\taddClass(container, 'leaflet-control');\r\n\r\n\t\tif (pos.indexOf('bottom') !== -1) {\r\n\t\t\tcorner.insertBefore(container, corner.firstChild);\r\n\t\t} else {\r\n\t\t\tcorner.appendChild(container);\r\n\t\t}\r\n\r\n\t\tthis._map.on('unload', this.remove, this);\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method remove: this\r\n\t// Removes the control from the map it is currently active on.\r\n\tremove: function () {\r\n\t\tif (!this._map) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tremove(this._container);\r\n\r\n\t\tif (this.onRemove) {\r\n\t\t\tthis.onRemove(this._map);\r\n\t\t}\r\n\r\n\t\tthis._map.off('unload', this.remove, this);\r\n\t\tthis._map = null;\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_refocusOnMap: function (e) {\r\n\t\t// if map exists and event is not a keyboard event\r\n\t\tif (this._map && e && e.screenX > 0 && e.screenY > 0) {\r\n\t\t\tthis._map.getContainer().focus();\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar control = function (options) {\r\n\treturn new Control(options);\r\n};\r\n\r\n/* @section Extension methods\r\n * @uninheritable\r\n *\r\n * Every control should extend from `L.Control` and (re-)implement the following methods.\r\n *\r\n * @method onAdd(map: Map): HTMLElement\r\n * Should return the container DOM element for the control and add listeners on relevant map events. Called on [`control.addTo(map)`](#control-addTo).\r\n *\r\n * @method onRemove(map: Map)\r\n * Optional method. Should contain all clean up code that removes the listeners previously added in [`onAdd`](#control-onadd). Called on [`control.remove()`](#control-remove).\r\n */\r\n\r\n/* @namespace Map\r\n * @section Methods for Layers and Controls\r\n */\r\nMap.include({\r\n\t// @method addControl(control: Control): this\r\n\t// Adds the given control to the map\r\n\taddControl: function (control) {\r\n\t\tcontrol.addTo(this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method removeControl(control: Control): this\r\n\t// Removes the given control from the map\r\n\tremoveControl: function (control) {\r\n\t\tcontrol.remove();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_initControlPos: function () {\r\n\t\tvar corners = this._controlCorners = {},\r\n\t\t l = 'leaflet-',\r\n\t\t container = this._controlContainer =\r\n\t\t create$1('div', l + 'control-container', this._container);\r\n\r\n\t\tfunction createCorner(vSide, hSide) {\r\n\t\t\tvar className = l + vSide + ' ' + l + hSide;\r\n\r\n\t\t\tcorners[vSide + hSide] = create$1('div', className, container);\r\n\t\t}\r\n\r\n\t\tcreateCorner('top', 'left');\r\n\t\tcreateCorner('top', 'right');\r\n\t\tcreateCorner('bottom', 'left');\r\n\t\tcreateCorner('bottom', 'right');\r\n\t},\r\n\r\n\t_clearControlPos: function () {\r\n\t\tfor (var i in this._controlCorners) {\r\n\t\t\tremove(this._controlCorners[i]);\r\n\t\t}\r\n\t\tremove(this._controlContainer);\r\n\t\tdelete this._controlCorners;\r\n\t\tdelete this._controlContainer;\r\n\t}\r\n});\n\n/*\r\n * @class Control.Layers\r\n * @aka L.Control.Layers\r\n * @inherits Control\r\n *\r\n * The layers control gives users the ability to switch between different base layers and switch overlays on/off (check out the [detailed example](http://leafletjs.com/examples/layers-control/)). Extends `Control`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var baseLayers = {\r\n * \t\"Mapbox\": mapbox,\r\n * \t\"OpenStreetMap\": osm\r\n * };\r\n *\r\n * var overlays = {\r\n * \t\"Marker\": marker,\r\n * \t\"Roads\": roadsLayer\r\n * };\r\n *\r\n * L.control.layers(baseLayers, overlays).addTo(map);\r\n * ```\r\n *\r\n * The `baseLayers` and `overlays` parameters are object literals with layer names as keys and `Layer` objects as values:\r\n *\r\n * ```js\r\n * {\r\n * \"\": layer1,\r\n * \"\": layer2\r\n * }\r\n * ```\r\n *\r\n * The layer names can contain HTML, which allows you to add additional styling to the items:\r\n *\r\n * ```js\r\n * {\" My Layer\": myLayer}\r\n * ```\r\n */\r\n\r\nvar Layers = Control.extend({\r\n\t// @section\r\n\t// @aka Control.Layers options\r\n\toptions: {\r\n\t\t// @option collapsed: Boolean = true\r\n\t\t// If `true`, the control will be collapsed into an icon and expanded on mouse hover or touch.\r\n\t\tcollapsed: true,\r\n\t\tposition: 'topright',\r\n\r\n\t\t// @option autoZIndex: Boolean = true\r\n\t\t// If `true`, the control will assign zIndexes in increasing order to all of its layers so that the order is preserved when switching them on/off.\r\n\t\tautoZIndex: true,\r\n\r\n\t\t// @option hideSingleBase: Boolean = false\r\n\t\t// If `true`, the base layers in the control will be hidden when there is only one.\r\n\t\thideSingleBase: false,\r\n\r\n\t\t// @option sortLayers: Boolean = false\r\n\t\t// Whether to sort the layers. When `false`, layers will keep the order\r\n\t\t// in which they were added to the control.\r\n\t\tsortLayers: false,\r\n\r\n\t\t// @option sortFunction: Function = *\r\n\t\t// A [compare function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)\r\n\t\t// that will be used for sorting the layers, when `sortLayers` is `true`.\r\n\t\t// The function receives both the `L.Layer` instances and their names, as in\r\n\t\t// `sortFunction(layerA, layerB, nameA, nameB)`.\r\n\t\t// By default, it sorts layers alphabetically by their name.\r\n\t\tsortFunction: function (layerA, layerB, nameA, nameB) {\r\n\t\t\treturn nameA < nameB ? -1 : (nameB < nameA ? 1 : 0);\r\n\t\t}\r\n\t},\r\n\r\n\tinitialize: function (baseLayers, overlays, options) {\r\n\t\tsetOptions(this, options);\r\n\r\n\t\tthis._layerControlInputs = [];\r\n\t\tthis._layers = [];\r\n\t\tthis._lastZIndex = 0;\r\n\t\tthis._handlingClick = false;\r\n\r\n\t\tfor (var i in baseLayers) {\r\n\t\t\tthis._addLayer(baseLayers[i], i);\r\n\t\t}\r\n\r\n\t\tfor (i in overlays) {\r\n\t\t\tthis._addLayer(overlays[i], i, true);\r\n\t\t}\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tthis._initLayout();\r\n\t\tthis._update();\r\n\r\n\t\tthis._map = map;\r\n\t\tmap.on('zoomend', this._checkDisabledLayers, this);\r\n\r\n\t\tfor (var i = 0; i < this._layers.length; i++) {\r\n\t\t\tthis._layers[i].layer.on('add remove', this._onLayerChange, this);\r\n\t\t}\r\n\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\taddTo: function (map) {\r\n\t\tControl.prototype.addTo.call(this, map);\r\n\t\t// Trigger expand after Layers Control has been inserted into DOM so that is now has an actual height.\r\n\t\treturn this._expandIfNotCollapsed();\r\n\t},\r\n\r\n\tonRemove: function () {\r\n\t\tthis._map.off('zoomend', this._checkDisabledLayers, this);\r\n\r\n\t\tfor (var i = 0; i < this._layers.length; i++) {\r\n\t\t\tthis._layers[i].layer.off('add remove', this._onLayerChange, this);\r\n\t\t}\r\n\t},\r\n\r\n\t// @method addBaseLayer(layer: Layer, name: String): this\r\n\t// Adds a base layer (radio button entry) with the given name to the control.\r\n\taddBaseLayer: function (layer, name) {\r\n\t\tthis._addLayer(layer, name);\r\n\t\treturn (this._map) ? this._update() : this;\r\n\t},\r\n\r\n\t// @method addOverlay(layer: Layer, name: String): this\r\n\t// Adds an overlay (checkbox entry) with the given name to the control.\r\n\taddOverlay: function (layer, name) {\r\n\t\tthis._addLayer(layer, name, true);\r\n\t\treturn (this._map) ? this._update() : this;\r\n\t},\r\n\r\n\t// @method removeLayer(layer: Layer): this\r\n\t// Remove the given layer from the control.\r\n\tremoveLayer: function (layer) {\r\n\t\tlayer.off('add remove', this._onLayerChange, this);\r\n\r\n\t\tvar obj = this._getLayer(stamp(layer));\r\n\t\tif (obj) {\r\n\t\t\tthis._layers.splice(this._layers.indexOf(obj), 1);\r\n\t\t}\r\n\t\treturn (this._map) ? this._update() : this;\r\n\t},\r\n\r\n\t// @method expand(): this\r\n\t// Expand the control container if collapsed.\r\n\texpand: function () {\r\n\t\taddClass(this._container, 'leaflet-control-layers-expanded');\r\n\t\tthis._section.style.height = null;\r\n\t\tvar acceptableHeight = this._map.getSize().y - (this._container.offsetTop + 50);\r\n\t\tif (acceptableHeight < this._section.clientHeight) {\r\n\t\t\taddClass(this._section, 'leaflet-control-layers-scrollbar');\r\n\t\t\tthis._section.style.height = acceptableHeight + 'px';\r\n\t\t} else {\r\n\t\t\tremoveClass(this._section, 'leaflet-control-layers-scrollbar');\r\n\t\t}\r\n\t\tthis._checkDisabledLayers();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method collapse(): this\r\n\t// Collapse the control container if expanded.\r\n\tcollapse: function () {\r\n\t\tremoveClass(this._container, 'leaflet-control-layers-expanded');\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_initLayout: function () {\r\n\t\tvar className = 'leaflet-control-layers',\r\n\t\t container = this._container = create$1('div', className),\r\n\t\t collapsed = this.options.collapsed;\r\n\r\n\t\t// makes this work on IE touch devices by stopping it from firing a mouseout event when the touch is released\r\n\t\tcontainer.setAttribute('aria-haspopup', true);\r\n\r\n\t\tdisableClickPropagation(container);\r\n\t\tdisableScrollPropagation(container);\r\n\r\n\t\tvar section = this._section = create$1('section', className + '-list');\r\n\r\n\t\tif (collapsed) {\r\n\t\t\tthis._map.on('click', this.collapse, this);\r\n\r\n\t\t\tif (!android) {\r\n\t\t\t\ton(container, {\r\n\t\t\t\t\tmouseenter: this.expand,\r\n\t\t\t\t\tmouseleave: this.collapse\r\n\t\t\t\t}, this);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar link = this._layersLink = create$1('a', className + '-toggle', container);\r\n\t\tlink.href = '#';\r\n\t\tlink.title = 'Layers';\r\n\r\n\t\tif (touch) {\r\n\t\t\ton(link, 'click', stop);\r\n\t\t\ton(link, 'click', this.expand, this);\r\n\t\t} else {\r\n\t\t\ton(link, 'focus', this.expand, this);\r\n\t\t}\r\n\r\n\t\tif (!collapsed) {\r\n\t\t\tthis.expand();\r\n\t\t}\r\n\r\n\t\tthis._baseLayersList = create$1('div', className + '-base', section);\r\n\t\tthis._separator = create$1('div', className + '-separator', section);\r\n\t\tthis._overlaysList = create$1('div', className + '-overlays', section);\r\n\r\n\t\tcontainer.appendChild(section);\r\n\t},\r\n\r\n\t_getLayer: function (id) {\r\n\t\tfor (var i = 0; i < this._layers.length; i++) {\r\n\r\n\t\t\tif (this._layers[i] && stamp(this._layers[i].layer) === id) {\r\n\t\t\t\treturn this._layers[i];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_addLayer: function (layer, name, overlay) {\r\n\t\tif (this._map) {\r\n\t\t\tlayer.on('add remove', this._onLayerChange, this);\r\n\t\t}\r\n\r\n\t\tthis._layers.push({\r\n\t\t\tlayer: layer,\r\n\t\t\tname: name,\r\n\t\t\toverlay: overlay\r\n\t\t});\r\n\r\n\t\tif (this.options.sortLayers) {\r\n\t\t\tthis._layers.sort(bind(function (a, b) {\r\n\t\t\t\treturn this.options.sortFunction(a.layer, b.layer, a.name, b.name);\r\n\t\t\t}, this));\r\n\t\t}\r\n\r\n\t\tif (this.options.autoZIndex && layer.setZIndex) {\r\n\t\t\tthis._lastZIndex++;\r\n\t\t\tlayer.setZIndex(this._lastZIndex);\r\n\t\t}\r\n\r\n\t\tthis._expandIfNotCollapsed();\r\n\t},\r\n\r\n\t_update: function () {\r\n\t\tif (!this._container) { return this; }\r\n\r\n\t\tempty(this._baseLayersList);\r\n\t\tempty(this._overlaysList);\r\n\r\n\t\tthis._layerControlInputs = [];\r\n\t\tvar baseLayersPresent, overlaysPresent, i, obj, baseLayersCount = 0;\r\n\r\n\t\tfor (i = 0; i < this._layers.length; i++) {\r\n\t\t\tobj = this._layers[i];\r\n\t\t\tthis._addItem(obj);\r\n\t\t\toverlaysPresent = overlaysPresent || obj.overlay;\r\n\t\t\tbaseLayersPresent = baseLayersPresent || !obj.overlay;\r\n\t\t\tbaseLayersCount += !obj.overlay ? 1 : 0;\r\n\t\t}\r\n\r\n\t\t// Hide base layers section if there's only one layer.\r\n\t\tif (this.options.hideSingleBase) {\r\n\t\t\tbaseLayersPresent = baseLayersPresent && baseLayersCount > 1;\r\n\t\t\tthis._baseLayersList.style.display = baseLayersPresent ? '' : 'none';\r\n\t\t}\r\n\r\n\t\tthis._separator.style.display = overlaysPresent && baseLayersPresent ? '' : 'none';\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_onLayerChange: function (e) {\r\n\t\tif (!this._handlingClick) {\r\n\t\t\tthis._update();\r\n\t\t}\r\n\r\n\t\tvar obj = this._getLayer(stamp(e.target));\r\n\r\n\t\t// @namespace Map\r\n\t\t// @section Layer events\r\n\t\t// @event baselayerchange: LayersControlEvent\r\n\t\t// Fired when the base layer is changed through the [layer control](#control-layers).\r\n\t\t// @event overlayadd: LayersControlEvent\r\n\t\t// Fired when an overlay is selected through the [layer control](#control-layers).\r\n\t\t// @event overlayremove: LayersControlEvent\r\n\t\t// Fired when an overlay is deselected through the [layer control](#control-layers).\r\n\t\t// @namespace Control.Layers\r\n\t\tvar type = obj.overlay ?\r\n\t\t\t(e.type === 'add' ? 'overlayadd' : 'overlayremove') :\r\n\t\t\t(e.type === 'add' ? 'baselayerchange' : null);\r\n\r\n\t\tif (type) {\r\n\t\t\tthis._map.fire(type, obj);\r\n\t\t}\r\n\t},\r\n\r\n\t// IE7 bugs out if you create a radio dynamically, so you have to do it this hacky way (see http://bit.ly/PqYLBe)\r\n\t_createRadioElement: function (name, checked) {\r\n\r\n\t\tvar radioHtml = '';\r\n\r\n\t\tvar radioFragment = document.createElement('div');\r\n\t\tradioFragment.innerHTML = radioHtml;\r\n\r\n\t\treturn radioFragment.firstChild;\r\n\t},\r\n\r\n\t_addItem: function (obj) {\r\n\t\tvar label = document.createElement('label'),\r\n\t\t checked = this._map.hasLayer(obj.layer),\r\n\t\t input;\r\n\r\n\t\tif (obj.overlay) {\r\n\t\t\tinput = document.createElement('input');\r\n\t\t\tinput.type = 'checkbox';\r\n\t\t\tinput.className = 'leaflet-control-layers-selector';\r\n\t\t\tinput.defaultChecked = checked;\r\n\t\t} else {\r\n\t\t\tinput = this._createRadioElement('leaflet-base-layers_' + stamp(this), checked);\r\n\t\t}\r\n\r\n\t\tthis._layerControlInputs.push(input);\r\n\t\tinput.layerId = stamp(obj.layer);\r\n\r\n\t\ton(input, 'click', this._onInputClick, this);\r\n\r\n\t\tvar name = document.createElement('span');\r\n\t\tname.innerHTML = ' ' + obj.name;\r\n\r\n\t\t// Helps from preventing layer control flicker when checkboxes are disabled\r\n\t\t// https://github.com/Leaflet/Leaflet/issues/2771\r\n\t\tvar holder = document.createElement('div');\r\n\r\n\t\tlabel.appendChild(holder);\r\n\t\tholder.appendChild(input);\r\n\t\tholder.appendChild(name);\r\n\r\n\t\tvar container = obj.overlay ? this._overlaysList : this._baseLayersList;\r\n\t\tcontainer.appendChild(label);\r\n\r\n\t\tthis._checkDisabledLayers();\r\n\t\treturn label;\r\n\t},\r\n\r\n\t_onInputClick: function () {\r\n\t\tvar inputs = this._layerControlInputs,\r\n\t\t input, layer;\r\n\t\tvar addedLayers = [],\r\n\t\t removedLayers = [];\r\n\r\n\t\tthis._handlingClick = true;\r\n\r\n\t\tfor (var i = inputs.length - 1; i >= 0; i--) {\r\n\t\t\tinput = inputs[i];\r\n\t\t\tlayer = this._getLayer(input.layerId).layer;\r\n\r\n\t\t\tif (input.checked) {\r\n\t\t\t\taddedLayers.push(layer);\r\n\t\t\t} else if (!input.checked) {\r\n\t\t\t\tremovedLayers.push(layer);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Bugfix issue 2318: Should remove all old layers before readding new ones\r\n\t\tfor (i = 0; i < removedLayers.length; i++) {\r\n\t\t\tif (this._map.hasLayer(removedLayers[i])) {\r\n\t\t\t\tthis._map.removeLayer(removedLayers[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (i = 0; i < addedLayers.length; i++) {\r\n\t\t\tif (!this._map.hasLayer(addedLayers[i])) {\r\n\t\t\t\tthis._map.addLayer(addedLayers[i]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._handlingClick = false;\r\n\r\n\t\tthis._refocusOnMap();\r\n\t},\r\n\r\n\t_checkDisabledLayers: function () {\r\n\t\tvar inputs = this._layerControlInputs,\r\n\t\t input,\r\n\t\t layer,\r\n\t\t zoom = this._map.getZoom();\r\n\r\n\t\tfor (var i = inputs.length - 1; i >= 0; i--) {\r\n\t\t\tinput = inputs[i];\r\n\t\t\tlayer = this._getLayer(input.layerId).layer;\r\n\t\t\tinput.disabled = (layer.options.minZoom !== undefined && zoom < layer.options.minZoom) ||\r\n\t\t\t (layer.options.maxZoom !== undefined && zoom > layer.options.maxZoom);\r\n\r\n\t\t}\r\n\t},\r\n\r\n\t_expandIfNotCollapsed: function () {\r\n\t\tif (this._map && !this.options.collapsed) {\r\n\t\t\tthis.expand();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_expand: function () {\r\n\t\t// Backward compatibility, remove me in 1.1.\r\n\t\treturn this.expand();\r\n\t},\r\n\r\n\t_collapse: function () {\r\n\t\t// Backward compatibility, remove me in 1.1.\r\n\t\treturn this.collapse();\r\n\t}\r\n\r\n});\r\n\r\n\r\n// @factory L.control.layers(baselayers?: Object, overlays?: Object, options?: Control.Layers options)\r\n// Creates a layers control with the given layers. Base layers will be switched with radio buttons, while overlays will be switched with checkboxes. Note that all base layers should be passed in the base layers object, but only one should be added to the map during map instantiation.\r\nvar layers = function (baseLayers, overlays, options) {\r\n\treturn new Layers(baseLayers, overlays, options);\r\n};\n\n/*\r\n * @class Control.Zoom\r\n * @aka L.Control.Zoom\r\n * @inherits Control\r\n *\r\n * A basic zoom control with two buttons (zoom in and zoom out). It is put on the map by default unless you set its [`zoomControl` option](#map-zoomcontrol) to `false`. Extends `Control`.\r\n */\r\n\r\nvar Zoom = Control.extend({\r\n\t// @section\r\n\t// @aka Control.Zoom options\r\n\toptions: {\r\n\t\tposition: 'topleft',\r\n\r\n\t\t// @option zoomInText: String = '+'\r\n\t\t// The text set on the 'zoom in' button.\r\n\t\tzoomInText: '+',\r\n\r\n\t\t// @option zoomInTitle: String = 'Zoom in'\r\n\t\t// The title set on the 'zoom in' button.\r\n\t\tzoomInTitle: 'Zoom in',\r\n\r\n\t\t// @option zoomOutText: String = '−'\r\n\t\t// The text set on the 'zoom out' button.\r\n\t\tzoomOutText: '−',\r\n\r\n\t\t// @option zoomOutTitle: String = 'Zoom out'\r\n\t\t// The title set on the 'zoom out' button.\r\n\t\tzoomOutTitle: 'Zoom out'\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tvar zoomName = 'leaflet-control-zoom',\r\n\t\t container = create$1('div', zoomName + ' leaflet-bar'),\r\n\t\t options = this.options;\r\n\r\n\t\tthis._zoomInButton = this._createButton(options.zoomInText, options.zoomInTitle,\r\n\t\t zoomName + '-in', container, this._zoomIn);\r\n\t\tthis._zoomOutButton = this._createButton(options.zoomOutText, options.zoomOutTitle,\r\n\t\t zoomName + '-out', container, this._zoomOut);\r\n\r\n\t\tthis._updateDisabled();\r\n\t\tmap.on('zoomend zoomlevelschange', this._updateDisabled, this);\r\n\r\n\t\treturn container;\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tmap.off('zoomend zoomlevelschange', this._updateDisabled, this);\r\n\t},\r\n\r\n\tdisable: function () {\r\n\t\tthis._disabled = true;\r\n\t\tthis._updateDisabled();\r\n\t\treturn this;\r\n\t},\r\n\r\n\tenable: function () {\r\n\t\tthis._disabled = false;\r\n\t\tthis._updateDisabled();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_zoomIn: function (e) {\r\n\t\tif (!this._disabled && this._map._zoom < this._map.getMaxZoom()) {\r\n\t\t\tthis._map.zoomIn(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1));\r\n\t\t}\r\n\t},\r\n\r\n\t_zoomOut: function (e) {\r\n\t\tif (!this._disabled && this._map._zoom > this._map.getMinZoom()) {\r\n\t\t\tthis._map.zoomOut(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1));\r\n\t\t}\r\n\t},\r\n\r\n\t_createButton: function (html, title, className, container, fn) {\r\n\t\tvar link = create$1('a', className, container);\r\n\t\tlink.innerHTML = html;\r\n\t\tlink.href = '#';\r\n\t\tlink.title = title;\r\n\r\n\t\t/*\r\n\t\t * Will force screen readers like VoiceOver to read this as \"Zoom in - button\"\r\n\t\t */\r\n\t\tlink.setAttribute('role', 'button');\r\n\t\tlink.setAttribute('aria-label', title);\r\n\r\n\t\tdisableClickPropagation(link);\r\n\t\ton(link, 'click', stop);\r\n\t\ton(link, 'click', fn, this);\r\n\t\ton(link, 'click', this._refocusOnMap, this);\r\n\r\n\t\treturn link;\r\n\t},\r\n\r\n\t_updateDisabled: function () {\r\n\t\tvar map = this._map,\r\n\t\t className = 'leaflet-disabled';\r\n\r\n\t\tremoveClass(this._zoomInButton, className);\r\n\t\tremoveClass(this._zoomOutButton, className);\r\n\r\n\t\tif (this._disabled || map._zoom === map.getMinZoom()) {\r\n\t\t\taddClass(this._zoomOutButton, className);\r\n\t\t}\r\n\t\tif (this._disabled || map._zoom === map.getMaxZoom()) {\r\n\t\t\taddClass(this._zoomInButton, className);\r\n\t\t}\r\n\t}\r\n});\r\n\r\n// @namespace Map\r\n// @section Control options\r\n// @option zoomControl: Boolean = true\r\n// Whether a [zoom control](#control-zoom) is added to the map by default.\r\nMap.mergeOptions({\r\n\tzoomControl: true\r\n});\r\n\r\nMap.addInitHook(function () {\r\n\tif (this.options.zoomControl) {\r\n\t\t// @section Controls\r\n\t\t// @property zoomControl: Control.Zoom\r\n\t\t// The default zoom control (only available if the\r\n\t\t// [`zoomControl` option](#map-zoomcontrol) was `true` when creating the map).\r\n\t\tthis.zoomControl = new Zoom();\r\n\t\tthis.addControl(this.zoomControl);\r\n\t}\r\n});\r\n\r\n// @namespace Control.Zoom\r\n// @factory L.control.zoom(options: Control.Zoom options)\r\n// Creates a zoom control\r\nvar zoom = function (options) {\r\n\treturn new Zoom(options);\r\n};\n\n/*\n * @class Control.Scale\n * @aka L.Control.Scale\n * @inherits Control\n *\n * A simple scale control that shows the scale of the current center of screen in metric (m/km) and imperial (mi/ft) systems. Extends `Control`.\n *\n * @example\n *\n * ```js\n * L.control.scale().addTo(map);\n * ```\n */\n\nvar Scale = Control.extend({\n\t// @section\n\t// @aka Control.Scale options\n\toptions: {\n\t\tposition: 'bottomleft',\n\n\t\t// @option maxWidth: Number = 100\n\t\t// Maximum width of the control in pixels. The width is set dynamically to show round values (e.g. 100, 200, 500).\n\t\tmaxWidth: 100,\n\n\t\t// @option metric: Boolean = True\n\t\t// Whether to show the metric scale line (m/km).\n\t\tmetric: true,\n\n\t\t// @option imperial: Boolean = True\n\t\t// Whether to show the imperial scale line (mi/ft).\n\t\timperial: true\n\n\t\t// @option updateWhenIdle: Boolean = false\n\t\t// If `true`, the control is updated on [`moveend`](#map-moveend), otherwise it's always up-to-date (updated on [`move`](#map-move)).\n\t},\n\n\tonAdd: function (map) {\n\t\tvar className = 'leaflet-control-scale',\n\t\t container = create$1('div', className),\n\t\t options = this.options;\n\n\t\tthis._addScales(options, className + '-line', container);\n\n\t\tmap.on(options.updateWhenIdle ? 'moveend' : 'move', this._update, this);\n\t\tmap.whenReady(this._update, this);\n\n\t\treturn container;\n\t},\n\n\tonRemove: function (map) {\n\t\tmap.off(this.options.updateWhenIdle ? 'moveend' : 'move', this._update, this);\n\t},\n\n\t_addScales: function (options, className, container) {\n\t\tif (options.metric) {\n\t\t\tthis._mScale = create$1('div', className, container);\n\t\t}\n\t\tif (options.imperial) {\n\t\t\tthis._iScale = create$1('div', className, container);\n\t\t}\n\t},\n\n\t_update: function () {\n\t\tvar map = this._map,\n\t\t y = map.getSize().y / 2;\n\n\t\tvar maxMeters = map.distance(\n\t\t\tmap.containerPointToLatLng([0, y]),\n\t\t\tmap.containerPointToLatLng([this.options.maxWidth, y]));\n\n\t\tthis._updateScales(maxMeters);\n\t},\n\n\t_updateScales: function (maxMeters) {\n\t\tif (this.options.metric && maxMeters) {\n\t\t\tthis._updateMetric(maxMeters);\n\t\t}\n\t\tif (this.options.imperial && maxMeters) {\n\t\t\tthis._updateImperial(maxMeters);\n\t\t}\n\t},\n\n\t_updateMetric: function (maxMeters) {\n\t\tvar meters = this._getRoundNum(maxMeters),\n\t\t label = meters < 1000 ? meters + ' m' : (meters / 1000) + ' km';\n\n\t\tthis._updateScale(this._mScale, label, meters / maxMeters);\n\t},\n\n\t_updateImperial: function (maxMeters) {\n\t\tvar maxFeet = maxMeters * 3.2808399,\n\t\t maxMiles, miles, feet;\n\n\t\tif (maxFeet > 5280) {\n\t\t\tmaxMiles = maxFeet / 5280;\n\t\t\tmiles = this._getRoundNum(maxMiles);\n\t\t\tthis._updateScale(this._iScale, miles + ' mi', miles / maxMiles);\n\n\t\t} else {\n\t\t\tfeet = this._getRoundNum(maxFeet);\n\t\t\tthis._updateScale(this._iScale, feet + ' ft', feet / maxFeet);\n\t\t}\n\t},\n\n\t_updateScale: function (scale, text, ratio) {\n\t\tscale.style.width = Math.round(this.options.maxWidth * ratio) + 'px';\n\t\tscale.innerHTML = text;\n\t},\n\n\t_getRoundNum: function (num) {\n\t\tvar pow10 = Math.pow(10, (Math.floor(num) + '').length - 1),\n\t\t d = num / pow10;\n\n\t\td = d >= 10 ? 10 :\n\t\t d >= 5 ? 5 :\n\t\t d >= 3 ? 3 :\n\t\t d >= 2 ? 2 : 1;\n\n\t\treturn pow10 * d;\n\t}\n});\n\n\n// @factory L.control.scale(options?: Control.Scale options)\n// Creates an scale control with the given options.\nvar scale = function (options) {\n\treturn new Scale(options);\n};\n\n/*\r\n * @class Control.Attribution\r\n * @aka L.Control.Attribution\r\n * @inherits Control\r\n *\r\n * The attribution control allows you to display attribution data in a small text box on a map. It is put on the map by default unless you set its [`attributionControl` option](#map-attributioncontrol) to `false`, and it fetches attribution texts from layers with the [`getAttribution` method](#layer-getattribution) automatically. Extends Control.\r\n */\r\n\r\nvar Attribution = Control.extend({\r\n\t// @section\r\n\t// @aka Control.Attribution options\r\n\toptions: {\r\n\t\tposition: 'bottomright',\r\n\r\n\t\t// @option prefix: String = 'Leaflet'\r\n\t\t// The HTML text shown before the attributions. Pass `false` to disable.\r\n\t\tprefix: 'Leaflet'\r\n\t},\r\n\r\n\tinitialize: function (options) {\r\n\t\tsetOptions(this, options);\r\n\r\n\t\tthis._attributions = {};\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tmap.attributionControl = this;\r\n\t\tthis._container = create$1('div', 'leaflet-control-attribution');\r\n\t\tdisableClickPropagation(this._container);\r\n\r\n\t\t// TODO ugly, refactor\r\n\t\tfor (var i in map._layers) {\r\n\t\t\tif (map._layers[i].getAttribution) {\r\n\t\t\t\tthis.addAttribution(map._layers[i].getAttribution());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._update();\r\n\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\t// @method setPrefix(prefix: String): this\r\n\t// Sets the text before the attributions.\r\n\tsetPrefix: function (prefix) {\r\n\t\tthis.options.prefix = prefix;\r\n\t\tthis._update();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method addAttribution(text: String): this\r\n\t// Adds an attribution text (e.g. `'Vector data © Mapbox'`).\r\n\taddAttribution: function (text) {\r\n\t\tif (!text) { return this; }\r\n\r\n\t\tif (!this._attributions[text]) {\r\n\t\t\tthis._attributions[text] = 0;\r\n\t\t}\r\n\t\tthis._attributions[text]++;\r\n\r\n\t\tthis._update();\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method removeAttribution(text: String): this\r\n\t// Removes an attribution text.\r\n\tremoveAttribution: function (text) {\r\n\t\tif (!text) { return this; }\r\n\r\n\t\tif (this._attributions[text]) {\r\n\t\t\tthis._attributions[text]--;\r\n\t\t\tthis._update();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_update: function () {\r\n\t\tif (!this._map) { return; }\r\n\r\n\t\tvar attribs = [];\r\n\r\n\t\tfor (var i in this._attributions) {\r\n\t\t\tif (this._attributions[i]) {\r\n\t\t\t\tattribs.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar prefixAndAttribs = [];\r\n\r\n\t\tif (this.options.prefix) {\r\n\t\t\tprefixAndAttribs.push(this.options.prefix);\r\n\t\t}\r\n\t\tif (attribs.length) {\r\n\t\t\tprefixAndAttribs.push(attribs.join(', '));\r\n\t\t}\r\n\r\n\t\tthis._container.innerHTML = prefixAndAttribs.join(' | ');\r\n\t}\r\n});\r\n\r\n// @namespace Map\r\n// @section Control options\r\n// @option attributionControl: Boolean = true\r\n// Whether a [attribution control](#control-attribution) is added to the map by default.\r\nMap.mergeOptions({\r\n\tattributionControl: true\r\n});\r\n\r\nMap.addInitHook(function () {\r\n\tif (this.options.attributionControl) {\r\n\t\tnew Attribution().addTo(this);\r\n\t}\r\n});\r\n\r\n// @namespace Control.Attribution\r\n// @factory L.control.attribution(options: Control.Attribution options)\r\n// Creates an attribution control.\r\nvar attribution = function (options) {\r\n\treturn new Attribution(options);\r\n};\n\nControl.Layers = Layers;\nControl.Zoom = Zoom;\nControl.Scale = Scale;\nControl.Attribution = Attribution;\n\ncontrol.layers = layers;\ncontrol.zoom = zoom;\ncontrol.scale = scale;\ncontrol.attribution = attribution;\n\n/*\n\tL.Handler is a base class for handler classes that are used internally to inject\n\tinteraction features like dragging to classes like Map and Marker.\n*/\n\n// @class Handler\n// @aka L.Handler\n// Abstract class for map interaction handlers\n\nvar Handler = Class.extend({\n\tinitialize: function (map) {\n\t\tthis._map = map;\n\t},\n\n\t// @method enable(): this\n\t// Enables the handler\n\tenable: function () {\n\t\tif (this._enabled) { return this; }\n\n\t\tthis._enabled = true;\n\t\tthis.addHooks();\n\t\treturn this;\n\t},\n\n\t// @method disable(): this\n\t// Disables the handler\n\tdisable: function () {\n\t\tif (!this._enabled) { return this; }\n\n\t\tthis._enabled = false;\n\t\tthis.removeHooks();\n\t\treturn this;\n\t},\n\n\t// @method enabled(): Boolean\n\t// Returns `true` if the handler is enabled\n\tenabled: function () {\n\t\treturn !!this._enabled;\n\t}\n\n\t// @section Extension methods\n\t// Classes inheriting from `Handler` must implement the two following methods:\n\t// @method addHooks()\n\t// Called when the handler is enabled, should add event hooks.\n\t// @method removeHooks()\n\t// Called when the handler is disabled, should remove the event hooks added previously.\n});\n\n// @section There is static function which can be called without instantiating L.Handler:\n// @function addTo(map: Map, name: String): this\n// Adds a new Handler to the given map with the given name.\nHandler.addTo = function (map, name) {\n\tmap.addHandler(name, this);\n\treturn this;\n};\n\nvar Mixin = {Events: Events};\n\n/*\r\n * @class Draggable\r\n * @aka L.Draggable\r\n * @inherits Evented\r\n *\r\n * A class for making DOM elements draggable (including touch support).\r\n * Used internally for map and marker dragging. Only works for elements\r\n * that were positioned with [`L.DomUtil.setPosition`](#domutil-setposition).\r\n *\r\n * @example\r\n * ```js\r\n * var draggable = new L.Draggable(elementToDrag);\r\n * draggable.enable();\r\n * ```\r\n */\r\n\r\nvar START = touch ? 'touchstart mousedown' : 'mousedown';\r\nvar END = {\r\n\tmousedown: 'mouseup',\r\n\ttouchstart: 'touchend',\r\n\tpointerdown: 'touchend',\r\n\tMSPointerDown: 'touchend'\r\n};\r\nvar MOVE = {\r\n\tmousedown: 'mousemove',\r\n\ttouchstart: 'touchmove',\r\n\tpointerdown: 'touchmove',\r\n\tMSPointerDown: 'touchmove'\r\n};\r\n\r\n\r\nvar Draggable = Evented.extend({\r\n\r\n\toptions: {\r\n\t\t// @section\r\n\t\t// @aka Draggable options\r\n\t\t// @option clickTolerance: Number = 3\r\n\t\t// The max number of pixels a user can shift the mouse pointer during a click\r\n\t\t// for it to be considered a valid click (as opposed to a mouse drag).\r\n\t\tclickTolerance: 3\r\n\t},\r\n\r\n\t// @constructor L.Draggable(el: HTMLElement, dragHandle?: HTMLElement, preventOutline?: Boolean, options?: Draggable options)\r\n\t// Creates a `Draggable` object for moving `el` when you start dragging the `dragHandle` element (equals `el` itself by default).\r\n\tinitialize: function (element, dragStartTarget, preventOutline$$1, options) {\r\n\t\tsetOptions(this, options);\r\n\r\n\t\tthis._element = element;\r\n\t\tthis._dragStartTarget = dragStartTarget || element;\r\n\t\tthis._preventOutline = preventOutline$$1;\r\n\t},\r\n\r\n\t// @method enable()\r\n\t// Enables the dragging ability\r\n\tenable: function () {\r\n\t\tif (this._enabled) { return; }\r\n\r\n\t\ton(this._dragStartTarget, START, this._onDown, this);\r\n\r\n\t\tthis._enabled = true;\r\n\t},\r\n\r\n\t// @method disable()\r\n\t// Disables the dragging ability\r\n\tdisable: function () {\r\n\t\tif (!this._enabled) { return; }\r\n\r\n\t\t// If we're currently dragging this draggable,\r\n\t\t// disabling it counts as first ending the drag.\r\n\t\tif (Draggable._dragging === this) {\r\n\t\t\tthis.finishDrag();\r\n\t\t}\r\n\r\n\t\toff(this._dragStartTarget, START, this._onDown, this);\r\n\r\n\t\tthis._enabled = false;\r\n\t\tthis._moved = false;\r\n\t},\r\n\r\n\t_onDown: function (e) {\r\n\t\t// Ignore simulated events, since we handle both touch and\r\n\t\t// mouse explicitly; otherwise we risk getting duplicates of\r\n\t\t// touch events, see #4315.\r\n\t\t// Also ignore the event if disabled; this happens in IE11\r\n\t\t// under some circumstances, see #3666.\r\n\t\tif (e._simulated || !this._enabled) { return; }\r\n\r\n\t\tthis._moved = false;\r\n\r\n\t\tif (hasClass(this._element, 'leaflet-zoom-anim')) { return; }\r\n\r\n\t\tif (Draggable._dragging || e.shiftKey || ((e.which !== 1) && (e.button !== 1) && !e.touches)) { return; }\r\n\t\tDraggable._dragging = this; // Prevent dragging multiple objects at once.\r\n\r\n\t\tif (this._preventOutline) {\r\n\t\t\tpreventOutline(this._element);\r\n\t\t}\r\n\r\n\t\tdisableImageDrag();\r\n\t\tdisableTextSelection();\r\n\r\n\t\tif (this._moving) { return; }\r\n\r\n\t\t// @event down: Event\r\n\t\t// Fired when a drag is about to start.\r\n\t\tthis.fire('down');\r\n\r\n\t\tvar first = e.touches ? e.touches[0] : e,\r\n\t\t sizedParent = getSizedParentNode(this._element);\r\n\r\n\t\tthis._startPoint = new Point(first.clientX, first.clientY);\r\n\r\n\t\t// Cache the scale, so that we can continuously compensate for it during drag (_onMove).\r\n\t\tthis._parentScale = getScale(sizedParent);\r\n\r\n\t\ton(document, MOVE[e.type], this._onMove, this);\r\n\t\ton(document, END[e.type], this._onUp, this);\r\n\t},\r\n\r\n\t_onMove: function (e) {\r\n\t\t// Ignore simulated events, since we handle both touch and\r\n\t\t// mouse explicitly; otherwise we risk getting duplicates of\r\n\t\t// touch events, see #4315.\r\n\t\t// Also ignore the event if disabled; this happens in IE11\r\n\t\t// under some circumstances, see #3666.\r\n\t\tif (e._simulated || !this._enabled) { return; }\r\n\r\n\t\tif (e.touches && e.touches.length > 1) {\r\n\t\t\tthis._moved = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar first = (e.touches && e.touches.length === 1 ? e.touches[0] : e),\r\n\t\t offset = new Point(first.clientX, first.clientY)._subtract(this._startPoint);\r\n\r\n\t\tif (!offset.x && !offset.y) { return; }\r\n\t\tif (Math.abs(offset.x) + Math.abs(offset.y) < this.options.clickTolerance) { return; }\r\n\r\n\t\t// We assume that the parent container's position, border and scale do not change for the duration of the drag.\r\n\t\t// Therefore there is no need to account for the position and border (they are eliminated by the subtraction)\r\n\t\t// and we can use the cached value for the scale.\r\n\t\toffset.x /= this._parentScale.x;\r\n\t\toffset.y /= this._parentScale.y;\r\n\r\n\t\tpreventDefault(e);\r\n\r\n\t\tif (!this._moved) {\r\n\t\t\t// @event dragstart: Event\r\n\t\t\t// Fired when a drag starts\r\n\t\t\tthis.fire('dragstart');\r\n\r\n\t\t\tthis._moved = true;\r\n\t\t\tthis._startPos = getPosition(this._element).subtract(offset);\r\n\r\n\t\t\taddClass(document.body, 'leaflet-dragging');\r\n\r\n\t\t\tthis._lastTarget = e.target || e.srcElement;\r\n\t\t\t// IE and Edge do not give the element, so fetch it\r\n\t\t\t// if necessary\r\n\t\t\tif ((window.SVGElementInstance) && (this._lastTarget instanceof SVGElementInstance)) {\r\n\t\t\t\tthis._lastTarget = this._lastTarget.correspondingUseElement;\r\n\t\t\t}\r\n\t\t\taddClass(this._lastTarget, 'leaflet-drag-target');\r\n\t\t}\r\n\r\n\t\tthis._newPos = this._startPos.add(offset);\r\n\t\tthis._moving = true;\r\n\r\n\t\tcancelAnimFrame(this._animRequest);\r\n\t\tthis._lastEvent = e;\r\n\t\tthis._animRequest = requestAnimFrame(this._updatePosition, this, true);\r\n\t},\r\n\r\n\t_updatePosition: function () {\r\n\t\tvar e = {originalEvent: this._lastEvent};\r\n\r\n\t\t// @event predrag: Event\r\n\t\t// Fired continuously during dragging *before* each corresponding\r\n\t\t// update of the element's position.\r\n\t\tthis.fire('predrag', e);\r\n\t\tsetPosition(this._element, this._newPos);\r\n\r\n\t\t// @event drag: Event\r\n\t\t// Fired continuously during dragging.\r\n\t\tthis.fire('drag', e);\r\n\t},\r\n\r\n\t_onUp: function (e) {\r\n\t\t// Ignore simulated events, since we handle both touch and\r\n\t\t// mouse explicitly; otherwise we risk getting duplicates of\r\n\t\t// touch events, see #4315.\r\n\t\t// Also ignore the event if disabled; this happens in IE11\r\n\t\t// under some circumstances, see #3666.\r\n\t\tif (e._simulated || !this._enabled) { return; }\r\n\t\tthis.finishDrag();\r\n\t},\r\n\r\n\tfinishDrag: function () {\r\n\t\tremoveClass(document.body, 'leaflet-dragging');\r\n\r\n\t\tif (this._lastTarget) {\r\n\t\t\tremoveClass(this._lastTarget, 'leaflet-drag-target');\r\n\t\t\tthis._lastTarget = null;\r\n\t\t}\r\n\r\n\t\tfor (var i in MOVE) {\r\n\t\t\toff(document, MOVE[i], this._onMove, this);\r\n\t\t\toff(document, END[i], this._onUp, this);\r\n\t\t}\r\n\r\n\t\tenableImageDrag();\r\n\t\tenableTextSelection();\r\n\r\n\t\tif (this._moved && this._moving) {\r\n\t\t\t// ensure drag is not fired after dragend\r\n\t\t\tcancelAnimFrame(this._animRequest);\r\n\r\n\t\t\t// @event dragend: DragEndEvent\r\n\t\t\t// Fired when the drag ends.\r\n\t\t\tthis.fire('dragend', {\r\n\t\t\t\tdistance: this._newPos.distanceTo(this._startPos)\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis._moving = false;\r\n\t\tDraggable._dragging = false;\r\n\t}\r\n\r\n});\n\n/*\r\n * @namespace LineUtil\r\n *\r\n * Various utility functions for polyline points processing, used by Leaflet internally to make polylines lightning-fast.\r\n */\r\n\r\n// Simplify polyline with vertex reduction and Douglas-Peucker simplification.\r\n// Improves rendering performance dramatically by lessening the number of points to draw.\r\n\r\n// @function simplify(points: Point[], tolerance: Number): Point[]\r\n// Dramatically reduces the number of points in a polyline while retaining\r\n// its shape and returns a new array of simplified points, using the\r\n// [Douglas-Peucker algorithm](http://en.wikipedia.org/wiki/Douglas-Peucker_algorithm).\r\n// Used for a huge performance boost when processing/displaying Leaflet polylines for\r\n// each zoom level and also reducing visual noise. tolerance affects the amount of\r\n// simplification (lesser value means higher quality but slower and with more points).\r\n// Also released as a separated micro-library [Simplify.js](http://mourner.github.com/simplify-js/).\r\nfunction simplify(points, tolerance) {\r\n\tif (!tolerance || !points.length) {\r\n\t\treturn points.slice();\r\n\t}\r\n\r\n\tvar sqTolerance = tolerance * tolerance;\r\n\r\n\t // stage 1: vertex reduction\r\n\t points = _reducePoints(points, sqTolerance);\r\n\r\n\t // stage 2: Douglas-Peucker simplification\r\n\t points = _simplifyDP(points, sqTolerance);\r\n\r\n\treturn points;\r\n}\r\n\r\n// @function pointToSegmentDistance(p: Point, p1: Point, p2: Point): Number\r\n// Returns the distance between point `p` and segment `p1` to `p2`.\r\nfunction pointToSegmentDistance(p, p1, p2) {\r\n\treturn Math.sqrt(_sqClosestPointOnSegment(p, p1, p2, true));\r\n}\r\n\r\n// @function closestPointOnSegment(p: Point, p1: Point, p2: Point): Number\r\n// Returns the closest point from a point `p` on a segment `p1` to `p2`.\r\nfunction closestPointOnSegment(p, p1, p2) {\r\n\treturn _sqClosestPointOnSegment(p, p1, p2);\r\n}\r\n\r\n// Douglas-Peucker simplification, see http://en.wikipedia.org/wiki/Douglas-Peucker_algorithm\r\nfunction _simplifyDP(points, sqTolerance) {\r\n\r\n\tvar len = points.length,\r\n\t ArrayConstructor = typeof Uint8Array !== undefined + '' ? Uint8Array : Array,\r\n\t markers = new ArrayConstructor(len);\r\n\r\n\t markers[0] = markers[len - 1] = 1;\r\n\r\n\t_simplifyDPStep(points, markers, sqTolerance, 0, len - 1);\r\n\r\n\tvar i,\r\n\t newPoints = [];\r\n\r\n\tfor (i = 0; i < len; i++) {\r\n\t\tif (markers[i]) {\r\n\t\t\tnewPoints.push(points[i]);\r\n\t\t}\r\n\t}\r\n\r\n\treturn newPoints;\r\n}\r\n\r\nfunction _simplifyDPStep(points, markers, sqTolerance, first, last) {\r\n\r\n\tvar maxSqDist = 0,\r\n\tindex, i, sqDist;\r\n\r\n\tfor (i = first + 1; i <= last - 1; i++) {\r\n\t\tsqDist = _sqClosestPointOnSegment(points[i], points[first], points[last], true);\r\n\r\n\t\tif (sqDist > maxSqDist) {\r\n\t\t\tindex = i;\r\n\t\t\tmaxSqDist = sqDist;\r\n\t\t}\r\n\t}\r\n\r\n\tif (maxSqDist > sqTolerance) {\r\n\t\tmarkers[index] = 1;\r\n\r\n\t\t_simplifyDPStep(points, markers, sqTolerance, first, index);\r\n\t\t_simplifyDPStep(points, markers, sqTolerance, index, last);\r\n\t}\r\n}\r\n\r\n// reduce points that are too close to each other to a single point\r\nfunction _reducePoints(points, sqTolerance) {\r\n\tvar reducedPoints = [points[0]];\r\n\r\n\tfor (var i = 1, prev = 0, len = points.length; i < len; i++) {\r\n\t\tif (_sqDist(points[i], points[prev]) > sqTolerance) {\r\n\t\t\treducedPoints.push(points[i]);\r\n\t\t\tprev = i;\r\n\t\t}\r\n\t}\r\n\tif (prev < len - 1) {\r\n\t\treducedPoints.push(points[len - 1]);\r\n\t}\r\n\treturn reducedPoints;\r\n}\r\n\r\nvar _lastCode;\r\n\r\n// @function clipSegment(a: Point, b: Point, bounds: Bounds, useLastCode?: Boolean, round?: Boolean): Point[]|Boolean\r\n// Clips the segment a to b by rectangular bounds with the\r\n// [Cohen-Sutherland algorithm](https://en.wikipedia.org/wiki/Cohen%E2%80%93Sutherland_algorithm)\r\n// (modifying the segment points directly!). Used by Leaflet to only show polyline\r\n// points that are on the screen or near, increasing performance.\r\nfunction clipSegment(a, b, bounds, useLastCode, round) {\r\n\tvar codeA = useLastCode ? _lastCode : _getBitCode(a, bounds),\r\n\t codeB = _getBitCode(b, bounds),\r\n\r\n\t codeOut, p, newCode;\r\n\r\n\t // save 2nd code to avoid calculating it on the next segment\r\n\t _lastCode = codeB;\r\n\r\n\twhile (true) {\r\n\t\t// if a,b is inside the clip window (trivial accept)\r\n\t\tif (!(codeA | codeB)) {\r\n\t\t\treturn [a, b];\r\n\t\t}\r\n\r\n\t\t// if a,b is outside the clip window (trivial reject)\r\n\t\tif (codeA & codeB) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// other cases\r\n\t\tcodeOut = codeA || codeB;\r\n\t\tp = _getEdgeIntersection(a, b, codeOut, bounds, round);\r\n\t\tnewCode = _getBitCode(p, bounds);\r\n\r\n\t\tif (codeOut === codeA) {\r\n\t\t\ta = p;\r\n\t\t\tcodeA = newCode;\r\n\t\t} else {\r\n\t\t\tb = p;\r\n\t\t\tcodeB = newCode;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction _getEdgeIntersection(a, b, code, bounds, round) {\r\n\tvar dx = b.x - a.x,\r\n\t dy = b.y - a.y,\r\n\t min = bounds.min,\r\n\t max = bounds.max,\r\n\t x, y;\r\n\r\n\tif (code & 8) { // top\r\n\t\tx = a.x + dx * (max.y - a.y) / dy;\r\n\t\ty = max.y;\r\n\r\n\t} else if (code & 4) { // bottom\r\n\t\tx = a.x + dx * (min.y - a.y) / dy;\r\n\t\ty = min.y;\r\n\r\n\t} else if (code & 2) { // right\r\n\t\tx = max.x;\r\n\t\ty = a.y + dy * (max.x - a.x) / dx;\r\n\r\n\t} else if (code & 1) { // left\r\n\t\tx = min.x;\r\n\t\ty = a.y + dy * (min.x - a.x) / dx;\r\n\t}\r\n\r\n\treturn new Point(x, y, round);\r\n}\r\n\r\nfunction _getBitCode(p, bounds) {\r\n\tvar code = 0;\r\n\r\n\tif (p.x < bounds.min.x) { // left\r\n\t\tcode |= 1;\r\n\t} else if (p.x > bounds.max.x) { // right\r\n\t\tcode |= 2;\r\n\t}\r\n\r\n\tif (p.y < bounds.min.y) { // bottom\r\n\t\tcode |= 4;\r\n\t} else if (p.y > bounds.max.y) { // top\r\n\t\tcode |= 8;\r\n\t}\r\n\r\n\treturn code;\r\n}\r\n\r\n// square distance (to avoid unnecessary Math.sqrt calls)\r\nfunction _sqDist(p1, p2) {\r\n\tvar dx = p2.x - p1.x,\r\n\t dy = p2.y - p1.y;\r\n\treturn dx * dx + dy * dy;\r\n}\r\n\r\n// return closest point on segment or distance to that point\r\nfunction _sqClosestPointOnSegment(p, p1, p2, sqDist) {\r\n\tvar x = p1.x,\r\n\t y = p1.y,\r\n\t dx = p2.x - x,\r\n\t dy = p2.y - y,\r\n\t dot = dx * dx + dy * dy,\r\n\t t;\r\n\r\n\tif (dot > 0) {\r\n\t\tt = ((p.x - x) * dx + (p.y - y) * dy) / dot;\r\n\r\n\t\tif (t > 1) {\r\n\t\t\tx = p2.x;\r\n\t\t\ty = p2.y;\r\n\t\t} else if (t > 0) {\r\n\t\t\tx += dx * t;\r\n\t\t\ty += dy * t;\r\n\t\t}\r\n\t}\r\n\r\n\tdx = p.x - x;\r\n\tdy = p.y - y;\r\n\r\n\treturn sqDist ? dx * dx + dy * dy : new Point(x, y);\r\n}\r\n\r\n\r\n// @function isFlat(latlngs: LatLng[]): Boolean\r\n// Returns true if `latlngs` is a flat array, false is nested.\r\nfunction isFlat(latlngs) {\r\n\treturn !isArray(latlngs[0]) || (typeof latlngs[0][0] !== 'object' && typeof latlngs[0][0] !== 'undefined');\r\n}\r\n\r\nfunction _flat(latlngs) {\r\n\tconsole.warn('Deprecated use of _flat, please use L.LineUtil.isFlat instead.');\r\n\treturn isFlat(latlngs);\r\n}\r\n\n\nvar LineUtil = (Object.freeze || Object)({\n\tsimplify: simplify,\n\tpointToSegmentDistance: pointToSegmentDistance,\n\tclosestPointOnSegment: closestPointOnSegment,\n\tclipSegment: clipSegment,\n\t_getEdgeIntersection: _getEdgeIntersection,\n\t_getBitCode: _getBitCode,\n\t_sqClosestPointOnSegment: _sqClosestPointOnSegment,\n\tisFlat: isFlat,\n\t_flat: _flat\n});\n\n/*\r\n * @namespace PolyUtil\r\n * Various utility functions for polygon geometries.\r\n */\r\n\r\n/* @function clipPolygon(points: Point[], bounds: Bounds, round?: Boolean): Point[]\r\n * Clips the polygon geometry defined by the given `points` by the given bounds (using the [Sutherland-Hodgman algorithm](https://en.wikipedia.org/wiki/Sutherland%E2%80%93Hodgman_algorithm)).\r\n * Used by Leaflet to only show polygon points that are on the screen or near, increasing\r\n * performance. Note that polygon points needs different algorithm for clipping\r\n * than polyline, so there's a separate method for it.\r\n */\r\nfunction clipPolygon(points, bounds, round) {\r\n\tvar clippedPoints,\r\n\t edges = [1, 4, 2, 8],\r\n\t i, j, k,\r\n\t a, b,\r\n\t len, edge, p;\r\n\r\n\tfor (i = 0, len = points.length; i < len; i++) {\r\n\t\tpoints[i]._code = _getBitCode(points[i], bounds);\r\n\t}\r\n\r\n\t// for each edge (left, bottom, right, top)\r\n\tfor (k = 0; k < 4; k++) {\r\n\t\tedge = edges[k];\r\n\t\tclippedPoints = [];\r\n\r\n\t\tfor (i = 0, len = points.length, j = len - 1; i < len; j = i++) {\r\n\t\t\ta = points[i];\r\n\t\t\tb = points[j];\r\n\r\n\t\t\t// if a is inside the clip window\r\n\t\t\tif (!(a._code & edge)) {\r\n\t\t\t\t// if b is outside the clip window (a->b goes out of screen)\r\n\t\t\t\tif (b._code & edge) {\r\n\t\t\t\t\tp = _getEdgeIntersection(b, a, edge, bounds, round);\r\n\t\t\t\t\tp._code = _getBitCode(p, bounds);\r\n\t\t\t\t\tclippedPoints.push(p);\r\n\t\t\t\t}\r\n\t\t\t\tclippedPoints.push(a);\r\n\r\n\t\t\t// else if b is inside the clip window (a->b enters the screen)\r\n\t\t\t} else if (!(b._code & edge)) {\r\n\t\t\t\tp = _getEdgeIntersection(b, a, edge, bounds, round);\r\n\t\t\t\tp._code = _getBitCode(p, bounds);\r\n\t\t\t\tclippedPoints.push(p);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpoints = clippedPoints;\r\n\t}\r\n\r\n\treturn points;\r\n}\r\n\n\nvar PolyUtil = (Object.freeze || Object)({\n\tclipPolygon: clipPolygon\n});\n\n/*\r\n * @namespace Projection\r\n * @section\r\n * Leaflet comes with a set of already defined Projections out of the box:\r\n *\r\n * @projection L.Projection.LonLat\r\n *\r\n * Equirectangular, or Plate Carree projection — the most simple projection,\r\n * mostly used by GIS enthusiasts. Directly maps `x` as longitude, and `y` as\r\n * latitude. Also suitable for flat worlds, e.g. game maps. Used by the\r\n * `EPSG:4326` and `Simple` CRS.\r\n */\r\n\r\nvar LonLat = {\r\n\tproject: function (latlng) {\r\n\t\treturn new Point(latlng.lng, latlng.lat);\r\n\t},\r\n\r\n\tunproject: function (point) {\r\n\t\treturn new LatLng(point.y, point.x);\r\n\t},\r\n\r\n\tbounds: new Bounds([-180, -90], [180, 90])\r\n};\n\n/*\r\n * @namespace Projection\r\n * @projection L.Projection.Mercator\r\n *\r\n * Elliptical Mercator projection — more complex than Spherical Mercator. Assumes that Earth is an ellipsoid. Used by the EPSG:3395 CRS.\r\n */\r\n\r\nvar Mercator = {\r\n\tR: 6378137,\r\n\tR_MINOR: 6356752.314245179,\r\n\r\n\tbounds: new Bounds([-20037508.34279, -15496570.73972], [20037508.34279, 18764656.23138]),\r\n\r\n\tproject: function (latlng) {\r\n\t\tvar d = Math.PI / 180,\r\n\t\t r = this.R,\r\n\t\t y = latlng.lat * d,\r\n\t\t tmp = this.R_MINOR / r,\r\n\t\t e = Math.sqrt(1 - tmp * tmp),\r\n\t\t con = e * Math.sin(y);\r\n\r\n\t\tvar ts = Math.tan(Math.PI / 4 - y / 2) / Math.pow((1 - con) / (1 + con), e / 2);\r\n\t\ty = -r * Math.log(Math.max(ts, 1E-10));\r\n\r\n\t\treturn new Point(latlng.lng * d * r, y);\r\n\t},\r\n\r\n\tunproject: function (point) {\r\n\t\tvar d = 180 / Math.PI,\r\n\t\t r = this.R,\r\n\t\t tmp = this.R_MINOR / r,\r\n\t\t e = Math.sqrt(1 - tmp * tmp),\r\n\t\t ts = Math.exp(-point.y / r),\r\n\t\t phi = Math.PI / 2 - 2 * Math.atan(ts);\r\n\r\n\t\tfor (var i = 0, dphi = 0.1, con; i < 15 && Math.abs(dphi) > 1e-7; i++) {\r\n\t\t\tcon = e * Math.sin(phi);\r\n\t\t\tcon = Math.pow((1 - con) / (1 + con), e / 2);\r\n\t\t\tdphi = Math.PI / 2 - 2 * Math.atan(ts * con) - phi;\r\n\t\t\tphi += dphi;\r\n\t\t}\r\n\r\n\t\treturn new LatLng(phi * d, point.x * d / r);\r\n\t}\r\n};\n\n/*\n * @class Projection\n\n * An object with methods for projecting geographical coordinates of the world onto\n * a flat surface (and back). See [Map projection](http://en.wikipedia.org/wiki/Map_projection).\n\n * @property bounds: Bounds\n * The bounds (specified in CRS units) where the projection is valid\n\n * @method project(latlng: LatLng): Point\n * Projects geographical coordinates into a 2D point.\n * Only accepts actual `L.LatLng` instances, not arrays.\n\n * @method unproject(point: Point): LatLng\n * The inverse of `project`. Projects a 2D point into a geographical location.\n * Only accepts actual `L.Point` instances, not arrays.\n\n * Note that the projection instances do not inherit from Leafet's `Class` object,\n * and can't be instantiated. Also, new classes can't inherit from them,\n * and methods can't be added to them with the `include` function.\n\n */\n\n\n\n\nvar index = (Object.freeze || Object)({\n\tLonLat: LonLat,\n\tMercator: Mercator,\n\tSphericalMercator: SphericalMercator\n});\n\n/*\r\n * @namespace CRS\r\n * @crs L.CRS.EPSG3395\r\n *\r\n * Rarely used by some commercial tile providers. Uses Elliptical Mercator projection.\r\n */\r\nvar EPSG3395 = extend({}, Earth, {\r\n\tcode: 'EPSG:3395',\r\n\tprojection: Mercator,\r\n\r\n\ttransformation: (function () {\r\n\t\tvar scale = 0.5 / (Math.PI * Mercator.R);\r\n\t\treturn toTransformation(scale, 0.5, -scale, 0.5);\r\n\t}())\r\n});\n\n/*\r\n * @namespace CRS\r\n * @crs L.CRS.EPSG4326\r\n *\r\n * A common CRS among GIS enthusiasts. Uses simple Equirectangular projection.\r\n *\r\n * Leaflet 1.0.x complies with the [TMS coordinate scheme for EPSG:4326](https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification#global-geodetic),\r\n * which is a breaking change from 0.7.x behaviour. If you are using a `TileLayer`\r\n * with this CRS, ensure that there are two 256x256 pixel tiles covering the\r\n * whole earth at zoom level zero, and that the tile coordinate origin is (-180,+90),\r\n * or (-180,-90) for `TileLayer`s with [the `tms` option](#tilelayer-tms) set.\r\n */\r\n\r\nvar EPSG4326 = extend({}, Earth, {\r\n\tcode: 'EPSG:4326',\r\n\tprojection: LonLat,\r\n\ttransformation: toTransformation(1 / 180, 1, -1 / 180, 0.5)\r\n});\n\n/*\n * @namespace CRS\n * @crs L.CRS.Simple\n *\n * A simple CRS that maps longitude and latitude into `x` and `y` directly.\n * May be used for maps of flat surfaces (e.g. game maps). Note that the `y`\n * axis should still be inverted (going from bottom to top). `distance()` returns\n * simple euclidean distance.\n */\n\nvar Simple = extend({}, CRS, {\n\tprojection: LonLat,\n\ttransformation: toTransformation(1, 0, -1, 0),\n\n\tscale: function (zoom) {\n\t\treturn Math.pow(2, zoom);\n\t},\n\n\tzoom: function (scale) {\n\t\treturn Math.log(scale) / Math.LN2;\n\t},\n\n\tdistance: function (latlng1, latlng2) {\n\t\tvar dx = latlng2.lng - latlng1.lng,\n\t\t dy = latlng2.lat - latlng1.lat;\n\n\t\treturn Math.sqrt(dx * dx + dy * dy);\n\t},\n\n\tinfinite: true\n});\n\nCRS.Earth = Earth;\nCRS.EPSG3395 = EPSG3395;\nCRS.EPSG3857 = EPSG3857;\nCRS.EPSG900913 = EPSG900913;\nCRS.EPSG4326 = EPSG4326;\nCRS.Simple = Simple;\n\n/*\n * @class Layer\n * @inherits Evented\n * @aka L.Layer\n * @aka ILayer\n *\n * A set of methods from the Layer base class that all Leaflet layers use.\n * Inherits all methods, options and events from `L.Evented`.\n *\n * @example\n *\n * ```js\n * var layer = L.marker(latlng).addTo(map);\n * layer.addTo(map);\n * layer.remove();\n * ```\n *\n * @event add: Event\n * Fired after the layer is added to a map\n *\n * @event remove: Event\n * Fired after the layer is removed from a map\n */\n\n\nvar Layer = Evented.extend({\n\n\t// Classes extending `L.Layer` will inherit the following options:\n\toptions: {\n\t\t// @option pane: String = 'overlayPane'\n\t\t// By default the layer will be added to the map's [overlay pane](#map-overlaypane). Overriding this option will cause the layer to be placed on another pane by default.\n\t\tpane: 'overlayPane',\n\n\t\t// @option attribution: String = null\n\t\t// String to be shown in the attribution control, e.g. \"© OpenStreetMap contributors\". It describes the layer data and is often a legal obligation towards copyright holders and tile providers.\n\t\tattribution: null,\n\n\t\tbubblingMouseEvents: true\n\t},\n\n\t/* @section\n\t * Classes extending `L.Layer` will inherit the following methods:\n\t *\n\t * @method addTo(map: Map|LayerGroup): this\n\t * Adds the layer to the given map or layer group.\n\t */\n\taddTo: function (map) {\n\t\tmap.addLayer(this);\n\t\treturn this;\n\t},\n\n\t// @method remove: this\n\t// Removes the layer from the map it is currently active on.\n\tremove: function () {\n\t\treturn this.removeFrom(this._map || this._mapToAdd);\n\t},\n\n\t// @method removeFrom(map: Map): this\n\t// Removes the layer from the given map\n\tremoveFrom: function (obj) {\n\t\tif (obj) {\n\t\t\tobj.removeLayer(this);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method getPane(name? : String): HTMLElement\n\t// Returns the `HTMLElement` representing the named pane on the map. If `name` is omitted, returns the pane for this layer.\n\tgetPane: function (name) {\n\t\treturn this._map.getPane(name ? (this.options[name] || name) : this.options.pane);\n\t},\n\n\taddInteractiveTarget: function (targetEl) {\n\t\tthis._map._targets[stamp(targetEl)] = this;\n\t\treturn this;\n\t},\n\n\tremoveInteractiveTarget: function (targetEl) {\n\t\tdelete this._map._targets[stamp(targetEl)];\n\t\treturn this;\n\t},\n\n\t// @method getAttribution: String\n\t// Used by the `attribution control`, returns the [attribution option](#gridlayer-attribution).\n\tgetAttribution: function () {\n\t\treturn this.options.attribution;\n\t},\n\n\t_layerAdd: function (e) {\n\t\tvar map = e.target;\n\n\t\t// check in case layer gets added and then removed before the map is ready\n\t\tif (!map.hasLayer(this)) { return; }\n\n\t\tthis._map = map;\n\t\tthis._zoomAnimated = map._zoomAnimated;\n\n\t\tif (this.getEvents) {\n\t\t\tvar events = this.getEvents();\n\t\t\tmap.on(events, this);\n\t\t\tthis.once('remove', function () {\n\t\t\t\tmap.off(events, this);\n\t\t\t}, this);\n\t\t}\n\n\t\tthis.onAdd(map);\n\n\t\tif (this.getAttribution && map.attributionControl) {\n\t\t\tmap.attributionControl.addAttribution(this.getAttribution());\n\t\t}\n\n\t\tthis.fire('add');\n\t\tmap.fire('layeradd', {layer: this});\n\t}\n});\n\n/* @section Extension methods\n * @uninheritable\n *\n * Every layer should extend from `L.Layer` and (re-)implement the following methods.\n *\n * @method onAdd(map: Map): this\n * Should contain code that creates DOM elements for the layer, adds them to `map panes` where they should belong and puts listeners on relevant map events. Called on [`map.addLayer(layer)`](#map-addlayer).\n *\n * @method onRemove(map: Map): this\n * Should contain all clean up code that removes the layer's elements from the DOM and removes listeners previously added in [`onAdd`](#layer-onadd). Called on [`map.removeLayer(layer)`](#map-removelayer).\n *\n * @method getEvents(): Object\n * This optional method should return an object like `{ viewreset: this._reset }` for [`addEventListener`](#evented-addeventlistener). The event handlers in this object will be automatically added and removed from the map with your layer.\n *\n * @method getAttribution(): String\n * This optional method should return a string containing HTML to be shown on the `Attribution control` whenever the layer is visible.\n *\n * @method beforeAdd(map: Map): this\n * Optional method. Called on [`map.addLayer(layer)`](#map-addlayer), before the layer is added to the map, before events are initialized, without waiting until the map is in a usable state. Use for early initialization only.\n */\n\n\n/* @namespace Map\n * @section Layer events\n *\n * @event layeradd: LayerEvent\n * Fired when a new layer is added to the map.\n *\n * @event layerremove: LayerEvent\n * Fired when some layer is removed from the map\n *\n * @section Methods for Layers and Controls\n */\nMap.include({\n\t// @method addLayer(layer: Layer): this\n\t// Adds the given layer to the map\n\taddLayer: function (layer) {\n\t\tif (!layer._layerAdd) {\n\t\t\tthrow new Error('The provided object is not a Layer.');\n\t\t}\n\n\t\tvar id = stamp(layer);\n\t\tif (this._layers[id]) { return this; }\n\t\tthis._layers[id] = layer;\n\n\t\tlayer._mapToAdd = this;\n\n\t\tif (layer.beforeAdd) {\n\t\t\tlayer.beforeAdd(this);\n\t\t}\n\n\t\tthis.whenReady(layer._layerAdd, layer);\n\n\t\treturn this;\n\t},\n\n\t// @method removeLayer(layer: Layer): this\n\t// Removes the given layer from the map.\n\tremoveLayer: function (layer) {\n\t\tvar id = stamp(layer);\n\n\t\tif (!this._layers[id]) { return this; }\n\n\t\tif (this._loaded) {\n\t\t\tlayer.onRemove(this);\n\t\t}\n\n\t\tif (layer.getAttribution && this.attributionControl) {\n\t\t\tthis.attributionControl.removeAttribution(layer.getAttribution());\n\t\t}\n\n\t\tdelete this._layers[id];\n\n\t\tif (this._loaded) {\n\t\t\tthis.fire('layerremove', {layer: layer});\n\t\t\tlayer.fire('remove');\n\t\t}\n\n\t\tlayer._map = layer._mapToAdd = null;\n\n\t\treturn this;\n\t},\n\n\t// @method hasLayer(layer: Layer): Boolean\n\t// Returns `true` if the given layer is currently added to the map\n\thasLayer: function (layer) {\n\t\treturn !!layer && (stamp(layer) in this._layers);\n\t},\n\n\t/* @method eachLayer(fn: Function, context?: Object): this\n\t * Iterates over the layers of the map, optionally specifying context of the iterator function.\n\t * ```\n\t * map.eachLayer(function(layer){\n\t * layer.bindPopup('Hello');\n\t * });\n\t * ```\n\t */\n\teachLayer: function (method, context) {\n\t\tfor (var i in this._layers) {\n\t\t\tmethod.call(context, this._layers[i]);\n\t\t}\n\t\treturn this;\n\t},\n\n\t_addLayers: function (layers) {\n\t\tlayers = layers ? (isArray(layers) ? layers : [layers]) : [];\n\n\t\tfor (var i = 0, len = layers.length; i < len; i++) {\n\t\t\tthis.addLayer(layers[i]);\n\t\t}\n\t},\n\n\t_addZoomLimit: function (layer) {\n\t\tif (isNaN(layer.options.maxZoom) || !isNaN(layer.options.minZoom)) {\n\t\t\tthis._zoomBoundLayers[stamp(layer)] = layer;\n\t\t\tthis._updateZoomLevels();\n\t\t}\n\t},\n\n\t_removeZoomLimit: function (layer) {\n\t\tvar id = stamp(layer);\n\n\t\tif (this._zoomBoundLayers[id]) {\n\t\t\tdelete this._zoomBoundLayers[id];\n\t\t\tthis._updateZoomLevels();\n\t\t}\n\t},\n\n\t_updateZoomLevels: function () {\n\t\tvar minZoom = Infinity,\n\t\t maxZoom = -Infinity,\n\t\t oldZoomSpan = this._getZoomSpan();\n\n\t\tfor (var i in this._zoomBoundLayers) {\n\t\t\tvar options = this._zoomBoundLayers[i].options;\n\n\t\t\tminZoom = options.minZoom === undefined ? minZoom : Math.min(minZoom, options.minZoom);\n\t\t\tmaxZoom = options.maxZoom === undefined ? maxZoom : Math.max(maxZoom, options.maxZoom);\n\t\t}\n\n\t\tthis._layersMaxZoom = maxZoom === -Infinity ? undefined : maxZoom;\n\t\tthis._layersMinZoom = minZoom === Infinity ? undefined : minZoom;\n\n\t\t// @section Map state change events\n\t\t// @event zoomlevelschange: Event\n\t\t// Fired when the number of zoomlevels on the map is changed due\n\t\t// to adding or removing a layer.\n\t\tif (oldZoomSpan !== this._getZoomSpan()) {\n\t\t\tthis.fire('zoomlevelschange');\n\t\t}\n\n\t\tif (this.options.maxZoom === undefined && this._layersMaxZoom && this.getZoom() > this._layersMaxZoom) {\n\t\t\tthis.setZoom(this._layersMaxZoom);\n\t\t}\n\t\tif (this.options.minZoom === undefined && this._layersMinZoom && this.getZoom() < this._layersMinZoom) {\n\t\t\tthis.setZoom(this._layersMinZoom);\n\t\t}\n\t}\n});\n\n/*\r\n * @class LayerGroup\r\n * @aka L.LayerGroup\r\n * @inherits Layer\r\n *\r\n * Used to group several layers and handle them as one. If you add it to the map,\r\n * any layers added or removed from the group will be added/removed on the map as\r\n * well. Extends `Layer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.layerGroup([marker1, marker2])\r\n * \t.addLayer(polyline)\r\n * \t.addTo(map);\r\n * ```\r\n */\r\n\r\nvar LayerGroup = Layer.extend({\r\n\r\n\tinitialize: function (layers, options) {\r\n\t\tsetOptions(this, options);\r\n\r\n\t\tthis._layers = {};\r\n\r\n\t\tvar i, len;\r\n\r\n\t\tif (layers) {\r\n\t\t\tfor (i = 0, len = layers.length; i < len; i++) {\r\n\t\t\t\tthis.addLayer(layers[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t// @method addLayer(layer: Layer): this\r\n\t// Adds the given layer to the group.\r\n\taddLayer: function (layer) {\r\n\t\tvar id = this.getLayerId(layer);\r\n\r\n\t\tthis._layers[id] = layer;\r\n\r\n\t\tif (this._map) {\r\n\t\t\tthis._map.addLayer(layer);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method removeLayer(layer: Layer): this\r\n\t// Removes the given layer from the group.\r\n\t// @alternative\r\n\t// @method removeLayer(id: Number): this\r\n\t// Removes the layer with the given internal ID from the group.\r\n\tremoveLayer: function (layer) {\r\n\t\tvar id = layer in this._layers ? layer : this.getLayerId(layer);\r\n\r\n\t\tif (this._map && this._layers[id]) {\r\n\t\t\tthis._map.removeLayer(this._layers[id]);\r\n\t\t}\r\n\r\n\t\tdelete this._layers[id];\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method hasLayer(layer: Layer): Boolean\r\n\t// Returns `true` if the given layer is currently added to the group.\r\n\t// @alternative\r\n\t// @method hasLayer(id: Number): Boolean\r\n\t// Returns `true` if the given internal ID is currently added to the group.\r\n\thasLayer: function (layer) {\r\n\t\treturn !!layer && (layer in this._layers || this.getLayerId(layer) in this._layers);\r\n\t},\r\n\r\n\t// @method clearLayers(): this\r\n\t// Removes all the layers from the group.\r\n\tclearLayers: function () {\r\n\t\treturn this.eachLayer(this.removeLayer, this);\r\n\t},\r\n\r\n\t// @method invoke(methodName: String, …): this\r\n\t// Calls `methodName` on every layer contained in this group, passing any\r\n\t// additional parameters. Has no effect if the layers contained do not\r\n\t// implement `methodName`.\r\n\tinvoke: function (methodName) {\r\n\t\tvar args = Array.prototype.slice.call(arguments, 1),\r\n\t\t i, layer;\r\n\r\n\t\tfor (i in this._layers) {\r\n\t\t\tlayer = this._layers[i];\r\n\r\n\t\t\tif (layer[methodName]) {\r\n\t\t\t\tlayer[methodName].apply(layer, args);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tthis.eachLayer(map.addLayer, map);\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tthis.eachLayer(map.removeLayer, map);\r\n\t},\r\n\r\n\t// @method eachLayer(fn: Function, context?: Object): this\r\n\t// Iterates over the layers of the group, optionally specifying context of the iterator function.\r\n\t// ```js\r\n\t// group.eachLayer(function (layer) {\r\n\t// \tlayer.bindPopup('Hello');\r\n\t// });\r\n\t// ```\r\n\teachLayer: function (method, context) {\r\n\t\tfor (var i in this._layers) {\r\n\t\t\tmethod.call(context, this._layers[i]);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getLayer(id: Number): Layer\r\n\t// Returns the layer with the given internal ID.\r\n\tgetLayer: function (id) {\r\n\t\treturn this._layers[id];\r\n\t},\r\n\r\n\t// @method getLayers(): Layer[]\r\n\t// Returns an array of all the layers added to the group.\r\n\tgetLayers: function () {\r\n\t\tvar layers = [];\r\n\t\tthis.eachLayer(layers.push, layers);\r\n\t\treturn layers;\r\n\t},\r\n\r\n\t// @method setZIndex(zIndex: Number): this\r\n\t// Calls `setZIndex` on every layer contained in this group, passing the z-index.\r\n\tsetZIndex: function (zIndex) {\r\n\t\treturn this.invoke('setZIndex', zIndex);\r\n\t},\r\n\r\n\t// @method getLayerId(layer: Layer): Number\r\n\t// Returns the internal ID for a layer\r\n\tgetLayerId: function (layer) {\r\n\t\treturn stamp(layer);\r\n\t}\r\n});\r\n\r\n\r\n// @factory L.layerGroup(layers?: Layer[], options?: Object)\r\n// Create a layer group, optionally given an initial set of layers and an `options` object.\r\nvar layerGroup = function (layers, options) {\r\n\treturn new LayerGroup(layers, options);\r\n};\n\n/*\r\n * @class FeatureGroup\r\n * @aka L.FeatureGroup\r\n * @inherits LayerGroup\r\n *\r\n * Extended `LayerGroup` that makes it easier to do the same thing to all its member layers:\r\n * * [`bindPopup`](#layer-bindpopup) binds a popup to all of the layers at once (likewise with [`bindTooltip`](#layer-bindtooltip))\r\n * * Events are propagated to the `FeatureGroup`, so if the group has an event\r\n * handler, it will handle events from any of the layers. This includes mouse events\r\n * and custom events.\r\n * * Has `layeradd` and `layerremove` events\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.featureGroup([marker1, marker2, polyline])\r\n * \t.bindPopup('Hello world!')\r\n * \t.on('click', function() { alert('Clicked on a member of the group!'); })\r\n * \t.addTo(map);\r\n * ```\r\n */\r\n\r\nvar FeatureGroup = LayerGroup.extend({\r\n\r\n\taddLayer: function (layer) {\r\n\t\tif (this.hasLayer(layer)) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tlayer.addEventParent(this);\r\n\r\n\t\tLayerGroup.prototype.addLayer.call(this, layer);\r\n\r\n\t\t// @event layeradd: LayerEvent\r\n\t\t// Fired when a layer is added to this `FeatureGroup`\r\n\t\treturn this.fire('layeradd', {layer: layer});\r\n\t},\r\n\r\n\tremoveLayer: function (layer) {\r\n\t\tif (!this.hasLayer(layer)) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tif (layer in this._layers) {\r\n\t\t\tlayer = this._layers[layer];\r\n\t\t}\r\n\r\n\t\tlayer.removeEventParent(this);\r\n\r\n\t\tLayerGroup.prototype.removeLayer.call(this, layer);\r\n\r\n\t\t// @event layerremove: LayerEvent\r\n\t\t// Fired when a layer is removed from this `FeatureGroup`\r\n\t\treturn this.fire('layerremove', {layer: layer});\r\n\t},\r\n\r\n\t// @method setStyle(style: Path options): this\r\n\t// Sets the given path options to each layer of the group that has a `setStyle` method.\r\n\tsetStyle: function (style) {\r\n\t\treturn this.invoke('setStyle', style);\r\n\t},\r\n\r\n\t// @method bringToFront(): this\r\n\t// Brings the layer group to the top of all other layers\r\n\tbringToFront: function () {\r\n\t\treturn this.invoke('bringToFront');\r\n\t},\r\n\r\n\t// @method bringToBack(): this\r\n\t// Brings the layer group to the back of all other layers\r\n\tbringToBack: function () {\r\n\t\treturn this.invoke('bringToBack');\r\n\t},\r\n\r\n\t// @method getBounds(): LatLngBounds\r\n\t// Returns the LatLngBounds of the Feature Group (created from bounds and coordinates of its children).\r\n\tgetBounds: function () {\r\n\t\tvar bounds = new LatLngBounds();\r\n\r\n\t\tfor (var id in this._layers) {\r\n\t\t\tvar layer = this._layers[id];\r\n\t\t\tbounds.extend(layer.getBounds ? layer.getBounds() : layer.getLatLng());\r\n\t\t}\r\n\t\treturn bounds;\r\n\t}\r\n});\r\n\r\n// @factory L.featureGroup(layers: Layer[])\r\n// Create a feature group, optionally given an initial set of layers.\r\nvar featureGroup = function (layers) {\r\n\treturn new FeatureGroup(layers);\r\n};\n\n/*\r\n * @class Icon\r\n * @aka L.Icon\r\n *\r\n * Represents an icon to provide when creating a marker.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var myIcon = L.icon({\r\n * iconUrl: 'my-icon.png',\r\n * iconRetinaUrl: 'my-icon@2x.png',\r\n * iconSize: [38, 95],\r\n * iconAnchor: [22, 94],\r\n * popupAnchor: [-3, -76],\r\n * shadowUrl: 'my-icon-shadow.png',\r\n * shadowRetinaUrl: 'my-icon-shadow@2x.png',\r\n * shadowSize: [68, 95],\r\n * shadowAnchor: [22, 94]\r\n * });\r\n *\r\n * L.marker([50.505, 30.57], {icon: myIcon}).addTo(map);\r\n * ```\r\n *\r\n * `L.Icon.Default` extends `L.Icon` and is the blue icon Leaflet uses for markers by default.\r\n *\r\n */\r\n\r\nvar Icon = Class.extend({\r\n\r\n\t/* @section\r\n\t * @aka Icon options\r\n\t *\r\n\t * @option iconUrl: String = null\r\n\t * **(required)** The URL to the icon image (absolute or relative to your script path).\r\n\t *\r\n\t * @option iconRetinaUrl: String = null\r\n\t * The URL to a retina sized version of the icon image (absolute or relative to your\r\n\t * script path). Used for Retina screen devices.\r\n\t *\r\n\t * @option iconSize: Point = null\r\n\t * Size of the icon image in pixels.\r\n\t *\r\n\t * @option iconAnchor: Point = null\r\n\t * The coordinates of the \"tip\" of the icon (relative to its top left corner). The icon\r\n\t * will be aligned so that this point is at the marker's geographical location. Centered\r\n\t * by default if size is specified, also can be set in CSS with negative margins.\r\n\t *\r\n\t * @option popupAnchor: Point = [0, 0]\r\n\t * The coordinates of the point from which popups will \"open\", relative to the icon anchor.\r\n\t *\r\n\t * @option tooltipAnchor: Point = [0, 0]\r\n\t * The coordinates of the point from which tooltips will \"open\", relative to the icon anchor.\r\n\t *\r\n\t * @option shadowUrl: String = null\r\n\t * The URL to the icon shadow image. If not specified, no shadow image will be created.\r\n\t *\r\n\t * @option shadowRetinaUrl: String = null\r\n\t *\r\n\t * @option shadowSize: Point = null\r\n\t * Size of the shadow image in pixels.\r\n\t *\r\n\t * @option shadowAnchor: Point = null\r\n\t * The coordinates of the \"tip\" of the shadow (relative to its top left corner) (the same\r\n\t * as iconAnchor if not specified).\r\n\t *\r\n\t * @option className: String = ''\r\n\t * A custom class name to assign to both icon and shadow images. Empty by default.\r\n\t */\r\n\r\n\toptions: {\r\n\t\tpopupAnchor: [0, 0],\r\n\t\ttooltipAnchor: [0, 0]\r\n\t},\r\n\r\n\tinitialize: function (options) {\r\n\t\tsetOptions(this, options);\r\n\t},\r\n\r\n\t// @method createIcon(oldIcon?: HTMLElement): HTMLElement\r\n\t// Called internally when the icon has to be shown, returns a `` HTML element\r\n\t// styled according to the options.\r\n\tcreateIcon: function (oldIcon) {\r\n\t\treturn this._createIcon('icon', oldIcon);\r\n\t},\r\n\r\n\t// @method createShadow(oldIcon?: HTMLElement): HTMLElement\r\n\t// As `createIcon`, but for the shadow beneath it.\r\n\tcreateShadow: function (oldIcon) {\r\n\t\treturn this._createIcon('shadow', oldIcon);\r\n\t},\r\n\r\n\t_createIcon: function (name, oldIcon) {\r\n\t\tvar src = this._getIconUrl(name);\r\n\r\n\t\tif (!src) {\r\n\t\t\tif (name === 'icon') {\r\n\t\t\t\tthrow new Error('iconUrl not set in Icon options (see the docs).');\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tvar img = this._createImg(src, oldIcon && oldIcon.tagName === 'IMG' ? oldIcon : null);\r\n\t\tthis._setIconStyles(img, name);\r\n\r\n\t\treturn img;\r\n\t},\r\n\r\n\t_setIconStyles: function (img, name) {\r\n\t\tvar options = this.options;\r\n\t\tvar sizeOption = options[name + 'Size'];\r\n\r\n\t\tif (typeof sizeOption === 'number') {\r\n\t\t\tsizeOption = [sizeOption, sizeOption];\r\n\t\t}\r\n\r\n\t\tvar size = toPoint(sizeOption),\r\n\t\t anchor = toPoint(name === 'shadow' && options.shadowAnchor || options.iconAnchor ||\r\n\t\t size && size.divideBy(2, true));\r\n\r\n\t\timg.className = 'leaflet-marker-' + name + ' ' + (options.className || '');\r\n\r\n\t\tif (anchor) {\r\n\t\t\timg.style.marginLeft = (-anchor.x) + 'px';\r\n\t\t\timg.style.marginTop = (-anchor.y) + 'px';\r\n\t\t}\r\n\r\n\t\tif (size) {\r\n\t\t\timg.style.width = size.x + 'px';\r\n\t\t\timg.style.height = size.y + 'px';\r\n\t\t}\r\n\t},\r\n\r\n\t_createImg: function (src, el) {\r\n\t\tel = el || document.createElement('img');\r\n\t\tel.src = src;\r\n\t\treturn el;\r\n\t},\r\n\r\n\t_getIconUrl: function (name) {\r\n\t\treturn retina && this.options[name + 'RetinaUrl'] || this.options[name + 'Url'];\r\n\t}\r\n});\r\n\r\n\r\n// @factory L.icon(options: Icon options)\r\n// Creates an icon instance with the given options.\r\nfunction icon(options) {\r\n\treturn new Icon(options);\r\n}\n\n/*\n * @miniclass Icon.Default (Icon)\n * @aka L.Icon.Default\n * @section\n *\n * A trivial subclass of `Icon`, represents the icon to use in `Marker`s when\n * no icon is specified. Points to the blue marker image distributed with Leaflet\n * releases.\n *\n * In order to customize the default icon, just change the properties of `L.Icon.Default.prototype.options`\n * (which is a set of `Icon options`).\n *\n * If you want to _completely_ replace the default icon, override the\n * `L.Marker.prototype.options.icon` with your own icon instead.\n */\n\nvar IconDefault = Icon.extend({\n\n\toptions: {\n\t\ticonUrl: 'marker-icon.png',\n\t\ticonRetinaUrl: 'marker-icon-2x.png',\n\t\tshadowUrl: 'marker-shadow.png',\n\t\ticonSize: [25, 41],\n\t\ticonAnchor: [12, 41],\n\t\tpopupAnchor: [1, -34],\n\t\ttooltipAnchor: [16, -28],\n\t\tshadowSize: [41, 41]\n\t},\n\n\t_getIconUrl: function (name) {\n\t\tif (!IconDefault.imagePath) {\t// Deprecated, backwards-compatibility only\n\t\t\tIconDefault.imagePath = this._detectIconPath();\n\t\t}\n\n\t\t// @option imagePath: String\n\t\t// `Icon.Default` will try to auto-detect the location of the\n\t\t// blue icon images. If you are placing these images in a non-standard\n\t\t// way, set this option to point to the right path.\n\t\treturn (this.options.imagePath || IconDefault.imagePath) + Icon.prototype._getIconUrl.call(this, name);\n\t},\n\n\t_detectIconPath: function () {\n\t\tvar el = create$1('div', 'leaflet-default-icon-path', document.body);\n\t\tvar path = getStyle(el, 'background-image') ||\n\t\t getStyle(el, 'backgroundImage');\t// IE8\n\n\t\tdocument.body.removeChild(el);\n\n\t\tif (path === null || path.indexOf('url') !== 0) {\n\t\t\tpath = '';\n\t\t} else {\n\t\t\tpath = path.replace(/^url\\([\"']?/, '').replace(/marker-icon\\.png[\"']?\\)$/, '');\n\t\t}\n\n\t\treturn path;\n\t}\n});\n\n/*\n * L.Handler.MarkerDrag is used internally by L.Marker to make the markers draggable.\n */\n\n\n/* @namespace Marker\n * @section Interaction handlers\n *\n * Interaction handlers are properties of a marker instance that allow you to control interaction behavior in runtime, enabling or disabling certain features such as dragging (see `Handler` methods). Example:\n *\n * ```js\n * marker.dragging.disable();\n * ```\n *\n * @property dragging: Handler\n * Marker dragging handler (by both mouse and touch). Only valid when the marker is on the map (Otherwise set [`marker.options.draggable`](#marker-draggable)).\n */\n\nvar MarkerDrag = Handler.extend({\n\tinitialize: function (marker) {\n\t\tthis._marker = marker;\n\t},\n\n\taddHooks: function () {\n\t\tvar icon = this._marker._icon;\n\n\t\tif (!this._draggable) {\n\t\t\tthis._draggable = new Draggable(icon, icon, true);\n\t\t}\n\n\t\tthis._draggable.on({\n\t\t\tdragstart: this._onDragStart,\n\t\t\tpredrag: this._onPreDrag,\n\t\t\tdrag: this._onDrag,\n\t\t\tdragend: this._onDragEnd\n\t\t}, this).enable();\n\n\t\taddClass(icon, 'leaflet-marker-draggable');\n\t},\n\n\tremoveHooks: function () {\n\t\tthis._draggable.off({\n\t\t\tdragstart: this._onDragStart,\n\t\t\tpredrag: this._onPreDrag,\n\t\t\tdrag: this._onDrag,\n\t\t\tdragend: this._onDragEnd\n\t\t}, this).disable();\n\n\t\tif (this._marker._icon) {\n\t\t\tremoveClass(this._marker._icon, 'leaflet-marker-draggable');\n\t\t}\n\t},\n\n\tmoved: function () {\n\t\treturn this._draggable && this._draggable._moved;\n\t},\n\n\t_adjustPan: function (e) {\n\t\tvar marker = this._marker,\n\t\t map = marker._map,\n\t\t speed = this._marker.options.autoPanSpeed,\n\t\t padding = this._marker.options.autoPanPadding,\n\t\t iconPos = getPosition(marker._icon),\n\t\t bounds = map.getPixelBounds(),\n\t\t origin = map.getPixelOrigin();\n\n\t\tvar panBounds = toBounds(\n\t\t\tbounds.min._subtract(origin).add(padding),\n\t\t\tbounds.max._subtract(origin).subtract(padding)\n\t\t);\n\n\t\tif (!panBounds.contains(iconPos)) {\n\t\t\t// Compute incremental movement\n\t\t\tvar movement = toPoint(\n\t\t\t\t(Math.max(panBounds.max.x, iconPos.x) - panBounds.max.x) / (bounds.max.x - panBounds.max.x) -\n\t\t\t\t(Math.min(panBounds.min.x, iconPos.x) - panBounds.min.x) / (bounds.min.x - panBounds.min.x),\n\n\t\t\t\t(Math.max(panBounds.max.y, iconPos.y) - panBounds.max.y) / (bounds.max.y - panBounds.max.y) -\n\t\t\t\t(Math.min(panBounds.min.y, iconPos.y) - panBounds.min.y) / (bounds.min.y - panBounds.min.y)\n\t\t\t).multiplyBy(speed);\n\n\t\t\tmap.panBy(movement, {animate: false});\n\n\t\t\tthis._draggable._newPos._add(movement);\n\t\t\tthis._draggable._startPos._add(movement);\n\n\t\t\tsetPosition(marker._icon, this._draggable._newPos);\n\t\t\tthis._onDrag(e);\n\n\t\t\tthis._panRequest = requestAnimFrame(this._adjustPan.bind(this, e));\n\t\t}\n\t},\n\n\t_onDragStart: function () {\n\t\t// @section Dragging events\n\t\t// @event dragstart: Event\n\t\t// Fired when the user starts dragging the marker.\n\n\t\t// @event movestart: Event\n\t\t// Fired when the marker starts moving (because of dragging).\n\n\t\tthis._oldLatLng = this._marker.getLatLng();\n\t\tthis._marker\n\t\t .closePopup()\n\t\t .fire('movestart')\n\t\t .fire('dragstart');\n\t},\n\n\t_onPreDrag: function (e) {\n\t\tif (this._marker.options.autoPan) {\n\t\t\tcancelAnimFrame(this._panRequest);\n\t\t\tthis._panRequest = requestAnimFrame(this._adjustPan.bind(this, e));\n\t\t}\n\t},\n\n\t_onDrag: function (e) {\n\t\tvar marker = this._marker,\n\t\t shadow = marker._shadow,\n\t\t iconPos = getPosition(marker._icon),\n\t\t latlng = marker._map.layerPointToLatLng(iconPos);\n\n\t\t// update shadow position\n\t\tif (shadow) {\n\t\t\tsetPosition(shadow, iconPos);\n\t\t}\n\n\t\tmarker._latlng = latlng;\n\t\te.latlng = latlng;\n\t\te.oldLatLng = this._oldLatLng;\n\n\t\t// @event drag: Event\n\t\t// Fired repeatedly while the user drags the marker.\n\t\tmarker\n\t\t .fire('move', e)\n\t\t .fire('drag', e);\n\t},\n\n\t_onDragEnd: function (e) {\n\t\t// @event dragend: DragEndEvent\n\t\t// Fired when the user stops dragging the marker.\n\n\t\t cancelAnimFrame(this._panRequest);\n\n\t\t// @event moveend: Event\n\t\t// Fired when the marker stops moving (because of dragging).\n\t\tdelete this._oldLatLng;\n\t\tthis._marker\n\t\t .fire('moveend')\n\t\t .fire('dragend', e);\n\t}\n});\n\n/*\r\n * @class Marker\r\n * @inherits Interactive layer\r\n * @aka L.Marker\r\n * L.Marker is used to display clickable/draggable icons on the map. Extends `Layer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.marker([50.5, 30.5]).addTo(map);\r\n * ```\r\n */\r\n\r\nvar Marker = Layer.extend({\r\n\r\n\t// @section\r\n\t// @aka Marker options\r\n\toptions: {\r\n\t\t// @option icon: Icon = *\r\n\t\t// Icon instance to use for rendering the marker.\r\n\t\t// See [Icon documentation](#L.Icon) for details on how to customize the marker icon.\r\n\t\t// If not specified, a common instance of `L.Icon.Default` is used.\r\n\t\ticon: new IconDefault(),\r\n\r\n\t\t// Option inherited from \"Interactive layer\" abstract class\r\n\t\tinteractive: true,\r\n\r\n\t\t// @option keyboard: Boolean = true\r\n\t\t// Whether the marker can be tabbed to with a keyboard and clicked by pressing enter.\r\n\t\tkeyboard: true,\r\n\r\n\t\t// @option title: String = ''\r\n\t\t// Text for the browser tooltip that appear on marker hover (no tooltip by default).\r\n\t\ttitle: '',\r\n\r\n\t\t// @option alt: String = ''\r\n\t\t// Text for the `alt` attribute of the icon image (useful for accessibility).\r\n\t\talt: '',\r\n\r\n\t\t// @option zIndexOffset: Number = 0\r\n\t\t// By default, marker images zIndex is set automatically based on its latitude. Use this option if you want to put the marker on top of all others (or below), specifying a high value like `1000` (or high negative value, respectively).\r\n\t\tzIndexOffset: 0,\r\n\r\n\t\t// @option opacity: Number = 1.0\r\n\t\t// The opacity of the marker.\r\n\t\topacity: 1,\r\n\r\n\t\t// @option riseOnHover: Boolean = false\r\n\t\t// If `true`, the marker will get on top of others when you hover the mouse over it.\r\n\t\triseOnHover: false,\r\n\r\n\t\t// @option riseOffset: Number = 250\r\n\t\t// The z-index offset used for the `riseOnHover` feature.\r\n\t\triseOffset: 250,\r\n\r\n\t\t// @option pane: String = 'markerPane'\r\n\t\t// `Map pane` where the markers icon will be added.\r\n\t\tpane: 'markerPane',\r\n\r\n\t\t// @option pane: String = 'shadowPane'\r\n\t\t// `Map pane` where the markers shadow will be added.\r\n\t\tshadowPane: 'shadowPane',\r\n\r\n\t\t// @option bubblingMouseEvents: Boolean = false\r\n\t\t// When `true`, a mouse event on this marker will trigger the same event on the map\r\n\t\t// (unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used).\r\n\t\tbubblingMouseEvents: false,\r\n\r\n\t\t// @section Draggable marker options\r\n\t\t// @option draggable: Boolean = false\r\n\t\t// Whether the marker is draggable with mouse/touch or not.\r\n\t\tdraggable: false,\r\n\r\n\t\t// @option autoPan: Boolean = false\r\n\t\t// Whether to pan the map when dragging this marker near its edge or not.\r\n\t\tautoPan: false,\r\n\r\n\t\t// @option autoPanPadding: Point = Point(50, 50)\r\n\t\t// Distance (in pixels to the left/right and to the top/bottom) of the\r\n\t\t// map edge to start panning the map.\r\n\t\tautoPanPadding: [50, 50],\r\n\r\n\t\t// @option autoPanSpeed: Number = 10\r\n\t\t// Number of pixels the map should pan by.\r\n\t\tautoPanSpeed: 10\r\n\t},\r\n\r\n\t/* @section\r\n\t *\r\n\t * In addition to [shared layer methods](#Layer) like `addTo()` and `remove()` and [popup methods](#Popup) like bindPopup() you can also use the following methods:\r\n\t */\r\n\r\n\tinitialize: function (latlng, options) {\r\n\t\tsetOptions(this, options);\r\n\t\tthis._latlng = toLatLng(latlng);\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tthis._zoomAnimated = this._zoomAnimated && map.options.markerZoomAnimation;\r\n\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tmap.on('zoomanim', this._animateZoom, this);\r\n\t\t}\r\n\r\n\t\tthis._initIcon();\r\n\t\tthis.update();\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tif (this.dragging && this.dragging.enabled()) {\r\n\t\t\tthis.options.draggable = true;\r\n\t\t\tthis.dragging.removeHooks();\r\n\t\t}\r\n\t\tdelete this.dragging;\r\n\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tmap.off('zoomanim', this._animateZoom, this);\r\n\t\t}\r\n\r\n\t\tthis._removeIcon();\r\n\t\tthis._removeShadow();\r\n\t},\r\n\r\n\tgetEvents: function () {\r\n\t\treturn {\r\n\t\t\tzoom: this.update,\r\n\t\t\tviewreset: this.update\r\n\t\t};\r\n\t},\r\n\r\n\t// @method getLatLng: LatLng\r\n\t// Returns the current geographical position of the marker.\r\n\tgetLatLng: function () {\r\n\t\treturn this._latlng;\r\n\t},\r\n\r\n\t// @method setLatLng(latlng: LatLng): this\r\n\t// Changes the marker position to the given point.\r\n\tsetLatLng: function (latlng) {\r\n\t\tvar oldLatLng = this._latlng;\r\n\t\tthis._latlng = toLatLng(latlng);\r\n\t\tthis.update();\r\n\r\n\t\t// @event move: Event\r\n\t\t// Fired when the marker is moved via [`setLatLng`](#marker-setlatlng) or by [dragging](#marker-dragging). Old and new coordinates are included in event arguments as `oldLatLng`, `latlng`.\r\n\t\treturn this.fire('move', {oldLatLng: oldLatLng, latlng: this._latlng});\r\n\t},\r\n\r\n\t// @method setZIndexOffset(offset: Number): this\r\n\t// Changes the [zIndex offset](#marker-zindexoffset) of the marker.\r\n\tsetZIndexOffset: function (offset) {\r\n\t\tthis.options.zIndexOffset = offset;\r\n\t\treturn this.update();\r\n\t},\r\n\r\n\t// @method getIcon: Icon\r\n\t// Returns the current icon used by the marker\r\n\tgetIcon: function () {\r\n\t\treturn this.options.icon;\r\n\t},\r\n\r\n\t// @method setIcon(icon: Icon): this\r\n\t// Changes the marker icon.\r\n\tsetIcon: function (icon) {\r\n\r\n\t\tthis.options.icon = icon;\r\n\r\n\t\tif (this._map) {\r\n\t\t\tthis._initIcon();\r\n\t\t\tthis.update();\r\n\t\t}\r\n\r\n\t\tif (this._popup) {\r\n\t\t\tthis.bindPopup(this._popup, this._popup.options);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tgetElement: function () {\r\n\t\treturn this._icon;\r\n\t},\r\n\r\n\tupdate: function () {\r\n\r\n\t\tif (this._icon && this._map) {\r\n\t\t\tvar pos = this._map.latLngToLayerPoint(this._latlng).round();\r\n\t\t\tthis._setPos(pos);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_initIcon: function () {\r\n\t\tvar options = this.options,\r\n\t\t classToAdd = 'leaflet-zoom-' + (this._zoomAnimated ? 'animated' : 'hide');\r\n\r\n\t\tvar icon = options.icon.createIcon(this._icon),\r\n\t\t addIcon = false;\r\n\r\n\t\t// if we're not reusing the icon, remove the old one and init new one\r\n\t\tif (icon !== this._icon) {\r\n\t\t\tif (this._icon) {\r\n\t\t\t\tthis._removeIcon();\r\n\t\t\t}\r\n\t\t\taddIcon = true;\r\n\r\n\t\t\tif (options.title) {\r\n\t\t\t\ticon.title = options.title;\r\n\t\t\t}\r\n\r\n\t\t\tif (icon.tagName === 'IMG') {\r\n\t\t\t\ticon.alt = options.alt || '';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\taddClass(icon, classToAdd);\r\n\r\n\t\tif (options.keyboard) {\r\n\t\t\ticon.tabIndex = '0';\r\n\t\t}\r\n\r\n\t\tthis._icon = icon;\r\n\r\n\t\tif (options.riseOnHover) {\r\n\t\t\tthis.on({\r\n\t\t\t\tmouseover: this._bringToFront,\r\n\t\t\t\tmouseout: this._resetZIndex\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tvar newShadow = options.icon.createShadow(this._shadow),\r\n\t\t addShadow = false;\r\n\r\n\t\tif (newShadow !== this._shadow) {\r\n\t\t\tthis._removeShadow();\r\n\t\t\taddShadow = true;\r\n\t\t}\r\n\r\n\t\tif (newShadow) {\r\n\t\t\taddClass(newShadow, classToAdd);\r\n\t\t\tnewShadow.alt = '';\r\n\t\t}\r\n\t\tthis._shadow = newShadow;\r\n\r\n\r\n\t\tif (options.opacity < 1) {\r\n\t\t\tthis._updateOpacity();\r\n\t\t}\r\n\r\n\r\n\t\tif (addIcon) {\r\n\t\t\tthis.getPane().appendChild(this._icon);\r\n\t\t}\r\n\t\tthis._initInteraction();\r\n\t\tif (newShadow && addShadow) {\r\n\t\t\tthis.getPane(options.shadowPane).appendChild(this._shadow);\r\n\t\t}\r\n\t},\r\n\r\n\t_removeIcon: function () {\r\n\t\tif (this.options.riseOnHover) {\r\n\t\t\tthis.off({\r\n\t\t\t\tmouseover: this._bringToFront,\r\n\t\t\t\tmouseout: this._resetZIndex\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tremove(this._icon);\r\n\t\tthis.removeInteractiveTarget(this._icon);\r\n\r\n\t\tthis._icon = null;\r\n\t},\r\n\r\n\t_removeShadow: function () {\r\n\t\tif (this._shadow) {\r\n\t\t\tremove(this._shadow);\r\n\t\t}\r\n\t\tthis._shadow = null;\r\n\t},\r\n\r\n\t_setPos: function (pos) {\r\n\r\n\t\tif (this._icon) {\r\n\t\t\tsetPosition(this._icon, pos);\r\n\t\t}\r\n\r\n\t\tif (this._shadow) {\r\n\t\t\tsetPosition(this._shadow, pos);\r\n\t\t}\r\n\r\n\t\tthis._zIndex = pos.y + this.options.zIndexOffset;\r\n\r\n\t\tthis._resetZIndex();\r\n\t},\r\n\r\n\t_updateZIndex: function (offset) {\r\n\t\tif (this._icon) {\r\n\t\t\tthis._icon.style.zIndex = this._zIndex + offset;\r\n\t\t}\r\n\t},\r\n\r\n\t_animateZoom: function (opt) {\r\n\t\tvar pos = this._map._latLngToNewLayerPoint(this._latlng, opt.zoom, opt.center).round();\r\n\r\n\t\tthis._setPos(pos);\r\n\t},\r\n\r\n\t_initInteraction: function () {\r\n\r\n\t\tif (!this.options.interactive) { return; }\r\n\r\n\t\taddClass(this._icon, 'leaflet-interactive');\r\n\r\n\t\tthis.addInteractiveTarget(this._icon);\r\n\r\n\t\tif (MarkerDrag) {\r\n\t\t\tvar draggable = this.options.draggable;\r\n\t\t\tif (this.dragging) {\r\n\t\t\t\tdraggable = this.dragging.enabled();\r\n\t\t\t\tthis.dragging.disable();\r\n\t\t\t}\r\n\r\n\t\t\tthis.dragging = new MarkerDrag(this);\r\n\r\n\t\t\tif (draggable) {\r\n\t\t\t\tthis.dragging.enable();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t// @method setOpacity(opacity: Number): this\r\n\t// Changes the opacity of the marker.\r\n\tsetOpacity: function (opacity) {\r\n\t\tthis.options.opacity = opacity;\r\n\t\tif (this._map) {\r\n\t\t\tthis._updateOpacity();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_updateOpacity: function () {\r\n\t\tvar opacity = this.options.opacity;\r\n\r\n\t\tif (this._icon) {\r\n\t\t\tsetOpacity(this._icon, opacity);\r\n\t\t}\r\n\r\n\t\tif (this._shadow) {\r\n\t\t\tsetOpacity(this._shadow, opacity);\r\n\t\t}\r\n\t},\r\n\r\n\t_bringToFront: function () {\r\n\t\tthis._updateZIndex(this.options.riseOffset);\r\n\t},\r\n\r\n\t_resetZIndex: function () {\r\n\t\tthis._updateZIndex(0);\r\n\t},\r\n\r\n\t_getPopupAnchor: function () {\r\n\t\treturn this.options.icon.options.popupAnchor;\r\n\t},\r\n\r\n\t_getTooltipAnchor: function () {\r\n\t\treturn this.options.icon.options.tooltipAnchor;\r\n\t}\r\n});\r\n\r\n\r\n// factory L.marker(latlng: LatLng, options? : Marker options)\r\n\r\n// @factory L.marker(latlng: LatLng, options? : Marker options)\r\n// Instantiates a Marker object given a geographical point and optionally an options object.\r\nfunction marker(latlng, options) {\r\n\treturn new Marker(latlng, options);\r\n}\n\n/*\n * @class Path\n * @aka L.Path\n * @inherits Interactive layer\n *\n * An abstract class that contains options and constants shared between vector\n * overlays (Polygon, Polyline, Circle). Do not use it directly. Extends `Layer`.\n */\n\nvar Path = Layer.extend({\n\n\t// @section\n\t// @aka Path options\n\toptions: {\n\t\t// @option stroke: Boolean = true\n\t\t// Whether to draw stroke along the path. Set it to `false` to disable borders on polygons or circles.\n\t\tstroke: true,\n\n\t\t// @option color: String = '#3388ff'\n\t\t// Stroke color\n\t\tcolor: '#3388ff',\n\n\t\t// @option weight: Number = 3\n\t\t// Stroke width in pixels\n\t\tweight: 3,\n\n\t\t// @option opacity: Number = 1.0\n\t\t// Stroke opacity\n\t\topacity: 1,\n\n\t\t// @option lineCap: String= 'round'\n\t\t// A string that defines [shape to be used at the end](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-linecap) of the stroke.\n\t\tlineCap: 'round',\n\n\t\t// @option lineJoin: String = 'round'\n\t\t// A string that defines [shape to be used at the corners](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-linejoin) of the stroke.\n\t\tlineJoin: 'round',\n\n\t\t// @option dashArray: String = null\n\t\t// A string that defines the stroke [dash pattern](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dasharray). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility).\n\t\tdashArray: null,\n\n\t\t// @option dashOffset: String = null\n\t\t// A string that defines the [distance into the dash pattern to start the dash](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dashoffset). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility).\n\t\tdashOffset: null,\n\n\t\t// @option fill: Boolean = depends\n\t\t// Whether to fill the path with color. Set it to `false` to disable filling on polygons or circles.\n\t\tfill: false,\n\n\t\t// @option fillColor: String = *\n\t\t// Fill color. Defaults to the value of the [`color`](#path-color) option\n\t\tfillColor: null,\n\n\t\t// @option fillOpacity: Number = 0.2\n\t\t// Fill opacity.\n\t\tfillOpacity: 0.2,\n\n\t\t// @option fillRule: String = 'evenodd'\n\t\t// A string that defines [how the inside of a shape](https://developer.mozilla.org/docs/Web/SVG/Attribute/fill-rule) is determined.\n\t\tfillRule: 'evenodd',\n\n\t\t// className: '',\n\n\t\t// Option inherited from \"Interactive layer\" abstract class\n\t\tinteractive: true,\n\n\t\t// @option bubblingMouseEvents: Boolean = true\n\t\t// When `true`, a mouse event on this path will trigger the same event on the map\n\t\t// (unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used).\n\t\tbubblingMouseEvents: true\n\t},\n\n\tbeforeAdd: function (map) {\n\t\t// Renderer is set here because we need to call renderer.getEvents\n\t\t// before this.getEvents.\n\t\tthis._renderer = map.getRenderer(this);\n\t},\n\n\tonAdd: function () {\n\t\tthis._renderer._initPath(this);\n\t\tthis._reset();\n\t\tthis._renderer._addPath(this);\n\t},\n\n\tonRemove: function () {\n\t\tthis._renderer._removePath(this);\n\t},\n\n\t// @method redraw(): this\n\t// Redraws the layer. Sometimes useful after you changed the coordinates that the path uses.\n\tredraw: function () {\n\t\tif (this._map) {\n\t\t\tthis._renderer._updatePath(this);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method setStyle(style: Path options): this\n\t// Changes the appearance of a Path based on the options in the `Path options` object.\n\tsetStyle: function (style) {\n\t\tsetOptions(this, style);\n\t\tif (this._renderer) {\n\t\t\tthis._renderer._updateStyle(this);\n\t\t\tif (this.options.stroke && style && style.hasOwnProperty('weight')) {\n\t\t\t\tthis._updateBounds();\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method bringToFront(): this\n\t// Brings the layer to the top of all path layers.\n\tbringToFront: function () {\n\t\tif (this._renderer) {\n\t\t\tthis._renderer._bringToFront(this);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method bringToBack(): this\n\t// Brings the layer to the bottom of all path layers.\n\tbringToBack: function () {\n\t\tif (this._renderer) {\n\t\t\tthis._renderer._bringToBack(this);\n\t\t}\n\t\treturn this;\n\t},\n\n\tgetElement: function () {\n\t\treturn this._path;\n\t},\n\n\t_reset: function () {\n\t\t// defined in child classes\n\t\tthis._project();\n\t\tthis._update();\n\t},\n\n\t_clickTolerance: function () {\n\t\t// used when doing hit detection for Canvas layers\n\t\treturn (this.options.stroke ? this.options.weight / 2 : 0) + this._renderer.options.tolerance;\n\t}\n});\n\n/*\n * @class CircleMarker\n * @aka L.CircleMarker\n * @inherits Path\n *\n * A circle of a fixed size with radius specified in pixels. Extends `Path`.\n */\n\nvar CircleMarker = Path.extend({\n\n\t// @section\n\t// @aka CircleMarker options\n\toptions: {\n\t\tfill: true,\n\n\t\t// @option radius: Number = 10\n\t\t// Radius of the circle marker, in pixels\n\t\tradius: 10\n\t},\n\n\tinitialize: function (latlng, options) {\n\t\tsetOptions(this, options);\n\t\tthis._latlng = toLatLng(latlng);\n\t\tthis._radius = this.options.radius;\n\t},\n\n\t// @method setLatLng(latLng: LatLng): this\n\t// Sets the position of a circle marker to a new location.\n\tsetLatLng: function (latlng) {\n\t\tvar oldLatLng = this._latlng;\n\t\tthis._latlng = toLatLng(latlng);\n\t\tthis.redraw();\n\n\t\t// @event move: Event\n\t\t// Fired when the marker is moved via [`setLatLng`](#circlemarker-setlatlng). Old and new coordinates are included in event arguments as `oldLatLng`, `latlng`.\n\t\treturn this.fire('move', {oldLatLng: oldLatLng, latlng: this._latlng});\n\t},\n\n\t// @method getLatLng(): LatLng\n\t// Returns the current geographical position of the circle marker\n\tgetLatLng: function () {\n\t\treturn this._latlng;\n\t},\n\n\t// @method setRadius(radius: Number): this\n\t// Sets the radius of a circle marker. Units are in pixels.\n\tsetRadius: function (radius) {\n\t\tthis.options.radius = this._radius = radius;\n\t\treturn this.redraw();\n\t},\n\n\t// @method getRadius(): Number\n\t// Returns the current radius of the circle\n\tgetRadius: function () {\n\t\treturn this._radius;\n\t},\n\n\tsetStyle : function (options) {\n\t\tvar radius = options && options.radius || this._radius;\n\t\tPath.prototype.setStyle.call(this, options);\n\t\tthis.setRadius(radius);\n\t\treturn this;\n\t},\n\n\t_project: function () {\n\t\tthis._point = this._map.latLngToLayerPoint(this._latlng);\n\t\tthis._updateBounds();\n\t},\n\n\t_updateBounds: function () {\n\t\tvar r = this._radius,\n\t\t r2 = this._radiusY || r,\n\t\t w = this._clickTolerance(),\n\t\t p = [r + w, r2 + w];\n\t\tthis._pxBounds = new Bounds(this._point.subtract(p), this._point.add(p));\n\t},\n\n\t_update: function () {\n\t\tif (this._map) {\n\t\t\tthis._updatePath();\n\t\t}\n\t},\n\n\t_updatePath: function () {\n\t\tthis._renderer._updateCircle(this);\n\t},\n\n\t_empty: function () {\n\t\treturn this._radius && !this._renderer._bounds.intersects(this._pxBounds);\n\t},\n\n\t// Needed by the `Canvas` renderer for interactivity\n\t_containsPoint: function (p) {\n\t\treturn p.distanceTo(this._point) <= this._radius + this._clickTolerance();\n\t}\n});\n\n\n// @factory L.circleMarker(latlng: LatLng, options?: CircleMarker options)\n// Instantiates a circle marker object given a geographical point, and an optional options object.\nfunction circleMarker(latlng, options) {\n\treturn new CircleMarker(latlng, options);\n}\n\n/*\n * @class Circle\n * @aka L.Circle\n * @inherits CircleMarker\n *\n * A class for drawing circle overlays on a map. Extends `CircleMarker`.\n *\n * It's an approximation and starts to diverge from a real circle closer to poles (due to projection distortion).\n *\n * @example\n *\n * ```js\n * L.circle([50.5, 30.5], {radius: 200}).addTo(map);\n * ```\n */\n\nvar Circle = CircleMarker.extend({\n\n\tinitialize: function (latlng, options, legacyOptions) {\n\t\tif (typeof options === 'number') {\n\t\t\t// Backwards compatibility with 0.7.x factory (latlng, radius, options?)\n\t\t\toptions = extend({}, legacyOptions, {radius: options});\n\t\t}\n\t\tsetOptions(this, options);\n\t\tthis._latlng = toLatLng(latlng);\n\n\t\tif (isNaN(this.options.radius)) { throw new Error('Circle radius cannot be NaN'); }\n\n\t\t// @section\n\t\t// @aka Circle options\n\t\t// @option radius: Number; Radius of the circle, in meters.\n\t\tthis._mRadius = this.options.radius;\n\t},\n\n\t// @method setRadius(radius: Number): this\n\t// Sets the radius of a circle. Units are in meters.\n\tsetRadius: function (radius) {\n\t\tthis._mRadius = radius;\n\t\treturn this.redraw();\n\t},\n\n\t// @method getRadius(): Number\n\t// Returns the current radius of a circle. Units are in meters.\n\tgetRadius: function () {\n\t\treturn this._mRadius;\n\t},\n\n\t// @method getBounds(): LatLngBounds\n\t// Returns the `LatLngBounds` of the path.\n\tgetBounds: function () {\n\t\tvar half = [this._radius, this._radiusY || this._radius];\n\n\t\treturn new LatLngBounds(\n\t\t\tthis._map.layerPointToLatLng(this._point.subtract(half)),\n\t\t\tthis._map.layerPointToLatLng(this._point.add(half)));\n\t},\n\n\tsetStyle: Path.prototype.setStyle,\n\n\t_project: function () {\n\n\t\tvar lng = this._latlng.lng,\n\t\t lat = this._latlng.lat,\n\t\t map = this._map,\n\t\t crs = map.options.crs;\n\n\t\tif (crs.distance === Earth.distance) {\n\t\t\tvar d = Math.PI / 180,\n\t\t\t latR = (this._mRadius / Earth.R) / d,\n\t\t\t top = map.project([lat + latR, lng]),\n\t\t\t bottom = map.project([lat - latR, lng]),\n\t\t\t p = top.add(bottom).divideBy(2),\n\t\t\t lat2 = map.unproject(p).lat,\n\t\t\t lngR = Math.acos((Math.cos(latR * d) - Math.sin(lat * d) * Math.sin(lat2 * d)) /\n\t\t\t (Math.cos(lat * d) * Math.cos(lat2 * d))) / d;\n\n\t\t\tif (isNaN(lngR) || lngR === 0) {\n\t\t\t\tlngR = latR / Math.cos(Math.PI / 180 * lat); // Fallback for edge case, #2425\n\t\t\t}\n\n\t\t\tthis._point = p.subtract(map.getPixelOrigin());\n\t\t\tthis._radius = isNaN(lngR) ? 0 : p.x - map.project([lat2, lng - lngR]).x;\n\t\t\tthis._radiusY = p.y - top.y;\n\n\t\t} else {\n\t\t\tvar latlng2 = crs.unproject(crs.project(this._latlng).subtract([this._mRadius, 0]));\n\n\t\t\tthis._point = map.latLngToLayerPoint(this._latlng);\n\t\t\tthis._radius = this._point.x - map.latLngToLayerPoint(latlng2).x;\n\t\t}\n\n\t\tthis._updateBounds();\n\t}\n});\n\n// @factory L.circle(latlng: LatLng, options?: Circle options)\n// Instantiates a circle object given a geographical point, and an options object\n// which contains the circle radius.\n// @alternative\n// @factory L.circle(latlng: LatLng, radius: Number, options?: Circle options)\n// Obsolete way of instantiating a circle, for compatibility with 0.7.x code.\n// Do not use in new applications or plugins.\nfunction circle(latlng, options, legacyOptions) {\n\treturn new Circle(latlng, options, legacyOptions);\n}\n\n/*\n * @class Polyline\n * @aka L.Polyline\n * @inherits Path\n *\n * A class for drawing polyline overlays on a map. Extends `Path`.\n *\n * @example\n *\n * ```js\n * // create a red polyline from an array of LatLng points\n * var latlngs = [\n * \t[45.51, -122.68],\n * \t[37.77, -122.43],\n * \t[34.04, -118.2]\n * ];\n *\n * var polyline = L.polyline(latlngs, {color: 'red'}).addTo(map);\n *\n * // zoom the map to the polyline\n * map.fitBounds(polyline.getBounds());\n * ```\n *\n * You can also pass a multi-dimensional array to represent a `MultiPolyline` shape:\n *\n * ```js\n * // create a red polyline from an array of arrays of LatLng points\n * var latlngs = [\n * \t[[45.51, -122.68],\n * \t [37.77, -122.43],\n * \t [34.04, -118.2]],\n * \t[[40.78, -73.91],\n * \t [41.83, -87.62],\n * \t [32.76, -96.72]]\n * ];\n * ```\n */\n\n\nvar Polyline = Path.extend({\n\n\t// @section\n\t// @aka Polyline options\n\toptions: {\n\t\t// @option smoothFactor: Number = 1.0\n\t\t// How much to simplify the polyline on each zoom level. More means\n\t\t// better performance and smoother look, and less means more accurate representation.\n\t\tsmoothFactor: 1.0,\n\n\t\t// @option noClip: Boolean = false\n\t\t// Disable polyline clipping.\n\t\tnoClip: false\n\t},\n\n\tinitialize: function (latlngs, options) {\n\t\tsetOptions(this, options);\n\t\tthis._setLatLngs(latlngs);\n\t},\n\n\t// @method getLatLngs(): LatLng[]\n\t// Returns an array of the points in the path, or nested arrays of points in case of multi-polyline.\n\tgetLatLngs: function () {\n\t\treturn this._latlngs;\n\t},\n\n\t// @method setLatLngs(latlngs: LatLng[]): this\n\t// Replaces all the points in the polyline with the given array of geographical points.\n\tsetLatLngs: function (latlngs) {\n\t\tthis._setLatLngs(latlngs);\n\t\treturn this.redraw();\n\t},\n\n\t// @method isEmpty(): Boolean\n\t// Returns `true` if the Polyline has no LatLngs.\n\tisEmpty: function () {\n\t\treturn !this._latlngs.length;\n\t},\n\n\t// @method closestLayerPoint(p: Point): Point\n\t// Returns the point closest to `p` on the Polyline.\n\tclosestLayerPoint: function (p) {\n\t\tvar minDistance = Infinity,\n\t\t minPoint = null,\n\t\t closest = _sqClosestPointOnSegment,\n\t\t p1, p2;\n\n\t\tfor (var j = 0, jLen = this._parts.length; j < jLen; j++) {\n\t\t\tvar points = this._parts[j];\n\n\t\t\tfor (var i = 1, len = points.length; i < len; i++) {\n\t\t\t\tp1 = points[i - 1];\n\t\t\t\tp2 = points[i];\n\n\t\t\t\tvar sqDist = closest(p, p1, p2, true);\n\n\t\t\t\tif (sqDist < minDistance) {\n\t\t\t\t\tminDistance = sqDist;\n\t\t\t\t\tminPoint = closest(p, p1, p2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (minPoint) {\n\t\t\tminPoint.distance = Math.sqrt(minDistance);\n\t\t}\n\t\treturn minPoint;\n\t},\n\n\t// @method getCenter(): LatLng\n\t// Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the polyline.\n\tgetCenter: function () {\n\t\t// throws error when not yet added to map as this center calculation requires projected coordinates\n\t\tif (!this._map) {\n\t\t\tthrow new Error('Must add layer to map before using getCenter()');\n\t\t}\n\n\t\tvar i, halfDist, segDist, dist, p1, p2, ratio,\n\t\t points = this._rings[0],\n\t\t len = points.length;\n\n\t\tif (!len) { return null; }\n\n\t\t// polyline centroid algorithm; only uses the first ring if there are multiple\n\n\t\tfor (i = 0, halfDist = 0; i < len - 1; i++) {\n\t\t\thalfDist += points[i].distanceTo(points[i + 1]) / 2;\n\t\t}\n\n\t\t// The line is so small in the current view that all points are on the same pixel.\n\t\tif (halfDist === 0) {\n\t\t\treturn this._map.layerPointToLatLng(points[0]);\n\t\t}\n\n\t\tfor (i = 0, dist = 0; i < len - 1; i++) {\n\t\t\tp1 = points[i];\n\t\t\tp2 = points[i + 1];\n\t\t\tsegDist = p1.distanceTo(p2);\n\t\t\tdist += segDist;\n\n\t\t\tif (dist > halfDist) {\n\t\t\t\tratio = (dist - halfDist) / segDist;\n\t\t\t\treturn this._map.layerPointToLatLng([\n\t\t\t\t\tp2.x - ratio * (p2.x - p1.x),\n\t\t\t\t\tp2.y - ratio * (p2.y - p1.y)\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t},\n\n\t// @method getBounds(): LatLngBounds\n\t// Returns the `LatLngBounds` of the path.\n\tgetBounds: function () {\n\t\treturn this._bounds;\n\t},\n\n\t// @method addLatLng(latlng: LatLng, latlngs? LatLng[]): this\n\t// Adds a given point to the polyline. By default, adds to the first ring of\n\t// the polyline in case of a multi-polyline, but can be overridden by passing\n\t// a specific ring as a LatLng array (that you can earlier access with [`getLatLngs`](#polyline-getlatlngs)).\n\taddLatLng: function (latlng, latlngs) {\n\t\tlatlngs = latlngs || this._defaultShape();\n\t\tlatlng = toLatLng(latlng);\n\t\tlatlngs.push(latlng);\n\t\tthis._bounds.extend(latlng);\n\t\treturn this.redraw();\n\t},\n\n\t_setLatLngs: function (latlngs) {\n\t\tthis._bounds = new LatLngBounds();\n\t\tthis._latlngs = this._convertLatLngs(latlngs);\n\t},\n\n\t_defaultShape: function () {\n\t\treturn isFlat(this._latlngs) ? this._latlngs : this._latlngs[0];\n\t},\n\n\t// recursively convert latlngs input into actual LatLng instances; calculate bounds along the way\n\t_convertLatLngs: function (latlngs) {\n\t\tvar result = [],\n\t\t flat = isFlat(latlngs);\n\n\t\tfor (var i = 0, len = latlngs.length; i < len; i++) {\n\t\t\tif (flat) {\n\t\t\t\tresult[i] = toLatLng(latlngs[i]);\n\t\t\t\tthis._bounds.extend(result[i]);\n\t\t\t} else {\n\t\t\t\tresult[i] = this._convertLatLngs(latlngs[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t},\n\n\t_project: function () {\n\t\tvar pxBounds = new Bounds();\n\t\tthis._rings = [];\n\t\tthis._projectLatlngs(this._latlngs, this._rings, pxBounds);\n\n\t\tif (this._bounds.isValid() && pxBounds.isValid()) {\n\t\t\tthis._rawPxBounds = pxBounds;\n\t\t\tthis._updateBounds();\n\t\t}\n\t},\n\n\t_updateBounds: function () {\n\t\tvar w = this._clickTolerance(),\n\t\t p = new Point(w, w);\n\t\tthis._pxBounds = new Bounds([\n\t\t\tthis._rawPxBounds.min.subtract(p),\n\t\t\tthis._rawPxBounds.max.add(p)\n\t\t]);\n\t},\n\n\t// recursively turns latlngs into a set of rings with projected coordinates\n\t_projectLatlngs: function (latlngs, result, projectedBounds) {\n\t\tvar flat = latlngs[0] instanceof LatLng,\n\t\t len = latlngs.length,\n\t\t i, ring;\n\n\t\tif (flat) {\n\t\t\tring = [];\n\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\tring[i] = this._map.latLngToLayerPoint(latlngs[i]);\n\t\t\t\tprojectedBounds.extend(ring[i]);\n\t\t\t}\n\t\t\tresult.push(ring);\n\t\t} else {\n\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\tthis._projectLatlngs(latlngs[i], result, projectedBounds);\n\t\t\t}\n\t\t}\n\t},\n\n\t// clip polyline by renderer bounds so that we have less to render for performance\n\t_clipPoints: function () {\n\t\tvar bounds = this._renderer._bounds;\n\n\t\tthis._parts = [];\n\t\tif (!this._pxBounds || !this._pxBounds.intersects(bounds)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.options.noClip) {\n\t\t\tthis._parts = this._rings;\n\t\t\treturn;\n\t\t}\n\n\t\tvar parts = this._parts,\n\t\t i, j, k, len, len2, segment, points;\n\n\t\tfor (i = 0, k = 0, len = this._rings.length; i < len; i++) {\n\t\t\tpoints = this._rings[i];\n\n\t\t\tfor (j = 0, len2 = points.length; j < len2 - 1; j++) {\n\t\t\t\tsegment = clipSegment(points[j], points[j + 1], bounds, j, true);\n\n\t\t\t\tif (!segment) { continue; }\n\n\t\t\t\tparts[k] = parts[k] || [];\n\t\t\t\tparts[k].push(segment[0]);\n\n\t\t\t\t// if segment goes out of screen, or it's the last one, it's the end of the line part\n\t\t\t\tif ((segment[1] !== points[j + 1]) || (j === len2 - 2)) {\n\t\t\t\t\tparts[k].push(segment[1]);\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// simplify each clipped part of the polyline for performance\n\t_simplifyPoints: function () {\n\t\tvar parts = this._parts,\n\t\t tolerance = this.options.smoothFactor;\n\n\t\tfor (var i = 0, len = parts.length; i < len; i++) {\n\t\t\tparts[i] = simplify(parts[i], tolerance);\n\t\t}\n\t},\n\n\t_update: function () {\n\t\tif (!this._map) { return; }\n\n\t\tthis._clipPoints();\n\t\tthis._simplifyPoints();\n\t\tthis._updatePath();\n\t},\n\n\t_updatePath: function () {\n\t\tthis._renderer._updatePoly(this);\n\t},\n\n\t// Needed by the `Canvas` renderer for interactivity\n\t_containsPoint: function (p, closed) {\n\t\tvar i, j, k, len, len2, part,\n\t\t w = this._clickTolerance();\n\n\t\tif (!this._pxBounds || !this._pxBounds.contains(p)) { return false; }\n\n\t\t// hit detection for polylines\n\t\tfor (i = 0, len = this._parts.length; i < len; i++) {\n\t\t\tpart = this._parts[i];\n\n\t\t\tfor (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) {\n\t\t\t\tif (!closed && (j === 0)) { continue; }\n\n\t\t\t\tif (pointToSegmentDistance(p, part[k], part[j]) <= w) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n});\n\n// @factory L.polyline(latlngs: LatLng[], options?: Polyline options)\n// Instantiates a polyline object given an array of geographical points and\n// optionally an options object. You can create a `Polyline` object with\n// multiple separate lines (`MultiPolyline`) by passing an array of arrays\n// of geographic points.\nfunction polyline(latlngs, options) {\n\treturn new Polyline(latlngs, options);\n}\n\n// Retrocompat. Allow plugins to support Leaflet versions before and after 1.1.\nPolyline._flat = _flat;\n\n/*\n * @class Polygon\n * @aka L.Polygon\n * @inherits Polyline\n *\n * A class for drawing polygon overlays on a map. Extends `Polyline`.\n *\n * Note that points you pass when creating a polygon shouldn't have an additional last point equal to the first one — it's better to filter out such points.\n *\n *\n * @example\n *\n * ```js\n * // create a red polygon from an array of LatLng points\n * var latlngs = [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]];\n *\n * var polygon = L.polygon(latlngs, {color: 'red'}).addTo(map);\n *\n * // zoom the map to the polygon\n * map.fitBounds(polygon.getBounds());\n * ```\n *\n * You can also pass an array of arrays of latlngs, with the first array representing the outer shape and the other arrays representing holes in the outer shape:\n *\n * ```js\n * var latlngs = [\n * [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]], // outer ring\n * [[37.29, -108.58],[40.71, -108.58],[40.71, -102.50],[37.29, -102.50]] // hole\n * ];\n * ```\n *\n * Additionally, you can pass a multi-dimensional array to represent a MultiPolygon shape.\n *\n * ```js\n * var latlngs = [\n * [ // first polygon\n * [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]], // outer ring\n * [[37.29, -108.58],[40.71, -108.58],[40.71, -102.50],[37.29, -102.50]] // hole\n * ],\n * [ // second polygon\n * [[41, -111.03],[45, -111.04],[45, -104.05],[41, -104.05]]\n * ]\n * ];\n * ```\n */\n\nvar Polygon = Polyline.extend({\n\n\toptions: {\n\t\tfill: true\n\t},\n\n\tisEmpty: function () {\n\t\treturn !this._latlngs.length || !this._latlngs[0].length;\n\t},\n\n\tgetCenter: function () {\n\t\t// throws error when not yet added to map as this center calculation requires projected coordinates\n\t\tif (!this._map) {\n\t\t\tthrow new Error('Must add layer to map before using getCenter()');\n\t\t}\n\n\t\tvar i, j, p1, p2, f, area, x, y, center,\n\t\t points = this._rings[0],\n\t\t len = points.length;\n\n\t\tif (!len) { return null; }\n\n\t\t// polygon centroid algorithm; only uses the first ring if there are multiple\n\n\t\tarea = x = y = 0;\n\n\t\tfor (i = 0, j = len - 1; i < len; j = i++) {\n\t\t\tp1 = points[i];\n\t\t\tp2 = points[j];\n\n\t\t\tf = p1.y * p2.x - p2.y * p1.x;\n\t\t\tx += (p1.x + p2.x) * f;\n\t\t\ty += (p1.y + p2.y) * f;\n\t\t\tarea += f * 3;\n\t\t}\n\n\t\tif (area === 0) {\n\t\t\t// Polygon is so small that all points are on same pixel.\n\t\t\tcenter = points[0];\n\t\t} else {\n\t\t\tcenter = [x / area, y / area];\n\t\t}\n\t\treturn this._map.layerPointToLatLng(center);\n\t},\n\n\t_convertLatLngs: function (latlngs) {\n\t\tvar result = Polyline.prototype._convertLatLngs.call(this, latlngs),\n\t\t len = result.length;\n\n\t\t// remove last point if it equals first one\n\t\tif (len >= 2 && result[0] instanceof LatLng && result[0].equals(result[len - 1])) {\n\t\t\tresult.pop();\n\t\t}\n\t\treturn result;\n\t},\n\n\t_setLatLngs: function (latlngs) {\n\t\tPolyline.prototype._setLatLngs.call(this, latlngs);\n\t\tif (isFlat(this._latlngs)) {\n\t\t\tthis._latlngs = [this._latlngs];\n\t\t}\n\t},\n\n\t_defaultShape: function () {\n\t\treturn isFlat(this._latlngs[0]) ? this._latlngs[0] : this._latlngs[0][0];\n\t},\n\n\t_clipPoints: function () {\n\t\t// polygons need a different clipping algorithm so we redefine that\n\n\t\tvar bounds = this._renderer._bounds,\n\t\t w = this.options.weight,\n\t\t p = new Point(w, w);\n\n\t\t// increase clip padding by stroke width to avoid stroke on clip edges\n\t\tbounds = new Bounds(bounds.min.subtract(p), bounds.max.add(p));\n\n\t\tthis._parts = [];\n\t\tif (!this._pxBounds || !this._pxBounds.intersects(bounds)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.options.noClip) {\n\t\t\tthis._parts = this._rings;\n\t\t\treturn;\n\t\t}\n\n\t\tfor (var i = 0, len = this._rings.length, clipped; i < len; i++) {\n\t\t\tclipped = clipPolygon(this._rings[i], bounds, true);\n\t\t\tif (clipped.length) {\n\t\t\t\tthis._parts.push(clipped);\n\t\t\t}\n\t\t}\n\t},\n\n\t_updatePath: function () {\n\t\tthis._renderer._updatePoly(this, true);\n\t},\n\n\t// Needed by the `Canvas` renderer for interactivity\n\t_containsPoint: function (p) {\n\t\tvar inside = false,\n\t\t part, p1, p2, i, j, k, len, len2;\n\n\t\tif (!this._pxBounds || !this._pxBounds.contains(p)) { return false; }\n\n\t\t// ray casting algorithm for detecting if point is in polygon\n\t\tfor (i = 0, len = this._parts.length; i < len; i++) {\n\t\t\tpart = this._parts[i];\n\n\t\t\tfor (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) {\n\t\t\t\tp1 = part[j];\n\t\t\t\tp2 = part[k];\n\n\t\t\t\tif (((p1.y > p.y) !== (p2.y > p.y)) && (p.x < (p2.x - p1.x) * (p.y - p1.y) / (p2.y - p1.y) + p1.x)) {\n\t\t\t\t\tinside = !inside;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// also check if it's on polygon stroke\n\t\treturn inside || Polyline.prototype._containsPoint.call(this, p, true);\n\t}\n\n});\n\n\n// @factory L.polygon(latlngs: LatLng[], options?: Polyline options)\nfunction polygon(latlngs, options) {\n\treturn new Polygon(latlngs, options);\n}\n\n/*\r\n * @class GeoJSON\r\n * @aka L.GeoJSON\r\n * @inherits FeatureGroup\r\n *\r\n * Represents a GeoJSON object or an array of GeoJSON objects. Allows you to parse\r\n * GeoJSON data and display it on the map. Extends `FeatureGroup`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.geoJSON(data, {\r\n * \tstyle: function (feature) {\r\n * \t\treturn {color: feature.properties.color};\r\n * \t}\r\n * }).bindPopup(function (layer) {\r\n * \treturn layer.feature.properties.description;\r\n * }).addTo(map);\r\n * ```\r\n */\r\n\r\nvar GeoJSON = FeatureGroup.extend({\r\n\r\n\t/* @section\r\n\t * @aka GeoJSON options\r\n\t *\r\n\t * @option pointToLayer: Function = *\r\n\t * A `Function` defining how GeoJSON points spawn Leaflet layers. It is internally\r\n\t * called when data is added, passing the GeoJSON point feature and its `LatLng`.\r\n\t * The default is to spawn a default `Marker`:\r\n\t * ```js\r\n\t * function(geoJsonPoint, latlng) {\r\n\t * \treturn L.marker(latlng);\r\n\t * }\r\n\t * ```\r\n\t *\r\n\t * @option style: Function = *\r\n\t * A `Function` defining the `Path options` for styling GeoJSON lines and polygons,\r\n\t * called internally when data is added.\r\n\t * The default value is to not override any defaults:\r\n\t * ```js\r\n\t * function (geoJsonFeature) {\r\n\t * \treturn {}\r\n\t * }\r\n\t * ```\r\n\t *\r\n\t * @option onEachFeature: Function = *\r\n\t * A `Function` that will be called once for each created `Feature`, after it has\r\n\t * been created and styled. Useful for attaching events and popups to features.\r\n\t * The default is to do nothing with the newly created layers:\r\n\t * ```js\r\n\t * function (feature, layer) {}\r\n\t * ```\r\n\t *\r\n\t * @option filter: Function = *\r\n\t * A `Function` that will be used to decide whether to include a feature or not.\r\n\t * The default is to include all features:\r\n\t * ```js\r\n\t * function (geoJsonFeature) {\r\n\t * \treturn true;\r\n\t * }\r\n\t * ```\r\n\t * Note: dynamically changing the `filter` option will have effect only on newly\r\n\t * added data. It will _not_ re-evaluate already included features.\r\n\t *\r\n\t * @option coordsToLatLng: Function = *\r\n\t * A `Function` that will be used for converting GeoJSON coordinates to `LatLng`s.\r\n\t * The default is the `coordsToLatLng` static method.\r\n\t *\r\n\t * @option markersInheritOptions: Boolean = false\r\n\t * Whether default Markers for \"Point\" type Features inherit from group options.\r\n\t */\r\n\r\n\tinitialize: function (geojson, options) {\r\n\t\tsetOptions(this, options);\r\n\r\n\t\tthis._layers = {};\r\n\r\n\t\tif (geojson) {\r\n\t\t\tthis.addData(geojson);\r\n\t\t}\r\n\t},\r\n\r\n\t// @method addData( data ): this\r\n\t// Adds a GeoJSON object to the layer.\r\n\taddData: function (geojson) {\r\n\t\tvar features = isArray(geojson) ? geojson : geojson.features,\r\n\t\t i, len, feature;\r\n\r\n\t\tif (features) {\r\n\t\t\tfor (i = 0, len = features.length; i < len; i++) {\r\n\t\t\t\t// only add this if geometry or geometries are set and not null\r\n\t\t\t\tfeature = features[i];\r\n\t\t\t\tif (feature.geometries || feature.geometry || feature.features || feature.coordinates) {\r\n\t\t\t\t\tthis.addData(feature);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tvar options = this.options;\r\n\r\n\t\tif (options.filter && !options.filter(geojson)) { return this; }\r\n\r\n\t\tvar layer = geometryToLayer(geojson, options);\r\n\t\tif (!layer) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tlayer.feature = asFeature(geojson);\r\n\r\n\t\tlayer.defaultOptions = layer.options;\r\n\t\tthis.resetStyle(layer);\r\n\r\n\t\tif (options.onEachFeature) {\r\n\t\t\toptions.onEachFeature(geojson, layer);\r\n\t\t}\r\n\r\n\t\treturn this.addLayer(layer);\r\n\t},\r\n\r\n\t// @method resetStyle( layer? ): this\r\n\t// Resets the given vector layer's style to the original GeoJSON style, useful for resetting style after hover events.\r\n\t// If `layer` is omitted, the style of all features in the current layer is reset.\r\n\tresetStyle: function (layer) {\r\n\t\tif (layer === undefined) {\r\n\t\t\treturn this.eachLayer(this.resetStyle, this);\r\n\t\t}\r\n\t\t// reset any custom styles\r\n\t\tlayer.options = extend({}, layer.defaultOptions);\r\n\t\tthis._setLayerStyle(layer, this.options.style);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method setStyle( style ): this\r\n\t// Changes styles of GeoJSON vector layers with the given style function.\r\n\tsetStyle: function (style) {\r\n\t\treturn this.eachLayer(function (layer) {\r\n\t\t\tthis._setLayerStyle(layer, style);\r\n\t\t}, this);\r\n\t},\r\n\r\n\t_setLayerStyle: function (layer, style) {\r\n\t\tif (layer.setStyle) {\r\n\t\t\tif (typeof style === 'function') {\r\n\t\t\t\tstyle = style(layer.feature);\r\n\t\t\t}\r\n\t\t\tlayer.setStyle(style);\r\n\t\t}\r\n\t}\r\n});\r\n\r\n// @section\r\n// There are several static functions which can be called without instantiating L.GeoJSON:\r\n\r\n// @function geometryToLayer(featureData: Object, options?: GeoJSON options): Layer\r\n// Creates a `Layer` from a given GeoJSON feature. Can use a custom\r\n// [`pointToLayer`](#geojson-pointtolayer) and/or [`coordsToLatLng`](#geojson-coordstolatlng)\r\n// functions if provided as options.\r\nfunction geometryToLayer(geojson, options) {\r\n\r\n\tvar geometry = geojson.type === 'Feature' ? geojson.geometry : geojson,\r\n\t coords = geometry ? geometry.coordinates : null,\r\n\t layers = [],\r\n\t pointToLayer = options && options.pointToLayer,\r\n\t _coordsToLatLng = options && options.coordsToLatLng || coordsToLatLng,\r\n\t latlng, latlngs, i, len;\r\n\r\n\tif (!coords && !geometry) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\tswitch (geometry.type) {\r\n\tcase 'Point':\r\n\t\tlatlng = _coordsToLatLng(coords);\r\n\t\treturn _pointToLayer(pointToLayer, geojson, latlng, options);\r\n\r\n\tcase 'MultiPoint':\r\n\t\tfor (i = 0, len = coords.length; i < len; i++) {\r\n\t\t\tlatlng = _coordsToLatLng(coords[i]);\r\n\t\t\tlayers.push(_pointToLayer(pointToLayer, geojson, latlng, options));\r\n\t\t}\r\n\t\treturn new FeatureGroup(layers);\r\n\r\n\tcase 'LineString':\r\n\tcase 'MultiLineString':\r\n\t\tlatlngs = coordsToLatLngs(coords, geometry.type === 'LineString' ? 0 : 1, _coordsToLatLng);\r\n\t\treturn new Polyline(latlngs, options);\r\n\r\n\tcase 'Polygon':\r\n\tcase 'MultiPolygon':\r\n\t\tlatlngs = coordsToLatLngs(coords, geometry.type === 'Polygon' ? 1 : 2, _coordsToLatLng);\r\n\t\treturn new Polygon(latlngs, options);\r\n\r\n\tcase 'GeometryCollection':\r\n\t\tfor (i = 0, len = geometry.geometries.length; i < len; i++) {\r\n\t\t\tvar layer = geometryToLayer({\r\n\t\t\t\tgeometry: geometry.geometries[i],\r\n\t\t\t\ttype: 'Feature',\r\n\t\t\t\tproperties: geojson.properties\r\n\t\t\t}, options);\r\n\r\n\t\t\tif (layer) {\r\n\t\t\t\tlayers.push(layer);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new FeatureGroup(layers);\r\n\r\n\tdefault:\r\n\t\tthrow new Error('Invalid GeoJSON object.');\r\n\t}\r\n}\r\n\r\nfunction _pointToLayer(pointToLayerFn, geojson, latlng, options) {\r\n\treturn pointToLayerFn ?\r\n\t\tpointToLayerFn(geojson, latlng) :\r\n\t\tnew Marker(latlng, options && options.markersInheritOptions && options);\r\n}\r\n\r\n// @function coordsToLatLng(coords: Array): LatLng\r\n// Creates a `LatLng` object from an array of 2 numbers (longitude, latitude)\r\n// or 3 numbers (longitude, latitude, altitude) used in GeoJSON for points.\r\nfunction coordsToLatLng(coords) {\r\n\treturn new LatLng(coords[1], coords[0], coords[2]);\r\n}\r\n\r\n// @function coordsToLatLngs(coords: Array, levelsDeep?: Number, coordsToLatLng?: Function): Array\r\n// Creates a multidimensional array of `LatLng`s from a GeoJSON coordinates array.\r\n// `levelsDeep` specifies the nesting level (0 is for an array of points, 1 for an array of arrays of points, etc., 0 by default).\r\n// Can use a custom [`coordsToLatLng`](#geojson-coordstolatlng) function.\r\nfunction coordsToLatLngs(coords, levelsDeep, _coordsToLatLng) {\r\n\tvar latlngs = [];\r\n\r\n\tfor (var i = 0, len = coords.length, latlng; i < len; i++) {\r\n\t\tlatlng = levelsDeep ?\r\n\t\t\tcoordsToLatLngs(coords[i], levelsDeep - 1, _coordsToLatLng) :\r\n\t\t\t(_coordsToLatLng || coordsToLatLng)(coords[i]);\r\n\r\n\t\tlatlngs.push(latlng);\r\n\t}\r\n\r\n\treturn latlngs;\r\n}\r\n\r\n// @function latLngToCoords(latlng: LatLng, precision?: Number): Array\r\n// Reverse of [`coordsToLatLng`](#geojson-coordstolatlng)\r\nfunction latLngToCoords(latlng, precision) {\r\n\tprecision = typeof precision === 'number' ? precision : 6;\r\n\treturn latlng.alt !== undefined ?\r\n\t\t[formatNum(latlng.lng, precision), formatNum(latlng.lat, precision), formatNum(latlng.alt, precision)] :\r\n\t\t[formatNum(latlng.lng, precision), formatNum(latlng.lat, precision)];\r\n}\r\n\r\n// @function latLngsToCoords(latlngs: Array, levelsDeep?: Number, closed?: Boolean): Array\r\n// Reverse of [`coordsToLatLngs`](#geojson-coordstolatlngs)\r\n// `closed` determines whether the first point should be appended to the end of the array to close the feature, only used when `levelsDeep` is 0. False by default.\r\nfunction latLngsToCoords(latlngs, levelsDeep, closed, precision) {\r\n\tvar coords = [];\r\n\r\n\tfor (var i = 0, len = latlngs.length; i < len; i++) {\r\n\t\tcoords.push(levelsDeep ?\r\n\t\t\tlatLngsToCoords(latlngs[i], levelsDeep - 1, closed, precision) :\r\n\t\t\tlatLngToCoords(latlngs[i], precision));\r\n\t}\r\n\r\n\tif (!levelsDeep && closed) {\r\n\t\tcoords.push(coords[0]);\r\n\t}\r\n\r\n\treturn coords;\r\n}\r\n\r\nfunction getFeature(layer, newGeometry) {\r\n\treturn layer.feature ?\r\n\t\textend({}, layer.feature, {geometry: newGeometry}) :\r\n\t\tasFeature(newGeometry);\r\n}\r\n\r\n// @function asFeature(geojson: Object): Object\r\n// Normalize GeoJSON geometries/features into GeoJSON features.\r\nfunction asFeature(geojson) {\r\n\tif (geojson.type === 'Feature' || geojson.type === 'FeatureCollection') {\r\n\t\treturn geojson;\r\n\t}\r\n\r\n\treturn {\r\n\t\ttype: 'Feature',\r\n\t\tproperties: {},\r\n\t\tgeometry: geojson\r\n\t};\r\n}\r\n\r\nvar PointToGeoJSON = {\r\n\ttoGeoJSON: function (precision) {\r\n\t\treturn getFeature(this, {\r\n\t\t\ttype: 'Point',\r\n\t\t\tcoordinates: latLngToCoords(this.getLatLng(), precision)\r\n\t\t});\r\n\t}\r\n};\r\n\r\n// @namespace Marker\r\n// @section Other methods\r\n// @method toGeoJSON(precision?: Number): Object\r\n// `precision` is the number of decimal places for coordinates.\r\n// The default value is 6 places.\r\n// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the marker (as a GeoJSON `Point` Feature).\r\nMarker.include(PointToGeoJSON);\r\n\r\n// @namespace CircleMarker\r\n// @method toGeoJSON(precision?: Number): Object\r\n// `precision` is the number of decimal places for coordinates.\r\n// The default value is 6 places.\r\n// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the circle marker (as a GeoJSON `Point` Feature).\r\nCircle.include(PointToGeoJSON);\r\nCircleMarker.include(PointToGeoJSON);\r\n\r\n\r\n// @namespace Polyline\r\n// @method toGeoJSON(precision?: Number): Object\r\n// `precision` is the number of decimal places for coordinates.\r\n// The default value is 6 places.\r\n// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the polyline (as a GeoJSON `LineString` or `MultiLineString` Feature).\r\nPolyline.include({\r\n\ttoGeoJSON: function (precision) {\r\n\t\tvar multi = !isFlat(this._latlngs);\r\n\r\n\t\tvar coords = latLngsToCoords(this._latlngs, multi ? 1 : 0, false, precision);\r\n\r\n\t\treturn getFeature(this, {\r\n\t\t\ttype: (multi ? 'Multi' : '') + 'LineString',\r\n\t\t\tcoordinates: coords\r\n\t\t});\r\n\t}\r\n});\r\n\r\n// @namespace Polygon\r\n// @method toGeoJSON(precision?: Number): Object\r\n// `precision` is the number of decimal places for coordinates.\r\n// The default value is 6 places.\r\n// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the polygon (as a GeoJSON `Polygon` or `MultiPolygon` Feature).\r\nPolygon.include({\r\n\ttoGeoJSON: function (precision) {\r\n\t\tvar holes = !isFlat(this._latlngs),\r\n\t\t multi = holes && !isFlat(this._latlngs[0]);\r\n\r\n\t\tvar coords = latLngsToCoords(this._latlngs, multi ? 2 : holes ? 1 : 0, true, precision);\r\n\r\n\t\tif (!holes) {\r\n\t\t\tcoords = [coords];\r\n\t\t}\r\n\r\n\t\treturn getFeature(this, {\r\n\t\t\ttype: (multi ? 'Multi' : '') + 'Polygon',\r\n\t\t\tcoordinates: coords\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n// @namespace LayerGroup\r\nLayerGroup.include({\r\n\ttoMultiPoint: function (precision) {\r\n\t\tvar coords = [];\r\n\r\n\t\tthis.eachLayer(function (layer) {\r\n\t\t\tcoords.push(layer.toGeoJSON(precision).geometry.coordinates);\r\n\t\t});\r\n\r\n\t\treturn getFeature(this, {\r\n\t\t\ttype: 'MultiPoint',\r\n\t\t\tcoordinates: coords\r\n\t\t});\r\n\t},\r\n\r\n\t// @method toGeoJSON(precision?: Number): Object\r\n\t// `precision` is the number of decimal places for coordinates.\r\n\t// The default value is 6 places.\r\n\t// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the layer group (as a GeoJSON `FeatureCollection`, `GeometryCollection`, or `MultiPoint`).\r\n\ttoGeoJSON: function (precision) {\r\n\r\n\t\tvar type = this.feature && this.feature.geometry && this.feature.geometry.type;\r\n\r\n\t\tif (type === 'MultiPoint') {\r\n\t\t\treturn this.toMultiPoint(precision);\r\n\t\t}\r\n\r\n\t\tvar isGeometryCollection = type === 'GeometryCollection',\r\n\t\t jsons = [];\r\n\r\n\t\tthis.eachLayer(function (layer) {\r\n\t\t\tif (layer.toGeoJSON) {\r\n\t\t\t\tvar json = layer.toGeoJSON(precision);\r\n\t\t\t\tif (isGeometryCollection) {\r\n\t\t\t\t\tjsons.push(json.geometry);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvar feature = asFeature(json);\r\n\t\t\t\t\t// Squash nested feature collections\r\n\t\t\t\t\tif (feature.type === 'FeatureCollection') {\r\n\t\t\t\t\t\tjsons.push.apply(jsons, feature.features);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tjsons.push(feature);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif (isGeometryCollection) {\r\n\t\t\treturn getFeature(this, {\r\n\t\t\t\tgeometries: jsons,\r\n\t\t\t\ttype: 'GeometryCollection'\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\ttype: 'FeatureCollection',\r\n\t\t\tfeatures: jsons\r\n\t\t};\r\n\t}\r\n});\r\n\r\n// @namespace GeoJSON\r\n// @factory L.geoJSON(geojson?: Object, options?: GeoJSON options)\r\n// Creates a GeoJSON layer. Optionally accepts an object in\r\n// [GeoJSON format](https://tools.ietf.org/html/rfc7946) to display on the map\r\n// (you can alternatively add it later with `addData` method) and an `options` object.\r\nfunction geoJSON(geojson, options) {\r\n\treturn new GeoJSON(geojson, options);\r\n}\r\n\r\n// Backward compatibility.\r\nvar geoJson = geoJSON;\n\n/*\r\n * @class ImageOverlay\r\n * @aka L.ImageOverlay\r\n * @inherits Interactive layer\r\n *\r\n * Used to load and display a single image over specific bounds of the map. Extends `Layer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var imageUrl = 'http://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg',\r\n * \timageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]];\r\n * L.imageOverlay(imageUrl, imageBounds).addTo(map);\r\n * ```\r\n */\r\n\r\nvar ImageOverlay = Layer.extend({\r\n\r\n\t// @section\r\n\t// @aka ImageOverlay options\r\n\toptions: {\r\n\t\t// @option opacity: Number = 1.0\r\n\t\t// The opacity of the image overlay.\r\n\t\topacity: 1,\r\n\r\n\t\t// @option alt: String = ''\r\n\t\t// Text for the `alt` attribute of the image (useful for accessibility).\r\n\t\talt: '',\r\n\r\n\t\t// @option interactive: Boolean = false\r\n\t\t// If `true`, the image overlay will emit [mouse events](#interactive-layer) when clicked or hovered.\r\n\t\tinteractive: false,\r\n\r\n\t\t// @option crossOrigin: Boolean|String = false\r\n\t\t// Whether the crossOrigin attribute will be added to the image.\r\n\t\t// If a String is provided, the image will have its crossOrigin attribute set to the String provided. This is needed if you want to access image pixel data.\r\n\t\t// Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values.\r\n\t\tcrossOrigin: false,\r\n\r\n\t\t// @option errorOverlayUrl: String = ''\r\n\t\t// URL to the overlay image to show in place of the overlay that failed to load.\r\n\t\terrorOverlayUrl: '',\r\n\r\n\t\t// @option zIndex: Number = 1\r\n\t\t// The explicit [zIndex](https://developer.mozilla.org/docs/Web/CSS/CSS_Positioning/Understanding_z_index) of the overlay layer.\r\n\t\tzIndex: 1,\r\n\r\n\t\t// @option className: String = ''\r\n\t\t// A custom class name to assign to the image. Empty by default.\r\n\t\tclassName: ''\r\n\t},\r\n\r\n\tinitialize: function (url, bounds, options) { // (String, LatLngBounds, Object)\r\n\t\tthis._url = url;\r\n\t\tthis._bounds = toLatLngBounds(bounds);\r\n\r\n\t\tsetOptions(this, options);\r\n\t},\r\n\r\n\tonAdd: function () {\r\n\t\tif (!this._image) {\r\n\t\t\tthis._initImage();\r\n\r\n\t\t\tif (this.options.opacity < 1) {\r\n\t\t\t\tthis._updateOpacity();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this.options.interactive) {\r\n\t\t\taddClass(this._image, 'leaflet-interactive');\r\n\t\t\tthis.addInteractiveTarget(this._image);\r\n\t\t}\r\n\r\n\t\tthis.getPane().appendChild(this._image);\r\n\t\tthis._reset();\r\n\t},\r\n\r\n\tonRemove: function () {\r\n\t\tremove(this._image);\r\n\t\tif (this.options.interactive) {\r\n\t\t\tthis.removeInteractiveTarget(this._image);\r\n\t\t}\r\n\t},\r\n\r\n\t// @method setOpacity(opacity: Number): this\r\n\t// Sets the opacity of the overlay.\r\n\tsetOpacity: function (opacity) {\r\n\t\tthis.options.opacity = opacity;\r\n\r\n\t\tif (this._image) {\r\n\t\t\tthis._updateOpacity();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tsetStyle: function (styleOpts) {\r\n\t\tif (styleOpts.opacity) {\r\n\t\t\tthis.setOpacity(styleOpts.opacity);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method bringToFront(): this\r\n\t// Brings the layer to the top of all overlays.\r\n\tbringToFront: function () {\r\n\t\tif (this._map) {\r\n\t\t\ttoFront(this._image);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method bringToBack(): this\r\n\t// Brings the layer to the bottom of all overlays.\r\n\tbringToBack: function () {\r\n\t\tif (this._map) {\r\n\t\t\ttoBack(this._image);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method setUrl(url: String): this\r\n\t// Changes the URL of the image.\r\n\tsetUrl: function (url) {\r\n\t\tthis._url = url;\r\n\r\n\t\tif (this._image) {\r\n\t\t\tthis._image.src = url;\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method setBounds(bounds: LatLngBounds): this\r\n\t// Update the bounds that this ImageOverlay covers\r\n\tsetBounds: function (bounds) {\r\n\t\tthis._bounds = toLatLngBounds(bounds);\r\n\r\n\t\tif (this._map) {\r\n\t\t\tthis._reset();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tgetEvents: function () {\r\n\t\tvar events = {\r\n\t\t\tzoom: this._reset,\r\n\t\t\tviewreset: this._reset\r\n\t\t};\r\n\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tevents.zoomanim = this._animateZoom;\r\n\t\t}\r\n\r\n\t\treturn events;\r\n\t},\r\n\r\n\t// @method setZIndex(value: Number): this\r\n\t// Changes the [zIndex](#imageoverlay-zindex) of the image overlay.\r\n\tsetZIndex: function (value) {\r\n\t\tthis.options.zIndex = value;\r\n\t\tthis._updateZIndex();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getBounds(): LatLngBounds\r\n\t// Get the bounds that this ImageOverlay covers\r\n\tgetBounds: function () {\r\n\t\treturn this._bounds;\r\n\t},\r\n\r\n\t// @method getElement(): HTMLElement\r\n\t// Returns the instance of [`HTMLImageElement`](https://developer.mozilla.org/docs/Web/API/HTMLImageElement)\r\n\t// used by this overlay.\r\n\tgetElement: function () {\r\n\t\treturn this._image;\r\n\t},\r\n\r\n\t_initImage: function () {\r\n\t\tvar wasElementSupplied = this._url.tagName === 'IMG';\r\n\t\tvar img = this._image = wasElementSupplied ? this._url : create$1('img');\r\n\r\n\t\taddClass(img, 'leaflet-image-layer');\r\n\t\tif (this._zoomAnimated) { addClass(img, 'leaflet-zoom-animated'); }\r\n\t\tif (this.options.className) { addClass(img, this.options.className); }\r\n\r\n\t\timg.onselectstart = falseFn;\r\n\t\timg.onmousemove = falseFn;\r\n\r\n\t\t// @event load: Event\r\n\t\t// Fired when the ImageOverlay layer has loaded its image\r\n\t\timg.onload = bind(this.fire, this, 'load');\r\n\t\timg.onerror = bind(this._overlayOnError, this, 'error');\r\n\r\n\t\tif (this.options.crossOrigin || this.options.crossOrigin === '') {\r\n\t\t\timg.crossOrigin = this.options.crossOrigin === true ? '' : this.options.crossOrigin;\r\n\t\t}\r\n\r\n\t\tif (this.options.zIndex) {\r\n\t\t\tthis._updateZIndex();\r\n\t\t}\r\n\r\n\t\tif (wasElementSupplied) {\r\n\t\t\tthis._url = img.src;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\timg.src = this._url;\r\n\t\timg.alt = this.options.alt;\r\n\t},\r\n\r\n\t_animateZoom: function (e) {\r\n\t\tvar scale = this._map.getZoomScale(e.zoom),\r\n\t\t offset = this._map._latLngBoundsToNewLayerBounds(this._bounds, e.zoom, e.center).min;\r\n\r\n\t\tsetTransform(this._image, offset, scale);\r\n\t},\r\n\r\n\t_reset: function () {\r\n\t\tvar image = this._image,\r\n\t\t bounds = new Bounds(\r\n\t\t this._map.latLngToLayerPoint(this._bounds.getNorthWest()),\r\n\t\t this._map.latLngToLayerPoint(this._bounds.getSouthEast())),\r\n\t\t size = bounds.getSize();\r\n\r\n\t\tsetPosition(image, bounds.min);\r\n\r\n\t\timage.style.width = size.x + 'px';\r\n\t\timage.style.height = size.y + 'px';\r\n\t},\r\n\r\n\t_updateOpacity: function () {\r\n\t\tsetOpacity(this._image, this.options.opacity);\r\n\t},\r\n\r\n\t_updateZIndex: function () {\r\n\t\tif (this._image && this.options.zIndex !== undefined && this.options.zIndex !== null) {\r\n\t\t\tthis._image.style.zIndex = this.options.zIndex;\r\n\t\t}\r\n\t},\r\n\r\n\t_overlayOnError: function () {\r\n\t\t// @event error: Event\r\n\t\t// Fired when the ImageOverlay layer fails to load its image\r\n\t\tthis.fire('error');\r\n\r\n\t\tvar errorUrl = this.options.errorOverlayUrl;\r\n\t\tif (errorUrl && this._url !== errorUrl) {\r\n\t\t\tthis._url = errorUrl;\r\n\t\t\tthis._image.src = errorUrl;\r\n\t\t}\r\n\t}\r\n});\r\n\r\n// @factory L.imageOverlay(imageUrl: String, bounds: LatLngBounds, options?: ImageOverlay options)\r\n// Instantiates an image overlay object given the URL of the image and the\r\n// geographical bounds it is tied to.\r\nvar imageOverlay = function (url, bounds, options) {\r\n\treturn new ImageOverlay(url, bounds, options);\r\n};\n\n/*\r\n * @class VideoOverlay\r\n * @aka L.VideoOverlay\r\n * @inherits ImageOverlay\r\n *\r\n * Used to load and display a video player over specific bounds of the map. Extends `ImageOverlay`.\r\n *\r\n * A video overlay uses the [`