UNPKG

1.24 MBSource Map (JSON)View Raw
1{"version":3,"sources":["webpack:///webpack/bootstrap a320dc1f47d3ba065687","webpack:///./node_modules/lodash/_root.js","webpack:///./node_modules/lodash/_getNative.js","webpack:///./node_modules/lodash/_ListCache.js","webpack:///./node_modules/lodash/_assocIndexOf.js","webpack:///./node_modules/lodash/_baseGetTag.js","webpack:///./node_modules/lodash/_nativeCreate.js","webpack:///./node_modules/lodash/_getMapData.js","webpack:///./node_modules/lodash/isObjectLike.js","webpack:///./node_modules/lodash/_Map.js","webpack:///./node_modules/lodash/_Symbol.js","webpack:///./node_modules/lodash/isArray.js","webpack:///./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///./node_modules/lodash/eq.js","webpack:///./node_modules/lodash/isFunction.js","webpack:///./node_modules/lodash/_freeGlobal.js","webpack:///(webpack)/buildin/global.js","webpack:///./node_modules/lodash/isObject.js","webpack:///./node_modules/lodash/_toSource.js","webpack:///./node_modules/lodash/_MapCache.js","webpack:///./node_modules/lodash/_equalArrays.js","webpack:///./node_modules/lodash/isBuffer.js","webpack:///(webpack)/buildin/module.js","webpack:///./node_modules/lodash/isTypedArray.js","webpack:///./node_modules/lodash/isLength.js","webpack:///./src/map/index.js","webpack:///./src/layers/Layer.js","webpack:///./src/layers/tile/TileLayer.js","webpack:///./src/layers/OverlayLayer.js","webpack:///./src/layers/VectorLayer.js","webpack:///./src/layers/index.js","webpack:///./src/geometry/Geometry.js","webpack:///./src/geometry/Marker.js","webpack:///./src/geometry/LineString.js","webpack:///./src/geometry/Polygon.js","webpack:///./src/geometry/MultiPoint.js","webpack:///./src/geometry/MultiLineString.js","webpack:///./src/geometry/MultiPolygon.js","webpack:///./src/geometry/Circle.js","webpack:///./src/geometry/index.js","webpack:///./src/index.js","webpack:///./node_modules/lodash/_baseIsEqual.js","webpack:///./node_modules/lodash/_baseIsEqualDeep.js","webpack:///./node_modules/lodash/_Stack.js","webpack:///./node_modules/lodash/_listCacheClear.js","webpack:///./node_modules/lodash/_listCacheDelete.js","webpack:///./node_modules/lodash/_listCacheGet.js","webpack:///./node_modules/lodash/_listCacheHas.js","webpack:///./node_modules/lodash/_listCacheSet.js","webpack:///./node_modules/lodash/_stackClear.js","webpack:///./node_modules/lodash/_stackDelete.js","webpack:///./node_modules/lodash/_stackGet.js","webpack:///./node_modules/lodash/_stackHas.js","webpack:///./node_modules/lodash/_stackSet.js","webpack:///./node_modules/lodash/_baseIsNative.js","webpack:///./node_modules/lodash/_getRawTag.js","webpack:///./node_modules/lodash/_objectToString.js","webpack:///./node_modules/lodash/_isMasked.js","webpack:///./node_modules/lodash/_coreJsData.js","webpack:///./node_modules/lodash/_getValue.js","webpack:///./node_modules/lodash/_mapCacheClear.js","webpack:///./node_modules/lodash/_Hash.js","webpack:///./node_modules/lodash/_hashClear.js","webpack:///./node_modules/lodash/_hashDelete.js","webpack:///./node_modules/lodash/_hashGet.js","webpack:///./node_modules/lodash/_hashHas.js","webpack:///./node_modules/lodash/_hashSet.js","webpack:///./node_modules/lodash/_mapCacheDelete.js","webpack:///./node_modules/lodash/_isKeyable.js","webpack:///./node_modules/lodash/_mapCacheGet.js","webpack:///./node_modules/lodash/_mapCacheHas.js","webpack:///./node_modules/lodash/_mapCacheSet.js","webpack:///./node_modules/lodash/_SetCache.js","webpack:///./node_modules/lodash/_setCacheAdd.js","webpack:///./node_modules/lodash/_setCacheHas.js","webpack:///./node_modules/lodash/_arraySome.js","webpack:///./node_modules/lodash/_cacheHas.js","webpack:///./node_modules/lodash/_equalByTag.js","webpack:///./node_modules/lodash/_Uint8Array.js","webpack:///./node_modules/lodash/_mapToArray.js","webpack:///./node_modules/lodash/_setToArray.js","webpack:///./node_modules/lodash/_equalObjects.js","webpack:///./node_modules/lodash/_getAllKeys.js","webpack:///./node_modules/lodash/_baseGetAllKeys.js","webpack:///./node_modules/lodash/_arrayPush.js","webpack:///./node_modules/lodash/_getSymbols.js","webpack:///./node_modules/lodash/_arrayFilter.js","webpack:///./node_modules/lodash/stubArray.js","webpack:///./node_modules/lodash/keys.js","webpack:///./node_modules/lodash/_arrayLikeKeys.js","webpack:///./node_modules/lodash/_baseTimes.js","webpack:///./node_modules/lodash/isArguments.js","webpack:///./node_modules/lodash/_baseIsArguments.js","webpack:///./node_modules/lodash/stubFalse.js","webpack:///./node_modules/lodash/_isIndex.js","webpack:///./node_modules/lodash/_baseIsTypedArray.js","webpack:///./node_modules/lodash/_baseUnary.js","webpack:///./node_modules/lodash/_nodeUtil.js","webpack:///./node_modules/lodash/_baseKeys.js","webpack:///./node_modules/lodash/_isPrototype.js","webpack:///./node_modules/lodash/_nativeKeys.js","webpack:///./node_modules/lodash/_overArg.js","webpack:///./node_modules/lodash/isArrayLike.js","webpack:///./node_modules/lodash/_getTag.js","webpack:///./node_modules/lodash/_DataView.js","webpack:///./node_modules/lodash/_Promise.js","webpack:///./node_modules/lodash/_Set.js","webpack:///./node_modules/lodash/_WeakMap.js","webpack:///./node_modules/prop-types/factoryWithTypeCheckers.js","webpack:///./node_modules/object-assign/index.js","webpack:///./node_modules/prop-types/checkPropTypes.js","webpack:///./node_modules/prop-types/factoryWithThrowingShims.js","webpack:///./node_modules/process/browser.js","webpack:///./node_modules/maptalks/dist/maptalks.css","webpack:///external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}","webpack:///./node_modules/lodash/isEqual.js","webpack:///./node_modules/prop-types/index.js","webpack:///./node_modules/maptalks/dist/maptalks.es.js"],"names":["props","setRef","x","container","state","isLoad","isMounted","map","events","nextProps","center","zoom","spatialReference","cursor","maxExtent","maxZoom","minZoom","pitch","bearing","fov","isequal","setCenter","setZoom","setCenterAndZoom","setSpatialReference","setCursor","setMaxExtent","setMaxZoom","setMinZoom","setFov","setBearing","setPitch","layers","length","setBaseLayer","options","Math","max","min","isLoaded","setState","key","on","className","children","React","Component","defaultProps","childContextTypes","PropTypes","instanceOf","context","layer","removeLayer","id","addLayer","createLayer","attribution","visible","opacity","globalCompositeOperation","renderer","debugOutline","cssFilter","forceRenderOnMoving","forceRenderOnZooming","forceRenderOnRotating","contextTypes","isAdd","subdomains","repeatWorld","background","backgroundZoomDiff","loadingLimitOnInteracting","placeholder","crossOrigin","tileSize","offset","tileSystem","fadeAnimation","debug","maxCacheSize","clipByPitch","maxAvailableZoom","cascadeTiles","minPitchToCascade","propTypes","urlTemplate","oneOfType","string","func","isRequired","arrayOf","number","bool","object","geometries","drawImmediate","console","log","enableSimplify","geometryEvents","defaultIconSize","cacheVectorOnCanvas","cacheSvgOnCanvas","enableAltitude","altitudeProperty","drawAltitude","geometry","addGeometry","createGeometry","removeGeometry","coordinates","setId","setProperties","setCoordinates","any","array","radius","setRadius","Map","TileLayer","OverlayLayer","VectorLayer","Circle","Geometry","LineString","Marker","MultiLineString","MultiPoint","MultiPolygon","Polygon"],"mappings":";;;;;;;;;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;AC7DA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,EAAE;AACf;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AChBA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC/BA;;AAEA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACpBA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC3BA;;AAEA;AACA;;AAEA;;;;;;;ACLA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC5BA;AACA;;AAEA;AACA;;AAEA;;;;;;;ACNA;;AAEA;AACA;;AAEA;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA,iBAAiB;AACjB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACpCA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACpCA;AACA;;AAEA;;;;;;;;ACHA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC9BA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;;;;;;;ACzBA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC/BA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AClFA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;;;;;;ACrBA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC1BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AClCA;AACA;AACA;AACA;;IAEM,O;;;AAmCJ,eAAaA,KAAb,EAAoB;AAAA;;AAAA,0GACZA,KADY;;AAAA,UA+GpBC,MA/GoB,GA+GX,YAAc;AAAA,UAAbC,CAAa,uEAAT,IAAS;;AACrB,YAAKC,SAAL,GAAiBD,CAAjB;AACD,KAjHmB;;AAGlB,UAAKE,KAAL,GAAa;AACXC,cAAQ,KADG;AAEXC,iBAAW;AAFA,KAAb;;AAKA;;;;AAIA,UAAKC,GAAL,GAAW,IAAX;;AAEA,UAAKJ,SAAL,GAAiB,IAAjB;;AAEA,UAAKK,MAAL,GAAc,EAAd;AAhBkB;AAiBnB;;;;sCAEkB;AACjB,aAAO;AACLD,aAAK,KAAKA;AADL,OAAP;AAGD;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;8CAE2BE,S,EAAW;AAAA,mBAKhC,KAAKT,KAL2B;AAAA,UAElCU,MAFkC,UAElCA,MAFkC;AAAA,UAE1BC,IAF0B,UAE1BA,IAF0B;AAAA,UAEpBC,gBAFoB,UAEpBA,gBAFoB;AAAA,UAEFC,MAFE,UAEFA,MAFE;AAAA,UAGlCC,SAHkC,UAGlCA,SAHkC;AAAA,UAGvBC,OAHuB,UAGvBA,OAHuB;AAAA,UAGdC,OAHc,UAGdA,OAHc;AAAA,UAIlCC,KAJkC,UAIlCA,KAJkC;AAAA,UAI3BC,OAJ2B,UAI3BA,OAJ2B;AAAA,UAIlBC,GAJkB,UAIlBA,GAJkB;;AAMpC,UAAI,CAAC,KAAKZ,GAAV,EAAe;AACb,eAAO,IAAP;AACD;;AAED,UAAI,CAAC,iBAAAa,CAAQX,UAAUC,MAAlB,EAA0BA,MAA1B,CAAD,IAAsC,CAAC,iBAAAU,CAAQX,UAAUE,IAAlB,EAAwBA,IAAxB,CAA3C,EAA0E;AACxE,YAAI,CAAC,iBAAAS,CAAQX,UAAUC,MAAlB,EAA0BA,MAA1B,CAAD,IAAsC,iBAAAU,CAAQX,UAAUE,IAAlB,EAAwBA,IAAxB,CAA1C,EAAyE;AACvE,eAAKJ,GAAL,CAASc,SAAT,CAAmBZ,UAAUC,MAA7B;AACD;AACD,YAAI,iBAAAU,CAAQX,UAAUC,MAAlB,EAA0BA,MAA1B,KAAqC,CAAC,iBAAAU,CAAQX,UAAUE,IAAlB,EAAwBA,IAAxB,CAA1C,EAAyE;AACvE,eAAKJ,GAAL,CAASe,OAAT,CAAiBb,UAAUE,IAA3B;AACD;AACD,YAAI,CAAC,iBAAAS,CAAQX,UAAUC,MAAlB,EAA0BA,MAA1B,CAAD,IAAsC,CAAC,iBAAAU,CAAQX,UAAUE,IAAlB,EAAwBA,IAAxB,CAA3C,EAA0E;AACxE,eAAKJ,GAAL,CAASgB,gBAAT,CAA0Bd,UAAUC,MAApC,EAA4CD,UAAUE,IAAtD;AACD;AACF;;AAED,UAAI,CAAC,iBAAAS,CAAQX,UAAUG,gBAAlB,EAAoCA,gBAApC,CAAL,EAA4D;AAC1D,aAAKL,GAAL,CAASiB,mBAAT,CAA6Bf,UAAUE,IAAvC;AACD;AACD,UAAI,CAAC,iBAAAS,CAAQX,UAAUI,MAAlB,EAA0BA,MAA1B,CAAL,EAAwC;AACtC,aAAKN,GAAL,CAASkB,SAAT,CAAmBhB,UAAUI,MAA7B;AACD;AACD,UAAI,CAAC,iBAAAO,CAAQX,UAAUK,SAAlB,EAA6BA,SAA7B,CAAL,EAA8C;AAC5C,aAAKP,GAAL,CAASmB,YAAT,CAAsBjB,UAAUK,SAAhC;AACD;AACD,UAAI,CAAC,iBAAAM,CAAQX,UAAUM,OAAlB,EAA2BA,OAA3B,CAAL,EAA0C;AACxC,aAAKR,GAAL,CAASoB,UAAT,CAAoBlB,UAAUM,OAA9B;AACD;AACD,UAAI,CAAC,iBAAAK,CAAQX,UAAUO,OAAlB,EAA2BA,OAA3B,CAAL,EAA0C;AACxC,aAAKT,GAAL,CAASqB,UAAT,CAAoBnB,UAAUO,OAA9B;AACD;AACD,UAAI,CAAC,iBAAAI,CAAQX,UAAUU,GAAlB,EAAuBA,GAAvB,CAAL,EAAkC;AAChC,aAAKZ,GAAL,CAASsB,MAAT,CAAgBpB,UAAUU,GAA1B;AACD;AACD,UAAI,CAAC,iBAAAC,CAAQX,UAAUS,OAAlB,EAA2BA,OAA3B,CAAL,EAA0C;AACxC,aAAKX,GAAL,CAASuB,UAAT,CAAoBrB,UAAUS,OAA9B;AACD;AACD,UAAI,CAAC,iBAAAE,CAAQX,UAAUQ,KAAlB,EAAyBA,KAAzB,CAAL,EAAsC;AACpC,aAAKV,GAAL,CAASwB,QAAT,CAAkBtB,UAAUQ,KAA5B;AACD;AACD,aAAO,IAAP;AACD;;AAED;;;;;;;;iCAKce,M,EAAQ;AACpB,UAAI,CAAC,KAAKzB,GAAV,EAAe;AACb,eAAO,IAAP;AACD;AACD,UAAIyB,UAAUA,OAAOC,MAAP,GAAgB,CAA9B,EAAiC;AAC/B,aAAK1B,GAAL,CAAS2B,YAAT;AACD;AACF;;AAED;;;;;;;;8BAKWF,M,EAAQ;AACjB,UAAI,CAAC,KAAKzB,GAAV,EAAe;AACb,eAAO,IAAP;AACD;AACD,UAAIyB,UAAUA,OAAOC,MAAP,GAAgB,CAA9B,EAAiC;AAC/B;AACD;AACF;;;wCAMoB;AAAA,oBACmC,KAAKjC,KADxC;AAAA,UACXU,MADW,WACXA,MADW;AAAA,UACHC,IADG,WACHA,IADG;AAAA,UACGH,MADH,WACGA,MADH;AAAA,UACWW,GADX,WACWA,GADX;AAAA,UACgBD,OADhB,WACgBA,OADhB;AAAA,UACyBD,KADzB,WACyBA,KADzB;;AAEnB,UAAMkB,UAAU;AACdxB,kBADc;AAEdD,sBAFc;AAGdS,aAAKiB,KAAKC,GAAL,CAAS,IAAT,EAAeD,KAAKE,GAAL,CAAS,EAAT,EAAanB,GAAb,CAAf,CAHS;AAIdD,wBAJc;AAKdD;AALc,OAAhB;AAOA,WAAKV,GAAL,GAAW,IAAI,0BAAJ,CAAiB,KAAKJ,SAAtB,EAAiCgC,OAAjC,CAAX;AACA,UAAI,KAAK5B,GAAL,CAASgC,QAAT,EAAJ,EAAyB;AACvB,aAAKC,QAAL,CAAc;AACZnC,kBAAQ;AADI,SAAd;AAGA,aAAK,IAAMoC,GAAX,IAAkBjC,MAAlB,EAA0B;AACxB,cAAIiC,QAAQ,QAAZ,EAAsB;AACpBjC,mBAAOiC,GAAP,EAAY,KAAKlC,GAAjB,EAAsB,IAAtB;AACD,WAFD,MAEO;AACL,iBAAKA,GAAL,CAASmC,EAAT,CAAYD,GAAZ,EAAiBjC,OAAOiC,GAAP,CAAjB,EAA8B,IAA9B;AACD;AACF;AACF;AACD,WAAKD,QAAL,CAAc;AACZlC,mBAAW;AADC,OAAd;AAGD;;;2CAEuB;AACtB,UAAI,KAAKC,GAAT,EAAc;AACZ,aAAKA,GAAL,GAAW,IAAX;AACA,aAAKiC,QAAL,CAAc;AACZlC,qBAAW;AADC,SAAd;AAGD;AACF;;;6BAES;AAAA,mBACsB,KAAKF,KAD3B;AAAA,UACAE,SADA,UACAA,SADA;AAAA,UACWD,MADX,UACWA,MADX;AAAA,oBAEwB,KAAKL,KAF7B;AAAA,UAEA2C,SAFA,WAEAA,SAFA;AAAA,UAEWC,QAFX,WAEWA,QAFX;;AAGR,aACE;AAAA;AAAA,UAAK,KAAK,KAAK3C,MAAf,EAAuB,WAAW0C,SAAlC;AACGrC,qBAAaD,MAAb,GAAsBuC,QAAtB,GAAiC;AADpC,OADF;AAKD;;;;EAlMe,wFAAAC,CAAMC,S;;AAAlB,O,CACGC,Y,GAAe,E;AADlB,O,CA+BGC,iB,GAAoB;AACzBzC,OAAK,oBAAA0C,CAAUC,UAAV,CAAqB,0BAArB;AADoB,C;;;AAsK7B,4CAAe,OAAf,E;;;;;;;;;;AC1MA;AACA;AACA;;IAEM,e;;;AAwCJ,qBAAYlD,KAAZ,EAAmBmD,OAAnB,EAA4B;AAAA;;AAAA,4HACpBnD,KADoB,EACbmD,OADa;;AAG1B,UAAKC,KAAL,GAAa,IAAb;AAH0B;AAI3B;;;;6BAEQ;AACP,aAAO,IAAP;AACD;;AAED;;;;;;;gCAIa3C,S,EAAW;AACtB,UAAIA,SAAJ,EAAe;AAAA,YACLF,GADK,GACG,KAAK4C,OADR,CACL5C,GADK;;AAEb,YAAI,CAACA,GAAL,EAAU;AACV,YAAI,KAAK6C,KAAT,EAAgB;AACd7C,cAAI8C,WAAJ,CAAgB,KAAKD,KAArB;AACD;AALY,YAMLE,EANK,GAME7C,SANF,CAML6C,EANK;;AAOb,aAAKF,KAAL,GAAa,IAAI,4BAAJ,CAAmBE,EAAnB,EAAuB7C,SAAvB,CAAb;AACAF,YAAIgD,QAAJ,CAAa,KAAKH,KAAlB;AACD;AACF;;;wCAEmB;AAClB,WAAKI,WAAL,CAAiB,KAAKxD,KAAtB;AACD;;;8CAEyBS,S,EAAW;AACnC,WAAK+C,WAAL,CAAiB/C,SAAjB;AACA,aAAO,IAAP;AACD;;;2CAEsB;AAAA,UACbF,GADa,GACL,KAAK4C,OADA,CACb5C,GADa;;AAErB,UAAI,CAACA,GAAD,IAAQ,CAAC,KAAK6C,KAAlB,EAAyB;AACzB7C,UAAI8C,WAAJ,CAAgB,KAAKD,KAArB;AACD;;;;EAhFqB,wFAAAP,CAAMC,S;;AAAxB,e,CACGC,Y,GAAe;AACpBU,eAAa,IADO;AAEpBzC,WAAS,IAFW;AAGpBD,WAAS,IAHW;AAIpB2C,WAAS,IAJW;AAKpBC,WAAS,CALW;AAMpBC,4BAA0B,IANN;AAOpBC,YAAU,QAPU;AAQpBC,gBAAc,MARM;AASpBC,aAAW,IATS;AAUpBC,uBAAqB,KAVD;AAWpBC,wBAAsB,KAXF;AAYpBC,yBAAuB;AAZH,C;AADlB,e,CAoCGC,Y,GAAe;AACpB5D,OAAK,oBAAA0C,CAAUC,UAAV,CAAqB,0BAArB;AADe,C;;;AA+CxB,0CAAe,eAAf,E;;;;;;;;;;ACvFA;AACA;AACA;;IAEM,mB;;;AAgDJ,qBAAYlD,KAAZ,EAAmBmD,OAAnB,EAA4B;AAAA;;AAG1B;;;;AAH0B,gIACpBnD,KADoB,EACbmD,OADa;;AAO1B,UAAK/C,KAAL,GAAa;AACXgE,aAAO;AADI,KAAb;;AAIA,UAAKhB,KAAL,GAAa,IAAb;AAX0B;AAY3B;;AAED;;;;;;;;gCAIa3C,S,EAAW;AAAA;;AACtB,UAAIA,SAAJ,EAAe;AAAA,YACLF,GADK,GACG,KAAK4C,OADR,CACL5C,GADK;;AAEb,YAAI,CAACA,GAAL,EAAU;AACV,YAAI,KAAK6C,KAAT,EAAgB;AACd7C,cAAI8C,WAAJ,CAAgB,KAAKD,KAArB;AACD;AALY,YAMLE,EANK,GAME7C,SANF,CAML6C,EANK;;AAOb,aAAKF,KAAL,GAAa,IAAI,gCAAJ,CAAuBE,EAAvB,EAA2B7C,SAA3B,CAAb;AACA,aAAK2C,KAAL,CAAWV,EAAX,CAAc,KAAd,EAAqB,YAAM;AACzB,iBAAKF,QAAL,CAAc;AACZ4B,mBAAO;AADK,WAAd;AAGD,SAJD;AAKA7D,YAAIgD,QAAJ,CAAa,KAAKH,KAAlB;AACD;AACF;;;;EAlFqB,K;;AAAlB,mB,CACGL,Y,GAAe;AACpBsB,cAAY,IADQ;AAEpBC,eAAa,IAFO;AAGpBC,cAAY,IAHQ;AAIpBC,sBAAoB,CAJA;AAKpBC,6BAA2B,CALP;AAMpBC,eAAa,KANO;AAOpBC,eAAa,IAPO;AAQpBC,YAAU,CAAC,GAAD,EAAM,GAAN,CARU;AASpBC,UAAQ,CAAC,CAAD,EAAI,CAAJ,CATY;AAUpBC,cAAY,IAVQ;AAWpBC,iBAAe,IAXK;AAYpBC,SAAO,KAZa;AAapBpE,oBAAkB,IAbE;AAcpBqE,gBAAc,GAdM;AAepBC,eAAa,IAfO;AAgBpBC,oBAAkB,IAhBE;AAiBpBC,gBAAc,IAjBM;AAkBpBC,qBAAmB;AAlBC,C;AADlB,mB,CAsBGC,S,GAAY;AACjBC,eAAa,oBAAAtC,CAAUuC,SAAV,CAAoB,CAAC,oBAAAvC,CAAUwC,MAAX,EAAmB,oBAAAxC,CAAUyC,IAA7B,CAApB,EACVC,UAFc;AAGjBtB,cAAY,oBAAApB,CAAUuC,SAAV,CAAoB,CAC9B,oBAAAvC,CAAU2C,OAAV,CAAkB,oBAAA3C,CAAUwC,MAA5B,CAD8B,EAE9B,oBAAAxC,CAAU2C,OAAV,CAAkB,oBAAA3C,CAAU4C,MAA5B,CAF8B,CAApB,CAHK;AAOjBvB,eAAa,oBAAArB,CAAU6C,IAPN;AAQjBvB,cAAY,oBAAAtB,CAAU6C,IARL;AASjBtB,sBAAoB,oBAAAvB,CAAU4C,MATb;AAUjBpB,6BAA2B,oBAAAxB,CAAU4C,MAVpB;AAWjBnB,eAAa,oBAAAzB,CAAU6C,IAXN;AAYjBnB,eAAa,oBAAA1B,CAAUwC,MAZN;AAajBb,YAAU,oBAAA3B,CAAU2C,OAAV,CAAkB,oBAAA3C,CAAU4C,MAA5B,CAbO;AAcjBhB,UAAQ,oBAAA5B,CAAU2C,OAAV,CAAkB,oBAAA3C,CAAU4C,MAA5B,CAdS;AAejBf,cAAY,oBAAA7B,CAAU2C,OAAV,CAAkB,oBAAA3C,CAAU4C,MAA5B,CAfK;AAgBjBd,iBAAe,oBAAA9B,CAAU6C,IAhBR;AAiBjBd,SAAO,oBAAA/B,CAAU6C,IAjBA;AAkBjBlF,oBAAkB,oBAAAqC,CAAU8C,MAlBX;AAmBjBd,gBAAc,oBAAAhC,CAAU4C,MAnBP;AAoBjBX,eAAa,oBAAAjC,CAAU6C,IApBN;AAqBjBX,oBAAkB,oBAAAlC,CAAU4C,MArBX;AAsBjBT,gBAAc,oBAAAnC,CAAU6C,IAtBP;AAuBjBT,qBAAmB,oBAAApC,CAAU4C;AAvBZ,C;;;AA+DrB,mDAAe,mBAAf,E;;;;;;;;;;ACzFA;AACA;AACA;;IAEM,yB;;;AASJ,wBAAY7F,KAAZ,EAAmBmD,OAAnB,EAA4B;AAAA;;AAAA,yIACpBnD,KADoB,EACbmD,OADa;;AAG1B,UAAKC,KAAL,GAAa,IAAb;AAH0B;AAI3B;;AAED;;;;;;;;gCAIa3C,S,EAAW;AACtB,UAAIA,SAAJ,EAAe;AAAA,YACLF,GADK,GACG,KAAK4C,OADR,CACL5C,GADK;;AAEb,YAAI,CAACA,GAAL,EAAU;AACV,YAAI,KAAK6C,KAAT,EAAgB;AACd7C,cAAI8C,WAAJ,CAAgB,KAAKD,KAArB;AACD;AALY,YAMLE,EANK,GAMc7C,SANd,CAML6C,EANK;AAAA,YAMD0C,UANC,GAMcvF,SANd,CAMDuF,UANC;;AAOb,aAAK5C,KAAL,GAAa,IAAI,mCAAJ,CAA0BE,EAA1B,EAA8B0C,UAA9B,EAA0CvF,SAA1C,CAAb;AACAF,YAAIgD,QAAJ,CAAa,KAAKH,KAAlB;AACD;AACF;;;;EA9BwB,K;;AAArB,yB,CACGL,Y,GAAe;AACpBkD,iBAAe;AADK,C;AADlB,yB,CAKGX,S,GAAY;AACjBW,iBAAe,oBAAAhD,CAAU6C;AADR,C;;;AA4BrB,wDAAe,yBAAf,E;;;;;;;;;;ACrCA;AACA;AACA;;IAEM,uB;;;AA6BJ,uBAAa9F,KAAb,EAAoBmD,OAApB,EAA6B;AAAA;;AAAA,sIACrBnD,KADqB,EACdmD,OADc;;AAE3B,UAAKC,KAAL,GAAa,IAAb;;AAEA;;;;AAIA,UAAKhD,KAAL,GAAa;AACXgE,aAAO;AADI,KAAb;AAR2B;AAW5B;;AAED;;;;;;;;gCAIa3D,S,EAAW;AAAA;;AACtB,UAAIA,SAAJ,EAAe;AAAA,YACLF,GADK,GACG,KAAK4C,OADR,CACL5C,GADK;;AAEb,YAAI,CAACA,GAAL,EAAU;AACV,YAAI,KAAK6C,KAAT,EAAgB;AACd7C,cAAI8C,WAAJ,CAAgB,KAAKD,KAArB;AACD;AALY,YAMLE,EANK,GAMc7C,SANd,CAML6C,EANK;AAAA,YAMD0C,UANC,GAMcvF,SANd,CAMDuF,UANC;;AAOb,aAAK5C,KAAL,GAAa,IAAI,kCAAJ,CAAyBE,EAAzB,EAA6B0C,UAA7B,EAAyCvF,SAAzC,CAAb;AACA,aAAK2C,KAAL,CAAWV,EAAX,CAAc,KAAd,EAAqB,YAAM;AACzB,iBAAKF,QAAL,CAAc;AACZ4B,mBAAO;AADK,WAAd;AAGD,SAJD;AAKA7D,YAAIgD,QAAJ,CAAa,KAAKH,KAAlB;AACD;AACF;;;8CAEyB3C,S,EAAW;AACnC,WAAK+C,WAAL,CAAiB/C,SAAjB;AACD;;;sCAEiB;AAChB,aAAO;AACL2C,eAAO,KAAKA;AADP,OAAP;AAGD;;AAED;;;;;;;6BAIU;AAAA,UACAgB,KADA,GACU,KAAKhE,KADf,CACAgE,KADA;;AAER8B,cAAQC,GAAR,CAAY/B,KAAZ;AAFQ,UAGAxB,QAHA,GAGa,KAAK5C,KAHlB,CAGA4C,QAHA;;AAIR,aAAQwB,QAAQxB,QAAR,GAAmB,IAA3B;AACD;;;;EAnFuB,mB;;AAApB,uB,CACGG,Y,GAAe;AACpBlC,UAAQ,SADY;AAEpBuF,kBAAgB,IAFI;AAGpBC,kBAAgB,IAHI;AAIpBC,mBAAiB,CAAC,EAAD,EAAK,EAAL,CAJG;AAKpBC,uBAAqB,IALD;AAMpBC,oBAAkB,IANE;AAOpBC,kBAAgB,KAPI;AAQpBC,oBAAkB,UARE;AASpBC,gBAAc;AATM,C;AADlB,uB,CAaGrB,S,GAAY;AACjBzE,UAAQ,oBAAAoC,CAAUwC,MADD;AAEjBW,kBAAgB,oBAAAnD,CAAU6C,IAFT;AAGjBO,kBAAgB,oBAAApD,CAAU6C,IAHT;AAIjBQ,mBAAiB,oBAAArD,CAAU2C,OAAV,CAAkB,oBAAA3C,CAAU4C,MAA5B,CAJA;AAKjBU,uBAAqB,oBAAAtD,CAAU6C,IALd;AAMjBU,oBAAkB,oBAAAvD,CAAU6C,IANX;AAOjBW,kBAAgB,oBAAAxD,CAAU6C,IAPT;AAQjBY,oBAAkB,oBAAAzD,CAAUwC,MARX;AASjBkB,gBAAc,oBAAA1D,CAAU6C;AATP,C;AAbf,uB,CAyBG9C,iB,GAAoB;AACzBI,SAAO,oBAAAH,CAAUC,UAAV,CAAqB,4BAArB;AADkB,C;;;AA6D7B,uDAAe,uBAAf,E;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACXA;AACA;AACA;;IAEM,iB;;;AAsBJ;;;;;AAKA,oBAAalD,KAAb,EAAoBmD,OAApB,EAA6B;AAAA;;AAG3B;;;;AAH2B,6HACrBnD,KADqB,EACdmD,OADc;;AAO3B,UAAKyD,QAAL,GAAgB,IAAhB;AAP2B;AAQ5B;;AAED;;;;;;;;mCAIgBnG,S,EAAW;AACzB,UAAIA,SAAJ,EAAe;AAAA,YACL2C,KADK,GACK,KAAKD,OADV,CACLC,KADK;;AAEb,YAAI,CAACA,KAAL,EAAY;AACZ,aAAKwD,QAAL,GAAgB,IAAI,+BAAJ,EAAhB;AACAxD,cAAMyD,WAAN,CAAkB,KAAKD,QAAvB;AACD;AACF;;;wCAEmB;AAClB,WAAKE,cAAL,CAAoB,KAAK9G,KAAzB;AACD;;;8CAEyBS,S,EAAW;AACnC,WAAKqG,cAAL,CAAoBrG,SAApB;AACA,aAAO,IAAP;AACD;;;2CAEsB;AAAA,UACb2C,KADa,GACH,KAAKD,OADF,CACbC,KADa;;AAErB,UAAI,CAACA,KAAL,EAAY;AACZA,YAAM2D,cAAN,CAAqB,KAAKH,QAA1B;AACD;;AAED;;;;;;;6BAIU;AACR,aAAO,IAAP;AACD;;;;EAvEoB,wFAAA/D,CAAMC,S;;AAAvB,iB,CAkBGqB,Y,GAAe;AACpBf,SAAO,oBAAAH,CAAUC,UAAV,CAAqB,4BAArB;AADa,C;;;AAwDxB,sDAAe,iBAAf,E;;;;;;;;;;AC9EA;AACA;AACA;AACA;;IAEM,a;;;AAcJ;;;;;AAKA,kBAAalD,KAAb,EAAoBmD,OAApB,EAA6B;AAAA;;AAG3B;;;;AAH2B,uHACrBnD,KADqB,EACdmD,OADc;;AAO3B,UAAKyD,QAAL,GAAgB,IAAhB;AAP2B;AAQ5B;;AAED;;;;;;;;mCAIgBnG,S,EAAW;AACzB,UAAIA,SAAJ,EAAe;AAAA,YACL2C,KADK,GACK,KAAKD,OADV,CACLC,KADK;;AAEb,YAAI,CAACA,KAAL,EAAY;AAFC,YAGLE,EAHK,GAGwB7C,SAHxB,CAGL6C,EAHK;AAAA,YAGD0D,WAHC,GAGwBvG,SAHxB,CAGDuG,WAHC;AAAA,YAGY7E,OAHZ,GAGwB1B,SAHxB,CAGY0B,OAHZ;;AAIb,aAAKyE,QAAL,GAAgB,IAAI,6BAAJ,CAAoBI,WAApB,EAAiC7E,OAAjC,CAAhB;AACA,aAAKyE,QAAL,CAAcK,KAAd,CAAoB3D,EAApB;AACA,aAAKsD,QAAL,CAAcM,aAAd,CAA4B/E,OAA5B;AACAiB,cAAMyD,WAAN,CAAkB,KAAKD,QAAvB;AACD;AACF;;;wCAEmB;AAClB,WAAKE,cAAL,CAAoB,KAAK9G,KAAzB;AACD;;;8CAE0BS,S,EAAW;AAAA,mBACC,KAAKT,KADN;AAAA,UAC5BsD,EAD4B,UAC5BA,EAD4B;AAAA,UACxB0D,WADwB,UACxBA,WADwB;AAAA,UACX7E,OADW,UACXA,OADW;;AAEpC,UAAI,CAAC,KAAKyE,QAAV,EAAoB;AAClB,eAAO,IAAP;AACD;AACD,UAAI,CAAC,iBAAAxF,CAAQX,UAAU6C,EAAlB,EAAsBA,EAAtB,CAAL,EAAgC;AAC9B,aAAKsD,QAAL,CAAcK,KAAd,CAAoBxG,UAAU6C,EAA9B;AACD;AACD,UAAI,CAAC,iBAAAlC,CAAQX,UAAUuG,WAAlB,EAA+BA,WAA/B,CAAL,EAAkD;AAChD,aAAKJ,QAAL,CAAcO,cAAd,CAA6B1G,UAAUuG,WAAvC;AACD;AACD,UAAI,CAAC,iBAAA5F,CAAQX,UAAU0B,OAAlB,EAA2BA,OAA3B,CAAL,EAA0C;AACxC,aAAKyE,QAAL,CAAcM,aAAd,CAA4BzG,UAAU0B,OAAtC;AACD;AACF;;;2CAEsB;AAAA,UACbiB,KADa,GACH,KAAKD,OADF,CACbC,KADa;;AAErB,UAAI,CAACA,KAAL,EAAY;AACZA,YAAM2D,cAAN,CAAqB,KAAKH,QAA1B;AACD;;AAED;;;;;;;6BAIU;AACR,aAAO,IAAP;AACD;;;;EA7EkB,iB;;AAAf,a,CACGtB,S,GAAY;AACjBhC,MAAI,oBAAAL,CAAUuC,SAAV,CAAoB,CACtB,oBAAAvC,CAAU4C,MADY,EAEtB,oBAAA5C,CAAUwC,MAFY,CAApB,EAGDE,UAJc;AAKjBqB,eAAa,oBAAA/D,CAAU2C,OAAV,CAAkB,oBAAA3C,CAAU4C,MAA5B,CALI;AAMjB1D,WAAS,oBAAAc,CAAUmE;AANF,C;AADf,a,CAUGjD,Y,GAAe;AACpBf,SAAO,oBAAAH,CAAUC,UAAV,CAAqB,4BAArB;AADa,C;;;AAsExB,oDAAe,aAAf,E;;;;;;;;;;ACrFA;AACA;AACA;AACA;;IAEM,qB;;;AAcJ;;;;;AAKA,sBAAalD,KAAb,EAAoBmD,OAApB,EAA6B;AAAA;;AAG3B;;;;AAH2B,mIACrBnD,KADqB,EACdmD,OADc;;AAO3B,UAAKyD,QAAL,GAAgB,IAAhB;AAP2B;AAQ5B;;AAED;;;;;;;;mCAIgBnG,S,EAAW;AACzB,UAAIA,SAAJ,EAAe;AAAA,YACL2C,KADK,GACK,KAAKD,OADV,CACLC,KADK;;AAEb,YAAI,CAACA,KAAL,EAAY;AAFC,YAGLE,EAHK,GAGwB7C,SAHxB,CAGL6C,EAHK;AAAA,YAGD0D,WAHC,GAGwBvG,SAHxB,CAGDuG,WAHC;AAAA,YAGY7E,OAHZ,GAGwB1B,SAHxB,CAGY0B,OAHZ;;AAIb,aAAKyE,QAAL,GAAgB,IAAI,iCAAJ,CAAwBI,WAAxB,EAAqC7E,OAArC,CAAhB;AACA,aAAKyE,QAAL,CAAcK,KAAd,CAAoB3D,EAApB;AACA,aAAKsD,QAAL,CAAcM,aAAd,CAA4B/E,OAA5B;AACAiB,cAAMyD,WAAN,CAAkB,KAAKD,QAAvB;AACD;AACF;;;wCAEmB;AAClB,WAAKE,cAAL,CAAoB,KAAK9G,KAAzB;AACD;;;8CAE0BS,S,EAAW;AAAA,mBACC,KAAKT,KADN;AAAA,UAC5BsD,EAD4B,UAC5BA,EAD4B;AAAA,UACxB0D,WADwB,UACxBA,WADwB;AAAA,UACX7E,OADW,UACXA,OADW;;AAEpC,UAAI,CAAC,KAAKyE,QAAV,EAAoB;AAClB,eAAO,IAAP;AACD;AACD,UAAI,CAAC,iBAAAxF,CAAQX,UAAU6C,EAAlB,EAAsBA,EAAtB,CAAL,EAAgC;AAC9B,aAAKsD,QAAL,CAAcK,KAAd,CAAoBxG,UAAU6C,EAA9B;AACD;AACD,UAAI,CAAC,iBAAAlC,CAAQX,UAAUuG,WAAlB,EAA+BA,WAA/B,CAAL,EAAkD;AAChD,aAAKJ,QAAL,CAAcO,cAAd,CAA6B1G,UAAUuG,WAAvC;AACD;AACD,UAAI,CAAC,iBAAA5F,CAAQX,UAAU0B,OAAlB,EAA2BA,OAA3B,CAAL,EAA0C;AACxC,aAAKyE,QAAL,CAAcM,aAAd,CAA4BzG,UAAU0B,OAAtC;AACD;AACF;;;2CAEsB;AAAA,UACbiB,KADa,GACH,KAAKD,OADF,CACbC,KADa;;AAErB,UAAI,CAACA,KAAL,EAAY;AACZA,YAAM2D,cAAN,CAAqB,KAAKH,QAA1B;AACD;;AAED;;;;;;;6BAIU;AACR,aAAO,IAAP;AACD;;;;EA7EsB,iB;;AAAnB,qB,CACGtB,S,GAAY;AACjBhC,MAAI,oBAAAL,CAAUuC,SAAV,CAAoB,CACtB,oBAAAvC,CAAU4C,MADY,EAEtB,oBAAA5C,CAAUwC,MAFY,CAApB,EAGDE,UAJc;AAKjBqB,eAAa,oBAAA/D,CAAU2C,OAAV,CAAkB,oBAAA3C,CAAUmE,GAA5B,CALI;AAMjBjF,WAAS,oBAAAc,CAAUmE;AANF,C;AADf,qB,CAUGjD,Y,GAAe;AACpBf,SAAO,oBAAAH,CAAUC,UAAV,CAAqB,4BAArB;AADa,C;;;AAsExB,wDAAe,qBAAf,E;;;;;;;;;;ACrFA;AACA;AACA;AACA;;IAEM,e;;;AAcJ;;;;;AAKA,mBAAalD,KAAb,EAAoBmD,OAApB,EAA6B;AAAA;;AAG3B;;;;AAH2B,0HACrBnD,KADqB,EACdmD,OADc;;AAO3B,UAAKyD,QAAL,GAAgB,IAAhB;AAP2B;AAQ5B;;AAED;;;;;;;;mCAIgBnG,S,EAAW;AACzB,UAAIA,SAAJ,EAAe;AAAA,YACL2C,KADK,GACK,KAAKD,OADV,CACLC,KADK;;AAEb,YAAI,CAACA,KAAL,EAAY;AAFC,YAGLE,EAHK,GAGwB7C,SAHxB,CAGL6C,EAHK;AAAA,YAGD0D,WAHC,GAGwBvG,SAHxB,CAGDuG,WAHC;AAAA,YAGY7E,OAHZ,GAGwB1B,SAHxB,CAGY0B,OAHZ;;AAIb,aAAKyE,QAAL,GAAgB,IAAI,8BAAJ,CAAqBI,WAArB,EAAkC7E,OAAlC,CAAhB;AACA,aAAKyE,QAAL,CAAcK,KAAd,CAAoB3D,EAApB;AACA,aAAKsD,QAAL,CAAcM,aAAd,CAA4B/E,OAA5B;AACAiB,cAAMyD,WAAN,CAAkB,KAAKD,QAAvB;AACD;AACF;;;wCAEmB;AAClB,WAAKE,cAAL,CAAoB,KAAK9G,KAAzB;AACD;;;8CAE0BS,S,EAAW;AAAA,mBACC,KAAKT,KADN;AAAA,UAC5BsD,EAD4B,UAC5BA,EAD4B;AAAA,UACxB0D,WADwB,UACxBA,WADwB;AAAA,UACX7E,OADW,UACXA,OADW;;AAEpC,UAAI,CAAC,KAAKyE,QAAV,EAAoB;AAClB,eAAO,IAAP;AACD;AACD,UAAI,CAAC,iBAAAxF,CAAQX,UAAU6C,EAAlB,EAAsBA,EAAtB,CAAL,EAAgC;AAC9B,aAAKsD,QAAL,CAAcK,KAAd,CAAoBxG,UAAU6C,EAA9B;AACD;AACD,UAAI,CAAC,iBAAAlC,CAAQX,UAAUuG,WAAlB,EAA+BA,WAA/B,CAAL,EAAkD;AAChD,aAAKJ,QAAL,CAAcO,cAAd,CAA6B1G,UAAUuG,WAAvC;AACD;AACD,UAAI,CAAC,iBAAA5F,CAAQX,UAAU0B,OAAlB,EAA2BA,OAA3B,CAAL,EAA0C;AACxC,aAAKyE,QAAL,CAAcM,aAAd,CAA4BzG,UAAU0B,OAAtC;AACD;AACF;;;2CAEsB;AAAA,UACbiB,KADa,GACH,KAAKD,OADF,CACbC,KADa;;AAErB,UAAI,CAACA,KAAL,EAAY;AACZA,YAAM2D,cAAN,CAAqB,KAAKH,QAA1B;AACD;;AAED;;;;;;;6BAIU;AACR,aAAO,IAAP;AACD;;;;EA7EmB,iB;;AAAhB,e,CACGtB,S,GAAY;AACjBhC,MAAI,oBAAAL,CAAUuC,SAAV,CAAoB,CACtB,oBAAAvC,CAAU4C,MADY,EAEtB,oBAAA5C,CAAUwC,MAFY,CAApB,EAGDE,UAJc;AAKjBqB,eAAa,oBAAA/D,CAAU2C,OAAV,CAAkB,oBAAA3C,CAAUoE,KAA5B,CALI;AAMjBlF,WAAS,oBAAAc,CAAUmE;AANF,C;AADf,e,CAUGjD,Y,GAAe;AACpBf,SAAO,oBAAAH,CAAUC,UAAV,CAAqB,4BAArB;AADa,C;;;AAsExB,qDAAe,eAAf,E;;;;;;;;;;ACrFA;AACA;AACA;AACA;;IAEM,qB;;;AAcJ;;;;;AAKA,sBAAalD,KAAb,EAAoBmD,OAApB,EAA6B;AAAA;;AAG3B;;;;AAH2B,mIACrBnD,KADqB,EACdmD,OADc;;AAO3B,UAAKyD,QAAL,GAAgB,IAAhB;AAP2B;AAQ5B;;AAED;;;;;;;;mCAIgBnG,S,EAAW;AACzB,UAAIA,SAAJ,EAAe;AAAA,YACL2C,KADK,GACK,KAAKD,OADV,CACLC,KADK;;AAEb,YAAI,CAACA,KAAL,EAAY;AAFC,YAGLE,EAHK,GAGwB7C,SAHxB,CAGL6C,EAHK;AAAA,YAGD0D,WAHC,GAGwBvG,SAHxB,CAGDuG,WAHC;AAAA,YAGY7E,OAHZ,GAGwB1B,SAHxB,CAGY0B,OAHZ;;AAIb,aAAKyE,QAAL,GAAgB,IAAI,iCAAJ,CAAwBI,WAAxB,EAAqC7E,OAArC,CAAhB;AACA,aAAKyE,QAAL,CAAcK,KAAd,CAAoB3D,EAApB;AACA,aAAKsD,QAAL,CAAcM,aAAd,CAA4B/E,OAA5B;AACAiB,cAAMyD,WAAN,CAAkB,KAAKD,QAAvB;AACD;AACF;;;wCAEmB;AAClB,WAAKE,cAAL,CAAoB,KAAK9G,KAAzB;AACD;;;8CAE0BS,S,EAAW;AAAA,mBACC,KAAKT,KADN;AAAA,UAC5BsD,EAD4B,UAC5BA,EAD4B;AAAA,UACxB0D,WADwB,UACxBA,WADwB;AAAA,UACX7E,OADW,UACXA,OADW;;AAEpC,UAAI,CAAC,KAAKyE,QAAV,EAAoB;AAClB,eAAO,IAAP;AACD;AACD,UAAI,CAAC,iBAAAxF,CAAQX,UAAU6C,EAAlB,EAAsBA,EAAtB,CAAL,EAAgC;AAC9B,aAAKsD,QAAL,CAAcK,KAAd,CAAoBxG,UAAU6C,EAA9B;AACD;AACD,UAAI,CAAC,iBAAAlC,CAAQX,UAAUuG,WAAlB,EAA+BA,WAA/B,CAAL,EAAkD;AAChD,aAAKJ,QAAL,CAAcO,cAAd,CAA6B1G,UAAUuG,WAAvC;AACD;AACD,UAAI,CAAC,iBAAA5F,CAAQX,UAAU0B,OAAlB,EAA2BA,OAA3B,CAAL,EAA0C;AACxC,aAAKyE,QAAL,CAAcM,aAAd,CAA4BzG,UAAU0B,OAAtC;AACD;AACF;;;2CAEsB;AAAA,UACbiB,KADa,GACH,KAAKD,OADF,CACbC,KADa;;AAErB,UAAI,CAACA,KAAL,EAAY;AACZA,YAAM2D,cAAN,CAAqB,KAAKH,QAA1B;AACD;;AAED;;;;;;;6BAIU;AACR,aAAO,IAAP;AACD;;;;EA7EsB,iB;;AAAnB,qB,CACGtB,S,GAAY;AACjBhC,MAAI,oBAAAL,CAAUuC,SAAV,CAAoB,CACtB,oBAAAvC,CAAU4C,MADY,EAEtB,oBAAA5C,CAAUwC,MAFY,CAApB,EAGDE,UAJc;AAKjBqB,eAAa,oBAAA/D,CAAU2C,OAAV,CAAkB,oBAAA3C,CAAU2C,OAAV,CAAkB,oBAAA3C,CAAU4C,MAA5B,CAAlB,CALI;AAMjB1D,WAAS,oBAAAc,CAAUmE;AANF,C;AADf,qB,CAUGjD,Y,GAAe;AACpBf,SAAO,oBAAAH,CAAUC,UAAV,CAAqB,4BAArB;AADa,C;;;AAsExB,wDAAe,qBAAf,E;;;;;;;;;;ACrFA;AACA;AACA;AACA;;IAEM,+B;;;AAgBJ;;;;;AAKA,2BAAalD,KAAb,EAAoBmD,OAApB,EAA6B;AAAA;;AAG3B;;;;AAH2B,kJACrBnD,KADqB,EACdmD,OADc;;AAO3B,UAAKyD,QAAL,GAAgB,IAAhB;AAP2B;AAQ5B;;AAED;;;;;;;;mCAIgBnG,S,EAAW;AACzB,UAAIA,SAAJ,EAAe;AAAA,YACL2C,KADK,GACK,KAAKD,OADV,CACLC,KADK;;AAEb,YAAI,CAACA,KAAL,EAAY;AAFC,YAGLE,EAHK,GAGwB7C,SAHxB,CAGL6C,EAHK;AAAA,YAGD0D,WAHC,GAGwBvG,SAHxB,CAGDuG,WAHC;AAAA,YAGY7E,OAHZ,GAGwB1B,SAHxB,CAGY0B,OAHZ;;AAIb,aAAKyE,QAAL,GAAgB,IAAI,sCAAJ,CAA6BI,WAA7B,EAA0C7E,OAA1C,CAAhB;AACA,aAAKyE,QAAL,CAAcK,KAAd,CAAoB3D,EAApB;AACA,aAAKsD,QAAL,CAAcM,aAAd,CAA4B/E,OAA5B;AACAiB,cAAMyD,WAAN,CAAkB,KAAKD,QAAvB;AACD;AACF;;;wCAEmB;AAClB,WAAKE,cAAL,CAAoB,KAAK9G,KAAzB;AACD;;;8CAE0BS,S,EAAW;AAAA,mBACC,KAAKT,KADN;AAAA,UAC5BsD,EAD4B,UAC5BA,EAD4B;AAAA,UACxB0D,WADwB,UACxBA,WADwB;AAAA,UACX7E,OADW,UACXA,OADW;;AAEpC,UAAI,CAAC,KAAKyE,QAAV,EAAoB;AAClB,eAAO,IAAP;AACD;AACD,UAAI,CAAC,iBAAAxF,CAAQX,UAAU6C,EAAlB,EAAsBA,EAAtB,CAAL,EAAgC;AAC9B,aAAKsD,QAAL,CAAcK,KAAd,CAAoBxG,UAAU6C,EAA9B;AACD;AACD,UAAI,CAAC,iBAAAlC,CAAQX,UAAUuG,WAAlB,EAA+BA,WAA/B,CAAL,EAAkD;AAChD,aAAKJ,QAAL,CAAcO,cAAd,CAA6B1G,UAAUuG,WAAvC;AACD;AACD,UAAI,CAAC,iBAAA5F,CAAQX,UAAU0B,OAAlB,EAA2BA,OAA3B,CAAL,EAA0C;AACxC,aAAKyE,QAAL,CAAcM,aAAd,CAA4BzG,UAAU0B,OAAtC;AACD;AACF;;;2CAEsB;AAAA,UACbiB,KADa,GACH,KAAKD,OADF,CACbC,KADa;;AAErB,UAAI,CAACA,KAAL,EAAY;AACZA,YAAM2D,cAAN,CAAqB,KAAKH,QAA1B;AACD;;AAED;;;;;;;6BAIU;AACR,aAAO,IAAP;AACD;;;;EA/E2B,iB;;AAAxB,+B,CACGtB,S,GAAY;AACjBhC,MAAI,oBAAAL,CAAUuC,SAAV,CAAoB,CACtB,oBAAAvC,CAAU4C,MADY,EAEtB,oBAAA5C,CAAUwC,MAFY,CAApB,EAGDE,UAJc;AAKjBqB,eAAa,oBAAA/D,CAAU2C,OAAV,CACX,oBAAA3C,CAAU2C,OAAV,CAAkB,oBAAA3C,CAAU2C,OAAV,CAAkB,oBAAA3C,CAAU4C,MAA5B,CAAlB,CADW,CALI;AAQjB1D,WAAS,oBAAAc,CAAUmE;AARF,C;AADf,+B,CAYGjD,Y,GAAe;AACpBf,SAAO,oBAAAH,CAAUC,UAAV,CAAqB,4BAArB;AADa,C;;;AAsExB,6DAAe,+BAAf,E;;;;;;;;;;ACvFA;AACA;AACA;AACA;;IAEM,yB;;;AAcJ;;;;;AAKA,wBAAalD,KAAb,EAAoBmD,OAApB,EAA6B;AAAA;;AAG3B;;;;AAH2B,yIACrBnD,KADqB,EACdmD,OADc;;AAO3B,UAAKyD,QAAL,GAAgB,IAAhB;AAP2B;AAQ5B;;AAED;;;;;;;;mCAIgBnG,S,EAAW;AACzB,UAAIA,SAAJ,EAAe;AAAA,YACL2C,KADK,GACK,KAAKD,OADV,CACLC,KADK;;AAEb,YAAI,CAACA,KAAL,EAAY;AAFC,YAGLE,EAHK,GAGwB7C,SAHxB,CAGL6C,EAHK;AAAA,YAGD0D,WAHC,GAGwBvG,SAHxB,CAGDuG,WAHC;AAAA,YAGY7E,OAHZ,GAGwB1B,SAHxB,CAGY0B,OAHZ;;AAIb,aAAKyE,QAAL,GAAgB,IAAI,mCAAJ,CAA0BI,WAA1B,EAAuC7E,OAAvC,CAAhB;AACA,aAAKyE,QAAL,CAAcK,KAAd,CAAoB3D,EAApB;AACA,aAAKsD,QAAL,CAAcM,aAAd,CAA4B/E,OAA5B;AACAiB,cAAMyD,WAAN,CAAkB,KAAKD,QAAvB;AACD;AACF;;;wCAEmB;AAClB,WAAKE,cAAL,CAAoB,KAAK9G,KAAzB;AACD;;;8CAE0BS,S,EAAW;AAAA,mBACC,KAAKT,KADN;AAAA,UAC5BsD,EAD4B,UAC5BA,EAD4B;AAAA,UACxB0D,WADwB,UACxBA,WADwB;AAAA,UACX7E,OADW,UACXA,OADW;;AAEpC,UAAI,CAAC,KAAKyE,QAAV,EAAoB;AAClB,eAAO,IAAP;AACD;AACD,UAAI,CAAC,iBAAAxF,CAAQX,UAAU6C,EAAlB,EAAsBA,EAAtB,CAAL,EAAgC;AAC9B,aAAKsD,QAAL,CAAcK,KAAd,CAAoBxG,UAAU6C,EAA9B;AACD;AACD,UAAI,CAAC,iBAAAlC,CAAQX,UAAUuG,WAAlB,EAA+BA,WAA/B,CAAL,EAAkD;AAChD,aAAKJ,QAAL,CAAcO,cAAd,CAA6B1G,UAAUuG,WAAvC;AACD;AACD,UAAI,CAAC,iBAAA5F,CAAQX,UAAU0B,OAAlB,EAA2BA,OAA3B,CAAL,EAA0C;AACxC,aAAKyE,QAAL,CAAcM,aAAd,CAA4BzG,UAAU0B,OAAtC;AACD;AACF;;;2CAEsB;AAAA,UACbiB,KADa,GACH,KAAKD,OADF,CACbC,KADa;;AAErB,UAAI,CAACA,KAAL,EAAY;AACZA,YAAM2D,cAAN,CAAqB,KAAKH,QAA1B;AACD;;AAED;;;;;;;6BAIU;AACR,aAAO,IAAP;AACD;;;;EA7EwB,iB;;AAArB,yB,CACGtB,S,GAAY;AACjBhC,MAAI,oBAAAL,CAAUuC,SAAV,CAAoB,CACtB,oBAAAvC,CAAU4C,MADY,EAEtB,oBAAA5C,CAAUwC,MAFY,CAApB,EAGDE,UAJc;AAKjBqB,eAAa,oBAAA/D,CAAU2C,OAAV,CAAkB,oBAAA3C,CAAUoE,KAA5B,CALI;AAMjBlF,WAAS,oBAAAc,CAAUmE;AANF,C;AADf,yB,CAUGjD,Y,GAAe;AACpBf,SAAO,oBAAAH,CAAUC,UAAV,CAAqB,4BAArB;AADa,C;;;AAsExB,0DAAe,yBAAf,E;;;;;;;;;;ACrFA;AACA;AACA;AACA;;IAEM,a;;;AAeJ;;;;;AAKA,kBAAalD,KAAb,EAAoBmD,OAApB,EAA6B;AAAA;;AAG3B;;;;AAH2B,uHACrBnD,KADqB,EACdmD,OADc;;AAO3B,UAAKyD,QAAL,GAAgB,IAAhB;AAP2B;AAQ5B;;AAED;;;;;;;;mCAIgBnG,S,EAAW;AACzB,UAAIA,SAAJ,EAAe;AAAA,YACL2C,KADK,GACK,KAAKD,OADV,CACLC,KADK;;AAEb,YAAI,CAACA,KAAL,EAAY;AAFC,YAGLE,EAHK,GAG2B7C,SAH3B,CAGL6C,EAHK;AAAA,YAGD5C,MAHC,GAG2BD,SAH3B,CAGDC,MAHC;AAAA,YAGO4G,MAHP,GAG2B7G,SAH3B,CAGO6G,MAHP;AAAA,YAGenF,OAHf,GAG2B1B,SAH3B,CAGe0B,OAHf;;AAIb,aAAKyE,QAAL,GAAgB,IAAI,6BAAJ,CAAoBlG,MAApB,EAA4B4G,MAA5B,EAAoCnF,OAApC,CAAhB;AACA,aAAKyE,QAAL,CAAcK,KAAd,CAAoB3D,EAApB;AACA,aAAKsD,QAAL,CAAcM,aAAd,CAA4B/E,OAA5B;AACAiB,cAAMyD,WAAN,CAAkB,KAAKD,QAAvB;AACD;AACF;;;wCAEmB;AAClB,WAAKE,cAAL,CAAoB,KAAK9G,KAAzB;AACD;;;8CAE0BS,S,EAAW;AACpCyF,cAAQC,GAAR,CAAY1F,SAAZ;AADoC,mBAEI,KAAKT,KAFT;AAAA,UAE5BsD,EAF4B,UAE5BA,EAF4B;AAAA,UAExB5C,MAFwB,UAExBA,MAFwB;AAAA,UAEhB4G,MAFgB,UAEhBA,MAFgB;AAAA,UAERnF,OAFQ,UAERA,OAFQ;;AAGpC,UAAI,CAAC,KAAKyE,QAAV,EAAoB;AAClB,eAAO,IAAP;AACD;AACD,UAAI,CAAC,iBAAAxF,CAAQX,UAAU6C,EAAlB,EAAsBA,EAAtB,CAAL,EAAgC;AAC9B,aAAKsD,QAAL,CAAcK,KAAd,CAAoBxG,UAAU6C,EAA9B;AACD;AACD,UAAI,CAAC,iBAAAlC,CAAQX,UAAUC,MAAlB,EAA0BA,MAA1B,CAAL,EAAwC;AACtC,aAAKkG,QAAL,CAAcO,cAAd,CAA6B1G,UAAUC,MAAvC;AACD;AACD,UAAI,CAAC,iBAAAU,CAAQX,UAAU6G,MAAlB,EAA0BA,MAA1B,CAAL,EAAwC;AACtC,aAAKV,QAAL,CAAcW,SAAd,CAAwB9G,UAAU6G,MAAlC;AACD;AACD,UAAI,CAAC,iBAAAlG,CAAQX,UAAU0B,OAAlB,EAA2BA,OAA3B,CAAL,EAA0C;AACxC,aAAKyE,QAAL,CAAcM,aAAd,CAA4BzG,UAAU0B,OAAtC;AACD;AACF;;;2CAEsB;AAAA,UACbiB,KADa,GACH,KAAKD,OADF,CACbC,KADa;;AAErB,UAAI,CAACA,KAAL,EAAY;AACZA,YAAM2D,cAAN,CAAqB,KAAKH,QAA1B;AACD;;AAED;;;;;;;6BAIU;AACR,aAAO,IAAP;AACD;;;;EAlFkB,iB;;AAAf,a,CACGtB,S,GAAY;AACjBhC,MAAI,oBAAAL,CAAUuC,SAAV,CAAoB,CACtB,oBAAAvC,CAAU4C,MADY,EAEtB,oBAAA5C,CAAUwC,MAFY,CAApB,EAGDE,UAJc;AAKjBjF,UAAQ,oBAAAuC,CAAU2C,OAAV,CAAkB,oBAAA3C,CAAU4C,MAA5B,CALS;AAMjByB,UAAQ,oBAAArE,CAAU4C,MAND;AAOjB1D,WAAS,oBAAAc,CAAUmE;AAPF,C;AADf,a,CAWGjD,Y,GAAe;AACpBf,SAAO,oBAAAH,CAAUC,UAAV,CAAqB,4BAArB;AADa,C;;;AA0ExB,oDAAe,aAAf,E;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACpBA;AACA;AACA;AAKA;;AAWA;;yEAee;AACbsE,OAAA,OADa;AAEbC,aAAA,cAFa;AAGbC,gBAAA,mBAHa;AAIbC,eAAA,kBAJa;AAKbC,UAAA,eALa;AAMbC,YAAA,iBANa;AAObC,cAAA,mBAPa;AAQbC,UAAA,eARa;AASbC,mBAAA,wBATa;AAUbC,cAAA,mBAVa;AAWbC,gBAAA,qBAXa;AAYbC,WAAA,gBAAAA;AAZa,CAAf,E;;;;;;ACjCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AClFA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACZA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AClCA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,EAAE;AACf;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;AClBA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;ACfA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;;;;;;;ACzBA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,EAAE;AACf;AACA;AACA;AACA;;AAEA;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;ACbA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjCA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oCAAoC;;AAEpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC9CA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC7CA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;;;;;;;ACrBA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;ACnBA;;AAEA;AACA;;AAEA;;;;;;;ACLA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,EAAE;AACf;AACA;AACA;AACA;;AAEA;;;;;;;ACZA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACpBA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC/BA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AChBA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC7BA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACtBA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACtBA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjBA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACdA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,EAAE;AACf;AACA;AACA;AACA;;AAEA;;;;;;;ACfA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;ACfA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;ACrBA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;AC1BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACtBA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC/GA;;AAEA;AACA;;AAEA;;;;;;;ACLA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;ACjBA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;ACjBA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACxFA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;AACA;AACA;;AAEA;;;;;;;ACfA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACnBA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACnBA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACtBA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,aAAa,MAAM;AACnB;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;;AAEA;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,aAAa,MAAM;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACnBA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA,6BAA6B,kBAAkB,EAAE;AACjD;AACA;AACA;AACA;AACA;AACA,8CAA8C,kBAAkB,EAAE;AAClE;AACA;AACA;;AAEA;;;;;;;ACnCA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACxBA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC3DA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACbA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH,CAAC;;AAED;;;;;;;;AC7BA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC7BA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;ACjBA;;AAEA;AACA;;AAEA;;;;;;;ACLA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACdA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACzDA;AACA;;AAEA;AACA;;AAEA;;;;;;;ACNA;AACA;;AAEA;AACA;;AAEA;;;;;;;ACNA;AACA;;AAEA;AACA;;AAEA;;;;;;;ACNA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,6BAA6B;AAC7B,QAAQ;AACR;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,4BAA4B;AAC5B,OAAO;AACP;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;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;AACA;AACA,SAAS;AACT;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,OAAO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sBAAsB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,2BAA2B;AAChD;AACA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,gCAAgC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,gCAAgC;AACrD;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;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,OAAO;AACP;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;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;AC1iBA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH,kCAAkC;AAClC;AACA;AACA;;AAEA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gBAAgB,sBAAsB;AACtC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4GAA4G;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1FA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;AC1DA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;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,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;;AAErC;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA,4BAA4B,UAAU;;;;;;;ACvLtC,yC;;;;;;ACAA,kC;;;;;;ACAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA,iBAAiB;AACjB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3BA;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,mCAAmC,iDAAiD,gBAAgB,iBAAiB,OAAO,mBAAmB,4DAA4D,6DAA6D,wCAAwC,EAAE,EAAE,YAAY;;AAEhU;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;;AAYA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AAYA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;AAYA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA,6CAA6C,SAAS;AACtD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;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,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,6CAA6C;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,2BAA2B;AAC9C;AACA;AACA,wCAAwC,oBAAoB;AAC5D;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,oCAAoC;;AAEpC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,8DAA8D,EAAE;AAChE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,wCAAwC,qBAAqB,sBAAsB,qCAAqC,yBAAyB,gBAAgB,MAAM,kBAAkB,EAAE;AAC3L;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,+BAA+B;AAC/B;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oDAAoD,qDAAqD;AACzG;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,6BAA6B;AAChD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,6BAA6B;AAChD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,gDAAgD,gDAAgD;AAChG;;AAEA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wCAAwC,UAAU;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA,SAAS;AACT,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB,4BAA4B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mBAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,kBAAkB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,mBAAmB;AACrD;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,UAAU;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,uBAAuB,kBAAkB;AACzC;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C,6BAA6B;AAC7B;AACA;AACA;AACA,KAAK;AACL,yBAAyB;AACzB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA,iDAAiD,SAAS;AAC1D;AACA,kEAAkE;AAClE,iBAAiB;AACjB;AACA,iBAAiB;AACjB,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,sBAAsB;AACtB;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,yBAAyB,EAAE;AACrD,yBAAyB,wBAAwB,EAAE;AACnD;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,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;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;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;;AAEA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;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;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,yBAAyB;AAC1C;AACA;AACA;AACA;AACA;AACA,iBAAiB,iCAAiC;AAClD;AACA,qCAAqC,kCAAkC;AACvE;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA,yBAAyB,iCAAiC;AAC1D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,yBAAyB,iCAAiC;AAC1D;AACA;AACA;AACA;;AAEA,sBAAsB,UAAU;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA,sDAAsD,SAAS;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,KAAK;AACL;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;;AAEA;;AAEA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA,mDAAmD,UAAU;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,0CAA0C,SAAS;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B,qBAAqB;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,6CAA6C,SAAS;AACtD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,4CAA4C,cAAc,aAAa;AACvE;AACA;AACA;;AAEA;;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,CAAC;;AAED;AACA;AACA;AACA,wDAAwD;;AAExD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;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,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,qBAAqB;AACrB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,aAAa;AACb;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,4BAA4B;AACjG;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,SAAS;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4CAA4C,SAAS;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,SAAS;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;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;;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;AACA;;AAEA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,SAAS;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,QAAQ;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,SAAS;AAC/D;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;;AAEA;AACA,0FAA0F,aAAa;AACvG;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6EAA6E,eAAe;AAC5F;AACA;;AAEA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wDAAwD,SAAS;AACjE;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA,iDAAiD,SAAS;AAC1D;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;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;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;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA,kCAAkC;AAClC,sCAAsC;AACtC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;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,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,WAAW;AACjD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,iDAAiD,SAAS;AAC1D;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;;AAED;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;;AAEA;AACA,mEAAmE;;AAEnE;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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,CAAC;;AAED,wBAAwB;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED,wBAAwB;AACxB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;;AAED,mCAAmC;AACnC;AACA,CAAC;;AAED,gCAAgC;AAChC;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,UAAU;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,UAAU;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,SAAS;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED,mCAAmC;AACnC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL,CAAC;;AAED;;;;;;AAMA;AACA,kBAAkB,YAAY,EAAE;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA,+BAA+B;AAC/B,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA,+BAA+B;AAC/B,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,cAAc;AAC5B;AACA;AACA,WAAW;AACX;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,0CAA0C,qBAAqB,iBAAiB;AAChF;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA,OAAO,GAAG;AACV;AACA;AACA,KAAK,GAAG,eAAe;AACvB;AACA,oGAAoG,aAAa;AACjH;AACA,2BAA2B;AAC3B;AACA,aAAa;AACb;AACA,aAAa;AACb,WAAW;AACX;AACA,WAAW;AACX,2CAA2C,OAAO;AAClD;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA,qCAAqC,eAAe;AACpD,yCAAyC,OAAO;AAChD;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA,iBAAiB,oBAAoB,6DAA6D;AAClG;AACA,yBAAyB;AACzB;AACA,WAAW;AACX,SAAS;AACT,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO;AACP,2BAA2B,aAAa;AACxC;AACA;AACA,WAAW;AACX;AACA,WAAW;AACX;AACA,WAAW;AACX,SAAS;AACT,OAAO,EAAE;AACT,sBAAsB;AACtB,KAAK;AACL,sBAAsB;AACtB,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT,OAAO,2CAA2C,cAAc;AAChE;AACA,OAAO;AACP,KAAK;AACL;AACA,KAAK;AACL,GAAG;AACH,CAAC;;AAED;;AAEA;AACA;AACA,CAAC;AACD;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;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,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,QAAQ;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;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;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,uBAAuB,8BAA8B;AACrD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kDAAkD,QAAQ;AAC1D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,4BAA4B;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;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;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,4BAA4B;AAC5B,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;;AAEA;AACA,uBAAuB,WAAW;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2FAA2F;;AAE3F;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;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;AACA,gCAAgC,mBAAmB;AACnD,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,qBAAqB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;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,4CAA4C,SAAS;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,SAAS;AACrD;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,iBAAiB;AACjB,aAAa;AACb;;AAEA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF;AACtF;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;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,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA,6CAA6C,UAAU;AACvD;AACA;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;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,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;;AAEA;;AAEA;AACA;AACA,0CAA0C,gBAAgB;AAC1D,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA,sCAAsC,WAAW;AACjD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oCAAoC,SAAS;AAC7C;AACA;;AAEA,eAAe,OAAO;AACtB;AACA;;AAEA,qDAAqD,SAAS;AAC9D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D,aAAa;AACb,SAAS;AACT;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,QAAQ;AACnB,WAAW,MAAM;AACjB,WAAW,KAAK;AAChB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD,oDAAoD,SAAS;AAC7D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA,SAAS;AACT;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;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,gDAAgD,QAAQ;AACxD;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA,aAAa;AACb;AACA;AACA,iDAAiD,SAAS;AAC1D;AACA;;AAEA;AACA,SAAS;AACT;AACA,kDAAkD,UAAU;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;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;;AAEA;AACA;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;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;AACA;AACA;AACA,4BAA4B,mBAAmB;AAC/C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;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;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;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;AACA;AACA;;AAEA;AACA;;AAEA;AACA,2BAA2B,mBAAmB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;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;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;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,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;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,oDAAoD;AACpD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,2BAA2B,mBAAmB;AAC9C;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;;;AAID;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,SAAS;AAClD;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,aAAa;AACb;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;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;;AAEA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,yBAAyB;AACzB;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,aAAa;AACb;AACA,gCAAgC,oBAAoB;AACpD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,QAAQ;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,QAAQ;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,QAAQ;AACzD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,QAAQ;AACjE;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,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;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,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,0DAA0D;AAC1D;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;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;AACA,iBAAiB;AACjB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uDAAuD,QAAQ;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,SAAS;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qDAAqD,UAAU;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA,kBAAkB;AAClB,sBAAsB;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;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,qBAAqB;AACrB;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,iDAAiD,SAAS;AAC1D;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,kCAAkC;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;AAID;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,gDAAgD,SAAS;AACzD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,UAAU;AAC7C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,SAAS,EAAE;AACX;AACA;AACA;AACA,KAAK;AACL,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;;AAEA;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,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,WAAW;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA,0CAA0C,OAAO;AACjD,kDAAkD,QAAQ;AAC1D;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,+BAA+B,SAAS;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,SAAS;AACpD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,2CAA2C,SAAS;AACpD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;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,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA,6CAA6C,SAAS;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,SAAS;AAC1D;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,UAAU;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,SAAS;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;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,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,0CAA0C,OAAO;AACjD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,WAAW;AACjD;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,OAAO;AAC7B;AACA;AACA;AACA;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wBAAwB;AACxB;;AAEA;AACA,wBAAwB;AACxB;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB;AACxB;;AAEA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;;AAEA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iDAAiD;AACjD;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;;AAEA;AACA,iDAAiD;AACjD;AACA;AACA;;AAEA;AACA,wBAAwB;AACxB;;AAEA;AACA,oDAAoD;AACpD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8BAA8B;AAC9B;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;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;;AAEA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;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;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA,6DAA6D,YAAY;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;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,iDAAiD,OAAO;AACxD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,SAAS;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;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;;AAEA;AACA,yEAAyE,aAAa;AACtF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,wDAAwD,SAAS;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;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,oDAAoD,SAAS;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;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,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iDAAiD,SAAS;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;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,SAAS;AACT;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;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,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,CAAC;;AAED;AACA;AACA;AACA,0CAA0C,SAAS;AACnD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA,oCAAoC,sDAAsD;AAC1F;AACA;AACA;AACA,SAAS;AACT;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sCAAsC,6CAA6C;AACnF,KAAK;AACL;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;;AAEA,oCAAoC,iFAAiF;AACrH;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oCAAoC,uCAAuC;AAC3E;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;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;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,KAAK;AACL,mBAAmB,WAAW,WAAW;AACzC,mBAAmB,WAAW,WAAW;AACzC,mBAAmB,WAAW,YAAY;;AAE1C,qBAAqB,aAAa,aAAa;AAC/C,qBAAqB,aAAa,aAAa;AAC/C,qBAAqB,aAAa,cAAc;;AAEhD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,UAAU,UAAU;AAClC;AACA;AACA;AACA;;AAEA,cAAc,UAAU,WAAW;AACnC;AACA;AACA;AACA;;AAEA,eAAe,WAAW,WAAW;AACrC;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;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;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;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;;;;AAIA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,aAAa;AAC9B,iBAAiB,aAAa;AAC9B,iBAAiB,aAAa;;AAE9B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sCAAsC,oCAAoC;AAC1E;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wCAAwC,wBAAwB;AAChE;AACA;AACA;;AAEA,mCAAmC,wBAAwB;;AAE3D,sCAAsC,wBAAwB;AAC9D;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uCAAuC,wBAAwB;AAC/D;AACA;AACA;;AAEA,kCAAkC,wBAAwB;;AAE1D,qCAAqC,wBAAwB;AAC7D;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,QAAQ;AAC1D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gCAAgC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;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,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA,uFAAuF;;AAEvF,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,6CAA6C,8CAA8C;AAC3F;AACA;;AAEA;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,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;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;AACA;;AAEA;AACA;AACA;AACA;AACA;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;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,aAAa;AAC5E,gDAAgD;AAChD;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,SAAS;AACpD;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,kBAAkB;AAC5E;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;;AAEA;AACA,2CAA2C;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,iBAAiB;;AAE3E;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wBAAwB;AACxB;;AAEA;AACA;AACA;AACA,SAAS;AACT,gDAAgD;AAChD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iCAAiC;AACjC,SAAS;AACT;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,UAAU;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,UAAU;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4DAA4D,SAAS;AACrE;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,wCAAwC,gBAAgB;AACxD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA,SAAS;AACT,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;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;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uCAAuC;;AAEvC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,6CAA6C,iBAAiB,iBAAiB,qBAAqB,oBAAoB,gBAAgB,kBAAkB,oBAAoB,sBAAsB,6BAA6B,wBAAwB,iBAAiB,oCAAoC;AAC9S;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,uHAAuH;AACvH,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD,+CAA+C,mBAAmB;AAClE;AACA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,yCAAyC;AACzC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0CAA0C;AAC1C;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,CAAC;;;;AAID;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;;AAEA;;AAEA;AACA;AACA;;AAEA,oBAAoB,cAAc;;AAElC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,YAAY;AACvC,8BAA8B,aAAa;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;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,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gCAAgC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,kBAAkB;AACrC;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA,wBAAwB,wBAAwB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA,yDAAyD,sCAAsC,kCAAkC,oCAAoC,yBAAyB,6DAA6D,wCAAwC,WAAW;;AAE9S,yDAAyD,sCAAsC,oCAAoC,oCAAoC,yBAAyB,0EAA0E,aAAa;AACvR;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,2BAA2B,qBAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;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;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;;AAET;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS,wCAAwC;AACjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;AAEA,2BAA2B,oBAAoB;AAC/C;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;;AAEA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kDAAkD,QAAQ;AAC1D;AACA;AACA,sDAAsD,SAAS;AAC/D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,UAAU;AACjE;AACA;AACA,oDAAoD,UAAU;AAC9D;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA,uDAAuD,QAAQ;AAC/D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yDAAyD,QAAQ;AACjE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0FAA0F,aAAa;AACvG;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,8FAA8F,eAAe;AAC7G;AACA;;AAEA;AACA;;AAEA;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,oCAAoC,sCAAsC,6BAA6B,4BAA4B,8BAA8B,aAAa,yDAAyD,WAAW,WAAW,UAAU,sBAAsB,+BAA+B,+CAA+C;;AAEna;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;;AAEA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,2BAA2B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;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;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA,SAAS;AACT;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;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA,0BAA0B;AAC1B;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,uBAAuB,OAAO;AAC9B;AACA;;AAEA;;AAEA,kDAAkD,SAAS;AAC3D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA,uBAAuB;AACvB;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC,uCAAuC;AAC5E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sCAAsC,iBAAiB;AACvD;;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,cAAc;AACrC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,QAAQ;AAChC,6BAA6B,SAAS;AACtC,uCAAuC,kBAAkB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,mBAAmB;AACxC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,gCAAgC,iBAAiB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,sDAAsD,SAAS;AAC/D;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;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,qBAAqB;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,4BAA4B,UAAU;AACtC;AACA;;AAEA;;AAEA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,2CAA2C,QAAQ,SAAS;;AAE5D,8FAA8F,gBAAgB;AAC9G,wGAAwG,WAAW,UAAU,iBAAiB;AAC9I,sGAAsG;AACtG,mFAAmF;AACnF;AACA,mHAAmH,UAAU;AAC7H,yGAAyG;AACzG,sFAAsF;AACtF,sGAAsG;AACtG,+EAA+E,UAAU;AACzF;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;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;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,CAAC;;;;AAID;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,kDAAkD,OAAO;AACzD,2DAA2D,SAAS;AACpE;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,oDAAoD,SAAS;AAC7D;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,WAAW;AAClE;AACA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,uDAAuD,WAAW;AAClE;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;;AAGL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;;AAGL;AACA,CAAC;;AAED;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;;AAGL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,qBAAqB;AAChD;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;;AAEO;;AAER","file":"react-map.common.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// 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 \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 24);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap a320dc1f47d3ba065687","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_root.js\n// module id = 0\n// module chunks = 0","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_getNative.js\n// module id = 1\n// module chunks = 0","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_ListCache.js\n// module id = 2\n// module chunks = 0","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_assocIndexOf.js\n// module id = 3\n// module chunks = 0","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_baseGetTag.js\n// module id = 4\n// module chunks = 0","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_nativeCreate.js\n// module id = 5\n// module chunks = 0","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_getMapData.js\n// module id = 6\n// module chunks = 0","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/isObjectLike.js\n// module id = 7\n// module chunks = 0","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_Map.js\n// module id = 8\n// module chunks = 0","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_Symbol.js\n// module id = 9\n// module chunks = 0","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/isArray.js\n// module id = 10\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/lib/ReactPropTypesSecret.js\n// module id = 11\n// module chunks = 0","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/eq.js\n// module id = 12\n// module chunks = 0","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/isFunction.js\n// module id = 13\n// module chunks = 0","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_freeGlobal.js\n// module id = 14\n// module chunks = 0","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 15\n// module chunks = 0","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/isObject.js\n// module id = 16\n// module chunks = 0","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_toSource.js\n// module id = 17\n// module chunks = 0","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_MapCache.js\n// module id = 18\n// module chunks = 0","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_equalArrays.js\n// module id = 19\n// module chunks = 0","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/isBuffer.js\n// module id = 20\n// module chunks = 0","module.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/module.js\n// module id = 21\n// module chunks = 0","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/isTypedArray.js\n// module id = 22\n// module chunks = 0","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/isLength.js\n// module id = 23\n// module chunks = 0","import React from 'react';\nimport isequal from 'lodash/isEqual';\nimport PropTypes from 'prop-types';\nimport * as maptalks from 'maptalks';\n\nclass Map extends React.Component {\n static defaultProps = {};\n\n static propTypes = {\n center: PropTypes.array.isRequired,\n zoom: PropTypes.number.isRequired,\n maxZoom: PropTypes.number,\n minZoom: PropTypes.number,\n maxExtent: PropTypes.array,\n zoomable: PropTypes.bool,\n className: PropTypes.string,\n checkSize: PropTypes.bool,\n renderer: PropTypes.string,\n maxVisualPitch: PropTypes.number,\n maxPitch: PropTypes.number,\n fov: PropTypes.number,\n pitch: PropTypes.number,\n bearing: PropTypes.number,\n centerCross: PropTypes.bool,\n zoomInCenter: PropTypes.bool,\n fpsOnInteracting: PropTypes.number,\n enableInfoWindow: PropTypes.bool,\n zoomAnimationDuration: PropTypes.number,\n panAnimationDuration: PropTypes.number,\n layerCanvasLimitOnInteracting: PropTypes.number,\n layer: PropTypes.arrayOf(PropTypes.object),\n baseLayer: PropTypes.arrayOf(PropTypes.object),\n spatialReference: PropTypes.object,\n events: PropTypes.objectOf(PropTypes.func)\n };\n\n static childContextTypes = {\n map: PropTypes.instanceOf(maptalks.Map)\n };\n\n constructor (props) {\n super(props);\n\n this.state = {\n isLoad: false,\n isMounted: false\n };\n\n /**\n * map\n * @type {null}\n */\n this.map = null;\n\n this.container = null;\n\n this.events = {};\n }\n\n getChildContext () {\n return {\n map: this.map\n };\n }\n\n // shouldComponentUpdate (nextProps) {\n // // const { isMounted } = this.state;\n // const { children } = nextProps;\n // return children.length > 0;\n // }\n\n // componentWillUpdate(nextProps, nextState)\n // componentDidUpdate(prevProps, prevState)\n\n componentWillReceiveProps (nextProps) {\n const {\n center, zoom, spatialReference, cursor,\n maxExtent, maxZoom, minZoom,\n pitch, bearing, fov\n } = this.props;\n if (!this.map) {\n return null;\n }\n\n if (!isequal(nextProps.center, center) || !isequal(nextProps.zoom, zoom)) {\n if (!isequal(nextProps.center, center) && isequal(nextProps.zoom, zoom)) {\n this.map.setCenter(nextProps.center);\n }\n if (isequal(nextProps.center, center) && !isequal(nextProps.zoom, zoom)) {\n this.map.setZoom(nextProps.zoom);\n }\n if (!isequal(nextProps.center, center) && !isequal(nextProps.zoom, zoom)) {\n this.map.setCenterAndZoom(nextProps.center, nextProps.zoom);\n }\n }\n\n if (!isequal(nextProps.spatialReference, spatialReference)) {\n this.map.setSpatialReference(nextProps.zoom);\n }\n if (!isequal(nextProps.cursor, cursor)) {\n this.map.setCursor(nextProps.cursor);\n }\n if (!isequal(nextProps.maxExtent, maxExtent)) {\n this.map.setMaxExtent(nextProps.maxExtent);\n }\n if (!isequal(nextProps.maxZoom, maxZoom)) {\n this.map.setMaxZoom(nextProps.maxZoom);\n }\n if (!isequal(nextProps.minZoom, minZoom)) {\n this.map.setMinZoom(nextProps.minZoom);\n }\n if (!isequal(nextProps.fov, fov)) {\n this.map.setFov(nextProps.fov);\n }\n if (!isequal(nextProps.bearing, bearing)) {\n this.map.setBearing(nextProps.bearing);\n }\n if (!isequal(nextProps.pitch, pitch)) {\n this.map.setPitch(nextProps.pitch);\n }\n return null;\n }\n\n /**\n * set base layers\n * @param layers\n * @returns {null}\n */\n setBaseLayer (layers) {\n if (!this.map) {\n return null;\n }\n if (layers && layers.length > 0) {\n this.map.setBaseLayer();\n }\n }\n\n /**\n * set layers\n * @param layers\n * @returns {null}\n */\n setLayers (layers) {\n if (!this.map) {\n return null;\n }\n if (layers && layers.length > 0) {\n // map.addLayer();\n }\n }\n\n setRef = (x = null) => {\n this.container = x;\n };\n\n componentDidMount () {\n const { center, zoom, events, fov, bearing, pitch } = this.props;\n const options = {\n zoom,\n center,\n fov: Math.max(0.01, Math.min(59, fov)),\n bearing,\n pitch\n };\n this.map = new maptalks.Map(this.container, options);\n if (this.map.isLoaded()) {\n this.setState({\n isLoad: true\n });\n for (const key in events) {\n if (key === 'onload') {\n events[key](this.map, this);\n } else {\n this.map.on(key, events[key], this);\n }\n }\n }\n this.setState({\n isMounted: true\n });\n }\n\n componentWillUnmount () {\n if (this.map) {\n this.map = null;\n this.setState({\n isMounted: false\n });\n }\n }\n\n render () {\n const { isMounted, isLoad } = this.state;\n const { className, children } = this.props;\n return (\n <div ref={this.setRef} className={className}>\n {isMounted && isLoad ? children : null}\n </div>\n );\n }\n}\n\nexport default Map;\n\n\n\n// WEBPACK FOOTER //\n// ./src/map/index.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport * as maptalks from 'maptalks';\n\nclass TileLayer extends React.Component {\n static defaultProps = {\n attribution: null,\n minZoom: null,\n maxZoom: null,\n visible: true,\n opacity: 1,\n globalCompositeOperation: null,\n renderer: 'canvas',\n debugOutline: '#0f0',\n cssFilter: null,\n forceRenderOnMoving: false,\n forceRenderOnZooming: false,\n forceRenderOnRotating: false\n };\n\n static propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string\n ]).isRequired,\n attribution: PropTypes.string,\n minZoom: PropTypes.number,\n maxZoom: PropTypes.number,\n zIndex: PropTypes.number,\n visible: PropTypes.bool,\n opacity: PropTypes.number,\n globalCompositeOperation: PropTypes.string,\n renderer: PropTypes.oneOf(['gl', 'canvas']),\n debugOutline: PropTypes.string,\n cssFilter: PropTypes.string,\n forceRenderOnMoving: PropTypes.bool,\n forceRenderOnZooming: PropTypes.bool,\n forceRenderOnRotating: PropTypes.bool\n };\n\n static contextTypes = {\n map: PropTypes.instanceOf(maptalks.Map)\n };\n\n constructor(props, context) {\n super(props, context);\n\n this.layer = null;\n }\n\n render() {\n return null;\n }\n\n /**\n * create layer\n * @param nextProps\n */\n createLayer (nextProps) {\n if (nextProps) {\n const { map } = this.context;\n if (!map) return;\n if (this.layer) {\n map.removeLayer(this.layer);\n }\n const { id } = nextProps;\n this.layer = new maptalks.Layer(id, nextProps);\n map.addLayer(this.layer);\n }\n }\n\n componentDidMount() {\n this.createLayer(this.props);\n }\n\n componentWillReceiveProps(nextProps) {\n this.createLayer(nextProps);\n return null;\n }\n\n componentWillUnmount() {\n const { map } = this.context;\n if (!map || !this.layer) return;\n map.removeLayer(this.layer);\n }\n}\n\nexport default TileLayer;\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/Layer.js","import PropTypes from 'prop-types';\nimport * as maptalks from 'maptalks';\nimport Layer from '../Layer';\n\nclass TileLayer extends Layer {\n static defaultProps = {\n subdomains: null,\n repeatWorld: true,\n background: true,\n backgroundZoomDiff: 6,\n loadingLimitOnInteracting: 3,\n placeholder: false,\n crossOrigin: null,\n tileSize: [256, 256],\n offset: [0, 0],\n tileSystem: null,\n fadeAnimation: true,\n debug: false,\n spatialReference: null,\n maxCacheSize: 256,\n clipByPitch: true,\n maxAvailableZoom: null,\n cascadeTiles: true,\n minPitchToCascade: 35\n };\n\n static propTypes = {\n urlTemplate: PropTypes.oneOfType([PropTypes.string, PropTypes.func])\n .isRequired,\n subdomains: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.string),\n PropTypes.arrayOf(PropTypes.number)\n ]),\n repeatWorld: PropTypes.bool,\n background: PropTypes.bool,\n backgroundZoomDiff: PropTypes.number,\n loadingLimitOnInteracting: PropTypes.number,\n placeholder: PropTypes.bool,\n crossOrigin: PropTypes.string,\n tileSize: PropTypes.arrayOf(PropTypes.number),\n offset: PropTypes.arrayOf(PropTypes.number),\n tileSystem: PropTypes.arrayOf(PropTypes.number),\n fadeAnimation: PropTypes.bool,\n debug: PropTypes.bool,\n spatialReference: PropTypes.object,\n maxCacheSize: PropTypes.number,\n clipByPitch: PropTypes.bool,\n maxAvailableZoom: PropTypes.number,\n cascadeTiles: PropTypes.bool,\n minPitchToCascade: PropTypes.number\n };\n\n constructor(props, context) {\n super(props, context);\n\n /**\n * layer state\n * @type {{isAdd: boolean}}\n */\n this.state = {\n isAdd: false\n };\n\n this.layer = null;\n }\n\n /**\n * create layer\n * @param nextProps\n */\n createLayer (nextProps) {\n if (nextProps) {\n const { map } = this.context;\n if (!map) return;\n if (this.layer) {\n map.removeLayer(this.layer);\n }\n const { id } = nextProps;\n this.layer = new maptalks.TileLayer(id, nextProps);\n this.layer.on('add', () => {\n this.setState({\n isAdd: true\n });\n });\n map.addLayer(this.layer);\n }\n }\n}\n\nexport default TileLayer;\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/tile/TileLayer.js","import PropTypes from 'prop-types';\nimport * as maptalks from 'maptalks';\nimport Layer from './Layer';\n\nclass OverlayLayer extends Layer {\n static defaultProps = {\n drawImmediate: false\n };\n\n static propTypes = {\n drawImmediate: PropTypes.bool\n };\n\n constructor(props, context) {\n super(props, context);\n\n this.layer = null;\n }\n\n /**\n * create layer\n * @param nextProps\n */\n createLayer (nextProps) {\n if (nextProps) {\n const { map } = this.context;\n if (!map) return;\n if (this.layer) {\n map.removeLayer(this.layer);\n }\n const { id, geometries } = nextProps;\n this.layer = new maptalks.OverlayLayer(id, geometries, nextProps);\n map.addLayer(this.layer);\n }\n }\n}\n\nexport default OverlayLayer;\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/OverlayLayer.js","import PropTypes from 'prop-types';\nimport * as maptalks from 'maptalks';\nimport OverlayLayer from './OverlayLayer';\n\nclass VectorLayer extends OverlayLayer {\n static defaultProps = {\n cursor: 'default',\n enableSimplify: true,\n geometryEvents: true,\n defaultIconSize: [20, 20],\n cacheVectorOnCanvas: true,\n cacheSvgOnCanvas: true,\n enableAltitude: false,\n altitudeProperty: 'altitude',\n drawAltitude: false\n };\n\n static propTypes = {\n cursor: PropTypes.string,\n enableSimplify: PropTypes.bool,\n geometryEvents: PropTypes.bool,\n defaultIconSize: PropTypes.arrayOf(PropTypes.number),\n cacheVectorOnCanvas: PropTypes.bool,\n cacheSvgOnCanvas: PropTypes.bool,\n enableAltitude: PropTypes.bool,\n altitudeProperty: PropTypes.string,\n drawAltitude: PropTypes.bool\n };\n\n static childContextTypes = {\n layer: PropTypes.instanceOf(maptalks.Layer)\n };\n\n constructor (props, context) {\n super(props, context);\n this.layer = null;\n\n /**\n * layer state\n * @type {{isAdd: boolean}}\n */\n this.state = {\n isAdd: false\n };\n }\n\n /**\n * create layer\n * @param nextProps\n */\n createLayer (nextProps) {\n if (nextProps) {\n const { map } = this.context;\n if (!map) return;\n if (this.layer) {\n map.removeLayer(this.layer);\n }\n const { id, geometries } = nextProps;\n this.layer = new maptalks.VectorLayer(id, geometries, nextProps);\n this.layer.on('add', () => {\n this.setState({\n isAdd: true\n });\n });\n map.addLayer(this.layer);\n }\n }\n\n componentWillReceiveProps(nextProps) {\n this.createLayer(nextProps);\n }\n\n getChildContext() {\n return {\n layer: this.layer\n };\n }\n\n /**\n * render\n * @returns {*}\n */\n render () {\n const { isAdd } = this.state;\n console.log(isAdd);\n const { children } = this.props;\n return (isAdd ? children : null);\n }\n}\n\nexport default VectorLayer;\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/VectorLayer.js","// import Layer from './Layer';\nimport TileLayer from './tile/TileLayer';\n// import GroupTileLayer from './tile/GroupTileLayer';\n// import WMSTileLayer from './tile/WMSTileLayer';\n// import CanvasTileLayer from './tile/CanvasTileLayer';\n// import ImageLayer from './ImageLayer';\nimport OverlayLayer from './OverlayLayer';\nimport VectorLayer from './VectorLayer';\n// import CanvasLayer from './CanvasLayer';\n// import ParticleLayer from './ParticleLayer';\n// import TileSystem from './tile/tileinfo/TileSystem';\n// import TileConfig from './tile/tileinfo/TileConfig';\n\nexport {\n // Layer,\n TileLayer,\n // GroupTileLayer,\n // WMSTileLayer,\n // CanvasTileLayer,\n // ImageLayer,\n OverlayLayer,\n VectorLayer,\n // CanvasLayer,\n // ParticleLayer,\n // TileSystem,\n // TileConfig\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/index.js","import React from 'react';\nimport PropTypes from 'prop-types';\nimport * as maptalks from 'maptalks';\n\nclass Geometry extends React.Component {\n static propTypes = {\n id: PropTypes.arrayOf([\n PropTypes.number,\n PropTypes.string\n ]).isRequired,\n visible: PropTypes.bool,\n editable: PropTypes.bool,\n cursor: PropTypes.string,\n defaultProjection: PropTypes.string, // BAIDU, IDENTITY\n draggable: PropTypes.bool,\n dragShadow: PropTypes.bool,\n dragOnAxis: PropTypes.bool,\n zIndex: PropTypes.bool,\n symbol: PropTypes.object,\n properties: PropTypes.any\n };\n\n static contextTypes = {\n layer: PropTypes.instanceOf(maptalks.Layer)\n };\n\n /**\n * super class\n * @param props\n * @param context\n */\n constructor (props, context) {\n super(props, context);\n\n /**\n * geometry\n * @type {null}\n */\n this.geometry = null;\n }\n\n /**\n * create geometry\n * @param nextProps\n */\n createGeometry (nextProps) {\n if (nextProps) {\n const { layer } = this.context;\n if (!layer) return;\n this.geometry = new maptalks.Geometry();\n layer.addGeometry(this.geometry);\n }\n }\n\n componentDidMount() {\n this.createGeometry(this.props);\n }\n\n componentWillReceiveProps(nextProps) {\n this.createGeometry(nextProps);\n return null;\n }\n\n componentWillUnmount() {\n const { layer } = this.context;\n if (!layer) return;\n layer.removeGeometry(this.geometry);\n }\n\n /**\n * render\n * @returns {null}\n */\n render () {\n return null;\n }\n}\n\nexport default Geometry;\n\n\n\n// WEBPACK FOOTER //\n// ./src/geometry/Geometry.js","import isequal from 'lodash/isEqual';\nimport PropTypes from 'prop-types';\nimport * as maptalks from 'maptalks';\nimport Geometry from './Geometry';\n\nclass Marker extends Geometry {\n static propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string\n ]).isRequired,\n coordinates: PropTypes.arrayOf(PropTypes.number),\n options: PropTypes.any\n };\n\n static contextTypes = {\n layer: PropTypes.instanceOf(maptalks.Layer)\n };\n\n /**\n * super class\n * @param props\n * @param context\n */\n constructor (props, context) {\n super(props, context);\n\n /**\n * geometry\n * @type {null}\n */\n this.geometry = null;\n }\n\n /**\n * create geometry\n * @param nextProps\n */\n createGeometry (nextProps) {\n if (nextProps) {\n const { layer } = this.context;\n if (!layer) return;\n const { id, coordinates, options } = nextProps;\n this.geometry = new maptalks.Marker(coordinates, options);\n this.geometry.setId(id);\n this.geometry.setProperties(options);\n layer.addGeometry(this.geometry);\n }\n }\n\n componentDidMount() {\n this.createGeometry(this.props);\n }\n\n componentWillReceiveProps (nextProps) {\n const { id, coordinates, options } = this.props;\n if (!this.geometry) {\n return null;\n }\n if (!isequal(nextProps.id, id)) {\n this.geometry.setId(nextProps.id);\n }\n if (!isequal(nextProps.coordinates, coordinates)) {\n this.geometry.setCoordinates(nextProps.coordinates);\n }\n if (!isequal(nextProps.options, options)) {\n this.geometry.setProperties(nextProps.options);\n }\n }\n\n componentWillUnmount() {\n const { layer } = this.context;\n if (!layer) return;\n layer.removeGeometry(this.geometry);\n }\n\n /**\n * render\n * @returns {null}\n */\n render () {\n return null;\n }\n}\n\nexport default Marker;\n\n\n\n// WEBPACK FOOTER //\n// ./src/geometry/Marker.js","import isequal from 'lodash/isEqual';\nimport PropTypes from 'prop-types';\nimport * as maptalks from 'maptalks';\nimport Geometry from './Geometry';\n\nclass LineString extends Geometry {\n static propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string\n ]).isRequired,\n coordinates: PropTypes.arrayOf(PropTypes.any),\n options: PropTypes.any\n };\n\n static contextTypes = {\n layer: PropTypes.instanceOf(maptalks.Layer)\n };\n\n /**\n * super class\n * @param props\n * @param context\n */\n constructor (props, context) {\n super(props, context);\n\n /**\n * geometry\n * @type {null}\n */\n this.geometry = null;\n }\n\n /**\n * create geometry\n * @param nextProps\n */\n createGeometry (nextProps) {\n if (nextProps) {\n const { layer } = this.context;\n if (!layer) return;\n const { id, coordinates, options } = nextProps;\n this.geometry = new maptalks.LineString(coordinates, options);\n this.geometry.setId(id);\n this.geometry.setProperties(options);\n layer.addGeometry(this.geometry);\n }\n }\n\n componentDidMount() {\n this.createGeometry(this.props);\n }\n\n componentWillReceiveProps (nextProps) {\n const { id, coordinates, options } = this.props;\n if (!this.geometry) {\n return null;\n }\n if (!isequal(nextProps.id, id)) {\n this.geometry.setId(nextProps.id);\n }\n if (!isequal(nextProps.coordinates, coordinates)) {\n this.geometry.setCoordinates(nextProps.coordinates);\n }\n if (!isequal(nextProps.options, options)) {\n this.geometry.setProperties(nextProps.options);\n }\n }\n\n componentWillUnmount() {\n const { layer } = this.context;\n if (!layer) return;\n layer.removeGeometry(this.geometry);\n }\n\n /**\n * render\n * @returns {null}\n */\n render () {\n return null;\n }\n}\n\nexport default LineString;\n\n\n\n// WEBPACK FOOTER //\n// ./src/geometry/LineString.js","import isequal from 'lodash/isEqual';\nimport PropTypes from 'prop-types';\nimport * as maptalks from 'maptalks';\nimport Geometry from './Geometry';\n\nclass Polygon extends Geometry {\n static propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string\n ]).isRequired,\n coordinates: PropTypes.arrayOf(PropTypes.array),\n options: PropTypes.any\n };\n\n static contextTypes = {\n layer: PropTypes.instanceOf(maptalks.Layer)\n };\n\n /**\n * super class\n * @param props\n * @param context\n */\n constructor (props, context) {\n super(props, context);\n\n /**\n * geometry\n * @type {null}\n */\n this.geometry = null;\n }\n\n /**\n * create geometry\n * @param nextProps\n */\n createGeometry (nextProps) {\n if (nextProps) {\n const { layer } = this.context;\n if (!layer) return;\n const { id, coordinates, options } = nextProps;\n this.geometry = new maptalks.Polygon(coordinates, options);\n this.geometry.setId(id);\n this.geometry.setProperties(options);\n layer.addGeometry(this.geometry);\n }\n }\n\n componentDidMount() {\n this.createGeometry(this.props);\n }\n\n componentWillReceiveProps (nextProps) {\n const { id, coordinates, options } = this.props;\n if (!this.geometry) {\n return null;\n }\n if (!isequal(nextProps.id, id)) {\n this.geometry.setId(nextProps.id);\n }\n if (!isequal(nextProps.coordinates, coordinates)) {\n this.geometry.setCoordinates(nextProps.coordinates);\n }\n if (!isequal(nextProps.options, options)) {\n this.geometry.setProperties(nextProps.options);\n }\n }\n\n componentWillUnmount() {\n const { layer } = this.context;\n if (!layer) return;\n layer.removeGeometry(this.geometry);\n }\n\n /**\n * render\n * @returns {null}\n */\n render () {\n return null;\n }\n}\n\nexport default Polygon;\n\n\n\n// WEBPACK FOOTER //\n// ./src/geometry/Polygon.js","import isequal from 'lodash/isEqual';\nimport PropTypes from 'prop-types';\nimport * as maptalks from 'maptalks';\nimport Geometry from './Geometry';\n\nclass MultiPoint extends Geometry {\n static propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string\n ]).isRequired,\n coordinates: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.number)),\n options: PropTypes.any\n };\n\n static contextTypes = {\n layer: PropTypes.instanceOf(maptalks.Layer)\n };\n\n /**\n * super class\n * @param props\n * @param context\n */\n constructor (props, context) {\n super(props, context);\n\n /**\n * geometry\n * @type {null}\n */\n this.geometry = null;\n }\n\n /**\n * create geometry\n * @param nextProps\n */\n createGeometry (nextProps) {\n if (nextProps) {\n const { layer } = this.context;\n if (!layer) return;\n const { id, coordinates, options } = nextProps;\n this.geometry = new maptalks.MultiPoint(coordinates, options);\n this.geometry.setId(id);\n this.geometry.setProperties(options);\n layer.addGeometry(this.geometry);\n }\n }\n\n componentDidMount() {\n this.createGeometry(this.props);\n }\n\n componentWillReceiveProps (nextProps) {\n const { id, coordinates, options } = this.props;\n if (!this.geometry) {\n return null;\n }\n if (!isequal(nextProps.id, id)) {\n this.geometry.setId(nextProps.id);\n }\n if (!isequal(nextProps.coordinates, coordinates)) {\n this.geometry.setCoordinates(nextProps.coordinates);\n }\n if (!isequal(nextProps.options, options)) {\n this.geometry.setProperties(nextProps.options);\n }\n }\n\n componentWillUnmount() {\n const { layer } = this.context;\n if (!layer) return;\n layer.removeGeometry(this.geometry);\n }\n\n /**\n * render\n * @returns {null}\n */\n render () {\n return null;\n }\n}\n\nexport default MultiPoint;\n\n\n\n// WEBPACK FOOTER //\n// ./src/geometry/MultiPoint.js","import isequal from 'lodash/isEqual';\nimport PropTypes from 'prop-types';\nimport * as maptalks from 'maptalks';\nimport Geometry from './Geometry';\n\nclass MultiLineString extends Geometry {\n static propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string\n ]).isRequired,\n coordinates: PropTypes.arrayOf(\n PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.number))\n ),\n options: PropTypes.any\n };\n\n static contextTypes = {\n layer: PropTypes.instanceOf(maptalks.Layer)\n };\n\n /**\n * super class\n * @param props\n * @param context\n */\n constructor (props, context) {\n super(props, context);\n\n /**\n * geometry\n * @type {null}\n */\n this.geometry = null;\n }\n\n /**\n * create geometry\n * @param nextProps\n */\n createGeometry (nextProps) {\n if (nextProps) {\n const { layer } = this.context;\n if (!layer) return;\n const { id, coordinates, options } = nextProps;\n this.geometry = new maptalks.MultiLineString(coordinates, options);\n this.geometry.setId(id);\n this.geometry.setProperties(options);\n layer.addGeometry(this.geometry);\n }\n }\n\n componentDidMount() {\n this.createGeometry(this.props);\n }\n\n componentWillReceiveProps (nextProps) {\n const { id, coordinates, options } = this.props;\n if (!this.geometry) {\n return null;\n }\n if (!isequal(nextProps.id, id)) {\n this.geometry.setId(nextProps.id);\n }\n if (!isequal(nextProps.coordinates, coordinates)) {\n this.geometry.setCoordinates(nextProps.coordinates);\n }\n if (!isequal(nextProps.options, options)) {\n this.geometry.setProperties(nextProps.options);\n }\n }\n\n componentWillUnmount() {\n const { layer } = this.context;\n if (!layer) return;\n layer.removeGeometry(this.geometry);\n }\n\n /**\n * render\n * @returns {null}\n */\n render () {\n return null;\n }\n}\n\nexport default MultiLineString;\n\n\n\n// WEBPACK FOOTER //\n// ./src/geometry/MultiLineString.js","import isequal from 'lodash/isEqual';\nimport PropTypes from 'prop-types';\nimport * as maptalks from 'maptalks';\nimport Geometry from './Geometry';\n\nclass MultiPolygon extends Geometry {\n static propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string\n ]).isRequired,\n coordinates: PropTypes.arrayOf(PropTypes.array),\n options: PropTypes.any\n };\n\n static contextTypes = {\n layer: PropTypes.instanceOf(maptalks.Layer)\n };\n\n /**\n * super class\n * @param props\n * @param context\n */\n constructor (props, context) {\n super(props, context);\n\n /**\n * geometry\n * @type {null}\n */\n this.geometry = null;\n }\n\n /**\n * create geometry\n * @param nextProps\n */\n createGeometry (nextProps) {\n if (nextProps) {\n const { layer } = this.context;\n if (!layer) return;\n const { id, coordinates, options } = nextProps;\n this.geometry = new maptalks.MultiPolygon(coordinates, options);\n this.geometry.setId(id);\n this.geometry.setProperties(options);\n layer.addGeometry(this.geometry);\n }\n }\n\n componentDidMount() {\n this.createGeometry(this.props);\n }\n\n componentWillReceiveProps (nextProps) {\n const { id, coordinates, options } = this.props;\n if (!this.geometry) {\n return null;\n }\n if (!isequal(nextProps.id, id)) {\n this.geometry.setId(nextProps.id);\n }\n if (!isequal(nextProps.coordinates, coordinates)) {\n this.geometry.setCoordinates(nextProps.coordinates);\n }\n if (!isequal(nextProps.options, options)) {\n this.geometry.setProperties(nextProps.options);\n }\n }\n\n componentWillUnmount() {\n const { layer } = this.context;\n if (!layer) return;\n layer.removeGeometry(this.geometry);\n }\n\n /**\n * render\n * @returns {null}\n */\n render () {\n return null;\n }\n}\n\nexport default MultiPolygon;\n\n\n\n// WEBPACK FOOTER //\n// ./src/geometry/MultiPolygon.js","import isequal from 'lodash/isEqual';\nimport PropTypes from 'prop-types';\nimport * as maptalks from 'maptalks';\nimport Geometry from './Geometry';\n\nclass Circle extends Geometry {\n static propTypes = {\n id: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string\n ]).isRequired,\n center: PropTypes.arrayOf(PropTypes.number),\n radius: PropTypes.number,\n options: PropTypes.any\n };\n\n static contextTypes = {\n layer: PropTypes.instanceOf(maptalks.Layer)\n };\n\n /**\n * super class\n * @param props\n * @param context\n */\n constructor (props, context) {\n super(props, context);\n\n /**\n * geometry\n * @type {null}\n */\n this.geometry = null;\n }\n\n /**\n * create geometry\n * @param nextProps\n */\n createGeometry (nextProps) {\n if (nextProps) {\n const { layer } = this.context;\n if (!layer) return;\n const { id, center, radius, options } = nextProps;\n this.geometry = new maptalks.Circle(center, radius, options);\n this.geometry.setId(id);\n this.geometry.setProperties(options);\n layer.addGeometry(this.geometry);\n }\n }\n\n componentDidMount() {\n this.createGeometry(this.props);\n }\n\n componentWillReceiveProps (nextProps) {\n console.log(nextProps);\n const { id, center, radius, options } = this.props;\n if (!this.geometry) {\n return null;\n }\n if (!isequal(nextProps.id, id)) {\n this.geometry.setId(nextProps.id);\n }\n if (!isequal(nextProps.center, center)) {\n this.geometry.setCoordinates(nextProps.center);\n }\n if (!isequal(nextProps.radius, radius)) {\n this.geometry.setRadius(nextProps.radius);\n }\n if (!isequal(nextProps.options, options)) {\n this.geometry.setProperties(nextProps.options);\n }\n }\n\n componentWillUnmount() {\n const { layer } = this.context;\n if (!layer) return;\n layer.removeGeometry(this.geometry);\n }\n\n /**\n * render\n * @returns {null}\n */\n render () {\n return null;\n }\n}\n\nexport default Circle;\n\n\n\n// WEBPACK FOOTER //\n// ./src/geometry/Circle.js","import Geometry from './Geometry';\nimport Marker from './Marker';\nimport LineString from './LineString';\nimport Polygon from './Polygon';\nimport MultiPoint from './MultiPoint';\nimport MultiLineString from './MultiLineString';\nimport MultiPolygon from './MultiPolygon';\n// import GeometryCollection from './GeometryCollection';\n// import GeoJSON from './GeoJSON';\nimport Circle from './Circle';\n// import Ellipse from './Ellipse';\n// import Rectangle from './Rectangle';\n// import Sector from './Sector';\n// import Curve from './Curve';\n// import ArcCurve from './ArcCurve';\n// import CubicBezierCurve from './CubicBezierCurve';\n// import QuadBezierCurve from './QuadBezierCurve';\n// import TextMarker from './TextMarker';\n// import TextBox from './TextBox';\n// import Label from './Label';\n// import { ConnectorLine, ArcConnectorLine } from './ConnectorLine';\n\nexport {\n // ArcCurve,\n Circle,\n // ConnectorLine, ArcConnectorLine,\n // CubicBezierCurve,\n // Curve,\n // Ellipse,\n // GeoJSON,\n Geometry,\n // GeometryCollection,\n // Label,\n LineString,\n Marker,\n MultiLineString,\n MultiPoint,\n MultiPolygon,\n Polygon,\n // QuadBezierCurve,\n // Rectangle,\n // Sector,\n // TextBox,\n // TextMarker\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/geometry/index.js","import 'maptalks/dist/maptalks.css';\nimport Map from './map';\nimport {\n TileLayer,\n OverlayLayer,\n VectorLayer\n} from './layers';\nimport {\n Circle,\n Geometry,\n LineString,\n Marker,\n MultiLineString,\n MultiPoint,\n MultiPolygon,\n Polygon,\n} from './geometry';\n\nexport {\n Map,\n TileLayer,\n OverlayLayer,\n VectorLayer,\n Circle,\n Geometry,\n LineString,\n Marker,\n MultiLineString,\n MultiPoint,\n MultiPolygon,\n Polygon,\n};\n\nexport default {\n Map,\n TileLayer,\n OverlayLayer,\n VectorLayer,\n Circle,\n Geometry,\n LineString,\n Marker,\n MultiLineString,\n MultiPoint,\n MultiPolygon,\n Polygon,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_baseIsEqual.js\n// module id = 25\n// module chunks = 0","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_baseIsEqualDeep.js\n// module id = 26\n// module chunks = 0","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_Stack.js\n// module id = 27\n// module chunks = 0","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_listCacheClear.js\n// module id = 28\n// module chunks = 0","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_listCacheDelete.js\n// module id = 29\n// module chunks = 0","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_listCacheGet.js\n// module id = 30\n// module chunks = 0","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_listCacheHas.js\n// module id = 31\n// module chunks = 0","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_listCacheSet.js\n// module id = 32\n// module chunks = 0","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_stackClear.js\n// module id = 33\n// module chunks = 0","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_stackDelete.js\n// module id = 34\n// module chunks = 0","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_stackGet.js\n// module id = 35\n// module chunks = 0","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_stackHas.js\n// module id = 36\n// module chunks = 0","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_stackSet.js\n// module id = 37\n// module chunks = 0","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_baseIsNative.js\n// module id = 38\n// module chunks = 0","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_getRawTag.js\n// module id = 39\n// module chunks = 0","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_objectToString.js\n// module id = 40\n// module chunks = 0","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_isMasked.js\n// module id = 41\n// module chunks = 0","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_coreJsData.js\n// module id = 42\n// module chunks = 0","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_getValue.js\n// module id = 43\n// module chunks = 0","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_mapCacheClear.js\n// module id = 44\n// module chunks = 0","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_Hash.js\n// module id = 45\n// module chunks = 0","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_hashClear.js\n// module id = 46\n// module chunks = 0","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_hashDelete.js\n// module id = 47\n// module chunks = 0","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_hashGet.js\n// module id = 48\n// module chunks = 0","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_hashHas.js\n// module id = 49\n// module chunks = 0","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_hashSet.js\n// module id = 50\n// module chunks = 0","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_mapCacheDelete.js\n// module id = 51\n// module chunks = 0","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_isKeyable.js\n// module id = 52\n// module chunks = 0","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_mapCacheGet.js\n// module id = 53\n// module chunks = 0","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_mapCacheHas.js\n// module id = 54\n// module chunks = 0","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_mapCacheSet.js\n// module id = 55\n// module chunks = 0","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_SetCache.js\n// module id = 56\n// module chunks = 0","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_setCacheAdd.js\n// module id = 57\n// module chunks = 0","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_setCacheHas.js\n// module id = 58\n// module chunks = 0","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_arraySome.js\n// module id = 59\n// module chunks = 0","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_cacheHas.js\n// module id = 60\n// module chunks = 0","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_equalByTag.js\n// module id = 61\n// module chunks = 0","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_Uint8Array.js\n// module id = 62\n// module chunks = 0","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_mapToArray.js\n// module id = 63\n// module chunks = 0","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_setToArray.js\n// module id = 64\n// module chunks = 0","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_equalObjects.js\n// module id = 65\n// module chunks = 0","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_getAllKeys.js\n// module id = 66\n// module chunks = 0","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_baseGetAllKeys.js\n// module id = 67\n// module chunks = 0","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_arrayPush.js\n// module id = 68\n// module chunks = 0","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_getSymbols.js\n// module id = 69\n// module chunks = 0","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_arrayFilter.js\n// module id = 70\n// module chunks = 0","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/stubArray.js\n// module id = 71\n// module chunks = 0","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/keys.js\n// module id = 72\n// module chunks = 0","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_arrayLikeKeys.js\n// module id = 73\n// module chunks = 0","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_baseTimes.js\n// module id = 74\n// module chunks = 0","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/isArguments.js\n// module id = 75\n// module chunks = 0","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_baseIsArguments.js\n// module id = 76\n// module chunks = 0","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/stubFalse.js\n// module id = 77\n// module chunks = 0","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_isIndex.js\n// module id = 78\n// module chunks = 0","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_baseIsTypedArray.js\n// module id = 79\n// module chunks = 0","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_baseUnary.js\n// module id = 80\n// module chunks = 0","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_nodeUtil.js\n// module id = 81\n// module chunks = 0","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_baseKeys.js\n// module id = 82\n// module chunks = 0","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_isPrototype.js\n// module id = 83\n// module chunks = 0","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_nativeKeys.js\n// module id = 84\n// module chunks = 0","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_overArg.js\n// module id = 85\n// module chunks = 0","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/isArrayLike.js\n// module id = 86\n// module chunks = 0","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_getTag.js\n// module id = 87\n// module chunks = 0","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_DataView.js\n// module id = 88\n// module chunks = 0","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_Promise.js\n// module id = 89\n// module chunks = 0","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_Set.js\n// module id = 90\n// module chunks = 0","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/_WeakMap.js\n// module id = 91\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (propValue.hasOwnProperty(key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from\n // props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/factoryWithTypeCheckers.js\n// module id = 92\n// module chunks = 0","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/object-assign/index.js\n// module id = 93\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (typeSpecs.hasOwnProperty(typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n )\n\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\nmodule.exports = checkPropTypes;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/checkPropTypes.js\n// module id = 94\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim\n };\n\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/factoryWithThrowingShims.js\n// module id = 95\n// module chunks = 0","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/process/browser.js\n// module id = 96\n// module chunks = 0","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/maptalks/dist/maptalks.css\n// module id = 97\n// module chunks = 0","module.exports = require(\"react\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\"}\n// module id = 98\n// module chunks = 0","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/lodash/isEqual.js\n// module id = 99\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/index.js\n// module id = 100\n// module chunks = 0","/*!\n * maptalks v0.40.5\n * LICENSE : BSD-3-Clause\n * (c) 2016-2018 maptalks.org\n */\nvar INTERNAL_LAYER_PREFIX = '_maptalks__internal_layer_';\n\nvar GEOMETRY_COLLECTION_TYPES = ['MultiPoint', 'MultiLineString', 'MultiPolygon', 'GeometryCollection'];\n\nvar GEOJSON_TYPES = ['FeatureCollection', 'Feature', 'Point', 'LineString', 'Polygon'].concat(GEOMETRY_COLLECTION_TYPES);\n\nvar RESOURCE_PROPERTIES = ['markerFile', 'polygonPatternFile', 'linePatternFile', 'markerFillPatternFile', 'markerLinePatternFile'];\n\nvar RESOURCE_SIZE_PROPERTIES = [['markerWidth', 'markerHeight'], [], [null, 'lineWidth'], [], [null, 'markerLineWidth']];\n\nvar NUMERICAL_PROPERTIES = {\n 'lineWidth': 1,\n 'lineOpacity': 1,\n 'lineDx': 1,\n 'lineDy': 1,\n 'polygonOpacity': 1,\n 'markerWidth': 1,\n 'markerHeight': 1,\n 'markerDx': 1,\n 'markerDy': 1,\n 'markerOpacity': 1,\n 'markerFillOpacity': 1,\n 'markerLineWidth': 1,\n 'markerLineOpacity': 1,\n 'textSize': 1,\n 'textOpacity': 1,\n 'textHaloRadius': 1,\n 'textWrapWidth': 1,\n 'textLineSpacing': 1,\n 'textDx': 1,\n 'textDy': 1\n};\n\nvar COLOR_PROPERTIES = ['lineColor', 'polygonFill', 'markerFill', 'markerLineColor', 'textFill'];\n\nfunction _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\n\n\n\n\n\n\n\n\n\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\n\n\n\n\n\n\n\n\n\n\nvar inherits = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass);\n};\n\n\n\n\n\n\n\n\n\n\n\nvar possibleConstructorReturn = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\nfunction now() {\n return Date.now();\n}\n\nfunction extend(dest) {\n for (var i = 1; i < arguments.length; i++) {\n var src = arguments[i];\n for (var k in src) {\n dest[k] = src[k];\n }\n }\n return dest;\n}\n\nfunction isNil(obj) {\n return obj == null;\n}\n\nfunction isNumber(val) {\n return typeof val === 'number' && !isNaN(val);\n}\n\nfunction isInteger(n) {\n return (n | 0) === n;\n}\n\nfunction isObject(obj) {\n return (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && !!obj;\n}\n\nfunction isString(obj) {\n if (isNil(obj)) {\n return false;\n }\n return typeof obj === 'string' || obj.constructor !== null && obj.constructor === String;\n}\n\nfunction isFunction(obj) {\n if (isNil(obj)) {\n return false;\n }\n return typeof obj === 'function' || obj.constructor !== null && obj.constructor === Function;\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction hasOwn(obj, key) {\n return hasOwnProperty.call(obj, key);\n}\n\nfunction join(arr, seperator) {\n if (arr.join) {\n return arr.join(seperator || ',');\n } else {\n return Array.prototype.join.call(arr, seperator || ',');\n }\n}\n\nvar pi = Math.PI / 180;\n\nfunction toRadian(d) {\n return d * pi;\n}\n\nfunction toDegree(r) {\n return r / pi;\n}\n\nvar IS_NODE = Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]' && !process.versions['electron'] && !process.versions['nw'] && !process.versions['node-webkit'];\n\nvar requestAnimFrame = void 0;\nvar cancelAnimFrame = void 0;\n\n(function () {\n if (IS_NODE) {\n requestAnimFrame = function requestAnimFrame(fn) {\n return setTimeout(fn, 16);\n };\n\n cancelAnimFrame = clearTimeout;\n return;\n }\n\n var requestFn = void 0,\n cancelFn = void 0;\n\n var timeToCall = 1000 / 30;\n function timeoutDefer(fn) {\n return setTimeout(fn, timeToCall);\n }\n\n function getPrefixed(name) {\n return window['webkit' + name] || window['moz' + name] || window['ms' + name];\n }\n if (typeof window != 'undefined') {\n\n requestFn = window['requestAnimationFrame'] || getPrefixed('RequestAnimationFrame') || timeoutDefer;\n cancelFn = window['cancelAnimationFrame'] || getPrefixed('CancelAnimationFrame') || getPrefixed('CancelRequestAnimationFrame') || function (id) {\n window.clearTimeout(id);\n };\n } else {\n requestFn = timeoutDefer;\n cancelFn = clearTimeout;\n }\n\n requestAnimFrame = function requestAnimFrame(fn) {\n return requestFn(fn);\n };\n\n cancelAnimFrame = function cancelAnimFrame(id) {\n if (id) {\n cancelFn(id);\n }\n };\n})();\nfunction isSVG(url) {\n var prefix = 'data:image/svg+xml';\n if (url.length > 4 && url.slice(-4) === '.svg') {\n return 1;\n } else if (url.slice(0, prefix.length) === prefix) {\n return 2;\n }\n return 0;\n}\n\nfunction loadImage(img, imgDesc) {\n if (IS_NODE && loadImage.node) {\n loadImage.node(img, imgDesc);\n return;\n }\n img.src = imgDesc[0];\n}\n\nvar uid = 0;\n\nfunction UID() {\n return uid++;\n}\nvar GUID = UID;\n\nfunction parseJSON(str) {\n if (!str || !isString(str)) {\n return str;\n }\n return JSON.parse(str);\n}\n\nfunction pushIn(dest) {\n for (var i = 1; i < arguments.length; i++) {\n var src = arguments[i];\n if (src) {\n for (var ii = 0, ll = src.length; ii < ll; ii++) {\n dest.push(src[ii]);\n }\n }\n }\n return dest.length;\n}\n\nfunction removeFromArray(obj, array) {\n var i = array.indexOf(obj);\n if (i > -1) {\n array.splice(i, 1);\n }\n}\n\nfunction forEachCoord(arr, fn, context) {\n if (!Array.isArray(arr)) {\n return context ? fn.call(context, arr) : fn(arr);\n }\n var result = [];\n var p = void 0,\n pp = void 0;\n for (var i = 0, len = arr.length; i < len; i++) {\n p = arr[i];\n if (isNil(p)) {\n result.push(null);\n continue;\n }\n if (Array.isArray(p)) {\n result.push(forEachCoord(p, fn, context));\n } else {\n pp = context ? fn.call(context, p) : fn(p);\n result.push(pp);\n }\n }\n return result;\n}\n\nfunction getValueOrDefault(v, d) {\n return v === undefined ? d : v;\n}\n\nfunction sign(x) {\n if (Math.sign) {\n return Math.sign(x);\n }\n x = +x;\n if (x === 0 || isNaN(x)) {\n return Number(x);\n }\n return x > 0 ? 1 : -1;\n}\n\nfunction log2(x) {\n if (Math.log2) {\n return Math.log2(x);\n }\n var v = Math.log(x) * Math.LOG2E;\n var rounded = Math.round(v);\n if (Math.abs(rounded - v) < 1E-14) {\n return rounded;\n } else {\n return v;\n }\n}\n\nfunction interpolate(a, b, t) {\n return a * (1 - t) + b * t;\n}\n\nfunction wrap(n, min, max) {\n if (n === max || n === min) {\n return n;\n }\n var d = max - min;\n var w = ((n - min) % d + d) % d + min;\n return w;\n}\n\nfunction clamp(n, min, max) {\n return Math.min(max, Math.max(min, n));\n}\n\nfunction isArrayHasData(obj) {\n return Array.isArray(obj) && obj.length > 0;\n}\n\nfunction isURL(url) {\n if (!url) {\n return false;\n }\n var head = url.slice(0, 6);\n if (head === 'http:/' || head === 'https:' || head === 'file:/') {\n return true;\n }\n return false;\n}\n\nvar cssUrlReWithQuote = /^url\\((['\"])(.+)\\1\\)$/i;\n\nvar cssUrlRe = /^url\\(([^'\"].*[^'\"])\\)$/i;\n\nfunction isCssUrl(str) {\n if (!isString(str)) {\n return 0;\n }\n var head = str.slice(0, 6);\n if (head === 'http:/' || head === 'https:') {\n return 3;\n }\n if (cssUrlRe.test(str)) {\n return 1;\n }\n if (cssUrlReWithQuote.test(str)) {\n return 2;\n }\n return 0;\n}\n\nfunction extractCssUrl(str) {\n var test = isCssUrl(str);\n var matches = void 0;\n if (test === 3) {\n return str;\n }\n if (test === 1) {\n matches = cssUrlRe.exec(str);\n return matches[1];\n } else if (test === 2) {\n matches = cssUrlReWithQuote.exec(str);\n return matches[2];\n } else {\n return str;\n }\n}\n\nvar b64chrs = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\nfunction btoa(input) {\n if (typeof window !== 'undefined' && window.btoa) {\n return window.btoa(input);\n }\n var str = String(input);\n var output = '';\n for (var block, charCode, idx = 0, map = b64chrs; str.charAt(idx | 0) || (map = '=', idx % 1); output += map.charAt(63 & block >> 8 - idx % 1 * 8)) {\n charCode = str.charCodeAt(idx += 3 / 4);\n if (charCode > 0xFF) {\n throw new Error('\\'btoa\\' failed: The string to be encoded contains characters outside of the Latin1 range.');\n }\n block = block << 8 | charCode;\n }\n return output;\n}\n\nfunction b64toBlob(b64Data, contentType) {\n var byteCharacters = atob(b64Data);\n var arraybuffer = new ArrayBuffer(byteCharacters.length);\n var view = new Uint8Array(arraybuffer);\n for (var i = 0; i < byteCharacters.length; i++) {\n view[i] = byteCharacters.charCodeAt(i) & 0xff;\n }\n var blob = new Blob([arraybuffer], { type: contentType });\n return blob;\n}\n\nfunction computeDegree(x0, y0, x1, y1) {\n var dx = x1 - x0;\n var dy = y1 - y0;\n return Math.atan2(dy, dx);\n}\n\nvar emptyImageUrl = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';\n\nfunction equalMapView(obj1, obj2) {\n if (!obj1 && !obj2) {\n return true;\n } else if (!obj1 || !obj2) {\n return false;\n }\n for (var p in obj1) {\n if (p === 'center') {\n if (!obj2[p] || !approx(obj1[p][0], obj2[p][0]) || !approx(obj1[p][1], obj2[p][1])) {\n return false;\n }\n } else if (obj1[p] !== obj2[p]) {\n return false;\n }\n }\n return true;\n}\n\nfunction approx(val, expected, delta) {\n if (delta == null) {\n delta = 1e-6;\n }\n return val >= expected - delta && val <= expected + delta;\n}\n\nfunction flash(interval, count, cb, context) {\n if (!interval) {\n interval = 100;\n }\n if (!count) {\n count = 4;\n }\n var me = this;\n count *= 2;\n if (this._flashTimeout) {\n clearTimeout(this._flashTimeout);\n }\n\n function flashGeo() {\n if (count === 0) {\n me.show();\n if (cb) {\n if (context) {\n cb.call(context);\n } else {\n cb();\n }\n }\n return;\n }\n\n if (count % 2 === 0) {\n me.hide();\n } else {\n me.show();\n }\n count--;\n me._flashTimeout = setTimeout(flashGeo, interval);\n }\n this._flashTimeout = setTimeout(flashGeo, interval);\n return this;\n}\n\nvar types = ['Unknown', 'Point', 'LineString', 'Polygon', 'MultiPoint', 'MultiLineString', 'MultiPolygon', 'GeometryCollection'];\n\nfunction createFilter(filter) {\n return new Function('f', 'var p = (f && f.properties || {}); return ' + compile(filter));\n}\n\nfunction compile(filter) {\n if (!filter) return 'true';\n var op = filter[0];\n if (filter.length <= 1) return op === 'any' ? 'false' : 'true';\n var str = op === '==' ? compileComparisonOp(filter[1], filter[2], '===', false) : op === '!=' ? compileComparisonOp(filter[1], filter[2], '!==', false) : op === '<' || op === '>' || op === '<=' || op === '>=' ? compileComparisonOp(filter[1], filter[2], op, true) : op === 'any' ? compileLogicalOp(filter.slice(1), '||') : op === 'all' ? compileLogicalOp(filter.slice(1), '&&') : op === 'none' ? compileNegation(compileLogicalOp(filter.slice(1), '||')) : op === 'in' ? compileInOp(filter[1], filter.slice(2)) : op === '!in' ? compileNegation(compileInOp(filter[1], filter.slice(2))) : op === 'has' ? compileHasOp(filter[1]) : op === '!has' ? compileNegation(compileHasOp(filter[1])) : 'true';\n return '(' + str + ')';\n}\n\nfunction compilePropertyReference(property) {\n return property[0] === '$' ? 'f.' + property.substring(1) : 'p[' + JSON.stringify(property) + ']';\n}\n\nfunction compileComparisonOp(property, value, op, checkType) {\n var left = compilePropertyReference(property);\n var right = property === '$type' ? types.indexOf(value) : JSON.stringify(value);\n return (checkType ? 'typeof ' + left + '=== typeof ' + right + '&&' : '') + left + op + right;\n}\n\nfunction compileLogicalOp(expressions, op) {\n return expressions.map(compile).join(op);\n}\n\nfunction compileInOp(property, values) {\n if (property === '$type') values = values.map(function (value) {\n return types.indexOf(value);\n });\n var left = JSON.stringify(values.sort(compare));\n var right = compilePropertyReference(property);\n\n if (values.length <= 200) return left + '.indexOf(' + right + ') !== -1';\n\n return '' + ('function(v, a, i, j) {' + 'while (i <= j) { var m = (i + j) >> 1;' + ' if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;' + '}' + 'return false; }(') + right + ', ' + left + ',0,' + (values.length - 1) + ')';\n}\n\nfunction compileHasOp(property) {\n return property === '$id' ? '\"id\" in f' : JSON.stringify(property) + ' in p';\n}\n\nfunction compileNegation(expression) {\n return '!(' + expression + ')';\n}\n\nfunction compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\nfunction getFilterFeature(geometry) {\n var json = geometry._toJSON(),\n g = json['feature'];\n g['type'] = types.indexOf(g['geometry']['type']);\n g['subType'] = json['subType'];\n return g;\n}\n\nfunction compileStyle(styles) {\n if (!Array.isArray(styles)) {\n return compileStyle([styles]);\n }\n var compiled = [];\n for (var i = 0; i < styles.length; i++) {\n var filter = void 0;\n if (styles[i]['filter'] === true) {\n filter = function filter() {\n return true;\n };\n } else {\n filter = createFilter(styles[i]['filter']);\n }\n compiled.push(extend({}, styles[i], {\n filter: filter\n }));\n }\n return compiled;\n}\n\nfunction createFunction(parameters, defaultType) {\n var fun;\n\n if (!isFunctionDefinition(parameters)) {\n fun = function fun() {\n return parameters;\n };\n fun.isFeatureConstant = true;\n fun.isZoomConstant = true;\n } else {\n var zoomAndFeatureDependent = parameters.stops && _typeof(parameters.stops[0][0]) === 'object';\n var featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n var zoomDependent = zoomAndFeatureDependent || !featureDependent;\n var type = parameters.type || defaultType || 'exponential';\n\n var innerFun;\n if (type === 'exponential') {\n innerFun = evaluateExponentialFunction;\n } else if (type === 'interval') {\n innerFun = evaluateIntervalFunction;\n } else if (type === 'categorical') {\n innerFun = evaluateCategoricalFunction;\n } else if (type === 'identity') {\n innerFun = evaluateIdentityFunction;\n } else {\n throw new Error('Unknown function type \"' + type + '\"');\n }\n\n if (zoomAndFeatureDependent) {\n var featureFunctions = {};\n var featureFunctionStops = [];\n for (var s = 0; s < parameters.stops.length; s++) {\n var stop = parameters.stops[s];\n if (featureFunctions[stop[0].zoom] === undefined) {\n featureFunctions[stop[0].zoom] = {\n zoom: stop[0].zoom,\n type: parameters.type,\n property: parameters.property,\n stops: []\n };\n }\n featureFunctions[stop[0].zoom].stops.push([stop[0].value, stop[1]]);\n }\n\n for (var z in featureFunctions) {\n featureFunctionStops.push([featureFunctions[z].zoom, createFunction(featureFunctions[z])]);\n }\n fun = function fun(zoom, feature) {\n return evaluateExponentialFunction({ stops: featureFunctionStops, base: parameters.base }, zoom)(zoom, feature);\n };\n fun.isFeatureConstant = false;\n fun.isZoomConstant = false;\n } else if (zoomDependent) {\n fun = function fun(zoom) {\n return innerFun(parameters, zoom);\n };\n fun.isFeatureConstant = true;\n fun.isZoomConstant = false;\n } else {\n fun = function fun(zoom, feature) {\n return innerFun(parameters, feature[parameters.property]);\n };\n fun.isFeatureConstant = false;\n fun.isZoomConstant = true;\n }\n }\n\n return fun;\n}\n\nfunction evaluateCategoricalFunction(parameters, input) {\n for (var i = 0; i < parameters.stops.length; i++) {\n if (input === parameters.stops[i][0]) {\n return parameters.stops[i][1];\n }\n }\n return parameters.stops[0][1];\n}\n\nfunction evaluateIntervalFunction(parameters, input) {\n for (var i = 0; i < parameters.stops.length; i++) {\n if (input < parameters.stops[i][0]) break;\n }\n return parameters.stops[Math.max(i - 1, 0)][1];\n}\n\nfunction evaluateExponentialFunction(parameters, input) {\n var base = parameters.base !== undefined ? parameters.base : 1;\n\n var i = 0;\n while (true) {\n if (i >= parameters.stops.length) break;else if (input <= parameters.stops[i][0]) break;else i++;\n }\n\n if (i === 0) {\n return parameters.stops[i][1];\n } else if (i === parameters.stops.length) {\n return parameters.stops[i - 1][1];\n } else {\n return interpolate$1(input, base, parameters.stops[i - 1][0], parameters.stops[i][0], parameters.stops[i - 1][1], parameters.stops[i][1]);\n }\n}\n\nfunction evaluateIdentityFunction(parameters, input) {\n return input;\n}\n\nfunction interpolate$1(input, base, inputLower, inputUpper, outputLower, outputUpper) {\n if (typeof outputLower === 'function') {\n return function () {\n var evaluatedLower = outputLower.apply(undefined, arguments);\n var evaluatedUpper = outputUpper.apply(undefined, arguments);\n return interpolate$1(input, base, inputLower, inputUpper, evaluatedLower, evaluatedUpper);\n };\n } else if (outputLower.length) {\n return interpolateArray(input, base, inputLower, inputUpper, outputLower, outputUpper);\n } else {\n return interpolateNumber(input, base, inputLower, inputUpper, outputLower, outputUpper);\n }\n}\n\nfunction interpolateNumber(input, base, inputLower, inputUpper, outputLower, outputUpper) {\n var difference = inputUpper - inputLower;\n var progress = input - inputLower;\n\n var ratio;\n if (base === 1) {\n ratio = progress / difference;\n } else {\n ratio = (Math.pow(base, progress) - 1) / (Math.pow(base, difference) - 1);\n }\n\n return outputLower * (1 - ratio) + outputUpper * ratio;\n}\n\nfunction interpolateArray(input, base, inputLower, inputUpper, outputLower, outputUpper) {\n var output = [];\n for (var i = 0; i < outputLower.length; i++) {\n output[i] = interpolateNumber(input, base, inputLower, inputUpper, outputLower[i], outputUpper[i]);\n }\n return output;\n}\n\nfunction isFunctionDefinition(obj) {\n return obj && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && (obj.stops || obj.property && obj.type === 'identity');\n}\n\nfunction hasFunctionDefinition(obj) {\n for (var p in obj) {\n if (isFunctionDefinition(obj[p])) {\n return true;\n }\n }\n return false;\n}\n\nfunction interpolated(parameters) {\n return createFunction(parameters, 'exponential');\n}\n\nfunction piecewiseConstant(parameters) {\n return createFunction(parameters, 'interval');\n}\n\nfunction loadFunctionTypes(obj, argFn) {\n if (!obj) {\n return null;\n }\n var hit = false;\n if (Array.isArray(obj)) {\n var multResult = [],\n loaded;\n for (var i = 0; i < obj.length; i++) {\n loaded = loadFunctionTypes(obj[i], argFn);\n if (!loaded) {\n multResult.push(obj[i]);\n } else {\n multResult.push(loaded);\n hit = true;\n }\n }\n return hit ? multResult : obj;\n }\n var result = {\n '__fn_types_loaded': true\n },\n props = [],\n p;\n for (p in obj) {\n if (obj.hasOwnProperty(p)) {\n props.push(p);\n }\n }\n\n for (var _i = 0, len = props.length; _i < len; _i++) {\n p = props[_i];\n if (isFunctionDefinition(obj[p])) {\n hit = true;\n result['_' + p] = obj[p];\n (function (_p) {\n Object.defineProperty(result, _p, {\n get: function get$$1() {\n if (!this['__fn_' + _p]) {\n this['__fn_' + _p] = interpolated(this['_' + _p]);\n }\n return this['__fn_' + _p].apply(this, argFn());\n },\n set: function set$$1(v) {\n this['_' + _p] = v;\n },\n configurable: true,\n enumerable: true\n });\n })(p);\n } else {\n result[p] = obj[p];\n }\n }\n return hit ? result : obj;\n}\n\nfunction getFunctionTypeResources(t) {\n if (!t || !t.stops) {\n return [];\n }\n var res = [];\n for (var i = 0, l = t.stops.length; i < l; i++) {\n res.push(t.stops[i][1]);\n }\n return res;\n}\n\n\n\nvar index$1 = Object.freeze({\n\tcreateFilter: createFilter,\n\tgetFilterFeature: getFilterFeature,\n\tcompileStyle: compileStyle,\n\tisFunctionDefinition: isFunctionDefinition,\n\thasFunctionDefinition: hasFunctionDefinition,\n\tinterpolated: interpolated,\n\tpiecewiseConstant: piecewiseConstant,\n\tloadFunctionTypes: loadFunctionTypes,\n\tgetFunctionTypeResources: getFunctionTypeResources\n});\n\nfunction translateToSVGStyles(s) {\n var result = {\n 'stroke': {\n 'stroke': s['markerLineColor'],\n 'stroke-width': s['markerLineWidth'],\n 'stroke-opacity': s['markerLineOpacity'],\n 'stroke-dasharray': null,\n 'stroke-linecap': 'butt',\n 'stroke-linejoin': 'round'\n },\n 'fill': {\n 'fill': s['markerFill'],\n 'fill-opacity': s['markerFillOpacity']\n }\n };\n\n if (result['stroke']['stroke-linecap'] === 'butt') {\n if (Browser$1.vml) {\n result['stroke']['stroke-linecap'] = 'flat';\n }\n }\n if (result['stroke']['stroke-width'] === 0) {\n result['stroke']['stroke-opacity'] = 0;\n }\n return result;\n}\n\nfunction getMarkerPathBase64(symbol, width, height) {\n if (!symbol['markerPath']) {\n return null;\n }\n var op = 1;\n var styles = translateToSVGStyles(symbol);\n\n if (isNumber(symbol['markerOpacity'])) {\n op = symbol['markerOpacity'];\n }\n if (isNumber(symbol['opacity'])) {\n op *= symbol['opacity'];\n }\n var svgStyles = {};\n if (styles) {\n for (var p in styles['stroke']) {\n if (styles['stroke'].hasOwnProperty(p)) {\n if (!isNil(styles['stroke'][p])) {\n svgStyles[p] = styles['stroke'][p];\n }\n }\n }\n for (var _p in styles['fill']) {\n if (styles['fill'].hasOwnProperty(_p)) {\n if (!isNil(styles['fill'][_p])) {\n svgStyles[_p] = styles['fill'][_p];\n }\n }\n }\n }\n\n var pathes = Array.isArray(symbol['markerPath']) ? symbol['markerPath'] : [symbol['markerPath']];\n var path = void 0;\n var pathesToRender = [];\n for (var i = 0; i < pathes.length; i++) {\n path = isString(pathes[i]) ? {\n 'path': pathes[i]\n } : pathes[i];\n path = extend({}, path, svgStyles);\n path['d'] = path['path'];\n delete path['path'];\n pathesToRender.push(path);\n }\n var svg = ['<svg version=\"1.1\"', 'xmlns=\"http://www.w3.org/2000/svg\"'];\n if (op < 1) {\n svg.push('opacity=\"' + op + '\"');\n }\n\n if (symbol['markerPathWidth'] && symbol['markerPathHeight']) {\n svg.push('viewBox=\"0 0 ' + symbol['markerPathWidth'] + ' ' + symbol['markerPathHeight'] + '\"');\n }\n svg.push('preserveAspectRatio=\"none\"');\n if (width) {\n svg.push('width=\"' + width + '\"');\n }\n if (height) {\n svg.push('height=\"' + height + '\"');\n }\n svg.push('><defs></defs>');\n\n for (var _i = 0; _i < pathesToRender.length; _i++) {\n var strPath = '<path ';\n for (var _p2 in pathesToRender[_i]) {\n if (pathesToRender[_i].hasOwnProperty(_p2)) {\n strPath += ' ' + _p2 + '=\"' + pathesToRender[_i][_p2] + '\"';\n }\n }\n strPath += '></path>';\n svg.push(strPath);\n }\n svg.push('</svg>');\n var b64 = 'data:image/svg+xml;base64,' + btoa(svg.join(' '));\n return b64;\n}\n\nfunction getExternalResources(symbol, toAbsolute) {\n if (!symbol) {\n return [];\n }\n var symbols = symbol;\n if (!Array.isArray(symbol)) {\n symbols = [symbol];\n }\n var resources = [];\n var props = RESOURCE_PROPERTIES;\n var res = void 0,\n resSizeProp = void 0;\n var w = void 0,\n h = void 0;\n for (var i = symbols.length - 1; i >= 0; i--) {\n symbol = symbols[i];\n if (!symbol) {\n continue;\n }\n if (toAbsolute) {\n symbol = convertResourceUrl(symbol);\n }\n for (var ii = 0; ii < props.length; ii++) {\n res = symbol[props[ii]];\n if (isFunctionDefinition(res)) {\n res = getFunctionTypeResources(res);\n }\n if (!res) {\n continue;\n }\n if (!Array.isArray(res)) {\n res = [res];\n }\n for (var iii = 0; iii < res.length; iii++) {\n if (res[iii].slice(0, 4) === 'url(') {\n res[iii] = extractCssUrl(res[iii]);\n }\n resSizeProp = RESOURCE_SIZE_PROPERTIES[ii];\n resources.push([res[iii], symbol[resSizeProp[0]], symbol[resSizeProp[1]]]);\n }\n }\n if (symbol['markerType'] === 'path' && symbol['markerPath']) {\n w = isFunctionDefinition(symbol['markerWidth']) ? 200 : symbol['markerWidth'];\n h = isFunctionDefinition(symbol['markerHeight']) ? 200 : symbol['markerHeight'];\n if (isFunctionDefinition(symbol['markerPath'])) {\n res = getFunctionTypeResources(symbol['markerPath']);\n var path = symbol['markerPath'];\n for (var _iii = 0; _iii < res.length; _iii++) {\n symbol['markerPath'] = res[_iii];\n resources.push([getMarkerPathBase64(symbol), w, h]);\n }\n symbol['markerPath'] = path;\n } else {\n resources.push([getMarkerPathBase64(symbol), w, h]);\n }\n }\n }\n return resources;\n}\n\nfunction convertResourceUrl(symbol) {\n if (!symbol) {\n return null;\n }\n\n var s = symbol;\n if (IS_NODE) {\n return s;\n }\n var props = RESOURCE_PROPERTIES;\n var res = void 0;\n for (var ii = 0, len = props.length; ii < len; ii++) {\n res = s[props[ii]];\n if (!res) {\n continue;\n }\n s[props[ii]] = _convertUrlToAbsolute(res);\n }\n return s;\n}\n\nfunction _convertUrlToAbsolute(res) {\n if (isFunctionDefinition(res)) {\n var stops = res.stops;\n for (var i = 0; i < stops.length; i++) {\n stops[i][1] = _convertUrlToAbsolute(stops[i][1]);\n }\n return res;\n }\n var embed = 'data:';\n if (res.slice(0, 4) === 'url(') {\n res = extractCssUrl(res);\n }\n if (!isURL(res) && (res.length <= embed.length || res.substring(0, embed.length) !== embed)) {\n res = _absolute(location.href, res);\n }\n return res;\n}\n\nfunction _absolute(base, relative) {\n var stack = base.split('/'),\n parts = relative.split('/');\n if (relative.slice(0, 1) === 0) {\n return stack.slice(0, 3).join('/') + relative;\n } else {\n stack.pop();\n for (var i = 0; i < parts.length; i++) {\n if (parts[i] === '.') continue;\n if (parts[i] === '..') stack.pop();else stack.push(parts[i]);\n }\n return stack.join('/');\n }\n}\n\nfunction isGradient(g) {\n return g && g['colorStops'];\n}\n\nfunction getGradientStamp(g) {\n var keys = [g['type']];\n if (g['places']) {\n keys.push(g['places'].join());\n }\n if (g['colorStops']) {\n var stops = [];\n for (var i = g['colorStops'].length - 1; i >= 0; i--) {\n stops.push(g['colorStops'][i].join());\n }\n keys.push(stops.join(','));\n }\n return keys.join('_');\n}\n\nfunction getSymbolStamp(symbol) {\n var keys = [];\n if (Array.isArray(symbol)) {\n for (var i = 0; i < symbol.length; i++) {\n keys.push(getSymbolStamp(symbol[i]));\n }\n return '[ ' + keys.join(' , ') + ' ]';\n }\n for (var p in symbol) {\n if (hasOwn(symbol, p)) {\n if (!isFunction(symbol[p])) {\n if (isGradient(symbol[p])) {\n keys.push(p + '=' + getGradientStamp(symbol[p]));\n } else {\n keys.push(p + '=' + symbol[p]);\n }\n }\n }\n }\n return keys.join(';');\n}\n\nfunction lowerSymbolOpacity(symbol, ratio) {\n function s(_symbol, _ratio) {\n var op = _symbol['opacity'];\n if (isNil(op)) {\n _symbol['opacity'] = _ratio;\n } else {\n _symbol['opacity'] *= _ratio;\n }\n }\n var lower = void 0;\n if (Array.isArray(symbol)) {\n lower = [];\n for (var i = 0; i < symbol.length; i++) {\n var d = extend({}, symbol[i]);\n s(d, ratio);\n lower.push(d);\n }\n } else {\n lower = extend({}, symbol);\n s(lower, ratio);\n }\n return lower;\n}\n\nfunction extendSymbol(symbol) {\n var sources = Array.prototype.slice.call(arguments, 1);\n if (!sources || !sources.length) {\n sources = [{}];\n }\n if (Array.isArray(symbol)) {\n var s = void 0,\n dest = void 0;\n var result = [];\n for (var i = 0, l = symbol.length; i < l; i++) {\n s = symbol[i];\n dest = {};\n for (var ii = 0, ll = sources.length; ii < ll; ii++) {\n if (!Array.isArray(sources[ii])) {\n extend(dest, s, sources[ii] ? sources[ii] : {});\n } else if (!isNil(sources[ii][i])) {\n extend(dest, s, sources[ii][i]);\n } else {\n extend(dest, s ? s : {});\n }\n }\n result.push(dest);\n }\n return result;\n } else {\n var args = [{}, symbol];\n args.push.apply(args, sources);\n return extend.apply(this, args);\n }\n}\n\n\n\nvar index = Object.freeze({\n\tnow: now,\n\textend: extend,\n\tisNil: isNil,\n\tisNumber: isNumber,\n\tisInteger: isInteger,\n\tisObject: isObject,\n\tisString: isString,\n\tisFunction: isFunction,\n\thasOwn: hasOwn,\n\tjoin: join,\n\ttoRadian: toRadian,\n\ttoDegree: toDegree,\n\tIS_NODE: IS_NODE,\n\tget requestAnimFrame () { return requestAnimFrame; },\n\tget cancelAnimFrame () { return cancelAnimFrame; },\n\tisSVG: isSVG,\n\tloadImage: loadImage,\n\tUID: UID,\n\tGUID: GUID,\n\tparseJSON: parseJSON,\n\tpushIn: pushIn,\n\tremoveFromArray: removeFromArray,\n\tforEachCoord: forEachCoord,\n\tgetValueOrDefault: getValueOrDefault,\n\tsign: sign,\n\tlog2: log2,\n\tinterpolate: interpolate,\n\twrap: wrap,\n\tclamp: clamp,\n\tisArrayHasData: isArrayHasData,\n\tisURL: isURL,\n\tisCssUrl: isCssUrl,\n\textractCssUrl: extractCssUrl,\n\tbtoa: btoa,\n\tb64toBlob: b64toBlob,\n\tcomputeDegree: computeDegree,\n\temptyImageUrl: emptyImageUrl,\n\tequalMapView: equalMapView,\n\tflash: flash,\n\ttranslateToSVGStyles: translateToSVGStyles,\n\tgetMarkerPathBase64: getMarkerPathBase64,\n\tgetExternalResources: getExternalResources,\n\tconvertResourceUrl: convertResourceUrl,\n\tisGradient: isGradient,\n\tgetGradientStamp: getGradientStamp,\n\tgetSymbolStamp: getSymbolStamp,\n\tlowerSymbolOpacity: lowerSymbolOpacity,\n\textendSymbol: extendSymbol\n});\n\nvar Browser = {};\n\nif (!IS_NODE) {\n var ua = navigator.userAgent.toLowerCase(),\n doc = document.documentElement,\n ie = 'ActiveXObject' in window,\n webkit = ua.indexOf('webkit') !== -1,\n phantomjs = ua.indexOf('phantom') !== -1,\n android23 = ua.search('android [23]') !== -1,\n chrome = ua.indexOf('chrome') !== -1,\n gecko = ua.indexOf('gecko') !== -1 && !webkit && !window.opera && !ie,\n mobile = typeof orientation !== 'undefined' || ua.indexOf('mobile') !== -1,\n msPointer = !window.PointerEvent && window.MSPointerEvent,\n pointer = window.PointerEvent && navigator.pointerEnabled || msPointer,\n ie3d = ie && 'transition' in doc.style,\n webkit3d = 'WebKitCSSMatrix' in window && 'm11' in new window.WebKitCSSMatrix() && !android23,\n gecko3d = 'MozPerspective' in doc.style,\n opera12 = 'OTransition' in doc.style,\n any3d = (ie3d || webkit3d || gecko3d) && !opera12 && !phantomjs;\n\n var chromeVersion = 0;\n if (chrome) {\n chromeVersion = ua.match(/chrome\\/([\\d.]+)/)[1];\n }\n\n var touch = !phantomjs && (pointer || 'ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch);\n\n var webgl = void 0;\n try {\n var canvas = document.createElement('canvas');\n var gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\n webgl = gl && gl instanceof WebGLRenderingContext;\n } catch (err) {\n webgl = false;\n }\n\n Browser = {\n ie: ie,\n ielt9: ie && !document.addEventListener,\n edge: 'msLaunchUri' in navigator && !('documentMode' in document),\n webkit: webkit,\n gecko: gecko,\n android: ua.indexOf('android') !== -1,\n android23: android23,\n chrome: chrome,\n chromeVersion: chromeVersion,\n safari: !chrome && ua.indexOf('safari') !== -1,\n phantomjs: phantomjs,\n\n ie3d: ie3d,\n webkit3d: webkit3d,\n gecko3d: gecko3d,\n opera12: opera12,\n any3d: any3d,\n\n mobile: mobile,\n mobileWebkit: mobile && webkit,\n mobileWebkit3d: mobile && webkit3d,\n mobileOpera: mobile && window.opera,\n mobileGecko: mobile && gecko,\n\n touch: !!touch,\n msPointer: !!msPointer,\n pointer: !!pointer,\n\n retina: (window.devicePixelRatio || window.screen.deviceXDPI / window.screen.logicalXDPI) > 1,\n\n language: navigator.browserLanguage ? navigator.browserLanguage : navigator.language,\n ie9: ie && document.documentMode === 9,\n ie10: ie && document.documentMode === 10,\n\n webgl: webgl\n };\n}\n\nvar Browser$1 = Browser;\n\nvar Position = function () {\n function Position(x, y) {\n classCallCheck(this, Position);\n\n if (!isNil(x) && !isNil(y)) {\n this.x = +x;\n\n this.y = +y;\n } else if (!isNil(x.x) && !isNil(x.y)) {\n this.x = +x.x;\n this.y = +x.y;\n } else if (Array.isArray(x)) {\n this.x = +x[0];\n this.y = +x[1];\n }\n if (this._isNaN()) {\n throw new Error('Position is NaN');\n }\n }\n\n Position.prototype.abs = function abs() {\n return new this.constructor(Math.abs(this.x), Math.abs(this.y));\n };\n\n Position.prototype._abs = function _abs() {\n this.x = Math.abs(this.x);\n this.y = Math.abs(this.y);\n return this;\n };\n\n Position.prototype._round = function _round() {\n this.x = Math.round(this.x);\n this.y = Math.round(this.y);\n return this;\n };\n\n Position.prototype.round = function round() {\n return new this.constructor(Math.round(this.x), Math.round(this.y));\n };\n\n Position.prototype._ceil = function _ceil() {\n this.x = Math.ceil(this.x);\n this.y = Math.ceil(this.y);\n return this;\n };\n\n Position.prototype.ceil = function ceil() {\n return new this.constructor(Math.ceil(this.x), Math.ceil(this.y));\n };\n\n Position.prototype._floor = function _floor() {\n this.x = Math.floor(this.x);\n this.y = Math.floor(this.y);\n return this;\n };\n\n Position.prototype.floor = function floor() {\n return new this.constructor(Math.floor(this.x), Math.floor(this.y));\n };\n\n Position.prototype.copy = function copy() {\n return new this.constructor(this.x, this.y);\n };\n\n Position.prototype._add = function _add(x, y) {\n if (!isNil(x.x)) {\n this.x += x.x;\n this.y += x.y;\n } else if (!isNil(x[0])) {\n this.x += x[0];\n this.y += x[1];\n } else {\n this.x += x;\n this.y += y;\n }\n return this;\n };\n\n Position.prototype.add = function add(x, y) {\n var nx = void 0,\n ny = void 0;\n if (!isNil(x.x)) {\n nx = this.x + x.x;\n ny = this.y + x.y;\n } else if (!isNil(x[0])) {\n nx = this.x + x[0];\n ny = this.y + x[1];\n } else {\n nx = this.x + x;\n ny = this.y + y;\n }\n return new this.constructor(nx, ny);\n };\n\n Position.prototype._sub = function _sub(x, y) {\n if (!isNil(x.x)) {\n this.x -= x.x;\n this.y -= x.y;\n } else if (!isNil(x[0])) {\n this.x -= x[0];\n this.y -= x[1];\n } else {\n this.x -= x;\n this.y -= y;\n }\n return this;\n };\n\n Position.prototype._substract = function _substract() {\n return this._sub.apply(this, arguments);\n };\n\n Position.prototype.sub = function sub(x, y) {\n var nx = void 0,\n ny = void 0;\n if (!isNil(x.x)) {\n nx = this.x - x.x;\n ny = this.y - x.y;\n } else if (!isNil(x[0])) {\n nx = this.x - x[0];\n ny = this.y - x[1];\n } else {\n nx = this.x - x;\n ny = this.y - y;\n }\n return new this.constructor(nx, ny);\n };\n\n Position.prototype.substract = function substract() {\n return this.sub.apply(this, arguments);\n };\n\n Position.prototype.multi = function multi(ratio) {\n return new this.constructor(this.x * ratio, this.y * ratio);\n };\n\n Position.prototype._multi = function _multi(ratio) {\n this.x *= ratio;\n this.y *= ratio;\n return this;\n };\n\n Position.prototype.div = function div(n) {\n return this.multi(1 / n);\n };\n\n Position.prototype._div = function _div(n) {\n return this._multi(1 / n);\n };\n\n Position.prototype.equals = function equals(c) {\n if (!(c instanceof this.constructor)) {\n return false;\n }\n return this.x === c.x && this.y === c.y;\n };\n\n Position.prototype._isNaN = function _isNaN() {\n return isNaN(this.x) || isNaN(this.y);\n };\n\n Position.prototype.isZero = function isZero() {\n return this.x === 0 && this.y === 0;\n };\n\n Position.prototype.toArray = function toArray$$1() {\n return [this.x, this.y];\n };\n\n Position.prototype.toFixed = function toFixed(n) {\n return new this.constructor(this.x.toFixed(n), this.y.toFixed(n));\n };\n\n Position.prototype.toJSON = function toJSON() {\n return {\n x: this.x,\n y: this.y\n };\n };\n\n return Position;\n}();\n\nvar Point = function (_Position) {\n inherits(Point, _Position);\n\n function Point() {\n classCallCheck(this, Point);\n return possibleConstructorReturn(this, _Position.apply(this, arguments));\n }\n\n Point.prototype.closeTo = function closeTo(p, delta) {\n if (!delta) {\n delta = 0;\n }\n return this.x >= p.x - delta && this.x <= p.x + delta && this.y >= p.y - delta && this.y <= p.y + delta;\n };\n\n Point.prototype.distanceTo = function distanceTo(point) {\n var x = point.x - this.x,\n y = point.y - this.y;\n return Math.sqrt(x * x + y * y);\n };\n\n Point.prototype.mag = function mag() {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n };\n\n Point.prototype.unit = function unit() {\n return this.copy()._unit();\n };\n\n Point.prototype._unit = function _unit() {\n this._div(this.mag());\n return this;\n };\n\n Point.prototype.perp = function perp() {\n return this.copy()._perp();\n };\n\n Point.prototype._perp = function _perp() {\n var y = this.y;\n this.y = this.x;\n this.x = -y;\n return this;\n };\n\n Point.prototype.angleWith = function angleWith(b) {\n return this.angleWithSep(b.x, b.y);\n };\n\n Point.prototype.angleWithSep = function angleWithSep(x, y) {\n return Math.atan2(this.x * y - this.y * x, this.x * x + this.y * y);\n };\n\n Point.prototype._rotate = function _rotate(angle) {\n var cos = Math.cos(angle),\n sin = Math.sin(angle),\n x = cos * this.x - sin * this.y,\n y = sin * this.x + cos * this.y;\n this.x = x;\n this.y = y;\n return this;\n };\n\n Point.prototype.rotate = function rotate(a) {\n return this.copy()._rotate(a);\n };\n\n return Point;\n}(Position);\n\nvar Size = function () {\n function Size(width, height) {\n classCallCheck(this, Size);\n\n if (isNumber(width) && isNumber(height)) {\n this.width = width;\n\n this.height = height;\n } else if (isNumber(width['width'])) {\n this.width = width.width;\n this.height = width.height;\n } else if (Array.isArray(width)) {\n this.width = width[0];\n this.height = width[1];\n }\n }\n\n Size.prototype.copy = function copy() {\n return new Size(this['width'], this['height']);\n };\n\n Size.prototype.add = function add(x, y) {\n var w = void 0,\n h = void 0;\n if (x instanceof Size) {\n w = this.width + x.width;\n h = this.height + x.height;\n } else {\n w = this.width + x;\n h = this.height + y;\n }\n return new Size(w, h);\n };\n\n Size.prototype.equals = function equals(size) {\n return this['width'] === size['width'] && this['height'] === size['height'];\n };\n\n Size.prototype.multi = function multi(ratio) {\n return new Size(this['width'] * ratio, this['height'] * ratio);\n };\n\n Size.prototype._multi = function _multi(ratio) {\n this['width'] *= ratio;\n this['height'] *= ratio;\n return this;\n };\n\n Size.prototype._round = function _round() {\n this['width'] = Math.round(this['width']);\n this['height'] = Math.round(this['height']);\n return this;\n };\n\n Size.prototype.toPoint = function toPoint() {\n return new Point(this['width'], this['height']);\n };\n\n Size.prototype.toArray = function toArray$$1() {\n return [this['width'], this['height']];\n };\n\n Size.prototype.toJSON = function toJSON() {\n return {\n 'width': this['width'],\n 'height': this['height']\n };\n };\n\n return Size;\n}();\n\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\nvar specialPattern = /[\\b\\t\\r\\v\\f]/igm;\n\nfunction escapeSpecialChars(str) {\n if (!isString(str)) {\n return str;\n }\n return str.replace(specialPattern, '');\n}\n\nfunction splitWords(chr) {\n return trim(chr).split(/\\s+/);\n}\n\nvar rulerCtx = typeof document !== 'undefined' ? document.createElement('canvas').getContext('2d') : null;\n\nfunction stringWidth(text, font) {\n if (stringWidth.node) {\n return stringWidth.node(text, font);\n }\n rulerCtx.font = font;\n return rulerCtx.measureText(text).width;\n}\n\nvar fontHeight = {};\n\nfunction stringLength(text, font) {\n if (stringLength.node) {\n return stringLength.node(text, font);\n } else {\n var w = stringWidth(text, font);\n if (!font) {\n font = '_default_';\n }\n if (!fontHeight[font]) {\n fontHeight[font] = getFontHeight(font);\n }\n return new Size(w, fontHeight[font]);\n }\n}\n\nfunction getFontHeight(font) {\n var domRuler = getDomRuler();\n if (font !== '_default_') {\n domRuler.style.font = font;\n }\n domRuler.innerHTML = '秦';\n var h = domRuler.clientHeight;\n\n removeDomNode(domRuler);\n return h;\n}\n\nfunction splitContent(content, font, wrapWidth, textWidth) {\n if (!content || content.length === 0) {\n return [{ 'text': '', 'width': 0 }];\n }\n var width = isNil(textWidth) ? stringWidth(content, font) : textWidth;\n var chrWidth = width / content.length,\n minChrCount = Math.floor(wrapWidth / chrWidth / 2);\n if (chrWidth >= wrapWidth || minChrCount <= 0) {\n return [{ 'text': '', 'width': wrapWidth }];\n }\n if (width <= wrapWidth) return [{ 'text': content, 'width': width }];\n var result = [];\n var testStr = content.substring(0, minChrCount),\n prew = chrWidth * minChrCount;\n for (var i = minChrCount, l = content.length; i < l; i++) {\n var chr = content[i];\n var w = stringWidth(testStr + chr);\n if (w >= wrapWidth) {\n result.push({ 'text': testStr, 'width': prew });\n testStr = content.substring(i, minChrCount + i);\n i += minChrCount - 1;\n prew = chrWidth * minChrCount;\n } else {\n testStr += chr;\n prew = w;\n }\n if (i >= l - 1) {\n prew = stringWidth(testStr);\n result.push({ 'text': testStr, 'width': prew });\n }\n }\n return result;\n}\n\nvar contentExpRe = /\\{([\\w_]+)\\}/g;\n\nfunction replaceVariable(str, props) {\n if (!isString(str)) {\n return str;\n }\n return str.replace(contentExpRe, function (str, key) {\n if (!props) {\n return '';\n }\n var value = props[key];\n if (isNil(value)) {\n return '';\n } else if (Array.isArray(value)) {\n return value.join();\n }\n return value;\n });\n}\n\nfunction getAlignPoint(size, horizontalAlignment, verticalAlignment) {\n var width = size['width'],\n height = size['height'];\n var alignW = void 0,\n alignH = void 0;\n if (horizontalAlignment === 'left') {\n alignW = -width;\n } else if (horizontalAlignment === 'right') {\n alignW = 0;\n } else {\n alignW = -width / 2;\n }\n if (verticalAlignment === 'top') {\n alignH = -height;\n } else if (verticalAlignment === 'bottom') {\n alignH = 0;\n } else {\n alignH = -height / 2;\n }\n return new Point(alignW, alignH);\n}\n\nfunction getFont(style) {\n if (style['textFont']) {\n return style['textFont'];\n } else {\n return (style['textStyle'] && style['textStyle'] !== 'normal' ? style['textStyle'] + ' ' : '') + (style['textWeight'] && style['textWeight'] !== 'normal' ? style['textWeight'] + ' ' : '') + style['textSize'] + 'px ' + (style['textFaceName'][0] === '\"' ? style['textFaceName'] : '\"' + style['textFaceName'] + '\"');\n }\n}\n\nfunction splitTextToRow(text, style) {\n var font = getFont(style),\n lineSpacing = style['textLineSpacing'] || 0,\n size = stringLength(text, font),\n textWidth = size['width'],\n textHeight = size['height'],\n wrapChar = style['textWrapCharacter'],\n textRows = [];\n var wrapWidth = style['textWrapWidth'];\n if (!wrapWidth || wrapWidth > textWidth) {\n wrapWidth = textWidth;\n }\n if (!isString(text)) {\n text += '';\n }\n var actualWidth = 0;\n if (wrapChar && text.indexOf(wrapChar) >= 0) {\n var texts = text.split(wrapChar);\n for (var i = 0, l = texts.length; i < l; i++) {\n var t = texts[i];\n var tWidth = stringWidth(t, font);\n if (tWidth > wrapWidth) {\n var contents = splitContent(t, font, wrapWidth, tWidth);\n for (var ii = 0, ll = contents.length; ii < ll; ii++) {\n var w = contents[ii].width;\n if (w > actualWidth) {\n actualWidth = w;\n }\n textRows.push({\n 'text': contents[ii].text,\n 'size': new Size(w, textHeight)\n });\n }\n } else {\n if (tWidth > actualWidth) {\n actualWidth = tWidth;\n }\n textRows.push({\n 'text': t,\n 'size': new Size(tWidth, textHeight)\n });\n }\n }\n } else if (textWidth > wrapWidth) {\n var _contents = splitContent(text, font, wrapWidth, textWidth);\n for (var _i = 0; _i < _contents.length; _i++) {\n var _w = _contents[_i].width;\n if (_w > actualWidth) {\n actualWidth = _w;\n }\n textRows.push({\n 'text': _contents[_i].text,\n 'size': new Size(_w, textHeight)\n });\n }\n } else {\n if (textWidth > actualWidth) {\n actualWidth = textWidth;\n }\n textRows.push({\n 'text': text,\n 'size': size\n });\n }\n\n var rowNum = textRows.length;\n var textSize = new Size(actualWidth, textHeight * rowNum + lineSpacing * (rowNum - 1));\n return {\n 'total': rowNum,\n 'size': textSize,\n 'rows': textRows,\n 'rawSize': size\n };\n}\n\nvar strings = Object.freeze({\n\ttrim: trim,\n\tescapeSpecialChars: escapeSpecialChars,\n\tsplitWords: splitWords,\n\tstringWidth: stringWidth,\n\tstringLength: stringLength,\n\tgetFontHeight: getFontHeight,\n\tsplitContent: splitContent,\n\treplaceVariable: replaceVariable,\n\tgetAlignPoint: getAlignPoint,\n\tgetFont: getFont,\n\tsplitTextToRow: splitTextToRow\n});\n\nvar first = function first(props) {\n return props[0];\n};\n\nvar testProp = IS_NODE ? first : function (props) {\n\n var style = document.documentElement.style;\n\n for (var i = 0; i < props.length; i++) {\n if (props[i] in style) {\n return props[i];\n }\n }\n return false;\n};\n\nvar TRANSFORM = testProp(['transform', 'WebkitTransform', 'OTransform', 'MozTransform', 'msTransform']);\n\nvar TRANSFORMORIGIN = testProp(['transformOrigin', 'WebkitTransformOrigin', 'OTransformOrigin', 'MozTransformOrigin', 'msTransformOrigin']);\n\nvar TRANSITION = testProp(['transition', 'WebkitTransition', 'OTransition', 'MozTransition', 'msTransition']);\n\nvar CSSFILTER = testProp(['filter', 'WebkitFilter', 'OFilter', 'MozFilter', 'msFilter']);\n\nfunction createEl(tagName, className) {\n var el = document.createElement(tagName);\n if (className) {\n setClass(el, className);\n }\n return el;\n}\n\nfunction createElOn(tagName, style, container) {\n var el = createEl(tagName);\n if (style) {\n setStyle(el, style);\n }\n if (container) {\n container.appendChild(el);\n }\n return el;\n}\n\nfunction removeDomNode(node) {\n if (!node) {\n return this;\n }\n if (Browser$1.ielt9 || Browser$1.ie9) {\n var d = createEl('div');\n d.appendChild(node);\n d.innerHTML = '';\n d = null;\n } else if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n return this;\n}\n\nfunction addDomEvent(obj, typeArr, handler, context) {\n if (!obj || !obj.addEventListener || !typeArr || !handler) {\n return this;\n }\n var eventHandler = function eventHandler(e) {\n if (!e) {\n e = window.event;\n }\n handler.call(context || obj, e);\n return;\n };\n var types = typeArr.split(' ');\n for (var i = types.length - 1; i >= 0; i--) {\n var type = types[i];\n if (!type) {\n continue;\n }\n\n if (!obj['Z__' + type]) {\n obj['Z__' + type] = [];\n }\n var hit = listensDomEvent(obj, type, handler);\n if (hit >= 0) {\n removeDomEvent(obj, type, handler);\n }\n obj['Z__' + type].push({\n callback: eventHandler,\n src: handler\n });\n\n if (type === 'mousewheel' && Browser$1.gecko) {\n type = 'DOMMouseScroll';\n }\n obj.addEventListener(type, eventHandler, false);\n }\n return this;\n}\n\nfunction removeDomEvent(obj, typeArr, handler) {\n function doRemove(type, callback) {\n if (type === 'mousewheel' && Browser$1.gecko) {\n type = 'DOMMouseScroll';\n }\n obj.removeEventListener(type, callback, false);\n }\n if (!obj || !obj.removeEventListener || !typeArr) {\n return this;\n }\n var types = typeArr.split(' ');\n for (var i = types.length - 1; i >= 0; i--) {\n var type = types[i];\n if (!type) {\n continue;\n }\n\n if (!handler && obj['Z__' + type]) {\n var handlers = obj['Z__' + type];\n for (var j = 0, jlen = handlers.length; j < jlen; j++) {\n doRemove(handlers[j].callback);\n }\n delete obj['Z__' + type];\n return this;\n }\n var hit = listensDomEvent(obj, type, handler);\n if (hit < 0) {\n return this;\n }\n var hitHandler = obj['Z__' + type][hit];\n doRemove(type, hitHandler.callback);\n obj['Z__' + type].splice(hit, 1);\n }\n return this;\n}\n\nfunction listensDomEvent(obj, type, handler) {\n if (!obj || !obj['Z__' + type] || !handler) {\n return -1;\n }\n var handlers = obj['Z__' + type];\n for (var i = 0, len = handlers.length; i < len; i++) {\n if (handlers[i].src === handler) {\n return i;\n }\n }\n return -1;\n}\n\nfunction preventDefault(event) {\n if (event.preventDefault) {\n event.preventDefault();\n } else {\n event.returnValue = false;\n }\n return this;\n}\n\nfunction stopPropagation(e) {\n if (e.stopPropagation) {\n e.stopPropagation();\n } else {\n e.cancelBubble = true;\n }\n return this;\n}\n\nfunction preventSelection(dom) {\n dom.onselectstart = function () {\n return false;\n };\n dom.ondragstart = function () {\n return false;\n };\n dom.setAttribute('unselectable', 'on');\n return this;\n}\n\nfunction offsetDom(dom, offset) {\n if (!dom) {\n return null;\n }\n\n if (Browser$1.any3d) {\n setTransform(dom, offset);\n } else {\n dom.style.left = offset.x + 'px';\n dom.style.top = offset.y + 'px';\n }\n return offset;\n}\n\nfunction computeDomPosition(dom) {\n var style = window.getComputedStyle(dom);\n var padding = [parseInt(style['padding-left']), parseInt(style['padding-top'])];\n var rect = dom.getBoundingClientRect();\n\n var offsetWidth = dom.offsetWidth,\n offsetHeight = dom.offsetHeight;\n var scaleX = offsetWidth ? rect.width / offsetWidth : 1,\n scaleY = offsetHeight ? rect.height / offsetHeight : 1;\n dom.__position = [rect.left + padding[0], rect.top + padding[1], scaleX, scaleY];\n return dom.__position;\n}\n\nfunction getEventContainerPoint(ev, dom) {\n if (!ev) {\n ev = window.event;\n }\n var domPos = dom.__position;\n if (!domPos) {\n domPos = computeDomPosition(dom);\n }\n\n return new Point(ev.clientX / domPos[2] - domPos[0] - dom.clientLeft, ev.clientY / domPos[3] - domPos[1] - dom.clientTop);\n}\n\nfunction endsWith(str, suffix) {\n var l = str.length - suffix.length;\n return l >= 0 && str.indexOf(suffix, l) === l;\n}\n\nfunction setStyle(dom, strCss) {\n var cssText = dom.style.cssText;\n if (!endsWith(cssText, ';')) {\n cssText += ';';\n }\n dom.style.cssText = cssText + strCss;\n return this;\n}\n\nfunction hasClass(el, name) {\n if (el.classList !== undefined) {\n return el.classList.contains(name);\n }\n var className = getClass(el);\n return className.length > 0 && new RegExp('(^|\\\\s)' + name + '(\\\\s|$)').test(className);\n}\n\nfunction addClass(el, name) {\n if (el.classList !== undefined && !hasClass(el, name)) {\n var classes = splitWords(name);\n for (var i = 0, len = classes.length; i < len; i++) {\n el.classList.add(classes[i]);\n }\n } else {\n var className = getClass(el);\n setClass(el, (className ? className + ' ' : '') + name);\n }\n return this;\n}\n\nfunction setClass(el, name) {\n if (isNil(el.className.baseVal)) {\n el.className = name;\n } else {\n el.className.baseVal = name;\n }\n return this;\n}\n\nfunction getClass(el) {\n return isNil(el.className.baseVal) ? el.className : el.className.baseVal;\n}\n\nfunction setOpacity(el, value) {\n el.style.opacity = value;\n return this;\n}\n\nfunction setTransform(el, offset) {\n var pos = offset || new Point(0, 0);\n el.style[TRANSFORM] = Browser$1.any3d ? 'translate3d(' + pos.x + 'px,' + pos.y + 'px,0px)' : 'translate(' + pos.x + 'px,' + pos.y + 'px)';\n\n return this;\n}\n\nfunction setTransformMatrix(el, m) {\n var text = 'matrix(' + (isString(m) ? m : m.join()) + ')';\n if (el.style[TRANSFORM] !== text) {\n el.style[TRANSFORM] = text;\n }\n return this;\n}\n\nfunction removeTransform(el) {\n if (el.style[TRANSFORM]) {\n el.style[TRANSFORM] = '';\n }\n return this;\n}\n\nfunction isHTML(str) {\n return (/<[a-z\\][\\s\\S]*>/i.test(str)\n );\n}\n\nfunction measureDom(parentTag, dom) {\n var ruler = getDomRuler(parentTag);\n if (isString(dom)) {\n ruler.innerHTML = dom;\n } else {\n ruler.appendChild(dom);\n }\n var result = new Size(ruler.clientWidth, ruler.clientHeight);\n removeDomNode(ruler);\n return result;\n}\n\nfunction getDomRuler(tag) {\n var span = document.createElement(tag);\n span.style.cssText = 'position:absolute;left:-10000px;top:-10000px;';\n document.body.appendChild(span);\n return span;\n}\n\nvar on = addDomEvent;\n\nvar off = removeDomEvent;\n\nvar dom = Object.freeze({\n\tTRANSFORM: TRANSFORM,\n\tTRANSFORMORIGIN: TRANSFORMORIGIN,\n\tTRANSITION: TRANSITION,\n\tCSSFILTER: CSSFILTER,\n\tcreateEl: createEl,\n\tcreateElOn: createElOn,\n\tremoveDomNode: removeDomNode,\n\taddDomEvent: addDomEvent,\n\tremoveDomEvent: removeDomEvent,\n\tlistensDomEvent: listensDomEvent,\n\tpreventDefault: preventDefault,\n\tstopPropagation: stopPropagation,\n\tpreventSelection: preventSelection,\n\toffsetDom: offsetDom,\n\tcomputeDomPosition: computeDomPosition,\n\tgetEventContainerPoint: getEventContainerPoint,\n\tsetStyle: setStyle,\n\thasClass: hasClass,\n\taddClass: addClass,\n\tsetClass: setClass,\n\tgetClass: getClass,\n\tsetOpacity: setOpacity,\n\tsetTransform: setTransform,\n\tsetTransformMatrix: setTransformMatrix,\n\tremoveTransform: removeTransform,\n\tisHTML: isHTML,\n\tmeasureDom: measureDom,\n\tgetDomRuler: getDomRuler,\n\ton: on,\n\toff: off\n});\n\nvar Ajax = {\n jsonp: function jsonp(url, callback) {\n var name = '_maptalks_jsonp_' + UID();\n if (url.match(/\\?/)) url += '&callback=' + name;else url += '?callback=' + name;\n\n var script = document.createElement('script');\n script.type = 'text/javascript';\n script.src = url;\n\n window[name] = function (data) {\n callback(null, data);\n document.getElementsByTagName('head')[0].removeChild(script);\n script = null;\n delete window[name];\n };\n\n document.getElementsByTagName('head')[0].appendChild(script);\n return this;\n },\n\n get: function get(url, options, cb) {\n if (isFunction(options)) {\n var t = cb;\n cb = options;\n options = t;\n }\n if (IS_NODE && Ajax.get.node) {\n return Ajax.get.node(url, cb, options);\n }\n var client = Ajax._getClient(cb);\n client.open('GET', url, true);\n if (options) {\n for (var k in options.headers) {\n client.setRequestHeader(k, options.headers[k]);\n }\n client.withCredentials = options.credentials === 'include';\n if (options['responseType']) {\n client.responseType = options['responseType'];\n }\n }\n client.send(null);\n return client;\n },\n\n post: function post(url, options, cb) {\n var postData = void 0;\n if (!isString(url)) {\n var t = cb;\n postData = options;\n options = url;\n url = options.url;\n cb = t;\n } else {\n if (isFunction(options)) {\n var _t = cb;\n cb = options;\n options = _t;\n }\n options = options || {};\n postData = options.postData;\n }\n if (IS_NODE && Ajax.post.node) {\n options.url = url;\n return Ajax.post.node(options, postData, cb);\n }\n var client = Ajax._getClient(cb);\n client.open('POST', options.url, true);\n if (!options.headers) {\n options.headers = {};\n }\n if (!options.headers['Content-Type']) {\n options.headers['Content-Type'] = 'application/x-www-form-urlencoded';\n }\n if ('setRequestHeader' in client) {\n for (var p in options.headers) {\n if (options.headers.hasOwnProperty(p)) {\n client.setRequestHeader(p, options.headers[p]);\n }\n }\n }\n if (!isString(postData)) {\n postData = JSON.stringify(postData);\n }\n client.send(postData);\n return client;\n },\n\n _wrapCallback: function _wrapCallback(client, cb) {\n return function () {\n if (client.readyState === 4) {\n if (client.status === 200) {\n if (client.responseType === 'arraybuffer') {\n var response = client.response;\n if (response.byteLength === 0) {\n cb(new Error('http status 200 returned without content.'));\n } else {\n cb(null, {\n data: client.response,\n cacheControl: client.getResponseHeader('Cache-Control'),\n expires: client.getResponseHeader('Expires'),\n contentType: client.getResponseHeader('Content-Type')\n });\n }\n } else {\n cb(null, client.responseText);\n }\n } else {\n cb(new Error(client.statusText + ',' + client.status));\n }\n }\n };\n },\n\n _getClient: function _getClient(cb) {\n var client = void 0;\n try {\n client = new XMLHttpRequest();\n } catch (e) {\n try {\n client = new ActiveXObject('Msxml2.XMLHTTP');\n } catch (e) {\n try {\n client = new ActiveXObject('Microsoft.XMLHTTP');\n } catch (e) {}\n }\n }\n client.onreadystatechange = Ajax._wrapCallback(client, cb);\n return client;\n },\n getArrayBuffer: function getArrayBuffer(url, options, cb) {\n if (isFunction(options)) {\n var t = cb;\n cb = options;\n options = t;\n }\n if (!options) {\n options = {};\n }\n options['responseType'] = 'arraybuffer';\n return Ajax.get(url, options, cb);\n },\n getImage: function getImage(img, url, options) {\n return Ajax.getArrayBuffer(url, options, function (err, imgData) {\n if (err) {\n if (img.onerror) {\n img.onerror(err);\n }\n } else if (imgData) {\n var URL = window.URL || window.webkitURL;\n var onload = img.onload;\n img.onload = function () {\n if (onload) {\n onload();\n }\n URL.revokeObjectURL(img.src);\n };\n var blob = new Blob([new Uint8Array(imgData.data)], { type: imgData.contentType });\n img.cacheControl = imgData.cacheControl;\n img.expires = imgData.expires;\n img.src = imgData.data.byteLength ? URL.createObjectURL(blob) : emptyImageUrl;\n }\n });\n }\n};\n\nAjax.getJSON = function (url, options, cb) {\n if (isFunction(options)) {\n var t = cb;\n cb = options;\n options = t;\n }\n var callback = function callback(err, resp) {\n var data = resp ? parseJSON(resp) : null;\n cb(err, data);\n };\n if (options && options['jsonp']) {\n return Ajax.jsonp(url, callback);\n }\n return Ajax.get(url, options, callback);\n};\n\nvar DEFAULT_STROKE_COLOR = '#000';\nvar DEFAULT_FILL_COLOR = 'rgba(255,255,255,0)';\nvar DEFAULT_TEXT_COLOR = '#000';\n\nvar hitTesting = false;\n\nvar Canvas = {\n setHitTesting: function setHitTesting(testing) {\n hitTesting = testing;\n },\n createCanvas: function createCanvas(width, height, canvasClass) {\n var canvas = void 0;\n if (!IS_NODE) {\n canvas = createEl('canvas');\n canvas.width = width;\n canvas.height = height;\n } else {\n canvas = new canvasClass(width, height);\n }\n return canvas;\n },\n prepareCanvasFont: function prepareCanvasFont(ctx, style) {\n ctx.textBaseline = 'top';\n ctx.font = getFont(style);\n var fill = style['textFill'];\n if (!fill) {\n fill = DEFAULT_TEXT_COLOR;\n }\n ctx.fillStyle = Canvas.getRgba(fill, style['textOpacity']);\n },\n prepareCanvas: function prepareCanvas(ctx, style, resources, testing) {\n if (!style) {\n return;\n }\n var strokeWidth = style['lineWidth'];\n if (!isNil(strokeWidth) && ctx.lineWidth !== strokeWidth) {\n ctx.lineWidth = strokeWidth;\n }\n var strokeColor = style['linePatternFile'] || style['lineColor'] || DEFAULT_STROKE_COLOR;\n if (testing) {\n ctx.strokeStyle = '#000';\n } else if (isImageUrl(strokeColor) && resources) {\n var patternOffset = void 0;\n if (style['linePatternDx'] || style['linePatternDy']) {\n patternOffset = [style['linePatternDx'], style['linePatternDy']];\n }\n Canvas._setStrokePattern(ctx, strokeColor, strokeWidth, patternOffset, resources);\n\n style['lineDasharray'] = [];\n } else if (isGradient(strokeColor)) {\n if (style['lineGradientExtent']) {\n ctx.strokeStyle = Canvas._createGradient(ctx, strokeColor, style['lineGradientExtent']);\n } else {\n ctx.strokeStyle = DEFAULT_STROKE_COLOR;\n }\n } else {\n ctx.strokeStyle = strokeColor;\n }\n if (style['lineJoin']) {\n ctx.lineJoin = style['lineJoin'];\n }\n if (style['lineCap']) {\n ctx.lineCap = style['lineCap'];\n }\n if (ctx.setLineDash && isArrayHasData(style['lineDasharray'])) {\n ctx.setLineDash(style['lineDasharray']);\n }\n var fill = style['polygonPatternFile'] || style['polygonFill'] || DEFAULT_FILL_COLOR;\n if (testing) {\n ctx.fillStyle = '#000';\n } else if (isImageUrl(fill) && resources) {\n var fillImgUrl = extractImageUrl(fill);\n var fillTexture = resources.getImage([fillImgUrl, null, null]);\n if (!fillTexture) {\n fillTexture = resources.getImage([fillImgUrl + '-texture', null, strokeWidth]);\n }\n if (isSVG(fillImgUrl) && fillTexture instanceof Image && (Browser$1.edge || Browser$1.ie)) {\n var w = fillTexture.width || 20,\n h = fillTexture.height || 20;\n var canvas = Canvas.createCanvas(w, h);\n Canvas.image(canvas.getContext('2d'), fillTexture, 0, 0, w, h);\n fillTexture = canvas;\n }\n if (!fillTexture) {\n if (typeof console !== 'undefined') {\n console.warn('img not found for', fillImgUrl);\n }\n } else {\n ctx.fillStyle = ctx.createPattern(fillTexture, 'repeat');\n if (style['polygonPatternDx'] || style['polygonPatternDy']) {\n ctx.fillStyle['polygonPatternOffset'] = [style['polygonPatternDx'], style['polygonPatternDy']];\n }\n }\n } else if (isGradient(fill)) {\n if (style['polygonGradientExtent']) {\n ctx.fillStyle = Canvas._createGradient(ctx, fill, style['polygonGradientExtent']);\n } else {\n ctx.fillStyle = 'rgba(255,255,255,0)';\n }\n } else {\n ctx.fillStyle = fill;\n }\n },\n _createGradient: function _createGradient(ctx, g, extent) {\n var gradient = null,\n places = g['places'];\n var min = extent.getMin(),\n max = extent.getMax(),\n width = extent.getWidth(),\n height = extent.getHeight();\n if (!g['type'] || g['type'] === 'linear') {\n if (!places) {\n places = [min.x, min.y, max.x, min.y];\n } else {\n if (places.length !== 4) {\n throw new Error('A linear gradient\\'s places should have 4 numbers.');\n }\n places = [min.x + places[0] * width, min.y + places[1] * height, min.x + places[2] * width, min.y + places[3] * height];\n }\n gradient = ctx.createLinearGradient.apply(ctx, places);\n } else if (g['type'] === 'radial') {\n if (!places) {\n var c = extent.getCenter()._round();\n places = [c.x, c.y, Math.abs(c.x - min.x), c.x, c.y, 0];\n } else {\n if (places.length !== 6) {\n throw new Error('A radial gradient\\'s places should have 6 numbers.');\n }\n places = [min.x + places[0] * width, min.y + places[1] * height, width * places[2], min.x + places[3] * width, min.y + places[4] * height, width * places[5]];\n }\n gradient = ctx.createRadialGradient.apply(ctx, places);\n }\n g['colorStops'].forEach(function (stop) {\n gradient.addColorStop.apply(gradient, stop);\n });\n return gradient;\n },\n _setStrokePattern: function _setStrokePattern(ctx, strokePattern, strokeWidth, linePatternOffset, resources) {\n var imgUrl = extractImageUrl(strokePattern);\n var imageTexture = void 0;\n if (IS_NODE) {\n imageTexture = resources.getImage([imgUrl, null, strokeWidth]);\n } else {\n var key = imgUrl + '-texture-' + strokeWidth;\n imageTexture = resources.getImage(key);\n if (!imageTexture) {\n var imageRes = resources.getImage([imgUrl, null, null]);\n if (imageRes) {\n var w = void 0;\n if (!imageRes.width || !imageRes.height) {\n w = strokeWidth;\n } else {\n w = Math.round(imageRes.width * strokeWidth / imageRes.height);\n }\n var patternCanvas = Canvas.createCanvas(w, strokeWidth, ctx.canvas.constructor);\n Canvas.image(patternCanvas.getContext('2d'), imageRes, 0, 0, w, strokeWidth);\n resources.addResource([key, null, strokeWidth], patternCanvas);\n imageTexture = patternCanvas;\n }\n }\n }\n if (imageTexture) {\n ctx.strokeStyle = ctx.createPattern(imageTexture, 'repeat');\n ctx.strokeStyle['linePatternOffset'] = linePatternOffset;\n } else if (typeof console !== 'undefined') {\n console.warn('img not found for', imgUrl);\n }\n },\n clearRect: function clearRect(ctx, x1, y1, x2, y2) {\n ctx.canvas._drawn = false;\n ctx.clearRect(x1, y1, x2, y2);\n },\n fillCanvas: function fillCanvas(ctx, fillOpacity, x, y) {\n if (hitTesting) {\n fillOpacity = 1;\n }\n ctx.canvas._drawn = true;\n if (fillOpacity === 0) {\n return;\n }\n var isPattern = Canvas._isPattern(ctx.fillStyle);\n\n var offset = ctx.fillStyle && ctx.fillStyle['polygonPatternOffset'];\n var dx = offset ? offset[0] : 0,\n dy = offset ? offset[1] : 0;\n\n if (isNil(fillOpacity)) {\n fillOpacity = 1;\n }\n var alpha = void 0;\n if (fillOpacity < 1) {\n alpha = ctx.globalAlpha;\n ctx.globalAlpha *= fillOpacity;\n }\n if (isPattern) {\n x = x || 0;\n y = y || 0;\n\n ctx.translate(x + dx, y + dy);\n }\n ctx.fill();\n if (isPattern) {\n ctx.translate(-x - dx, -y - dy);\n }\n if (fillOpacity < 1) {\n ctx.globalAlpha = alpha;\n }\n },\n getRgba: function getRgba(color, op) {\n if (isNil(op)) {\n op = 1;\n }\n if (color[0] !== '#') {\n return color;\n }\n var r = void 0,\n g = void 0,\n b = void 0;\n if (color.length === 7) {\n r = parseInt(color.substring(1, 3), 16);\n g = parseInt(color.substring(3, 5), 16);\n b = parseInt(color.substring(5, 7), 16);\n } else {\n r = parseInt(color.substring(1, 2), 16) * 17;\n g = parseInt(color.substring(2, 3), 16) * 17;\n b = parseInt(color.substring(3, 4), 16) * 17;\n }\n return 'rgba(' + r + ',' + g + ',' + b + ',' + op + ')';\n },\n image: function image(ctx, img, x, y, width, height) {\n ctx.canvas._drawn = true;\n try {\n if (isNumber(width) && isNumber(height)) {\n ctx.drawImage(img, x, y, width, height);\n } else {\n ctx.drawImage(img, x, y);\n }\n } catch (error) {\n if (console) {\n console.warn('error when drawing image on canvas:', error);\n console.warn(img);\n }\n }\n },\n text: function text(ctx, _text, pt, style, textDesc) {\n Canvas._textOnMultiRow(ctx, textDesc['rows'], style, pt, textDesc['size'], textDesc['rawSize']);\n },\n _textOnMultiRow: function _textOnMultiRow(ctx, texts, style, point, splitTextSize, textSize) {\n var ptAlign = getAlignPoint(splitTextSize, style['textHorizontalAlignment'], style['textVerticalAlignment']),\n lineHeight = textSize['height'] + style['textLineSpacing'],\n basePoint = point.add(0, ptAlign.y),\n maxHeight = style['textMaxHeight'];\n var text = void 0,\n rowAlign = void 0,\n height = 0;\n for (var i = 0, len = texts.length; i < len; i++) {\n text = texts[i]['text'];\n rowAlign = getAlignPoint(texts[i]['size'], style['textHorizontalAlignment'], style['textVerticalAlignment']);\n Canvas._textOnLine(ctx, text, basePoint.add(rowAlign.x, i * lineHeight), style['textHaloRadius'], style['textHaloFill'], style['textHaloOpacity']);\n if (maxHeight > 0) {\n height += lineHeight;\n if (height + textSize['height'] >= maxHeight) {\n break;\n }\n }\n }\n },\n _textOnLine: function _textOnLine(ctx, text, pt, textHaloRadius, textHaloFill, textHaloAlpha) {\n if (hitTesting) {\n textHaloAlpha = 1;\n }\n var drawHalo = textHaloAlpha !== 0 && textHaloRadius !== 0;\n\n ctx.textBaseline = 'top';\n var gco = void 0,\n fill = void 0;\n var shadowBlur = ctx.shadowBlur,\n shadowOffsetX = ctx.shadowOffsetX,\n shadowOffsetY = ctx.shadowOffsetY;\n if (drawHalo) {\n var alpha = ctx.globalAlpha;\n\n ctx.globalAlpha *= textHaloAlpha;\n\n ctx.miterLimit = 2;\n ctx.lineJoin = 'round';\n ctx.lineCap = 'round';\n ctx.lineWidth = textHaloRadius * 2;\n ctx.strokeStyle = textHaloFill;\n ctx.strokeText(text, Math.round(pt.x), Math.round(pt.y));\n ctx.miterLimit = 10;\n\n ctx.globalAlpha = alpha;\n\n gco = ctx.globalCompositeOperation;\n ctx.globalCompositeOperation = 'destination-out';\n fill = ctx.fillStyle;\n ctx.fillStyle = '#000';\n }\n\n if (shadowBlur && drawHalo) {\n ctx.shadowBlur = ctx.shadowOffsetX = ctx.shadowOffsetY = 0;\n }\n Canvas.fillText(ctx, text, pt);\n if (gco) {\n ctx.globalCompositeOperation = gco;\n Canvas.fillText(ctx, text, pt, fill);\n if (shadowBlur) {\n ctx.shadowBlur = shadowBlur;\n ctx.shadowOffsetX = shadowOffsetX;\n ctx.shadowOffsetY = shadowOffsetY;\n }\n }\n },\n fillText: function fillText(ctx, text, point, rgba) {\n ctx.canvas._drawn = true;\n if (rgba) {\n ctx.fillStyle = rgba;\n }\n ctx.fillText(text, Math.round(point.x), Math.round(point.y));\n },\n _stroke: function _stroke(ctx, strokeOpacity, x, y) {\n if (hitTesting) {\n strokeOpacity = 1;\n }\n ctx.canvas._drawn = true;\n if (strokeOpacity === 0) {\n return;\n }\n var offset = ctx.strokeStyle && ctx.strokeStyle['linePatternOffset'];\n var dx = offset ? offset[0] : 0,\n dy = offset ? offset[1] : 0;\n\n var isPattern = Canvas._isPattern(ctx.strokeStyle) && (!isNil(x) && !isNil(y) || !isNil(dx) && !isNil(dy));\n\n if (isNil(strokeOpacity)) {\n strokeOpacity = 1;\n }\n var alpha = void 0;\n if (strokeOpacity < 1) {\n alpha = ctx.globalAlpha;\n ctx.globalAlpha *= strokeOpacity;\n }\n if (isPattern) {\n x = x || 0;\n y = y || 0;\n\n ctx.translate(x + dx, y + dy);\n }\n ctx.stroke();\n if (isPattern) {\n ctx.translate(-x - dx, -y - dy);\n }\n if (strokeOpacity < 1) {\n ctx.globalAlpha = alpha;\n }\n },\n _path: function _path(ctx, points, lineDashArray, lineOpacity, ignoreStrokePattern) {\n if (!isArrayHasData(points)) {\n return;\n }\n\n function fillWithPattern(p1, p2) {\n var degree = computeDegree(p1.x, p1.y, p2.x, p2.y);\n ctx.save();\n ctx.translate(p1.x, p1.y - ctx.lineWidth / 2 / Math.cos(degree));\n ctx.rotate(degree);\n Canvas._stroke(ctx, lineOpacity);\n ctx.restore();\n }\n\n var isDashed = isArrayHasData(lineDashArray);\n var isPatternLine = ignoreStrokePattern === true ? false : Canvas._isPattern(ctx.strokeStyle);\n var point = void 0,\n prePoint = void 0,\n nextPoint = void 0;\n for (var i = 0, len = points.length; i < len; i++) {\n point = points[i];\n if (!isDashed || ctx.setLineDash) {\n ctx.lineTo(point.x, point.y);\n if (isPatternLine && i > 0) {\n prePoint = points[i - 1];\n fillWithPattern(prePoint, point);\n ctx.beginPath();\n ctx.moveTo(point.x, point.y);\n }\n } else if (isDashed) {\n if (i === len - 1) {\n break;\n }\n nextPoint = points[i + 1];\n drawDashLine(ctx, point, nextPoint, lineDashArray, isPatternLine);\n }\n }\n },\n path: function path(ctx, points, lineOpacity, fillOpacity, lineDashArray) {\n if (!isArrayHasData(points)) {\n return;\n }\n ctx.beginPath();\n ctx.moveTo(points[0].x, points[0].y);\n Canvas._path(ctx, points, lineDashArray, lineOpacity);\n Canvas._stroke(ctx, lineOpacity);\n },\n polygon: function polygon(ctx, points, lineOpacity, fillOpacity, lineDashArray, smoothness) {\n if (!isArrayHasData(points)) {\n return;\n }\n function fillPolygon(points, i, op) {\n Canvas.fillCanvas(ctx, op, points[i][0].x, points[i][0].y);\n }\n var isPatternLine = Canvas._isPattern(ctx.strokeStyle),\n fillFirst = isArrayHasData(lineDashArray) && !ctx.setLineDash || isPatternLine && !smoothness;\n if (!isArrayHasData(points[0])) {\n points = [points];\n }\n var op = void 0,\n i = void 0,\n len = void 0;\n if (fillFirst) {\n ctx.save();\n for (i = 0, len = points.length; i < len; i++) {\n if (!isArrayHasData(points[i])) {\n continue;\n }\n Canvas._ring(ctx, points[i], null, 0, true);\n op = fillOpacity;\n if (i > 0) {\n ctx.globalCompositeOperation = 'destination-out';\n op = 1;\n }\n fillPolygon(points, i, op);\n if (i > 0) {\n ctx.globalCompositeOperation = 'source-over';\n } else if (len > 1) {\n ctx.fillStyle = '#fff';\n }\n Canvas._stroke(ctx, 0);\n }\n ctx.restore();\n }\n for (i = 0, len = points.length; i < len; i++) {\n if (!isArrayHasData(points[i])) {\n continue;\n }\n\n if (smoothness) {\n Canvas.paintSmoothLine(ctx, points[i], lineOpacity, smoothness, true);\n ctx.closePath();\n } else {\n Canvas._ring(ctx, points[i], lineDashArray, lineOpacity);\n }\n\n if (!fillFirst) {\n op = fillOpacity;\n if (i > 0) {\n ctx.globalCompositeOperation = 'destination-out';\n op = 1;\n }\n fillPolygon(points, i, op);\n if (i > 0) {\n ctx.globalCompositeOperation = 'source-over';\n } else if (len > 1) {\n ctx.fillStyle = '#fff';\n }\n }\n Canvas._stroke(ctx, lineOpacity);\n }\n },\n _ring: function _ring(ctx, ring, lineDashArray, lineOpacity, ignorePattern) {\n var isPattern = Canvas._isPattern(ctx.strokeStyle);\n if (!ignorePattern && isPattern && !ring[0].equals(ring[ring.length - 1])) {\n ring = ring.concat([ring[0]]);\n }\n ctx.beginPath();\n ctx.moveTo(ring[0].x, ring[0].y);\n Canvas._path(ctx, ring, lineDashArray, lineOpacity, ignorePattern);\n if (!isPattern) {\n ctx.closePath();\n }\n },\n paintSmoothLine: function paintSmoothLine(ctx, points, lineOpacity, smoothValue, close, tailIdx, tailRatio) {\n if (!points) {\n return;\n }\n if (points.length <= 2 || !smoothValue) {\n Canvas.path(ctx, points, lineOpacity);\n return;\n }\n\n function interpolate(t0, t1, x1, y1, bx1, by1, bx2, by2, x2, y2) {\n var u0 = 1.0 - t0;\n var u1 = 1.0 - t1;\n\n var qxa = x1 * u0 * u0 + bx1 * 2 * t0 * u0 + bx2 * t0 * t0;\n var qxb = x1 * u1 * u1 + bx1 * 2 * t1 * u1 + bx2 * t1 * t1;\n var qxc = bx1 * u0 * u0 + bx2 * 2 * t0 * u0 + x2 * t0 * t0;\n var qxd = bx1 * u1 * u1 + bx2 * 2 * t1 * u1 + x2 * t1 * t1;\n\n var qya = y1 * u0 * u0 + by1 * 2 * t0 * u0 + by2 * t0 * t0;\n var qyb = y1 * u1 * u1 + by1 * 2 * t1 * u1 + by2 * t1 * t1;\n var qyc = by1 * u0 * u0 + by2 * 2 * t0 * u0 + y2 * t0 * t0;\n var qyd = by1 * u1 * u1 + by2 * 2 * t1 * u1 + y2 * t1 * t1;\n\n var xb = qxa * u1 + qxc * t1;\n var xc = qxb * u0 + qxd * t0;\n var xd = qxb * u1 + qxd * t1;\n\n var yb = qya * u1 + qyc * t1;\n var yc = qyb * u0 + qyd * t0;\n var yd = qyb * u1 + qyd * t1;\n\n return [xb, yb, xc, yc, xd, yd];\n }\n\n function getCubicControlPoints(x0, y0, x1, y1, x2, y2, x3, y3, smoothValue, t) {\n var xc1 = (x0 + x1) / 2.0,\n yc1 = (y0 + y1) / 2.0;\n var xc2 = (x1 + x2) / 2.0,\n yc2 = (y1 + y2) / 2.0;\n var xc3 = (x2 + x3) / 2.0,\n yc3 = (y2 + y3) / 2.0;\n\n var len1 = Math.sqrt((x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0));\n var len2 = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n var len3 = Math.sqrt((x3 - x2) * (x3 - x2) + (y3 - y2) * (y3 - y2));\n\n var k1 = len1 / (len1 + len2);\n var k2 = len2 / (len2 + len3);\n\n var xm1 = xc1 + (xc2 - xc1) * k1,\n ym1 = yc1 + (yc2 - yc1) * k1;\n\n var xm2 = xc2 + (xc3 - xc2) * k2,\n ym2 = yc2 + (yc3 - yc2) * k2;\n\n var ctrl1X = xm1 + (xc2 - xm1) * smoothValue + x1 - xm1,\n ctrl1Y = ym1 + (yc2 - ym1) * smoothValue + y1 - ym1,\n ctrl2X = xm2 + (xc2 - xm2) * smoothValue + x2 - xm2,\n ctrl2Y = ym2 + (yc2 - ym2) * smoothValue + y2 - ym2;\n\n var ctrlPoints = [ctrl1X, ctrl1Y, ctrl2X, ctrl2Y];\n if (t < 1) {\n return interpolate(0, t, x1, y1, ctrl1X, ctrl1Y, ctrl2X, ctrl2Y, x2, y2);\n } else {\n return ctrlPoints;\n }\n }\n var count = points.length;\n var l = close ? count : count - 1;\n\n ctx.beginPath();\n ctx.moveTo(points[0].x, points[0].y);\n if (tailRatio !== undefined) l -= Math.max(l - tailIdx - 1, 0);\n var preCtrlPoints = void 0;\n for (var i = 0; i < l; i++) {\n var x1 = points[i].x,\n y1 = points[i].y;\n\n var x0 = void 0,\n y0 = void 0,\n x2 = void 0,\n y2 = void 0,\n x3 = void 0,\n y3 = void 0;\n if (i - 1 < 0) {\n if (!close) {\n x0 = points[i + 1].x;\n y0 = points[i + 1].y;\n } else {\n x0 = points[l - 1].x;\n y0 = points[l - 1].y;\n }\n } else {\n x0 = points[i - 1].x;\n y0 = points[i - 1].y;\n }\n if (i + 1 < count) {\n x2 = points[i + 1].x;\n y2 = points[i + 1].y;\n } else {\n x2 = points[i + 1 - count].x;\n y2 = points[i + 1 - count].y;\n }\n if (i + 2 < count) {\n x3 = points[i + 2].x;\n y3 = points[i + 2].y;\n } else if (!close) {\n x3 = points[i].x;\n y3 = points[i].y;\n } else {\n x3 = points[i + 2 - count].x;\n y3 = points[i + 2 - count].y;\n }\n\n var ctrlPoints = getCubicControlPoints(x0, y0, x1, y1, x2, y2, x3, y3, smoothValue, i === l - 1 ? tailRatio : 1);\n if (i === l - 1 && tailRatio >= 0 && tailRatio < 1) {\n ctx.bezierCurveTo(ctrlPoints[0], ctrlPoints[1], ctrlPoints[2], ctrlPoints[3], ctrlPoints[4], ctrlPoints[5]);\n points.splice(l - 1, count - (l - 1) - 1);\n var lastPoint = new Point(ctrlPoints[4], ctrlPoints[5]);\n lastPoint.prevCtrlPoint = new Point(ctrlPoints[2], ctrlPoints[3]);\n points.push(lastPoint);\n count = points.length;\n } else {\n ctx.bezierCurveTo(ctrlPoints[0], ctrlPoints[1], ctrlPoints[2], ctrlPoints[3], x2, y2);\n }\n points[i].nextCtrlPoint = ctrlPoints.slice(0, 2);\n points[i].prevCtrlPoint = preCtrlPoints ? preCtrlPoints.slice(2) : null;\n preCtrlPoints = ctrlPoints;\n }\n if (!close && points[1].prevCtrlPoint) {\n points[0].nextCtrlPoint = points[1].prevCtrlPoint;\n delete points[0].prevCtrlPoint;\n }\n if (!points[count - 1].prevCtrlPoint) {\n points[count - 1].prevCtrlPoint = points[count - 2].nextCtrlPoint;\n }\n Canvas._stroke(ctx, lineOpacity);\n },\n _arcBetween: function _arcBetween(ctx, p1, p2, degree) {\n var a = degree,\n dist = p1.distanceTo(p2),\n r = dist / 2 / Math.sin(a / 2);\n\n var p1p2 = Math.asin((p2.y - p1.y) / dist);\n if (p1.x > p2.x) {\n p1p2 = Math.PI - p1p2;\n }\n\n var cp2 = 90 * Math.PI / 180 - a / 2,\n da = p1p2 - cp2;\n\n var dx = Math.cos(da) * r,\n dy = Math.sin(da) * r,\n cx = p1.x + dx,\n cy = p1.y + dy;\n\n var startAngle = Math.asin((p2.y - cy) / r);\n if (cx > p2.x) {\n startAngle = Math.PI - startAngle;\n }\n var endAngle = startAngle + a;\n\n ctx.beginPath();\n ctx.arc(cx, cy, r, startAngle, endAngle);\n return [cx, cy];\n },\n _lineTo: function _lineTo(ctx, p) {\n ctx.lineTo(p.x, p.y);\n },\n bezierCurveAndFill: function bezierCurveAndFill(ctx, points, lineOpacity, fillOpacity) {\n ctx.beginPath();\n var start = points[0];\n ctx.moveTo(start.x, start.y);\n var args = [ctx];\n args.push.apply(args, points.splice(1));\n Canvas._bezierCurveTo.apply(Canvas, args);\n Canvas.fillCanvas(ctx, fillOpacity);\n Canvas._stroke(ctx, lineOpacity);\n },\n _bezierCurveTo: function _bezierCurveTo(ctx, p1, p2, p3) {\n ctx.bezierCurveTo(p1.x, p1.y, p2.x, p2.y, p3.x, p3.y);\n },\n ellipse: function ellipse(ctx, pt, width, height, lineOpacity, fillOpacity) {\n function bezierEllipse(x, y, a, b) {\n var k = 0.5522848,\n ox = a * k,\n oy = b * k;\n ctx.moveTo(x - a, y);\n ctx.bezierCurveTo(x - a, y - oy, x - ox, y - b, x, y - b);\n ctx.bezierCurveTo(x + ox, y - b, x + a, y - oy, x + a, y);\n ctx.bezierCurveTo(x + a, y + oy, x + ox, y + b, x, y + b);\n ctx.bezierCurveTo(x - ox, y + b, x - a, y + oy, x - a, y);\n ctx.closePath();\n }\n ctx.beginPath();\n if (width === height) {\n ctx.arc(pt.x, pt.y, width, 0, 2 * Math.PI);\n } else if (ctx.ellipse) {\n ctx.ellipse(pt.x, pt.y, width, height, 0, 0, Math.PI / 180 * 360);\n } else {\n bezierEllipse(pt.x, pt.y, width, height);\n }\n Canvas.fillCanvas(ctx, fillOpacity, pt.x - width, pt.y - height);\n Canvas._stroke(ctx, lineOpacity, pt.x - width, pt.y - height);\n },\n rectangle: function rectangle(ctx, pt, size, lineOpacity, fillOpacity) {\n ctx.beginPath();\n ctx.rect(pt.x, pt.y, size['width'], size['height']);\n Canvas.fillCanvas(ctx, fillOpacity, pt.x, pt.y);\n Canvas._stroke(ctx, lineOpacity, pt.x, pt.y);\n },\n sector: function sector(ctx, pt, size, angles, lineOpacity, fillOpacity) {\n var rad = Math.PI / 180;\n var startAngle = angles[0],\n endAngle = angles[1];\n\n function sector(ctx, x, y, radius, startAngle, endAngle) {\n var sDeg = rad * -endAngle;\n var eDeg = rad * -startAngle;\n ctx.beginPath();\n ctx.moveTo(x, y);\n ctx.arc(x, y, radius, sDeg, eDeg);\n ctx.lineTo(x, y);\n Canvas.fillCanvas(ctx, fillOpacity, x - radius, y - radius);\n Canvas._stroke(ctx, lineOpacity, x - radius, y - radius);\n }\n sector(ctx, pt.x, pt.y, size, startAngle, endAngle);\n },\n _isPattern: function _isPattern(style) {\n return !isString(style) && !('addColorStop' in style);\n },\n drawCross: function drawCross(ctx, p, lineWidth, color) {\n ctx.canvas._drawn = true;\n ctx.strokeStyle = color;\n ctx.lineWidth = lineWidth;\n ctx.beginPath();\n ctx.moveTo(p.x - 5, p.y);\n ctx.lineTo(p.x + 5, p.y);\n ctx.moveTo(p.x, p.y - 5);\n ctx.lineTo(p.x, p.y + 5);\n ctx.stroke();\n },\n copy: function copy(canvas, c) {\n var target = c || createEl('canvas');\n target.width = canvas.width;\n target.height = canvas.height;\n target.getContext('2d').drawImage(canvas, 0, 0);\n return target;\n }\n};\n\nfunction drawDashLine(ctx, startPoint, endPoint, dashArray) {\n var fromX = startPoint.x,\n fromY = startPoint.y,\n toX = endPoint.x,\n toY = endPoint.y;\n var pattern = dashArray;\n var lt = function lt(a, b) {\n return a <= b;\n };\n var gt = function gt(a, b) {\n return a >= b;\n };\n var capmin = function capmin(a, b) {\n return Math.min(a, b);\n };\n var capmax = function capmax(a, b) {\n return Math.max(a, b);\n };\n\n var checkX = {\n thereYet: gt,\n cap: capmin\n };\n var checkY = {\n thereYet: gt,\n cap: capmin\n };\n\n if (fromY - toY > 0) {\n checkY.thereYet = lt;\n checkY.cap = capmax;\n }\n if (fromX - toX > 0) {\n checkX.thereYet = lt;\n checkX.cap = capmax;\n }\n\n ctx.moveTo(fromX, fromY);\n var offsetX = fromX;\n var offsetY = fromY;\n var idx = 0,\n dash = true;\n var ang = void 0,\n len = void 0;\n while (!(checkX.thereYet(offsetX, toX) && checkY.thereYet(offsetY, toY))) {\n ang = Math.atan2(toY - fromY, toX - fromX);\n len = pattern[idx];\n\n offsetX = checkX.cap(toX, offsetX + Math.cos(ang) * len);\n offsetY = checkY.cap(toY, offsetY + Math.sin(ang) * len);\n\n if (dash) {\n ctx.lineTo(offsetX, offsetY);\n } else {\n ctx.moveTo(offsetX, offsetY);\n }\n\n idx = (idx + 1) % pattern.length;\n dash = !dash;\n }\n}\n\nvar prefix = 'data:image/';\nfunction isImageUrl(url) {\n return url.length > prefix.length && url.substring(0, prefix.length) === prefix || isCssUrl(url);\n}\n\nfunction extractImageUrl(url) {\n if (url.substring(0, prefix.length) === prefix) {\n return url;\n }\n return extractCssUrl(url);\n}\n\nvar Eventable = function Eventable(Base) {\n return function (_Base) {\n inherits(_class, _Base);\n\n function _class() {\n classCallCheck(this, _class);\n return possibleConstructorReturn(this, _Base.apply(this, arguments));\n }\n\n _class.prototype.on = function on$$1(eventsOn, handler, context) {\n if (!eventsOn) {\n return this;\n }\n if (!isString(eventsOn)) {\n return this._switch('on', eventsOn, handler);\n }\n if (!handler) {\n return this;\n }\n if (!this._eventMap) {\n this._eventMap = {};\n }\n var eventTypes = eventsOn.toLowerCase().split(' ');\n var evtType = void 0;\n if (!context) {\n context = this;\n }\n var handlerChain = void 0;\n for (var ii = 0, ll = eventTypes.length; ii < ll; ii++) {\n evtType = eventTypes[ii];\n handlerChain = this._eventMap[evtType];\n if (!handlerChain) {\n handlerChain = [];\n this._eventMap[evtType] = handlerChain;\n }\n var l = handlerChain.length;\n if (l > 0) {\n for (var i = 0; i < l; i++) {\n if (handler === handlerChain[i].handler && handlerChain[i].context === context) {\n return this;\n }\n }\n }\n handlerChain.push({\n handler: handler,\n context: context\n });\n }\n return this;\n };\n\n _class.prototype.addEventListener = function addEventListener() {\n return this.on.apply(this, arguments);\n };\n\n _class.prototype.once = function once(eventTypes, handler, context) {\n if (!isString(eventTypes)) {\n var once = {};\n for (var p in eventTypes) {\n if (eventTypes.hasOwnProperty(p)) {\n once[p] = this._wrapOnceHandler(p, eventTypes[p], context);\n }\n }\n return this._switch('on', once);\n }\n var evetTypes = eventTypes.split(' ');\n for (var i = 0, l = evetTypes.length; i < l; i++) {\n this.on(evetTypes[i], this._wrapOnceHandler(evetTypes[i], handler, context));\n }\n return this;\n };\n\n _class.prototype.off = function off$$1(eventsOff, handler, context) {\n if (!this._eventMap || !eventsOff) {\n return this;\n }\n if (!isString(eventsOff)) {\n return this._switch('off', eventsOff, handler);\n }\n if (!handler) {\n return this;\n }\n var eventTypes = eventsOff.split(' ');\n var eventType = void 0,\n listeners = void 0,\n wrapKey = void 0;\n if (!context) {\n context = this;\n }\n for (var j = 0, jl = eventTypes.length; j < jl; j++) {\n eventType = eventTypes[j].toLowerCase();\n wrapKey = 'Z__' + eventType;\n listeners = this._eventMap[eventType];\n if (!listeners) {\n return this;\n }\n for (var i = listeners.length - 1; i >= 0; i--) {\n var listener = listeners[i];\n if ((handler === listener.handler || handler === listener.handler[wrapKey]) && listener.context === context) {\n delete listener.handler[wrapKey];\n listeners.splice(i, 1);\n }\n }\n }\n return this;\n };\n\n _class.prototype.removeEventListener = function removeEventListener() {\n return this.off.apply(this, arguments);\n };\n\n _class.prototype.listens = function listens(eventType, handler, context) {\n if (!this._eventMap || !isString(eventType)) {\n return 0;\n }\n var handlerChain = this._eventMap[eventType.toLowerCase()];\n if (!handlerChain || !handlerChain.length) {\n return 0;\n }\n var count = 0;\n for (var i = 0, len = handlerChain.length; i < len; i++) {\n if (handler) {\n if (handler === handlerChain[i].handler && (isNil(context) || handlerChain[i].context === context)) {\n return 1;\n }\n } else {\n count++;\n }\n }\n return count;\n };\n\n _class.prototype.copyEventListeners = function copyEventListeners(target) {\n var eventMap = target._eventMap;\n if (!eventMap) {\n return this;\n }\n var handlerChain = void 0;\n for (var eventType in eventMap) {\n handlerChain = eventMap[eventType];\n for (var i = 0, len = handlerChain.length; i < len; i++) {\n this.on(eventType, handlerChain[i].handler, handlerChain[i].context);\n }\n }\n return this;\n };\n\n _class.prototype.fire = function fire() {\n if (this._eventParent) {\n return this._eventParent.fire.apply(this._eventParent, arguments);\n }\n return this._fire.apply(this, arguments);\n };\n\n _class.prototype._wrapOnceHandler = function _wrapOnceHandler(evtType, handler, context) {\n var me = this;\n var key = 'Z__' + evtType;\n var called = false;\n var fn = function onceHandler() {\n if (called) {\n return;\n }\n delete fn[key];\n called = true;\n if (context) {\n handler.apply(context, arguments);\n } else {\n handler.apply(this, arguments);\n }\n me.off(evtType, onceHandler, this);\n };\n fn[key] = handler;\n return fn;\n };\n\n _class.prototype._switch = function _switch(to, eventKeys, context) {\n for (var p in eventKeys) {\n if (eventKeys.hasOwnProperty(p)) {\n this[to](p, eventKeys[p], context);\n }\n }\n return this;\n };\n\n _class.prototype._clearListeners = function _clearListeners(eventType) {\n if (!this._eventMap || !isString(eventType)) {\n return;\n }\n var handlerChain = this._eventMap[eventType.toLowerCase()];\n if (!handlerChain) {\n return;\n }\n this._eventMap[eventType] = null;\n };\n\n _class.prototype._clearAllListeners = function _clearAllListeners() {\n this._eventMap = null;\n };\n\n _class.prototype._setEventParent = function _setEventParent(parent) {\n this._eventParent = parent;\n return this;\n };\n\n _class.prototype._fire = function _fire(eventType, param) {\n if (!this._eventMap) {\n return this;\n }\n var handlerChain = this._eventMap[eventType.toLowerCase()];\n if (!handlerChain) {\n return this;\n }\n if (!param) {\n param = {};\n }\n param['type'] = eventType;\n param['target'] = this;\n\n var queue = handlerChain.slice(0);\n var context = void 0,\n bubble = void 0,\n passed = void 0;\n for (var i = 0, len = queue.length; i < len; i++) {\n if (!queue[i]) {\n continue;\n }\n context = queue[i].context;\n bubble = true;\n passed = extend({}, param);\n if (context) {\n bubble = queue[i].handler.call(context, passed);\n } else {\n bubble = queue[i].handler(passed);\n }\n\n if (bubble === false) {\n if (param['domEvent']) {\n stopPropagation(param['domEvent']);\n }\n }\n }\n return this;\n };\n\n return _class;\n }(Base);\n};\n\nvar Handler = function () {\n function Handler(target) {\n classCallCheck(this, Handler);\n\n this.target = target;\n }\n\n Handler.prototype.enable = function enable() {\n if (this._enabled) {\n return this;\n }\n this._enabled = true;\n this.addHooks();\n return this;\n };\n\n Handler.prototype.disable = function disable() {\n if (!this._enabled) {\n return this;\n }\n this._enabled = false;\n this.removeHooks();\n return this;\n };\n\n Handler.prototype.enabled = function enabled() {\n return !!this._enabled;\n };\n\n Handler.prototype.remove = function remove() {\n this.disable();\n delete this.target;\n delete this.dom;\n };\n\n return Handler;\n}();\n\nvar Handler$1 = Eventable(Handler);\n\nvar Class = function () {\n function Class(options) {\n classCallCheck(this, Class);\n\n if (!this || !this.setOptions) {\n throw new Error('Class instance is being created without \"new\" operator.');\n }\n this.setOptions(options);\n this.callInitHooks();\n }\n\n Class.prototype.callInitHooks = function callInitHooks() {\n var proto = Object.getPrototypeOf(this);\n this._visitInitHooks(proto);\n return this;\n };\n\n Class.prototype.setOptions = function setOptions(options) {\n if (!this.hasOwnProperty('options')) {\n this.options = this.options ? Object.create(this.options) : {};\n }\n if (!options) {\n return this;\n }\n for (var i in options) {\n this.options[i] = options[i];\n }\n return this;\n };\n\n Class.prototype.config = function config(conf) {\n if (!conf) {\n var config = {};\n for (var p in this.options) {\n if (this.options.hasOwnProperty(p)) {\n config[p] = this.options[p];\n }\n }\n return config;\n } else {\n if (arguments.length === 2) {\n var t = {};\n t[conf] = arguments[1];\n conf = t;\n }\n for (var i in conf) {\n this.options[i] = conf[i];\n\n if (this[i] && this[i] instanceof Handler$1) {\n if (conf[i]) {\n this[i].enable();\n } else {\n this[i].disable();\n }\n }\n }\n\n this.onConfig(conf);\n }\n return this;\n };\n\n Class.prototype.onConfig = function onConfig() {};\n\n Class.prototype._visitInitHooks = function _visitInitHooks(proto) {\n if (this._initHooksCalled) {\n return;\n }\n var parentProto = Object.getPrototypeOf(proto);\n if (parentProto._visitInitHooks) {\n parentProto._visitInitHooks.call(this, parentProto);\n }\n this._initHooksCalled = true;\n var hooks = proto._initHooks;\n if (hooks && hooks !== parentProto._initHooks) {\n for (var i = 0; i < hooks.length; i++) {\n hooks[i].call(this);\n }\n }\n };\n\n Class.addInitHook = function addInitHook(fn) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var init = typeof fn === 'function' ? fn : function () {\n this[fn].apply(this, args);\n };\n var proto = this.prototype;\n var parentProto = Object.getPrototypeOf(proto);\n if (!proto._initHooks || proto._initHooks === parentProto._initHooks) {\n proto._initHooks = [];\n }\n proto._initHooks.push(init);\n return this;\n };\n\n Class.include = function include() {\n for (var _len2 = arguments.length, sources = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n sources[_key2] = arguments[_key2];\n }\n\n for (var i = 0; i < sources.length; i++) {\n extend(this.prototype, sources[i]);\n }\n return this;\n };\n\n Class.mergeOptions = function mergeOptions(options) {\n var proto = this.prototype;\n var parentProto = Object.getPrototypeOf(proto);\n if (!proto.options || proto.options === parentProto.options) {\n proto.options = proto.options ? Object.create(proto.options) : {};\n }\n extend(proto.options, options);\n return this;\n };\n\n return Class;\n}();\n\nvar registeredTypes = {};\n\nvar JSONAble = (function (Base) {\n return function (_Base) {\n inherits(_class, _Base);\n\n function _class() {\n classCallCheck(this, _class);\n return possibleConstructorReturn(this, _Base.apply(this, arguments));\n }\n\n _class.registerJSONType = function registerJSONType(type) {\n if (!type) {\n return this;\n }\n registeredTypes[type] = this;\n return this;\n };\n\n _class.getJSONClass = function getJSONClass(type) {\n if (!type) {\n return null;\n }\n return registeredTypes[type];\n };\n\n _class.prototype.getJSONType = function getJSONType() {\n if (this._jsonType === undefined) {\n var clazz = Object.getPrototypeOf(this).constructor;\n for (var p in registeredTypes) {\n if (registeredTypes[p] === clazz) {\n this._jsonType = p;\n break;\n }\n }\n }\n if (!this._jsonType) {\n throw new Error('Found an unregistered geometry class!');\n }\n return this._jsonType;\n };\n\n return _class;\n }(Base);\n});\n\nvar Handlerable = function (Base) {\n return function (_Base) {\n inherits(_class, _Base);\n\n function _class() {\n classCallCheck(this, _class);\n return possibleConstructorReturn(this, _Base.apply(this, arguments));\n }\n\n _class.prototype.addHandler = function addHandler(name, handlerClass) {\n if (!handlerClass) {\n return this;\n }\n if (!this._handlers) {\n this._handlers = [];\n }\n\n if (this[name]) {\n this[name].enable();\n return this;\n }\n\n var handler = this[name] = new handlerClass(this);\n\n this._handlers.push(handler);\n\n if (this.options[name]) {\n handler.enable();\n }\n return this;\n };\n\n _class.prototype.removeHandler = function removeHandler(name) {\n if (!name) {\n return this;\n }\n var handler = this[name];\n if (handler) {\n var hit = this._handlers.indexOf(handler);\n if (hit >= 0) {\n this._handlers.splice(hit, 1);\n }\n this[name].remove();\n delete this[name];\n }\n return this;\n };\n\n _class.prototype._clearHandlers = function _clearHandlers() {\n for (var i = 0, len = this._handlers.length; i < len; i++) {\n this._handlers[i].remove();\n }\n this._handlers = [];\n };\n\n return _class;\n }(Base);\n};\n\nvar START_EVENTS = 'touchstart mousedown';\nvar MOVE_EVENTS = {\n mousedown: 'mousemove',\n touchstart: 'touchmove',\n pointerdown: 'touchmove',\n MSPointerDown: 'touchmove'\n};\nvar END_EVENTS = {\n mousedown: 'mouseup',\n touchstart: 'touchend',\n pointerdown: 'touchend',\n MSPointerDown: 'touchend'\n};\n\nvar DragHandler = function (_Handler) {\n inherits(DragHandler, _Handler);\n\n function DragHandler(dom) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n classCallCheck(this, DragHandler);\n\n var _this = possibleConstructorReturn(this, _Handler.call(this, null));\n\n _this.dom = dom;\n _this.options = options;\n return _this;\n }\n\n DragHandler.prototype.enable = function enable() {\n if (!this.dom) {\n return this;\n }\n\n this._onMouseDown = function (e) {\n return this.onMouseDown(e);\n };\n on(this.dom, START_EVENTS, this._onMouseDown, this);\n return this;\n };\n\n DragHandler.prototype.disable = function disable() {\n if (!this.dom) {\n return this;\n }\n this._offEvents();\n off(this.dom, START_EVENTS, this._onMouseDown);\n delete this._onMouseDown;\n return this;\n };\n\n DragHandler.prototype.onMouseDown = function onMouseDown(event) {\n if (!this.options['rightclick'] && event.button === 2) {\n return;\n }\n if (event.touches && event.touches.length > 1) {\n return;\n }\n if (this.options['cancelOn'] && this.options['cancelOn'](event) === true) {\n return;\n }\n var dom = this.dom;\n if (dom.setCapture) {\n dom.setCapture();\n } else if (window.captureEvents) {\n window.captureEvents(window['Event'].MOUSEMOVE | window['Event'].MOUSEUP);\n }\n dom['ondragstart'] = function () {\n return false;\n };\n delete this.moved;\n var actual = event.touches ? event.touches[0] : event;\n this.startPos = new Point(actual.clientX, actual.clientY);\n on(document, MOVE_EVENTS[event.type], this.onMouseMove, this);\n on(document, END_EVENTS[event.type], this.onMouseUp, this);\n if (!this.options['ignoreMouseleave']) {\n on(this.dom, 'mouseleave', this.onMouseUp, this);\n }\n this.fire('mousedown', {\n 'domEvent': event,\n 'mousePos': new Point(actual.clientX, actual.clientY)\n });\n };\n\n DragHandler.prototype.onMouseMove = function onMouseMove(event) {\n if (event.touches && event.touches.length > 1) {\n if (this.moved) {\n this.interupted = true;\n this.onMouseUp(event);\n }\n return;\n }\n var actual = event.touches ? event.touches[0] : event;\n\n var newPos = new Point(actual.clientX, actual.clientY),\n offset = newPos.sub(this.startPos);\n if (!offset.x && !offset.y) {\n return;\n }\n if (!this.moved) {\n this.fire('dragstart', {\n 'domEvent': event,\n 'mousePos': this.startPos.copy()\n });\n this.moved = true;\n } else {\n this.fire('dragging', {\n 'domEvent': event,\n 'mousePos': new Point(actual.clientX, actual.clientY)\n });\n }\n };\n\n DragHandler.prototype.onMouseUp = function onMouseUp(event) {\n var actual = event.changedTouches ? event.changedTouches[0] : event;\n this._offEvents();\n var param = {\n 'domEvent': event\n };\n if (isNumber(actual.clientX)) {\n param['mousePos'] = new Point(parseInt(actual.clientX, 0), parseInt(actual.clientY, 0));\n }\n if (this.moved) {\n param.interupted = this.interupted;\n this.fire('dragend', param);\n delete this.interupted;\n delete this.moved;\n }\n\n this.fire('mouseup', param);\n };\n\n DragHandler.prototype._offEvents = function _offEvents() {\n var dom = this.dom;\n off(dom, 'mouseleave', this.onMouseUp, this);\n if (typeof document === 'undefined' || typeof window === 'undefined') {\n return;\n }\n for (var i in MOVE_EVENTS) {\n off(document, MOVE_EVENTS[i], this.onMouseMove, this);\n off(document, END_EVENTS[i], this.onMouseUp, this);\n }\n\n if (dom['releaseCapture']) {\n dom['releaseCapture']();\n } else if (window.captureEvents) {\n window.captureEvents(window['Event'].MOUSEMOVE | window['Event'].MOUSEUP);\n }\n };\n\n return DragHandler;\n}(Handler$1);\n\nvar Coordinate = function (_Position) {\n inherits(Coordinate, _Position);\n\n function Coordinate() {\n classCallCheck(this, Coordinate);\n return possibleConstructorReturn(this, _Position.apply(this, arguments));\n }\n\n Coordinate.toNumberArrays = function toNumberArrays(coordinates) {\n if (!Array.isArray(coordinates)) {\n return [coordinates.x, coordinates.y];\n }\n return forEachCoord(coordinates, function (coord) {\n return [coord.x, coord.y];\n });\n };\n\n Coordinate.toCoordinates = function toCoordinates(coordinates) {\n if (isNumber(coordinates[0]) && isNumber(coordinates[1])) {\n return new Coordinate(coordinates);\n }\n var result = [];\n for (var i = 0, len = coordinates.length; i < len; i++) {\n var child = coordinates[i];\n if (Array.isArray(child)) {\n if (isNumber(child[0])) {\n result.push(new Coordinate(child));\n } else {\n result.push(Coordinate.toCoordinates(child));\n }\n } else {\n result.push(new Coordinate(child));\n }\n }\n return result;\n };\n\n return Coordinate;\n}(Position);\n\nvar CRS = function () {\n function CRS(type, properties) {\n classCallCheck(this, CRS);\n\n this.type = type;\n this.properties = properties;\n }\n\n CRS.createProj4 = function createProj4(proj) {\n return new CRS('proj4', {\n 'proj': proj\n });\n };\n\n CRS.fromProjectionCode = function fromProjectionCode(code) {\n if (!code) {\n return null;\n }\n code = code.toUpperCase().replace(':', '');\n return CRS[code] || null;\n };\n\n return CRS;\n}();\n\nCRS.WGS84 = CRS.createProj4('+proj=longlat +datum=WGS84 +no_defs');\n\nCRS.EPSG4326 = CRS.WGS84;\n\nCRS.EPSG3857 = CRS.createProj4('+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs');\n\nCRS.IDENTITY = CRS.createProj4('+proj=identity +no_defs');\n\nCRS.CGCS2000 = CRS.createProj4('+proj=longlat +datum=CGCS2000');\n\nCRS.EPSG4490 = CRS.CGCS2000;\n\nCRS.BD09LL = CRS.createProj4('+proj=longlat +datum=BD09');\n\nCRS.GCJ02 = CRS.createProj4('+proj=longlat +datum=GCJ02');\n\nvar Extent = function () {\n function Extent(p1, p2, p3, p4) {\n classCallCheck(this, Extent);\n\n this._clazz = Coordinate;\n var l = arguments.length;\n var proj = l > 0 ? arguments[l - 1] : null;\n if (proj && proj.unproject) {\n this.projection = arguments[l - 1];\n }\n this._dirty = true;\n this._initialize(p1, p2, p3, p4);\n }\n\n Extent.prototype._initialize = function _initialize(p1, p2, p3, p4) {\n this.xmin = null;\n\n this.xmax = null;\n\n this.ymin = null;\n\n this.ymax = null;\n if (isNil(p1)) {\n return;\n }\n var projection = this.projection;\n\n if (isNumber(p1) && isNumber(p2) && isNumber(p3) && isNumber(p4)) {\n if (projection) {\n this['xmin'] = p1;\n this['ymin'] = p2;\n this['xmax'] = p3;\n this['ymax'] = p4;\n } else {\n this['xmin'] = Math.min(p1, p3);\n this['ymin'] = Math.min(p2, p4);\n this['xmax'] = Math.max(p1, p3);\n this['ymax'] = Math.max(p2, p4);\n }\n return;\n } else if (Array.isArray(p1)) {\n if (projection) {\n this['xmin'] = p1[0];\n this['ymin'] = p1[1];\n this['xmax'] = p1[2];\n this['ymax'] = p1[3];\n } else {\n this['xmin'] = Math.min(p1[0], p1[2]);\n this['ymin'] = Math.min(p1[1], p1[3]);\n this['xmax'] = Math.max(p1[0], p1[2]);\n this['ymax'] = Math.max(p1[1], p1[3]);\n }\n } else if (isNumber(p1.x) && isNumber(p2.x) && isNumber(p1.y) && isNumber(p2.y)) {\n if (projection) {\n this['xmin'] = p1.x;\n this['ymin'] = p1.y;\n this['xmax'] = p2.x;\n this['ymax'] = p2.y;\n } else {\n if (p1.x > p2.x) {\n this['xmin'] = p2.x;\n this['xmax'] = p1.x;\n } else {\n this['xmin'] = p1.x;\n this['xmax'] = p2.x;\n }\n if (p1.y > p2.y) {\n this['ymin'] = p2.y;\n this['ymax'] = p1.y;\n } else {\n this['ymin'] = p1.y;\n this['ymax'] = p2.y;\n }\n }\n } else if (isNumber(p1['xmin']) && isNumber(p1['xmax']) && isNumber(p1['ymin']) && isNumber(p1['ymax'])) {\n this['xmin'] = p1['xmin'];\n this['ymin'] = p1['ymin'];\n this['xmax'] = p1['xmax'];\n this['ymax'] = p1['ymax'];\n }\n };\n\n Extent.prototype._add = function _add(p) {\n this._dirty = true;\n if (!isNil(p.x)) {\n this['xmin'] += p.x;\n this['ymin'] += p.y;\n this['xmax'] += p.x;\n this['ymax'] += p.y;\n } else if (!isNil(p.xmin)) {\n this['xmin'] += p.xmin;\n this['ymin'] += p.ymin;\n this['xmax'] += p.xmax;\n this['ymax'] += p.ymax;\n } else if (!isNil(p[0])) {\n this['xmin'] += p[0];\n this['ymin'] += p[1];\n this['xmax'] += p[0];\n this['ymax'] += p[1];\n }\n return this;\n };\n\n Extent.prototype.add = function add() {\n var e = new this.constructor(this['xmin'], this['ymin'], this['xmax'], this['ymax'], this.projection);\n return e._add.apply(e, arguments);\n };\n\n Extent.prototype._sub = function _sub(p) {\n this._dirty = true;\n if (!isNil(p.x)) {\n this['xmin'] -= p.x;\n this['ymin'] -= p.y;\n this['xmax'] -= p.x;\n this['ymax'] -= p.y;\n } else if (!isNil(p.xmin)) {\n this['xmin'] -= p.xmin;\n this['ymin'] -= p.ymin;\n this['xmax'] -= p.xmax;\n this['ymax'] -= p.ymax;\n } else if (!isNil(p[0])) {\n this['xmin'] -= p[0];\n this['ymin'] -= p[1];\n this['xmax'] -= p[0];\n this['ymax'] -= p[1];\n }\n return this;\n };\n\n Extent.prototype._substract = function _substract() {\n return this._sub.apply(this, arguments);\n };\n\n Extent.prototype.sub = function sub() {\n var e = new this.constructor(this['xmin'], this['ymin'], this['xmax'], this['ymax'], this.projection);\n return e._sub.apply(e, arguments);\n };\n\n Extent.prototype.substract = function substract() {\n return this.sub.apply(this, arguments);\n };\n\n Extent.prototype.round = function round() {\n return new this.constructor(Math.round(this['xmin']), Math.round(this['ymin']), Math.round(this['xmax']), Math.round(this['ymax']), this.projection);\n };\n\n Extent.prototype._round = function _round() {\n this._dirty = true;\n this['xmin'] = Math.round(this['xmin']);\n this['ymin'] = Math.round(this['ymin']);\n this['xmax'] = Math.round(this['xmax']);\n this['ymax'] = Math.round(this['ymax']);\n return this;\n };\n\n Extent.prototype.getMin = function getMin() {\n return new this._clazz(this['xmin'], this['ymin']);\n };\n\n Extent.prototype.getMax = function getMax() {\n return new this._clazz(this['xmax'], this['ymax']);\n };\n\n Extent.prototype.getCenter = function getCenter() {\n return new this._clazz((this['xmin'] + this['xmax']) / 2, (this['ymin'] + this['ymax']) / 2);\n };\n\n Extent.prototype.isValid = function isValid() {\n return isNumber(this['xmin']) && isNumber(this['ymin']) && isNumber(this['xmax']) && isNumber(this['ymax']);\n };\n\n Extent.prototype.equals = function equals(ext2) {\n return this['xmin'] === ext2['xmin'] && this['xmax'] === ext2['xmax'] && this['ymin'] === ext2['ymin'] && this['ymax'] === ext2['ymax'];\n };\n\n Extent.prototype.intersects = function intersects(ext2) {\n this._project(this);\n this._project(ext2);\n var rxmin = Math.max(this['pxmin'], ext2['pxmin']);\n var rymin = Math.max(this['pymin'], ext2['pymin']);\n var rxmax = Math.min(this['pxmax'], ext2['pxmax']);\n var rymax = Math.min(this['pymax'], ext2['pymax']);\n var intersects = !(rxmin > rxmax || rymin > rymax);\n return intersects;\n };\n\n Extent.prototype.within = function within(extent) {\n this._project(this);\n this._project(extent);\n return this.pxmin >= extent.pxmin && this.pxmax <= extent.pxmax && this.pymin >= extent.pymin && this.pymax <= extent.pymax;\n };\n\n Extent.prototype.contains = function contains(c) {\n if (!c) {\n return false;\n }\n this._project(this);\n var proj = this.projection;\n if (Array.isArray(c)) {\n c = new this._clazz(c);\n }\n if (proj) {\n c = proj.project(c);\n }\n return c.x >= this.pxmin && c.x <= this.pxmax && c.y >= this.pymin && c.y <= this.pymax;\n };\n\n Extent.prototype.getWidth = function getWidth() {\n return Math.abs(this['xmax'] - this['xmin']);\n };\n\n Extent.prototype.getHeight = function getHeight() {\n return Math.abs(this['ymax'] - this['ymin']);\n };\n\n Extent.prototype.getSize = function getSize() {\n return new Size(this.getWidth(), this.getHeight());\n };\n\n Extent.prototype.__combine = function __combine(extent) {\n if (!(extent instanceof this.constructor)) {\n extent = new this.constructor(extent, extent);\n }\n this._project(extent);\n this._project(this);\n var xmin = this['pxmin'];\n if (!isNumber(xmin)) {\n xmin = extent['pxmin'];\n } else if (isNumber(extent['pxmin'])) {\n if (xmin > extent['pxmin']) {\n xmin = extent['pxmin'];\n }\n }\n\n var xmax = this['pxmax'];\n if (!isNumber(xmax)) {\n xmax = extent['pxmax'];\n } else if (isNumber(extent['pxmax'])) {\n if (xmax < extent['pxmax']) {\n xmax = extent['pxmax'];\n }\n }\n\n var ymin = this['pymin'];\n if (!isNumber(ymin)) {\n ymin = extent['pymin'];\n } else if (isNumber(extent['pymin'])) {\n if (ymin > extent['pymin']) {\n ymin = extent['pymin'];\n }\n }\n\n var ymax = this['pymax'];\n if (!isNumber(ymax)) {\n ymax = extent['pymax'];\n } else if (isNumber(extent['pymax'])) {\n if (ymax < extent['pymax']) {\n ymax = extent['pymax'];\n }\n }\n var proj = this.projection;\n if (proj) {\n var min = proj.unproject(new this._clazz(xmin, ymin)),\n max = proj.unproject(new this._clazz(xmax, ymax));\n xmin = min.x;\n ymin = min.y;\n xmax = max.x;\n ymax = max.y;\n }\n return [xmin, ymin, xmax, ymax];\n };\n\n Extent.prototype._combine = function _combine(extent) {\n if (!extent) {\n return this;\n }\n var ext = this.__combine(extent);\n this['xmin'] = ext[0];\n this['ymin'] = ext[1];\n this['xmax'] = ext[2];\n this['ymax'] = ext[3];\n this._dirty = true;\n return this;\n };\n\n Extent.prototype.combine = function combine(extent) {\n if (!extent) {\n return this;\n }\n var ext = this.__combine(extent);\n return new this.constructor(ext[0], ext[1], ext[2], ext[3], this.projection);\n };\n\n Extent.prototype.intersection = function intersection(extent) {\n if (!this.intersects(extent)) {\n return null;\n }\n var min = new this._clazz(Math.max(this['pxmin'], extent['pxmin']), Math.max(this['pymin'], extent['pymin'])),\n max = new this._clazz(Math.min(this['pxmax'], extent['pxmax']), Math.min(this['pymax'], extent['pymax']));\n var proj = this.projection;\n if (proj) {\n min = proj.unproject(min);\n max = proj.unproject(max);\n }\n return new this.constructor(min, max, proj);\n };\n\n Extent.prototype.expand = function expand(distance) {\n var w = void 0,\n h = void 0;\n if (!isNumber(distance)) {\n w = distance['width'] || distance['x'] || distance[0] || 0;\n h = distance['height'] || distance['y'] || distance[1] || 0;\n } else {\n w = h = distance;\n }\n return new this.constructor(this['xmin'] - w, this['ymin'] - h, this['xmax'] + w, this['ymax'] + h, this.projection);\n };\n\n Extent.prototype._expand = function _expand(distance) {\n var w = void 0,\n h = void 0;\n if (!isNumber(distance)) {\n w = distance['width'] || distance['x'] || distance[0] || 0;\n h = distance['height'] || distance['y'] || distance[1] || 0;\n } else {\n w = h = distance;\n }\n this['xmin'] -= w;\n this['ymin'] -= h;\n this['xmax'] += w;\n this['ymax'] += h;\n this._dirty = true;\n return this;\n };\n\n Extent.prototype.toJSON = function toJSON() {\n return {\n 'xmin': this['xmin'],\n 'ymin': this['ymin'],\n 'xmax': this['xmax'],\n 'ymax': this['ymax']\n };\n };\n\n Extent.prototype.toArray = function toArray$$1() {\n var xmin = this['xmin'],\n ymin = this['ymin'],\n xmax = this['xmax'],\n ymax = this['ymax'];\n return [new this._clazz([xmin, ymax]), new this._clazz([xmax, ymax]), new this._clazz([xmax, ymin]), new this._clazz([xmin, ymin]), new this._clazz([xmin, ymax])];\n };\n\n Extent.prototype.toString = function toString() {\n return this.xmin + ',' + this.ymin + ',' + this.xmax + ',' + this.ymax;\n };\n\n Extent.prototype.copy = function copy() {\n return new this.constructor(this['xmin'], this['ymin'], this['xmax'], this['ymax'], this.projection);\n };\n\n Extent.prototype.convertTo = function convertTo(fn) {\n if (!this.isValid()) {\n return null;\n }\n var e = new this.constructor();\n var coord = new this._clazz(this.xmin, this.ymax);\n e._combine(fn(coord));\n coord.x = this.xmax;\n e._combine(fn(coord));\n coord.y = this.ymin;\n e._combine(fn(coord));\n coord.x = this.xmin;\n e._combine(fn(coord));\n return e;\n };\n\n Extent.prototype._project = function _project(ext) {\n if (!ext || !ext.isValid()) {\n return;\n }\n var proj = this.projection;\n if (proj) {\n if (ext._dirty) {\n var minmax = [ext.getMin(), ext.getMax()];\n minmax = proj.projectCoords(minmax);\n var min = minmax[0],\n max = minmax[1];\n ext.pxmin = Math.min(min.x, max.x);\n ext.pymin = Math.min(min.y, max.y);\n ext.pxmax = Math.max(min.x, max.x);\n ext.pymax = Math.max(min.y, max.y);\n }\n delete ext._dirty;\n } else {\n ext.pxmin = ext.xmin;\n ext.pxmax = ext.xmax;\n ext.pymin = ext.ymin;\n ext.pymax = ext.ymax;\n }\n };\n\n return Extent;\n}();\n\nvar PointExtent = function (_Extent) {\n inherits(PointExtent, _Extent);\n\n function PointExtent(p1, p2, p3, p4) {\n classCallCheck(this, PointExtent);\n\n var _this = possibleConstructorReturn(this, _Extent.call(this, p1, p2, p3, p4));\n\n _this._clazz = Point;\n return _this;\n }\n\n return PointExtent;\n}(Extent);\n\nvar Transformation = function () {\n function Transformation(matrix) {\n classCallCheck(this, Transformation);\n\n this.matrix = matrix;\n }\n\n Transformation.prototype.transform = function transform(coordinates, scale) {\n return new Point(this.matrix[0] * (coordinates.x - this.matrix[2]) / scale, this.matrix[1] * (coordinates.y - this.matrix[3]) / scale);\n };\n\n Transformation.prototype.untransform = function untransform(point, scale) {\n return new Coordinate(point.x * scale / this.matrix[0] + this.matrix[2], point.y * scale / this.matrix[1] + this.matrix[3]);\n };\n\n return Transformation;\n}();\n\nvar Common = {\n project: function project() {},\n unproject: function unproject() {},\n projectCoords: function projectCoords(coordinates) {\n var _this = this;\n\n if (!coordinates) {\n return [];\n }\n if (!Array.isArray(coordinates)) {\n return this.project(coordinates);\n }\n if (coordinates.length === 0) {\n return [];\n }\n if (!this.isSphere()) {\n return forEachCoord(coordinates, this.project, this);\n }\n if (Array.isArray(coordinates[0])) {\n return coordinates.map(function (coords) {\n return _this.projectCoords(coords);\n });\n } else {\n var circum = this.getCircum();\n var extent = this.getSphereExtent(),\n sx = extent.sx,\n sy = extent.sy;\n var wrapX = void 0,\n wrapY = void 0;\n var pre = coordinates[0],\n current = void 0,\n dx = void 0,\n dy = void 0,\n p = void 0;\n var prj = [this.project(pre)];\n for (var i = 1, l = coordinates.length; i < l; i++) {\n current = coordinates[i];\n dx = current.x - pre.x;\n dy = current.y - pre.y;\n p = this.project(current);\n if (Math.abs(dx) > 180) {\n if (wrapX === undefined) {\n wrapX = current.x < pre.x;\n }\n if (wrapX) {\n p._add(-circum.x * sign(dx) * sx, 0);\n current._add(-360 * sign(dx), 0);\n }\n }\n if (Math.abs(dy) > 90) {\n if (wrapY === undefined) {\n wrapY = current.y < pre.y;\n }\n if (wrapY) {\n p._add(0, -circum.y * sign(dy) * sy);\n current._add(0, -180 * sign(dy));\n }\n }\n pre = current;\n prj.push(p);\n }\n return prj;\n }\n },\n unprojectCoords: function unprojectCoords(projCoords) {\n if (!projCoords) {\n return [];\n }\n if (!Array.isArray(projCoords)) {\n return this.unproject(projCoords);\n }\n return forEachCoord(projCoords, this.unproject, this);\n },\n isSphere: function isSphere() {\n return !!this.sphere;\n },\n isOutSphere: function isOutSphere(pcoord) {\n if (!this.isSphere()) {\n return false;\n }\n var extent = this.getSphereExtent();\n return !extent.contains(pcoord);\n },\n wrapCoord: function wrapCoord(pcoord) {\n if (!this.isSphere()) {\n return pcoord;\n }\n var extent = this.getSphereExtent();\n var wrapped = new Coordinate(pcoord);\n if (!extent.contains(wrapped)) {\n wrapped.x = wrap(pcoord.x, extent.xmin, extent.xmax);\n wrapped.y = wrap(pcoord.y, extent.ymin, extent.ymax);\n }\n return wrapped;\n },\n getCircum: function getCircum() {\n if (!this.circum && this.isSphere()) {\n var extent = this.getSphereExtent();\n this.circum = {\n x: extent.getWidth(),\n y: extent.getHeight()\n };\n }\n return this.circum;\n },\n getSphereExtent: function getSphereExtent() {\n if (!this.extent && this.isSphere()) {\n var max = this.project(new Coordinate(180, 90)),\n min = this.project(new Coordinate(-180, -90));\n this.extent = new Extent(min, max, this);\n this.extent.sx = max.x > min.x ? 1 : -1;\n this.extent.sy = max.y > min.y ? 1 : -1;\n }\n return this.extent;\n }\n};\n\nvar Common$1 = {\n measureLength: function measureLength(c1, c2) {\n if (!Array.isArray(c1)) {\n return this.measureLenBetween(c1, c2);\n }\n var len = 0;\n for (var i = 0, l = c1.length; i < l - 1; i++) {\n len += this.measureLenBetween(c1[i], c1[i + 1]);\n }\n return len;\n }\n};\n\nvar Identity = extend({\n 'measure': 'IDENTITY',\n\n measureLenBetween: function measureLenBetween(c1, c2) {\n if (!c1 || !c2) {\n return 0;\n }\n try {\n return Math.sqrt(Math.pow(c1.x - c2.x, 2) + Math.pow(c1.y - c2.y, 2));\n } catch (err) {\n return 0;\n }\n },\n\n measureArea: function measureArea(coordinates) {\n if (!Array.isArray(coordinates)) {\n return 0;\n }\n var area = 0;\n for (var i = 0, len = coordinates.length; i < len; i++) {\n var c1 = coordinates[i];\n var c2 = null;\n if (i === len - 1) {\n c2 = coordinates[0];\n } else {\n c2 = coordinates[i + 1];\n }\n area += c1.x * c2.y - c1.y * c2.x;\n }\n return Math.abs(area / 2);\n },\n\n locate: function locate(c, xDist, yDist) {\n c = new Coordinate(c.x, c.y);\n return this._locate(c, xDist, yDist);\n },\n\n _locate: function _locate(c, xDist, yDist) {\n if (!c) {\n return null;\n }\n if (!xDist) {\n xDist = 0;\n }\n if (!yDist) {\n yDist = 0;\n }\n if (!xDist && !yDist) {\n return c;\n }\n c.x = c.x + xDist;\n c.y = c.y + yDist;\n return c;\n },\n\n rotate: function rotate(c, pivot, angle) {\n c = new Coordinate(c.x, c.y);\n return this._rotate(c, pivot, angle);\n },\n\n _rotate: function () {\n var tmp = new Point(0, 0);\n return function (c, pivot, angle) {\n tmp.x = c.x - pivot.x;\n tmp.y = c.y - pivot.y;\n tmp._rotate(angle * Math.PI / 180);\n return c._add(tmp.x, tmp.y);\n };\n }()\n}, Common$1);\n\nvar Sphere = function () {\n function Sphere(radius) {\n classCallCheck(this, Sphere);\n\n this.radius = radius;\n }\n\n Sphere.prototype.measureLenBetween = function measureLenBetween(c1, c2) {\n if (!c1 || !c2) {\n return 0;\n }\n var b = toRadian(c1.y);\n var d = toRadian(c2.y),\n e = b - d,\n f = toRadian(c1.x) - toRadian(c2.x);\n b = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(e / 2), 2) + Math.cos(b) * Math.cos(d) * Math.pow(Math.sin(f / 2), 2)));\n b *= this.radius;\n return Math.round(b * 1E5) / 1E5;\n };\n\n Sphere.prototype.measureArea = function measureArea(coordinates) {\n var a = toRadian(this.radius);\n var b = 0,\n c = coordinates,\n d = c.length;\n if (d < 3) {\n return 0;\n }\n var i = void 0;\n for (i = 0; i < d - 1; i++) {\n var e = c[i],\n f = c[i + 1];\n b += e.x * a * Math.cos(toRadian(e.y)) * f.y * a - f.x * a * Math.cos(toRadian(f.y)) * e.y * a;\n }\n d = c[i];\n c = c[0];\n b += d.x * a * Math.cos(toRadian(d.y)) * c.y * a - c.x * a * Math.cos(toRadian(c.y)) * d.y * a;\n return 0.5 * Math.abs(b);\n };\n\n Sphere.prototype.locate = function locate(c, xDist, yDist) {\n c = new Coordinate(c.x, c.y);\n return this._locate(c, xDist, yDist);\n };\n\n Sphere.prototype._locate = function _locate(c, xDist, yDist) {\n if (!c) {\n return null;\n }\n if (!xDist) {\n xDist = 0;\n }\n if (!yDist) {\n yDist = 0;\n }\n if (!xDist && !yDist) {\n return c;\n }\n var x = void 0,\n y = void 0;\n var ry = toRadian(c.y);\n if (yDist !== 0) {\n var dy = Math.abs(yDist);\n var sy = Math.sin(dy / (2 * this.radius)) * 2;\n ry = ry + sy * (yDist > 0 ? 1 : -1);\n y = wrap(ry * 180 / Math.PI, -90, 90);\n } else {\n y = c.y;\n }\n if (xDist !== 0) {\n var dx = Math.abs(xDist);\n var rx = toRadian(c.x);\n var sx = 2 * Math.sqrt(Math.pow(Math.sin(dx / (2 * this.radius)), 2) / Math.pow(Math.cos(ry), 2));\n rx = rx + sx * (xDist > 0 ? 1 : -1);\n x = wrap(rx * 180 / Math.PI, -180, 180);\n } else {\n x = c.x;\n }\n c.x = x;\n c.y = y;\n return c;\n };\n\n Sphere.prototype.rotate = function rotate(c, pivot, angle) {\n c = new Coordinate(c);\n return this._rotate(c, pivot, angle);\n };\n\n Sphere.prototype._rotate = function _rotate(c, pivot, angle) {\n var initialAngle = rhumbBearing(pivot, c);\n var finalAngle = initialAngle - angle;\n var distance = this.measureLenBetween(pivot, c);\n c.x = pivot.x;\n c.y = pivot.y;\n return calculateRhumbDestination(c, distance, finalAngle, this.radius);\n };\n\n return Sphere;\n}();\n\nfunction rhumbBearing(start, end) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n var bear360 = void 0;\n if (options.final) bear360 = calculateRhumbBearing(end, start);else bear360 = calculateRhumbBearing(start, end);\n\n var bear180 = bear360 > 180 ? -(360 - bear360) : bear360;\n\n return bear180;\n}\n\nfunction calculateRhumbBearing(from, to) {\n var phi1 = toRadian(from.y);\n var phi2 = toRadian(to.y);\n var deltaLambda = toRadian(to.x - from.x);\n\n if (deltaLambda > Math.PI) deltaLambda -= 2 * Math.PI;\n if (deltaLambda < -Math.PI) deltaLambda += 2 * Math.PI;\n\n var deltaPsi = Math.log(Math.tan(phi2 / 2 + Math.PI / 4) / Math.tan(phi1 / 2 + Math.PI / 4));\n\n var theta = Math.atan2(deltaLambda, deltaPsi);\n\n return (toDegree(theta) + 360) % 360;\n}\n\nfunction calculateRhumbDestination(origin, distance, bearing, radius) {\n\n var delta = distance / radius;\n var lambda1 = origin.x * Math.PI / 180;\n var phi1 = toRadian(origin.y);\n var theta = toRadian(bearing);\n\n var DeltaPhi = delta * Math.cos(theta);\n var phi2 = phi1 + DeltaPhi;\n\n if (Math.abs(phi2) > Math.PI / 2) phi2 = phi2 > 0 ? Math.PI - phi2 : -Math.PI - phi2;\n\n var DeltaPsi = Math.log(Math.tan(phi2 / 2 + Math.PI / 4) / Math.tan(phi1 / 2 + Math.PI / 4));\n var q = Math.abs(DeltaPsi) > 10e-12 ? DeltaPhi / DeltaPsi : Math.cos(phi1);\n var DeltaLambda = delta * Math.sin(theta) / q;\n var lambda2 = lambda1 + DeltaLambda;\n\n origin.x = (lambda2 * 180 / Math.PI + 540) % 360 - 180;\n origin.y = phi2 * 180 / Math.PI;\n return origin;\n}\n\nvar WGS84Sphere = extend({\n 'measure': 'EPSG:4326',\n sphere: new Sphere(6378137),\n measureLenBetween: function measureLenBetween() {\n return this.sphere.measureLenBetween.apply(this.sphere, arguments);\n },\n measureArea: function measureArea() {\n return this.sphere.measureArea.apply(this.sphere, arguments);\n },\n _locate: function _locate() {\n return this.sphere._locate.apply(this.sphere, arguments);\n },\n locate: function locate() {\n return this.sphere.locate.apply(this.sphere, arguments);\n },\n _rotate: function _rotate() {\n return this.sphere._rotate.apply(this.sphere, arguments);\n },\n rotate: function rotate() {\n return this.sphere.rotate.apply(this.sphere, arguments);\n }\n}, Common$1);\n\nvar BaiduSphere = extend({\n 'measure': 'BAIDU',\n sphere: new Sphere(6370996.81),\n measureLenBetween: function measureLenBetween() {\n return this.sphere.measureLenBetween.apply(this.sphere, arguments);\n },\n measureArea: function measureArea() {\n return this.sphere.measureArea.apply(this.sphere, arguments);\n },\n _locate: function _locate() {\n return this.sphere._locate.apply(this.sphere, arguments);\n },\n locate: function locate() {\n return this.sphere.locate.apply(this.sphere, arguments);\n },\n _rotate: function _rotate() {\n return this.sphere._rotate.apply(this.sphere, arguments);\n },\n rotate: function rotate() {\n return this.sphere.rotate.apply(this.sphere, arguments);\n }\n}, Common$1);\n\nvar DEFAULT$1 = WGS84Sphere;\n\nvar measurers = {};\n\nfunction registerMeasurer(m) {\n measurers[m.measure] = m;\n}\n\nregisterMeasurer(Identity);\nregisterMeasurer(WGS84Sphere);\nregisterMeasurer(BaiduSphere);\n\nvar Measurer = {\n getInstance: function getInstance(name) {\n if (!name) {\n return DEFAULT$1;\n }\n for (var p in measurers) {\n if (hasOwn(measurers, p)) {\n var mName = measurers[p]['measure'];\n if (!mName) {\n continue;\n }\n if (name.toLowerCase() === mName.toLowerCase()) {\n return measurers[p];\n }\n }\n }\n return null;\n }\n};\n\nvar index$2 = Object.freeze({\n\tIdentity: Identity,\n\tDEFAULT: DEFAULT$1,\n\tMeasurer: Measurer,\n\tWGS84Sphere: WGS84Sphere,\n\tBaiduSphere: BaiduSphere\n});\n\nvar EPSG3857 = extend({}, Common, {\n code: 'EPSG:3857',\n rad: Math.PI / 180,\n metersPerDegree: 6378137 * Math.PI / 180,\n maxLatitude: 85.0511287798,\n\n project: function project(lnglat) {\n var rad = this.rad,\n metersPerDegree = this.metersPerDegree,\n max = this.maxLatitude;\n var lng = lnglat.x,\n lat = Math.max(Math.min(max, lnglat.y), -max);\n var c = void 0;\n if (lat === 0) {\n c = 0;\n } else {\n c = Math.log(Math.tan((90 + lat) * rad / 2)) / rad;\n }\n return new Coordinate(lng * metersPerDegree, c * metersPerDegree);\n },\n\n unproject: function unproject(pLnglat) {\n var x = pLnglat.x,\n y = pLnglat.y;\n var rad = this.rad,\n metersPerDegree = this.metersPerDegree;\n var c = void 0;\n if (y === 0) {\n c = 0;\n } else {\n c = y / metersPerDegree;\n c = (2 * Math.atan(Math.exp(c * rad)) - Math.PI / 2) / rad;\n }\n return new Coordinate(wrap(x / metersPerDegree, -180, 180), wrap(c, -this.maxLatitude, this.maxLatitude));\n }\n}, WGS84Sphere);\n\nvar PROJ4326 = extend({}, Common, {\n code: 'EPSG:4326',\n project: function project(p) {\n return new Coordinate(p);\n },\n unproject: function unproject(p) {\n return new Coordinate(p);\n }\n}, WGS84Sphere);\n\nvar Projection_EPSG4490 = extend({}, PROJ4326, {\n code: 'EPSG:4490'\n});\n\nvar Projection_Baidu = extend({}, Common, {\n code: 'BAIDU',\n\n project: function project(p) {\n return this.convertLL2MC(p);\n },\n\n unproject: function unproject(p) {\n return this.convertMC2LL(p);\n }\n}, BaiduSphere, {\n EARTHRADIUS: 6370996.81,\n MCBAND: [12890594.86, 8362377.87, 5591021, 3481989.83, 1678043.12, 0],\n LLBAND: [75, 60, 45, 30, 15, 0],\n MC2LL: [[1.410526172116255e-8, 0.00000898305509648872, -1.9939833816331, 200.9824383106796, -187.2403703815547, 91.6087516669843, -23.38765649603339, 2.57121317296198, -0.03801003308653, 17337981.2], [-7.435856389565537e-9, 0.000008983055097726239, -0.78625201886289, 96.32687599759846, -1.85204757529826, -59.36935905485877, 47.40033549296737, -16.50741931063887, 2.28786674699375, 10260144.86], [-3.030883460898826e-8, 0.00000898305509983578, 0.30071316287616, 59.74293618442277, 7.357984074871, -25.38371002664745, 13.45380521110908, -3.29883767235584, 0.32710905363475, 6856817.37], [-1.981981304930552e-8, 0.000008983055099779535, 0.03278182852591, 40.31678527705744, 0.65659298677277, -4.44255534477492, 0.85341911805263, 0.12923347998204, -0.04625736007561, 4482777.06], [3.09191371068437e-9, 0.000008983055096812155, 0.00006995724062, 23.10934304144901, -0.00023663490511, -0.6321817810242, -0.00663494467273, 0.03430082397953, -0.00466043876332, 2555164.4], [2.890871144776878e-9, 0.000008983055095805407, -3.068298e-8, 7.47137025468032, -0.00000353937994, -0.02145144861037, -0.00001234426596, 0.00010322952773, -0.00000323890364, 826088.5]],\n LL2MC: [[-0.0015702102444, 111320.7020616939, 1704480524535203, -10338987376042340, 26112667856603880, -35149669176653700, 26595700718403920, -10725012454188240, 1800819912950474, 82.5], [0.0008277824516172526, 111320.7020463578, 647795574.6671607, -4082003173.641316, 10774905663.51142, -15171875531.51559, 12053065338.62167, -5124939663.577472, 913311935.9512032, 67.5], [0.00337398766765, 111320.7020202162, 4481351.045890365, -23393751.19931662, 79682215.47186455, -115964993.2797253, 97236711.15602145, -43661946.33752821, 8477230.501135234, 52.5], [0.00220636496208, 111320.7020209128, 51751.86112841131, 3796837.749470245, 992013.7397791013, -1221952.21711287, 1340652.697009075, -620943.6990984312, 144416.9293806241, 37.5], [-0.0003441963504368392, 111320.7020576856, 278.2353980772752, 2485758.690035394, 6070.750963243378, 54821.18345352118, 9540.606633304236, -2710.55326746645, 1405.483844121726, 22.5], [-0.0003218135878613132, 111320.7020701615, 0.00369383431289, 823725.6402795718, 0.46104986909093, 2351.343141331292, 1.58060784298199, 8.77738589078284, 0.37238884252424, 7.45]],\n\n convertMC2LL: function convertMC2LL(cB) {\n var cC = {\n x: Math.abs(cB.x),\n y: Math.abs(cB.y)\n };\n var cE = void 0;\n for (var cD = 0, len = this.MCBAND.length; cD < len; cD++) {\n if (cC.y >= this.MCBAND[cD]) {\n cE = this.MC2LL[cD];\n break;\n }\n }\n var T = this.convertor(cB, cE);\n var result = new Coordinate(T.x, T.y);\n return result;\n },\n convertLL2MC: function convertLL2MC(T) {\n var cD = void 0,\n cC = void 0,\n len = void 0;\n T.x = this.getLoop(T.x, -180, 180);\n T.y = this.getRange(T.y, -74, 74);\n var cB = new Coordinate(T.x, T.y);\n for (cC = 0, len = this.LLBAND.length; cC < len; cC++) {\n if (cB.y >= this.LLBAND[cC]) {\n cD = this.LL2MC[cC];\n break;\n }\n }\n if (!cD) {\n for (cC = this.LLBAND.length - 1; cC >= 0; cC--) {\n if (cB.y <= -this.LLBAND[cC]) {\n cD = this.LL2MC[cC];\n break;\n }\n }\n }\n var cE = this.convertor(T, cD);\n var result = new Coordinate(cE.x, cE.y);\n return result;\n },\n convertor: function convertor(cC, cD) {\n if (!cC || !cD) {\n return null;\n }\n var T = cD[0] + cD[1] * Math.abs(cC.x);\n var cB = Math.abs(cC.y) / cD[9];\n var cE = cD[2] + cD[3] * cB + cD[4] * cB * cB + cD[5] * cB * cB * cB + cD[6] * cB * cB * cB * cB + cD[7] * cB * cB * cB * cB * cB + cD[8] * cB * cB * cB * cB * cB * cB;\n T *= cC.x < 0 ? -1 : 1;\n cE *= cC.y < 0 ? -1 : 1;\n return new Coordinate(T, cE);\n },\n toRadians: function toRadians(T) {\n return Math.PI * T / 180;\n },\n toDegrees: function toDegrees(T) {\n return 180 * T / Math.PI;\n },\n getRange: function getRange(cC, cB, T) {\n if (cB != null) {\n cC = Math.max(cC, cB);\n }\n if (T != null) {\n cC = Math.min(cC, T);\n }\n return cC;\n },\n getLoop: function getLoop(cC, cB, T) {\n while (cC > T) {\n cC -= T - cB;\n }\n while (cC < cB) {\n cC += T - cB;\n }\n return cC;\n }\n});\n\nvar Projection_IDENTITY = extend({}, Common, {\n code: 'IDENTITY',\n project: function project(p) {\n return p.copy();\n },\n unproject: function unproject(p) {\n return p.copy();\n }\n}, Identity);\n\nvar DEFAULT = EPSG3857;\n\nvar projections = Object.freeze({\n\tEPSG3857: EPSG3857,\n\tDEFAULT: DEFAULT,\n\tEPSG4326: PROJ4326,\n\tEPSG4490: Projection_EPSG4490,\n\tBAIDU: Projection_Baidu,\n\tIDENTITY: Projection_IDENTITY,\n\tCommon: Common\n});\n\nvar Renderable = (function (Base) {\n return function (_Base) {\n inherits(_class, _Base);\n\n function _class() {\n classCallCheck(this, _class);\n return possibleConstructorReturn(this, _Base.apply(this, arguments));\n }\n\n _class.registerRenderer = function registerRenderer(name, clazz) {\n var proto = this.prototype;\n var parentProto = Object.getPrototypeOf(proto);\n if (!proto._rendererClasses || proto._rendererClasses === parentProto._rendererClasses) {\n proto._rendererClasses = proto._rendererClasses ? Object.create(proto._rendererClasses) : {};\n }\n proto._rendererClasses[name.toLowerCase()] = clazz;\n return this;\n };\n\n _class.getRendererClass = function getRendererClass(name) {\n var proto = this.prototype;\n if (!proto._rendererClasses) {\n return null;\n }\n return proto._rendererClasses[name.toLowerCase()];\n };\n\n return _class;\n }(Base);\n});\n\nvar commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\n\n\n\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar zousanMin = createCommonjsModule(function (module) {\n !function (t) {\n \"use strict\";\n function e(t) {\n if (t) {\n var e = this;t(function (t) {\n e.resolve(t);\n }, function (t) {\n e.reject(t);\n });\n }\n }function n(t, e) {\n if (\"function\" == typeof t.y) try {\n var n = t.y.call(i, e);t.p.resolve(n);\n } catch (o) {\n t.p.reject(o);\n } else t.p.resolve(e);\n }function o(t, e) {\n if (\"function\" == typeof t.n) try {\n var n = t.n.call(i, e);t.p.resolve(n);\n } catch (o) {\n t.p.reject(o);\n } else t.p.reject(e);\n }var r,\n i,\n c = \"fulfilled\",\n u = \"rejected\",\n s = \"undefined\",\n f = function () {\n function e() {\n for (; n.length - o;) {\n try {\n n[o]();\n } catch (e) {\n t.console && t.console.error(e);\n }n[o++] = i, o == r && (n.splice(0, r), o = 0);\n }\n }var n = [],\n o = 0,\n r = 1024,\n c = function () {\n if ((typeof MutationObserver === \"undefined\" ? \"undefined\" : _typeof(MutationObserver)) !== s) {\n var t = document.createElement(\"div\"),\n n = new MutationObserver(e);return n.observe(t, { attributes: !0 }), function () {\n t.setAttribute(\"a\", 0);\n };\n }return (typeof setImmediate === \"undefined\" ? \"undefined\" : _typeof(setImmediate)) !== s ? function () {\n setImmediate(e);\n } : function () {\n setTimeout(e, 0);\n };\n }();return function (t) {\n n.push(t), n.length - o == 1 && c();\n };\n }();e.prototype = { resolve: function resolve(t) {\n if (this.state === r) {\n if (t === this) return this.reject(new TypeError(\"Attempt to resolve promise with self\"));var e = this;if (t && (\"function\" == typeof t || \"object\" == (typeof t === \"undefined\" ? \"undefined\" : _typeof(t)))) try {\n var o = !0,\n i = t.then;if (\"function\" == typeof i) return void i.call(t, function (t) {\n o && (o = !1, e.resolve(t));\n }, function (t) {\n o && (o = !1, e.reject(t));\n });\n } catch (u) {\n return void (o && this.reject(u));\n }this.state = c, this.v = t, e.c && f(function () {\n for (var o = 0, r = e.c.length; r > o; o++) {\n n(e.c[o], t);\n }\n });\n }\n }, reject: function reject(n) {\n if (this.state === r) {\n this.state = u, this.v = n;var i = this.c;i ? f(function () {\n for (var t = 0, e = i.length; e > t; t++) {\n o(i[t], n);\n }\n }) : !e.suppressUncaughtRejectionError && t.console && t.console.log(\"You upset Zousan. Please catch rejections: \", n, n ? n.stack : null);\n }\n }, then: function then(t, i) {\n var u = new e(),\n s = { y: t, n: i, p: u };if (this.state === r) this.c ? this.c.push(s) : this.c = [s];else {\n var l = this.state,\n a = this.v;f(function () {\n l === c ? n(s, a) : o(s, a);\n });\n }return u;\n }, \"catch\": function _catch(t) {\n return this.then(null, t);\n }, \"finally\": function _finally(t) {\n return this.then(t, t);\n }, timeout: function timeout(t, n) {\n n = n || \"Timeout\";var o = this;return new e(function (e, r) {\n setTimeout(function () {\n r(Error(n));\n }, t), o.then(function (t) {\n e(t);\n }, function (t) {\n r(t);\n });\n });\n } }, e.resolve = function (t) {\n var n = new e();return n.resolve(t), n;\n }, e.reject = function (t) {\n var n = new e();return n.reject(t), n;\n }, e.all = function (t) {\n function n(n, c) {\n n && \"function\" == typeof n.then || (n = e.resolve(n)), n.then(function (e) {\n o[c] = e, r++, r == t.length && i.resolve(o);\n }, function (t) {\n i.reject(t);\n });\n }for (var o = [], r = 0, i = new e(), c = 0; c < t.length; c++) {\n n(t[c], c);\n }return t.length || i.resolve(o), i;\n }, 'object' != s && module.exports && (module.exports = e), t.define && t.define.amd && t.define([], function () {\n return e;\n }), t.Zousan = e, e.soon = f;\n }(\"undefined\" != typeof commonjsGlobal ? commonjsGlobal : commonjsGlobal);\n});\n\nvar promise = void 0;\n\nif (typeof Promise !== 'undefined') {\n promise = Promise;\n} else {\n promise = zousanMin;\n}\n\nvar Promise$1 = promise;\n\nvar CanvasRenderer = function (_Class) {\n inherits(CanvasRenderer, _Class);\n\n function CanvasRenderer(layer) {\n classCallCheck(this, CanvasRenderer);\n\n var _this = possibleConstructorReturn(this, _Class.call(this));\n\n _this.layer = layer;\n _this._painted = false;\n _this._drawTime = 0;\n _this.setToRedraw();\n return _this;\n }\n\n CanvasRenderer.prototype.render = function render(framestamp) {\n var _this2 = this;\n\n this.prepareRender();\n if (!this.getMap() || !this.layer.isVisible()) {\n return;\n }\n if (!this.resources) {\n this.resources = new ResourceCache();\n }\n if (this.checkResources) {\n var resources = this.checkResources();\n if (resources.length > 0) {\n this._loadingResource = true;\n this.loadResources(resources).then(function () {\n _this2._loadingResource = false;\n if (_this2.layer) {\n _this2.layer.fire('resourceload');\n _this2.setToRedraw();\n }\n });\n } else {\n this._tryToDraw(framestamp);\n }\n } else {\n this._tryToDraw(framestamp);\n }\n };\n\n CanvasRenderer.prototype.testIfNeedRedraw = function testIfNeedRedraw() {\n var map = this.getMap();\n if (this._loadingResource) {\n return false;\n }\n if (this._toRedraw) {\n return true;\n }\n if (map.isInteracting() && !this.drawOnInteracting) {\n return false;\n }\n if (this.needToRedraw()) {\n return true;\n }\n return false;\n };\n\n CanvasRenderer.prototype.needToRedraw = function needToRedraw() {\n var map = this.getMap();\n if (map.isInteracting()) {\n return !(!map.getPitch() && map.isMoving() && !map.isZooming() && !map.isRotating() && !this.layer.options['forceRenderOnMoving']);\n }\n return false;\n };\n\n CanvasRenderer.prototype.onSkipDrawOnInteracting = function onSkipDrawOnInteracting() {};\n\n CanvasRenderer.prototype.isRenderComplete = function isRenderComplete() {\n return !!this._renderComplete;\n };\n\n CanvasRenderer.prototype.mustRenderOnInteracting = function mustRenderOnInteracting() {\n return !this._painted || this.checkResources && this.checkResources().length > 0;\n };\n\n CanvasRenderer.prototype.setToRedraw = function setToRedraw() {\n this._toRedraw = true;\n return this;\n };\n\n CanvasRenderer.prototype.setCanvasUpdated = function setCanvasUpdated() {\n this._canvasUpdated = true;\n return this;\n };\n\n CanvasRenderer.prototype.isCanvasUpdated = function isCanvasUpdated() {\n return !!this._canvasUpdated;\n };\n\n CanvasRenderer.prototype.remove = function remove() {\n this.onRemove();\n delete this._loadingResource;\n delete this.southWest;\n delete this.canvas;\n delete this.context;\n delete this.canvasExtent2D;\n delete this._extent2D;\n delete this.resources;\n delete this.layer;\n };\n\n CanvasRenderer.prototype.onRemove = function onRemove() {};\n\n CanvasRenderer.prototype.onAdd = function onAdd() {};\n\n CanvasRenderer.prototype.getMap = function getMap() {\n if (!this.layer) {\n return null;\n }\n return this.layer.getMap();\n };\n\n CanvasRenderer.prototype.getCanvasImage = function getCanvasImage() {\n var map = this.getMap();\n this._canvasUpdated = false;\n if (this._renderZoom !== map.getZoom() || !this.canvas || !this._extent2D) {\n return null;\n }\n if (this.isBlank()) {\n return null;\n }\n if (this.layer.isEmpty && this.layer.isEmpty()) {\n return null;\n }\n\n var containerPoint = map._pointToContainerPoint(this.southWest)._add(0, -map.height);\n return {\n 'image': this.canvas,\n 'layer': this.layer,\n 'point': containerPoint };\n };\n\n CanvasRenderer.prototype.clear = function clear() {\n this.clearCanvas();\n };\n\n CanvasRenderer.prototype.isBlank = function isBlank() {\n if (!this._painted) {\n return true;\n }\n return false;\n };\n\n CanvasRenderer.prototype.show = function show() {\n this.setToRedraw();\n };\n\n CanvasRenderer.prototype.hide = function hide() {\n this.clear();\n this.setToRedraw();\n };\n\n CanvasRenderer.prototype.setZIndex = function setZIndex() {\n this.setToRedraw();\n };\n\n CanvasRenderer.prototype.hitDetect = function hitDetect(point) {\n if (!this.context || this.layer.isEmpty && this.layer.isEmpty() || this.isBlank() || this._errorThrown) {\n return false;\n }\n var map = this.getMap();\n var r = Browser$1.retina ? 2 : 1;\n var size = map.getSize();\n if (point.x < 0 || point.x > size['width'] * r || point.y < 0 || point.y > size['height'] * r) {\n return false;\n }\n try {\n var imgData = this.context.getImageData(r * point.x, r * point.y, 1, 1).data;\n if (imgData[3] > 0) {\n return true;\n }\n } catch (error) {\n if (!this._errorThrown) {\n if (console) {\n console.warn('hit detect failed with tainted canvas, some geometries have external resources in another domain:\\n', error);\n }\n this._errorThrown = true;\n }\n\n return false;\n }\n return false;\n };\n\n CanvasRenderer.prototype.loadResources = function loadResources(resourceUrls) {\n if (!this.resources) {\n this.resources = new ResourceCache();\n }\n var resources = this.resources,\n promises = [];\n if (isArrayHasData(resourceUrls)) {\n var cache = {};\n for (var i = resourceUrls.length - 1; i >= 0; i--) {\n var url = resourceUrls[i];\n if (!url || !url.length || cache[url.join('-')]) {\n continue;\n }\n cache[url.join('-')] = 1;\n if (!resources.isResourceLoaded(url, true)) {\n promises.push(new Promise$1(this._promiseResource(url)));\n }\n }\n }\n return Promise$1.all(promises);\n };\n\n CanvasRenderer.prototype.prepareRender = function prepareRender() {\n delete this._renderComplete;\n var map = this.getMap();\n this._renderZoom = map.getZoom();\n this.canvasExtent2D = this._extent2D = map._get2DExtent();\n\n this.southWest = map._containerPointToPoint(new Point(0, map.height));\n };\n\n CanvasRenderer.prototype.createCanvas = function createCanvas() {\n if (this.canvas) {\n return;\n }\n var map = this.getMap();\n var size = map.getSize();\n var r = Browser$1.retina ? 2 : 1,\n w = r * size.width,\n h = r * size.height;\n if (this.layer._canvas) {\n var canvas = this.layer._canvas;\n canvas.width = w;\n canvas.height = h;\n if (canvas.style) {\n canvas.style.width = size.width + 'px';\n canvas.style.height = size.height + 'px';\n }\n this.canvas = this.layer._canvas;\n } else {\n this.canvas = Canvas.createCanvas(w, h, map.CanvasClass);\n }\n\n this.onCanvasCreate();\n };\n\n CanvasRenderer.prototype.onCanvasCreate = function onCanvasCreate() {};\n\n CanvasRenderer.prototype.createContext = function createContext() {\n if (this.gl && this.gl.canvas === this.canvas || this.context) {\n return;\n }\n this.context = this.canvas.getContext('2d');\n if (this.layer.options['globalCompositeOperation']) {\n this.context.globalCompositeOperation = this.layer.options['globalCompositeOperation'];\n }\n if (Browser$1.retina) {\n var r = 2;\n this.context.scale(r, r);\n }\n };\n\n CanvasRenderer.prototype.resetCanvasTransform = function resetCanvasTransform() {\n if (!this.context) {\n return;\n }\n var r = Browser$1.retina ? 2 : 1;\n this.context.setTransform(r, 0, 0, r, 0, 0);\n };\n\n CanvasRenderer.prototype.resizeCanvas = function resizeCanvas(canvasSize) {\n var canvas = this.canvas;\n if (!canvas) {\n return;\n }\n var size = canvasSize || this.getMap().getSize();\n var r = Browser$1.retina ? 2 : 1;\n if (canvas.width === r * size.width && canvas.height === r * size.height) {\n return;\n }\n\n canvas.height = r * size.height;\n canvas.width = r * size.width;\n if (Browser$1.retina && this.context) {\n this.context.scale(r, r);\n }\n if (this.layer._canvas && canvas.style) {\n canvas.style.width = size.width + 'px';\n canvas.style.height = size.height + 'px';\n }\n };\n\n CanvasRenderer.prototype.clearCanvas = function clearCanvas() {\n if (!this.context) {\n return;\n }\n Canvas.clearRect(this.context, 0, 0, this.canvas.width, this.canvas.height);\n };\n\n CanvasRenderer.prototype.prepareCanvas = function prepareCanvas() {\n if (!this.canvas) {\n this.createCanvas();\n this.createContext();\n\n this.layer.fire('canvascreate', {\n 'context': this.context,\n 'gl': this.gl\n });\n } else {\n this.clearCanvas();\n this.resizeCanvas();\n this.resetCanvasTransform();\n }\n delete this._maskExtent;\n var mask = this.layer.getMask();\n\n if (!mask) {\n this.layer.fire('renderstart', {\n 'context': this.context,\n 'gl': this.gl\n });\n return null;\n }\n var maskExtent2D = this._maskExtent = mask._getPainter().get2DExtent();\n if (!maskExtent2D.intersects(this._extent2D)) {\n this.layer.fire('renderstart', {\n 'context': this.context,\n 'gl': this.gl\n });\n return maskExtent2D;\n }\n\n this.layer.fire('renderstart', {\n 'context': this.context,\n 'gl': this.gl\n });\n return maskExtent2D;\n };\n\n CanvasRenderer.prototype.clipCanvas = function clipCanvas(context) {\n var mask = this.layer.getMask();\n if (!mask) {\n return false;\n }\n var old = this.southWest;\n var map = this.getMap();\n\n this.southWest = map._containerPointToPoint(new Point(0, map.height));\n context.save();\n if (Browser$1.retina) {\n context.save();\n context.scale(2, 2);\n }\n mask._getPainter().paint(null, context);\n if (Browser$1.retina) {\n context.restore();\n }\n context.clip();\n this.southWest = old;\n return true;\n };\n\n CanvasRenderer.prototype.getViewExtent = function getViewExtent() {\n return {\n 'extent': this._extent2D,\n 'maskExtent': this._maskExtent,\n 'zoom': this._renderZoom,\n 'southWest': this.southWest\n };\n };\n\n CanvasRenderer.prototype.completeRender = function completeRender() {\n if (this.getMap()) {\n this._renderComplete = true;\n\n this.layer.fire('renderend', {\n 'context': this.context,\n 'gl': this.gl\n });\n this.setCanvasUpdated();\n }\n };\n\n CanvasRenderer.prototype.getEvents = function getEvents() {\n return {\n '_zoomstart': this.onZoomStart,\n '_zooming': this.onZooming,\n '_zoomend': this.onZoomEnd,\n '_resize': this.onResize,\n '_movestart': this.onMoveStart,\n '_moving': this.onMoving,\n '_moveend': this.onMoveEnd,\n '_dragrotatestart': this.onDragRotateStart,\n '_dragrotating': this.onDragRotating,\n '_dragrotateend': this.onDragRotateEnd,\n '_spatialreferencechange': this.onSpatialReferenceChange\n };\n };\n\n CanvasRenderer.prototype.onZoomStart = function onZoomStart() {};\n\n CanvasRenderer.prototype.onZoomEnd = function onZoomEnd() {\n this.setToRedraw();\n };\n\n CanvasRenderer.prototype.onZooming = function onZooming() {};\n\n CanvasRenderer.prototype.onMoveStart = function onMoveStart() {};\n\n CanvasRenderer.prototype.onMoving = function onMoving() {};\n\n CanvasRenderer.prototype.onMoveEnd = function onMoveEnd() {\n this.setToRedraw();\n };\n\n CanvasRenderer.prototype.onResize = function onResize() {\n delete this._extent2D;\n this.resizeCanvas();\n this.setToRedraw();\n };\n\n CanvasRenderer.prototype.onDragRotateStart = function onDragRotateStart() {};\n\n CanvasRenderer.prototype.onDragRotating = function onDragRotating() {};\n\n CanvasRenderer.prototype.onDragRotateEnd = function onDragRotateEnd() {\n this.setToRedraw();\n };\n\n CanvasRenderer.prototype.onSpatialReferenceChange = function onSpatialReferenceChange() {};\n\n CanvasRenderer.prototype.getDrawTime = function getDrawTime() {\n return this._drawTime;\n };\n\n CanvasRenderer.prototype._tryToDraw = function _tryToDraw(framestamp) {\n this._toRedraw = false;\n if (!this.canvas && this.layer.isEmpty && this.layer.isEmpty()) {\n this._renderComplete = true;\n\n return;\n }\n this._drawAndRecord(framestamp);\n };\n\n CanvasRenderer.prototype._drawAndRecord = function _drawAndRecord(framestamp) {\n if (!this.getMap()) {\n return;\n }\n var painted = this._painted;\n this._painted = true;\n var t = now();\n this.draw(framestamp);\n t = now() - t;\n\n this._drawTime = painted ? t : t / 2;\n if (painted && this.layer.options['logDrawTime']) {\n console.log(this.layer.getId(), 'frameTimeStamp:', framestamp, 'drawTime:', this._drawTime);\n }\n };\n\n CanvasRenderer.prototype._promiseResource = function _promiseResource(url) {\n var me = this,\n resources = this.resources,\n crossOrigin = this.layer.options['crossOrigin'];\n return function (resolve) {\n if (resources.isResourceLoaded(url, true)) {\n resolve(url);\n return;\n }\n var img = new Image();\n if (!isNil(crossOrigin)) {\n img['crossOrigin'] = crossOrigin;\n }\n if (isSVG(url[0]) && !IS_NODE) {\n if (url[1]) {\n url[1] *= 2;\n }\n if (url[2]) {\n url[2] *= 2;\n }\n }\n img.onload = function () {\n me._cacheResource(url, img);\n resolve(url);\n };\n img.onabort = function (err) {\n if (console) {\n console.warn('image loading aborted: ' + url[0]);\n }\n if (err) {\n if (console) {\n console.warn(err);\n }\n }\n resolve(url);\n };\n img.onerror = function (err) {\n if (err && typeof console !== 'undefined') {\n console.warn(err);\n }\n resources.markErrorResource(url);\n resolve(url);\n };\n loadImage(img, url);\n };\n };\n\n CanvasRenderer.prototype._cacheResource = function _cacheResource(url, img) {\n if (!this.layer || !this.resources) {\n return;\n }\n var w = url[1],\n h = url[2];\n if (this.layer.options['cacheSvgOnCanvas'] && isSVG(url[0]) === 1 && (Browser$1.edge || Browser$1.ie)) {\n if (isNil(w)) {\n w = img.width || this.layer.options['defaultIconSize'][0];\n }\n if (isNil(h)) {\n h = img.height || this.layer.options['defaultIconSize'][1];\n }\n var canvas = Canvas.createCanvas(w, h);\n Canvas.image(canvas.getContext('2d'), img, 0, 0, w, h);\n img = canvas;\n }\n this.resources.addResource(url, img);\n };\n\n return CanvasRenderer;\n}(Class);\n\nvar ResourceCache = function () {\n function ResourceCache() {\n classCallCheck(this, ResourceCache);\n\n this.resources = {};\n this._errors = {};\n }\n\n ResourceCache.prototype.addResource = function addResource(url, img) {\n this.resources[url[0]] = {\n image: img,\n width: +url[1],\n height: +url[2]\n };\n };\n\n ResourceCache.prototype.isResourceLoaded = function isResourceLoaded(url, checkSVG) {\n if (!url) {\n return false;\n }\n var imgUrl = this._getImgUrl(url);\n if (this._errors[imgUrl]) {\n return true;\n }\n var img = this.resources[imgUrl];\n if (!img) {\n return false;\n }\n if (checkSVG && isSVG(url[0]) && (+url[1] > img.width || +url[2] > img.height)) {\n return false;\n }\n return true;\n };\n\n ResourceCache.prototype.getImage = function getImage(url) {\n var imgUrl = this._getImgUrl(url);\n if (!this.isResourceLoaded(url) || this._errors[imgUrl]) {\n return null;\n }\n return this.resources[imgUrl].image;\n };\n\n ResourceCache.prototype.markErrorResource = function markErrorResource(url) {\n this._errors[this._getImgUrl(url)] = 1;\n };\n\n ResourceCache.prototype.merge = function merge(res) {\n if (!res) {\n return this;\n }\n for (var p in res.resources) {\n var img = res.resources[p];\n this.addResource([p, img.width, img.height], img.image);\n }\n return this;\n };\n\n ResourceCache.prototype.forEach = function forEach(fn) {\n if (!this.resources) {\n return this;\n }\n for (var p in this.resources) {\n if (hasOwn(this.resources, p)) {\n fn(p, this.resources[p]);\n }\n }\n return this;\n };\n\n ResourceCache.prototype._getImgUrl = function _getImgUrl(url) {\n if (!Array.isArray(url)) {\n return url;\n }\n return url[0];\n };\n\n return ResourceCache;\n}();\n\nvar options$1 = {\n 'attribution': null,\n 'minZoom': null,\n 'maxZoom': null,\n 'visible': true,\n 'opacity': 1,\n\n 'globalCompositeOperation': null,\n 'renderer': 'canvas',\n 'debugOutline': '#0f0',\n 'cssFilter': null,\n 'forceRenderOnMoving': false,\n 'forceRenderOnZooming': false,\n 'forceRenderOnRotating': false\n};\n\nvar Layer = function (_JSONAble) {\n inherits(Layer, _JSONAble);\n\n function Layer(id, options) {\n classCallCheck(this, Layer);\n\n var canvas = void 0;\n if (options) {\n canvas = options.canvas;\n delete options.canvas;\n }\n\n var _this = possibleConstructorReturn(this, _JSONAble.call(this, options));\n\n if (canvas) {\n _this._canvas = canvas;\n }\n _this.setId(id);\n if (options) {\n _this.setZIndex(options.zIndex);\n }\n return _this;\n }\n\n Layer.prototype.load = function load() {\n if (!this.getMap()) {\n return this;\n }\n if (this.onLoad()) {\n this._initRenderer();\n var zIndex = this.getZIndex();\n if (!isNil(zIndex)) {\n this._renderer.setZIndex(zIndex);\n if (!this.isCanvasRender()) {\n this._renderer.render();\n }\n }\n this.onLoadEnd();\n }\n return this;\n };\n\n Layer.prototype.getId = function getId() {\n return this._id;\n };\n\n Layer.prototype.setId = function setId(id) {\n var old = this._id;\n if (!isNil(id)) {\n id = id + '';\n }\n this._id = id;\n\n this.fire('idchange', {\n 'old': old,\n 'new': id\n });\n return this;\n };\n\n Layer.prototype.addTo = function addTo(map) {\n map.addLayer(this);\n return this;\n };\n\n Layer.prototype.setZIndex = function setZIndex(zIndex) {\n this._zIndex = zIndex;\n if (this.map) {\n this.map._sortLayersByZIndex();\n }\n if (this._renderer) {\n this._renderer.setZIndex(zIndex);\n }\n return this;\n };\n\n Layer.prototype.getZIndex = function getZIndex() {\n return this._zIndex || 0;\n };\n\n Layer.prototype.getMinZoom = function getMinZoom() {\n var map = this.getMap();\n var minZoom = this.options['minZoom'];\n return map ? Math.max(map.getMinZoom(), minZoom || 0) : minZoom;\n };\n\n Layer.prototype.getMaxZoom = function getMaxZoom() {\n var map = this.getMap();\n var maxZoom = this.options['maxZoom'];\n return map ? Math.min(map.getMaxZoom(), isNil(maxZoom) ? Infinity : maxZoom) : maxZoom;\n };\n\n Layer.prototype.getOpacity = function getOpacity() {\n return this.options['opacity'];\n };\n\n Layer.prototype.setOpacity = function setOpacity(op) {\n this.config('opacity', op);\n return this;\n };\n\n Layer.prototype.isCanvasRender = function isCanvasRender() {\n var renderer = this._getRenderer();\n return renderer && renderer instanceof CanvasRenderer;\n };\n\n Layer.prototype.getMap = function getMap() {\n if (this.map) {\n return this.map;\n }\n return null;\n };\n\n Layer.prototype.getProjection = function getProjection() {\n var map = this.getMap();\n return map ? map.getProjection() : null;\n };\n\n Layer.prototype.bringToFront = function bringToFront() {\n var layers = this._getLayerList();\n if (!layers.length) {\n return this;\n }\n var topLayer = layers[layers.length - 1];\n if (layers.length === 1 || topLayer === this) {\n return this;\n }\n var max = topLayer.getZIndex();\n this.setZIndex(max + 1);\n return this;\n };\n\n Layer.prototype.bringToBack = function bringToBack() {\n var layers = this._getLayerList();\n if (!layers.length) {\n return this;\n }\n var bottomLayer = layers[0];\n if (layers.length === 1 || bottomLayer === this) {\n return this;\n }\n var min = bottomLayer.getZIndex();\n this.setZIndex(min - 1);\n return this;\n };\n\n Layer.prototype.show = function show() {\n var _this2 = this;\n\n if (!this.options['visible']) {\n this.options['visible'] = true;\n var renderer = this.getRenderer();\n if (renderer) {\n renderer.show();\n }\n\n var map = this.getMap();\n if (renderer && map) {\n map.once('renderend', function () {\n _this2.fire('show');\n });\n } else {\n this.fire('show');\n }\n }\n return this;\n };\n\n Layer.prototype.hide = function hide() {\n var _this3 = this;\n\n if (this.options['visible']) {\n this.options['visible'] = false;\n var renderer = this.getRenderer();\n if (renderer) {\n renderer.hide();\n }\n\n var map = this.getMap();\n if (renderer && map) {\n map.once('renderend', function () {\n _this3.fire('hide');\n });\n } else {\n this.fire('hide');\n }\n }\n\n return this;\n };\n\n Layer.prototype.isVisible = function isVisible() {\n if (isNumber(this.options['opacity']) && this.options['opacity'] <= 0) {\n return false;\n }\n var map = this.getMap();\n if (map) {\n var zoom = map.getZoom();\n if (!isNil(this.options['maxZoom']) && this.options['maxZoom'] < zoom || !isNil(this.options['minZoom']) && this.options['minZoom'] > zoom) {\n return false;\n }\n }\n\n if (isNil(this.options['visible'])) {\n this.options['visible'] = true;\n }\n return this.options['visible'];\n };\n\n Layer.prototype.remove = function remove() {\n if (this.map) {\n this.map.removeLayer(this);\n }\n return this;\n };\n\n Layer.prototype.getMask = function getMask() {\n return this._mask;\n };\n\n Layer.prototype.setMask = function setMask(mask) {\n if (!(mask.type === 'Point' && mask._isVectorMarker() || mask.type === 'Polygon')) {\n throw new Error('Mask for a layer must be a marker with vector marker symbol or a Polygon.');\n }\n\n if (mask.type === 'Point') {\n mask.updateSymbol({\n 'markerLineColor': 'rgba(0, 0, 0, 0)',\n 'markerFillOpacity': 0\n });\n } else {\n mask.setSymbol({\n 'lineColor': 'rgba(0, 0, 0, 0)',\n 'polygonOpacity': 0\n });\n }\n mask._bindLayer(this);\n this._mask = mask;\n if (!this.getMap() || this.getMap().isZooming()) {\n return this;\n }\n var renderer = this._getRenderer();\n if (renderer && renderer.setToRedraw) {\n this._getRenderer().setToRedraw();\n }\n return this;\n };\n\n Layer.prototype.removeMask = function removeMask() {\n delete this._mask;\n if (!this.getMap() || this.getMap().isZooming()) {\n return this;\n }\n var renderer = this._getRenderer();\n if (renderer && renderer.setToRedraw) {\n this._getRenderer().setToRedraw();\n }\n return this;\n };\n\n Layer.prototype.onLoad = function onLoad() {\n return true;\n };\n\n Layer.prototype.onLoadEnd = function onLoadEnd() {};\n\n Layer.prototype.isLoaded = function isLoaded() {\n return !!this._loaded;\n };\n\n Layer.prototype.getRenderer = function getRenderer() {\n return this._getRenderer();\n };\n\n Layer.prototype.onConfig = function onConfig(conf) {\n if (isNumber(conf['opacity']) || conf['cssFilter']) {\n var renderer = this.getRenderer();\n if (renderer) {\n renderer.setToRedraw();\n }\n }\n };\n\n Layer.prototype.onAdd = function onAdd() {};\n\n Layer.prototype.onRemove = function onRemove() {};\n\n Layer.prototype._bindMap = function _bindMap(map, zIndex) {\n if (!map) {\n return;\n }\n this.map = map;\n if (!isNil(zIndex)) {\n this.setZIndex(zIndex);\n }\n this._switchEvents('on', this);\n\n this.onAdd();\n\n this.fire('add');\n };\n\n Layer.prototype._initRenderer = function _initRenderer() {\n var renderer = this.options['renderer'];\n if (!this.constructor.getRendererClass) {\n return;\n }\n var clazz = this.constructor.getRendererClass(renderer);\n if (!clazz) {\n throw new Error('Invalid renderer for Layer(' + this.getId() + '):' + renderer);\n }\n this._renderer = new clazz(this);\n this._renderer.layer = this;\n this._renderer.setZIndex(this.getZIndex());\n this._switchEvents('on', this._renderer);\n\n if (this._renderer.onAdd) {\n this._renderer.onAdd();\n }\n\n this.fire('renderercreate', {\n 'renderer': this._renderer\n });\n };\n\n Layer.prototype._doRemove = function _doRemove() {\n this._loaded = false;\n this.onRemove();\n\n this._switchEvents('off', this);\n if (this._renderer) {\n this._switchEvents('off', this._renderer);\n this._renderer.remove();\n delete this._renderer;\n }\n delete this._mask;\n delete this.map;\n };\n\n Layer.prototype._switchEvents = function _switchEvents(to, emitter) {\n if (emitter && emitter.getEvents) {\n this.getMap()[to](emitter.getEvents(), emitter);\n }\n };\n\n Layer.prototype._getRenderer = function _getRenderer() {\n return this._renderer;\n };\n\n Layer.prototype._getLayerList = function _getLayerList() {\n if (!this.map) {\n return [];\n }\n return this.map._layers;\n };\n\n Layer.prototype._getMask2DExtent = function _getMask2DExtent() {\n if (!this._mask || !this.getMap()) {\n return null;\n }\n var painter = this._mask._getPainter();\n if (!painter) {\n return null;\n }\n return painter.get2DExtent();\n };\n\n return Layer;\n}(JSONAble(Eventable(Renderable(Class))));\n\nLayer.mergeOptions(options$1);\n\nvar fire = Layer.prototype.fire;\n\nLayer.prototype.fire = function (eventType, param) {\n if (eventType === 'layerload') {\n this._loaded = true;\n }\n if (this.map) {\n if (!param) {\n param = {};\n }\n param['type'] = eventType;\n param['target'] = this;\n this.map._onLayerEvent(param);\n }\n return fire.apply(this, arguments);\n};\n\nvar DefaultSpatialRef = {\n 'EPSG:3857': {\n 'resolutions': function () {\n var resolutions = [];\n var d = 2 * 6378137 * Math.PI;\n for (var i = 0; i < 21; i++) {\n resolutions[i] = d / (256 * Math.pow(2, i));\n }\n return resolutions;\n }(),\n 'fullExtent': {\n 'top': 6378137 * Math.PI,\n 'left': -6378137 * Math.PI,\n 'bottom': -6378137 * Math.PI,\n 'right': 6378137 * Math.PI\n }\n },\n 'EPSG:4326': {\n 'fullExtent': {\n 'top': 90,\n 'left': -180,\n 'bottom': -90,\n 'right': 180\n },\n 'resolutions': function () {\n var resolutions = [];\n for (var i = 0; i < 20; i++) {\n resolutions[i] = 180 / (Math.pow(2, i) * 128);\n }\n return resolutions;\n }()\n },\n 'BAIDU': {\n 'resolutions': function () {\n var res = Math.pow(2, 18);\n var resolutions = [];\n for (var i = 0; i < 20; i++) {\n resolutions[i] = res;\n res *= 0.5;\n }\n resolutions[0] = null;\n resolutions[1] = null;\n resolutions[2] = null;\n return resolutions;\n }(),\n 'fullExtent': {\n 'top': 33554432,\n 'left': -33554432,\n 'bottom': -33554432,\n 'right': 33554432\n }\n },\n 'IDENTITY': {\n 'resolutions': function () {\n var res = Math.pow(2, 8);\n var resolutions = [];\n for (var i = 0; i < 18; i++) {\n resolutions[i] = res;\n res *= 0.5;\n }\n return resolutions;\n }(),\n 'fullExtent': {\n 'top': 200000,\n 'left': -200000,\n 'bottom': -200000,\n 'right': 200000\n }\n }\n};\n\nDefaultSpatialRef['EPSG:4490'] = DefaultSpatialRef['EPSG:4326'];\n\nvar SpatialReference = function () {\n function SpatialReference() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n classCallCheck(this, SpatialReference);\n\n this.options = options;\n this._initSpatialRef();\n }\n\n SpatialReference.getProjectionInstance = function getProjectionInstance(prjName) {\n if (!prjName) {\n return null;\n }\n if (isObject(prjName)) {\n return prjName;\n }\n prjName = (prjName + '').toLowerCase();\n for (var p in projections) {\n if (hasOwn(projections, p)) {\n var code = projections[p]['code'];\n if (code && code.toLowerCase() === prjName) {\n return projections[p];\n }\n }\n }\n return null;\n };\n\n SpatialReference.equals = function equals(sp1, sp2) {\n if (!sp1 && !sp2) {\n return true;\n } else if (!sp1 || !sp2) {\n return false;\n }\n if (sp1.projection !== sp2.projection) {\n return false;\n }\n var f1 = sp1.fullExtent,\n f2 = sp2.fullExtent;\n if (f1 && f2) {\n if (f1.top !== f2.top || f1.bottom !== f2.bottom || f1.left !== f2.left || f1.right !== f2.right) {\n return false;\n }\n }\n var r1 = sp1.resolutions,\n r2 = sp2.resolutions;\n if (r1 && r2) {\n if (r1.length !== r2.length) {\n return false;\n }\n for (var i = 0; i < r1.length; i++) {\n if (r1[i] !== r2[i]) {\n return false;\n }\n }\n }\n return true;\n };\n\n SpatialReference.prototype._initSpatialRef = function _initSpatialRef() {\n var projection = this.options['projection'];\n if (projection) {\n projection = SpatialReference.getProjectionInstance(projection);\n } else {\n projection = DEFAULT;\n }\n if (!projection) {\n throw new Error('must provide a valid projection in map\\'s spatial reference.');\n }\n projection = extend({}, Common, projection);\n if (!projection.measureLength) {\n extend(projection, Measurer.DEFAULT);\n }\n this._projection = projection;\n var defaultSpatialRef = void 0,\n resolutions = this.options['resolutions'];\n if (!resolutions) {\n if (projection['code']) {\n defaultSpatialRef = DefaultSpatialRef[projection['code']];\n if (defaultSpatialRef) {\n resolutions = defaultSpatialRef['resolutions'];\n }\n }\n if (!resolutions) {\n throw new Error('must provide valid resolutions in map\\'s spatial reference.');\n }\n }\n this._resolutions = resolutions;\n var fullExtent = this.options['fullExtent'];\n if (!fullExtent) {\n if (projection['code']) {\n defaultSpatialRef = DefaultSpatialRef[projection['code']];\n if (defaultSpatialRef) {\n fullExtent = defaultSpatialRef['fullExtent'];\n }\n }\n if (!fullExtent) {\n throw new Error('must provide a valid fullExtent in map\\'s spatial reference.');\n }\n }\n if (!isNil(fullExtent['left'])) {\n this._fullExtent = new Extent(new Coordinate(fullExtent['left'], fullExtent['top']), new Coordinate(fullExtent['right'], fullExtent['bottom']));\n } else {\n this._fullExtent = new Extent(fullExtent);\n fullExtent['left'] = fullExtent['xmin'];\n fullExtent['right'] = fullExtent['xmax'];\n fullExtent['top'] = fullExtent['ymax'];\n fullExtent['bottom'] = fullExtent['ymin'];\n }\n\n if (isNil(fullExtent['top']) || isNil(fullExtent['bottom']) || isNil(fullExtent['left']) || isNil(fullExtent['right'])) {\n throw new Error('must provide valid top/bottom/left/right in fullExtent.');\n }\n\n extend(this._fullExtent, fullExtent);\n\n this._projection.fullExtent = fullExtent;\n\n var a = fullExtent['right'] >= fullExtent['left'] ? 1 : -1,\n b = fullExtent['top'] >= fullExtent['bottom'] ? -1 : 1;\n this._transformation = new Transformation([a, b, 0, 0]);\n };\n\n SpatialReference.prototype.getResolutions = function getResolutions() {\n return this._resolutions || [];\n };\n\n SpatialReference.prototype.getResolution = function getResolution(zoom) {\n var z = zoom | 0;\n if (z < 0) {\n z = 0;\n } else if (z > this._resolutions.length - 1) {\n z = this._resolutions.length - 1;\n }\n var res = this._resolutions[z];\n if (!isInteger(zoom) && z !== this._resolutions.length - 1) {\n var next = this._resolutions[z + 1];\n return res + (next - res) * (zoom - z);\n }\n return res;\n };\n\n SpatialReference.prototype.getProjection = function getProjection() {\n return this._projection;\n };\n\n SpatialReference.prototype.getFullExtent = function getFullExtent() {\n return this._fullExtent;\n };\n\n SpatialReference.prototype.getTransformation = function getTransformation() {\n return this._transformation;\n };\n\n SpatialReference.prototype.getMinZoom = function getMinZoom() {\n for (var i = 0; i < this._resolutions.length; i++) {\n if (!isNil(this._resolutions[i])) {\n return i;\n }\n }\n return 0;\n };\n\n SpatialReference.prototype.getMaxZoom = function getMaxZoom() {\n for (var i = this._resolutions.length - 1; i >= 0; i--) {\n if (!isNil(this._resolutions[i])) {\n return i;\n }\n }\n return this._resolutions.length - 1;\n };\n\n SpatialReference.prototype.getZoomDirection = function getZoomDirection() {\n return sign(this._resolutions[this.getMinZoom()] - this._resolutions[this.getMaxZoom()]);\n };\n\n SpatialReference.prototype.toJSON = function toJSON() {\n if (!this.json) {\n this.json = {\n 'resolutions': this._resolutions,\n 'fullExtent': {\n 'top': this._fullExtent.top,\n 'left': this._fullExtent.left,\n 'bottom': this._fullExtent.bottom,\n 'right': this._fullExtent.right\n },\n 'projection': this._projection.code\n };\n }\n return this.json;\n };\n\n return SpatialReference;\n}();\n\nvar options = {\n 'maxVisualPitch': 60,\n 'maxPitch': 80,\n 'centerCross': false,\n\n 'zoomInCenter': false,\n 'zoomAnimation': function () {\n return !IS_NODE;\n }(),\n 'zoomAnimationDuration': 330,\n\n 'panAnimation': function () {\n return !IS_NODE;\n }(),\n\n 'panAnimationDuration': 600,\n\n 'zoomable': true,\n 'enableInfoWindow': true,\n\n 'hitDetect': function () {\n return !Browser$1.mobile;\n }(),\n\n 'hitDetectLimit': 5,\n\n 'fpsOnInteracting': 25,\n\n 'layerCanvasLimitOnInteracting': -1,\n\n 'maxZoom': null,\n 'minZoom': null,\n 'maxExtent': null,\n\n 'checkSize': true,\n\n 'renderer': 'canvas'\n};\n\nvar Map = function (_Handlerable) {\n inherits(Map, _Handlerable);\n\n function Map(container, options) {\n classCallCheck(this, Map);\n\n if (!options) {\n throw new Error('Invalid options when creating map.');\n }\n if (!options['center']) {\n throw new Error('Invalid center when creating map.');\n }\n\n var opts = extend({}, options);\n var zoom = opts['zoom'];\n delete opts['zoom'];\n var center = new Coordinate(opts['center']);\n delete opts['center'];\n\n var baseLayer = opts['baseLayer'];\n delete opts['baseLayer'];\n var layers = opts['layers'];\n delete opts['layers'];\n\n var _this = possibleConstructorReturn(this, _Handlerable.call(this, opts));\n\n Object.defineProperty(_this, 'id', {\n value: UID(),\n writable: false\n });\n\n _this._loaded = false;\n _this._initContainer(container);\n\n _this._panels = {};\n\n _this._baseLayer = null;\n _this._layers = [];\n\n _this._zoomLevel = zoom;\n _this._center = center;\n\n _this.setSpatialReference(opts['spatialReference'] || opts['view']);\n\n _this._mapViewPoint = new Point(0, 0);\n\n _this._initRenderer();\n _this._updateMapSize(_this._getContainerDomSize());\n\n if (baseLayer) {\n _this.setBaseLayer(baseLayer);\n }\n if (layers) {\n _this.addLayer(layers);\n }\n\n _this._Load();\n return _this;\n }\n\n Map.addOnLoadHook = function addOnLoadHook(fn) {\n var args = Array.prototype.slice.call(arguments, 1);\n var onload = typeof fn === 'function' ? fn : function () {\n this[fn].apply(this, args);\n };\n this.prototype._onLoadHooks = this.prototype._onLoadHooks || [];\n this.prototype._onLoadHooks.push(onload);\n return this;\n };\n\n Map.prototype.isLoaded = function isLoaded() {\n return !!this._loaded;\n };\n\n Map.prototype.getContainer = function getContainer() {\n return this._containerDOM;\n };\n\n Map.prototype.getSpatialReference = function getSpatialReference() {\n return this._spatialReference;\n };\n\n Map.prototype.setSpatialReference = function setSpatialReference(ref) {\n var oldRef = this.options['spatialReference'];\n if (this._loaded && SpatialReference.equals(oldRef, ref)) {\n return this;\n }\n ref = extend({}, ref);\n this._center = this.getCenter();\n this.options['spatialReference'] = ref;\n this._spatialReference = new SpatialReference(ref);\n if (this.options['spatialReference'] && isFunction(this.options['spatialReference']['projection'])) {\n var projection = this._spatialReference.getProjection();\n\n this.options['spatialReference']['projection'] = projection['code'];\n }\n this._resetMapStatus();\n\n this._fireEvent('spatialreferencechange', {\n 'old': oldRef,\n 'new': extend({}, this.options['spatialReference'])\n });\n return this;\n };\n\n Map.prototype.onConfig = function onConfig(conf) {\n var ref = conf['spatialReference'] || conf['view'];\n if (!isNil(ref)) {\n this.setSpatialReference(ref);\n }\n return this;\n };\n\n Map.prototype.getProjection = function getProjection() {\n if (!this._spatialReference) {\n return null;\n }\n return this._spatialReference.getProjection();\n };\n\n Map.prototype.getFullExtent = function getFullExtent() {\n if (!this._spatialReference) {\n return null;\n }\n return this._spatialReference.getFullExtent();\n };\n\n Map.prototype.setCursor = function setCursor(cursor) {\n delete this._cursor;\n this._trySetCursor(cursor);\n this._cursor = cursor;\n return this;\n };\n\n Map.prototype.resetCursor = function resetCursor() {\n return this.setCursor(null);\n };\n\n Map.prototype.getCenter = function getCenter() {\n if (!this._loaded || !this._prjCenter) {\n return this._center;\n }\n var projection = this.getProjection();\n return projection.unproject(this._prjCenter);\n };\n\n Map.prototype.setCenter = function setCenter(center) {\n if (!center) {\n return this;\n }\n center = new Coordinate(center);\n if (!this._verifyExtent(center)) {\n return this;\n }\n if (!this._loaded) {\n this._center = center;\n return this;\n }\n this.onMoveStart();\n var projection = this.getProjection();\n var _pcenter = projection.project(center);\n this._setPrjCenter(_pcenter);\n this.onMoveEnd(this._parseEventFromCoord(this.getCenter()));\n return this;\n };\n\n Map.prototype.getSize = function getSize() {\n if (isNil(this.width) || isNil(this.height)) {\n return this._getContainerDomSize();\n }\n return new Size(this.width, this.height);\n };\n\n Map.prototype.getContainerExtent = function getContainerExtent() {\n var visualHeight = this.height;\n var pitch = this.getPitch(),\n maxVisualPitch = this.options['maxVisualPitch'];\n if (maxVisualPitch && pitch > maxVisualPitch) {\n visualHeight = this._getVisualHeight(maxVisualPitch);\n }\n return new PointExtent(0, this.height - visualHeight, this.width, this.height);\n };\n\n Map.prototype._getVisualHeight = function _getVisualHeight(maxVisualPitch) {\n var pitch = this.getPitch();\n var visualDistance = this.height / 2 * Math.tan(maxVisualPitch * Math.PI / 180);\n return this.height / 2 + visualDistance * Math.tan((90 - pitch) * Math.PI / 180);\n };\n\n Map.prototype.getExtent = function getExtent() {\n return this._pointToExtent(this._get2DExtent());\n };\n\n Map.prototype.getProjExtent = function getProjExtent() {\n var extent2D = this._get2DExtent();\n return new Extent(this._pointToPrj(extent2D.getMin()), this._pointToPrj(extent2D.getMax()));\n };\n\n Map.prototype.getPrjExtent = function getPrjExtent() {\n return this.getProjExtent();\n };\n\n Map.prototype.getMaxExtent = function getMaxExtent() {\n if (!this.options['maxExtent']) {\n return null;\n }\n return new Extent(this.options['maxExtent'], this.getProjection());\n };\n\n Map.prototype.setMaxExtent = function setMaxExtent(extent) {\n if (extent) {\n var maxExt = new Extent(extent, this.getProjection());\n this.options['maxExtent'] = maxExt;\n var center = this.getCenter();\n if (!this._verifyExtent(center)) {\n this.panTo(maxExt.getCenter());\n }\n } else {\n delete this.options['maxExtent'];\n }\n return this;\n };\n\n Map.prototype.getZoom = function getZoom() {\n return this._zoomLevel;\n };\n\n Map.prototype.getZoomForScale = function getZoomForScale(scale, fromZoom, isFraction) {\n var zoom = this.getZoom();\n if (isNil(fromZoom)) {\n fromZoom = zoom;\n }\n if (scale === 1 && fromZoom === zoom) {\n return zoom;\n }\n var res = this._getResolution(fromZoom),\n targetRes = res / scale;\n var scaleZoom = this.getZoomFromRes(targetRes);\n if (isFraction) {\n return scaleZoom;\n } else {\n var delta = 1E-6;\n return this.getSpatialReference().getZoomDirection() < 0 ? Math.ceil(scaleZoom - delta) : Math.floor(scaleZoom + delta);\n }\n };\n\n Map.prototype.getZoomFromRes = function getZoomFromRes(res) {\n var resolutions = this._getResolutions(),\n minRes = this._getResolution(this.getMinZoom()),\n maxRes = this._getResolution(this.getMaxZoom());\n if (minRes <= maxRes) {\n if (res <= minRes) {\n return this.getMinZoom();\n } else if (res >= maxRes) {\n return this.getMaxZoom();\n }\n } else if (res >= minRes) {\n return this.getMinZoom();\n } else if (res <= maxRes) {\n return this.getMaxZoom();\n }\n\n var l = resolutions.length;\n for (var i = 0; i < l - 1; i++) {\n if (!resolutions[i]) {\n continue;\n }\n var gap = resolutions[i + 1] - resolutions[i];\n var test = res - resolutions[i];\n if (sign(gap) === sign(test) && Math.abs(gap) >= Math.abs(test)) {\n return i + test / gap;\n }\n }\n return l - 1;\n };\n\n Map.prototype.setZoom = function setZoom(zoom) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { 'animation': true };\n\n if (isNaN(zoom) || isNil(zoom)) {\n return this;\n }\n if (this._loaded && this.options['zoomAnimation'] && options['animation']) {\n this._zoomAnimation(zoom);\n } else {\n this._zoom(zoom);\n }\n return this;\n };\n\n Map.prototype.getMaxZoom = function getMaxZoom() {\n if (!isNil(this.options['maxZoom'])) {\n return this.options['maxZoom'];\n }\n return this.getMaxNativeZoom();\n };\n\n Map.prototype.setMaxZoom = function setMaxZoom(maxZoom) {\n var viewMaxZoom = this.getMaxNativeZoom();\n if (maxZoom > viewMaxZoom) {\n maxZoom = viewMaxZoom;\n }\n if (maxZoom !== null && maxZoom < this._zoomLevel) {\n this.setZoom(maxZoom);\n }\n this.options['maxZoom'] = maxZoom;\n return this;\n };\n\n Map.prototype.getMinZoom = function getMinZoom() {\n if (!isNil(this.options['minZoom'])) {\n return this.options['minZoom'];\n }\n return this._spatialReference.getMinZoom();\n };\n\n Map.prototype.setMinZoom = function setMinZoom(minZoom) {\n if (minZoom !== null) {\n var viewMinZoom = this._spatialReference.getMinZoom();\n if (minZoom < viewMinZoom) {\n minZoom = viewMinZoom;\n }\n if (minZoom > this._zoomLevel) {\n this.setZoom(minZoom);\n }\n }\n this.options['minZoom'] = minZoom;\n return this;\n };\n\n Map.prototype.getMaxNativeZoom = function getMaxNativeZoom() {\n var ref = this.getSpatialReference();\n if (!ref) {\n return null;\n }\n return ref.getMaxZoom();\n };\n\n Map.prototype.getGLZoom = function getGLZoom() {\n return this.getMaxNativeZoom() / 2;\n };\n\n Map.prototype.getGLScale = function getGLScale(zoom) {\n if (isNil(zoom)) {\n zoom = this.getZoom();\n }\n return this.getScale(zoom) / this.getScale(this.getGLZoom());\n };\n\n Map.prototype.zoomIn = function zoomIn() {\n return this.setZoom(this.getZoom() + 1);\n };\n\n Map.prototype.zoomOut = function zoomOut() {\n return this.setZoom(this.getZoom() - 1);\n };\n\n Map.prototype.isZooming = function isZooming() {\n return !!this._zooming;\n };\n\n Map.prototype.isInteracting = function isInteracting() {\n return this.isZooming() || this.isMoving() || this.isRotating();\n };\n\n Map.prototype.setCenterAndZoom = function setCenterAndZoom(center, zoom) {\n if (!isNil(zoom) && this._zoomLevel !== zoom) {\n this.setCenter(center);\n this.setZoom(zoom, { animation: false });\n } else {\n this.setCenter(center);\n }\n return this;\n };\n\n Map.prototype.getFitZoom = function getFitZoom(extent) {\n var _this2 = this;\n\n if (!extent || !(extent instanceof Extent)) {\n return this._zoomLevel;\n }\n\n if (extent['xmin'] === extent['xmax'] && extent['ymin'] === extent['ymax']) {\n return this.getMaxZoom();\n }\n var size = this.getSize();\n var containerExtent = extent.convertTo(function (p) {\n return _this2.coordToContainerPoint(p);\n });\n var w = containerExtent.getWidth(),\n h = containerExtent.getHeight();\n var scaleX = size['width'] / w,\n scaleY = size['height'] / h;\n var scale = this.getSpatialReference().getZoomDirection() < 0 ? Math.max(scaleX, scaleY) : Math.min(scaleX, scaleY);\n var zoom = this.getZoomForScale(scale);\n return zoom;\n };\n\n Map.prototype.getView = function getView() {\n return {\n 'center': this.getCenter().toArray(),\n 'zoom': this.getZoom(),\n 'pitch': this.getPitch(),\n 'bearing': this.getBearing()\n };\n };\n\n Map.prototype.setView = function setView(view) {\n if (!view) {\n return this;\n }\n if (view['center']) {\n this.setCenter(view['center']);\n }\n if (view['zoom']) {\n this.setZoom(view['zoom'], { 'animation': false });\n }\n if (view['pitch']) {\n this.setPitch(view['pitch']);\n }\n if (view['bearing']) {\n this.setBearing(view['bearing']);\n }\n return this;\n };\n\n Map.prototype.getResolution = function getResolution(zoom) {\n return this._getResolution(zoom);\n };\n\n Map.prototype.getScale = function getScale(zoom) {\n var z = isNil(zoom) ? this.getZoom() : zoom;\n var max = this._getResolution(this.getMaxNativeZoom()),\n res = this._getResolution(z);\n return res / max;\n };\n\n Map.prototype.fitExtent = function fitExtent(extent, zoomOffset) {\n if (!extent) {\n return this;\n }\n extent = new Extent(extent, this.getProjection());\n var zoom = this.getFitZoom(extent) + (zoomOffset || 0);\n var center = extent.getCenter();\n return this.setCenterAndZoom(center, zoom);\n };\n\n Map.prototype.getBaseLayer = function getBaseLayer() {\n return this._baseLayer;\n };\n\n Map.prototype.setBaseLayer = function setBaseLayer(baseLayer) {\n var isChange = false;\n if (this._baseLayer) {\n isChange = true;\n\n this._fireEvent('baselayerchangestart');\n this._baseLayer.remove();\n }\n if (!baseLayer) {\n delete this._baseLayer;\n\n this._fireEvent('baselayerchangeend');\n\n this._fireEvent('setbaselayer');\n return this;\n }\n\n this._baseLayer = baseLayer;\n baseLayer._bindMap(this, -1);\n\n function onbaseLayerload() {\n this._fireEvent('baselayerload');\n if (isChange) {\n isChange = false;\n this._fireEvent('baselayerchangeend');\n }\n }\n this._baseLayer.on('layerload', onbaseLayerload, this);\n if (this._loaded) {\n this._baseLayer.load();\n }\n this._fireEvent('setbaselayer');\n return this;\n };\n\n Map.prototype.removeBaseLayer = function removeBaseLayer() {\n if (this._baseLayer) {\n this._baseLayer.remove();\n delete this._baseLayer;\n\n this._fireEvent('baselayerremove');\n }\n return this;\n };\n\n Map.prototype.getLayers = function getLayers(filter) {\n return this._getLayers(function (layer) {\n if (layer === this._baseLayer || layer.getId().indexOf(INTERNAL_LAYER_PREFIX) >= 0) {\n return false;\n }\n if (filter) {\n return filter(layer);\n }\n return true;\n });\n };\n\n Map.prototype.getLayer = function getLayer(id) {\n if (!id) {\n return null;\n }\n var layer = this._layerCache ? this._layerCache[id] : null;\n if (layer) {\n return layer;\n }\n var baseLayer = this.getBaseLayer();\n if (baseLayer && baseLayer.getId() === id) {\n return baseLayer;\n }\n return null;\n };\n\n Map.prototype.addLayer = function addLayer(layers) {\n if (!layers) {\n return this;\n }\n if (!Array.isArray(layers)) {\n layers = Array.prototype.slice.call(arguments, 0);\n return this.addLayer(layers);\n }\n if (!this._layerCache) {\n this._layerCache = {};\n }\n var mapLayers = this._layers;\n for (var i = 0, len = layers.length; i < len; i++) {\n var layer = layers[i];\n var id = layer.getId();\n if (isNil(id)) {\n throw new Error('Invalid id for the layer: ' + id);\n }\n if (layer.getMap() === this) {\n continue;\n }\n if (this._layerCache[id]) {\n throw new Error('Duplicate layer id in the map: ' + id);\n }\n this._layerCache[id] = layer;\n layer._bindMap(this);\n mapLayers.push(layer);\n if (this._loaded) {\n layer.load();\n }\n }\n\n this._sortLayersByZIndex();\n\n this._fireEvent('addlayer', {\n 'layers': layers\n });\n return this;\n };\n\n Map.prototype.removeLayer = function removeLayer(layers) {\n if (!layers) {\n return this;\n }\n if (!Array.isArray(layers)) {\n return this.removeLayer([layers]);\n }\n var removed = [];\n for (var i = 0, len = layers.length; i < len; i++) {\n var layer = layers[i];\n if (!(layer instanceof Layer)) {\n layer = this.getLayer(layer);\n }\n if (!layer) {\n continue;\n }\n var map = layer.getMap();\n if (!map || map !== this) {\n continue;\n }\n removed.push(layer);\n this._removeLayer(layer, this._layers);\n if (this._loaded) {\n layer._doRemove();\n }\n var id = layer.getId();\n if (this._layerCache) {\n delete this._layerCache[id];\n }\n }\n if (removed.length > 0) {\n this.once('frameend', function () {\n removed.forEach(function (layer) {\n layer.fire('remove');\n });\n });\n }\n\n this._fireEvent('removelayer', {\n 'layers': layers\n });\n return this;\n };\n\n Map.prototype.sortLayers = function sortLayers(layers) {\n if (!layers || !Array.isArray(layers)) {\n return this;\n }\n var layersToOrder = [];\n var minZ = Number.MAX_VALUE;\n for (var i = 0, l = layers.length; i < l; i++) {\n var layer = layers[i];\n if (isString(layers[i])) {\n layer = this.getLayer(layer);\n }\n if (!(layer instanceof Layer) || !layer.getMap() || layer.getMap() !== this) {\n throw new Error('It must be a layer added to this map to order.');\n }\n if (layer.getZIndex() < minZ) {\n minZ = layer.getZIndex();\n }\n layersToOrder.push(layer);\n }\n for (var _i = 0, _l = layersToOrder.length; _i < _l; _i++) {\n layersToOrder[_i].setZIndex(minZ + _i);\n }\n\n return this;\n };\n\n Map.prototype.toDataURL = function toDataURL(options) {\n if (!options) {\n options = {};\n }\n var mimeType = options['mimeType'];\n if (!mimeType) {\n mimeType = 'image/png';\n }\n var save = options['save'];\n var renderer = this._getRenderer();\n if (renderer && renderer.toDataURL) {\n var file = options['fileName'];\n if (!file) {\n file = 'export';\n }\n var dataURL = renderer.toDataURL(mimeType);\n if (save && dataURL) {\n var imgURL = void 0;\n if (typeof Blob !== 'undefined' && typeof atob !== 'undefined') {\n var blob = b64toBlob(dataURL.replace(/^data:image\\/(png|jpeg|jpg);base64,/, ''), mimeType);\n imgURL = URL.createObjectURL(blob);\n } else {\n imgURL = dataURL;\n }\n var dlLink = document.createElement('a');\n dlLink.download = file;\n dlLink.href = imgURL;\n\n document.body.appendChild(dlLink);\n dlLink.click();\n document.body.removeChild(dlLink);\n }\n return dataURL;\n }\n return null;\n };\n\n Map.prototype.coordinateToPoint = function coordinateToPoint(coordinate, zoom) {\n var prjCoord = this.getProjection().project(coordinate);\n return this._prjToPoint(prjCoord, zoom);\n };\n\n Map.prototype.coordToPoint = function coordToPoint(coordinate, zoom) {\n return this.coordinateToPoint(coordinate, zoom);\n };\n\n Map.prototype.pointToCoordinate = function pointToCoordinate(point, zoom) {\n var prjCoord = this._pointToPrj(point, zoom);\n return this.getProjection().unproject(prjCoord);\n };\n\n Map.prototype.pointToCoord = function pointToCoord(point, zoom) {\n return this.pointToCoordinate(point, zoom);\n };\n\n Map.prototype.coordinateToViewPoint = function coordinateToViewPoint(coordinate) {\n return this._prjToViewPoint(this.getProjection().project(coordinate));\n };\n\n Map.prototype.coordToViewPoint = function coordToViewPoint(coordinate) {\n return this.coordinateToViewPoint(coordinate);\n };\n\n Map.prototype.viewPointToCoordinate = function viewPointToCoordinate(viewPoint) {\n return this.getProjection().unproject(this._viewPointToPrj(viewPoint));\n };\n\n Map.prototype.viewPointToCoord = function viewPointToCoord(viewPoint) {\n return this.viewPointToCoordinate(viewPoint);\n };\n\n Map.prototype.coordinateToContainerPoint = function coordinateToContainerPoint(coordinate, zoom) {\n var pCoordinate = this.getProjection().project(coordinate);\n return this._prjToContainerPoint(pCoordinate, zoom);\n };\n\n Map.prototype.coordToContainerPoint = function coordToContainerPoint(coordinate, zoom) {\n return this.coordinateToContainerPoint(coordinate, zoom);\n };\n\n Map.prototype.containerPointToCoordinate = function containerPointToCoordinate(containerPoint) {\n var pCoordinate = this._containerPointToPrj(containerPoint);\n return this.getProjection().unproject(pCoordinate);\n };\n\n Map.prototype.containerPointToCoord = function containerPointToCoord(containerPoint) {\n return this.containerPointToCoordinate(containerPoint);\n };\n\n Map.prototype.containerPointToViewPoint = function containerPointToViewPoint(containerPoint) {\n return containerPoint.sub(this.getViewPoint());\n };\n\n Map.prototype.viewPointToContainerPoint = function viewPointToContainerPoint(viewPoint) {\n return viewPoint.add(this.getViewPoint());\n };\n\n Map.prototype.containerToExtent = function containerToExtent(containerExtent) {\n var extent2D = new PointExtent(this._containerPointToPoint(containerExtent.getMin()), this._containerPointToPoint(containerExtent.getMax()));\n return this._pointToExtent(extent2D);\n };\n\n Map.prototype.checkSize = function checkSize() {\n var justStart = now() - this._initTime < 1500 && this.width === 0 || this.height === 0;\n\n var watched = this._getContainerDomSize(),\n oldHeight = this.height,\n oldWidth = this.width;\n if (watched['width'] === oldWidth && watched['height'] === oldHeight) {\n return this;\n }\n var center = this.getCenter();\n this._updateMapSize(watched);\n var resizeOffset = new Point((oldWidth - watched.width) / 2, (oldHeight - watched.height) / 2);\n this._offsetCenterByPixel(resizeOffset);\n\n this._mapViewCoord = this._getPrjCenter();\n var hided = watched['width'] === 0 || watched['height'] === 0 || oldWidth === 0 || oldHeight === 0;\n\n if (justStart || hided) {\n this._noEvent = true;\n this.setCenter(center);\n delete this._noEvent;\n }\n\n this._fireEvent('resize');\n\n return this;\n };\n\n Map.prototype.distanceToPixel = function distanceToPixel(xDist, yDist, zoom) {\n var projection = this.getProjection();\n if (!projection) {\n return null;\n }\n var scale = this.getScale() / this.getScale(zoom);\n var center = this.getCenter(),\n target = projection.locate(center, xDist, yDist);\n var p0 = this.coordToContainerPoint(center),\n p1 = this.coordToContainerPoint(target);\n p1._sub(p0)._multi(scale)._abs();\n return new Size(p1.x, p1.y);\n };\n\n Map.prototype.distanceToPoint = function distanceToPoint(xDist, yDist, zoom) {\n var projection = this.getProjection();\n if (!projection) {\n return null;\n }\n var center = this.getCenter(),\n target = projection.locate(center, xDist, yDist);\n var p0 = this.coordToPoint(center, zoom),\n p1 = this.coordToPoint(target, zoom);\n p1._sub(p0)._abs();\n return p1;\n };\n\n Map.prototype.pixelToDistance = function pixelToDistance(width, height) {\n var projection = this.getProjection();\n if (!projection) {\n return null;\n }\n var fullExt = this.getFullExtent();\n var d = fullExt['top'] > fullExt['bottom'] ? -1 : 1;\n var target = new Point(this.width / 2 + width, this.height / 2 + d * height);\n var coord = this.containerPointToCoord(target);\n return projection.measureLength(this.getCenter(), coord);\n };\n\n Map.prototype.pointToDistance = function pointToDistance(dx, dy, zoom) {\n var projection = this.getProjection();\n if (!projection) {\n return null;\n }\n var c = this._prjToPoint(this._getPrjCenter(), zoom);\n c._add(dx, dy);\n var target = this.pointToCoord(c, zoom);\n return projection.measureLength(this.getCenter(), target);\n };\n\n Map.prototype.locate = function locate(coordinate, dx, dy) {\n return this.getProjection()._locate(new Coordinate(coordinate), dx, dy);\n };\n\n Map.prototype.locateByPoint = function locateByPoint(coordinate, px, py) {\n var point = this.coordToContainerPoint(coordinate);\n return this.containerPointToCoord(point._add(px, py));\n };\n\n Map.prototype.getMainPanel = function getMainPanel() {\n return this._getRenderer().getMainPanel();\n };\n\n Map.prototype.getPanels = function getPanels() {\n return this._panels;\n };\n\n Map.prototype.remove = function remove() {\n if (this.isRemoved()) {\n return this;\n }\n this._fireEvent('removestart');\n this._removeDomEvents();\n this._clearHandlers();\n this.removeBaseLayer();\n var layers = this.getLayers();\n for (var i = 0; i < layers.length; i++) {\n layers[i].remove();\n }\n if (this._getRenderer()) {\n this._getRenderer().remove();\n }\n if (this._containerDOM.innerHTML) {\n this._containerDOM.innerHTML = '';\n }\n delete this._panels;\n delete this._containerDOM;\n delete this.renderer;\n this._fireEvent('removeend');\n this._clearAllListeners();\n return this;\n };\n\n Map.prototype.isRemoved = function isRemoved() {\n return !this._containerDOM;\n };\n\n Map.prototype.isMoving = function isMoving() {\n return !!this._moving;\n };\n\n Map.prototype.onMoveStart = function onMoveStart(param) {\n this._originCenter = this.getCenter();\n this._moving = true;\n this._trySetCursor('move');\n\n this._fireEvent('movestart', this._parseEvent(param ? param['domEvent'] : null, 'movestart'));\n };\n\n Map.prototype.onMoving = function onMoving(param) {\n this._fireEvent('moving', this._parseEvent(param ? param['domEvent'] : null, 'moving'));\n };\n\n Map.prototype.onMoveEnd = function onMoveEnd(param) {\n this._moving = false;\n this._trySetCursor('default');\n\n this._fireEvent('moveend', param && param['domEvent'] ? this._parseEvent(param['domEvent'], 'moveend') : param);\n if (!this._verifyExtent(this.getCenter())) {\n var moveTo = this._originCenter;\n if (!this._verifyExtent(moveTo)) {\n moveTo = this.getMaxExtent().getCenter();\n }\n this.panTo(moveTo);\n }\n };\n\n Map.prototype.onDragRotateStart = function onDragRotateStart(param) {\n this._dragRotating = true;\n\n this._fireEvent('dragrotatestart', this._parseEvent(param ? param['domEvent'] : null, 'dragrotatestart'));\n };\n\n Map.prototype.onDragRotating = function onDragRotating(param) {\n this._fireEvent('dragrotating', this._parseEvent(param ? param['domEvent'] : null, 'dragrotating'));\n };\n\n Map.prototype.onDragRotateEnd = function onDragRotateEnd(param) {\n this._dragRotating = false;\n\n this._fireEvent('dragrotateend', this._parseEvent(param ? param['domEvent'] : null, 'dragrotateend'));\n };\n\n Map.prototype.isDragRotating = function isDragRotating() {\n return !!this._dragRotating;\n };\n\n Map.prototype.getRenderer = function getRenderer() {\n return this._getRenderer();\n };\n\n Map.prototype._initContainer = function _initContainer(container) {\n if (isString(container)) {\n this._containerDOM = document.getElementById(container);\n if (!this._containerDOM) {\n throw new Error('Invalid container when creating map: \\'' + container + '\\'');\n }\n } else {\n this._containerDOM = container;\n if (IS_NODE) {\n this.CanvasClass = this._containerDOM.constructor;\n }\n }\n\n if (this._containerDOM.childNodes && this._containerDOM.childNodes.length > 0) {\n if (this._containerDOM.childNodes[0].className === 'maptalks-wrapper') {\n throw new Error('Container is already loaded with another map instance, use map.remove() to clear it.');\n }\n }\n };\n\n Map.prototype._trySetCursor = function _trySetCursor(cursor) {\n if (!this._cursor && !this._priorityCursor) {\n if (!cursor) {\n cursor = 'default';\n }\n this._setCursorToPanel(cursor);\n }\n return this;\n };\n\n Map.prototype._setPriorityCursor = function _setPriorityCursor(cursor) {\n if (!cursor) {\n var hasCursor = false;\n if (this._priorityCursor) {\n hasCursor = true;\n }\n delete this._priorityCursor;\n if (hasCursor) {\n this.setCursor(this._cursor);\n }\n } else {\n this._priorityCursor = cursor;\n this._setCursorToPanel(cursor);\n }\n return this;\n };\n\n Map.prototype._setCursorToPanel = function _setCursorToPanel(cursor) {\n var panel = this.getMainPanel();\n if (panel && panel.style && panel.style.cursor !== cursor) {\n panel.style.cursor = cursor;\n }\n };\n\n Map.prototype._get2DExtent = function _get2DExtent(zoom) {\n var _this3 = this;\n\n var cExtent = this.getContainerExtent();\n return cExtent.convertTo(function (c) {\n return _this3._containerPointToPoint(c, zoom);\n });\n };\n\n Map.prototype._pointToExtent = function _pointToExtent(extent2D) {\n var min2d = extent2D.getMin(),\n max2d = extent2D.getMax();\n var fullExtent = this.getFullExtent();\n\n var _ref = !fullExtent || fullExtent.left <= fullExtent.right ? [min2d.x, max2d.x] : [max2d.x, min2d.x],\n minx = _ref[0],\n maxx = _ref[1];\n\n var _ref2 = !fullExtent || fullExtent.top > fullExtent.bottom ? [max2d.y, min2d.y] : [min2d.y, max2d.y],\n miny = _ref2[0],\n maxy = _ref2[1];\n\n var min = new Coordinate(minx, miny),\n max = new Coordinate(maxx, maxy);\n return new Extent(this.pointToCoord(min), this.pointToCoord(max), this.getProjection());\n };\n\n Map.prototype._removeLayer = function _removeLayer(layer, layerList) {\n if (!layer || !layerList) {\n return;\n }\n var index = layerList.indexOf(layer);\n if (index > -1) {\n layerList.splice(index, 1);\n }\n };\n\n Map.prototype._sortLayersByZIndex = function _sortLayersByZIndex() {\n if (!this._layers) {\n return;\n }\n for (var i = 0, l = this._layers.length; i < l; i++) {\n this._layers[i]._order = i;\n }\n this._layers.sort(function (a, b) {\n var c = a.getZIndex() - b.getZIndex();\n if (c === 0) {\n return a._order - b._order;\n }\n return c;\n });\n };\n\n Map.prototype._fireEvent = function _fireEvent(eventName, param) {\n if (this._noEvent) {\n return;\n }\n\n this.fire('_' + eventName, param);\n this.fire(eventName, param);\n };\n\n Map.prototype._Load = function _Load() {\n this._resetMapStatus();\n if (this.options['pitch']) {\n this.setPitch(this.options['pitch']);\n delete this.options['pitch'];\n }\n if (this.options['bearing']) {\n this.setBearing(this.options['bearing']);\n delete this.options['bearing'];\n }\n this._loadAllLayers();\n this._getRenderer().onLoad();\n this._loaded = true;\n this._callOnLoadHooks();\n this._initTime = now();\n };\n\n Map.prototype._initRenderer = function _initRenderer() {\n var renderer = this.options['renderer'];\n var clazz = Map.getRendererClass(renderer);\n this._renderer = new clazz(this);\n this._renderer.load();\n };\n\n Map.prototype._getRenderer = function _getRenderer() {\n return this._renderer;\n };\n\n Map.prototype._loadAllLayers = function _loadAllLayers() {\n function loadLayer(layer) {\n if (layer) {\n layer.load();\n }\n }\n if (this._baseLayer) {\n this._baseLayer.load();\n }\n this._eachLayer(loadLayer, this.getLayers());\n };\n\n Map.prototype._getLayers = function _getLayers(filter) {\n var layers = this._baseLayer ? [this._baseLayer].concat(this._layers) : this._layers;\n var result = [];\n for (var i = 0; i < layers.length; i++) {\n if (!filter || filter.call(this, layers[i])) {\n result.push(layers[i]);\n }\n }\n return result;\n };\n\n Map.prototype._eachLayer = function _eachLayer(fn) {\n if (arguments.length < 2) {\n return;\n }\n var layerLists = Array.prototype.slice.call(arguments, 1);\n if (layerLists && !Array.isArray(layerLists)) {\n layerLists = [layerLists];\n }\n var layers = [];\n for (var i = 0, len = layerLists.length; i < len; i++) {\n layers = layers.concat(layerLists[i]);\n }\n for (var j = 0, jlen = layers.length; j < jlen; j++) {\n fn.call(fn, layers[j]);\n }\n };\n\n Map.prototype._onLayerEvent = function _onLayerEvent(param) {\n if (!param) {\n return;\n }\n if (param['type'] === 'idchange') {\n delete this._layerCache[param['old']];\n this._layerCache[param['new']] = param['target'];\n }\n };\n\n Map.prototype._resetMapStatus = function _resetMapStatus() {\n var maxZoom = this.getMaxZoom(),\n minZoom = this.getMinZoom();\n var viewMaxZoom = this._spatialReference.getMaxZoom(),\n viewMinZoom = this._spatialReference.getMinZoom();\n if (isNil(maxZoom) || maxZoom === -1 || maxZoom > viewMaxZoom) {\n this.setMaxZoom(viewMaxZoom);\n }\n if (isNil(minZoom) || minZoom === -1 || minZoom < viewMinZoom) {\n this.setMinZoom(viewMinZoom);\n }\n maxZoom = this.getMaxZoom();\n minZoom = this.getMinZoom();\n if (maxZoom < minZoom) {\n this.setMaxZoom(minZoom);\n }\n if (isNil(this._zoomLevel) || this._zoomLevel > maxZoom) {\n this._zoomLevel = maxZoom;\n }\n if (this._zoomLevel < minZoom) {\n this._zoomLevel = minZoom;\n }\n delete this._prjCenter;\n var projection = this.getProjection();\n this._prjCenter = projection.project(this._center);\n this._calcMatrices();\n var renderer = this._getRenderer();\n if (renderer) {\n renderer.resetContainer();\n }\n };\n\n Map.prototype._getContainerDomSize = function _getContainerDomSize() {\n if (!this._containerDOM) {\n return null;\n }\n var containerDOM = this._containerDOM;\n var width = void 0,\n height = void 0;\n if (!isNil(containerDOM.width) && !isNil(containerDOM.height)) {\n width = containerDOM.width;\n height = containerDOM.height;\n if (Browser$1.retina && containerDOM['layer']) {\n width /= 2;\n height /= 2;\n }\n } else if (!isNil(containerDOM.clientWidth) && !isNil(containerDOM.clientHeight)) {\n width = parseInt(containerDOM.clientWidth, 0);\n height = parseInt(containerDOM.clientHeight, 0);\n } else {\n throw new Error('can not get size of container');\n }\n return new Size(width, height);\n };\n\n Map.prototype._updateMapSize = function _updateMapSize(mSize) {\n this.width = mSize['width'];\n this.height = mSize['height'];\n this._getRenderer().updateMapSize(mSize);\n this._calcMatrices();\n return this;\n };\n\n Map.prototype._getPrjCenter = function _getPrjCenter() {\n return this._prjCenter;\n };\n\n Map.prototype._setPrjCenter = function _setPrjCenter(pcenter) {\n this._prjCenter = pcenter;\n if (this.isInteracting() && !this.isMoving()) {\n this._mapViewCoord = pcenter;\n }\n this._calcMatrices();\n };\n\n Map.prototype._setPrjCoordAtContainerPoint = function _setPrjCoordAtContainerPoint(coordinate, point) {\n if (point.x === this.width / 2 && point.y === this.height / 2) {\n return this;\n }\n var t = this._containerPointToPoint(point)._sub(this._prjToPoint(this._getPrjCenter()));\n var pcenter = this._pointToPrj(this._prjToPoint(coordinate).sub(t));\n this._setPrjCenter(pcenter);\n return this;\n };\n\n Map.prototype._verifyExtent = function _verifyExtent(center) {\n if (!center) {\n return false;\n }\n var maxExt = this.getMaxExtent();\n if (!maxExt) {\n return true;\n }\n return maxExt.contains(center);\n };\n\n Map.prototype._offsetCenterByPixel = function _offsetCenterByPixel(pixel) {\n var pos = new Point(this.width / 2 - pixel.x, this.height / 2 - pixel.y);\n var pCenter = this._containerPointToPrj(pos);\n this._setPrjCenter(pCenter);\n return pCenter;\n };\n\n Map.prototype.offsetPlatform = function offsetPlatform(offset) {\n if (!offset) {\n return this._mapViewPoint;\n } else {\n this._getRenderer().offsetPlatform(offset);\n this._mapViewCoord = this._getPrjCenter();\n this._mapViewPoint = this._mapViewPoint.add(offset);\n return this;\n }\n };\n\n Map.prototype.getViewPoint = function getViewPoint() {\n var offset = this._getViewPointFrameOffset();\n var panelOffset = this.offsetPlatform();\n if (offset) {\n panelOffset = panelOffset.add(offset);\n }\n return panelOffset;\n };\n\n Map.prototype._getViewPointFrameOffset = function _getViewPointFrameOffset() {\n if (this.isZooming()) {\n return null;\n }\n var pcenter = this._getPrjCenter();\n if (this._mapViewCoord && !this._mapViewCoord.equals(pcenter)) {\n return this._prjToContainerPoint(this._mapViewCoord).sub(this._prjToContainerPoint(pcenter));\n }\n return null;\n };\n\n Map.prototype._resetMapViewPoint = function _resetMapViewPoint() {\n this._mapViewPoint = new Point(0, 0);\n\n this._mapViewCoord = this._getPrjCenter();\n };\n\n Map.prototype._getResolution = function _getResolution(zoom) {\n if (isNil(zoom)) {\n zoom = this.getZoom();\n }\n return this._spatialReference.getResolution(zoom);\n };\n\n Map.prototype._getResolutions = function _getResolutions() {\n return this._spatialReference.getResolutions();\n };\n\n Map.prototype._prjToPoint = function _prjToPoint(pCoord, zoom) {\n zoom = isNil(zoom) ? this.getZoom() : zoom;\n return this._spatialReference.getTransformation().transform(pCoord, this._getResolution(zoom));\n };\n\n Map.prototype._pointToPrj = function _pointToPrj(point, zoom) {\n zoom = isNil(zoom) ? this.getZoom() : zoom;\n return this._spatialReference.getTransformation().untransform(point, this._getResolution(zoom));\n };\n\n Map.prototype._pointToPoint = function _pointToPoint(point, zoom) {\n if (!isNil(zoom)) {\n return point.multi(this._getResolution(zoom) / this._getResolution());\n }\n return point.copy();\n };\n\n Map.prototype._pointToPointAtZoom = function _pointToPointAtZoom(point, zoom) {\n if (!isNil(zoom)) {\n return point.multi(this._getResolution() / this._getResolution(zoom));\n }\n return point.copy();\n };\n\n Map.prototype._containerPointToPrj = function _containerPointToPrj(containerPoint) {\n return this._pointToPrj(this._containerPointToPoint(containerPoint));\n };\n\n Map.prototype._viewPointToPrj = function _viewPointToPrj(viewPoint) {\n return this._containerPointToPrj(this.viewPointToContainerPoint(viewPoint));\n };\n\n Map.prototype._prjToContainerPoint = function _prjToContainerPoint(pCoordinate, zoom) {\n return this._pointToContainerPoint(this._prjToPoint(pCoordinate, zoom), zoom);\n };\n\n Map.prototype._prjToViewPoint = function _prjToViewPoint(pCoordinate) {\n var containerPoint = this._prjToContainerPoint(pCoordinate);\n return this._containerPointToViewPoint(containerPoint);\n };\n\n Map.prototype._containerPointToViewPoint = function _containerPointToViewPoint(containerPoint) {\n if (!containerPoint) {\n return null;\n }\n return containerPoint._sub(this.getViewPoint());\n };\n\n Map.prototype._viewPointToPoint = function _viewPointToPoint(viewPoint, zoom) {\n return this._containerPointToPoint(this.viewPointToContainerPoint(viewPoint), zoom);\n };\n\n Map.prototype._pointToViewPoint = function _pointToViewPoint(point, zoom) {\n return this._prjToViewPoint(this._pointToPrj(point, zoom));\n };\n\n Map.prototype._callOnLoadHooks = function _callOnLoadHooks() {\n var proto = Map.prototype;\n if (!proto._onLoadHooks) {\n return;\n }\n for (var i = 0, l = proto._onLoadHooks.length; i < l; i++) {\n proto._onLoadHooks[i].call(this);\n }\n };\n\n return Map;\n}(Handlerable(Eventable(Renderable(Class))));\n\nMap.mergeOptions(options);\n\nvar MapDoubleClickZoomHandler = function (_Handler) {\n inherits(MapDoubleClickZoomHandler, _Handler);\n\n function MapDoubleClickZoomHandler() {\n classCallCheck(this, MapDoubleClickZoomHandler);\n return possibleConstructorReturn(this, _Handler.apply(this, arguments));\n }\n\n MapDoubleClickZoomHandler.prototype.addHooks = function addHooks() {\n if (!this.target) {\n return;\n }\n this.target.on('_dblclick', this._onDoubleClick, this);\n };\n\n MapDoubleClickZoomHandler.prototype.removeHooks = function removeHooks() {\n if (!this.target) {\n return;\n }\n this.target.off('_dblclick', this._onDoubleClick, this);\n };\n\n MapDoubleClickZoomHandler.prototype._onDoubleClick = function _onDoubleClick(param) {\n var map = this.target;\n if (map.options['doubleClickZoom']) {\n var oldZoom = map.getZoom(),\n zoom = param['domEvent']['shiftKey'] ? Math.ceil(oldZoom) - 1 : Math.floor(oldZoom) + 1;\n map._zoomAnimation(zoom, param['containerPoint']);\n }\n };\n\n return MapDoubleClickZoomHandler;\n}(Handler$1);\n\nMap.mergeOptions({\n 'doubleClickZoom': true\n});\n\nMap.addOnLoadHook('addHandler', 'doubleClickZoom', MapDoubleClickZoomHandler);\n\nvar MapDragHandler = function (_Handler) {\n inherits(MapDragHandler, _Handler);\n\n function MapDragHandler() {\n classCallCheck(this, MapDragHandler);\n return possibleConstructorReturn(this, _Handler.apply(this, arguments));\n }\n\n MapDragHandler.prototype.addHooks = function addHooks() {\n var map = this.target;\n if (!map) {\n return;\n }\n var dom = map._panels.mapWrapper || map._containerDOM;\n this._dragHandler = new DragHandler(dom, {\n 'cancelOn': this._cancelOn.bind(this),\n 'rightclick': true\n });\n this._dragHandler.on('mousedown', this._onMouseDown, this).on('dragstart', this._onDragStart, this).on('dragging', this._onDragging, this).on('dragend', this._onDragEnd, this).enable();\n };\n\n MapDragHandler.prototype.removeHooks = function removeHooks() {\n this._dragHandler.off('mousedown', this._onMouseDown, this).off('dragstart', this._onDragStart, this).off('dragging', this._onDragging, this).off('dragend', this._onDragEnd, this);\n this._dragHandler.remove();\n delete this._dragHandler;\n };\n\n MapDragHandler.prototype._cancelOn = function _cancelOn(domEvent) {\n if (this.target.isZooming() || this._ignore(domEvent)) {\n return true;\n }\n return false;\n };\n\n MapDragHandler.prototype._ignore = function _ignore(param) {\n if (!param) {\n return false;\n }\n if (param.domEvent) {\n param = param.domEvent;\n }\n return this.target._ignoreEvent(param);\n };\n\n MapDragHandler.prototype._onMouseDown = function _onMouseDown(param) {\n delete this.startDragTime;\n delete this._mode;\n if (param.domEvent.button === 2 || param.domEvent.ctrlKey) {\n if (this.target.options['dragRotate'] || this.target.options['dragPitch']) {\n this._mode = 'rotatePitch';\n }\n } else if (this.target.options['dragPan']) {\n this._mode = 'move';\n }\n this.target._stopAnim(this.target._animPlayer);\n preventDefault(param['domEvent']);\n };\n\n MapDragHandler.prototype._onDragStart = function _onDragStart(param) {\n this.startDragTime = now();\n if (this._mode === 'move') {\n this._moveStart(param);\n } else if (this._mode === 'rotatePitch') {\n this._rotateStart(param);\n }\n };\n\n MapDragHandler.prototype._onDragging = function _onDragging(param) {\n var map = this.target;\n if (map._isEventOutMap(param['domEvent'])) {\n return;\n }\n if (this._mode === 'move') {\n this._moving(param);\n } else if (this._mode === 'rotatePitch') {\n this._rotating(param);\n }\n };\n\n MapDragHandler.prototype._onDragEnd = function _onDragEnd(param) {\n if (this._mode === 'move') {\n this._moveEnd(param);\n } else if (this._mode === 'rotatePitch') {\n this._rotateEnd(param);\n }\n delete this.startDragTime;\n delete this.startBearing;\n };\n\n MapDragHandler.prototype._start = function _start(param) {\n this.preX = param['mousePos'].x;\n this.preY = param['mousePos'].y;\n this.startX = this.preX;\n this.startY = this.preY;\n };\n\n MapDragHandler.prototype._moveStart = function _moveStart(param) {\n this._start(param);\n var map = this.target;\n map.onMoveStart(param);\n var p = getEventContainerPoint(map._getActualEvent(param.domEvent), map.getContainer());\n this.startPrjCoord = map._containerPointToPrj(p);\n };\n\n MapDragHandler.prototype._moving = function _moving(param) {\n if (!this.startDragTime) {\n return;\n }\n var map = this.target;\n var p = getEventContainerPoint(map._getActualEvent(param.domEvent), map.getContainer());\n map._setPrjCoordAtContainerPoint(this.startPrjCoord, p);\n map.onMoving(param);\n };\n\n MapDragHandler.prototype._moveEnd = function _moveEnd(param) {\n if (!this.startDragTime) {\n return;\n }\n var map = this.target;\n var t = now() - this.startDragTime;\n var mx = param['mousePos'].x,\n my = param['mousePos'].y;\n var dx = mx - this.startX;\n var dy = my - this.startY;\n\n this._clear();\n\n if (map.options['panAnimation'] && !param.interupted && map._verifyExtent(map.getCenter()) && t < 280 && Math.abs(dy) + Math.abs(dx) > 5) {\n t = 5 * t * (Math.abs(dx) + Math.abs(dy)) / 500;\n map.panBy(new Point(dx, dy), { 'duration': t });\n } else {\n map.onMoveEnd(param);\n }\n };\n\n MapDragHandler.prototype._rotateStart = function _rotateStart(param) {\n this._start(param);\n delete this._rotateMode;\n this.startBearing = this.target.getBearing();\n this.target.onDragRotateStart(param);\n this._db = 0;\n };\n\n MapDragHandler.prototype._rotating = function _rotating(param) {\n var map = this.target;\n var mx = param['mousePos'].x,\n my = param['mousePos'].y;\n var prePitch = map.getPitch(),\n preBearing = map.getBearing();\n var dx = Math.abs(mx - this.preX),\n dy = Math.abs(my - this.preY);\n\n if (!this._rotateMode) {\n if (map.options['dragRotatePitch']) {\n this._rotateMode = 'rotate_pitch';\n } else if (dx > dy) {\n this._rotateMode = 'rotate';\n } else if (dx < dy) {\n this._rotateMode = 'pitch';\n } else {\n this._rotateMode = 'rotate';\n }\n }\n\n if (this._rotateMode === 'pitch' && prePitch === 0 && dy < 10) {\n return;\n }\n\n if (this._rotateMode.indexOf('rotate') >= 0 && map.options['dragRotate']) {\n\n var db = 0;\n if (map.options['dragPitch'] || dx > dy) {\n db = -0.6 * (this.preX - mx);\n } else if (mx > map.width / 2) {\n db = 0.6 * (this.preY - my);\n } else {\n db = -0.6 * (this.preY - my);\n }\n var bearing = map.getBearing() + db;\n this._db = this._db || 0;\n this._db += db;\n\n map.setBearing(bearing);\n }\n if (this._rotateMode.indexOf('pitch') >= 0 && map.options['dragPitch']) {\n map.setPitch(map.getPitch() + (this.preY - my) * 0.4);\n }\n this.preX = mx;\n this.preY = my;\n if (map.getBearing() !== preBearing || map.getPitch() !== prePitch) {\n map.onDragRotating(param);\n }\n };\n\n MapDragHandler.prototype._rotateEnd = function _rotateEnd(param) {\n var map = this.target;\n var bearing = map.getBearing();\n this._clear();\n var t = now() - this.startDragTime;\n map.onDragRotateEnd(param);\n if (Math.abs(bearing - this.startBearing) > 20 && (this._rotateMode === 'rotate' || this._rotateMode === 'rotate_pitch') && !param.interupted && t < 400) {\n var _bearing = map.getBearing();\n map.animateTo({\n 'bearing': _bearing + this._db / 2\n }, {\n 'easing': 'out',\n 'duration': 800\n });\n }\n };\n\n MapDragHandler.prototype._clear = function _clear() {\n delete this.startPrjCoord;\n delete this.preX;\n delete this.preY;\n delete this.startX;\n delete this.startY;\n };\n\n return MapDragHandler;\n}(Handler$1);\n\nMap.mergeOptions({\n 'draggable': true,\n 'dragPan': true,\n 'dragRotatePitch': true,\n 'dragRotate': true,\n 'dragPitch': true\n});\n\nMap.addOnLoadHook('addHandler', 'draggable', MapDragHandler);\n\nfunction clipLine(points, bounds, round, noCut) {\n var parts = [];\n var k = 0,\n segment = void 0;\n for (var j = 0, l = points.length; j < l - 1; j++) {\n segment = clipSegment(points[j], points[j + 1], bounds, j, round, noCut);\n\n if (!segment) {\n continue;\n }\n\n parts[k] = parts[k] || [];\n parts[k].push({\n 'point': segment[0],\n 'index': j\n });\n\n if (segment[1] !== points[j + 1] || j === l - 2) {\n parts[k].push({\n 'point': segment[1],\n 'index': j + 1\n });\n k++;\n }\n }\n return parts;\n}\n\nvar _lastCode = void 0;\n\nfunction clipSegment(a, b, bounds, useLastCode, round, noCut) {\n var codeA = useLastCode ? _lastCode : _getBitCode(a, bounds),\n codeB = _getBitCode(b, bounds),\n codeOut = void 0,\n p = void 0,\n newCode = void 0;\n\n _lastCode = codeB;\n\n while (true) {\n if (!(codeA | codeB)) {\n return [a, b];\n }\n\n if (codeA & codeB) {\n return false;\n }\n\n if (noCut) {\n return [a, b];\n }\n\n codeOut = codeA || codeB;\n p = _getEdgeIntersection(a, b, codeOut, bounds, round);\n newCode = _getBitCode(p, bounds);\n\n if (codeOut === codeA) {\n a = p;\n codeA = newCode;\n } else {\n b = p;\n codeB = newCode;\n }\n }\n}\n\nfunction clipPolygon(points, bounds, round) {\n var edges = [1, 4, 2, 8];\n var clippedPoints = void 0,\n i = void 0,\n j = void 0,\n k = void 0,\n a = void 0,\n b = void 0,\n len = void 0,\n edge = void 0,\n p = void 0;\n\n for (i = 0, len = points.length; i < len; i++) {\n points[i]._code = _getBitCode(points[i], bounds);\n }\n\n for (k = 0; k < 4; k++) {\n edge = edges[k];\n clippedPoints = [];\n\n for (i = 0, len = points.length, j = len - 1; i < len; j = i++) {\n a = points[i];\n b = points[j];\n\n if (!(a._code & edge)) {\n if (b._code & edge) {\n p = _getEdgeIntersection(b, a, edge, bounds, round);\n p._code = _getBitCode(p, bounds);\n clippedPoints.push(p);\n }\n clippedPoints.push(a);\n } else if (!(b._code & edge)) {\n p = _getEdgeIntersection(b, a, edge, bounds, round);\n p._code = _getBitCode(p, bounds);\n clippedPoints.push(p);\n }\n }\n points = clippedPoints;\n }\n\n return points;\n}\n\n\n\n\n\nfunction _getEdgeIntersection(a, b, code, bounds, round) {\n var dx = b.x - a.x,\n dy = b.y - a.y,\n min = bounds.getMin(),\n max = bounds.getMax();\n var x = void 0,\n y = void 0;\n\n if (code & 8) {\n x = a.x + dx * (max.y - a.y) / dy;\n y = max.y;\n } else if (code & 4) {\n x = a.x + dx * (min.y - a.y) / dy;\n y = min.y;\n } else if (code & 2) {\n x = max.x;\n y = a.y + dy * (max.x - a.x) / dx;\n } else if (code & 1) {\n x = min.x;\n y = a.y + dy * (min.x - a.x) / dx;\n }\n\n var p = new Point(x, y);\n if (round) {\n p._round();\n }\n return p;\n}\n\nfunction _getBitCode(p, bounds) {\n var code = 0;\n\n if (p.x < bounds.getMin().x) {\n code |= 1;\n } else if (p.x > bounds.getMax().x) {\n code |= 2;\n }\n\n if (p.y < bounds.getMin().y) {\n code |= 4;\n } else if (p.y > bounds.getMax().y) {\n code |= 8;\n }\n\n return code;\n}\n\nfunction withInEllipse(point, center, southeast, tolerance) {\n point = new Point(point);\n var a = Math.abs(southeast.x - center.x),\n b = Math.abs(southeast.y - center.y),\n c = Math.sqrt(Math.abs(a * a - b * b)),\n xfocus = a >= b;\n var f1 = void 0,\n f2 = void 0,\n d = void 0;\n if (xfocus) {\n f1 = new Point(center.x - c, center.y);\n f2 = new Point(center.x + c, center.y);\n d = a * 2;\n } else {\n f1 = new Point(center.x, center.y - c);\n f2 = new Point(center.x, center.y + c);\n d = b * 2;\n }\n\n return point.distanceTo(f1) + point.distanceTo(f2) <= d + 2 * tolerance;\n}\n\nvar Symbolizer = function () {\n function Symbolizer() {\n classCallCheck(this, Symbolizer);\n }\n\n Symbolizer.prototype.getMap = function getMap() {\n return this.geometry.getMap();\n };\n\n Symbolizer.prototype.getPainter = function getPainter() {\n return this.painter;\n };\n\n Symbolizer.testColor = function testColor(prop) {\n if (!prop || !isString(prop)) {\n return false;\n }\n if (COLOR_PROPERTIES.indexOf(prop) >= 0) {\n return true;\n }\n return false;\n };\n\n return Symbolizer;\n}();\n\nvar CanvasSymbolizer = function (_Symbolizer) {\n inherits(CanvasSymbolizer, _Symbolizer);\n\n function CanvasSymbolizer() {\n classCallCheck(this, CanvasSymbolizer);\n return possibleConstructorReturn(this, _Symbolizer.apply(this, arguments));\n }\n\n CanvasSymbolizer.prototype._prepareContext = function _prepareContext(ctx) {\n if (isNumber(this.symbol['opacity'])) {\n if (ctx.globalAlpha !== this.symbol['opacity']) {\n ctx.globalAlpha = this.symbol['opacity'];\n }\n } else if (ctx.globalAlpha !== 1) {\n ctx.globalAlpha = 1;\n }\n };\n\n CanvasSymbolizer.prototype.prepareCanvas = function prepareCanvas(ctx, style, resources) {\n Canvas.prepareCanvas(ctx, style, resources, this.getPainter().isHitTesting());\n };\n\n CanvasSymbolizer.prototype.remove = function remove() {};\n\n CanvasSymbolizer.prototype.setZIndex = function setZIndex() {};\n\n CanvasSymbolizer.prototype.show = function show() {};\n\n CanvasSymbolizer.prototype.hide = function hide() {};\n\n CanvasSymbolizer.prototype._defineStyle = function _defineStyle(style) {\n return function () {\n var _this2 = this;\n\n var arr = [],\n prop = {};\n return loadFunctionTypes(style, function () {\n var map = _this2.getMap();\n return set$1(arr, map.getZoom(), extend({}, _this2.geometry.getProperties(), setProp(prop, map.getBearing(), map.getPitch(), map.getZoom())));\n });\n }.bind(this)();\n };\n\n return CanvasSymbolizer;\n}(Symbolizer);\n\nfunction set$1(arr, a0, a1) {\n arr[0] = a0;\n arr[1] = a1;\n return arr;\n}\n\nfunction setProp(prop, b, p, z) {\n prop['{bearing}'] = b;\n prop['{pitch}'] = p;\n prop['{zoom}'] = z;\n return prop;\n}\n\nvar PointSymbolizer = function (_CanvasSymbolizer) {\n inherits(PointSymbolizer, _CanvasSymbolizer);\n\n function PointSymbolizer(symbol, geometry, painter) {\n classCallCheck(this, PointSymbolizer);\n\n var _this = possibleConstructorReturn(this, _CanvasSymbolizer.call(this));\n\n _this.symbol = symbol;\n _this.geometry = geometry;\n _this.painter = painter;\n return _this;\n }\n\n PointSymbolizer.prototype.get2DExtent = function get2DExtent() {\n var map = this.getMap();\n var glZoom = map.getGLZoom();\n var extent = new PointExtent();\n var renderPoints = this._getRenderPoints()[0];\n for (var i = renderPoints.length - 1; i >= 0; i--) {\n if (renderPoints[i]) {\n extent._combine(map._pointToPoint(renderPoints[i], glZoom));\n }\n }\n return extent;\n };\n\n PointSymbolizer.prototype._rotateExtent = function _rotateExtent(fixedExtent, angle) {\n return fixedExtent.convertTo(function (p) {\n return p._rotate(angle);\n });\n };\n\n PointSymbolizer.prototype._getRenderPoints = function _getRenderPoints() {\n return this.getPainter().getRenderPoints(this.getPlacement());\n };\n\n PointSymbolizer.prototype._getRenderContainerPoints = function _getRenderContainerPoints(ignoreAltitude) {\n var painter = this.getPainter(),\n points = this._getRenderPoints()[0];\n if (painter.isSpriting()) {\n return points;\n }\n var dxdy = this.getDxDy();\n var cpoints = this.painter._pointContainerPoints(points, dxdy.x, dxdy.y, ignoreAltitude, true, this.getPlacement());\n if (!cpoints || !Array.isArray(cpoints[0])) {\n return cpoints;\n }\n var flat = [];\n for (var i = 0, l = cpoints.length; i < l; i++) {\n for (var ii = 0, ll = cpoints[i].length; ii < ll; ii++) {\n flat.push(cpoints[i][ii]);\n }\n }\n return flat;\n };\n\n PointSymbolizer.prototype._getRotationAt = function _getRotationAt(i) {\n var r = this.getRotation();\n if (!r) {\n r = 0;\n }\n var rotations = this._getRenderPoints()[1];\n if (!rotations || !rotations[i]) {\n return r;\n }\n\n var map = this.getMap();\n var p0 = rotations[i][0],\n p1 = rotations[i][1];\n if (map.isTransforming()) {\n var maxZoom = map.getGLZoom();\n p0 = map._pointToContainerPoint(rotations[i][0], maxZoom);\n p1 = map._pointToContainerPoint(rotations[i][1], maxZoom);\n }\n return r + computeDegree(p0.x, p0.y, p1.x, p1.y);\n };\n\n PointSymbolizer.prototype._rotate = function _rotate(ctx, origin, rotation) {\n if (rotation) {\n var dxdy = this.getDxDy();\n var p = origin.sub(dxdy);\n ctx.save();\n ctx.translate(p.x, p.y);\n ctx.rotate(rotation);\n return this.getDxDy();\n }\n return null;\n };\n\n return PointSymbolizer;\n}(CanvasSymbolizer);\n\nvar VectorMarkerSymbolizer = function (_PointSymbolizer) {\n inherits(VectorMarkerSymbolizer, _PointSymbolizer);\n\n VectorMarkerSymbolizer.test = function test(symbol) {\n if (!symbol) {\n return false;\n }\n if (isNil(symbol['markerFile']) && !isNil(symbol['markerType']) && symbol['markerType'] !== 'path') {\n return true;\n }\n return false;\n };\n\n function VectorMarkerSymbolizer(symbol, geometry, painter) {\n classCallCheck(this, VectorMarkerSymbolizer);\n\n var _this = possibleConstructorReturn(this, _PointSymbolizer.call(this, symbol, geometry, painter));\n\n _this._dynamic = hasFunctionDefinition(symbol);\n _this.style = _this._defineStyle(_this.translate());\n _this.strokeAndFill = _this._defineStyle(VectorMarkerSymbolizer.translateLineAndFill(_this.style));\n var lineWidth = _this.strokeAndFill['lineWidth'];\n if (lineWidth % 2 === 0) {\n _this.padding = 2;\n } else {\n _this.padding = 1.5;\n }\n return _this;\n }\n\n VectorMarkerSymbolizer.prototype.symbolize = function symbolize(ctx, resources) {\n var style = this.style;\n if (!this.painter.isHitTesting() && (style['markerWidth'] === 0 || style['markerHeight'] === 0 || style['polygonOpacity'] === 0 && style['lineOpacity'] === 0)) {\n return;\n }\n var cookedPoints = this._getRenderContainerPoints();\n if (!isArrayHasData(cookedPoints)) {\n return;\n }\n this._prepareContext(ctx);\n if (this.getPainter().isSpriting() || this.geometry.getLayer().getMask() === this.geometry || this._dynamic || this.geometry.getLayer().options['cacheVectorOnCanvas'] === false) {\n this._drawMarkers(ctx, cookedPoints, resources);\n } else {\n this._drawMarkersWithCache(ctx, cookedPoints, resources);\n }\n };\n\n VectorMarkerSymbolizer.prototype.getDxDy = function getDxDy() {\n var s = this.style;\n var dx = s['markerDx'],\n dy = s['markerDy'];\n return new Point(dx, dy);\n };\n\n VectorMarkerSymbolizer.prototype._drawMarkers = function _drawMarkers(ctx, cookedPoints, resources) {\n var strokeAndFill = this.strokeAndFill;\n var gradient = isGradient(strokeAndFill['lineColor']) || isGradient(strokeAndFill['polygonFill']);\n if (!gradient) {\n this.prepareCanvas(ctx, strokeAndFill, resources);\n }\n for (var i = cookedPoints.length - 1; i >= 0; i--) {\n var point = cookedPoints[i];\n var origin = this._rotate(ctx, point, this._getRotationAt(i));\n if (origin) {\n point = origin;\n }\n\n this._drawVectorMarker(ctx, point, resources);\n if (origin) {\n ctx.restore();\n }\n }\n };\n\n VectorMarkerSymbolizer.prototype._drawMarkersWithCache = function _drawMarkersWithCache(ctx, cookedPoints, resources) {\n var stamp = this._stampSymbol();\n var image = resources.getImage(stamp);\n if (!image) {\n image = this._createMarkerImage(ctx, resources);\n resources.addResource([stamp, image.width, image.height], image);\n }\n var anchor = this._getAnchor(image.width, image.height);\n for (var i = cookedPoints.length - 1; i >= 0; i--) {\n var point = cookedPoints[i];\n var origin = this._rotate(ctx, point, this._getRotationAt(i));\n if (origin) {\n point = origin;\n }\n Canvas.image(ctx, image, point.x + anchor.x, point.y + anchor.y);\n if (origin) {\n ctx.restore();\n }\n }\n };\n\n VectorMarkerSymbolizer.prototype._calMarkerSize = function _calMarkerSize() {\n if (!this._size) {\n var lineWidth = this.strokeAndFill['lineWidth'],\n shadow = 2 * (this.symbol['shadowBlur'] || 0),\n w = Math.round(this.style['markerWidth'] + lineWidth + 2 * shadow + this.padding * 2),\n h = Math.round(this.style['markerHeight'] + lineWidth + 2 * shadow + this.padding * 2);\n this._size = [w, h];\n }\n return this._size;\n };\n\n VectorMarkerSymbolizer.prototype._createMarkerImage = function _createMarkerImage(ctx, resources) {\n var canvasClass = ctx.canvas.constructor,\n size = this._calMarkerSize(),\n canvas = Canvas.createCanvas(size[0], size[1], canvasClass),\n point = this._getCacheImageAnchor(size[0], size[1]);\n var context = canvas.getContext('2d');\n var gradient = isGradient(this.strokeAndFill['lineColor']) || isGradient(this.strokeAndFill['polygonFill']);\n if (!gradient) {\n this.prepareCanvas(context, this.strokeAndFill, resources);\n }\n this._drawVectorMarker(context, point, resources);\n return canvas;\n };\n\n VectorMarkerSymbolizer.prototype._stampSymbol = function _stampSymbol() {\n if (!this._stamp) {\n this._stamp = [this.style['markerType'], isGradient(this.style['markerFill']) ? getGradientStamp(this.style['markerFill']) : this.style['markerFill'], this.style['markerFillOpacity'], this.style['markerFillPatternFile'], isGradient(this.style['markerLineColor']) ? getGradientStamp(this.style['markerLineColor']) : this.style['markerLineColor'], this.style['markerLineWidth'], this.style['markerLineOpacity'], this.style['markerLineDasharray'] ? this.style['markerLineDasharray'].join(',') : '', this.style['markerLinePatternFile'], this.style['markerWidth'], this.style['markerHeight'], this.style['markerHorizontalAlignment'], this.style['markerVerticalAlignment']].join('_');\n }\n return this._stamp;\n };\n\n VectorMarkerSymbolizer.prototype._getAnchor = function _getAnchor(w, h) {\n var shadow = 2 * (this.symbol['shadowBlur'] || 0),\n margin = shadow + this.padding;\n var p = getAlignPoint(new Size(w, h), this.style['markerHorizontalAlignment'], this.style['markerVerticalAlignment']);\n if (p.x !== -w / 2) {\n p.x -= sign(p.x + w / 2) * margin;\n }\n if (p.y !== -h / 2) {\n p.y -= sign(p.y + h / 2) * margin;\n }\n return p;\n };\n\n VectorMarkerSymbolizer.prototype._getCacheImageAnchor = function _getCacheImageAnchor(w, h) {\n var shadow = 2 * (this.symbol['shadowBlur'] || 0),\n margin = shadow + this.padding;\n var markerType = this.style['markerType'];\n if (markerType === 'bar' || markerType === 'pie' || markerType === 'pin') {\n return new Point(w / 2, h - margin);\n } else if (markerType === 'rectangle') {\n return new Point(margin, margin);\n } else {\n return new Point(w / 2, h / 2);\n }\n };\n\n VectorMarkerSymbolizer.prototype._getGraidentExtent = function _getGraidentExtent(points) {\n var e = new PointExtent(),\n dxdy = this.getDxDy(),\n m = this.getFixedExtent();\n if (Array.isArray(points)) {\n for (var i = points.length - 1; i >= 0; i--) {\n e._combine(points[i]);\n }\n } else {\n e._combine(points);\n }\n e['xmin'] += m['xmin'] - dxdy.x;\n e['ymin'] += m['ymin'] - dxdy.y;\n e['xmax'] += m['xmax'] - dxdy.x;\n e['ymax'] += m['ymax'] - dxdy.y;\n return e;\n };\n\n VectorMarkerSymbolizer.prototype._drawVectorMarker = function _drawVectorMarker(ctx, point, resources) {\n var style = this.style,\n strokeAndFill = this.strokeAndFill,\n markerType = style['markerType'].toLowerCase(),\n vectorArray = VectorMarkerSymbolizer._getVectorPoints(markerType, style['markerWidth'], style['markerHeight']),\n lineOpacity = strokeAndFill['lineOpacity'],\n fillOpacity = strokeAndFill['polygonOpacity'];\n var gradient = isGradient(strokeAndFill['lineColor']) || isGradient(strokeAndFill['polygonFill']);\n if (gradient) {\n var gradientExtent = void 0;\n if (isGradient(strokeAndFill['lineColor'])) {\n gradientExtent = this._getGraidentExtent(point);\n strokeAndFill['lineGradientExtent'] = gradientExtent.expand(strokeAndFill['lineWidth']);\n }\n if (isGradient(strokeAndFill['polygonFill'])) {\n if (!gradientExtent) {\n gradientExtent = this._getGraidentExtent(point);\n }\n strokeAndFill['polygonGradientExtent'] = gradientExtent;\n }\n this.prepareCanvas(ctx, strokeAndFill, resources);\n }\n\n var width = style['markerWidth'],\n height = style['markerHeight'],\n hLineWidth = style['markerLineWidth'] / 2;\n if (markerType === 'ellipse') {\n Canvas.ellipse(ctx, point, width / 2, height / 2, lineOpacity, fillOpacity);\n } else if (markerType === 'cross' || markerType === 'x') {\n for (var j = vectorArray.length - 1; j >= 0; j--) {\n vectorArray[j]._add(point);\n }\n\n Canvas.path(ctx, vectorArray.slice(0, 2), lineOpacity);\n Canvas.path(ctx, vectorArray.slice(2, 4), lineOpacity);\n } else if (markerType === 'diamond' || markerType === 'bar' || markerType === 'square' || markerType === 'rectangle' || markerType === 'triangle') {\n if (markerType === 'bar') {\n point = point.add(0, -hLineWidth);\n } else if (markerType === 'rectangle') {\n point = point.add(hLineWidth, hLineWidth);\n }\n for (var _j = vectorArray.length - 1; _j >= 0; _j--) {\n vectorArray[_j]._add(point);\n }\n\n Canvas.polygon(ctx, vectorArray, lineOpacity, fillOpacity);\n } else if (markerType === 'pin') {\n point = point.add(0, -hLineWidth);\n for (var _j2 = vectorArray.length - 1; _j2 >= 0; _j2--) {\n vectorArray[_j2]._add(point);\n }\n var lineCap = ctx.lineCap;\n ctx.lineCap = 'round';\n Canvas.bezierCurveAndFill(ctx, vectorArray, lineOpacity, fillOpacity);\n ctx.lineCap = lineCap;\n } else if (markerType === 'pie') {\n point = point.add(0, -hLineWidth);\n var angle = Math.atan(width / 2 / height) * 180 / Math.PI;\n var _lineCap = ctx.lineCap;\n ctx.lineCap = 'round';\n Canvas.sector(ctx, point, height, [90 - angle, 90 + angle], lineOpacity, fillOpacity);\n ctx.lineCap = _lineCap;\n } else {\n throw new Error('unsupported markerType: ' + markerType);\n }\n };\n\n VectorMarkerSymbolizer.prototype.getPlacement = function getPlacement() {\n return this.symbol['markerPlacement'];\n };\n\n VectorMarkerSymbolizer.prototype.getRotation = function getRotation() {\n var r = this.style['markerRotation'];\n if (!isNumber(r)) {\n return null;\n }\n\n return -r * Math.PI / 180;\n };\n\n VectorMarkerSymbolizer.prototype.getFixedExtent = function getFixedExtent() {\n var dxdy = this.getDxDy(),\n padding = this.padding * 2;\n var size = this._calMarkerSize().map(function (d) {\n return d - padding;\n });\n var alignPoint = this._getAnchor(size[0], size[1]);\n var result = new PointExtent(dxdy.add(0, 0), dxdy.add(size[0], size[1]));\n result._add(alignPoint);\n var rotation = this.getRotation();\n if (rotation) {\n result = this._rotateExtent(result, rotation);\n }\n\n return result;\n };\n\n VectorMarkerSymbolizer.prototype.translate = function translate() {\n var s = this.symbol;\n var result = {\n 'markerType': getValueOrDefault(s['markerType'], 'ellipse'),\n 'markerFill': getValueOrDefault(s['markerFill'], '#00f'),\n 'markerFillOpacity': getValueOrDefault(s['markerFillOpacity'], 1),\n 'markerFillPatternFile': getValueOrDefault(s['markerFillPatternFile'], null),\n 'markerLineColor': getValueOrDefault(s['markerLineColor'], '#000'),\n 'markerLineWidth': getValueOrDefault(s['markerLineWidth'], 1),\n 'markerLineOpacity': getValueOrDefault(s['markerLineOpacity'], 1),\n 'markerLineDasharray': getValueOrDefault(s['markerLineDasharray'], []),\n 'markerLinePatternFile': getValueOrDefault(s['markerLinePatternFile'], null),\n\n 'markerDx': getValueOrDefault(s['markerDx'], 0),\n 'markerDy': getValueOrDefault(s['markerDy'], 0),\n\n 'markerWidth': getValueOrDefault(s['markerWidth'], 10),\n 'markerHeight': getValueOrDefault(s['markerHeight'], 10),\n\n 'markerRotation': getValueOrDefault(s['markerRotation'], 0)\n };\n var markerType = result['markerType'];\n var ha = void 0,\n va = void 0;\n if (markerType === 'bar' || markerType === 'pie' || markerType === 'pin') {\n ha = 'middle';\n va = 'top';\n } else if (markerType === 'rectangle') {\n ha = 'right';\n va = 'bottom';\n } else {\n ha = 'middle';\n va = 'middle';\n }\n\n result['markerHorizontalAlignment'] = getValueOrDefault(s['markerHorizontalAlignment'], ha);\n result['markerVerticalAlignment'] = getValueOrDefault(s['markerVerticalAlignment'], va);\n if (isNumber(s['markerOpacity'])) {\n if (isNumber(s['markerFillOpacity'])) {\n result['markerFillOpacity'] *= s['markerOpacity'];\n }\n if (isNumber(s['markerLineOpacity'])) {\n result['markerLineOpacity'] *= s['markerOpacity'];\n }\n }\n return result;\n };\n\n VectorMarkerSymbolizer.translateLineAndFill = function translateLineAndFill(s) {\n var result = {\n 'lineColor': s['markerLineColor'],\n 'linePatternFile': s['markerLinePatternFile'],\n 'lineWidth': s['markerLineWidth'],\n 'lineOpacity': s['markerLineOpacity'],\n 'lineDasharray': s['markerLineDasharray'],\n 'lineCap': 'butt',\n 'lineJoin': 'round',\n 'polygonFill': s['markerFill'],\n 'polygonPatternFile': s['markerFillPatternFile'],\n 'polygonOpacity': s['markerFillOpacity']\n };\n if (result['lineWidth'] === 0) {\n result['lineOpacity'] = 0;\n }\n return result;\n };\n\n VectorMarkerSymbolizer._getVectorPoints = function _getVectorPoints(markerType, width, height) {\n var hh = height / 2,\n hw = width / 2;\n var left = 0,\n top = 0;\n var v0 = void 0,\n v1 = void 0,\n v2 = void 0,\n v3 = void 0;\n if (markerType === 'triangle') {\n v0 = new Point(left, top - hh);\n v1 = new Point(left - hw, top + hh);\n v2 = new Point(left + hw, top + hh);\n return [v0, v1, v2];\n } else if (markerType === 'cross') {\n v0 = new Point(left - hw, top);\n v1 = new Point(left + hw, top);\n v2 = new Point(left, top - hh);\n v3 = new Point(left, top + hh);\n return [v0, v1, v2, v3];\n } else if (markerType === 'diamond') {\n v0 = new Point(left - hw, top);\n v1 = new Point(left, top - hh);\n v2 = new Point(left + hw, top);\n v3 = new Point(left, top + hh);\n return [v0, v1, v2, v3];\n } else if (markerType === 'square') {\n v0 = new Point(left - hw, top + hh);\n v1 = new Point(left + hw, top + hh);\n v2 = new Point(left + hw, top - hh);\n v3 = new Point(left - hw, top - hh);\n return [v0, v1, v2, v3];\n } else if (markerType === 'rectangle') {\n v0 = new Point(left, top);\n v1 = v0.add(width, 0);\n v2 = v0.add(width, height);\n v3 = v0.add(0, height);\n return [v0, v1, v2, v3];\n } else if (markerType === 'x') {\n v0 = new Point(left - hw, top + hh);\n v1 = new Point(left + hw, top - hh);\n v2 = new Point(left + hw, top + hh);\n v3 = new Point(left - hw, top - hh);\n return [v0, v1, v2, v3];\n } else if (markerType === 'bar') {\n v0 = new Point(left - hw, top - height);\n v1 = new Point(left + hw, top - height);\n v2 = new Point(left + hw, top);\n v3 = new Point(left - hw, top);\n return [v0, v1, v2, v3];\n } else if (markerType === 'pin') {\n var extWidth = height * Math.atan(hw / hh);\n v0 = new Point(left, top);\n v1 = new Point(left - extWidth, top - height);\n v2 = new Point(left + extWidth, top - height);\n v3 = new Point(left, top);\n return [v0, v1, v2, v3];\n }\n return [];\n };\n\n return VectorMarkerSymbolizer;\n}(PointSymbolizer);\n\nvar DebugSymbolizer = function (_PointSymbolizer) {\n inherits(DebugSymbolizer, _PointSymbolizer);\n\n function DebugSymbolizer() {\n classCallCheck(this, DebugSymbolizer);\n return possibleConstructorReturn(this, _PointSymbolizer.apply(this, arguments));\n }\n\n DebugSymbolizer.prototype.getPlacement = function getPlacement() {\n return 'point';\n };\n\n DebugSymbolizer.prototype.getDxDy = function getDxDy() {\n return new Point(0, 0);\n };\n\n DebugSymbolizer.prototype.symbolize = function symbolize(ctx) {\n var geometry = this.geometry,\n layer = geometry.getLayer();\n if (!geometry.options['debug'] && layer && !layer.options['debug']) {\n return;\n }\n var map = this.getMap();\n if (!map || map.isZooming()) {\n return;\n }\n var color = layer.options['debugOutline'],\n op = 1;\n ctx.strokeStyle = color;\n ctx.fillStyle = color;\n\n var outline = this.getPainter().getContainerExtent().toArray();\n Canvas.polygon(ctx, [outline], op, 0);\n\n var points = this._getRenderContainerPoints(),\n id = this.geometry.getId(),\n cross = VectorMarkerSymbolizer._getVectorPoints('cross', 10, 10);\n for (var i = 0; i < points.length; i++) {\n var p = points[i];\n if (!isNil(id)) {\n Canvas.fillText(ctx, id, p.add(8, -4), color);\n }\n var c = [];\n for (var ii = 0; ii < cross.length; ii++) {\n c.push(cross[ii].add(p));\n }\n Canvas.path(ctx, c.slice(0, 2), op);\n Canvas.path(ctx, c.slice(2, 4), op);\n }\n };\n\n return DebugSymbolizer;\n}(PointSymbolizer);\n\nvar ImageMarkerSymbolizer = function (_PointSymbolizer) {\n inherits(ImageMarkerSymbolizer, _PointSymbolizer);\n\n ImageMarkerSymbolizer.test = function test(symbol) {\n if (!symbol) {\n return false;\n }\n if (!isNil(symbol['markerFile'])) {\n return true;\n }\n return false;\n };\n\n function ImageMarkerSymbolizer(symbol, geometry, painter) {\n classCallCheck(this, ImageMarkerSymbolizer);\n\n var _this = possibleConstructorReturn(this, _PointSymbolizer.call(this, symbol, geometry, painter));\n\n _this.style = _this._defineStyle(_this.translate());\n return _this;\n }\n\n ImageMarkerSymbolizer.prototype.symbolize = function symbolize(ctx, resources) {\n var style = this.style;\n if (!this.painter.isHitTesting() && (style['markerWidth'] === 0 || style['markerHeight'] === 0 || style['markerOpacity'] === 0)) {\n return;\n }\n var cookedPoints = this._getRenderContainerPoints();\n if (!isArrayHasData(cookedPoints)) {\n return;\n }\n\n var img = this._getImage(resources);\n if (!img) {\n if (typeof console !== 'undefined') {\n console.warn('no img found for ' + (this.style['markerFile'] || this._url[0]));\n }\n return;\n }\n this._prepareContext(ctx);\n var width = style['markerWidth'];\n var height = style['markerHeight'];\n if (!isNumber(width) || !isNumber(height)) {\n width = img.width;\n height = img.height;\n style['markerWidth'] = width;\n style['markerHeight'] = height;\n var imgURL = [style['markerFile'], style['markerWidth'], style['markerHeight']];\n if (!resources.isResourceLoaded(imgURL)) {\n resources.addResource(imgURL, img);\n }\n var painter = this.getPainter();\n if (!painter.isSpriting()) {\n painter.removeCache();\n }\n }\n var alpha = void 0;\n\n if (this.symbol['markerType'] !== 'path' && isNumber(style['markerOpacity']) && style['markerOpacity'] < 1) {\n alpha = ctx.globalAlpha;\n ctx.globalAlpha *= style['markerOpacity'];\n }\n var alignPoint = getAlignPoint(new Size(width, height), style['markerHorizontalAlignment'], style['markerVerticalAlignment']);\n for (var i = 0, len = cookedPoints.length; i < len; i++) {\n var p = cookedPoints[i];\n var origin = this._rotate(ctx, p, this._getRotationAt(i));\n if (origin) {\n p = origin;\n }\n Canvas.image(ctx, img, p.x + alignPoint.x, p.y + alignPoint.y, width, height);\n if (origin) {\n ctx.restore();\n }\n }\n if (alpha !== undefined) {\n ctx.globalAlpha = alpha;\n }\n };\n\n ImageMarkerSymbolizer.prototype._getImage = function _getImage(resources) {\n var img = !resources ? null : resources.getImage([this.style['markerFile'], this.style['markerWidth'], this.style['markerHeight']]);\n return img;\n };\n\n ImageMarkerSymbolizer.prototype.getPlacement = function getPlacement() {\n return this.symbol['markerPlacement'];\n };\n\n ImageMarkerSymbolizer.prototype.getRotation = function getRotation() {\n var r = this.style['markerRotation'];\n if (!isNumber(r)) {\n return null;\n }\n\n return -r * Math.PI / 180;\n };\n\n ImageMarkerSymbolizer.prototype.getDxDy = function getDxDy() {\n var s = this.style;\n var dx = s['markerDx'],\n dy = s['markerDy'];\n return new Point(dx, dy);\n };\n\n ImageMarkerSymbolizer.prototype.getFixedExtent = function getFixedExtent(resources) {\n var style = this.style;\n var url = style['markerFile'],\n img = resources ? resources.getImage(url) : null;\n var width = style['markerWidth'] || (img ? img.width : 0),\n height = style['markerHeight'] || (img ? img.height : 0);\n var dxdy = this.getDxDy();\n var alignPoint = getAlignPoint(new Size(width, height), style['markerHorizontalAlignment'], style['markerVerticalAlignment']);\n var result = new PointExtent(dxdy.add(0, 0), dxdy.add(width, height));\n result._add(alignPoint);\n var rotation = this.getRotation();\n if (rotation) {\n result = this._rotateExtent(result, rotation);\n }\n return result;\n };\n\n ImageMarkerSymbolizer.prototype.translate = function translate() {\n var s = this.symbol;\n return {\n 'markerFile': s['markerFile'],\n 'markerOpacity': getValueOrDefault(s['markerOpacity'], 1),\n 'markerWidth': getValueOrDefault(s['markerWidth'], null),\n 'markerHeight': getValueOrDefault(s['markerHeight'], null),\n 'markerRotation': getValueOrDefault(s['markerRotation'], 0),\n\n 'markerDx': getValueOrDefault(s['markerDx'], 0),\n 'markerDy': getValueOrDefault(s['markerDy'], 0),\n\n 'markerHorizontalAlignment': getValueOrDefault(s['markerHorizontalAlignment'], 'middle'),\n 'markerVerticalAlignment': getValueOrDefault(s['markerVerticalAlignment'], 'top') };\n };\n\n return ImageMarkerSymbolizer;\n}(PointSymbolizer);\n\nvar StrokeAndFillSymbolizer = function (_CanvasSymbolizer) {\n inherits(StrokeAndFillSymbolizer, _CanvasSymbolizer);\n\n StrokeAndFillSymbolizer.test = function test(symbol, geometry) {\n if (!symbol) {\n return false;\n }\n if (geometry && geometry.type === 'Point') {\n return false;\n }\n for (var p in symbol) {\n var f = p.slice(0, 4);\n if (f === 'line' || f === 'poly') {\n return true;\n }\n }\n return false;\n };\n\n function StrokeAndFillSymbolizer(symbol, geometry, painter) {\n classCallCheck(this, StrokeAndFillSymbolizer);\n\n var _this = possibleConstructorReturn(this, _CanvasSymbolizer.call(this));\n\n _this.symbol = symbol;\n _this.geometry = geometry;\n _this.painter = painter;\n if (geometry.type === 'Point') {\n return possibleConstructorReturn(_this);\n }\n _this.style = _this._defineStyle(_this.translate());\n return _this;\n }\n\n StrokeAndFillSymbolizer.prototype.symbolize = function symbolize(ctx, resources) {\n var style = this.style;\n if (style['polygonOpacity'] === 0 && style['lineOpacity'] === 0 && !this.painter.isHitTesting()) {\n return;\n }\n var paintParams = this._getPaintParams();\n if (!paintParams) {\n return;\n }\n this._prepareContext(ctx);\n var isGradient$$1 = isGradient(style['lineColor']),\n isPath = this.geometry.getJSONType() === 'Polygon' || this.geometry.type === 'LineString';\n if (isGradient$$1 && (style['lineColor']['places'] || !isPath)) {\n style['lineGradientExtent'] = this.getPainter().getContainerExtent()._expand(style['lineWidth']);\n }\n if (isGradient(style['polygonFill'])) {\n style['polygonGradientExtent'] = this.getPainter().getContainerExtent();\n }\n\n var points = paintParams[0],\n isSplitted = this.geometry.getJSONType() === 'Polygon' && points.length > 0 && Array.isArray(points[0][0]) || this.geometry.type === 'LineString' && points.length > 0 && Array.isArray(points[0]);\n\n if (isSplitted) {\n for (var i = 0; i < points.length; i++) {\n this.prepareCanvas(ctx, style, resources);\n if (isGradient$$1 && isPath && !style['lineColor']['places']) {\n this._createGradient(ctx, points[i], style['lineColor']);\n }\n var params = [ctx, points[i]];\n if (paintParams.length > 1) {\n params.push.apply(params, paintParams.slice(1));\n }\n params.push(style['lineOpacity'], style['polygonOpacity'], style['lineDasharray']);\n this.geometry._paintOn.apply(this.geometry, params);\n }\n } else {\n this.prepareCanvas(ctx, style, resources);\n if (isGradient$$1 && isPath && !style['lineColor']['places']) {\n this._createGradient(ctx, points, style['lineColor']);\n }\n var _params = [ctx];\n _params.push.apply(_params, paintParams);\n _params.push(style['lineOpacity'], style['polygonOpacity'], style['lineDasharray']);\n this.geometry._paintOn.apply(this.geometry, _params);\n }\n\n if (ctx.setLineDash && Array.isArray(style['lineDasharray'])) {\n ctx.setLineDash([]);\n }\n };\n\n StrokeAndFillSymbolizer.prototype.get2DExtent = function get2DExtent() {\n var map = this.getMap();\n var extent = this.geometry._getPrjExtent();\n if (!extent) {\n return null;\n }\n\n if (!this._extMin || !this._extMax) {\n this._extMin = new Coordinate(0, 0);\n this._extMax = new Coordinate(0, 0);\n }\n this._extMin.x = extent['xmin'];\n this._extMin.y = extent['ymin'];\n this._extMax.x = extent['xmax'];\n this._extMax.y = extent['ymax'];\n var min = map._prjToPoint(this._extMin),\n max = map._prjToPoint(this._extMax);\n if (!this._pxExtent) {\n this._pxExtent = new PointExtent(min, max);\n } else {\n this._pxExtent['xmin'] = Math.min(min.x, max.x);\n this._pxExtent['xmax'] = Math.max(min.x, max.x);\n this._pxExtent['ymin'] = Math.min(min.y, max.y);\n this._pxExtent['ymax'] = Math.max(min.y, max.y);\n }\n return this._pxExtent;\n };\n\n StrokeAndFillSymbolizer.prototype.getFixedExtent = function getFixedExtent() {\n var t = this.style['lineWidth'] / 2;\n return new PointExtent(-t, -t, t, t);\n };\n\n StrokeAndFillSymbolizer.prototype._getPaintParams = function _getPaintParams() {\n return this.getPainter().getPaintParams(this.style['lineDx'], this.style['lineDy']);\n };\n\n StrokeAndFillSymbolizer.prototype.translate = function translate() {\n var s = this.symbol;\n var result = {\n 'lineColor': getValueOrDefault(s['lineColor'], '#000'),\n 'lineWidth': getValueOrDefault(s['lineWidth'], 2),\n 'lineOpacity': getValueOrDefault(s['lineOpacity'], 1),\n 'lineDasharray': getValueOrDefault(s['lineDasharray'], []),\n 'lineCap': getValueOrDefault(s['lineCap'], 'butt'),\n 'lineJoin': getValueOrDefault(s['lineJoin'], 'miter'),\n 'linePatternFile': getValueOrDefault(s['linePatternFile'], null),\n 'lineDx': getValueOrDefault(s['lineDx'], 0),\n 'lineDy': getValueOrDefault(s['lineDy'], 0),\n 'polygonFill': getValueOrDefault(s['polygonFill'], null),\n 'polygonOpacity': getValueOrDefault(s['polygonOpacity'], 1),\n 'polygonPatternFile': getValueOrDefault(s['polygonPatternFile'], null),\n 'polygonPatternDx': getValueOrDefault(s['polygonPatternDx'], 0),\n 'polygonPatternDy': getValueOrDefault(s['polygonPatternDy'], 0),\n 'linePatternDx': getValueOrDefault(s['linePatternDx'], 0),\n 'linePatternDy': getValueOrDefault(s['linePatternDy'], 0)\n };\n if (result['lineWidth'] === 0) {\n result['lineOpacity'] = 0;\n }\n\n if (this.geometry.type === 'LineString' && !result['polygonFill']) {\n result['polygonFill'] = result['lineColor'];\n }\n return result;\n };\n\n StrokeAndFillSymbolizer.prototype._createGradient = function _createGradient(ctx, points, lineColor) {\n if (!Array.isArray(points)) {\n return;\n }\n var len = points.length;\n var grad = ctx.createLinearGradient(points[0].x, points[0].y, points[len - 1].x, points[len - 1].y);\n lineColor['colorStops'].forEach(function (stop) {\n grad.addColorStop.apply(grad, stop);\n });\n ctx.strokeStyle = grad;\n };\n\n return StrokeAndFillSymbolizer;\n}(CanvasSymbolizer);\n\nvar CACHE_KEY = '___text_symbol_cache';\n\nvar TextMarkerSymbolizer = function (_PointSymbolizer) {\n inherits(TextMarkerSymbolizer, _PointSymbolizer);\n\n TextMarkerSymbolizer.test = function test(symbol) {\n if (!symbol) {\n return false;\n }\n if (!isNil(symbol['textName'])) {\n return true;\n }\n return false;\n };\n\n function TextMarkerSymbolizer(symbol, geometry, painter) {\n classCallCheck(this, TextMarkerSymbolizer);\n\n var _this = possibleConstructorReturn(this, _PointSymbolizer.call(this, symbol, geometry, painter));\n\n _this._dynamic = hasFunctionDefinition(symbol);\n _this.style = _this._defineStyle(_this.translate());\n if (_this.style['textWrapWidth'] === 0) {\n return possibleConstructorReturn(_this);\n }\n _this.strokeAndFill = _this._defineStyle(_this.translateLineAndFill(_this.style));\n var textContent = replaceVariable(_this.style['textName'], _this.geometry.getProperties());\n if (!_this._dynamic) {\n _this._cacheKey = genCacheKey(textContent, _this.style);\n }\n _this._descText(textContent);\n return _this;\n }\n\n TextMarkerSymbolizer.prototype.symbolize = function symbolize(ctx, resources) {\n if (!this.painter.isHitTesting() && (this.style['textSize'] === 0 || !this.style['textOpacity'] && (!this.style['textHaloRadius'] || !this.style['textHaloOpacity']) || this.style['textWrapWidth'] === 0)) {\n return;\n }\n var cookedPoints = this._getRenderContainerPoints();\n if (!isArrayHasData(cookedPoints)) {\n return;\n }\n var style = this.style,\n strokeAndFill = this.strokeAndFill;\n var textContent = replaceVariable(this.style['textName'], this.geometry.getProperties());\n this._descText(textContent);\n this._prepareContext(ctx);\n this.prepareCanvas(ctx, strokeAndFill, resources);\n Canvas.prepareCanvasFont(ctx, style);\n for (var i = 0, len = cookedPoints.length; i < len; i++) {\n var p = cookedPoints[i];\n var origin = this._rotate(ctx, p, this._getRotationAt(i));\n if (origin) {\n p = origin;\n }\n Canvas.text(ctx, textContent, p, style, this.textDesc);\n if (origin) {\n ctx.restore();\n }\n }\n };\n\n TextMarkerSymbolizer.prototype.getPlacement = function getPlacement() {\n return this.symbol['textPlacement'];\n };\n\n TextMarkerSymbolizer.prototype.getRotation = function getRotation() {\n var r = this.style['textRotation'];\n if (!isNumber(r)) {\n return null;\n }\n\n return -r * Math.PI / 180;\n };\n\n TextMarkerSymbolizer.prototype.getDxDy = function getDxDy() {\n var s = this.style;\n return new Point(s['textDx'], s['textDy']);\n };\n\n TextMarkerSymbolizer.prototype.getFixedExtent = function getFixedExtent() {\n var dxdy = this.getDxDy(),\n style = this.style;\n var size = this.textDesc['size'];\n var alignPoint = getAlignPoint(size, style['textHorizontalAlignment'], style['textVerticalAlignment']);\n var alignW = alignPoint.x,\n alignH = alignPoint.y;\n if (style['textHaloRadius']) {\n var r = style['textHaloRadius'];\n size = size.add(r * 2, r * 2);\n }\n var result = new PointExtent(dxdy.add(alignW, alignH), dxdy.add(alignW + size['width'], alignH + size['height']));\n var rotation = this.getRotation();\n if (rotation) {\n result = this._rotateExtent(result, rotation);\n }\n return result;\n };\n\n TextMarkerSymbolizer.prototype.translate = function translate() {\n var s = this.symbol;\n var result = {\n 'textName': s['textName'],\n 'textFaceName': getValueOrDefault(s['textFaceName'], 'monospace'),\n 'textWeight': getValueOrDefault(s['textWeight'], 'normal'),\n 'textStyle': getValueOrDefault(s['textStyle'], 'normal'),\n 'textSize': getValueOrDefault(s['textSize'], 10),\n 'textFont': getValueOrDefault(s['textFont'], null),\n 'textFill': getValueOrDefault(s['textFill'], '#000'),\n 'textOpacity': getValueOrDefault(s['textOpacity'], 1),\n\n 'textHaloFill': getValueOrDefault(s['textHaloFill'], '#ffffff'),\n 'textHaloRadius': getValueOrDefault(s['textHaloRadius'], 0),\n 'textHaloOpacity': getValueOrDefault(s['textHaloOpacity'], 1),\n\n 'textWrapWidth': getValueOrDefault(s['textWrapWidth'], null),\n 'textWrapCharacter': getValueOrDefault(s['textWrapCharacter'], '\\n'),\n 'textLineSpacing': getValueOrDefault(s['textLineSpacing'], 0),\n\n 'textDx': getValueOrDefault(s['textDx'], 0),\n 'textDy': getValueOrDefault(s['textDy'], 0),\n\n 'textHorizontalAlignment': getValueOrDefault(s['textHorizontalAlignment'], 'middle'),\n 'textVerticalAlignment': getValueOrDefault(s['textVerticalAlignment'], 'middle'),\n 'textAlign': getValueOrDefault(s['textAlign'], 'center'),\n\n 'textRotation': getValueOrDefault(s['textRotation'], 0),\n\n 'textMaxWidth': getValueOrDefault(s['textMaxWidth'], 0),\n 'textMaxHeight': getValueOrDefault(s['textMaxHeight'], 0)\n };\n\n if (result['textMaxWidth'] > 0 && (!result['textWrapWidth'] || result['textWrapWidth'] > result['textMaxWidth'])) {\n if (!result['textWrapWidth']) {\n result['textMaxHeight'] = 1;\n }\n result['textWrapWidth'] = result['textMaxWidth'];\n }\n return result;\n };\n\n TextMarkerSymbolizer.prototype.translateLineAndFill = function translateLineAndFill(s) {\n return {\n 'lineColor': s['textHaloRadius'] ? s['textHaloFill'] : s['textFill'],\n 'lineWidth': s['textHaloRadius'],\n 'lineOpacity': s['textOpacity'],\n 'lineDasharray': null,\n 'lineCap': 'butt',\n 'lineJoin': 'round',\n 'polygonFill': s['textFill'],\n 'polygonOpacity': s['textOpacity']\n };\n };\n\n TextMarkerSymbolizer.prototype._descText = function _descText(textContent) {\n if (this._dynamic) {\n this.textDesc = this._measureText(textContent);\n return;\n }\n this.textDesc = this._loadFromCache();\n if (!this.textDesc) {\n this.textDesc = this._measureText(textContent);\n this._storeToCache(this.textDesc);\n }\n };\n\n TextMarkerSymbolizer.prototype._measureText = function _measureText(textContent) {\n var maxHeight = this.style['textMaxHeight'];\n var textDesc = splitTextToRow(textContent, this.style);\n if (maxHeight && maxHeight < textDesc.size.height) {\n textDesc.size.height = maxHeight;\n }\n return textDesc;\n };\n\n TextMarkerSymbolizer.prototype._storeToCache = function _storeToCache(textDesc) {\n if (IS_NODE) {\n return;\n }\n if (!this.geometry[CACHE_KEY]) {\n this.geometry[CACHE_KEY] = {};\n }\n this.geometry[CACHE_KEY][this._cacheKey] = { 'desc': textDesc, 'active': true };\n };\n\n TextMarkerSymbolizer.prototype._loadFromCache = function _loadFromCache() {\n if (!this.geometry[CACHE_KEY]) {\n return null;\n }\n var cache = this.geometry[CACHE_KEY][this._cacheKey];\n if (!cache) {\n return null;\n }\n cache.active = true;\n return cache.desc;\n };\n\n return TextMarkerSymbolizer;\n}(PointSymbolizer);\n\nTextMarkerSymbolizer.CACHE_KEY = CACHE_KEY;\n\nfunction genCacheKey(textContent, style) {\n var key = [textContent];\n for (var p in style) {\n if (style.hasOwnProperty(p) && p.length > 4 && p.substring(0, 4) === 'text') {\n key.push(p + '=' + style[p]);\n }\n }\n return key.join('-');\n}\n\nvar VectorPathMarkerSymbolizer = function (_ImageMarkerSymbolize) {\n inherits(VectorPathMarkerSymbolizer, _ImageMarkerSymbolize);\n\n VectorPathMarkerSymbolizer.test = function test(symbol) {\n if (!symbol) {\n return false;\n }\n if (isNil(symbol['markerFile']) && symbol['markerType'] === 'path') {\n return true;\n }\n return false;\n };\n\n function VectorPathMarkerSymbolizer(symbol, geometry, painter) {\n classCallCheck(this, VectorPathMarkerSymbolizer);\n\n var _this = possibleConstructorReturn(this, _ImageMarkerSymbolize.call(this, symbol, geometry, painter));\n\n _this.style = _this._defineStyle(_this.translate());\n\n if (isNil(_this.style['markerWidth'])) {\n _this.style['markerWidth'] = 80;\n }\n if (isNil(_this.style['markerHeight'])) {\n _this.style['markerHeight'] = 80;\n }\n if (Browser$1.gecko) {\n _this._url = [getMarkerPathBase64(symbol, _this.style['markerWidth'], _this.style['markerHeight']), _this.style['markerWidth'], _this.style['markerHeight']];\n } else {\n _this._url = [getMarkerPathBase64(symbol), symbol['markerWidth'], symbol['markerHeight']];\n }\n return _this;\n }\n\n VectorPathMarkerSymbolizer.prototype._prepareContext = function _prepareContext() {};\n\n VectorPathMarkerSymbolizer.prototype._getImage = function _getImage(resources) {\n if (resources && resources.isResourceLoaded(this._url)) {\n return resources.getImage(this._url);\n }\n var image = new Image();\n image.src = this._url[0];\n if (resources) {\n resources.addResource(this._url, image);\n }\n return image;\n };\n\n return VectorPathMarkerSymbolizer;\n}(ImageMarkerSymbolizer);\n\nvar defaultSymbol = {\n lineWidth: 1,\n polygonFill: '#fff',\n polygonOpacity: 0.5\n};\n\nvar DrawAltitudeSymbolizer = function (_PointSymbolizer) {\n inherits(DrawAltitudeSymbolizer, _PointSymbolizer);\n\n DrawAltitudeSymbolizer.test = function test(symbol, geometry) {\n var layer = geometry.getLayer();\n if (!layer) {\n return false;\n }\n var type = geometry.getJSONType();\n\n return type === 'Marker' || type === 'LineString';\n };\n\n function DrawAltitudeSymbolizer(symbol, geometry, painter) {\n classCallCheck(this, DrawAltitudeSymbolizer);\n\n var _this = possibleConstructorReturn(this, _PointSymbolizer.call(this, symbol, geometry, painter));\n\n _this.style = geometry.getLayer().options['drawAltitude'];\n if (!_this.style || !isObject(_this.style)) {\n _this.style = {\n 'lineWidth': 2\n };\n }\n if (!_this.style['lineWidth']) {\n _this.style['lineWidth'] = 0;\n }\n _this.dxdy = _this._defineStyle({\n 'dx': symbol['textDx'] || symbol['markerDx'],\n 'dy': symbol['textDy'] || symbol['markerDy']\n });\n return _this;\n }\n\n DrawAltitudeSymbolizer.prototype.symbolize = function symbolize(ctx) {\n var layer = this.geometry.getLayer();\n if (!layer.options['drawAltitude']) {\n return;\n }\n var properties = this.geometry.getProperties();\n if (!properties || !properties[layer.options['altitudeProperty']]) {\n return;\n }\n var style = this._getStyle();\n this._prepareContext(ctx);\n if (this.geometry.type === 'LineString') {\n var paintParams = this._getPaintParams(style['lineDx'], style['lineDy']);\n if (!paintParams) {\n return;\n }\n\n var groundPoints = this.getPainter().getPaintParams(style['lineDx'], style['lineDy'], true)[0];\n this._drawLineAltitude(ctx, paintParams[0], groundPoints);\n } else {\n var point = this._getRenderContainerPoints(),\n groundPoint = this._getRenderContainerPoints(true);\n if (!point || point.length === 0) {\n return;\n }\n this._drawMarkerAltitude(ctx, point[0], groundPoint[0]);\n }\n };\n\n DrawAltitudeSymbolizer.prototype.getDxDy = function getDxDy() {\n var s = this.dxdy;\n return new Point(s['dx'] || 0, s['dy'] || 0);\n };\n\n DrawAltitudeSymbolizer.prototype.get2DExtent = function get2DExtent() {\n if (this.geometry.type === 'LineString') {\n return StrokeAndFillSymbolizer.prototype.get2DExtent.apply(this);\n } else {\n return _PointSymbolizer.prototype.get2DExtent.call(this);\n }\n };\n\n DrawAltitudeSymbolizer.prototype.getPlacement = function getPlacement() {\n return 'point';\n };\n\n DrawAltitudeSymbolizer.prototype._getPaintParams = function _getPaintParams(dx, dy) {\n return this.getPainter().getPaintParams(dx || 0, dy || 0);\n };\n\n DrawAltitudeSymbolizer.prototype._drawMarkerAltitude = function _drawMarkerAltitude(ctx, point, groundPoint) {\n var style = this._getStyle();\n this.prepareCanvas(ctx, style);\n Canvas.path(ctx, [point, groundPoint], style['lineOpacity'], null, style['lineDasharray']);\n };\n\n DrawAltitudeSymbolizer.prototype._drawLineAltitude = function _drawLineAltitude(ctx, points, groundPoints) {\n var style = this._getStyle();\n var isSplitted = points.length > 0 && Array.isArray(points[0]);\n\n if (isSplitted) {\n for (var i = 0; i < points.length; i++) {\n this._drawLine(ctx, points[i], groundPoints[i]);\n }\n } else {\n this._drawLine(ctx, points, groundPoints);\n }\n\n if (ctx.setLineDash && Array.isArray(style['lineDasharray'])) {\n ctx.setLineDash([]);\n }\n };\n\n DrawAltitudeSymbolizer.prototype._drawLine = function _drawLine(ctx, points, groundPoints) {\n var style = this._getStyle();\n this.prepareCanvas(ctx, style);\n for (var i = 0, l = points.length - 1; i < l; i++) {\n Canvas.polygon(ctx, [points[i], points[i + 1], groundPoints[i + 1], groundPoints[i]], style['lineOpacity'], style['polygonOpacity'], style['lineDasharray']);\n }\n };\n\n DrawAltitudeSymbolizer.prototype._getStyle = function _getStyle() {\n var style = this.geometry.getLayer().options['drawAltitude'];\n if (!isObject(style)) {\n style = defaultSymbol;\n }\n if (!style['lineWidth']) {\n style['lineWidth'] = 0;\n style['lineOpacity'] = 0;\n }\n return style;\n };\n\n return DrawAltitudeSymbolizer;\n}(PointSymbolizer);\n\n\n\nvar index$3 = Object.freeze({\n\tSymbolizer: Symbolizer,\n\tCanvasSymbolizer: CanvasSymbolizer,\n\tDebugSymbolizer: DebugSymbolizer,\n\tImageMarkerSymbolizer: ImageMarkerSymbolizer,\n\tPointSymbolizer: PointSymbolizer,\n\tStrokeAndFillSymbolizer: StrokeAndFillSymbolizer,\n\tTextMarkerSymbolizer: TextMarkerSymbolizer,\n\tVectorMarkerSymbolizer: VectorMarkerSymbolizer,\n\tVectorPathMarkerSymbolizer: VectorPathMarkerSymbolizer,\n\tDrawAltitudeSymbolizer: DrawAltitudeSymbolizer\n});\n\nvar registerSymbolizers = [DrawAltitudeSymbolizer, StrokeAndFillSymbolizer, ImageMarkerSymbolizer, VectorPathMarkerSymbolizer, VectorMarkerSymbolizer, TextMarkerSymbolizer];\n\nvar testCanvas = void 0;\n\nvar Painter = function (_Class) {\n inherits(Painter, _Class);\n\n function Painter(geometry) {\n classCallCheck(this, Painter);\n\n var _this = possibleConstructorReturn(this, _Class.call(this));\n\n _this.geometry = geometry;\n _this.symbolizers = _this._createSymbolizers();\n _this._altAtGLZoom = _this._getGeometryAltitude();\n return _this;\n }\n\n Painter.prototype.getMap = function getMap() {\n return this.geometry.getMap();\n };\n\n Painter.prototype.getLayer = function getLayer() {\n return this.geometry.getLayer();\n };\n\n Painter.prototype._createSymbolizers = function _createSymbolizers() {\n var geoSymbol = this.getSymbol(),\n symbolizers = [],\n regSymbolizers = registerSymbolizers;\n var symbols = geoSymbol;\n if (!Array.isArray(geoSymbol)) {\n symbols = [geoSymbol];\n }\n for (var ii = symbols.length - 1; ii >= 0; ii--) {\n var symbol = symbols[ii];\n for (var i = regSymbolizers.length - 1; i >= 0; i--) {\n if (regSymbolizers[i].test(symbol, this.geometry)) {\n var symbolizer = new regSymbolizers[i](symbol, this.geometry, this);\n symbolizers.push(symbolizer);\n if (symbolizer instanceof PointSymbolizer) {\n this._hasPoint = true;\n }\n }\n }\n }\n if (!symbolizers.length) {\n if (console) {\n var id = this.geometry.getId();\n console.warn('invalid symbol for geometry(' + (this.geometry ? this.geometry.getType() + (id ? ':' + id : '') : '') + ') to draw : ' + JSON.stringify(geoSymbol));\n }\n }\n this._debugSymbolizer = new DebugSymbolizer(geoSymbol, this.geometry, this);\n return symbolizers;\n };\n\n Painter.prototype.hasPoint = function hasPoint() {\n return !!this._hasPoint;\n };\n\n Painter.prototype.getRenderPoints = function getRenderPoints(placement) {\n if (!this._renderPoints) {\n this._renderPoints = {};\n }\n if (!placement) {\n placement = 'center';\n }\n if (!this._renderPoints[placement]) {\n this._renderPoints[placement] = this.geometry._getRenderPoints(placement);\n }\n return this._renderPoints[placement];\n };\n\n Painter.prototype.getPaintParams = function getPaintParams(dx, dy, ignoreAltitude) {\n var map = this.getMap(),\n geometry = this.geometry,\n res = map.getResolution(),\n pitched = map.getPitch() !== 0,\n rotated = map.getBearing() !== 0;\n var params = this._cachedParams;\n\n var paintAsPath = geometry._paintAsPath && geometry._paintAsPath();\n if (paintAsPath && this._unsimpledParams && res <= this._unsimpledParams._res) {\n params = this._unsimpledParams;\n } else if (!params || params._res !== map.getResolution() || this._pitched !== pitched && geometry._redrawWhenPitch() || this._rotated !== rotated && geometry._redrawWhenRotate()) {\n params = geometry._getPaintParams();\n if (!params) {\n return null;\n }\n params._res = res;\n\n if (!geometry._simplified && paintAsPath) {\n if (!this._unsimpledParams) {\n this._unsimpledParams = params;\n }\n if (res > this._unsimpledParams._res) {\n this._unsimpledParams._res = res;\n }\n }\n this._cachedParams = params;\n }\n if (!params) {\n return null;\n }\n this._pitched = pitched;\n this._rotated = rotated;\n var zoomScale = map.getGLScale(),\n tr = [],\n points = params[0];\n\n var mapExtent = map.getContainerExtent();\n var cPoints = this._pointContainerPoints(points, dx, dy, ignoreAltitude, !mapExtent.contains(this._hitPoint));\n if (!cPoints) {\n return null;\n }\n tr.push(cPoints);\n for (var i = 1, l = params.length; i < l; i++) {\n if (isNumber(params[i]) || params[i] instanceof Size) {\n if (isNumber(params[i])) {\n tr.push(params[i] / zoomScale);\n } else {\n tr.push(params[i].multi(1 / zoomScale));\n }\n } else {\n tr.push(params[i]);\n }\n }\n return tr;\n };\n\n Painter.prototype._pointContainerPoints = function _pointContainerPoints(points, dx, dy, ignoreAltitude, noClip, pointPlacement) {\n var cExtent = this.getContainerExtent();\n if (!cExtent) {\n return null;\n }\n var map = this.getMap(),\n glZoom = map.getGLZoom(),\n containerOffset = this.containerOffset;\n var cPoints = void 0;\n function pointContainerPoint(point, alt) {\n var p = map._pointToContainerPoint(point, glZoom, alt)._sub(containerOffset);\n if (dx || dy) {\n p._add(dx || 0, dy || 0);\n }\n return p;\n }\n\n var altitude = this.getAltitude();\n\n if (Array.isArray(points)) {\n var geometry = this.geometry;\n var clipped = void 0;\n if (!noClip && geometry.options['enableClip']) {\n clipped = this._clip(points, altitude);\n } else {\n clipped = {\n points: points,\n altitude: altitude\n };\n }\n var clipPoints = clipped.points;\n altitude = clipped.altitude;\n if (ignoreAltitude) {\n altitude = 0;\n }\n var alt = altitude;\n cPoints = [];\n for (var i = 0, l = clipPoints.length; i < l; i++) {\n var c = clipPoints[i];\n if (Array.isArray(c)) {\n var cring = [];\n\n for (var ii = 0, ll = c.length; ii < ll; ii++) {\n var cc = c[ii];\n if (Array.isArray(altitude)) {\n if (altitude[i]) {\n alt = altitude[i][ii];\n } else {\n alt = 0;\n }\n }\n cring.push(pointContainerPoint(cc, alt));\n }\n cPoints.push(cring);\n } else {\n if (Array.isArray(altitude)) {\n if (pointPlacement === 'vertex-last') {\n alt = altitude[altitude.length - 1 - i];\n } else if (pointPlacement === 'line') {\n alt = (altitude[i] + altitude[i + 1]) / 2;\n } else {\n alt = altitude[i];\n }\n }\n cPoints.push(pointContainerPoint(c, alt));\n }\n }\n } else if (points instanceof Point) {\n if (ignoreAltitude) {\n altitude = 0;\n }\n cPoints = map._pointToContainerPoint(points, glZoom, altitude)._sub(containerOffset);\n if (dx || dy) {\n cPoints._add(dx, dy);\n }\n }\n return cPoints;\n };\n\n Painter.prototype._clip = function _clip(points, altitude) {\n var map = this.getMap(),\n geometry = this.geometry,\n glZoom = map.getGLZoom();\n var lineWidth = this.getSymbol()['lineWidth'];\n if (!isNumber(lineWidth)) {\n lineWidth = 4;\n }\n var containerExtent = map.getContainerExtent();\n var extent2D = containerExtent.expand(lineWidth).convertTo(function (p) {\n return map._containerPointToPoint(p, glZoom);\n });\n if (map.getPitch() > 0 && altitude) {\n var c = map.cameraLookAt;\n var pos = map.cameraPosition;\n\n extent2D = extent2D.combine(new Point(pos)._add(sign(c[0] - pos[0]), sign(c[1] - pos[1])));\n }\n var e = this.get2DExtent();\n var clipPoints = points;\n if (e.within(extent2D)) {\n return {\n points: clipPoints,\n altitude: altitude\n };\n }\n var smoothness = geometry.options['smoothness'];\n\n if (geometry.getShell && this.geometry.getHoles && !smoothness) {\n if (!Array.isArray(points[0])) {\n clipPoints = clipPolygon(points, extent2D);\n } else {\n clipPoints = [];\n for (var i = 0; i < points.length; i++) {\n var part = clipPolygon(points[i], extent2D);\n if (part.length) {\n clipPoints.push(part);\n }\n }\n }\n } else if (geometry.getJSONType() === 'LineString') {\n if (!Array.isArray(points[0])) {\n clipPoints = clipLine(points, extent2D, false, !!smoothness);\n } else {\n clipPoints = [];\n for (var _i = 0; _i < points.length; _i++) {\n pushIn(clipPoints, clipLine(points[_i], extent2D, false, !!smoothness));\n }\n }\n\n return this._interpolateSegAlt(clipPoints, points, altitude);\n }\n\n return {\n points: clipPoints,\n altitude: altitude\n };\n };\n\n Painter.prototype._interpolateSegAlt = function _interpolateSegAlt(clipSegs, orig, altitude) {\n if (!Array.isArray(altitude)) {\n var fn = function fn(cc) {\n return cc.point;\n };\n return {\n points: clipSegs.map(function (c) {\n if (Array.isArray(c)) {\n return c.map(fn);\n }\n return c.point;\n }),\n altitude: altitude\n };\n }\n var segsWithAlt = interpolateAlt(clipSegs, orig, altitude);\n altitude = [];\n var points = segsWithAlt.map(function (p) {\n if (Array.isArray(p)) {\n var alt = [];\n var cp = p.map(function (pp) {\n alt.push(pp.altitude);\n return pp.point;\n });\n altitude.push(alt);\n return cp;\n }\n altitude.push(p.altitude);\n return p.point;\n });\n return {\n points: points,\n altitude: altitude\n };\n };\n\n Painter.prototype.getSymbol = function getSymbol() {\n return this.geometry._getInternalSymbol();\n };\n\n Painter.prototype.paint = function paint(extent, context, offset) {\n if (!this.symbolizers) {\n return;\n }\n var renderer = this.getLayer()._getRenderer();\n if (!renderer || !renderer.context) {\n return;\n }\n\n if (extent && !extent.intersects(this.get2DExtent(renderer.resources))) {\n return;\n }\n var map = this.getMap();\n var minAltitude = this.getMinAltitude();\n var frustumAlt = map.getFrustumAltitude();\n if (minAltitude && frustumAlt && frustumAlt < minAltitude) {\n return;\n }\n this.containerOffset = offset || map._pointToContainerPoint(renderer.southWest)._add(0, -map.height);\n this._beforePaint();\n var ctx = context || renderer.context;\n var contexts = [ctx, renderer.resources];\n for (var i = this.symbolizers.length - 1; i >= 0; i--) {\n this._prepareShadow(ctx, this.symbolizers[i].symbol);\n this.symbolizers[i].symbolize.apply(this.symbolizers[i], contexts);\n }\n this._afterPaint();\n this._painted = true;\n this._debugSymbolizer.symbolize.apply(this._debugSymbolizer, contexts);\n };\n\n Painter.prototype.getSprite = function getSprite(resources, canvasClass) {\n if (this.geometry.type !== 'Point') {\n return null;\n }\n this._spriting = true;\n if (!this._sprite && this.symbolizers.length > 0) {\n var extent = new PointExtent();\n this.symbolizers.forEach(function (s) {\n var markerExtent = s.getFixedExtent(resources);\n extent._combine(markerExtent);\n });\n var origin = extent.getMin().multi(-1);\n var clazz = canvasClass || (this.getMap() ? this.getMap().CanvasClass : null);\n var canvas = Canvas.createCanvas(extent.getWidth(), extent.getHeight(), clazz);\n var bak = void 0;\n if (this._renderPoints) {\n bak = this._renderPoints;\n }\n var ctx = canvas.getContext('2d');\n var contexts = [ctx, resources];\n for (var i = this.symbolizers.length - 1; i >= 0; i--) {\n var dxdy = this.symbolizers[i].getDxDy();\n this._renderPoints = {\n 'center': [[origin.add(dxdy)]]\n };\n this._prepareShadow(ctx, this.symbolizers[i].symbol);\n this.symbolizers[i].symbolize.apply(this.symbolizers[i], contexts);\n }\n if (bak) {\n this._renderPoints = bak;\n }\n this._sprite = {\n 'canvas': canvas,\n 'offset': extent.getCenter()\n };\n }\n this._spriting = false;\n return this._sprite;\n };\n\n Painter.prototype.isSpriting = function isSpriting() {\n return !!this._spriting;\n };\n\n Painter.prototype.hitTest = function hitTest(cp, tolerance) {\n if (!tolerance || tolerance < 0.5) {\n tolerance = 0.5;\n }\n if (!testCanvas) {\n testCanvas = Canvas.createCanvas(1, 1);\n }\n Canvas.setHitTesting(true);\n testCanvas.width = testCanvas.height = 2 * tolerance;\n var ctx = testCanvas.getContext('2d');\n this._hitPoint = cp.sub(tolerance, tolerance);\n try {\n this.paint(null, ctx, this._hitPoint);\n } catch (e) {\n throw e;\n } finally {\n Canvas.setHitTesting(false);\n }\n delete this._hitPoint;\n var imgData = ctx.getImageData(0, 0, testCanvas.width, testCanvas.height).data;\n for (var i = 3, l = imgData.length; i < l; i += 4) {\n if (imgData[i] > 0) {\n return true;\n }\n }\n return false;\n };\n\n Painter.prototype.isHitTesting = function isHitTesting() {\n return !!this._hitPoint;\n };\n\n Painter.prototype._prepareShadow = function _prepareShadow(ctx, symbol) {\n if (symbol['shadowBlur']) {\n ctx.shadowBlur = symbol['shadowBlur'];\n ctx.shadowColor = symbol['shadowColor'] || '#000';\n ctx.shadowOffsetX = symbol['shadowOffsetX'] || 0;\n ctx.shadowOffsetY = symbol['shadowOffsetY'] || 0;\n } else if (ctx.shadowBlur) {\n ctx.shadowBlur = null;\n ctx.shadowColor = null;\n ctx.shadowOffsetX = null;\n ctx.shadowOffsetY = null;\n }\n };\n\n Painter.prototype._eachSymbolizer = function _eachSymbolizer(fn, context) {\n if (!this.symbolizers) {\n return;\n }\n if (!context) {\n context = this;\n }\n for (var i = this.symbolizers.length - 1; i >= 0; i--) {\n fn.apply(context, [this.symbolizers[i]]);\n }\n };\n\n Painter.prototype.get2DExtent = function get2DExtent(resources) {\n this._verifyProjection();\n var map = this.getMap();\n resources = resources || this.getLayer()._getRenderer().resources;\n var zoom = map.getZoom();\n if (!this._extent2D || this._extent2D._zoom !== zoom) {\n delete this._extent2D;\n delete this._fixedExtent;\n if (this.symbolizers) {\n var extent = this._extent2D = new PointExtent();\n var fixedExt = this._fixedExtent = new PointExtent();\n for (var i = this.symbolizers.length - 1; i >= 0; i--) {\n var symbolizer = this.symbolizers[i];\n extent._combine(symbolizer.get2DExtent());\n if (symbolizer.getFixedExtent) {\n fixedExt._combine(symbolizer.getFixedExtent(resources));\n }\n }\n extent._zoom = zoom;\n }\n }\n return this._extent2D.add(this._fixedExtent);\n };\n\n Painter.prototype.getContainerExtent = function getContainerExtent() {\n this._verifyProjection();\n var map = this.getMap();\n var zoom = map.getZoom();\n var glScale = map.getGLScale();\n if (!this._extent2D || this._extent2D._zoom !== zoom) {\n this.get2DExtent();\n }\n var altitude = this.getMinAltitude();\n var frustumAlt = map.getFrustumAltitude();\n if (altitude && frustumAlt && frustumAlt < altitude) {\n return null;\n }\n var extent = this._extent2D.convertTo(function (c) {\n return map._pointToContainerPoint(c, zoom, altitude / glScale);\n });\n var maxAltitude = this.getMaxAltitude();\n if (maxAltitude !== altitude) {\n var extent2 = this._extent2D.convertTo(function (c) {\n return map._pointToContainerPoint(c, zoom, maxAltitude / glScale);\n });\n extent._combine(extent2);\n }\n if (extent) {\n extent._add(this._fixedExtent);\n }\n var smoothness = this.geometry.options['smoothness'];\n if (smoothness) {\n extent._expand(extent.getWidth() * 0.15);\n }\n return extent;\n };\n\n Painter.prototype.getFixedExtent = function getFixedExtent() {\n var map = this.getMap();\n var zoom = map.getZoom();\n if (!this._extent2D || this._extent2D._zoom !== zoom) {\n this.get2DExtent();\n }\n return this._fixedExtent;\n };\n\n Painter.prototype.setZIndex = function setZIndex(change) {\n this._eachSymbolizer(function (symbolizer) {\n symbolizer.setZIndex(change);\n });\n };\n\n Painter.prototype.show = function show() {\n if (!this._painted) {\n var layer = this.getLayer();\n if (!layer.isCanvasRender()) {\n this.paint();\n }\n } else {\n this.removeCache();\n this._eachSymbolizer(function (symbolizer) {\n symbolizer.show();\n });\n }\n };\n\n Painter.prototype.hide = function hide() {\n this._eachSymbolizer(function (symbolizer) {\n symbolizer.hide();\n });\n };\n\n Painter.prototype.repaint = function repaint() {\n this._altAtGLZoom = this._getGeometryAltitude();\n this.removeCache();\n var layer = this.getLayer();\n if (!layer) {\n return;\n }\n var renderer = layer.getRenderer();\n if (!renderer || !renderer.setToRedraw()) {\n return;\n }\n renderer.setToRedraw();\n };\n\n Painter.prototype.refreshSymbol = function refreshSymbol() {\n this.removeCache();\n this._removeSymbolizers();\n this.symbolizers = this._createSymbolizers();\n };\n\n Painter.prototype.remove = function remove() {\n this.removeCache();\n this._removeSymbolizers();\n };\n\n Painter.prototype._removeSymbolizers = function _removeSymbolizers() {\n this._eachSymbolizer(function (symbolizer) {\n delete symbolizer.painter;\n symbolizer.remove();\n });\n delete this.symbolizers;\n };\n\n Painter.prototype.removeCache = function removeCache() {\n delete this._renderPoints;\n delete this._paintParams;\n delete this._sprite;\n delete this._extent2D;\n delete this._fixedExtent;\n delete this._cachedParams;\n delete this._unsimpledParams;\n if (this.geometry) {\n delete this.geometry[TextMarkerSymbolizer.CACHE_KEY];\n }\n };\n\n Painter.prototype.getAltitude = function getAltitude() {\n var propAlt = this._getAltitudeProperty();\n if (propAlt !== this._propAlt) {\n this._altAtGLZoom = this._getGeometryAltitude();\n }\n if (!this._altAtGLZoom) {\n return 0;\n }\n return this._altAtGLZoom;\n };\n\n Painter.prototype.getMinAltitude = function getMinAltitude() {\n if (!this.minAltitude) {\n return 0;\n }\n return this.minAltitude;\n };\n\n Painter.prototype.getMaxAltitude = function getMaxAltitude() {\n if (!this.maxAltitude) {\n return 0;\n }\n return this.maxAltitude;\n };\n\n Painter.prototype._getGeometryAltitude = function _getGeometryAltitude() {\n var _this2 = this;\n\n var map = this.getMap();\n if (!map) {\n return 0;\n }\n var altitude = this._getAltitudeProperty();\n this._propAlt = altitude;\n if (!altitude) {\n this.minAltitude = this.maxAltitude = 0;\n return 0;\n }\n var center = this.geometry.getCenter();\n if (Array.isArray(altitude)) {\n this.minAltitude = Number.MAX_VALUE;\n this.maxAltitude = Number.MIN_VALUE;\n return altitude.map(function (alt) {\n var a = _this2._meterToPoint(center, alt);\n if (a < _this2.minAltitude) {\n _this2.minAltitude = a;\n }\n if (a > _this2.maxAltitude) {\n _this2.maxAltitude = a;\n }\n return a;\n });\n } else {\n this.minAltitude = this.maxAltitude = this._meterToPoint(center, altitude);\n return this.minAltitude;\n }\n };\n\n Painter.prototype._meterToPoint = function _meterToPoint(center, altitude) {\n var map = this.getMap();\n var z = map.getGLZoom();\n var target = map.locate(center, altitude, 0);\n var p0 = map.coordToPoint(center, z),\n p1 = map.coordToPoint(target, z);\n return Math.abs(p1.x - p0.x) * sign(altitude);\n };\n\n Painter.prototype._getAltitudeProperty = function _getAltitudeProperty() {\n var geometry = this.geometry,\n layerOpts = geometry.getLayer().options,\n properties = geometry.getProperties();\n var altitude = layerOpts['enableAltitude'] ? properties ? properties[layerOpts['altitudeProperty']] : 0 : 0;\n return altitude;\n };\n\n Painter.prototype._verifyProjection = function _verifyProjection() {\n var projection = this.geometry._getProjection();\n if (this._projCode && this._projCode !== projection.code) {\n this.removeCache();\n }\n this._projCode = projection.code;\n };\n\n Painter.prototype._beforePaint = function _beforePaint() {\n var textcache = this.geometry[TextMarkerSymbolizer.CACHE_KEY];\n if (!textcache) {\n return;\n }\n for (var p in textcache) {\n if (hasOwn(textcache, p)) {\n textcache[p].active = false;\n }\n }\n };\n\n Painter.prototype._afterPaint = function _afterPaint() {\n var textcache = this.geometry[TextMarkerSymbolizer.CACHE_KEY];\n if (!textcache) {\n return;\n }\n for (var p in textcache) {\n if (hasOwn(textcache, p)) {\n if (!textcache[p].active) {\n delete textcache[p];\n }\n }\n }\n };\n\n return Painter;\n}(Class);\n\nfunction interpolateAlt(points, orig, altitude) {\n if (!Array.isArray(altitude)) {\n return points;\n }\n var parts = [];\n for (var i = 0, l = points.length; i < l; i++) {\n if (Array.isArray(points[i])) {\n parts.push(interpolateAlt(points[i], orig, altitude));\n } else {\n var p = points[i];\n if (!p.point.equals(orig[p.index])) {\n var w0 = void 0,\n w1 = void 0;\n if (p.index === 0) {\n w0 = p.index;\n w1 = p.index + 1;\n } else {\n w0 = p.index - 1;\n w1 = p.index;\n }\n\n var t0 = p.point.distanceTo(orig[w1]);\n var t = t0 / (t0 + orig[w0].distanceTo(p.point));\n var alt = interpolate(altitude[w0], altitude[w1], 1 - t);\n p.altitude = alt;\n parts.push(p);\n } else {\n p.altitude = altitude[p.index];\n parts.push(p);\n }\n }\n }\n return parts;\n}\n\nvar CollectionPainter = function (_Class) {\n inherits(CollectionPainter, _Class);\n\n function CollectionPainter(geometry) {\n classCallCheck(this, CollectionPainter);\n\n var _this = possibleConstructorReturn(this, _Class.call(this));\n\n _this.geometry = geometry;\n return _this;\n }\n\n CollectionPainter.prototype._eachPainter = function _eachPainter(fn) {\n var geometries = this.geometry.getGeometries();\n var painter = void 0;\n for (var i = 0, len = geometries.length; i < len; i++) {\n painter = geometries[i]._getPainter();\n if (!painter) {\n continue;\n }\n if (painter) {\n if (fn.call(this, painter) === false) {\n break;\n }\n }\n }\n };\n\n CollectionPainter.prototype.paint = function paint(extent) {\n if (!this.geometry) {\n return;\n }\n this._eachPainter(function (painter) {\n painter.paint(extent);\n });\n };\n\n CollectionPainter.prototype.get2DExtent = function get2DExtent(resources) {\n var extent = new PointExtent();\n this._eachPainter(function (painter) {\n extent = extent.combine(painter.get2DExtent(resources));\n });\n return extent;\n };\n\n CollectionPainter.prototype.getContainerExtent = function getContainerExtent() {\n var extent = new PointExtent();\n this._eachPainter(function (painter) {\n extent = extent.combine(painter.getContainerExtent());\n });\n return extent;\n };\n\n CollectionPainter.prototype.remove = function remove() {\n var args = arguments;\n this._eachPainter(function (painter) {\n painter.remove.apply(painter, args);\n });\n };\n\n CollectionPainter.prototype.setZIndex = function setZIndex() {\n var args = arguments;\n this._eachPainter(function (painter) {\n painter.setZIndex.apply(painter, args);\n });\n };\n\n CollectionPainter.prototype.show = function show() {\n var args = arguments;\n this._eachPainter(function (painter) {\n painter.show.apply(painter, args);\n });\n };\n\n CollectionPainter.prototype.hide = function hide() {\n var args = arguments;\n this._eachPainter(function (painter) {\n painter.hide.apply(painter, args);\n });\n };\n\n CollectionPainter.prototype.repaint = function repaint() {\n var args = arguments;\n this._eachPainter(function (painter) {\n painter.repaint.apply(painter, args);\n });\n };\n\n CollectionPainter.prototype.refreshSymbol = function refreshSymbol() {\n var args = arguments;\n this._eachPainter(function (painter) {\n painter.refreshSymbol.apply(painter, args);\n });\n };\n\n CollectionPainter.prototype.hasPoint = function hasPoint() {\n var result = false;\n this._eachPainter(function (painter) {\n if (painter.hasPoint()) {\n result = true;\n return false;\n }\n return true;\n });\n return result;\n };\n\n CollectionPainter.prototype.getMinAltitude = function getMinAltitude() {\n var first = true;\n var result = 0;\n this._eachPainter(function (painter) {\n var alt = painter.getMinAltitude();\n if (first || alt < result) {\n first = false;\n result = alt;\n }\n });\n return result;\n };\n\n CollectionPainter.prototype.getMaxAltitude = function getMaxAltitude() {\n var result = 0;\n this._eachPainter(function (painter) {\n var alt = painter.getMaxAltitude();\n if (alt > result) {\n result = alt;\n }\n });\n return result;\n };\n\n return CollectionPainter;\n}(Class);\n\nvar options$2 = {\n 'id': null,\n 'visible': true,\n 'editable': true,\n 'cursor': null,\n 'defaultProjection': 'EPSG:4326' };\n\nvar Geometry = function (_JSONAble) {\n inherits(Geometry, _JSONAble);\n\n function Geometry(options) {\n classCallCheck(this, Geometry);\n\n var opts = extend({}, options);\n var symbol = opts['symbol'];\n var properties = opts['properties'];\n var id = opts['id'];\n delete opts['symbol'];\n delete opts['id'];\n delete opts['properties'];\n\n var _this = possibleConstructorReturn(this, _JSONAble.call(this, opts));\n\n if (symbol) {\n _this.setSymbol(symbol);\n }\n if (properties) {\n _this.setProperties(properties);\n }\n if (!isNil(id)) {\n _this.setId(id);\n }\n return _this;\n }\n\n Geometry.prototype.getFirstCoordinate = function getFirstCoordinate() {\n if (this.type === 'GeometryCollection') {\n var geometries = this.getGeometries();\n if (!geometries.length) {\n return null;\n }\n return geometries[0].getFirstCoordinate();\n }\n var coordinates = this.getCoordinates();\n if (!Array.isArray(coordinates)) {\n return coordinates;\n }\n do {\n coordinates = coordinates[0];\n } while (Array.isArray(coordinates) && coordinates.length > 0);\n return coordinates;\n };\n\n Geometry.prototype.getLastCoordinate = function getLastCoordinate() {\n if (this.type === 'GeometryCollection') {\n var geometries = this.getGeometries();\n if (!geometries.length) {\n return null;\n }\n return geometries[geometries.length - 1].getLastCoordinate();\n }\n var coordinates = this.getCoordinates();\n if (!Array.isArray(coordinates)) {\n return coordinates;\n }\n do {\n coordinates = coordinates[coordinates.length - 1];\n } while (Array.isArray(coordinates) && coordinates.length > 0);\n return coordinates;\n };\n\n Geometry.prototype.addTo = function addTo(layer, fitview) {\n layer.addGeometry(this, fitview);\n return this;\n };\n\n Geometry.prototype.getLayer = function getLayer() {\n if (!this._layer) {\n return null;\n }\n return this._layer;\n };\n\n Geometry.prototype.getMap = function getMap() {\n if (!this._layer) {\n return null;\n }\n return this._layer.getMap();\n };\n\n Geometry.prototype.getId = function getId() {\n return this._id;\n };\n\n Geometry.prototype.setId = function setId(id) {\n var oldId = this.getId();\n this._id = id;\n\n this._fireEvent('idchange', {\n 'old': oldId,\n 'new': id\n });\n\n return this;\n };\n\n Geometry.prototype.getProperties = function getProperties() {\n if (!this.properties) {\n if (this._getParent()) {\n return this._getParent().getProperties();\n }\n return null;\n }\n return this.properties;\n };\n\n Geometry.prototype.setProperties = function setProperties(properties) {\n var old = this.properties;\n this.properties = isObject(properties) ? extend({}, properties) : properties;\n this._repaint();\n\n this._fireEvent('propertieschange', {\n 'old': old,\n 'new': properties\n });\n\n return this;\n };\n\n Geometry.prototype.getType = function getType() {\n return this.type;\n };\n\n Geometry.prototype.getSymbol = function getSymbol() {\n var s = this._symbol;\n if (s) {\n if (!Array.isArray(s)) {\n return extend({}, s);\n } else {\n return extendSymbol(s);\n }\n }\n return null;\n };\n\n Geometry.prototype.setSymbol = function setSymbol(symbol) {\n this._symbol = this._prepareSymbol(symbol);\n this.onSymbolChanged();\n return this;\n };\n\n Geometry.prototype.updateSymbol = function updateSymbol(props) {\n if (!props) {\n return this;\n }\n var s = this._getSymbol();\n if (s) {\n s = extendSymbol(s, props);\n } else {\n s = extendSymbol(this._getInternalSymbol(), props);\n }\n return this.setSymbol(s);\n };\n\n Geometry.prototype.getCenter = function getCenter() {\n return this._computeCenter(this._getMeasurer());\n };\n\n Geometry.prototype.getExtent = function getExtent() {\n var prjExt = this._getPrjExtent();\n if (prjExt) {\n var p = this._getProjection();\n var min = p.unproject(new Coordinate(prjExt['xmin'], prjExt['ymin'])),\n max = p.unproject(new Coordinate(prjExt['xmax'], prjExt['ymax']));\n return new Extent(min, max, this._getProjection());\n } else {\n return this._computeExtent(this._getMeasurer());\n }\n };\n\n Geometry.prototype.getContainerExtent = function getContainerExtent() {\n var painter = this._getPainter();\n return painter ? painter.getContainerExtent() : null;\n };\n\n Geometry.prototype.getSize = function getSize() {\n var extent = this.getContainerExtent();\n return extent ? extent.getSize() : null;\n };\n\n Geometry.prototype.containsPoint = function containsPoint(containerPoint, t) {\n if (!this.getMap()) {\n throw new Error('The geometry is required to be added on a map to perform \"containsPoint\".');\n }\n if (containerPoint instanceof Coordinate) {\n containerPoint = this.getMap().coordToContainerPoint(containerPoint);\n }\n return this._containsPoint(containerPoint, t);\n };\n\n Geometry.prototype._containsPoint = function _containsPoint(containerPoint, t) {\n var painter = this._getPainter();\n if (!painter) {\n return false;\n }\n if (isNil(t) && this._hitTestTolerance) {\n t = this._hitTestTolerance();\n }\n return painter.hitTest(containerPoint, t);\n };\n\n Geometry.prototype.show = function show() {\n this.options['visible'] = true;\n if (this.getMap()) {\n var painter = this._getPainter();\n if (painter) {\n painter.show();\n }\n\n this._fireEvent('show');\n }\n return this;\n };\n\n Geometry.prototype.hide = function hide() {\n this.options['visible'] = false;\n if (this.getMap()) {\n this.onHide();\n var painter = this._getPainter();\n if (painter) {\n painter.hide();\n }\n\n this._fireEvent('hide');\n }\n return this;\n };\n\n Geometry.prototype.isVisible = function isVisible() {\n if (!this.options['visible']) {\n return false;\n }\n var symbol = this._getInternalSymbol();\n if (!symbol) {\n return true;\n }\n if (Array.isArray(symbol)) {\n if (!symbol.length) {\n return true;\n }\n for (var i = 0, l = symbol.length; i < l; i++) {\n if (isNil(symbol[i]['opacity']) || symbol[i]['opacity'] > 0) {\n return true;\n }\n }\n return false;\n } else {\n return isNil(symbol['opacity']) || isNumber(symbol['opacity']) && symbol['opacity'] > 0;\n }\n };\n\n Geometry.prototype.getZIndex = function getZIndex() {\n return this.options['zIndex'] || 0;\n };\n\n Geometry.prototype.setZIndex = function setZIndex(zIndex) {\n var old = this.options['zIndex'];\n this.options['zIndex'] = zIndex;\n\n this._fireEvent('zindexchange', {\n 'old': old,\n 'new': zIndex\n });\n\n return this;\n };\n\n Geometry.prototype.setZIndexSilently = function setZIndexSilently(zIndex) {\n this.options['zIndex'] = zIndex;\n return this;\n };\n\n Geometry.prototype.bringToFront = function bringToFront() {\n var layer = this.getLayer();\n if (!layer || !layer.getGeoMaxZIndex) {\n return this;\n }\n var topZ = layer.getGeoMaxZIndex();\n this.setZIndex(topZ + 1);\n return this;\n };\n\n Geometry.prototype.bringToBack = function bringToBack() {\n var layer = this.getLayer();\n if (!layer || !layer.getGeoMinZIndex) {\n return this;\n }\n var bottomZ = layer.getGeoMinZIndex();\n this.setZIndex(bottomZ - 1);\n return this;\n };\n\n Geometry.prototype.translate = function translate(x, y) {\n if (isNil(x)) {\n return this;\n }\n var offset = new Coordinate(x, y);\n if (offset.x === 0 && offset.y === 0) {\n return this;\n }\n var coordinates = this.getCoordinates();\n if (coordinates) {\n if (Array.isArray(coordinates)) {\n var translated = forEachCoord(coordinates, function (coord) {\n return coord.add(offset);\n });\n this.setCoordinates(translated);\n } else {\n this.setCoordinates(coordinates.add(offset));\n }\n }\n return this;\n };\n\n Geometry.prototype.flash = function flash$$1(interval, count, cb, context) {\n return flash.call(this, interval, count, cb, context);\n };\n\n Geometry.prototype.copy = function copy() {\n var json = this.toJSON();\n var ret = Geometry.fromJSON(json);\n\n ret.options['visible'] = true;\n return ret;\n };\n\n Geometry.prototype.remove = function remove() {\n var layer = this.getLayer();\n if (!layer) {\n return this;\n }\n\n this._fireEvent('removestart');\n\n this._unbind();\n\n this._fireEvent('removeend');\n\n this._fireEvent('remove');\n return this;\n };\n\n Geometry.prototype.toGeoJSONGeometry = function toGeoJSONGeometry() {\n var gJson = this._exportGeoJSONGeometry();\n return gJson;\n };\n\n Geometry.prototype.toGeoJSON = function toGeoJSON(opts) {\n if (!opts) {\n opts = {};\n }\n var feature = {\n 'type': 'Feature',\n 'geometry': null\n };\n if (isNil(opts['geometry']) || opts['geometry']) {\n var geoJSON = this._exportGeoJSONGeometry();\n feature['geometry'] = geoJSON;\n }\n var id = this.getId();\n if (!isNil(id)) {\n feature['id'] = id;\n }\n var properties = void 0;\n if (isNil(opts['properties']) || opts['properties']) {\n properties = this._exportProperties();\n }\n feature['properties'] = properties;\n return feature;\n };\n\n Geometry.prototype.toJSON = function toJSON(options) {\n if (!options) {\n options = {};\n }\n var json = this._toJSON(options);\n var other = this._exportGraphicOptions(options);\n extend(json, other);\n return json;\n };\n\n Geometry.prototype.getLength = function getLength() {\n return this._computeGeodesicLength(this._getMeasurer());\n };\n\n Geometry.prototype.getArea = function getArea() {\n return this._computeGeodesicArea(this._getMeasurer());\n };\n\n Geometry.prototype.rotate = function rotate(angle, pivot) {\n if (this.type === 'GeometryCollection') {\n var geometries = this.getGeometries();\n geometries.forEach(function (g) {\n return g.rotate(angle, pivot);\n });\n return this;\n }\n if (!pivot) {\n pivot = this.getCenter();\n } else {\n pivot = new Coordinate(pivot);\n }\n var measurer = this._getMeasurer();\n var coordinates = this.getCoordinates();\n if (!Array.isArray(coordinates)) {\n if (pivot.x !== coordinates.x || pivot.y !== coordinates.y) {\n var c = measurer._rotate(coordinates, pivot, angle);\n this.setCoordinates(c);\n }\n return this;\n }\n forEachCoord(coordinates, function (c) {\n return measurer._rotate(c, pivot, angle);\n });\n this.setCoordinates(coordinates);\n return this;\n };\n\n Geometry.prototype._getConnectPoints = function _getConnectPoints() {\n return [this.getCenter()];\n };\n\n Geometry.prototype._initOptions = function _initOptions(options) {\n var opts = extend({}, options);\n var symbol = opts['symbol'];\n var properties = opts['properties'];\n var id = opts['id'];\n delete opts['symbol'];\n delete opts['id'];\n delete opts['properties'];\n this.setOptions(opts);\n if (symbol) {\n this.setSymbol(symbol);\n }\n if (properties) {\n this.setProperties(properties);\n }\n if (!isNil(id)) {\n this.setId(id);\n }\n };\n\n Geometry.prototype._bindLayer = function _bindLayer(layer) {\n if (this.getLayer()) {\n throw new Error('Geometry cannot be added to two or more layers at the same time.');\n }\n this._layer = layer;\n this._clearCache();\n this._clearProjection();\n };\n\n Geometry.prototype._prepareSymbol = function _prepareSymbol(symbol) {\n if (Array.isArray(symbol)) {\n var cookedSymbols = [];\n for (var i = 0; i < symbol.length; i++) {\n cookedSymbols.push(convertResourceUrl(this._checkAndCopySymbol(symbol[i])));\n }\n return cookedSymbols;\n } else if (symbol) {\n symbol = this._checkAndCopySymbol(symbol);\n return convertResourceUrl(symbol);\n }\n return null;\n };\n\n Geometry.prototype._checkAndCopySymbol = function _checkAndCopySymbol(symbol) {\n var s = {};\n for (var i in symbol) {\n if (NUMERICAL_PROPERTIES[i] && isString(symbol[i])) {\n s[i] = +symbol[i];\n } else {\n s[i] = symbol[i];\n }\n }\n return s;\n };\n\n Geometry.prototype._getSymbol = function _getSymbol() {\n return this._symbol;\n };\n\n Geometry.prototype._setExternSymbol = function _setExternSymbol(symbol) {\n this._externSymbol = this._prepareSymbol(symbol);\n this.onSymbolChanged();\n return this;\n };\n\n Geometry.prototype._getInternalSymbol = function _getInternalSymbol() {\n if (this._symbol) {\n return this._symbol;\n } else if (this._externSymbol) {\n return this._externSymbol;\n } else if (this.options['symbol']) {\n return this.options['symbol'];\n }\n return null;\n };\n\n Geometry.prototype._getPrjExtent = function _getPrjExtent() {\n var p = this._getProjection();\n this._verifyProjection();\n if (!this._extent && p) {\n this._extent = this._computePrjExtent(p);\n }\n return this._extent;\n };\n\n Geometry.prototype._unbind = function _unbind() {\n var layer = this.getLayer();\n if (!layer) {\n return;\n }\n\n if (this._animPlayer) {\n this._animPlayer.finish();\n }\n this._clearHandlers();\n\n this._unbindMenu();\n\n this._unbindInfoWindow();\n\n if (this.isEditing()) {\n this.endEdit();\n }\n this._removePainter();\n if (this.onRemove) {\n this.onRemove();\n }\n if (layer.onRemoveGeometry) {\n layer.onRemoveGeometry(this);\n }\n delete this._layer;\n delete this._internalId;\n delete this._extent;\n };\n\n Geometry.prototype._getInternalId = function _getInternalId() {\n return this._internalId;\n };\n\n Geometry.prototype._setInternalId = function _setInternalId(id) {\n this._internalId = id;\n };\n\n Geometry.prototype._getMeasurer = function _getMeasurer() {\n if (this._getProjection()) {\n return this._getProjection();\n }\n return SpatialReference.getProjectionInstance(this.options['defaultProjection']);\n };\n\n Geometry.prototype._getProjection = function _getProjection() {\n var map = this.getMap();\n if (map) {\n return map.getProjection();\n }\n return null;\n };\n\n Geometry.prototype._verifyProjection = function _verifyProjection() {\n var projection = this._getProjection();\n if (this._projCode && (!projection || this._projCode !== projection.code)) {\n this._clearProjection();\n }\n this._projCode = projection ? projection.code : null;\n };\n\n Geometry.prototype._getExternalResources = function _getExternalResources() {\n var symbol = this._getInternalSymbol();\n return getExternalResources(symbol);\n };\n\n Geometry.prototype._getPainter = function _getPainter() {\n if (!this._painter && this.getMap()) {\n if (GEOMETRY_COLLECTION_TYPES.indexOf(this.type) !== -1) {\n this._painter = new CollectionPainter(this);\n } else {\n this._painter = new Painter(this);\n }\n }\n return this._painter;\n };\n\n Geometry.prototype._removePainter = function _removePainter() {\n if (this._painter) {\n this._painter.remove();\n }\n delete this._painter;\n };\n\n Geometry.prototype._paint = function _paint(extent) {\n if (this._painter) {\n this._painter.paint(extent);\n }\n };\n\n Geometry.prototype._clearCache = function _clearCache() {\n delete this._extent;\n };\n\n Geometry.prototype._clearProjection = function _clearProjection() {\n delete this._extent;\n };\n\n Geometry.prototype._repaint = function _repaint() {\n if (this._painter) {\n this._painter.repaint();\n }\n };\n\n Geometry.prototype.onHide = function onHide() {\n this.closeMenu();\n this.closeInfoWindow();\n };\n\n Geometry.prototype.onShapeChanged = function onShapeChanged() {\n this._clearCache();\n this._repaint();\n\n this._fireEvent('shapechange');\n };\n\n Geometry.prototype.onPositionChanged = function onPositionChanged() {\n this._clearCache();\n this._repaint();\n\n this._fireEvent('positionchange');\n };\n\n Geometry.prototype.onSymbolChanged = function onSymbolChanged() {\n if (this._painter) {\n this._painter.refreshSymbol();\n }\n\n this._fireEvent('symbolchange');\n };\n\n Geometry.prototype.onConfig = function onConfig(conf) {\n var properties = void 0;\n if (conf['properties']) {\n properties = conf['properties'];\n delete conf['properties'];\n }\n var needRepaint = false;\n for (var p in conf) {\n if (conf.hasOwnProperty(p)) {\n var prefix = p.slice(0, 5);\n if (prefix === 'arrow' || prefix === 'smoot') {\n needRepaint = true;\n break;\n }\n }\n }\n if (properties) {\n this.setProperties(properties);\n this._repaint();\n } else if (needRepaint) {\n this._repaint();\n }\n };\n\n Geometry.prototype._setParent = function _setParent(geometry) {\n if (geometry) {\n this._parent = geometry;\n }\n };\n\n Geometry.prototype._getParent = function _getParent() {\n return this._parent;\n };\n\n Geometry.prototype._fireEvent = function _fireEvent(eventName, param) {\n if (this.getLayer() && this.getLayer()._onGeometryEvent) {\n if (!param) {\n param = {};\n }\n param['type'] = eventName;\n param['target'] = this;\n this.getLayer()._onGeometryEvent(param);\n }\n this.fire(eventName, param);\n };\n\n Geometry.prototype._toJSON = function _toJSON(options) {\n return {\n 'feature': this.toGeoJSON(options)\n };\n };\n\n Geometry.prototype._exportGraphicOptions = function _exportGraphicOptions(options) {\n var json = {};\n if (isNil(options['options']) || options['options']) {\n json['options'] = this.config();\n }\n if (isNil(options['symbol']) || options['symbol']) {\n json['symbol'] = this.getSymbol();\n }\n if (isNil(options['infoWindow']) || options['infoWindow']) {\n if (this._infoWinOptions) {\n json['infoWindow'] = this._infoWinOptions;\n }\n }\n return json;\n };\n\n Geometry.prototype._exportGeoJSONGeometry = function _exportGeoJSONGeometry() {\n var points = this.getCoordinates();\n var coordinates = Coordinate.toNumberArrays(points);\n return {\n 'type': this.getType(),\n 'coordinates': coordinates\n };\n };\n\n Geometry.prototype._exportProperties = function _exportProperties() {\n var properties = null;\n var geoProperties = this.getProperties();\n if (!isNil(geoProperties)) {\n if (isObject(geoProperties)) {\n properties = extend({}, geoProperties);\n } else {\n properties = geoProperties;\n }\n }\n return properties;\n };\n\n return Geometry;\n}(JSONAble(Eventable(Handlerable(Class))));\n\nGeometry.mergeOptions(options$2);\n\nvar EVENTS = 'mousedown ' + 'mouseup ' + 'mousemove ' + 'click ' + 'dblclick ' + 'contextmenu ' + 'touchstart ' + 'touchmove ' + 'touchend';\n\nvar MapGeometryEventsHandler = function (_Handler) {\n inherits(MapGeometryEventsHandler, _Handler);\n\n function MapGeometryEventsHandler() {\n classCallCheck(this, MapGeometryEventsHandler);\n return possibleConstructorReturn(this, _Handler.apply(this, arguments));\n }\n\n MapGeometryEventsHandler.prototype.addHooks = function addHooks() {\n var map = this.target;\n var dom = map._panels.allLayers || map._containerDOM;\n on(dom, EVENTS, this._identifyGeometryEvents, this);\n };\n\n MapGeometryEventsHandler.prototype.removeHooks = function removeHooks() {\n var map = this.target;\n var dom = map._panels.allLayers || map._containerDOM;\n off(dom, EVENTS, this._identifyGeometryEvents, this);\n };\n\n MapGeometryEventsHandler.prototype._identifyGeometryEvents = function _identifyGeometryEvents(domEvent, type) {\n var map = this.target;\n if (map.isInteracting() || map._ignoreEvent(domEvent)) {\n return;\n }\n var layers = map._getLayers(function (layer) {\n if (layer.identify && layer.options['geometryEvents']) {\n return true;\n }\n return false;\n });\n if (!layers.length) {\n return;\n }\n var oneMoreEvent = null;\n var eventType = type || domEvent.type;\n\n if (eventType === 'mousedown' || eventType === 'touchstart' && domEvent.touches.length === 1) {\n this._mouseDownTime = now();\n } else if ((eventType === 'click' || eventType === 'touchend') && this._mouseDownTime) {\n var downTime = this._mouseDownTime;\n delete this._mouseDownTime;\n var time = now();\n if (time - downTime > 300) {\n if (eventType === 'click') {\n return;\n }\n } else if (eventType === 'touchend') {\n oneMoreEvent = 'click';\n }\n }\n\n var actual = domEvent.touches && domEvent.touches.length > 0 ? domEvent.touches[0] : domEvent.changedTouches && domEvent.changedTouches.length > 0 ? domEvent.changedTouches[0] : domEvent;\n if (!actual) {\n return;\n }\n var containerPoint = getEventContainerPoint(actual, map._containerDOM),\n coordinate = map.containerPointToCoordinate(containerPoint);\n if (eventType === 'touchstart') {\n preventDefault(domEvent);\n }\n var geometryCursorStyle = null;\n var identifyOptions = {\n 'includeInternals': true,\n\n 'filter': function filter(geometry) {\n if (!(geometry instanceof Geometry)) {\n return false;\n }\n var eventToFire = geometry._getEventTypeToFire(domEvent);\n if (eventType === 'mousemove') {\n if (!geometryCursorStyle && geometry.options['cursor']) {\n geometryCursorStyle = geometry.options['cursor'];\n }\n if (!geometry.listens('mousemove') && !geometry.listens('mouseover') && !geometry.listens('mouseenter')) {\n return false;\n }\n } else if (!geometry.listens(eventToFire) && !geometry.listens(oneMoreEvent)) {\n return false;\n }\n\n return true;\n },\n 'count': 1,\n 'coordinate': coordinate,\n 'onlyVisible': map.options['onlyVisibleGeometryEvents'],\n 'layers': layers\n };\n var callback = fireGeometryEvent.bind(this);\n\n if (this._queryIdentifyTimeout) {\n cancelAnimFrame(this._queryIdentifyTimeout);\n }\n if (eventType === 'mousemove' || eventType === 'touchmove') {\n this._queryIdentifyTimeout = requestAnimFrame(function () {\n if (map.isInteracting()) {\n return;\n }\n map.identify(identifyOptions, callback);\n });\n } else {\n map.identify(identifyOptions, callback);\n }\n\n function fireGeometryEvent(geometries) {\n var propagation = true;\n if (eventType === 'mousemove') {\n var geoMap = {};\n if (geometries.length > 0) {\n for (var i = geometries.length - 1; i >= 0; i--) {\n var geo = geometries[i];\n if (!(geo instanceof Geometry)) {\n continue;\n }\n var iid = geo._getInternalId();\n geoMap[iid] = geo;\n geo._onEvent(domEvent);\n if (!this._prevOverGeos || !this._prevOverGeos.geomap[iid]) {\n geo._onEvent(domEvent, 'mouseenter');\n }\n propagation = geo._onEvent(domEvent, 'mouseover');\n }\n }\n\n map._setPriorityCursor(geometryCursorStyle);\n\n var oldTargets = this._prevOverGeos && this._prevOverGeos.geos;\n this._prevOverGeos = {\n 'geos': geometries,\n 'geomap': geoMap\n };\n if (oldTargets && oldTargets.length > 0) {\n for (var _i = oldTargets.length - 1; _i >= 0; _i--) {\n var oldTarget = oldTargets[_i];\n if (!(oldTarget instanceof Geometry)) {\n continue;\n }\n var oldTargetId = oldTargets[_i]._getInternalId();\n\n if (!geoMap[oldTargetId]) {\n propagation = oldTarget._onEvent(domEvent, 'mouseout');\n }\n }\n }\n } else {\n if (!geometries || !geometries.length) {\n return;\n }\n for (var _i2 = geometries.length - 1; _i2 >= 0; _i2--) {\n if (!(geometries[_i2] instanceof Geometry)) {\n continue;\n }\n propagation = geometries[_i2]._onEvent(domEvent);\n if (oneMoreEvent) {\n geometries[_i2]._onEvent(domEvent, oneMoreEvent);\n }\n break;\n }\n }\n if (propagation === false) {\n stopPropagation(domEvent);\n }\n }\n };\n\n return MapGeometryEventsHandler;\n}(Handler$1);\n\nMap.mergeOptions({\n 'geometryEvents': true,\n 'onlyVisibleGeometryEvents': true\n});\n\nMap.addOnLoadHook('addHandler', 'geometryEvents', MapGeometryEventsHandler);\n\nvar MapScrollWheelZoomHandler = function (_Handler) {\n inherits(MapScrollWheelZoomHandler, _Handler);\n\n function MapScrollWheelZoomHandler() {\n classCallCheck(this, MapScrollWheelZoomHandler);\n return possibleConstructorReturn(this, _Handler.apply(this, arguments));\n }\n\n MapScrollWheelZoomHandler.prototype.addHooks = function addHooks() {\n addDomEvent(this.target._containerDOM, 'mousewheel', this._onWheelScroll, this);\n };\n\n MapScrollWheelZoomHandler.prototype.removeHooks = function removeHooks() {\n removeDomEvent(this.target._containerDOM, 'mousewheel', this._onWheelScroll);\n };\n\n MapScrollWheelZoomHandler.prototype._onWheelScroll = function _onWheelScroll(evt) {\n var _this2 = this;\n\n var map = this.target;\n if (map._ignoreEvent(evt) || !map.options['zoomable']) {\n return false;\n }\n preventDefault(evt);\n stopPropagation(evt);\n if (this._zooming) {\n this._requesting++;\n return false;\n }\n this._requesting = 0;\n var container = map._containerDOM;\n var levelValue = (evt.wheelDelta ? evt.wheelDelta : evt.detail) > 0 ? 1 : -1;\n if (evt.detail) {\n levelValue *= -1;\n }\n var zoom = map.getZoom();\n var nextZoom = zoom + levelValue;\n nextZoom = map._checkZoom(levelValue > 0 ? Math.ceil(nextZoom) : Math.floor(nextZoom));\n if (nextZoom === zoom) {\n return false;\n }\n this._zooming = true;\n var origin = map._checkZoomOrigin(getEventContainerPoint(evt, container));\n if (!this._delta) {\n map.onZoomStart(null, origin);\n this._origin = origin;\n this._delta = levelValue;\n this._startZoom = map.getZoom();\n }\n var duration = 90;\n map.animateTo({\n 'zoom': nextZoom - this._delta * 1 / 2,\n 'around': this._origin\n }, {\n 'continueOnViewChanged': true,\n 'easing': 'linear',\n 'duration': duration,\n 'wheelZoom': true\n }, function (frame) {\n if (frame.state.playState !== 'finished') {\n return;\n }\n if (_this2._requesting < 1 || Math.abs(nextZoom - _this2._startZoom) > 2 || nextZoom === map.getMaxZoom() || nextZoom === map.getMinZoom()) {\n\n map.animateTo({\n 'zoom': nextZoom,\n 'around': _this2._origin\n }, {\n 'continueOnViewChanged': true,\n 'duration': 100\n }, function (frame) {\n if (frame.state.playState === 'finished') {\n setTimeout(function () {\n delete _this2._zooming;\n delete _this2._requesting;\n }, 200);\n }\n });\n delete _this2._startZoom;\n delete _this2._origin;\n delete _this2._delta;\n _this2._requesting = 0;\n } else if (!isNil(_this2._requesting)) {\n delete _this2._zooming;\n _this2._onWheelScroll(evt);\n }\n });\n return false;\n };\n\n return MapScrollWheelZoomHandler;\n}(Handler$1);\n\nMap.mergeOptions({\n 'scrollWheelZoom': true\n});\n\nMap.addOnLoadHook('addHandler', 'scrollWheelZoom', MapScrollWheelZoomHandler);\n\nvar MapTouchZoomHandler = function (_Handler) {\n inherits(MapTouchZoomHandler, _Handler);\n\n function MapTouchZoomHandler() {\n classCallCheck(this, MapTouchZoomHandler);\n return possibleConstructorReturn(this, _Handler.apply(this, arguments));\n }\n\n MapTouchZoomHandler.prototype.addHooks = function addHooks() {\n addDomEvent(this.target.getContainer(), 'touchstart', this._onTouchStart, this);\n };\n\n MapTouchZoomHandler.prototype.removeHooks = function removeHooks() {\n removeDomEvent(this.target.getContainer(), 'touchstart', this._onTouchStart);\n };\n\n MapTouchZoomHandler.prototype._onTouchStart = function _onTouchStart(event) {\n var map = this.target;\n if (!event.touches || event.touches.length !== 2 || map.isInteracting()) {\n return;\n }\n var container = map.getContainer();\n var p1 = getEventContainerPoint(event.touches[0], container),\n p2 = getEventContainerPoint(event.touches[1], container);\n\n this.preY = p1.y;\n this._startP1 = p1;\n this._startP2 = p2;\n this._startDist = p1.distanceTo(p2);\n this._startVector = p1.sub(p2);\n this._startZoom = map.getZoom();\n this._startBearing = map.getBearing();\n\n addDomEvent(document, 'touchmove', this._onTouchMove, this);\n addDomEvent(document, 'touchend', this._onTouchEnd, this);\n preventDefault(event);\n\n map._fireEvent('touchactstart');\n };\n\n MapTouchZoomHandler.prototype._onTouchMove = function _onTouchMove(event) {\n var map = this.target;\n if (!event.touches || event.touches.length !== 2) {\n return;\n }\n var container = map.getContainer(),\n p1 = getEventContainerPoint(event.touches[0], container),\n p2 = getEventContainerPoint(event.touches[1], container),\n d1 = p1.sub(this._startP1),\n d2 = p2.sub(this._startP2),\n vector = p1.sub(p2),\n scale = p1.distanceTo(p2) / this._startDist,\n bearing = vector.angleWith(this._startVector) * 180 / Math.PI,\n preY = this.preY || p1.y,\n pitch = (preY - p1.y) * 0.4;\n\n this.preY = p1.y;\n var param = {\n 'domEvent': event,\n 'mousePos': [p1, p2]\n };\n if (!this.mode) {\n if (map.options['touchRotate'] && Math.abs(bearing) > 8) {\n this.mode = map.options['touchZoomRotate'] ? 'rotate_zoom' : 'rotate';\n } else if (map.options['touchPitch'] && d1.y * d2.y > 0 && Math.abs(d1.y) > 10 && Math.abs(d2.y) > 10) {\n this.mode = 'pitch';\n } else if (map.options['zoomable'] && map.options['touchZoom'] && Math.abs(1 - scale) > 0.15) {\n this.mode = map.options['touchZoomRotate'] && map.options['touchRotate'] ? 'rotate_zoom' : 'zoom';\n }\n this._startTouching(param);\n }\n if (this.mode === 'zoom' || this.mode === 'rotate_zoom') {\n this._scale = scale;\n var res = map._getResolution(this._startZoom) / scale;\n var zoom = map.getZoomFromRes(res);\n map.onZooming(zoom, this._Origin);\n }\n if (this.mode === 'rotate' || this.mode === 'rotate_zoom') {\n map.setBearing(this._startBearing + bearing);\n map.onDragRotating(param);\n } else if (this.mode === 'pitch') {\n map.setPitch(map.getPitch() + pitch);\n map.onDragRotating(param);\n }\n\n map._fireEvent('touchactinging');\n };\n\n MapTouchZoomHandler.prototype._startTouching = function _startTouching(param) {\n var map = this.target;\n if (this.mode === 'zoom' || this.mode === 'rotate_zoom') {\n var size = map.getSize();\n this._Origin = new Point(size['width'] / 2, size['height'] / 2);\n map.onZoomStart(null, this._Origin);\n }\n if (this.mode === 'rotate' || this.mode === 'pitch' || this.mode === 'rotate_zoom') {\n map.onDragRotateStart(param);\n }\n };\n\n MapTouchZoomHandler.prototype._onTouchEnd = function _onTouchEnd(event) {\n delete this.preY;\n var map = this.target;\n\n off(document, 'touchmove', this._onTouchMove, this);\n off(document, 'touchend', this._onTouchEnd, this);\n\n if (this.mode === 'zoom' || this.mode === 'rotate_zoom') {\n var scale = this._scale;\n var res = map._getResolution(this._startZoom) / scale;\n var zoom = map.getZoomFromRes(res);\n map.onZoomEnd(zoom, this._Origin);\n }\n if (this.mode === 'pitch' || this.mode === 'rotate' || this.mode === 'rotate_zoom') {\n map.onDragRotateEnd({\n 'domEvent': event\n });\n }\n delete this.mode;\n\n map._fireEvent('touchactend');\n };\n\n return MapTouchZoomHandler;\n}(Handler$1);\n\nMap.mergeOptions({\n 'touchGesture': true,\n 'touchZoom': true,\n 'touchPitch': true,\n 'touchRotate': true,\n 'touchZoomRotate': false\n});\n\nMap.addOnLoadHook('addHandler', 'touchGesture', MapTouchZoomHandler);\n\nvar Easing = {\n in: function _in(t) {\n return Math.pow(t, 2);\n },\n out: function out(t) {\n return 1 - Easing.in(1 - t);\n },\n inAndOut: function inAndOut(t) {\n return 3 * t * t - 2 * t * t * t;\n },\n linear: function linear(t) {\n return t;\n },\n upAndDown: function upAndDown(t) {\n if (t < 0.5) {\n return Easing.inAndOut(2 * t);\n } else {\n return 1 - Easing.inAndOut(2 * (t - 0.5));\n }\n }\n};\n\nvar Frame = function Frame(state, styles) {\n classCallCheck(this, Frame);\n\n this.state = state;\n this.styles = styles;\n};\n\nvar Player = function Player(animation, options, onFrame) {\n classCallCheck(this, Player);\n\n this._animation = animation;\n this.options = options;\n this._onFrame = onFrame;\n this.playState = 'idle';\n this.ready = true;\n this.finished = false;\n};\n\nvar Animation = {\n speed: {\n 'slow': 2000,\n 'normal': 1000,\n 'fast': 500\n },\n\n _resolveStyles: function _resolveStyles(styles) {\n if (!styles) {\n return null;\n }\n\n function resolveChild(child) {\n if (!Array.isArray(child)) {\n return Animation._resolveStyles(child);\n }\n var start = [],\n d = [],\n dest = [];\n for (var i = 0; i < child.length; i++) {\n var _styles = Animation._resolveStyles(child[i]);\n if (_styles) {\n start.push(_styles[0]);\n d.push(_styles[1]);\n dest.push(_styles[2]);\n }\n }\n if (!start.length) {\n return null;\n } else {\n return [start, d, dest];\n }\n }\n\n function resolveVal(val) {\n var values = val;\n var clazz = void 0;\n\n if (!Array.isArray(val)) {\n if (isNumber(val)) {\n values = [0, val];\n } else if (val instanceof Point || val instanceof Coordinate) {\n clazz = val.constructor;\n values = [new clazz(0, 0), val];\n } else {\n values = [val, val];\n }\n }\n\n var v1 = values[0],\n v2 = values[1];\n if (isNumber(v1) && isNumber(v2)) {\n if (v1 === v2) {\n return null;\n }\n return [v1, v2 - v1, v2];\n } else if (Array.isArray(v1) || v1 instanceof Coordinate || v1 instanceof Point) {\n if (Array.isArray(v1)) {\n v1 = new Coordinate(v1);\n v2 = new Coordinate(v2);\n } else {\n clazz = v1.constructor;\n v1 = new clazz(v1);\n v2 = new clazz(v2);\n }\n if (v1.equals(v2)) {\n return null;\n }\n return [v1, v2.sub(v1), v2];\n } else {\n return [v1, 0, v2];\n }\n }\n\n function isChild(val) {\n if (!Array.isArray(val) && val.constructor === Object) {\n return true;\n } else if (Array.isArray(val) && val[0].constructor === Object) {\n return true;\n }\n return false;\n }\n\n var d = {},\n start = {},\n dest = {};\n for (var p in styles) {\n if (styles.hasOwnProperty(p)) {\n var values = styles[p];\n\n if (!values) {\n continue;\n } else if (Array.isArray(values)) {\n if (isNil(values[0]) || isNil(values[1])) {\n continue;\n }\n }\n var childStyles = void 0;\n if (isChild(values)) {\n childStyles = resolveChild(values);\n } else {\n childStyles = resolveVal(values);\n }\n if (childStyles) {\n start[p] = childStyles[0];\n d[p] = childStyles[1];\n dest[p] = childStyles[2];\n }\n }\n }\n return [start, d, dest];\n },\n framing: function framing(styles, options) {\n if (!options) {\n options = {};\n }\n var easing = options['easing'] ? Easing[options['easing']] : Easing.linear;\n if (!easing) {\n easing = Easing.linear;\n }\n var dStyles = void 0,\n startStyles = void 0,\n destStyles = void 0;\n styles = Animation._resolveStyles(styles);\n if (styles) {\n startStyles = styles[0];\n dStyles = styles[1];\n destStyles = styles[2];\n }\n var deltaStyles = function deltaStyles(delta, _startStyles, _dStyles) {\n if (!_startStyles || !_dStyles) {\n return null;\n }\n var result = {};\n for (var p in _dStyles) {\n if (_dStyles.hasOwnProperty(p)) {\n if (_startStyles[p] === destStyles[p]) {\n result[p] = _startStyles[p];\n continue;\n }\n var s = _startStyles[p],\n d = _dStyles[p];\n if (isNumber(d)) {\n result[p] = s + delta * d;\n } else if (Array.isArray(d)) {\n var children = [];\n for (var i = 0; i < d.length; i++) {\n children.push(deltaStyles(delta, s[i], d[i]));\n }\n result[p] = children;\n } else {\n var clazz = d.constructor;\n if (clazz === Object) {\n result[p] = deltaStyles(delta, s, d);\n } else if (s instanceof Point || s instanceof Coordinate) {\n result[p] = s.add(d.multi(delta));\n }\n }\n }\n }\n return result;\n };\n return function (elapsed, duration) {\n var state = void 0,\n d = void 0;\n if (elapsed < 0) {\n state = {\n 'playState': 'idle',\n 'delta': 0\n };\n d = startStyles;\n } else if (elapsed < duration) {\n var delta = easing(elapsed / duration);\n state = {\n 'playState': 'running',\n 'delta': delta\n };\n d = deltaStyles(delta, startStyles, dStyles);\n } else {\n state = {\n 'playState': 'finished',\n 'delta': 1\n };\n d = destStyles;\n }\n state['startStyles'] = startStyles;\n state['destStyles'] = destStyles;\n state['progress'] = elapsed;\n state['remainingMs'] = duration - elapsed;\n return new Frame(state, d);\n };\n },\n _requestAnimFrame: function _requestAnimFrame(fn) {\n if (!this._frameQueue) {\n this._frameQueue = [];\n }\n this._frameQueue.push(fn);\n this._a();\n },\n _a: function _a() {\n if (!this._animationFrameId) {\n this._animationFrameId = requestAnimFrame(Animation._frameFn);\n }\n },\n _run: function _run() {\n if (this._frameQueue.length) {\n var running = this._frameQueue;\n this._frameQueue = [];\n for (var i = 0, len = running.length; i < len; i++) {\n running[i]();\n }\n if (this._frameQueue.length) {\n this._animationFrameId = requestAnimFrame(Animation._frameFn);\n } else {\n delete this._animationFrameId;\n }\n }\n },\n animate: function animate(styles, options, step) {\n if (!options) {\n options = {};\n }\n var animation = Animation.framing(styles, options);\n return new Player(animation, options, step);\n }\n};\n\nAnimation._frameFn = Animation._run.bind(Animation);\n\nextend(Player.prototype, {\n _prepare: function _prepare() {\n var options = this.options;\n var duration = options['speed'] || options['duration'];\n if (isString(duration)) {\n duration = Animation.speed[duration];\n if (!duration) {\n duration = +duration;\n }\n }\n if (!duration) {\n duration = Animation.speed['normal'];\n }\n this.duration = duration;\n this._framer = options['framer'] || Animation._requestAnimFrame.bind(Animation);\n },\n play: function play() {\n if (this.playState !== 'idle' && this.playState !== 'paused') {\n return this;\n }\n if (this.playState === 'idle') {\n this.currentTime = 0;\n this._prepare();\n }\n var t = now();\n if (!this.startTime) {\n var options = this.options;\n this.startTime = options['startTime'] ? options['startTime'] : t;\n }\n this._playStartTime = Math.max(t, this.startTime);\n if (this.playState === 'paused') {\n this._playStartTime -= this.currentTime;\n }\n this.playState = 'running';\n this._run();\n return this;\n },\n pause: function pause() {\n if (this.playState === 'paused') {\n return this;\n }\n this.playState = 'paused';\n this._run();\n\n return this;\n },\n cancel: function cancel() {\n if (this.playState === 'idle') {\n return this;\n }\n this.playState = 'idle';\n this.finished = false;\n this._run();\n return this;\n },\n finish: function finish() {\n if (this.playState === 'finished') {\n return this;\n }\n this.playState = 'finished';\n this.finished = true;\n this._run();\n return this;\n },\n reverse: function reverse() {},\n _run: function _run() {\n var _this = this;\n\n var onFrame = this._onFrame;\n var t = now();\n var elapsed = t - this._playStartTime;\n if (this.options['repeat'] && elapsed >= this.duration) {\n this._playStartTime = t;\n elapsed = 0;\n }\n if (this.playState !== 'running') {\n if (onFrame) {\n if (this.playState === 'finished') {\n elapsed = this.duration;\n } else if (this.playState === 'idle') {\n elapsed = 0;\n }\n var _frame = this._animation(elapsed, this.duration);\n _frame.state.playState = this.playState;\n onFrame(_frame);\n }\n return;\n }\n\n var frame = this._animation(elapsed, this.duration);\n this.playState = frame.state['playState'];\n\n if (this.playState === 'idle') {\n if (this.startTime > t) {\n setTimeout(this._run.bind(this), this.startTime - t);\n }\n } else if (this.playState === 'running') {\n this._framer(function () {\n if (_this.playState !== 'running') {\n return;\n }\n _this.currentTime = elapsed;\n if (onFrame) {\n onFrame(frame);\n }\n _this._run();\n });\n } else if (this.playState === 'finished') {\n this.finished = true;\n\n if (onFrame) {\n onFrame(frame);\n }\n }\n }\n});\n\n\n\nvar Animation$1 = Object.freeze({\n\tAnimation: Animation,\n\tEasing: Easing,\n\tPlayer: Player,\n\tFrame: Frame\n});\n\nvar simplify = createCommonjsModule(function (module) {\n\n (function () {\n 'use strict';\n\n function getSqDist(p1, p2) {\n\n var dx = p1.x - p2.x,\n dy = p1.y - p2.y;\n\n return dx * dx + dy * dy;\n }\n\n function getSqSegDist(p, p1, p2) {\n\n var x = p1.x,\n y = p1.y,\n dx = p2.x - x,\n dy = p2.y - y;\n\n if (dx !== 0 || dy !== 0) {\n\n var t = ((p.x - x) * dx + (p.y - y) * dy) / (dx * dx + dy * dy);\n\n if (t > 1) {\n x = p2.x;\n y = p2.y;\n } else if (t > 0) {\n x += dx * t;\n y += dy * t;\n }\n }\n\n dx = p.x - x;\n dy = p.y - y;\n\n return dx * dx + dy * dy;\n }\n\n function simplifyRadialDist(points, sqTolerance) {\n\n var prevPoint = points[0],\n newPoints = [prevPoint],\n point;\n\n for (var i = 1, len = points.length; i < len; i++) {\n point = points[i];\n\n if (getSqDist(point, prevPoint) > sqTolerance) {\n newPoints.push(point);\n prevPoint = point;\n }\n }\n\n if (prevPoint !== point) newPoints.push(point);\n\n return newPoints;\n }\n\n function simplifyDPStep(points, first, last, sqTolerance, simplified) {\n var maxSqDist = sqTolerance,\n index;\n\n for (var i = first + 1; i < last; i++) {\n var sqDist = getSqSegDist(points[i], points[first], points[last]);\n\n if (sqDist > maxSqDist) {\n index = i;\n maxSqDist = sqDist;\n }\n }\n\n if (maxSqDist > sqTolerance) {\n if (index - first > 1) simplifyDPStep(points, first, index, sqTolerance, simplified);\n simplified.push(points[index]);\n if (last - index > 1) simplifyDPStep(points, index, last, sqTolerance, simplified);\n }\n }\n\n function simplifyDouglasPeucker(points, sqTolerance) {\n var last = points.length - 1;\n\n var simplified = [points[0]];\n simplifyDPStep(points, 0, last, sqTolerance, simplified);\n simplified.push(points[last]);\n\n return simplified;\n }\n\n function simplify(points, tolerance, highestQuality) {\n\n if (points.length <= 2) return points;\n\n var sqTolerance = tolerance !== undefined ? tolerance * tolerance : 1;\n\n points = highestQuality ? points : simplifyRadialDist(points, sqTolerance);\n points = simplifyDouglasPeucker(points, sqTolerance);\n\n return points;\n }\n\n if (typeof undefined === 'function' && undefined.amd) undefined(function () {\n return simplify;\n });else {\n module.exports = simplify;\n module.exports.default = simplify;\n }\n })();\n});\n\nvar options$4 = {\n 'smoothness': 0,\n 'enableClip': true,\n 'enableSimplify': true,\n 'symbol': {\n 'lineColor': '#000',\n 'lineWidth': 2,\n 'lineOpacity': 1,\n\n 'polygonFill': '#fff',\n 'polygonOpacity': 1,\n 'opacity': 1\n }\n};\n\nvar Path = function (_Geometry) {\n inherits(Path, _Geometry);\n\n function Path() {\n classCallCheck(this, Path);\n return possibleConstructorReturn(this, _Geometry.apply(this, arguments));\n }\n\n Path.prototype.getOutline = function getOutline() {\n var painter = this._getPainter();\n if (!painter) {\n return null;\n }\n var map = this.getMap();\n var extent = painter.getContainerExtent().convertTo(function (c) {\n return map.containerPointToCoord(c);\n });\n return new Polygon(extent.toArray(), {\n symbol: {\n 'lineWidth': 1,\n 'lineColor': '6b707b'\n }\n });\n };\n\n Path.prototype.animateShow = function animateShow() {\n var _this2 = this;\n\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var cb = arguments[1];\n\n if (this._showPlayer) {\n this._showPlayer.finish();\n }\n if (isFunction(options)) {\n options = {};\n cb = options;\n }\n var coordinates = this.getCoordinates();\n if (coordinates.length === 0) {\n return this;\n }\n this._animIdx = 0;\n this._animLenSoFar = 0;\n this.show();\n var isPolygon = !!this.getShell;\n var animCoords = isPolygon ? this.getShell().concat(this.getShell()[0]) : this.getCoordinates();\n var projection = this._getProjection();\n this._aniShowCenter = projection.unproject(this._getPrjExtent().getCenter());\n var duration = options['duration'] || 1000,\n length = this.getLength(),\n easing = options['easing'] || 'out';\n this.setCoordinates([]);\n var player = this._showPlayer = Animation.animate({\n 't': duration\n }, {\n 'duration': duration,\n 'easing': easing\n }, function (frame) {\n if (!_this2.getMap()) {\n if (player.playState !== 'finished') {\n player.finish();\n if (cb) {\n var _coordinates = _this2.getCoordinates();\n cb(frame, _coordinates[_coordinates.length - 1]);\n }\n }\n return;\n }\n var currentCoord = _this2._drawAnimShowFrame(frame.styles.t, duration, length, animCoords);\n if (frame.state.playState === 'finished') {\n delete _this2._showPlayer;\n delete _this2._aniShowCenter;\n delete _this2._animIdx;\n delete _this2._animLenSoFar;\n delete _this2._animTailRatio;\n _this2.setCoordinates(coordinates);\n }\n if (cb) {\n cb(frame, currentCoord);\n }\n });\n player.play();\n return player;\n };\n\n Path.prototype._drawAnimShowFrame = function _drawAnimShowFrame(t, duration, length, coordinates) {\n if (t === 0) {\n return coordinates[0];\n }\n var map = this.getMap();\n var targetLength = t / duration * length;\n var segLen = 0;\n var i = void 0,\n l = void 0;\n for (i = this._animIdx, l = coordinates.length; i < l - 1; i++) {\n segLen = map.computeLength(coordinates[i], coordinates[i + 1]);\n if (this._animLenSoFar + segLen > targetLength) {\n break;\n }\n this._animLenSoFar += segLen;\n }\n this._animIdx = i;\n if (this._animIdx >= l - 1) {\n this.setCoordinates(coordinates);\n return coordinates[coordinates.length - 1];\n }\n var idx = this._animIdx;\n var p1 = coordinates[idx],\n p2 = coordinates[idx + 1],\n span = targetLength - this._animLenSoFar,\n r = span / segLen;\n this._animTailRatio = r;\n var x = p1.x + (p2.x - p1.x) * r,\n y = p1.y + (p2.y - p1.y) * r,\n targetCoord = new Coordinate(x, y);\n var isPolygon = !!this.getShell;\n if (!isPolygon && this.options['smoothness'] > 0) {\n var animCoords = coordinates.slice(0, this._animIdx + 3);\n this.setCoordinates(animCoords);\n } else {\n var _animCoords = coordinates.slice(0, this._animIdx + 1);\n _animCoords.push(targetCoord);\n if (isPolygon) {\n this.setCoordinates([this._aniShowCenter].concat(_animCoords));\n } else {\n this.setCoordinates(_animCoords);\n }\n }\n return targetCoord;\n };\n\n Path.prototype._getCenterInExtent = function _getCenterInExtent(extent, coordinates, clipFn) {\n var meExtent = this.getExtent();\n if (!extent.intersects(meExtent)) {\n return null;\n }\n var clipped = clipFn(coordinates, extent);\n if (clipped.length === 0) {\n return null;\n }\n var sumx = 0,\n sumy = 0,\n counter = 0;\n\n clipped.forEach(function (part) {\n if (Array.isArray(part)) {\n part.forEach(function (c) {\n if (c.point) {\n c = c.point;\n }\n sumx += c.x;\n sumy += c.y;\n counter++;\n });\n } else {\n if (part.point) {\n part = part.point;\n }\n sumx += part.x;\n sumy += part.y;\n counter++;\n }\n });\n var c = new Coordinate(sumx, sumy)._multi(1 / counter);\n c.count = counter;\n return c;\n };\n\n Path.prototype._getPath2DPoints = function _getPath2DPoints(prjCoords, disableSimplify, zoom) {\n if (!isArrayHasData(prjCoords)) {\n return [];\n }\n var map = this.getMap(),\n isSimplify = !disableSimplify && this._shouldSimplify(),\n tolerance = 2 * map._getResolution(),\n isMulti = Array.isArray(prjCoords[0]);\n delete this._simplified;\n if (isSimplify && !isMulti) {\n var count = prjCoords.length;\n prjCoords = simplify(prjCoords, tolerance, false);\n this._simplified = prjCoords.length < count;\n }\n if (isNil(zoom)) {\n zoom = map.getZoom();\n }\n return forEachCoord(prjCoords, function (c) {\n return map._prjToPoint(c, zoom);\n });\n };\n\n Path.prototype._shouldSimplify = function _shouldSimplify() {\n var layer = this.getLayer(),\n properties = this.getProperties();\n var hasAltitude = properties && layer.options['enableAltitude'] && !isNil(properties[layer.options['altitudeProperty']]);\n return layer && layer.options['enableSimplify'] && !hasAltitude && this.options['enableSimplify'];\n };\n\n Path.prototype._setPrjCoordinates = function _setPrjCoordinates(prjPoints) {\n this._prjCoords = prjPoints;\n this.onShapeChanged();\n };\n\n Path.prototype._getPrjCoordinates = function _getPrjCoordinates() {\n var projection = this._getProjection();\n if (!projection) {\n return null;\n }\n this._verifyProjection();\n if (!this._prjCoords) {\n this._prjCoords = this._projectCoords(this._coordinates);\n }\n return this._prjCoords;\n };\n\n Path.prototype._updateCache = function _updateCache() {\n this._clearCache();\n var projection = this._getProjection();\n if (!projection) {\n return;\n }\n if (this._prjCoords) {\n this._coordinates = this._unprojectCoords(this._getPrjCoordinates());\n }\n };\n\n Path.prototype._clearProjection = function _clearProjection() {\n this._prjCoords = null;\n _Geometry.prototype._clearProjection.call(this);\n };\n\n Path.prototype._projectCoords = function _projectCoords(points) {\n var projection = this._getProjection();\n if (projection) {\n return projection.projectCoords(points);\n }\n return [];\n };\n\n Path.prototype._unprojectCoords = function _unprojectCoords(prjPoints) {\n var projection = this._getProjection();\n if (projection) {\n return projection.unprojectCoords(prjPoints);\n }\n return [];\n };\n\n Path.prototype._computeCenter = function _computeCenter() {\n var ring = this._coordinates;\n if (!isArrayHasData(ring)) {\n return null;\n }\n var sumx = 0,\n sumy = 0,\n counter = 0;\n var size = ring.length;\n for (var i = 0; i < size; i++) {\n if (ring[i]) {\n if (isNumber(ring[i].x) && isNumber(ring[i].y)) {\n sumx += ring[i].x;\n sumy += ring[i].y;\n counter++;\n }\n }\n }\n return new Coordinate(sumx / counter, sumy / counter);\n };\n\n Path.prototype._computeExtent = function _computeExtent() {\n var shell = this._coordinates;\n if (!isArrayHasData(shell)) {\n return null;\n }\n var rings = [shell];\n if (this.hasHoles && this.hasHoles()) {\n rings.push.apply(rings, this.getHoles());\n }\n return this._coords2Extent(rings, this._getProjection());\n };\n\n Path.prototype._computePrjExtent = function _computePrjExtent() {\n var coords = [this._getPrjCoordinates()];\n if (this.hasHoles && this.hasHoles()) {\n coords.push.apply(coords, this._getPrjHoles());\n }\n return this._coords2Extent(coords);\n };\n\n Path.prototype._get2DLength = function _get2DLength() {\n var vertexes = this._getPath2DPoints(this._getPrjCoordinates(), true);\n var len = 0;\n for (var i = 1, l = vertexes.length; i < l; i++) {\n len += vertexes[i].distanceTo(vertexes[i - 1]);\n }\n return len;\n };\n\n Path.prototype._hitTestTolerance = function _hitTestTolerance() {\n var symbol = this._getInternalSymbol();\n var w = void 0;\n if (Array.isArray(symbol)) {\n w = 0;\n for (var i = 0; i < symbol.length; i++) {\n if (isNumber(symbol[i]['lineWidth'])) {\n if (symbol[i]['lineWidth'] > w) {\n w = symbol[i]['lineWidth'];\n }\n }\n }\n } else {\n w = symbol['lineWidth'];\n }\n return isNumber(w) ? w / 2 : 1.5;\n };\n\n Path.prototype._coords2Extent = function _coords2Extent(coords, proj) {\n var result = new Extent(proj);\n for (var i = 0, l = coords.length; i < l; i++) {\n for (var j = 0, ll = coords[i].length; j < ll; j++) {\n result._combine(coords[i][j]);\n }\n }\n return result;\n };\n\n return Path;\n}(Geometry);\n\nPath.mergeOptions(options$4);\n\nvar JSON_TYPE = 'Polygon';\n\nvar Polygon = function (_Path) {\n inherits(Polygon, _Path);\n\n function Polygon(coordinates, opts) {\n classCallCheck(this, Polygon);\n\n var _this = possibleConstructorReturn(this, _Path.call(this, opts));\n\n _this.type = 'Polygon';\n if (coordinates) {\n _this.setCoordinates(coordinates);\n }\n return _this;\n }\n\n Polygon.prototype.setCoordinates = function setCoordinates(coordinates) {\n if (!coordinates) {\n this._coordinates = null;\n this._holes = null;\n this._projectRings();\n return this;\n }\n var rings = Coordinate.toCoordinates(coordinates);\n var len = rings.length;\n if (!Array.isArray(rings[0])) {\n this._coordinates = this._trimRing(rings);\n } else {\n this._coordinates = this._trimRing(rings[0]);\n if (len > 1) {\n var holes = [];\n for (var i = 1; i < len; i++) {\n if (!rings[i]) {\n continue;\n }\n holes.push(this._trimRing(rings[i]));\n }\n this._holes = holes;\n }\n }\n\n this._projectRings();\n return this;\n };\n\n Polygon.prototype.getCoordinates = function getCoordinates() {\n if (!this._coordinates) {\n return [];\n }\n var holes = this.getHoles();\n var rings = [this._copyAndCloseRing(this._coordinates)];\n for (var i = 0, l = holes.length; i < l; i++) {\n rings.push(this._copyAndCloseRing(holes[i]));\n }\n return rings;\n };\n\n Polygon.prototype.getCenterInExtent = function getCenterInExtent(extent) {\n return this._getCenterInExtent(extent, this.getShell(), clipPolygon);\n };\n\n Polygon.prototype.getShell = function getShell() {\n return this._coordinates || [];\n };\n\n Polygon.prototype.getHoles = function getHoles() {\n return this._holes || [];\n };\n\n Polygon.prototype.hasHoles = function hasHoles() {\n return this.getHoles().length > 0;\n };\n\n Polygon.prototype._projectRings = function _projectRings() {\n if (!this.getMap()) {\n this.onShapeChanged();\n return;\n }\n this._prjCoords = this._projectCoords(this._coordinates);\n this._prjHoles = this._projectCoords(this._holes);\n this.onShapeChanged();\n };\n\n Polygon.prototype._cleanRing = function _cleanRing(ring) {\n for (var i = ring.length - 1; i >= 0; i--) {\n if (!ring[i]) {\n ring.splice(i, 1);\n }\n }\n };\n\n Polygon.prototype._checkRing = function _checkRing(ring) {\n this._cleanRing(ring);\n if (!ring || !isArrayHasData(ring)) {\n return false;\n }\n var lastPoint = ring[ring.length - 1];\n var isClose = true;\n if (ring[0].x !== lastPoint.x || ring[0].y !== lastPoint.y) {\n isClose = false;\n }\n return isClose;\n };\n\n Polygon.prototype._trimRing = function _trimRing(ring) {\n var isClose = this._checkRing(ring);\n if (isArrayHasData(ring) && isClose) {\n ring.splice(ring.length - 1, 1);\n }\n return ring;\n };\n\n Polygon.prototype._copyAndCloseRing = function _copyAndCloseRing(ring) {\n ring = ring.slice(0);\n var isClose = this._checkRing(ring);\n if (isArrayHasData(ring) && !isClose) {\n ring.push(ring[0].copy());\n return ring;\n } else {\n return ring;\n }\n };\n\n Polygon.prototype._getPrjShell = function _getPrjShell() {\n if (this.getJSONType() === JSON_TYPE) {\n return this._getPrjCoordinates();\n }\n var projection = this._getProjection();\n if (!projection) {\n return null;\n }\n this._verifyProjection();\n if (!this._prjShell) {\n this._prjShell = this._projectCoords(this.getShell());\n }\n return this._prjShell;\n };\n\n Polygon.prototype._getPrjHoles = function _getPrjHoles() {\n var projection = this._getProjection();\n if (!projection) {\n return null;\n }\n this._verifyProjection();\n if (!this._prjHoles) {\n this._prjHoles = this._projectCoords(this.getHoles());\n }\n return this._prjHoles;\n };\n\n Polygon.prototype._computeGeodesicLength = function _computeGeodesicLength(measurer) {\n var rings = this.getCoordinates();\n if (!isArrayHasData(rings)) {\n return 0;\n }\n var result = 0;\n for (var i = 0, len = rings.length; i < len; i++) {\n result += measurer.measureLength(rings[i]);\n }\n return result;\n };\n\n Polygon.prototype._computeGeodesicArea = function _computeGeodesicArea(measurer) {\n var rings = this.getCoordinates();\n if (!isArrayHasData(rings)) {\n return 0;\n }\n var result = measurer.measureArea(rings[0]);\n\n for (var i = 1, len = rings.length; i < len; i++) {\n result -= measurer.measureArea(rings[i]);\n }\n return result;\n };\n\n Polygon.prototype._updateCache = function _updateCache() {\n _Path.prototype._updateCache.call(this);\n if (this._prjHoles) {\n this._holes = this._unprojectCoords(this._getPrjHoles());\n }\n };\n\n Polygon.prototype._clearCache = function _clearCache() {\n delete this._prjShell;\n return _Path.prototype._clearCache.call(this);\n };\n\n Polygon.prototype._clearProjection = function _clearProjection() {\n if (this._prjHoles) {\n this._prjHoles = null;\n }\n if (this._prjShell) {\n this._prjShell = null;\n }\n _Path.prototype._clearProjection.call(this);\n };\n\n return Polygon;\n}(Path);\n\nPolygon.registerJSONType(JSON_TYPE);\n\nvar CenterMixin = function (Base) {\n return function (_Base) {\n inherits(_class, _Base);\n\n function _class() {\n classCallCheck(this, _class);\n return possibleConstructorReturn(this, _Base.apply(this, arguments));\n }\n\n _class.prototype.getCoordinates = function getCoordinates() {\n return this._coordinates;\n };\n\n _class.prototype.setCoordinates = function setCoordinates(coordinates) {\n var center = coordinates instanceof Coordinate ? coordinates : new Coordinate(coordinates);\n if (center.equals(this._coordinates)) {\n return this;\n }\n this._coordinates = center;\n if (!this.getMap()) {\n this.onPositionChanged();\n return this;\n }\n var projection = this._getProjection();\n this._setPrjCoordinates(projection.project(this._coordinates));\n return this;\n };\n\n _class.prototype._getCenter2DPoint = function _getCenter2DPoint(zoom) {\n var map = this.getMap();\n if (!map) {\n return null;\n }\n var z = isNil(zoom) ? map.getZoom() : map.getGLZoom();\n var pcenter = this._getPrjCoordinates();\n if (!pcenter) {\n return null;\n }\n\n return map._prjToPoint(pcenter, z);\n };\n\n _class.prototype._getPrjCoordinates = function _getPrjCoordinates() {\n var projection = this._getProjection();\n if (!projection) {\n return null;\n }\n this._verifyProjection();\n if (!this._pcenter) {\n if (this._coordinates) {\n this._pcenter = projection.project(this._coordinates);\n }\n }\n return this._pcenter;\n };\n\n _class.prototype._setPrjCoordinates = function _setPrjCoordinates(pcenter) {\n this._pcenter = pcenter;\n this.onPositionChanged();\n };\n\n _class.prototype._updateCache = function _updateCache() {\n this._clearCache();\n var projection = this._getProjection();\n if (this._pcenter && projection) {\n this._coordinates = projection.unproject(this._pcenter);\n }\n };\n\n _class.prototype._clearProjection = function _clearProjection() {\n this._pcenter = null;\n _Base.prototype._clearProjection.call(this);\n };\n\n _class.prototype._computeCenter = function _computeCenter() {\n return this._coordinates ? this._coordinates.copy() : null;\n };\n\n return _class;\n }(Base);\n};\n\nvar options$7 = {\n 'symbol': {\n 'markerType': 'path',\n 'markerPath': [{\n 'path': 'M8 23l0 0 0 0 0 0 0 0 0 0c-4,-5 -8,-10 -8,-14 0,-5 4,-9 8,-9l0 0 0 0c4,0 8,4 8,9 0,4 -4,9 -8,14z M3,9 a5,5 0,1,0,0,-0.9Z',\n 'fill': '#DE3333'\n }],\n 'markerPathWidth': 16,\n 'markerPathHeight': 23,\n 'markerWidth': 24,\n 'markerHeight': 34\n },\n 'hitTestForEvent': false\n};\n\nvar Marker = function (_CenterMixin) {\n inherits(Marker, _CenterMixin);\n\n function Marker(coordinates, opts) {\n classCallCheck(this, Marker);\n\n var _this = possibleConstructorReturn(this, _CenterMixin.call(this, opts));\n\n _this.type = 'Point';\n if (coordinates) {\n _this.setCoordinates(coordinates);\n }\n return _this;\n }\n\n Marker.prototype.getOutline = function getOutline() {\n var painter = this._getPainter();\n if (!painter) {\n return null;\n }\n var coord = this.getCoordinates();\n var extent = painter.getContainerExtent();\n var anchor = this.getMap().coordToContainerPoint(coord);\n return new Marker(coord, {\n 'symbol': {\n 'markerType': 'square',\n 'markerWidth': extent.getWidth(),\n 'markerHeight': extent.getHeight(),\n 'markerLineWidth': 1,\n 'markerLineColor': '6b707b',\n 'markerFill': 'rgba(0, 0, 0, 0)',\n 'markerDx': extent.xmin - (anchor.x - extent.getWidth() / 2),\n 'markerDy': extent.ymin - (anchor.y - extent.getHeight() / 2)\n }\n });\n };\n\n Marker.prototype._isVectorMarker = function _isVectorMarker() {\n var symbol = this._getInternalSymbol();\n if (Array.isArray(symbol)) {\n return false;\n }\n return VectorMarkerSymbolizer.test(symbol);\n };\n\n Marker.prototype._canEdit = function _canEdit() {\n var symbol = this._getInternalSymbol();\n if (Array.isArray(symbol)) {\n return false;\n }\n return VectorMarkerSymbolizer.test(symbol) || VectorPathMarkerSymbolizer.test(symbol) || ImageMarkerSymbolizer.test(symbol);\n };\n\n Marker.prototype._containsPoint = function _containsPoint(point, t) {\n var extent = this.getContainerExtent();\n if (t) {\n extent = extent.expand(t);\n }\n if (extent.contains(point)) {\n if (this.options['hitTestForEvent']) {\n return _CenterMixin.prototype._containsPoint.call(this, point, t);\n } else {\n return true;\n }\n } else {\n return false;\n }\n };\n\n Marker.prototype._computeExtent = function _computeExtent() {\n return computeExtent.call(this, 'getCenter');\n };\n\n Marker.prototype._computePrjExtent = function _computePrjExtent() {\n return computeExtent.call(this, '_getPrjCoordinates');\n };\n\n Marker.prototype._computeGeodesicLength = function _computeGeodesicLength() {\n return 0;\n };\n\n Marker.prototype._computeGeodesicArea = function _computeGeodesicArea() {\n return 0;\n };\n\n Marker.prototype._getSprite = function _getSprite(resources, canvasClass) {\n if (this._getPainter()) {\n return this._getPainter().getSprite(resources, canvasClass);\n }\n return new Painter(this).getSprite(resources, canvasClass);\n };\n\n return Marker;\n}(CenterMixin(Geometry));\n\nMarker.mergeOptions(options$7);\n\nMarker.registerJSONType('Marker');\n\nfunction computeExtent(fn) {\n var coordinates = this[fn]();\n if (!coordinates) {\n return null;\n }\n return new Extent(coordinates, coordinates, this._getProjection());\n}\n\nvar options$8 = {\n 'arrowStyle': null,\n 'arrowPlacement': 'vertex-last' };\n\nvar LineString = function (_Path) {\n inherits(LineString, _Path);\n\n function LineString(coordinates, options) {\n classCallCheck(this, LineString);\n\n var _this = possibleConstructorReturn(this, _Path.call(this, options));\n\n _this.type = 'LineString';\n if (coordinates) {\n _this.setCoordinates(coordinates);\n }\n return _this;\n }\n\n LineString.prototype.setCoordinates = function setCoordinates(coordinates) {\n if (!coordinates) {\n this._coordinates = null;\n this._setPrjCoordinates(null);\n return this;\n }\n this._coordinates = Coordinate.toCoordinates(coordinates);\n if (this.getMap()) {\n this._setPrjCoordinates(this._projectCoords(this._coordinates));\n } else {\n this.onShapeChanged();\n }\n return this;\n };\n\n LineString.prototype.getCoordinates = function getCoordinates() {\n return this._coordinates || [];\n };\n\n LineString.prototype.getCenterInExtent = function getCenterInExtent(extent) {\n return this._getCenterInExtent(extent, this.getCoordinates(), clipLine);\n };\n\n LineString.prototype._computeGeodesicLength = function _computeGeodesicLength(measurer) {\n return measurer.measureLength(this.getCoordinates());\n };\n\n LineString.prototype._computeGeodesicArea = function _computeGeodesicArea() {\n return 0;\n };\n\n return LineString;\n}(Path);\n\nLineString.mergeOptions(options$8);\n\nLineString.registerJSONType('LineString');\n\nvar GeometryCollection = function (_Geometry) {\n inherits(GeometryCollection, _Geometry);\n\n function GeometryCollection(geometries, opts) {\n classCallCheck(this, GeometryCollection);\n\n var _this = possibleConstructorReturn(this, _Geometry.call(this, opts));\n\n _this.type = 'GeometryCollection';\n _this.setGeometries(geometries);\n return _this;\n }\n\n GeometryCollection.prototype.setGeometries = function setGeometries(_geometries) {\n var geometries = this._checkGeometries(_geometries || []);\n var symbol = this._getSymbol();\n var options = this.config();\n\n for (var i = geometries.length - 1; i >= 0; i--) {\n geometries[i]._initOptions(options);\n geometries[i]._setParent(this);\n geometries[i]._setEventParent(this);\n if (symbol) {\n geometries[i].setSymbol(symbol);\n }\n }\n this._geometries = geometries;\n if (this.getLayer()) {\n this._bindGeometriesToLayer();\n this.onShapeChanged();\n }\n return this;\n };\n\n GeometryCollection.prototype.getGeometries = function getGeometries() {\n return this._geometries || [];\n };\n\n GeometryCollection.prototype.forEach = function forEach(fn, context) {\n var geometries = this.getGeometries();\n for (var i = 0, l = geometries.length; i < l; i++) {\n if (!geometries[i]) {\n continue;\n }\n if (!context) {\n fn(geometries[i], i);\n } else {\n fn.call(context, geometries[i], i);\n }\n }\n return this;\n };\n\n GeometryCollection.prototype.filter = function filter(fn, context) {\n if (!fn) {\n return new GeometryCollection();\n }\n var selected = [];\n var isFn = isFunction(fn);\n var filter = isFn ? fn : createFilter(fn);\n\n this.forEach(function (geometry) {\n var g = isFn ? geometry : getFilterFeature(geometry);\n if (context ? filter.call(context, g) : filter(g)) {\n selected.push(geometry);\n }\n }, this);\n\n return new GeometryCollection(selected);\n };\n\n GeometryCollection.prototype.translate = function translate(offset) {\n if (!offset) {\n return this;\n }\n if (this.isEmpty()) {\n return this;\n }\n var args = arguments;\n this.forEach(function (geometry) {\n if (geometry && geometry.translate) {\n geometry.translate.apply(geometry, args);\n }\n });\n return this;\n };\n\n GeometryCollection.prototype.isEmpty = function isEmpty() {\n return !isArrayHasData(this.getGeometries());\n };\n\n GeometryCollection.prototype.remove = function remove() {\n this.forEach(function (geometry) {\n geometry._unbind();\n });\n return Geometry.prototype.remove.apply(this, arguments);\n };\n\n GeometryCollection.prototype.show = function show() {\n this.options['visible'] = true;\n this.forEach(function (geometry) {\n geometry.show();\n });\n return this;\n };\n\n GeometryCollection.prototype.hide = function hide() {\n this.options['visible'] = false;\n this.forEach(function (geometry) {\n geometry.hide();\n });\n return this;\n };\n\n GeometryCollection.prototype.onConfig = function onConfig(config) {\n this.forEach(function (geometry) {\n geometry.config(config);\n });\n };\n\n GeometryCollection.prototype.getSymbol = function getSymbol() {\n var s = _Geometry.prototype.getSymbol.call(this);\n if (!s) {\n var symbols = [];\n var is = false;\n this.forEach(function (g) {\n var symbol = g.getSymbol();\n if (symbol && !is) {\n is = true;\n }\n symbols.push(g.getSymbol());\n });\n if (is) {\n s = {\n 'children': symbols\n };\n }\n }\n return s;\n };\n\n GeometryCollection.prototype.setSymbol = function setSymbol(s) {\n if (s && s['children']) {\n this._symbol = null;\n this.forEach(function (g, i) {\n g.setSymbol(s['children'][i]);\n });\n } else {\n var symbol = this._prepareSymbol(s);\n this._symbol = symbol;\n this.forEach(function (g) {\n g.setSymbol(symbol);\n });\n }\n this.onSymbolChanged();\n return this;\n };\n\n GeometryCollection.prototype._setExternSymbol = function _setExternSymbol(symbol) {\n symbol = this._prepareSymbol(symbol);\n this._externSymbol = symbol;\n this.forEach(function (geometry) {\n geometry._setExternSymbol(symbol);\n });\n this.onSymbolChanged();\n return this;\n };\n\n GeometryCollection.prototype._bindLayer = function _bindLayer() {\n _Geometry.prototype._bindLayer.apply(this, arguments);\n this._bindGeometriesToLayer();\n };\n\n GeometryCollection.prototype._bindGeometriesToLayer = function _bindGeometriesToLayer() {\n var layer = this.getLayer();\n this.forEach(function (geometry) {\n geometry._bindLayer(layer);\n });\n };\n\n GeometryCollection.prototype._checkGeometries = function _checkGeometries(geometries) {\n var invalidGeoError = 'The geometry added to collection is invalid.';\n if (geometries && !Array.isArray(geometries)) {\n if (geometries instanceof Geometry) {\n return [geometries];\n } else {\n throw new Error(invalidGeoError);\n }\n } else {\n for (var i = 0, l = geometries.length; i < l; i++) {\n if (!this._checkGeo(geometries[i])) {\n throw new Error(invalidGeoError + ' Index: ' + i);\n }\n }\n return geometries;\n }\n };\n\n GeometryCollection.prototype._checkGeo = function _checkGeo(geo) {\n return geo instanceof Geometry;\n };\n\n GeometryCollection.prototype._updateCache = function _updateCache() {\n this._clearCache();\n if (this.isEmpty()) {\n return;\n }\n this.forEach(function (geometry) {\n if (geometry && geometry._updateCache) {\n geometry._updateCache();\n }\n });\n };\n\n GeometryCollection.prototype._removePainter = function _removePainter() {\n if (this._painter) {\n this._painter.remove();\n }\n delete this._painter;\n this.forEach(function (geometry) {\n geometry._removePainter();\n });\n };\n\n GeometryCollection.prototype._computeCenter = function _computeCenter(projection) {\n if (!projection || this.isEmpty()) {\n return null;\n }\n var sumX = 0,\n sumY = 0,\n counter = 0;\n var geometries = this.getGeometries();\n for (var i = 0, l = geometries.length; i < l; i++) {\n if (!geometries[i]) {\n continue;\n }\n var center = geometries[i]._computeCenter(projection);\n if (center) {\n sumX += center.x;\n sumY += center.y;\n counter++;\n }\n }\n if (counter === 0) {\n return null;\n }\n return new Coordinate(sumX / counter, sumY / counter);\n };\n\n GeometryCollection.prototype._containsPoint = function _containsPoint(point, t) {\n if (this.isEmpty()) {\n return false;\n }\n var geometries = this.getGeometries();\n for (var i = 0, l = geometries.length; i < l; i++) {\n if (geometries[i]._containsPoint(point, t)) {\n return true;\n }\n }\n return false;\n };\n\n GeometryCollection.prototype._computeExtent = function _computeExtent(projection) {\n return computeExtent$1.call(this, projection, '_computeExtent');\n };\n\n GeometryCollection.prototype._computePrjExtent = function _computePrjExtent(projection) {\n return computeExtent$1.call(this, projection, '_computePrjExtent');\n };\n\n GeometryCollection.prototype._computeGeodesicLength = function _computeGeodesicLength(projection) {\n if (!projection || this.isEmpty()) {\n return 0;\n }\n var geometries = this.getGeometries();\n var result = 0;\n for (var i = 0, l = geometries.length; i < l; i++) {\n if (!geometries[i]) {\n continue;\n }\n result += geometries[i]._computeGeodesicLength(projection);\n }\n return result;\n };\n\n GeometryCollection.prototype._computeGeodesicArea = function _computeGeodesicArea(projection) {\n if (!projection || this.isEmpty()) {\n return 0;\n }\n var geometries = this.getGeometries();\n var result = 0;\n for (var i = 0, l = geometries.length; i < l; i++) {\n if (!geometries[i]) {\n continue;\n }\n result += geometries[i]._computeGeodesicArea(projection);\n }\n return result;\n };\n\n GeometryCollection.prototype._exportGeoJSONGeometry = function _exportGeoJSONGeometry() {\n var children = [];\n if (!this.isEmpty()) {\n var geometries = this.getGeometries();\n for (var i = 0, l = geometries.length; i < l; i++) {\n if (!geometries[i]) {\n continue;\n }\n children.push(geometries[i]._exportGeoJSONGeometry());\n }\n }\n return {\n 'type': 'GeometryCollection',\n 'geometries': children\n };\n };\n\n GeometryCollection.prototype._clearProjection = function _clearProjection() {\n if (this.isEmpty()) {\n return;\n }\n var geometries = this.getGeometries();\n for (var i = 0, l = geometries.length; i < l; i++) {\n if (!geometries[i]) {\n continue;\n }\n geometries[i]._clearProjection();\n }\n };\n\n GeometryCollection.prototype._getConnectPoints = function _getConnectPoints() {\n var extent = this.getExtent();\n var anchors = [new Coordinate(extent.xmin, extent.ymax), new Coordinate(extent.xmax, extent.ymin), new Coordinate(extent.xmin, extent.ymin), new Coordinate(extent.xmax, extent.ymax)];\n return anchors;\n };\n\n GeometryCollection.prototype._getExternalResources = function _getExternalResources() {\n if (this.isEmpty()) {\n return [];\n }\n var geometries = this.getGeometries(),\n resources = [];\n var cache = {};\n var symbol = void 0,\n res = void 0,\n key = void 0;\n for (var i = 0, l = geometries.length; i < l; i++) {\n if (!geometries[i]) {\n continue;\n }\n symbol = geometries[i]._getInternalSymbol();\n res = getExternalResources(symbol);\n for (var ii = 0, ll = res.length; ii < ll; ii++) {\n key = res[ii].join();\n if (!cache[key]) {\n resources.push(res[ii]);\n cache[key] = 1;\n }\n }\n }\n return resources;\n };\n\n GeometryCollection.prototype.startEdit = function startEdit(opts) {\n var _this2 = this;\n\n if (this.isEmpty()) {\n return this;\n }\n if (!opts) {\n opts = {};\n }\n if (opts['symbol']) {\n this._originalSymbol = this.getSymbol();\n this.setSymbol(opts['symbol']);\n }\n this._draggbleBeforeEdit = this.options['draggable'];\n this.config('draggable', false);\n var geometries = this.getGeometries();\n for (var i = 0, l = geometries.length; i < l; i++) {\n geometries[i].startEdit(opts);\n }\n this._editing = true;\n this.hide();\n setTimeout(function () {\n _this2.fire('editstart');\n }, 1);\n return this;\n };\n\n GeometryCollection.prototype.endEdit = function endEdit() {\n if (this.isEmpty()) {\n return this;\n }\n var geometries = this.getGeometries();\n for (var i = 0, l = geometries.length; i < l; i++) {\n geometries[i].endEdit();\n }\n if (this._originalSymbol) {\n this.setSymbol(this._originalSymbol);\n delete this._originalSymbol;\n }\n this._editing = false;\n this.show();\n this.config('draggable', this._draggbleBeforeEdit);\n this.fire('editend');\n return this;\n };\n\n GeometryCollection.prototype.isEditing = function isEditing() {\n if (!this._editing) {\n return false;\n }\n return true;\n };\n\n return GeometryCollection;\n}(Geometry);\n\nGeometryCollection.registerJSONType('GeometryCollection');\n\nfunction computeExtent$1(projection, fn) {\n if (this.isEmpty()) {\n return null;\n }\n var geometries = this.getGeometries();\n var result = null;\n for (var i = 0, l = geometries.length; i < l; i++) {\n var geo = geometries[i];\n if (!geo) {\n continue;\n }\n var geoExtent = geo[fn](projection);\n if (geoExtent) {\n result = geoExtent.combine(result);\n }\n }\n return result;\n}\n\nvar MultiGeometry = function (_GeometryCollection) {\n inherits(MultiGeometry, _GeometryCollection);\n\n function MultiGeometry(geoType, type, data, options) {\n classCallCheck(this, MultiGeometry);\n\n var _this = possibleConstructorReturn(this, _GeometryCollection.call(this, null, options));\n\n _this.GeometryType = geoType;\n _this.type = type;\n _this._initData(data);\n return _this;\n }\n\n MultiGeometry.prototype.getCoordinates = function getCoordinates() {\n var coordinates = [];\n var geometries = this.getGeometries();\n for (var i = 0, l = geometries.length; i < l; i++) {\n coordinates.push(geometries[i].getCoordinates());\n }\n return coordinates;\n };\n\n MultiGeometry.prototype.setCoordinates = function setCoordinates(coordinates) {\n coordinates = coordinates || [];\n var geometries = [];\n for (var i = 0, l = coordinates.length; i < l; i++) {\n var g = new this.GeometryType(coordinates[i], this.config());\n geometries.push(g);\n }\n this.setGeometries(geometries);\n return this;\n };\n\n MultiGeometry.prototype._initData = function _initData(data) {\n data = data || [];\n if (data.length) {\n if (data[0] instanceof this.GeometryType) {\n this.setGeometries(data);\n } else {\n this.setCoordinates(data);\n }\n }\n };\n\n MultiGeometry.prototype._checkGeo = function _checkGeo(geo) {\n return geo instanceof this.GeometryType;\n };\n\n MultiGeometry.prototype._exportGeoJSONGeometry = function _exportGeoJSONGeometry() {\n var points = this.getCoordinates();\n var coordinates = Coordinate.toNumberArrays(points);\n return {\n 'type': this.getType(),\n 'coordinates': coordinates\n };\n };\n\n return MultiGeometry;\n}(GeometryCollection);\n\nvar MultiPoint = function (_MultiGeometry) {\n inherits(MultiPoint, _MultiGeometry);\n\n function MultiPoint(data, opts) {\n classCallCheck(this, MultiPoint);\n return possibleConstructorReturn(this, _MultiGeometry.call(this, Marker, 'MultiPoint', data, opts));\n }\n\n return MultiPoint;\n}(MultiGeometry);\n\nMultiPoint.registerJSONType('MultiPoint');\n\nvar MultiPath = function (_MultiGeometry) {\n inherits(MultiPath, _MultiGeometry);\n\n function MultiPath() {\n classCallCheck(this, MultiPath);\n return possibleConstructorReturn(this, _MultiGeometry.apply(this, arguments));\n }\n\n MultiPath.prototype.getCenterInExtent = function getCenterInExtent(extent) {\n var children = this.getGeometries();\n var sumx = 0,\n sumy = 0,\n counter = 0;\n\n children.forEach(function (l) {\n var c = l.getCenterInExtent(extent);\n if (c) {\n sumx += c.x * c.count;\n sumy += c.y * c.count;\n counter += c.count;\n }\n });\n if (counter === 0) {\n return null;\n }\n return new Coordinate(sumx, sumy)._multi(1 / counter);\n };\n\n return MultiPath;\n}(MultiGeometry);\n\nvar MultiLineString = function (_MultiPath) {\n inherits(MultiLineString, _MultiPath);\n\n function MultiLineString(data, options) {\n classCallCheck(this, MultiLineString);\n return possibleConstructorReturn(this, _MultiPath.call(this, LineString, 'MultiLineString', data, options));\n }\n\n return MultiLineString;\n}(MultiPath);\n\nMultiLineString.registerJSONType('MultiLineString');\n\nvar MultiPolygon = function (_MultiPath) {\n inherits(MultiPolygon, _MultiPath);\n\n function MultiPolygon(data, opts) {\n classCallCheck(this, MultiPolygon);\n return possibleConstructorReturn(this, _MultiPath.call(this, Polygon, 'MultiPolygon', data, opts));\n }\n\n return MultiPolygon;\n}(MultiPath);\n\nMultiPolygon.registerJSONType('MultiPolygon');\n\nvar types$1 = {\n 'Marker': Marker,\n 'LineString': LineString,\n 'Polygon': Polygon,\n 'MultiPoint': MultiPoint,\n 'MultiLineString': MultiLineString,\n 'MultiPolygon': MultiPolygon\n};\n\nvar GeoJSON = {\n toGeometry: function toGeometry(geoJSON) {\n if (isString(geoJSON)) {\n geoJSON = parseJSON(geoJSON);\n }\n if (Array.isArray(geoJSON)) {\n var resultGeos = [];\n for (var i = 0, len = geoJSON.length; i < len; i++) {\n var geo = GeoJSON._convert(geoJSON[i]);\n if (Array.isArray(geo)) {\n pushIn(resultGeos, geo);\n } else {\n resultGeos.push(geo);\n }\n }\n return resultGeos;\n } else {\n var resultGeo = GeoJSON._convert(geoJSON);\n return resultGeo;\n }\n },\n\n _convert: function _convert(json) {\n if (!json || isNil(json['type'])) {\n return null;\n }\n\n var type = json['type'];\n if (type === 'Feature') {\n var g = json['geometry'];\n var geometry = GeoJSON._convert(g);\n if (!geometry) {\n return null;\n }\n geometry.setId(json['id']);\n geometry.setProperties(json['properties']);\n return geometry;\n } else if (type === 'FeatureCollection') {\n var features = json['features'];\n if (!features) {\n return null;\n }\n var result = GeoJSON.toGeometry(features);\n return result;\n } else if (['Point', 'LineString', 'Polygon', 'MultiPoint', 'MultiLineString', 'MultiPolygon'].indexOf(type) >= 0) {\n var clazz = type === 'Point' ? 'Marker' : type;\n return new types$1[clazz](json['coordinates']);\n } else if (type === 'GeometryCollection') {\n var geometries = json['geometries'];\n if (!isArrayHasData(geometries)) {\n return new GeometryCollection();\n }\n var mGeos = [];\n var size = geometries.length;\n for (var i = 0; i < size; i++) {\n mGeos.push(GeoJSON._convert(geometries[i]));\n }\n return new GeometryCollection(mGeos);\n }\n return null;\n }\n};\n\nvar options$9 = {\n 'numberOfShellPoints': 60\n};\n\nvar Circle = function (_CenterMixin) {\n inherits(Circle, _CenterMixin);\n\n Circle.fromJSON = function fromJSON(json) {\n var feature = json['feature'];\n var circle = new Circle(json['coordinates'], json['radius'], json['options']);\n circle.setProperties(feature['properties']);\n return circle;\n };\n\n function Circle(coordinates, radius, opts) {\n classCallCheck(this, Circle);\n\n var _this = possibleConstructorReturn(this, _CenterMixin.call(this, null, opts));\n\n if (coordinates) {\n _this.setCoordinates(coordinates);\n }\n _this._radius = radius;\n return _this;\n }\n\n Circle.prototype.getRadius = function getRadius() {\n return this._radius;\n };\n\n Circle.prototype.setRadius = function setRadius(radius) {\n this._radius = radius;\n this.onShapeChanged();\n return this;\n };\n\n Circle.prototype.getShell = function getShell() {\n var measurer = this._getMeasurer(),\n center = this.getCoordinates(),\n numberOfPoints = this.options['numberOfShellPoints'],\n radius = this.getRadius();\n var shell = [];\n var rad = void 0,\n dx = void 0,\n dy = void 0;\n for (var i = 0, len = numberOfPoints - 1; i < len; i++) {\n rad = 360 * i / len * Math.PI / 180;\n dx = radius * Math.cos(rad);\n dy = radius * Math.sin(rad);\n var vertex = measurer.locate(center, dx, dy);\n shell.push(vertex);\n }\n shell.push(shell[0]);\n return shell;\n };\n\n Circle.prototype.getHoles = function getHoles() {\n return [];\n };\n\n Circle.prototype.animateShow = function animateShow() {\n return this.show();\n };\n\n Circle.prototype._containsPoint = function _containsPoint(point, tolerance) {\n var map = this.getMap();\n if (map.getPitch()) {\n return _CenterMixin.prototype._containsPoint.call(this, point, tolerance);\n }\n var center = map._pointToContainerPoint(this._getCenter2DPoint()),\n size = this.getSize(),\n t = isNil(tolerance) ? this._hitTestTolerance() : tolerance,\n se = center.add(size.width / 2, size.height / 2);\n return withInEllipse(point, center, se, t);\n };\n\n Circle.prototype._computePrjExtent = function _computePrjExtent(projection) {\n var minmax = this._getMinMax(projection);\n if (!minmax) {\n return null;\n }\n var pcenter = this._getPrjCoordinates();\n var pminmax = minmax.map(function (c) {\n return projection.project(c);\n });\n var dx = Math.min(Math.abs(pminmax[0].x - pcenter.x), Math.abs(pminmax[1].x - pcenter.x)),\n dy = Math.min(Math.abs(pminmax[2].y - pcenter.y), Math.abs(pminmax[3].y - pcenter.y));\n return new Extent(pcenter.sub(dx, dy), pcenter.add(dx, dy));\n };\n\n Circle.prototype._computeExtent = function _computeExtent(measurer) {\n var minmax = this._getMinMax(measurer);\n if (!minmax) {\n return null;\n }\n return new Extent(minmax[0].x, minmax[2].y, minmax[1].x, minmax[3].y, this._getProjection());\n };\n\n Circle.prototype._getMinMax = function _getMinMax(measurer) {\n if (!measurer || !this._coordinates || isNil(this._radius)) {\n return null;\n }\n var radius = this._radius;\n var p1 = measurer.locate(this._coordinates, -radius, 0),\n p2 = measurer.locate(this._coordinates, radius, 0),\n p3 = measurer.locate(this._coordinates, 0, radius),\n p4 = measurer.locate(this._coordinates, 0, -radius);\n return [p1, p2, p3, p4];\n };\n\n Circle.prototype._computeGeodesicLength = function _computeGeodesicLength() {\n if (isNil(this._radius)) {\n return 0;\n }\n return Math.PI * 2 * this._radius;\n };\n\n Circle.prototype._computeGeodesicArea = function _computeGeodesicArea() {\n if (isNil(this._radius)) {\n return 0;\n }\n return Math.PI * Math.pow(this._radius, 2);\n };\n\n Circle.prototype._exportGeoJSONGeometry = function _exportGeoJSONGeometry() {\n var coordinates = Coordinate.toNumberArrays([this.getShell()]);\n return {\n 'type': 'Polygon',\n 'coordinates': coordinates\n };\n };\n\n Circle.prototype._toJSON = function _toJSON(options) {\n var center = this.getCenter();\n var opts = extend({}, options);\n opts.geometry = false;\n var feature = this.toGeoJSON(opts);\n feature['geometry'] = {\n 'type': 'Polygon'\n };\n return {\n 'feature': feature,\n 'subType': 'Circle',\n 'coordinates': [center.x, center.y],\n 'radius': this.getRadius()\n };\n };\n\n return Circle;\n}(CenterMixin(Polygon));\n\nCircle.mergeOptions(options$9);\n\nCircle.registerJSONType('Circle');\n\nvar options$10 = {\n 'numberOfShellPoints': 80\n};\n\nvar Ellipse = function (_CenterMixin) {\n inherits(Ellipse, _CenterMixin);\n\n Ellipse.fromJSON = function fromJSON(json) {\n var feature = json['feature'];\n var ellipse = new Ellipse(json['coordinates'], json['width'], json['height'], json['options']);\n ellipse.setProperties(feature['properties']);\n return ellipse;\n };\n\n function Ellipse(coordinates, width, height, opts) {\n classCallCheck(this, Ellipse);\n\n var _this = possibleConstructorReturn(this, _CenterMixin.call(this, null, opts));\n\n if (coordinates) {\n _this.setCoordinates(coordinates);\n }\n _this.width = width;\n _this.height = height;\n return _this;\n }\n\n Ellipse.prototype.getWidth = function getWidth() {\n return this.width;\n };\n\n Ellipse.prototype.setWidth = function setWidth(width) {\n this.width = width;\n this.onShapeChanged();\n return this;\n };\n\n Ellipse.prototype.getHeight = function getHeight() {\n return this.height;\n };\n\n Ellipse.prototype.setHeight = function setHeight(height) {\n this.height = height;\n this.onShapeChanged();\n return this;\n };\n\n Ellipse.prototype.getShell = function getShell() {\n var measurer = this._getMeasurer(),\n center = this.getCoordinates(),\n numberOfPoints = this.options['numberOfShellPoints'],\n width = this.getWidth(),\n height = this.getHeight();\n var shell = [];\n var s = Math.pow(width / 2, 2) * Math.pow(height / 2, 2),\n sx = Math.pow(width / 2, 2),\n sy = Math.pow(height / 2, 2);\n var deg = void 0,\n rad = void 0,\n dx = void 0,\n dy = void 0;\n for (var i = 0; i < numberOfPoints; i++) {\n deg = 360 * i / numberOfPoints;\n rad = deg * Math.PI / 180;\n dx = Math.sqrt(s / (sx * Math.pow(Math.tan(rad), 2) + sy));\n dy = Math.sqrt(s / (sy * Math.pow(1 / Math.tan(rad), 2) + sx));\n if (deg > 90 && deg < 270) {\n dx *= -1;\n }\n if (deg > 180 && deg < 360) {\n dy *= -1;\n }\n var vertex = measurer.locate(center, dx, dy);\n shell.push(vertex);\n }\n return shell;\n };\n\n Ellipse.prototype.getHoles = function getHoles() {\n return [];\n };\n\n Ellipse.prototype.animateShow = function animateShow() {\n return this.show();\n };\n\n Ellipse.prototype._containsPoint = function _containsPoint(point, tolerance) {\n var map = this.getMap();\n if (map.isTransforming()) {\n return _CenterMixin.prototype._containsPoint.call(this, point, tolerance);\n }\n var projection = map.getProjection();\n var t = isNil(tolerance) ? this._hitTestTolerance() : tolerance,\n pps = projection.projectCoords([this._coordinates, map.locate(this._coordinates, this.getWidth() / 2, this.getHeight() / 2)]),\n p0 = map._prjToContainerPoint(pps[0]),\n p1 = map._prjToContainerPoint(pps[1]);\n return withInEllipse(point, p0, p1, t);\n };\n\n Ellipse.prototype._computePrjExtent = function _computePrjExtent() {\n return Circle.prototype._computePrjExtent.apply(this, arguments);\n };\n\n Ellipse.prototype._computeExtent = function _computeExtent() {\n return Circle.prototype._computeExtent.apply(this, arguments);\n };\n\n Ellipse.prototype._getMinMax = function _getMinMax(measurer) {\n if (!measurer || !this._coordinates || isNil(this.width) || isNil(this.height)) {\n return null;\n }\n var width = this.getWidth(),\n height = this.getHeight();\n var p1 = measurer.locate(this._coordinates, -width / 2, 0),\n p2 = measurer.locate(this._coordinates, width / 2, 0),\n p3 = measurer.locate(this._coordinates, 0, -height / 2),\n p4 = measurer.locate(this._coordinates, 0, height / 2);\n return [p1, p2, p3, p4];\n };\n\n Ellipse.prototype._computeGeodesicLength = function _computeGeodesicLength() {\n if (isNil(this.width) || isNil(this.height)) {\n return 0;\n }\n\n var longer = this.width > this.height ? this.width : this.height;\n return 2 * Math.PI * longer / 2 - 4 * Math.abs(this.width - this.height);\n };\n\n Ellipse.prototype._computeGeodesicArea = function _computeGeodesicArea() {\n if (isNil(this.width) || isNil(this.height)) {\n return 0;\n }\n return Math.PI * this.width * this.height / 4;\n };\n\n Ellipse.prototype._exportGeoJSONGeometry = function _exportGeoJSONGeometry() {\n var coordinates = Coordinate.toNumberArrays([this.getShell()]);\n return {\n 'type': 'Polygon',\n 'coordinates': coordinates\n };\n };\n\n Ellipse.prototype._toJSON = function _toJSON(options) {\n var opts = extend({}, options);\n var center = this.getCenter();\n opts.geometry = false;\n var feature = this.toGeoJSON(opts);\n feature['geometry'] = {\n 'type': 'Polygon'\n };\n return {\n 'feature': feature,\n 'subType': 'Ellipse',\n 'coordinates': [center.x, center.y],\n 'width': this.getWidth(),\n 'height': this.getHeight()\n };\n };\n\n return Ellipse;\n}(CenterMixin(Polygon));\n\nEllipse.mergeOptions(options$10);\n\nEllipse.registerJSONType('Ellipse');\n\nvar Rectangle = function (_Polygon) {\n inherits(Rectangle, _Polygon);\n\n Rectangle.fromJSON = function fromJSON(json) {\n var feature = json['feature'];\n var rect = new Rectangle(json['coordinates'], json['width'], json['height'], json['options']);\n rect.setProperties(feature['properties']);\n return rect;\n };\n\n function Rectangle(coordinates, width, height, opts) {\n classCallCheck(this, Rectangle);\n\n var _this = possibleConstructorReturn(this, _Polygon.call(this, null, opts));\n\n if (coordinates) {\n _this.setCoordinates(coordinates);\n }\n _this._width = width;\n _this._height = height;\n return _this;\n }\n\n Rectangle.prototype.getCoordinates = function getCoordinates() {\n return this._coordinates;\n };\n\n Rectangle.prototype.setCoordinates = function setCoordinates(nw) {\n this._coordinates = nw instanceof Coordinate ? nw : new Coordinate(nw);\n if (!this._coordinates || !this.getMap()) {\n this.onPositionChanged();\n return this;\n }\n var projection = this._getProjection();\n this._setPrjCoordinates(projection.project(this._coordinates));\n return this;\n };\n\n Rectangle.prototype.getWidth = function getWidth() {\n return this._width;\n };\n\n Rectangle.prototype.setWidth = function setWidth(width) {\n this._width = width;\n this.onShapeChanged();\n return this;\n };\n\n Rectangle.prototype.getHeight = function getHeight() {\n return this._height;\n };\n\n Rectangle.prototype.setHeight = function setHeight(height) {\n this._height = height;\n this.onShapeChanged();\n return this;\n };\n\n Rectangle.prototype.getShell = function getShell() {\n var measurer = this._getMeasurer();\n var nw = this._coordinates;\n var map = this.getMap();\n var sx = 1,\n sy = -1;\n if (map) {\n var fExt = map.getFullExtent();\n if (fExt['left'] > fExt['right']) {\n sx = -1;\n }\n if (fExt['bottom'] > fExt['top']) {\n sy = 1;\n }\n }\n var points = [];\n points.push(nw);\n points.push(measurer.locate(nw, sx * this._width, 0));\n points.push(measurer.locate(nw, sx * this._width, sy * this._height));\n points.push(measurer.locate(nw, 0, sy * this._height));\n points.push(nw);\n return points;\n };\n\n Rectangle.prototype.getHoles = function getHoles() {\n return [];\n };\n\n Rectangle.prototype.animateShow = function animateShow() {\n return this.show();\n };\n\n Rectangle.prototype._getPrjCoordinates = function _getPrjCoordinates() {\n var projection = this._getProjection();\n if (!projection) {\n return null;\n }\n this._verifyProjection();\n if (!this._pnw) {\n if (this._coordinates) {\n this._pnw = projection.project(this._coordinates);\n }\n }\n return this._pnw;\n };\n\n Rectangle.prototype._setPrjCoordinates = function _setPrjCoordinates(pnw) {\n this._pnw = pnw;\n this.onPositionChanged();\n };\n\n Rectangle.prototype._getPrjShell = function _getPrjShell() {\n var shell = _Polygon.prototype._getPrjShell.call(this);\n var projection = this._getProjection();\n if (!projection.isSphere()) {\n return shell;\n }\n var sphereExtent = projection.getSphereExtent(),\n sx = sphereExtent.sx,\n sy = sphereExtent.sy;\n var circum = this._getProjection().getCircum();\n var nw = shell[0];\n for (var i = 1, l = shell.length; i < l; i++) {\n var p = shell[i];\n var dx = 0,\n dy = 0;\n if (sx * (nw.x - p.x) > 0) {\n dx = circum.x * sx;\n }\n if (sy * (nw.y - p.y) < 0) {\n dy = circum.y * sy;\n }\n shell[i]._add(dx, dy);\n }\n return shell;\n };\n\n Rectangle.prototype._updateCache = function _updateCache() {\n this._clearCache();\n var projection = this._getProjection();\n if (this._pnw && projection) {\n this._coordinates = projection.unproject(this._pnw);\n }\n };\n\n Rectangle.prototype._clearProjection = function _clearProjection() {\n this._pnw = null;\n _Polygon.prototype._clearProjection.call(this);\n };\n\n Rectangle.prototype._computeCenter = function _computeCenter(measurer) {\n return measurer.locate(this._coordinates, this._width / 2, -this._height / 2);\n };\n\n Rectangle.prototype._containsPoint = function _containsPoint(point, tolerance) {\n var map = this.getMap();\n if (map.isTransforming()) {\n return _Polygon.prototype._containsPoint.call(this, point, tolerance);\n }\n var t = isNil(tolerance) ? this._hitTestTolerance() : tolerance,\n r = map._getResolution() * t;\n var extent = this._getPrjExtent().expand(r);\n var p = map._containerPointToPrj(point);\n return extent.contains(p);\n };\n\n Rectangle.prototype._computePrjExtent = function _computePrjExtent(projection) {\n var se = this._getSouthEast(projection);\n if (!se) {\n return null;\n }\n var prjs = projection.projectCoords([new Coordinate(this._coordinates.x, se.y), new Coordinate(se.x, this._coordinates.y)]);\n return new Extent(prjs[0], prjs[1]);\n };\n\n Rectangle.prototype._computeExtent = function _computeExtent(measurer) {\n var se = this._getSouthEast(measurer);\n if (!se) {\n return null;\n }\n return new Extent(this._coordinates, se, this._getProjection());\n };\n\n Rectangle.prototype._getSouthEast = function _getSouthEast(measurer) {\n if (!measurer || !this._coordinates || isNil(this._width) || isNil(this._height)) {\n return null;\n }\n var width = this.getWidth(),\n height = this.getHeight();\n var w = width,\n h = -height;\n if (measurer.fullExtent) {\n var fullExtent = measurer.fullExtent,\n sx = fullExtent.right > fullExtent.left ? 1 : -1,\n sy = fullExtent.top > fullExtent.bottom ? 1 : -1;\n w *= sx;\n h *= sy;\n }\n var se = measurer.locate(this._coordinates, w, h);\n return se;\n };\n\n Rectangle.prototype._computeGeodesicLength = function _computeGeodesicLength() {\n if (isNil(this._width) || isNil(this._height)) {\n return 0;\n }\n return 2 * (this._width + this._height);\n };\n\n Rectangle.prototype._computeGeodesicArea = function _computeGeodesicArea() {\n if (isNil(this._width) || isNil(this._height)) {\n return 0;\n }\n return this._width * this._height;\n };\n\n Rectangle.prototype._exportGeoJSONGeometry = function _exportGeoJSONGeometry() {\n var coordinates = Coordinate.toNumberArrays([this.getShell()]);\n return {\n 'type': 'Polygon',\n 'coordinates': coordinates\n };\n };\n\n Rectangle.prototype._toJSON = function _toJSON(options) {\n var opts = extend({}, options);\n var nw = this.getCoordinates();\n opts.geometry = false;\n var feature = this.toGeoJSON(opts);\n feature['geometry'] = {\n 'type': 'Polygon'\n };\n return {\n 'feature': feature,\n 'subType': 'Rectangle',\n 'coordinates': [nw.x, nw.y],\n 'width': this.getWidth(),\n 'height': this.getHeight()\n };\n };\n\n return Rectangle;\n}(Polygon);\n\nRectangle.registerJSONType('Rectangle');\n\nvar options$11 = {\n 'numberOfShellPoints': 60\n};\n\nvar Sector = function (_Circle) {\n inherits(Sector, _Circle);\n\n Sector.fromJSON = function fromJSON(json) {\n var feature = json['feature'];\n var sector = new Sector(json['coordinates'], json['radius'], json['startAngle'], json['endAngle'], json['options']);\n sector.setProperties(feature['properties']);\n return sector;\n };\n\n function Sector(coordinates, radius, startAngle, endAngle, opts) {\n classCallCheck(this, Sector);\n\n var _this = possibleConstructorReturn(this, _Circle.call(this, coordinates, radius, opts));\n\n _this.startAngle = startAngle;\n _this.endAngle = endAngle;\n return _this;\n }\n\n Sector.prototype.getStartAngle = function getStartAngle() {\n return this.startAngle;\n };\n\n Sector.prototype.setStartAngle = function setStartAngle(startAngle) {\n this.startAngle = startAngle;\n this.onShapeChanged();\n return this;\n };\n\n Sector.prototype.getEndAngle = function getEndAngle() {\n return this.endAngle;\n };\n\n Sector.prototype.setEndAngle = function setEndAngle(endAngle) {\n this.endAngle = endAngle;\n this.onShapeChanged();\n return this;\n };\n\n Sector.prototype.getShell = function getShell() {\n var measurer = this._getMeasurer(),\n center = this.getCoordinates(),\n numberOfPoints = this.options['numberOfShellPoints'] - 2,\n radius = this.getRadius(),\n shell = [center.copy()],\n startAngle = this.getStartAngle(),\n angle = this.getEndAngle() - startAngle;\n var rad = void 0,\n dx = void 0,\n dy = void 0;\n for (var i = 0; i < numberOfPoints; i++) {\n rad = (angle * i / (numberOfPoints - 1) + startAngle) * Math.PI / 180;\n dx = radius * Math.cos(rad);\n dy = radius * Math.sin(rad);\n var vertex = measurer.locate(center, dx, dy);\n shell.push(vertex);\n }\n shell.push(center.copy());\n return shell;\n };\n\n Sector.prototype._containsPoint = function _containsPoint(point, tolerance) {\n var map = this.getMap();\n if (map.isTransforming()) {\n return _Circle.prototype._containsPoint.call(this, point, tolerance);\n }\n var center = map._pointToContainerPoint(this._getCenter2DPoint()),\n t = isNil(tolerance) ? this._hitTestTolerance() : tolerance,\n size = this.getSize(),\n pc = center,\n pp = point,\n x = pp.x - pc.x,\n y = pc.y - pp.y,\n atan2 = Math.atan2(y, x),\n angle = atan2 < 0 ? (atan2 + 2 * Math.PI) * 360 / (2 * Math.PI) : atan2 * 360 / (2 * Math.PI);\n var sAngle = this.startAngle % 360,\n eAngle = this.endAngle % 360;\n var between = false;\n if (sAngle > eAngle) {\n between = !(angle > eAngle && angle < sAngle);\n } else {\n between = angle >= sAngle && angle <= eAngle;\n }\n return pp.distanceTo(pc) <= size.width / 2 + t && between;\n };\n\n Sector.prototype._computeGeodesicLength = function _computeGeodesicLength() {\n if (isNil(this._radius)) {\n return 0;\n }\n return Math.PI * 2 * this._radius * Math.abs(this.startAngle - this.endAngle) / 360 + 2 * this._radius;\n };\n\n Sector.prototype._computeGeodesicArea = function _computeGeodesicArea() {\n if (isNil(this._radius)) {\n return 0;\n }\n return Math.PI * Math.pow(this._radius, 2) * Math.abs(this.startAngle - this.endAngle) / 360;\n };\n\n Sector.prototype._toJSON = function _toJSON(options) {\n var opts = extend({}, options);\n var center = this.getCenter();\n opts.geometry = false;\n var feature = this.toGeoJSON(opts);\n feature['geometry'] = {\n 'type': 'Polygon'\n };\n return {\n 'feature': feature,\n 'subType': 'Sector',\n 'coordinates': [center.x, center.y],\n 'radius': this.getRadius(),\n 'startAngle': this.getStartAngle(),\n 'endAngle': this.getEndAngle()\n };\n };\n\n return Sector;\n}(Circle);\n\nSector.mergeOptions(options$11);\n\nSector.registerJSONType('Sector');\n\nvar options$12 = {\n 'enableSimplify': false,\n 'enableClip': false\n};\n\nvar Curve = function (_LineString) {\n inherits(Curve, _LineString);\n\n function Curve() {\n classCallCheck(this, Curve);\n return possibleConstructorReturn(this, _LineString.apply(this, arguments));\n }\n\n Curve.prototype._arc = function _arc(ctx, points, lineOpacity) {\n var degree = this.options['arcDegree'] * Math.PI / 180;\n for (var i = 1, l = points.length; i < l; i++) {\n var c = Canvas._arcBetween(ctx, points[i - 1], points[i], degree);\n\n var ctrlPoint = [points[i - 1].x + points[i].x - c[0], points[i - 1].y + points[i].y - c[1]];\n points[i - 1].nextCtrlPoint = ctrlPoint;\n points[i].prevCtrlPoint = ctrlPoint;\n Canvas._stroke(ctx, lineOpacity);\n }\n };\n\n Curve.prototype._quadraticCurve = function _quadraticCurve(ctx, points) {\n if (points.length <= 2) {\n Canvas._path(ctx, points);\n return;\n }\n var i = void 0,\n l = void 0;\n for (i = 2, l = points.length; i < l; i += 2) {\n ctx.quadraticCurveTo(points[i - 1].x, points[i - 1].y, points[i].x, points[i].y);\n }\n i -= 1;\n if (i < l) {\n for (; i < l; i++) {\n ctx.lineTo(points[i].x, points[i].y);\n }\n }\n };\n\n Curve.prototype._bezierCurve = function _bezierCurve(ctx, points) {\n if (points.length <= 3) {\n Canvas._path(ctx, points);\n return;\n }\n var i = void 0,\n l = void 0;\n for (i = 1, l = points.length; i + 2 < l; i += 3) {\n ctx.bezierCurveTo(points[i].x, points[i].y, points[i + 1].x, points[i + 1].y, points[i + 2].x, points[i + 2].y);\n }\n if (i < l) {\n for (; i < l; i++) {\n ctx.lineTo(points[i].x, points[i].y);\n }\n }\n };\n\n Curve.prototype._getCurveArrowPoints = function _getCurveArrowPoints(arrows, segments, lineWidth, arrowStyle, tolerance, step) {\n var l = segments.length;\n var i = void 0;\n for (i = step; i < l; i += step) {\n arrows.push(this._getArrowShape(segments[i - 1], segments[i], lineWidth, arrowStyle, tolerance));\n }\n i -= step;\n if (i < l - 1) {\n for (i += 1; i < l; i++) {\n arrows.push(this._getArrowShape(segments[i - 1], segments[i], lineWidth, arrowStyle, tolerance));\n }\n }\n };\n\n return Curve;\n}(LineString);\n\nCurve.mergeOptions(options$12);\n\nvar options$13 = {\n 'arcDegree': 90\n};\n\nvar ArcCurve = function (_Curve) {\n inherits(ArcCurve, _Curve);\n\n function ArcCurve() {\n classCallCheck(this, ArcCurve);\n return possibleConstructorReturn(this, _Curve.apply(this, arguments));\n }\n\n ArcCurve.prototype._toJSON = function _toJSON(options) {\n return {\n 'feature': this.toGeoJSON(options),\n 'subType': 'ArcCurve'\n };\n };\n\n ArcCurve.prototype._paintOn = function _paintOn(ctx, points, lineOpacity) {\n ctx.beginPath();\n this._arc(ctx, points, lineOpacity);\n Canvas._stroke(ctx, lineOpacity);\n this._paintArrow(ctx, points, lineOpacity);\n };\n\n ArcCurve.fromJSON = function fromJSON(json) {\n var feature = json['feature'];\n var arc = new ArcCurve(feature['geometry']['coordinates'], json['options']);\n arc.setProperties(feature['properties']);\n return arc;\n };\n\n return ArcCurve;\n}(Curve);\n\nArcCurve.registerJSONType('ArcCurve');\n\nArcCurve.mergeOptions(options$13);\n\nvar CubicBezierCurve = function (_Curve) {\n inherits(CubicBezierCurve, _Curve);\n\n function CubicBezierCurve() {\n classCallCheck(this, CubicBezierCurve);\n return possibleConstructorReturn(this, _Curve.apply(this, arguments));\n }\n\n CubicBezierCurve.fromJSON = function fromJSON(json) {\n var feature = json['feature'];\n var curve = new CubicBezierCurve(feature['geometry']['coordinates'], json['options']);\n curve.setProperties(feature['properties']);\n return curve;\n };\n\n CubicBezierCurve.prototype._toJSON = function _toJSON(options) {\n return {\n 'feature': this.toGeoJSON(options),\n 'subType': 'CubicBezierCurve'\n };\n };\n\n CubicBezierCurve.prototype._paintOn = function _paintOn(ctx, points, lineOpacity) {\n ctx.beginPath();\n ctx.moveTo(points[0].x, points[0].y);\n this._bezierCurve(ctx, points);\n Canvas._stroke(ctx, lineOpacity);\n this._paintArrow(ctx, points, lineOpacity);\n };\n\n CubicBezierCurve.prototype._getArrowPoints = function _getArrowPoints(arrows, segments, lineWidth, arrowStyle, tolerance) {\n return this._getCurveArrowPoints(arrows, segments, lineWidth, arrowStyle, tolerance, 3);\n };\n\n return CubicBezierCurve;\n}(Curve);\n\nCubicBezierCurve.registerJSONType('CubicBezierCurve');\n\nvar QuadBezierCurve = function (_Curve) {\n inherits(QuadBezierCurve, _Curve);\n\n function QuadBezierCurve() {\n classCallCheck(this, QuadBezierCurve);\n return possibleConstructorReturn(this, _Curve.apply(this, arguments));\n }\n\n QuadBezierCurve.fromJSON = function fromJSON(json) {\n var feature = json['feature'];\n var curve = new QuadBezierCurve(feature['geometry']['coordinates'], json['options']);\n curve.setProperties(feature['properties']);\n return curve;\n };\n\n QuadBezierCurve.prototype._toJSON = function _toJSON(options) {\n return {\n 'feature': this.toGeoJSON(options),\n 'subType': 'QuadBezierCurve'\n };\n };\n\n QuadBezierCurve.prototype._paintOn = function _paintOn(ctx, points, lineOpacity) {\n ctx.beginPath();\n ctx.moveTo(points[0].x, points[0].y);\n this._quadraticCurve(ctx, points, lineOpacity);\n Canvas._stroke(ctx, lineOpacity);\n this._paintArrow(ctx, points, lineOpacity);\n };\n\n QuadBezierCurve.prototype._getArrowPoints = function _getArrowPoints(arrows, segments, lineWidth, arrowStyle, tolerance) {\n return this._getCurveArrowPoints(arrows, segments, lineWidth, arrowStyle, tolerance, 2);\n };\n\n return QuadBezierCurve;\n}(Curve);\n\nQuadBezierCurve.registerJSONType('QuadBezierCurve');\n\nvar defaultSymbol$1 = {\n 'textFaceName': 'monospace',\n 'textSize': 12,\n 'textLineSpacing': 8,\n 'textWrapCharacter': '\\n',\n 'textHorizontalAlignment': 'middle',\n 'textVerticalAlignment': 'middle' };\n\nvar defaultBoxSymbol = {\n 'markerType': 'square',\n 'markerLineColor': '#000',\n 'markerLineWidth': 2,\n 'markerLineOpacity': 1,\n 'markerFill': '#fff',\n 'markerOpacity': 1\n};\n\nvar TextMarker = function (_Marker) {\n inherits(TextMarker, _Marker);\n\n function TextMarker() {\n classCallCheck(this, TextMarker);\n return possibleConstructorReturn(this, _Marker.apply(this, arguments));\n }\n\n TextMarker.prototype.getContent = function getContent() {\n return this._content;\n };\n\n TextMarker.prototype.setContent = function setContent(content) {\n var old = this._content;\n this._content = escapeSpecialChars(content);\n this._refresh();\n\n this._fireEvent('contentchange', {\n 'old': old,\n 'new': content\n });\n return this;\n };\n\n TextMarker.prototype.onAdd = function onAdd() {\n this._refresh();\n };\n\n TextMarker.prototype.toJSON = function toJSON() {\n var json = _Marker.prototype.toJSON.call(this);\n delete json['symbol'];\n return json;\n };\n\n TextMarker.prototype.setSymbol = function setSymbol(symbol) {\n if (this._refreshing || !symbol) {\n return _Marker.prototype.setSymbol.call(this, symbol);\n }\n var s = this._parseSymbol(symbol);\n if (this.setTextStyle) {\n var style = this.getTextStyle() || {};\n style.symbol = s[0];\n this.setTextStyle(style);\n } else if (this.setTextSymbol) {\n this.setTextSymbol(s[0]);\n }\n if (this.setBoxStyle) {\n var _style = this.getBoxStyle() || {};\n _style.symbol = s[1];\n this.setBoxStyle(_style);\n } else if (this.setBoxSymbol) {\n this.setBoxSymbol(s[1]);\n }\n return this;\n };\n\n TextMarker.prototype._parseSymbol = function _parseSymbol(symbol) {\n var t = {};\n var b = {};\n for (var p in symbol) {\n if (hasOwn(symbol, p)) {\n if (p.indexOf('text') === 0) {\n t[p] = symbol[p];\n } else {\n b[p] = symbol[p];\n }\n }\n }\n return [t, b];\n };\n\n TextMarker.prototype._getTextSize = function _getTextSize(symbol) {\n return splitTextToRow(this._content, symbol)['size'];\n };\n\n TextMarker.prototype._getInternalSymbol = function _getInternalSymbol() {\n return this._symbol;\n };\n\n TextMarker.prototype._getDefaultTextSymbol = function _getDefaultTextSymbol() {\n return extend({}, defaultSymbol$1);\n };\n\n TextMarker.prototype._getDefaultBoxSymbol = function _getDefaultBoxSymbol() {\n return extend({}, defaultBoxSymbol);\n };\n\n TextMarker.prototype._getDefaultPadding = function _getDefaultPadding() {\n return [12, 8];\n };\n\n return TextMarker;\n}(Marker);\n\nvar options$14 = {\n 'textStyle': {\n 'wrap': true,\n 'padding': [12, 8],\n 'verticalAlignment': 'middle',\n 'horizontalAlignment': 'middle'\n },\n 'boxSymbol': null\n};\n\nvar TextBox = function (_TextMarker) {\n inherits(TextBox, _TextMarker);\n\n function TextBox(content, coordinates, width, height) {\n var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};\n classCallCheck(this, TextBox);\n\n var _this = possibleConstructorReturn(this, _TextMarker.call(this, coordinates, options));\n\n _this._content = escapeSpecialChars(content);\n _this._width = isNil(width) ? 100 : width;\n _this._height = isNil(height) ? 40 : height;\n if (options.boxSymbol) {\n _this.setBoxSymbol(options.boxSymbol);\n }\n if (options.textStyle) {\n _this.setTextStyle(options.textStyle);\n }\n _this._refresh();\n return _this;\n }\n\n TextBox.prototype.getWidth = function getWidth() {\n return this._width;\n };\n\n TextBox.prototype.setWidth = function setWidth(width) {\n this._width = width;\n this._refresh();\n return this;\n };\n\n TextBox.prototype.getHeight = function getHeight() {\n return this._height;\n };\n\n TextBox.prototype.setHeight = function setHeight(height) {\n this._height = height;\n this._refresh();\n return this;\n };\n\n TextBox.prototype.getBoxSymbol = function getBoxSymbol() {\n return extend({}, this.options.boxSymbol);\n };\n\n TextBox.prototype.setBoxSymbol = function setBoxSymbol(symbol) {\n this.options.boxSymbol = symbol ? extend({}, symbol) : symbol;\n if (this.getSymbol()) {\n this._refresh();\n }\n return this;\n };\n\n TextBox.prototype.getTextStyle = function getTextStyle() {\n if (!this.options.textStyle) {\n return null;\n }\n return extend({}, this.options.textStyle);\n };\n\n TextBox.prototype.setTextStyle = function setTextStyle(style) {\n this.options.textStyle = style ? extend({}, style) : style;\n if (this.getSymbol()) {\n this._refresh();\n }\n return this;\n };\n\n TextBox.fromJSON = function fromJSON(json) {\n var feature = json['feature'];\n var textBox = new TextBox(json['content'], feature['geometry']['coordinates'], json['width'], json['height'], json['options']);\n textBox.setProperties(feature['properties']);\n textBox.setId(feature['id']);\n if (json['symbol']) {\n textBox.setSymbol(json['symbol']);\n }\n return textBox;\n };\n\n TextBox.prototype._toJSON = function _toJSON(options) {\n return {\n 'feature': this.toGeoJSON(options),\n 'width': this.getWidth(),\n 'height': this.getHeight(),\n 'subType': 'TextBox',\n 'content': this._content\n };\n };\n\n TextBox.prototype._refresh = function _refresh() {\n var textStyle = this.getTextStyle() || {},\n padding = textStyle['padding'] || [12, 8],\n maxWidth = this._width - 2 * padding[0],\n maxHeight = this._height - 2 * padding[1];\n var symbol = extend({}, textStyle.symbol || this._getDefaultTextSymbol(), this.options.boxSymbol || this._getDefaultBoxSymbol(), {\n 'textName': this._content,\n 'markerWidth': this._width,\n 'markerHeight': this._height,\n 'textHorizontalAlignment': 'middle',\n 'textVerticalAlignment': 'middle',\n 'textMaxWidth': maxWidth,\n 'textMaxHeight': maxHeight\n });\n\n if (textStyle['wrap'] && !symbol['textWrapWidth']) {\n symbol['textWrapWidth'] = maxWidth;\n }\n\n var hAlign = textStyle['horizontalAlignment'];\n symbol['textDx'] = symbol['markerDx'] || 0;\n var offsetX = symbol['markerWidth'] / 2 - padding[0];\n if (hAlign === 'left') {\n symbol['textHorizontalAlignment'] = 'right';\n symbol['textDx'] = symbol['textDx'] - offsetX;\n } else if (hAlign === 'right') {\n symbol['textHorizontalAlignment'] = 'left';\n symbol['textDx'] = symbol['textDx'] + offsetX;\n }\n\n var vAlign = textStyle['verticalAlignment'];\n symbol['textDy'] = symbol['markerDy'] || 0;\n var offsetY = symbol['markerHeight'] / 2 - padding[1];\n if (vAlign === 'top') {\n symbol['textVerticalAlignment'] = 'bottom';\n symbol['textDy'] -= offsetY;\n } else if (vAlign === 'bottom') {\n symbol['textVerticalAlignment'] = 'top';\n symbol['textDy'] += offsetY;\n }\n this._refreshing = true;\n this.updateSymbol(symbol);\n delete this._refreshing;\n };\n\n return TextBox;\n}(TextMarker);\n\nTextBox.mergeOptions(options$14);\n\nTextBox.registerJSONType('TextBox');\n\nvar options$15 = {\n 'boxStyle': null,\n textSymbol: null\n};\n\nvar Label = function (_TextMarker) {\n inherits(Label, _TextMarker);\n\n function Label(content, coordinates) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n classCallCheck(this, Label);\n\n var _this = possibleConstructorReturn(this, _TextMarker.call(this, coordinates, options));\n\n if (options.textSymbol) {\n _this.setTextSymbol(options.textSymbol);\n }\n if (options.boxStyle) {\n _this.setBoxStyle(options.boxStyle);\n }\n _this._content = escapeSpecialChars(content);\n _this._refresh();\n return _this;\n }\n\n Label.prototype.getBoxStyle = function getBoxStyle() {\n if (!this.options.boxStyle) {\n return null;\n }\n return extend({}, this.options.boxStyle);\n };\n\n Label.prototype.setBoxStyle = function setBoxStyle(style) {\n this.options.boxStyle = style ? extend({}, style) : style;\n this._refresh();\n return this;\n };\n\n Label.prototype.getTextSymbol = function getTextSymbol() {\n return extend({}, this._getDefaultTextSymbol(), this.options.textSymbol);\n };\n\n Label.prototype.setTextSymbol = function setTextSymbol(symbol) {\n this.options.textSymbol = symbol ? extend({}, symbol) : symbol;\n this._refresh();\n return this;\n };\n\n Label.fromJSON = function fromJSON(json) {\n var feature = json['feature'];\n var label = new Label(json['content'], feature['geometry']['coordinates'], json['options']);\n label.setProperties(feature['properties']);\n label.setId(feature['id']);\n if (json['symbol']) {\n label.setSymbol(json['symbol']);\n }\n return label;\n };\n\n Label.prototype._canEdit = function _canEdit() {\n return false;\n };\n\n Label.prototype._toJSON = function _toJSON(options) {\n return {\n 'feature': this.toGeoJSON(options),\n 'subType': 'Label',\n 'content': this._content\n };\n };\n\n Label.prototype._refresh = function _refresh() {\n var symbol = extend({}, this.getTextSymbol(), {\n 'textName': this._content\n });\n\n var boxStyle = this.getBoxStyle();\n if (boxStyle) {\n extend(symbol, boxStyle.symbol);\n var sizes = this._getBoxSize(symbol),\n textSize = sizes[1],\n padding = boxStyle['padding'] || this._getDefaultPadding();\n var boxSize = sizes[0];\n\n symbol['markerWidth'] = boxSize['width'];\n symbol['markerHeight'] = boxSize['height'];\n\n var dx = symbol['textDx'] || 0,\n dy = symbol['textDy'] || 0,\n textAlignPoint = getAlignPoint(textSize, symbol['textHorizontalAlignment'], symbol['textVerticalAlignment'])._add(dx, dy);\n\n var hAlign = boxStyle['horizontalAlignment'] || 'middle';\n symbol['markerDx'] = textAlignPoint.x;\n if (hAlign === 'left') {\n symbol['markerDx'] += symbol['markerWidth'] / 2 - padding[0];\n } else if (hAlign === 'right') {\n symbol['markerDx'] -= symbol['markerWidth'] / 2 - textSize['width'] - padding[0];\n } else {\n symbol['markerDx'] += textSize['width'] / 2;\n }\n\n var vAlign = boxStyle['verticalAlignment'] || 'middle';\n symbol['markerDy'] = textAlignPoint.y;\n if (vAlign === 'top') {\n symbol['markerDy'] += symbol['markerHeight'] / 2 - padding[1];\n } else if (vAlign === 'bottom') {\n symbol['markerDy'] -= symbol['markerHeight'] / 2 - textSize['height'] - padding[1];\n } else {\n symbol['markerDy'] += textSize['height'] / 2;\n }\n }\n this._refreshing = true;\n this.updateSymbol(symbol);\n delete this._refreshing;\n };\n\n Label.prototype._getBoxSize = function _getBoxSize(symbol) {\n if (!symbol['markerType']) {\n symbol['markerType'] = 'square';\n }\n var boxStyle = this.getBoxStyle();\n var size = this._getTextSize(symbol);\n var width = void 0,\n height = void 0;\n var padding = boxStyle['padding'] || this._getDefaultPadding();\n width = size['width'] + padding[0] * 2;\n height = size['height'] + padding[1] * 2;\n if (boxStyle['minWidth']) {\n if (!width || width < boxStyle['minWidth']) {\n width = boxStyle['minWidth'];\n }\n }\n if (boxStyle['minHeight']) {\n if (!height || height < boxStyle['minHeight']) {\n height = boxStyle['minHeight'];\n }\n }\n return [new Size(width, height), size];\n };\n\n return Label;\n}(TextMarker);\n\nLabel.mergeOptions(options$15);\n\nLabel.registerJSONType('Label');\n\nvar Connectable = function Connectable(Base) {\n return function (_Base) {\n inherits(_class, _Base);\n\n function _class() {\n classCallCheck(this, _class);\n return possibleConstructorReturn(this, _Base.apply(this, arguments));\n }\n\n _class._hasConnectors = function _hasConnectors(geometry) {\n return !isNil(geometry.__connectors) && geometry.__connectors.length > 0;\n };\n\n _class._getConnectors = function _getConnectors(geometry) {\n return geometry.__connectors;\n };\n\n _class.prototype.getConnectSource = function getConnectSource() {\n return this._connSource;\n };\n\n _class.prototype.setConnectSource = function setConnectSource(src) {\n var target = this._connTarget;\n this.onRemove();\n this._connSource = src;\n this._connTarget = target;\n this.onAdd();\n return this;\n };\n\n _class.prototype.getConnectTarget = function getConnectTarget() {\n return this._connTarget;\n };\n\n _class.prototype.setConnectTarget = function setConnectTarget(target) {\n var src = this._connSource;\n this.onRemove();\n this._connSource = src;\n this._connTarget = target;\n this._updateCoordinates();\n this._registerEvents();\n return this;\n };\n\n _class.prototype._updateCoordinates = function _updateCoordinates() {\n var map = this.getMap();\n if (!map && this._connSource) {\n map = this._connSource.getMap();\n }\n if (!map && this._connTarget) {\n map = this._connTarget.getMap();\n }\n if (!map) {\n return;\n }\n if (!this._connSource || !this._connTarget) {\n return;\n }\n var srcPoints = this._connSource._getConnectPoints();\n var targetPoints = this._connTarget._getConnectPoints();\n var minDist = 0;\n var oldCoordinates = this.getCoordinates();\n var c1 = void 0,\n c2 = void 0;\n for (var i = 0, len = srcPoints.length; i < len; i++) {\n var p1 = srcPoints[i];\n for (var j = 0, length = targetPoints.length; j < length; j++) {\n var p2 = targetPoints[j];\n var dist = map.computeLength(p1, p2);\n if (i === 0 && j === 0) {\n c1 = p1;\n c2 = p2;\n minDist = dist;\n } else if (dist < minDist) {\n c1 = p1;\n c2 = p2;\n }\n }\n }\n if (!isArrayHasData(oldCoordinates) || !oldCoordinates[0].equals(c1) || !oldCoordinates[1].equals(c2)) {\n this.setCoordinates([c1, c2]);\n }\n };\n\n _class.prototype.onAdd = function onAdd() {\n this._registerEvents();\n this._updateCoordinates();\n };\n\n _class.prototype.onRemove = function onRemove() {\n if (this._connSource) {\n if (this._connSource.__connectors) {\n removeFromArray(this, this._connSource.__connectors);\n }\n this._connSource.off('dragging positionchange', this._updateCoordinates, this).off('remove', this.onRemove, this);\n this._connSource.off('dragstart mousedown mouseover', this._showConnect, this);\n this._connSource.off('dragend mouseup mouseout', this.hide, this);\n this._connSource.off('show', this._showConnect, this).off('hide', this.hide, this);\n delete this._connSource;\n }\n if (this._connTarget) {\n removeFromArray(this, this._connTarget.__connectors);\n this._connTarget.off('dragging positionchange', this._updateCoordinates, this).off('remove', this.onRemove, this);\n this._connTarget.off('show', this._showConnect, this).off('hide', this.hide, this);\n delete this._connTarget;\n }\n\n if (!(this._connSource instanceof Geometry) || !(this._connTarget instanceof Geometry)) {\n var map = this.getMap();\n if (map) {\n map.off('movestart moving moveend zoomstart zooming zoomend rotate pitch fovchange spatialreferencechange', this._updateCoordinates, this);\n }\n }\n };\n\n _class.prototype._showConnect = function _showConnect() {\n if (!this._connSource || !this._connTarget) {\n return;\n }\n if (this._connSource.isVisible() && this._connTarget.isVisible()) {\n this._updateCoordinates();\n this.show();\n }\n };\n\n _class.prototype._registerEvents = function _registerEvents() {\n if (!this._connSource || !this._connTarget) {\n return;\n }\n if (!this._connSource.__connectors) {\n this._connSource.__connectors = [];\n }\n if (!this._connTarget.__connectors) {\n this._connTarget.__connectors = [];\n }\n this._connSource.__connectors.push(this);\n this._connTarget.__connectors.push(this);\n this._connSource.on('dragging positionchange', this._updateCoordinates, this).on('remove', this.remove, this);\n this._connTarget.on('dragging positionchange', this._updateCoordinates, this).on('remove', this.remove, this);\n this._connSource.on('show', this._showConnect, this).on('hide', this.hide, this);\n this._connTarget.on('show', this._showConnect, this).on('hide', this.hide, this);\n var trigger = this.options['showOn'];\n this.hide();\n if (trigger === 'moving') {\n this._connSource.on('dragstart', this._showConnect, this).on('dragend', this.hide, this);\n this._connTarget.on('dragstart', this._showConnect, this).on('dragend', this.hide, this);\n } else if (trigger === 'click') {\n this._connSource.on('mousedown', this._showConnect, this).on('mouseup', this.hide, this);\n this._connTarget.on('mousedown', this._showConnect, this).on('mouseup', this.hide, this);\n } else if (trigger === 'mouseover') {\n this._connSource.on('mouseover', this._showConnect, this).on('mouseout', this.hide, this);\n this._connTarget.on('mouseover', this._showConnect, this).on('mouseout', this.hide, this);\n } else {\n this._showConnect();\n }\n\n if (!(this._connSource instanceof Geometry) || !(this._connTarget instanceof Geometry)) {\n var map = this.getMap();\n if (map) {\n map.on('movestart moving moveend zoomstart zooming zoomend rotate pitch fovchange spatialreferencechange', this._updateCoordinates, this);\n }\n }\n };\n\n return _class;\n }(Base);\n};\n\nvar options$16 = {\n showOn: 'always'\n};\n\nvar ConnectorLine = function (_Connectable) {\n inherits(ConnectorLine, _Connectable);\n\n function ConnectorLine(src, target, options) {\n classCallCheck(this, ConnectorLine);\n\n var _this2 = possibleConstructorReturn(this, _Connectable.call(this, null, options));\n\n if (arguments.length === 1) {\n options = src;\n src = null;\n target = null;\n }\n _this2._connSource = src;\n _this2._connTarget = target;\n return _this2;\n }\n\n return ConnectorLine;\n}(Connectable(LineString));\n\nConnectorLine.mergeOptions(options$16);\n\nConnectorLine.registerJSONType('ConnectorLine');\n\nvar ArcConnectorLine = function (_Connectable2) {\n inherits(ArcConnectorLine, _Connectable2);\n\n function ArcConnectorLine(src, target, options) {\n classCallCheck(this, ArcConnectorLine);\n\n var _this3 = possibleConstructorReturn(this, _Connectable2.call(this, null, options));\n\n if (arguments.length === 1) {\n options = src;\n src = null;\n target = null;\n }\n _this3._connSource = src;\n _this3._connTarget = target;\n return _this3;\n }\n\n return ArcConnectorLine;\n}(Connectable(ArcCurve));\n\nArcConnectorLine.mergeOptions(options$16);\n\nArcConnectorLine.registerJSONType('ArcConnectorLine');\n\nvar options$6 = {\n 'drawImmediate': false\n};\n\nvar OverlayLayer = function (_Layer) {\n inherits(OverlayLayer, _Layer);\n\n function OverlayLayer(id, geometries, options) {\n classCallCheck(this, OverlayLayer);\n\n if (geometries && !(geometries instanceof Geometry) && !Array.isArray(geometries) && GEOJSON_TYPES.indexOf(geometries.type) < 0) {\n options = geometries;\n geometries = null;\n }\n\n var _this = possibleConstructorReturn(this, _Layer.call(this, id, options));\n\n _this._maxZIndex = 0;\n _this._minZIndex = 0;\n _this._initCache();\n if (geometries) {\n _this.addGeometry(geometries);\n }\n return _this;\n }\n\n OverlayLayer.prototype.getGeometryById = function getGeometryById(id) {\n if (isNil(id) || id === '') {\n return null;\n }\n if (!this._geoMap[id]) {\n return null;\n }\n return this._geoMap[id];\n };\n\n OverlayLayer.prototype.getGeometries = function getGeometries(filter, context) {\n if (!filter) {\n return this._geoList.slice(0);\n }\n var result = [];\n var geometry = void 0,\n filtered = void 0;\n for (var i = 0, l = this._geoList.length; i < l; i++) {\n geometry = this._geoList[i];\n if (context) {\n filtered = filter.call(context, geometry);\n } else {\n filtered = filter(geometry);\n }\n if (filtered) {\n result.push(geometry);\n }\n }\n return result;\n };\n\n OverlayLayer.prototype.getFirstGeometry = function getFirstGeometry() {\n if (!this._geoList.length) {\n return null;\n }\n return this._geoList[0];\n };\n\n OverlayLayer.prototype.getLastGeometry = function getLastGeometry() {\n var len = this._geoList.length;\n if (len === 0) {\n return null;\n }\n return this._geoList[len - 1];\n };\n\n OverlayLayer.prototype.getCount = function getCount() {\n return this._geoList.length;\n };\n\n OverlayLayer.prototype.getExtent = function getExtent() {\n if (this.getCount() === 0) {\n return null;\n }\n var extent = new Extent(this.getProjection());\n this.forEach(function (g) {\n extent._combine(g.getExtent());\n });\n return extent;\n };\n\n OverlayLayer.prototype.forEach = function forEach(fn, context) {\n var copyOnWrite = this._geoList.slice(0);\n for (var i = 0, l = copyOnWrite.length; i < l; i++) {\n if (!context) {\n fn(copyOnWrite[i], i);\n } else {\n fn.call(context, copyOnWrite[i], i);\n }\n }\n return this;\n };\n\n OverlayLayer.prototype.filter = function filter() {\n return GeometryCollection.prototype.filter.apply(this, arguments);\n };\n\n OverlayLayer.prototype.isEmpty = function isEmpty() {\n return !this._geoList.length;\n };\n\n OverlayLayer.prototype.addGeometry = function addGeometry(geometries, fitView) {\n if (!geometries) {\n return this;\n }\n if (geometries.type === 'FeatureCollection') {\n return this.addGeometry(GeoJSON.toGeometry(geometries), fitView);\n } else if (!Array.isArray(geometries)) {\n var count = arguments.length;\n var last = arguments[count - 1];\n geometries = Array.prototype.slice.call(arguments, 0, count - 1);\n fitView = last;\n if (isObject(last)) {\n geometries.push(last);\n fitView = false;\n }\n return this.addGeometry(geometries, fitView);\n } else if (geometries.length === 0) {\n return this;\n }\n this._initCache();\n var extent = void 0;\n if (fitView === true) {\n extent = new Extent();\n }\n this._toSort = this._maxZIndex > 0;\n var geos = [];\n for (var i = 0, l = geometries.length; i < l; i++) {\n var geo = geometries[i];\n if (!geo) {\n throw new Error('Invalid geometry to add to layer(' + this.getId() + ') at index:' + i);\n }\n if (!(geo instanceof Geometry)) {\n geo = Geometry.fromJSON(geo);\n if (Array.isArray(geo)) {\n for (var ii = 0, ll = geo.length; ii < ll; ii++) {\n this._add(geo[ii], extent, i);\n geos.push(geo[ii]);\n }\n }\n }\n if (!Array.isArray(geo)) {\n this._add(geo, extent, i);\n geos.push(geo);\n }\n }\n var map = this.getMap();\n if (map) {\n this._getRenderer().onGeometryAdd(geos);\n if (fitView === true && !isNil(extent.xmin)) {\n var z = map.getFitZoom(extent);\n map.setCenterAndZoom(extent.getCenter(), z);\n }\n }\n\n this.fire('addgeo', {\n 'geometries': geometries\n });\n return this;\n };\n\n OverlayLayer.prototype.getGeoMinZIndex = function getGeoMinZIndex() {\n return this._minZIndex;\n };\n\n OverlayLayer.prototype.getGeoMaxZIndex = function getGeoMaxZIndex() {\n return this._maxZIndex;\n };\n\n OverlayLayer.prototype._add = function _add(geo, extent, i) {\n if (!this._toSort) {\n this._toSort = geo.getZIndex() !== 0;\n }\n this._updateZIndex(geo.getZIndex());\n var geoId = geo.getId();\n if (!isNil(geoId)) {\n if (!isNil(this._geoMap[geoId])) {\n throw new Error('Duplicate geometry id in layer(' + this.getId() + '):' + geoId + ', at index:' + i);\n }\n this._geoMap[geoId] = geo;\n }\n var internalId = UID();\n geo._setInternalId(internalId);\n this._geoList.push(geo);\n if (this.onAddGeometry) {\n this.onAddGeometry(geo);\n }\n geo._bindLayer(this);\n if (geo.onAdd) {\n geo.onAdd();\n }\n if (extent) {\n extent._combine(geo.getExtent());\n }\n\n geo._fireEvent('add', {\n 'layer': this\n });\n };\n\n OverlayLayer.prototype.removeGeometry = function removeGeometry(geometries) {\n if (!Array.isArray(geometries)) {\n return this.removeGeometry([geometries]);\n }\n for (var i = geometries.length - 1; i >= 0; i--) {\n if (!(geometries[i] instanceof Geometry)) {\n geometries[i] = this.getGeometryById(geometries[i]);\n }\n if (!geometries[i] || this !== geometries[i].getLayer()) continue;\n geometries[i].remove();\n }\n\n this.fire('removegeo', {\n 'geometries': geometries\n });\n return this;\n };\n\n OverlayLayer.prototype.clear = function clear() {\n this._clearing = true;\n this.forEach(function (geo) {\n geo.remove();\n });\n this._geoMap = {};\n var old = this._geoList;\n this._geoList = [];\n if (this._getRenderer()) {\n this._getRenderer().onGeometryRemove(old);\n }\n this._clearing = false;\n\n this.fire('clear');\n return this;\n };\n\n OverlayLayer.prototype.onRemoveGeometry = function onRemoveGeometry(geometry) {\n if (!geometry || this._clearing) {\n return;\n }\n\n if (this !== geometry.getLayer()) {\n return;\n }\n var internalId = geometry._getInternalId();\n if (isNil(internalId)) {\n return;\n }\n var geoId = geometry.getId();\n if (!isNil(geoId)) {\n delete this._geoMap[geoId];\n }\n var idx = this._findInList(geometry);\n if (idx >= 0) {\n this._geoList.splice(idx, 1);\n }\n if (this._getRenderer()) {\n this._getRenderer().onGeometryRemove([geometry]);\n }\n };\n\n OverlayLayer.prototype.hide = function hide() {\n for (var i = 0, l = this._geoList.length; i < l; i++) {\n this._geoList[i].onHide();\n }\n return Layer.prototype.hide.call(this);\n };\n\n OverlayLayer.prototype.identify = function identify(coordinate) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n return this._hitGeos(this._geoList, coordinate, options);\n };\n\n OverlayLayer.prototype._hitGeos = function _hitGeos(geometries, coordinate) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n var filter = options['filter'],\n tolerance = options['tolerance'],\n hits = [];\n var map = this.getMap();\n var point = map.coordToPoint(coordinate);\n var cp = map._pointToContainerPoint(point);\n for (var i = geometries.length - 1; i >= 0; i--) {\n var geo = geometries[i];\n if (!geo || !geo.isVisible() || !geo._getPainter()) {\n continue;\n }\n if (!(geo instanceof LineString) || !geo._getArrowStyle() && !(geo instanceof Curve)) {\n var extent = geo.getContainerExtent();\n if (tolerance) {\n extent = extent.expand(tolerance);\n }\n if (!extent || !extent.contains(cp)) {\n continue;\n }\n }\n if (geo._containsPoint(cp, tolerance) && (!filter || filter(geo))) {\n hits.push(geo);\n if (options['count']) {\n if (hits.length >= options['count']) {\n break;\n }\n }\n }\n }\n return hits;\n };\n\n OverlayLayer.prototype._initCache = function _initCache() {\n if (!this._geoList) {\n this._geoList = [];\n this._geoMap = {};\n }\n };\n\n OverlayLayer.prototype._updateZIndex = function _updateZIndex() {\n for (var _len = arguments.length, zIndex = Array(_len), _key = 0; _key < _len; _key++) {\n zIndex[_key] = arguments[_key];\n }\n\n this._maxZIndex = Math.max(this._maxZIndex, Math.max.apply(Math, zIndex));\n this._minZIndex = Math.min(this._minZIndex, Math.min.apply(Math, zIndex));\n };\n\n OverlayLayer.prototype._sortGeometries = function _sortGeometries() {\n var _this2 = this;\n\n if (!this._toSort) {\n return;\n }\n this._maxZIndex = 0;\n this._minZIndex = 0;\n this._geoList.sort(function (a, b) {\n _this2._updateZIndex(a.getZIndex(), b.getZIndex());\n return _this2._compare(a, b);\n });\n this._toSort = false;\n };\n\n OverlayLayer.prototype._compare = function _compare(a, b) {\n if (a.getZIndex() === b.getZIndex()) {\n return a._getInternalId() - b._getInternalId();\n }\n return a.getZIndex() - b.getZIndex();\n };\n\n OverlayLayer.prototype._findInList = function _findInList(geo) {\n var len = this._geoList.length;\n if (len === 0) {\n return -1;\n }\n var low = 0,\n high = len - 1,\n middle = void 0;\n while (low <= high) {\n middle = Math.floor((low + high) / 2);\n if (this._geoList[middle] === geo) {\n return middle;\n } else if (this._compare(this._geoList[middle], geo) > 0) {\n high = middle - 1;\n } else {\n low = middle + 1;\n }\n }\n return -1;\n };\n\n OverlayLayer.prototype._onGeometryEvent = function _onGeometryEvent(param) {\n if (!param || !param['target']) {\n return;\n }\n var type = param['type'];\n if (type === 'idchange') {\n this._onGeometryIdChange(param);\n } else if (type === 'zindexchange') {\n this._onGeometryZIndexChange(param);\n } else if (type === 'positionchange') {\n this._onGeometryPositionChange(param);\n } else if (type === 'shapechange') {\n this._onGeometryShapeChange(param);\n } else if (type === 'symbolchange') {\n this._onGeometrySymbolChange(param);\n } else if (type === 'show') {\n this._onGeometryShow(param);\n } else if (type === 'hide') {\n this._onGeometryHide(param);\n } else if (type === 'propertieschange') {\n this._onGeometryPropertiesChange(param);\n }\n };\n\n OverlayLayer.prototype._onGeometryIdChange = function _onGeometryIdChange(param) {\n if (param['new'] === param['old']) {\n if (this._geoMap[param['old']] && this._geoMap[param['old']] === param['target']) {\n return;\n }\n }\n if (!isNil(param['new'])) {\n if (this._geoMap[param['new']]) {\n throw new Error('Duplicate geometry id in layer(' + this.getId() + '):' + param['new']);\n }\n this._geoMap[param['new']] = param['target'];\n }\n if (!isNil(param['old']) && param['new'] !== param['old']) {\n delete this._geoMap[param['old']];\n }\n };\n\n OverlayLayer.prototype._onGeometryZIndexChange = function _onGeometryZIndexChange(param) {\n if (param['old'] !== param['new']) {\n this._updateZIndex(param['new']);\n this._toSort = true;\n if (this._getRenderer()) {\n this._getRenderer().onGeometryZIndexChange(param);\n }\n }\n };\n\n OverlayLayer.prototype._onGeometryPositionChange = function _onGeometryPositionChange(param) {\n if (this._getRenderer()) {\n this._getRenderer().onGeometryPositionChange(param);\n }\n };\n\n OverlayLayer.prototype._onGeometryShapeChange = function _onGeometryShapeChange(param) {\n if (this._getRenderer()) {\n this._getRenderer().onGeometryShapeChange(param);\n }\n };\n\n OverlayLayer.prototype._onGeometrySymbolChange = function _onGeometrySymbolChange(param) {\n if (this._getRenderer()) {\n this._getRenderer().onGeometrySymbolChange(param);\n }\n };\n\n OverlayLayer.prototype._onGeometryShow = function _onGeometryShow(param) {\n if (this._getRenderer()) {\n this._getRenderer().onGeometryShow(param);\n }\n };\n\n OverlayLayer.prototype._onGeometryHide = function _onGeometryHide(param) {\n if (this._getRenderer()) {\n this._getRenderer().onGeometryHide(param);\n }\n };\n\n OverlayLayer.prototype._onGeometryPropertiesChange = function _onGeometryPropertiesChange(param) {\n if (this._getRenderer()) {\n this._getRenderer().onGeometryPropertiesChange(param);\n }\n };\n\n return OverlayLayer;\n}(Layer);\n\nOverlayLayer.mergeOptions(options$6);\n\nvar options$5 = {\n 'debug': false,\n 'enableSimplify': true,\n 'geometryEvents': true,\n 'defaultIconSize': [20, 20],\n 'cacheVectorOnCanvas': true,\n 'cacheSvgOnCanvas': Browser$1.gecko,\n 'enableAltitude': false,\n 'altitudeProperty': 'altitude',\n 'drawAltitude': false\n};\n\nvar VectorLayer = function (_OverlayLayer) {\n inherits(VectorLayer, _OverlayLayer);\n\n function VectorLayer(id, geometries, options) {\n classCallCheck(this, VectorLayer);\n\n var _this = possibleConstructorReturn(this, _OverlayLayer.call(this, id, geometries, options));\n\n var style = _this.options['style'];\n delete _this.options['style'];\n if (style) {\n _this.setStyle(style);\n }\n return _this;\n }\n\n VectorLayer.prototype.getStyle = function getStyle() {\n if (!this._style) {\n return null;\n }\n return this._style;\n };\n\n VectorLayer.prototype.setStyle = function setStyle(style) {\n this._style = style;\n this._cookedStyles = compileStyle(style);\n this.forEach(function (geometry) {\n this._styleGeometry(geometry);\n }, this);\n\n this.fire('setstyle', {\n 'style': style\n });\n return this;\n };\n\n VectorLayer.prototype.removeStyle = function removeStyle() {\n if (!this._style) {\n return this;\n }\n delete this._style;\n delete this._cookedStyles;\n this.forEach(function (geometry) {\n geometry._setExternSymbol(null);\n }, this);\n\n this.fire('removestyle');\n return this;\n };\n\n VectorLayer.prototype.onAddGeometry = function onAddGeometry(geo) {\n var style = this.getStyle();\n if (style) {\n this._styleGeometry(geo);\n }\n };\n\n VectorLayer.prototype.onConfig = function onConfig(conf) {\n _OverlayLayer.prototype.onConfig.call(this, conf);\n if (conf['enableAltitude'] || conf['drawAltitude'] || conf['altitudeProperty']) {\n var renderer = this.getRenderer();\n if (renderer && renderer.setToRedraw) {\n renderer.setToRedraw();\n }\n }\n };\n\n VectorLayer.prototype._styleGeometry = function _styleGeometry(geometry) {\n if (!this._cookedStyles) {\n return false;\n }\n var g = getFilterFeature(geometry);\n for (var i = 0, len = this._cookedStyles.length; i < len; i++) {\n if (this._cookedStyles[i]['filter'](g) === true) {\n geometry._setExternSymbol(this._cookedStyles[i]['symbol']);\n return true;\n }\n }\n return false;\n };\n\n VectorLayer.prototype.identify = function identify(coordinate) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var renderer = this.getRenderer();\n\n if (options['onlyVisible'] && renderer && renderer.identify) {\n return renderer.identify(coordinate, options);\n }\n return _OverlayLayer.prototype.identify.call(this, coordinate, options);\n };\n\n VectorLayer.prototype.toJSON = function toJSON(options) {\n if (!options) {\n options = {};\n }\n var profile = {\n 'type': this.getJSONType(),\n 'id': this.getId(),\n 'options': this.config()\n };\n if ((isNil(options['style']) || options['style']) && this.getStyle()) {\n profile['style'] = this.getStyle();\n }\n if (isNil(options['geometries']) || options['geometries']) {\n var clipExtent = void 0;\n if (options['clipExtent']) {\n var map = this.getMap();\n var projection = map ? map.getProjection() : null;\n clipExtent = new Extent(options['clipExtent'], projection);\n }\n var geoJSONs = [];\n var geometries = this.getGeometries();\n for (var i = 0, len = geometries.length; i < len; i++) {\n var geo = geometries[i];\n var geoExt = geo.getExtent();\n if (!geoExt || clipExtent && !clipExtent.intersects(geoExt)) {\n continue;\n }\n var json = geo.toJSON(options['geometries']);\n geoJSONs.push(json);\n }\n profile['geometries'] = geoJSONs;\n }\n return profile;\n };\n\n VectorLayer.fromJSON = function fromJSON(json) {\n if (!json || json['type'] !== 'VectorLayer') {\n return null;\n }\n var layer = new VectorLayer(json['id'], json['options']);\n var geoJSONs = json['geometries'];\n var geometries = [];\n for (var i = 0; i < geoJSONs.length; i++) {\n var geo = Geometry.fromJSON(geoJSONs[i]);\n if (geo) {\n geometries.push(geo);\n }\n }\n layer.addGeometry(geometries);\n if (json['style']) {\n layer.setStyle(json['style']);\n }\n return layer;\n };\n\n return VectorLayer;\n}(OverlayLayer);\n\nVectorLayer.mergeOptions(options$5);\n\nVectorLayer.registerJSONType('VectorLayer');\n\nvar key = '_map_tool';\n\nvar MapTool = function (_Eventable) {\n inherits(MapTool, _Eventable);\n\n function MapTool() {\n classCallCheck(this, MapTool);\n return possibleConstructorReturn(this, _Eventable.apply(this, arguments));\n }\n\n MapTool.prototype.addTo = function addTo(map) {\n if (!map) {\n return this;\n }\n this._map = map;\n\n if (map[key]) {\n map[key].disable();\n }\n if (this.onAdd) {\n this.onAdd();\n }\n this.enable();\n map[key] = this;\n\n this._fireEvent('add');\n return this;\n };\n\n MapTool.prototype.getMap = function getMap() {\n return this._map;\n };\n\n MapTool.prototype.enable = function enable() {\n var map = this._map;\n if (!map || this._enabled) {\n return this;\n }\n this._enabled = true;\n this._switchEvents('off');\n\n this._registerEvents();\n if (this.onEnable) {\n this.onEnable();\n }\n\n this._fireEvent('enable');\n return this;\n };\n\n MapTool.prototype.disable = function disable() {\n if (!this._enabled || !this._map) {\n return this;\n }\n this._enabled = false;\n this._switchEvents('off');\n if (this.onDisable) {\n this.onDisable();\n }\n\n this._fireEvent('disable');\n return this;\n };\n\n MapTool.prototype.isEnabled = function isEnabled() {\n if (!this._enabled) {\n return false;\n }\n return true;\n };\n\n MapTool.prototype.remove = function remove() {\n if (!this._map) {\n return this;\n }\n this.disable();\n if (this._map) {\n delete this._map[key];\n delete this._map;\n }\n\n this._fireEvent('remove');\n return this;\n };\n\n MapTool.prototype._registerEvents = function _registerEvents() {\n this._switchEvents('on');\n };\n\n MapTool.prototype._switchEvents = function _switchEvents(to) {\n var events = this.getEvents();\n if (events) {\n this._map[to](events, this);\n }\n };\n\n MapTool.prototype._fireEvent = function _fireEvent(eventName, param) {\n if (!param) {\n param = {};\n }\n this.fire(eventName, param);\n };\n\n return MapTool;\n}(Eventable(Class));\n\nvar options$3 = {\n 'symbol': {\n 'lineColor': '#000',\n 'lineWidth': 2,\n 'lineOpacity': 1,\n 'polygonFill': '#fff',\n 'polygonOpacity': 0.3\n },\n 'doubleClickZoom': false,\n 'mode': null,\n 'once': false,\n 'ignoreMouseleave': true\n};\n\nvar registeredMode = {};\n\nvar DrawTool = function (_MapTool) {\n inherits(DrawTool, _MapTool);\n\n DrawTool.registerMode = function registerMode(name, modeAction) {\n registeredMode[name.toLowerCase()] = modeAction;\n };\n\n DrawTool.getRegisterMode = function getRegisterMode(name) {\n return registeredMode[name.toLowerCase()];\n };\n\n function DrawTool(options) {\n classCallCheck(this, DrawTool);\n\n var _this = possibleConstructorReturn(this, _MapTool.call(this, options));\n\n _this._checkMode();\n\n _this._events = {\n 'click': _this._firstClickHandler,\n 'mousemove': _this._mouseMoveHandler,\n 'dblclick': _this._doubleClickHandler,\n 'mousedown': _this._mouseDownHandler,\n 'mouseup': _this._mouseUpHandler\n };\n return _this;\n }\n\n DrawTool.prototype.getMode = function getMode() {\n if (this.options['mode']) {\n return this.options['mode'].toLowerCase();\n }\n return null;\n };\n\n DrawTool.prototype.setMode = function setMode(mode) {\n if (this._geometry) {\n this._geometry.remove();\n delete this._geometry;\n }\n this._clearStage();\n this._switchEvents('off');\n this.options['mode'] = mode;\n this._checkMode();\n if (this.isEnabled()) {\n this._switchEvents('on');\n this._restoreMapCfg();\n this._saveMapCfg();\n }\n return this;\n };\n\n DrawTool.prototype.getSymbol = function getSymbol() {\n var symbol = this.options['symbol'];\n if (symbol) {\n return extendSymbol(symbol);\n } else {\n return extendSymbol(this.options['symbol']);\n }\n };\n\n DrawTool.prototype.setSymbol = function setSymbol(symbol) {\n if (!symbol) {\n return this;\n }\n this.options['symbol'] = symbol;\n if (this._geometry) {\n this._geometry.setSymbol(symbol);\n }\n return this;\n };\n\n DrawTool.prototype.getCurrentGeometry = function getCurrentGeometry() {\n return this._geometry;\n };\n\n DrawTool.prototype.onAdd = function onAdd() {\n this._checkMode();\n };\n\n DrawTool.prototype.onEnable = function onEnable() {\n this._saveMapCfg();\n this._drawToolLayer = this._getDrawLayer();\n this._clearStage();\n this._loadResources();\n return this;\n };\n\n DrawTool.prototype.onDisable = function onDisable() {\n var map = this.getMap();\n this._restoreMapCfg();\n this.endDraw();\n if (this._map) {\n map.removeLayer(this._getDrawLayer());\n }\n return this;\n };\n\n DrawTool.prototype.undo = function undo() {\n var registerMode = this._getRegisterMode();\n var action = registerMode.action;\n if (!this._shouldRecordHistory(action) || !this._historyPointer) {\n return this;\n }\n var coords = this._clickCoords.slice(0, --this._historyPointer);\n registerMode.update(coords, this._geometry);\n return this;\n };\n\n DrawTool.prototype.redo = function redo() {\n var registerMode = this._getRegisterMode();\n var action = registerMode.action;\n if (!this._shouldRecordHistory(action) || isNil(this._historyPointer) || this._historyPointer === this._clickCoords.length) {\n return this;\n }\n var coords = this._clickCoords.slice(0, ++this._historyPointer);\n registerMode.update(coords, this._geometry);\n return this;\n };\n\n DrawTool.prototype._shouldRecordHistory = function _shouldRecordHistory(actions) {\n return Array.isArray(actions) && actions[0] === 'click' && actions[1] === 'mousemove' && actions[2] === 'dblclick';\n };\n\n DrawTool.prototype._checkMode = function _checkMode() {\n this._getRegisterMode();\n };\n\n DrawTool.prototype._saveMapCfg = function _saveMapCfg() {\n var map = this.getMap();\n this._mapDoubleClickZoom = map.options['doubleClickZoom'];\n map.config({\n 'doubleClickZoom': this.options['doubleClickZoom']\n });\n var actions = this._getRegisterMode()['action'];\n if (actions.indexOf('mousedown') > -1) {\n var _map = this.getMap();\n this._mapDraggable = _map.options['draggable'];\n _map.config({\n 'draggable': false\n });\n }\n };\n\n DrawTool.prototype._restoreMapCfg = function _restoreMapCfg() {\n var map = this.getMap();\n map.config({\n 'doubleClickZoom': this._mapDoubleClickZoom\n });\n if (!isNil(this._mapDraggable)) {\n map.config('draggable', this._mapDraggable);\n }\n delete this._mapDraggable;\n delete this._mapDoubleClickZoom;\n };\n\n DrawTool.prototype._loadResources = function _loadResources() {\n var symbol = this.getSymbol();\n var resources = getExternalResources(symbol);\n if (resources.length > 0) {\n this._drawToolLayer._getRenderer().loadResources(resources);\n }\n };\n\n DrawTool.prototype._getProjection = function _getProjection() {\n return this._map.getProjection();\n };\n\n DrawTool.prototype._getRegisterMode = function _getRegisterMode() {\n var mode = this.getMode();\n var registerMode = DrawTool.getRegisterMode(mode);\n if (!registerMode) {\n throw new Error(mode + ' is not a valid mode of DrawTool.');\n }\n return registerMode;\n };\n\n DrawTool.prototype.getEvents = function getEvents() {\n var action = this._getRegisterMode()['action'];\n var _events = {};\n if (Array.isArray(action)) {\n for (var i = 0; i < action.length; i++) {\n _events[action[i]] = this._events[action[i]];\n }\n return _events;\n }\n return null;\n };\n\n DrawTool.prototype._mouseDownHandler = function _mouseDownHandler(event) {\n this._createGeometry(event);\n };\n\n DrawTool.prototype._mouseUpHandler = function _mouseUpHandler(event) {\n this.endDraw(event);\n };\n\n DrawTool.prototype._firstClickHandler = function _firstClickHandler(event) {\n var registerMode = this._getRegisterMode();\n var coordinate = event['coordinate'];\n if (!this._geometry) {\n this._createGeometry(event);\n } else {\n if (!isNil(this._historyPointer)) {\n this._clickCoords = this._clickCoords.slice(0, this._historyPointer);\n }\n this._clickCoords.push(coordinate);\n this._historyPointer = this._clickCoords.length;\n if (registerMode['clickLimit'] && registerMode['clickLimit'] === this._historyPointer) {\n registerMode['update']([coordinate], this._geometry, event);\n this.endDraw(event);\n } else {\n registerMode['update'](this._clickCoords, this._geometry, event);\n }\n\n this._fireEvent('drawvertex', event);\n }\n };\n\n DrawTool.prototype._createGeometry = function _createGeometry(event) {\n var mode = this.getMode();\n var registerMode = this._getRegisterMode();\n var coordinate = event['coordinate'];\n var symbol = this.getSymbol();\n if (!this._geometry) {\n this._clickCoords = [coordinate];\n this._geometry = registerMode['create'](this._clickCoords, event);\n if (symbol && mode !== 'point') {\n this._geometry.setSymbol(symbol);\n } else if (this.options.hasOwnProperty('symbol')) {\n this._geometry.setSymbol(this.options['symbol']);\n }\n this._addGeometryToStage(this._geometry);\n\n this._fireEvent('drawstart', event);\n }\n if (mode === 'point') {\n this.endDraw(event);\n }\n };\n\n DrawTool.prototype._mouseMoveHandler = function _mouseMoveHandler(event) {\n var map = this.getMap();\n var coordinate = event['coordinate'];\n if (!this._geometry || !map || map.isInteracting()) {\n return;\n }\n var containerPoint = this._getMouseContainerPoint(event);\n if (!this._isValidContainerPoint(containerPoint)) {\n return;\n }\n var registerMode = this._getRegisterMode();\n if (this._shouldRecordHistory(registerMode.action)) {\n var path = this._clickCoords.slice(0, this._historyPointer);\n if (path && path.length > 0 && coordinate.equals(path[path.length - 1])) {\n return;\n }\n if (!(this._historyPointer === null)) {\n this._clickCoords = this._clickCoords.slice(0, this._historyPointer);\n }\n this._historyPointer = this._clickCoords.length;\n registerMode['update'](path.concat([coordinate]), this._geometry, event);\n } else {\n registerMode['update']([coordinate], this._geometry, event);\n }\n\n this._fireEvent('mousemove', event);\n };\n\n DrawTool.prototype._doubleClickHandler = function _doubleClickHandler(event) {\n if (!this._geometry) {\n return;\n }\n var containerPoint = this._getMouseContainerPoint(event);\n if (!this._isValidContainerPoint(containerPoint)) {\n return;\n }\n var registerMode = this._getRegisterMode();\n var clickCoords = this._clickCoords;\n if (clickCoords.length < 2) {\n return;\n }\n\n var path = [clickCoords[0]];\n for (var i = 1, len = clickCoords.length; i < len; i++) {\n if (clickCoords[i].x !== clickCoords[i - 1].x || clickCoords[i].y !== clickCoords[i - 1].y) {\n path.push(clickCoords[i]);\n }\n }\n if (path.length < 2 || this._geometry && this._geometry instanceof Polygon && path.length < 3) {\n return;\n }\n registerMode['update'](path, this._geometry, event);\n this.endDraw(event);\n };\n\n DrawTool.prototype._addGeometryToStage = function _addGeometryToStage(geometry) {\n var drawLayer = this._getDrawLayer();\n drawLayer.addGeometry(geometry);\n };\n\n DrawTool.prototype.endDraw = function endDraw(param) {\n if (!this._geometry || this._ending) {\n return this;\n }\n this._ending = true;\n var geometry = this._geometry;\n this._clearStage();\n param = param || {};\n this._geometry = geometry;\n\n this._fireEvent('drawend', param);\n delete this._geometry;\n if (this.options['once']) {\n this.disable();\n }\n delete this._ending;\n return this;\n };\n\n DrawTool.prototype._clearStage = function _clearStage() {\n this._getDrawLayer().clear();\n delete this._geometry;\n delete this._clickCoords;\n };\n\n DrawTool.prototype._getMouseContainerPoint = function _getMouseContainerPoint(event) {\n var action = this._getRegisterMode()['action'];\n if (action === 'mousedown') {\n stopPropagation(event['domEvent']);\n }\n return event['containerPoint'];\n };\n\n DrawTool.prototype._isValidContainerPoint = function _isValidContainerPoint(containerPoint) {\n var mapSize = this._map.getSize();\n var w = mapSize['width'],\n h = mapSize['height'];\n if (containerPoint.x < 0 || containerPoint.y < 0) {\n return false;\n } else if (containerPoint.x > w || containerPoint.y > h) {\n return false;\n }\n return true;\n };\n\n DrawTool.prototype._getDrawLayer = function _getDrawLayer() {\n var drawLayerId = INTERNAL_LAYER_PREFIX + 'drawtool';\n var drawToolLayer = this._map.getLayer(drawLayerId);\n if (!drawToolLayer) {\n drawToolLayer = new VectorLayer(drawLayerId, {\n 'enableSimplify': false\n });\n this._map.addLayer(drawToolLayer);\n }\n return drawToolLayer;\n };\n\n DrawTool.prototype._fireEvent = function _fireEvent(eventName, param) {\n if (!param) {\n param = {};\n }\n if (this._geometry) {\n param['geometry'] = this._getRegisterMode()['generate'](this._geometry).copy();\n }\n MapTool.prototype._fireEvent.call(this, eventName, param);\n };\n\n return DrawTool;\n}(MapTool);\n\nDrawTool.mergeOptions(options$3);\n\nvar MapBoxZoomHander = function (_Handler) {\n inherits(MapBoxZoomHander, _Handler);\n\n function MapBoxZoomHander(target) {\n classCallCheck(this, MapBoxZoomHander);\n\n var _this = possibleConstructorReturn(this, _Handler.call(this, target));\n\n _this.drawTool = new DrawTool({\n 'mode': 'boxZoom',\n 'ignoreMouseleave': false\n });\n return _this;\n }\n\n MapBoxZoomHander.prototype.addHooks = function addHooks() {\n this.target.on('_mousedown', this._onMouseDown, this);\n };\n\n MapBoxZoomHander.prototype.removeHooks = function removeHooks() {\n this.target.off('_mousedown', this._onMouseDown, this);\n if (this.drawTool.isEnabled()) {\n this.drawTool.remove();\n }\n };\n\n MapBoxZoomHander.prototype._onMouseDown = function _onMouseDown(param) {\n if (!this.target.options['boxZoom']) {\n return;\n }\n if (param.domEvent.shiftKey) {\n this.drawTool.setSymbol(this.target.options['boxZoomSymbol']).on('drawend', this._boxZoom, this).addTo(this.target);\n }\n };\n\n MapBoxZoomHander.prototype._boxZoom = function _boxZoom(param) {\n var map = this.target;\n this.drawTool.remove();\n var geometry = param.geometry,\n center = geometry.getCenter(),\n symbol = geometry.getSymbol(),\n w = symbol.markerWidth,\n h = symbol.markerHeight;\n\n var extent = new Extent(center, map.locateByPoint(center, w, h), map.getProjection());\n var zoom = map.getFitZoom(extent);\n map.animateTo({\n center: extent.getCenter(),\n zoom: zoom\n });\n };\n\n return MapBoxZoomHander;\n}(Handler$1);\n\nMap.mergeOptions({\n 'boxZoom': true,\n 'boxZoomSymbol': {\n 'markerType': 'rectangle',\n 'markerLineWidth': 3,\n 'markerLineColor': '#1bbc9b',\n 'markerLineDasharray': [10, 5],\n 'markerFillOpacity': 0.1,\n 'markerFill': '#1bbc9b',\n 'markerWidth': 1,\n 'markerHeight': 1\n }\n});\n\nMap.addOnLoadHook('addHandler', 'boxZoom', MapBoxZoomHander);\n\nfunction equalView(view1, view2) {\n for (var p in view1) {\n if (hasOwn(view1, p)) {\n if (p === 'center') {\n if (view1[p][0] !== view2[p][0] || view1[p][1] !== view2[p][1]) {\n return false;\n }\n } else if (view1[p] !== view2[p]) {\n return false;\n }\n }\n }\n return true;\n}\n\nMap.include({\n animateTo: function animateTo(view) {\n var _this = this;\n\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var step = arguments[2];\n\n this._stopAnim(this._animPlayer);\n if (isFunction(options)) {\n step = options;\n options = {};\n }\n var projection = this.getProjection(),\n currView = this.getView(),\n props = {};\n var empty = true;\n for (var p in view) {\n if (hasOwn(view, p) && !isNil(currView[p])) {\n empty = false;\n if (p === 'center') {\n var from = new Coordinate(currView[p]).toFixed(7),\n to = new Coordinate(view[p]).toFixed(7);\n if (!from.equals(to)) {\n props['center'] = [from, to];\n }\n } else if (currView[p] !== view[p] && p !== 'around') {\n props[p] = [currView[p], view[p]];\n }\n }\n }\n if (empty) {\n return null;\n }\n var zoomOrigin = view['around'] || new Point(this.width / 2, this.height / 2);\n var preView = this.getView();\n var renderer = this._getRenderer(),\n framer = function framer(fn) {\n renderer.callInNextFrame(fn);\n };\n\n var player = this._animPlayer = Animation.animate(props, {\n 'easing': options['easing'] || 'out',\n 'duration': options['duration'] || this.options['zoomAnimationDuration'],\n 'framer': framer\n }, function (frame) {\n if (_this.isRemoved()) {\n player.finish();\n return;\n }\n if (player.playState === 'running') {\n var _view = _this.getView();\n if (!options['continueOnViewChanged'] && !equalView(_view, preView)) {\n _this._stopAnim(player);\n return;\n }\n if (frame.styles['center']) {\n var center = frame.styles['center'];\n _this._setPrjCenter(projection.project(center));\n _this.onMoving(_this._parseEventFromCoord(_this.getCenter()));\n }\n if (!isNil(frame.styles['zoom'])) {\n _this.onZooming(frame.styles['zoom'], zoomOrigin);\n }\n if (!isNil(frame.styles['pitch'])) {\n _this.setPitch(frame.styles['pitch']);\n }\n if (!isNil(frame.styles['bearing'])) {\n _this.setBearing(frame.styles['bearing']);\n }\n preView = _this.getView();\n _this._fireEvent('animating');\n } else if (player.playState === 'finished') {\n if (!player._interupted) {\n if (props['center']) {\n _this._setPrjCenter(projection.project(props['center'][1]));\n }\n if (!isNil(props['pitch'])) {\n _this.setPitch(props['pitch'][1]);\n }\n if (!isNil(props['bearing'])) {\n _this.setBearing(props['bearing'][1]);\n }\n }\n _this._endAnim(player, props, zoomOrigin, options);\n preView = _this.getView();\n }\n if (step) {\n step(frame);\n }\n });\n\n this._startAnim(props, zoomOrigin);\n\n return player;\n },\n isAnimating: function isAnimating() {\n return !!this._animPlayer;\n },\n isRotating: function isRotating() {\n return this.isDragRotating() || !!this._animRotating;\n },\n _endAnim: function _endAnim(player, props, zoomOrigin, options) {\n delete this._animRotating;\n var evtType = player._interupted ? 'animateinterupted' : 'animateend';\n if (player === this._animPlayer) {\n delete this._animPlayer;\n }\n if (props['center']) {\n var endCoord = void 0;\n if (player._interupted) {\n endCoord = this.getCenter();\n } else {\n endCoord = props['center'][1];\n }\n this.onMoveEnd(this._parseEventFromCoord(endCoord));\n }\n if (!isNil(props['zoom'])) {\n if (player._interupted) {\n this.onZoomEnd(this.getZoom(), zoomOrigin);\n } else if (!options['wheelZoom']) {\n this.onZoomEnd(props['zoom'][1], zoomOrigin);\n } else {\n this.onZooming(props['zoom'][1], zoomOrigin);\n }\n }\n if (evtType) {\n this._fireEvent(evtType);\n }\n },\n _startAnim: function _startAnim(props, zoomOrigin) {\n if (!this._animPlayer) {\n return;\n }\n if (props['center']) {\n this.onMoveStart();\n }\n if (props['zoom'] && !this.isZooming()) {\n this.onZoomStart(props['zoom'][1], zoomOrigin);\n }\n if (props['pitch'] || props['bearing']) {\n this._animRotating = true;\n }\n this._fireEvent('animatestart');\n this._animPlayer.play();\n },\n _stopAnim: function _stopAnim(player) {\n if (player && player.playState !== 'finished') {\n player._interupted = true;\n player.finish();\n }\n }\n});\n\nvar events = 'mousedown ' + 'mouseup ' + 'mouseover ' + 'mouseout ' + 'mouseenter ' + 'mouseleave ' + 'mousemove ' + 'click ' + 'dblclick ' + 'contextmenu ' + 'keypress ' + 'touchstart ' + 'touchmove ' + 'touchend ';\n\nMap.include({\n _registerDomEvents: function _registerDomEvents() {\n var dom = this._panels.mapWrapper || this._containerDOM;\n addDomEvent(dom, events, this._handleDOMEvent, this);\n },\n _removeDomEvents: function _removeDomEvents() {\n var dom = this._panels.mapWrapper || this._containerDOM;\n removeDomEvent(dom, events, this._handleDOMEvent, this);\n },\n _handleDOMEvent: function _handleDOMEvent(e) {\n var type = e.type;\n\n if (type === 'contextmenu') {\n preventDefault(e);\n }\n if (this._ignoreEvent(e)) {\n return;\n }\n var mimicClick = false;\n\n if (type === 'mousedown' || type === 'touchstart' && e.touches.length === 1) {\n this._mouseDownTime = now();\n } else if (type === 'click' || type === 'touchend' || type === 'contextmenu') {\n if (!this._mouseDownTime) {\n return;\n } else {\n var downTime = this._mouseDownTime;\n delete this._mouseDownTime;\n var time = now();\n if (time - downTime > 300) {\n if (type === 'click' || type === 'contextmenu') {\n return;\n }\n } else if (type === 'touchend') {\n mimicClick = true;\n }\n }\n }\n this._fireDOMEvent(this, e, type);\n if (mimicClick) {\n if (this._clickTime && now() - this._clickTime <= 300) {\n delete this._clickTime;\n this._fireDOMEvent(this, e, 'dblclick');\n } else {\n this._clickTime = now();\n this._fireDOMEvent(this, e, 'click');\n }\n }\n },\n _ignoreEvent: function _ignoreEvent(domEvent) {\n if (!domEvent || !this._panels.control) {\n return false;\n }\n if (this._isEventOutMap(domEvent)) {\n return true;\n }\n var target = domEvent.srcElement || domEvent.target;\n var preTarget = void 0;\n if (target) {\n while (target && target !== this._containerDOM) {\n if (target.className && target.className.indexOf && (target.className.indexOf('maptalks-control') >= 0 || target.className.indexOf('maptalks-ui') >= 0 && !preTarget['eventsPropagation'])) {\n return true;\n }\n preTarget = target;\n target = target.parentNode;\n }\n }\n return false;\n },\n _isEventOutMap: function _isEventOutMap(domEvent) {\n if (this.getPitch() > this.options['maxVisualPitch']) {\n var actualEvent = this._getActualEvent(domEvent);\n var eventPos = getEventContainerPoint(actualEvent, this._containerDOM);\n if (!this.getContainerExtent().contains(eventPos)) {\n return true;\n }\n }\n return false;\n },\n _parseEvent: function _parseEvent(e, type) {\n if (!e) {\n return null;\n }\n var eventParam = {\n 'domEvent': e\n };\n if (type !== 'keypress') {\n var actual = this._getActualEvent(e);\n if (actual) {\n var containerPoint = getEventContainerPoint(actual, this._containerDOM);\n eventParam = extend(eventParam, {\n 'coordinate': this.containerPointToCoord(containerPoint),\n 'containerPoint': containerPoint,\n 'viewPoint': this.containerPointToViewPoint(containerPoint),\n 'point2d': this._containerPointToPoint(containerPoint)\n });\n }\n }\n return eventParam;\n },\n _parseEventFromCoord: function _parseEventFromCoord(coord) {\n var containerPoint = this.coordToContainerPoint(coord),\n viewPoint = this.containerPointToViewPoint(containerPoint);\n var e = {\n 'coordinate': coord,\n 'containerPoint': containerPoint,\n 'viewPoint': viewPoint,\n 'point2d': this.coordToPoint(coord)\n };\n return e;\n },\n _getActualEvent: function _getActualEvent(e) {\n return e.touches && e.touches.length > 0 ? e.touches[0] : e.changedTouches && e.changedTouches.length > 0 ? e.changedTouches[0] : e;\n },\n _fireDOMEvent: function _fireDOMEvent(target, e, type) {\n if (this.isRemoved()) {\n return;\n }\n var eventParam = this._parseEvent(e, type);\n this._fireEvent(type, eventParam);\n }\n});\n\nMap.addOnLoadHook('_registerDomEvents');\n\nMap.include({\n isFullScreen: function isFullScreen() {\n return !!(document.webkitIsFullScreen || document.mozFullScreen || document.msFullscreenElement || document.fullscreenElement);\n },\n requestFullScreen: function requestFullScreen(dom) {\n this._fireEvent('fullscreenstart');\n this._requestFullScreen(dom || this._containerDOM);\n\n this._fireEvent('fullscreenend');\n return this;\n },\n cancelFullScreen: function cancelFullScreen() {\n this._cancelFullScreen();\n\n this._fireEvent('cancelfullscreen');\n return this;\n },\n _requestFullScreen: function _requestFullScreen(dom) {\n if (dom.requestFullScreen) {\n dom.requestFullScreen();\n } else if (dom.mozRequestFullScreen) {\n dom.mozRequestFullScreen();\n } else if (dom.webkitRequestFullScreen) {\n dom.webkitRequestFullScreen();\n } else if (dom.msRequestFullScreen) {\n dom.msRequestFullScreen();\n } else {\n var features = 'fullscreen=1,status=no,resizable=yes,top=0,left=0,scrollbars=no,' + 'titlebar=no,menubar=no,location=no,toolbar=no,z-look=yes,' + 'width=' + (screen.availWidth - 8) + ',height=' + (screen.availHeight - 45);\n var newWin = window.open(location.href, '_blank', features);\n if (newWin !== null) {\n window.opener = null;\n\n window.close();\n }\n }\n },\n _cancelFullScreen: function _cancelFullScreen() {\n if (document.cancelFullScreen) {\n document.cancelFullScreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n } else if (document.webkitCancelFullScreen) {\n document.webkitCancelFullScreen();\n } else {\n var features = 'fullscreen=no,status=yes,resizable=yes,scrollbars=no,' + 'titlebar=no,menubar=yes,location=yes,toolbar=yes,z-look=yes';\n var newWin = window.open(location.href, '_blank', features);\n if (newWin !== null) {\n window.opener = null;\n\n window.close();\n }\n }\n }\n});\n\nMap.include({\n panTo: function panTo(coordinate) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var step = arguments[2];\n\n if (!coordinate) {\n return this;\n }\n if (isFunction(options)) {\n step = options;\n options = {};\n }\n coordinate = new Coordinate(coordinate);\n if (typeof options['animation'] === 'undefined' || options['animation']) {\n return this._panAnimation(coordinate, options['duration'], step);\n } else {\n this.setCenter(coordinate);\n return this;\n }\n },\n\n panBy: function panBy(offset) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var step = arguments[2];\n\n if (!offset) {\n return this;\n }\n if (isFunction(options)) {\n step = options;\n options = {};\n }\n offset = new Point(offset).multi(-1);\n this.onMoveStart();\n if (typeof options['animation'] === 'undefined' || options['animation']) {\n var target = this.locateByPoint(this.getCenter(), offset.x, offset.y);\n this._panAnimation(target, options['duration'], step);\n } else {\n this._offsetCenterByPixel(offset);\n this.onMoveEnd(this._parseEventFromCoord(this.getCenter()));\n }\n return this;\n },\n\n _panAnimation: function _panAnimation(target, t, cb) {\n return this.animateTo({\n 'center': target\n }, {\n 'duration': t || this.options['panAnimationDuration']\n }, cb);\n }\n});\n\nGeometry.fromJSON = function (json) {\n if (Array.isArray(json)) {\n var result = [];\n for (var i = 0, len = json.length; i < len; i++) {\n var c = Geometry.fromJSON(json[i]);\n if (Array.isArray(json)) {\n result = result.concat(c);\n } else {\n result.push(c);\n }\n }\n return result;\n }\n\n if (json && !json['feature']) {\n return GeoJSON.toGeometry(json);\n }\n var geometry = void 0;\n if (json['subType']) {\n geometry = Geometry.getJSONClass(json['subType']).fromJSON(json);\n if (!isNil(json['feature']['id'])) {\n geometry.setId(json['feature']['id']);\n }\n } else {\n geometry = GeoJSON.toGeometry(json['feature']);\n if (json['options']) {\n geometry.config(json['options']);\n }\n }\n if (json['symbol']) {\n geometry.setSymbol(json['symbol']);\n }\n if (json['infoWindow']) {\n geometry.setInfoWindow(json['infoWindow']);\n }\n return geometry;\n};\n\nLayer.fromJSON = function (layerJSON) {\n if (!layerJSON) {\n return null;\n }\n var layerType = layerJSON['type'];\n var clazz = Layer.getJSONClass(layerType);\n if (!clazz || !clazz.fromJSON) {\n throw new Error('unsupported layer type:' + layerType);\n }\n return clazz.fromJSON(layerJSON);\n};\n\nMap.include({\n 'JSON_VERSION': '1.0',\n\n toJSON: function toJSON(options) {\n if (!options) {\n options = {};\n }\n var json = {\n 'version': this['JSON_VERSION'],\n 'extent': this.getExtent().toJSON()\n };\n json['options'] = this.config();\n json['options']['center'] = this.getCenter();\n json['options']['zoom'] = this.getZoom();\n\n var baseLayer = this.getBaseLayer();\n if ((isNil(options['baseLayer']) || options['baseLayer']) && baseLayer) {\n json['baseLayer'] = baseLayer.toJSON(options['baseLayer']);\n }\n var extraLayerOptions = {};\n if (options['clipExtent']) {\n if (options['clipExtent'] === true) {\n extraLayerOptions['clipExtent'] = this.getExtent();\n } else {\n extraLayerOptions['clipExtent'] = options['clipExtent'];\n }\n }\n var layersJSON = [];\n if (isNil(options['layers']) || options['layers'] && !Array.isArray(options['layers'])) {\n var layers = this.getLayers();\n for (var i = 0, len = layers.length; i < len; i++) {\n if (!layers[i].toJSON) {\n continue;\n }\n var opts = extend({}, isObject(options['layers']) ? options['layers'] : {}, extraLayerOptions);\n layersJSON.push(layers[i].toJSON(opts));\n }\n json['layers'] = layersJSON;\n } else if (isArrayHasData(options['layers'])) {\n var _layers = options['layers'];\n for (var _i = 0; _i < _layers.length; _i++) {\n var exportOption = _layers[_i];\n var layer = this.getLayer(exportOption['id']);\n if (!layer.toJSON) {\n continue;\n }\n var _opts = extend({}, exportOption['options'], extraLayerOptions);\n layersJSON.push(layer.toJSON(_opts));\n }\n json['layers'] = layersJSON;\n } else {\n json['layers'] = [];\n }\n return json;\n }\n});\n\nMap.fromJSON = function (container, profile, options) {\n if (!container || !profile) {\n return null;\n }\n if (!options) {\n options = {};\n }\n var map = new Map(container, profile['options']);\n if (isNil(options['baseLayer']) || options['baseLayer']) {\n var baseLayer = Layer.fromJSON(profile['baseLayer']);\n if (baseLayer) {\n map.setBaseLayer(baseLayer);\n }\n }\n if (isNil(options['layers']) || options['layers']) {\n var layers = [];\n var layerJSONs = profile['layers'];\n for (var i = 0; i < layerJSONs.length; i++) {\n var layer = Layer.fromJSON(layerJSONs[i]);\n layers.push(layer);\n }\n map.addLayer(layers);\n }\n\n return map;\n};\n\nMap.include({\n computeLength: function computeLength(coord1, coord2) {\n if (!this.getProjection()) {\n return null;\n }\n var p1 = new Coordinate(coord1),\n p2 = new Coordinate(coord2);\n if (p1.equals(p2)) {\n return 0;\n }\n return this.getProjection().measureLength(p1, p2);\n },\n\n computeGeometryLength: function computeGeometryLength(geometry) {\n return geometry._computeGeodesicLength(this.getProjection());\n },\n\n computeGeometryArea: function computeGeometryArea(geometry) {\n return geometry._computeGeodesicArea(this.getProjection());\n },\n\n identify: function identify(opts, callback) {\n if (!opts) {\n return this;\n }\n var reqLayers = opts['layers'];\n if (!isArrayHasData(reqLayers)) {\n return this;\n }\n var layers = [];\n for (var i = 0, len = reqLayers.length; i < len; i++) {\n if (isString(reqLayers[i])) {\n layers.push(this.getLayer(reqLayers[i]));\n } else {\n layers.push(reqLayers[i]);\n }\n }\n var coordinate = new Coordinate(opts['coordinate']);\n var options = extend({}, opts);\n var hits = [];\n for (var _i = layers.length - 1; _i >= 0; _i--) {\n if (opts['count'] && hits.length >= opts['count']) {\n break;\n }\n var layer = layers[_i];\n if (!layer || !layer.getMap() || !opts['includeInvisible'] && !layer.isVisible() || !opts['includeInternals'] && layer.getId().indexOf(INTERNAL_LAYER_PREFIX) >= 0) {\n continue;\n }\n var layerHits = layer.identify(coordinate, options);\n if (layerHits) {\n if (Array.isArray(layerHits)) {\n pushIn(hits, layerHits);\n } else {\n hits.push(layerHits);\n }\n }\n }\n callback.call(this, hits);\n return this;\n }\n\n});\n\nMap.include({\n _zoom: function _zoom(nextZoom, origin) {\n if (!this.options['zoomable'] || this.isZooming()) {\n return;\n }\n origin = this._checkZoomOrigin(origin);\n nextZoom = this._checkZoom(nextZoom);\n this.onZoomStart(nextZoom, origin);\n this._frameZoom = this.getZoom();\n this.onZoomEnd(nextZoom, origin);\n },\n _zoomAnimation: function _zoomAnimation(nextZoom, origin, startScale) {\n if (!this.options['zoomable'] || this.isZooming()) {\n return;\n }\n\n nextZoom = this._checkZoom(nextZoom);\n if (this.getZoom() === nextZoom) {\n return;\n }\n origin = this._checkZoomOrigin(origin);\n this._startZoomAnim(nextZoom, origin, startScale);\n },\n _checkZoomOrigin: function _checkZoomOrigin(origin) {\n if (!origin || this.options['zoomInCenter']) {\n origin = new Point(this.width / 2, this.height / 2);\n }\n return origin;\n },\n _startZoomAnim: function _startZoomAnim(nextZoom, origin, startScale) {\n if (isNil(startScale)) {\n startScale = 1;\n }\n var endScale = this._getResolution(this._startZoomVal) / this._getResolution(nextZoom);\n var duration = this.options['zoomAnimationDuration'] * Math.abs(endScale - startScale) / Math.abs(endScale - 1);\n this._frameZoom = this._startZoomVal;\n this.animateTo({\n 'zoom': nextZoom,\n 'around': origin\n }, {\n 'continueOnViewChanged': true,\n 'duration': duration\n });\n },\n onZoomStart: function onZoomStart(nextZoom, origin) {\n if (!this.options['zoomable'] || this.isZooming()) {\n return;\n }\n this._zooming = true;\n this._startZoomVal = this.getZoom();\n this._startZoomCoord = this._containerPointToPrj(origin);\n\n this._fireEvent('zoomstart', { 'from': this._startZoomVal, 'to': nextZoom });\n },\n onZooming: function onZooming(nextZoom, origin, startScale) {\n if (!this.options['zoomable']) {\n return;\n }\n var frameZoom = this._frameZoom;\n if (frameZoom === nextZoom) {\n return;\n }\n if (isNil(startScale)) {\n startScale = 1;\n }\n this._zoomTo(nextZoom, origin);\n var res = this.getResolution(nextZoom),\n fromRes = this.getResolution(this._startZoomVal),\n scale = fromRes / res / startScale,\n startPoint = this._prjToContainerPoint(this._startZoomCoord, this._startZoomVal);\n var offset = this.getViewPoint();\n if (!this.isRotating() && !startPoint.equals(origin) && scale !== 1) {\n var pitch = this.getPitch();\n\n var originOffset = startPoint._sub(origin)._multi(1 / (1 - scale));\n if (pitch) {\n originOffset.y /= Math.cos(pitch * Math.PI / 180);\n }\n origin = origin.add(originOffset);\n }\n var matrix = {\n 'view': [scale, 0, 0, scale, (origin.x - offset.x) * (1 - scale), (origin.y - offset.y) * (1 - scale)]\n };\n if (Browser$1.retina) {\n origin = origin.multi(2);\n }\n matrix['container'] = [scale, 0, 0, scale, origin.x * (1 - scale), origin.y * (1 - scale)];\n\n this._fireEvent('zooming', { 'from': this._startZoomVal, 'to': nextZoom, 'origin': origin, 'matrix': matrix });\n this._frameZoom = nextZoom;\n },\n onZoomEnd: function onZoomEnd(nextZoom, origin) {\n if (!this.options['zoomable']) {\n return;\n }\n var startZoomVal = this._startZoomVal;\n this._zoomTo(nextZoom, origin);\n this._zooming = false;\n this._getRenderer().onZoomEnd();\n\n this._fireEvent('zoomend', { 'from': startZoomVal, 'to': nextZoom });\n if (!this._verifyExtent(this.getCenter())) {\n this.panTo(this.getMaxExtent().getCenter());\n }\n },\n _zoomTo: function _zoomTo(nextZoom, origin) {\n this._zoomLevel = nextZoom;\n this._calcMatrices();\n if (origin) {\n this._setPrjCoordAtContainerPoint(this._startZoomCoord, origin);\n }\n },\n _checkZoom: function _checkZoom(nextZoom) {\n var maxZoom = this.getMaxZoom(),\n minZoom = this.getMinZoom();\n if (nextZoom < minZoom) {\n nextZoom = minZoom;\n }\n if (nextZoom > maxZoom) {\n nextZoom = maxZoom;\n }\n return nextZoom;\n }\n});\n\nfunction perspective(out, fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2),\n nf = 1 / (near - far);\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = (far + near) * nf;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[14] = 2 * far * near * nf;\n out[15] = 0;\n return out;\n}\n\nfunction translate(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2],\n a00,\n a01,\n a02,\n a03,\n a10,\n a11,\n a12,\n a13,\n a20,\n a21,\n a22,\n a23;\n\n if (a === out) {\n out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n } else {\n a00 = a[0];a01 = a[1];a02 = a[2];a03 = a[3];\n a10 = a[4];a11 = a[5];a12 = a[6];a13 = a[7];\n a20 = a[8];a21 = a[9];a22 = a[10];a23 = a[11];\n\n out[0] = a00;out[1] = a01;out[2] = a02;out[3] = a03;\n out[4] = a10;out[5] = a11;out[6] = a12;out[7] = a13;\n out[8] = a20;out[9] = a21;out[10] = a22;out[11] = a23;\n\n out[12] = a00 * x + a10 * y + a20 * z + a[12];\n out[13] = a01 * x + a11 * y + a21 * z + a[13];\n out[14] = a02 * x + a12 * y + a22 * z + a[14];\n out[15] = a03 * x + a13 * y + a23 * z + a[15];\n }\n\n return out;\n}\n\nfunction scale(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2];\n\n out[0] = a[0] * x;\n out[1] = a[1] * x;\n out[2] = a[2] * x;\n out[3] = a[3] * x;\n out[4] = a[4] * y;\n out[5] = a[5] * y;\n out[6] = a[6] * y;\n out[7] = a[7] * y;\n out[8] = a[8] * z;\n out[9] = a[9] * z;\n out[10] = a[10] * z;\n out[11] = a[11] * z;\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n\nfunction rotateX(out, a, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad),\n a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7],\n a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n\n if (a !== out) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n out[4] = a10 * c + a20 * s;\n out[5] = a11 * c + a21 * s;\n out[6] = a12 * c + a22 * s;\n out[7] = a13 * c + a23 * s;\n out[8] = a20 * c - a10 * s;\n out[9] = a21 * c - a11 * s;\n out[10] = a22 * c - a12 * s;\n out[11] = a23 * c - a13 * s;\n return out;\n}\n\nfunction rotateZ(out, a, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad),\n a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3],\n a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n\n if (a !== out) {\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n out[0] = a00 * c + a10 * s;\n out[1] = a01 * c + a11 * s;\n out[2] = a02 * c + a12 * s;\n out[3] = a03 * c + a13 * s;\n out[4] = a10 * c - a00 * s;\n out[5] = a11 * c - a01 * s;\n out[6] = a12 * c - a02 * s;\n out[7] = a13 * c - a03 * s;\n return out;\n}\n\nfunction multiply(out, a, b) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3],\n a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7],\n a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11],\n a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n\n b0 = b[4];b1 = b[5];b2 = b[6];b3 = b[7];\n out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n\n b0 = b[8];b1 = b[9];b2 = b[10];b3 = b[11];\n out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n\n b0 = b[12];b1 = b[13];b2 = b[14];b3 = b[15];\n out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n return out;\n}\n\nfunction invert(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3],\n a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7],\n a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11],\n a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15],\n b00 = a00 * a11 - a01 * a10,\n b01 = a00 * a12 - a02 * a10,\n b02 = a00 * a13 - a03 * a10,\n b03 = a01 * a12 - a02 * a11,\n b04 = a01 * a13 - a03 * a11,\n b05 = a02 * a13 - a03 * a12,\n b06 = a20 * a31 - a21 * a30,\n b07 = a20 * a32 - a22 * a30,\n b08 = a20 * a33 - a23 * a30,\n b09 = a21 * a32 - a22 * a31,\n b10 = a21 * a33 - a23 * a31,\n b11 = a22 * a33 - a23 * a32,\n det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n\n return out;\n}\n\nfunction identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n\nfunction set$2(out, x, y, z) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n\nfunction add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n return out;\n}\n\nfunction subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n return out;\n}\n\nfunction length(a) {\n var x = a[0],\n y = a[1],\n z = a[2];\n return Math.sqrt(x * x + y * y + z * z);\n}\n\nfunction normalize(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2];\n var len = x * x + y * y + z * z;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n out[2] = a[2] * len;\n }\n return out;\n}\n\nfunction dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n\nfunction scale$1(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n return out;\n}\n\nfunction cross(out, a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2],\n bx = b[0],\n by = b[1],\n bz = b[2];\n\n out[0] = ay * bz - az * by;\n out[1] = az * bx - ax * bz;\n out[2] = ax * by - ay * bx;\n return out;\n}\n\nfunction applyMatrix(out, v, e) {\n var x = v[0],\n y = v[1],\n z = v[2];\n\n\n var w = 1 / (e[3] * x + e[7] * y + e[11] * z + e[15]);\n\n out[0] = (e[0] * x + e[4] * y + e[8] * z + e[12]) * w;\n out[1] = (e[1] * x + e[5] * y + e[9] * z + e[13]) * w;\n out[2] = (e[2] * x + e[6] * y + e[10] * z + e[14]) * w;\n\n return out;\n}\n\n\n\nfunction matrixToQuaternion(out, te) {\n\n var m11 = te[0],\n m12 = te[4],\n m13 = te[8],\n m21 = te[1],\n m22 = te[5],\n m23 = te[9],\n m31 = te[2],\n m32 = te[6],\n m33 = te[10],\n trace = m11 + m22 + m33;\n var s = void 0;\n\n if (trace > 0) {\n\n s = 0.5 / Math.sqrt(trace + 1.0);\n\n out.w = 0.25 / s;\n out.x = (m32 - m23) * s;\n out.y = (m13 - m31) * s;\n out.z = (m21 - m12) * s;\n } else if (m11 > m22 && m11 > m33) {\n\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\n\n out.w = (m32 - m23) / s;\n out.x = 0.25 * s;\n out.y = (m12 + m21) / s;\n out.z = (m13 + m31) / s;\n } else if (m22 > m33) {\n\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\n\n out.w = (m13 - m31) / s;\n out.x = (m12 + m21) / s;\n out.y = 0.25 * s;\n out.z = (m23 + m32) / s;\n } else {\n\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\n\n out.w = (m21 - m12) / s;\n out.x = (m13 + m31) / s;\n out.y = (m23 + m32) / s;\n out.z = 0.25 * s;\n }\n\n return this;\n}\n\nfunction quaternionToMatrix(out, q) {\n var te = out;\n\n var x = q.x,\n y = q.y,\n z = q.z,\n w = q.w;\n var x2 = x + x,\n y2 = y + y,\n z2 = z + z;\n var xx = x * x2,\n xy = x * y2,\n xz = x * z2;\n var yy = y * y2,\n yz = y * z2,\n zz = z * z2;\n var wx = w * x2,\n wy = w * y2,\n wz = w * z2;\n\n te[0] = 1 - (yy + zz);\n te[4] = xy - wz;\n te[8] = xz + wy;\n\n te[1] = xy + wz;\n te[5] = 1 - (xx + zz);\n te[9] = yz - wx;\n\n te[2] = xz - wy;\n te[6] = yz + wx;\n te[10] = 1 - (xx + yy);\n\n te[3] = 0;\n te[7] = 0;\n te[11] = 0;\n\n te[12] = 0;\n te[13] = 0;\n te[14] = 0;\n te[15] = 1;\n\n return te;\n}\n\nfunction setPosition(out, v) {\n var te = out;\n\n te[12] = v[0];\n te[13] = v[1];\n te[14] = v[2];\n\n return out;\n}\n\nfunction lookAt(te, eye, target, up) {\n var x = [0, 0, 0];\n var y = [0, 0, 0];\n var z = [0, 0, 0];\n subtract(z, eye, target);\n\n if (length(z) === 0) {\n\n z[2] = 1;\n }\n\n normalize(z, z);\n cross(x, up, z);\n\n if (length(z) === 0) {\n\n if (Math.abs(up[2]) === 1) {\n\n z[0] += 0.0001;\n } else {\n\n z[2] += 0.0001;\n }\n\n normalize(z, z);\n cross(x, up, z);\n }\n\n normalize(x, x);\n cross(y, z, x);\n\n te[0] = x[0];te[4] = y[0];te[8] = z[0];\n te[1] = x[1];te[5] = y[1];te[9] = z[1];\n te[2] = x[2];te[6] = y[2];te[10] = z[2];\n\n return te;\n}\n\nvar RADIAN = Math.PI / 180;\nvar DEFAULT_FOV = 0.6435011087932844;\n\nMap.include({\n getFov: function getFov() {\n if (!this._fov) {\n this._fov = DEFAULT_FOV;\n }\n return this._fov / RADIAN;\n },\n setFov: function setFov(fov) {\n if (this.isZooming()) {\n return this;\n }\n fov = Math.max(0.01, Math.min(60, fov));\n if (this._fov === fov) return this;\n var from = this.getFov();\n this._fov = fov * RADIAN;\n this._calcMatrices();\n this._renderLayers();\n\n this._fireEvent('fovchange', { 'from': from, 'to': this.getFov() });\n return this;\n },\n getBearing: function getBearing() {\n if (!this._angle) {\n return 0;\n }\n return -this._angle / RADIAN;\n },\n setBearing: function setBearing(bearing) {\n if (Browser$1.ie9) {\n throw new Error('map can\\'t rotate in IE9.');\n }\n var b = -wrap(bearing, -180, 180) * RADIAN;\n if (this._angle === b) return this;\n var from = this.getBearing();\n\n this._fireEvent('rotatestart', { 'from': from, 'to': b });\n this._angle = b;\n this._calcMatrices();\n this._renderLayers();\n\n this._fireEvent('rotate', { 'from': from, 'to': b });\n\n this._fireEvent('rotateend', { 'from': from, 'to': b });\n return this;\n },\n getPitch: function getPitch() {\n if (!this._pitch) {\n return 0;\n }\n return this._pitch / Math.PI * 180;\n },\n setPitch: function setPitch(pitch) {\n if (Browser$1.ie9) {\n throw new Error('map can\\'t tilt in IE9.');\n }\n var p = clamp(pitch, 0, this.options['maxPitch']) * RADIAN;\n if (this._pitch === p) return this;\n var from = this.getPitch();\n\n this._fireEvent('pitchstart', { 'from': from, 'to': p });\n this._pitch = p;\n this._calcMatrices();\n this._renderLayers();\n\n this._fireEvent('pitch', { 'from': from, 'to': p });\n\n this._fireEvent('pitchend', { 'from': from, 'to': p });\n return this;\n },\n isTransforming: function isTransforming() {\n return !!(this._pitch || this._angle);\n },\n getFrustumAltitude: function getFrustumAltitude() {\n var pitch = 90 - this.getPitch();\n var fov = this.getFov() / 2;\n var cameraAlt = this.cameraPosition ? this.cameraPosition[2] : 0;\n if (fov <= pitch) {\n return cameraAlt;\n }\n fov = Math.PI * fov / 180;\n var d1 = new Point(this.cameraPosition).distanceTo(new Point(this.cameraLookAt)),\n d2 = cameraAlt * Math.tan(fov * 2);\n var d = Math.tan(fov) * (d1 + d2);\n return cameraAlt + d;\n },\n\n _pointToContainerPoint: function () {\n var a = [0, 0, 0];\n return function (point, zoom) {\n var altitude = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n\n point = this._pointToPoint(point, zoom);\n if (this.isTransforming() || altitude) {\n altitude *= this.getResolution(zoom) / this.getResolution();\n var _scale = this._glScale;\n set$2(a, point.x * _scale, point.y * _scale, altitude * _scale);\n\n\n var t = this._projIfBehindCamera(a, this.cameraPosition, this.cameraForward);\n\n applyMatrix(t, t, this.projViewMatrix);\n\n var w2 = this.width / 2,\n h2 = this.height / 2;\n t[0] = t[0] * w2 + w2;\n t[1] = -(t[1] * h2) + h2;\n return new Point(t[0], t[1]);\n } else {\n var centerPoint = this._prjToPoint(this._getPrjCenter());\n return point._sub(centerPoint)._add(this.width / 2, this.height / 2);\n }\n };\n }(),\n\n _projIfBehindCamera: function () {\n var vectorFromCam = new Array(3);\n var nVectorFromCam = new Array(3);\n var proj = new Array(3);\n var sub = new Array(3);\n return function (position, cameraPos, camForward) {\n subtract(vectorFromCam, position, cameraPos);\n var cameraDot = dot(camForward, normalize(nVectorFromCam, vectorFromCam));\n\n if (cameraDot <= 0) {\n var camDot = dot(camForward, vectorFromCam);\n scale$1(proj, camForward, camDot * 1.01);\n add(position, cameraPos, subtract(sub, vectorFromCam, proj));\n }\n\n return position;\n };\n }(),\n\n _containerPointToPoint: function () {\n var cp = [0, 0, 0],\n coord0 = [0, 0, 0, 1],\n coord1 = [0, 0, 0, 1];\n return function (p, zoom) {\n if (this.isTransforming()) {\n var w2 = this.width / 2 || 1,\n h2 = this.height / 2 || 1;\n set$2(cp, (p.x - w2) / w2, (h2 - p.y) / h2, 0);\n\n set$2(coord0, cp[0], cp[1], 0);\n set$2(coord1, cp[0], cp[1], 1);\n coord0[3] = coord1[3] = 1;\n\n applyMatrix(coord0, coord0, this.projViewMatrixInverse);\n applyMatrix(coord1, coord1, this.projViewMatrixInverse);\n var x0 = coord0[0];\n var x1 = coord1[0];\n var y0 = coord0[1];\n var y1 = coord1[1];\n var z0 = coord0[2];\n var z1 = coord1[2];\n\n var t = z0 === z1 ? 0 : (0 - z0) / (z1 - z0);\n\n var point = new Point(interpolate(x0, x1, t), interpolate(y0, y1, t))._multi(1 / this._glScale);\n return zoom === undefined || this.getZoom() === zoom ? point : this._pointToPointAtZoom(point, zoom);\n }\n var centerPoint = this._prjToPoint(this._getPrjCenter(), zoom),\n scale$$1 = zoom !== undefined ? this._getResolution() / this._getResolution(zoom) : 1;\n var x = scale$$1 * (p.x - this.width / 2),\n y = scale$$1 * (p.y - this.height / 2);\n return centerPoint._add(x, y);\n };\n }(),\n\n _calcMatrices: function () {\n var m0 = Browser$1.ie9 ? null : createMat4(),\n m1 = Browser$1.ie9 ? null : createMat4();\n return function () {\n if (Browser$1.ie9) {\n return;\n }\n var size = this.getSize();\n var w = size.width || 1,\n h = size.height || 1;\n\n this._glScale = this.getGLScale();\n\n var fov = this.getFov() * Math.PI / 180;\n var maxScale = this.getScale(this.getMinZoom()) / this.getScale(this.getMaxNativeZoom());\n var farZ = maxScale * h / 2 / this._getFovRatio() * 1.4;\n\n var projMatrix = this.projMatrix || createMat4();\n perspective(projMatrix, fov, w / h, 0.1, farZ);\n this.projMatrix = projMatrix;\n\n var worldMatrix = this._getCameraWorldMatrix();\n\n this.viewMatrix = invert(m0, worldMatrix);\n\n this.projViewMatrix = multiply(this.projViewMatrix || createMat4(), projMatrix, this.viewMatrix);\n\n this.projViewMatrixInverse = multiply(this.projViewMatrixInverse || createMat4(), worldMatrix, invert(m1, projMatrix));\n this.domCssMatrix = this._calcDomMatrix();\n };\n }(),\n\n _calcDomMatrix: function () {\n var m = Browser$1.ie9 ? null : createMat4(),\n minusY = [1, -1, 1],\n arr = [0, 0, 0];\n return function () {\n var cameraToCenterDistance = 0.5 / Math.tan(this._fov / 2) * this.height;\n scale(m, this.projMatrix, minusY);\n translate(m, m, set$2(arr, 0, 0, -cameraToCenterDistance));\n if (this._pitch) {\n rotateX(m, m, this._pitch);\n }\n if (this._angle) {\n rotateZ(m, m, this._angle);\n }\n var m1 = createMat4();\n scale(m1, m1, set$2(arr, this.width / 2, -this.height / 2, 1));\n return multiply(this.domCssMatrix || createMat4(), m1, m);\n };\n }(),\n\n _getCameraWorldMatrix: function () {\n var q = {},\n minusY = [1, -1, 1];\n return function () {\n var targetZ = this.getGLZoom();\n\n var size = this.getSize(),\n scale$$1 = this.getGLScale();\n var center2D = this._prjToPoint(this._prjCenter, targetZ);\n this.cameraLookAt = set$2(this.cameraLookAt || [0, 0, 0], center2D.x, center2D.y, 0);\n\n var pitch = this.getPitch() * RADIAN;\n var bearing = -this.getBearing() * RADIAN;\n\n var ratio = this._getFovRatio();\n var z = scale$$1 * (size.height || 1) / 2 / ratio;\n var cz = z * Math.cos(pitch);\n\n var dist = Math.sin(pitch) * z;\n\n var cx = center2D.x + dist * Math.sin(bearing);\n var cy = center2D.y + dist * Math.cos(bearing);\n this.cameraPosition = set$2(this.cameraPosition || [0, 0, 0], cx, cy, cz);\n\n var d = dist || 1;\n var up = this.cameraUp = set$2(this.cameraUp || [0, 0, 0], Math.sin(bearing) * d, Math.cos(bearing) * d, 0);\n var m = this.cameraWorldMatrix = this.cameraWorldMatrix || createMat4();\n lookAt(m, this.cameraPosition, this.cameraLookAt, up);\n\n var cameraForward = this.cameraForward || [0, 0, 0];\n subtract(cameraForward, this.cameraLookAt, this.cameraPosition);\n\n this.cameraForward = normalize(cameraForward, cameraForward);\n\n matrixToQuaternion(q, m);\n quaternionToMatrix(m, q);\n setPosition(m, this.cameraPosition);\n scale(m, m, minusY);\n return m;\n };\n }(),\n\n _getFovRatio: function _getFovRatio() {\n var fov = this.getFov();\n return Math.tan(fov / 2 * RADIAN);\n },\n _renderLayers: function _renderLayers() {\n if (this.isInteracting()) {\n return;\n }\n var layers = this._getLayers();\n\n layers.forEach(function (layer) {\n if (!layer) {\n return;\n }\n var renderer = layer._getRenderer();\n if (renderer && renderer.setToRedraw) {\n renderer.setToRedraw();\n }\n });\n }\n});\n\nfunction createMat4() {\n return identity(new Array(16));\n}\n\nMap.include({\n _onViewChange: function _onViewChange(view) {\n if (!this._viewHistory) {\n this._viewHistory = [];\n this._viewHistoryPointer = 0;\n }\n var old = this._getCurrentView();\n for (var i = this._viewHistory.length - 1; i >= 0; i--) {\n if (equalMapView(view, this._viewHistory[i])) {\n this._viewHistoryPointer = i;\n this._fireViewChange(old, view);\n return;\n }\n }\n\n if (this._viewHistoryPointer < this._viewHistory.length - 1) {\n this._viewHistory.splice(this._viewHistoryPointer + 1);\n }\n this._viewHistory.push(view);\n var count = this.options['viewHistoryCount'];\n if (count > 0 && this._viewHistory.length > count) {\n this._viewHistory.splice(0, this._viewHistory.length - count);\n }\n this._viewHistoryPointer = this._viewHistory.length - 1;\n\n this._fireViewChange(old, view);\n },\n zoomToPreviousView: function zoomToPreviousView() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n if (!this.hasPreviousView()) {\n return null;\n }\n var view = this._viewHistory[--this._viewHistoryPointer];\n this._zoomToView(view, options);\n return view;\n },\n hasPreviousView: function hasPreviousView() {\n if (!this._viewHistory || this._viewHistoryPointer === 0) {\n return false;\n }\n return true;\n },\n zoomToNextView: function zoomToNextView() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n if (!this.hasNextView()) {\n return null;\n }\n var view = this._viewHistory[++this._viewHistoryPointer];\n this._zoomToView(view, options);\n return view;\n },\n hasNextView: function hasNextView() {\n if (!this._viewHistory || this._viewHistoryPointer === this._viewHistory.length - 1) {\n return false;\n }\n return true;\n },\n _zoomToView: function _zoomToView(view, options) {\n var _this = this;\n\n var old = this.getView();\n if (options['animation']) {\n this.animateTo(view, {\n 'duration': options['duration']\n }, function (frame) {\n if (frame.state.playState === 'finished') {\n _this._fireViewChange(old, view);\n }\n });\n } else {\n this.setView(view);\n this._fireViewChange(old, view);\n }\n },\n getViewHistory: function getViewHistory() {\n return this._viewHistory;\n },\n _fireViewChange: function _fireViewChange(old, view) {\n this._fireEvent('viewchange', {\n 'old': old,\n 'new': view\n });\n },\n _getCurrentView: function _getCurrentView() {\n if (!this._viewHistory) {\n return null;\n }\n return this._viewHistory[this._viewHistoryPointer];\n }\n});\n\nMap.mergeOptions({\n 'viewHistory': true,\n 'viewHistoryCount': 10\n});\n\nvar options$17 = {\n 'mode': 'LineString',\n 'language': 'zh-CN',\n 'metric': true,\n 'imperial': false,\n 'symbol': {\n 'lineColor': '#000',\n 'lineWidth': 3,\n 'lineOpacity': 1\n },\n 'vertexSymbol': {\n 'markerType': 'ellipse',\n 'markerFill': '#fff',\n 'markerLineColor': '#000',\n 'markerLineWidth': 3,\n 'markerWidth': 11,\n 'markerHeight': 11\n },\n 'labelOptions': {\n 'textSymbol': {\n 'textFaceName': 'monospace',\n 'textLineSpacing': 1,\n 'textHorizontalAlignment': 'right',\n 'textDx': 15\n },\n 'boxStyle': {\n 'padding': [6, 2],\n 'symbol': {\n 'markerType': 'square',\n 'markerFill': '#fff',\n 'markerFillOpacity': 0.9,\n 'markerLineColor': '#b4b3b3'\n }\n }\n },\n 'clearButtonSymbol': [{\n 'markerType': 'square',\n 'markerFill': '#fff',\n 'markerLineColor': '#b4b3b3',\n 'markerLineWidth': 2,\n 'markerWidth': 15,\n 'markerHeight': 15,\n 'markerDx': 20\n }, {\n 'markerType': 'x',\n 'markerWidth': 10,\n 'markerHeight': 10,\n 'markerDx': 20\n }]\n};\n\nvar DistanceTool = function (_DrawTool) {\n inherits(DistanceTool, _DrawTool);\n\n function DistanceTool(options) {\n classCallCheck(this, DistanceTool);\n\n var _this = possibleConstructorReturn(this, _DrawTool.call(this, options));\n\n _this.on('enable', _this._afterEnable, _this).on('disable', _this._afterDisable, _this);\n _this._measureLayers = [];\n return _this;\n }\n\n DistanceTool.prototype.clear = function clear() {\n if (isArrayHasData(this._measureLayers)) {\n for (var i = 0; i < this._measureLayers.length; i++) {\n this._measureLayers[i].remove();\n }\n }\n delete this._lastMeasure;\n delete this._lastVertex;\n this._measureLayers = [];\n return this;\n };\n\n DistanceTool.prototype.getMeasureLayers = function getMeasureLayers() {\n return this._measureLayers;\n };\n\n DistanceTool.prototype.getLastMeasure = function getLastMeasure() {\n if (!this._lastMeasure) {\n return 0;\n }\n return this._lastMeasure;\n };\n\n DistanceTool.prototype._measure = function _measure(toMeasure) {\n var map = this.getMap();\n var length = void 0;\n if (toMeasure instanceof Geometry) {\n length = map.computeGeometryLength(toMeasure);\n } else if (Array.isArray(toMeasure)) {\n length = map.getProjection().measureLength(toMeasure);\n }\n this._lastMeasure = length;\n var units = void 0;\n if (this.options['language'] === 'zh-CN') {\n units = [' 米', ' 公里', ' 英尺', ' 英里'];\n } else {\n units = [' m', ' km', ' feet', ' mile'];\n }\n var content = '';\n if (this.options['metric']) {\n content += length < 1000 ? length.toFixed(0) + units[0] : (length / 1000).toFixed(2) + units[1];\n }\n if (this.options['imperial']) {\n length *= 3.2808399;\n if (content.length > 0) {\n content += '\\n';\n }\n content += length < 5280 ? length.toFixed(0) + units[2] : (length / 5280).toFixed(2) + units[3];\n }\n return content;\n };\n\n DistanceTool.prototype._registerMeasureEvents = function _registerMeasureEvents() {\n this.on('drawstart', this._msOnDrawStart, this).on('drawvertex', this._msOnDrawVertex, this).on('mousemove', this._msOnMouseMove, this).on('drawend', this._msOnDrawEnd, this);\n };\n\n DistanceTool.prototype._afterEnable = function _afterEnable() {\n this._registerMeasureEvents();\n };\n\n DistanceTool.prototype._afterDisable = function _afterDisable() {\n this.off('drawstart', this._msOnDrawStart, this).off('drawvertex', this._msOnDrawVertex, this).off('mousemove', this._msOnMouseMove, this).off('drawend', this._msOnDrawEnd, this);\n };\n\n DistanceTool.prototype._msOnDrawStart = function _msOnDrawStart(param) {\n var map = this.getMap();\n var uid = UID();\n var layerId = 'distancetool_' + uid;\n var markerLayerId = 'distancetool_markers_' + uid;\n if (!map.getLayer(layerId)) {\n this._measureLineLayer = new VectorLayer(layerId).addTo(map);\n this._measureMarkerLayer = new VectorLayer(markerLayerId).addTo(map);\n } else {\n this._measureLineLayer = map.getLayer(layerId);\n this._measureMarkerLayer = map.getLayer(markerLayerId);\n }\n this._measureLayers.push(this._measureLineLayer);\n this._measureLayers.push(this._measureMarkerLayer);\n\n new Marker(param['coordinate'], {\n 'symbol': this.options['vertexSymbol']\n }).addTo(this._measureMarkerLayer);\n var content = this.options['language'] === 'zh-CN' ? '起点' : 'start';\n var startLabel = new Label(content, param['coordinate'], this.options['labelOptions']);\n this._measureMarkerLayer.addGeometry(startLabel);\n };\n\n DistanceTool.prototype._msOnMouseMove = function _msOnMouseMove(param) {\n var ms = this._measure(this._msGetCoordsToMeasure(param));\n if (!this._tailMarker) {\n var symbol = extendSymbol(this.options['vertexSymbol']);\n symbol['markerWidth'] /= 2;\n symbol['markerHeight'] /= 2;\n this._tailMarker = new Marker(param['coordinate'], {\n 'symbol': symbol\n }).addTo(this._measureMarkerLayer);\n this._tailLabel = new Label(ms, param['coordinate'], this.options['labelOptions']).addTo(this._measureMarkerLayer);\n }\n this._tailMarker.setCoordinates(param['coordinate']);\n this._tailLabel.setContent(ms);\n this._tailLabel.setCoordinates(param['coordinate']);\n };\n\n DistanceTool.prototype._msGetCoordsToMeasure = function _msGetCoordsToMeasure(param) {\n return param['geometry'].getCoordinates().concat([param['coordinate']]);\n };\n\n DistanceTool.prototype._msOnDrawVertex = function _msOnDrawVertex(param) {\n var geometry = param['geometry'];\n\n new Marker(param['coordinate'], {\n 'symbol': this.options['vertexSymbol']\n }).addTo(this._measureMarkerLayer);\n var length = this._measure(geometry);\n var vertexLabel = new Label(length, param['coordinate'], this.options['labelOptions']);\n this._measureMarkerLayer.addGeometry(vertexLabel);\n this._lastVertex = vertexLabel;\n };\n\n DistanceTool.prototype._msOnDrawEnd = function _msOnDrawEnd(param) {\n this._clearTailMarker();\n var size = this._lastVertex.getSize();\n if (!size) {\n size = new Size(10, 10);\n }\n this._addClearMarker(this._lastVertex.getCoordinates(), size['width']);\n var geo = param['geometry'].copy();\n geo.addTo(this._measureLineLayer);\n this._lastMeasure = geo.getLength();\n };\n\n DistanceTool.prototype._addClearMarker = function _addClearMarker(coordinates, dx) {\n var symbol = this.options['clearButtonSymbol'];\n var dxSymbol = {\n 'markerDx': (symbol['markerDx'] || 0) + dx,\n 'textDx': (symbol['textDx'] || 0) + dx\n };\n if (Array.isArray(symbol)) {\n dxSymbol = symbol.map(function (s) {\n if (s) {\n return {\n 'markerDx': (s['markerDx'] || 0) + dx,\n 'textDx': (s['textDx'] || 0) + dx\n };\n }\n return null;\n });\n }\n symbol = extendSymbol(symbol, dxSymbol);\n var endMarker = new Marker(coordinates, {\n 'symbol': symbol\n });\n var measureLineLayer = this._measureLineLayer,\n measureMarkerLayer = this._measureMarkerLayer;\n endMarker.on('click', function () {\n measureLineLayer.remove();\n measureMarkerLayer.remove();\n\n return false;\n }, this);\n endMarker.addTo(this._measureMarkerLayer);\n };\n\n DistanceTool.prototype._clearTailMarker = function _clearTailMarker() {\n if (this._tailMarker) {\n this._tailMarker.remove();\n delete this._tailMarker;\n }\n if (this._tailLabel) {\n this._tailLabel.remove();\n delete this._tailLabel;\n }\n };\n\n return DistanceTool;\n}(DrawTool);\n\nDistanceTool.mergeOptions(options$17);\n\nvar options$18 = {\n 'mode': 'Polygon',\n 'symbol': {\n 'lineColor': '#000000',\n 'lineWidth': 2,\n 'lineOpacity': 1,\n 'lineDasharray': '',\n 'polygonFill': '#ffffff',\n 'polygonOpacity': 0.5\n }\n};\n\nvar AreaTool = function (_DistanceTool) {\n inherits(AreaTool, _DistanceTool);\n\n function AreaTool(options) {\n classCallCheck(this, AreaTool);\n\n var _this = possibleConstructorReturn(this, _DistanceTool.call(this, options));\n\n _this.on('enable', _this._afterEnable, _this).on('disable', _this._afterDisable, _this);\n _this._measureLayers = [];\n return _this;\n }\n\n AreaTool.prototype._measure = function _measure(toMeasure) {\n var map = this.getMap();\n var area = void 0;\n if (toMeasure instanceof Geometry) {\n area = map.computeGeometryArea(toMeasure);\n } else if (Array.isArray(toMeasure)) {\n area = map.getProjection().measureArea(toMeasure);\n }\n this._lastMeasure = area;\n var units = void 0;\n if (this.options['language'] === 'zh-CN') {\n units = [' 平方米', ' 平方公里', ' 平方英尺', ' 平方英里'];\n } else {\n units = [' sq.m', ' sq.km', ' sq.ft', ' sq.mi'];\n }\n var content = '';\n if (this.options['metric']) {\n content += area < 1E6 ? area.toFixed(0) + units[0] : (area / 1E6).toFixed(2) + units[1];\n }\n if (this.options['imperial']) {\n area *= 3.2808399;\n if (content.length > 0) {\n content += '\\n';\n }\n var sqmi = 5280 * 5280;\n content += area < sqmi ? area.toFixed(0) + units[2] : (area / sqmi).toFixed(2) + units[3];\n }\n return content;\n };\n\n AreaTool.prototype._msGetCoordsToMeasure = function _msGetCoordsToMeasure(param) {\n return param['geometry'].getShell().concat([param['coordinate']]);\n };\n\n AreaTool.prototype._msOnDrawVertex = function _msOnDrawVertex(param) {\n var vertexMarker = new Marker(param['coordinate'], {\n 'symbol': this.options['vertexSymbol']\n }).addTo(this._measureMarkerLayer);\n this._measure(param['geometry']);\n this._lastVertex = vertexMarker;\n };\n\n AreaTool.prototype._msOnDrawEnd = function _msOnDrawEnd(param) {\n this._clearTailMarker();\n\n var ms = this._measure(param['geometry']);\n var endLabel = new Label(ms, param['coordinate'], this.options['labelOptions']).addTo(this._measureMarkerLayer);\n var size = endLabel.getSize();\n if (!size) {\n size = new Size(10, 10);\n }\n this._addClearMarker(param['coordinate'], size['width']);\n var geo = param['geometry'].copy();\n geo.addTo(this._measureLineLayer);\n this._lastMeasure = geo.getArea();\n };\n\n return AreaTool;\n}(DistanceTool);\n\nAreaTool.mergeOptions(options$18);\n\nDrawTool.registerMode('circle', {\n 'clickLimit': 2,\n 'action': ['click', 'mousemove', 'click'],\n 'create': function create(coordinate) {\n return new Circle(coordinate[0], 0);\n },\n 'update': function update(path, geometry) {\n var map = geometry.getMap();\n var radius = map.computeLength(geometry.getCenter(), path[path.length - 1]);\n geometry.setRadius(radius);\n },\n 'generate': function generate(geometry) {\n return geometry;\n }\n});\n\nDrawTool.registerMode('freeHandCircle', {\n 'action': ['mousedown', 'mousemove', 'mouseup'],\n 'create': function create(coordinate) {\n return new Circle(coordinate[0], 0);\n },\n 'update': function update(path, geometry) {\n var map = geometry.getMap();\n var radius = map.computeLength(geometry.getCenter(), path[path.length - 1]);\n geometry.setRadius(radius);\n },\n 'generate': function generate(geometry) {\n return geometry;\n }\n});\n\nDrawTool.registerMode('ellipse', {\n 'clickLimit': 2,\n 'action': ['click', 'mousemove', 'click'],\n 'create': function create(coordinates) {\n return new Ellipse(coordinates[0], 0, 0);\n },\n 'update': function update(path, geometry) {\n var map = geometry.getMap();\n var center = geometry.getCenter();\n var rx = map.computeLength(center, new Coordinate({\n x: path[path.length - 1].x,\n y: center.y\n }));\n var ry = map.computeLength(center, new Coordinate({\n x: center.x,\n y: path[path.length - 1].y\n }));\n geometry.setWidth(rx * 2);\n geometry.setHeight(ry * 2);\n },\n 'generate': function generate(geometry) {\n return geometry;\n }\n});\n\nDrawTool.registerMode('freeHandEllipse', {\n 'action': ['mousedown', 'mousemove', 'mouseup'],\n 'create': function create(coordinates) {\n return new Ellipse(coordinates[0], 0, 0);\n },\n 'update': function update(path, geometry) {\n var map = geometry.getMap();\n var center = geometry.getCenter();\n var rx = map.computeLength(center, new Coordinate({\n x: path[path.length - 1].x,\n y: center.y\n }));\n var ry = map.computeLength(center, new Coordinate({\n x: center.x,\n y: path[path.length - 1].y\n }));\n geometry.setWidth(rx * 2);\n geometry.setHeight(ry * 2);\n },\n 'generate': function generate(geometry) {\n return geometry;\n }\n});\n\nDrawTool.registerMode('rectangle', {\n 'clickLimit': 2,\n 'action': ['click', 'mousemove', 'click'],\n 'create': function create(coordinates) {\n var rect = new Polygon([]);\n rect._firstClick = coordinates[0];\n return rect;\n },\n 'update': function update(coordinates, geometry, param) {\n var map = geometry.getMap();\n var containerPoint = param['containerPoint'];\n var firstClick = map.coordToContainerPoint(geometry._firstClick);\n var ring = [[firstClick.x, firstClick.y], [containerPoint.x, firstClick.y], [containerPoint.x, containerPoint.y], [firstClick.x, containerPoint.y]];\n geometry.setCoordinates(ring.map(function (c) {\n return map.containerPointToCoord(new Point(c));\n }));\n },\n 'generate': function generate(geometry) {\n return geometry;\n }\n});\n\nDrawTool.registerMode('freeHandRectangle', {\n 'action': ['mousedown', 'mousemove', 'mouseup'],\n 'create': function create(coordinates) {\n var rect = new Polygon([]);\n rect._firstClick = coordinates[0];\n return rect;\n },\n 'update': function update(coordinates, geometry) {\n var firstClick = geometry._firstClick;\n var ring = [[firstClick.x, firstClick.y], [coordinates[0].x, firstClick.y], [coordinates[0].x, coordinates[0].y], [firstClick.x, coordinates[0].y]];\n geometry.setCoordinates(ring);\n },\n 'generate': function generate(geometry) {\n return geometry;\n }\n});\n\nDrawTool.registerMode('point', {\n 'clickLimit': 1,\n 'action': ['click'],\n 'create': function create(coordinate) {\n return new Marker(coordinate[0]);\n },\n 'generate': function generate(geometry) {\n return geometry;\n }\n});\n\nDrawTool.registerMode('polygon', {\n 'action': ['click', 'mousemove', 'dblclick'],\n 'create': function create(path) {\n return new LineString(path);\n },\n 'update': function update(path, geometry) {\n var symbol = geometry.getSymbol();\n geometry.setCoordinates(path);\n\n var layer = geometry.getLayer();\n if (layer) {\n var polygon = layer.getGeometryById('polygon');\n if (!polygon && path.length >= 3) {\n polygon = new Polygon([path], {\n 'id': 'polygon'\n });\n if (symbol) {\n var pSymbol = extendSymbol(symbol, {\n 'lineOpacity': 0\n });\n polygon.setSymbol(pSymbol);\n }\n polygon.addTo(layer);\n }\n if (polygon) {\n polygon.setCoordinates(path);\n }\n }\n },\n 'generate': function generate(geometry) {\n return new Polygon(geometry.getCoordinates(), {\n 'symbol': geometry.getSymbol()\n });\n }\n});\n\nDrawTool.registerMode('freeHandPolygon', {\n 'action': ['mousedown', 'mousemove', 'mouseup'],\n 'create': function create(path) {\n return new LineString(path);\n },\n 'update': function update(path, geometry) {\n var coordinates = geometry.getCoordinates();\n var symbol = geometry.getSymbol();\n geometry.setCoordinates(coordinates.concat(path));\n\n var layer = geometry.getLayer();\n if (layer) {\n var polygon = layer.getGeometryById('polygon');\n if (!polygon && path.length >= 3) {\n polygon = new Polygon([path], {\n 'id': 'polygon'\n });\n if (symbol) {\n var pSymbol = extendSymbol(symbol, {\n 'lineOpacity': 0\n });\n polygon.setSymbol(pSymbol);\n }\n polygon.addTo(layer);\n }\n if (polygon) {\n polygon.setCoordinates(path);\n }\n }\n },\n 'generate': function generate(geometry) {\n return new Polygon(geometry.getCoordinates(), {\n 'symbol': geometry.getSymbol()\n });\n }\n});\n\nDrawTool.registerMode('linestring', {\n 'action': ['click', 'mousemove', 'dblclick'],\n 'create': function create(path) {\n return new LineString(path);\n },\n 'update': function update(path, geometry) {\n geometry.setCoordinates(path);\n },\n 'generate': function generate(geometry) {\n return geometry;\n }\n});\n\nDrawTool.registerMode('freeHandLinestring', {\n 'action': ['mousedown', 'mousemove', 'mouseup'],\n 'create': function create(path) {\n return new LineString(path);\n },\n 'update': function update(path, geometry) {\n var coordinates = geometry.getCoordinates();\n geometry.setCoordinates(coordinates.concat(path));\n },\n 'generate': function generate(geometry) {\n return geometry;\n }\n});\n\nDrawTool.registerMode('arccurve', {\n 'action': ['click', 'mousemove', 'dblclick'],\n 'create': function create(path) {\n return new ArcCurve(path);\n },\n 'update': function update(path, geometry) {\n geometry.setCoordinates(path);\n },\n 'generate': function generate(geometry) {\n return geometry;\n }\n});\n\nDrawTool.registerMode('quadbeziercurve', {\n 'action': ['click', 'mousemove', 'dblclick'],\n 'create': function create(path) {\n return new QuadBezierCurve(path);\n },\n 'update': function update(path, geometry) {\n geometry.setCoordinates(path);\n },\n 'generate': function generate(geometry) {\n return geometry;\n }\n});\n\nDrawTool.registerMode('cubicbeziercurve', {\n 'action': ['click', 'mousemove', 'dblclick'],\n 'create': function create(path) {\n return new CubicBezierCurve(path);\n },\n 'update': function update(path, geometry) {\n geometry.setCoordinates(path);\n },\n 'generate': function generate(geometry) {\n return geometry;\n }\n});\n\nDrawTool.registerMode('boxZoom', {\n 'action': ['mousedown', 'mousemove', 'mouseup'],\n 'create': function create(coordinates) {\n var marker = new Marker(coordinates[0]);\n marker._firstClick = coordinates[0];\n return marker;\n },\n 'update': function update(path, geometry, param) {\n var map = geometry.getMap();\n var p1 = map.coordToContainerPoint(geometry._firstClick),\n p2 = param['containerPoint'];\n var coords = map.containerPointToCoordinate(new Coordinate(Math.min(p1.x, p2.x), Math.min(p1.y, p2.y)));\n geometry.setCoordinates(coords).updateSymbol({\n markerWidth: Math.abs(p1.x - p2.x),\n markerHeight: Math.abs(p1.y - p2.y)\n });\n },\n 'generate': function generate(geometry) {\n return geometry;\n }\n});\n\nfunction parse(arcConf) {\n var tileInfo = arcConf['tileInfo'],\n tileSize = [tileInfo['cols'], tileInfo['rows']],\n resolutions = [],\n lods = tileInfo['lods'];\n for (var i = 0, len = lods.length; i < len; i++) {\n resolutions.push(lods[i]['resolution']);\n }\n var fullExtent = arcConf['fullExtent'],\n origin = tileInfo['origin'],\n tileSystem = [1, -1, origin['x'], origin['y']];\n delete fullExtent['spatialReference'];\n return {\n 'spatialReference': {\n 'resolutions': resolutions,\n 'fullExtent': fullExtent\n },\n 'tileSystem': tileSystem,\n 'tileSize': tileSize\n };\n}\n\nSpatialReference.loadArcgis = function (url, cb) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : { 'jsonp': true };\n\n if (isString(url) && url.substring(0, 1) !== '{') {\n Ajax.getJSON(url, function (err, json) {\n if (err) {\n cb(err);\n return;\n }\n var spatialRef = parse(json);\n cb(null, spatialRef);\n }, options);\n } else {\n if (isString(url)) {\n url = parseJSON(url);\n }\n var spatialRef = parse(url);\n cb(null, spatialRef);\n }\n return this;\n};\n\nvar options$19 = {\n 'eventsPropagation': false,\n 'eventsToStop': null,\n 'dx': 0,\n 'dy': 0,\n 'autoPan': false,\n 'autoPanDuration': 600,\n 'single': true,\n 'animation': 'scale',\n 'animationOnHide': true,\n 'animationDuration': 500\n};\n\nvar UIComponent = function (_Eventable) {\n inherits(UIComponent, _Eventable);\n\n function UIComponent(options) {\n classCallCheck(this, UIComponent);\n return possibleConstructorReturn(this, _Eventable.call(this, options));\n }\n\n UIComponent.prototype.addTo = function addTo(owner) {\n this._owner = owner;\n\n this._switchEvents('on');\n if (this.onAdd) {\n this.onAdd();\n }\n\n this.fire('add');\n return this;\n };\n\n UIComponent.prototype.getMap = function getMap() {\n if (!this._owner) {\n return null;\n }\n\n if (this._owner.getBaseLayer) {\n return this._owner;\n }\n return this._owner.getMap();\n };\n\n UIComponent.prototype.show = function show(coordinate) {\n var map = this.getMap();\n if (!map) {\n return this;\n }\n\n if (!this._mapEventsOn) {\n this._switchMapEvents('on');\n }\n\n coordinate = coordinate || this._coordinate || this._owner.getCenter();\n\n var visible = this.isVisible();\n\n this.fire('showstart');\n var container = this._getUIContainer();\n this._coordinate = coordinate;\n this._removePrevDOM();\n var dom = this.__uiDOM = this.buildOn(map);\n dom['eventsPropagation'] = this.options['eventsPropagation'];\n\n if (!dom) {\n this.fire('showend');\n return this;\n }\n\n this._measureSize(dom);\n\n if (this._singleton()) {\n map[this._uiDomKey()] = dom;\n }\n\n this._setPosition();\n\n dom.style[TRANSITION] = null;\n\n container.appendChild(dom);\n\n var anim = this._getAnimation();\n\n if (visible) {\n anim.ok = false;\n }\n\n if (anim.ok) {\n if (anim.fade) {\n dom.style.opacity = 0;\n }\n if (anim.scale) {\n if (this.getTransformOrigin) {\n var origin = this.getTransformOrigin();\n dom.style[TRANSFORMORIGIN] = origin;\n }\n dom.style[TRANSFORM] = toCSSTranslate(this._pos) + ' scale(0)';\n }\n }\n\n dom.style.display = '';\n\n if (this.options['eventsToStop']) {\n on(dom, this.options['eventsToStop'], stopPropagation);\n }\n\n if (this.options['autoPan']) {\n this._autoPan();\n }\n\n var transition = anim.transition;\n if (anim.ok && transition) {\n dom.offsetHeight;\n\n if (transition) {\n dom.style[TRANSITION] = transition;\n }\n if (anim.fade) {\n dom.style.opacity = 1;\n }\n if (anim.scale) {\n dom.style[TRANSFORM] = toCSSTranslate(this._pos) + ' scale(1)';\n }\n }\n\n this.fire('showend');\n return this;\n };\n\n UIComponent.prototype.hide = function hide() {\n if (!this.getDOM() || !this.getMap()) {\n return this;\n }\n\n var anim = this._getAnimation(),\n dom = this.getDOM();\n if (!this.options['animationOnHide']) {\n anim.ok = false;\n }\n if (!anim.ok) {\n dom.style.display = 'none';\n } else {\n dom.offsetHeight;\n\n dom.style[TRANSITION] = anim.transition;\n setTimeout(function () {\n dom.style.display = 'none';\n }, this.options['animationDuration']);\n }\n if (anim.fade) {\n dom.style.opacity = 0;\n }\n if (anim.scale) {\n dom.style[TRANSFORM] = toCSSTranslate(this._pos) + ' scale(0)';\n }\n\n this.fire('hide');\n return this;\n };\n\n UIComponent.prototype.isVisible = function isVisible() {\n var dom = this.getDOM();\n return this.getMap() && dom && dom.parentNode && dom.style.display !== 'none';\n };\n\n UIComponent.prototype.remove = function remove() {\n delete this._mapEventsOn;\n if (!this._owner) {\n return this;\n }\n this.hide();\n this._switchEvents('off');\n if (this.onRemove) {\n this.onRemove();\n }\n if (!this._singleton() && this.__uiDOM) {\n this._removePrevDOM();\n }\n delete this._owner;\n\n this.fire('remove');\n return this;\n };\n\n UIComponent.prototype.getSize = function getSize() {\n if (this._size) {\n return this._size.copy();\n } else {\n return null;\n }\n };\n\n UIComponent.prototype.getOwner = function getOwner() {\n return this._owner;\n };\n\n UIComponent.prototype.getDOM = function getDOM() {\n return this.__uiDOM;\n };\n\n UIComponent.prototype.getPosition = function getPosition() {\n if (!this.getMap()) {\n return null;\n }\n var p = this._getViewPoint()._round();\n if (this.getOffset) {\n var o = this.getOffset()._round();\n if (o) {\n p._add(o);\n }\n }\n return p;\n };\n\n UIComponent.prototype._getAnimation = function _getAnimation() {\n var anim = {\n 'fade': false,\n 'scale': false\n };\n var animations = this.options['animation'] ? this.options['animation'].split(',') : [];\n for (var i = 0; i < animations.length; i++) {\n var trimed = trim(animations[i]);\n if (trimed === 'fade') {\n anim.fade = true;\n } else if (trimed === 'scale') {\n anim.scale = true;\n }\n }\n var transition = null;\n if (anim.fade) {\n transition = 'opacity ' + this.options['animationDuration'] + 'ms';\n }\n if (anim.scale) {\n transition = transition ? transition + ',' : '';\n transition += TRANSFORM + ' ' + this.options['animationDuration'] + 'ms';\n }\n anim.transition = transition;\n anim.ok = transition !== null;\n return anim;\n };\n\n UIComponent.prototype._getViewPoint = function _getViewPoint() {\n return this.getMap().coordToViewPoint(this._coordinate)._add(this.options['dx'], this.options['dy']);\n };\n\n UIComponent.prototype._autoPan = function _autoPan() {\n var map = this.getMap(),\n dom = this.getDOM();\n if (map.isMoving()) {\n return;\n }\n var point = this._pos;\n var mapSize = map.getSize(),\n mapWidth = mapSize['width'],\n mapHeight = mapSize['height'];\n\n var containerPoint = map.viewPointToContainerPoint(point);\n var clientWidth = parseInt(dom.clientWidth),\n clientHeight = parseInt(dom.clientHeight);\n var left = 0,\n top = 0;\n if (containerPoint.x < 0) {\n left = -(containerPoint.x - clientWidth / 2);\n } else if (containerPoint.x + clientWidth - 35 > mapWidth) {\n left = mapWidth - (containerPoint.x + clientWidth * 3 / 2);\n }\n if (containerPoint.y < 0) {\n top = -containerPoint.y + 50;\n } else if (containerPoint.y > mapHeight) {\n top = mapHeight - containerPoint.y - clientHeight - 30;\n }\n if (top !== 0 || left !== 0) {\n map.panBy(new Point(left, top), { 'duration': this.options['autoPanDuration'] });\n }\n };\n\n UIComponent.prototype._measureSize = function _measureSize(dom) {\n var container = this._getUIContainer();\n dom.style.position = 'absolute';\n dom.style.left = -99999 + 'px';\n var anchor = dom.style.bottom ? 'bottom' : 'top';\n dom.style[anchor] = -99999 + 'px';\n dom.style.display = '';\n container.appendChild(dom);\n this._size = new Size(dom.clientWidth, dom.clientHeight);\n dom.style.display = 'none';\n dom.style.left = '0px';\n dom.style[anchor] = '0px';\n return this._size;\n };\n\n UIComponent.prototype._removePrevDOM = function _removePrevDOM() {\n if (this.onDomRemove) {\n this.onDomRemove();\n }\n var eventsToStop = this.options['eventsToStop'];\n if (this._singleton()) {\n var map = this.getMap(),\n key = this._uiDomKey();\n if (map[key]) {\n if (eventsToStop) {\n off(map[key], eventsToStop, stopPropagation);\n }\n removeDomNode(map[key]);\n delete map[key];\n }\n delete this.__uiDOM;\n } else if (this.__uiDOM) {\n if (eventsToStop) {\n off(this.__uiDOM, eventsToStop, stopPropagation);\n }\n removeDomNode(this.__uiDOM);\n delete this.__uiDOM;\n }\n };\n\n UIComponent.prototype._uiDomKey = function _uiDomKey() {\n return '__ui_' + this._getClassName();\n };\n\n UIComponent.prototype._singleton = function _singleton() {\n return this.options['single'];\n };\n\n UIComponent.prototype._getUIContainer = function _getUIContainer() {\n return this.getMap()._panels['ui'];\n };\n\n UIComponent.prototype._getClassName = function _getClassName() {\n return 'UIComponent';\n };\n\n UIComponent.prototype._switchMapEvents = function _switchMapEvents(to) {\n var map = this.getMap();\n if (!map) {\n return;\n }\n this._mapEventsOn = to === 'on';\n var events = this._getDefaultEvents();\n if (this.getEvents) {\n extend(events, this.getEvents());\n }\n if (events) {\n for (var p in events) {\n if (events.hasOwnProperty(p)) {\n map[to](p, events[p], this);\n }\n }\n }\n };\n\n UIComponent.prototype._switchEvents = function _switchEvents(to) {\n this._switchMapEvents(to);\n var ownerEvents = this._getOwnerEvents();\n if (this._owner) {\n for (var p in ownerEvents) {\n if (ownerEvents.hasOwnProperty(p)) {\n this._owner[to](p, ownerEvents[p], this);\n }\n }\n }\n };\n\n UIComponent.prototype._getDefaultEvents = function _getDefaultEvents() {\n return {\n 'zooming rotate pitch': this.onEvent,\n 'zoomend': this.onZoomEnd,\n 'moving': this.onMoving\n };\n };\n\n UIComponent.prototype._getOwnerEvents = function _getOwnerEvents() {\n var events = {};\n if (this._owner && this._owner instanceof Geometry) {\n events.positionchange = this.onGeometryPositionChange;\n }\n if (this.getOwnerEvents) {\n extend(events, this.getOwnerEvents());\n }\n return events;\n };\n\n UIComponent.prototype.onGeometryPositionChange = function onGeometryPositionChange(param) {\n if (this._owner && this.isVisible()) {\n this.show(param['target'].getCenter());\n }\n };\n\n UIComponent.prototype.onMoving = function onMoving() {\n if (this.isVisible() && this.getMap().isTransforming()) {\n this._updatePosition();\n }\n };\n\n UIComponent.prototype.onEvent = function onEvent() {\n if (this.isVisible()) {\n this._updatePosition();\n }\n };\n\n UIComponent.prototype.onZoomEnd = function onZoomEnd() {\n if (this.isVisible()) {\n this._setPosition();\n }\n };\n\n UIComponent.prototype._updatePosition = function _updatePosition() {\n var renderer = this.getMap()._getRenderer();\n renderer.callInNextFrame(this._setPosition.bind(this));\n };\n\n UIComponent.prototype._setPosition = function _setPosition() {\n var dom = this.getDOM(),\n p = this.getPosition();\n this._pos = p;\n dom.style[TRANSITION] = null;\n dom.style[TRANSFORM] = toCSSTranslate(p) + ' scale(1)';\n };\n\n return UIComponent;\n}(Eventable(Class));\n\nUIComponent.mergeOptions(options$19);\n\nfunction toCSSTranslate(p) {\n if (!p) {\n return '';\n }\n if (Browser$1.any3d) {\n return 'translate3d(' + p.x + 'px,' + p.y + 'px, 0px)';\n } else {\n return 'translate(' + p.x + 'px,' + p.y + 'px)';\n }\n}\n\nvar options$20 = {\n 'eventsPropagation': true,\n 'draggable': false,\n 'single': false,\n 'content': null\n};\n\nvar domEvents = 'mousedown ' + 'mouseup ' + 'mouseenter ' + 'mouseover ' + 'mouseout ' + 'mousemove ' + 'click ' + 'dblclick ' + 'contextmenu ' + 'keypress ' + 'touchstart ' + 'touchmove ' + 'touchend';\n\nvar UIMarker = function (_Handlerable) {\n inherits(UIMarker, _Handlerable);\n\n function UIMarker(coordinate, options) {\n classCallCheck(this, UIMarker);\n\n var _this = possibleConstructorReturn(this, _Handlerable.call(this, options));\n\n _this._markerCoord = new Coordinate(coordinate);\n return _this;\n }\n\n UIMarker.prototype._getClassName = function _getClassName() {\n return 'UIMarker';\n };\n\n UIMarker.prototype.setCoordinates = function setCoordinates(coordinates) {\n this._markerCoord = coordinates;\n\n this.fire('positionchange');\n if (this.isVisible()) {\n this._coordinate = this._markerCoord;\n this._setPosition();\n }\n return this;\n };\n\n UIMarker.prototype.getCoordinates = function getCoordinates() {\n return this._markerCoord;\n };\n\n UIMarker.prototype.setContent = function setContent(content) {\n var old = this.options['content'];\n this.options['content'] = content;\n\n this.fire('contentchange', {\n 'old': old,\n 'new': content\n });\n if (this.isVisible()) {\n this.show();\n }\n return this;\n };\n\n UIMarker.prototype.getContent = function getContent() {\n return this.options['content'];\n };\n\n UIMarker.prototype.onAdd = function onAdd() {\n this.show();\n };\n\n UIMarker.prototype.show = function show() {\n return _Handlerable.prototype.show.call(this, this._markerCoord);\n };\n\n UIMarker.prototype.flash = function flash$$1(interval, count, cb, context) {\n return flash.call(this, interval, count, cb, context);\n };\n\n UIMarker.prototype.buildOn = function buildOn() {\n var dom = void 0;\n if (isString(this.options['content'])) {\n dom = createEl('div');\n dom.innerHTML = this.options['content'];\n } else {\n dom = this.options['content'];\n }\n this._registerDOMEvents(dom);\n return dom;\n };\n\n UIMarker.prototype.getOffset = function getOffset() {\n var size = this.getSize();\n return new Point(-size.width / 2, -size.height / 2);\n };\n\n UIMarker.prototype.getTransformOrigin = function getTransformOrigin() {\n return 'center center';\n };\n\n UIMarker.prototype.onDomRemove = function onDomRemove() {\n var dom = this.getDOM();\n this._removeDOMEvents(dom);\n };\n\n UIMarker.prototype.isDragging = function isDragging() {\n if (this['draggable']) {\n return this['draggable'].isDragging();\n }\n return false;\n };\n\n UIMarker.prototype._registerDOMEvents = function _registerDOMEvents(dom) {\n on(dom, domEvents, this._onDomEvents, this);\n };\n\n UIMarker.prototype._onDomEvents = function _onDomEvents(e) {\n var event = this.getMap()._parseEvent(e, e.type);\n this.fire(e.type, event);\n };\n\n UIMarker.prototype._removeDOMEvents = function _removeDOMEvents(dom) {\n off(dom, domEvents, this._onDomEvents, this);\n };\n\n UIMarker.prototype._getConnectPoints = function _getConnectPoints() {\n var map = this.getMap();\n var containerPoint = map.coordToContainerPoint(this.getCoordinates());\n var size = this.getSize(),\n width = size.width,\n height = size.height;\n var anchors = [map.containerPointToCoordinate(containerPoint.add(-width / 2, 0)), map.containerPointToCoordinate(containerPoint.add(width / 2, 0)), map.containerPointToCoordinate(containerPoint.add(0, height / 2)), map.containerPointToCoordinate(containerPoint.add(0, -height / 2))];\n return anchors;\n };\n\n return UIMarker;\n}(Handlerable(UIComponent));\n\nUIMarker.mergeOptions(options$20);\n\nvar EVENTS$1 = Browser$1.touch ? 'touchstart mousedown' : 'mousedown';\n\nvar UIMarkerDragHandler = function (_Handler) {\n inherits(UIMarkerDragHandler, _Handler);\n\n function UIMarkerDragHandler(target) {\n classCallCheck(this, UIMarkerDragHandler);\n return possibleConstructorReturn(this, _Handler.call(this, target));\n }\n\n UIMarkerDragHandler.prototype.addHooks = function addHooks() {\n this.target.on(EVENTS$1, this._startDrag, this);\n };\n\n UIMarkerDragHandler.prototype.removeHooks = function removeHooks() {\n this.target.off(EVENTS$1, this._startDrag, this);\n };\n\n UIMarkerDragHandler.prototype._startDrag = function _startDrag(param) {\n var domEvent = param['domEvent'];\n if (domEvent.touches && domEvent.touches.length > 1 || domEvent.button === 2) {\n return;\n }\n if (this.isDragging()) {\n return;\n }\n this.target.on('click', this._endDrag, this);\n this._lastCoord = param['coordinate'];\n this._lastPoint = param['containerPoint'];\n\n this._prepareDragHandler();\n this._dragHandler.onMouseDown(param['domEvent']);\n\n this.target.fire('dragstart', param);\n };\n\n UIMarkerDragHandler.prototype._prepareDragHandler = function _prepareDragHandler() {\n this._dragHandler = new DragHandler(this.target.getDOM(), {\n 'cancelOn': this._cancelOn.bind(this),\n 'ignoreMouseleave': true\n });\n this._dragHandler.on('mousedown', this._onMouseDown, this);\n this._dragHandler.on('dragging', this._dragging, this);\n this._dragHandler.on('mouseup', this._endDrag, this);\n this._dragHandler.enable();\n };\n\n UIMarkerDragHandler.prototype._cancelOn = function _cancelOn(domEvent) {\n var target = domEvent.srcElement || domEvent.target,\n tagName = target.tagName.toLowerCase();\n if (tagName === 'button' || tagName === 'input' || tagName === 'select' || tagName === 'option' || tagName === 'textarea') {\n return true;\n }\n return false;\n };\n\n UIMarkerDragHandler.prototype._onMouseDown = function _onMouseDown(param) {\n stopPropagation(param['domEvent']);\n };\n\n UIMarkerDragHandler.prototype._dragging = function _dragging(param) {\n var target = this.target,\n map = target.getMap(),\n eventParam = map._parseEvent(param['domEvent']),\n domEvent = eventParam['domEvent'];\n if (domEvent.touches && domEvent.touches.length > 1) {\n return;\n }\n if (!this._isDragging) {\n this._isDragging = true;\n return;\n }\n\n var coord = eventParam['coordinate'],\n point = eventParam['containerPoint'];\n if (!this._lastCoord) {\n this._lastCoord = coord;\n }\n if (!this._lastPoint) {\n this._lastPoint = point;\n }\n var coordOffset = coord.sub(this._lastCoord),\n pointOffset = point.sub(this._lastPoint);\n this._lastCoord = coord;\n this._lastPoint = point;\n this.target.setCoordinates(this.target.getCoordinates().add(coordOffset));\n eventParam['coordOffset'] = coordOffset;\n eventParam['pointOffset'] = pointOffset;\n\n target.fire('dragging', eventParam);\n };\n\n UIMarkerDragHandler.prototype._endDrag = function _endDrag(param) {\n var target = this.target,\n map = target.getMap();\n if (this._dragHandler) {\n target.off('click', this._endDrag, this);\n this._dragHandler.disable();\n delete this._dragHandler;\n }\n delete this._lastCoord;\n delete this._lastPoint;\n this._isDragging = false;\n if (!map) {\n return;\n }\n var eventParam = map._parseEvent(param['domEvent']);\n\n target.fire('dragend', eventParam);\n };\n\n UIMarkerDragHandler.prototype.isDragging = function isDragging() {\n if (!this._isDragging) {\n return false;\n }\n return true;\n };\n\n return UIMarkerDragHandler;\n}(Handler$1);\n\nUIMarker.addInitHook('addHandler', 'draggable', UIMarkerDragHandler);\n\nvar options$21 = {\n 'autoPan': true,\n 'autoCloseOn': null,\n 'autoOpenOn': 'click',\n 'width': 300,\n 'minHeight': 120,\n 'custom': false,\n 'title': null,\n 'content': null\n};\n\nvar InfoWindow = function (_UIComponent) {\n inherits(InfoWindow, _UIComponent);\n\n function InfoWindow() {\n classCallCheck(this, InfoWindow);\n return possibleConstructorReturn(this, _UIComponent.apply(this, arguments));\n }\n\n InfoWindow.prototype._getClassName = function _getClassName() {\n return 'InfoWindow';\n };\n\n InfoWindow.prototype.addTo = function addTo(owner) {\n if (owner instanceof Geometry) {\n if (owner.getInfoWindow() && owner.getInfoWindow() !== this) {\n owner.removeInfoWindow();\n }\n owner._infoWindow = this;\n }\n return _UIComponent.prototype.addTo.call(this, owner);\n };\n\n InfoWindow.prototype.setContent = function setContent(content) {\n var old = this.options['content'];\n this.options['content'] = content;\n\n this.fire('contentchange', {\n 'old': old,\n 'new': content\n });\n if (this.isVisible()) {\n this.show(this._coordinate);\n }\n return this;\n };\n\n InfoWindow.prototype.getContent = function getContent() {\n return this.options['content'];\n };\n\n InfoWindow.prototype.setTitle = function setTitle(title) {\n var old = title;\n this.options['title'] = title;\n\n this.fire('contentchange', {\n 'old': old,\n 'new': title\n });\n if (this.isVisible()) {\n this.show(this._coordinate);\n }\n return this;\n };\n\n InfoWindow.prototype.getTitle = function getTitle() {\n return this.options['title'];\n };\n\n InfoWindow.prototype.buildOn = function buildOn() {\n if (this.options['custom']) {\n if (isString(this.options['content'])) {\n var _dom = createEl('div');\n _dom.innerHTML = this.options['content'];\n return _dom;\n } else {\n return this.options['content'];\n }\n }\n var dom = createEl('div');\n dom.className = 'maptalks-msgBox';\n dom.style.width = this._getWindowWidth() + 'px';\n dom.style.bottom = '0px';\n var content = '<em class=\"maptalks-ico\"></em>';\n if (this.options['title']) {\n content += '<h2>' + this.options['title'] + '</h2>';\n }\n var onClose = '\"this.parentNode.style.display=\\'none\\';return false;\"';\n content += '<a href=\"javascript:void(0);\" onclick=' + onClose + ' ontouchend=' + onClose + ' class=\"maptalks-close\"></a><div class=\"maptalks-msgContent\">' + this.options['content'] + '</div>';\n dom.innerHTML = content;\n return dom;\n };\n\n InfoWindow.prototype.getTransformOrigin = function getTransformOrigin() {\n var size = this.getSize();\n return size.width / 2 + 'px bottom';\n };\n\n InfoWindow.prototype.getOffset = function getOffset() {\n var size = this.getSize();\n var o = new Point(-size['width'] / 2, 0);\n if (!this.options['custom']) {\n o._sub(4, 12);\n }\n var owner = this.getOwner();\n if (owner instanceof Marker) {\n var painter = owner._getPainter();\n if (painter) {\n var markerSize = owner.getSize();\n var fixExtent = painter.getFixedExtent();\n o._add(fixExtent.xmax - markerSize.width / 2, fixExtent.ymin);\n }\n }\n return o;\n };\n\n InfoWindow.prototype.show = function show(coordinate) {\n if (!this.getMap()) {\n return this;\n }\n if (!this.getMap().options['enableInfoWindow']) {\n return this;\n }\n return _UIComponent.prototype.show.call(this, coordinate);\n };\n\n InfoWindow.prototype.getEvents = function getEvents() {\n if (!this.options['autoCloseOn']) {\n return null;\n }\n var events = {};\n events[this.options['autoCloseOn']] = this.hide;\n return events;\n };\n\n InfoWindow.prototype.getOwnerEvents = function getOwnerEvents() {\n var owner = this.getOwner();\n if (!this.options['autoOpenOn'] || !owner) {\n return null;\n }\n var events = {};\n events[this.options['autoOpenOn']] = this._onAutoOpen;\n return events;\n };\n\n InfoWindow.prototype._onAutoOpen = function _onAutoOpen(e) {\n var _this2 = this;\n\n var owner = this.getOwner();\n setTimeout(function () {\n if (owner instanceof Marker) {\n _this2.show(owner.getCoordinates());\n } else {\n _this2.show(e.coordinate);\n }\n }, 1);\n };\n\n InfoWindow.prototype._getWindowWidth = function _getWindowWidth() {\n var defaultWidth = 300;\n var width = this.options['width'];\n if (!width) {\n width = defaultWidth;\n }\n return width;\n };\n\n return InfoWindow;\n}(UIComponent);\n\nInfoWindow.mergeOptions(options$21);\n\nvar options$22 = {\n 'width': 0,\n 'height': 0,\n 'animation': 'fade',\n 'cssName': 'maptalks-tooltip',\n 'showTimeout': 400\n};\n\nvar ToolTip = function (_UIComponent) {\n inherits(ToolTip, _UIComponent);\n\n ToolTip.prototype._getClassName = function _getClassName() {\n return 'ToolTip';\n };\n\n function ToolTip(content) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n classCallCheck(this, ToolTip);\n\n var _this = possibleConstructorReturn(this, _UIComponent.call(this, options));\n\n _this._content = content;\n return _this;\n }\n\n ToolTip.prototype.addTo = function addTo(owner) {\n if (owner instanceof Geometry) {\n owner.on('mousemove', this.onMouseMove, this);\n owner.on('mouseout', this.onMouseOut, this);\n return _UIComponent.prototype.addTo.call(this, owner);\n } else {\n throw new Error('Invalid geometry the tooltip is added to.');\n }\n };\n\n ToolTip.prototype.setStyle = function setStyle$$1(cssName) {\n this.options.cssName = cssName;\n return this;\n };\n\n ToolTip.prototype.getStyle = function getStyle() {\n return this.options.cssName;\n };\n\n ToolTip.prototype.getContent = function getContent() {\n return this._content;\n };\n\n ToolTip.prototype.buildOn = function buildOn() {\n var dom = createEl('div');\n if (options$22.height) {\n dom.style.height = options$22.height + 'px';\n }\n if (options$22.width) {\n dom.style.width = options$22.width + 'px';\n }\n var cssName = this.options.cssName;\n if (!cssName && options$22.height) {\n dom.style.lineHeight = options$22.height + 'px';\n }\n dom.innerHTML = '<div class=\"' + cssName + '\">' + this._content + '</div>';\n return dom;\n };\n\n ToolTip.prototype.onMouseOut = function onMouseOut() {\n clearTimeout(this._timeout);\n if (this.isVisible()) {\n this._removePrevDOM();\n }\n };\n\n ToolTip.prototype.onMouseMove = function onMouseMove(e) {\n var _this2 = this;\n\n clearTimeout(this._timeout);\n var map = this.getMap();\n if (!map) {\n return;\n }\n var coord = map.locateByPoint(e.coordinate, -5, 25);\n if (this.options['showTimeout'] === 0) {\n this.show(coord);\n } else {\n this._timeout = setTimeout(function () {\n if (map) {\n _this2.show(coord);\n }\n }, this.options['showTimeout']);\n }\n };\n\n ToolTip.prototype.onRemove = function onRemove() {\n clearTimeout(this._timeout);\n if (this._owner) {\n this._owner.off('mouseover', this.onMouseOver, this);\n this._owner.off('mouseout', this.onMouseOut, this);\n }\n };\n\n return ToolTip;\n}(UIComponent);\n\nToolTip.mergeOptions(options$22);\n\nvar defaultOptions = {\n 'animation': null,\n 'animationDelay': 10,\n 'animationOnHide': false,\n 'autoPan': false,\n 'width': 160,\n 'maxHeight': 0,\n 'custom': false,\n 'items': []\n};\n\nvar Menu = function (_UIComponent) {\n inherits(Menu, _UIComponent);\n\n function Menu(options) {\n classCallCheck(this, Menu);\n return possibleConstructorReturn(this, _UIComponent.call(this, options));\n }\n\n Menu.prototype._getClassName = function _getClassName() {\n return 'Menu';\n };\n\n Menu.prototype.addTo = function addTo(owner) {\n if (owner._menu && owner._menu !== this) {\n owner.removeMenu();\n }\n owner._menu = this;\n return UIComponent.prototype.addTo.apply(this, arguments);\n };\n\n Menu.prototype.setItems = function setItems(items) {\n this.options['items'] = items;\n return this;\n };\n\n Menu.prototype.getItems = function getItems() {\n return this.options['items'] || [];\n };\n\n Menu.prototype.buildOn = function buildOn() {\n if (this.options['custom']) {\n if (isString(this.options['items'])) {\n var container = createEl('div');\n container.innerHTML = this.options['items'];\n return container;\n } else {\n return this.options['items'];\n }\n } else {\n var dom = createEl('div');\n addClass(dom, 'maptalks-menu');\n dom.style.width = this._getMenuWidth() + 'px';\n\n var menuItems = this._createMenuItemDom();\n\n dom.appendChild(menuItems);\n on(dom, 'contextmenu', preventDefault);\n return dom;\n }\n };\n\n Menu.prototype.getOffset = function getOffset() {\n if (!this.getMap()) {\n return null;\n }\n var mapSize = this.getMap().getSize(),\n p = this.getMap().viewPointToContainerPoint(this._getViewPoint()),\n size = this.getSize();\n var dx = 0,\n dy = 0;\n if (p.x + size['width'] > mapSize['width']) {\n dx = -size['width'];\n }\n if (p.y + size['height'] > mapSize['height']) {\n dy = -size['height'];\n }\n return new Point(dx, dy);\n };\n\n Menu.prototype.getTransformOrigin = function getTransformOrigin() {\n var p = this.getOffset()._multi(-1);\n return p.x + 'px ' + p.y + 'px';\n };\n\n Menu.prototype.getEvents = function getEvents() {\n return {\n '_zoomstart _zoomend _movestart _dblclick _click': this._removePrevDOM\n };\n };\n\n Menu.prototype._createMenuItemDom = function _createMenuItemDom() {\n var me = this;\n var map = this.getMap();\n var ul = createEl('ul');\n addClass(ul, 'maptalks-menu-items');\n var items = this.getItems();\n\n function onMenuClick(index) {\n return function (e) {\n var param = map._parseEvent(e, 'click');\n param['target'] = me;\n param['owner'] = me._owner;\n param['index'] = index;\n var result = this._callback(param);\n if (result === false) {\n return;\n }\n me.hide();\n };\n }\n var item = void 0,\n itemDOM = void 0;\n for (var i = 0, len = items.length; i < len; i++) {\n item = items[i];\n if (item === '-' || item === '_') {\n itemDOM = createEl('li');\n addClass(itemDOM, 'maptalks-menu-splitter');\n } else {\n itemDOM = createEl('li');\n var itemTitle = item['item'];\n if (isFunction(itemTitle)) {\n itemTitle = itemTitle({\n 'owner': this._owner,\n 'index': i\n });\n }\n itemDOM.innerHTML = itemTitle;\n itemDOM._callback = item['click'];\n on(itemDOM, 'click', onMenuClick(i));\n }\n ul.appendChild(itemDOM);\n }\n var maxHeight = this.options['maxHeight'] || 0;\n if (maxHeight > 0) {\n setStyle(ul, 'max-height: ' + maxHeight + 'px; overflow-y: auto;');\n }\n return ul;\n };\n\n Menu.prototype._getMenuWidth = function _getMenuWidth() {\n var defaultWidth = 160;\n var width = this.options['width'] || defaultWidth;\n return width;\n };\n\n return Menu;\n}(UIComponent);\n\nMenu.mergeOptions(defaultOptions);\n\nvar Menuable = {\n setMenu: function setMenu(options) {\n this._menuOptions = options;\n\n if (this._menu) {\n this._menu.setOptions(options);\n } else {\n this.on('contextmenu', this._defaultOpenMenu, this);\n }\n return this;\n },\n openMenu: function openMenu(coordinate) {\n var map = this instanceof Map ? this : this.getMap();\n if (!coordinate) {\n coordinate = this.getCenter();\n }\n if (!this._menu) {\n if (this._menuOptions && map) {\n this._bindMenu(this._menuOptions);\n this._menu.show(coordinate);\n }\n } else {\n this._menu.show(coordinate);\n }\n return this;\n },\n setMenuItems: function setMenuItems(items) {\n if (!this._menuOptions) {\n this._menuOptions = {};\n }\n if (Array.isArray(items)) {\n this._menuOptions['custom'] = false;\n }\n this._menuOptions['items'] = items;\n this.setMenu(this._menuOptions);\n return this;\n },\n getMenuItems: function getMenuItems() {\n if (this._menu) {\n return this._menu.getItems();\n } else if (this._menuOptions) {\n return this._menuOptions['items'] || [];\n }\n return [];\n },\n closeMenu: function closeMenu() {\n if (this._menu) {\n this._menu.hide();\n }\n return this;\n },\n removeMenu: function removeMenu() {\n this.off('contextmenu', this._defaultOpenMenu, this);\n this._unbindMenu();\n delete this._menuOptions;\n return this;\n },\n _bindMenu: function _bindMenu(options) {\n this._menu = new Menu(options);\n this._menu.addTo(this);\n\n return this;\n },\n _unbindMenu: function _unbindMenu() {\n if (this._menu) {\n this.closeMenu();\n this._menu.remove();\n delete this._menu;\n }\n return this;\n },\n _defaultOpenMenu: function _defaultOpenMenu(param) {\n if (this.listens('contextmenu') > 1) {\n return true;\n } else {\n this.openMenu(param['coordinate']);\n return false;\n }\n }\n};\n\nMap.include(Menuable);\nGeometry.include(Menuable);\n\n\n\nvar index$4 = Object.freeze({\n\tUIComponent: UIComponent,\n\tUIMarker: UIMarker,\n\tInfoWindow: InfoWindow,\n\tToolTip: ToolTip,\n\tMenuable: Menuable,\n\tMenu: Menu\n});\n\nvar Control = function (_Eventable) {\n inherits(Control, _Eventable);\n\n function Control(options) {\n classCallCheck(this, Control);\n\n if (options && options['position'] && !isString(options['position'])) {\n options['position'] = extend({}, options['position']);\n }\n return possibleConstructorReturn(this, _Eventable.call(this, options));\n }\n\n Control.prototype.addTo = function addTo(map) {\n this.remove();\n if (!map.options['control']) {\n return this;\n }\n this._map = map;\n var controlContainer = map._panels.control;\n this.__ctrlContainer = createEl('div');\n setStyle(this.__ctrlContainer, 'position:absolute;overflow:visible;');\n\n this.update();\n controlContainer.appendChild(this.__ctrlContainer);\n if (this.onAdd) {\n this.onAdd();\n }\n\n this.fire('add', {\n 'dom': controlContainer\n });\n return this;\n };\n\n Control.prototype.update = function update() {\n this.__ctrlContainer.innerHTML = '';\n this._controlDom = this.buildOn(this.getMap());\n if (this._controlDom) {\n this._updatePosition();\n this.__ctrlContainer.appendChild(this._controlDom);\n }\n return this;\n };\n\n Control.prototype.getMap = function getMap() {\n return this._map;\n };\n\n Control.prototype.getPosition = function getPosition() {\n return extend({}, this._parse(this.options['position']));\n };\n\n Control.prototype.setPosition = function setPosition(position) {\n if (isString(position)) {\n this.options['position'] = position;\n } else {\n this.options['position'] = extend({}, position);\n }\n this._updatePosition();\n return this;\n };\n\n Control.prototype.getContainerPoint = function getContainerPoint() {\n var position = this.getPosition();\n\n var size = this.getMap().getSize();\n var x = void 0,\n y = void 0;\n if (!isNil(position['left'])) {\n x = parseInt(position['left']);\n } else if (!isNil(position['right'])) {\n x = size['width'] - parseInt(position['right']);\n }\n if (!isNil(position['top'])) {\n y = parseInt(position['top']);\n } else if (!isNil(position['bottom'])) {\n y = size['height'] - parseInt(position['bottom']);\n }\n return new Point(x, y);\n };\n\n Control.prototype.getContainer = function getContainer() {\n return this.__ctrlContainer;\n };\n\n Control.prototype.getDOM = function getDOM() {\n return this._controlDom;\n };\n\n Control.prototype.show = function show() {\n this.__ctrlContainer.style.display = '';\n return this;\n };\n\n Control.prototype.hide = function hide() {\n this.__ctrlContainer.style.display = 'none';\n return this;\n };\n\n Control.prototype.isVisible = function isVisible() {\n return this.__ctrlContainer && this.__ctrlContainer.style.display === '';\n };\n\n Control.prototype.remove = function remove() {\n if (!this._map) {\n return this;\n }\n removeDomNode(this.__ctrlContainer);\n if (this.onRemove) {\n this.onRemove();\n }\n delete this._map;\n delete this.__ctrlContainer;\n delete this._controlDom;\n\n this.fire('remove');\n return this;\n };\n\n Control.prototype._parse = function _parse(position) {\n var p = position;\n if (isString(position)) {\n p = Control['positions'][p];\n }\n return p;\n };\n\n Control.prototype._updatePosition = function _updatePosition() {\n var position = this.getPosition();\n if (!position) {\n position = {\n 'top': 20,\n 'left': 20\n };\n }\n for (var p in position) {\n if (position.hasOwnProperty(p)) {\n position[p] = parseInt(position[p]);\n this.__ctrlContainer.style[p] = position[p] + 'px';\n }\n }\n\n this.fire('positionchange', {\n 'position': extend({}, position)\n });\n };\n\n return Control;\n}(Eventable(Class));\n\nControl.positions = {\n 'top-left': {\n 'top': 20,\n 'left': 20\n },\n 'top-right': {\n 'top': 20,\n 'right': 20\n },\n 'bottom-left': {\n 'bottom': 20,\n 'left': 20\n },\n 'bottom-right': {\n 'bottom': 20,\n 'right': 20\n }\n};\n\nMap.mergeOptions({\n 'control': true\n});\n\nMap.include({\n addControl: function addControl(control) {\n if (this._containerDOM.getContext) {\n return this;\n }\n control.addTo(this);\n return this;\n },\n\n removeControl: function removeControl(control) {\n if (!control || control.getMap() !== this) {\n return this;\n }\n control.remove();\n return this;\n }\n\n});\n\nvar options$23 = {\n 'position': {\n 'bottom': 0,\n 'left': 0\n },\n 'content': '<a href=\"http://maptalks.org\" target=\"_blank\">maptalks</a>'\n};\n\nvar layerEvents = 'addlayer removelayer setbaselayer baselayerremove';\n\nvar Attribution = function (_Control) {\n inherits(Attribution, _Control);\n\n function Attribution() {\n classCallCheck(this, Attribution);\n return possibleConstructorReturn(this, _Control.apply(this, arguments));\n }\n\n Attribution.prototype.buildOn = function buildOn() {\n this._attributionContainer = createEl('div');\n this._attributionContainer.className = 'maptalks-attribution';\n this._update();\n return this._attributionContainer;\n };\n\n Attribution.prototype.onAdd = function onAdd() {\n this.getMap().on(layerEvents, this._update, this);\n };\n\n Attribution.prototype.onRemove = function onRemove() {\n this.getMap().off(layerEvents, this._update, this);\n };\n\n Attribution.prototype._update = function _update() {\n var map = this.getMap();\n if (!map) {\n return;\n }\n\n var attributions = map._getLayers(function (layer) {\n return layer.options['attribution'];\n }).reverse().map(function (layer) {\n return layer.options['attribution'];\n });\n var content = this.options['content'] + (attributions.length > 0 ? ' - ' + attributions.join(', ') : '');\n this._attributionContainer.innerHTML = '<span style=\"padding:0px 4px\">' + content + '</span>';\n };\n\n return Attribution;\n}(Control);\n\nAttribution.mergeOptions(options$23);\n\nMap.mergeOptions({\n 'attribution': true\n});\n\nMap.addOnLoadHook(function () {\n var a = this.options['attribution'] || this.options['attributionControl'];\n if (a) {\n this.attributionControl = new Attribution(a);\n this.addControl(this.attributionControl);\n }\n});\n\nvar options$24 = {\n 'position': 'top-right',\n 'baseTitle': 'Base Layers',\n 'overlayTitle': 'Layers',\n 'excludeLayers': [],\n 'containerClass': 'maptalks-layer-switcher'\n};\n\nvar LayerSwitcher = function (_Control) {\n inherits(LayerSwitcher, _Control);\n\n function LayerSwitcher() {\n classCallCheck(this, LayerSwitcher);\n return possibleConstructorReturn(this, _Control.apply(this, arguments));\n }\n\n LayerSwitcher.prototype.buildOn = function buildOn() {\n var container = this.container = createEl('div', this.options['containerClass']),\n panel = this.panel = createEl('div', 'panel'),\n button = this.button = createEl('button');\n container.appendChild(button);\n container.appendChild(panel);\n return container;\n };\n\n LayerSwitcher.prototype.onAdd = function onAdd() {\n on(this.button, 'mouseover', this._show, this);\n on(this.panel, 'mouseleave', this._hide, this);\n on(this.getMap(), 'click', this._hide, this);\n };\n\n LayerSwitcher.prototype.onRemove = function onRemove() {\n if (this.panel) {\n off(this.button, 'mouseover', this._show, this);\n off(this.panel, 'mouseleave', this._hide, this);\n off(this.getMap(), 'click', this._hide, this);\n removeDomNode(this.panel);\n removeDomNode(this.button);\n delete this.panel;\n delete this.button;\n delete this.container;\n }\n };\n\n LayerSwitcher.prototype._show = function _show() {\n if (!hasClass(this.container, 'shown')) {\n addClass(this.container, 'shown');\n this._createPanel();\n }\n };\n\n LayerSwitcher.prototype._hide = function _hide(e) {\n if (!this.panel.contains(e.toElement || e.relatedTarget)) {\n setClass(this.container, this.options['containerClass']);\n }\n };\n\n LayerSwitcher.prototype._createPanel = function _createPanel() {\n this.panel.innerHTML = '';\n var ul = createEl('ul');\n this.panel.appendChild(ul);\n this._renderLayers(this.getMap(), ul);\n };\n\n LayerSwitcher.prototype._renderLayers = function _renderLayers(map, elm) {\n var base = map.getBaseLayer(),\n layers = map.getLayers(),\n len = layers.length;\n if (base) {\n var baseLayers = base.layers || [base],\n li = createEl('li', 'group'),\n ul = createEl('ul'),\n label = createEl('label');\n label.innerHTML = this.options['baseTitle'];\n li.appendChild(label);\n for (var i = 0, _len = baseLayers.length; i < _len; i++) {\n var layer = baseLayers[i];\n if (this._isExcluded(layer)) {\n ul.appendChild(this._renderLayer(baseLayers[i], true));\n li.appendChild(ul);\n elm.appendChild(li);\n }\n }\n }\n\n if (len) {\n var _li = createEl('li', 'group'),\n _ul = createEl('ul'),\n _label = createEl('label');\n _label.innerHTML = this.options['overlayTitle'];\n _li.appendChild(_label);\n for (var _i = 0; _i < len; _i++) {\n var _layer = layers[_i];\n if (this._isExcluded(_layer)) {\n _ul.appendChild(this._renderLayer(_layer));\n }\n }\n _li.appendChild(_ul);\n elm.appendChild(_li);\n }\n };\n\n LayerSwitcher.prototype._isExcluded = function _isExcluded(layer) {\n var id = layer.getId(),\n excludeLayers = this.options['excludeLayers'];\n return !(excludeLayers.length && excludeLayers.indexOf(id) >= 0);\n };\n\n LayerSwitcher.prototype._renderLayer = function _renderLayer(layer, isBase) {\n var _this2 = this;\n\n var li = createEl('li', 'layer'),\n label = createEl('label'),\n input = createEl('input'),\n map = this.getMap();\n var visible = layer.options['visible'];\n layer.options['visible'] = true;\n var enabled = layer.isVisible();\n layer.options['visible'] = visible;\n li.className = 'layer';\n if (isBase) {\n input.type = 'radio';\n input.name = 'base';\n } else {\n input.type = 'checkbox';\n }\n\n input.checked = visible && enabled;\n if (!enabled) {\n input.setAttribute('disabled', 'disabled');\n }\n\n input.onchange = function (e) {\n if (e.target.type === 'radio') {\n var baseLayer = map.getBaseLayer(),\n baseLayers = baseLayer.layers;\n if (baseLayers) {\n for (var i = 0, len = baseLayers.length; i < len; i++) {\n var _baseLayer = baseLayers[i];\n _baseLayer[_baseLayer === layer ? 'show' : 'hide']();\n }\n } else if (!baseLayer.isVisible()) {\n baseLayer.show();\n }\n map._fireEvent('setbaselayer');\n } else {\n layer[e.target.checked ? 'show' : 'hide']();\n }\n _this2.fire('layerchange', { target: layer });\n };\n li.appendChild(input);\n label.innerHTML = layer.getId();\n li.appendChild(label);\n return li;\n };\n\n return LayerSwitcher;\n}(Control);\n\nLayerSwitcher.mergeOptions(options$24);\n\nMap.mergeOptions({\n 'layerSwitcherControl': false\n});\n\nMap.addOnLoadHook(function () {\n if (this.options['layerSwitcherControl']) {\n this.layerSwitcherControl = new LayerSwitcher(this.options['layerSwitcherControl']);\n this.addControl(this.layerSwitcherControl);\n }\n});\n\nvar options$25 = {\n 'level': 4,\n 'position': {\n 'right': 1,\n 'bottom': 1\n },\n 'size': [300, 200],\n 'maximize': true,\n 'symbol': {\n 'lineWidth': 3,\n 'lineColor': '#1bbc9b',\n 'polygonFill': '#1bbc9b',\n 'polygonOpacity': 0.4\n },\n 'containerClass': 'maptalks-overview',\n 'buttonClass': 'maptalks-overview-button'\n};\n\nvar Overview = function (_Control) {\n inherits(Overview, _Control);\n\n function Overview() {\n classCallCheck(this, Overview);\n return possibleConstructorReturn(this, _Control.apply(this, arguments));\n }\n\n Overview.prototype.buildOn = function buildOn() {\n var size = this.options['size'];\n if (!this.options['maximize']) {\n size = [0, 0];\n }\n var container = createEl('div');\n\n var mapContainer = this.mapContainer = createEl('div');\n mapContainer.style.width = size[0] + 'px';\n mapContainer.style.height = size[1] + 'px';\n mapContainer.className = this.options['containerClass'];\n var button = this.button = createEl('div');\n button.className = this.options['buttonClass'];\n container.appendChild(mapContainer);\n container.appendChild(button);\n return container;\n };\n\n Overview.prototype.onAdd = function onAdd() {\n if (this.options['maximize']) {\n this._createOverview();\n }\n this.getMap().on('resize moving zooming rotate dragrotating viewchange', this._update, this).on('setbaselayer', this._updateBaseLayer, this).on('spatialreferencechange', this._updateSpatialReference, this);\n on(this.button, 'click', this._onButtonClick, this);\n this._updateButtonText();\n };\n\n Overview.prototype.onRemove = function onRemove() {\n this.getMap().off('resize moving zooming rotate dragrotating viewchange', this._update, this).off('setbaselayer', this._updateBaseLayer, this).off('spatialreferencechange', this._updateSpatialReference, this);\n if (this._overview) {\n this._overview.remove();\n delete this._overview;\n delete this._perspective;\n }\n off(this.button, 'click', this._onButtonClick, this);\n };\n\n Overview.prototype.maxmize = function maxmize() {\n var size = this.options['size'];\n var dom = this.mapContainer;\n dom.style.width = size[0] + 'px';\n dom.style.height = size[1] + 'px';\n this._createOverview();\n };\n\n Overview.prototype.minimize = function minimize() {\n if (this._overview) {\n this._overview.remove();\n }\n delete this._overview;\n delete this._perspective;\n var dom = this.mapContainer;\n dom.style.width = 0 + 'px';\n dom.style.height = 0 + 'px';\n };\n\n Overview.prototype._onButtonClick = function _onButtonClick() {\n if (!this._overview) {\n this.maxmize();\n } else {\n this.minimize();\n }\n this._updateButtonText();\n };\n\n Overview.prototype._updateButtonText = function _updateButtonText() {\n if (this._overview) {\n this.button.innerHTML = '-';\n } else {\n this.button.innerHTML = '+';\n }\n };\n\n Overview.prototype._createOverview = function _createOverview() {\n var map = this.getMap(),\n dom = this.mapContainer;\n var options = map.config();\n extend(options, {\n 'center': map.getCenter(),\n 'zoom': this._getOverviewZoom(),\n 'zoomAnimationDuration': 150,\n 'pitch': 0,\n 'bearing': 0,\n 'scrollWheelZoom': false,\n 'checkSize': false,\n 'doubleClickZoom': false,\n 'touchZoom': false,\n 'control': false,\n 'draggable': false,\n 'maxExtent': null\n });\n this._overview = new Map(dom, options);\n this._updateBaseLayer();\n this._perspective = new Polygon(this._getPerspectiveCoords(), {\n 'draggable': true,\n 'cursor': 'move',\n 'symbol': this.options['symbol']\n }).on('dragend', this._onDragEnd, this);\n new VectorLayer('perspective_layer', this._perspective).addTo(this._overview);\n this.fire('load');\n };\n\n Overview.prototype._getOverviewZoom = function _getOverviewZoom() {\n var map = this.getMap(),\n zoom = map.getZoom(),\n minZoom = map.getMinZoom(),\n level = this.options['level'];\n if (level > 0) {\n for (var i = level; i > 0; i--) {\n if (zoom - i >= minZoom) {\n return zoom - i;\n }\n }\n } else {\n for (var _i = level; _i < 0; _i++) {\n if (zoom - _i >= minZoom) {\n return zoom - _i;\n }\n }\n }\n\n return zoom;\n };\n\n Overview.prototype._onDragEnd = function _onDragEnd() {\n var center = this._perspective.getCenter();\n this._overview.setCenter(center);\n this.getMap().panTo(center);\n };\n\n Overview.prototype._getPerspectiveCoords = function _getPerspectiveCoords() {\n var map = this.getMap();\n return map.getContainerExtent().toArray().map(function (c) {\n return map.containerPointToCoordinate(c);\n });\n };\n\n Overview.prototype._update = function _update() {\n if (!this._overview) {\n return;\n }\n var coords = this._getPerspectiveCoords();\n this._perspective.setCoordinates(coords);\n this._overview.setCenterAndZoom(this.getMap().getCenter(), this._getOverviewZoom());\n };\n\n Overview.prototype._updateSpatialReference = function _updateSpatialReference() {\n if (!this._overview) {\n return;\n }\n var map = this.getMap();\n var spatialRef = map.options['spatialReference'];\n this._overview.setSpatialReference(spatialRef);\n };\n\n Overview.prototype._updateBaseLayer = function _updateBaseLayer() {\n if (!this._overview) {\n return;\n }\n var map = this.getMap(),\n baseLayer = map.getBaseLayer();\n if (!baseLayer) {\n this._overview.setBaseLayer(null);\n return;\n }\n var layers = baseLayer.layers;\n var showIndex = 0;\n if (layers) {\n for (var i = 0, l = layers.length; i < l; i++) {\n var _layer = layers[i];\n if (_layer.isVisible()) {\n showIndex = i;\n break;\n }\n }\n }\n\n var json = baseLayer.toJSON();\n var options = null;\n if (layers) {\n options = json.layers[showIndex].options;\n options.visible = true;\n } else {\n options = json.options;\n }\n this._overview.setMinZoom(options.minZoom || null).setMaxZoom(options.maxZoom || null);\n delete options.minZoom;\n delete options.maxZoom;\n delete json.options.canvas;\n json.options.visible = true;\n json.options.renderer = 'canvas';\n var layer = Layer.fromJSON(json);\n for (var p in baseLayer) {\n if (isFunction(baseLayer[p]) && baseLayer.hasOwnProperty(p) && baseLayer[p] !== baseLayer.constructor.prototype[p]) {\n layer[p] = baseLayer[p];\n }\n }\n this._overview.setBaseLayer(layer);\n };\n\n return Overview;\n}(Control);\n\nOverview.mergeOptions(options$25);\n\nMap.mergeOptions({\n 'overviewControl': false\n});\n\nMap.addOnLoadHook(function () {\n if (this.options['overviewControl']) {\n this.overviewControl = new Overview(this.options['overviewControl']);\n this.addControl(this.overviewControl);\n }\n});\n\nvar options$26 = {\n 'position': 'top-right',\n 'draggable': true,\n 'custom': false,\n 'content': '',\n 'closeButton': true\n};\n\nvar Panel = function (_Control) {\n inherits(Panel, _Control);\n\n function Panel() {\n classCallCheck(this, Panel);\n return possibleConstructorReturn(this, _Control.apply(this, arguments));\n }\n\n Panel.prototype.buildOn = function buildOn() {\n var dom = void 0;\n if (this.options['custom']) {\n if (isString(this.options['content'])) {\n dom = createEl('div');\n dom.innerHTML = this.options['content'];\n } else {\n dom = this.options['content'];\n }\n } else {\n dom = createEl('div', 'maptalks-panel');\n if (this.options['closeButton']) {\n var closeButton = createEl('a', 'maptalks-close');\n closeButton.href = 'javascript:;';\n closeButton.onclick = function () {\n dom.style.display = 'none';\n };\n dom.appendChild(closeButton);\n }\n\n var panelContent = createEl('div', 'maptalks-panel-content');\n panelContent.innerHTML = this.options['content'];\n dom.appendChild(panelContent);\n }\n\n this.draggable = new DragHandler(dom, {\n 'cancelOn': this._cancelOn.bind(this),\n 'ignoreMouseleave': true\n });\n\n this.draggable.on('dragstart', this._onDragStart, this).on('dragging', this._onDragging, this).on('dragend', this._onDragEnd, this);\n\n if (this.options['draggable']) {\n this.draggable.enable();\n }\n\n return dom;\n };\n\n Panel.prototype.update = function update() {\n if (this.draggable) {\n this.draggable.disable();\n delete this.draggable;\n }\n return Control.prototype.update.call(this);\n };\n\n Panel.prototype.setContent = function setContent(content) {\n var old = this.options['content'];\n this.options['content'] = content;\n\n this.fire('contentchange', {\n 'old': old,\n 'new': content\n });\n if (this.isVisible()) {\n this.update();\n }\n return this;\n };\n\n Panel.prototype.getContent = function getContent() {\n return this.options['content'];\n };\n\n Panel.prototype._cancelOn = function _cancelOn(domEvent) {\n var target = domEvent.srcElement || domEvent.target,\n tagName = target.tagName.toLowerCase();\n if (tagName === 'button' || tagName === 'input' || tagName === 'select' || tagName === 'option' || tagName === 'textarea') {\n return true;\n }\n return false;\n };\n\n Panel.prototype._onDragStart = function _onDragStart(param) {\n this._startPos = param['mousePos'];\n this._startPosition = extend({}, this.getPosition());\n\n this.fire('dragstart', param);\n };\n\n Panel.prototype._onDragging = function _onDragging(param) {\n var pos = param['mousePos'];\n var offset = pos.sub(this._startPos);\n\n var startPosition = this._startPosition;\n var position = this.getPosition();\n if (!isNil(position['top'])) {\n position['top'] = parseInt(startPosition['top']) + offset.y;\n }\n if (!isNil(position['bottom'])) {\n position['bottom'] = parseInt(startPosition['bottom']) - offset.y;\n }\n if (!isNil(position['left'])) {\n position['left'] = parseInt(startPosition['left']) + offset.x;\n }\n if (!isNil(position['right'])) {\n position['right'] = parseInt(startPosition['right']) - offset.x;\n }\n this.setPosition(position);\n\n this.fire('dragging', param);\n };\n\n Panel.prototype._onDragEnd = function _onDragEnd(param) {\n delete this._startPos;\n delete this._startPosition;\n\n this.fire('dragend', param);\n };\n\n Panel.prototype._getConnectPoints = function _getConnectPoints() {\n var map = this.getMap();\n var containerPoint = this.getContainerPoint();\n var dom = this.getDOM(),\n width = parseInt(dom.clientWidth),\n height = parseInt(dom.clientHeight);\n var anchors = [map.containerPointToCoordinate(containerPoint.add(width / 2, 0)), map.containerPointToCoordinate(containerPoint.add(width, height / 2)), map.containerPointToCoordinate(containerPoint.add(width / 2, height)), map.containerPointToCoordinate(containerPoint.add(0, height / 2))];\n return anchors;\n };\n\n return Panel;\n}(Control);\n\nPanel.mergeOptions(options$26);\n\nvar options$27 = {\n 'position': 'bottom-left',\n 'maxWidth': 100,\n 'metric': true,\n 'imperial': false\n};\n\nvar Scale = function (_Control) {\n inherits(Scale, _Control);\n\n function Scale() {\n classCallCheck(this, Scale);\n return possibleConstructorReturn(this, _Control.apply(this, arguments));\n }\n\n Scale.prototype.buildOn = function buildOn(map) {\n this._map = map;\n this._scaleContainer = createEl('div');\n this._addScales();\n map.on('zoomend', this._update, this);\n if (this._map._loaded) {\n this._update();\n }\n return this._scaleContainer;\n };\n\n Scale.prototype.onRemove = function onRemove() {\n this.getMap().off('zoomend', this._update, this);\n };\n\n Scale.prototype._addScales = function _addScales() {\n var css = 'border: 2px solid #000000;border-top: none;line-height: 1.1;padding: 2px 5px 1px;' + 'color: #000000;font-size: 11px;text-align:center;white-space: nowrap;overflow: hidden' + ';-moz-box-sizing: content-box;box-sizing: content-box;background: #fff; background: rgba(255, 255, 255, 0);';\n if (this.options['metric']) {\n this._mScale = createElOn('div', css, this._scaleContainer);\n }\n if (this.options['imperial']) {\n this._iScale = createElOn('div', css, this._scaleContainer);\n }\n };\n\n Scale.prototype._update = function _update() {\n var map = this._map;\n var maxMeters = map.pixelToDistance(this.options['maxWidth'], 0);\n this._updateScales(maxMeters);\n };\n\n Scale.prototype._updateScales = function _updateScales(maxMeters) {\n if (this.options['metric'] && maxMeters) {\n this._updateMetric(maxMeters);\n }\n if (this.options['imperial'] && maxMeters) {\n this._updateImperial(maxMeters);\n }\n };\n\n Scale.prototype._updateMetric = function _updateMetric(maxMeters) {\n var meters = this._getRoundNum(maxMeters),\n label = meters < 1000 ? meters + ' m' : meters / 1000 + ' km';\n\n this._updateScale(this._mScale, label, meters / maxMeters);\n };\n\n Scale.prototype._updateImperial = function _updateImperial(maxMeters) {\n var maxFeet = maxMeters * 3.2808399;\n var maxMiles = void 0,\n miles = void 0,\n feet = void 0;\n\n if (maxFeet > 5280) {\n maxMiles = maxFeet / 5280;\n miles = this._getRoundNum(maxMiles);\n this._updateScale(this._iScale, miles + ' mile', miles / maxMiles);\n } else {\n feet = this._getRoundNum(maxFeet);\n this._updateScale(this._iScale, feet + ' feet', feet / maxFeet);\n }\n };\n\n Scale.prototype._updateScale = function _updateScale(scale, text, ratio) {\n scale['style']['width'] = Math.round(this.options['maxWidth'] * ratio) + 'px';\n scale['innerHTML'] = text;\n };\n\n Scale.prototype._getRoundNum = function _getRoundNum(num) {\n var pow10 = Math.pow(10, (Math.floor(num) + '').length - 1);\n var d = num / pow10;\n\n d = d >= 10 ? 10 : d >= 5 ? 5 : d >= 3 ? 3 : d >= 2 ? 2 : 1;\n\n return pow10 * d;\n };\n\n return Scale;\n}(Control);\n\nScale.mergeOptions(options$27);\n\nMap.mergeOptions({\n 'scaleControl': false\n});\n\nMap.addOnLoadHook(function () {\n if (this.options['scaleControl']) {\n this.scaleControl = new Scale(this.options['scaleControl']);\n this.addControl(this.scaleControl);\n }\n});\n\nvar options$28 = {\n 'height': 28,\n 'vertical': false,\n 'position': 'top-right',\n 'reverseMenu': false,\n 'items': {}\n};\n\nvar Toolbar = function (_Control) {\n inherits(Toolbar, _Control);\n\n function Toolbar() {\n classCallCheck(this, Toolbar);\n return possibleConstructorReturn(this, _Control.apply(this, arguments));\n }\n\n Toolbar.prototype.buildOn = function buildOn(map) {\n this._map = map;\n var dom = createEl('div');\n var ul = createEl('ul', 'maptalks-toolbar-hx');\n dom.appendChild(ul);\n\n if (this.options['vertical']) {\n addClass(dom, 'maptalks-toolbar-vertical');\n } else {\n addClass(dom, 'maptalks-toolbar-horizonal');\n }\n var me = this;\n\n function onButtonClick(fn, index, childIndex, targetDom) {\n var item = me._getItems()[index];\n return function (e) {\n stopPropagation(e);\n return fn({\n 'target': item,\n 'index': index,\n 'childIndex': childIndex,\n 'dom': targetDom\n });\n };\n }\n\n var items = this.options['items'];\n if (isArrayHasData(items)) {\n for (var i = 0, len = items.length; i < len; i++) {\n var item = items[i];\n var li = createEl('li');\n if (this.options['height'] !== 28) {\n li.style.lineHeight = this.options['height'] + 'px';\n }\n li.style.height = this.options['height'] + 'px';\n li.style.cursor = 'pointer';\n if (isHTML(item['item'])) {\n li.style.textAlign = 'center';\n var itemSize = measureDom('div', item['item']);\n\n li.innerHTML = '<div style=\"margin-top:' + (this.options['height'] - itemSize['height']) / 2 + 'px;\">' + item['item'] + '</div>';\n } else {\n li.innerHTML = item['item'];\n }\n if (item['click']) {\n on(li, 'click', onButtonClick(item['click'], i, null, li));\n }\n if (isArrayHasData(item['children'])) {\n var dropMenu = this._createDropMenu(i);\n li.appendChild(dropMenu);\n li._menu = dropMenu;\n on(li, 'mouseover', function () {\n this._menu.style.display = '';\n });\n on(li, 'mouseout', function () {\n this._menu.style.display = 'none';\n });\n }\n ul.appendChild(li);\n }\n }\n return dom;\n };\n\n Toolbar.prototype._createDropMenu = function _createDropMenu(index) {\n var me = this;\n\n function onButtonClick(fn, index, childIndex) {\n var item = me._getItems()[index]['children'][childIndex];\n return function (e) {\n stopPropagation(e);\n return fn({\n 'target': item,\n 'index': index,\n 'childIndex': childIndex\n });\n };\n }\n var menuDom = createEl('div', 'maptalks-dropMenu'),\n items = this._getItems(),\n len = items.length,\n menuUL = createEl('ul'),\n children = items[index]['children'];\n if (index === len - 1 && children) {\n menuDom.style.cssText = 'right: 0px;';\n menuUL.style.cssText = 'right: 0px;position: absolute;';\n if (this.options['reverseMenu']) {\n menuUL.style.bottom = 0;\n }\n }\n menuDom.appendChild(createEl('em', 'maptalks-ico'));\n\n var liWidth = 0;\n for (var i = 0, l = children.length; i < l; i++) {\n var size = stringLength(children[i]['item'], '12px');\n if (size.width > liWidth) {\n liWidth = size.width;\n }\n }\n for (var _i = 0, _l = children.length; _i < _l; _i++) {\n var child = children[_i];\n var li = createEl('li');\n li.innerHTML = '<a href=\"javascript:;\">' + child['item'] + '</a>';\n li.style.cursor = 'pointer';\n li.style.width = liWidth + 24 + 'px';\n on(li.childNodes[0], 'click', onButtonClick(child['click'], index, _i));\n menuUL.appendChild(li);\n }\n if (this.options['vertical']) {\n var width = liWidth < 95 ? 95 : liWidth;\n if (this.options['reverseMenu']) {\n menuDom.style.right = -(width + 10 * 2) + 'px';\n } else {\n menuDom.style.left = -(width + 10 * 2) + 'px';\n }\n } else if (this.options['reverseMenu']) {\n menuDom.style.bottom = '28px';\n } else {\n menuDom.style.top = '28px';\n }\n menuDom.appendChild(menuUL);\n menuDom.style.display = 'none';\n return menuDom;\n };\n\n Toolbar.prototype._getItems = function _getItems() {\n return this.options['items'] || [];\n };\n\n return Toolbar;\n}(Control);\n\nToolbar.mergeOptions(options$28);\n\nvar options$29 = {\n 'position': 'top-left',\n 'slider': true,\n 'zoomLevel': true,\n 'seamless': false\n};\n\nvar UNIT = 10;\n\nvar Zoom = function (_Control) {\n inherits(Zoom, _Control);\n\n function Zoom() {\n classCallCheck(this, Zoom);\n return possibleConstructorReturn(this, _Control.apply(this, arguments));\n }\n\n Zoom.prototype.buildOn = function buildOn(map) {\n var options = this.options;\n\n var dom = createEl('div', 'maptalks-zoom');\n\n if (options['zoomLevel']) {\n var levelDOM = createEl('span', 'maptalks-zoom-zoomlevel');\n dom.appendChild(levelDOM);\n this._levelDOM = levelDOM;\n }\n\n var zoomDOM = createEl('div', 'maptalks-zoom-slider');\n\n var zoomInButton = createEl('a', 'maptalks-zoom-zoomin');\n zoomInButton.href = 'javascript:;';\n zoomInButton.innerHTML = '+';\n zoomDOM.appendChild(zoomInButton);\n this._zoomInButton = zoomInButton;\n\n if (options['slider']) {\n var box = createEl('div', 'maptalks-zoom-slider-box');\n var ruler = createEl('div', 'maptalks-zoom-slider-ruler');\n var reading = createEl('span', 'maptalks-zoom-slider-reading');\n var dot = createEl('span', 'maptalks-zoom-slider-dot');\n ruler.appendChild(reading);\n box.appendChild(ruler);\n box.appendChild(dot);\n zoomDOM.appendChild(box);\n this._sliderBox = box;\n this._sliderRuler = ruler;\n this._sliderReading = reading;\n this._sliderDot = dot;\n }\n\n var zoomOutButton = createEl('a', 'maptalks-zoom-zoomout');\n zoomOutButton.href = 'javascript:;';\n zoomOutButton.innerHTML = '-';\n zoomDOM.appendChild(zoomOutButton);\n this._zoomOutButton = zoomOutButton;\n\n dom.appendChild(zoomDOM);\n\n map.on('_zoomend _zoomstart _spatialreferencechange', this._update, this);\n\n this._update();\n this._registerDomEvents();\n\n return dom;\n };\n\n Zoom.prototype.onRemove = function onRemove() {\n this.getMap().off('_zoomend _zoomstart _spatialreferencechange', this._update, this);\n if (this._zoomInButton) {\n off(this._zoomInButton, 'click', this._onZoomInClick, this);\n }\n if (this._zoomOutButton) {\n off(this._zoomOutButton, 'click', this._onZoomOutClick, this);\n }\n if (this._sliderRuler) {\n off(this._sliderRuler, 'click', this._onClickRuler, this);\n this.dotDragger.disable();\n delete this.dotDragger;\n }\n };\n\n Zoom.prototype._update = function _update() {\n var map = this.getMap();\n if (this._sliderBox) {\n var totalRange = (map.getMaxZoom() - map.getMinZoom()) * UNIT;\n this._sliderBox.style.height = totalRange + 16 + 'px';\n this._sliderRuler.style.height = totalRange + 8 + 'px';\n this._sliderRuler.style.cursor = 'pointer';\n var zoomRange = (map.getMaxZoom() - map.getZoom()) * UNIT;\n\n this._sliderReading.style.height = (map.getZoom() - map.getMinZoom() + 1) * UNIT + 'px';\n this._sliderDot.style.top = zoomRange + 'px';\n }\n this._updateText();\n };\n\n Zoom.prototype._updateText = function _updateText() {\n if (this._levelDOM) {\n var map = this.getMap();\n var zoom = map.getZoom();\n if (!isInteger(zoom)) {\n zoom = zoom.toFixed(1);\n }\n this._levelDOM.innerHTML = zoom;\n }\n };\n\n Zoom.prototype._registerDomEvents = function _registerDomEvents() {\n if (this._zoomInButton) {\n on(this._zoomInButton, 'click', this._onZoomInClick, this);\n }\n if (this._zoomOutButton) {\n on(this._zoomOutButton, 'click', this._onZoomOutClick, this);\n }\n if (this._sliderRuler) {\n on(this._sliderRuler, 'click', this._onClickRuler, this);\n this.dotDragger = new DragHandler(this._sliderDot, {\n 'ignoreMouseleave': true\n });\n this.dotDragger.on('dragstart', this._onDotDragstart, this).on('dragging dragend', this._onDotDrag, this).enable();\n }\n };\n\n Zoom.prototype._onZoomInClick = function _onZoomInClick(e) {\n preventDefault(e);\n this.getMap().zoomIn();\n };\n\n Zoom.prototype._onZoomOutClick = function _onZoomOutClick(e) {\n preventDefault(e);\n this.getMap().zoomOut();\n };\n\n Zoom.prototype._onClickRuler = function _onClickRuler(e) {\n preventDefault(e);\n var map = this.getMap(),\n point = getEventContainerPoint(e, this._sliderRuler),\n h = point.y;\n var maxZoom = map.getMaxZoom(),\n zoom = Math.floor(maxZoom - h / UNIT);\n map.setZoom(zoom);\n };\n\n Zoom.prototype._onDotDragstart = function _onDotDragstart(e) {\n preventDefault(e.domEvent);\n var map = this.getMap(),\n origin = map.getSize().toPoint()._multi(1 / 2);\n map.onZoomStart(map.getZoom(), origin);\n };\n\n Zoom.prototype._onDotDrag = function _onDotDrag(e) {\n preventDefault(e.domEvent);\n var map = this.getMap(),\n origin = map.getSize().toPoint()._multi(1 / 2),\n point = getEventContainerPoint(e.domEvent, this._sliderRuler),\n maxZoom = map.getMaxZoom(),\n minZoom = map.getMinZoom();\n var top = point.y,\n z = maxZoom - top / UNIT;\n\n if (maxZoom < z) {\n z = maxZoom;\n top = 0;\n } else if (minZoom > z) {\n z = minZoom;\n top = (maxZoom - minZoom) * UNIT;\n }\n\n if (e.type === 'dragging') {\n map.onZooming(z, origin, 1);\n } else if (e.type === 'dragend') {\n if (this.options['seamless']) {\n map.onZoomEnd(z, origin);\n } else {\n map.onZoomEnd(Math.round(z), origin);\n }\n }\n this._sliderDot.style.top = top + 'px';\n\n this._sliderReading.style.height = (map.getZoom() - minZoom + 1) * UNIT + 'px';\n this._updateText();\n };\n\n return Zoom;\n}(Control);\n\nZoom.mergeOptions(options$29);\n\nMap.mergeOptions({\n 'zoomControl': false\n});\n\nMap.addOnLoadHook(function () {\n if (this.options['zoomControl']) {\n this.zoomControl = new Zoom(this.options['zoomControl']);\n this.addControl(this.zoomControl);\n }\n});\n\n\n\nvar index$5 = Object.freeze({\n\tControl: Control,\n\tAttribution: Attribution,\n\tLayerSwitcher: LayerSwitcher,\n\tOverview: Overview,\n\tPanel: Panel,\n\tScale: Scale,\n\tToolbar: Toolbar,\n\tZoom: Zoom\n});\n\nvar TileSystem = function () {\n function TileSystem(sx, sy, ox, oy) {\n classCallCheck(this, TileSystem);\n\n if (Array.isArray(sx)) {\n this.scale = {\n x: sx[0],\n y: sx[1]\n };\n this.origin = {\n x: sx[2],\n y: sx[3]\n };\n } else {\n this.scale = {\n x: sx,\n y: sy\n };\n this.origin = {\n x: ox,\n y: oy\n };\n }\n }\n\n TileSystem.getDefault = function getDefault(projection) {\n if (projection['code'].toLowerCase() === 'baidu') {\n return 'baidu';\n } else if (projection['code'].toLowerCase() === 'EPSG:4326'.toLowerCase()) {\n return 'tms-global-geodetic';\n } else if (projection['code'].toLowerCase() === 'identity') {\n return [1, -1, 0, 0];\n } else {\n return 'web-mercator';\n }\n };\n\n return TileSystem;\n}();\n\nvar semiCircum = 6378137 * Math.PI;\n\nextend(TileSystem, {\n 'web-mercator': new TileSystem([1, -1, -semiCircum, semiCircum]),\n\n 'tms-global-mercator': new TileSystem([1, 1, -semiCircum, -semiCircum]),\n\n 'tms-global-geodetic': new TileSystem([1, 1, -180, -90]),\n\n 'baidu': new TileSystem([1, 1, 0, 0])\n});\n\nvar TileConfig = function () {\n function TileConfig(tileSystem, fullExtent, tileSize) {\n classCallCheck(this, TileConfig);\n\n this.tileSize = tileSize;\n this.fullExtent = fullExtent;\n this.prepareTileInfo(tileSystem, fullExtent);\n }\n\n TileConfig.prototype.prepareTileInfo = function prepareTileInfo(tileSystem, fullExtent) {\n if (isString(tileSystem)) {\n tileSystem = TileSystem[tileSystem.toLowerCase()];\n } else if (Array.isArray(tileSystem)) {\n tileSystem = new TileSystem(tileSystem);\n }\n\n if (!tileSystem) {\n throw new Error('Invalid TileSystem');\n }\n this.tileSystem = tileSystem;\n\n var a = fullExtent['right'] > fullExtent['left'] ? 1 : -1,\n b = fullExtent['top'] > fullExtent['bottom'] ? -1 : 1,\n c = tileSystem['origin']['x'],\n d = tileSystem['origin']['y'];\n this.transformation = new Transformation([a, b, c, d]);\n };\n\n TileConfig.prototype._getTileNum = function _getTileNum(point, res) {\n var tileSystem = this.tileSystem,\n tileSize = this['tileSize'],\n delta = 1E-7;\n var tileX = Math.floor(delta + point.x / (tileSize['width'] * res));\n var tileY = -Math.floor(delta + point.y / (tileSize['height'] * res));\n\n return {\n 'x': tileSystem['scale']['x'] * tileX,\n 'y': tileSystem['scale']['y'] * tileY\n };\n };\n\n TileConfig.prototype.getTileIndex = function getTileIndex(pCoord, res) {\n var tileSystem = this.tileSystem;\n\n var point = this.transformation.transform(pCoord, 1);\n var tileIndex = this._getTileNum(point, res);\n\n if (tileSystem['scale']['x'] < 0) {\n tileIndex['x'] -= 1;\n }\n\n if (tileSystem['scale']['y'] > 0) {\n tileIndex['y'] -= 1;\n }\n\n return this.getNeighorTileIndex(tileIndex['x'], tileIndex['y'], 0, 0, true);\n };\n\n TileConfig.prototype.getNeighorTileIndex = function getNeighorTileIndex(tileX, tileY, offsetX, offsetY, res, isRepeatWorld) {\n var tileSystem = this.tileSystem;\n var x = tileX + tileSystem['scale']['x'] * offsetX;\n var y = tileY - tileSystem['scale']['y'] * offsetY;\n var idx = x;\n var idy = y;\n if (isRepeatWorld) {\n var ext = this._getTileFullIndex(res);\n if (x < ext['xmin']) {\n x = ext['xmax'] - (ext['xmin'] - x) % (ext['xmax'] - ext['xmin']);\n if (x === ext['xmax']) {\n x = ext['xmin'];\n }\n } else if (x >= ext['xmax']) {\n x = ext['xmin'] + (x - ext['xmin']) % (ext['xmax'] - ext['xmin']);\n }\n\n if (y >= ext['ymax']) {\n y = ext['ymin'] + (y - ext['ymin']) % (ext['ymax'] - ext['ymin']);\n } else if (y < ext['ymin']) {\n y = ext['ymax'] - (ext['ymin'] - y) % (ext['ymax'] - ext['ymin']);\n if (y === ext['ymax']) {\n y = ext['ymin'];\n }\n }\n }\n return {\n 'x': x,\n 'y': y,\n\n 'idx': idx,\n 'idy': idy\n };\n };\n\n TileConfig.prototype._getTileFullIndex = function _getTileFullIndex(res) {\n var ext = this.fullExtent;\n var transformation = this.transformation;\n var nwIndex = this._getTileNum(transformation.transform(new Coordinate(ext['left'], ext['top']), 1), res);\n var seIndex = this._getTileNum(transformation.transform(new Coordinate(ext['right'], ext['bottom']), 1), res);\n return new Extent(nwIndex, seIndex);\n };\n\n TileConfig.prototype.getTilePrjNW = function getTilePrjNW(tileX, tileY, res) {\n var tileSystem = this.tileSystem;\n var tileSize = this['tileSize'];\n var y = tileSystem['origin']['y'] + tileSystem['scale']['y'] * (tileY + (tileSystem['scale']['y'] === 1 ? 1 : 0)) * (res * tileSize['height']);\n var x = tileSystem['scale']['x'] * (tileX + (tileSystem['scale']['x'] === 1 ? 0 : 1)) * res * tileSize['width'] + tileSystem['origin']['x'];\n return new Coordinate(x, y);\n };\n\n TileConfig.prototype.getTilePrjSE = function getTilePrjSE(tileX, tileY, res) {\n var tileSystem = this.tileSystem;\n var tileSize = this['tileSize'];\n var y = tileSystem['origin']['y'] + tileSystem['scale']['y'] * (tileY + (tileSystem['scale']['y'] === 1 ? 0 : 1)) * (res * tileSize['height']);\n var x = tileSystem['scale']['x'] * (tileX + (tileSystem['scale']['x'] === 1 ? 1 : 0)) * res * tileSize['width'] + tileSystem['origin']['x'];\n return new Coordinate(x, y);\n };\n\n TileConfig.prototype.getTilePrjExtent = function getTilePrjExtent(tileX, tileY, res) {\n var nw = this.getTilePrjNW(tileX, tileY, res),\n se = this.getTilePrjSE(tileX, tileY, res);\n return new Extent(nw, se);\n };\n\n return TileConfig;\n}();\n\nvar options$30 = {\n\n 'urlTemplate': null,\n 'subdomains': null,\n\n 'repeatWorld': true,\n\n 'background': true,\n 'backgroundZoomDiff': 6,\n\n 'loadingLimitOnInteracting': 3,\n\n 'placeholder': false,\n\n 'crossOrigin': null,\n\n 'tileSize': [256, 256],\n\n 'offset': [0, 0],\n\n 'tileSystem': null,\n\n 'fadeAnimation': !IS_NODE,\n\n 'debug': false,\n\n 'spatialReference': null,\n\n 'maxCacheSize': 256,\n\n 'renderer': function () {\n return Browser$1.webgl ? 'gl' : 'canvas';\n }(),\n\n 'clipByPitch': true,\n\n 'maxAvailableZoom': null,\n\n 'cascadeTiles': true,\n 'minPitchToCascade': 35\n};\n\nvar urlPattern = /\\{ *([\\w_]+) *\\}/g;\n\nvar MAX_VISIBLE_SIZE = 5;\n\nvar TileLayer = function (_Layer) {\n inherits(TileLayer, _Layer);\n\n function TileLayer() {\n classCallCheck(this, TileLayer);\n return possibleConstructorReturn(this, _Layer.apply(this, arguments));\n }\n\n TileLayer.fromJSON = function fromJSON(layerJSON) {\n if (!layerJSON || layerJSON['type'] !== 'TileLayer') {\n return null;\n }\n return new TileLayer(layerJSON['id'], layerJSON['options']);\n };\n\n TileLayer.prototype.getTileSize = function getTileSize() {\n return new Size(this.options['tileSize']);\n };\n\n TileLayer.prototype.getTiles = function getTiles(z) {\n var map = this.getMap();\n var mapExtent = map.getContainerExtent();\n var tileGrids = [];\n var count = 0;\n var minZoom = this.getMinZoom();\n var minPitchToCascade = this.options['minPitchToCascade'];\n var tileZoom = isNil(z) ? this._getTileZoom(map.getZoom()) : z;\n if (!isNil(z) || !this.options['cascadeTiles'] || map.getPitch() <= minPitchToCascade || !isNil(minZoom) && tileZoom <= minZoom) {\n var _currentTiles = this._getTiles(tileZoom, mapExtent);\n if (_currentTiles) {\n count += _currentTiles.tiles.length;\n tileGrids.push(_currentTiles);\n }\n return {\n tileGrids: tileGrids, count: count\n };\n }\n\n var visualHeight = Math.floor(map._getVisualHeight(minPitchToCascade));\n var extent0 = new PointExtent(0, map.height - visualHeight, map.width, map.height);\n var currentTiles = this._getTiles(tileZoom, extent0, 0);\n count += currentTiles ? currentTiles.tiles.length : 0;\n\n var extent1 = new PointExtent(0, mapExtent.ymin, map.width, extent0.ymin);\n var d = map.getSpatialReference().getZoomDirection();\n var parentTiles = this._getTiles(tileZoom - d, extent1, 1);\n count += parentTiles ? parentTiles.tiles.length : 0;\n\n tileGrids.push(currentTiles, parentTiles);\n return {\n tileGrids: tileGrids, count: count\n };\n };\n\n TileLayer.prototype.getTileUrl = function getTileUrl(x, y, z) {\n var urlTemplate = this.options['urlTemplate'];\n var domain = '';\n if (this.options['subdomains']) {\n var subdomains = this.options['subdomains'];\n if (isArrayHasData(subdomains)) {\n var length = subdomains.length;\n var s = (x + y) % length;\n if (s < 0) {\n s = 0;\n }\n domain = subdomains[s];\n }\n }\n if (isFunction(urlTemplate)) {\n return urlTemplate(x, y, z, domain);\n }\n var data = {\n 'x': x,\n 'y': y,\n 'z': z,\n 's': domain\n };\n return urlTemplate.replace(urlPattern, function (str, key) {\n var value = data[key];\n\n if (value === undefined) {\n throw new Error('No value provided for variable ' + str);\n } else if (typeof value === 'function') {\n value = value(data);\n }\n return value;\n });\n };\n\n TileLayer.prototype.clear = function clear() {\n if (this._renderer) {\n this._renderer.clear();\n }\n\n this.fire('clear');\n return this;\n };\n\n TileLayer.prototype.toJSON = function toJSON() {\n var profile = {\n 'type': this.getJSONType(),\n 'id': this.getId(),\n 'options': this.config()\n };\n return profile;\n };\n\n TileLayer.prototype.getSpatialReference = function getSpatialReference() {\n var map = this.getMap();\n if (map && (!this.options['spatialReference'] || SpatialReference.equals(this.options['spatialReference'], map.options['spatialReference']))) {\n return map.getSpatialReference();\n }\n this._sr = this._sr || new SpatialReference(this.options['spatialReference']);\n return this._sr;\n };\n\n TileLayer.prototype._getTileZoom = function _getTileZoom(zoom) {\n var map = this.getMap();\n if (!isInteger(zoom)) {\n if (map.isZooming()) {\n zoom = zoom > map._frameZoom ? Math.floor(zoom) : Math.ceil(zoom);\n } else {\n zoom = Math.round(zoom);\n }\n }\n var maxZoom = this.options['maxAvailableZoom'];\n if (!isNil(maxZoom) && zoom > maxZoom) {\n zoom = maxZoom;\n }\n return zoom;\n };\n\n TileLayer.prototype._getTiles = function _getTiles(z, containerExtent, maskID) {\n var map = this.getMap();\n if (!map || !this.isVisible() || !map.width || !map.height) {\n return null;\n }\n var minZoom = this.getMinZoom(),\n maxZoom = this.getMaxZoom();\n if (!isNil(minZoom) && z < minZoom || !isNil(maxZoom) && z > maxZoom) {\n return null;\n }\n var tileConfig = this._getTileConfig();\n if (!tileConfig) {\n return null;\n }\n\n var zoom = z,\n sr = this.getSpatialReference(),\n mapSR = map.getSpatialReference(),\n res = sr.getResolution(zoom);\n var emptyGrid = {\n 'zoom': zoom,\n 'extent': null,\n 'tiles': []\n };\n\n var offset = this._getTileOffset(zoom),\n hasOffset = offset[0] || offset[1];\n\n var extent2d = containerExtent.convertTo(function (c) {\n return map._containerPointToPoint(c);\n })._add(offset),\n innerExtent2D = this._getInnerExtent(zoom, containerExtent, extent2d);\n\n var maskExtent = this._getMask2DExtent();\n if (maskExtent) {\n var intersection = maskExtent.intersection(extent2d);\n if (!intersection) {\n return emptyGrid;\n }\n containerExtent = intersection.convertTo(function (c) {\n return map._pointToContainerPoint(c);\n });\n }\n\n var prjCenter = map._containerPointToPrj(containerExtent.getCenter());\n var c = void 0;\n if (hasOffset) {\n c = this._project(map._pointToPrj(map._prjToPoint(prjCenter)._add(offset)));\n } else {\n c = this._project(prjCenter);\n }\n var pmin = this._project(map._pointToPrj(extent2d.getMin())),\n pmax = this._project(map._pointToPrj(extent2d.getMax()));\n\n var centerTile = tileConfig.getTileIndex(c, res),\n ltTile = tileConfig.getTileIndex(pmin, res),\n rbTile = tileConfig.getTileIndex(pmax, res);\n\n var top = Math.ceil(Math.abs(centerTile.y - ltTile.y)),\n left = Math.ceil(Math.abs(centerTile.x - ltTile.x)),\n bottom = Math.ceil(Math.abs(centerTile.y - rbTile.y)),\n right = Math.ceil(Math.abs(centerTile.x - rbTile.x));\n var layerId = this.getId(),\n renderer = this.getRenderer(),\n tileSize = this.getTileSize(),\n scale = this._getTileConfig().tileSystem.scale;\n var tiles = [],\n extent = new PointExtent();\n for (var i = -left; i <= right; i++) {\n for (var j = -top; j <= bottom; j++) {\n var idx = tileConfig.getNeighorTileIndex(centerTile['x'], centerTile['y'], i, j, res, this.options['repeatWorld']),\n pnw = tileConfig.getTilePrjNW(idx.x, idx.y, res),\n p = map._prjToPoint(this._unproject(pnw), zoom);\n var width = void 0,\n height = void 0;\n if (sr === mapSR) {\n width = tileSize.width;\n height = tileSize.height;\n } else {\n var pse = tileConfig.getTilePrjSE(idx.x, idx.y, res),\n pp = map._prjToPoint(this._unproject(pse), zoom);\n width = Math.abs(Math.round(pp.x - p.x));\n height = Math.abs(Math.round(pp.y - p.y));\n }\n var dx = scale.x * (idx.idx - idx.x) * width,\n dy = -scale.y * (idx.idy - idx.y) * height;\n if (dx || dy) {\n p._add(dx, dy);\n }\n if (sr !== mapSR) {\n width++;\n height++;\n }\n if (hasOffset) {\n p._sub(offset);\n }\n var tileExtent = new PointExtent(p, p.add(width, height)),\n tileInfo = {\n 'point': p,\n 'z': zoom,\n 'x': idx.x,\n 'y': idx.y,\n 'extent2d': tileExtent,\n 'mask': maskID\n };\n if (innerExtent2D.intersects(tileExtent) || !innerExtent2D.equals(extent2d) && this._isTileInExtent(tileInfo, containerExtent)) {\n if (hasOffset) {\n tileInfo.point._add(offset);\n tileInfo.extent2d._add(offset);\n }\n tileInfo['size'] = [width, height];\n tileInfo['dupKey'] = p.round().toArray().join() + ',' + width + ',' + height + ',' + layerId;\n tileInfo['id'] = this._getTileId(idx, zoom);\n tileInfo['layer'] = layerId;\n if (!renderer || !renderer.isTileCachedOrLoading(tileInfo.id)) {\n tileInfo['url'] = this.getTileUrl(idx.x, idx.y, zoom);\n }\n tiles.push(tileInfo);\n extent._combine(tileExtent);\n }\n }\n }\n\n var center = map._containerPointToPoint(containerExtent.getCenter(), zoom)._add(offset);\n tiles.sort(function (a, b) {\n return a.point.distanceTo(center) - b.point.distanceTo(center);\n });\n\n return {\n 'offset': offset,\n 'zoom': zoom,\n 'extent': extent,\n 'tiles': tiles\n };\n };\n\n TileLayer.prototype._getInnerExtent = function _getInnerExtent(zoom, containerExtent, extent2d) {\n var map = this.getMap(),\n res = map.getResolution(zoom),\n scale = map.getResolution() / res,\n center = extent2d.getCenter()._multi(scale),\n bearing = map.getBearing() * Math.PI / 180,\n ch = containerExtent.getHeight() / 2 * scale,\n cw = containerExtent.getWidth() / 2 * scale,\n h = Math.abs(Math.cos(bearing) * ch) || ch,\n w = Math.abs(Math.sin(bearing) * ch) || cw;\n return new PointExtent(center.sub(w, h), center.add(w, h));\n };\n\n TileLayer.prototype._getTileOffset = function _getTileOffset(z) {\n var map = this.getMap();\n var scale = map._getResolution() / map._getResolution(z);\n var offset = this.options['offset'];\n if (isFunction(offset)) {\n offset = offset(this);\n }\n offset[0] *= scale;\n offset[1] *= scale;\n return offset;\n };\n\n TileLayer.prototype._getTileId = function _getTileId(idx, zoom, id) {\n return [id || this.getId(), idx.idy, idx.idx, zoom].join('__');\n };\n\n TileLayer.prototype._project = function _project(pcoord) {\n var map = this.getMap();\n var sr = this.getSpatialReference();\n if (sr !== map.getSpatialReference()) {\n return sr.getProjection().project(map.getProjection().unproject(pcoord));\n } else {\n return pcoord;\n }\n };\n\n TileLayer.prototype._unproject = function _unproject(pcoord) {\n var map = this.getMap();\n var sr = this.getSpatialReference();\n if (sr !== map.getSpatialReference()) {\n return map.getProjection().project(sr.getProjection().unproject(pcoord));\n } else {\n return pcoord;\n }\n };\n\n TileLayer.prototype._initTileConfig = function _initTileConfig() {\n var map = this.getMap(),\n tileSize = this.getTileSize();\n var sr = this.getSpatialReference();\n var projection = sr.getProjection(),\n fullExtent = sr.getFullExtent();\n this._defaultTileConfig = new TileConfig(TileSystem.getDefault(projection), fullExtent, tileSize);\n if (this.options['tileSystem']) {\n this._tileConfig = new TileConfig(this.options['tileSystem'], fullExtent, tileSize);\n }\n\n if (map && !this._tileConfig && map.getSpatialReference() === sr && map.getBaseLayer() && map.getBaseLayer() !== this && map.getBaseLayer()._getTileConfig) {\n var base = map.getBaseLayer()._getTileConfig();\n this._tileConfig = new TileConfig(base.tileSystem, base.fullExtent, tileSize);\n }\n };\n\n TileLayer.prototype._getTileConfig = function _getTileConfig() {\n if (!this._defaultTileConfig) {\n this._initTileConfig();\n }\n return this._tileConfig || this._defaultTileConfig;\n };\n\n TileLayer.prototype._bindMap = function _bindMap(map) {\n var baseLayer = map.getBaseLayer();\n if (baseLayer === this) {\n if (!baseLayer.options.hasOwnProperty('forceRenderOnMoving')) {\n this.config({\n 'forceRenderOnMoving': true\n });\n }\n }\n return _Layer.prototype._bindMap.apply(this, arguments);\n };\n\n TileLayer.prototype._isTileInExtent = function _isTileInExtent(tileInfo, extent) {\n var map = this.getMap();\n if (!map) {\n return false;\n }\n var tileZoom = tileInfo.z;\n var tileExtent = tileInfo.extent2d.convertTo(function (c) {\n return map._pointToContainerPoint(c, tileZoom);\n });\n if (tileExtent.getWidth() < MAX_VISIBLE_SIZE || tileExtent.getHeight() < MAX_VISIBLE_SIZE) {\n return false;\n }\n return extent.intersects(tileExtent);\n };\n\n TileLayer.prototype.getEvents = function getEvents() {\n return {\n 'spatialreferencechange': this._onSpatialReferenceChange\n };\n };\n\n TileLayer.prototype._onSpatialReferenceChange = function _onSpatialReferenceChange() {\n delete this._tileConfig;\n delete this._defaultTileConfig;\n delete this._sr;\n };\n\n return TileLayer;\n}(Layer);\n\nTileLayer.registerJSONType('TileLayer');\n\nTileLayer.mergeOptions(options$30);\n\nvar GroupTileLayer = function (_TileLayer) {\n inherits(GroupTileLayer, _TileLayer);\n\n GroupTileLayer.fromJSON = function fromJSON(layerJSON) {\n if (!layerJSON || layerJSON['type'] !== 'GroupTileLayer') {\n return null;\n }\n var layers = layerJSON['layers'].map(function (json) {\n return Layer.fromJSON(json);\n });\n return new GroupTileLayer(layerJSON['id'], layers, layerJSON['options']);\n };\n\n function GroupTileLayer(id, layers, options) {\n classCallCheck(this, GroupTileLayer);\n\n var _this = possibleConstructorReturn(this, _TileLayer.call(this, id, options));\n\n _this.layers = layers || [];\n _this._checkChildren();\n _this.layerMap = {};\n _this._groupChildren = [];\n return _this;\n }\n\n GroupTileLayer.prototype.getLayers = function getLayers() {\n return this.layers;\n };\n\n GroupTileLayer.prototype.toJSON = function toJSON() {\n var profile = {\n 'type': this.getJSONType(),\n 'id': this.getId(),\n 'layers': this.layers.map(function (layer) {\n return layer.toJSON();\n }),\n 'options': this.config()\n };\n return profile;\n };\n\n GroupTileLayer.prototype.getTiles = function getTiles(z) {\n var layers = this.layers;\n var tiles = [];\n var count = 0;\n for (var i = 0, l = layers.length; i < l; i++) {\n var layer = layers[i];\n if (!layer.options['visible']) {\n continue;\n }\n var childGrid = layer.getTiles(z);\n if (!childGrid || childGrid.count === 0) {\n continue;\n }\n count += childGrid.count;\n pushIn(tiles, childGrid.tileGrids);\n }\n\n return {\n count: count,\n tileGrids: tiles\n };\n };\n\n GroupTileLayer.prototype.onAdd = function onAdd() {\n var _this2 = this;\n\n var map = this.getMap();\n this.layers.forEach(function (layer) {\n _this2.layerMap[layer.getId()] = layer;\n if (layer.getChildLayer) {\n _this2._groupChildren.push(layer);\n }\n layer._bindMap(map);\n layer.on('show hide', _this2._onLayerShowHide, _this2);\n });\n _TileLayer.prototype.onAdd.call(this);\n };\n\n GroupTileLayer.prototype.onRemove = function onRemove() {\n var _this3 = this;\n\n this.layers.forEach(function (layer) {\n layer._doRemove();\n layer.off('show hide', _this3._onLayerShowHide, _this3);\n });\n delete this.layerMap;\n delete this._groupChildren;\n _TileLayer.prototype.onRemove.call(this);\n };\n\n GroupTileLayer.prototype.getChildLayer = function getChildLayer(id) {\n var layer = this.layerMap[id];\n if (layer) {\n return layer;\n }\n for (var i = 0; i < this._groupChildren.length; i++) {\n var child = this._groupChildren[i].getChildLayer(id);\n if (child) {\n return child;\n }\n }\n return null;\n };\n\n GroupTileLayer.prototype._onLayerShowHide = function _onLayerShowHide() {\n var renderer = this.getRenderer();\n if (renderer) {\n renderer.setToRedraw();\n }\n };\n\n GroupTileLayer.prototype.isVisible = function isVisible() {\n if (!_TileLayer.prototype.isVisible.call(this)) {\n return false;\n }\n var children = this.layers;\n for (var i = 0, l = children.length; i < l; i++) {\n if (children[i].isVisible()) {\n return true;\n }\n }\n return false;\n };\n\n GroupTileLayer.prototype._checkChildren = function _checkChildren() {\n var _this4 = this;\n\n var ids = {};\n this.layers.forEach(function (layer) {\n var layerId = layer.getId();\n if (ids[layerId]) {\n throw new Error('Duplicate child layer id (' + layerId + ') in the GroupTileLayer (' + _this4.getId() + ')');\n } else {\n ids[layerId] = 1;\n }\n });\n };\n\n return GroupTileLayer;\n}(TileLayer);\n\nGroupTileLayer.registerJSONType('GroupTileLayer');\n\nvar options$31 = {\n crs: null,\n uppercase: false,\n detectRetina: false\n};\n\nvar defaultWmsParams = {\n service: 'WMS',\n request: 'GetMap',\n layers: '',\n styles: '',\n format: 'image/jpeg',\n transparent: false,\n version: '1.1.1'\n};\n\nvar WMSTileLayer = function (_TileLayer) {\n inherits(WMSTileLayer, _TileLayer);\n\n function WMSTileLayer(id, options) {\n classCallCheck(this, WMSTileLayer);\n\n var _this = possibleConstructorReturn(this, _TileLayer.call(this, id));\n\n var wmsParams = extend({}, defaultWmsParams);\n for (var p in options) {\n if (!(p in _this.options)) {\n wmsParams[p] = options[p];\n }\n }\n _this.setOptions(options);\n var r = options.detectRetina && Browser$1.retina ? 2 : 1,\n tileSize = _this.getTileSize();\n wmsParams.width = tileSize.width * r;\n wmsParams.height = tileSize.height * r;\n _this.wmsParams = wmsParams;\n _this._wmsVersion = parseFloat(wmsParams.version);\n return _this;\n }\n\n WMSTileLayer.prototype.onAdd = function onAdd() {\n var crs = this.options.crs || this.getMap().getProjection().code;\n var projectionKey = this._wmsVersion >= 1.3 ? 'crs' : 'srs';\n this.wmsParams[projectionKey] = crs;\n _TileLayer.prototype.onAdd.call(this);\n };\n\n WMSTileLayer.prototype.getTileUrl = function getTileUrl(x, y, z) {\n var map = this.getMap(),\n res = map._getResolution(z),\n tileConfig = this._getTileConfig(),\n tileExtent = tileConfig.getTilePrjExtent(x, y, res);\n var max = tileExtent.getMax(),\n min = tileExtent.getMin();\n\n var bbox = (this._wmsVersion >= 1.3 && this.wmsParams.crs === 'EPSG:4326' ? [min.y, min.x, max.y, max.x] : [min.x, min.y, max.x, max.y]).join(',');\n\n var url = _TileLayer.prototype.getTileUrl.call(this, x, y, z);\n\n return url + getParamString(this.wmsParams, url, this.options.uppercase) + (this.options.uppercase ? '&BBOX=' : '&bbox=') + bbox;\n };\n\n WMSTileLayer.prototype.toJSON = function toJSON() {\n return {\n 'type': 'WMSTileLayer',\n 'id': this.getId(),\n 'options': this.config()\n };\n };\n\n WMSTileLayer.fromJSON = function fromJSON(layerJSON) {\n if (!layerJSON || layerJSON['type'] !== 'WMSTileLayer') {\n return null;\n }\n return new WMSTileLayer(layerJSON['id'], layerJSON['options']);\n };\n\n return WMSTileLayer;\n}(TileLayer);\n\nWMSTileLayer.registerJSONType('WMSTileLayer');\n\nWMSTileLayer.mergeOptions(options$31);\n\nfunction getParamString(obj, existingUrl, uppercase) {\n var params = [];\n for (var i in obj) {\n params.push(encodeURIComponent(uppercase ? i.toUpperCase() : i) + '=' + encodeURIComponent(obj[i]));\n }\n return (!existingUrl || existingUrl.indexOf('?') === -1 ? '?' : '&') + params.join('&');\n}\n\nvar CanvasTileLayer = function (_TileLayer) {\n inherits(CanvasTileLayer, _TileLayer);\n\n function CanvasTileLayer(id, options) {\n classCallCheck(this, CanvasTileLayer);\n\n var _this = possibleConstructorReturn(this, _TileLayer.call(this, id, options));\n\n if (!_this.options.hasOwnProperty('forceRenderOnMoving')) {\n _this.options['forceRenderOnMoving'] = false;\n }\n return _this;\n }\n\n CanvasTileLayer.prototype.drawTile = function drawTile() {};\n\n CanvasTileLayer.prototype.toJSON = function toJSON() {\n return {\n 'type': 'CanvasTileLayer',\n 'id': this.getId(),\n 'options': this.config()\n };\n };\n\n CanvasTileLayer.fromJSON = function fromJSON(layerJSON) {\n if (!layerJSON || layerJSON['type'] !== 'CanvasTileLayer') {\n return null;\n }\n return new CanvasTileLayer(layerJSON['id'], layerJSON['options']);\n };\n\n return CanvasTileLayer;\n}(TileLayer);\n\nCanvasTileLayer.registerJSONType('CanvasTileLayer');\n\nfunction createGLContext(canvas, options) {\n var attributes = {\n 'alpha': true,\n 'stencil': true,\n 'preserveDrawingBuffer': true,\n 'antialias': false\n };\n var names = ['webgl', 'experimental-webgl'];\n var context = null;\n\n for (var i = 0; i < names.length; ++i) {\n try {\n context = canvas.getContext(names[i], options || attributes);\n } catch (e) {}\n if (context) {\n break;\n }\n }\n return context;\n}\n\nfunction compileShader(gl, type, source) {\n var shader = gl.createShader(type);\n\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n\n var compiled = gl.getShaderParameter(shader, gl.COMPILE_STATUS);\n if (!compiled) {\n var error = gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n throw new Error('Failed to compile shader: ' + error);\n }\n return shader;\n}\n\nfunction createProgram(gl, vert, frag) {\n var vertexShader = compileShader(gl, gl.VERTEX_SHADER, vert);\n var fragmentShader = compileShader(gl, gl.FRAGMENT_SHADER, frag);\n if (!vertexShader || !fragmentShader) {\n return null;\n }\n\n var program = gl.createProgram();\n if (!program) {\n return null;\n }\n\n gl.attachShader(program, vertexShader);\n gl.attachShader(program, fragmentShader);\n\n gl.linkProgram(program);\n return { program: program, vertexShader: vertexShader, fragmentShader: fragmentShader };\n}\n\nfunction enableVertexAttrib(gl, program, attributes) {\n if (Array.isArray(attributes[0])) {\n var FSIZE = Float32Array.BYTES_PER_ELEMENT;\n var STRIDE = 0;\n for (var i = 0; i < attributes.length; i++) {\n STRIDE += attributes[i][1] || 0;\n }\n var offset = 0;\n for (var _i = 0; _i < attributes.length; _i++) {\n var attr = gl.getAttribLocation(program, attributes[_i][0]);\n if (attr < 0) {\n throw new Error('Failed to get the storage location of ' + attributes[_i][0]);\n }\n gl.vertexAttribPointer(attr, attributes[_i][1], gl[attributes[_i][2] || 'FLOAT'], false, FSIZE * STRIDE, FSIZE * offset);\n offset += attributes[_i][1] || 0;\n gl.enableVertexAttribArray(attr);\n }\n } else {\n var _attr = gl.getAttribLocation(program, attributes[0]);\n gl.vertexAttribPointer(_attr, attributes[1], gl[attributes[2] || 'FLOAT'], false, 0, 0);\n gl.enableVertexAttribArray(_attr);\n }\n}\n\nvar shaders = {\n 'vertexShader': '\\n attribute vec3 a_position;\\n\\n attribute vec2 a_texCoord;\\n\\n uniform mat4 u_matrix;\\n\\n varying vec2 v_texCoord;\\n\\n void main() {\\n gl_Position = u_matrix * vec4(a_position, 1.0);\\n\\n v_texCoord = a_texCoord;\\n }\\n ',\n\n 'fragmentShader': '\\n precision mediump float;\\n\\n uniform sampler2D u_image;\\n\\n uniform float u_opacity;\\n\\n varying vec2 v_texCoord;\\n\\n void main() {\\n\\n gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\\n\\n }\\n '\n};\n\nvar v2 = [0, 0];\nvar v3 = [0, 0, 0];\nvar arr16 = new Array(16);\n\nvar ImageGLRenderable = function ImageGLRenderable(Base) {\n var renderable = function (_Base) {\n inherits(renderable, _Base);\n\n function renderable() {\n classCallCheck(this, renderable);\n return possibleConstructorReturn(this, _Base.apply(this, arguments));\n }\n\n renderable.prototype.drawGLImage = function drawGLImage(image, x, y, w, h, opacity) {\n var gl = this.gl;\n this.loadTexture(image);\n\n v3[0] = x || 0;\n v3[1] = y || 0;\n var uMatrix = identity(arr16);\n translate(uMatrix, uMatrix, v3);\n multiply(uMatrix, this.getMap().projViewMatrix, uMatrix);\n gl.uniformMatrix4fv(this.program['u_matrix'], false, uMatrix);\n gl.uniform1f(this.program['u_opacity'], opacity);\n if (!image.glBuffer) {\n image.glBuffer = this.bufferTileData(0, 0, w, h);\n } else {\n gl.bindBuffer(gl.ARRAY_BUFFER, image.glBuffer);\n }\n\n v2[0] = 'a_position';\n v2[1] = 3;\n this.enableVertexAttrib(v2);\n gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);\n };\n\n renderable.prototype.bufferTileData = function bufferTileData(x, y, w, h, buffer) {\n var x1 = x;\n var x2 = x + w;\n var y1 = y;\n var y2 = y + h;\n return this.loadImageBuffer(this.set12(x1, y1, 0, x1, y2, 0, x2, y1, 0, x2, y2, 0), buffer);\n };\n\n renderable.prototype.drawTinImage = function drawTinImage(image, vertices, texCoords, indices, opacity) {\n var gl = this.gl;\n this.loadTexture(image);\n gl.uniformMatrix4fv(this.program['u_matrix'], false, this.getMap().projViewMatrix);\n gl.uniform1f(this.program['u_opacity'], opacity);\n\n gl.bindBuffer(gl.ARRAY_BUFFER, this.posBuffer);\n this.enableVertexAttrib(['a_position', 3]);\n\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.DYNAMIC_DRAW);\n\n gl.bindBuffer(gl.ARRAY_BUFFER, this.texBuffer);\n this.enableVertexAttrib(['a_texCoord', 2]);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(texCoords), gl.DYNAMIC_DRAW);\n\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(indices), gl.DYNAMIC_DRAW);\n\n gl.drawElements(gl.TRIANGLES, indices.length, gl.UNSIGNED_SHORT, 0);\n };\n\n renderable.prototype.createCanvas2 = function createCanvas2() {\n this.canvas2 = Canvas.createCanvas(this.canvas.width, this.canvas.height);\n };\n\n renderable.prototype.createGLContext = function createGLContext$$1() {\n var gl = this.gl = createGLContext(this.canvas2 || this.canvas, this.layer.options['glOptions']);\n gl.clearColor(0.0, 0.0, 0.0, 0.0);\n\n gl.disable(gl.DEPTH_TEST);\n gl.enable(gl.STENCIL_TEST);\n\n gl.enable(gl.BLEND);\n gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n\n this.program = this.createProgram(shaders['vertexShader'], this.layer.options['fragmentShader'] || shaders['fragmentShader'], ['u_matrix', 'u_image', 'u_opacity']);\n this.useProgram(this.program);\n\n this.texBuffer = this.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, this.texBuffer);\n this.enableVertexAttrib(['a_texCoord', 2]);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 1.0, 1.0]), gl.STATIC_DRAW);\n\n this.enableSampler('u_image');\n\n gl.activeTexture(gl['TEXTURE0']);\n\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n\n this.posBuffer = this.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, this.posBuffer);\n this.enableVertexAttrib(['a_position', 3]);\n\n this.indicesBuffer = this.createBuffer();\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n };\n\n renderable.prototype.resizeGLCanvas = function resizeGLCanvas() {\n if (this.gl) {\n this.gl.viewport(0, 0, this.canvas.width, this.canvas.height);\n }\n if (!this.canvas2) {\n return;\n }\n if (this.canvas2.width !== this.canvas.width || this.canvas2.height !== this.canvas.height) {\n this.canvas2.width = this.canvas.width;\n this.canvas2.height = this.canvas.height;\n }\n };\n\n renderable.prototype.clearGLCanvas = function clearGLCanvas() {\n if (this.gl) {\n this.gl.clear(this.gl.COLOR_BUFFER_BIT | this.gl.STENCIL_BUFFER_BIT);\n }\n };\n\n renderable.prototype.disposeImage = function disposeImage(image) {\n if (!image) {\n return;\n }\n if (image.texture) {\n this.saveTexture(image.texture);\n }\n if (image.glBuffer) {\n this.saveImageBuffer(image.glBuffer);\n }\n delete image.texture;\n delete image.glBuffer;\n };\n\n renderable.prototype._createTexture = function _createTexture(image) {\n var gl = this.gl;\n var texture = this.getTexture() || gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);\n\n if (isInteger(log2(image.width)) && isInteger(log2(image.width))) {\n gl.generateMipmap(gl.TEXTURE_2D);\n }\n\n return texture;\n };\n\n renderable.prototype.getTexture = function getTexture() {\n if (!this._textures) {\n this._textures = [];\n }\n var textures = this._textures;\n return textures && textures.length > 0 ? textures.pop() : null;\n };\n\n renderable.prototype.saveTexture = function saveTexture(texture) {\n this._textures.push(texture);\n };\n\n renderable.prototype.loadTexture = function loadTexture(image) {\n var gl = this.gl;\n var texture = image.texture;\n if (!texture) {\n texture = this._createTexture(image);\n image.texture = texture;\n }\n gl.bindTexture(gl.TEXTURE_2D, texture);\n return texture;\n };\n\n renderable.prototype.getImageBuffer = function getImageBuffer() {\n if (!this._imageBuffers) {\n this._imageBuffers = [];\n }\n var imageBuffers = this._imageBuffers;\n return imageBuffers && imageBuffers.length > 0 ? imageBuffers.pop() : null;\n };\n\n renderable.prototype.saveImageBuffer = function saveImageBuffer(buffer) {\n this._imageBuffers.push(buffer);\n };\n\n renderable.prototype.loadImageBuffer = function loadImageBuffer(data, glBuffer) {\n var gl = this.gl;\n\n var buffer = glBuffer || this.createImageBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW);\n return buffer;\n };\n\n renderable.prototype.createImageBuffer = function createImageBuffer() {\n return this.getImageBuffer() || this.createBuffer();\n };\n\n renderable.prototype.removeGLCanvas = function removeGLCanvas() {\n var gl = this.gl;\n if (!gl) {\n return;\n }\n if (this._buffers) {\n this._buffers.forEach(function (b) {\n gl.deleteBuffer(b);\n });\n delete this._buffers;\n }\n if (this._textures) {\n this._textures.forEach(function (t) {\n return gl.deleteTexture(t);\n });\n delete this._textures;\n }\n delete this.posBuffer;\n var program = gl.program;\n gl.deleteShader(program.fragmentShader);\n gl.deleteShader(program.vertexShader);\n gl.deleteProgram(program);\n delete this.gl;\n delete this.canvas2;\n };\n\n renderable.prototype.createBuffer = function createBuffer() {\n var gl = this.gl;\n\n var buffer = gl.createBuffer();\n if (!buffer) {\n throw new Error('Failed to create the buffer object');\n }\n if (!this._buffers) {\n this._buffers = [];\n }\n this._buffers.push(buffer);\n return buffer;\n };\n\n renderable.prototype.enableVertexAttrib = function enableVertexAttrib$$1(attributes) {\n enableVertexAttrib(this.gl, this.gl.program, attributes);\n };\n\n renderable.prototype.createProgram = function createProgram$$1(vert, frag, uniforms) {\n var gl = this.gl;\n\n var _createProgram2 = createProgram(gl, vert, frag),\n program = _createProgram2.program,\n vertexShader = _createProgram2.vertexShader,\n fragmentShader = _createProgram2.fragmentShader;\n\n program.vertexShader = vertexShader;\n program.fragmentShader = fragmentShader;\n\n this._initUniforms(program, uniforms);\n return program;\n };\n\n renderable.prototype.useProgram = function useProgram(program) {\n var gl = this.gl;\n gl.useProgram(program);\n gl.program = program;\n return this;\n };\n\n renderable.prototype.enableSampler = function enableSampler(sampler, texIdx) {\n var gl = this.gl;\n var uSampler = this._getUniform(gl.program, sampler);\n if (!texIdx) {\n texIdx = 0;\n }\n\n gl.uniform1i(uSampler, texIdx);\n return uSampler;\n };\n\n renderable.prototype._initUniforms = function _initUniforms(program, uniforms) {\n for (var i = 0; i < uniforms.length; i++) {\n var name = uniforms[i];\n var uniform = uniforms[i];\n var b = name.indexOf('[');\n if (b >= 0) {\n name = name.substring(0, b);\n if (!IS_NODE) {\n uniform = uniform.substring(0, b);\n }\n }\n program[name] = this._getUniform(program, uniform);\n }\n };\n\n renderable.prototype._getUniform = function _getUniform(program, uniformName) {\n var gl = this.gl;\n var uniform = gl.getUniformLocation(program, uniformName);\n if (!uniform) {\n throw new Error('Failed to get the storage location of ' + uniformName);\n }\n return uniform;\n };\n\n return renderable;\n }(Base);\n\n extend(renderable.prototype, {\n set12: function () {\n var out = Browser$1.ie9 ? null : new Float32Array(12);\n return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) {\n out[0] = a0;\n out[1] = a1;\n out[2] = a2;\n out[3] = a3;\n out[4] = a4;\n out[5] = a5;\n out[6] = a6;\n out[7] = a7;\n out[8] = a8;\n out[9] = a9;\n out[10] = a10;\n out[11] = a11;\n return out;\n };\n }()\n });\n\n return renderable;\n};\n\nvar options$32 = {\n renderer: Browser$1.webgl ? 'gl' : 'canvas',\n crossOrigin: null\n};\n\nvar ImageLayer = function (_Layer) {\n inherits(ImageLayer, _Layer);\n\n function ImageLayer(id, images, options) {\n classCallCheck(this, ImageLayer);\n\n if (!Array.isArray(images) && !images.url) {\n options = images;\n images = null;\n }\n\n var _this = possibleConstructorReturn(this, _Layer.call(this, id, options));\n\n _this._prepareImages(images);\n return _this;\n }\n\n ImageLayer.prototype.setImages = function setImages(images) {\n this._images = images;\n this._prepareImages(images);\n return this;\n };\n\n ImageLayer.prototype.getImages = function getImages() {\n return this._images;\n };\n\n ImageLayer.prototype._prepareImages = function _prepareImages(images) {\n images = images || [];\n if (!Array.isArray(images)) {\n images = [images];\n }\n this._imageData = images.map(function (img) {\n return extend({}, img, {\n extent: new Extent(img.extent)\n });\n });\n this._images = images;\n var renderer = this.getRenderer();\n if (renderer) {\n renderer.refreshImages();\n }\n };\n\n return ImageLayer;\n}(Layer);\n\nImageLayer.mergeOptions(options$32);\n\nvar EMPTY_ARRAY = [];\n\nvar ImageLayerCanvasRenderer = function (_CanvasRenderer) {\n inherits(ImageLayerCanvasRenderer, _CanvasRenderer);\n\n function ImageLayerCanvasRenderer() {\n classCallCheck(this, ImageLayerCanvasRenderer);\n return possibleConstructorReturn(this, _CanvasRenderer.apply(this, arguments));\n }\n\n ImageLayerCanvasRenderer.prototype.isDrawable = function isDrawable() {\n if (this.getMap().getPitch()) {\n if (console) {\n console.warn('ImageLayer with canvas renderer can\\'t be pitched, use gl renderer (\\'renderer\\' : \\'gl\\') instead.');\n }\n return false;\n }\n return true;\n };\n\n ImageLayerCanvasRenderer.prototype.checkResources = function checkResources() {\n var _this3 = this;\n\n if (this._imageLoaded) {\n return EMPTY_ARRAY;\n }\n var layer = this.layer;\n var urls = layer._imageData.map(function (img) {\n return [img.url, null, null];\n });\n if (this.resources) {\n var unloaded = [];\n var resources = new ResourceCache();\n urls.forEach(function (url) {\n if (_this3.resources.isResourceLoaded(url)) {\n var img = _this3.resources.getImage(url);\n resources.addResource(url, img);\n } else {\n unloaded.push(url);\n }\n });\n this.resources.forEach(function (url, res) {\n if (!resources.isResourceLoaded(url)) {\n _this3.retireImage(res.image);\n }\n });\n this.resources = resources;\n urls = unloaded;\n }\n this._imageLoaded = true;\n return urls;\n };\n\n ImageLayerCanvasRenderer.prototype.retireImage = function retireImage() {};\n\n ImageLayerCanvasRenderer.prototype.refreshImages = function refreshImages() {\n this._imageLoaded = false;\n this.setToRedraw();\n };\n\n ImageLayerCanvasRenderer.prototype.needToRedraw = function needToRedraw() {\n var map = this.getMap();\n\n if (map.isZooming() && !map.getPitch()) {\n return false;\n }\n return _CanvasRenderer.prototype.needToRedraw.call(this);\n };\n\n ImageLayerCanvasRenderer.prototype.draw = function draw() {\n if (!this.isDrawable()) {\n return;\n }\n this.prepareCanvas();\n this._painted = false;\n this._drawImages();\n this.completeRender();\n };\n\n ImageLayerCanvasRenderer.prototype._drawImages = function _drawImages() {\n var imgData = this.layer._imageData;\n var map = this.getMap();\n var mapExtent = map.getExtent();\n if (imgData && imgData.length) {\n for (var i = 0; i < imgData.length; i++) {\n var extent = imgData[i].extent;\n var image = this.resources && this.resources.getImage(imgData[i].url);\n if (image && mapExtent.intersects(extent)) {\n this._painted = true;\n this._drawImage(image, extent, imgData[i].opacity || 1);\n }\n }\n }\n };\n\n ImageLayerCanvasRenderer.prototype._drawImage = function _drawImage(image, extent, opacity) {\n var globalAlpha = 0;\n var ctx = this.context;\n if (opacity < 1) {\n globalAlpha = ctx.globalAlpha;\n ctx.globalAlpha = opacity;\n }\n var map = this.getMap();\n var min = map.coordToPoint(extent.getMin()),\n max = map.coordToPoint(extent.getMax());\n var point = map._pointToContainerPoint(min);\n var x = point.x,\n y = point.y;\n var bearing = map.getBearing();\n if (bearing) {\n ctx.save();\n ctx.translate(x, y);\n if (bearing) {\n ctx.rotate(-bearing * Math.PI / 180);\n }\n x = y = 0;\n }\n ctx.drawImage(image, x, y, max.x - min.x, max.y - min.y);\n if (bearing) {\n ctx.restore();\n }\n if (globalAlpha) {\n ctx.globalAlpha = globalAlpha;\n }\n };\n\n ImageLayerCanvasRenderer.prototype.drawOnInteracting = function drawOnInteracting() {\n this.draw();\n };\n\n return ImageLayerCanvasRenderer;\n}(CanvasRenderer);\n\nvar ImageLayerGLRenderer = function (_ImageGLRenderable) {\n inherits(ImageLayerGLRenderer, _ImageGLRenderable);\n\n function ImageLayerGLRenderer() {\n classCallCheck(this, ImageLayerGLRenderer);\n return possibleConstructorReturn(this, _ImageGLRenderable.apply(this, arguments));\n }\n\n ImageLayerGLRenderer.prototype.isDrawable = function isDrawable() {\n return true;\n };\n\n ImageLayerGLRenderer.prototype._drawImage = function _drawImage(image, extent, opacity) {\n var map = this.getMap();\n var extent2d = extent.__imagelayerposition;\n if (!extent2d) {\n extent2d = extent.__imagelayerposition = extent.convertTo(function (c) {\n return map.coordToPoint(c, map.getGLZoom());\n });\n }\n this.drawGLImage(image, extent2d.xmin, extent2d.ymin, extent2d.getWidth(), extent2d.getHeight(), opacity);\n };\n\n ImageLayerGLRenderer.prototype.createContext = function createContext() {\n this.createGLContext();\n };\n\n ImageLayerGLRenderer.prototype.resizeCanvas = function resizeCanvas(canvasSize) {\n if (!this.canvas) {\n return;\n }\n _ImageGLRenderable.prototype.resizeCanvas.call(this, canvasSize);\n this.resizeGLCanvas();\n };\n\n ImageLayerGLRenderer.prototype.clearCanvas = function clearCanvas() {\n if (!this.canvas) {\n return;\n }\n _ImageGLRenderable.prototype.clearCanvas.call(this);\n this.clearGLCanvas();\n };\n\n ImageLayerGLRenderer.prototype.retireImage = function retireImage(image) {\n this.disposeImage(image);\n };\n\n ImageLayerGLRenderer.prototype.onRemove = function onRemove() {\n this.removeGLCanvas();\n _ImageGLRenderable.prototype.onRemove.call(this);\n };\n\n return ImageLayerGLRenderer;\n}(ImageGLRenderable(ImageLayerCanvasRenderer));\n\nImageLayer.registerRenderer('canvas', ImageLayerCanvasRenderer);\nImageLayer.registerRenderer('gl', ImageLayerGLRenderer);\n\nvar CanvasLayerRenderer = function (_CanvasRenderer) {\n inherits(CanvasLayerRenderer, _CanvasRenderer);\n\n function CanvasLayerRenderer() {\n classCallCheck(this, CanvasLayerRenderer);\n return possibleConstructorReturn(this, _CanvasRenderer.apply(this, arguments));\n }\n\n CanvasLayerRenderer.prototype.getPrepareParams = function getPrepareParams() {\n return [];\n };\n\n CanvasLayerRenderer.prototype.getDrawParams = function getDrawParams() {\n return [];\n };\n\n CanvasLayerRenderer.prototype.onCanvasCreate = function onCanvasCreate() {\n if (this.canvas && this.layer.options['doubleBuffer']) {\n this.buffer = Canvas.createCanvas(this.canvas.width, this.canvas.height, this.getMap().CanvasClass);\n }\n };\n\n CanvasLayerRenderer.prototype.needToRedraw = function needToRedraw() {\n if (this.layer.options['animation']) {\n return true;\n }\n var map = this.getMap();\n if (map.isInteracting() && !this.layer.drawOnInteracting) {\n return false;\n }\n return _CanvasRenderer.prototype.needToRedraw.call(this);\n };\n\n CanvasLayerRenderer.prototype.draw = function draw() {\n this.prepareCanvas();\n this.prepareDrawContext();\n this._drawLayer();\n };\n\n CanvasLayerRenderer.prototype.drawOnInteracting = function drawOnInteracting() {\n this._drawLayerOnInteracting();\n };\n\n CanvasLayerRenderer.prototype.getCanvasImage = function getCanvasImage() {\n var canvasImg = _CanvasRenderer.prototype.getCanvasImage.call(this);\n if (canvasImg && canvasImg.image && this.layer.options['doubleBuffer']) {\n var canvas = canvasImg.image;\n if (this.buffer.width !== canvas.width || this.buffer.height !== canvas.height) {\n this.buffer.width = canvas.width;\n this.buffer.height = canvas.height;\n }\n var bufferContext = this.buffer.getContext('2d');\n var prevent = this.layer.doubleBuffer(bufferContext, this.context);\n if (prevent === undefined || prevent) {\n Canvas.image(bufferContext, canvas, 0, 0);\n canvasImg.image = this.buffer;\n }\n }\n return canvasImg;\n };\n\n CanvasLayerRenderer.prototype.remove = function remove() {\n delete this._drawContext;\n return _CanvasRenderer.prototype.remove.call(this);\n };\n\n CanvasLayerRenderer.prototype.onZoomStart = function onZoomStart(param) {\n this.layer.onZoomStart(param);\n _CanvasRenderer.prototype.onZoomStart.call(this, param);\n };\n\n CanvasLayerRenderer.prototype.onZooming = function onZooming(param) {\n this.layer.onZooming(param);\n _CanvasRenderer.prototype.onZooming.call(this, param);\n };\n\n CanvasLayerRenderer.prototype.onZoomEnd = function onZoomEnd(param) {\n this.layer.onZoomEnd(param);\n _CanvasRenderer.prototype.onZoomEnd.call(this, param);\n };\n\n CanvasLayerRenderer.prototype.onMoveStart = function onMoveStart(param) {\n this.layer.onMoveStart(param);\n _CanvasRenderer.prototype.onMoveStart.call(this, param);\n };\n\n CanvasLayerRenderer.prototype.onMoving = function onMoving(param) {\n this.layer.onMoving(param);\n _CanvasRenderer.prototype.onMoving.call(this, param);\n };\n\n CanvasLayerRenderer.prototype.onMoveEnd = function onMoveEnd(param) {\n this.layer.onMoveEnd(param);\n _CanvasRenderer.prototype.onMoveEnd.call(this, param);\n };\n\n CanvasLayerRenderer.prototype.onResize = function onResize(param) {\n this.layer.onResize(param);\n _CanvasRenderer.prototype.onResize.call(this, param);\n };\n\n CanvasLayerRenderer.prototype.prepareDrawContext = function prepareDrawContext() {\n if (!this._predrawed) {\n var params = ensureParams(this.getPrepareParams());\n this._drawContext = this.layer.prepareToDraw.apply(this.layer, [this.context].concat(params));\n if (!this._drawContext) {\n this._drawContext = [];\n }\n if (!Array.isArray(this._drawContext)) {\n this._drawContext = [this._drawContext];\n }\n this._predrawed = true;\n }\n };\n\n CanvasLayerRenderer.prototype._prepareDrawParams = function _prepareDrawParams() {\n if (!this.getMap()) {\n return null;\n }\n var view = this.getViewExtent();\n if (view['maskExtent'] && !view['extent'].intersects(view['maskExtent'])) {\n this.completeRender();\n return null;\n }\n var args = [this.context, view];\n var params = ensureParams(this.getDrawParams());\n args.push.apply(args, params);\n args.push.apply(args, this._drawContext);\n return args;\n };\n\n CanvasLayerRenderer.prototype._drawLayer = function _drawLayer() {\n var args = this._prepareDrawParams();\n if (!args) {\n return;\n }\n this.layer.draw.apply(this.layer, args);\n this.completeRender();\n };\n\n CanvasLayerRenderer.prototype._drawLayerOnInteracting = function _drawLayerOnInteracting() {\n if (!this.layer.drawOnInteracting) {\n return;\n }\n var args = this._prepareDrawParams();\n if (!args) {\n return;\n }\n this.layer.drawOnInteracting.apply(this.layer, args);\n this.completeRender();\n };\n\n return CanvasLayerRenderer;\n}(CanvasRenderer);\n\nfunction ensureParams(params) {\n if (!params) {\n params = [];\n }\n if (!Array.isArray(params)) {\n params = [params];\n }\n return params;\n}\n\nvar options$33 = {\n 'doubleBuffer': false,\n 'animation': false\n};\n\nvar CanvasLayer = function (_Layer) {\n inherits(CanvasLayer, _Layer);\n\n function CanvasLayer() {\n classCallCheck(this, CanvasLayer);\n return possibleConstructorReturn(this, _Layer.apply(this, arguments));\n }\n\n CanvasLayer.prototype.isCanvasRender = function isCanvasRender() {\n return true;\n };\n\n CanvasLayer.prototype.prepareToDraw = function prepareToDraw() {};\n\n CanvasLayer.prototype.draw = function draw() {};\n\n CanvasLayer.prototype.redraw = function redraw() {\n if (this._getRenderer()) {\n this._getRenderer().setToRedraw();\n }\n return this;\n };\n\n CanvasLayer.prototype.play = function play() {\n this.config('animation', true);\n return this;\n };\n\n CanvasLayer.prototype.pause = function pause() {\n this.config('animation', false);\n return this;\n };\n\n CanvasLayer.prototype.isPlaying = function isPlaying() {\n return this.options['animation'];\n };\n\n CanvasLayer.prototype.clearCanvas = function clearCanvas() {\n if (this._getRenderer()) {\n this._getRenderer().clearCanvas();\n }\n return this;\n };\n\n CanvasLayer.prototype.requestMapToRender = function requestMapToRender() {\n if (this._getRenderer()) {\n this._getRenderer().requestMapToRender();\n }\n return this;\n };\n\n CanvasLayer.prototype.completeRender = function completeRender() {\n if (this._getRenderer()) {\n this._getRenderer().completeRender();\n }\n return this;\n };\n\n CanvasLayer.prototype.onCanvasCreate = function onCanvasCreate() {\n return this;\n };\n\n CanvasLayer.prototype.onZoomStart = function onZoomStart() {};\n\n CanvasLayer.prototype.onZooming = function onZooming() {};\n\n CanvasLayer.prototype.onZoomEnd = function onZoomEnd() {};\n\n CanvasLayer.prototype.onMoveStart = function onMoveStart() {};\n\n CanvasLayer.prototype.onMoving = function onMoving() {};\n\n CanvasLayer.prototype.onMoveEnd = function onMoveEnd() {};\n\n CanvasLayer.prototype.onResize = function onResize() {};\n\n CanvasLayer.prototype.doubleBuffer = function doubleBuffer(bufferContext) {\n bufferContext.clearRect(0, 0, bufferContext.canvas.width, bufferContext.canvas.height);\n return this;\n };\n\n return CanvasLayer;\n}(Layer);\n\nCanvasLayer.mergeOptions(options$33);\n\nCanvasLayer.registerRenderer('canvas', CanvasLayerRenderer);\n\nvar options$34 = {\n 'animation': true\n};\n\nvar ParticleLayer = function (_CanvasLayer) {\n inherits(ParticleLayer, _CanvasLayer);\n\n function ParticleLayer() {\n classCallCheck(this, ParticleLayer);\n return possibleConstructorReturn(this, _CanvasLayer.apply(this, arguments));\n }\n\n ParticleLayer.prototype.getParticles = function getParticles() {};\n\n ParticleLayer.prototype.draw = function draw(context, view) {\n var points = this.getParticles(now());\n if (!points || points.length === 0) {\n var renderer = this._getRenderer();\n if (renderer) {\n this._getRenderer()._shouldClear = true;\n }\n return;\n }\n var map = this.getMap();\n var extent = view.extent;\n if (view.maskExtent) {\n extent = view.extent.intersection(view.maskExtent);\n }\n extent = extent.convertTo(function (c) {\n return map._pointToContainerPoint(c);\n });\n var e = 2 * Math.PI;\n for (var i = 0, l = points.length; i < l; i++) {\n var pos = points[i].point;\n if (extent.contains(pos)) {\n var color = points[i].color || this.options['lineColor'] || '#fff',\n r = points[i].r;\n if (context.fillStyle !== color) {\n context.fillStyle = color;\n }\n if (r <= 2) {\n context.fillRect(pos.x - r / 2, pos.y - r / 2, r, r);\n } else {\n context.beginPath();\n context.arc(pos.x, pos.y, r / 2, 0, e);\n context.fill();\n }\n }\n }\n this._fillCanvas(context);\n };\n\n ParticleLayer.prototype._fillCanvas = function _fillCanvas(context) {\n var g = context.globalCompositeOperation;\n context.globalCompositeOperation = 'destination-out';\n var trail = this.options['trail'] || 30;\n context.fillStyle = 'rgba(0, 0, 0, ' + 1 / trail + ')';\n context.fillRect(0, 0, context.canvas.width, context.canvas.height);\n context.globalCompositeOperation = g;\n };\n\n return ParticleLayer;\n}(CanvasLayer);\n\nParticleLayer.mergeOptions(options$34);\n\nParticleLayer.registerRenderer('canvas', function (_CanvasLayerRenderer) {\n inherits(_class, _CanvasLayerRenderer);\n\n function _class() {\n classCallCheck(this, _class);\n return possibleConstructorReturn(this, _CanvasLayerRenderer.apply(this, arguments));\n }\n\n _class.prototype.draw = function draw() {\n if (!this.canvas || !this.layer.options['animation'] || this._shouldClear) {\n this.prepareCanvas();\n this._shouldClear = false;\n }\n this.prepareDrawContext();\n this._drawLayer();\n };\n\n _class.prototype.drawOnInteracting = function drawOnInteracting() {\n this.draw();\n this._shouldClear = false;\n };\n\n _class.prototype.onSkipDrawOnInteracting = function onSkipDrawOnInteracting() {\n this._shouldClear = true;\n };\n\n return _class;\n}(CanvasLayerRenderer));\n\nvar EDIT_STAGE_LAYER_PREFIX = INTERNAL_LAYER_PREFIX + '_edit_stage_';\n\nfunction createHandleSymbol(markerType, opacity) {\n return {\n 'markerType': markerType,\n 'markerFill': '#fff',\n 'markerLineColor': '#000',\n 'markerLineWidth': 2,\n 'markerWidth': 10,\n 'markerHeight': 10,\n 'opacity': opacity\n };\n}\n\nvar options$35 = {\n 'fixAspectRatio': false,\n\n 'symbol': null,\n 'removeVertexOn': 'contextmenu',\n\n 'centerHandleSymbol': createHandleSymbol('ellipse', 1),\n 'vertexHandleSymbol': createHandleSymbol('square', 1),\n 'newVertexHandleSymbol': createHandleSymbol('square', 0.4)\n};\n\nvar GeometryEditor = function (_Eventable) {\n inherits(GeometryEditor, _Eventable);\n\n function GeometryEditor(geometry, opts) {\n classCallCheck(this, GeometryEditor);\n\n var _this = possibleConstructorReturn(this, _Eventable.call(this, opts));\n\n _this._geometry = geometry;\n if (!_this._geometry) {\n return possibleConstructorReturn(_this);\n }\n return _this;\n }\n\n GeometryEditor.prototype.getMap = function getMap() {\n return this._geometry.getMap();\n };\n\n GeometryEditor.prototype.prepare = function prepare() {\n var map = this.getMap();\n if (!map) {\n return;\n }\n\n if (this.options['symbol']) {\n this._originalSymbol = this._geometry.getSymbol();\n this._geometry.setSymbol(this.options['symbol']);\n }\n\n this._prepareEditStageLayer();\n };\n\n GeometryEditor.prototype._prepareEditStageLayer = function _prepareEditStageLayer() {\n var map = this.getMap();\n var uid = UID();\n var stageId = EDIT_STAGE_LAYER_PREFIX + uid,\n shadowId = EDIT_STAGE_LAYER_PREFIX + uid + '_shadow';\n this._editStageLayer = map.getLayer(stageId);\n this._shadowLayer = map.getLayer(shadowId);\n if (!this._editStageLayer) {\n this._editStageLayer = new VectorLayer(stageId);\n map.addLayer(this._editStageLayer);\n }\n if (!this._shadowLayer) {\n this._shadowLayer = new VectorLayer(shadowId);\n map.addLayer(this._shadowLayer);\n }\n };\n\n GeometryEditor.prototype.start = function start() {\n var _this2 = this;\n\n if (!this._geometry || !this._geometry.getMap() || this._geometry.editing) {\n return;\n }\n var map = this.getMap();\n this.editing = true;\n var geometry = this._geometry;\n this._geometryDraggble = geometry.options['draggable'];\n geometry.config('draggable', false);\n this.prepare();\n\n var shadow = geometry.copy();\n shadow.setSymbol(geometry._getInternalSymbol());\n\n shadow.copyEventListeners(geometry);\n if (geometry._getParent()) {\n shadow.copyEventListeners(geometry._getParent());\n }\n\n shadow.setId(null).config({\n 'draggable': false\n });\n\n this._shadow = shadow;\n\n this._switchGeometryEvents('on');\n\n geometry.hide();\n if (geometry instanceof Marker || geometry instanceof Circle || geometry instanceof Rectangle || geometry instanceof Ellipse) {\n this._createOrRefreshOutline();\n }\n this._shadowLayer.bringToFront().addGeometry(shadow);\n this._editStageLayer.bringToFront();\n this._addListener([map, 'zoomstart', function () {\n _this2._editStageLayer.hide();\n }]);\n this._addListener([map, 'zoomend', function () {\n _this2._editStageLayer.show();\n }]);\n if (!(geometry instanceof Marker)) {\n this._createCenterHandle();\n } else {\n shadow.config('draggable', true);\n shadow.on('dragend', this._onMarkerDragEnd, this);\n }\n if (geometry instanceof Marker) {\n this.createMarkerEditor();\n } else if (geometry instanceof Circle) {\n this.createCircleEditor();\n } else if (geometry instanceof Rectangle) {\n this.createEllipseOrRectEditor();\n } else if (geometry instanceof Ellipse) {\n this.createEllipseOrRectEditor();\n } else if (geometry instanceof Sector) {} else if (geometry instanceof Polygon || geometry instanceof LineString) {\n this.createPolygonEditor();\n }\n };\n\n GeometryEditor.prototype.stop = function stop() {\n delete this._history;\n delete this._historyPointer;\n delete this._editOutline;\n this._switchGeometryEvents('off');\n var map = this.getMap();\n if (!map) {\n return;\n }\n delete this._shadow;\n this._geometry.config('draggable', this._geometryDraggble);\n delete this._geometryDraggble;\n this._geometry.show();\n\n this._editStageLayer.remove();\n this._shadowLayer.remove();\n this._clearAllListeners();\n this._refreshHooks = [];\n if (this.options['symbol']) {\n this._geometry.setSymbol(this._originalSymbol);\n delete this._originalSymbol;\n }\n this.editing = false;\n };\n\n GeometryEditor.prototype.isEditing = function isEditing() {\n if (isNil(this.editing)) {\n return false;\n }\n return this.editing;\n };\n\n GeometryEditor.prototype._getGeometryEvents = function _getGeometryEvents() {\n return {\n 'symbolchange': this._onGeoSymbolChange,\n 'positionchange shapechange': this._exeAndReset\n };\n };\n\n GeometryEditor.prototype._switchGeometryEvents = function _switchGeometryEvents(oper) {\n if (this._geometry) {\n var events = this._getGeometryEvents();\n for (var p in events) {\n this._geometry[oper](p, events[p], this);\n }\n }\n };\n\n GeometryEditor.prototype._onGeoSymbolChange = function _onGeoSymbolChange(param) {\n if (this._shadow) {\n this._shadow.setSymbol(param.target._getInternalSymbol());\n }\n };\n\n GeometryEditor.prototype._onMarkerDragEnd = function _onMarkerDragEnd() {\n this._update('setCoordinates', this._shadow.getCoordinates().toArray());\n this._refresh();\n };\n\n GeometryEditor.prototype._createOrRefreshOutline = function _createOrRefreshOutline() {\n var geometry = this._geometry;\n var outline = this._editOutline;\n if (!outline) {\n outline = geometry.getOutline();\n this._editStageLayer.addGeometry(outline);\n this._editOutline = outline;\n this._addRefreshHook(this._createOrRefreshOutline);\n } else {\n outline.remove();\n this._editOutline = outline = geometry.getOutline();\n this._editStageLayer.addGeometry(outline);\n }\n\n return outline;\n };\n\n GeometryEditor.prototype._createCenterHandle = function _createCenterHandle() {\n var _this3 = this;\n\n var center = this._shadow.getCenter();\n var symbol = this.options['centerHandleSymbol'];\n var shadow = void 0;\n var handle = this.createHandle(center, {\n 'symbol': symbol,\n 'cursor': 'move',\n onDown: function onDown() {\n shadow = _this3._shadow.copy();\n var symbol = lowerSymbolOpacity(shadow._getInternalSymbol(), 0.5);\n shadow.setSymbol(symbol).addTo(_this3._editStageLayer);\n },\n onMove: function onMove(v, param) {\n var offset = param['coordOffset'];\n shadow.translate(offset);\n },\n onUp: function onUp() {\n _this3._update('setCoordinates', Coordinate.toNumberArrays(shadow.getCoordinates()));\n shadow.remove();\n _this3._refresh();\n }\n });\n this._addRefreshHook(function () {\n var center = _this3._shadow.getCenter();\n handle.setCoordinates(center);\n });\n };\n\n GeometryEditor.prototype._createHandleInstance = function _createHandleInstance(coordinate, opts) {\n var symbol = opts['symbol'];\n var handle = new Marker(coordinate, {\n 'draggable': true,\n 'dragShadow': false,\n 'dragOnAxis': opts['axis'],\n 'cursor': opts['cursor'],\n 'symbol': symbol\n });\n return handle;\n };\n\n GeometryEditor.prototype.createHandle = function createHandle(coordinate, opts) {\n if (!opts) {\n opts = {};\n }\n var map = this.getMap();\n var handle = this._createHandleInstance(coordinate, opts);\n var me = this;\n\n function onHandleDragstart(param) {\n if (opts.onDown) {\n opts.onDown.call(me, param['viewPoint'], param);\n }\n return false;\n }\n\n function onHandleDragging(param) {\n me._hideContext();\n var viewPoint = map._prjToViewPoint(handle._getPrjCoordinates());\n if (opts.onMove) {\n opts.onMove.call(me, viewPoint, param);\n }\n return false;\n }\n\n function onHandleDragEnd(ev) {\n if (opts.onUp) {\n opts.onUp.call(me, ev);\n }\n return false;\n }\n\n function onHandleRemove() {\n handle.config('draggable', false);\n handle.off('dragstart', onHandleDragstart, me);\n handle.off('dragging', onHandleDragging, me);\n handle.off('dragend', onHandleDragEnd, me);\n handle.off('removestart', onHandleRemove, me);\n delete handle['maptalks--editor-refresh-fn'];\n }\n\n handle.on('dragstart', onHandleDragstart, this);\n handle.on('dragging', onHandleDragging, this);\n handle.on('dragend', onHandleDragEnd, this);\n handle.on('removestart', onHandleRemove, this);\n\n if (opts.onRefresh) {\n handle['maptalks--editor-refresh-fn'] = opts.onRefresh;\n }\n this._editStageLayer.addGeometry(handle);\n return handle;\n };\n\n GeometryEditor.prototype._createResizeHandles = function _createResizeHandles(blackList, onHandleMove, onHandleUp) {\n var _this4 = this;\n\n var cursors = ['nw-resize', 'n-resize', 'ne-resize', 'w-resize', 'e-resize', 'sw-resize', 's-resize', 'se-resize'];\n\n var axis = [null, 'y', null, 'x', 'x', null, 'y', null];\n var geometry = this._geometry;\n\n function getResizeAnchors(ext) {\n return [ext.getMin(), new Point((ext['xmax'] + ext['xmin']) / 2, ext['ymin']), new Point(ext['xmax'], ext['ymin']), new Point(ext['xmin'], (ext['ymax'] + ext['ymin']) / 2), new Point(ext['xmax'], (ext['ymax'] + ext['ymin']) / 2), new Point(ext['xmin'], ext['ymax']), new Point((ext['xmax'] + ext['xmin']) / 2, ext['ymax']), ext.getMax()];\n }\n if (!blackList) {\n blackList = [];\n }\n var me = this;\n var resizeHandles = [],\n anchorIndexes = {},\n map = this.getMap(),\n handleSymbol = this.options['vertexHandleSymbol'];\n var fnLocateHandles = function fnLocateHandles() {\n var pExt = geometry._getPainter().get2DExtent(),\n anchors = getResizeAnchors(pExt);\n\n var _loop = function _loop(i) {\n if (Array.isArray(blackList)) {\n var isBlack = blackList.some(function (ele) {\n return ele === i;\n });\n if (isBlack) {\n return 'continue';\n }\n }\n var anchor = anchors[i],\n coordinate = map.pointToCoordinate(anchor);\n if (resizeHandles.length < anchors.length - blackList.length) {\n var handle = _this4.createHandle(coordinate, {\n 'symbol': handleSymbol,\n 'cursor': cursors[i],\n 'axis': axis[i],\n onMove: function (_index) {\n return function (handleViewPoint) {\n me._updating = true;\n onHandleMove(handleViewPoint, _index);\n geometry.fire('resizing');\n };\n }(i),\n onUp: function onUp() {\n me._updating = false;\n onHandleUp();\n _this4._refresh();\n }\n });\n handle.setId(i);\n anchorIndexes[i] = resizeHandles.length;\n resizeHandles.push(handle);\n } else {\n resizeHandles[anchorIndexes[i]].setCoordinates(coordinate);\n }\n };\n\n for (var i = 0; i < anchors.length; i++) {\n var _ret = _loop(i);\n\n if (_ret === 'continue') continue;\n }\n };\n\n fnLocateHandles();\n\n this._addRefreshHook(fnLocateHandles);\n return resizeHandles;\n };\n\n GeometryEditor.prototype.createMarkerEditor = function createMarkerEditor() {\n var _this5 = this;\n\n var geometryToEdit = this._geometry,\n shadow = this._shadow,\n map = this.getMap();\n if (!shadow._canEdit()) {\n if (console) {\n console.warn('A marker can\\'t be resized with symbol:', shadow.getSymbol());\n }\n return;\n }\n\n if (!this._history) {\n this._recordHistory(getUpdates());\n }\n\n\n var symbol = shadow._getInternalSymbol();\n var dxdy = new Point(0, 0);\n if (isNumber(symbol['markerDx'])) {\n dxdy.x = symbol['markerDx'];\n }\n if (isNumber(symbol['markerDy'])) {\n dxdy.y = symbol['markerDy'];\n }\n\n var blackList = null;\n\n if (VectorMarkerSymbolizer.test(symbol)) {\n if (symbol['markerType'] === 'pin' || symbol['markerType'] === 'pie' || symbol['markerType'] === 'bar') {\n blackList = [5, 6, 7];\n }\n } else if (ImageMarkerSymbolizer.test(symbol) || VectorPathMarkerSymbolizer.test(symbol)) {\n blackList = [5, 6, 7];\n }\n\n var resizeAbilities = [2, 1, 2, 0, 0, 2, 1, 2];\n\n var aspectRatio = void 0;\n if (this.options['fixAspectRatio']) {\n var size = shadow.getSize();\n aspectRatio = size.width / size.height;\n }\n\n var resizeHandles = this._createResizeHandles(null, function (handleViewPoint, i) {\n if (blackList && blackList.indexOf(i) >= 0) {\n var newCoordinates = map.viewPointToCoordinate(handleViewPoint.sub(dxdy));\n var coordinates = shadow.getCoordinates();\n newCoordinates.x = coordinates.x;\n shadow.setCoordinates(newCoordinates);\n _this5._updateCoordFromShadow(true);\n\n var mirrorHandle = resizeHandles[resizeHandles.length - 1 - i];\n var mirrorViewPoint = map.coordToViewPoint(mirrorHandle.getCoordinates());\n handleViewPoint = mirrorViewPoint;\n }\n\n var viewCenter = map._pointToViewPoint(shadow._getCenter2DPoint()).add(dxdy),\n symbol = shadow._getInternalSymbol();\n var wh = handleViewPoint.sub(viewCenter);\n if (blackList && handleViewPoint.y > viewCenter.y) {\n wh.y = 0;\n }\n\n var r = blackList ? 1 : 2;\n var width = Math.abs(wh.x) * 2,\n height = Math.abs(wh.y) * r;\n if (aspectRatio) {\n width = Math.max(width, height * aspectRatio);\n height = width / aspectRatio;\n }\n var ability = resizeAbilities[i];\n if (!(shadow instanceof TextBox)) {\n if (aspectRatio || ability === 0 || ability === 2) {\n symbol['markerWidth'] = width;\n }\n if (aspectRatio || ability === 1 || ability === 2) {\n symbol['markerHeight'] = height;\n }\n shadow.setSymbol(symbol);\n geometryToEdit.setSymbol(symbol);\n } else {\n if (aspectRatio || ability === 0 || ability === 2) {\n shadow.setWidth(width);\n geometryToEdit.setWidth(width);\n }\n if (aspectRatio || ability === 1 || ability === 2) {\n shadow.setHeight(height);\n geometryToEdit.setHeight(height);\n }\n }\n }, function () {\n _this5._update(getUpdates());\n });\n\n function getUpdates() {\n var updates = [['setCoordinates', shadow.getCoordinates().toArray()]];\n if (shadow instanceof TextBox) {\n updates.push(['setWidth', shadow.getWidth()]);\n updates.push(['setHeight', shadow.getHeight()]);\n } else {\n updates.push(['setSymbol', shadow.getSymbol()]);\n }\n return updates;\n }\n\n function onZoomEnd() {\n this._refresh();\n }\n\n this._addListener([map, 'zoomend', onZoomEnd]);\n };\n\n GeometryEditor.prototype.createCircleEditor = function createCircleEditor() {\n var _this6 = this;\n\n var circle = this._geometry,\n shadow = this._shadow;\n var map = this.getMap();\n\n if (!this._history) {\n this._recordHistory([['setCoordinates', shadow.getCoordinates().toArray()], ['setRadius', shadow.getRadius()]]);\n }\n\n this._createResizeHandles(null, function (handleViewPoint) {\n var viewCenter = map._pointToViewPoint(shadow._getCenter2DPoint());\n var wh = handleViewPoint.sub(viewCenter);\n var w = Math.abs(wh.x),\n h = Math.abs(wh.y);\n var r = void 0;\n if (w > h) {\n r = map.pixelToDistance(w, 0);\n } else {\n r = map.pixelToDistance(0, h);\n }\n shadow.setRadius(r);\n circle.setRadius(r);\n }, function () {\n _this6._update('setRadius', shadow.getRadius());\n });\n };\n\n GeometryEditor.prototype.createEllipseOrRectEditor = function createEllipseOrRectEditor() {\n var _this7 = this;\n\n var resizeAbilities = [2, 1, 2, 0, 0, 2, 1, 2];\n var geometryToEdit = this._geometry,\n shadow = this._shadow;\n\n if (!this._history) {\n this._recordHistory(getUpdates());\n }\n\n var map = this.getMap();\n var isRect = this._geometry instanceof Rectangle;\n var aspectRatio = void 0;\n if (this.options['fixAspectRatio']) {\n aspectRatio = geometryToEdit.getWidth() / geometryToEdit.getHeight();\n }\n var resizeHandles = this._createResizeHandles(null, function (mouseViewPoint, i) {\n var r = isRect ? 1 : 2;\n var pointSub = void 0,\n w = void 0,\n h = void 0;\n var targetPoint = mouseViewPoint;\n var ability = resizeAbilities[i];\n if (isRect) {\n var mirror = resizeHandles[7 - i];\n var mirrorViewPoint = map.coordToViewPoint(mirror.getCoordinates());\n pointSub = targetPoint.sub(mirrorViewPoint);\n var absSub = pointSub.abs();\n w = map.pixelToDistance(absSub.x, 0);\n h = map.pixelToDistance(0, absSub.y);\n var size = geometryToEdit.getSize();\n if (ability === 0) {\n if (aspectRatio) {\n absSub.y = absSub.x / aspectRatio;\n size.height = Math.abs(absSub.y);\n h = w / aspectRatio;\n }\n targetPoint.y = mirrorViewPoint.y - size.height / 2;\n } else if (ability === 1) {\n if (aspectRatio) {\n absSub.x = absSub.y * aspectRatio;\n size.width = Math.abs(absSub.x);\n w = h * aspectRatio;\n }\n targetPoint.x = mirrorViewPoint.x - size.width / 2;\n } else if (aspectRatio) {\n if (w > h * aspectRatio) {\n h = w / aspectRatio;\n targetPoint.y = mirrorViewPoint.y + absSub.x * sign(pointSub.y) / aspectRatio;\n } else {\n w = h * aspectRatio;\n targetPoint.x = mirrorViewPoint.x + absSub.y * sign(pointSub.x) * aspectRatio;\n }\n }\n\n var newCoordinates = map.viewPointToCoordinate(new Point(Math.min(targetPoint.x, mirrorViewPoint.x), Math.min(targetPoint.y, mirrorViewPoint.y)));\n shadow.setCoordinates(newCoordinates);\n _this7._updateCoordFromShadow(true);\n } else {\n var viewCenter = map.coordToViewPoint(geometryToEdit.getCenter());\n pointSub = viewCenter.sub(targetPoint)._abs();\n w = map.pixelToDistance(pointSub.x, 0);\n h = map.pixelToDistance(0, pointSub.y);\n if (aspectRatio) {\n w = Math.max(w, h * aspectRatio);\n h = w / aspectRatio;\n }\n }\n\n if (aspectRatio || ability === 0 || ability === 2) {\n shadow.setWidth(w * r);\n geometryToEdit.setWidth(w * r);\n }\n if (aspectRatio || ability === 1 || ability === 2) {\n shadow.setHeight(h * r);\n geometryToEdit.setHeight(h * r);\n }\n }, function () {\n _this7._update(getUpdates());\n });\n\n function getUpdates() {\n return [['setCoordinates', shadow.getCoordinates().toArray()], ['setWidth', shadow.getWidth()], ['setHeight', shadow.getHeight()]];\n }\n };\n\n GeometryEditor.prototype.createPolygonEditor = function createPolygonEditor() {\n\n var map = this.getMap(),\n shadow = this._shadow,\n me = this,\n projection = map.getProjection();\n if (!this._history) {\n this._recordHistory('setCoordinates', Coordinate.toNumberArrays(shadow.getCoordinates()));\n }\n\n var verticeLimit = shadow instanceof Polygon ? 3 : 2;\n var propertyOfVertexRefreshFn = 'maptalks--editor-refresh-fn',\n propertyOfVertexIndex = 'maptalks--editor-vertex-index';\n var vertexHandles = [],\n newVertexHandles = [];\n\n function getVertexCoordinates() {\n if (shadow instanceof Polygon) {\n var coordinates = shadow.getCoordinates()[0];\n return coordinates.slice(0, coordinates.length - 1);\n } else {\n return shadow.getCoordinates();\n }\n }\n\n function getVertexPrjCoordinates() {\n return shadow._getPrjCoordinates();\n }\n\n function onVertexAddOrRemove() {\n for (var i = vertexHandles.length - 1; i >= 0; i--) {\n vertexHandles[i][propertyOfVertexIndex] = i;\n }\n for (var _i = newVertexHandles.length - 1; _i >= 0; _i--) {\n newVertexHandles[_i][propertyOfVertexIndex] = _i;\n }\n me._updateCoordFromShadow();\n }\n\n function removeVertex(param) {\n var handle = param['target'],\n index = handle[propertyOfVertexIndex];\n var prjCoordinates = getVertexPrjCoordinates();\n if (prjCoordinates.length <= verticeLimit) {\n return;\n }\n prjCoordinates.splice(index, 1);\n shadow._setPrjCoordinates(prjCoordinates);\n shadow._updateCache();\n\n vertexHandles.splice(index, 1)[0].remove();\n\n if (index < newVertexHandles.length) {\n newVertexHandles.splice(index, 1)[0].remove();\n }\n var nextIndex = void 0;\n if (index === 0) {\n nextIndex = newVertexHandles.length - 1;\n } else {\n nextIndex = index - 1;\n }\n newVertexHandles.splice(nextIndex, 1)[0].remove();\n\n newVertexHandles.splice(nextIndex, 0, createNewVertexHandle.call(me, nextIndex));\n onVertexAddOrRemove();\n me._refresh();\n }\n\n function moveVertexHandle(handleViewPoint, index) {\n var vertice = getVertexPrjCoordinates();\n var nVertex = map._viewPointToPrj(handleViewPoint);\n var pVertex = vertice[index];\n pVertex.x = nVertex.x;\n pVertex.y = nVertex.y;\n shadow._updateCache();\n shadow.onShapeChanged();\n me._updateCoordFromShadow(true);\n var nextIndex = void 0;\n if (index === 0) {\n nextIndex = newVertexHandles.length - 1;\n } else {\n nextIndex = index - 1;\n }\n\n if (newVertexHandles[index]) {\n newVertexHandles[index][propertyOfVertexRefreshFn]();\n }\n if (newVertexHandles[nextIndex]) {\n newVertexHandles[nextIndex][propertyOfVertexRefreshFn]();\n }\n }\n\n function createVertexHandle(index) {\n var vertex = getVertexCoordinates()[index];\n var handle = me.createHandle(vertex, {\n 'symbol': me.options['vertexHandleSymbol'],\n 'cursor': 'pointer',\n 'axis': null,\n onMove: function onMove(handleViewPoint) {\n moveVertexHandle(handleViewPoint, handle[propertyOfVertexIndex]);\n },\n onRefresh: function onRefresh() {\n vertex = getVertexCoordinates()[handle[propertyOfVertexIndex]];\n handle.setCoordinates(vertex);\n },\n onUp: function onUp() {\n me._refresh();\n me._updateCoordFromShadow();\n }\n });\n handle[propertyOfVertexIndex] = index;\n handle.on(me.options['removeVertexOn'], removeVertex);\n return handle;\n }\n\n function createNewVertexHandle(index) {\n var vertexCoordinates = getVertexCoordinates();\n var nextVertex = void 0;\n if (index + 1 >= vertexCoordinates.length) {\n nextVertex = vertexCoordinates[0];\n } else {\n nextVertex = vertexCoordinates[index + 1];\n }\n var vertex = vertexCoordinates[index].add(nextVertex).multi(1 / 2);\n var handle = me.createHandle(vertex, {\n 'symbol': me.options['newVertexHandleSymbol'],\n 'cursor': 'pointer',\n 'axis': null,\n onDown: function onDown(param, e) {\n if (e && e.domEvent && e.domEvent.button === 2) {\n return;\n }\n var prjCoordinates = getVertexPrjCoordinates();\n var vertexIndex = handle[propertyOfVertexIndex];\n\n var pVertex = projection.project(handle.getCoordinates());\n\n prjCoordinates.splice(vertexIndex + 1, 0, pVertex);\n shadow._setPrjCoordinates(prjCoordinates);\n shadow._updateCache();\n\n var symbol = handle.getSymbol();\n delete symbol['opacity'];\n handle.setSymbol(symbol);\n\n newVertexHandles.splice(vertexIndex, 0, createNewVertexHandle.call(me, vertexIndex), createNewVertexHandle.call(me, vertexIndex + 1));\n },\n onMove: function onMove(handleViewPoint) {\n moveVertexHandle(handleViewPoint, handle[propertyOfVertexIndex] + 1);\n },\n onUp: function onUp(e) {\n if (e && e.domEvent && e.domEvent.button === 2) {\n return;\n }\n var vertexIndex = handle[propertyOfVertexIndex];\n\n removeFromArray(handle, newVertexHandles);\n handle.remove();\n\n vertexHandles.splice(vertexIndex + 1, 0, createVertexHandle.call(me, vertexIndex + 1));\n onVertexAddOrRemove();\n me._updateCoordFromShadow();\n me._refresh();\n },\n onRefresh: function onRefresh() {\n vertexCoordinates = getVertexCoordinates();\n var vertexIndex = handle[propertyOfVertexIndex];\n var nextIndex = void 0;\n if (vertexIndex === vertexCoordinates.length - 1) {\n nextIndex = 0;\n } else {\n nextIndex = vertexIndex + 1;\n }\n var refreshVertex = vertexCoordinates[vertexIndex].add(vertexCoordinates[nextIndex]).multi(1 / 2);\n handle.setCoordinates(refreshVertex);\n }\n });\n handle[propertyOfVertexIndex] = index;\n return handle;\n }\n var vertexCoordinates = getVertexCoordinates();\n for (var i = 0, len = vertexCoordinates.length; i < len; i++) {\n vertexHandles.push(createVertexHandle.call(this, i));\n if (i < len - 1) {\n newVertexHandles.push(createNewVertexHandle.call(this, i));\n }\n }\n if (shadow instanceof Polygon) {\n newVertexHandles.push(createNewVertexHandle.call(this, vertexCoordinates.length - 1));\n }\n this._addRefreshHook(function () {\n for (var _i2 = newVertexHandles.length - 1; _i2 >= 0; _i2--) {\n newVertexHandles[_i2][propertyOfVertexRefreshFn]();\n }\n for (var _i3 = vertexHandles.length - 1; _i3 >= 0; _i3--) {\n vertexHandles[_i3][propertyOfVertexRefreshFn]();\n }\n });\n };\n\n GeometryEditor.prototype._refresh = function _refresh() {\n if (this._refreshHooks) {\n for (var i = this._refreshHooks.length - 1; i >= 0; i--) {\n this._refreshHooks[i].call(this);\n }\n }\n };\n\n GeometryEditor.prototype._hideContext = function _hideContext() {\n if (this._geometry) {\n this._geometry.closeMenu();\n this._geometry.closeInfoWindow();\n }\n };\n\n GeometryEditor.prototype._addListener = function _addListener(listener) {\n if (!this._eventListeners) {\n this._eventListeners = [];\n }\n this._eventListeners.push(listener);\n listener[0].on(listener[1], listener[2], this);\n };\n\n GeometryEditor.prototype._clearAllListeners = function _clearAllListeners() {\n if (this._eventListeners && this._eventListeners.length > 0) {\n for (var i = this._eventListeners.length - 1; i >= 0; i--) {\n var listener = this._eventListeners[i];\n listener[0].off(listener[1], listener[2], this);\n }\n this._eventListeners = [];\n }\n };\n\n GeometryEditor.prototype._addRefreshHook = function _addRefreshHook(fn) {\n if (!fn) {\n return;\n }\n if (!this._refreshHooks) {\n this._refreshHooks = [];\n }\n this._refreshHooks.push(fn);\n };\n\n GeometryEditor.prototype._update = function _update(method) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n this._exeHistory([method, args]);\n this._recordHistory.apply(this, [method].concat(args));\n };\n\n GeometryEditor.prototype._updateCoordFromShadow = function _updateCoordFromShadow(ignoreRecord) {\n if (!this._shadow) {\n return;\n }\n\n var coords = this._shadow.getCoordinates();\n var geo = this._geometry;\n var updating = this._updating;\n this._updating = true;\n geo.setCoordinates(coords);\n if (!ignoreRecord) {\n this._recordHistory('setCoordinates', Coordinate.toNumberArrays(geo.getCoordinates()));\n }\n this._updating = updating;\n };\n\n GeometryEditor.prototype._recordHistory = function _recordHistory(method) {\n if (!this._history) {\n this._history = [];\n this._historyPointer = 0;\n }\n\n if (this._historyPointer < this._history.length - 1) {\n this._history.splice(this._historyPointer + 1);\n }\n\n for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n this._history.push([method, args]);\n this._historyPointer = this._history.length - 1;\n\n this._geometry.fire('editrecord');\n };\n\n GeometryEditor.prototype.undo = function undo() {\n if (!this._history || this._historyPointer === 0) {\n return this;\n }\n var record = this._history[--this._historyPointer];\n this._exeAndReset(record);\n return this;\n };\n\n GeometryEditor.prototype.redo = function redo() {\n if (!this._history || this._historyPointer === this._history.length - 1) {\n return null;\n }\n var record = this._history[++this._historyPointer];\n this._exeAndReset(record);\n return this;\n };\n\n GeometryEditor.prototype._exeAndReset = function _exeAndReset(record) {\n if (this._updating) {\n return;\n }\n this._exeHistory(record);\n var history = this._history,\n pointer = this._historyPointer;\n this.stop();\n this._history = history;\n this._historyPointer = pointer;\n this.start();\n };\n\n GeometryEditor.prototype._exeHistory = function _exeHistory(record) {\n var _this8 = this;\n\n if (!Array.isArray(record)) {\n return;\n }\n var updating = this._updating;\n this._updating = true;\n var geo = this._geometry;\n if (Array.isArray(record[0])) {\n record[0].forEach(function (o) {\n var m = o[0],\n args = o.slice(1);\n _this8._shadow[m].apply(_this8._shadow, args);\n geo[m].apply(geo, args);\n });\n } else {\n this._shadow[record[0]].apply(this._shadow, record[1]);\n geo[record[0]].apply(geo, record[1]);\n }\n this._updating = updating;\n };\n\n return GeometryEditor;\n}(Eventable(Class));\n\nGeometryEditor.mergeOptions(options$35);\n\nvar TextEditable = {\n startEditText: function startEditText() {\n if (!this.getMap()) {\n return this;\n }\n this.hide();\n this.endEditText();\n this._prepareEditor();\n\n this._fireEvent('edittextstart');\n return this;\n },\n endEditText: function endEditText() {\n if (this._textEditor) {\n var html = this._textEditor.innerHTML;\n html = html.replace(/<p>/ig, '').replace(/<\\/p>/ig, '<br/>');\n this._textEditor.innerHTML = html;\n\n var content = this._textEditor.innerText.replace(/[\\r\\n]+$/gi, '');\n this.setContent(content);\n off(this._textEditor, 'mousedown dblclick', stopPropagation);\n this.getMap().off('mousedown', this.endEditText, this);\n this._editUIMarker.remove();\n delete this._editUIMarker;\n this._textEditor.onkeyup = null;\n delete this._textEditor;\n this.show();\n\n this._fireEvent('edittextend');\n }\n return this;\n },\n isEditingText: function isEditingText() {\n if (this._textEditor) {\n return true;\n }\n return false;\n },\n getTextEditor: function getTextEditor() {\n return this._editUIMarker;\n },\n _prepareEditor: function _prepareEditor() {\n var map = this.getMap();\n var editContainer = this._createEditor();\n this._textEditor = editContainer;\n map.on('mousedown', this.endEditText, this);\n var offset = this._getEditorOffset();\n this._editUIMarker = new UIMarker(this.getCoordinates(), {\n 'animation': null,\n 'content': editContainer,\n 'dx': offset.dx,\n 'dy': offset.dy\n }).addTo(map);\n this._setCursorToLast(this._textEditor);\n },\n _getEditorOffset: function _getEditorOffset() {\n var symbol = this._getInternalSymbol() || {};\n var dx = 0,\n dy = 0;\n var textAlign = symbol['textHorizontalAlignment'];\n if (textAlign === 'middle' || isNil(textAlign)) {\n dx = (symbol['textDx'] || 0) - 2;\n dy = (symbol['textDy'] || 0) - 2;\n } else {\n dx = (symbol['markerDx'] || 0) - 2;\n dy = (symbol['markerDy'] || 0) - 2;\n }\n return {\n 'dx': dx,\n 'dy': dy\n };\n },\n _createEditor: function _createEditor() {\n var content = this.getContent();\n var labelSize = this.getSize(),\n symbol = this._getInternalSymbol() || {},\n width = labelSize.width,\n textColor = symbol['textFill'] || '#000000',\n textSize = symbol['textSize'] || 12,\n height = labelSize.height,\n lineColor = symbol['markerLineColor'] || '#000',\n fill = symbol['markerFill'] || '#3398CC',\n spacing = symbol['textLineSpacing'] || 0;\n var editor = createEl('div');\n editor.contentEditable = true;\n editor.style.cssText = 'background:' + fill + '; border:1px solid ' + lineColor + ';\\n color:' + textColor + ';font-size:' + textSize + 'px;width:' + (width - 2) + 'px;height:' + (height - 2) + 'px;margin: auto;\\n line-height:' + (textSize + spacing) + 'px;outline: 0; padding:0; margin:0;word-wrap: break-word;\\n overflow: hidden;-webkit-user-modify: read-write-plaintext-only;';\n\n editor.innerText = content;\n on(editor, 'mousedown dblclick', stopPropagation);\n editor.onkeyup = function (event) {\n var h = editor.style.height || 0;\n if (event.keyCode === 13) {\n editor.style.height = parseInt(h) + textSize / 2 + 'px';\n }\n };\n return editor;\n },\n _setCursorToLast: function _setCursorToLast(obj) {\n var range = void 0;\n if (window.getSelection) {\n obj.focus();\n range = window.getSelection();\n range.selectAllChildren(obj);\n range.collapseToEnd();\n } else if (document.selection) {\n range = document.selection.createRange();\n range.moveToElementText(obj);\n range.collapse(false);\n range.select();\n }\n }\n};\n\nTextMarker.include(TextEditable);\n\nGeometry.include({\n animate: function animate(styles, options, step) {\n var _this = this;\n\n if (this._animPlayer) {\n this._animPlayer.finish();\n }\n if (isFunction(options)) {\n step = options;\n }\n if (!options) {\n options = {};\n }\n var map = this.getMap(),\n projection = this._getProjection(),\n symbol = this.getSymbol() || {},\n stylesToAnimate = this._prepareAnimationStyles(styles);\n var preTranslate = void 0;\n\n var isFocusing = options['focus'];\n delete this._animationStarted;\n\n if (map) {\n var renderer = map._getRenderer();\n var framer = function framer(fn) {\n renderer.callInNextFrame(fn);\n };\n options['framer'] = framer;\n }\n\n var player = Animation.animate(stylesToAnimate, options, function (frame) {\n if (map && map.isRemoved()) {\n player.finish();\n return;\n }\n if (map && !_this._animationStarted && isFocusing) {\n map.onMoveStart();\n }\n var styles = frame.styles;\n for (var p in styles) {\n if (p !== 'symbol' && p !== 'translate' && styles.hasOwnProperty(p)) {\n var fnName = 'set' + p[0].toUpperCase() + p.slice(1);\n _this[fnName](styles[p]);\n }\n }\n var translate = styles['translate'];\n if (translate) {\n var toTranslate = translate;\n if (preTranslate) {\n toTranslate = translate.sub(preTranslate);\n }\n preTranslate = translate;\n _this.translate(toTranslate);\n }\n var dSymbol = styles['symbol'];\n if (dSymbol) {\n _this.setSymbol(extendSymbol(symbol, dSymbol));\n }\n if (map && isFocusing) {\n var pcenter = projection.project(_this.getCenter());\n map._setPrjCenter(pcenter);\n var e = map._parseEventFromCoord(projection.unproject(pcenter));\n if (player.playState !== 'running') {\n map.onMoveEnd(e);\n } else {\n map.onMoving(e);\n }\n }\n _this._fireAnimateEvent(player.playState);\n if (step) {\n step(frame);\n }\n });\n this._animPlayer = player;\n return this._animPlayer.play();\n },\n\n _prepareAnimationStyles: function _prepareAnimationStyles(styles) {\n var symbol = this._getInternalSymbol();\n var stylesToAnimate = {};\n for (var p in styles) {\n if (styles.hasOwnProperty(p)) {\n var v = styles[p];\n if (p !== 'translate' && p !== 'symbol') {\n var fnName = 'get' + p[0].toUpperCase() + p.substring(1);\n var current = this[fnName]();\n stylesToAnimate[p] = [current, v];\n } else if (p === 'symbol') {\n var symbolToAnimate = void 0;\n if (Array.isArray(styles['symbol'])) {\n if (!Array.isArray(symbol)) {\n throw new Error('geometry\\'symbol isn\\'t a composite symbol, while the symbol in styles is.');\n }\n symbolToAnimate = [];\n var symbolInStyles = styles['symbol'];\n for (var i = 0; i < symbolInStyles.length; i++) {\n if (!symbolInStyles[i]) {\n symbolToAnimate.push(null);\n continue;\n }\n var a = {};\n for (var sp in symbolInStyles[i]) {\n if (symbolInStyles[i].hasOwnProperty(sp)) {\n a[sp] = [symbol[i][sp], symbolInStyles[i][sp]];\n }\n }\n symbolToAnimate.push(a);\n }\n } else {\n if (Array.isArray(symbol)) {\n throw new Error('geometry\\'symbol is a composite symbol, while the symbol in styles isn\\'t.');\n }\n symbolToAnimate = {};\n for (var _sp in v) {\n if (v.hasOwnProperty(_sp)) {\n symbolToAnimate[_sp] = [symbol[_sp], v[_sp]];\n }\n }\n }\n stylesToAnimate['symbol'] = symbolToAnimate;\n } else if (p === 'translate') {\n stylesToAnimate['translate'] = new Coordinate(v);\n }\n }\n }\n return stylesToAnimate;\n },\n\n _fireAnimateEvent: function _fireAnimateEvent(playState) {\n if (playState === 'finished') {\n delete this._animationStarted;\n this._fireEvent('animateend');\n } else if (playState === 'running') {\n if (this._animationStarted) {\n this._fireEvent('animating');\n } else {\n this._fireEvent('animatestart');\n this._animationStarted = true;\n }\n }\n }\n});\n\nvar DRAG_STAGE_LAYER_ID = INTERNAL_LAYER_PREFIX + '_drag_stage';\n\nvar EVENTS$2 = Browser$1.touch ? 'touchstart mousedown' : 'mousedown';\n\nvar GeometryDragHandler = function (_Handler) {\n inherits(GeometryDragHandler, _Handler);\n\n function GeometryDragHandler(target) {\n classCallCheck(this, GeometryDragHandler);\n return possibleConstructorReturn(this, _Handler.call(this, target));\n }\n\n GeometryDragHandler.prototype.addHooks = function addHooks() {\n this.target.on(EVENTS$2, this._startDrag, this);\n };\n\n GeometryDragHandler.prototype.removeHooks = function removeHooks() {\n this._endDrag();\n this.target.off(EVENTS$2, this._startDrag, this);\n delete this.container;\n };\n\n GeometryDragHandler.prototype._prepareDragHandler = function _prepareDragHandler() {\n this._dragHandler = new DragHandler(this.container);\n this._dragHandler.on('dragging', this._dragging, this).on('mouseup', this._endDrag, this).enable();\n };\n\n GeometryDragHandler.prototype._prepareShadow = function _prepareShadow() {\n var target = this.target;\n this._prepareDragStageLayer();\n if (this._shadow) {\n this._shadow.remove();\n }\n\n var shadow = this._shadow = target.copy();\n this._shadow.setSymbol(target._getInternalSymbol());\n if (target.options['dragShadow']) {\n var symbol = lowerSymbolOpacity(shadow._getInternalSymbol(), 0.5);\n shadow.setSymbol(symbol);\n }\n shadow.setId(null);\n this._prepareShadowConnectors();\n };\n\n GeometryDragHandler.prototype._prepareShadowConnectors = function _prepareShadowConnectors() {\n var target = this.target;\n var shadow = this._shadow;\n var resources = this._dragStageLayer._getRenderer().resources;\n\n var shadowConnectors = [];\n if (ConnectorLine._hasConnectors(target)) {\n var connectors = ConnectorLine._getConnectors(target);\n\n for (var i = 0, l = connectors.length; i < l; i++) {\n var targetConn = connectors[i];\n var connOptions = targetConn.config(),\n connSymbol = targetConn._getInternalSymbol();\n connOptions['symbol'] = lowerSymbolOpacity(connSymbol, 0.5);\n var conn = void 0;\n if (targetConn.getConnectSource() === target) {\n conn = new targetConn.constructor(shadow, targetConn.getConnectTarget(), connOptions);\n } else {\n conn = new targetConn.constructor(targetConn.getConnectSource(), shadow, connOptions);\n }\n shadowConnectors.push(conn);\n if (targetConn.getLayer() && targetConn.getLayer()._getRenderer()) {\n resources.merge(targetConn.getLayer()._getRenderer().resources);\n }\n }\n }\n this._shadowConnectors = shadowConnectors;\n shadowConnectors.push(shadow);\n this._dragStageLayer.bringToFront().addGeometry(shadowConnectors);\n };\n\n GeometryDragHandler.prototype._onTargetUpdated = function _onTargetUpdated() {\n if (this._shadow) {\n this._shadow.setSymbol(this.target._getSymbol());\n }\n };\n\n GeometryDragHandler.prototype._prepareDragStageLayer = function _prepareDragStageLayer() {\n var map = this.target.getMap(),\n layer = this.target.getLayer();\n this._dragStageLayer = map.getLayer(DRAG_STAGE_LAYER_ID);\n if (!this._dragStageLayer) {\n this._dragStageLayer = new VectorLayer(DRAG_STAGE_LAYER_ID, {\n enableAltitude: layer.options['enableAltitude'],\n altitudeProperty: layer.options['altitudeProperty']\n });\n map.addLayer(this._dragStageLayer);\n }\n\n var resources = new ResourceCache();\n resources.merge(layer._getRenderer().resources);\n this._dragStageLayer._getRenderer().resources = resources;\n };\n\n GeometryDragHandler.prototype._startDrag = function _startDrag(param) {\n var map = this.target.getMap();\n if (!map) {\n return;\n }\n var parent = this.target._getParent();\n if (parent) {\n return;\n }\n if (this.isDragging()) {\n return;\n }\n var domEvent = param['domEvent'];\n if (domEvent.touches && domEvent.touches.length > 1 || domEvent.button === 2) {\n return;\n }\n this.container = map._panels.mapWrapper || map._containerDOM;\n this.target.on('click', this._endDrag, this);\n this._lastCoord = this._correctCoord(param['coordinate']);\n this._lastPoint = param['containerPoint'];\n this._prepareDragHandler();\n this._dragHandler.onMouseDown(param['domEvent']);\n\n on(this.container, 'mouseleave', this._endDrag, this);\n this._startParam = param;\n this._moved = false;\n\n return;\n };\n\n GeometryDragHandler.prototype._dragging = function _dragging(param) {\n var target = this.target;\n var map = target.getMap(),\n e = map._parseEvent(param['domEvent']);\n\n var domEvent = e['domEvent'];\n if (domEvent.touches && domEvent.touches.length > 1) {\n return;\n }\n\n if (!this._moved) {\n this._moved = true;\n target.on('symbolchange', this._onTargetUpdated, this);\n this._isDragging = true;\n this._prepareShadow();\n if (!target.options['dragShadow']) {\n target.hide();\n }\n this._shadow._fireEvent('dragstart', e);\n\n this.target._fireEvent('dragstart', this._startParam || e);\n delete this._startParam;\n return;\n }\n if (!this._shadow) {\n return;\n }\n var axis = this._shadow.options['dragOnAxis'],\n coord = this._correctCoord(e['coordinate']),\n point = e['containerPoint'];\n this._lastPoint = this._lastPoint || point;\n this._lastCoord = this._lastCoord || coord;\n var pointOffset = point.sub(this._lastPoint);\n var coordOffset = coord.sub(this._lastCoord);\n if (axis === 'x') {\n pointOffset.y = coordOffset.y = 0;\n } else if (axis === 'y') {\n pointOffset.x = coordOffset.x = 0;\n }\n this._lastPoint = point;\n this._lastCoord = coord;\n this._shadow.translate(coordOffset);\n if (!target.options['dragShadow']) {\n target.translate(coordOffset);\n }\n e['coordOffset'] = coordOffset;\n e['pointOffset'] = pointOffset;\n this._shadow._fireEvent('dragging', e);\n\n target._fireEvent('dragging', e);\n };\n\n GeometryDragHandler.prototype._endDrag = function _endDrag(param) {\n if (this._dragHandler) {\n this._dragHandler.disable();\n delete this._dragHandler;\n }\n if (this.container) {\n off(this.container, 'mouseleave', this._endDrag, this);\n }\n if (!this.target) {\n return;\n }\n var target = this.target;\n target.off('click', this._endDrag, this);\n\n target.off('symbolchange', this._onTargetUpdated, this);\n\n delete this._lastCoord;\n delete this._lastPoint;\n\n this._isDragging = false;\n\n var map = target.getMap();\n if (this.enabled() && map) {\n var e = map._parseEvent(param ? param['domEvent'] : null);\n this._updateTargetAndRemoveShadow(e);\n if (this._moved) {\n target._fireEvent('dragend', e);\n }\n }\n };\n\n GeometryDragHandler.prototype.isDragging = function isDragging() {\n if (!this._isDragging) {\n return false;\n }\n return true;\n };\n\n GeometryDragHandler.prototype._updateTargetAndRemoveShadow = function _updateTargetAndRemoveShadow(eventParam) {\n var target = this.target,\n map = target.getMap();\n if (!target.options['dragShadow']) {\n target.show();\n }\n var shadow = this._shadow;\n if (shadow) {\n if (target.options['dragShadow']) {\n target.setCoordinates(shadow.getCoordinates());\n }\n shadow._fireEvent('dragend', eventParam);\n shadow.remove();\n delete this._shadow;\n }\n if (this._shadowConnectors) {\n map.getLayer(DRAG_STAGE_LAYER_ID).removeGeometry(this._shadowConnectors);\n delete this._shadowConnectors;\n }\n if (this._dragStageLayer) {\n this._dragStageLayer.remove();\n }\n };\n\n GeometryDragHandler.prototype._correctCoord = function _correctCoord(coord) {\n var map = this.target.getMap();\n if (!map.getPitch()) {\n return coord;\n }\n var painter = this.target._getPainter();\n if (!painter.getMinAltitude()) {\n return coord;\n }\n var alt = (painter.getMinAltitude() + painter.getMaxAltitude()) / 2;\n return map.locateByPoint(coord, 0, -alt);\n };\n\n return GeometryDragHandler;\n}(Handler$1);\n\nGeometry.mergeOptions({\n 'draggable': false,\n 'dragShadow': true,\n 'dragOnAxis': null\n});\n\nGeometry.addInitHook('addHandler', 'draggable', GeometryDragHandler);\n\nGeometry.include({\n isDragging: function isDragging() {\n if (this._getParent()) {\n return this._getParent().isDragging();\n }\n if (this['draggable']) {\n return this['draggable'].isDragging();\n }\n return false;\n }\n});\n\nGeometry.include({\n startEdit: function startEdit(opts) {\n if (!this.getMap() || !this.options['editable']) {\n return this;\n }\n this.endEdit();\n this._editor = new GeometryEditor(this, opts);\n this._editor.start();\n\n this.fire('editstart');\n return this;\n },\n endEdit: function endEdit() {\n if (this._editor) {\n this._editor.stop();\n delete this._editor;\n\n this.fire('editend');\n }\n return this;\n },\n redoEdit: function redoEdit() {\n if (!this.isEditing()) {\n return this;\n }\n this._editor.redo();\n\n this.fire('redoedit');\n return this;\n },\n undoEdit: function undoEdit() {\n if (!this.isEditing()) {\n return this;\n }\n this._editor.undo();\n\n this.fire('undoedit');\n return this;\n },\n isEditing: function isEditing() {\n if (this._editor) {\n return this._editor.isEditing();\n }\n return false;\n }\n});\n\nGeometry.include({\n _onEvent: function _onEvent(event, type) {\n if (!this.getMap()) {\n return;\n }\n var eventType = type || this._getEventTypeToFire(event);\n if (eventType === 'contextmenu' && this.listens('contextmenu')) {\n stopPropagation(event);\n preventDefault(event);\n }\n var params = this._getEventParams(event);\n this._fireEvent(eventType, params);\n },\n\n _getEventTypeToFire: function _getEventTypeToFire(domEvent) {\n return domEvent.type;\n },\n\n _getEventParams: function _getEventParams(e) {\n var map = this.getMap();\n var eventParam = {\n 'domEvent': e\n };\n var actual = e.touches && e.touches.length > 0 ? e.touches[0] : e.changedTouches && e.changedTouches.length > 0 ? e.changedTouches[0] : e;\n if (actual) {\n var containerPoint = getEventContainerPoint(actual, map._containerDOM);\n eventParam['coordinate'] = map.containerPointToCoordinate(containerPoint);\n eventParam['containerPoint'] = containerPoint;\n eventParam['viewPoint'] = map.containerPointToViewPoint(containerPoint);\n eventParam['pont2d'] = map._containerPointToPoint(containerPoint);\n }\n return eventParam;\n }\n});\n\nGeometry.include({\n setInfoWindow: function setInfoWindow(options) {\n this.removeInfoWindow();\n if (options instanceof InfoWindow) {\n this._infoWindow = options;\n this._infoWinOptions = extend({}, this._infoWindow.options);\n this._infoWindow.addTo(this);\n return this;\n }\n this._infoWinOptions = extend({}, options);\n if (this._infoWindow) {\n this._infoWindow.setOptions(options);\n } else if (this.getMap()) {\n this._bindInfoWindow(this._infoWinOptions);\n }\n\n return this;\n },\n getInfoWindow: function getInfoWindow() {\n if (!this._infoWindow) {\n return null;\n }\n return this._infoWindow;\n },\n openInfoWindow: function openInfoWindow(coordinate) {\n if (!this.getMap()) {\n return this;\n }\n if (!coordinate) {\n coordinate = this.getCenter();\n }\n if (!this._infoWindow) {\n if (this._infoWinOptions && this.getMap()) {\n this._bindInfoWindow(this._infoWinOptions);\n this._infoWindow.show(coordinate);\n }\n } else {\n this._infoWindow.show(coordinate);\n }\n return this;\n },\n closeInfoWindow: function closeInfoWindow() {\n if (this._infoWindow) {\n this._infoWindow.hide();\n }\n return this;\n },\n removeInfoWindow: function removeInfoWindow() {\n this._unbindInfoWindow();\n delete this._infoWinOptions;\n delete this._infoWindow;\n return this;\n },\n _bindInfoWindow: function _bindInfoWindow(options) {\n this._infoWindow = new InfoWindow(options);\n this._infoWindow.addTo(this);\n\n return this;\n },\n _unbindInfoWindow: function _unbindInfoWindow() {\n if (this._infoWindow) {\n this.closeInfoWindow();\n this._infoWindow.remove();\n delete this._infoWindow;\n }\n return this;\n }\n});\n\nvar LRUCache = function () {\n function LRUCache(max, onRemove) {\n classCallCheck(this, LRUCache);\n\n this.max = max;\n this.onRemove = onRemove;\n this.reset();\n }\n\n LRUCache.prototype.reset = function reset() {\n for (var key in this.data) {\n this.onRemove(this.data[key]);\n }\n\n this.data = {};\n this.order = [];\n\n return this;\n };\n\n LRUCache.prototype.clear = function clear() {\n this.reset();\n delete this.onRemove;\n };\n\n LRUCache.prototype.add = function add(key, data) {\n\n if (this.has(key)) {\n this.order.splice(this.order.indexOf(key), 1);\n this.data[key] = data;\n this.order.push(key);\n } else {\n this.data[key] = data;\n this.order.push(key);\n\n if (this.order.length > this.max) {\n var removedData = this.getAndRemove(this.order[0]);\n if (removedData) this.onRemove(removedData);\n }\n }\n\n return this;\n };\n\n LRUCache.prototype.has = function has(key) {\n return key in this.data;\n };\n\n LRUCache.prototype.keys = function keys() {\n return this.order;\n };\n\n LRUCache.prototype.getAndRemove = function getAndRemove(key) {\n if (!this.has(key)) {\n return null;\n }\n\n var data = this.data[key];\n\n delete this.data[key];\n this.order.splice(this.order.indexOf(key), 1);\n\n return data;\n };\n\n LRUCache.prototype.get = function get$$1(key) {\n if (!this.has(key)) {\n return null;\n }\n\n var data = this.data[key];\n return data;\n };\n\n LRUCache.prototype.remove = function remove(key) {\n if (!this.has(key)) {\n return this;\n }\n\n var data = this.data[key];\n delete this.data[key];\n this.onRemove(data);\n this.order.splice(this.order.indexOf(key), 1);\n\n return this;\n };\n\n LRUCache.prototype.setMaxSize = function setMaxSize(max) {\n this.max = max;\n\n while (this.order.length > this.max) {\n var removedData = this.getAndRemove(this.order[0]);\n if (removedData) this.onRemove(removedData);\n }\n\n return this;\n };\n\n return LRUCache;\n}();\n\nvar TileLayerCanvasRenderer = function (_CanvasRenderer) {\n inherits(TileLayerCanvasRenderer, _CanvasRenderer);\n\n function TileLayerCanvasRenderer(layer) {\n classCallCheck(this, TileLayerCanvasRenderer);\n\n var _this = possibleConstructorReturn(this, _CanvasRenderer.call(this, layer));\n\n _this.tilesInView = {};\n _this.tilesLoading = {};\n _this._parentTiles = [];\n _this._childTiles = [];\n _this.tileCache = new LRUCache(layer.options['maxCacheSize'], _this.deleteTile.bind(_this));\n return _this;\n }\n\n TileLayerCanvasRenderer.prototype.draw = function draw() {\n var map = this.getMap();\n if (!this.isDrawable()) {\n return;\n }\n var mask2DExtent = this.prepareCanvas();\n if (mask2DExtent) {\n if (!mask2DExtent.intersects(this.canvasExtent2D)) {\n this.completeRender();\n return;\n }\n }\n var layer = this.layer;\n var tileGrids = layer.getTiles().tileGrids;\n if (!tileGrids || !tileGrids.length) {\n this.completeRender();\n return;\n }\n\n var loadingCount = 0;\n var loading = false;\n var checkedTiles = {};\n var tiles = [],\n parentTiles = [],\n parentKeys = {},\n childTiles = [],\n childKeys = {},\n placeholders = [],\n placeholderKeys = {};\n\n var tileQueue = {};\n var preLoadingCount = this._markTiles(),\n loadingLimit = this._getLoadLimit();\n\n var l = tileGrids.length;\n\n this._tileZoom = tileGrids[0]['zoom'];\n this._tileOffset = tileGrids[0]['offset'];\n\n for (var i = 0; i < l; i++) {\n var tileGrid = tileGrids[i];\n var allTiles = tileGrid['tiles'];\n\n var placeholder = this._generatePlaceHolder(tileGrid.zoom);\n\n for (var _i = 0, _l = allTiles.length; _i < _l; _i++) {\n var tile = allTiles[_i],\n tileId = tile['id'];\n\n var cached = this._getCachedTile(tileId);\n var tileLoading = false;\n if (this._isLoadingTile(tileId)) {\n tileLoading = loading = true;\n this.tilesLoading[tileId].current = true;\n } else if (cached) {\n if (this.getTileOpacity(cached.image) < 1) {\n tileLoading = loading = true;\n }\n tiles.push(cached);\n } else {\n tileLoading = loading = true;\n var hitLimit = loadingLimit && loadingCount + preLoadingCount[0] > loadingLimit;\n if (!hitLimit && (!map.isInteracting() || map.isMoving() || map.isRotating())) {\n loadingCount++;\n tileQueue[tileId + '@' + tile['point'].toArray().join()] = tile;\n }\n }\n if (!tileLoading) continue;\n if (checkedTiles[tile.dupKey]) {\n continue;\n }\n\n checkedTiles[tile.dupKey] = 1;\n if (placeholder && !placeholderKeys[tile.dupKey]) {\n tile.cache = false;\n placeholders.push({\n image: placeholder,\n info: tile\n });\n\n placeholderKeys[tile.dupKey] = 1;\n }\n\n var parentTile = this._findParentTile(tile);\n if (parentTile) {\n var dupKey = parentTile.info.dupKey;\n if (parentKeys[dupKey] === undefined) {\n parentKeys[dupKey] = parentTiles.length;\n parentTiles.push(parentTile);\n }\n } else {\n var children = this._findChildTiles(tile);\n if (children.length) {\n children.forEach(function (c) {\n if (!childKeys[c.info.dupKey]) {\n childTiles.push(c);\n childKeys[c.info.dupKey] = 1;\n }\n });\n }\n }\n }\n }\n\n this._drawTiles(tiles, parentTiles, childTiles, placeholders);\n if (!loadingCount) {\n if (!loading) {\n if (!map.isAnimating() && this._parentTiles.length > 0) {\n this._parentTiles = [];\n this._childTiles = [];\n this.setToRedraw();\n }\n this.completeRender();\n }\n } else {\n this.loadTileQueue(tileQueue);\n }\n this._retireTiles();\n };\n\n TileLayerCanvasRenderer.prototype.isTileCachedOrLoading = function isTileCachedOrLoading(tileId) {\n return this.tilesLoading[tileId] || this.tilesInView[tileId] || this.tileCache.has(tileId);\n };\n\n TileLayerCanvasRenderer.prototype._drawTiles = function _drawTiles(tiles, parentTiles, childTiles, placeholders) {\n var _this2 = this;\n\n if (parentTiles.length) {\n parentTiles.sort(function (t1, t2) {\n return Math.abs(t2.info.z - _this2._tileZoom) - Math.abs(t1.info.z - _this2._tileZoom);\n });\n this._parentTiles = parentTiles;\n }\n if (childTiles.length) {\n this._childTiles = childTiles;\n }\n\n var context = { tiles: tiles, parentTiles: parentTiles, childTiles: childTiles };\n this.onDrawTileStart(context);\n\n this._parentTiles.forEach(function (t) {\n return _this2._drawTileAndCache(t);\n });\n this._childTiles.forEach(function (t) {\n return _this2._drawTileOffset(t.info, t.image);\n });\n\n placeholders.forEach(function (t) {\n return _this2._drawTileOffset(t.info, t.image);\n });\n\n var layer = this.layer,\n map = this.getMap();\n if (!layer.options['cascadeTiles'] || map.getPitch() <= layer.options['minPitchToCascade']) {\n tiles.forEach(function (t) {\n return _this2._drawTileAndCache(t);\n });\n } else {\n this.writeZoomStencil();\n var started = false;\n for (var i = 0, l = tiles.length; i < l; i++) {\n if (tiles[i].info.z !== this._tileZoom) {\n if (!started) {\n this.startZoomStencilTest();\n started = true;\n } else {\n this.resumeZoomStencilTest();\n }\n } else if (started) {\n this.pauseZoomStencilTest();\n }\n this._drawTileAndCache(tiles[i]);\n }\n this.endZoomStencilTest();\n }\n\n this.onDrawTileEnd(context);\n };\n\n TileLayerCanvasRenderer.prototype.writeZoomStencil = function writeZoomStencil() {};\n\n TileLayerCanvasRenderer.prototype.startZoomStencilTest = function startZoomStencilTest() {};\n\n TileLayerCanvasRenderer.prototype.endZoomStencilTest = function endZoomStencilTest() {};\n\n TileLayerCanvasRenderer.prototype.pauseZoomStencilTest = function pauseZoomStencilTest() {};\n\n TileLayerCanvasRenderer.prototype.resumeZoomStencilTest = function resumeZoomStencilTest() {};\n\n TileLayerCanvasRenderer.prototype.onDrawTileStart = function onDrawTileStart() {};\n\n TileLayerCanvasRenderer.prototype.onDrawTileEnd = function onDrawTileEnd() {};\n\n TileLayerCanvasRenderer.prototype._drawTileOffset = function _drawTileOffset(info, image) {\n var offset = this._tileOffset;\n if (!offset[0] && !offset[1]) {\n this.drawTile(info, image);\n return;\n }\n var map = this.getMap();\n\n var scale = map._getResolution(this._tileZoom) / map._getResolution(info.z);\n offset[0] *= scale;\n offset[1] *= scale;\n info.point._sub(offset);\n info.extent2d._sub(offset);\n this.drawTile(info, image);\n\n info.point._add(offset);\n info.extent2d._add(offset);\n offset[0] /= scale;\n offset[1] /= scale;\n };\n\n TileLayerCanvasRenderer.prototype._drawTileAndCache = function _drawTileAndCache(tile) {\n tile.current = true;\n this.tilesInView[tile.info.id] = tile;\n this._drawTileOffset(tile.info, tile.image);\n this.tileCache.add(tile.info.id, tile);\n };\n\n TileLayerCanvasRenderer.prototype.drawOnInteracting = function drawOnInteracting() {\n this.draw();\n };\n\n TileLayerCanvasRenderer.prototype.needToRedraw = function needToRedraw() {\n var map = this.getMap();\n if (map.getPitch()) {\n return _CanvasRenderer.prototype.needToRedraw.call(this);\n }\n if (map.isRotating() || map.isZooming()) {\n return true;\n }\n if (map.isMoving()) {\n return !!this.layer.options['forceRenderOnMoving'];\n }\n return _CanvasRenderer.prototype.needToRedraw.call(this);\n };\n\n TileLayerCanvasRenderer.prototype.hitDetect = function hitDetect() {\n return false;\n };\n\n TileLayerCanvasRenderer.prototype._getLoadLimit = function _getLoadLimit() {\n if (this.getMap().isInteracting()) {\n return this.layer.options['loadingLimitOnInteracting'];\n }\n return 0;\n };\n\n TileLayerCanvasRenderer.prototype.isDrawable = function isDrawable() {\n if (this.getMap().getPitch()) {\n if (console) {\n console.warn('TileLayer with canvas renderer can\\'t be pitched, use gl renderer (\\'renderer\\' : \\'gl\\') instead.');\n }\n this.clear();\n return false;\n }\n return true;\n };\n\n TileLayerCanvasRenderer.prototype.clear = function clear() {\n this._retireTiles(true);\n this.tileCache.reset();\n this.tilesInView = {};\n this.tilesLoading = {};\n this._parentTiles = [];\n this._childTiles = [];\n _CanvasRenderer.prototype.clear.call(this);\n };\n\n TileLayerCanvasRenderer.prototype._isLoadingTile = function _isLoadingTile(tileId) {\n return !!this.tilesLoading[tileId];\n };\n\n TileLayerCanvasRenderer.prototype.clipCanvas = function clipCanvas(context) {\n var mask = this.layer.getMask();\n if (!mask) {\n return this._clipByPitch(context);\n }\n return _CanvasRenderer.prototype.clipCanvas.call(this, context);\n };\n\n TileLayerCanvasRenderer.prototype._clipByPitch = function _clipByPitch(ctx) {\n var map = this.getMap();\n if (map.getPitch() <= map.options['maxVisualPitch']) {\n return false;\n }\n if (!this.layer.options['clipByPitch']) {\n return false;\n }\n var clipExtent = map.getContainerExtent();\n var r = Browser$1.retina ? 2 : 1;\n ctx.save();\n ctx.strokeStyle = 'rgba(0, 0, 0, 0)';\n ctx.beginPath();\n ctx.rect(0, Math.ceil(clipExtent.ymin) * r, Math.ceil(clipExtent.getWidth()) * r, Math.ceil(clipExtent.getHeight()) * r);\n ctx.stroke();\n ctx.clip();\n return true;\n };\n\n TileLayerCanvasRenderer.prototype.loadTileQueue = function loadTileQueue(tileQueue) {\n for (var p in tileQueue) {\n if (tileQueue.hasOwnProperty(p)) {\n var tile = tileQueue[p];\n var tileImage = this.loadTile(tile);\n if (tileImage.loadTime === undefined) {\n this.tilesLoading[tile['id']] = {\n image: tileImage,\n current: true,\n info: tile\n };\n }\n }\n }\n };\n\n TileLayerCanvasRenderer.prototype.loadTile = function loadTile(tile) {\n var tileSize = this.layer.getTileSize();\n var tileImage = new Image();\n\n tileImage.width = tileSize['width'];\n tileImage.height = tileSize['height'];\n\n tileImage.onload = this.onTileLoad.bind(this, tileImage, tile);\n tileImage.onerror = this.onTileError.bind(this, tileImage, tile);\n\n var crossOrigin = this.layer.options['crossOrigin'];\n if (!isNil(crossOrigin)) {\n tileImage.crossOrigin = crossOrigin;\n }\n this.loadTileImage(tileImage, tile['url']);\n return tileImage;\n };\n\n TileLayerCanvasRenderer.prototype.loadTileImage = function loadTileImage(tileImage, url) {\n return loadImage(tileImage, [url]);\n };\n\n TileLayerCanvasRenderer.prototype.abortTileLoading = function abortTileLoading(tileImage) {\n if (!tileImage) return;\n tileImage.onload = falseFn;\n tileImage.onerror = falseFn;\n tileImage.src = emptyImageUrl;\n };\n\n TileLayerCanvasRenderer.prototype.onTileLoad = function onTileLoad(tileImage, tileInfo) {\n if (!this.layer) {\n return;\n }\n var id = tileInfo['id'];\n if (!this.tilesInView) {\n return;\n }\n tileImage.loadTime = now();\n delete this.tilesLoading[id];\n this._addTileToCache(tileInfo, tileImage);\n this.setToRedraw();\n\n this.layer.fire('tileload', { tile: tileInfo, tileImage: tileImage });\n };\n\n TileLayerCanvasRenderer.prototype.onTileError = function onTileError(tileImage, tileInfo) {\n if (!this.layer) {\n return;\n }\n if (tileImage instanceof Image) {\n this.abortTileLoading(tileImage);\n }\n tileImage.loadTime = 0;\n delete this.tilesLoading[tileInfo['id']];\n this._addTileToCache(tileInfo, tileImage);\n this.setToRedraw();\n\n this.layer.fire('tileerror', { tile: tileInfo });\n };\n\n TileLayerCanvasRenderer.prototype.drawTile = function drawTile(tileInfo, tileImage) {\n if (!tileImage || !this.getMap()) {\n return;\n }\n var point = tileInfo.point,\n tileZoom = tileInfo.z,\n tileId = tileInfo.id;\n var map = this.getMap(),\n tileSize = tileInfo.size,\n zoom = map.getZoom(),\n ctx = this.context,\n cp = map._pointToContainerPoint(point, tileZoom),\n bearing = map.getBearing(),\n transformed = bearing || zoom !== tileZoom;\n var opacity = this.getTileOpacity(tileImage);\n var alpha = ctx.globalAlpha;\n if (opacity < 1) {\n ctx.globalAlpha = opacity;\n this.setToRedraw();\n }\n if (!transformed) {\n cp._round();\n }\n var x = cp.x,\n y = cp.y;\n var w = tileSize[0],\n h = tileSize[1];\n if (transformed) {\n w++;\n h++;\n ctx.save();\n ctx.translate(x, y);\n if (bearing) {\n ctx.rotate(-bearing * Math.PI / 180);\n }\n if (zoom !== tileZoom) {\n var scale = map._getResolution(tileZoom) / map._getResolution();\n ctx.scale(scale, scale);\n }\n x = y = 0;\n }\n Canvas.image(ctx, tileImage, x, y, w, h);\n if (this.layer.options['debug']) {\n var p = new Point(x, y),\n color = this.layer.options['debugOutline'],\n xyz = tileId.split('__');\n ctx.save();\n ctx.strokeStyle = color;\n ctx.fillStyle = color;\n ctx.strokeWidth = 10;\n ctx.font = '15px monospace';\n Canvas.rectangle(ctx, p, tileSize, 1, 0);\n Canvas.fillText(ctx, 'x:' + xyz[2] + ', y:' + xyz[1] + ', z:' + xyz[3], p.add(10, 20), color);\n Canvas.drawCross(ctx, p.add(w / 2, h / 2), 2, color);\n ctx.restore();\n }\n if (transformed) {\n ctx.restore();\n }\n if (ctx.globalAlpha !== alpha) {\n ctx.globalAlpha = alpha;\n }\n this.setCanvasUpdated();\n };\n\n TileLayerCanvasRenderer.prototype._findChildTiles = function _findChildTiles(info) {\n var layer = this._getLayerOfTile(info.layer);\n if (!layer.options['background']) {\n return [];\n }\n var map = this.getMap();\n var children = [];\n var min = info.extent2d.getMin(),\n max = info.extent2d.getMax(),\n pmin = layer._project(map._pointToPrj(min, info.z)),\n pmax = layer._project(map._pointToPrj(max, info.z));\n var zoomDiff = 3;\n for (var i = 1; i < zoomDiff; i++) {\n this._findChildTilesAt(children, pmin, pmax, layer, info.z + i);\n }\n\n return children;\n };\n\n TileLayerCanvasRenderer.prototype._findChildTilesAt = function _findChildTilesAt(children, pmin, pmax, layer, childZoom) {\n var layerId = layer.getId(),\n res = layer.getSpatialReference().getResolution(childZoom);\n var dmin = layer._getTileConfig().getTileIndex(pmin, res),\n dmax = layer._getTileConfig().getTileIndex(pmax, res);\n var sx = Math.min(dmin.idx, dmax.idx),\n ex = Math.max(dmin.idx, dmax.idx);\n var sy = Math.min(dmin.idy, dmax.idy),\n ey = Math.max(dmin.idy, dmax.idy);\n var id = void 0,\n tile = void 0;\n for (var i = sx; i < ex; i++) {\n for (var ii = sy; ii < ey; ii++) {\n id = layer._getTileId({ idx: i, idy: ii }, childZoom, layerId);\n if (this.tileCache.has(id)) {\n tile = this.tileCache.getAndRemove(id);\n children.push(tile);\n this.tileCache.add(id, tile);\n }\n }\n }\n };\n\n TileLayerCanvasRenderer.prototype._findParentTile = function _findParentTile(info) {\n var map = this.getMap(),\n layer = this._getLayerOfTile(info.layer);\n if (!layer.options['background']) {\n return null;\n }\n var sr = layer.getSpatialReference();\n var d = sr.getZoomDirection(),\n zoomDiff = layer.options['backgroundZoomDiff'];\n var center = info.extent2d.getCenter(),\n prj = layer._project(map._pointToPrj(center, info.z));\n for (var diff = 1; diff <= zoomDiff; diff++) {\n var z = info.z - d * diff;\n var res = sr.getResolution(z);\n var tileIndex = layer._getTileConfig().getTileIndex(prj, res);\n var id = layer._getTileId(tileIndex, z, info.layer);\n if (this.tileCache.has(id)) {\n var tile = this.tileCache.getAndRemove(id);\n this.tileCache.add(id, tile);\n return tile;\n }\n }\n return null;\n };\n\n TileLayerCanvasRenderer.prototype._getLayerOfTile = function _getLayerOfTile(layerId) {\n return this.layer.getChildLayer ? this.layer.getChildLayer(layerId) : this.layer;\n };\n\n TileLayerCanvasRenderer.prototype._getCachedTile = function _getCachedTile(tileId) {\n var tilesInView = this.tilesInView;\n var cached = this.tileCache.getAndRemove(tileId);\n if (cached) {\n tilesInView[tileId] = cached;\n var tilesLoading = this.tilesLoading;\n if (tilesLoading && tilesLoading[tileId]) {\n tilesLoading[tileId].current = false;\n this.abortTileLoading(tilesLoading[tileId]);\n delete tilesLoading[tileId];\n }\n } else {\n cached = tilesInView[tileId];\n }\n return cached;\n };\n\n TileLayerCanvasRenderer.prototype._addTileToCache = function _addTileToCache(tileInfo, tileImage) {\n this.tilesInView[tileInfo.id] = {\n image: tileImage,\n current: true,\n info: tileInfo\n };\n };\n\n TileLayerCanvasRenderer.prototype.getTileOpacity = function getTileOpacity(tileImage) {\n if (!this.layer.options['fadeAnimation'] || !tileImage.loadTime) {\n return 1;\n }\n return Math.min(1, (now() - tileImage.loadTime) / (1000 / 60 * 10));\n };\n\n TileLayerCanvasRenderer.prototype.onRemove = function onRemove() {\n this.clear();\n delete this.tileCache;\n delete this._tilePlaceHolder;\n _CanvasRenderer.prototype.onRemove.call(this);\n };\n\n TileLayerCanvasRenderer.prototype._markTiles = function _markTiles() {\n var a = 0,\n b = 0;\n if (this.tilesLoading) {\n for (var p in this.tilesLoading) {\n this.tilesLoading[p].current = false;\n a++;\n }\n }\n if (this.tilesInView) {\n for (var _p in this.tilesInView) {\n this.tilesInView[_p].current = false;\n b++;\n }\n }\n return [a, b];\n };\n\n TileLayerCanvasRenderer.prototype._retireTiles = function _retireTiles(force) {\n for (var i in this.tilesLoading) {\n var tile = this.tilesLoading[i];\n if (force || !tile.current) {\n if (tile.image) {\n this.abortTileLoading(tile.image);\n }\n this.deleteTile(tile);\n delete this.tilesLoading[i];\n }\n }\n for (var _i2 in this.tilesInView) {\n var _tile = this.tilesInView[_i2];\n if (!_tile.current) {\n delete this.tilesInView[_i2];\n if (!this.tileCache.has(_i2)) {\n this.deleteTile(_tile);\n }\n }\n }\n };\n\n TileLayerCanvasRenderer.prototype.deleteTile = function deleteTile(tile) {\n if (!tile || !tile.image) {\n return;\n }\n tile.image.onload = null;\n tile.image.onerror = null;\n };\n\n TileLayerCanvasRenderer.prototype._generatePlaceHolder = function _generatePlaceHolder(z) {\n var map = this.getMap();\n var placeholder = this.layer.options['placeholder'];\n if (!placeholder || map.getPitch()) {\n return null;\n }\n var tileSize = this.layer.getTileSize(),\n scale = map._getResolution(z) / map._getResolution(),\n canvas = this._tilePlaceHolder = this._tilePlaceHolder || Canvas.createCanvas(1, 1);\n canvas.width = tileSize.width * scale;\n canvas.height = tileSize.height * scale;\n if (isFunction(placeholder)) {\n placeholder(canvas);\n } else {\n defaultPlaceholder(canvas);\n }\n return canvas;\n };\n\n return TileLayerCanvasRenderer;\n}(CanvasRenderer);\n\nTileLayer.registerRenderer('canvas', TileLayerCanvasRenderer);\n\nfunction falseFn() {\n return false;\n}\n\nfunction defaultPlaceholder(canvas) {\n var ctx = canvas.getContext('2d'),\n cw = canvas.width,\n ch = canvas.height,\n w = cw / 16,\n h = ch / 16;\n ctx.beginPath();\n for (var i = 0; i < 16; i++) {\n ctx.moveTo(0, i * h);\n ctx.lineTo(cw, i * h);\n ctx.moveTo(i * w, 0);\n ctx.lineTo(i * w, ch);\n }\n ctx.strokeStyle = 'rgba(180, 180, 180, 0.1)';\n ctx.lineWidth = 1;\n ctx.stroke();\n ctx.beginPath();\n var path = [[0, 0], [cw, 0], [0, ch], [cw, ch], [0, 0], [0, ch], [cw, 0], [cw, ch], [0, ch / 2], [cw, ch / 2], [cw / 2, 0], [cw / 2, ch]];\n for (var _i3 = 1; _i3 < path.length; _i3 += 2) {\n ctx.moveTo(path[_i3 - 1][0], path[_i3 - 1][1]);\n ctx.lineTo(path[_i3][0], path[_i3][1]);\n }\n ctx.lineWidth = 1 * 4;\n ctx.stroke();\n}\n\nvar TileLayerGLRenderer$1 = function (_ImageGLRenderable) {\n inherits(TileLayerGLRenderer, _ImageGLRenderable);\n\n function TileLayerGLRenderer() {\n classCallCheck(this, TileLayerGLRenderer);\n return possibleConstructorReturn(this, _ImageGLRenderable.apply(this, arguments));\n }\n\n TileLayerGLRenderer.prototype.isDrawable = function isDrawable() {\n return true;\n };\n\n TileLayerGLRenderer.prototype.needToRedraw = function needToRedraw() {\n var map = this.getMap();\n if (this._gl() && !map.getPitch() && map.isZooming() && !map.isMoving() && !map.isRotating()) {\n return true;\n }\n return _ImageGLRenderable.prototype.needToRedraw.call(this);\n };\n\n TileLayerGLRenderer.prototype.drawTile = function drawTile(tileInfo, tileImage) {\n var map = this.getMap();\n if (!tileInfo || !map) {\n return;\n }\n if (tileImage.src === emptyImageUrl) {\n return;\n }\n\n var scale = map.getGLScale(tileInfo.z),\n w = tileInfo.size[0] * scale,\n h = tileInfo.size[1] * scale;\n if (tileInfo.cache !== false) {\n this._bindGLBuffer(tileImage, w, h);\n }\n if (!this._gl()) {\n _ImageGLRenderable.prototype.drawTile.call(this, tileInfo, tileImage);\n return;\n }\n var point = tileInfo.point;\n var x = point.x * scale,\n y = point.y * scale;\n var opacity = this.getTileOpacity(tileImage);\n this.drawGLImage(tileImage, x, y, w, h, opacity);\n\n if (opacity < 1) {\n this.setToRedraw();\n } else {\n this.setCanvasUpdated();\n }\n };\n\n TileLayerGLRenderer.prototype.writeZoomStencil = function writeZoomStencil() {\n var gl = this.gl;\n gl.stencilFunc(gl.ALWAYS, 1, 0xFF);\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.REPLACE);\n };\n\n TileLayerGLRenderer.prototype.startZoomStencilTest = function startZoomStencilTest() {\n var gl = this.gl;\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\n gl.stencilFunc(gl.EQUAL, 0, 0xFF);\n };\n\n TileLayerGLRenderer.prototype.endZoomStencilTest = function endZoomStencilTest() {\n this.pauseZoomStencilTest();\n };\n\n TileLayerGLRenderer.prototype.pauseZoomStencilTest = function pauseZoomStencilTest() {\n var gl = this.gl;\n gl.stencilFunc(gl.ALWAYS, 1, 0xFF);\n };\n\n TileLayerGLRenderer.prototype.resumeZoomStencilTest = function resumeZoomStencilTest() {\n var gl = this.gl;\n gl.stencilFunc(gl.EQUAL, 0, 0xFF);\n };\n\n TileLayerGLRenderer.prototype._bindGLBuffer = function _bindGLBuffer(image, w, h) {\n if (!image.glBuffer) {\n image.glBuffer = this.bufferTileData(0, 0, w, h);\n }\n };\n\n TileLayerGLRenderer.prototype.loadTileImage = function loadTileImage(tileImage, url) {\n tileImage.crossOrigin = this.layer.options['crossOrigin'] || '';\n tileImage.src = url;\n return;\n };\n\n TileLayerGLRenderer.prototype.onCanvasCreate = function onCanvasCreate() {\n this.createCanvas2();\n };\n\n TileLayerGLRenderer.prototype.createContext = function createContext() {\n _ImageGLRenderable.prototype.createContext.call(this);\n this.createGLContext();\n };\n\n TileLayerGLRenderer.prototype.resizeCanvas = function resizeCanvas(canvasSize) {\n if (!this.canvas) {\n return;\n }\n _ImageGLRenderable.prototype.resizeCanvas.call(this, canvasSize);\n this.resizeGLCanvas();\n };\n\n TileLayerGLRenderer.prototype.clearCanvas = function clearCanvas() {\n if (!this.canvas) {\n return;\n }\n _ImageGLRenderable.prototype.clearCanvas.call(this);\n this.clearGLCanvas();\n };\n\n TileLayerGLRenderer.prototype.getCanvasImage = function getCanvasImage() {\n if (!this._gl()) {\n return _ImageGLRenderable.prototype.getCanvasImage.call(this);\n }\n var img = _ImageGLRenderable.prototype.getCanvasImage.call(this);\n if (img) {\n img.image = this.canvas2;\n }\n return img;\n };\n\n TileLayerGLRenderer.prototype._gl = function _gl() {\n return this.getMap() && !!this.getMap().getPitch() || this.layer && !!this.layer.options['fragmentShader'];\n };\n\n TileLayerGLRenderer.prototype.deleteTile = function deleteTile(tile) {\n _ImageGLRenderable.prototype.deleteTile.call(this, tile);\n if (tile && tile.image) {\n this.disposeImage(tile.image);\n }\n };\n\n TileLayerGLRenderer.prototype.onRemove = function onRemove() {\n this.removeGLCanvas();\n };\n\n return TileLayerGLRenderer;\n}(ImageGLRenderable(TileLayerCanvasRenderer));\n\nTileLayer.registerRenderer('gl', TileLayerGLRenderer$1);\n\nfunction _loadTile(tile) {\n var tileSize = this.layer.getTileSize(),\n canvasClass = this.canvas.constructor,\n map = this.getMap();\n var r = Browser$1.retina ? 2 : 1;\n var tileCanvas = Canvas.createCanvas(tileSize['width'] * r, tileSize['height'] * r, canvasClass);\n tileCanvas['layer'] = this.layer;\n var me = this;\n var extent = new Extent(map.pointToCoordinate(tile['point']), map.pointToCoordinate(tile['point'].add(tileSize.toPoint())), map.getProjection());\n this.layer.drawTile(tileCanvas, {\n 'url': tile['url'],\n 'point': tile['point'],\n 'center': map.pointToCoordinate(tile['point'].add(tileSize['width'] / 2, tileSize['height'] / 2)),\n 'extent': extent,\n 'z': tile['z'],\n 'x': tile['x'],\n 'y': tile['y']\n }, function (error) {\n if (error) {\n me.onTileError(tileCanvas, tile);\n return;\n }\n me.onTileLoad(tileCanvas, tile);\n });\n return tileCanvas;\n}\n\nvar CanvasRenderer$2 = function (_TileLayerCanvasRende) {\n inherits(CanvasRenderer, _TileLayerCanvasRende);\n\n function CanvasRenderer() {\n classCallCheck(this, CanvasRenderer);\n return possibleConstructorReturn(this, _TileLayerCanvasRende.apply(this, arguments));\n }\n\n CanvasRenderer.prototype.loadTile = function loadTile() {\n return _loadTile.apply(this, arguments);\n };\n\n return CanvasRenderer;\n}(TileLayerCanvasRenderer);\n\nvar GLRenderer = function (_TileLayerGLRenderer) {\n inherits(GLRenderer, _TileLayerGLRenderer);\n\n function GLRenderer() {\n classCallCheck(this, GLRenderer);\n return possibleConstructorReturn(this, _TileLayerGLRenderer.apply(this, arguments));\n }\n\n GLRenderer.prototype.loadTile = function loadTile() {\n return _loadTile.apply(this, arguments);\n };\n\n return GLRenderer;\n}(TileLayerCanvasRenderer);\n\nCanvasTileLayer.registerRenderer('canvas', CanvasRenderer$2);\nCanvasTileLayer.registerRenderer('gl', GLRenderer);\n\nvar OverlayLayerRenderer = function (_CanvasRenderer) {\n inherits(OverlayLayerRenderer, _CanvasRenderer);\n\n function OverlayLayerRenderer() {\n classCallCheck(this, OverlayLayerRenderer);\n return possibleConstructorReturn(this, _CanvasRenderer.apply(this, arguments));\n }\n\n OverlayLayerRenderer.prototype.checkResources = function checkResources() {\n var geometries = this._geosToCheck;\n if (!this._resourceChecked && !geometries) {\n geometries = this.layer._geoList;\n }\n if (!isArrayHasData(geometries)) {\n return [];\n }\n var resources = [];\n var cache = {};\n\n for (var i = geometries.length - 1; i >= 0; i--) {\n var geo = geometries[i];\n var res = geo._getExternalResources();\n if (!res.length) {\n continue;\n }\n if (!this.resources) {\n resources.push.apply(resources, res);\n } else {\n for (var _i = 0; _i < res.length; _i++) {\n var url = res[_i][0];\n if (!this.resources.isResourceLoaded(res[_i]) && !cache[url]) {\n resources.push(res[_i]);\n cache[url] = 1;\n }\n }\n }\n }\n this._resourceChecked = true;\n delete this._geosToCheck;\n return resources;\n };\n\n OverlayLayerRenderer.prototype.render = function render() {\n this.layer._sortGeometries();\n return _CanvasRenderer.prototype.render.apply(this, arguments);\n };\n\n OverlayLayerRenderer.prototype._addGeoToCheckRes = function _addGeoToCheckRes(res) {\n if (!res) {\n return;\n }\n if (!Array.isArray(res)) {\n res = [res];\n }\n if (!this._geosToCheck) {\n this._geosToCheck = [];\n }\n pushIn(this._geosToCheck, res);\n };\n\n OverlayLayerRenderer.prototype.onGeometryAdd = function onGeometryAdd(geometries) {\n this._addGeoToCheckRes(geometries);\n redraw(this);\n };\n\n OverlayLayerRenderer.prototype.onGeometryRemove = function onGeometryRemove() {\n redraw(this);\n };\n\n OverlayLayerRenderer.prototype.onGeometrySymbolChange = function onGeometrySymbolChange(e) {\n this._addGeoToCheckRes(e.target);\n redraw(this);\n };\n\n OverlayLayerRenderer.prototype.onGeometryShapeChange = function onGeometryShapeChange() {\n redraw(this);\n };\n\n OverlayLayerRenderer.prototype.onGeometryPositionChange = function onGeometryPositionChange() {\n redraw(this);\n };\n\n OverlayLayerRenderer.prototype.onGeometryZIndexChange = function onGeometryZIndexChange() {\n redraw(this);\n };\n\n OverlayLayerRenderer.prototype.onGeometryShow = function onGeometryShow() {\n redraw(this);\n };\n\n OverlayLayerRenderer.prototype.onGeometryHide = function onGeometryHide() {\n redraw(this);\n };\n\n OverlayLayerRenderer.prototype.onGeometryPropertiesChange = function onGeometryPropertiesChange() {\n redraw(this);\n };\n\n return OverlayLayerRenderer;\n}(CanvasRenderer);\n\nfunction redraw(renderer) {\n if (renderer.layer.options['drawImmediate']) {\n renderer.render();\n }\n renderer.setToRedraw();\n}\n\nvar VectorLayerRenderer = function (_OverlayLayerCanvasRe) {\n inherits(VectorLayerRenderer, _OverlayLayerCanvasRe);\n\n function VectorLayerRenderer() {\n classCallCheck(this, VectorLayerRenderer);\n return possibleConstructorReturn(this, _OverlayLayerCanvasRe.apply(this, arguments));\n }\n\n VectorLayerRenderer.prototype.checkResources = function checkResources() {\n var _this2 = this;\n\n var resources = _OverlayLayerCanvasRe.prototype.checkResources.apply(this, arguments);\n var style = this.layer.getStyle();\n if (style) {\n if (!Array.isArray(style)) {\n style = [style];\n }\n style.forEach(function (s) {\n var res = getExternalResources(s['symbol'], true);\n for (var i = 0, l = res.length; i < l; i++) {\n if (!_this2.resources.isResourceLoaded(res[i])) {\n resources.push(res[i]);\n }\n }\n });\n }\n return resources;\n };\n\n VectorLayerRenderer.prototype.needToRedraw = function needToRedraw() {\n var map = this.getMap();\n if (map.isInteracting() && this.layer.options['enableAltitude']) {\n return true;\n }\n\n if (map.isZooming() && !map.isRotating() && !map.getPitch() && !this._hasPoint && this.layer.constructor === VectorLayer) {\n return false;\n }\n return _OverlayLayerCanvasRe.prototype.needToRedraw.call(this);\n };\n\n VectorLayerRenderer.prototype.draw = function draw() {\n if (!this.getMap()) {\n return;\n }\n if (!this.layer.isVisible() || this.layer.isEmpty()) {\n this.clearCanvas();\n this.completeRender();\n return;\n }\n\n this.prepareCanvas();\n\n this.drawGeos();\n\n this.completeRender();\n };\n\n VectorLayerRenderer.prototype.isBlank = function isBlank() {\n if (!this.context) {\n return false;\n }\n return !this.context.canvas._drawn;\n };\n\n VectorLayerRenderer.prototype.drawOnInteracting = function drawOnInteracting() {\n if (!this._geosToDraw) {\n return;\n }\n this._updateDisplayExtent();\n for (var i = 0, l = this._geosToDraw.length; i < l; i++) {\n if (!this._geosToDraw[i].isVisible()) {\n continue;\n }\n this._geosToDraw[i]._paint(this._displayExtent);\n }\n };\n\n VectorLayerRenderer.prototype.show = function show() {\n this.layer.forEach(function (geo) {\n geo._repaint();\n });\n _OverlayLayerCanvasRe.prototype.show.apply(this, arguments);\n };\n\n VectorLayerRenderer.prototype.forEachGeo = function forEachGeo(fn, context) {\n this.layer.forEach(fn, context);\n };\n\n VectorLayerRenderer.prototype.drawGeos = function drawGeos() {\n this._updateDisplayExtent();\n this.prepareToDraw();\n\n this.forEachGeo(this.checkGeo, this);\n for (var i = 0, len = this._geosToDraw.length; i < len; i++) {\n this._geosToDraw[i]._paint();\n }\n };\n\n VectorLayerRenderer.prototype.prepareToDraw = function prepareToDraw() {\n this._hasPoint = false;\n this._geosToDraw = [];\n };\n\n VectorLayerRenderer.prototype.checkGeo = function checkGeo(geo) {\n if (!geo || !geo.isVisible() || !geo.getMap() || !geo.getLayer() || !geo.getLayer().isCanvasRender()) {\n return;\n }\n\n var painter = geo._getPainter(),\n extent2D = painter.get2DExtent(this.resources);\n if (!extent2D || !extent2D.intersects(this._displayExtent)) {\n return;\n }\n if (painter.hasPoint()) {\n this._hasPoint = true;\n }\n this._geosToDraw.push(geo);\n };\n\n VectorLayerRenderer.prototype.onZoomEnd = function onZoomEnd() {\n delete this.canvasExtent2D;\n _OverlayLayerCanvasRe.prototype.onZoomEnd.apply(this, arguments);\n };\n\n VectorLayerRenderer.prototype.onRemove = function onRemove() {\n this.forEachGeo(function (g) {\n g.onHide();\n });\n delete this._geosToDraw;\n };\n\n VectorLayerRenderer.prototype.onGeometryPropertiesChange = function onGeometryPropertiesChange(param) {\n if (param) {\n this.layer._styleGeometry(param['target']);\n }\n _OverlayLayerCanvasRe.prototype.onGeometryPropertiesChange.call(this, param);\n };\n\n VectorLayerRenderer.prototype._updateDisplayExtent = function _updateDisplayExtent() {\n var extent2D = this.canvasExtent2D;\n if (this._maskExtent) {\n if (!this._maskExtent.intersects(extent2D)) {\n this.completeRender();\n return;\n }\n extent2D = extent2D.intersection(this._maskExtent);\n }\n this._displayExtent = extent2D;\n };\n\n VectorLayerRenderer.prototype.identify = function identify(coordinate) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var geometries = this._geosToDraw;\n if (!geometries) {\n return [];\n }\n return this.layer._hitGeos(geometries, coordinate, options);\n };\n\n return VectorLayerRenderer;\n}(OverlayLayerRenderer);\n\nVectorLayer.registerRenderer('canvas', VectorLayerRenderer);\n\nvar MapRenderer = function (_Class) {\n inherits(MapRenderer, _Class);\n\n function MapRenderer(map) {\n classCallCheck(this, MapRenderer);\n\n var _this = possibleConstructorReturn(this, _Class.call(this));\n\n _this.map = map;\n _this._handlerQueue = {};\n return _this;\n }\n\n MapRenderer.prototype.callInNextFrame = function callInNextFrame(fn) {\n this._handlerQueue.push(fn);\n };\n\n MapRenderer.prototype.executeFrameCallbacks = function executeFrameCallbacks() {\n var running = this._handlerQueue;\n this._handlerQueue = [];\n for (var i = 0, l = running.length; i < l; i++) {\n running[i]();\n }\n };\n\n MapRenderer.prototype.offsetPlatform = function offsetPlatform(offset) {\n if (!this.map._panels.front) {\n return this;\n }\n if (offset.x === 0 && offset.y === 0) {\n return this;\n }\n var pos = this.map.offsetPlatform().add(offset)._round();\n var panels = this.map._panels;\n offsetDom(panels.back, pos);\n offsetDom(panels.front, pos);\n return this;\n };\n\n MapRenderer.prototype.resetContainer = function resetContainer() {\n if (!this.map) {\n return;\n }\n this.map._resetMapViewPoint();\n if (this.map._panels.front) {\n var pos = new Point(0, 0);\n offsetDom(this.map._panels.back, pos);\n offsetDom(this.map._panels.front, pos);\n }\n };\n\n MapRenderer.prototype.onZoomEnd = function onZoomEnd() {\n this.resetContainer();\n };\n\n MapRenderer.prototype.onLoad = function onLoad() {\n this._frameLoop();\n };\n\n return MapRenderer;\n}(Class);\n\nvar MapCanvasRenderer = function (_MapRenderer) {\n inherits(MapCanvasRenderer, _MapRenderer);\n\n function MapCanvasRenderer(map) {\n classCallCheck(this, MapCanvasRenderer);\n\n var _this = possibleConstructorReturn(this, _MapRenderer.call(this, map));\n\n _this._containerIsCanvas = !!map._containerDOM.getContext;\n _this._registerEvents();\n _this._loopTime = 0;\n return _this;\n }\n\n MapCanvasRenderer.prototype.load = function load() {\n this.initContainer();\n };\n\n MapCanvasRenderer.prototype.renderFrame = function renderFrame(framestamp) {\n if (!this.map) {\n return false;\n }\n var map = this.map;\n map._fireEvent('framestart');\n this.updateMapDOM();\n var layers = this._getAllLayerToRender();\n this.drawLayers(layers, framestamp);\n this.drawLayerCanvas(layers);\n\n map._fireEvent('frameend');\n this._recordView();\n\n this._mapview = this._getMapView();\n delete this._spatialRefChanged;\n this._fireLayerLoadEvents();\n this.executeFrameCallbacks();\n this._needRedraw = false;\n return true;\n };\n\n MapCanvasRenderer.prototype.updateMapDOM = function updateMapDOM() {\n var map = this.map;\n\n if (map.isZooming()) {\n return;\n }\n var offset = map._getViewPointFrameOffset();\n if (offset) {\n map.offsetPlatform(offset);\n }\n };\n\n MapCanvasRenderer.prototype.drawLayers = function drawLayers(layers, framestamp) {\n var map = this.map,\n isInteracting = map.isInteracting(),\n canvasIds = [],\n updatedIds = [],\n fps = map.options['fpsOnInteracting'] || 0,\n timeLimit = fps === 0 ? 0 : 1000 / fps,\n layerLimit = this.map.options['layerCanvasLimitOnInteracting'],\n l = layers.length;\n var baseLayer = map.getBaseLayer();\n var t = 0;\n for (var i = 0; i < l; i++) {\n var layer = layers[i];\n if (!layer.isVisible()) {\n continue;\n }\n var isCanvas = layer.isCanvasRender();\n if (isCanvas) {\n canvasIds.push(layer.getId());\n }\n var renderer = layer._getRenderer();\n if (!renderer) {\n continue;\n }\n\n var needsRedraw = this._checkLayerRedraw(layer);\n if (isCanvas && renderer.isCanvasUpdated()) {\n if (!needsRedraw) {\n updatedIds.push(layer.getId());\n }\n this.setToRedraw();\n }\n delete renderer.__shouldZoomTransform;\n if (!needsRedraw) {\n if (isCanvas && isInteracting) {\n if (map.isZooming() && !map.getPitch()) {\n renderer.prepareRender();\n renderer.__shouldZoomTransform = true;\n } else if (map.getPitch() || map.isRotating()) {\n renderer.clearCanvas();\n }\n }\n continue;\n }\n\n if (isInteracting && isCanvas) {\n if (layerLimit > 0 && l - 1 - i > layerLimit && layer !== baseLayer) {\n layer._getRenderer().clearCanvas();\n continue;\n }\n t += this._drawCanvasLayerOnInteracting(layer, t, timeLimit, framestamp);\n } else if (isInteracting && renderer.drawOnInteracting) {\n if (renderer.prepareRender) {\n renderer.prepareRender();\n }\n renderer.drawOnInteracting(this._eventParam, framestamp);\n } else {\n renderer.render(framestamp);\n }\n\n if (isCanvas) {\n updatedIds.push(layer.getId());\n this.setToRedraw();\n }\n }\n\n var preCanvasIds = this._canvasIds || [];\n var preUpdatedIds = this._updatedIds || [];\n this._canvasIds = canvasIds;\n this._updatedIds = updatedIds;\n if (!this._needToRedraw()) {\n var sep = '---';\n if (preCanvasIds.join(sep) !== canvasIds.join(sep) || preUpdatedIds.join(sep) !== updatedIds.join(sep)) {\n this.setToRedraw();\n }\n }\n };\n\n MapCanvasRenderer.prototype._checkLayerRedraw = function _checkLayerRedraw(layer) {\n if (this.isSpatialReferenceChanged()) {\n return true;\n }\n var map = this.map;\n var renderer = layer._getRenderer();\n if (layer.isCanvasRender()) {\n return renderer.testIfNeedRedraw();\n } else {\n if (renderer.needToRedraw && renderer.needToRedraw()) {\n return true;\n }\n\n return map.isInteracting() || this.isViewChanged();\n }\n };\n\n MapCanvasRenderer.prototype._drawCanvasLayerOnInteracting = function _drawCanvasLayerOnInteracting(layer, t, timeLimit, framestamp) {\n var map = this.map,\n renderer = layer._getRenderer(),\n drawTime = renderer.getDrawTime(),\n inTime = timeLimit === 0 || timeLimit > 0 && t + drawTime <= timeLimit;\n if (renderer.mustRenderOnInteracting && renderer.mustRenderOnInteracting()) {\n renderer.render(framestamp);\n } else if (renderer.drawOnInteracting && (layer === map.getBaseLayer() || inTime || map.isZooming() && layer.options['forceRenderOnZooming'] || map.isMoving() && layer.options['forceRenderOnMoving'] || map.isRotating() && layer.options['forceRenderOnRotating'])) {\n renderer.prepareRender();\n renderer.prepareCanvas();\n renderer.drawOnInteracting(this._eventParam, framestamp);\n return drawTime;\n } else if (map.isZooming() && !map.getPitch() && !map.isRotating()) {\n renderer.prepareRender();\n renderer.__shouldZoomTransform = true;\n } else if (map.getPitch() || map.isRotating()) {\n renderer.clearCanvas();\n }\n if (renderer.drawOnInteracting && !inTime) {\n renderer.onSkipDrawOnInteracting(this._eventParam, framestamp);\n }\n return 0;\n };\n\n MapCanvasRenderer.prototype._fireLayerLoadEvents = function _fireLayerLoadEvents() {\n if (this._updatedIds && this._updatedIds.length > 0) {\n var map = this.map;\n\n this._updatedIds.reverse().forEach(function (id) {\n var layer = map.getLayer(id);\n if (!layer) {\n return;\n }\n var renderer = layer._getRenderer();\n if (!renderer || !renderer.isRenderComplete()) {\n return;\n }\n\n layer.fire('layerload');\n });\n }\n };\n\n MapCanvasRenderer.prototype._needToRedraw = function _needToRedraw() {\n return this._needRedraw;\n };\n\n MapCanvasRenderer.prototype.setToRedraw = function setToRedraw() {\n this._needRedraw = true;\n };\n\n MapCanvasRenderer.prototype.drawLayerCanvas = function drawLayerCanvas(layers) {\n var map = this.map;\n if (!map) {\n return;\n }\n if (!this._needToRedraw() && !this.isViewChanged()) {\n return;\n }\n if (!this.canvas) {\n this.createCanvas();\n }\n\n map._fireEvent('renderstart', {\n 'context': this.context\n });\n\n if (!this._updateCanvasSize()) {\n this.clearCanvas();\n }\n\n var interacting = map.isInteracting(),\n limit = map.options['layerCanvasLimitOnInteracting'];\n var len = layers.length;\n\n var baseLayerImage = void 0;\n var images = [];\n for (var i = 0; i < len; i++) {\n if (!layers[i].isVisible() || !layers[i].isCanvasRender()) {\n continue;\n }\n var renderer = layers[i]._getRenderer();\n if (!renderer) {\n continue;\n }\n var layerImage = this._getLayerImage(layers[i]);\n if (layerImage && layerImage['image']) {\n if (layers[i] === map.getBaseLayer()) {\n baseLayerImage = [layers[i], layerImage];\n } else {\n images.push([layers[i], layerImage]);\n }\n }\n }\n\n if (baseLayerImage) {\n this._drawLayerCanvasImage(baseLayerImage[0], baseLayerImage[1]);\n this._drawFog();\n }\n\n len = images.length;\n var start = interacting && limit >= 0 && len > limit ? len - limit : 0;\n for (var _i = start; _i < len; _i++) {\n this._drawLayerCanvasImage(images[_i][0], images[_i][1]);\n }\n\n this._drawCenterCross();\n\n map._fireEvent('renderend', {\n 'context': this.context\n });\n };\n\n MapCanvasRenderer.prototype.updateMapSize = function updateMapSize(size) {\n if (!size || this._containerIsCanvas) {\n return;\n }\n var width = size['width'] + 'px',\n height = size['height'] + 'px';\n var panels = this.map._panels;\n panels.mapWrapper.style.width = width;\n panels.mapWrapper.style.height = height;\n this._updateCanvasSize();\n };\n\n MapCanvasRenderer.prototype.getMainPanel = function getMainPanel() {\n if (!this.map) {\n return null;\n }\n if (this._containerIsCanvas) {\n return this.map._containerDOM;\n }\n if (this.map._panels) {\n return this.map._panels.mapWrapper;\n }\n return null;\n };\n\n MapCanvasRenderer.prototype.toDataURL = function toDataURL(mimeType) {\n if (!this.canvas) {\n return null;\n }\n return this.canvas.toDataURL(mimeType);\n };\n\n MapCanvasRenderer.prototype.remove = function remove() {\n if (Browser$1.webgl && typeof document !== 'undefined') {\n removeDomEvent(document, 'visibilitychange', this._onVisibilitychange, this);\n }\n if (this._resizeInterval) {\n clearInterval(this._resizeInterval);\n }\n delete this.context;\n delete this.canvas;\n delete this.map;\n delete this._spatialRefChanged;\n this._cancelFrameLoop();\n };\n\n MapCanvasRenderer.prototype.hitDetect = function hitDetect(point) {\n var map = this.map;\n if (!map || !map.options['hitDetect'] || map.isInteracting()) {\n return;\n }\n var layers = map._getLayers();\n var cursor = 'default';\n var limit = map.options['hitDetectLimit'] || 0;\n var counter = 0;\n for (var i = layers.length - 1; i >= 0; i--) {\n var layer = layers[i];\n if (layer.isEmpty && layer.isEmpty()) {\n continue;\n }\n var renderer = layer._getRenderer();\n if (!renderer || !renderer.hitDetect) {\n continue;\n }\n if (renderer.isBlank && renderer.isBlank()) {\n continue;\n }\n if (layer.options['cursor'] !== 'default' && renderer.hitDetect(point)) {\n cursor = layer.options['cursor'] || 'pointer';\n break;\n }\n counter++;\n if (limit > 0 && counter > limit) {\n break;\n }\n }\n\n map._trySetCursor(cursor);\n };\n\n MapCanvasRenderer.prototype._getLayerImage = function _getLayerImage(layer) {\n var renderer = layer._getRenderer();\n if (renderer.getCanvasImage) {\n return renderer.getCanvasImage();\n }\n return null;\n };\n\n MapCanvasRenderer.prototype.initContainer = function initContainer() {\n var panels = this.map._panels;\n\n function createContainer(name, className, cssText, enableSelect) {\n var c = createEl('div', className);\n if (cssText) {\n c.style.cssText = cssText;\n }\n panels[name] = c;\n if (!enableSelect) {\n preventSelection(c);\n }\n return c;\n }\n var containerDOM = this.map._containerDOM;\n\n if (this._containerIsCanvas) {\n return;\n }\n\n containerDOM.innerHTML = '';\n\n var POSITION0 = 'position:absolute;top:0px;left:0px;';\n\n var mapWrapper = createContainer('mapWrapper', 'maptalks-wrapper', 'position:absolute;overflow:hidden;', true),\n mapAllLayers = createContainer('allLayers', 'maptalks-all-layers', POSITION0 + 'padding:0px;margin:0px;z-index:0;overflow:visible;', true),\n backStatic = createContainer('backStatic', 'maptalks-back-static', POSITION0 + 'z-index:0;', true),\n back = createContainer('back', 'maptalks-back', POSITION0 + 'z-index:1;'),\n backLayer = createContainer('backLayer', 'maptalks-back-layer', POSITION0),\n canvasContainer = createContainer('canvasContainer', 'maptalks-canvas-layer', POSITION0 + 'border:none;z-index:2;'),\n frontStatic = createContainer('frontStatic', 'maptalks-front-static', POSITION0 + 'z-index:3;', true),\n front = createContainer('front', 'maptalks-front', POSITION0 + 'z-index:4;', true),\n frontLayer = createContainer('frontLayer', 'maptalks-front-layer', POSITION0 + 'z-index:0;'),\n ui = createContainer('ui', 'maptalks-ui', POSITION0 + 'border:none;z-index:1;', true),\n control = createContainer('control', 'maptalks-control', 'z-index:1', true);\n\n containerDOM.appendChild(mapWrapper);\n\n mapAllLayers.appendChild(backStatic);\n back.appendChild(backLayer);\n mapAllLayers.appendChild(back);\n mapAllLayers.appendChild(canvasContainer);\n front.appendChild(frontLayer);\n mapAllLayers.appendChild(frontStatic);\n mapAllLayers.appendChild(front);\n front.appendChild(ui);\n\n mapWrapper.appendChild(mapAllLayers);\n mapWrapper.appendChild(control);\n\n this.createCanvas();\n\n this.resetContainer();\n var mapSize = this.map._getContainerDomSize();\n this.updateMapSize(mapSize);\n };\n\n MapCanvasRenderer.prototype.isViewChanged = function isViewChanged() {\n var previous = this._mapview;\n var view = this._getMapView();\n if (!previous || !equalMapView(previous, view)) {\n return true;\n }\n return false;\n };\n\n MapCanvasRenderer.prototype._recordView = function _recordView() {\n var map = this.map;\n if (!map._onViewChange || map.isInteracting() || map.isAnimating()) {\n return;\n }\n if (!equalMapView(map.getView(), map._getCurrentView())) {\n map._onViewChange(map.getView());\n }\n };\n\n MapCanvasRenderer.prototype.isSpatialReferenceChanged = function isSpatialReferenceChanged() {\n return this._spatialRefChanged;\n };\n\n MapCanvasRenderer.prototype._getMapView = function _getMapView() {\n var map = this.map;\n var center = map._getPrjCenter();\n return {\n x: center.x,\n y: center.y,\n zoom: map.getZoom(),\n pitch: map.getPitch(),\n bearing: map.getBearing(),\n width: map.width,\n height: map.height\n };\n };\n\n MapCanvasRenderer.prototype._frameLoop = function _frameLoop(framestamp) {\n var _this2 = this;\n\n if (!this.map) {\n this._cancelFrameLoop();\n return;\n }\n this.renderFrame(framestamp);\n\n this._animationFrame = requestAnimFrame(function (framestamp) {\n _this2._frameLoop(framestamp);\n });\n };\n\n MapCanvasRenderer.prototype._cancelFrameLoop = function _cancelFrameLoop() {\n if (this._animationFrame) {\n cancelAnimFrame(this._animationFrame);\n }\n };\n\n MapCanvasRenderer.prototype._drawLayerCanvasImage = function _drawLayerCanvasImage(layer, layerImage) {\n var ctx = this.context;\n var point = layerImage['point'].round();\n if (Browser$1.retina) {\n point._multi(2);\n }\n var canvasImage = layerImage['image'];\n if (point.x + canvasImage.width <= 0 || point.y + canvasImage.height <= 0) {\n return;\n }\n\n var op = layer.options['opacity'];\n if (!isNumber(op)) {\n op = 1;\n }\n if (op <= 0) {\n return;\n }\n var imgOp = layerImage['opacity'];\n if (!isNumber(imgOp)) {\n imgOp = 1;\n }\n if (imgOp <= 0) {\n return;\n }\n var alpha = ctx.globalAlpha;\n\n if (op < 1) {\n ctx.globalAlpha *= op;\n }\n if (imgOp < 1) {\n ctx.globalAlpha *= imgOp;\n }\n if (layer.options['cssFilter']) {\n ctx.filter = layer.options['cssFilter'];\n }\n var matrix = this._zoomMatrix;\n var shouldTransform = !!layer._getRenderer().__shouldZoomTransform;\n var renderer = layer.getRenderer();\n var clipped = renderer.clipCanvas(this.context);\n if (matrix && shouldTransform) {\n ctx.save();\n ctx.setTransform.apply(ctx, matrix);\n }\n\n ctx.drawImage(canvasImage, point.x, point.y);\n if (matrix && shouldTransform) {\n ctx.restore();\n }\n if (clipped) {\n ctx.restore();\n }\n if (ctx.filter !== 'none') {\n ctx.filter = 'none';\n }\n ctx.globalAlpha = alpha;\n };\n\n MapCanvasRenderer.prototype._drawCenterCross = function _drawCenterCross() {\n var cross = this.map.options['centerCross'];\n if (cross) {\n var ctx = this.context;\n var p = new Point(this.canvas.width / 2, this.canvas.height / 2);\n if (isFunction(cross)) {\n cross(ctx, p);\n } else {\n Canvas.drawCross(this.context, p, 2, '#f00');\n }\n }\n };\n\n MapCanvasRenderer.prototype._drawFog = function _drawFog() {\n var map = this.map;\n if (map.getPitch() <= map.options['maxVisualPitch'] || !map.options['fog']) {\n return;\n }\n var fogThickness = 30,\n r = Browser$1.retina ? 2 : 1;\n var ctx = this.context,\n clipExtent = map.getContainerExtent();\n var top = (map.height - map._getVisualHeight(75)) * r;\n if (top < 0) top = 0;\n var bottom = clipExtent.ymin * r,\n h = Math.ceil(bottom - top),\n color = map.options['fogColor'].join();\n var gradient = ctx.createLinearGradient(0, top, 0, bottom + fogThickness);\n var landscape = 1 - fogThickness / (h + fogThickness);\n gradient.addColorStop(0, 'rgba(' + color + ', 0)');\n gradient.addColorStop(0.3, 'rgba(' + color + ', 0.3)');\n gradient.addColorStop(landscape, 'rgba(' + color + ', 1)');\n gradient.addColorStop(1, 'rgba(' + color + ', 0)');\n ctx.beginPath();\n ctx.fillStyle = gradient;\n ctx.fillRect(0, top, Math.ceil(clipExtent.getWidth()) * r, Math.ceil(h + fogThickness));\n };\n\n MapCanvasRenderer.prototype._getAllLayerToRender = function _getAllLayerToRender() {\n return this.map._getLayers();\n };\n\n MapCanvasRenderer.prototype.clearCanvas = function clearCanvas() {\n if (!this.canvas) {\n return;\n }\n Canvas.clearRect(this.context, 0, 0, this.canvas.width, this.canvas.height);\n };\n\n MapCanvasRenderer.prototype._updateCanvasSize = function _updateCanvasSize() {\n if (!this.canvas || this._containerIsCanvas) {\n return false;\n }\n var map = this.map,\n mapSize = map.getSize(),\n canvas = this.canvas,\n r = Browser$1.retina ? 2 : 1;\n if (mapSize['width'] * r === canvas.width && mapSize['height'] * r === canvas.height) {\n return false;\n }\n\n\n canvas.height = r * mapSize['height'];\n canvas.width = r * mapSize['width'];\n if (canvas.style) {\n canvas.style.width = mapSize['width'] + 'px';\n canvas.style.height = mapSize['height'] + 'px';\n }\n\n return true;\n };\n\n MapCanvasRenderer.prototype.createCanvas = function createCanvas() {\n if (this._containerIsCanvas) {\n this.canvas = this.map._containerDOM;\n } else {\n this.canvas = createEl('canvas');\n this._updateCanvasSize();\n this.map._panels.canvasContainer.appendChild(this.canvas);\n }\n this.context = this.canvas.getContext('2d');\n };\n\n MapCanvasRenderer.prototype._checkSize = function _checkSize() {\n if (!this.map || this.map.isInteracting()) {\n return;\n }\n\n computeDomPosition(this.map._containerDOM);\n this.map.checkSize();\n };\n\n MapCanvasRenderer.prototype._setCheckSizeInterval = function _setCheckSizeInterval(interval) {\n var _this3 = this;\n\n clearInterval(this._resizeInterval);\n this._checkSizeInterval = interval;\n this._resizeInterval = setInterval(function () {\n if (!_this3.map || _this3.map.isRemoved()) {\n clearInterval(_this3._resizeInterval);\n } else {\n _this3._checkSize();\n }\n }, this._checkSizeInterval);\n };\n\n MapCanvasRenderer.prototype._registerEvents = function _registerEvents() {\n var _this4 = this;\n\n var map = this.map;\n\n if (map.options['checkSize'] && !IS_NODE && typeof window !== 'undefined') {\n this._setCheckSizeInterval(1000);\n }\n if (!Browser$1.mobile) {\n map.on('_mousemove', this._onMapMouseMove, this);\n }\n\n map.on('_dragrotatestart _dragrotating _dragrotateend _movestart _moving _moveend _zoomstart', function (param) {\n _this4._eventParam = param;\n });\n\n map.on('_zooming', function (param) {\n if (!map.getPitch()) {\n _this4._zoomMatrix = param['matrix']['container'];\n }\n _this4._eventParam = param;\n });\n\n map.on('_zoomend', function (param) {\n _this4._eventParam = param;\n delete _this4._zoomMatrix;\n });\n\n map.on('_spatialreferencechange', function () {\n _this4._spatialRefChanged = true;\n });\n\n if (Browser$1.webgl && typeof document !== 'undefined') {\n addDomEvent(document, 'visibilitychange', this._onVisibilitychange, this);\n }\n };\n\n MapCanvasRenderer.prototype._onMapMouseMove = function _onMapMouseMove(param) {\n var _this5 = this;\n\n var map = this.map;\n if (map.isInteracting() || !map.options['hitDetect']) {\n return;\n }\n if (this._hitDetectFrame) {\n cancelAnimFrame(this._hitDetectFrame);\n }\n this._hitDetectFrame = requestAnimFrame(function () {\n _this5.hitDetect(param['containerPoint']);\n });\n };\n\n MapCanvasRenderer.prototype._getCanvasLayers = function _getCanvasLayers() {\n return this.map._getLayers(function (layer) {\n return layer.isCanvasRender();\n });\n };\n\n MapCanvasRenderer.prototype._onVisibilitychange = function _onVisibilitychange() {\n if (document.visibilityState !== 'visible') {\n return;\n }\n var layers = this._getAllLayerToRender();\n for (var i = 0, l = layers.length; i < l; i++) {\n var renderer = layers[i].getRenderer();\n if (renderer && renderer.canvas && renderer.setToRedraw) {\n renderer.setToRedraw();\n }\n }\n };\n\n return MapCanvasRenderer;\n}(MapRenderer);\n\nMap.registerRenderer('canvas', MapCanvasRenderer);\n\nMap.mergeOptions({\n 'fog': true,\n 'fogColor': [233, 233, 233]\n});\n\n\n\nvar index$6 = Object.freeze({\n\tResourceCache: ResourceCache,\n\tCanvasRenderer: CanvasRenderer,\n\tImageGLRenderable: ImageGLRenderable,\n\tMapRenderer: MapRenderer,\n\tMapCanvasRenderer: MapCanvasRenderer,\n\tRenderable: Renderable,\n\tImageLayerCanvasRenderer: ImageLayerCanvasRenderer,\n\tImageLayerGLRenderer: ImageLayerGLRenderer,\n\tTileLayerCanvasRenderer: TileLayerCanvasRenderer,\n\tTileLayerGLRenderer: TileLayerGLRenderer$1,\n\tCanvasTileLayerCanvasRenderer: CanvasRenderer$2,\n\tCanvasTileLayerGLRenderer: GLRenderer,\n\tOverlayLayerCanvasRenderer: OverlayLayerRenderer,\n\tVectorLayerCanvasRenderer: VectorLayerRenderer,\n\tCanvasLayerRenderer: CanvasLayerRenderer\n});\n\nvar CenterPointRenderer = {\n _getRenderPoints: function _getRenderPoints() {\n return [[this._getCenter2DPoint(this.getMap().getGLZoom())], null];\n }\n};\n\nMarker.include(CenterPointRenderer);\n\nEllipse.include(CenterPointRenderer);\n\nCircle.include(CenterPointRenderer);\n\nSector.include(CenterPointRenderer);\n\nRectangle.include({\n _getRenderPoints: function _getRenderPoints(placement) {\n var map = this.getMap();\n if (placement === 'vertex') {\n var shell = this._trimRing(this.getShell());\n var points = [];\n for (var i = 0, len = shell.length; i < len; i++) {\n points.push(map.coordToPoint(shell[i], map.getGLZoom()));\n }\n return [points, null];\n } else {\n var c = map.coordToPoint(this.getCenter(), map.getGLZoom());\n return [[c], null];\n }\n }\n});\n\nvar PolyRenderer = {\n _getRenderPoints: function _getRenderPoints(placement) {\n var map = this.getMap();\n var glZoom = map.getGLZoom();\n var points = void 0,\n rotations = null;\n if (placement === 'point') {\n points = this._getPath2DPoints(this._getPrjCoordinates(), false, glZoom);\n if (points && points.length > 0 && Array.isArray(points[0])) {\n points = points[0].concat(points[1]);\n }\n } else if (placement === 'vertex') {\n points = this._getPath2DPoints(this._getPrjCoordinates(), false, glZoom);\n rotations = [];\n if (points && points.length > 0 && Array.isArray(points[0])) {\n for (var i = 0, l = points.length; i < l; i++) {\n for (var ii = 0, ll = points[i].length; ii < ll; ii++) {\n if (ii === 0) {\n rotations.push([points[i][ii], points[i][ii + 1]]);\n } else {\n rotations.push([points[i][ii - 1], points[i][ii]]);\n }\n }\n }\n points = points[0].concat(points[1]);\n } else {\n for (var _i = 0, _l = points.length; _i < _l; _i++) {\n if (_i === 0) {\n rotations.push([points[_i], points[_i + 1]]);\n } else {\n rotations.push([points[_i - 1], points[_i]]);\n }\n }\n }\n } else if (placement === 'line') {\n points = [];\n rotations = [];\n var vertice = this._getPath2DPoints(this._getPrjCoordinates(), false, glZoom),\n isSplitted = vertice.length > 0 && Array.isArray(vertice[0]);\n if (isSplitted) {\n var ring = void 0;\n for (var _i2 = 1, _l2 = vertice.length; _i2 < _l2; _i2++) {\n ring = vertice[_i2];\n if (this instanceof Polygon && ring.length > 0 && !ring[0].equals(ring[ring.length - 1])) {\n ring.push(ring[0]);\n }\n for (var _ii = 1, _ll = ring.length; _ii < _ll; _ii++) {\n points.push(ring[_ii].add(ring[_ii - 1])._multi(0.5));\n rotations.push([ring[_ii - 1], ring[_ii]]);\n }\n }\n } else {\n if (this instanceof Polygon && vertice.length > 0 && !vertice[0].equals(vertice[vertice.length - 1])) {\n vertice.push(vertice[0]);\n }\n for (var _i3 = 1, _l3 = vertice.length; _i3 < _l3; _i3++) {\n points.push(vertice[_i3].add(vertice[_i3 - 1])._multi(0.5));\n rotations.push([vertice[_i3 - 1], vertice[_i3]]);\n }\n }\n } else if (placement === 'vertex-first') {\n var coords = this._getPrjCoordinates();\n points = [map._prjToPoint(coords[0], glZoom)];\n rotations = [[map._prjToPoint(coords[0], glZoom), map._prjToPoint(coords[1], glZoom)]];\n } else if (placement === 'vertex-last') {\n var _coords = this._getPrjCoordinates();\n var _l4 = _coords.length;\n points = [map._prjToPoint(_coords[_l4 - 1], glZoom)];\n rotations = [[map._prjToPoint(_coords[_l4 - 2], glZoom), map._prjToPoint(_coords[_l4 - 1], glZoom)]];\n } else {\n var pcenter = this._getProjection().project(this.getCenter());\n points = [map._prjToPoint(pcenter, glZoom)];\n }\n return [points, rotations];\n }\n};\n\nLineString.include(PolyRenderer);\n\nPolygon.include(PolyRenderer);\n\nGeometry.include({\n _redrawWhenPitch: function _redrawWhenPitch() {\n return false;\n },\n\n _redrawWhenRotate: function _redrawWhenRotate() {\n return false;\n }\n});\n\nvar el = {\n _redrawWhenPitch: function _redrawWhenPitch() {\n return true;\n },\n\n _redrawWhenRotate: function _redrawWhenRotate() {\n return this instanceof Ellipse || this instanceof Sector;\n },\n\n _paintAsPath: function _paintAsPath() {\n var map = this.getMap();\n var altitude = this._getPainter().getAltitude();\n\n return altitude > 0 || map.getPitch() || this instanceof Ellipse && map.getBearing();\n },\n\n _getPaintParams: function _getPaintParams() {\n var map = this.getMap();\n if (this._paintAsPath()) {\n return Polygon.prototype._getPaintParams.call(this, true);\n }\n var pcenter = this._getPrjCoordinates();\n var pt = map._prjToPoint(pcenter, map.getGLZoom());\n var size = this._getRenderSize();\n return [pt, size['width'], size['height']];\n },\n\n\n _paintOn: function _paintOn() {\n if (this._paintAsPath()) {\n return Canvas.polygon.apply(Canvas, arguments);\n } else {\n return Canvas.ellipse.apply(Canvas, arguments);\n }\n },\n\n _getRenderSize: function _getRenderSize() {\n var map = this.getMap(),\n z = map.getGLZoom();\n var prjExtent = this._getPrjExtent();\n var pmin = map._prjToPoint(prjExtent.getMin(), z),\n pmax = map._prjToPoint(prjExtent.getMax(), z);\n return new Size(Math.abs(pmax.x - pmin.x) / 2, Math.abs(pmax.y - pmin.y) / 2);\n }\n};\n\nEllipse.include(el);\n\nCircle.include(el);\n\nRectangle.include({\n _getPaintParams: function _getPaintParams() {\n var map = this.getMap();\n var pointZoom = map.getGLZoom();\n var shell = this._getPrjShell();\n var points = this._getPath2DPoints(shell, false, pointZoom);\n return [points];\n },\n\n\n _paintOn: Canvas.polygon\n});\n\nSector.include(el, {\n _redrawWhenPitch: function _redrawWhenPitch() {\n return true;\n },\n\n _getPaintParams: function _getPaintParams() {\n if (this._paintAsPath()) {\n return Polygon.prototype._getPaintParams.call(this, true);\n }\n var map = this.getMap();\n var pt = map._prjToPoint(this._getPrjCoordinates(), map.getGLZoom());\n var size = this._getRenderSize();\n return [pt, size['width'], [this.getStartAngle(), this.getEndAngle()]];\n },\n\n\n _paintOn: function _paintOn() {\n if (this._paintAsPath()) {\n return Canvas.polygon.apply(Canvas, arguments);\n } else {\n var r = this.getMap().getBearing();\n var args = arguments;\n if (r) {\n args[3] = args[3].slice(0);\n args[3][0] += r;\n args[3][1] += r;\n }\n return Canvas.sector.apply(Canvas, args);\n }\n }\n\n});\n\nPath.include({\n _paintAsPath: function _paintAsPath() {\n return true;\n }\n});\n\nLineString.include({\n\n arrowStyles: {\n 'classic': [3, 4]\n },\n\n _getArrowShape: function _getArrowShape(prePoint, point, lineWidth, arrowStyle, tolerance) {\n if (!tolerance) {\n tolerance = 0;\n }\n var width = lineWidth * arrowStyle[0],\n height = lineWidth * arrowStyle[1] + tolerance,\n hw = width / 2 + tolerance;\n\n var normal = void 0;\n if (point.nextCtrlPoint || point.prevCtrlPoint) {\n if (point.prevCtrlPoint) {\n normal = point.sub(new Point(point.prevCtrlPoint));\n } else {\n normal = point.sub(new Point(point.nextCtrlPoint));\n }\n } else {\n normal = point.sub(prePoint);\n }\n normal._unit();\n var p1 = point.sub(normal.multi(height));\n normal._perp();\n var p0 = p1.add(normal.multi(hw));\n normal._multi(-1);\n var p2 = p1.add(normal.multi(hw));\n return [p0, point, p2, p0];\n },\n _getPaintParams: function _getPaintParams() {\n var prjVertexes = this._getPrjCoordinates();\n var points = this._getPath2DPoints(prjVertexes, false, this.getMap().getGLZoom());\n return [points];\n },\n _paintOn: function _paintOn(ctx, points, lineOpacity, fillOpacity, dasharray) {\n if (this.options['smoothness']) {\n Canvas.paintSmoothLine(ctx, points, lineOpacity, this.options['smoothness'], false, this._animIdx, this._animTailRatio);\n } else {\n Canvas.path(ctx, points, lineOpacity, null, dasharray);\n }\n this._paintArrow(ctx, points, lineOpacity);\n },\n _getArrowPlacement: function _getArrowPlacement() {\n return this.options['arrowPlacement'];\n },\n _getArrowStyle: function _getArrowStyle() {\n var arrowStyle = this.options['arrowStyle'];\n if (arrowStyle) {\n return Array.isArray(arrowStyle) ? arrowStyle : this.arrowStyles[arrowStyle];\n }\n return null;\n },\n _getArrows: function _getArrows(points, lineWidth, tolerance) {\n var arrowStyle = this._getArrowStyle();\n if (!arrowStyle || points.length < 2) {\n return [];\n }\n var isSplitted = points.length > 0 && Array.isArray(points[0]);\n var segments = isSplitted ? points : [points];\n var placement = this._getArrowPlacement();\n var arrows = [];\n var map = this.getMap(),\n first = map.coordToContainerPoint(this.getFirstCoordinate()),\n last = map.coordToContainerPoint(this.getLastCoordinate());\n for (var i = segments.length - 1; i >= 0; i--) {\n if (placement === 'vertex-first' || placement === 'vertex-firstlast' && segments[i][0].closeTo(first, 0.01)) {\n arrows.push(this._getArrowShape(segments[i][1], segments[i][0], lineWidth, arrowStyle, tolerance));\n }\n if (placement === 'vertex-last' || placement === 'vertex-firstlast' && segments[i][segments[i].length - 1].closeTo(last, 0.01)) {\n arrows.push(this._getArrowShape(segments[i][segments[i].length - 2], segments[i][segments[i].length - 1], lineWidth, arrowStyle, tolerance));\n } else if (placement === 'point') {\n this._getArrowPoints(arrows, segments[i], lineWidth, arrowStyle, tolerance);\n }\n }\n return arrows;\n },\n _getArrowPoints: function _getArrowPoints(arrows, segments, lineWidth, arrowStyle, tolerance) {\n for (var ii = 0, ll = segments.length - 1; ii < ll; ii++) {\n arrows.push(this._getArrowShape(segments[ii], segments[ii + 1], lineWidth, arrowStyle, tolerance));\n }\n },\n _paintArrow: function _paintArrow(ctx, points, lineOpacity) {\n var lineWidth = this._getInternalSymbol()['lineWidth'];\n if (!isNumber(lineWidth) || lineWidth < 3) {\n lineWidth = 3;\n }\n var arrows = this._getArrows(points, lineWidth);\n if (!arrows.length) {\n return;\n }\n if (ctx.setLineDash) {\n ctx.setLineDash([]);\n }\n for (var i = arrows.length - 1; i >= 0; i--) {\n ctx.fillStyle = ctx.strokeStyle;\n Canvas.polygon(ctx, arrows[i], lineOpacity, lineOpacity);\n }\n }\n});\n\nPolygon.include({\n _getPaintParams: function _getPaintParams(disableSimplify) {\n var maxZoom = this.getMap().getGLZoom();\n var prjVertexes = this._getPrjShell();\n var points = this._getPath2DPoints(prjVertexes, disableSimplify, maxZoom);\n\n var isSplitted = points.length > 0 && Array.isArray(points[0]);\n if (isSplitted) {\n points = [[points[0]], [points[1]]];\n }\n var prjHoles = this._getPrjHoles();\n var holePoints = [];\n if (prjHoles && prjHoles.length > 0) {\n for (var i = 0; i < prjHoles.length; i++) {\n var hole = this._getPath2DPoints(prjHoles[i], disableSimplify, maxZoom);\n if (Array.isArray(hole) && isSplitted) {\n if (Array.isArray(hole[0])) {\n points[0].push(hole[0]);\n points[1].push(hole[1]);\n } else {\n points[0].push(hole);\n }\n } else {\n holePoints.push(hole);\n }\n }\n }\n if (!isSplitted) {\n points = [points];\n pushIn(points, holePoints);\n }\n return [points];\n },\n _paintOn: function _paintOn(ctx, points, lineOpacity, fillOpacity, dasharray) {\n Canvas.polygon(ctx, points, lineOpacity, fillOpacity, dasharray, this.options['smoothness']);\n }\n});\n\nexport { index as Util, dom as DomUtil, strings as StringUtil, index$1 as MapboxUtil, index$4 as ui, index$5 as control, index$6 as renderer, index$3 as symbolizer, Animation$1 as animation, Browser$1 as Browser, Ajax, Canvas, Class, Eventable, JSONAble, Handlerable, Handler$1 as Handler, DragHandler, MapTool, DrawTool, AreaTool, DistanceTool, SpatialReference, INTERNAL_LAYER_PREFIX, GEOMETRY_COLLECTION_TYPES, GEOJSON_TYPES, RESOURCE_PROPERTIES, RESOURCE_SIZE_PROPERTIES, NUMERICAL_PROPERTIES, COLOR_PROPERTIES, projections as projection, index$2 as measurer, Coordinate, CRS, Extent, Point, PointExtent, Size, Transformation, Map, Layer, TileLayer, GroupTileLayer, WMSTileLayer, CanvasTileLayer, ImageLayer, OverlayLayer, VectorLayer, CanvasLayer, ParticleLayer, TileSystem, TileConfig, ArcCurve, Circle, ConnectorLine, ArcConnectorLine, CubicBezierCurve, Curve, Ellipse, GeoJSON, Geometry, GeometryCollection, Label, LineString, Marker, MultiLineString, MultiPoint, MultiPolygon, Polygon, QuadBezierCurve, Rectangle, Sector, TextBox, TextMarker };\n\ntypeof console !== 'undefined' && console.log('maptalks v0.40.5');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/maptalks/dist/maptalks.es.js\n// module id = 101\n// module chunks = 0"],"sourceRoot":""}
\No newline at end of file